method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Transport.Connection getConnection(DiscoveryNode node) {
if (isLocalNode(node)) {
return localNodeConnection;
} else {
return transport.getConnection(node);
}
} | Transport.Connection function(DiscoveryNode node) { if (isLocalNode(node)) { return localNodeConnection; } else { return transport.getConnection(node); } } | /**
* Returns either a real transport connection or a local node connection if we are using the local node optimization.
* @throws NodeNotConnectedException if the given node is not connected
*/ | Returns either a real transport connection or a local node connection if we are using the local node optimization | getConnection | {
"repo_name": "ThiagoGarciaAlves/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/transport/TransportService.java",
"license": "apache-2.0",
"size": 55284
} | [
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import org.elasticsearch.cluster.node.DiscoveryNode; | import org.elasticsearch.cluster.node.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 1,818,619 |
//-----------------------------------------------------------------------
@Override
public long get(TemporalUnit unit) {
if (unit == ChronoUnit.YEARS) {
return getYears();
} else if (unit == ChronoUnit.MONTHS) {
return getMonths();
} else if (unit == ChronoUn... | long function(TemporalUnit unit) { if (unit == ChronoUnit.YEARS) { return getYears(); } else if (unit == ChronoUnit.MONTHS) { return getMonths(); } else if (unit == ChronoUnit.DAYS) { return getDays(); } else { throw new UnsupportedTemporalTypeException(STR + unit); } } /** * Gets the set of units supported by this per... | /**
* Gets the value of the requested unit.
* <p>
* This returns a value for each of the three supported units,
* {@link ChronoUnit#YEARS YEARS}, {@link ChronoUnit#MONTHS MONTHS} and
* {@link ChronoUnit#DAYS DAYS}.
* All other units throw an exception.
*
* @param unit the {@code ... | Gets the value of the requested unit. This returns a value for each of the three supported units, <code>ChronoUnit#YEARS YEARS</code>, <code>ChronoUnit#MONTHS MONTHS</code> and <code>ChronoUnit#DAYS DAYS</code>. All other units throw an exception | get | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/src/java.base/share/classes/java/time/Period.java",
"license": "gpl-2.0",
"size": 43586
} | [
"java.time.temporal.ChronoUnit",
"java.time.temporal.TemporalUnit",
"java.time.temporal.UnsupportedTemporalTypeException"
] | import java.time.temporal.ChronoUnit; import java.time.temporal.TemporalUnit; import java.time.temporal.UnsupportedTemporalTypeException; | import java.time.temporal.*; | [
"java.time"
] | java.time; | 477,652 |
public IData insertDataBefore(String key) {
IData document = IDataFactory.create();
insertBefore(key, document);
return document;
} | IData function(String key) { IData document = IDataFactory.create(); insertBefore(key, document); return document; } | /**
* Inserts a new IData document before the element at the cursor's current position.
*
* @param key The key to be inserted.
* @return The newly created IData document that was inserted.
*/ | Inserts a new IData document before the element at the cursor's current position | insertDataBefore | {
"repo_name": "Permafrost/Tundra.java",
"path": "src/main/java/permafrost/tundra/data/MapCursor.java",
"license": "mit",
"size": 10731
} | [
"com.wm.data.IData",
"com.wm.data.IDataFactory"
] | import com.wm.data.IData; import com.wm.data.IDataFactory; | import com.wm.data.*; | [
"com.wm.data"
] | com.wm.data; | 1,610,608 |
public void createProcessModelMetricsCalulatorUnit() throws IllegalTypeException; | void function() throws IllegalTypeException; | /**
* Add a {@link IUnit} to the internal {@link IUnitChain}, that is used to calculate a
* large set of process model metrics for a jBPT {@link ProcessModel} and all of its
* available sub processes.
* @throws IllegalTypeException if the unit's input and output value classes are not compatible.
*/ | Add a <code>IUnit</code> to the internal <code>IUnitChain</code>, that is used to calculate a large set of process model metrics for a jBPT <code>ProcessModel</code> and all of its available sub processes | createProcessModelMetricsCalulatorUnit | {
"repo_name": "tobiashoppe/promnicat",
"path": "src/de/uni_potsdam/hpi/bpt/promnicat/utilityUnits/IUnitChainBuilder.java",
"license": "gpl-3.0",
"size": 12775
} | [
"de.uni_potsdam.hpi.bpt.promnicat.util.IllegalTypeException"
] | import de.uni_potsdam.hpi.bpt.promnicat.util.IllegalTypeException; | import de.uni_potsdam.hpi.bpt.promnicat.util.*; | [
"de.uni_potsdam.hpi"
] | de.uni_potsdam.hpi; | 2,462,894 |
public AbstractInsnNode get(int index) {
return this.insns.get(index);
} | AbstractInsnNode function(int index) { return this.insns.get(index); } | /**
* Return the instruction at the specified index
*
* @param index opcode index
* @return requested instruction
*/ | Return the instruction at the specified index | get | {
"repo_name": "SpongePowered/Mixin",
"path": "src/main/java/org/spongepowered/asm/mixin/injection/struct/Target.java",
"license": "mit",
"size": 26658
} | [
"org.objectweb.asm.tree.AbstractInsnNode"
] | import org.objectweb.asm.tree.AbstractInsnNode; | import org.objectweb.asm.tree.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 2,443,498 |
private void loadHomesFromDatabase() {
BukkitDatabase db = bFundamentals.getBukkitDatabase();
String query = "SELECT * FROM perks_homes";
ResultSet result = db.queryResult(query);
if (result != null) {
try {
// while we have another result, read in the data
while (result.next())... | void function() { BukkitDatabase db = bFundamentals.getBukkitDatabase(); String query = STR; ResultSet result = db.queryResult(query); if (result != null) { try { while (result.next()) { String worldName = result.getString("world"); String homeName = result.getString("name"); String ownerName = result.getString("owner"... | /**
* Load all homes from the database
*/ | Load all homes from the database | loadHomesFromDatabase | {
"repo_name": "CodingBadgers/Perks",
"path": "bTransported/src/uk/codingbadgers/btransported/commands/home/CommandHome.java",
"license": "gpl-2.0",
"size": 18977
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List",
"org.bukkit.Bukkit",
"org.bukkit.Location",
"org.bukkit.World",
"uk.thecodingbadgers.bDatabaseManager.Database"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World; import uk.thecodingbadgers.bDatabaseManager.Database; | import java.sql.*; import java.util.*; import org.bukkit.*; import uk.thecodingbadgers.*; | [
"java.sql",
"java.util",
"org.bukkit",
"uk.thecodingbadgers"
] | java.sql; java.util; org.bukkit; uk.thecodingbadgers; | 783,933 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync(
String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mo... | /**
* Create or update a VM scale set.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set to create or update.
* @param parameters The scale set object.
* @throws IllegalArgumentException thrown if parameters fail the validatio... | Create or update a VM scale set | createOrUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java",
"license": "mit",
"size": 352067
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInner",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInner; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.nio"
] | com.azure.core; com.azure.resourcemanager; java.nio; | 2,864,345 |
@Override
public String getText(Object object) {
Position position = (Position)object;
return getString("_UI_Position_type") + " " + position.getOffset();
} | String function(Object object) { Position position = (Position)object; return getString(STR) + " " + position.getOffset(); } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "andriusvelykis/proofprocess",
"path": "org.ai4fm.proofprocess.project.edit/src/org/ai4fm/proofprocess/project/provider/PositionItemProvider.java",
"license": "epl-1.0",
"size": 5373
} | [
"org.ai4fm.proofprocess.project.Position"
] | import org.ai4fm.proofprocess.project.Position; | import org.ai4fm.proofprocess.project.*; | [
"org.ai4fm.proofprocess"
] | org.ai4fm.proofprocess; | 726,578 |
@Override public void enterTypeVariable(@NotNull Java7Parser.TypeVariableContext ctx) { } | @Override public void enterTypeVariable(@NotNull Java7Parser.TypeVariableContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitAnnotationTypeBody | {
"repo_name": "jsteenbeeke/antlr-java-parser",
"path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java",
"license": "lgpl-3.0",
"size": 53492
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,899,437 |
public static String makePartPath(Map<String, String> spec)
throws MetaException {
return makePartName(spec, true);
} | static String function(Map<String, String> spec) throws MetaException { return makePartName(spec, true); } | /**
* Given a partition specification, return the path corresponding to the
* partition spec. By default, the specification does not include dynamic partitions.
* @param spec
* @return string representation of the partition specification.
* @throws MetaException
*/ | Given a partition specification, return the path corresponding to the partition spec. By default, the specification does not include dynamic partitions | makePartPath | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java",
"license": "apache-2.0",
"size": 20346
} | [
"java.util.Map",
"org.apache.hadoop.hive.metastore.api.MetaException"
] | import java.util.Map; import org.apache.hadoop.hive.metastore.api.MetaException; | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,298,050 |
MessageType getMessageType(String mti); | MessageType getMessageType(String mti); | /**
* Returns the <code>MessageType</code> for the message type indicator.
*
* @param mti
* Message type indicator identifying the
* <code>MessageType</code>.
* @return The <code>MessageType</code> instance.
*/ | Returns the <code>MessageType</code> for the message type indicator | getMessageType | {
"repo_name": "ennovatenow/i8583",
"path": "i8583-core/src/main/java/org/i8583/spi/MessageTypeFactory.java",
"license": "apache-2.0",
"size": 1477
} | [
"org.i8583.MessageType"
] | import org.i8583.MessageType; | import org.i8583.*; | [
"org.i8583"
] | org.i8583; | 2,458,126 |
@Authorized(PrivilegeConstants.GET_CARE_SETTINGS)
public CareSetting getCareSettingByUuid(String uuid);
| @Authorized(PrivilegeConstants.GET_CARE_SETTINGS) CareSetting function(String uuid); | /**
* Gets the CareSetting with the specified uuid
*
* @param uuid the uuid to match on
* @return CareSetting
* @should return the care setting with the specified uuid
*/ | Gets the CareSetting with the specified uuid | getCareSettingByUuid | {
"repo_name": "vinayvenu/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/OrderService.java",
"license": "mpl-2.0",
"size": 31663
} | [
"org.openmrs.CareSetting",
"org.openmrs.annotation.Authorized",
"org.openmrs.util.PrivilegeConstants"
] | import org.openmrs.CareSetting; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants; | import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*; | [
"org.openmrs",
"org.openmrs.annotation",
"org.openmrs.util"
] | org.openmrs; org.openmrs.annotation; org.openmrs.util; | 1,258,818 |
@Override
public Timer createCalendarTimer(ScheduleExpression schedule,
TimerConfig timerConfig) throws IllegalArgumentException,
IllegalStateException, EJBException
{
Serializable info = null;
if (timerConfig != null)
info = timerConfig.getInfo();
return createScheduledTimer(sched... | Timer function(ScheduleExpression schedule, TimerConfig timerConfig) throws IllegalArgumentException, IllegalStateException, EJBException { Serializable info = null; if (timerConfig != null) info = timerConfig.getInfo(); return createScheduledTimer(schedule, info); } | /**
* Create a calendar-based timer based on the input schedule expression.
*
* @param schedule
* A schedule expression describing the timeouts for this timer.
* @param timerConfig
* Timer configuration.
* @return The newly created Timer.
* @throws IllegalArgumentException
... | Create a calendar-based timer based on the input schedule expression | createCalendarTimer | {
"repo_name": "gruppo4/quercus-upstream",
"path": "modules/resin/src/com/caucho/ejb/timer/EjbTimerService.java",
"license": "gpl-2.0",
"size": 22356
} | [
"java.io.Serializable",
"javax.ejb.EJBException",
"javax.ejb.ScheduleExpression",
"javax.ejb.Timer",
"javax.ejb.TimerConfig"
] | import java.io.Serializable; import javax.ejb.EJBException; import javax.ejb.ScheduleExpression; import javax.ejb.Timer; import javax.ejb.TimerConfig; | import java.io.*; import javax.ejb.*; | [
"java.io",
"javax.ejb"
] | java.io; javax.ejb; | 815,083 |
public Write<T> withSharding(PTransform<PCollection<T>, PCollectionView<Integer>> sharding) {
checkNotNull(
sharding, "Cannot provide null sharding. Use withRunnerDeterminedSharding() instead");
return new Write<>(sink, sharding, null, windowedWrites);
} | Write<T> function(PTransform<PCollection<T>, PCollectionView<Integer>> sharding) { checkNotNull( sharding, STR); return new Write<>(sink, sharding, null, windowedWrites); } | /**
* Returns a new {@link Write} that will write to the current {@link Sink} using the
* specified {@link PTransform} to compute the number of shards.
*
* <p>This option should be used sparingly as it can hurt performance. See {@link Write} for
* more information.
*/ | Returns a new <code>Write</code> that will write to the current <code>Sink</code> using the specified <code>PTransform</code> to compute the number of shards. This option should be used sparingly as it can hurt performance. See <code>Write</code> for more information | withSharding | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/Write.java",
"license": "apache-2.0",
"size": 26623
} | [
"com.google.common.base.Preconditions",
"org.apache.beam.sdk.transforms.PTransform",
"org.apache.beam.sdk.values.PCollection",
"org.apache.beam.sdk.values.PCollectionView"
] | import com.google.common.base.Preconditions; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.PCollectionView; | import com.google.common.base.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; | [
"com.google.common",
"org.apache.beam"
] | com.google.common; org.apache.beam; | 122,905 |
public static Builder from(Reader swaggerReader) {
Validate.notNull(swaggerReader, "swaggerReader must not be null");
Swagger swagger;
try {
swagger = new SwaggerParser().parse(IOUtils.toString(swaggerReader));
} catch (IOException e) {
throw new RuntimeExcept... | static Builder function(Reader swaggerReader) { Validate.notNull(swaggerReader, STR); Swagger swagger; try { swagger = new SwaggerParser().parse(IOUtils.toString(swaggerReader)); } catch (IOException e) { throw new RuntimeException(STR, e); } if (swagger == null) throw new IllegalArgumentException(STR); return new Buil... | /**
* Creates a Swagger2MarkupConverter.Builder from a given Swagger YAML or JSON reader.
*
* @param swaggerReader the Swagger YAML or JSON reader.
* @return a Swagger2MarkupConverter
*/ | Creates a Swagger2MarkupConverter.Builder from a given Swagger YAML or JSON reader | from | {
"repo_name": "Swagger2Markup/swagger2markup",
"path": "swagger2markup/src/main/java/io/github/swagger2markup/Swagger2MarkupConverter.java",
"license": "apache-2.0",
"size": 16305
} | [
"io.swagger.models.Swagger",
"io.swagger.parser.SwaggerParser",
"java.io.IOException",
"java.io.Reader",
"org.apache.commons.io.IOUtils",
"org.apache.commons.lang3.Validate"
] | import io.swagger.models.Swagger; import io.swagger.parser.SwaggerParser; import java.io.IOException; import java.io.Reader; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.Validate; | import io.swagger.models.*; import io.swagger.parser.*; import java.io.*; import org.apache.commons.io.*; import org.apache.commons.lang3.*; | [
"io.swagger.models",
"io.swagger.parser",
"java.io",
"org.apache.commons"
] | io.swagger.models; io.swagger.parser; java.io; org.apache.commons; | 2,304,912 |
List<String> filterAllowedContentViewNames(List<String> names); | List<String> filterAllowedContentViewNames(List<String> names); | /**
* Provide a filter to remove unauthorized content views name.
*
* @param names set of possible content views name
* @return a set without unauthorised content views, it should be empty.
*/ | Provide a filter to remove unauthorized content views name | filterAllowedContentViewNames | {
"repo_name": "nuxeo-archives/nuxeo-features",
"path": "nuxeo-search-ui/src/main/java/org/nuxeo/search/ui/localconfiguration/SearchConfiguration.java",
"license": "lgpl-2.1",
"size": 1414
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,118,531 |
@Nullable
public byte[] put(Uri uri, byte[] encryptionKey) {
return backingMap.put(Assertions.checkNotNull(uri), Assertions.checkNotNull(encryptionKey));
} | byte[] function(Uri uri, byte[] encryptionKey) { return backingMap.put(Assertions.checkNotNull(uri), Assertions.checkNotNull(encryptionKey)); } | /**
* Inserts an entry into the cache.
*
* @throws NullPointerException if {@code uri} or {@code encryptionKey} are null.
*/ | Inserts an entry into the cache | put | {
"repo_name": "androidx/media",
"path": "libraries/exoplayer_hls/src/main/java/androidx/media3/exoplayer/hls/FullSegmentEncryptionKeyCache.java",
"license": "apache-2.0",
"size": 2707
} | [
"android.net.Uri",
"androidx.media3.common.util.Assertions"
] | import android.net.Uri; import androidx.media3.common.util.Assertions; | import android.net.*; import androidx.media3.common.util.*; | [
"android.net",
"androidx.media3"
] | android.net; androidx.media3; | 1,507,926 |
@Override
public void setInventorySlotContents(int par1, ItemStack par2ItemStack)
{
this.theInventory[par1] = par2ItemStack;
if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) {
par2ItemStack.stackSize = this.getInventoryStackLimit();
}... | void function(int par1, ItemStack par2ItemStack) { this.theInventory[par1] = par2ItemStack; if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { par2ItemStack.stackSize = this.getInventoryStackLimit(); } if (this.inventoryResetNeededOnSlotChange(par1)) { this.resetRecipeAndSlots(); } ... | /**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
*/ | Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections) | setInventorySlotContents | {
"repo_name": "sidben/RedstoneJukebox",
"path": "src/main/java/sidben/redstonejukebox/inventory/InventoryRecordTrading.java",
"license": "gpl-3.0",
"size": 8414
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 738,222 |
private void addMenuItems() {
// Add the menu items.
mDatas.add(new PersonEntry("1", "Cherry Avocado", "cherries, garlic, serrano, mayo",
"http://news.qq.com/a/20170617/004997.htm", "Dinner - Salads", "https://raw.githubusercontent.com/shsun/AndroidMediaCache/master/app/src/main/res... | void function() { mDatas.add(new PersonEntry("1", STR, STR, STR2STRFried Baby OnionsSTRmaple syrup, walnut salsa, sauce", STR3STRFried RiceSTRred onion, kale, puffed wild rice", STR4STRBeet FriesSTRcilantro, raw beet, feta, sumac", STR5STRSautéed SpaghettiSTRgarlic, poached egg, almonds", STR6STRGrape ToastSTRred cabba... | /**
* Adds {@link PersonEntry}'s to the items list.
*/ | Adds <code>PersonEntry</code>'s to the items list | addMenuItems | {
"repo_name": "shsun/AndroidMediaCache",
"path": "app/src/main/java/com/biz/fragment/NewestFragment.java",
"license": "apache-2.0",
"size": 8122
} | [
"com.biz.entry.PersonEntry"
] | import com.biz.entry.PersonEntry; | import com.biz.entry.*; | [
"com.biz.entry"
] | com.biz.entry; | 379,988 |
private ArrayList<ServerContainer> getActiveContainers() {
return getContainersWithState(State.STARTED.toString());
} | ArrayList<ServerContainer> function() { return getContainersWithState(State.STARTED.toString()); } | /**
* Get all active containers
*/ | Get all active containers | getActiveContainers | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-assembly/src/test/java/org/apache/geode/session/tests/ContainerManager.java",
"license": "apache-2.0",
"size": 7554
} | [
"java.util.ArrayList",
"org.codehaus.cargo.container.State"
] | import java.util.ArrayList; import org.codehaus.cargo.container.State; | import java.util.*; import org.codehaus.cargo.container.*; | [
"java.util",
"org.codehaus.cargo"
] | java.util; org.codehaus.cargo; | 1,972,600 |
//-------------------------------------------------------------------------
@Test
public void testEquals() {
assertEquals(createStandardTimeSeries(), createStandardTimeSeries());
assertFalse(createStandardTimeSeries().equals(createEmptyTimeSeries()));
assertFalse(createEmptyTimeSeries().equals(create... | void function() { assertEquals(createStandardTimeSeries(), createStandardTimeSeries()); assertFalse(createStandardTimeSeries().equals(createEmptyTimeSeries())); assertFalse(createEmptyTimeSeries().equals(createStandardTimeSeries())); assertEquals(createEmptyTimeSeries(), createEmptyTimeSeries()); } | /**
* Tests the equals() method.
*/ | Tests the equals() method | testEquals | {
"repo_name": "McLeodMoores/starling",
"path": "projects/time-series/src/test/java/com/opengamma/timeseries/DoubleTimeSeriesTest.java",
"license": "apache-2.0",
"size": 32843
} | [
"org.testng.AssertJUnit"
] | import org.testng.AssertJUnit; | import org.testng.*; | [
"org.testng"
] | org.testng; | 84,016 |
public Duration getRequestTimeToLive() { return requestTimeToLive; } | public Duration getRequestTimeToLive() { return requestTimeToLive; } | /**
* Sets the URI for the HTTP endpoint where the consumer is listening. You can use IP addresses or DNS names as you see fit.
* @param uri A URI such as "localhost" or "http://foo.bar.baz" or "foo://blah"
*/ | Sets the URI for the HTTP endpoint where the consumer is listening. You can use IP addresses or DNS names as you see fit | setUri | {
"repo_name": "rob-signorelli/boson",
"path": "boson-core/src/main/java/boson/transport/ServiceBusConfig.java",
"license": "mit",
"size": 10432
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 169,894 |
try {
LanguageFactory theLanguageFactory = (LanguageFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.w3.org/2001/SMIL20/Language");
if (theLanguageFactory != null) {
return theLanguageFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new Langua... | try { LanguageFactory theLanguageFactory = (LanguageFactory)EPackage.Registry.INSTANCE.getEFactory("http: if (theLanguageFactory != null) { return theLanguageFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new LanguageFactoryImpl(); } public LanguageFactoryImpl() { super(); } | /**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Creates the default factory implementation. | init | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore/src/org/w3/_2001/smil20/language/impl/LanguageFactoryImpl.java",
"license": "apache-2.0",
"size": 3635
} | [
"org.eclipse.emf.ecore.EPackage",
"org.eclipse.emf.ecore.plugin.EcorePlugin",
"org.w3._2001.smil20.language.LanguageFactory"
] | import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.w3._2001.smil20.language.LanguageFactory; | import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.plugin.*; import org.w3.*; | [
"org.eclipse.emf",
"org.w3"
] | org.eclipse.emf; org.w3; | 343,239 |
static void deleteContents(File dir) throws IOException {
File[] files = dir.listFiles();
if (files == null) {
throw new IOException("not a readable directory: " + dir);
}
for (File file : files) {
if (file.isDirectory()) {
deleteContents(file)... | static void deleteContents(File dir) throws IOException { File[] files = dir.listFiles(); if (files == null) { throw new IOException(STR + dir); } for (File file : files) { if (file.isDirectory()) { deleteContents(file); } if (!file.delete()) { throw new IOException(STR + file); } } } | /**
* Deletes the contents of {@code dir}. Throws an IOException if any file
* could not be deleted, or if {@code dir} is not a readable directory.
*/ | Deletes the contents of dir. Throws an IOException if any file could not be deleted, or if dir is not a readable directory | deleteContents | {
"repo_name": "outman-zhou/android-hipda-client",
"path": "hipda/src/main/java/net/outman/hipda/cache/Util.java",
"license": "mit",
"size": 2397
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,419,175 |
@Override
public void setModifiedDate(java.util.Date modifiedDate) {
_docTemplate.setModifiedDate(modifiedDate);
} | void function(java.util.Date modifiedDate) { _docTemplate.setModifiedDate(modifiedDate); } | /**
* Sets the modified date of this doc template.
*
* @param modifiedDate the modified date of this doc template
*/ | Sets the modified date of this doc template | setModifiedDate | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-core-dossiermgt-portlet/docroot/WEB-INF/service/org/oep/core/dossiermgt/model/DocTemplateWrapper.java",
"license": "apache-2.0",
"size": 11339
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 56,357 |
void enterWindowBody(@NotNull CQLParser.WindowBodyContext ctx);
void exitWindowBody(@NotNull CQLParser.WindowBodyContext ctx); | void enterWindowBody(@NotNull CQLParser.WindowBodyContext ctx); void exitWindowBody(@NotNull CQLParser.WindowBodyContext ctx); | /**
* Exit a parse tree produced by {@link CQLParser#windowBody}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>CQLParser#windowBody</code> | exitWindowBody | {
"repo_name": "jack6215/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java",
"license": "apache-2.0",
"size": 62500
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,115,583 |
private SpeechletResponse getWelcomeResponse(Session session) {
String speechOutput = null;
HashMap<String,String> params = new HashMap<String,String>();
ArrayList<String> events = getResponseFromUhura(session.getSessionId(),"Manager/ResetSession",params);
if (events.isEmpty()) {... | SpeechletResponse function(Session session) { String speechOutput = null; HashMap<String,String> params = new HashMap<String,String>(); ArrayList<String> events = getResponseFromUhura(session.getSessionId(),STR,params); if (events.isEmpty()) { speechOutput = STR + STR; SsmlOutputSpeech outputSpeech = new SsmlOutputSpee... | /**
* Function to handle the onLaunch skill behavior.
*
* @return SpeechletResponse object with voice/card response to return to the user
*/ | Function to handle the onLaunch skill behavior | getWelcomeResponse | {
"repo_name": "yu-peng/uhura-echo-interface",
"path": "src/main/java/dialoginterface/UhuraDialogSpeechlet.java",
"license": "gpl-3.0",
"size": 28968
} | [
"com.amazon.speech.speechlet.Session",
"com.amazon.speech.speechlet.SpeechletResponse",
"com.amazon.speech.ui.SsmlOutputSpeech",
"java.util.ArrayList",
"java.util.Calendar",
"java.util.HashMap",
"java.util.TimeZone"
] | import com.amazon.speech.speechlet.Session; import com.amazon.speech.speechlet.SpeechletResponse; import com.amazon.speech.ui.SsmlOutputSpeech; import java.util.ArrayList; import java.util.Calendar; import java.util.HashMap; import java.util.TimeZone; | import com.amazon.speech.speechlet.*; import com.amazon.speech.ui.*; import java.util.*; | [
"com.amazon.speech",
"java.util"
] | com.amazon.speech; java.util; | 1,184,171 |
public Tree getTree() {
return fTreeViewer.getTree();
} | Tree function() { return fTreeViewer.getTree(); } | /**
* Gets the tree that displays the list for a folder
*
* @return the tree used to show the folders
*/ | Gets the tree that displays the list for a folder | getTree | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javadocexport/CheckboxTreeAndListGroup.java",
"license": "epl-1.0",
"size": 25827
} | [
"org.eclipse.swt.widgets.Tree"
] | import org.eclipse.swt.widgets.Tree; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,077,438 |
protected UIDimension adjustPreferredSize(UIDimension d) {
if ((d.width < minimumWidth) || (d.height < minimumHeight)) {
if (!useMinimumVarsOnlyWhenEmpty || (getWidgetCount() == 0)) {
if (d.width < minimumWidth) {
d.width = minimumWidth;
}
if (d.height < minimumHeig... | UIDimension function(UIDimension d) { if ((d.width < minimumWidth) (d.height < minimumHeight)) { if (!useMinimumVarsOnlyWhenEmpty (getWidgetCount() == 0)) { if (d.width < minimumWidth) { d.width = minimumWidth; } if (d.height < minimumHeight) { d.height = minimumHeight; } } } return d; } | /**
* Adjusts the viewers preferred size based on any set minimum size
* requirements
*
* @param d
* the current preferred size
* @return the adjusted preferred size
*/ | Adjusts the viewers preferred size based on any set minimum size requirements | adjustPreferredSize | {
"repo_name": "appnativa/rare",
"path": "source/rare/core-tabpane/com/appnativa/rare/viewer/aTabPaneViewer.java",
"license": "gpl-3.0",
"size": 33752
} | [
"com.appnativa.rare.ui.UIDimension"
] | import com.appnativa.rare.ui.UIDimension; | import com.appnativa.rare.ui.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 951,005 |
return OpenWireBytesMessage.DATA_STRUCTURE_TYPE;
} | return OpenWireBytesMessage.DATA_STRUCTURE_TYPE; } | /**
* Return the type of Data Structure we marshal
*
* @return short representation of the type data structure
*/ | Return the type of Data Structure we marshal | getDataStructureType | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v11/OpenWireBytesMessageMarshaller.java",
"license": "apache-2.0",
"size": 3570
} | [
"org.apache.activemq.openwire.commands.OpenWireBytesMessage"
] | import org.apache.activemq.openwire.commands.OpenWireBytesMessage; | import org.apache.activemq.openwire.commands.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 267,353 |
void suspendJobDefinitionByProcessDefinitionId(String processDefinitionId, boolean suspendJobs, Date suspensionDate); | void suspendJobDefinitionByProcessDefinitionId(String processDefinitionId, boolean suspendJobs, Date suspensionDate); | /**
* Suspends all {@link JobDefinition}s of the provided process definition id.
*
* <p>Note: for more complex suspend commands use {@link #updateJobDefinitionSuspensionState()}.</p>
*
* @param suspendJobs If true, all the {@link Job}s of the provided job definition
* will be suspe... | Suspends all <code>JobDefinition</code>s of the provided process definition id. Note: for more complex suspend commands use <code>#updateJobDefinitionSuspensionState()</code> | suspendJobDefinitionByProcessDefinitionId | {
"repo_name": "xasx/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/ManagementService.java",
"license": "apache-2.0",
"size": 53258
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 421,600 |
public void start() throws LifecycleException {
if( started ) {
return;
}
if( !initialized ) {
init();
}
// Look for a realm - that may have been configured earlier.
// If the realm is added after context - it'll set itself.
... | void function() throws LifecycleException { if( started ) { return; } if( !initialized ) { init(); } if( realm == null ) { ObjectName realmName=null; try { realmName=new ObjectName( domain + STR); if( mserver.isRegistered(realmName ) ) { mserver.invoke(realmName, "init", new Object[] {}, new String[] {} ); } } catch( T... | /**
* Start this Engine component.
*
* @exception LifecycleException if a startup error occurs
*/ | Start this Engine component | start | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-tomcat-6.0.48/java/org/apache/catalina/core/StandardEngine.java",
"license": "apache-2.0",
"size": 23718
} | [
"javax.management.ObjectName",
"org.apache.catalina.LifecycleException",
"org.apache.catalina.util.ServerInfo",
"org.apache.tomcat.util.modeler.Registry"
] | import javax.management.ObjectName; import org.apache.catalina.LifecycleException; import org.apache.catalina.util.ServerInfo; import org.apache.tomcat.util.modeler.Registry; | import javax.management.*; import org.apache.catalina.*; import org.apache.catalina.util.*; import org.apache.tomcat.util.modeler.*; | [
"javax.management",
"org.apache.catalina",
"org.apache.tomcat"
] | javax.management; org.apache.catalina; org.apache.tomcat; | 2,600,748 |
protected void ProcessOldImageFromDb() {
// removing the old C drive from image table
if (!StringHelper.EqOp(mDescription, "")) {
getParameters().setOldDescription(getImage().getdescription());
getImage().setdescription(mDescription);
}
getParameters(... | void function() { if (!StringHelper.EqOp(mDescription, "")) { getParameters().setOldDescription(getImage().getdescription()); getImage().setdescription(mDescription); } getParameters().setOldLastModifiedValue(getDiskImage().getlastModified()); getDiskImage().setlastModified(getNow()); DbFacade.getInstance().getDiskImag... | /**
* By default old image must be replaced by new one
*/ | By default old image must be replaced by new one | ProcessOldImageFromDb | {
"repo_name": "anjalshireesh/gluster-ovirt-poc",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateSnapshotCommand.java",
"license": "apache-2.0",
"size": 10107
} | [
"org.ovirt.engine.core.compat.StringHelper",
"org.ovirt.engine.core.dal.dbbroker.DbFacade"
] | import org.ovirt.engine.core.compat.StringHelper; import org.ovirt.engine.core.dal.dbbroker.DbFacade; | import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.dal.dbbroker.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 375,091 |
private void reduceWidthOfDateBoxes(DynamicDatebox dynamicDatebox) {
Textbox textbox = dynamicDatebox.getDateTextBox();
String[] strings = textbox.getWidth().split("px");
textbox.setWidth( Integer.toString(Integer.valueOf(strings[0]) - 10) );
} | void function(DynamicDatebox dynamicDatebox) { Textbox textbox = dynamicDatebox.getDateTextBox(); String[] strings = textbox.getWidth().split("px"); textbox.setWidth( Integer.toString(Integer.valueOf(strings[0]) - 10) ); } | /**
* Decrease width of components in ZK8.
*/ | Decrease width of components in ZK8 | reduceWidthOfDateBoxes | {
"repo_name": "PaulLuchyn/libreplan",
"path": "libreplan-webapp/src/main/java/org/libreplan/web/orders/OrderElementTreeController.java",
"license": "agpl-3.0",
"size": 31318
} | [
"org.zkoss.zul.Textbox"
] | import org.zkoss.zul.Textbox; | import org.zkoss.zul.*; | [
"org.zkoss.zul"
] | org.zkoss.zul; | 1,142,412 |
connect(address, Executors.newCachedThreadPool());
} | connect(address, Executors.newCachedThreadPool()); } | /**
* Connect to local channel.
* Utilizes a cached thread pool for processing callbacks
*
* @param address
* @throws Exception
*/ | Connect to local channel. Utilizes a cached thread pool for processing callbacks | connect | {
"repo_name": "ljshj/liveoak",
"path": "modules/client/src/main/java/io/liveoak/client/DefaultClient.java",
"license": "epl-1.0",
"size": 12324
} | [
"java.util.concurrent.Executors"
] | import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 233,400 |
public AuthzPageModel setFederations(FederationConfig[] federations)
{
this.federations = federations;
return this;
} | AuthzPageModel function(FederationConfig[] federations) { this.federations = federations; return this; } | /**
* Set the configurations of ID federations.
*/ | Set the configurations of ID federations | setFederations | {
"repo_name": "authlete/java-oauth-server",
"path": "src/main/java/com/authlete/jaxrs/server/api/AuthzPageModel.java",
"license": "apache-2.0",
"size": 2358
} | [
"com.authlete.jaxrs.server.federation.FederationConfig"
] | import com.authlete.jaxrs.server.federation.FederationConfig; | import com.authlete.jaxrs.server.federation.*; | [
"com.authlete.jaxrs"
] | com.authlete.jaxrs; | 1,146,469 |
@Test
public void getExistAssets() throws Exception {
final Repo repo = GithubProfileValidationTest.repo(
Joiner.on('\n').join(
"friends:",
" - jeff/test",
"assets:",
" settings.xml: \"jeff/test#exist.txt\""
)
... | void function() throws Exception { final Repo repo = GithubProfileValidationTest.repo( Joiner.on('\n').join( STR, STR, STR, STRjeff/test#exist.txt\"" ) ); final Map<String, InputStream> map = new GithubProfile(repo).assets(); MatcherAssert.assertThat( map.keySet(), Matchers.<String>iterableWithSize(1) ); } | /**
* GithubProfile get the assets in the YAML.
* @throws Exception In case of error.
*/ | GithubProfile get the assets in the YAML | getExistAssets | {
"repo_name": "dalifreire/rultor",
"path": "src/test/java/com/rultor/profiles/GithubProfileValidationTest.java",
"license": "bsd-3-clause",
"size": 9888
} | [
"com.google.common.base.Joiner",
"com.jcabi.github.Repo",
"java.io.InputStream",
"java.util.Map",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import com.google.common.base.Joiner; import com.jcabi.github.Repo; import java.io.InputStream; import java.util.Map; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import com.google.common.base.*; import com.jcabi.github.*; import java.io.*; import java.util.*; import org.hamcrest.*; | [
"com.google.common",
"com.jcabi.github",
"java.io",
"java.util",
"org.hamcrest"
] | com.google.common; com.jcabi.github; java.io; java.util; org.hamcrest; | 2,219,901 |
public void testPeekLast() {
ArrayDeque q = populatedDeque(SIZE);
for (int i = SIZE - 1; i >= 0; --i) {
assertEquals(i, q.peekLast());
assertEquals(i, q.pollLast());
assertTrue(q.peekLast() == null ||
!q.peekLast().equals(i));
}
... | void function() { ArrayDeque q = populatedDeque(SIZE); for (int i = SIZE - 1; i >= 0; --i) { assertEquals(i, q.peekLast()); assertEquals(i, q.pollLast()); assertTrue(q.peekLast() == null !q.peekLast().equals(i)); } assertNull(q.peekLast()); } | /**
* peekLast() returns next element, or null if empty
*/ | peekLast() returns next element, or null if empty | testPeekLast | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/ArrayDequeTest.java",
"license": "gpl-2.0",
"size": 29764
} | [
"java.util.ArrayDeque"
] | import java.util.ArrayDeque; | import java.util.*; | [
"java.util"
] | java.util; | 660,490 |
public static int getMinimumWidth(View view) {
return IMPL.getMinimumWidth(view);
} | static int function(View view) { return IMPL.getMinimumWidth(view); } | /**
* Returns the minimum width of the view.
*
* <p>Prior to API 16 this will return 0.</p>
*
* @return the minimum width the view will try to be.
*/ | Returns the minimum width of the view. Prior to API 16 this will return 0 | getMinimumWidth | {
"repo_name": "madhavanks26/com.vliesaputra.deviceinformation",
"path": "src/com/vliesaputra/cordova/plugins/android/support/v4/src/java/android/support/v4/view/ViewCompat.java",
"license": "mit",
"size": 127830
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 757,724 |
private void showAbout() {
// Get package information
String version;
try {
PackageInfo pkgInfo;
pkgInfo = getPackageManager().getPackageInfo(this.getPackageName(), 0);
version = pkgInfo.versionName;
} catch (NameNotFoundException e) {
version = getString(R.string.unkno... | void function() { String version; try { PackageInfo pkgInfo; pkgInfo = getPackageManager().getPackageInfo(this.getPackageName(), 0); version = pkgInfo.versionName; } catch (NameNotFoundException e) { version = getString(R.string.unknown); } StringBuilder message = new StringBuilder(); message.append(getString(R.string.... | /**
* Display our about dialog.
*/ | Display our about dialog | showAbout | {
"repo_name": "joelmap/omnidroid",
"path": "omnidroid/src/edu/nyu/cs/omnidroid/app/view/simple/ActivityMain.java",
"license": "apache-2.0",
"size": 9885
} | [
"android.app.AlertDialog",
"android.content.pm.PackageInfo",
"android.content.pm.PackageManager",
"android.text.Html"
] | import android.app.AlertDialog; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.text.Html; | import android.app.*; import android.content.pm.*; import android.text.*; | [
"android.app",
"android.content",
"android.text"
] | android.app; android.content; android.text; | 2,216,717 |
public String sign(Map<String, String> params) {
// Let's add the AWSAccessKeyId and Timestamp parameters to the request.
params.put("AWSAccessKeyId", this.awsAccessKeyId);
params.put("Timestamp", this.timestamp());
// The parameters need to be processed in lexicographical order, so... | String function(Map<String, String> params) { params.put(STR, this.awsAccessKeyId); params.put(STR, this.timestamp()); SortedMap<String, String> sortedParamMap = new TreeMap<String, String>(params); String canonicalQS = this.canonicalize(sortedParamMap); String toSign = REQUEST_METHOD + "\n" + this.endpoint + "\n" + RE... | /**
* This method signs requests in hashmap form. It returns a URL that should
* be used to fetch the response. The URL returned should not be modified in
* any way, doing so will invalidate the signature and Amazon will reject
* the request.
*/ | This method signs requests in hashmap form. It returns a URL that should be used to fetch the response. The URL returned should not be modified in any way, doing so will invalidate the signature and Amazon will reject the request | sign | {
"repo_name": "psrpatnaik/Amazon",
"path": "src/amazon/SignedRequestsHelper.java",
"license": "apache-2.0",
"size": 10051
} | [
"java.util.Map",
"java.util.SortedMap",
"java.util.TreeMap"
] | import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,772,298 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ClusterListResultInner>> listWithResponseAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.g... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ClusterListResultInner>> function() { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accep... | /**
* Gets all Service Fabric cluster resources created or in the process of being created in the subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return... | Gets all Service Fabric cluster resources created or in the process of being created in the subscription | listWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersClientImpl.java",
"license": "mit",
"size": 72998
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.servicefabric.fluent.models.ClusterListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.servicefabric.fluent.models.ClusterListResultInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.servicefabric.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,047,426 |
protected OutputStream writeTempOutputFile(T stitchedFileMetaData) throws IOException, BlockNotFoundException
{
OutputStream outputStream = getOutputStream(tempOutFilePath);
try {
for (StitchBlock outputBlock : stitchedFileMetaData.getStitchBlocksList()) {
outputBlock.writeTo(appFS, blocksDire... | OutputStream function(T stitchedFileMetaData) throws IOException, BlockNotFoundException { OutputStream outputStream = getOutputStream(tempOutFilePath); try { for (StitchBlock outputBlock : stitchedFileMetaData.getStitchBlocksList()) { outputBlock.writeTo(appFS, blocksDirectoryPath, outputStream); } } finally { outputS... | /**
* Writing all Stitch blocks to temporary file
*
* @param stitchedFileMetaData
* @throws IOException
* @throws BlockNotFoundException
*/ | Writing all Stitch blocks to temporary file | writeTempOutputFile | {
"repo_name": "ananthc/apex-malhar",
"path": "library/src/main/java/org/apache/apex/malhar/lib/io/fs/FileStitcher.java",
"license": "apache-2.0",
"size": 13002
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.apex.malhar.lib.io.fs.Synchronizer"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.apex.malhar.lib.io.fs.Synchronizer; | import java.io.*; import org.apache.apex.malhar.lib.io.fs.*; | [
"java.io",
"org.apache.apex"
] | java.io; org.apache.apex; | 2,733,140 |
void setMimeType(String mimeType) throws MimeTypeParseException; | void setMimeType(String mimeType) throws MimeTypeParseException; | /**
* Sets the media type of the resource referenced by the href attribute
*/ | Sets the media type of the resource referenced by the href attribute | setMimeType | {
"repo_name": "apache/abdera",
"path": "extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java",
"license": "apache-2.0",
"size": 3433
} | [
"javax.activation.MimeTypeParseException"
] | import javax.activation.MimeTypeParseException; | import javax.activation.*; | [
"javax.activation"
] | javax.activation; | 399,661 |
public void sendBuf(final String dest, final OtpOutputStream payload)
throws IOException {
super.sendBuf(self.pid(), dest, payload);
} | void function(final String dest, final OtpOutputStream payload) throws IOException { super.sendBuf(self.pid(), dest, payload); } | /**
* Send a pre-encoded message to a named process on a remote node.
*
* @param dest
* the name of the remote process.
* @param payload
* the encoded message to send.
*
* @exception java.io.IOException
* if the connection is not active o... | Send a pre-encoded message to a named process on a remote node | sendBuf | {
"repo_name": "Thuzi/RabbitMQ2Go",
"path": "tools/erlang/tools/binary/lib/jinterface-1.6.1/java_src/com/ericsson/otp/erlang/OtpConnection.java",
"license": "mit",
"size": 19941
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 925,285 |
public static int seamlessLogin(String url, String sessionId) throws SugarCrmException {
int isValid = 0;
Map<String, Object> data = new LinkedHashMap<String, Object>();
data.put(SESSION, sessionId);
try {
HttpClient httpClient = new DefaultHttp... | static int function(String url, String sessionId) throws SugarCrmException { int isValid = 0; Map<String, Object> data = new LinkedHashMap<String, Object>(); data.put(SESSION, sessionId); try { HttpClient httpClient = new DefaultHttpClient(); HttpPost req = new HttpPost(url); String restData = org.json.simple.JSONValue... | /**
* Perform a seamless login. This is used internally during the sync process.
*
* @param String $session -- Session ID returned by a previous call to login.
*
* @return 1 -- integer - if the session was authenticated
*
* @return 0 -- integer - if the session could not be authent... | Perform a seamless login. This is used internally during the sync process | seamlessLogin | {
"repo_name": "Imaginea/pancake-android",
"path": "src/com/imaginea/android/sugarcrm/util/RestUtil.java",
"license": "apache-2.0",
"size": 57290
} | [
"android.util.Log",
"java.io.IOException",
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.apache.http.HttpResponse",
"org.apache.http.NameValuePair",
"org.apache.http.client.HttpClient",
"org.apache.http.client.entity.UrlEncodedFormEntity",
"org.apache.... | import android.util.Log; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncod... | import android.util.*; import java.io.*; import java.util.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.entity.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; import org.apache.http.message.*; import org.apache.http.params.*; import org.apa... | [
"android.util",
"java.io",
"java.util",
"org.apache.http"
] | android.util; java.io; java.util; org.apache.http; | 787,329 |
public String getUniqueConstraintName(Session session, Table table) {
HashMap<String, Constraint> tableConstraints;
if (table.isTemporary() && !table.isGlobalTemporary()) {
tableConstraints = session.getLocalTempTableConstraints();
} else {
tableConstraints = constrai... | String function(Session session, Table table) { HashMap<String, Constraint> tableConstraints; if (table.isTemporary() && !table.isGlobalTemporary()) { tableConstraints = session.getLocalTempTableConstraints(); } else { tableConstraints = constraints; } return getUniqueName(table, tableConstraints, STR); } | /**
* Create a unique constraint name.
*
* @param session the session
* @param table the constraint table
* @return the unique name
*/ | Create a unique constraint name | getUniqueConstraintName | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/schema/Schema.java",
"license": "apache-2.0",
"size": 19877
} | [
"java.util.HashMap",
"org.h2.constraint.Constraint",
"org.h2.engine.Session",
"org.h2.table.Table"
] | import java.util.HashMap; import org.h2.constraint.Constraint; import org.h2.engine.Session; import org.h2.table.Table; | import java.util.*; import org.h2.constraint.*; import org.h2.engine.*; import org.h2.table.*; | [
"java.util",
"org.h2.constraint",
"org.h2.engine",
"org.h2.table"
] | java.util; org.h2.constraint; org.h2.engine; org.h2.table; | 529,360 |
public void setRequestNodeAddress(final IeeeAddress requestNodeAddress) {
this.requestNodeAddress = requestNodeAddress;
} | void function(final IeeeAddress requestNodeAddress) { this.requestNodeAddress = requestNodeAddress; } | /**
* Sets Request node address.
*
* @param requestNodeAddress the Request node address
*/ | Sets Request node address | setRequestNodeAddress | {
"repo_name": "cschwer/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee/src/main/java/com/zsmartsystems/zigbee/zcl/clusters/otaupgrade/ImagePageCommand.java",
"license": "epl-1.0",
"size": 9831
} | [
"com.zsmartsystems.zigbee.IeeeAddress"
] | import com.zsmartsystems.zigbee.IeeeAddress; | import com.zsmartsystems.zigbee.*; | [
"com.zsmartsystems.zigbee"
] | com.zsmartsystems.zigbee; | 123,522 |
EList<DropViewType> getDropView(); | EList<DropViewType> getDropView(); | /**
* Returns the value of the '<em><b>Drop View</b></em>' containment reference list.
* The list contents are of type {@link org.liquibase.xml.ns.dbchangelog.DropViewType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Drop View</em>' containment reference list isn't clear,
* there really sh... | Returns the value of the 'Drop View' containment reference list. The list contents are of type <code>org.liquibase.xml.ns.dbchangelog.DropViewType</code>. If the meaning of the 'Drop View' containment reference list isn't clear, there really should be more of a description here... | getDropView | {
"repo_name": "dzonekl/LiquibaseEditor",
"path": "plugins/org.liquidbase.model/src/org/liquibase/xml/ns/dbchangelog/RollbackType.java",
"license": "mit",
"size": 47925
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,871,339 |
try {
serializeKeyGroupAndKey(key, keyGroupId);
} catch (IOException shouldNeverHappen) {
throw new FlinkRuntimeException(shouldNeverHappen);
}
} | try { serializeKeyGroupAndKey(key, keyGroupId); } catch (IOException shouldNeverHappen) { throw new FlinkRuntimeException(shouldNeverHappen); } } | /**
* Sets the key and key-group as prefix. This will serialize them into the buffer and the will
* be used to create composite keys with provided namespaces.
*
* @param key the key.
* @param keyGroupId the key-group id for the key.
*/ | Sets the key and key-group as prefix. This will serialize them into the buffer and the will be used to create composite keys with provided namespaces | setKeyAndKeyGroup | {
"repo_name": "lincoln-lil/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/state/SerializedCompositeKeyBuilder.java",
"license": "apache-2.0",
"size": 9504
} | [
"java.io.IOException",
"org.apache.flink.util.FlinkRuntimeException"
] | import java.io.IOException; import org.apache.flink.util.FlinkRuntimeException; | import java.io.*; import org.apache.flink.util.*; | [
"java.io",
"org.apache.flink"
] | java.io; org.apache.flink; | 2,303,431 |
protected String[] getDirections( )
{
String[] directions;
boolean supportInput = ( (DataSetEditor) this.getContainer( ) ).supportsInParameters( );
boolean supportOutput = ( (DataSetEditor) this.getContainer( ) ).supportsOutputParameters( );
if ( supportInput && supportOutput )
{
directions = new Strin... | String[] function( ) { String[] directions; boolean supportInput = ( (DataSetEditor) this.getContainer( ) ).supportsInParameters( ); boolean supportOutput = ( (DataSetEditor) this.getContainer( ) ).supportsOutputParameters( ); if ( supportInput && supportOutput ) { directions = new String[]{ Messages.getString( STR ), ... | /**
* get the right direction for different dataset type
*
* @return
*/ | get the right direction for different dataset type | getDirections | {
"repo_name": "Charling-Huang/birt",
"path": "UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/DataSetParametersPage.java",
"license": "epl-1.0",
"size": 73174
} | [
"org.eclipse.birt.report.designer.nls.Messages"
] | import org.eclipse.birt.report.designer.nls.Messages; | import org.eclipse.birt.report.designer.nls.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 401,956 |
@Override
public void lock(NodeRef nodeRef, String userName, int timeout)
{
LockInfo lockInfo = createLock(nodeRef, userName, true, timeout);
lock(nodeRef, lockInfo);
}
| void function(NodeRef nodeRef, String userName, int timeout) { LockInfo lockInfo = createLock(nodeRef, userName, true, timeout); lock(nodeRef, lockInfo); } | /**
* Shared method for webdav/vti protocols to lock node. If node is locked for more than 24 hours it is automatically added
* to the current session locked resources list.
*
* @param nodeRef the node to lock
* @param lockType the lock type
* @param timeout the number of seconds be... | Shared method for webdav/vti protocols to lock node. If node is locked for more than 24 hours it is automatically added to the current session locked resources list | lock | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/remote-api/source/java/org/alfresco/repo/webdav/WebDAVLockServiceImpl.java",
"license": "lgpl-3.0",
"size": 17999
} | [
"org.alfresco.service.cmr.repository.NodeRef"
] | import org.alfresco.service.cmr.repository.NodeRef; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 1,590,801 |
void resetWorkflows(List<WorkflowData> workflowList)
{
workflows.clear();
for(WorkflowData workflow : workflowList)
workflows.put(workflow.getNameSpace(), workflow);
}
| void resetWorkflows(List<WorkflowData> workflowList) { workflows.clear(); for(WorkflowData workflow : workflowList) workflows.put(workflow.getNameSpace(), workflow); } | /**
* Set the Workflows of the system.
* @param workflowList See above.
*/ | Set the Workflows of the system | resetWorkflows | {
"repo_name": "bramalingam/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java",
"license": "gpl-2.0",
"size": 50321
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,753,883 |
@Override
public GeodeticDatum createGeodeticDatum(final String code) throws FactoryException {
return (GeodeticDatum)
replace(
getDatumAuthorityFactory(code)
.createGeodeticDatum(toBackingFactoryCode(code)));
} | GeodeticDatum function(final String code) throws FactoryException { return (GeodeticDatum) replace( getDatumAuthorityFactory(code) .createGeodeticDatum(toBackingFactoryCode(code))); } | /**
* Returns a {@linkplain GeodeticDatum geodetic datum} from a code.
*
* @throws FactoryException if the object creation failed.
* @see #createEllipsoid
* @see #createPrimeMeridian
* @see #createGeographicCRS
* @see #createProjectedCRS
*/ | Returns a GeodeticDatum geodetic datum from a code | createGeodeticDatum | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java",
"license": "lgpl-2.1",
"size": 54063
} | [
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.datum.GeodeticDatum"
] | import org.opengis.referencing.FactoryException; import org.opengis.referencing.datum.GeodeticDatum; | import org.opengis.referencing.*; import org.opengis.referencing.datum.*; | [
"org.opengis.referencing"
] | org.opengis.referencing; | 698,250 |
String to = newExchange.getProperty(Exchange.TO_ENDPOINT, String.class);
if (LOG.isDebugEnabled()) {
LOG.debug("To endpoint = {}", to);
}
if (to.contains("FlightConnectionInfo")) {
if (LOG.isDebugEnabled()) {
LOG.debug("Adding Flight Connection Info to exc... | String to = newExchange.getProperty(Exchange.TO_ENDPOINT, String.class); if (LOG.isDebugEnabled()) { LOG.debug(STR, to); } if (to.contains(STR)) { if (LOG.isDebugEnabled()) { LOG.debug(STR); } return mergeHeaderIntoOldExchange(STR, oldExchange, newExchange); } else if (to.contains(STR)) { if (LOG.isDebugEnabled()) { LO... | /**
* Merges the message headers of sub-routes.
* <p>{@inheritDoc}
*/ | Merges the message headers of sub-routes. | aggregate | {
"repo_name": "ffang/fuse-1",
"path": "quickstarts/camel/camel-sap/src/main/java/org/jboss/quickstarts/fuse/sap/processor/AggregateFlightBookingStrategy.java",
"license": "apache-2.0",
"size": 3115
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,644,131 |
public void setDateCreated(Date dateCreatedParam) {
this.dateCreated = dateCreatedParam;
} | void function(Date dateCreatedParam) { this.dateCreated = dateCreatedParam; } | /**
* Sets the {@code Date} when {@code this} {@code Attachment} was created.
*
* @param dateCreatedParam Attachment Created Date.
*/ | Sets the Date when this Attachment was created | setDateCreated | {
"repo_name": "Koekiebox-PTY-LTD/Fluid",
"path": "fluid-api/src/main/java/com/fluidbpm/program/api/vo/attachment/Attachment.java",
"license": "gpl-3.0",
"size": 14658
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 297,236 |
void rollFSImage() throws IOException {
if (ckptState != CheckpointStates.UPLOAD_DONE) {
throw new IOException("Cannot roll fsImage before rolling edits log.");
}
//
// First, verify that edits.new and fsimage.ckpt exists in all
// checkpoint directories.
//
if (!editLog.existsNew())... | void rollFSImage() throws IOException { if (ckptState != CheckpointStates.UPLOAD_DONE) { throw new IOException(STR); } throw new IOException(STR); } Iterator<StorageDirectory> it = dirIterator(NameNodeDirType.IMAGE); while (it.hasNext()) { StorageDirectory sd = it.next(); File ckpt = getImageFile(sd, NameNodeFile.IMAGE... | /**
* Moves fsimage.ckpt to fsImage and edits.new to edits
* Reopens the new edits file.
*/ | Moves fsimage.ckpt to fsImage and edits.new to edits Reopens the new edits file | rollFSImage | {
"repo_name": "aseldawy/spatialhadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 66292
} | [
"java.io.File",
"java.io.IOException",
"java.util.Iterator"
] | import java.io.File; import java.io.IOException; import java.util.Iterator; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,815,200 |
EAttribute getUseStatement__Use_1(); | EAttribute getUseStatement__Use_1(); | /**
* Returns the meta object for the attribute '{@link cruise.umple.umple.UseStatement_#getUse_1 <em>Use 1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Use 1</em>'.
* @see cruise.umple.umple.UseStatement_#getUse_1()
* @see #getUseStatement... | Returns the meta object for the attribute '<code>cruise.umple.umple.UseStatement_#getUse_1 Use 1</code>'. | getUseStatement__Use_1 | {
"repo_name": "ahmedvc/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java",
"license": "mit",
"size": 485842
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 391,967 |
public static StormTopology buildVehiclesTopology() {
Fields driverField = new Fields(Driver.FIELD_NAME);
Fields vehicleField = new Fields(Vehicle.FIELD_NAME);
Fields allFields = new Fields(Vehicle.FIELD_NAME, Driver.FIELD_NAME);
FixedBatchSpout spout = new FixedBatchSpout(allFields... | static StormTopology function() { Fields driverField = new Fields(Driver.FIELD_NAME); Fields vehicleField = new Fields(Vehicle.FIELD_NAME); Fields allFields = new Fields(Vehicle.FIELD_NAME, Driver.FIELD_NAME); FixedBatchSpout spout = new FixedBatchSpout(allFields, 10, Vehicle.generateVehicles(20)); spout.setCycle(true)... | /**
* Creates a topology which demonstrates min/max operations on tuples of stream which contain vehicle and driver fields
* with values {@link TridentMinMaxOfDevicesTopology.Vehicle} and {@link TridentMinMaxOfDevicesTopology.Driver} respectively.
*/ | Creates a topology which demonstrates min/max operations on tuples of stream which contain vehicle and driver fields with values <code>TridentMinMaxOfDevicesTopology.Vehicle</code> and <code>TridentMinMaxOfDevicesTopology.Driver</code> respectively | buildVehiclesTopology | {
"repo_name": "anshuiisc/storm-Allbolts-wiring",
"path": "storm-dist/binary/target/apache-storm-1.0.3/examples/storm-starter/src/jvm/org/apache/storm/starter/trident/TridentMinMaxOfDevicesTopology.java",
"license": "apache-2.0",
"size": 7603
} | [
"org.apache.storm.generated.StormTopology",
"org.apache.storm.trident.Stream",
"org.apache.storm.trident.TridentTopology",
"org.apache.storm.trident.operation.builtin.Debug",
"org.apache.storm.trident.testing.FixedBatchSpout",
"org.apache.storm.tuple.Fields"
] | import org.apache.storm.generated.StormTopology; import org.apache.storm.trident.Stream; import org.apache.storm.trident.TridentTopology; import org.apache.storm.trident.operation.builtin.Debug; import org.apache.storm.trident.testing.FixedBatchSpout; import org.apache.storm.tuple.Fields; | import org.apache.storm.generated.*; import org.apache.storm.trident.*; import org.apache.storm.trident.operation.builtin.*; import org.apache.storm.trident.testing.*; import org.apache.storm.tuple.*; | [
"org.apache.storm"
] | org.apache.storm; | 1,718,992 |
private void cmd_winSize()
{
Dimension size = getSize();
if (!ADialog.ask(m_curWindowNo, this, "WinSizeSet",
"x=" + size.width + " - y=" + size.height))
{
setPreferredSize(null);
SwingUtilities.getWindowAncestor(this).pack();
size = new Dimension (0,0);
}
//
MWindow win = new MWindow(m_ctx, ... | void function() { Dimension size = getSize(); if (!ADialog.ask(m_curWindowNo, this, STR, "x=" + size.width + STR + size.height)) { setPreferredSize(null); SwingUtilities.getWindowAncestor(this).pack(); size = new Dimension (0,0); } win.setWindowSize(size); win.save(); } | /**
* Set Window Size
*/ | Set Window Size | cmd_winSize | {
"repo_name": "mgrigioni/oseb",
"path": "client/src/org/compiere/apps/APanel.java",
"license": "gpl-2.0",
"size": 86313
} | [
"java.awt.Dimension",
"javax.swing.SwingUtilities"
] | import java.awt.Dimension; import javax.swing.SwingUtilities; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,743,968 |
JComponent getGUI();
| JComponent getGUI(); | /**
* Return the UI to display whenever this preference is selected in the preference dialog.
*
* @return the UI to display when this preference is selected.
*/ | Return the UI to display whenever this preference is selected in the preference dialog | getGUI | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/spark/preference/Preference.java",
"license": "apache-2.0",
"size": 3123
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,356,549 |
protected TokenizerFactory tokenizerFactory(String name, String... keysAndValues) throws Exception {
return tokenizerFactory(name, Version.LATEST, keysAndValues);
} | TokenizerFactory function(String name, String... keysAndValues) throws Exception { return tokenizerFactory(name, Version.LATEST, keysAndValues); } | /**
* Returns a fully initialized TokenizerFactory with the specified name and key-value arguments.
* {@link ClasspathResourceLoader} is used for loading resources, so any required ones should
* be on the test classpath.
*/ | Returns a fully initialized TokenizerFactory with the specified name and key-value arguments. <code>ClasspathResourceLoader</code> is used for loading resources, so any required ones should be on the test classpath | tokenizerFactory | {
"repo_name": "visouza/solr-5.0.0",
"path": "lucene/analysis/common/src/test/org/apache/lucene/analysis/util/BaseTokenStreamFactoryTestCase.java",
"license": "apache-2.0",
"size": 6760
} | [
"org.apache.lucene.util.Version"
] | import org.apache.lucene.util.Version; | import org.apache.lucene.util.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 269,447 |
public static TestTask[] removeTasksFromList(final TestTask[] tasks, TestTask... tasksToRemove) {
List<TestTask> listOfTasks = asList(tasks);
listOfTasks.removeAll(asList(tasksToRemove));
return listOfTasks.toArray(new TestTask[listOfTasks.size()]);
} | static TestTask[] function(final TestTask[] tasks, TestTask... tasksToRemove) { List<TestTask> listOfTasks = asList(tasks); listOfTasks.removeAll(asList(tasksToRemove)); return listOfTasks.toArray(new TestTask[listOfTasks.size()]); } | /**
* Removes a subset from the list of tasks.
* @param tasks The list of tasks
* @param tasksToRemove The subset of tasks.
* @return The modified tasks after removal of the subset from tasks.
*/ | Removes a subset from the list of tasks | removeTasksFromList | {
"repo_name": "CS2103JAN2017-W09-B1/main",
"path": "src/test/java/seedu/task/testutil/TestUtil.java",
"license": "mit",
"size": 13167
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 937,442 |
public MIDINote getLastNote() {
return get(notes.size() - 1);
}
/**
* Create and append the specified {@code MIDINote} to the list. The Note's
* timing is unchanged. Use <code>append</code> if you want the timing
* changed.
* <p>
* {@code PropertyChange MIDITrack.ADD} is fi... | MIDINote function() { return get(notes.size() - 1); } /** * Create and append the specified {@code MIDINote} to the list. The Note's * timing is unchanged. Use <code>append</code> if you want the timing * changed. * <p> * {@code PropertyChange MIDITrack.ADD} is fired. * * * <pre> * { * MIDITrack track = new MIDITrack()... | /**
* returns the last {@code MIDINote} in the list
*
* @return a {@code MIDINote} that is last in the list
*/ | returns the last MIDINote in the list | getLastNote | {
"repo_name": "genedelisa/rockymusic",
"path": "rockymusic-core/src/main/java/com/rockhoppertech/music/midi/js/MIDITrack.java",
"license": "apache-2.0",
"size": 74678
} | [
"com.rockhoppertech.music.Pitch"
] | import com.rockhoppertech.music.Pitch; | import com.rockhoppertech.music.*; | [
"com.rockhoppertech.music"
] | com.rockhoppertech.music; | 1,904,425 |
private void parseResponses(Object state) {
HangingTraceStream tracingStream = null;
ByteArrayOutputStream responseCopy = null;
try {
boolean traceEWSResponse = this.getService().isTraceEnabledFor(TraceFlags.EwsResponse);
InputStream responseStream = this.response.getInputStream();
tra... | void function(Object state) { HangingTraceStream tracingStream = null; ByteArrayOutputStream responseCopy = null; try { boolean traceEWSResponse = this.getService().isTraceEnabledFor(TraceFlags.EwsResponse); InputStream responseStream = this.response.getInputStream(); tracingStream = new HangingTraceStream(responseStre... | /**
* Parses the responses.
*
* @param state The state.
*/ | Parses the responses | parseResponses | {
"repo_name": "evpaassen/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/HangingServiceRequestBase.java",
"license": "mit",
"size": 12088
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.ObjectStreamException",
"java.net.SocketTimeoutException",
"java.net.UnknownServiceException"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectStreamException; import java.net.SocketTimeoutException; import java.net.UnknownServiceException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,847,710 |
public Object get(int index, Scriptable start) {
Object ret_val = NOT_FOUND;
switch(index) {
case 0:
ret_val = new Double(x);
break;
case 1:
ret_val = new Double(y);
break;
case 2:
... | Object function(int index, Scriptable start) { Object ret_val = NOT_FOUND; switch(index) { case 0: ret_val = new Double(x); break; case 1: ret_val = new Double(y); break; case 2: ret_val = new Double(z); break; case 3: ret_val = new Double(w); break; } return ret_val; } | /**
* Get the variable at the given index. Since we don't support integer
* index values for fields of the script, this always returns NOT_FOUND.
*/ | Get the variable at the given index. Since we don't support integer index values for fields of the script, this always returns NOT_FOUND | get | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/scripting/ecmascript/builtin/SFVec4d.java",
"license": "gpl-2.0",
"size": 16571
} | [
"org.mozilla.javascript.Scriptable"
] | import org.mozilla.javascript.Scriptable; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 1,569,443 |
public CodeExceptionGen getHandlerForStartInstruction(InstructionHandle start) {
return startInstructionToHandlerMap.get(start);
} | CodeExceptionGen function(InstructionHandle start) { return startInstructionToHandlerMap.get(start); } | /**
* If the given instruction is the start of an exception handler, get the
* CodeExceptionGen object representing the handler.
*
* @param start
* the instruction
* @return the CodeExceptionGen object, or null if the instruction is not
* the start of an exception ... | If the given instruction is the start of an exception handler, get the CodeExceptionGen object representing the handler | getHandlerForStartInstruction | {
"repo_name": "jesusaplsoft/FindAllBugs",
"path": "findbugs/src/java/edu/umd/cs/findbugs/ba/ExceptionHandlerMap.java",
"license": "gpl-2.0",
"size": 5194
} | [
"org.apache.bcel.generic.CodeExceptionGen",
"org.apache.bcel.generic.InstructionHandle"
] | import org.apache.bcel.generic.CodeExceptionGen; import org.apache.bcel.generic.InstructionHandle; | import org.apache.bcel.generic.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 1,133,694 |
@ReplacedBy("testResults")
public FileCollection getTestResultDirs() {
DeprecationLogger.deprecateProperty(TestReport.class, "testResultDirs").replaceWith("testResults")
.willBeRemovedInGradle8()
.withDslReference()
.nagUser();
return resultDirs;
} | @ReplacedBy(STR) FileCollection function() { DeprecationLogger.deprecateProperty(TestReport.class, STR).replaceWith(STR) .willBeRemovedInGradle8() .withDslReference() .nagUser(); return resultDirs; } | /**
* Returns the set of binary test results to include in the report.
*
* <strong>This method will be {@code @Deprecated} soon, please use {@link #getTestResults()} ()} instead.</strong>
*/ | Returns the set of binary test results to include in the report. This method will be @Deprecated soon, please use <code>#getTestResults()</code> ()} instead | getTestResultDirs | {
"repo_name": "gradle/gradle",
"path": "subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/TestReport.java",
"license": "apache-2.0",
"size": 9158
} | [
"org.gradle.api.file.FileCollection",
"org.gradle.api.model.ReplacedBy",
"org.gradle.internal.deprecation.DeprecationLogger"
] | import org.gradle.api.file.FileCollection; import org.gradle.api.model.ReplacedBy; import org.gradle.internal.deprecation.DeprecationLogger; | import org.gradle.api.file.*; import org.gradle.api.model.*; import org.gradle.internal.deprecation.*; | [
"org.gradle.api",
"org.gradle.internal"
] | org.gradle.api; org.gradle.internal; | 1,555,638 |
public String patch_addPadding(LinkedList<Patch> patches) {
short paddingLength = this.Patch_Margin;
String nullPadding = "";
for (short x = 1; x <= paddingLength; x++) {
nullPadding += String.valueOf((char) x);
}
// Bump all the patches forward.
for (Patch aPatch : patches) {
aPa... | String function(LinkedList<Patch> patches) { short paddingLength = this.Patch_Margin; String nullPadding = ""; for (short x = 1; x <= paddingLength; x++) { nullPadding += String.valueOf((char) x); } for (Patch aPatch : patches) { aPatch.start1 += paddingLength; aPatch.start2 += paddingLength; } Patch patch = patches.ge... | /**
* Add some padding on text start and end so that edges can match something.
* Intended to be called only from within patch_apply.
* @param patches Array of Patch objects.
* @return The padding string added to each side.
*/ | Add some padding on text start and end so that edges can match something. Intended to be called only from within patch_apply | patch_addPadding | {
"repo_name": "xjyaikj/OnlinePreparation",
"path": "src/main/java/com/xjy/op/util/DiffMatchPatch.java",
"license": "mit",
"size": 89008
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 718,801 |
@Override
public String toString() {
StringBuffer sb = new StringBuffer();
Set keySet = resultsMap.keySet();
for (Iterator i = keySet.iterator(); i.hasNext(); ) {
String key = (String) i.next();
sb.append(key).append("\t");
}
if (sb.leng... | String function() { StringBuffer sb = new StringBuffer(); Set keySet = resultsMap.keySet(); for (Iterator i = keySet.iterator(); i.hasNext(); ) { String key = (String) i.next(); sb.append(key).append("\t"); } if (sb.length() > 0) { sb.delete(sb.length() - 1, sb.length()); } sb.append("\n"); Object[][] data = getDataArr... | /**
* <p>Returns a tab-delimted columnar representation fo the data set.
* Perfect for loading into Excel or other spreadsheet.</p>
*
*
* @return
*/ | Returns a tab-delimted columnar representation fo the data set. Perfect for loading into Excel or other spreadsheet | toString | {
"repo_name": "hohonuuli/mbarix4j",
"path": "src/main/java/mbarix4j/sql/QueryResults.java",
"license": "bsd-3-clause",
"size": 14938
} | [
"java.util.Iterator",
"java.util.Set"
] | import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,150,511 |
public Uri getDataUri(Q query); | Uri function(Q query); | /**
* Data URI representing the data displayed in this view. Complex views may use data from
* different queries / Data URI.
*
* @param query The query for which the URI should be returned.
*/ | Data URI representing the data displayed in this view. Complex views may use data from different queries / Data URI | getDataUri | {
"repo_name": "shivamsriva31093/MovieFinder",
"path": "app/src/main/java/task/application/com/colette/navigation/UpdatableView.java",
"license": "apache-2.0",
"size": 4484
} | [
"android.net.Uri"
] | import android.net.Uri; | import android.net.*; | [
"android.net"
] | android.net; | 398,721 |
@ObjectiveCName("unsubscribeFromDownloads:")
public void unsubscribeFromDownloads(FileEventCallback callback) {
modules.getFilesModule().unsubscribe(callback);
}
//////////////////////////////////////
// Settings
////////////////////////////////////// | @ObjectiveCName(STR) void function(FileEventCallback callback) { modules.getFilesModule().unsubscribe(callback); } | /**
* Unsubscribing from download events
*
* @param callback unsubscribe callback
*/ | Unsubscribing from download events | unsubscribeFromDownloads | {
"repo_name": "EaglesoftZJ/actor-platform",
"path": "actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/Messenger.java",
"license": "agpl-3.0",
"size": 86315
} | [
"com.google.j2objc.annotations.ObjectiveCName",
"im.actor.core.viewmodel.FileEventCallback"
] | import com.google.j2objc.annotations.ObjectiveCName; import im.actor.core.viewmodel.FileEventCallback; | import com.google.j2objc.annotations.*; import im.actor.core.viewmodel.*; | [
"com.google.j2objc",
"im.actor.core"
] | com.google.j2objc; im.actor.core; | 1,247,371 |
public static CrashEventCollector newCrashEventCollector(ClientChannel aClientChannel,
Context anApplicationContext,
UncaughtExceptionHandler aExceptionHandler) {
return new CrashEventCo... | static CrashEventCollector function(ClientChannel aClientChannel, Context anApplicationContext, UncaughtExceptionHandler aExceptionHandler) { return new CrashEventCollector(aClientChannel, anApplicationContext, aExceptionHandler); } | /**
* Get crash event collector
*
* @param aClientChannel
* The client channel that will be used to send the context
* elements
* @param anApplicationContext
* The application context
* @param aExceptionHandler
* A custom exceptio... | Get crash event collector | newCrashEventCollector | {
"repo_name": "Motwin/ContextAwareLibrary",
"path": "Android/ContextAwareAndroidLib/com.motwin.android.contextaware/src/main/java/com/motwin/android/context/Collectors.java",
"license": "gpl-2.0",
"size": 32970
} | [
"android.content.Context",
"com.motwin.android.context.collector.impl.CrashEventCollector",
"com.motwin.android.network.clientchannel.ClientChannel",
"java.lang.Thread"
] | import android.content.Context; import com.motwin.android.context.collector.impl.CrashEventCollector; import com.motwin.android.network.clientchannel.ClientChannel; import java.lang.Thread; | import android.content.*; import com.motwin.android.context.collector.impl.*; import com.motwin.android.network.clientchannel.*; import java.lang.*; | [
"android.content",
"com.motwin.android",
"java.lang"
] | android.content; com.motwin.android; java.lang; | 1,451,511 |
public static <T> Set<T> asSet(T... array)
{
Set<T> result = new HashSet<T>();
Collections.addAll(result, array);
return result;
} | static <T> Set<T> function(T... array) { Set<T> result = new HashSet<T>(); Collections.addAll(result, array); return result; } | /**
* Create a set from an array. If the array contains duplicate objects, the
* last object in the array will be placed in resultant set.
*
* @param <T> the type of the objects in the set
* @param array the array from which to create the set
* @return the created sets
*/ | Create a set from an array. If the array contains duplicate objects, the last object in the array will be placed in resultant set | asSet | {
"repo_name": "sbryzak/DeltaSpike",
"path": "deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/util/ArraysUtils.java",
"license": "apache-2.0",
"size": 1627
} | [
"java.util.Collections",
"java.util.HashSet",
"java.util.Set"
] | import java.util.Collections; import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 683,689 |
public static void processFilterAddMessage(Message msg, SerializedBuffer inBuffer, MessageListener msgListener)
throws EOFException, VerificationException {
//
// Get the filter element
//
byte[] filterData = inBuffer.getBytes();
if... | static void function(Message msg, SerializedBuffer inBuffer, MessageListener msgListener) throws EOFException, VerificationException { if (filterData.length > 520) throw new VerificationException(STR); synchronized(peer) { BloomFilter filter = peer.getBloomFilter(); if (filter != null) filter.insert(filterData); } } | /**
* Processes a 'filteradd' message
*
* The existing bloom filter will be updated
*
* @param msg Message
* @param inBuffer Input buffer
* @param msgListener Message listener
* @throws EOFException ... | Processes a 'filteradd' message The existing bloom filter will be updated | processFilterAddMessage | {
"repo_name": "ScripterRon/BitcoinCore",
"path": "src/main/java/org/ScripterRon/BitcoinCore/FilterAddMessage.java",
"license": "apache-2.0",
"size": 3043
} | [
"java.io.EOFException"
] | import java.io.EOFException; | import java.io.*; | [
"java.io"
] | java.io; | 1,667,197 |
String strippedUrl = url;
Matcher matcher = IGNORED_PROTOCOL_PATTERN.matcher(strippedUrl);
while (matcher.matches()) {
String protocol = matcher.group(1);
strippedUrl = strippedUrl.substring(protocol.length() + 1);
matcher = IGNORED_PROTOCOL_PATTERN.matcher(strippedUr... | String strippedUrl = url; Matcher matcher = IGNORED_PROTOCOL_PATTERN.matcher(strippedUrl); while (matcher.matches()) { String protocol = matcher.group(1); strippedUrl = strippedUrl.substring(protocol.length() + 1); matcher = IGNORED_PROTOCOL_PATTERN.matcher(strippedUrl); } if (strippedUrl.contains("?")) { strippedUrl =... | /**
* Strips download urls from wrapper protocols.
*
* @param url the given url.
* @return the stripped URL for the wrapper protocols.
*/ | Strips download urls from wrapper protocols | stripUrl | {
"repo_name": "grgrzybek/karaf",
"path": "features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java",
"license": "apache-2.0",
"size": 3049
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,219,364 |
public List<String> getSegments()
{
return segments;
} | List<String> function() { return segments; } | /**
* Returns segments of the URL. Segments form the part before query string.
*
* @return mutable list of segments
*/ | Returns segments of the URL. Segments form the part before query string | getSegments | {
"repo_name": "zwsong/wicket",
"path": "wicket-request/src/main/java/org/apache/wicket/request/Url.java",
"license": "apache-2.0",
"size": 25483
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,146,564 |
public static ValueBuilder simple(String value) {
Expression expression = ExpressionBuilder.simpleExpression(value);
return new ValueBuilder(expression);
} | static ValueBuilder function(String value) { Expression expression = ExpressionBuilder.simpleExpression(value); return new ValueBuilder(expression); } | /**
* Returns a simple expression
*/ | Returns a simple expression | simple | {
"repo_name": "engagepoint/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/Builder.java",
"license": "apache-2.0",
"size": 8331
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,905,226 |
public void unavailable(UnavailableException unavailable) {
getServletContext().log(sm.getString("standardWrapper.unavailable", getName()));
if (unavailable == null)
setAvailable(Long.MAX_VALUE);
else if (unavailable.isPermanent())
setAvailable(Long.MAX_VALUE);
... | void function(UnavailableException unavailable) { getServletContext().log(sm.getString(STR, getName())); if (unavailable == null) setAvailable(Long.MAX_VALUE); else if (unavailable.isPermanent()) setAvailable(Long.MAX_VALUE); else { int unavailableSeconds = unavailable.getUnavailableSeconds(); if (unavailableSeconds <=... | /**
* Process an UnavailableException, marking this servlet as unavailable
* for the specified amount of time.
*
* @param unavailable The exception that occurred, or <code>null</code>
* to mark this servlet as permanently unavailable
*/ | Process an UnavailableException, marking this servlet as unavailable for the specified amount of time | unavailable | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/StandardWrapper.java",
"license": "mit",
"size": 60344
} | [
"javax.servlet.UnavailableException"
] | import javax.servlet.UnavailableException; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 728,832 |
public QueryResults<VulnerabilityType> findVulnerability(); | QueryResults<VulnerabilityType> function(); | /**
* Returns all the vulnerability entries in the database.
*
* @return
* all the vulnerability entries.
*/ | Returns all the vulnerability entries in the database | findVulnerability | {
"repo_name": "nakamura5akihito/six-vuln",
"path": "src/main/java/jp/go/aist/six/vuln/repository/scap/nvd/NvdRepository.java",
"license": "apache-2.0",
"size": 5691
} | [
"jp.go.aist.six.util.repository.QueryResults",
"jp.go.aist.six.vuln.model.scap.vulnerability.VulnerabilityType"
] | import jp.go.aist.six.util.repository.QueryResults; import jp.go.aist.six.vuln.model.scap.vulnerability.VulnerabilityType; | import jp.go.aist.six.util.repository.*; import jp.go.aist.six.vuln.model.scap.vulnerability.*; | [
"jp.go.aist"
] | jp.go.aist; | 1,196,555 |
private Exception createExceptionFromFault(Fault fault) {
String message = fault.getFaultstring();
Detail faultDetail = fault.getDetail();
if (faultDetail == null || faultDetail.getAny().size() == 0) {
try {
return new SOAPFaultException(SOAPFactory.newInstance()... | Exception function(Fault fault) { String message = fault.getFaultstring(); Detail faultDetail = fault.getDetail(); if (faultDetail == null faultDetail.getAny().size() == 0) { try { return new SOAPFaultException(SOAPFactory.newInstance().createFault(message, fault.getFaultcode())); } catch (SOAPException e) { throw new ... | /**
* Creates an exception and eventually an embedded bean that contains the
* fault detail. The exception class is determined by using the
* elementNameStrategy. The qName of the fault detail should match the
* WebFault annotation of the Exception class. If no fault detail is set a
* SOAPFault... | Creates an exception and eventually an embedded bean that contains the fault detail. The exception class is determined by using the elementNameStrategy. The qName of the fault detail should match the WebFault annotation of the Exception class. If no fault detail is set a SOAPFaultException is created | createExceptionFromFault | {
"repo_name": "kevinearls/camel",
"path": "components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/Soap11DataFormatAdapter.java",
"license": "apache-2.0",
"size": 9918
} | [
"java.lang.reflect.Constructor",
"javax.xml.bind.JAXBElement",
"javax.xml.bind.JAXBIntrospector",
"javax.xml.soap.SOAPException",
"javax.xml.soap.SOAPFactory",
"javax.xml.ws.soap.SOAPFaultException",
"org.apache.camel.RuntimeCamelException",
"org.xmlsoap.schemas.soap.envelope.Detail",
"org.xmlsoap.s... | import java.lang.reflect.Constructor; import javax.xml.bind.JAXBElement; import javax.xml.bind.JAXBIntrospector; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFactory; import javax.xml.ws.soap.SOAPFaultException; import org.apache.camel.RuntimeCamelException; import org.xmlsoap.schemas.soap.envelope.De... | import java.lang.reflect.*; import javax.xml.bind.*; import javax.xml.soap.*; import javax.xml.ws.soap.*; import org.apache.camel.*; import org.xmlsoap.schemas.soap.envelope.*; | [
"java.lang",
"javax.xml",
"org.apache.camel",
"org.xmlsoap.schemas"
] | java.lang; javax.xml; org.apache.camel; org.xmlsoap.schemas; | 618,872 |
protected void cameraSetup() {
NyARPerspectiveProjectionMatrix m2 = jmeARParameters
.getPerspectiveProjectionMatrix();
cameraBG = new CaptureQuad("Background", CAMERA_WIDTH, CAMERA_HEIGHT,
60f);
cameraBG.updateGeometry(CAMERA_WIDTH * 4, CAMERA_HEIGHT * 4);
cameraBG.setCastsShadows(false);
... | void function() { NyARPerspectiveProjectionMatrix m2 = jmeARParameters .getPerspectiveProjectionMatrix(); cameraBG = new CaptureQuad(STR, CAMERA_WIDTH, CAMERA_HEIGHT, 60f); cameraBG.updateGeometry(CAMERA_WIDTH * 4, CAMERA_HEIGHT * 4); cameraBG.setCastsShadows(false); cameraBG.setCullHint(CullHint.Never); Matrix3f m = n... | /**
* Creates the default camera configuration. This method specifies the
* texture which will accept the camera feed and attaches it to the scene
* graph. It also configures a basic position and orientation for the
* camera.
*/ | Creates the default camera configuration. This method specifies the texture which will accept the camera feed and attaches it to the scene graph. It also configures a basic position and orientation for the camera | cameraSetup | {
"repo_name": "ajclarkson/ARMonkeyKit",
"path": "src/armonkeykit/core/app/ARMonkeyKitApp.java",
"license": "gpl-3.0",
"size": 12637
} | [
"com.jme.input.InputHandler",
"com.jme.input.MouseInput",
"com.jme.math.Matrix3f",
"com.jme.math.Vector3f",
"com.jme.renderer.Renderer",
"com.jme.scene.Spatial",
"jp.nyatla.nyartoolkit.core.param.NyARPerspectiveProjectionMatrix"
] | import com.jme.input.InputHandler; import com.jme.input.MouseInput; import com.jme.math.Matrix3f; import com.jme.math.Vector3f; import com.jme.renderer.Renderer; import com.jme.scene.Spatial; import jp.nyatla.nyartoolkit.core.param.NyARPerspectiveProjectionMatrix; | import com.jme.input.*; import com.jme.math.*; import com.jme.renderer.*; import com.jme.scene.*; import jp.nyatla.nyartoolkit.core.param.*; | [
"com.jme.input",
"com.jme.math",
"com.jme.renderer",
"com.jme.scene",
"jp.nyatla.nyartoolkit"
] | com.jme.input; com.jme.math; com.jme.renderer; com.jme.scene; jp.nyatla.nyartoolkit; | 1,749,690 |
public void testSubmittedTasksRejectedWhenShutdown() throws InterruptedException {
final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1);
final ThreadLocalRandom rnd = ThreadLocalRandom.current();
final CountDownLatch threadsStarted = new CountDownLatch(p.getCorePoolSize()... | void function() throws InterruptedException { final ScheduledThreadPoolExecutor p = new ScheduledThreadPoolExecutor(1); final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final CountDownLatch threadsStarted = new CountDownLatch(p.getCorePoolSize()); final CountDownLatch done = new CountDownLatch(1); final Runna... | /**
* Submitted tasks are rejected when shutdown
*/ | Submitted tasks are rejected when shutdown | testSubmittedTasksRejectedWhenShutdown | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/ScheduledExecutorTest.java",
"license": "gpl-2.0",
"size": 54017
} | [
"java.util.concurrent.Callable",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.ScheduledThreadPoolExecutor",
"java.util.concurrent.ThreadLocalRandom"
] | import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadLocalRandom; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 151,503 |
public BindQuery getBindersForSlot(ChildSlot slot, AssociationQuery childAq) {
List<Binder> binders = new ArrayList<>();
for (BoundObject bo : childAq.getFieldBindings()) {
// Interpret field based on this slot
Path field = bo.getFieldInfo().getEntityRelativeFieldNameWithCont... | BindQuery function(ChildSlot slot, AssociationQuery childAq) { List<Binder> binders = new ArrayList<>(); for (BoundObject bo : childAq.getFieldBindings()) { Path field = bo.getFieldInfo().getEntityRelativeFieldNameWithContext(); Path fieldAtSlot = field.mutableCopy().rewriteIndexes(slot.getLocalContainerName()).immutab... | /**
* Returns a query binder for a slot. The slot cannot have '*' in it (i.e.
* there must be only one location for the slot in the document).
*/ | Returns a query binder for a slot. The slot cannot have '*' in it (i.e. there must be only one location for the slot in the document) | getBindersForSlot | {
"repo_name": "bserdar/lightblue-core",
"path": "crud/src/main/java/com/redhat/lightblue/assoc/ep/ResultDocument.java",
"license": "gpl-3.0",
"size": 9448
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.redhat.lightblue.assoc.BindQuery",
"com.redhat.lightblue.assoc.Binder",
"com.redhat.lightblue.assoc.BoundObject",
"com.redhat.lightblue.query.Value",
"com.redhat.lightblue.util.KeyValueCursor",
"com.redhat.lightblue.util.Path",
"java.util.ArrayList",
"... | import com.fasterxml.jackson.databind.JsonNode; import com.redhat.lightblue.assoc.BindQuery; import com.redhat.lightblue.assoc.Binder; import com.redhat.lightblue.assoc.BoundObject; import com.redhat.lightblue.query.Value; import com.redhat.lightblue.util.KeyValueCursor; import com.redhat.lightblue.util.Path; import ja... | import com.fasterxml.jackson.databind.*; import com.redhat.lightblue.assoc.*; import com.redhat.lightblue.query.*; import com.redhat.lightblue.util.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.redhat.lightblue",
"java.util"
] | com.fasterxml.jackson; com.redhat.lightblue; java.util; | 2,749,428 |
public void setParameters(Collection<JobDefinitionParameterEntity> parameters)
{
// Create a new holding list that contains all the parameters we want to persist.
Collection<JobDefinitionParameterEntity> newParameters = new ArrayList<>();
// Loop through the new set of parameters.
... | void function(Collection<JobDefinitionParameterEntity> parameters) { Collection<JobDefinitionParameterEntity> newParameters = new ArrayList<>(); for (JobDefinitionParameterEntity parameter : parameters) { newParameters.add(updateParameter(parameter)); } if (this.parameters == null) { this.parameters = newParameters; } ... | /**
* Sets the parameters. The specified data will be overlaid on to of any existing parameters with the same name. If a parameter with the same name doesn't
* exist, a new one will exist. Any existing parameters that aren't specified in the new collection will be deleted.
*
* @param parameters the ... | Sets the parameters. The specified data will be overlaid on to of any existing parameters with the same name. If a parameter with the same name doesn't exist, a new one will exist. Any existing parameters that aren't specified in the new collection will be deleted | setParameters | {
"repo_name": "kusid/herd",
"path": "herd-code/herd-model/src/main/java/org/finra/herd/model/jpa/JobDefinitionEntity.java",
"license": "apache-2.0",
"size": 7322
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 216,396 |
@ThriftMethod("prestoGetTableMetadata")
PrestoThriftNullableTableMetadata getTableMetadata(
@ThriftField(name = "schemaTableName") PrestoThriftSchemaTableName schemaTableName)
throws PrestoThriftServiceException, TException; | @ThriftMethod(STR) PrestoThriftNullableTableMetadata getTableMetadata( @ThriftField(name = STR) PrestoThriftSchemaTableName schemaTableName) throws PrestoThriftServiceException, TException; | /**
* Returns metadata for a given table.
*
* @param schemaTableName schema and table name
* @return metadata for a given table, or a {@literal null} value inside if it does not exist
*/ | Returns metadata for a given table | getTableMetadata | {
"repo_name": "ptkool/presto",
"path": "presto-thrift-connector-api/src/main/java/com/facebook/presto/connector/thrift/api/PrestoThriftService.java",
"license": "apache-2.0",
"size": 5939
} | [
"com.facebook.drift.TException",
"com.facebook.drift.annotations.ThriftField",
"com.facebook.drift.annotations.ThriftMethod"
] | import com.facebook.drift.TException; import com.facebook.drift.annotations.ThriftField; import com.facebook.drift.annotations.ThriftMethod; | import com.facebook.drift.*; import com.facebook.drift.annotations.*; | [
"com.facebook.drift"
] | com.facebook.drift; | 1,432,988 |
public static byte[] readFile(String inputFileName) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
InputStream in = new FileInputStream(inputFileName);
try {
copy(in, out);
} finally {
in.close();
}
return out.toByteArray();
} | static byte[] function(String inputFileName) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); InputStream in = new FileInputStream(inputFileName); try { copy(in, out); } finally { in.close(); } return out.toByteArray(); } | /**
* Reads the given local file and returns the contents as a byte array.
*
* @param inputFileName the name of the file to read from
* @return the file's contents as a byte array
*/ | Reads the given local file and returns the contents as a byte array | readFile | {
"repo_name": "wanddy/ai4cn",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/util/FileUtil.java",
"license": "mit",
"size": 10251
} | [
"java.io.ByteArrayOutputStream",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,142,230 |
@Override public void exitAmount(@NotNull SalesParser.AmountContext ctx) { } | @Override public void exitAmount(@NotNull SalesParser.AmountContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterAmount | {
"repo_name": "johannesgerer/unicenta",
"path": "Grammar/source/com/openbravo/pos/sales/SalesBaseListener.java",
"license": "gpl-3.0",
"size": 2767
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 489,545 |
public void handleUpEvent(KeyEvent event) {
final int keyCode = event.getKeyCode();
if (DEBUG) Log.v(TAG, "Handle key up " + event + ": " + this);
int index = mActiveLongPresses.indexOfKey(keyCode);
if (index >= 0) {
if (DEBUG) Log.v(TAG, " Index:... | void function(KeyEvent event) { final int keyCode = event.getKeyCode(); if (DEBUG) Log.v(TAG, STR + event + STR + this); int index = mActiveLongPresses.indexOfKey(keyCode); if (index >= 0) { if (DEBUG) Log.v(TAG, STR + index); event.mFlags = FLAG_CANCELED FLAG_CANCELED_LONG_PRESS; mActiveLongPresses.removeAt(index); } ... | /**
* Handle key up event to stop tracking. This resets the dispatcher state,
* and updates the key event state based on it.
* <p>This is only needed if you are directly dispatching events, rather
* than handling them in {@link Callback#onKeyUp}.
*/ | Handle key up event to stop tracking. This resets the dispatcher state, and updates the key event state based on it. This is only needed if you are directly dispatching events, rather than handling them in <code>Callback#onKeyUp</code> | handleUpEvent | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/view/KeyEvent.java",
"license": "gpl-3.0",
"size": 57346
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,518,181 |
protected void validate() throws AxonConfigurationException {
// Kept to be overridden
}
} | void function() throws AxonConfigurationException { } } | /**
* Validates whether the fields contained in this Builder are set accordingly.
*
* @throws AxonConfigurationException if one field is asserted to be incorrect according to the Builder's
* specifications
*/ | Validates whether the fields contained in this Builder are set accordingly | validate | {
"repo_name": "krosenvold/AxonFramework",
"path": "modelling/src/main/java/org/axonframework/modelling/saga/repository/LockingSagaRepository.java",
"license": "apache-2.0",
"size": 5608
} | [
"org.axonframework.common.AxonConfigurationException"
] | import org.axonframework.common.AxonConfigurationException; | import org.axonframework.common.*; | [
"org.axonframework.common"
] | org.axonframework.common; | 251,310 |
public List<SqlTypedParamValue> params() {
return params;
} | List<SqlTypedParamValue> function() { return params; } | /**
* An optional list of parameters if the SQL query is parametrized
*/ | An optional list of parameters if the SQL query is parametrized | params | {
"repo_name": "gfyoung/elasticsearch",
"path": "x-pack/plugin/sql/sql-action/src/main/java/org/elasticsearch/xpack/sql/action/AbstractSqlQueryRequest.java",
"license": "apache-2.0",
"size": 8386
} | [
"java.util.List",
"org.elasticsearch.xpack.sql.proto.SqlTypedParamValue"
] | import java.util.List; import org.elasticsearch.xpack.sql.proto.SqlTypedParamValue; | import java.util.*; import org.elasticsearch.xpack.sql.proto.*; | [
"java.util",
"org.elasticsearch.xpack"
] | java.util; org.elasticsearch.xpack; | 298,988 |
public static long binarySearch(char[] selector, MethodBinding[] sortedMethods) {
if (sortedMethods == null)
return -1;
int max = sortedMethods.length;
if (max == 0)
return -1;
int left = 0, right = max - 1, selectorLength = selector.length;
int mid = ... | static long function(char[] selector, MethodBinding[] sortedMethods) { if (sortedMethods == null) return -1; int max = sortedMethods.length; if (max == 0) return -1; int left = 0, right = max - 1, selectorLength = selector.length; int mid = 0; char[] midSelector; while (left <= right) { mid = left + (right - left) / 2;... | /**
* Returns a combined range value representing: (start + (end<<32)), where start is the index of the first matching method
* (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same
* selector. -1 means no method got found
*
* @para... | Returns a combined range value representing: (start + (end<<32)), where start is the index of the first matching method (remember methods are sorted alphabetically on selectors), and end is the index of last contiguous methods with same selector. -1 means no method got found | binarySearch | {
"repo_name": "riuvshin/che-plugins",
"path": "plugin-java/che-plugin-java-ext-java/src/main/java/org/eclipse/che/ide/ext/java/jdt/internal/compiler/lookup/ReferenceBinding.java",
"license": "epl-1.0",
"size": 65482
} | [
"org.eclipse.che.ide.ext.java.jdt.core.compiler.CharOperation"
] | import org.eclipse.che.ide.ext.java.jdt.core.compiler.CharOperation; | import org.eclipse.che.ide.ext.java.jdt.core.compiler.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 860,622 |
void customizedWfcPreference(Context context, PreferenceScreen preferenceScreen); | void customizedWfcPreference(Context context, PreferenceScreen preferenceScreen); | /** Customize the WFC settings preference.
* Used in Wireless Settings
* @param context context
* @param preferenceScreen preferenceScreen
*/ | Customize the WFC settings preference. Used in Wireless Settings | customizedWfcPreference | {
"repo_name": "miswenwen/My_bird_work",
"path": "Bird_work/我的项目/Settings/ext/src/com/mediatek/settings/ext/IWfcSettingsExt.java",
"license": "apache-2.0",
"size": 2205
} | [
"android.content.Context",
"android.preference.PreferenceScreen"
] | import android.content.Context; import android.preference.PreferenceScreen; | import android.content.*; import android.preference.*; | [
"android.content",
"android.preference"
] | android.content; android.preference; | 1,216,839 |
public PageBlobGetPageRangesDiffHeaders setLastModified(OffsetDateTime lastModified) {
if (lastModified == null) {
this.lastModified = null;
} else {
this.lastModified = new DateTimeRfc1123(lastModified);
}
return this;
} | PageBlobGetPageRangesDiffHeaders function(OffsetDateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { this.lastModified = new DateTimeRfc1123(lastModified); } return this; } | /**
* Set the lastModified property: Returns the date and time the container
* was last modified. Any operation that modifies the blob, including an
* update of the blob's metadata or properties, changes the last-modified
* time of the blob.
*
* @param lastModified the lastModified value t... | Set the lastModified property: Returns the date and time the container was last modified. Any operation that modifies the blob, including an update of the blob's metadata or properties, changes the last-modified time of the blob | setLastModified | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobGetPageRangesDiffHeaders.java",
"license": "mit",
"size": 8854
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 2,603,529 |
public static <T> List<T> fromIterable(Iterable<T> iterable) {
List<T> result = new ArrayList<>();
for (T t : iterable) {
result.add(t);
}
return result;
} | static <T> List<T> function(Iterable<T> iterable) { List<T> result = new ArrayList<>(); for (T t : iterable) { result.add(t); } return result; } | /**
* Builds a list from the elements of an Iterable.
*
* @param iterable The iterable containing the elements.
* @param <T> The type of the elements.
* @return A list with the elements of the Iterable.
*/ | Builds a list from the elements of an Iterable | fromIterable | {
"repo_name": "jqno/equalsverifier",
"path": "equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/util/ListBuilders.java",
"license": "apache-2.0",
"size": 2854
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,435,023 |
@BusMethod(signature="r")
public void setContact(Contact contact) throws BusException; | @BusMethod(signature="r") void function(Contact contact) throws BusException; | /**
* Add or replace a contact in the address book.
* Only one contact per last name is allowed.
*
* @param contact The contact to add/replace.
*/ | Add or replace a contact in the address book. Only one contact per last name is allowed | setContact | {
"repo_name": "danilomendonca/A3Droid_Test_Greenhouse",
"path": "alljoyn_java/src/main/java/org/alljoyn/bus/AddressBookInterface.java",
"license": "apache-2.0",
"size": 2164
} | [
"org.alljoyn.bus.BusException",
"org.alljoyn.bus.annotation.BusMethod"
] | import org.alljoyn.bus.BusException; import org.alljoyn.bus.annotation.BusMethod; | import org.alljoyn.bus.*; import org.alljoyn.bus.annotation.*; | [
"org.alljoyn.bus"
] | org.alljoyn.bus; | 2,137,310 |
public Feeder<T, R, P> setName(String name) {
this.name = name;
return this;
} | Feeder<T, R, P> function(String name) { this.name = name; return this; } | /**
* The name of the feeder
* @param name the feeder name
* @return this feeder
*/ | The name of the feeder | setName | {
"repo_name": "szwork2013/elasticsearch-sentiment",
"path": "elasticsearch-jdbc/src/main/java/org/xbib/elasticsearch/plugin/feeder/jdbc/JDBCFeeder.java",
"license": "apache-2.0",
"size": 15779
} | [
"org.xbib.elasticsearch.plugin.feeder.Feeder"
] | import org.xbib.elasticsearch.plugin.feeder.Feeder; | import org.xbib.elasticsearch.plugin.feeder.*; | [
"org.xbib.elasticsearch"
] | org.xbib.elasticsearch; | 2,106,153 |
public void process(Grammar grammar) throws RuntimeException {
VisualBasicParserGenerator gen;
gen = new VisualBasicParserGenerator(grammar);
gen.setBaseDir(dir);
if (namespace != null) {
gen.setNamespace(namespace);
}
if (prefix != null) {
ge... | void function(Grammar grammar) throws RuntimeException { VisualBasicParserGenerator gen; gen = new VisualBasicParserGenerator(grammar); gen.setBaseDir(dir); if (namespace != null) { gen.setNamespace(namespace); } if (prefix != null) { gen.setBaseName(prefix); } gen.setPublicAccess(publicAccess); try { System.out.printl... | /**
* Proceses the specified grammar.
*
* @param grammar the grammar to process
*
* @throws RuntimeException if the grammar couldn't be processed
* correctly
*/ | Proceses the specified grammar | process | {
"repo_name": "runner-mei/mibble",
"path": "src/main/java/net/percederberg/grammatica/ant/VisualBasicElement.java",
"license": "gpl-2.0",
"size": 3582
} | [
"java.io.IOException",
"net.percederberg.grammatica.Grammar",
"net.percederberg.grammatica.output.VisualBasicParserGenerator"
] | import java.io.IOException; import net.percederberg.grammatica.Grammar; import net.percederberg.grammatica.output.VisualBasicParserGenerator; | import java.io.*; import net.percederberg.grammatica.*; import net.percederberg.grammatica.output.*; | [
"java.io",
"net.percederberg.grammatica"
] | java.io; net.percederberg.grammatica; | 408,650 |
private long readInteger(ExtractorInput input, int byteLength)
throws IOException, InterruptedException {
input.readFully(scratch, 0, byteLength);
long value = 0;
for (int i = 0; i < byteLength; i++) {
value = (value << 8) | (scratch[i] & 0xFF);
}
return value;
} | long function(ExtractorInput input, int byteLength) throws IOException, InterruptedException { input.readFully(scratch, 0, byteLength); long value = 0; for (int i = 0; i < byteLength; i++) { value = (value << 8) (scratch[i] & 0xFF); } return value; } | /**
* Reads and returns an integer of length {@code byteLength} from the {@link ExtractorInput}.
*
* @param input The {@link ExtractorInput} from which to read.
* @param byteLength The length of the integer being read.
* @return The read integer value.
* @throws IOException If an error occurs reading ... | Reads and returns an integer of length byteLength from the <code>ExtractorInput</code> | readInteger | {
"repo_name": "ppamorim/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer/extractor/webm/DefaultEbmlReader.java",
"license": "apache-2.0",
"size": 9212
} | [
"com.google.android.exoplayer.extractor.ExtractorInput",
"java.io.IOException"
] | import com.google.android.exoplayer.extractor.ExtractorInput; import java.io.IOException; | import com.google.android.exoplayer.extractor.*; import java.io.*; | [
"com.google.android",
"java.io"
] | com.google.android; java.io; | 2,599,472 |
public Iterator<Axiom> getAgeRating()
{
QueryProgram queryProgram = new QueryProgram(PERSON_RATING);
Result result = queryProgram.executeQuery("rate_age");
return result.getIterator(QualifiedName.parseGlobalName("rated"));
} | Iterator<Axiom> function() { QueryProgram queryProgram = new QueryProgram(PERSON_RATING); Result result = queryProgram.executeQuery(STR); return result.getIterator(QualifiedName.parseGlobalName("rated")); } | /**
* Compiles the PERSON_RATING script and runs the "rate_age" query which gives each person
* over the age of 20 an age rating and excludes those aged 20 and under.<br/>
* The first 3 expected results:<br/>
age_rating(age = 23, age_weight = 1.0, name = John)<br/>
age_rating(age = 34, age_weigh... | Compiles the PERSON_RATING script and runs the "rate_age" query which gives each person over the age of 20 an age rating and excludes those aged 20 and under. The first 3 expected results: | getAgeRating | {
"repo_name": "andrew-bowley/xpl",
"path": "tutorial/src/main/java/au/com/cybersearch2/classy_logic/tutorial10/AgeDiscrimination.java",
"license": "gpl-3.0",
"size": 4058
} | [
"au.com.cybersearch2.classy_logic.QueryProgram",
"au.com.cybersearch2.classy_logic.Result",
"au.com.cybersearch2.classy_logic.helper.QualifiedName",
"au.com.cybersearch2.classy_logic.pattern.Axiom",
"java.util.Iterator"
] | import au.com.cybersearch2.classy_logic.QueryProgram; import au.com.cybersearch2.classy_logic.Result; import au.com.cybersearch2.classy_logic.helper.QualifiedName; import au.com.cybersearch2.classy_logic.pattern.Axiom; import java.util.Iterator; | import au.com.cybersearch2.classy_logic.*; import au.com.cybersearch2.classy_logic.helper.*; import au.com.cybersearch2.classy_logic.pattern.*; import java.util.*; | [
"au.com.cybersearch2",
"java.util"
] | au.com.cybersearch2; java.util; | 2,409,175 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.