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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void assertReadingCompressedFileMatchesExpected(
File file, Compression compression, List<String> expected, Pipeline p) {
TextIO.Read read = TextIO.read().from(file.getPath()).withCompression(compression);
PAssert.that(p.apply("Read_" + file + "_" + compression.toString(), read))
... | static void function( File file, Compression compression, List<String> expected, Pipeline p) { TextIO.Read read = TextIO.read().from(file.getPath()).withCompression(compression); PAssert.that(p.apply("Read_" + file + "_" + compression.toString(), read)) .containsInAnyOrder(expected); PAssert.that( p.apply( "Read_" + fi... | /**
* Helper method that runs a variety of ways to read a single file using TextIO and checks that
* they all match the given expected output.
*
* <p>The transforms being verified are:
*
* <ul>
* <li>TextIO.read().from(filename).withCompression(compressionType)
* <li>TextIO.read().from(filen... | Helper method that runs a variety of ways to read a single file using TextIO and checks that they all match the given expected output. The transforms being verified are: TextIO.read().from(filename).withCompression(compressionType) TextIO.read().from(filename).withCompression(compressionType) .withHintMatchesManyFiles(... | assertReadingCompressedFileMatchesExpected | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/io/TextIOReadTest.java",
"license": "apache-2.0",
"size": 34887
} | [
"java.io.File",
"java.util.List",
"org.apache.beam.sdk.Pipeline",
"org.apache.beam.sdk.testing.PAssert",
"org.apache.beam.sdk.transforms.Create",
"org.hamcrest.Matchers"
] | import java.io.File; import java.util.List; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.testing.PAssert; import org.apache.beam.sdk.transforms.Create; import org.hamcrest.Matchers; | import java.io.*; import java.util.*; import org.apache.beam.sdk.*; import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.transforms.*; import org.hamcrest.*; | [
"java.io",
"java.util",
"org.apache.beam",
"org.hamcrest"
] | java.io; java.util; org.apache.beam; org.hamcrest; | 182,695 |
return MenuType.CONTEXTUAL == menu.getType();
} | return MenuType.CONTEXTUAL == menu.getType(); } | /**
* Check if the menu descriptor is for contextual menu
*
* @param menu
* @return boolean
*/ | Check if the menu descriptor is for contextual menu | isContextualMenu | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/ui/com.odcgroup.page.ui/src/main/java/com/odcgroup/page/ui/PageUIContextMenuProvider.java",
"license": "epl-1.0",
"size": 8437
} | [
"com.odcgroup.page.uimodel.MenuType"
] | import com.odcgroup.page.uimodel.MenuType; | import com.odcgroup.page.uimodel.*; | [
"com.odcgroup.page"
] | com.odcgroup.page; | 1,048,250 |
public List<String> categoryTags() {
return this.categoryTags;
} | List<String> function() { return this.categoryTags; } | /**
* Get the list of category tags that this recommendation belongs to.
*
* @return the categoryTags value
*/ | Get the list of category tags that this recommendation belongs to | categoryTags | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/RecommendationInner.java",
"license": "mit",
"size": 17998
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,363,104 |
public Application getApplication() {
return application;
} | Application function() { return application; } | /**
* Get application
* @return application
**/ | Get application | getApplication | {
"repo_name": "plaid/plaid-java",
"path": "src/main/java/com/plaid/client/model/ApplicationGetResponse.java",
"license": "mit",
"size": 3648
} | [
"com.plaid.client.model.Application"
] | import com.plaid.client.model.Application; | import com.plaid.client.model.*; | [
"com.plaid.client"
] | com.plaid.client; | 2,759,400 |
public double getLengthOffeneAbschn(final String owner, final Integer wdm) {
double length = 0;
for (final SbObj tmp : objList) {
if (tmp.getGuName().equals(owner) && (tmp.getWidmung() == wdm)) {
if (tmp.getArt().equals("p")) {
length += tmp.getLength... | double function(final String owner, final Integer wdm) { double length = 0; for (final SbObj tmp : objList) { if (tmp.getGuName().equals(owner) && (tmp.getWidmung() == wdm)) { if (tmp.getArt().equals("p")) { length += tmp.getLength(); } } } return length; } | /**
* DOCUMENT ME!
*
* @param owner DOCUMENT ME!
* @param wdm gemNr DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getLengthOffeneAbschn | {
"repo_name": "cismet/watergis-client",
"path": "src/main/java/de/cismet/watergis/reports/SbHelper.java",
"license": "lgpl-3.0",
"size": 18698
} | [
"de.cismet.watergis.reports.types.SbObj"
] | import de.cismet.watergis.reports.types.SbObj; | import de.cismet.watergis.reports.types.*; | [
"de.cismet.watergis"
] | de.cismet.watergis; | 384,071 |
private FSDataOutputStream create(Path f, FsPermission permission,
boolean overwrite, boolean createParent, int bufferSize,
short replication, long blockSize, Progressable progress,
SelfRenewingLease parentFolderLease)
throws FileAlreadyExistsException, IOException {
LOG.debug("Creati... | FSDataOutputStream function(Path f, FsPermission permission, boolean overwrite, boolean createParent, int bufferSize, short replication, long blockSize, Progressable progress, SelfRenewingLease parentFolderLease) throws FileAlreadyExistsException, IOException { LOG.debug(STR, f.toString()); if (containsColon(f)) { thro... | /**
* Create an Azure blob and return an output stream to use
* to write data to it.
*
* @param f
* @param permission
* @param overwrite
* @param createParent
* @param bufferSize
* @param replication
* @param blockSize
* @param progress
* @param parentFolderLease Lease on parent fold... | Create an Azure blob and return an output stream to use to write data to it | create | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/NativeAzureFileSystem.java",
"license": "gpl-3.0",
"size": 104024
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileAlreadyExistsException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.fs.permission.PermissionStatus",
"org.apache.hadoop.util.Progress... | import java.io.IOException; import java.io.OutputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileAlreadyExistsException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.fs.permission.PermissionStatus; import org.apac... | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,151,564 |
public int count__db(HashMap<String, Object> whereKeyValue, String orderBy, int limit, int skip){
String whereQuery = getWhereQuery(whereKeyValue);
String countQuery;
if(orderBy != null){
countQuery = "SELECT * FROM `City` " + whereQuery + " ORDER BY " + orderBy ;
i... | int function(HashMap<String, Object> whereKeyValue, String orderBy, int limit, int skip){ String whereQuery = getWhereQuery(whereKeyValue); String countQuery; if(orderBy != null){ countQuery = STR + whereQuery + STR + orderBy ; if(limit != 0){ countQuery = countQuery + " " + STR + limit + STR + skip; }else{ countQuery ... | /**
* Check count of database.
* @param whereKeyValue
* @param orderBy
* @param limit
* @return
*/ | Check count of database | count__db | {
"repo_name": "snaphy/generator-snaphy",
"path": "generators/androidSdk/templates/snaphyandroidsdk/src/main/java/com/androidsdk/snaphy/snaphyandroidsdk/db/CityDb.java",
"license": "mit",
"size": 27048
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"java.util.HashMap"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.HashMap; | import android.database.*; import android.database.sqlite.*; import java.util.*; | [
"android.database",
"java.util"
] | android.database; java.util; | 197,093 |
public DayPrayers getPrayerTimes(final GregorianCalendar date) {
return getPrayerTimes(new SimpleDate(date));
}
| DayPrayers function(final GregorianCalendar date) { return getPrayerTimes(new SimpleDate(date)); } | /**
* generates prayer times
* @param date the date of prayers
* @return a DayPrayers object containing time of different
* prayers
*/ | generates prayer times | getPrayerTimes | {
"repo_name": "xperimental/jitl",
"path": "src/net/sourceforge/jitl/Jitl.java",
"license": "lgpl-2.1",
"size": 23909
} | [
"java.util.GregorianCalendar",
"net.sourceforge.jitl.astro.SimpleDate"
] | import java.util.GregorianCalendar; import net.sourceforge.jitl.astro.SimpleDate; | import java.util.*; import net.sourceforge.jitl.astro.*; | [
"java.util",
"net.sourceforge.jitl"
] | java.util; net.sourceforge.jitl; | 856,893 |
@NotEmpty(message = "org.form.offer.field.descr.empty")
@NotNull(message = "org.form.offer.field.descr.empty")
@NotBlank(message = "org.form.offer.field.descr.empty")
public String getDescr() {
return this.m_strDescr;
} | @NotEmpty(message = STR) @NotNull(message = STR) @NotBlank(message = STR) String function() { return this.m_strDescr; } | /**
* Gets the descr.
*
* @return the descr
*/ | Gets the descr | getDescr | {
"repo_name": "fraunhoferfokus/particity",
"path": "lib_data/src/main/java/de/fraunhofer/fokus/oefit/adhoc/forms/OfferForm.java",
"license": "bsd-3-clause",
"size": 17963
} | [
"javax.validation.constraints.NotNull",
"org.hibernate.validator.constraints.NotBlank",
"org.hibernate.validator.constraints.NotEmpty"
] | import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.NotBlank; import org.hibernate.validator.constraints.NotEmpty; | import javax.validation.constraints.*; import org.hibernate.validator.constraints.*; | [
"javax.validation",
"org.hibernate.validator"
] | javax.validation; org.hibernate.validator; | 1,031,086 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<DenyAssignmentInner> listByResourceGroup(String resourceGroupName, String filter, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DenyAssignmentInner> listByResourceGroup(String resourceGroupName, String filter, Context context); | /**
* Gets deny assignments for a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or
* above the scope. Use $filter=denyAs... | Gets deny assignments for a resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DenyAssignmentsClient.java",
"license": "mit",
"size": 26696
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.authorization.fluent.models.DenyAssignmentInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.DenyAssignmentInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 477,744 |
@SuppressWarnings("deprecation")
private void showNotification () {
int id = getOptions().getId();
if (Build.VERSION.SDK_INT <= 15) {
// Notification for HoneyComb to ICS
getNotMgr().notify(id, builder.getNotification());
} else {
// Notification for ... | @SuppressWarnings(STR) void function () { int id = getOptions().getId(); if (Build.VERSION.SDK_INT <= 15) { getNotMgr().notify(id, builder.getNotification()); } else { getNotMgr().notify(id, builder.build()); } } | /**
* Show as local notification when in background.
*/ | Show as local notification when in background | showNotification | {
"repo_name": "elizabethrego/cordova-plugin-local-notifications-actions",
"path": "src/android/notification/Notification.java",
"license": "apache-2.0",
"size": 9281
} | [
"android.os.Build"
] | import android.os.Build; | import android.os.*; | [
"android.os"
] | android.os; | 1,071,591 |
@Test
public void testCreateNewCapacity() {
// Start from the default
int capacity = 11;
for (;;) {
int newCapacity = MemoryUtils.createNewCapacity(capacity + 1, capacity);
Assertions.assertTrue(newCapacity >= capacity + 1);
capacity = newCapacity;
if (capacity == Integer.MAX_VAL... | void function() { int capacity = 11; for (;;) { int newCapacity = MemoryUtils.createNewCapacity(capacity + 1, capacity); Assertions.assertTrue(newCapacity >= capacity + 1); capacity = newCapacity; if (capacity == Integer.MAX_VALUE) { break; } } final int safeMaxCapacity = Integer.MAX_VALUE - 8; Assertions.assertEquals(... | /**
* Test the method to create a new capacity.
*/ | Test the method to create a new capacity | testCreateNewCapacity | {
"repo_name": "aherbert/GDSC-Core",
"path": "src/test/java/uk/ac/sussex/gdsc/core/utils/MemoryUtilsTest.java",
"license": "gpl-3.0",
"size": 3659
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 1,500,274 |
public void start(String[] args) throws IOException {
try {
// read build information and print version.
props = ResourceBundle.getBundle("build");
logger.info("Starting proxy version " + props.getString("build.version"));
logger.info("Arguments: " + Joiner.on(", ").join(args));
new... | void function(String[] args) throws IOException { try { props = ResourceBundle.getBundle("build"); logger.info(STR + props.getString(STR)); logger.info(STR + Joiner.on(STR).join(args)); new JCommander(this, args); if (unparsed_params != null) { logger.info(STR + Joiner.on(STR).join(unparsed_params)); } loadListenerConf... | /**
* Entry-point for the application.
*
* @param args Command-line parameters passed on to JCommander to configure the daemon.
*/ | Entry-point for the application | start | {
"repo_name": "NGSEKHAR/javaproject1",
"path": "proxy/src/main/java/com/wavefront/agent/AbstractAgent.java",
"license": "apache-2.0",
"size": 56043
} | [
"com.beust.jcommander.JCommander",
"com.google.common.base.Joiner",
"com.wavefront.agent.logsharvesting.InteractiveLogsTester",
"java.io.IOException",
"java.util.ResourceBundle"
] | import com.beust.jcommander.JCommander; import com.google.common.base.Joiner; import com.wavefront.agent.logsharvesting.InteractiveLogsTester; import java.io.IOException; import java.util.ResourceBundle; | import com.beust.jcommander.*; import com.google.common.base.*; import com.wavefront.agent.logsharvesting.*; import java.io.*; import java.util.*; | [
"com.beust.jcommander",
"com.google.common",
"com.wavefront.agent",
"java.io",
"java.util"
] | com.beust.jcommander; com.google.common; com.wavefront.agent; java.io; java.util; | 1,641,299 |
void readUser()
{
String userId;
ReaderUtil.clearScreen();
try
{
System.out.println( "Enter UserId to read:" );
userId = ReaderUtil.readLn();
User user = new User();
user.setUserId( userId );
User ue = rm.readUser( user... | void readUser() { String userId; ReaderUtil.clearScreen(); try { System.out.println( STR ); userId = ReaderUtil.readLn(); User user = new User(); user.setUserId( userId ); User ue = rm.readUser( user ); if ( ue != null ) { System.out.println( STR ); System.out.println( STR + ue.getUserId() + "]" ); System.out.println( ... | /**
* Description of the Method
*/ | Description of the Method | readUser | {
"repo_name": "PennState/directory-fortress-core-1",
"path": "src/test/java/org/apache/directory/fortress/core/ReviewMgrConsole.java",
"license": "apache-2.0",
"size": 42212
} | [
"java.util.Enumeration",
"org.apache.directory.fortress.core.model.User",
"org.apache.directory.fortress.core.model.UserAdminRole",
"org.apache.directory.fortress.core.model.UserRole"
] | import java.util.Enumeration; import org.apache.directory.fortress.core.model.User; import org.apache.directory.fortress.core.model.UserAdminRole; import org.apache.directory.fortress.core.model.UserRole; | import java.util.*; import org.apache.directory.fortress.core.model.*; | [
"java.util",
"org.apache.directory"
] | java.util; org.apache.directory; | 509,376 |
private static String findBytestreamAliasUrl(Individual byteStream,
String surrogateUri) {
if (byteStream == null) {
return null;
}
String aliasUrl = byteStream.getDataValue(VitroVocabulary.FS_ALIAS_URL);
if (aliasUrl == null) {
log.error("File had no aliasUrl: '" + surrogateUri + "'");
} else {
... | static String function(Individual byteStream, String surrogateUri) { if (byteStream == null) { return null; } String aliasUrl = byteStream.getDataValue(VitroVocabulary.FS_ALIAS_URL); if (aliasUrl == null) { log.error(STR + surrogateUri + "'"); } else { log.debug(STR + surrogateUri + STR + aliasUrl + "'"); } return alia... | /**
* Get the alias URL from the bytestream, or null if there is none.
*/ | Get the alias URL from the bytestream, or null if there is none | findBytestreamAliasUrl | {
"repo_name": "vivo-project/Vitro",
"path": "api/src/main/java/edu/cornell/mannlib/vitro/webapp/filestorage/model/FileInfo.java",
"license": "bsd-3-clause",
"size": 8624
} | [
"edu.cornell.mannlib.vitro.webapp.beans.Individual",
"edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary"
] | import edu.cornell.mannlib.vitro.webapp.beans.Individual; import edu.cornell.mannlib.vitro.webapp.dao.VitroVocabulary; | import edu.cornell.mannlib.vitro.webapp.beans.*; import edu.cornell.mannlib.vitro.webapp.dao.*; | [
"edu.cornell.mannlib"
] | edu.cornell.mannlib; | 2,823,134 |
public static void main(String args[]) throws IOException {
Project project = null;
SwingCommandLine commandLine = new SwingCommandLine();
try {
commandLine.parse(args);
} catch (IllegalArgumentException e) {
System.err.println("Error: " + e.getMessage());
showSynopsis();
ShowHelp.showGeneralOpt... | static void function(String args[]) throws IOException { Project project = null; SwingCommandLine commandLine = new SwingCommandLine(); try { commandLine.parse(args); } catch (IllegalArgumentException e) { System.err.println(STR + e.getMessage()); showSynopsis(); ShowHelp.showGeneralOptions(); showCommandLineOptions();... | /**
* Invoke from the command line.
*
* @param args the command line arguments
* @throws IOException
*/ | Invoke from the command line | main | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java/edu/umd/cs/findbugs/gui/FindBugsFrame.java",
"license": "lgpl-2.1",
"size": 146480
} | [
"edu.umd.cs.findbugs.DetectorFactoryCollection",
"edu.umd.cs.findbugs.FindBugs",
"edu.umd.cs.findbugs.Project",
"edu.umd.cs.findbugs.ShowHelp",
"edu.umd.cs.findbugs.SystemProperties",
"edu.umd.cs.findbugs.config.CommandLine",
"java.io.File",
"java.io.IOException",
"java.util.Arrays"
] | import edu.umd.cs.findbugs.DetectorFactoryCollection; import edu.umd.cs.findbugs.FindBugs; import edu.umd.cs.findbugs.Project; import edu.umd.cs.findbugs.ShowHelp; import edu.umd.cs.findbugs.SystemProperties; import edu.umd.cs.findbugs.config.CommandLine; import java.io.File; import java.io.IOException; import java.uti... | import edu.umd.cs.findbugs.*; import edu.umd.cs.findbugs.config.*; import java.io.*; import java.util.*; | [
"edu.umd.cs",
"java.io",
"java.util"
] | edu.umd.cs; java.io; java.util; | 1,060,879 |
public List<DamageCause> getImmunities();
| List<DamageCause> function(); | /**
* Get a list of damage causes that this entity is immune to.
* @return list of damage causes
*/ | Get a list of damage causes that this entity is immune to | getImmunities | {
"repo_name": "smaltby/CustomEntityLibrary",
"path": "src/main/java/com/github/customentitylibrary/entities/EntityType.java",
"license": "mit",
"size": 4821
} | [
"java.util.List",
"org.bukkit.event.entity.EntityDamageEvent"
] | import java.util.List; import org.bukkit.event.entity.EntityDamageEvent; | import java.util.*; import org.bukkit.event.entity.*; | [
"java.util",
"org.bukkit.event"
] | java.util; org.bukkit.event; | 205,983 |
void showMaterializedViews(DataOutputStream out, List<Table> materializedViews)
throws HiveException; | void showMaterializedViews(DataOutputStream out, List<Table> materializedViews) throws HiveException; | /**
* Show a list of materialized views.
*/ | Show a list of materialized views | showMaterializedViews | {
"repo_name": "vineetgarg02/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/MetaDataFormatter.java",
"license": "apache-2.0",
"size": 4146
} | [
"java.io.DataOutputStream",
"java.util.List",
"org.apache.hadoop.hive.ql.metadata.HiveException",
"org.apache.hadoop.hive.ql.metadata.Table"
] | import java.io.DataOutputStream; import java.util.List; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.Table; | import java.io.*; import java.util.*; import org.apache.hadoop.hive.ql.metadata.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,454,183 |
public SparseMatrix matricization(int n) {
int numRows = dimensions[n];
int numCols = 1;
for (int d = 0; d < numDimensions; d++) {
if (d != n)
numCols *= dimensions[d];
}
Table<Integer, Integer, Double> dataTable = HashBasedTable.create();
Multimap<Integer, Integer> colMap = HashMultimap.create()... | SparseMatrix function(int n) { int numRows = dimensions[n]; int numCols = 1; for (int d = 0; d < numDimensions; d++) { if (d != n) numCols *= dimensions[d]; } Table<Integer, Integer, Double> dataTable = HashBasedTable.create(); Multimap<Integer, Integer> colMap = HashMultimap.create(); for (TensorEntry te : this) { int... | /**
* Re-ordering entries of a tensor into a matrix
*
* @param n
* mode or dimension
* @return an unfolded or flatten matrix
*/ | Re-ordering entries of a tensor into a matrix | matricization | {
"repo_name": "martinb741/Recommender",
"path": "src/main/i5/las2peer/services/recommender/librec/data/SparseTensor.java",
"license": "cc0-1.0",
"size": 24275
} | [
"com.google.common.collect.HashBasedTable",
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Multimap",
"com.google.common.collect.Table"
] | import com.google.common.collect.HashBasedTable; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Table; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 287,938 |
@Test
void testEquals()
{
assertTrue(UtilMath.equals(0.0, 0.0, Double.MIN_VALUE));
assertTrue(UtilMath.equals(1.0, 1.0, Double.MIN_VALUE));
assertTrue(UtilMath.equals(1.0, 1.1, 0.2));
assertTrue(UtilMath.equals(1.1, 1.0, 0.2));
assertFalse(UtilMath.equals(0.0... | void testEquals() { assertTrue(UtilMath.equals(0.0, 0.0, Double.MIN_VALUE)); assertTrue(UtilMath.equals(1.0, 1.0, Double.MIN_VALUE)); assertTrue(UtilMath.equals(1.0, 1.1, 0.2)); assertTrue(UtilMath.equals(1.1, 1.0, 0.2)); assertFalse(UtilMath.equals(0.0, 0.0, 0.0)); assertFalse(UtilMath.equals(1.0, 0.0, 0.0)); assertFa... | /**
* Test the equals function.
*/ | Test the equals function | testEquals | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-core/src/test/java/com/b3dgs/lionengine/UtilMathTest.java",
"license": "gpl-3.0",
"size": 11691
} | [
"com.b3dgs.lionengine.UtilAssert"
] | import com.b3dgs.lionengine.UtilAssert; | import com.b3dgs.lionengine.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 831,183 |
public void testGlobalCheckpointIsSafe() throws Exception {
startCluster(rarely() ? 5 : 3);
final int numberOfShards = 1 + randomInt(2);
assertAcked(prepareCreate("test")
.setSettings(Settings.builder()
.put(indexSettings())
.put(IndexMetadata.SET... | void function() throws Exception { startCluster(rarely() ? 5 : 3); final int numberOfShards = 1 + randomInt(2); assertAcked(prepareCreate("test") .setSettings(Settings.builder() .put(indexSettings()) .put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, numberOfShards) .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, randomInt(2)... | /**
* This test checks that all operations below the global checkpoint are properly persisted.
* It simulates a full power outage by preventing translog checkpoint files to be written and restart the cluster. This means that
* all un-fsynced data will be lost.
*/ | This test checks that all operations below the global checkpoint are properly persisted. It simulates a full power outage by preventing translog checkpoint files to be written and restart the cluster. This means that all un-fsynced data will be lost | testGlobalCheckpointIsSafe | {
"repo_name": "ern/elasticsearch",
"path": "server/src/internalClusterTest/java/org/elasticsearch/discovery/DiskDisruptionIT.java",
"license": "apache-2.0",
"size": 6580
} | [
"com.carrotsearch.randomizedtesting.RandomizedTest",
"java.util.Map",
"java.util.concurrent.ConcurrentHashMap",
"java.util.concurrent.atomic.AtomicBoolean",
"org.elasticsearch.action.admin.indices.stats.ShardStats",
"org.elasticsearch.cluster.metadata.IndexMetadata",
"org.elasticsearch.common.settings.S... | import com.carrotsearch.randomizedtesting.RandomizedTest; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; import org.elasticsearch.action.admin.indices.stats.ShardStats; import org.elasticsearch.cluster.metadata.IndexMetadata; import org.elasticsear... | import com.carrotsearch.randomizedtesting.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.elasticsearch.action.admin.indices.stats.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.core.*; import or... | [
"com.carrotsearch.randomizedtesting",
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.core",
"org.elasticsearch.index",
"org.elasticsearch.test"
] | com.carrotsearch.randomizedtesting; java.util; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.core; org.elasticsearch.index; org.elasticsearch.test; | 318,826 |
public void setPaymentGroupService(PaymentGroupService paymentGroupService) {
this.paymentGroupService = paymentGroupService;
} | void function(PaymentGroupService paymentGroupService) { this.paymentGroupService = paymentGroupService; } | /**
* Sets the paymentGroupService attribute value.
*
* @param paymentGroupService The paymentGroupService to set.
*/ | Sets the paymentGroupService attribute value | setPaymentGroupService | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/service/impl/PdpExtractServiceImpl.java",
"license": "apache-2.0",
"size": 53829
} | [
"org.kuali.kfs.pdp.service.PaymentGroupService"
] | import org.kuali.kfs.pdp.service.PaymentGroupService; | import org.kuali.kfs.pdp.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 500,858 |
protected final void setRemoteAddress(InetAddress addr) {
m_remoteAddr = addr;
} | final void function(InetAddress addr) { m_remoteAddr = addr; } | /**
* Set the remote address
*
* @param addr InetAddress
*/ | Set the remote address | setRemoteAddress | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/smb/server/PacketHandler.java",
"license": "gpl-3.0",
"size": 5642
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,315,626 |
EEnum getHttpMethod(); | EEnum getHttpMethod(); | /**
* Returns the meta object for enum '{@link io.opensemantics.semiotics.model.assessment.HttpMethod <em>Http Method</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Http Method</em>'.
* @see io.opensemantics.semiotics.model.assessment.HttpMethod
* @gen... | Returns the meta object for enum '<code>io.opensemantics.semiotics.model.assessment.HttpMethod Http Method</code>'. | getHttpMethod | {
"repo_name": "CoastalHacking/semiotics-main",
"path": "bundles/io.opensemantics.semiotics.model.assessment/src-gen/io/opensemantics/semiotics/model/assessment/AssessmentPackage.java",
"license": "apache-2.0",
"size": 151116
} | [
"org.eclipse.emf.ecore.EEnum"
] | import org.eclipse.emf.ecore.EEnum; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,795,347 |
@Override
public List<TWorkItemBean> loadMsProjectTasksForImport(Integer entityID, int entityType) {
Criteria crit = new Criteria();
crit.addJoin(WORKITEMKEY, BaseTMSProjectTaskPeer.WORKITEM);
crit.addJoin(CATEGORYKEY, BaseTListTypePeer.PKEY);
crit.add(BaseTListTypePeer.TYPEFLAG, TListTypeBean.TYPEFLAGS.TAS... | List<TWorkItemBean> function(Integer entityID, int entityType) { Criteria crit = new Criteria(); crit.addJoin(WORKITEMKEY, BaseTMSProjectTaskPeer.WORKITEM); crit.addJoin(CATEGORYKEY, BaseTListTypePeer.PKEY); crit.add(BaseTListTypePeer.TYPEFLAG, TListTypeBean.TYPEFLAGS.TASK); switch (entityType) { case SystemFields.RELE... | /**
* Loads workItems for import which has associated msProjectTaskBean objects
* and are of type task, include also the closed and deleted, archived tasks
* @param entityID
* @param entityType
*/ | Loads workItems for import which has associated msProjectTaskBean objects and are of type task, include also the closed and deleted, archived tasks | loadMsProjectTasksForImport | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/TWorkItemPeer.java",
"license": "gpl-3.0",
"size": 84464
} | [
"com.aurel.track.beans.TListTypeBean",
"com.aurel.track.beans.TWorkItemBean",
"com.aurel.track.fieldType.constants.SystemFields",
"java.util.List",
"org.apache.torque.util.Criteria"
] | import com.aurel.track.beans.TListTypeBean; import com.aurel.track.beans.TWorkItemBean; import com.aurel.track.fieldType.constants.SystemFields; import java.util.List; import org.apache.torque.util.Criteria; | import com.aurel.track.*; import com.aurel.track.beans.*; import java.util.*; import org.apache.torque.util.*; | [
"com.aurel.track",
"java.util",
"org.apache.torque"
] | com.aurel.track; java.util; org.apache.torque; | 44,178 |
public void updateConnection(MapServerData newData) throws NoSavedConnectionException; | void function(MapServerData newData) throws NoSavedConnectionException; | /**
* Sets all connection properties by the new.
*
* @param newData
* @throws NoSavedConnectionException
*/ | Sets all connection properties by the new | updateConnection | {
"repo_name": "MReichenbach/visitmeta",
"path": "common/src/main/java/de/hshannover/f4/trust/visitmeta/interfaces/ifmap/ConnectionManager.java",
"license": "apache-2.0",
"size": 7920
} | [
"de.hshannover.f4.trust.visitmeta.exceptions.ifmap.NoSavedConnectionException",
"de.hshannover.f4.trust.visitmeta.interfaces.data.MapServerData"
] | import de.hshannover.f4.trust.visitmeta.exceptions.ifmap.NoSavedConnectionException; import de.hshannover.f4.trust.visitmeta.interfaces.data.MapServerData; | import de.hshannover.f4.trust.visitmeta.exceptions.ifmap.*; import de.hshannover.f4.trust.visitmeta.interfaces.data.*; | [
"de.hshannover.f4"
] | de.hshannover.f4; | 1,134,999 |
public void readPacketData(PacketBuffer buf) throws IOException
{
this.windowId = buf.readByte();
this.uid = buf.readShort();
this.accepted = buf.readByte() != 0;
} | void function(PacketBuffer buf) throws IOException { this.windowId = buf.readByte(); this.uid = buf.readShort(); this.accepted = buf.readByte() != 0; } | /**
* Reads the raw packet data from the data stream.
*/ | Reads the raw packet data from the data stream | readPacketData | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/network/play/client/C0FPacketConfirmTransaction.java",
"license": "gpl-2.0",
"size": 1497
} | [
"java.io.IOException",
"net.minecraft.network.PacketBuffer"
] | import java.io.IOException; import net.minecraft.network.PacketBuffer; | import java.io.*; import net.minecraft.network.*; | [
"java.io",
"net.minecraft.network"
] | java.io; net.minecraft.network; | 2,192,515 |
ProcessorEntity deleteProcessor(Revision revision, String processorId);
// ----------------------------------------
// Connections methods
// ---------------------------------------- | ProcessorEntity deleteProcessor(Revision revision, String processorId); | /**
* Deletes the specified processor.
*
* @param revision Revision to compare with current base revision
* @param processorId The processor id to delete
* @return snapshot
*/ | Deletes the specified processor | deleteProcessor | {
"repo_name": "jskora/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 83710
} | [
"org.apache.nifi.web.api.entity.ProcessorEntity"
] | import org.apache.nifi.web.api.entity.ProcessorEntity; | import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 1,253,364 |
@Before
@SuppressWarnings("unchecked")
public void setup() {
TAGS.clear();
TAGS.add(TAG_1);
TAGS.add(TAG_2);
TAGS.add(TAG_3);
STATUSES.clear();
STATUSES.add(CommandStatus.ACTIVE);
STATUSES.add(CommandStatus.INACTIVE);
this.root = (Root<Comman... | @SuppressWarnings(STR) void function() { TAGS.clear(); TAGS.add(TAG_1); TAGS.add(TAG_2); TAGS.add(TAG_3); STATUSES.clear(); STATUSES.add(CommandStatus.ACTIVE); STATUSES.add(CommandStatus.INACTIVE); this.root = (Root<Command>) Mockito.mock(Root.class); this.cq = Mockito.mock(CriteriaQuery.class); this.cb = Mockito.mock(... | /**
* Setup some variables.
*/ | Setup some variables | setup | {
"repo_name": "chen0031/genie",
"path": "genie-server/src/test/java/com/netflix/genie/server/repository/jpa/TestCommandSpecs.java",
"license": "apache-2.0",
"size": 10395
} | [
"com.netflix.genie.common.model.Command",
"com.netflix.genie.common.model.CommandStatus",
"java.util.Set",
"javax.persistence.criteria.CriteriaBuilder",
"javax.persistence.criteria.CriteriaQuery",
"javax.persistence.criteria.Expression",
"javax.persistence.criteria.Path",
"javax.persistence.criteria.P... | import com.netflix.genie.common.model.Command; import com.netflix.genie.common.model.CommandStatus; import java.util.Set; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Expression; import javax.persistence.criteria.Path; import javax... | import com.netflix.genie.common.model.*; import java.util.*; import javax.persistence.criteria.*; import org.mockito.*; | [
"com.netflix.genie",
"java.util",
"javax.persistence",
"org.mockito"
] | com.netflix.genie; java.util; javax.persistence; org.mockito; | 262,182 |
private Property getIdPropertyOneToMany(EntityRelation _entityRelation)
throws InvalidEntityException
{
final Entity sourceEntity = getSourceEntity(_entityRelation);
final Entity relationEntity = getRelationEntity(_entityRelation);
final String relationField = _entityRelat... | Property function(EntityRelation _entityRelation) throws InvalidEntityException { final Entity sourceEntity = getSourceEntity(_entityRelation); final Entity relationEntity = getRelationEntity(_entityRelation); final String relationField = _entityRelation.getRelationFieldNameToCreate(); if (relationField == null) { retu... | /**
* Returns the Id property of the OneToMany relation.
* @param _entityRelation The relation to get the Id property from.
* @return the Id Property.
* @throws InvalidEntityException
*/ | Returns the Id property of the OneToMany relation | getIdPropertyOneToMany | {
"repo_name": "TheolZacharopoulos/greenDao-schema-builder",
"path": "src/main/java/com/greendao_schema_builder/relationship/EntityRelationBuilder.java",
"license": "apache-2.0",
"size": 5453
} | [
"com.greendao_schema_builder.errors.InvalidEntityException",
"de.greenrobot.daogenerator.Entity",
"de.greenrobot.daogenerator.Property"
] | import com.greendao_schema_builder.errors.InvalidEntityException; import de.greenrobot.daogenerator.Entity; import de.greenrobot.daogenerator.Property; | import com.greendao_schema_builder.errors.*; import de.greenrobot.daogenerator.*; | [
"com.greendao_schema_builder.errors",
"de.greenrobot.daogenerator"
] | com.greendao_schema_builder.errors; de.greenrobot.daogenerator; | 1,769,874 |
public TaskKey getTaskKey(String prefix, String jobNumber, String fullId) {
String taskComponent = fullId;
if (fullId == null) {
taskComponent = "";
} else {
String expectedPrefix = prefix + jobNumber + "_";
if (fullId.startsWith(expectedPrefix)
&& fullId.length() > expectedPre... | TaskKey function(String prefix, String jobNumber, String fullId) { String taskComponent = fullId; if (fullId == null) { taskComponent = STR_"; if (fullId.startsWith(expectedPrefix) && fullId.length() > expectedPrefix.length()) { taskComponent = fullId.substring(expectedPrefix.length()); } } return new TaskKey(this.jobK... | /**
* Returns the Task ID or Task Attempt ID, stripped of the leading job ID,
* appended to the job row key.
*/ | Returns the Task ID or Task Attempt ID, stripped of the leading job ID, appended to the job row key | getTaskKey | {
"repo_name": "InMobi/hraven",
"path": "hraven-etl/src/main/java/com/twitter/hraven/mapreduce/JobHistoryListener.java",
"license": "apache-2.0",
"size": 11167
} | [
"com.twitter.hraven.TaskKey"
] | import com.twitter.hraven.TaskKey; | import com.twitter.hraven.*; | [
"com.twitter.hraven"
] | com.twitter.hraven; | 517,630 |
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
activeEditorPart = part;
// Switch to the new selection provider.
//
if (selectionProvider != null) {
selectionProvider.removeSelectionChangedListener(this);
}
if (part == null) {
selectionProvider = null;
... | void function(IEditorPart part) { super.setActiveEditor(part); activeEditorPart = part; selectionProvider.removeSelectionChangedListener(this); } if (part == null) { selectionProvider = null; } else { selectionProvider = part.getSite().getSelectionProvider(); selectionProvider.addSelectionChangedListener(this); selecti... | /**
* When the active editor changes, this remembers the change and registers with it as a selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | When the active editor changes, this remembers the change and registers with it as a selection provider. | setActiveEditor | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/org.scaledl.overview.editor/src/org/scaledl/overview/presentation/OverviewActionBarContributor.java",
"license": "epl-1.0",
"size": 14800
} | [
"org.eclipse.jface.viewers.SelectionChangedEvent",
"org.eclipse.ui.IEditorPart"
] | import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.IEditorPart; | import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; | [
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.ui; | 2,258,836 |
interface WithAllOptions {
PermissionsUpdateDefinitionStages.WithExecute withEmails(List<String> emails);
} | interface WithAllOptions { PermissionsUpdateDefinitionStages.WithExecute withEmails(List<String> emails); } | /**
* The email address of the users.
*
* @return next definition stage
*/ | The email address of the users | withEmails | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/Permissions.java",
"license": "mit",
"size": 11885
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,382,417 |
public void setApiDir( FileResource apiDir )
{
this.apiDir = apiDir;
} | void function( FileResource apiDir ) { this.apiDir = apiDir; } | /**
* The directory in which to install {@link Artifact.Type#API} artifacts.
* When null, will not install them.
*
* @param apiDir
* The API directory
*/ | The directory in which to install <code>Artifact.Type#API</code> artifacts. When null, will not install them | setApiDir | {
"repo_name": "tliron/creel",
"path": "components/creel-ant/source/com/threecrickets/creel/ant/CleanTask.java",
"license": "lgpl-3.0",
"size": 4531
} | [
"org.apache.tools.ant.types.resources.FileResource"
] | import org.apache.tools.ant.types.resources.FileResource; | import org.apache.tools.ant.types.resources.*; | [
"org.apache.tools"
] | org.apache.tools; | 917,415 |
public static URI uriSearch(final URI baseUri) {
final UriBuilder bld = UriBuilder.fromUri(baseUri).path("conventionSearches");
return bld.build();
} | static URI function(final URI baseUri) { final UriBuilder bld = UriBuilder.fromUri(baseUri).path(STR); return bld.build(); } | /**
* Builds a URI.
*
* @param baseUri the base URI, not null
* @return the URI, not null
*/ | Builds a URI | uriSearch | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master-rest-client/src/main/java/com/opengamma/master/convention/impl/DataConventionMasterUris.java",
"license": "apache-2.0",
"size": 1499
} | [
"javax.ws.rs.core.UriBuilder"
] | import javax.ws.rs.core.UriBuilder; | import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 1,597,837 |
public final void setInput(final IJavaElement element) {
computeAndDoSetInput(null, element, false);
} | final void function(final IJavaElement element) { computeAndDoSetInput(null, element, false); } | /**
* Sets the input for this view.
*
* @param element the java element
*/ | Sets the input for this view | setInput | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/infoviews/AbstractInfoView.java",
"license": "epl-1.0",
"size": 28626
} | [
"org.eclipse.jdt.core.IJavaElement"
] | import org.eclipse.jdt.core.IJavaElement; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,740,137 |
public T caseDataItem(final DataItem object) {
return null;
} | T function(final DataItem object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Data
* Item</em>'. <!-- begin-user-doc --> This implementation returns null;
* returning a non-null result will terminate the switch. <!-- end-user-doc -->
*
* @param object the target of the switch.
* @return the result of interpret... | Returns the result of interpreting the object as an instance of 'Data Item'. This implementation returns null; returning a non-null result will terminate the switch. | caseDataItem | {
"repo_name": "debrief/debrief",
"path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/util/StackedchartsSwitch.java",
"license": "epl-1.0",
"size": 20487
} | [
"info.limpet.stackedcharts.model.DataItem"
] | import info.limpet.stackedcharts.model.DataItem; | import info.limpet.stackedcharts.model.*; | [
"info.limpet.stackedcharts"
] | info.limpet.stackedcharts; | 628,455 |
public void reloadSubscriptionsFromStorage() throws AndesException {
Map<String, List<String>> results = AndesContext.getInstance().getAndesContextStore()
.getAllStoredDurableSubscriptions();
Set<AndesSubscription> dbSubscriptions = new HashSet<>();
Set<AndesSubscription> lo... | void function() throws AndesException { Map<String, List<String>> results = AndesContext.getInstance().getAndesContextStore() .getAllStoredDurableSubscriptions(); Set<AndesSubscription> dbSubscriptions = new HashSet<>(); Set<AndesSubscription> localSubscriptions = new HashSet<>(); Set<AndesSubscription> copyOfLocalSubs... | /**
* Reload subscriptions from DB storage and update subscription registry. This is a two step process
* 1. Sync the DB with the local subscriptions.
* 2. Sync the subscription registry with updated DB
*/ | Reload subscriptions from DB storage and update subscription registry. This is a two step process 1. Sync the DB with the local subscriptions. 2. Sync the subscription registry with updated DB | reloadSubscriptionsFromStorage | {
"repo_name": "indikasampath2000/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/subscription/AndesSubscriptionManager.java",
"license": "apache-2.0",
"size": 55184
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.wso2.andes.kernel.AndesContext",
"org.wso2.andes.kernel.AndesException"
] | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.wso2.andes.kernel.AndesContext; import org.wso2.andes.kernel.AndesException; | import java.util.*; import org.wso2.andes.kernel.*; | [
"java.util",
"org.wso2.andes"
] | java.util; org.wso2.andes; | 1,946,159 |
public static Collection<File> getAllSubFolder(String chemin) throws UtilException {
List<File> resultat = new ArrayList<File>();
File directory = new File(chemin);
if (directory.isDirectory()) {
File[] list = directory.listFiles();
for (File file : list) {
if (file.isDirectory()) {
... | static Collection<File> function(String chemin) throws UtilException { List<File> resultat = new ArrayList<File>(); File directory = new File(chemin); if (directory.isDirectory()) { File[] list = directory.listFiles(); for (File file : list) { if (file.isDirectory()) { resultat.add(file); } } } else { SilverTrace.error... | /**
* retourne une Collection d'objets File qui representent les repertoires (et seulement les
* repertoires, pas les fichiers) contenus dans le repertoire passe en parametre
* @param chemin le chemin du repertoire
* @return une Collection d'objets File qui representent les repertoires (et seulement les
... | retourne une Collection d'objets File qui representent les repertoires (et seulement les repertoires, pas les fichiers) contenus dans le repertoire passe en parametre | getAllSubFolder | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/util/file/FileFolderManager.java",
"license": "agpl-3.0",
"size": 12690
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"org.silverpeas.core.exception.UtilException",
"org.silverpeas.core.silvertrace.SilverTrace"
] | import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.silverpeas.core.exception.UtilException; import org.silverpeas.core.silvertrace.SilverTrace; | import java.io.*; import java.util.*; import org.silverpeas.core.exception.*; import org.silverpeas.core.silvertrace.*; | [
"java.io",
"java.util",
"org.silverpeas.core"
] | java.io; java.util; org.silverpeas.core; | 2,804,280 |
public void fillMap() {
int iRoomX = 0;
int iRoomY = 0;
int iRoomCoords[];
int iRooms; // How many rooms should we draw?
Room currRoom;
Room tempRoom;
ListIterator iter;
int iRoomID = 0; // used for checking if we've added a room already
... | void function() { int iRoomX = 0; int iRoomY = 0; int iRoomCoords[]; int iRooms; Room currRoom; Room tempRoom; ListIterator iter; int iRoomID = 0; listRooms.add(rooms[0]); for(int i = 1; i < rooms.length; i++) { System.out.println(STR + rooms[i].getID() + STR); listRoomsToProcess.add(rooms[i]); listRooms.add(rooms[i]);... | /**
* Fill a 2D char array with characters representing rooms
* and connections between rooms
*/ | Fill a 2D char array with characters representing rooms and connections between rooms | fillMap | {
"repo_name": "nosleeptillbroken/NS_MUD",
"path": "jmud/command/Map.java",
"license": "mit",
"size": 17200
} | [
"java.util.ListIterator"
] | import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,158,624 |
public static <DataType> ArrayList<DataType> sampleMultiple(
final double[] cumulativeWeights,
final List<? extends DataType> domain,
final Random random,
final int numSamples )
{
final ArrayList<DataType> result = new ArrayList<DataType>(numSamples);
sampleMultip... | static <DataType> ArrayList<DataType> function( final double[] cumulativeWeights, final List<? extends DataType> domain, final Random random, final int numSamples ) { final ArrayList<DataType> result = new ArrayList<DataType>(numSamples); sampleMultipleInto(cumulativeWeights, domain, random, numSamples, result); return... | /**
* Samples multiple elements from the domain proportionately to the
* cumulative weights in the given weight array using a fast
* binary search algorithm
* @param <DataType>
* Type of data to be sampled
* @param cumulativeWeights
* Cumulative weights to sample from
* @param do... | Samples multiple elements from the domain proportionately to the cumulative weights in the given weight array using a fast binary search algorithm | sampleMultiple | {
"repo_name": "codeaudit/Foundry",
"path": "Components/LearningCore/Source/gov/sandia/cognition/statistics/ProbabilityMassFunctionUtil.java",
"license": "bsd-3-clause",
"size": 12363
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Random"
] | import java.util.ArrayList; import java.util.List; import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,022,171 |
private static boolean validateNoResourcesAttribute(RuleContext ruleContext) {
if (ruleContext.attributes().isAttributeValueExplicitlySpecified("resources")) {
ruleContext.attributeError("resources",
String.format("resources cannot be set when any of %s are defined.",
Joiner.on(", ")... | static boolean function(RuleContext ruleContext) { if (ruleContext.attributes().isAttributeValueExplicitlySpecified(STR)) { ruleContext.attributeError(STR, String.format(STR, Joiner.on(STR).join(RESOURCES_ATTRIBUTES))); return false; } return true; } | /**
* Validates that there are no resources defined if there are resource attribute defined.
*/ | Validates that there are no resources defined if there are resource attribute defined | validateNoResourcesAttribute | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/android/LocalResourceContainer.java",
"license": "apache-2.0",
"size": 12510
} | [
"com.google.common.base.Joiner",
"com.google.devtools.build.lib.analysis.RuleContext"
] | import com.google.common.base.Joiner; import com.google.devtools.build.lib.analysis.RuleContext; | import com.google.common.base.*; import com.google.devtools.build.lib.analysis.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,250,536 |
static BlockReader getLocalBlockReader(Configuration conf,
String src, ExtendedBlock blk, Token<BlockTokenIdentifier> accessToken,
DatanodeInfo chosenNode, int socketTimeout, long offsetIntoBlock)
throws InvalidToken, IOException {
try {
return BlockReaderLocal.newBlockReader(conf, src, bl... | static BlockReader getLocalBlockReader(Configuration conf, String src, ExtendedBlock blk, Token<BlockTokenIdentifier> accessToken, DatanodeInfo chosenNode, int socketTimeout, long offsetIntoBlock) throws InvalidToken, IOException { try { return BlockReaderLocal.newBlockReader(conf, src, blk, accessToken, chosenNode, so... | /**
* Get {@link BlockReader} for short circuited local reads.
*/ | Get <code>BlockReader</code> for short circuited local reads | getLocalBlockReader | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 68830
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.HashMap",
"java.util.Map",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.protocol.DatanodeInfo",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier",
"org.apac... | import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.security.token.block.BlockTokenI... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,063,563 |
public V getValueFromCache(K key) {
Cache<K, V> cache = getEntitlementCache();
if (cache != null) {
if (cache.containsKey(key)) {
if (log.isDebugEnabled()) {
String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain();
... | V function(K key) { Cache<K, V> cache = getEntitlementCache(); if (cache != null) { if (cache.containsKey(key)) { if (log.isDebugEnabled()) { String tenantDomain = CarbonContext.getThreadLocalCarbonContext().getTenantDomain(); log.debug(STR + Entitlement_CACHE_NAME + STR + STR + tenantDomain); } return cache.get(key); ... | /**
* Retrieves a cache entry.
*
* @param key CacheKey
* @return Cached entry.
*/ | Retrieves a cache entry | getValueFromCache | {
"repo_name": "nuwandi-is/identity-framework",
"path": "components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/cache/EntitlementBaseCache.java",
"license": "apache-2.0",
"size": 8905
} | [
"javax.cache.Cache",
"org.wso2.carbon.context.CarbonContext"
] | import javax.cache.Cache; import org.wso2.carbon.context.CarbonContext; | import javax.cache.*; import org.wso2.carbon.context.*; | [
"javax.cache",
"org.wso2.carbon"
] | javax.cache; org.wso2.carbon; | 1,469,013 |
public static VectorValueSelector makeVectorValueSelector(
VectorColumnSelectorFactory columnSelectorFactory,
@Nullable String fieldName,
@Nullable String expression,
Supplier<Expr> fieldExpression
)
{
if ((fieldName == null) == (expression == null)) {
throw new IllegalArgumentEx... | static VectorValueSelector function( VectorColumnSelectorFactory columnSelectorFactory, @Nullable String fieldName, @Nullable String expression, Supplier<Expr> fieldExpression ) { if ((fieldName == null) == (expression == null)) { throw new IllegalArgumentException(STR); } if (expression != null) { return ExpressionVec... | /**
* Make a {@link VectorValueSelector} for primitive numeric or expression virtual column inputs.
*/ | Make a <code>VectorValueSelector</code> for primitive numeric or expression virtual column inputs | makeVectorValueSelector | {
"repo_name": "monetate/druid",
"path": "processing/src/main/java/org/apache/druid/query/aggregation/AggregatorUtil.java",
"license": "apache-2.0",
"size": 15666
} | [
"com.google.common.base.Supplier",
"javax.annotation.Nullable",
"org.apache.druid.math.expr.Expr",
"org.apache.druid.segment.vector.VectorColumnSelectorFactory",
"org.apache.druid.segment.vector.VectorValueSelector",
"org.apache.druid.segment.virtual.ExpressionVectorSelectors"
] | import com.google.common.base.Supplier; import javax.annotation.Nullable; import org.apache.druid.math.expr.Expr; import org.apache.druid.segment.vector.VectorColumnSelectorFactory; import org.apache.druid.segment.vector.VectorValueSelector; import org.apache.druid.segment.virtual.ExpressionVectorSelectors; | import com.google.common.base.*; import javax.annotation.*; import org.apache.druid.math.expr.*; import org.apache.druid.segment.vector.*; import org.apache.druid.segment.virtual.*; | [
"com.google.common",
"javax.annotation",
"org.apache.druid"
] | com.google.common; javax.annotation; org.apache.druid; | 2,702,902 |
public static Uri withAppendedId(Uri contentUri, long id) {
return appendId(contentUri.buildUpon(), id).build();
} | static Uri function(Uri contentUri, long id) { return appendId(contentUri.buildUpon(), id).build(); } | /**
* Appends the given ID to the end of the path.
*
* @param contentUri to start with
* @param id to append
*
* @return a new URI with the given ID appended to the end of the path
*/ | Appends the given ID to the end of the path | withAppendedId | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/content/ContentUris.java",
"license": "gpl-3.0",
"size": 2104
} | [
"android.net.Uri"
] | import android.net.Uri; | import android.net.*; | [
"android.net"
] | android.net; | 1,289,913 |
public static byte[] calculateMD5Digest(@NotNull InputStream in) throws NoSuchAlgorithmException, IOException {
MessageDigest md = MessageDigest.getInstance("MD5");
InputStream fis = new BufferedInputStream(in);
byte[] dataBytes = new byte[1024];
int nread;
while ((nread = ... | static byte[] function(@NotNull InputStream in) throws NoSuchAlgorithmException, IOException { MessageDigest md = MessageDigest.getInstance("MD5"); InputStream fis = new BufferedInputStream(in); byte[] dataBytes = new byte[1024]; int nread; while ((nread = fis.read(dataBytes)) != -1) md.update(dataBytes, 0, nread); ret... | /**
* Calculate MD5 digits.
*
* @param in Input stream.
* @return Calculated MD5 digest for given input stream.
* @throws NoSuchAlgorithmException If MD5 algorithm was not found.
* @throws IOException If an I/O exception occurs.
*/ | Calculate MD5 digits | calculateMD5Digest | {
"repo_name": "shurun19851206/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289056
} | [
"java.io.BufferedInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException",
"org.jetbrains.annotations.NotNull"
] | import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import org.jetbrains.annotations.NotNull; | import java.io.*; import java.security.*; import org.jetbrains.annotations.*; | [
"java.io",
"java.security",
"org.jetbrains.annotations"
] | java.io; java.security; org.jetbrains.annotations; | 1,743,124 |
List<TEntityDescriptor> getAll(); | List<TEntityDescriptor> getAll(); | /**
* Gets all wallet storable entity descriptors.
*
* @return A list of all storable entity descriptors.
*/ | Gets all wallet storable entity descriptors | getAll | {
"repo_name": "NewEconomyMovement/NemCommunityClient",
"path": "nem-client-api/src/main/java/org/nem/ncc/storable/entity/StorableEntityLocator.java",
"license": "mit",
"size": 701
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 192,316 |
public void testRetrieveDAOFactoryFolder()
{
@NotNull final PackageUtils t_PackageUtils = PackageUtils.getInstance();
assertNotNull(t_PackageUtils);
@Nullable final File t_TestFile = getTestFile();
assertNotNull(t_TestFile);
@NotNull final File t_DAOFactoryFolder =
... | void function() { @NotNull final PackageUtils t_PackageUtils = PackageUtils.getInstance(); assertNotNull(t_PackageUtils); @Nullable final File t_TestFile = getTestFile(); assertNotNull(t_TestFile); @NotNull final File t_DAOFactoryFolder = t_PackageUtils.retrieveDAOFactoryFolder( t_TestFile, STR, "mysql", false); assert... | /**
* Tests the retrieveDAOFactoryFolder() method
* @see org.acmsl.queryj.tools.PackageUtils#retrieveDAOFactoryFolder(File,String,String,boolean)
*/ | Tests the retrieveDAOFactoryFolder() method | testRetrieveDAOFactoryFolder | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/test/java/org/acmsl/queryj/tools/PackageUtilsTest.java",
"license": "gpl-2.0",
"size": 18169
} | [
"java.io.File",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import java.io.File; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import java.io.*; import org.jetbrains.annotations.*; | [
"java.io",
"org.jetbrains.annotations"
] | java.io; org.jetbrains.annotations; | 2,821,117 |
public Output<? extends TType> handle() {
return handle;
} | Output<? extends TType> function() { return handle; } | /**
* Gets handle.
*
* @return handle.
*/ | Gets handle | handle | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/core/DummyMemoryCache.java",
"license": "apache-2.0",
"size": 2752
} | [
"org.tensorflow.Output",
"org.tensorflow.types.family.TType"
] | import org.tensorflow.Output; import org.tensorflow.types.family.TType; | import org.tensorflow.*; import org.tensorflow.types.family.*; | [
"org.tensorflow",
"org.tensorflow.types"
] | org.tensorflow; org.tensorflow.types; | 1,885,734 |
public double[] transformToVector() throws Exception {
if (vectorLength > vladAggregator.getVectorLength() || vectorLength <= 0) {
throw new Exception("Vector length should be between 1 and " + vladAggregator.getVectorLength());
}
// the local features are extracted
double[][] features;
if (imag... | double[] function() throws Exception { if (vectorLength > vladAggregator.getVectorLength() vectorLength <= 0) { throw new Exception(STR + vladAggregator.getVectorLength()); } double[][] features; if (image == null) { try { image = ImageIO.read(new File(imageFolder + imageFilename)); } catch (IllegalArgumentException e)... | /**
* Transforms the image into a vector and returns the result.
*
* @return The image's vector.
* @throws Exception
*/ | Transforms the image into a vector and returns the result | transformToVector | {
"repo_name": "kandreadou/reveal-multimedia-indexing",
"path": "src/main/java/gr/iti/mklab/visual/vectorization/ImageVectorization.java",
"license": "apache-2.0",
"size": 8972
} | [
"gr.iti.mklab.visual.extraction.ImageScaling",
"gr.iti.mklab.visual.utilities.ImageIOGreyScale",
"java.io.File",
"javax.imageio.ImageIO"
] | import gr.iti.mklab.visual.extraction.ImageScaling; import gr.iti.mklab.visual.utilities.ImageIOGreyScale; import java.io.File; import javax.imageio.ImageIO; | import gr.iti.mklab.visual.extraction.*; import gr.iti.mklab.visual.utilities.*; import java.io.*; import javax.imageio.*; | [
"gr.iti.mklab",
"java.io",
"javax.imageio"
] | gr.iti.mklab; java.io; javax.imageio; | 926,767 |
public static Date stringToDate(String dateString) {
return stringToDate(dateString, DATE_YEAR_MONTH_DAY_STRING_FORMAT);
} | static Date function(String dateString) { return stringToDate(dateString, DATE_YEAR_MONTH_DAY_STRING_FORMAT); } | /**
* Standard format 'yyyy-MM-dd'
*
* @param dateString The string to parse
* @return The date or null
*/ | Standard format 'yyyy-MM-dd' | stringToDate | {
"repo_name": "olivierg13/GreenDao-vs-Realm",
"path": "Greendao-app/src/main/java/com/db/oliviergoutay/greendao_vs_realm/utils/Utilities.java",
"license": "apache-2.0",
"size": 2290
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 498,771 |
public static boolean deleteSnippet(Context context, String worldName, Category category,
String articleName, String snippetName) {
return FileRetriever.getSnippetFile(context, worldName, category, articleName,
snippetName, false).delete();
} | static boolean function(Context context, String worldName, Category category, String articleName, String snippetName) { return FileRetriever.getSnippetFile(context, worldName, category, articleName, snippetName, false).delete(); } | /**
* Deletes a Snippet belonging to the specified Article.
* @param context The Context calling this method.
* @param worldName The name of the World the Article belongs to.
* @param category The Category of the Article.
* @param articleName The name of the Article the Snippet belongs to.
... | Deletes a Snippet belonging to the specified Article | deleteSnippet | {
"repo_name": "MarquisLP/World-Scribe",
"path": "app/src/main/java/com/averi/worldscribe/utilities/ExternalDeleter.java",
"license": "mit",
"size": 6906
} | [
"android.content.Context",
"com.averi.worldscribe.Category"
] | import android.content.Context; import com.averi.worldscribe.Category; | import android.content.*; import com.averi.worldscribe.*; | [
"android.content",
"com.averi.worldscribe"
] | android.content; com.averi.worldscribe; | 2,597,035 |
@ServiceMethod(returns = ReturnType.SINGLE)
public VirtualNetworkRuleInner createOrUpdate(
String resourceGroupName,
String serverName,
String virtualNetworkRuleName,
VirtualNetworkRuleInner parameters,
Context context) {
return createOrUpdateAsync(resourceGroupNa... | @ServiceMethod(returns = ReturnType.SINGLE) VirtualNetworkRuleInner function( String resourceGroupName, String serverName, String virtualNetworkRuleName, VirtualNetworkRuleInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, virtualNetworkRuleName, parameters, context).block();... | /**
* Creates or updates an existing virtual network rule.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param virtualNetworkRuleName The name of the virtual network rule.
* @param parameters The re... | Creates or updates an existing virtual network rule | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/implementation/VirtualNetworkRulesClientImpl.java",
"license": "mit",
"size": 57505
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mysql.fluent.models.VirtualNetworkRuleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.mysql.fluent.models.VirtualNetworkRuleInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.mysql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,809,784 |
public static StringServer create(Observable<String> source, int port) {
return new StringServer(source, port);
}
private StringServer(Observable<String> source, int port) {
try {
this.ss = new ServerSocket(port);
subscriptions.add(Subscriptions.create(() -> clo... | static StringServer function(Observable<String> source, int port) { return new StringServer(source, port); } private StringServer(Observable<String> source, int port) { try { this.ss = new ServerSocket(port); subscriptions.add(Subscriptions.create(() -> closeServerSocket())); } catch (IOException e) { throw new Runtime... | /**
* Factory method.
*
* @param source
* source to publish on server socket
* @param port
* to assign the server socket to
*/ | Factory method | create | {
"repo_name": "amsa-code/risky",
"path": "streams/src/main/java/au/gov/amsa/streams/StringServer.java",
"license": "apache-2.0",
"size": 5729
} | [
"java.io.IOException",
"java.net.ServerSocket"
] | import java.io.IOException; import java.net.ServerSocket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 564,634 |
EAttribute getMemberPropertyType_Arcrole(); | EAttribute getMemberPropertyType_Arcrole(); | /**
* Returns the meta object for the attribute '{@link net.opengis.wfs20.MemberPropertyType#getArcrole <em>Arcrole</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Arcrole</em>'.
* @see net.opengis.wfs20.MemberPropertyType#getArcrole()
* @se... | Returns the meta object for the attribute '<code>net.opengis.wfs20.MemberPropertyType#getArcrole Arcrole</code>'. | getMemberPropertyType_Arcrole | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java",
"license": "lgpl-2.1",
"size": 404067
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,181,543 |
EList<AllocationContext> getAllocationContexts(); | EList<AllocationContext> getAllocationContexts(); | /**
* Returns the value of the '<em><b>Allocation Contexts</b></em>' reference list.
* The list contents are of type {@link org.palladiosimulator.pcm.allocation.AllocationContext}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Allocation Contexts</em>' reference list isn't clear,
* there real... | Returns the value of the 'Allocation Contexts' reference list. The list contents are of type <code>org.palladiosimulator.pcm.allocation.AllocationContext</code>. If the meaning of the 'Allocation Contexts' reference list isn't clear, there really should be more of a description here... | getAllocationContexts | {
"repo_name": "KAMP-Research/KAMP",
"path": "bundles/Toometa/toometa.pcmarchoptions/src/pcmarchoptions/PCM_MultipleAllocation.java",
"license": "apache-2.0",
"size": 1801
} | [
"org.eclipse.emf.common.util.EList",
"org.palladiosimulator.pcm.allocation.AllocationContext"
] | import org.eclipse.emf.common.util.EList; import org.palladiosimulator.pcm.allocation.AllocationContext; | import org.eclipse.emf.common.util.*; import org.palladiosimulator.pcm.allocation.*; | [
"org.eclipse.emf",
"org.palladiosimulator.pcm"
] | org.eclipse.emf; org.palladiosimulator.pcm; | 2,188,272 |
public static String escapeAssignmentFeedback(String value)
{
if (value == null || value.length() == 0) return value;
value = fixAssignmentFeedback(value);
StringBuilder buf = new StringBuilder(value);
int pos = -1;
while ((pos = buf.indexOf("{{")) != -1)
{
buf.replace(pos, pos + "{{".length(), "<... | static String function(String value) { if (value == null value.length() == 0) return value; value = fixAssignmentFeedback(value); StringBuilder buf = new StringBuilder(value); int pos = -1; while ((pos = buf.indexOf("{{")) != -1) { buf.replace(pos, pos + "{{".length(), STR); } while ((pos = buf.indexOf("}}")) != -1) { ... | /**
* Called to deal with old Chef-style assignment feedback annotation, {{like this}}.
*
* @param value
* A formatted text string that may contain {{}} style markup
* @return HTML ready to for display on a browser
*/ | Called to deal with old Chef-style assignment feedback annotation, {{like this}} | escapeAssignmentFeedback | {
"repo_name": "tl-its-umich-edu/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 671846
} | [
"org.sakaiproject.util.FormattedText"
] | import org.sakaiproject.util.FormattedText; | import org.sakaiproject.util.*; | [
"org.sakaiproject.util"
] | org.sakaiproject.util; | 909,129 |
public UploadCollection getSelectedCollection() {
JList collectionList = mainFrame.getCollectionList();
String current = (String) collectionList.getSelectedValue();
if (collection.contains(current)) {
return collection.getCollection(current);
}
return null;
} | UploadCollection function() { JList collectionList = mainFrame.getCollectionList(); String current = (String) collectionList.getSelectedValue(); if (collection.contains(current)) { return collection.getCollection(current); } return null; } | /**
* Returns the currently selected UploadCollection
*
* @return selected collection
*/ | Returns the currently selected UploadCollection | getSelectedCollection | {
"repo_name": "thetmk/UploadManager",
"path": "src/main/java/com/tmk/uploadmanager/control/MainController.java",
"license": "mit",
"size": 16441
} | [
"com.tmk.uploadmanager.model.UploadCollection",
"javax.swing.JList"
] | import com.tmk.uploadmanager.model.UploadCollection; import javax.swing.JList; | import com.tmk.uploadmanager.model.*; import javax.swing.*; | [
"com.tmk.uploadmanager",
"javax.swing"
] | com.tmk.uploadmanager; javax.swing; | 460,708 |
public String getAuthorFont(int what) {
Element el = settingsFile.getRootElement().getChild(SETTING_AUTHORFONT);
String retval = "";
if (el != null) {
switch (what) {
case FONTNAME:
retval = el.getText();
break;
... | String function(int what) { Element el = settingsFile.getRootElement().getChild(SETTING_AUTHORFONT); String retval = STRsizeSTRcolorSTRstyleSTRweight"); break; } } return retval; } | /**
* Retrieves settings for the mainfont (the font used for the main-entry-textfield).
*
* @param what (indicates, which font-characteristic we want to have. use following
* constants:<br>
* - FONTNAME<br>
* - FONTSIZE<br>
* - FONTCOLOR<br>
* - FONTSTYLE<br>
* - FONTWEIGHT<... | Retrieves settings for the mainfont (the font used for the main-entry-textfield) | getAuthorFont | {
"repo_name": "sjPlot/Zettelkasten",
"path": "src/main/java/de/danielluedecke/zettelkasten/database/Settings.java",
"license": "gpl-3.0",
"size": 218287
} | [
"org.jdom2.Element"
] | import org.jdom2.Element; | import org.jdom2.*; | [
"org.jdom2"
] | org.jdom2; | 1,759,805 |
public VpnSiteInner withProvisioningState(ProvisioningState provisioningState) {
this.provisioningState = provisioningState;
return this;
} | VpnSiteInner function(ProvisioningState provisioningState) { this.provisioningState = provisioningState; return this; } | /**
* Set the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'.
*
* @param provisioningState the provisioningState value to set
* @return the VpnSiteInner object itself.
*/ | Set the provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' | withProvisioningState | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/VpnSiteInner.java",
"license": "mit",
"size": 8006
} | [
"com.microsoft.azure.management.network.v2019_06_01.ProvisioningState"
] | import com.microsoft.azure.management.network.v2019_06_01.ProvisioningState; | import com.microsoft.azure.management.network.v2019_06_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,239,335 |
CompletableFuture<WorkQueueStats> stats(); | CompletableFuture<WorkQueueStats> stats(); | /**
* Returns work queue statistics.
* @return future that is completed with work queue stats when the operation completes
*/ | Returns work queue statistics | stats | {
"repo_name": "VinodKumarS-Huawei/ietf96yang",
"path": "core/api/src/main/java/org/onosproject/store/service/WorkQueue.java",
"license": "apache-2.0",
"size": 5407
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,348,337 |
protected final void addViewInternal(View child, int index, ViewGroup.LayoutParams params) {
super.addView(child, index, params);
} | final void function(View child, int index, ViewGroup.LayoutParams params) { super.addView(child, index, params); } | /**
* Used internally for adding view. Need because we override addView to
* pass-through to the Refreshable View
*/ | Used internally for adding view. Need because we override addView to pass-through to the Refreshable View | addViewInternal | {
"repo_name": "WeiDianzhao1989/AndroidAppLib",
"path": "pulltorefresh/src/main/java/com/weidian/pulltorefresh/PullToRefreshBase.java",
"license": "apache-2.0",
"size": 48112
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 648,422 |
String name = driver.findElement(By.xpath(uiElementMapper.getElement("iot.user.registered.name"))).getText();
return name.contains(uiElementMapper.getElement("iot.user.login.username"));
} | String name = driver.findElement(By.xpath(uiElementMapper.getElement(STR))).getText(); return name.contains(uiElementMapper.getElement(STR)); } | /**
* Method to check the current User name
* @return : True if the user name matches the logged in user. False otherwise.
*/ | Method to check the current User name | checkUserName | {
"repo_name": "madhawap/product-iots",
"path": "modules/integration/tests-common/web-ui-pages/src/main/java/org/wso2/iot/integration/ui/pages/home/IOTHomePage.java",
"license": "apache-2.0",
"size": 3713
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 409,285 |
public static boolean any(Object self, Closure closure) {
for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext();) {
if (DefaultTypeTransformation.castToBoolean(closure.call(iter.next()))) {
return true;
}
}
return false;
}
/**
... | static boolean function(Object self, Closure closure) { for (Iterator iter = InvokerHelper.asIterator(self); iter.hasNext();) { if (DefaultTypeTransformation.castToBoolean(closure.call(iter.next()))) { return true; } } return false; } /** * Iterates over the entries of a map, and checks whether a predicate is * valid f... | /**
* Iterates over the contents of an object or collection, and checks whether a
* predicate is valid for at least one element.
*
* @param self the object over which we iterate
* @param closure the closure predicate used for matching
* @return true if any iteration for the object mat... | Iterates over the contents of an object or collection, and checks whether a predicate is valid for at least one element | any | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"groovy.lang.Closure",
"java.util.Iterator",
"java.util.Map",
"org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation"
] | import groovy.lang.Closure; import java.util.Iterator; import java.util.Map; import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation; | import groovy.lang.*; import java.util.*; import org.codehaus.groovy.runtime.typehandling.*; | [
"groovy.lang",
"java.util",
"org.codehaus.groovy"
] | groovy.lang; java.util; org.codehaus.groovy; | 2,415,685 |
public boolean waitForDialogToClose(long timeout) {
if(config.commandLogging){
Log.d(config.commandLoggingTag, "waitForDialogToClose("+timeout+")");
}
return dialogUtils.waitForDialogToClose(timeout);
} | boolean function(long timeout) { if(config.commandLogging){ Log.d(config.commandLoggingTag, STR+timeout+")"); } return dialogUtils.waitForDialogToClose(timeout); } | /**
* Waits for a Dialog to close.
*
* @param timeout the amount of time in milliseconds to wait
* @return {@code true} if the {@link android.app.Dialog} is closed before the timeout and {@code false} if it is not closed
*/ | Waits for a Dialog to close | waitForDialogToClose | {
"repo_name": "darker50/robotium",
"path": "robotium-solo/src/main/java/com/robotium/solo/Solo.java",
"license": "apache-2.0",
"size": 124742
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,972,443 |
public Preference findPreference(CharSequence key) {
if (mPreferenceManager == null) {
return null;
}
return mPreferenceManager.findPreference(key);
} | Preference function(CharSequence key) { if (mPreferenceManager == null) { return null; } return mPreferenceManager.findPreference(key); } | /**
* Finds a {@link Preference} based on its key.
*
* @param key The key of the preference to retrieve.
* @return The {@link Preference} with the key, or null.
* @see PreferenceGroup#findPreference(CharSequence)
*/ | Finds a <code>Preference</code> based on its key | findPreference | {
"repo_name": "kabili207/Droid-Achievement",
"path": "Achievement/src/main/java/com/zyrenth/achievement/PreferenceListFragment.java",
"license": "gpl-3.0",
"size": 8540
} | [
"android.preference.Preference"
] | import android.preference.Preference; | import android.preference.*; | [
"android.preference"
] | android.preference; | 2,602,638 |
public void add(Socket socket, int timeout, boolean resume, boolean wakeup) {
if (timeout < 0) {
timeout = keepAliveTimeout;
}
if (timeout < 0) {
timeout = soTimeout;
}
if (timeout <= 0) {
// Always put a... | void function(Socket socket, int timeout, boolean resume, boolean wakeup) { if (timeout < 0) { timeout = keepAliveTimeout; } if (timeout < 0) { timeout = soTimeout; } if (timeout <= 0) { timeout = Integer.MAX_VALUE; } boolean ok = false; synchronized (this) { if (addList.add(socket, timeout, (resume ? SocketInfo.RESUME... | /**
* Add specified socket and associated pool to the poller. The socket will
* be added to a temporary array, and polled first after a maximum amount
* of time equal to pollTime (in most cases, latency will be much lower,
* however).
*
* @param socket to add to the... | Add specified socket and associated pool to the poller. The socket will be added to a temporary array, and polled first after a maximum amount of time equal to pollTime (in most cases, latency will be much lower, however) | add | {
"repo_name": "whitingjr/JbossWeb_7_2_0",
"path": "src/main/java/org/apache/tomcat/util/net/JIoEndpoint.java",
"license": "apache-2.0",
"size": 39734
} | [
"java.io.IOException",
"java.net.Socket"
] | import java.io.IOException; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,352,788 |
public BufferedImage getFilteredImage(BufferedImage sourceImage) {
if(!isEnabled()) {
return sourceImage;
}
if(sourceImage!=source) {
initialize(sourceImage);
}
if(sourceImage!=input) {
gIn.drawImage(source, 0, 0, null);
}
subtractBaseline();
return output;
} | BufferedImage function(BufferedImage sourceImage) { if(!isEnabled()) { return sourceImage; } if(sourceImage!=source) { initialize(sourceImage); } if(sourceImage!=input) { gIn.drawImage(source, 0, 0, null); } subtractBaseline(); return output; } | /**
* Applies the filter to a source image and returns the result.
*
* @param sourceImage the source image
* @return the filtered image
*/ | Applies the filter to a source image and returns the result | getFilteredImage | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/media/core/BaselineFilter.java",
"license": "gpl-3.0",
"size": 12573
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,254,696 |
FetchInternationalGroupResponse fetchInternationalGroups(AuthenticationToken token, FetchInternationalGroupRequest request); | FetchInternationalGroupResponse fetchInternationalGroups(AuthenticationToken token, FetchInternationalGroupRequest request); | /**
* <p>Working with International Groups involve working with more details
* than normally allowed. Additionally, it must also be possible to work
* with both Active and Suspended International Groups. This request will
* facilitate precisely this, reading the additional details needed for all
... | Working with International Groups involve working with more details than normally allowed. Additionally, it must also be possible to work with both Active and Suspended International Groups. This request will facilitate precisely this, reading the additional details needed for all existing International Groups | fetchInternationalGroups | {
"repo_name": "IWSDevelopers/iws",
"path": "iws-api/src/main/java/net/iaeste/iws/api/Committees.java",
"license": "apache-2.0",
"size": 11669
} | [
"net.iaeste.iws.api.dtos.AuthenticationToken",
"net.iaeste.iws.api.requests.FetchInternationalGroupRequest",
"net.iaeste.iws.api.responses.FetchInternationalGroupResponse"
] | import net.iaeste.iws.api.dtos.AuthenticationToken; import net.iaeste.iws.api.requests.FetchInternationalGroupRequest; import net.iaeste.iws.api.responses.FetchInternationalGroupResponse; | import net.iaeste.iws.api.dtos.*; import net.iaeste.iws.api.requests.*; import net.iaeste.iws.api.responses.*; | [
"net.iaeste.iws"
] | net.iaeste.iws; | 1,281,033 |
public Color getTeamColor() {
return teamColor;
} | Color function() { return teamColor; } | /**
* Get the color of this team
* @return
*/ | Get the color of this team | getTeamColor | {
"repo_name": "thepropterhoc/Artificial_Intelligence_Project1",
"path": "src/spacesettlers/objects/Ship.java",
"license": "bsd-3-clause",
"size": 6110
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,302,932 |
public Future<String> putBlob(BlobProperties blobProperties, byte[] usermetadata, ReadableStreamChannel channel); | Future<String> function(BlobProperties blobProperties, byte[] usermetadata, ReadableStreamChannel channel); | /**
* Requests for a new blob to be put asynchronously and returns a future that will eventually contain the BlobId of
* the new blob on a successful response.
* @param blobProperties The properties of the blob. Note that the size specified in the properties is ignored. The
* channel i... | Requests for a new blob to be put asynchronously and returns a future that will eventually contain the BlobId of the new blob on a successful response | putBlob | {
"repo_name": "nsivabalan/ambry",
"path": "ambry-api/src/main/java/com.github.ambry/router/Router.java",
"license": "apache-2.0",
"size": 5290
} | [
"com.github.ambry.messageformat.BlobProperties",
"java.util.concurrent.Future"
] | import com.github.ambry.messageformat.BlobProperties; import java.util.concurrent.Future; | import com.github.ambry.messageformat.*; import java.util.concurrent.*; | [
"com.github.ambry",
"java.util"
] | com.github.ambry; java.util; | 2,675,918 |
public static Marketplace createMarketplaceWithRestrictedAccessAndAccessibleOrganizations(
Organization owner, String marketplaceId, DataService ds,
List<Organization> accessibleOrganizations)
throws NonUniqueBusinessKeyException {
Assert.assertNotNull("Marketplace owner... | static Marketplace function( Organization owner, String marketplaceId, DataService ds, List<Organization> accessibleOrganizations) throws NonUniqueBusinessKeyException { Assert.assertNotNull(STR, owner); Assert.assertNotNull(STR, marketplaceId); Assert.assertTrue(marketplaceId.trim().length() > 0); Marketplace mp = new... | /**
* Creates a restricted marketplace with accessible organization.
*
* @param owner
* the owner of the marketplace
* @param marketplaceId
* optional id (default is '<i><oId>_GLOBAL</i>')
* @param ds
* a data service
* @return the cre... | Creates a restricted marketplace with accessible organization | createMarketplaceWithRestrictedAccessAndAccessibleOrganizations | {
"repo_name": "opetrovski/development",
"path": "oscm-unittests-base/javasrc/org/oscm/test/data/Marketplaces.java",
"license": "apache-2.0",
"size": 15535
} | [
"java.util.List",
"org.junit.Assert",
"org.oscm.dataservice.local.DataService",
"org.oscm.domobjects.Marketplace",
"org.oscm.domobjects.MarketplaceAccess",
"org.oscm.domobjects.Organization",
"org.oscm.internal.types.exception.NonUniqueBusinessKeyException"
] | import java.util.List; import org.junit.Assert; import org.oscm.dataservice.local.DataService; import org.oscm.domobjects.Marketplace; import org.oscm.domobjects.MarketplaceAccess; import org.oscm.domobjects.Organization; import org.oscm.internal.types.exception.NonUniqueBusinessKeyException; | import java.util.*; import org.junit.*; import org.oscm.dataservice.local.*; import org.oscm.domobjects.*; import org.oscm.internal.types.exception.*; | [
"java.util",
"org.junit",
"org.oscm.dataservice",
"org.oscm.domobjects",
"org.oscm.internal"
] | java.util; org.junit; org.oscm.dataservice; org.oscm.domobjects; org.oscm.internal; | 528,089 |
private MeasurementListener getMeasurementListener() throws RemoteException
{
class MeasurementSaveListener extends UnicastRemoteObject implements MeasurementListener
{
private static final long serialVersionUID = 6658831597399735839L;
MeasurementSaveListener() throws RemoteException
{
super()... | MeasurementListener function() throws RemoteException { class MeasurementSaveListener extends UnicastRemoteObject implements MeasurementListener { private static final long serialVersionUID = 6658831597399735839L; MeasurementSaveListener() throws RemoteException { super(); } | /**
* Returns the listener which gets added to the observed measurement for the saver to know when
* it starts and stops.
* @return Listener to be added to the observed measurement.
* @throws RemoteException
*/ | Returns the listener which gets added to the observed measurement for the saver to know when it starts and stops | getMeasurementListener | {
"repo_name": "langmo/youscope",
"path": "core/server/src/main/java/org/youscope/server/MeasurementSaverImpl.java",
"license": "gpl-2.0",
"size": 21102
} | [
"java.rmi.RemoteException",
"java.rmi.server.UnicastRemoteObject",
"org.youscope.common.measurement.MeasurementListener"
] | import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import org.youscope.common.measurement.MeasurementListener; | import java.rmi.*; import java.rmi.server.*; import org.youscope.common.measurement.*; | [
"java.rmi",
"org.youscope.common"
] | java.rmi; org.youscope.common; | 1,748,277 |
public static ImmutableList<String> getAllResponseTypes(final ImmutableList<Ds3ResponseCode> responseCodes) {
final ImmutableList.Builder<String> builder = ImmutableList.builder();
if (isEmpty(responseCodes)) {
//No response codes is logged as an error instead of throwing an error
... | static ImmutableList<String> function(final ImmutableList<Ds3ResponseCode> responseCodes) { final ImmutableList.Builder<String> builder = ImmutableList.builder(); if (isEmpty(responseCodes)) { LOG.error(STR); return ImmutableList.of(); } for (final Ds3ResponseCode responseCode : responseCodes) { if (isNonErrorCode(resp... | /**
* Gets the list of Response Types from a list of Ds3ResponseCodes
*/ | Gets the list of Response Types from a list of Ds3ResponseCodes | getAllResponseTypes | {
"repo_name": "rpmoore/ds3_autogen",
"path": "ds3-autogen-utils/src/main/java/com/spectralogic/ds3autogen/utils/ResponsePayloadUtil.java",
"license": "apache-2.0",
"size": 4898
} | [
"com.google.common.collect.ImmutableList",
"com.spectralogic.ds3autogen.api.models.Ds3ResponseCode"
] | import com.google.common.collect.ImmutableList; import com.spectralogic.ds3autogen.api.models.Ds3ResponseCode; | import com.google.common.collect.*; import com.spectralogic.ds3autogen.api.models.*; | [
"com.google.common",
"com.spectralogic.ds3autogen"
] | com.google.common; com.spectralogic.ds3autogen; | 666,673 |
public ChromosomeFactory<T> getTestChromosomeFactory() {
return testChromosomeFactory;
}
@SuppressWarnings("unchecked")
protected AbstractTestSuiteChromosome(AbstractTestSuiteChromosome<T> source) {
this(source.testChromosomeFactory);
for (T test : source.tests) {
addTest((T) test.clone());
}
//... | ChromosomeFactory<T> function() { return testChromosomeFactory; } @SuppressWarnings(STR) protected AbstractTestSuiteChromosome(AbstractTestSuiteChromosome<T> source) { this(source.testChromosomeFactory); for (T test : source.tests) { addTest((T) test.clone()); } this.setFitnessValues(source.getFitnessValues()); this.se... | /**
* <p>Getter for the field <code>testChromosomeFactory</code>.</p>
*
* @return a {@link org.evosuite.ga.ChromosomeFactory} object.
*/ | Getter for the field <code>testChromosomeFactory</code> | getTestChromosomeFactory | {
"repo_name": "sefaakca/EvoSuite-Sefa",
"path": "client/src/main/java/org/evosuite/testsuite/AbstractTestSuiteChromosome.java",
"license": "lgpl-3.0",
"size": 7380
} | [
"org.evosuite.ga.ChromosomeFactory"
] | import org.evosuite.ga.ChromosomeFactory; | import org.evosuite.ga.*; | [
"org.evosuite.ga"
] | org.evosuite.ga; | 1,436,656 |
public long writeValue(OutputStream out) throws IOException {
DataInputStream dis = getValueStream();
long size = 0;
try {
int chunkSize;
while ((chunkSize = valueBufferInputStream.getRemain()) > 0) {
chunkSize = Math.min(chunkSize, MAX_VAL_TRA... | long function(OutputStream out) throws IOException { DataInputStream dis = getValueStream(); long size = 0; try { int chunkSize; while ((chunkSize = valueBufferInputStream.getRemain()) > 0) { chunkSize = Math.min(chunkSize, MAX_VAL_TRANSFER_BUF_SIZE); valTransferBuffer.setSize(chunkSize); dis.readFully(valTransferBuffe... | /**
* Writing the value to the output stream. This method avoids copying
* value data from Scanner into user buffer, then writing to the output
* stream. It does not require the value length to be known.
*
* @param out
* The output stream
* @return... | Writing the value to the output stream. This method avoids copying value data from Scanner into user buffer, then writing to the output stream. It does not require the value length to be known | writeValue | {
"repo_name": "hanhlh/hadoop-0.20.2_FatBTree",
"path": "src/core/org/apache/hadoop/io/file/tfile/TFile.java",
"license": "apache-2.0",
"size": 78806
} | [
"java.io.DataInputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.DataInputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 689,943 |
public static List<String> findClassesThatExtend(String[] searchPathsOrJars,
final Class<?>[] classNames, final boolean innerClasses,
String contains, String notContains, boolean annotations)
throws IOException {
if (log.isDebugEnabled()) {
log.de... | static List<String> function(String[] searchPathsOrJars, final Class<?>[] classNames, final boolean innerClasses, String contains, String notContains, boolean annotations) throws IOException { if (log.isDebugEnabled()) { log.debug(STR + Arrays.toString(searchPathsOrJars)); log.debug(STR + Arrays.toString(classNames)); ... | /**
* Find classes in the provided path(s)/jar(s) that extend the class(es).
* @param searchPathsOrJars - pathnames or jarfiles to search for classes
* @param classNames - required parent class(es) or annotations
* @param innerClasses - should we include inner classes?
* @param contains - class... | Find classes in the provided path(s)/jar(s) that extend the class(es) | findClassesThatExtend | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/jorphan/org/apache/jorphan/reflect/ClassFinder.java",
"license": "apache-2.0",
"size": 19725
} | [
"java.io.IOException",
"java.lang.annotation.Annotation",
"java.util.Arrays",
"java.util.List"
] | import java.io.IOException; import java.lang.annotation.Annotation; import java.util.Arrays; import java.util.List; | import java.io.*; import java.lang.annotation.*; import java.util.*; | [
"java.io",
"java.lang",
"java.util"
] | java.io; java.lang; java.util; | 433,140 |
public RunInner withLastUpdatedTime(OffsetDateTime lastUpdatedTime) {
if (this.innerProperties() == null) {
this.innerProperties = new RunProperties();
}
this.innerProperties().withLastUpdatedTime(lastUpdatedTime);
return this;
} | RunInner function(OffsetDateTime lastUpdatedTime) { if (this.innerProperties() == null) { this.innerProperties = new RunProperties(); } this.innerProperties().withLastUpdatedTime(lastUpdatedTime); return this; } | /**
* Set the lastUpdatedTime property: The last updated time for the run.
*
* @param lastUpdatedTime the lastUpdatedTime value to set.
* @return the RunInner object itself.
*/ | Set the lastUpdatedTime property: The last updated time for the run | withLastUpdatedTime | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java",
"license": "mit",
"size": 18694
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,608,522 |
public static String fillTemplateWithStringsByRegexp(
String template, String lineToPlaceInTemplate, Pattern regexp) {
final Matcher matcher = regexp.matcher(lineToPlaceInTemplate);
String result = template;
if (matcher.find()) {
for (int i = 0; i <= matcher.groupCount();... | static String function( String template, String lineToPlaceInTemplate, Pattern regexp) { final Matcher matcher = regexp.matcher(lineToPlaceInTemplate); String result = template; if (matcher.find()) { for (int i = 0; i <= matcher.groupCount(); i++) { result = result.replaceAll("\\$" + i, matcher.group(i)); } } return re... | /**
* Puts part of line, which matches regexp into given template
* on positions $n where 'n' is number of matched part in line.
* @param template the string to expand.
* @param lineToPlaceInTemplate contains expression which should be placed into string.
* @param regexp expression to find in c... | Puts part of line, which matches regexp into given template on positions $n where 'n' is number of matched part in line | fillTemplateWithStringsByRegexp | {
"repo_name": "liscju/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/utils/CommonUtils.java",
"license": "lgpl-2.1",
"size": 18954
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 545,585 |
public static void checkGarbageCollectionQueue(ChunkedSegmentStorage chunkedSegmentStorage, Set<String> beforeSet, Set<String> afterSet) {
// Get the enqueued tasks.
// Need to de-dup
val tasks = new HashMap<String, GarbageCollector.TaskInfo>();
val tasksList = ((InMemoryTaskQueueMan... | static void function(ChunkedSegmentStorage chunkedSegmentStorage, Set<String> beforeSet, Set<String> afterSet) { val tasks = new HashMap<String, GarbageCollector.TaskInfo>(); val tasksList = ((InMemoryTaskQueueManager) chunkedSegmentStorage.getGarbageCollector().getTaskQueue()) .drain(chunkedSegmentStorage.getGarbageCo... | /**
* Checks garbage collection queue to ensure new chunks and truncated chunks are added to GC queue.
*
* @param chunkedSegmentStorage Instance of {@link ChunkedSegmentStorage}.
* @param beforeSet set of chunks before.
* @param afterSet set of chunks after.
*/ | Checks garbage collection queue to ensure new chunks and truncated chunks are added to GC queue | checkGarbageCollectionQueue | {
"repo_name": "pravega/pravega",
"path": "segmentstore/storage/src/test/java/io/pravega/segmentstore/storage/chunklayer/TestUtils.java",
"license": "apache-2.0",
"size": 24122
} | [
"io.pravega.segmentstore.storage.mocks.InMemoryTaskQueueManager",
"java.util.HashMap",
"java.util.Set",
"java.util.stream.Collectors",
"org.junit.Assert"
] | import io.pravega.segmentstore.storage.mocks.InMemoryTaskQueueManager; import java.util.HashMap; import java.util.Set; import java.util.stream.Collectors; import org.junit.Assert; | import io.pravega.segmentstore.storage.mocks.*; import java.util.*; import java.util.stream.*; import org.junit.*; | [
"io.pravega.segmentstore",
"java.util",
"org.junit"
] | io.pravega.segmentstore; java.util; org.junit; | 2,183,169 |
public Key getKey() {
return key;
} | Key function() { return key; } | /**
* Returns the key associated with the button.
*
* @return the key associated with the button
*
* @see #setKey(ch.jeda.event.Key)
* @since 1.3
*/ | Returns the key associated with the button | getKey | {
"repo_name": "r0the/jeda",
"path": "core/src/ch/jeda/ui/TextButton.java",
"license": "lgpl-3.0",
"size": 7378
} | [
"ch.jeda.event.Key"
] | import ch.jeda.event.Key; | import ch.jeda.event.*; | [
"ch.jeda.event"
] | ch.jeda.event; | 2,625,072 |
try {
ConfigFactory theConfigFactory = (ConfigFactory)EPackage.Registry.INSTANCE.getEFactory(ConfigPackage.eNS_URI);
if (theConfigFactory != null) {
return theConfigFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ConfigFactoryImpl();
}
public C... | try { ConfigFactory theConfigFactory = (ConfigFactory)EPackage.Registry.INSTANCE.getEFactory(ConfigPackage.eNS_URI); if (theConfigFactory != null) { return theConfigFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ConfigFactoryImpl(); } public ConfigFactoryImpl() { super(); } | /**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Creates the default factory implementation. | init | {
"repo_name": "upohl/eloquent",
"path": "plugins/org.muml.psm.allocation.algorithm.ilp.opt4j.config/src/org/muml/psm/allocation/algorithm/ilp/opt4j/config/impl/ConfigFactoryImpl.java",
"license": "epl-1.0",
"size": 2344
} | [
"org.eclipse.emf.ecore.EPackage",
"org.eclipse.emf.ecore.plugin.EcorePlugin",
"org.muml.psm.allocation.algorithm.ilp.opt4j.config.ConfigFactory",
"org.muml.psm.allocation.algorithm.ilp.opt4j.config.ConfigPackage"
] | import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.muml.psm.allocation.algorithm.ilp.opt4j.config.ConfigFactory; import org.muml.psm.allocation.algorithm.ilp.opt4j.config.ConfigPackage; | import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.plugin.*; import org.muml.psm.allocation.algorithm.ilp.opt4j.config.*; | [
"org.eclipse.emf",
"org.muml.psm"
] | org.eclipse.emf; org.muml.psm; | 2,098,787 |
super.add(new Left<L, R>(lefty));
return true;
} | super.add(new Left<L, R>(lefty)); return true; } | /**
* Add a left to this list.
* @param lefty The left thing.
* @return whether a thing was added.
*/ | Add a left to this list | addLeft | {
"repo_name": "julie-sullivan/phytomine",
"path": "intermine/web/main/src/org/intermine/webservice/server/core/DisjointList.java",
"license": "lgpl-2.1",
"size": 1244
} | [
"org.intermine.webservice.server.core.Either"
] | import org.intermine.webservice.server.core.Either; | import org.intermine.webservice.server.core.*; | [
"org.intermine.webservice"
] | org.intermine.webservice; | 275,620 |
private void handleLocalAssociatedParams() {
for (ArrayList<RegisterSpec> ssaRegs : localVariables.values()) {
int sz = ssaRegs.size();
int paramIndex = -1;
int paramCategory = 0;
// First, find out if this local variable is a parameter.
for (int ... | void function() { for (ArrayList<RegisterSpec> ssaRegs : localVariables.values()) { int sz = ssaRegs.size(); int paramIndex = -1; int paramCategory = 0; for (int i = 0; i < sz; i++) { RegisterSpec ssaSpec = ssaRegs.get(i); int ssaReg = ssaSpec.getReg(); paramIndex = getParameterIndexForReg(ssaReg); if (paramIndex >= 0)... | /**
* Maps all local-associated parameters to rop registers.
*/ | Maps all local-associated parameters to rop registers | handleLocalAssociatedParams | {
"repo_name": "nikita36078/J2ME-Loader",
"path": "dexlib/src/main/java/com/android/dx/ssa/back/FirstFitLocalCombiningAllocator.java",
"license": "apache-2.0",
"size": 43272
} | [
"com.android.dx.rop.code.RegisterSpec",
"java.util.ArrayList"
] | import com.android.dx.rop.code.RegisterSpec; import java.util.ArrayList; | import com.android.dx.rop.code.*; import java.util.*; | [
"com.android.dx",
"java.util"
] | com.android.dx; java.util; | 1,942,380 |
@Override
public List<T> readList(Collection<String> ids)
{
// return mapper.select(getDataStore().find(inheritanceRoot).where(Clause.in("_id", ids.toArray())));
// return getDataStore().find(inheritanceRoot).field("_id")
// .in(new AdaptedIdIterable(ids)).asList();
return null;
} | List<T> function(Collection<String> ids) { return null; } | /**
* Read each of the instances corresponding to the given Collection of IDs,
* returning the results as a list. If an ID in the provided Collection does
* not exist, it is simply not included in the returned results.
*
* @param ids
* a Collection of IDs to read.
*/ | Read each of the instances corresponding to the given Collection of IDs, returning the results as a list. If an ID in the provided Collection does not exist, it is simply not included in the returned results | readList | {
"repo_name": "amilaI/RepoExpress",
"path": "src/java/cassandra/com/strategicgains/repoexpress/cassandra/CassandraRepository.java",
"license": "apache-2.0",
"size": 8467
} | [
"java.util.Collection",
"java.util.List"
] | import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,187,847 |
public static void normalizedListInputFunctions(CallExpr callExpr) {
FunctionSignature fs = callExpr.getFunctionSignature();
String internalFuncName = LIST_INPUT_FUNCTION_MAP.get(fs.getName().toLowerCase());
if (internalFuncName == null) {
return;
}
callExpr.setFu... | static void function(CallExpr callExpr) { FunctionSignature fs = callExpr.getFunctionSignature(); String internalFuncName = LIST_INPUT_FUNCTION_MAP.get(fs.getName().toLowerCase()); if (internalFuncName == null) { return; } callExpr.setFunctionSignature(new FunctionSignature(FunctionConstants.ASTERIX_DV, internalFuncNam... | /**
* Rewrites a variable-arg, user-surface function call into an internal, list-arg function.
*
* @param callExpr
* The input call expression.
*/ | Rewrites a variable-arg, user-surface function call into an internal, list-arg function | normalizedListInputFunctions | {
"repo_name": "apache/incubator-asterixdb",
"path": "asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/util/FunctionMapUtil.java",
"license": "apache-2.0",
"size": 9264
} | [
"java.util.ArrayList",
"java.util.Collections",
"org.apache.asterix.common.functions.FunctionConstants",
"org.apache.asterix.common.functions.FunctionSignature",
"org.apache.asterix.lang.common.expression.CallExpr",
"org.apache.asterix.lang.common.expression.ListConstructor"
] | import java.util.ArrayList; import java.util.Collections; import org.apache.asterix.common.functions.FunctionConstants; import org.apache.asterix.common.functions.FunctionSignature; import org.apache.asterix.lang.common.expression.CallExpr; import org.apache.asterix.lang.common.expression.ListConstructor; | import java.util.*; import org.apache.asterix.common.functions.*; import org.apache.asterix.lang.common.expression.*; | [
"java.util",
"org.apache.asterix"
] | java.util; org.apache.asterix; | 1,760,618 |
@Override
public final void invoke(Request request, Response response)
throws IOException, ServletException {
// Select the Host to be used for this Request
Host host = request.getHost();
if (host == null) {
response.sendError
(HttpServletResponse.SC_... | final void function(Request request, Response response) throws IOException, ServletException { Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString(STR, request.getServerName())); return; } if (request.isAsyncSupported()) { request.setAsyncSupported(hos... | /**
* Select the appropriate child Host to process this request,
* based on the requested server name. If no matching Host can
* be found, return an appropriate HTTP error.
*
* @param request Request to be processed
* @param response Response to be produced
*
* @exception IOExce... | Select the appropriate child Host to process this request, based on the requested server name. If no matching Host can be found, return an appropriate HTTP error | invoke | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/core/StandardEngineValve.java",
"license": "apache-2.0",
"size": 3127
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletResponse",
"org.apache.catalina.Host",
"org.apache.catalina.connector.Request",
"org.apache.catalina.connector.Response"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import org.apache.catalina.Host; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.catalina.*; import org.apache.catalina.connector.*; | [
"java.io",
"javax.servlet",
"org.apache.catalina"
] | java.io; javax.servlet; org.apache.catalina; | 278,039 |
public ArrayList<SpellAbility> getOriginalAbilities(Card c) {
ArrayList<SpellAbility> returnList = new ArrayList<SpellAbility>();
if (originalAbilities.containsKey(c)) {
returnList.addAll(originalAbilities.get(c));
}
return returnList;
} | ArrayList<SpellAbility> function(Card c) { ArrayList<SpellAbility> returnList = new ArrayList<SpellAbility>(); if (originalAbilities.containsKey(c)) { returnList.addAll(originalAbilities.get(c)); } return returnList; } | /**
* <p>Getter for the field <code>originalAbilities</code>.</p>
*
* @param c a {@link forge.Card} object.
* @return a {@link java.util.ArrayList} object.
*/ | Getter for the field <code>originalAbilities</code> | getOriginalAbilities | {
"repo_name": "xitongzou/cardforge",
"path": "src/forge/StaticEffect.java",
"license": "gpl-3.0",
"size": 15888
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 276,464 |
public void setProperty(Property p, String value) {
this.siteConfig.put(p.getKey(), value);
} | void function(Property p, String value) { this.siteConfig.put(p.getKey(), value); } | /**
* Sets arbitrary configuration properties.
*
* @since 1.6.0
*/ | Sets arbitrary configuration properties | setProperty | {
"repo_name": "mikewalch/accumulo",
"path": "minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloConfigImpl.java",
"license": "apache-2.0",
"size": 22561
} | [
"org.apache.accumulo.core.conf.Property"
] | import org.apache.accumulo.core.conf.Property; | import org.apache.accumulo.core.conf.*; | [
"org.apache.accumulo"
] | org.apache.accumulo; | 2,012,832 |
public void unassign(HRegionInfo region) {
unassign(region, false);
} | void function(HRegionInfo region) { unassign(region, false); } | /**
* Unassigns the specified region.
* <p>
* Updates the RegionState and sends the CLOSE RPC.
* <p>
* If a RegionPlan is already set, it will remain.
*
* @param region server to be unassigned
*/ | Unassigns the specified region. Updates the RegionState and sends the CLOSE RPC. If a RegionPlan is already set, it will remain | unassign | {
"repo_name": "simplegeo/hadoop-hbase",
"path": "src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java",
"license": "apache-2.0",
"size": 73693
} | [
"org.apache.hadoop.hbase.HRegionInfo"
] | import org.apache.hadoop.hbase.HRegionInfo; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,058,691 |
@Override
public void close() throws IOException {
closed = true;
super.close();
} | void function() throws IOException { closed = true; super.close(); } | /**
* Closes this input stream and releases any system resources
* associated with the stream.
* This
* method simply performs {@code in.close()}.
*
* @throws IOException if an I/O error occurs.
* @see java.io.FilterInputStream#in
*/ | Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close() | close | {
"repo_name": "apache/tomcat",
"path": "java/org/apache/tomcat/util/http/fileupload/util/LimitedInputStream.java",
"license": "apache-2.0",
"size": 5510
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,158,772 |
public void addBlockedWorkFragment(WorkFragment.Builder ftask) {
if (trace.val) LOG.trace("Adding block FragmentTaskMessage for txn #" + this.txn_id);
this.blockedTasks.add(ftask);
} | void function(WorkFragment.Builder ftask) { if (trace.val) LOG.trace(STR + this.txn_id); this.blockedTasks.add(ftask); } | /**
* Add a FragmentTaskMessage this blocked until all of the partitions return results/responses
* for this DependencyInfo
* @param ftask
*/ | Add a FragmentTaskMessage this blocked until all of the partitions return results/responses for this DependencyInfo | addBlockedWorkFragment | {
"repo_name": "apavlo/h-store",
"path": "src/frontend/edu/brown/hstore/txns/DependencyInfo.java",
"license": "gpl-3.0",
"size": 14466
} | [
"edu.brown.hstore.Hstoreservice"
] | import edu.brown.hstore.Hstoreservice; | import edu.brown.hstore.*; | [
"edu.brown.hstore"
] | edu.brown.hstore; | 2,705,304 |
public static scale_delta_omegaType fromPerAligned(byte[] encodedBytes) {
scale_delta_omegaType result = new scale_delta_omegaType();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static scale_delta_omegaType function(byte[] encodedBytes) { scale_delta_omegaType result = new scale_delta_omegaType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new scale_delta_omegaType from encoded stream.
*/ | Creates a new scale_delta_omegaType from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/GANSSEphemerisDeltaScales.java",
"license": "apache-2.0",
"size": 72248
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,084,906 |
public User createUser(String username, final String password, final String name, final String email)
throws UserAlreadyExistsException
{
if (provider.isReadOnly()) {
throw new UnsupportedOperationException("User provider is read-only.");
}
if (username == null ||... | User function(String username, final String password, final String name, final String email) throws UserAlreadyExistsException { if (provider.isReadOnly()) { throw new UnsupportedOperationException(STR); } if (username == null username.isEmpty()) { throw new IllegalArgumentException(STR); } if (password == null passwor... | /**
* Creates a new User. Required values are username and password. The email address
* and name can optionally be {@code null}, unless the UserProvider deems that
* either of them are required.
*
* @param username the new and unique username for the account.
* @param password the passwor... | Creates a new User. Required values are username and password. The email address and name can optionally be null, unless the UserProvider deems that either of them are required | createUser | {
"repo_name": "speedy01/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/openfire/user/UserManager.java",
"license": "apache-2.0",
"size": 22624
} | [
"gnu.inet.encoding.Stringprep",
"gnu.inet.encoding.StringprepException",
"java.util.Collections",
"java.util.Map",
"org.jivesoftware.openfire.event.UserEventDispatcher",
"org.jivesoftware.util.StringUtils"
] | import gnu.inet.encoding.Stringprep; import gnu.inet.encoding.StringprepException; import java.util.Collections; import java.util.Map; import org.jivesoftware.openfire.event.UserEventDispatcher; import org.jivesoftware.util.StringUtils; | import gnu.inet.encoding.*; import java.util.*; import org.jivesoftware.openfire.event.*; import org.jivesoftware.util.*; | [
"gnu.inet.encoding",
"java.util",
"org.jivesoftware.openfire",
"org.jivesoftware.util"
] | gnu.inet.encoding; java.util; org.jivesoftware.openfire; org.jivesoftware.util; | 239,061 |
public synchronized DataSet removeValues(double value) {
Iterator it = null;
Value v = null;
DataSet ds = null;
log.debug("Removing value: " + value);
it = getIterator(); // This will doMaintenance()
whil... | synchronized DataSet function(double value) { Iterator it = null; Value v = null; DataSet ds = null; log.debug(STR + value); it = getIterator(); while (it.hasNext()) { v = (Value) it.next(); if (v == null) continue; if (v.doubleValue() == value) { if (ds == null) ds = new DataSet(); it.remove(); ds.addValue(v); } } mod... | /**
* Removes all instances of <tt>Value</tt> having the the specified
* numerical value.
*
* @param value
* to be searched
* @return a <tt>DataSet</tt> instance containing all values which were
* removed, <tt>null</tt> if none we... | Removes all instances of Value having the the specified numerical value | removeValues | {
"repo_name": "Jeach/Java-Stats",
"path": "src/com/jeach/stats/DataSet.java",
"license": "gpl-3.0",
"size": 82805
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 847,580 |
public void writeTo(StreamOutput out) throws IOException {
out.writeByte(id);
} | void function(StreamOutput out) throws IOException { out.writeByte(id); } | /**
* Serialize the GapPolicy to the output stream
*/ | Serialize the GapPolicy to the output stream | writeTo | {
"repo_name": "danielmitterdorfer/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/aggregations/pipeline/BucketHelpers.java",
"license": "apache-2.0",
"size": 8490
} | [
"java.io.IOException",
"org.elasticsearch.common.io.stream.StreamOutput"
] | import java.io.IOException; import org.elasticsearch.common.io.stream.StreamOutput; | import java.io.*; import org.elasticsearch.common.io.stream.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 2,452,265 |
public static void assertIs(final SQLCaseAssertContext assertContext, final ShadowRuleSegment actual, final ExpectedShadowRule expected) {
if (null == expected) {
assertNull(assertContext.getText("Actual shadow rule should not exist."), actual);
} else {
assertNotNull(assertC... | static void function(final SQLCaseAssertContext assertContext, final ShadowRuleSegment actual, final ExpectedShadowRule expected) { if (null == expected) { assertNull(assertContext.getText(STR), actual); } else { assertNotNull(assertContext.getText(STR), actual); assertThat(assertContext.getText(String.format(STR, actu... | /**
* Assert shadow rule is correct with expected parser result.
*
* @param assertContext assert context
* @param actual actual shadow rule
* @param expected expected shadow rule test case
*/ | Assert shadow rule is correct with expected parser result | assertIs | {
"repo_name": "apache/incubator-shardingsphere",
"path": "shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/distsql/rdl/ShadowRuleAssert.java",
"license": "apache-2.0",
"size": 4535
} | [
"org.apache.shardingsphere.shadow.distsql.parser.segment.ShadowRuleSegment",
"org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext",
"org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.ExpectedShadowRule",
"org.hamcrest.CoreMatche... | import org.apache.shardingsphere.shadow.distsql.parser.segment.ShadowRuleSegment; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.SQLCaseAssertContext; import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.ExpectedShadowRule; import org.hamcrest... | import org.apache.shardingsphere.shadow.distsql.parser.segment.*; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.*; import org.apache.shardingsphere.test.sql.parser.parameterized.jaxb.cases.domain.segment.impl.distsql.rdl.*; import org.hamcrest.*; import org.junit.*; | [
"org.apache.shardingsphere",
"org.hamcrest",
"org.junit"
] | org.apache.shardingsphere; org.hamcrest; org.junit; | 2,479,215 |
@Override
public Adapter createSwitchDefaultParentContainerAdapter() {
if (switchDefaultParentContainerItemProvider == null) {
switchDefaultParentContainerItemProvider = new SwitchDefaultParentContainerItemProvider(this);
}
return switchDefaultParentContainerItemProvider;
... | Adapter function() { if (switchDefaultParentContainerItemProvider == null) { switchDefaultParentContainerItemProvider = new SwitchDefaultParentContainerItemProvider(this); } return switchDefaultParentContainerItemProvider; } protected SwitchCaseContainerItemProvider switchCaseContainerItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.SwitchDefaultParentContainer}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.SwitchDefaultParentContainer</code>. | createSwitchDefaultParentContainerAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,300,330 |
public void sessionWillPassivate(ISession session) {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, "sessionWillPassivate", "sessionObservers.size()=" + _sessi... | void function(ISession session) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, STR, STR + _sessionObservers.size()); } if (_sessionObservers == null _sessionObservers.size() < 1) { ... | /**
* Method sessionWillPassivate
* <p>
*
* @see com.ibm.wsspi.session.ISessionObserver#sessionWillPassivate(com.ibm.wsspi.session.ISession)
*/ | Method sessionWillPassivate | sessionWillPassivate | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.session/src/com/ibm/ws/session/SessionEventDispatcher.java",
"license": "epl-1.0",
"size": 14815
} | [
"com.ibm.ws.session.utils.LoggingUtil",
"com.ibm.wsspi.session.ISession",
"com.ibm.wsspi.session.ISessionObserver",
"java.util.logging.Level"
] | import com.ibm.ws.session.utils.LoggingUtil; import com.ibm.wsspi.session.ISession; import com.ibm.wsspi.session.ISessionObserver; import java.util.logging.Level; | import com.ibm.ws.session.utils.*; import com.ibm.wsspi.session.*; import java.util.logging.*; | [
"com.ibm.ws",
"com.ibm.wsspi",
"java.util"
] | com.ibm.ws; com.ibm.wsspi; java.util; | 360,743 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.