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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@SuppressWarnings("unused")
protected void setComment(@Nullable final T comment)
{
immutableSetComment(comment);
} | @SuppressWarnings(STR) void function(@Nullable final T comment) { immutableSetComment(comment); } | /**
* Specifies the comment.
* @param comment such comment.
*/ | Specifies the comment | setComment | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/vo/AbstractAttribute.java",
"license": "gpl-2.0",
"size": 26533
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 510,239 |
@Test
public void testDynamicCacheLongTransactionNodeStart() throws Exception {
IgniteEx ig0 = (IgniteEx)startGrids(4);
ig0.cluster().active(true);
IgniteEx client = (IgniteEx)startGrid("client");
CacheConfiguration<Integer, String> dynamicCacheCfg = cacheConfig(REPLICATED_TX_... | void function() throws Exception { IgniteEx ig0 = (IgniteEx)startGrids(4); ig0.cluster().active(true); IgniteEx client = (IgniteEx)startGrid(STR); CacheConfiguration<Integer, String> dynamicCacheCfg = cacheConfig(REPLICATED_TX_CACHE_NAME); dynamicCacheCfg.setName("dyn"); IgniteCache<Integer, String> dynamicCache = clie... | /**
* Tests that join of non-baseline node while long transactions are running won't break dynamically started cache.
*/ | Tests that join of non-baseline node while long transactions are running won't break dynamically started cache | testDynamicCacheLongTransactionNodeStart | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/baseline/ClientAffinityAssignmentWithBaselineTest.java",
"license": "apache-2.0",
"size": 38584
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.atomic.AtomicBoolean",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.internal.IgniteEx"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.ignite.IgniteCache; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,792,191 |
final Map<String, String> wantedProperties = innerRootBean.getKeyPropertyList();
return Sets.newHashSet(Collections2.filter(childRbeOns, new Predicate<ObjectName>() { | final Map<String, String> wantedProperties = innerRootBean.getKeyPropertyList(); return Sets.newHashSet(Collections2.filter(childRbeOns, new Predicate<ObjectName>() { | /**
* Finds all children runtime beans, same properties and values as current
* root + any number of additional properties
*/ | Finds all children runtime beans, same properties and values as current root + any number of additional properties | findChildren | {
"repo_name": "my76128/controller",
"path": "opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/InstanceRuntime.java",
"license": "epl-1.0",
"size": 4923
} | [
"com.google.common.base.Predicate",
"com.google.common.collect.Collections2",
"com.google.common.collect.Sets",
"java.util.Map",
"javax.management.ObjectName"
] | import com.google.common.base.Predicate; import com.google.common.collect.Collections2; import com.google.common.collect.Sets; import java.util.Map; import javax.management.ObjectName; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import javax.management.*; | [
"com.google.common",
"java.util",
"javax.management"
] | com.google.common; java.util; javax.management; | 2,532,532 |
private void updateDelta(Applications delta) {
int deltaCount = 0;
for (Application app : delta.getRegisteredApplications()) {
for (InstanceInfo instance : app.getInstances()) {
Applications applications = getApplications();
String instanceRegion = instanc... | void function(Applications delta) { int deltaCount = 0; for (Application app : delta.getRegisteredApplications()) { for (InstanceInfo instance : app.getInstances()) { Applications applications = getApplications(); String instanceRegion = instanceRegionChecker.getInstanceRegion(instance); if (!instanceRegionChecker.isLo... | /**
* Updates the delta information fetches from the eureka server into the
* local cache.
*
* @param delta
* the delta information received from eureka server in the last
* poll cycle.
*/ | Updates the delta information fetches from the eureka server into the local cache | updateDelta | {
"repo_name": "ccortezb/eureka",
"path": "eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java",
"license": "apache-2.0",
"size": 89455
} | [
"com.netflix.appinfo.InstanceInfo",
"com.netflix.discovery.shared.Application",
"com.netflix.discovery.shared.Applications"
] | import com.netflix.appinfo.InstanceInfo; import com.netflix.discovery.shared.Application; import com.netflix.discovery.shared.Applications; | import com.netflix.appinfo.*; import com.netflix.discovery.shared.*; | [
"com.netflix.appinfo",
"com.netflix.discovery"
] | com.netflix.appinfo; com.netflix.discovery; | 63,001 |
private void process_authreq(RdpPacket_Localised data)
throws RdesktopException,
IOException, CryptoException {
byte[] out_token = new byte[LICENCE_TOKEN_SIZE];
byte[] decrypt_token = new byte[LICENCE_TOKEN_SIZE];
byte[] crypt_hwid = new byte[LICENCE_HWID_SIZE];
... | void function(RdpPacket_Localised data) throws RdesktopException, IOException, CryptoException { byte[] out_token = new byte[LICENCE_TOKEN_SIZE]; byte[] decrypt_token = new byte[LICENCE_TOKEN_SIZE]; byte[] crypt_hwid = new byte[LICENCE_HWID_SIZE]; byte[] sealed_buffer = new byte[LICENCE_TOKEN_SIZE + LICENCE_HWID_SIZE];... | /**
* Process an authorisation request
*
* @param data Packet containing request details
* @throws RdesktopException
* @throws UnsupportedEncodingException
* @throws IOException
* @throws CryptoException
*/ | Process an authorisation request | process_authreq | {
"repo_name": "automenta/narchy",
"path": "ui/src/main/java/net/propero/rdp/Licence.java",
"license": "agpl-3.0",
"size": 21134
} | [
"java.io.IOException",
"net.propero.rdp.crypto.CryptoException"
] | import java.io.IOException; import net.propero.rdp.crypto.CryptoException; | import java.io.*; import net.propero.rdp.crypto.*; | [
"java.io",
"net.propero.rdp"
] | java.io; net.propero.rdp; | 1,915,024 |
public ImmutableList<Statement> getStatements() {
return stmts;
} | ImmutableList<Statement> function() { return stmts; } | /**
* Returns an (immutable, ordered) list of statements in this BUILD file.
*/ | Returns an (immutable, ordered) list of statements in this BUILD file | getStatements | {
"repo_name": "nkhuyu/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java",
"license": "apache-2.0",
"size": 11245
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,250,374 |
public void itemMelon(EntityPlayer player, World world, ItemStack backpack)
{
//lastTime is in ticks for this backpack.
if (world.isRemote) return;
InventoryBackpack inv = new InventoryBackpack(backpack);
int drops = 0;
if (player.isInWater())
{
drops ... | void function(EntityPlayer player, World world, ItemStack backpack) { if (world.isRemote) return; InventoryBackpack inv = new InventoryBackpack(backpack); int drops = 0; if (player.isInWater()) { drops += 2; } if (isUnderRain(player)) { drops += 1; } if (inv.getLastTime() <= 0 && drops > 0) { inv.setLastTime(5); FluidS... | /**
* The Melon Backpack, like his cousin the Cactus Backpack, will fill itself, but with delicious
* and refreshing Melon Juice, if the backpack is wet in any way.
*/ | The Melon Backpack, like his cousin the Cactus Backpack, will fill itself, but with delicious and refreshing Melon Juice, if the backpack is wet in any way | itemMelon | {
"repo_name": "runescapejon/AdventureBackpack2",
"path": "src/main/java/com/darkona/adventurebackpack/common/BackpackAbilities.java",
"license": "lgpl-3.0",
"size": 29219
} | [
"com.darkona.adventurebackpack.init.ModFluids",
"com.darkona.adventurebackpack.inventory.InventoryBackpack",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.world.World",
"net.minecraftforge.fluids.FluidStack"
] | import com.darkona.adventurebackpack.init.ModFluids; import com.darkona.adventurebackpack.inventory.InventoryBackpack; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; | import com.darkona.adventurebackpack.init.*; import com.darkona.adventurebackpack.inventory.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.world.*; import net.minecraftforge.fluids.*; | [
"com.darkona.adventurebackpack",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.world",
"net.minecraftforge.fluids"
] | com.darkona.adventurebackpack; net.minecraft.entity; net.minecraft.item; net.minecraft.world; net.minecraftforge.fluids; | 972,260 |
private void addStreetAddress(ArrayList<Object> insertParameters) {
String street1 = m_generator.astring(Constants.MIN_STREET, Constants.MAX_STREET);
String street2 = m_generator.astring(Constants.MIN_STREET, Constants.MAX_STREET);
String city = m_generator.astring(Constants.... | void function(ArrayList<Object> insertParameters) { String street1 = m_generator.astring(Constants.MIN_STREET, Constants.MAX_STREET); String street2 = m_generator.astring(Constants.MIN_STREET, Constants.MAX_STREET); String city = m_generator.astring(Constants.MIN_CITY, Constants.MAX_CITY); String state = m_generator.as... | /** Appends the street address fields to insertParameters. Used for warehouses, districts and
customers. */ | Appends the street address fields to insertParameters. Used for warehouses, districts and | addStreetAddress | {
"repo_name": "migue/voltdb",
"path": "tests/test_apps/tpcc/client/com/MyLoader.java",
"license": "agpl-3.0",
"size": 41838
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,809,419 |
public static void loadExtraInformationOfFeedItem(final FeedItem item) {
Log.d(TAG, "loadExtraInformationOfFeedItem() called with: " + "item = [" + item + "]");
PodDBAdapter adapter = PodDBAdapter.getInstance();
adapter.open();
Cursor cursor = null;
try {
cursor =... | static void function(final FeedItem item) { Log.d(TAG, STR + STR + item + "]"); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); Cursor cursor = null; try { cursor = adapter.getExtraInformationOfItem(item); if (cursor.moveToFirst()) { int indexDescription = cursor.getColumnIndex(PodDBAdapter.KEY_DESCR... | /**
* Loads additional information about a FeedItem, e.g. shownotes
*
* @param item The FeedItem
*/ | Loads additional information about a FeedItem, e.g. shownotes | loadExtraInformationOfFeedItem | {
"repo_name": "mfietz/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java",
"license": "mit",
"size": 41215
} | [
"android.database.Cursor",
"android.util.Log",
"de.danoeh.antennapod.core.feed.FeedItem"
] | import android.database.Cursor; import android.util.Log; import de.danoeh.antennapod.core.feed.FeedItem; | import android.database.*; import android.util.*; import de.danoeh.antennapod.core.feed.*; | [
"android.database",
"android.util",
"de.danoeh.antennapod"
] | android.database; android.util; de.danoeh.antennapod; | 2,218,425 |
public void setExecutionContext(SeMa4g executionContext) {
if (executionContext != null) {
this.executionContext = executionContext;
}
}
/**
* Sets the {@link SeMa4gCommand.State} | void function(SeMa4g executionContext) { if (executionContext != null) { this.executionContext = executionContext; } } /** * Sets the {@link SeMa4gCommand.State} | /**
* Sets the {@link SeMa4g} for this command.
*
* @param executionContext the {@link SeMa4g} for this command
*/ | Sets the <code>SeMa4g</code> for this command | setExecutionContext | {
"repo_name": "FrankHossfeld/sema4g",
"path": "sema4g-client/src/main/java/com/github/mvp4g/sema4g/client/command/AbstractCommand.java",
"license": "apache-2.0",
"size": 5957
} | [
"com.github.mvp4g.sema4g.client.SeMa4g"
] | import com.github.mvp4g.sema4g.client.SeMa4g; | import com.github.mvp4g.sema4g.client.*; | [
"com.github.mvp4g"
] | com.github.mvp4g; | 262,622 |
public void setFinancialDocumentTenCentAmount(KualiDecimal financialDocumentTenCentAmount) {
this.financialDocumentTenCentAmount = financialDocumentTenCentAmount;
} | void function(KualiDecimal financialDocumentTenCentAmount) { this.financialDocumentTenCentAmount = financialDocumentTenCentAmount; } | /**
* Sets the financialDocumentTenCentAmount attribute.
*
* @param financialDocumentTenCentAmount The financialDocumentTenCentAmount to set.
*/ | Sets the financialDocumentTenCentAmount attribute | setFinancialDocumentTenCentAmount | {
"repo_name": "kkronenb/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/CoinDetail.java",
"license": "agpl-3.0",
"size": 27963
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 436,159 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String networkVirtualApplianceName, String siteName, Context context); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDelete( String resourceGroupName, String networkVirtualApplianceName, String siteName, Context context); | /**
* Deletes the specified site from a Virtual Appliance.
*
* @param resourceGroupName The name of the resource group.
* @param networkVirtualApplianceName The name of the Network Virtual Appliance.
* @param siteName The name of the site.
* @param context The context to associate with thi... | Deletes the specified site from a Virtual Appliance | beginDelete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualApplianceSitesClient.java",
"license": "mit",
"size": 20594
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 735,214 |
public static void copy(InputStream in,
OutputStream out,
long byteCount)
throws IOException {
byte[] buffer = new byte[BUFFERSIZE];
int len = BUFFERSIZE;
if (byteCount >= 0) {
while (byteCount > 0) {
... | static void function(InputStream in, OutputStream out, long byteCount) throws IOException { byte[] buffer = new byte[BUFFERSIZE]; int len = BUFFERSIZE; if (byteCount >= 0) { while (byteCount > 0) { if (byteCount < BUFFERSIZE) len = in.read(buffer, 0, (int) byteCount); else len = in.read(buffer, 0, BUFFERSIZE); if (len ... | /**
* Copy Stream in to Stream for byteCount bytes or until EOF or exception.
*/ | Copy Stream in to Stream for byteCount bytes or until EOF or exception | copy | {
"repo_name": "mccraigmccraig/springy",
"path": "src/main/java/springy/util/IOHelper.java",
"license": "apache-2.0",
"size": 3340
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 751,241 |
public String formatShortDate(Date date)
{
return DateFormat.getDateInstance(DateFormat.SHORT).format(date);
}
| String function(Date date) { return DateFormat.getDateInstance(DateFormat.SHORT).format(date); } | /**
* Formats a date in <code>DateFormat.SHORT</code> style.
*
* @param date The date to format.
* @return The formatted date as text.
*/ | Formats a date in <code>DateFormat.SHORT</code> style | formatShortDate | {
"repo_name": "1CharlesStern/Web-XMLVerifier",
"path": "src/main/java/org/apache/velocity/app/tools/VelocityFormatter.java",
"license": "apache-2.0",
"size": 12856
} | [
"java.text.DateFormat",
"java.util.Date"
] | import java.text.DateFormat; import java.util.Date; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 505,174 |
if (tenants == null) {
tenants = new ArrayList<TenantOrgRestRep>();
}
return tenants;
} | if (tenants == null) { tenants = new ArrayList<TenantOrgRestRep>(); } return tenants; } | /**
* List of tenants
*
*/ | List of tenants | getTenants | {
"repo_name": "emcvipr/controller-client-java",
"path": "models/src/main/java/com/emc/storageos/model/tenant/TenantOrgBulkRep.java",
"license": "apache-2.0",
"size": 936
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,713,513 |
@Override
@WebApiDescription(title="Returns site information for site siteId.")
public Site readById(String siteId, Parameters parameters)
{
return sites.getSite(siteId);
} | @WebApiDescription(title=STR) Site function(String siteId, Parameters parameters) { return sites.getSite(siteId); } | /**
* Returns information regarding the site 'siteId'.
*
*/ | Returns information regarding the site 'siteId' | readById | {
"repo_name": "Tybion/community-edition",
"path": "projects/remote-api/source/java/org/alfresco/rest/api/sites/SiteEntityResource.java",
"license": "lgpl-3.0",
"size": 2490
} | [
"org.alfresco.rest.api.model.Site",
"org.alfresco.rest.framework.WebApiDescription",
"org.alfresco.rest.framework.resource.parameters.Parameters"
] | import org.alfresco.rest.api.model.Site; import org.alfresco.rest.framework.WebApiDescription; import org.alfresco.rest.framework.resource.parameters.Parameters; | import org.alfresco.rest.api.model.*; import org.alfresco.rest.framework.*; import org.alfresco.rest.framework.resource.parameters.*; | [
"org.alfresco.rest"
] | org.alfresco.rest; | 1,459,635 |
//-----------------------------------------------------------------------
public Builder index(IborIndex index) {
JodaBeanUtils.notNull(index, "index");
this.index = index;
return this;
} | Builder function(IborIndex index) { JodaBeanUtils.notNull(index, "index"); this.index = index; return this; } | /**
* Sets the Ibor index.
* <p>
* The floating rate to be paid is based on this index
* It will be a well known market index such as 'GBP-LIBOR-3M'.
* @param index the new value, not null
* @return this, for chaining, not null
*/ | Sets the Ibor index. The floating rate to be paid is based on this index It will be a well known market index such as 'GBP-LIBOR-3M' | index | {
"repo_name": "OpenGamma/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/swap/type/IborRateSwapLegConvention.java",
"license": "apache-2.0",
"size": 59483
} | [
"com.opengamma.strata.basics.index.IborIndex",
"org.joda.beans.JodaBeanUtils"
] | import com.opengamma.strata.basics.index.IborIndex; import org.joda.beans.JodaBeanUtils; | import com.opengamma.strata.basics.index.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 17,163 |
public boolean isUseableByPlayer(EntityPlayer player)
{
return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
} | boolean function(EntityPlayer player) { return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D; } | /**
* Do not make give this method the name canInteractWith because it clashes with Container
*/ | Do not make give this method the name canInteractWith because it clashes with Container | isUseableByPlayer | {
"repo_name": "CJMinecraft01/Minecraft-Modding-Tutorials-1.8.9",
"path": "src/main/java/cjminecraft/bitofeverything/tileentities/TileEntityCopperFurnace.java",
"license": "lgpl-2.1",
"size": 16904
} | [
"net.minecraft.entity.player.EntityPlayer"
] | import net.minecraft.entity.player.EntityPlayer; | import net.minecraft.entity.player.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 297,488 |
public ServiceCall<Void> putDateValidAsync(Map<String, LocalDate> arrayBody, final ServiceCallback<Void> serviceCallback) {
return ServiceCall.fromResponse(putDateValidWithServiceResponseAsync(arrayBody), serviceCallback);
} | ServiceCall<Void> function(Map<String, LocalDate> arrayBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(putDateValidWithServiceResponseAsync(arrayBody), serviceCallback); } | /**
* Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"}.
*
* @param arrayBody the Map<String, LocalDate> value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | Set dictionary value {"0": "2000-12-01", "1": "1980-01-02", "2": "1492-10-12"} | putDateValidAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java",
"license": "mit",
"size": 210563
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map",
"org.joda.time.LocalDate"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; import org.joda.time.LocalDate; | import com.microsoft.rest.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"java.util",
"org.joda.time"
] | com.microsoft.rest; java.util; org.joda.time; | 2,119,899 |
void setUrls(List<Url> urls); | void setUrls(List<Url> urls); | /**
* Set the URLs related to the message collection
*
* @param urls the URLs related to the message collection
*/ | Set the URLs related to the message collection | setUrls | {
"repo_name": "hoatle/gatein-shindig",
"path": "java/social-api/src/main/java/org/apache/shindig/social/opensocial/model/MessageCollection.java",
"license": "apache-2.0",
"size": 3940
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,671,884 |
protected CmsRelationType getRelationType(String path) {
CmsRelationType result = getContentDefinition().getContentHandler().getRelationType(path);
I_CmsXmlDocument document = getDocument();
if (document != null) {
// the relations set in the main content definition override rel... | CmsRelationType function(String path) { CmsRelationType result = getContentDefinition().getContentHandler().getRelationType(path); I_CmsXmlDocument document = getDocument(); if (document != null) { result = document.getContentDefinition().getContentHandler().getRelationType(getPath(), result); } else { LOG.warn(STR + p... | /**
* Returns the relation type for the given path.<p>
*
* @param path the element path
*
* @return the relation type
*/ | Returns the relation type for the given path | getRelationType | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/xml/types/A_CmsXmlContentValue.java",
"license": "lgpl-2.1",
"size": 18947
} | [
"org.opencms.relations.CmsRelationType"
] | import org.opencms.relations.CmsRelationType; | import org.opencms.relations.*; | [
"org.opencms.relations"
] | org.opencms.relations; | 1,265,587 |
public void addListener(ChannelUID thingChannel, DmxThingHandler listener, ListenerType type) {
switch (type) {
case VALUE:
if (valueListeners.containsKey(thingChannel)) {
logger.trace("VALUE listener {} already exists in channel {}", thingChannel, this);
... | void function(ChannelUID thingChannel, DmxThingHandler listener, ListenerType type) { switch (type) { case VALUE: if (valueListeners.containsKey(thingChannel)) { logger.trace(STR, thingChannel, this); } else { valueListeners.put(thingChannel, listener); logger.debug(STR, thingChannel, this); } break; case ACTION: if (a... | /**
* add a channel listener for state updates
*
* @param thingChannel the channel the listener is linked to
* @param listener the listener itself
*/ | add a channel listener for state updates | addListener | {
"repo_name": "openhab/openhab2",
"path": "bundles/org.openhab.binding.dmx/src/main/java/org/openhab/binding/dmx/internal/multiverse/DmxChannel.java",
"license": "epl-1.0",
"size": 12416
} | [
"java.util.AbstractMap",
"org.openhab.binding.dmx.internal.DmxBindingConstants",
"org.openhab.binding.dmx.internal.DmxThingHandler",
"org.openhab.core.thing.ChannelUID"
] | import java.util.AbstractMap; import org.openhab.binding.dmx.internal.DmxBindingConstants; import org.openhab.binding.dmx.internal.DmxThingHandler; import org.openhab.core.thing.ChannelUID; | import java.util.*; import org.openhab.binding.dmx.internal.*; import org.openhab.core.thing.*; | [
"java.util",
"org.openhab.binding",
"org.openhab.core"
] | java.util; org.openhab.binding; org.openhab.core; | 460,300 |
private static String getNewFileName(String type)
{
String name = null;
if (type.equals(GoogleDocsConstants.DOCUMENT_TYPE))
{
name = GoogleDocsConstants.NEW_DOCUMENT_NAME;
}
else if (type.equals(GoogleDocsConstants.SPREADSHEET_TYPE))
{
... | static String function(String type) { String name = null; if (type.equals(GoogleDocsConstants.DOCUMENT_TYPE)) { name = GoogleDocsConstants.NEW_DOCUMENT_NAME; } else if (type.equals(GoogleDocsConstants.SPREADSHEET_TYPE)) { name = GoogleDocsConstants.NEW_SPREADSHEET_NAME; } else if (type.equals(GoogleDocsConstants.PRESEN... | /**
* Get the default new content name
*
* @param type
* @return
*/ | Get the default new content name | getNewFileName | {
"repo_name": "Pluies/Alfresco-Google-docs-plugin",
"path": "Google Docs Repository/src/main/java/org/alfresco/integrations/google/docs/webscripts/CreateContent.java",
"license": "lgpl-3.0",
"size": 10655
} | [
"org.alfresco.integrations.google.docs.GoogleDocsConstants"
] | import org.alfresco.integrations.google.docs.GoogleDocsConstants; | import org.alfresco.integrations.google.docs.*; | [
"org.alfresco.integrations"
] | org.alfresco.integrations; | 487,468 |
public static final Cursor query(ContentResolver cr, long eventId, String[] projection) {
String[] attArgs = {Long.toString(eventId)};
return cr.query(CONTENT_URI, projection, ATTENDEES_WHERE, attArgs ,
null );
}
}
protected interface EventsColum... | static final Cursor function(ContentResolver cr, long eventId, String[] projection) { String[] attArgs = {Long.toString(eventId)}; return cr.query(CONTENT_URI, projection, ATTENDEES_WHERE, attArgs , null ); } } protected interface EventsColumns { public static final String CALENDAR_ID = STR; public static final String ... | /**
* Queries all attendees associated with the given event. This is a
* blocking call and should not be done on the UI thread.
*
* @param cr The content resolver to use for the query
* @param eventId The id of the event to retrieve attendees for
* @param projection... | Queries all attendees associated with the given event. This is a blocking call and should not be done on the UI thread | query | {
"repo_name": "KhalidElSayed/birthday-adapter",
"path": "org_birthdayadapter/src/android/provider/CalendarContract.java",
"license": "gpl-3.0",
"size": 103813
} | [
"android.content.ContentResolver",
"android.database.Cursor",
"android.net.Uri"
] | import android.content.ContentResolver; 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; | 2,308,634 |
public void handlePut() {
getResponse().setStatus(Status.SERVER_ERROR_INTERNAL);
} | void function() { getResponse().setStatus(Status.SERVER_ERROR_INTERNAL); } | /**
* Handles a PUT call. The default behavior, to be overriden by subclasses,
* is to set the status to {@link Status#SERVER_ERROR_INTERNAL}.
*/ | Handles a PUT call. The default behavior, to be overriden by subclasses, is to set the status to <code>Status#SERVER_ERROR_INTERNAL</code> | handlePut | {
"repo_name": "atealxt/work-workspaces",
"path": "HttpForwardDemo/src_restlet/org/restlet/Handler.java",
"license": "mit",
"size": 13975
} | [
"org.restlet.data.Status"
] | import org.restlet.data.Status; | import org.restlet.data.*; | [
"org.restlet.data"
] | org.restlet.data; | 208,193 |
public List<PhysicalLink> getRoute(SwitchRoute route)
throws LinkMappingException; | List<PhysicalLink> function(SwitchRoute route) throws LinkMappingException; | /**
* Gets the current path as a list of physical links for the given route.
*
* @param route the switch route
* @return the path
*/ | Gets the current path as a list of physical links for the given route | getRoute | {
"repo_name": "hujw/L2OVX",
"path": "src/main/java/net/onrc/openvirtex/elements/Mappable.java",
"license": "apache-2.0",
"size": 12656
} | [
"java.util.List",
"net.onrc.openvirtex.elements.link.PhysicalLink",
"net.onrc.openvirtex.exceptions.LinkMappingException",
"net.onrc.openvirtex.routing.SwitchRoute"
] | import java.util.List; import net.onrc.openvirtex.elements.link.PhysicalLink; import net.onrc.openvirtex.exceptions.LinkMappingException; import net.onrc.openvirtex.routing.SwitchRoute; | import java.util.*; import net.onrc.openvirtex.elements.link.*; import net.onrc.openvirtex.exceptions.*; import net.onrc.openvirtex.routing.*; | [
"java.util",
"net.onrc.openvirtex"
] | java.util; net.onrc.openvirtex; | 2,718,693 |
private AttributeWithValue combineToNew(final AttributeWithValue from)
{
// Make sure the "from" is compatible with this attribute (shall not happen)
Preconditions.checkArgument(getAttributeId() == from.getAttributeId(), "attributeId is not compatible: this=%s, from=%s", this, from);
Preconditions.check... | AttributeWithValue function(final AttributeWithValue from) { Preconditions.checkArgument(getAttributeId() == from.getAttributeId(), STR, this, from); Preconditions.checkArgument(isTransferWhenNull() == from.isTransferWhenNull(), STR, this, from); if (isStickWithNullValue()) { return this; } final boolean isTransferWhen... | /**
* Combine(merge) given attribute into this attribute.
*
* @param from
* @return
* <ul>
* <li>a new {@link AttributeWithValue} instance containing current values, merged with given <code>ppOrderAttribute</code> values
* <li>this if there is no change
* </ul>
... | Combine(merge) given attribute into this attribute | combineToNew | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.handlingunits.base/src/main/java/de/metas/handlingunits/attribute/impl/PPOrderProductAttributeBL.java",
"license": "gpl-2.0",
"size": 17016
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 446,045 |
InputStream replaceDependencies(String site, Document document, Map<String,String> dependencies) throws ServiceException; | InputStream replaceDependencies(String site, Document document, Map<String,String> dependencies) throws ServiceException; | /**
* Replace dependencies in the document based on the values in the Map original,target
*
* used by copy/paste scenario where page dependencies are duplicated
*
* @param site
* @param document
* @param dependencies
* @return document after dependencies were replaced
* @thr... | Replace dependencies in the document based on the values in the Map original,target used by copy/paste scenario where page dependencies are duplicated | replaceDependencies | {
"repo_name": "vestrada/studio",
"path": "src/main/java/org/craftercms/studio/api/v1/service/dependency/DmDependencyService.java",
"license": "gpl-3.0",
"size": 5641
} | [
"java.io.InputStream",
"java.util.Map",
"org.craftercms.studio.api.v1.exception.ServiceException",
"org.dom4j.Document"
] | import java.io.InputStream; import java.util.Map; import org.craftercms.studio.api.v1.exception.ServiceException; import org.dom4j.Document; | import java.io.*; import java.util.*; import org.craftercms.studio.api.v1.exception.*; import org.dom4j.*; | [
"java.io",
"java.util",
"org.craftercms.studio",
"org.dom4j"
] | java.io; java.util; org.craftercms.studio; org.dom4j; | 1,074,273 |
@SuppressWarnings("unchecked")
public void addFailureCallback(FailureCallback callback) {
Assert.notNull(callback, "'callback' must not be null");
synchronized (this.mutex) {
switch (this.state) {
case NEW:
this.failureCallbacks.add(callback);
break;
case FAILURE:
callback.onFailure((T... | @SuppressWarnings(STR) void function(FailureCallback callback) { Assert.notNull(callback, STR); synchronized (this.mutex) { switch (this.state) { case NEW: this.failureCallbacks.add(callback); break; case FAILURE: callback.onFailure((Throwable) this.result); break; } } } | /**
* Add the given failure callback to this registry.
* @param callback the failure callback to add
* @since 4.1
*/ | Add the given failure callback to this registry | addFailureCallback | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-core/src/main/java/org/springframework/util/concurrent/ListenableFutureCallbackRegistry.java",
"license": "apache-2.0",
"size": 3826
} | [
"org.springframework.util.Assert"
] | import org.springframework.util.Assert; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,827,527 |
public static String filterHtmlAttributes(SoyValue value) {
if (isSanitizedContentOfKind(value, SanitizedContent.ContentKind.ATTRIBUTES)) {
// We're guaranteed to be in a case where key=value pairs are expected. However, if it would
// cause issues to directly abut this with more attributes, add a spa... | static String function(SoyValue value) { if (isSanitizedContentOfKind(value, SanitizedContent.ContentKind.ATTRIBUTES)) { String content = value.coerceToString(); if (content.length() > 0) { char lastChar = content.charAt(content.length() - 1); if (lastChar != '"' && lastChar != '\'' && !Character.isWhitespace(lastChar)... | /**
* Checks that the input is a valid HTML attribute name with normal keyword or textual content
* or known safe attribute content.
*/ | Checks that the input is a valid HTML attribute name with normal keyword or textual content or known safe attribute content | filterHtmlAttributes | {
"repo_name": "rgpower/closure-templates",
"path": "java/src/com/google/template/soy/shared/restricted/Sanitizers.java",
"license": "apache-2.0",
"size": 32922
} | [
"com.google.template.soy.data.SanitizedContent",
"com.google.template.soy.data.SoyValue"
] | import com.google.template.soy.data.SanitizedContent; import com.google.template.soy.data.SoyValue; | import com.google.template.soy.data.*; | [
"com.google.template"
] | com.google.template; | 1,758,209 |
@FIXVersion(introduced="4.4")
@TagNumRef(tagNum=TagNum.EncodedTextLen)
public void setEncodedTextLen(Integer encodedTextLen) {
this.encodedTextLen = encodedTextLen;
} | @FIXVersion(introduced="4.4") @TagNumRef(tagNum=TagNum.EncodedTextLen) void function(Integer encodedTextLen) { this.encodedTextLen = encodedTextLen; } | /**
* Message field setter.
* @param encodedTextLen field value
*/ | Message field setter | setEncodedTextLen | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/ConfirmationMsg.java",
"license": "gpl-3.0",
"size": 94557
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 502,549 |
public static int getLevelForExperienceWithChecks(long experience) {
int guess = getLevelFromExp(experience);
long high = calculateXPfromLevel(guess + 1);
long low = calculateXPfromLevel(guess);
if (experience >= low && (experience < high || high < low)) {
return guess;
}
System.out.pri... | static int function(long experience) { int guess = getLevelFromExp(experience); long high = calculateXPfromLevel(guess + 1); long low = calculateXPfromLevel(guess); if (experience >= low && (experience < high high < low)) { return guess; } System.out.println(STR + guess + STR); System.out.println(STR + low); System.out... | /**
* Variant of {@link #getLevelForExperience(long)} for unit tests only. This checks its result and if it is wrong, will output debug info t0 stdout and thrown
* an {@link ArithmeticException}.
*/ | Variant of <code>#getLevelForExperience(long)</code> for unit tests only. This checks its result and if it is wrong, will output debug info t0 stdout and thrown an <code>ArithmeticException</code> | getLevelForExperienceWithChecks | {
"repo_name": "SleepyTrousers/EnderIO",
"path": "enderio-base/src/main/java/crazypants/enderio/base/xp/XpUtil.java",
"license": "unlicense",
"size": 10251
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 295,153 |
public ST createOutputPromotionInFunction(OutputPromotion outputPromotion) {
Variable promotedOutput = outputPromotion.getOutputVariable();
ST promotedOutputST = perfect.getOutputVariableReference(promotedOutput.getId());
ST promotedFunctionCallST = getOutputCall(outputPromotion);
ST equality = perfect.ge... | ST function(OutputPromotion outputPromotion) { Variable promotedOutput = outputPromotion.getOutputVariable(); ST promotedOutputST = perfect.getOutputVariableReference(promotedOutput.getId()); ST promotedFunctionCallST = getOutputCall(outputPromotion); ST equality = perfect.getEquals(promotedOutputST, promotedFunctionCa... | /**
* Creates an output promotion template for functions.
*
* @param promotedOutput the output variable to be promoted
* @param promotedOperation the operation to be promoted
*
* @return result.outVar = a.func(inVar).outVar
*/ | Creates an output promotion template for functions | createOutputPromotionInFunction | {
"repo_name": "sylviaswoboda/objectz-2-perfect",
"path": "src/main/java/at/ac/tuwien/oz/translator/templates/PerfectPostconditionTemplateProvider.java",
"license": "mit",
"size": 32736
} | [
"at.ac.tuwien.oz.datatypes.Variable",
"at.ac.tuwien.oz.datatypes.postconditions.OutputPromotion"
] | import at.ac.tuwien.oz.datatypes.Variable; import at.ac.tuwien.oz.datatypes.postconditions.OutputPromotion; | import at.ac.tuwien.oz.datatypes.*; import at.ac.tuwien.oz.datatypes.postconditions.*; | [
"at.ac.tuwien"
] | at.ac.tuwien; | 1,333,278 |
@Override
public boolean accept(ClusterMessage msg) {
return (msg instanceof SingleSignOnMessage);
} | boolean function(ClusterMessage msg) { return (msg instanceof SingleSignOnMessage); } | /**
* Accept only SingleSignOnMessage
*
* @param msg
* ClusterMessage
* @return boolean - returns true to indicate that messageReceived should be
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/ | Accept only SingleSignOnMessage | accept | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOnListener.java",
"license": "apache-2.0",
"size": 6403
} | [
"org.apache.catalina.ha.ClusterMessage"
] | import org.apache.catalina.ha.ClusterMessage; | import org.apache.catalina.ha.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,393,922 |
@Override
public RegisteredCommand register(DatanodeDetails datanodeDetails,
NodeReportProto nodeReport, PipelineReportsProto pipelineReportsProto) {
return null;
} | RegisteredCommand function(DatanodeDetails datanodeDetails, NodeReportProto nodeReport, PipelineReportsProto pipelineReportsProto) { return null; } | /**
* Register the node if the node finds that it is not registered with any
* SCM.
*
* @param datanodeDetails DatanodeDetails
* @param nodeReport NodeReportProto
* @return SCMHeartbeatResponseProto
*/ | Register the node if the node finds that it is not registered with any SCM | register | {
"repo_name": "ucare-uchicago/hadoop",
"path": "hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/MockNodeManager.java",
"license": "apache-2.0",
"size": 16355
} | [
"org.apache.hadoop.hdds.protocol.DatanodeDetails",
"org.apache.hadoop.ozone.protocol.commands.RegisteredCommand"
] | import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.ozone.protocol.commands.RegisteredCommand; | import org.apache.hadoop.hdds.protocol.*; import org.apache.hadoop.ozone.protocol.commands.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,781,316 |
public CommandEvent readEvent(int timeout, TimeUnit unit) throws Exception {
checkConnected();
connection.setReadTimeout((int) unit.toMillis(timeout));
String eventType = textIn.readLine();
if (eventType != null) {
switch (eventType) {
case PREPARED_EVENT:
... | CommandEvent function(int timeout, TimeUnit unit) throws Exception { checkConnected(); connection.setReadTimeout((int) unit.toMillis(timeout)); String eventType = textIn.readLine(); if (eventType != null) { switch (eventType) { case PREPARED_EVENT: return readPreparedEvent(); case STARTED_EVENT: return readStartedEvent... | /**
* Reads a command event from the wire.
* @param timeout is the time to read from the connection.
* @param unit of time for the timeout.
* @return the CommandEvent read from the wire.
* @throws Exception if no event is read before the timeout.
*/ | Reads a command event from the wire | readEvent | {
"repo_name": "justinma246/k3po",
"path": "control/src/main/java/org/kaazing/k3po/control/internal/Control.java",
"license": "agpl-3.0",
"size": 16728
} | [
"java.util.concurrent.TimeUnit",
"org.kaazing.k3po.control.internal.event.CommandEvent"
] | import java.util.concurrent.TimeUnit; import org.kaazing.k3po.control.internal.event.CommandEvent; | import java.util.concurrent.*; import org.kaazing.k3po.control.internal.event.*; | [
"java.util",
"org.kaazing.k3po"
] | java.util; org.kaazing.k3po; | 1,671,948 |
public void testValidateReferencesWithNonExistentInterface() throws Exception {
Set<DefDescriptor<InterfaceDef>> interfaces = new
HashSet<>();
interfaces.add(vendor.makeInterfaceDefDescriptor("say:what"));
BaseComponentDef bcd = vendor.makeBaseComponentDefWithNulls(getDefClas... | void function() throws Exception { Set<DefDescriptor<InterfaceDef>> interfaces = new HashSet<>(); interfaces.add(vendor.makeInterfaceDefDescriptor(STR)); BaseComponentDef bcd = vendor.makeBaseComponentDefWithNulls(getDefClass(), getAuraTestingUtil().getNonce(STR), null, null, null, null, null, null, null, interfaces, n... | /**
* Test method for {@link Definition#validateReferences()}.
*/ | Test method for <code>Definition#validateReferences()</code> | testValidateReferencesWithNonExistentInterface | {
"repo_name": "igor-sfdc/aura",
"path": "aura-impl/src/test/java/org/auraframework/def/BaseComponentDefTest.java",
"license": "apache-2.0",
"size": 93773
} | [
"java.util.HashSet",
"java.util.Set",
"org.auraframework.throwable.quickfix.DefinitionNotFoundException"
] | import java.util.HashSet; import java.util.Set; import org.auraframework.throwable.quickfix.DefinitionNotFoundException; | import java.util.*; import org.auraframework.throwable.quickfix.*; | [
"java.util",
"org.auraframework.throwable"
] | java.util; org.auraframework.throwable; | 2,024,246 |
public static String getString(Context context, String key) {
SharedPreferences mainPref =
context.getSharedPreferences(context.getResources()
.getString(R.string.shared_pref_package),
Context.MODE_PRIVATE
);
return mainPref.getStri... | static String function(Context context, String key) { SharedPreferences mainPref = context.getSharedPreferences(context.getResources() .getString(R.string.shared_pref_package), Context.MODE_PRIVATE ); return mainPref.getString(key, null); } | /**
* Retrieve string data from shared preferences in private mode.
* @param context - The context of activity which is requesting to put data.
* @param key - Used to identify the value to to be retrieved.
*/ | Retrieve string data from shared preferences in private mode | getString | {
"repo_name": "dilee/product-mdm",
"path": "modules/mobile-agents/android/system-service/app/src/main/java/org/wso2/emm/system/service/utils/Preference.java",
"license": "apache-2.0",
"size": 5924
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 677,292 |
Property createProperty(String name, String value, ResourcePropertyMapping mapping)
throws SearchEngineException; | Property createProperty(String name, String value, ResourcePropertyMapping mapping) throws SearchEngineException; | /**
* Creates a Property that is used with the actual Search Engine
*/ | Creates a Property that is used with the actual Search Engine | createProperty | {
"repo_name": "unkascrack/compass-fork",
"path": "compass-core/src/main/java/org/compass/core/ResourceFactory.java",
"license": "apache-2.0",
"size": 3818
} | [
"org.compass.core.engine.SearchEngineException",
"org.compass.core.mapping.ResourcePropertyMapping"
] | import org.compass.core.engine.SearchEngineException; import org.compass.core.mapping.ResourcePropertyMapping; | import org.compass.core.engine.*; import org.compass.core.mapping.*; | [
"org.compass.core"
] | org.compass.core; | 2,134,281 |
public List<AndesRemovableMetadata> getExpiredMessages(int limit) throws AndesException; | List<AndesRemovableMetadata> function(int limit) throws AndesException; | /**
* get expired messages from store
*
* @param limit max num of messages to read
* @return AndesRemovableMetadata
* @throws AndesException
*/ | get expired messages from store | getExpiredMessages | {
"repo_name": "abeykoon/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/MessageStore.java",
"license": "apache-2.0",
"size": 15563
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,179,625 |
void append(Object[] fields) throws IOException; | void append(Object[] fields) throws IOException; | /**
* Write a row to the CSV file
*/ | Write a row to the CSV file | append | {
"repo_name": "technicalguru/csv",
"path": "src/test/java/org/skife/csv/CSVWriter.java",
"license": "gpl-3.0",
"size": 1572
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,415,297 |
public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
GraphicsNode refNode = null;
GVTBuilder builder = ctx.getGVTBuilder();
selectedChild = null;
for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) {
if (n.getNodeType() == Node.ELEMENT_NO... | GraphicsNode function(BridgeContext ctx, Element e) { GraphicsNode refNode = null; GVTBuilder builder = ctx.getGVTBuilder(); selectedChild = null; for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() == Node.ELEMENT_NODE) { Element ref = (Element)n; if (n instanceof SVGTests && SVGU... | /**
* Creates a <tt>GraphicsNode</tt> according to the specified parameters.
*
* @param ctx the bridge context to use
* @param e the element that describes the graphics node to build
* @return a graphics node that represents the specified element
*/ | Creates a GraphicsNode according to the specified parameters | createGraphicsNode | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/bridge/SVGSwitchElementBridge.java",
"license": "gpl-3.0",
"size": 5540
} | [
"org.apache.batik.gvt.CompositeGraphicsNode",
"org.apache.batik.gvt.GraphicsNode",
"org.w3c.dom.Element",
"org.w3c.dom.Node",
"org.w3c.dom.svg.SVGTests"
] | import org.apache.batik.gvt.CompositeGraphicsNode; import org.apache.batik.gvt.GraphicsNode; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.svg.SVGTests; | import org.apache.batik.gvt.*; import org.w3c.dom.*; import org.w3c.dom.svg.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,438,531 |
@ApiModelProperty(required = true, value = "The skus for the item. Each defines a unique configuration for the item to be purchased (Large-Blue, Small-Green, etc). These are what is ultimately selected in the store and added to the cart")
public List<Sku> getSkus() {
return skus;
} | @ApiModelProperty(required = true, value = STR) List<Sku> function() { return skus; } | /**
* The skus for the item. Each defines a unique configuration for the item to be purchased (Large-Blue, Small-Green, etc). These are what is ultimately selected in the store and added to the cart
* @return skus
**/ | The skus for the item. Each defines a unique configuration for the item to be purchased (Large-Blue, Small-Green, etc). These are what is ultimately selected in the store and added to the cart | getSkus | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/main/java/com/knetikcloud/model/StoreItem.java",
"license": "apache-2.0",
"size": 9676
} | [
"com.knetikcloud.model.Sku",
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import com.knetikcloud.model.Sku; import io.swagger.annotations.ApiModelProperty; import java.util.List; | import com.knetikcloud.model.*; import io.swagger.annotations.*; import java.util.*; | [
"com.knetikcloud.model",
"io.swagger.annotations",
"java.util"
] | com.knetikcloud.model; io.swagger.annotations; java.util; | 2,767,134 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<BackupVaultResourceInner>, BackupVaultResourceInner> beginCreateOrUpdate(
String vaultName, String resourceGroupName, BackupVaultResourceInner parameters); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<BackupVaultResourceInner>, BackupVaultResourceInner> beginCreateOrUpdate( String vaultName, String resourceGroupName, BackupVaultResourceInner parameters); | /**
* Creates or updates a BackupVault resource belonging to a resource group.
*
* @param vaultName The name of the backup vault.
* @param resourceGroupName The name of the resource group where the backup vault is present.
* @param parameters Request body for operation.
* @throws IllegalAr... | Creates or updates a BackupVault resource belonging to a resource group | beginCreateOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/fluent/BackupVaultsClient.java",
"license": "mit",
"size": 15644
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.dataprotection.fluent.models.BackupVaultResourceInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.dataprotection.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 563,313 |
@InterfaceAudience.Public
public Validator getValidation(String name) {
Validator result = null;
if (validations != null) {
result = validations.get(name);
}
return result;
} | @InterfaceAudience.Public Validator function(String name) { Validator result = null; if (validations != null) { result = validations.get(name); } return result; } | /**
* Returns the existing document validation function (block) registered with the given name.
* Note that validations are not persistent -- you have to re-register them on every launch.
*/ | Returns the existing document validation function (block) registered with the given name. Note that validations are not persistent -- you have to re-register them on every launch | getValidation | {
"repo_name": "couchbase/couchbase-lite-java-core",
"path": "src/main/java/com/couchbase/lite/Database.java",
"license": "apache-2.0",
"size": 114145
} | [
"com.couchbase.lite.internal.InterfaceAudience"
] | import com.couchbase.lite.internal.InterfaceAudience; | import com.couchbase.lite.internal.*; | [
"com.couchbase.lite"
] | com.couchbase.lite; | 327,074 |
public String toString()
{
// 128 is a reasonable buffer initial size for constructor
CPStringBuilder sb = new CPStringBuilder(128);
Modifier.toString(getModifiers(), sb).append(' ');
sb.append(ClassHelper.getUserName(getReturnType())).append(' ');
sb.append(getDeclaringClass().getName()).append... | String function() { CPStringBuilder sb = new CPStringBuilder(128); Modifier.toString(getModifiers(), sb).append(' '); sb.append(ClassHelper.getUserName(getReturnType())).append(' '); sb.append(getDeclaringClass().getName()).append('.'); sb.append(getName()).append('('); Class[] c = getParameterTypes(); if (c.length > 0... | /**
* Get a String representation of the Method. A Method's String
* representation is "<modifiers> <returntype>
* <methodname>(<paramtypes>) throws <exceptions>", where
* everything after ')' is omitted if there are no exceptions.<br> Example:
* <code>public static int run(... | Get a String representation of the Method. A Method's String representation is "<modifiers> <returntype> <methodname>(<paramtypes>) throws <exceptions>", where everything after ')' is omitted if there are no exceptions. Example: <code>public static int run(java.lang.Runnable,int)</code> | toString | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/java/lang/reflect/Method.java",
"license": "gpl-2.0",
"size": 17306
} | [
"gnu.java.lang.CPStringBuilder",
"gnu.java.lang.ClassHelper"
] | import gnu.java.lang.CPStringBuilder; import gnu.java.lang.ClassHelper; | import gnu.java.lang.*; | [
"gnu.java.lang"
] | gnu.java.lang; | 2,070,985 |
public boolean next() {
//
// Update position prior to reading the next value, etc so we can
//
this.position = this.buffer.position();
if (!buffer.hasRemaining()) {
return false;
}
this.nextCalled = true;
//
// Read timestamp/type flag
//
byte ... | boolean function() { this.position = this.buffer.position(); if (!buffer.hasRemaining()) { return false; } this.nextCalled = true; byte tsTypeFlag = buffer.get(); if (GTSEncoder.FLAGS_ENCRYPTED == (tsTypeFlag & GTSEncoder.FLAGS_MASK_ENCRYPTED)) { int enclen = (int) Varint.decodeUnsignedLong(buffer); if (null == wrappin... | /**
* Attempt to read the next measurement and associated metadata (timestamp, location, elevation)
* @return true if a measurement was successfully read, false if none were left in the buffer.
*/ | Attempt to read the next measurement and associated metadata (timestamp, location, elevation) | next | {
"repo_name": "StevenLeRoux/warp10-platform",
"path": "warp10/src/main/java/io/warp10/continuum/gts/CustomBufferBasedGTSDecoder.java",
"license": "apache-2.0",
"size": 17066
} | [
"com.google.common.base.Charsets",
"java.math.BigDecimal",
"java.math.BigInteger",
"java.nio.ByteOrder",
"org.bouncycastle.crypto.CipherParameters",
"org.bouncycastle.crypto.InvalidCipherTextException",
"org.bouncycastle.crypto.engines.AESWrapEngine",
"org.bouncycastle.crypto.paddings.PKCS7Padding",
... | import com.google.common.base.Charsets; import java.math.BigDecimal; import java.math.BigInteger; import java.nio.ByteOrder; import org.bouncycastle.crypto.CipherParameters; import org.bouncycastle.crypto.InvalidCipherTextException; import org.bouncycastle.crypto.engines.AESWrapEngine; import org.bouncycastle.crypto.pa... | import com.google.common.base.*; import java.math.*; import java.nio.*; import org.bouncycastle.crypto.*; import org.bouncycastle.crypto.engines.*; import org.bouncycastle.crypto.paddings.*; import org.bouncycastle.crypto.params.*; | [
"com.google.common",
"java.math",
"java.nio",
"org.bouncycastle.crypto"
] | com.google.common; java.math; java.nio; org.bouncycastle.crypto; | 786,927 |
@JsonProperty("items")
public void setItems(final Set<Item> items) {
this.items = items;
} | @JsonProperty("items") void function(final Set<Item> items) { this.items = items; } | /**
* Items to be procured
* <p>
* The goods and services to be purchased, broken into line items wherever possible.
* Items should not be duplicated, but a quantity of 2 specified instead.
*
* @param items
* The items
*/ | Items to be procured The goods and services to be purchased, broken into line items wherever possible. Items should not be duplicated, but a quantity of 2 specified instead | setItems | {
"repo_name": "devgateway/ocvn",
"path": "persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/Tender.java",
"license": "mit",
"size": 28148
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"java.util.Set"
] | import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Set; | import com.fasterxml.jackson.annotation.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 2,524,230 |
//----------------------------------------------------------------------
public int delete(Integer id) throws SQLException; | int function(Integer id) throws SQLException; | /**
* Deletes the record in the database using the given primary key value(s)
* @param id
* @return
*/ | Deletes the record in the database using the given primary key value(s) | delete | {
"repo_name": "vasttrafik/wso2-community-api",
"path": "java/src/main/java/org/vasttrafik/wso2/carbon/community/api/dao/ReportDAO.java",
"license": "mit",
"size": 2715
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 596,398 |
public synchronized void mergeWithoutReplacement(ContentValues other) {
if (setValues == null) {
setValues = new ContentValues();
}
for (Entry<String, Object> item : other.valueSet()) {
if (setValues.containsKey(item.getKey())) {
continue;
... | synchronized void function(ContentValues other) { if (setValues == null) { setValues = new ContentValues(); } for (Entry<String, Object> item : other.valueSet()) { if (setValues.containsKey(item.getKey())) { continue; } AndroidUtilities.putInto(setValues, item.getKey(), item.getValue()); } } | /**
* Merges set values with those coming from another source,
* keeping the existing value if one already exists
*/ | Merges set values with those coming from another source, keeping the existing value if one already exists | mergeWithoutReplacement | {
"repo_name": "cinash/tasks",
"path": "api/src/main/java/com/todoroo/andlib/data/AbstractModel.java",
"license": "gpl-3.0",
"size": 16528
} | [
"android.content.ContentValues",
"com.todoroo.andlib.utility.AndroidUtilities",
"java.util.Map"
] | import android.content.ContentValues; import com.todoroo.andlib.utility.AndroidUtilities; import java.util.Map; | import android.content.*; import com.todoroo.andlib.utility.*; import java.util.*; | [
"android.content",
"com.todoroo.andlib",
"java.util"
] | android.content; com.todoroo.andlib; java.util; | 1,290,452 |
private ArrayList<RateMapEntry> insertElementAt(ArrayList<RateMapEntry> oldList, RateMapEntry newElement, int i)
{
ArrayList<RateMapEntry> newList = new ArrayList<>();
Iterator<RateMapEntry> oldListIter = oldList.iterator();
int position = 0;
while (oldListIter.hasNext())
{
// if we're i... | ArrayList<RateMapEntry> function(ArrayList<RateMapEntry> oldList, RateMapEntry newElement, int i) { ArrayList<RateMapEntry> newList = new ArrayList<>(); Iterator<RateMapEntry> oldListIter = oldList.iterator(); int position = 0; while (oldListIter.hasNext()) { if (position == i) { newList.add(newElement); } newList.add(... | /**
* Simulate "insert at" (which is not available in ArrayList
*
* @param oldList
* @param newElement
* @param i
* @return
*/ | Simulate "insert at" (which is not available in ArrayList | insertElementAt | {
"repo_name": "jmuthu/OpenRate",
"path": "src/main/java/OpenRate/cache/RUMCPRateCache.java",
"license": "gpl-2.0",
"size": 26767
} | [
"java.util.ArrayList",
"java.util.Iterator"
] | import java.util.ArrayList; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,389,969 |
private FlowDTO populateRemainingFlowStructure(FlowDTO flowStructure) {
processorResource.populateRemainingProcessorEntitiesContent(flowStructure.getProcessors());
connectionResource.populateRemainingConnectionEntitiesContent(flowStructure.getConnections());
inputPortResource.populateRemaini... | FlowDTO function(FlowDTO flowStructure) { processorResource.populateRemainingProcessorEntitiesContent(flowStructure.getProcessors()); connectionResource.populateRemainingConnectionEntitiesContent(flowStructure.getConnections()); inputPortResource.populateRemainingInputPortEntitiesContent(flowStructure.getInputPorts());... | /**
* Populates the remaining content of the specified snippet.
*/ | Populates the remaining content of the specified snippet | populateRemainingFlowStructure | {
"repo_name": "apsaltis/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java",
"license": "apache-2.0",
"size": 121893
} | [
"org.apache.nifi.web.api.dto.ProcessGroupDTO",
"org.apache.nifi.web.api.dto.flow.FlowDTO",
"org.apache.nifi.web.api.entity.ProcessGroupEntity"
] | import org.apache.nifi.web.api.dto.ProcessGroupDTO; import org.apache.nifi.web.api.dto.flow.FlowDTO; import org.apache.nifi.web.api.entity.ProcessGroupEntity; | import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.dto.flow.*; import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,041,599 |
public void updateServer(int serverId, Server server, int identityId)
{
ContentValues values = new ContentValues();
values.put(ServerConstants.TITLE, server.getTitle());
values.put(ServerConstants.HOST, server.getHost());
values.put(ServerConstants.PORT, server.getPort());
... | void function(int serverId, Server server, int identityId) { ContentValues values = new ContentValues(); values.put(ServerConstants.TITLE, server.getTitle()); values.put(ServerConstants.HOST, server.getHost()); values.put(ServerConstants.PORT, server.getPort()); values.put(ServerConstants.PASSWORD, server.getPassword()... | /**
* Update the server record in the database
*
* @param serverId The primary key of the server to update.
* @param server The server to update.
* @param identityId The identity of the server record
*/ | Update the server record in the database | updateServer | {
"repo_name": "dsalt/Yaaic",
"path": "app/src/main/java/org/yaaic/db/Database.java",
"license": "gpl-3.0",
"size": 21963
} | [
"android.content.ContentValues",
"org.yaaic.model.Authentication",
"org.yaaic.model.Server"
] | import android.content.ContentValues; import org.yaaic.model.Authentication; import org.yaaic.model.Server; | import android.content.*; import org.yaaic.model.*; | [
"android.content",
"org.yaaic.model"
] | android.content; org.yaaic.model; | 2,062,625 |
Shell shell;
try {
shell = new Shell();
} catch (BPException e) {
_logger.log(Level.SEVERE, "Shell construction", e);
System.exit(1);
return;
}
try {
shell.cmdLoop();
} catch (Exception e) {
_logger.log(Level.SEVERE, "CmdLoop", e);
}
shell.terminate();
System.exit(0);
}
public S... | Shell shell; try { shell = new Shell(); } catch (BPException e) { _logger.log(Level.SEVERE, STR, e); System.exit(1); return; } try { shell.cmdLoop(); } catch (Exception e) { _logger.log(Level.SEVERE, STR, e); } shell.terminate(); System.exit(0); } public Shell() throws BPException { Management.getInstance().start(); BP... | /**
* Main program
* @param args
*/ | Main program | main | {
"repo_name": "KritikalFabric/corefabric.io",
"path": "src/contrib/java/com/cisco/qte/jdtn/Shell.java",
"license": "apache-2.0",
"size": 123060
} | [
"com.cisco.qte.jdtn.apps.AppManager",
"com.cisco.qte.jdtn.bp.BPException",
"com.cisco.qte.jdtn.bp.BPManagement",
"com.cisco.qte.jdtn.general.JDtnException",
"com.cisco.qte.jdtn.general.Management",
"java.util.logging.Level"
] | import com.cisco.qte.jdtn.apps.AppManager; import com.cisco.qte.jdtn.bp.BPException; import com.cisco.qte.jdtn.bp.BPManagement; import com.cisco.qte.jdtn.general.JDtnException; import com.cisco.qte.jdtn.general.Management; import java.util.logging.Level; | import com.cisco.qte.jdtn.apps.*; import com.cisco.qte.jdtn.bp.*; import com.cisco.qte.jdtn.general.*; import java.util.logging.*; | [
"com.cisco.qte",
"java.util"
] | com.cisco.qte; java.util; | 225,872 |
public static void testMapSerialization(
final long key,
final InternalMapState<Long, VoidNamespace, Long, String> mapState) throws Exception {
TypeSerializer<Long> userKeySerializer = LongSerializer.INSTANCE;
TypeSerializer<String> userValueSerializer = StringSerializer.INSTANCE;
mapState.setCurrentNam... | static void function( final long key, final InternalMapState<Long, VoidNamespace, Long, String> mapState) throws Exception { TypeSerializer<Long> userKeySerializer = LongSerializer.INSTANCE; TypeSerializer<String> userValueSerializer = StringSerializer.INSTANCE; mapState.setCurrentNamespace(VoidNamespace.INSTANCE); fin... | /**
* Verifies that the serialization of a map using the given map state
* matches the deserialization with {@link KvStateSerializer#deserializeList}.
*
* @param key
* key of the map state
* @param mapState
* map state using the {@link VoidNamespace}, must also be a {@link InternalKvState} instance
... | Verifies that the serialization of a map using the given map state matches the deserialization with <code>KvStateSerializer#deserializeList</code> | testMapSerialization | {
"repo_name": "mylog00/flink",
"path": "flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/KvStateRequestSerializerTest.java",
"license": "apache-2.0",
"size": 15323
} | [
"java.io.ByteArrayOutputStream",
"java.util.HashMap",
"java.util.Map",
"java.util.concurrent.ThreadLocalRandom",
"org.apache.flink.api.common.typeutils.TypeSerializer",
"org.apache.flink.api.common.typeutils.base.LongSerializer",
"org.apache.flink.api.common.typeutils.base.StringSerializer",
"org.apac... | import java.io.ByteArrayOutputStream; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ThreadLocalRandom; import org.apache.flink.api.common.typeutils.TypeSerializer; import org.apache.flink.api.common.typeutils.base.LongSerializer; import org.apache.flink.api.common.typeutils.base.StringSeri... | import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.flink.api.common.typeutils.*; import org.apache.flink.api.common.typeutils.base.*; import org.apache.flink.queryablestate.client.*; import org.apache.flink.queryablestate.client.state.serialization.*; import org.apache.flink.runtime.... | [
"java.io",
"java.util",
"org.apache.flink",
"org.junit"
] | java.io; java.util; org.apache.flink; org.junit; | 2,890,605 |
@Test
public void isExperimentActiveReturnsFalseWhenTheExperimentIsArchived() {
Experiment mockExperiment = makeMockExperimentWithStatus(ExperimentStatus.ARCHIVED);
assertFalse(isExperimentActive(mockExperiment));
} | void function() { Experiment mockExperiment = makeMockExperimentWithStatus(ExperimentStatus.ARCHIVED); assertFalse(isExperimentActive(mockExperiment)); } | /**
* If the {@link Experiment#status} is {@link ExperimentStatus#ARCHIVED},
* then {@link ExperimentUtils#isExperimentActive(Experiment)} should return false.
*/ | If the <code>Experiment#status</code> is <code>ExperimentStatus#ARCHIVED</code>, then <code>ExperimentUtils#isExperimentActive(Experiment)</code> should return false | isExperimentActiveReturnsFalseWhenTheExperimentIsArchived | {
"repo_name": "optimizely/java-sdk",
"path": "core-api/src/test/java/com/optimizely/ab/internal/ExperimentUtilsTest.java",
"license": "apache-2.0",
"size": 16582
} | [
"com.optimizely.ab.config.Experiment",
"org.junit.Assert"
] | import com.optimizely.ab.config.Experiment; import org.junit.Assert; | import com.optimizely.ab.config.*; import org.junit.*; | [
"com.optimizely.ab",
"org.junit"
] | com.optimizely.ab; org.junit; | 1,098,909 |
public void addCommand(List<String> commands) {
addCommand(commands, 0, (OnCommandResultListener) null);
} | void function(List<String> commands) { addCommand(commands, 0, (OnCommandResultListener) null); } | /**
* Add commands to execute
*
* @param commands Commands to execute
*/ | Add commands to execute | addCommand | {
"repo_name": "bejibx/libsuperuser",
"path": "libsuperuser/src/main/java/eu/chainfire/libsuperuser/Shell.java",
"license": "apache-2.0",
"size": 66021
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,234,191 |
public List<Object> querySingleColumnResults(String sql, String[] args,
int column, Integer limit) {
return db.querySingleColumnResults(sql, args, column, limit);
} | List<Object> function(String sql, String[] args, int column, Integer limit) { return db.querySingleColumnResults(sql, args, column, limit); } | /**
* Query for values from a single column up to the limit
*
* @param sql
* sql statement
* @param args
* arguments
* @param limit
* result row limit
* @param column
* column index
* @return single column results
* @since 3.1.0
*/ | Query for values from a single column up to the limit | querySingleColumnResults | {
"repo_name": "ngageoint/geopackage-core-java",
"path": "src/main/java/mil/nga/geopackage/user/UserCoreDao.java",
"license": "mit",
"size": 287160
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,794,802 |
public static String getPOSTaggedAbstract(String sentence) throws IOException, ClassNotFoundException {
return tagger.tagString(sentence);
} | static String function(String sentence) throws IOException, ClassNotFoundException { return tagger.tagString(sentence); } | /**
* Returns Parts Of Speech tagged text when provided with normal text
*
* @param sentence
* @return POS tagged text
* @throws IOException
* @throws ClassNotFoundException
*/ | Returns Parts Of Speech tagged text when provided with normal text | getPOSTaggedAbstract | {
"repo_name": "peeyushsahu/PubMedMiner",
"path": "src/main/java/de/unibonn/vishal/tools/POSTagger.java",
"license": "gpl-2.0",
"size": 5502
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,960,466 |
public static boolean isSame(Identity i1, Identity i2) {
int nullCompare = EqualsHelper.nullCompare(i1, i2);
if (nullCompare != 2) {
return nullCompare == 0;
}
return EqualsHelper.nullSafeEquals(i1.getIdentifier(), i2.getIdentifier(), false);
} | static boolean function(Identity i1, Identity i2) { int nullCompare = EqualsHelper.nullCompare(i1, i2); if (nullCompare != 2) { return nullCompare == 0; } return EqualsHelper.nullSafeEquals(i1.getIdentifier(), i2.getIdentifier(), false); } | /**
* Checks if the given two {@link Identity} objects are equal by identifiers.
*
* @param i1
* the i1
* @param i2
* the i2
* @return true, if is same
*/ | Checks if the given two <code>Identity</code> objects are equal by identifiers | isSame | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/model-management/definition-api/src/main/java/com/sirma/itt/seip/definition/util/PathHelper.java",
"license": "lgpl-3.0",
"size": 7535
} | [
"com.sirma.itt.seip.domain.Identity",
"com.sirma.itt.seip.util.EqualsHelper"
] | import com.sirma.itt.seip.domain.Identity; import com.sirma.itt.seip.util.EqualsHelper; | import com.sirma.itt.seip.domain.*; import com.sirma.itt.seip.util.*; | [
"com.sirma.itt"
] | com.sirma.itt; | 2,205,681 |
public DefaultListModel<Brand> updateListBrands(String searchQuery) {
mySQLHandler.conCheck();
DefaultListModel<Brand> model = new DefaultListModel<Brand>();
String sqlQuery = "SELECT brands_name FROM pro_brands WHERE brands_name LIKE '%"+ searchQuery +"%' ORDER BY brands_name ASC;";
for (String brandName: t... | DefaultListModel<Brand> function(String searchQuery) { mySQLHandler.conCheck(); DefaultListModel<Brand> model = new DefaultListModel<Brand>(); String sqlQuery = STR+ searchQuery +STR; for (String brandName: this.mySQLHandler.sqlArrayListToStringArray(this.mySQLHandler.sqlExecuteQuery(sqlQuery))) { model.addElement(new ... | /************************************************************************************
* Update ModuleTabs
* @return
************************************************************************************/ | Update ModuleTabs | updateListBrands | {
"repo_name": "RoederProjects/promeda",
"path": "src/core/service/SearchService.java",
"license": "gpl-3.0",
"size": 4817
} | [
"javax.swing.DefaultListModel"
] | import javax.swing.DefaultListModel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,881,167 |
public void testGetMaximumPoolSize() {
final ThreadPoolExecutor p =
new ThreadPoolExecutor(2, 3,
LONG_DELAY_MS, MILLISECONDS,
new ArrayBlockingQueue<Runnable>(10));
try (PoolCleaner cleaner = cleaner(p)) {
... | void function() { final ThreadPoolExecutor p = new ThreadPoolExecutor(2, 3, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); try (PoolCleaner cleaner = cleaner(p)) { assertEquals(3, p.getMaximumPoolSize()); p.setMaximumPoolSize(5); assertEquals(5, p.getMaximumPoolSize()); p.setMaximumPoolSize(4); ass... | /**
* getMaximumPoolSize returns value given in constructor if not
* otherwise set
*/ | getMaximumPoolSize returns value given in constructor if not otherwise set | testGetMaximumPoolSize | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/ThreadPoolExecutorTest.java",
"license": "gpl-2.0",
"size": 80711
} | [
"java.util.concurrent.ArrayBlockingQueue",
"java.util.concurrent.ThreadPoolExecutor"
] | import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 914,456 |
@InterfaceAudience.Public
@InterfaceStability.Evolving
public synchronized
static void loginUserFromSubject(Subject subject) throws IOException {
ensureInitialized();
try {
if (subject == null) {
subject = new Subject();
}
LoginContext login =
newLoginContext(authent... | @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static void function(Subject subject) throws IOException { ensureInitialized(); try { if (subject == null) { subject = new Subject(); } LoginContext login = newLoginContext(authenticationMethod.getLoginAppName(), subject, new HadoopConfiguration()); lo... | /**
* Log in a user using the given subject
* @parma subject the subject to use when logging in a user, or null to
* create a new subject.
* @throws IOException if login fails
*/ | Log in a user using the given subject | loginUserFromSubject | {
"repo_name": "tecknowledgeable/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java",
"license": "apache-2.0",
"size": 58506
} | [
"java.io.File",
"java.io.IOException",
"javax.security.auth.Subject",
"javax.security.auth.login.LoginContext",
"javax.security.auth.login.LoginException",
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.classification.InterfaceStability"
] | import java.io.File; import java.io.IOException; import javax.security.auth.Subject; import javax.security.auth.login.LoginContext; import javax.security.auth.login.LoginException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; | import java.io.*; import javax.security.auth.*; import javax.security.auth.login.*; import org.apache.hadoop.classification.*; | [
"java.io",
"javax.security",
"org.apache.hadoop"
] | java.io; javax.security; org.apache.hadoop; | 2,407,856 |
@Override
protected AmazonWorkDocsAsync build(AwsAsyncClientParams params) {
return new AmazonWorkDocsAsyncClient(params);
} | AmazonWorkDocsAsync function(AwsAsyncClientParams params) { return new AmazonWorkDocsAsyncClient(params); } | /**
* Construct an asynchronous implementation of AmazonWorkDocsAsync using the current builder configuration.
*
* @param params
* Current builder configuration represented as a parameter object.
* @return Fully configured implementation of AmazonWorkDocsAsync.
*/ | Construct an asynchronous implementation of AmazonWorkDocsAsync using the current builder configuration | build | {
"repo_name": "jentfoo/aws-sdk-java",
"path": "aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/AmazonWorkDocsAsyncClientBuilder.java",
"license": "apache-2.0",
"size": 2426
} | [
"com.amazonaws.client.AwsAsyncClientParams"
] | import com.amazonaws.client.AwsAsyncClientParams; | import com.amazonaws.client.*; | [
"com.amazonaws.client"
] | com.amazonaws.client; | 2,804,056 |
@InterfaceAudience.Public
@InterfaceStability.Evolving
public synchronized static boolean isLoginKeytabBased() throws IOException {
return getLoginUser().isKeytab;
} | @InterfaceAudience.Public @InterfaceStability.Evolving synchronized static boolean function() throws IOException { return getLoginUser().isKeytab; } | /**
* Did the login happen via keytab
* @return true or false
*/ | Did the login happen via keytab | isLoginKeytabBased | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java",
"license": "mit",
"size": 57556
} | [
"java.io.IOException",
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.classification.InterfaceStability"
] | import java.io.IOException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; | import java.io.*; import org.apache.hadoop.classification.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 464,965 |
INodeQuery setRelationType(String relationType, int start, int count, ITicket credentials);
| INodeQuery setRelationType(String relationType, int start, int count, ITicket credentials); | /**
*<p> Returns an {@link INodeQuery2} object based on the relationType
* of {@link ITuple} objects linked to this {@link INode}</p>
* <p>This <em>starts a query</em>; it can be iterated as necessary</p>
* @param relationType
* @param start TODO
* @param count TODO
* @param credentials
* @return
*/ | Returns an <code>INodeQuery2</code> object based on the relationType of <code>ITuple</code> objects linked to this <code>INode</code> This starts a query; it can be iterated as necessary | setRelationType | {
"repo_name": "SolrSherlock/TopicQuestsCoreAPI",
"path": "src/java/org/topicquests/model/api/INodeQuery.java",
"license": "apache-2.0",
"size": 2885
} | [
"org.topicquests.model.api.ITicket"
] | import org.topicquests.model.api.ITicket; | import org.topicquests.model.api.*; | [
"org.topicquests.model"
] | org.topicquests.model; | 2,771,388 |
public void add(ReadableDuration duration, int scalar) {
if (duration != null) {
add(FieldUtils.safeMultiply(duration.getMillis(), scalar));
}
}
| void function(ReadableDuration duration, int scalar) { if (duration != null) { add(FieldUtils.safeMultiply(duration.getMillis(), scalar)); } } | /**
* Adds a duration to this instant specifying how many times to add.
* <p>
* This will typically change the value of most fields.
*
* @param duration the duration to add, null means add zero
* @param scalar direction and amount to add, which may be negative
* @throws Arith... | Adds a duration to this instant specifying how many times to add. This will typically change the value of most fields | add | {
"repo_name": "aleatorio12/ProVentasConnector",
"path": "lib/joda-time-2.4-dist/joda-time-2.4/src/main/java/org/joda/time/MutableDateTime.java",
"license": "gpl-3.0",
"size": 52485
} | [
"org.joda.time.field.FieldUtils"
] | import org.joda.time.field.FieldUtils; | import org.joda.time.field.*; | [
"org.joda.time"
] | org.joda.time; | 2,216,420 |
EReference getChartSet_Charts(); | EReference getChartSet_Charts(); | /**
* Returns the meta object for the containment reference list '{@link info.limpet.stackedcharts.model.ChartSet#getCharts <em>Charts</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Charts</em>'.
* @see info.limpet.stackedcharts... | Returns the meta object for the containment reference list '<code>info.limpet.stackedcharts.model.ChartSet#getCharts Charts</code>'. | getChartSet_Charts | {
"repo_name": "pecko/limpet",
"path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/StackedchartsPackage.java",
"license": "epl-1.0",
"size": 92511
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,004,294 |
@Test
public void analyzePotentialTimingAttacksOnPasswordHashVerification() {
char[] passwd = "A random te$ting p#s$w0rd!!!".toCharArray();
String passwordHash = generateStrongPasswordHash(passwd);
int runs = 100;
System.out.printf("%-25s | %15s | %s (%d runs)%n", "Test", "aver... | void function() { char[] passwd = STR.toCharArray(); String passwordHash = generateStrongPasswordHash(passwd); int runs = 100; System.out.printf(STR, "Test", STR, "total", runs); Stopwatch validPasswordChecking = Stopwatch.createStarted(); for (int i = 0; i < runs; i++) { validateStrongPasswordHash(passwd, passwordHash... | /**
* Runs several times the {@link SensitiveDataCryptoUtils#validateStrongPasswordHash} method and logs the
* average execution time to identify a potential timing attack. This verification is manual, nothing is checked in
* this test case.
*/ | Runs several times the <code>SensitiveDataCryptoUtils#validateStrongPasswordHash</code> method and logs the average execution time to identify a potential timing attack. This verification is manual, nothing is checked in this test case | analyzePotentialTimingAttacksOnPasswordHashVerification | {
"repo_name": "republique-et-canton-de-geneve/chvote-1-0",
"path": "commons-base/commons-crypto/src/test/java/ch/ge/ve/commons/crypto/SensitiveDataCryptoUtilsST.java",
"license": "agpl-3.0",
"size": 4446
} | [
"ch.ge.ve.commons.crypto.SensitiveDataCryptoUtils",
"com.google.common.base.Joiner",
"com.google.common.base.Stopwatch",
"org.junit.Test"
] | import ch.ge.ve.commons.crypto.SensitiveDataCryptoUtils; import com.google.common.base.Joiner; import com.google.common.base.Stopwatch; import org.junit.Test; | import ch.ge.ve.commons.crypto.*; import com.google.common.base.*; import org.junit.*; | [
"ch.ge.ve",
"com.google.common",
"org.junit"
] | ch.ge.ve; com.google.common; org.junit; | 2,167,455 |
public String createConnectionId(DriverConfig driver)
{
StringBuilder sb = new StringBuilder();
sb.append(_name);
if (driver != null)
sb.append('d').append(driver.getIndex()).append(".");
sb.append(_connIdCount.getAndIncrement());
return sb.toString();
} | String function(DriverConfig driver) { StringBuilder sb = new StringBuilder(); sb.append(_name); if (driver != null) sb.append('d').append(driver.getIndex()).append("."); sb.append(_connIdCount.getAndIncrement()); return sb.toString(); } | /**
* Creates a connection id.
*/ | Creates a connection id | createConnectionId | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/sql/spy/SpyDataSource.java",
"license": "gpl-2.0",
"size": 2046
} | [
"com.caucho.sql.DriverConfig"
] | import com.caucho.sql.DriverConfig; | import com.caucho.sql.*; | [
"com.caucho.sql"
] | com.caucho.sql; | 968,673 |
class VPanelLayoutFactory
{
public static final VPanelLayoutFactory newStandardWindowLayout()
{
final int columns = AdempierePLAF.getInt(VPanelUI.KEY_StandardWindow_FieldColumns, VPanelUI.DEFAULT_StandardWindow_FieldColumns);
final int labelMinWidth = AdempierePLAF.getInt(VPanelUI.KEY_StandardWindow_LabelMinWid... | class VPanelLayoutFactory { static final VPanelLayoutFactory function() { final int columns = AdempierePLAF.getInt(VPanelUI.KEY_StandardWindow_FieldColumns, VPanelUI.DEFAULT_StandardWindow_FieldColumns); final int labelMinWidth = AdempierePLAF.getInt(VPanelUI.KEY_StandardWindow_LabelMinWidth, VPanelUI.DEFAULT_StandardW... | /**
* Creates a {@link VPanelLayoutFactory} pre-configured for a standard window layout.
*
* @return layout factory
*/ | Creates a <code>VPanelLayoutFactory</code> pre-configured for a standard window layout | newStandardWindowLayout | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/client/src/main/java/org/compiere/grid/VPanelLayoutFactory.java",
"license": "gpl-2.0",
"size": 8902
} | [
"org.adempiere.plaf.AdempierePLAF",
"org.adempiere.plaf.VPanelUI"
] | import org.adempiere.plaf.AdempierePLAF; import org.adempiere.plaf.VPanelUI; | import org.adempiere.plaf.*; | [
"org.adempiere.plaf"
] | org.adempiere.plaf; | 1,627,796 |
public void testv24TagReadCompressedPictureFrame() throws Exception
{
File testFile = AbstractTestCase.copyAudioToTmp("Issue98-3.id3", "testV1.mp3");
MP3File mp3File = new MP3File(testFile);
ID3v24Tag v24tag = (ID3v24Tag) mp3File.getID3v2Tag();
assertTrue(v24tag.hasFrame(ID3v24F... | void function() throws Exception { File testFile = AbstractTestCase.copyAudioToTmp(STR, STR); MP3File mp3File = new MP3File(testFile); ID3v24Tag v24tag = (ID3v24Tag) mp3File.getID3v2Tag(); assertTrue(v24tag.hasFrame(ID3v24Frames.FRAME_ID_ATTACHED_PICTURE )); ID3v24Frame frame = (ID3v24Frame) v24tag.getFrame(ID3v24Frame... | /**
* This tests reading a v24tag that contains a compressed Picture frame
*
* @throws Exception
*/ | This tests reading a v24tag that contains a compressed Picture frame | testv24TagReadCompressedPictureFrame | {
"repo_name": "ConatyConsulting/jaudiotagger",
"path": "srctest/org/jaudiotagger/tag/id3/CompressedTest.java",
"license": "lgpl-2.1",
"size": 3471
} | [
"java.io.File",
"org.jaudiotagger.AbstractTestCase",
"org.jaudiotagger.audio.mp3.MP3File"
] | import java.io.File; import org.jaudiotagger.AbstractTestCase; import org.jaudiotagger.audio.mp3.MP3File; | import java.io.*; import org.jaudiotagger.*; import org.jaudiotagger.audio.mp3.*; | [
"java.io",
"org.jaudiotagger",
"org.jaudiotagger.audio"
] | java.io; org.jaudiotagger; org.jaudiotagger.audio; | 2,768,406 |
public void launch(LaunchPanel tab) {
if(!isLeaf()) {
return;
}
launchPanel = tab;
OSPRuntime.launchingInSingleVM = this.isSingleVM();
Launcher.singleAppMode = this.isSingleApp();
Launcher.classPath = getClassPath(); // in node-to-root order
if(isShowLog()&&isSingleVM()) {
OSPL... | void function(LaunchPanel tab) { if(!isLeaf()) { return; } launchPanel = tab; OSPRuntime.launchingInSingleVM = this.isSingleVM(); Launcher.singleAppMode = this.isSingleApp(); Launcher.classPath = getClassPath(); if(isShowLog()&&isSingleVM()) { OSPLog.setLevel(getLogLevel()); OSPLog log = OSPLog.getOSPLog(); if(isClearL... | /**
* Launches this node from the specified launch panel.
*
* @param tab the launch panel
*/ | Launches this node from the specified launch panel | launch | {
"repo_name": "OpenSourcePhysics/osp",
"path": "src/org/opensourcephysics/tools/LaunchNode.java",
"license": "gpl-3.0",
"size": 58827
} | [
"org.opensourcephysics.controls.OSPLog",
"org.opensourcephysics.controls.XMLControl",
"org.opensourcephysics.controls.XMLControlElement",
"org.opensourcephysics.display.OSPRuntime"
] | import org.opensourcephysics.controls.OSPLog; import org.opensourcephysics.controls.XMLControl; import org.opensourcephysics.controls.XMLControlElement; import org.opensourcephysics.display.OSPRuntime; | import org.opensourcephysics.controls.*; import org.opensourcephysics.display.*; | [
"org.opensourcephysics.controls",
"org.opensourcephysics.display"
] | org.opensourcephysics.controls; org.opensourcephysics.display; | 1,952,945 |
private static boolean shouldWriteSignature
(File file,
boolean append)
{
if (!append) {
return true;
}
try {
return (file.length()==0);
} catch (SecurityException ex) {
Messages.CANNOT_GET_LENGTH.warn
... | static boolean function (File file, boolean append) { if (!append) { return true; } try { return (file.length()==0); } catch (SecurityException ex) { Messages.CANNOT_GET_LENGTH.warn (UnicodeFileWriter.class,ex,file.getName()); return true; } } | /**
* Checks whether signature injection should take place for the
* given file and output mode.
*
* @param file The file.
* @param append True if data should be appended to the file.
*
* @return True if so.
*/ | Checks whether signature injection should take place for the given file and output mode | shouldWriteSignature | {
"repo_name": "nagyist/marketcetera",
"path": "trunk/util/src/main/java/org/marketcetera/util/unicode/UnicodeFileWriter.java",
"license": "apache-2.0",
"size": 13193
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 635,937 |
public void modifyAttributes(String name, int mod_op, Attributes attrs)
throws NamingException {
throw new OperationNotSupportedException();
} | void function(String name, int mod_op, Attributes attrs) throws NamingException { throw new OperationNotSupportedException(); } | /**
* Modifies the attributes associated with a named object. The order of
* the modifications is not specified. Where possible, the modifications
* are performed atomically.
*
* @param name the name of the object whose attributes will be updated
* @param mod_op the modification operati... | Modifies the attributes associated with a named object. The order of the modifications is not specified. Where possible, the modifications are performed atomically | modifyAttributes | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/WARDirContext.java",
"license": "mit",
"size": 34755
} | [
"javax.naming.NamingException",
"javax.naming.OperationNotSupportedException",
"javax.naming.directory.Attributes"
] | import javax.naming.NamingException; import javax.naming.OperationNotSupportedException; import javax.naming.directory.Attributes; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 2,797,087 |
@Property(CSV_MODE)
void setExportingCSV(boolean csv); | @Property(CSV_MODE) void setExportingCSV(boolean csv); | /**
* Indicates whether or not to export CSV file
*/ | Indicates whether or not to export CSV file | setExportingCSV | {
"repo_name": "OndraZizka/windup",
"path": "graph/api/src/main/java/org/jboss/windup/graph/model/WindupConfigurationModel.java",
"license": "epl-1.0",
"size": 4961
} | [
"com.tinkerpop.frames.Property"
] | import com.tinkerpop.frames.Property; | import com.tinkerpop.frames.*; | [
"com.tinkerpop.frames"
] | com.tinkerpop.frames; | 1,989,659 |
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
if (request.getSession().getAttribute("userTrueName") == null
|| request.getSession().getAttribute("userTrueName").equals("")) {
response.sendRedirect("index.html");
} else {
String ur... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getSession().getAttribute(STR) == null request.getSession().getAttribute(STR).equals(STRindex.htmlSTRurlSTRgoodsType1STRgoodsType2STRgoodsType11STRgoodsType22STRgoodsType3", li3); response.sendRedi... | /**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to
* post.
*
* @param request
* the request send by the client to the server
* @param response
* the response send by the server to the client
* @throws ServletE... | The doPost method of the servlet. This method is called when a form has its tag value method equals to post | doPost | {
"repo_name": "zaoming/fox_shopping",
"path": "src/com/fox/sp/servlet/AdminGoodsTypeAll.java",
"license": "apache-2.0",
"size": 3950
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,439,150 |
public void testCreateRecordType() throws Exception {
Map<String, RecordProperty> properties =
new HashMap<String, RecordProperty>();
properties.put("hello", new RecordProperty(NUMBER_TYPE, null));
JSType recordType = registry.createRecordType(properties);
assertEquals("{ hello : number }", r... | void function() throws Exception { Map<String, RecordProperty> properties = new HashMap<String, RecordProperty>(); properties.put("hello", new RecordProperty(NUMBER_TYPE, null)); JSType recordType = registry.createRecordType(properties); assertEquals(STR, recordType.toString()); } | /**
* Tests the factory method
* {@link JSTypeRegistry#createRecordType}.
*/ | Tests the factory method <code>JSTypeRegistry#createRecordType</code> | testCreateRecordType | {
"repo_name": "JonathanWalsh/Granule-Closure-Compiler",
"path": "test/com/google/javascript/rhino/jstype/JSTypeTest.java",
"license": "apache-2.0",
"size": 242164
} | [
"com.google.javascript.rhino.jstype.RecordTypeBuilder",
"java.util.HashMap",
"java.util.Map"
] | import com.google.javascript.rhino.jstype.RecordTypeBuilder; import java.util.HashMap; import java.util.Map; | import com.google.javascript.rhino.jstype.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 2,722,825 |
public void testDescendingKeySet() {
ConcurrentNavigableMap map = dmap5();
Set s = map.keySet();
assertEquals(5, s.size());
assertTrue(s.contains(m1));
assertTrue(s.contains(m2));
assertTrue(s.contains(m3));
assertTrue(s.contains(m4));
assertTrue(s.con... | void function() { ConcurrentNavigableMap map = dmap5(); Set s = map.keySet(); assertEquals(5, s.size()); assertTrue(s.contains(m1)); assertTrue(s.contains(m2)); assertTrue(s.contains(m3)); assertTrue(s.contains(m4)); assertTrue(s.contains(m5)); } | /**
* keySet returns a Set containing all the keys
*/ | keySet returns a Set containing all the keys | testDescendingKeySet | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/ConcurrentSkipListSubMapTest.java",
"license": "gpl-2.0",
"size": 42185
} | [
"java.util.Set",
"java.util.concurrent.ConcurrentNavigableMap"
] | import java.util.Set; import java.util.concurrent.ConcurrentNavigableMap; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,605,803 |
public synchronized void
setReservedContainer(RMContainer reservedContainer) {
this.reservedContainer = reservedContainer;
} | synchronized void function(RMContainer reservedContainer) { this.reservedContainer = reservedContainer; } | /**
* Set the reserved container in the node.
* @param reservedContainer Reserved container in the node.
*/ | Set the reserved container in the node | setReservedContainer | {
"repo_name": "soumabrata-chakraborty/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java",
"license": "apache-2.0",
"size": 14958
} | [
"org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer"
] | import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer; | import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 415,542 |
public void addToREF(List<AbstractUnit> units) {
for (AbstractUnit unitToAdd : units) {
UnitType unitType = unitToAdd.getUnitType();
if (unitType.hasAbility("model.ability.navalUnit")) {
for (AbstractUnit refUnit : navalUnits) {
if (refUnit.getUnit... | void function(List<AbstractUnit> units) { for (AbstractUnit unitToAdd : units) { UnitType unitType = unitToAdd.getUnitType(); if (unitType.hasAbility(STR)) { for (AbstractUnit refUnit : navalUnits) { if (refUnit.getUnitType().equals(unitType)) { refUnit.setNumber(refUnit.getNumber() + unitToAdd.getNumber()); if (unitTy... | /**
* Adds units to the Royal Expeditionary Force.
*
* @param units The addition to the Royal Expeditionary Force.
*/ | Adds units to the Royal Expeditionary Force | addToREF | {
"repo_name": "tectronics/reformationofeurope",
"path": "src/net/sf/freecol/common/model/Monarch.java",
"license": "gpl-2.0",
"size": 23673
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,337,953 |
public static int doSearch(UCSState initial) {
Map<UCSState, Integer> best = new HashMap<>();
PriorityQueue<UCSState> Q = new PriorityQueue<>(128,
new UCSStateComparator());
Q.add(initial);
best.put(initial, initial.distance());
while(Q.size() > 0) {
UCSState s = Q.poll();
if (... | static int function(UCSState initial) { Map<UCSState, Integer> best = new HashMap<>(); PriorityQueue<UCSState> Q = new PriorityQueue<>(128, new UCSStateComparator()); Q.add(initial); best.put(initial, initial.distance()); while(Q.size() > 0) { UCSState s = Q.poll(); if (best.get(s) < s.distance()) continue; if (s.atDes... | /**
* doSearch will take an initial UCSState and
* will return either the minimum distance
* to a goal state or -1 if no path could be
* found.
*/ | doSearch will take an initial UCSState and will return either the minimum distance to a goal state or -1 if no path could be found | doSearch | {
"repo_name": "AuburnACM/Competitive-Programming",
"path": "Competitions/MCPC2015/Solutions/UCS.java",
"license": "mit",
"size": 3170
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.PriorityQueue"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.PriorityQueue; | import java.util.*; | [
"java.util"
] | java.util; | 2,443,524 |
@Test
public void testInvalidEndpointIdentification() throws Exception {
String node = "0";
String serverHost = InetAddress.getLocalHost().getHostAddress();
server = new SslEchoServer(sslServerConfigs, serverHost);
server.start();
sslClientConfigs.put(SslConfigs.SSL_ENDPO... | void function() throws Exception { String node = "0"; String serverHost = InetAddress.getLocalHost().getHostAddress(); server = new SslEchoServer(sslServerConfigs, serverHost); server.start(); sslClientConfigs.put(SslConfigs.SSL_ENDPOINT_IDENTIFICATION_ALGORITHM_CONFIG, "HTTPS"); createSelector(sslClientConfigs); InetS... | /**
* Tests that server certificate with invalid IP address is not accepted by
* a client that validates server endpoint. Certificate uses "localhost" as
* common name, test uses host IP to trigger endpoint validation failure.
*/ | Tests that server certificate with invalid IP address is not accepted by a client that validates server endpoint. Certificate uses "localhost" as common name, test uses host IP to trigger endpoint validation failure | testInvalidEndpointIdentification | {
"repo_name": "Zhiqiang-He/kafka-0914-edit",
"path": "clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java",
"license": "apache-2.0",
"size": 28087
} | [
"java.net.InetAddress",
"java.net.InetSocketAddress",
"org.apache.kafka.common.config.SslConfigs"
] | import java.net.InetAddress; import java.net.InetSocketAddress; import org.apache.kafka.common.config.SslConfigs; | import java.net.*; import org.apache.kafka.common.config.*; | [
"java.net",
"org.apache.kafka"
] | java.net; org.apache.kafka; | 478,470 |
private void parseAuthors(BibEntry be, BufferedReader in) throws IOException {
// read authors and institutions
List<String> authors = new ArrayList<>();
StringBuilder institutions = new StringBuilder();
while ((this.lastLine != null) && !"".equals(this.lastLine) && !startsWithKeywor... | void function(BibEntry be, BufferedReader in) throws IOException { List<String> authors = new ArrayList<>(); StringBuilder institutions = new StringBuilder(); while ((this.lastLine != null) && !STR and STR and ", authors)); } if (institutions.length() > 0) { be.setField(FieldName.INSTITUTION, institutions.toString()); ... | /**
* Implements grammar rule "Authors"
*
* @param be
* @throws IOException
*/ | Implements grammar rule "Authors" | parseAuthors | {
"repo_name": "tschechlovdev/jabref",
"path": "src/main/java/net/sf/jabref/logic/importer/fileformat/RepecNepImporter.java",
"license": "mit",
"size": 16745
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"net.sf.jabref.model.entry.BibEntry",
"net.sf.jabref.model.entry.FieldName"
] | import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import java.util.List; import net.sf.jabref.model.entry.BibEntry; import net.sf.jabref.model.entry.FieldName; | import java.io.*; import java.util.*; import net.sf.jabref.model.entry.*; | [
"java.io",
"java.util",
"net.sf.jabref"
] | java.io; java.util; net.sf.jabref; | 614,931 |
@Test
public void testRevokeAllOnDb() throws Exception{
//copy data file to test dir
File dataDir = context.getDataDir();
File dataFile = new File(dataDir, SINGLE_TYPE_DATA_FILE_NAME);
FileOutputStream to = new FileOutputStream(dataFile);
Resources.copy(Resources.getResource(SINGLE_TYPE_DATA_FI... | void function() throws Exception{ File dataDir = context.getDataDir(); File dataFile = new File(dataDir, SINGLE_TYPE_DATA_FILE_NAME); FileOutputStream to = new FileOutputStream(dataFile); Resources.copy(Resources.getResource(SINGLE_TYPE_DATA_FILE_NAME), to); to.close(); Connection connection = context.createConnection(... | /**
* Revoke all on database after:
* - grant all on db
* - grant all on table
* - grant select on table
* - grant insert on table
*/ | Revoke all on database after: - grant all on db - grant all on table - grant select on table - grant insert on table | testRevokeAllOnDb | {
"repo_name": "apache/incubator-sentry",
"path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java",
"license": "apache-2.0",
"size": 91506
} | [
"com.google.common.io.Resources",
"java.io.File",
"java.io.FileOutputStream",
"java.sql.Connection",
"java.sql.Statement"
] | import com.google.common.io.Resources; import java.io.File; import java.io.FileOutputStream; import java.sql.Connection; import java.sql.Statement; | import com.google.common.io.*; import java.io.*; import java.sql.*; | [
"com.google.common",
"java.io",
"java.sql"
] | com.google.common; java.io; java.sql; | 486,258 |
public void setModel(ParametricModel Model) {
model = Model;
setView(model);
setChanged();
if (model == null) {
notifyObservers(ApplicationContext.MODEL_CLOSED);
} else {
notifyObservers(ApplicationContext.MODEL_LOADED);
}
} | void function(ParametricModel Model) { model = Model; setView(model); setChanged(); if (model == null) { notifyObservers(ApplicationContext.MODEL_CLOSED); } else { notifyObservers(ApplicationContext.MODEL_LOADED); } } | /**
* Set the model. If the model is set to null, then it is considered closed.
* @param Model Model
*/ | Set the model. If the model is set to null, then it is considered closed | setModel | {
"repo_name": "elmarquez/Federation",
"path": "src/ca/sfu/federation/ApplicationContext.java",
"license": "gpl-2.0",
"size": 8984
} | [
"ca.sfu.federation.model.ParametricModel"
] | import ca.sfu.federation.model.ParametricModel; | import ca.sfu.federation.model.*; | [
"ca.sfu.federation"
] | ca.sfu.federation; | 109,713 |
public Card setThumbnail(Context context, int resId) {
setThumbnail(context.getResources().getDrawable(resId));
return this;
} | Card function(Context context, int resId) { setThumbnail(context.getResources().getDrawable(resId)); return this; } | /**
* Sets an optional thumbnail image resource that's displayed on the left side of the card.
*
* @param context The context used to resolve the drawable resource ID.
* @param resId The resource ID of the drawable to use as a thumbnail.
*/ | Sets an optional thumbnail image resource that's displayed on the left side of the card | setThumbnail | {
"repo_name": "jiachenning/Cards-UI",
"path": "library/src/com/afollestad/cardsui/Card.java",
"license": "mit",
"size": 5850
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,110,216 |
public Iterator<String> iteratorDF(){
return new OWLShuntGraphDFIterator(this);
} | Iterator<String> function(){ return new OWLShuntGraphDFIterator(this); } | /**
* Get a depth-first iterator for the graph.
*
* @return JSON form of the shunt graph structure
*/ | Get a depth-first iterator for the graph | iteratorDF | {
"repo_name": "owlcollab/owltools",
"path": "OWLTools-Core/src/main/java/owltools/graph/shunt/OWLShuntGraph.java",
"license": "bsd-3-clause",
"size": 5402
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,669,273 |
public java.util.List<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI> getSubterm_booleans_BooleanConstantHLAPI(){
java.util.List<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI>();
... | java.util.List<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.booleans.hlapi.BooleanConstantHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.get... | /**
* This accessor return a list of encapsulated subelement, only of BooleanConstantHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of BooleanConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_booleans_BooleanConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/integers/hlapi/NumberConstantHLAPI.java",
"license": "epl-1.0",
"size": 94704
} | [
"fr.lip6.move.pnml.symmetricnet.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,041,927 |
public void setScaleType(@NonNull PreviewView.ScaleType scaleType) {
mPreviewView.setScaleType(scaleType);
} | void function(@NonNull PreviewView.ScaleType scaleType) { mPreviewView.setScaleType(scaleType); } | /**
* Sets the view finder scale type.
*
* <p>This controls how the view finder should be scaled and positioned within the view.
*
* @param scaleType The desired {@link PreviewView.ScaleType}.
*/ | Sets the view finder scale type. This controls how the view finder should be scaled and positioned within the view | setScaleType | {
"repo_name": "WhisperSystems/TextSecure",
"path": "app/src/main/java/androidx/camera/view/SignalCameraView.java",
"license": "gpl-3.0",
"size": 27646
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 2,089,132 |
public void setTokenType(TokenType tokenType) {
this.tokenType = tokenType;
} | void function(TokenType tokenType) { this.tokenType = tokenType; } | /**
* Sets the type of the token issued. Value is case insensitive.
*
* @param tokenType The type of the token issued.
*/ | Sets the type of the token issued. Value is case insensitive | setTokenType | {
"repo_name": "GluuFederation/oxAuth",
"path": "Client/src/main/java/org/gluu/oxauth/client/TokenResponse.java",
"license": "mit",
"size": 5160
} | [
"org.gluu.oxauth.model.common.TokenType"
] | import org.gluu.oxauth.model.common.TokenType; | import org.gluu.oxauth.model.common.*; | [
"org.gluu.oxauth"
] | org.gluu.oxauth; | 324,012 |
JobQueueService jobQueueService = ServiceLocatorFactory.getJobQueueService();
User user = CaArrayUsernameHolder.getCsmUser();
List<Job> jobsList = jobQueueService.getJobsForUser(user);
List<Job> userVisibleJobs = getUserVisibleJobs(jobsList);
this.jobs.setList(userVisibleJobs);
... | JobQueueService jobQueueService = ServiceLocatorFactory.getJobQueueService(); User user = CaArrayUsernameHolder.getCsmUser(); List<Job> jobsList = jobQueueService.getJobsForUser(user); List<Job> userVisibleJobs = getUserVisibleJobs(jobsList); this.jobs.setList(userVisibleJobs); this.jobs.setFullListSize(userVisibleJobs... | /**
* Renders the job queue page.
*
* @return path String
*/ | Renders the job queue page | jobQueue | {
"repo_name": "NCIP/caarray",
"path": "software/caarray.war/src/main/java/gov/nih/nci/caarray/web/action/project/ProjectJobQueueAction.java",
"license": "bsd-3-clause",
"size": 4104
} | [
"com.opensymphony.xwork2.Action",
"gov.nih.nci.caarray.application.ServiceLocatorFactory",
"gov.nih.nci.caarray.application.jobqueue.JobQueueService",
"gov.nih.nci.caarray.domain.project.Job",
"gov.nih.nci.caarray.util.CaArrayUsernameHolder",
"gov.nih.nci.security.authorization.domainobjects.User",
"jav... | import com.opensymphony.xwork2.Action; import gov.nih.nci.caarray.application.ServiceLocatorFactory; import gov.nih.nci.caarray.application.jobqueue.JobQueueService; import gov.nih.nci.caarray.domain.project.Job; import gov.nih.nci.caarray.util.CaArrayUsernameHolder; import gov.nih.nci.security.authorization.domainobje... | import com.opensymphony.xwork2.*; import gov.nih.nci.caarray.application.*; import gov.nih.nci.caarray.application.jobqueue.*; import gov.nih.nci.caarray.domain.project.*; import gov.nih.nci.caarray.util.*; import gov.nih.nci.security.authorization.domainobjects.*; import java.util.*; | [
"com.opensymphony.xwork2",
"gov.nih.nci",
"java.util"
] | com.opensymphony.xwork2; gov.nih.nci; java.util; | 343,989 |
@Override
public void updateVirtualMachineMetaData(String virtualMachineId,
String localControllerId,
NetworkAddress groupManagerAddress)
throws Exception
{
Guard.check(virtualMachineId, localControll... | void function(String virtualMachineId, String localControllerId, NetworkAddress groupManagerAddress) throws Exception { Guard.check(virtualMachineId, localControllerId, groupManagerAddress); log_.debug(String.format(STR, virtualMachineId)); updateGroupManagerAddress(virtualMachineId, groupManagerAddress); updateLocalCo... | /**
* Updates virtual machine mapping.
*
* @param virtualMachineId The virtual machine identifier
* @param localControllerId The local controller identifier
* @param groupManagerAddress The group manager address
* @throws Exception The exception
*/ | Updates virtual machine mapping | updateVirtualMachineMetaData | {
"repo_name": "snoozesoftware/snoozeclient",
"path": "src/main/java/org/inria/myriads/snoozeclient/database/api/impl/ClientXMLRepository.java",
"license": "gpl-2.0",
"size": 49726
} | [
"org.inria.myriads.snoozecommon.communication.NetworkAddress",
"org.inria.myriads.snoozecommon.guard.Guard"
] | import org.inria.myriads.snoozecommon.communication.NetworkAddress; import org.inria.myriads.snoozecommon.guard.Guard; | import org.inria.myriads.snoozecommon.communication.*; import org.inria.myriads.snoozecommon.guard.*; | [
"org.inria.myriads"
] | org.inria.myriads; | 2,550,136 |
@Test
public void testFailAuthenticationWithWaitFor() throws Exception {
sshd.getProperties().put(SshServer.MAX_AUTH_REQUESTS, "10");
client = SshClient.setUpDefaultClient();
client.start();
ClientSession s = client.connect("localhost", port).await().getSession();
int nb... | void function() throws Exception { sshd.getProperties().put(SshServer.MAX_AUTH_REQUESTS, "10"); client = SshClient.setUpDefaultClient(); client.start(); ClientSession s = client.connect(STR, port).await().getSession(); int nbTrials = 0; int res = 0; while ((res & ClientSession.CLOSED) == 0) { nbTrials ++; s.authPasswor... | /**
* Send bad password. The server should disconnect after a few attempts
* @throws Exception
*/ | Send bad password. The server should disconnect after a few attempts | testFailAuthenticationWithWaitFor | {
"repo_name": "kohsuke/mina-sshd",
"path": "sshd-core/src/test/java/org/apache/sshd/ServerTest.java",
"license": "apache-2.0",
"size": 8708
} | [
"java.util.concurrent.TimeoutException",
"org.junit.Assert"
] | import java.util.concurrent.TimeoutException; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,827,749 |
public static String decryptOld(String encryptedData) {
Key key;
String decryptedValue = null;
try {
key = new SecretKeySpec("NotARandomKeyYes".getBytes(), "AES");
Cipher c = Cipher.getInstance("AES");
c.init(Cipher.DECRYPT_MODE, key);
byte[] d... | static String function(String encryptedData) { Key key; String decryptedValue = null; try { key = new SecretKeySpec(STR.getBytes(), "AES"); Cipher c = Cipher.getInstance("AES"); c.init(Cipher.DECRYPT_MODE, key); byte[] decordedValue = Base64.decode(encryptedData); byte[] decValue = c.doFinal(decordedValue); decryptedVa... | /**
* Decrypt using old method.
*
* @param encryptedData the encrypted data
* @return the string
*/ | Decrypt using old method | decryptOld | {
"repo_name": "iarspider/JULauncher",
"path": "src/main/java/com/julauncher/utils/Utils.java",
"license": "gpl-3.0",
"size": 72785
} | [
"java.security.Key",
"javax.crypto.Cipher",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.Key; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; | import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 1,065,661 |
public static ByteIterator ofBytes(final byte... bytes) {
Assert.checkNotNullParam("bytes", bytes);
return ofBytes(bytes, 0, bytes.length);
} | static ByteIterator function(final byte... bytes) { Assert.checkNotNullParam("bytes", bytes); return ofBytes(bytes, 0, bytes.length); } | /**
* Get a byte iterator for a byte array.
*
* @param bytes the array
* @return the byte iterator
*/ | Get a byte iterator for a byte array | ofBytes | {
"repo_name": "wildfly/wildfly-common",
"path": "src/main/java/org/wildfly/common/iteration/ByteIterator.java",
"license": "apache-2.0",
"size": 20524
} | [
"org.wildfly.common.Assert"
] | import org.wildfly.common.Assert; | import org.wildfly.common.*; | [
"org.wildfly.common"
] | org.wildfly.common; | 2,832,902 |
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case IArchimatePackage.ADAPTER: {
IAdapter adapter = (IAdapter)theEObject;
T result = caseAdapter(adapter);
if (result == null) result = defaul... | T function(int classifierID, EObject theEObject) { switch (classifierID) { case IArchimatePackage.ADAPTER: { IAdapter adapter = (IAdapter)theEObject; T result = caseAdapter(adapter); if (result == null) result = defaultCase(theEObject); return result; } case IArchimatePackage.IDENTIFIER: { IIdentifier identifier = (IId... | /**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/ | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | doSwitch | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.model/src/com/archimatetool/model/util/ArchimateSwitch.java",
"license": "mit",
"size": 256079
} | [
"com.archimatetool.model.IAccessRelationship",
"com.archimatetool.model.IActiveStructureElement",
"com.archimatetool.model.IAdapter",
"com.archimatetool.model.IAggregationRelationship",
"com.archimatetool.model.IApplicationCollaboration",
"com.archimatetool.model.IApplicationComponent",
"com.archimateto... | import com.archimatetool.model.IAccessRelationship; import com.archimatetool.model.IActiveStructureElement; import com.archimatetool.model.IAdapter; import com.archimatetool.model.IAggregationRelationship; import com.archimatetool.model.IApplicationCollaboration; import com.archimatetool.model.IApplicationComponent; im... | import com.archimatetool.model.*; import org.eclipse.emf.ecore.*; | [
"com.archimatetool.model",
"org.eclipse.emf"
] | com.archimatetool.model; org.eclipse.emf; | 2,036,800 |
private BatchRunnableInstances getProgramInstances(BatchRunnable runnable, ApplicationSpecification spec,
Id.Program programId) {
int requested;
String programName = programId.getId();
String runnableId = programName;
ProgramType programType = progr... | BatchRunnableInstances function(BatchRunnable runnable, ApplicationSpecification spec, Id.Program programId) { int requested; String programName = programId.getId(); String runnableId = programName; ProgramType programType = programId.getType(); if (programType == ProgramType.WORKER) { if (!spec.getWorkers().containsKe... | /**
* Get requested and provisioned instances for a program type.
* The program type passed here should be one that can have instances (flows, services, ...)
* Requires caller to do this validation.
*/ | Get requested and provisioned instances for a program type. The program type passed here should be one that can have instances (flows, services, ...) Requires caller to do this validation | getProgramInstances | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/gateway/handlers/ProgramLifecycleHttpHandler.java",
"license": "apache-2.0",
"size": 69089
} | [
"co.cask.cdap.api.app.ApplicationSpecification",
"co.cask.cdap.api.flow.FlowSpecification",
"co.cask.cdap.api.flow.FlowletDefinition",
"co.cask.cdap.proto.BatchRunnable",
"co.cask.cdap.proto.BatchRunnableInstances",
"co.cask.cdap.proto.Id",
"co.cask.cdap.proto.ProgramType",
"org.jboss.netty.handler.co... | import co.cask.cdap.api.app.ApplicationSpecification; import co.cask.cdap.api.flow.FlowSpecification; import co.cask.cdap.api.flow.FlowletDefinition; import co.cask.cdap.proto.BatchRunnable; import co.cask.cdap.proto.BatchRunnableInstances; import co.cask.cdap.proto.Id; import co.cask.cdap.proto.ProgramType; import org... | import co.cask.cdap.api.app.*; import co.cask.cdap.api.flow.*; import co.cask.cdap.proto.*; import org.jboss.netty.handler.codec.http.*; | [
"co.cask.cdap",
"org.jboss.netty"
] | co.cask.cdap; org.jboss.netty; | 344,301 |
public void putOptionalHeader() throws ErrorException, IOException {
putOptionalHeaderWithServiceResponseAsync().toBlocking().single().getBody();
} | void function() throws ErrorException, IOException { putOptionalHeaderWithServiceResponseAsync().toBlocking().single().getBody(); } | /**
* Test implicitly optional header parameter.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
*/ | Test implicitly optional header parameter | putOptionalHeader | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/implementation/ImplicitsImpl.java",
"license": "mit",
"size": 29759
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,502,249 |
EReference getStepExecution_TransformationStep();
| EReference getStepExecution_TransformationStep(); | /**
* Returns the meta object for the reference '{@link orgomg.cwm.management.warehouseoperation.StepExecution#getTransformationStep <em>Transformation Step</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Transformation Step</em>'.
* @see orgomg.... | Returns the meta object for the reference '<code>orgomg.cwm.management.warehouseoperation.StepExecution#getTransformationStep Transformation Step</code>'. | getStepExecution_TransformationStep | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.tools.CWM/src/orgomg/cwm/management/warehouseoperation/WarehouseoperationPackage.java",
"license": "lgpl-3.0",
"size": 61042
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,567,092 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.