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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
int updateByPrimaryKey(DBRouteTables record); | int updateByPrimaryKey(DBRouteTables record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table route_tables
*
* @mbggenerated Tue May 26 15:53:09 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table route_tables | updateByPrimaryKey | {
"repo_name": "wolabs/womano",
"path": "main/java/com/culabs/unicomportal/dao/DBRouteTablesMapper.java",
"license": "apache-2.0",
"size": 1587
} | [
"com.culabs.unicomportal.model.db.DBRouteTables"
] | import com.culabs.unicomportal.model.db.DBRouteTables; | import com.culabs.unicomportal.model.db.*; | [
"com.culabs.unicomportal"
] | com.culabs.unicomportal; | 2,118,198 |
private void getResults(ROIShape shape)
{
Vector<Vector> rows = new Vector<Vector>();
Iterator<String> channelIterator = channelName.values().iterator();
channelMin = minStats.get(coord);
channelMax = maxStats.get(coord);
channelMean = meanStats.get(coord);
channelStdDev = stdDevStats.get(coord);
c... | void function(ROIShape shape) { Vector<Vector> rows = new Vector<Vector>(); Iterator<String> channelIterator = channelName.values().iterator(); channelMin = minStats.get(coord); channelMax = maxStats.get(coord); channelMean = meanStats.get(coord); channelStdDev = stdDevStats.get(coord); channelSum = sumStats.get(coord)... | /**
* Populates the table with the data.
*
* @param shape The analyzed shape.
*/ | Populates the table with the data | getResults | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/IntensityResultsView.java",
"license": "gpl-2.0",
"size": 22900
} | [
"java.util.Iterator",
"java.util.Vector",
"org.openmicroscopy.shoola.util.roi.model.ROIShape",
"org.openmicroscopy.shoola.util.roi.model.annotation.MeasurementAttributes"
] | import java.util.Iterator; import java.util.Vector; import org.openmicroscopy.shoola.util.roi.model.ROIShape; import org.openmicroscopy.shoola.util.roi.model.annotation.MeasurementAttributes; | import java.util.*; import org.openmicroscopy.shoola.util.roi.model.*; import org.openmicroscopy.shoola.util.roi.model.annotation.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 742,267 |
public Fragment getRegisteredFragment(int position) {
return registeredFragments.get(position);
} | Fragment function(int position) { return registeredFragments.get(position); } | /**
* Get the fragment for the current position
* @param position the fragment from the position.
*/ | Get the fragment for the current position | getRegisteredFragment | {
"repo_name": "fridaysyckness/MovieDB",
"path": "app/src/main/java/de/sourcestream/movieDB/adapter/CastDetailsSlideAdapter.java",
"license": "apache-2.0",
"size": 5548
} | [
"android.app.Fragment"
] | import android.app.Fragment; | import android.app.*; | [
"android.app"
] | android.app; | 2,375,317 |
public synchronized ScanManagerConfig readFromFile() throws IOException {
final File f = new File(file);
if (!f.exists())
throw new IOException("No such file: "+file);
if (!f.canRead())
throw new IOException("Can't read file: "+file);
try {
return ... | synchronized ScanManagerConfig function() throws IOException { final File f = new File(file); if (!f.exists()) throw new IOException(STR+file); if (!f.canRead()) throw new IOException(STR+file); try { return read(f); } catch (JAXBException x) { final IOException io = new IOException(STR + file+STR+x,x); throw io; } } | /**
* Reads the configuration from the XML configuration file.
* @throws IOException if it fails to read the configuration.
* @return A {@code ScanManagerConfig} bean read from the
* XML configuration file.
**/ | Reads the configuration from the XML configuration file | readFromFile | {
"repo_name": "jacendfeng/OpenJDK-7U-Research",
"path": "src/share/sample/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java",
"license": "gpl-2.0",
"size": 14826
} | [
"java.io.File",
"java.io.IOException",
"javax.xml.bind.JAXBException"
] | import java.io.File; import java.io.IOException; import javax.xml.bind.JAXBException; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,348,307 |
public void setName(Name name) {
this.name = name;
}
| void function(Name name) { this.name = name; } | /**
* Name of the referencing element
*
* @param name the Name.
*/ | Name of the referencing element | setName | {
"repo_name": "NABUCCO/org.nabucco.framework.common.authorization",
"path": "org.nabucco.framework.common.authorization.facade.datatype/src/main/gen/org/nabucco/framework/common/authorization/facade/datatype/search/AuthorizationSearchParameter.java",
"license": "epl-1.0",
"size": 11485
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 887,802 |
public static String getCustomStackTrace(Throwable aThrowable, boolean pHtmlOutput) {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
aThrowable.printStackTrace(new PrintStream(bout));
if (pHtmlOutput) {
return bout.toString().replaceAll(System.getProperty("line.separator"), "<br/>")... | static String function(Throwable aThrowable, boolean pHtmlOutput) { ByteArrayOutputStream bout = new ByteArrayOutputStream(); aThrowable.printStackTrace(new PrintStream(bout)); if (pHtmlOutput) { return bout.toString().replaceAll(System.getProperty(STR), "<br/>").replaceAll("\t", STR); } return bout.toString(); } | /**
* Defines a custom format for the stack trace as String.
*
* @param aThrowable The throwable to print.
* @param pHtmlOutput Indicates HTML output. In this case, line breaks will be
* replaced by <br/> and tabs by three HTML whitespaces.
*
* @return The throwable as string.
*/ | Defines a custom format for the stack trace as String | getCustomStackTrace | {
"repo_name": "kit-data-manager/base",
"path": "Commons/src/main/java/edu/kit/dama/util/StackTraceUtil.java",
"license": "apache-2.0",
"size": 2217
} | [
"java.io.ByteArrayOutputStream",
"java.io.PrintStream"
] | import java.io.ByteArrayOutputStream; import java.io.PrintStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,605,337 |
/////////////////////// Utility Methods ///////////////////////
@Override
public final boolean equals(Object obj) {
// this was auto-generated using Eclipse
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
... | final boolean function(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; DistributionConfigImpl other = (DistributionConfigImpl) obj; if (ackForceDisconnectThreshold != other.ackForceDisconnectThreshold) return false; if (ackWaitThreshold !... | /**
* Two instances of <code>DistributedConfigImpl</code> are equal if all of
* their configuration properties are the same. Be careful if you need to
* remove final and override this. See bug #50939.
*/ | Two instances of <code>DistributedConfigImpl</code> are equal if all of their configuration properties are the same. Be careful if you need to remove final and override this. See bug #50939 | equals | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java",
"license": "apache-2.0",
"size": 136972
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,621,924 |
public static Object executeCommand(String commandId, IFinding selection){
try {
ICommandService commandService =
(ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
Command cmd = commandService.getCommand(commandId);
if(selection != null) {
PlatformUI.getWorkbench()... | static Object function(String commandId, IFinding selection){ try { ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); Command cmd = commandService.getCommand(commandId); if(selection != null) { PlatformUI.getWorkbench().getService(IEclipseContext.class) .set... | /**
* Execute the UI command found by the commandId, using the {@link ICommandService}.
*
* @param commandId
* @param selection
* @return
*/ | Execute the UI command found by the commandId, using the <code>ICommandService</code> | executeCommand | {
"repo_name": "sazgin/elexis-3-core",
"path": "ch.elexis.core.findings.ui/src/ch/elexis/core/findings/ui/util/FindingsUiUtil.java",
"license": "epl-1.0",
"size": 11217
} | [
"ch.elexis.core.findings.IFinding",
"java.util.Collections",
"org.eclipse.core.commands.Command",
"org.eclipse.core.commands.ExecutionEvent",
"org.eclipse.e4.core.contexts.IEclipseContext",
"org.eclipse.jface.viewers.StructuredSelection",
"org.eclipse.ui.PlatformUI",
"org.eclipse.ui.commands.ICommandS... | import ch.elexis.core.findings.IFinding; import java.util.Collections; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.ui.PlatformUI; import org.eclips... | import ch.elexis.core.findings.*; import java.util.*; import org.eclipse.core.commands.*; import org.eclipse.e4.core.contexts.*; import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; import org.eclipse.ui.commands.*; import org.slf4j.*; | [
"ch.elexis.core",
"java.util",
"org.eclipse.core",
"org.eclipse.e4",
"org.eclipse.jface",
"org.eclipse.ui",
"org.slf4j"
] | ch.elexis.core; java.util; org.eclipse.core; org.eclipse.e4; org.eclipse.jface; org.eclipse.ui; org.slf4j; | 1,620,117 |
public String createTemplateVolume(TemplateInfo templateInfo, long storagePoolId) {
s_logger.debug("createTemplateVolume() as cache template called");
verifySufficientBytesForStoragePool(templateInfo, storagePoolId);
DateraObject.DateraConnection conn = DateraUtil.getDateraConnection(stora... | String function(TemplateInfo templateInfo, long storagePoolId) { s_logger.debug(STR); verifySufficientBytesForStoragePool(templateInfo, storagePoolId); DateraObject.DateraConnection conn = DateraUtil.getDateraConnection(storagePoolId, _storagePoolDetailsDao); String iqn = null; String appInstanceName = null; try { long... | /**
* This function gets invoked when we want to create a volume that caches the
* template on the primary storage. This 'template volume' will then be cloned
* to create new ROOT volumes.
*
* @param templateInfo Information about the template like id, size
* @param storagePoolId the prim... | This function gets invoked when we want to create a volume that caches the template on the primary storage. This 'template volume' will then be cloned to create new ROOT volumes | createTemplateVolume | {
"repo_name": "Datera/cloudstack-driver",
"path": "src/org/apache/cloudstack/storage/datastore/driver/DateraPrimaryDataStoreDriver.java",
"license": "apache-2.0",
"size": 77359
} | [
"com.cloud.storage.VMTemplateStoragePoolVO",
"com.cloud.utils.exception.CloudRuntimeException",
"java.io.UnsupportedEncodingException",
"org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo",
"org.apache.cloudstack.storage.datastore.db.StoragePoolVO",
"org.apache.cloudstack.storage.datastore.ut... | import com.cloud.storage.VMTemplateStoragePoolVO; import com.cloud.utils.exception.CloudRuntimeException; import java.io.UnsupportedEncodingException; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.sto... | import com.cloud.storage.*; import com.cloud.utils.exception.*; import java.io.*; import org.apache.cloudstack.engine.subsystem.api.storage.*; import org.apache.cloudstack.storage.datastore.db.*; import org.apache.cloudstack.storage.datastore.util.*; | [
"com.cloud.storage",
"com.cloud.utils",
"java.io",
"org.apache.cloudstack"
] | com.cloud.storage; com.cloud.utils; java.io; org.apache.cloudstack; | 2,894,208 |
public static IPath getRemoteDbPath(String appName, String dbFileName)
{
IPath remoteDbFolder = getRemoteDbFolder(appName);
IPath remoteDbPath = remoteDbFolder.append(dbFileName);
String fileExtension = remoteDbPath.getFileExtension();
if(fileExtension == null || !fileExtens... | static IPath function(String appName, String dbFileName) { IPath remoteDbFolder = getRemoteDbFolder(appName); IPath remoteDbPath = remoteDbFolder.append(dbFileName); String fileExtension = remoteDbPath.getFileExtension(); if(fileExtension == null !fileExtension.equals(DB_EXTENSION)) { remoteDbPath = remoteDbPath.addFil... | /**
* Retrieves the database file path for a given application's db file on the android file system.
* @param appName the application name
* @param dbFileName the db file name
* @return the full db file path on a android file system
*/ | Retrieves the database file path for a given application's db file on the android file system | getRemoteDbPath | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/db.devices/src/com/motorolamobility/studio/android/db/devices/utils/DeviceDbUtils.java",
"license": "gpl-2.0",
"size": 4717
} | [
"org.eclipse.core.runtime.IPath"
] | import org.eclipse.core.runtime.IPath; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,888,843 |
public LinkedList<Diff> diff_main(String text1, String text2) {
return diff_main(text1, text2, true);
} | LinkedList<Diff> function(String text1, String text2) { return diff_main(text1, text2, true); } | /**
* Find the differences between two texts.
* Run a faster, slightly less optimal diff.
* This method allows the 'checklines' of diff_main() to be optional.
* Most of the time checklines is wanted, so default to true.
* @param text1 Old string to be diffed.
* @param text2 New string to be diffed.
... | Find the differences between two texts. Run a faster, slightly less optimal diff. This method allows the 'checklines' of diff_main() to be optional. Most of the time checklines is wanted, so default to true | diff_main | {
"repo_name": "dntoll/JavaMetricsExtractor",
"path": "src/name/fraser/neil/plaintext/diff_match_patch.java",
"license": "unlicense",
"size": 89018
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,790,036 |
public Map toMap() {
Map map = new HashMap();
map.put("segNo",StringUtils.toString(segNo, eiMetadata.getMeta("segNo").getFieldLength(), eiMetadata.getMeta("segNo").getScaleLength()));
map.put("accsetNo",StringUtils.toString(accsetNo, eiMetadata.getMeta("accsetNo").getFieldLength(), eiMetadata.getMeta... | Map function() { Map map = new HashMap(); map.put("segNo",StringUtils.toString(segNo, eiMetadata.getMeta("segNo").getFieldLength(), eiMetadata.getMeta("segNo").getScaleLength())); map.put(STR,StringUtils.toString(accsetNo, eiMetadata.getMeta(STR).getFieldLength(), eiMetadata.getMeta(STR).getScaleLength())); map.put(STR... | /**
* set the value to Map
*/ | set the value to Map | toMap | {
"repo_name": "stserp/erp1",
"path": "source/src/com/baosight/sts/st/cg/domain/STCG1201.java",
"license": "apache-2.0",
"size": 18924
} | [
"com.baosight.iplat4j.util.StringUtils",
"java.util.HashMap",
"java.util.Map"
] | import com.baosight.iplat4j.util.StringUtils; import java.util.HashMap; import java.util.Map; | import com.baosight.iplat4j.util.*; import java.util.*; | [
"com.baosight.iplat4j",
"java.util"
] | com.baosight.iplat4j; java.util; | 1,518,740 |
@Test(expected = RuntimeException.class)
public void firstIfStatementTest1(){
boundObj = BoundsObject.newUpperBound(x, null, false);
}
| @Test(expected = RuntimeException.class) void function(){ boundObj = BoundsObject.newUpperBound(x, null, false); } | /**
* Tests "if (bound == null && !strict)" for
* True, True
*/ | Tests "if (bound == null && !strict)" for True, True | firstIfStatementTest1 | {
"repo_name": "byu-vv-lab/sarl",
"path": "test/edu/udel/cis/vsl/sarl/ideal/simplify/BoundsObjectSetUpperTest.java",
"license": "gpl-3.0",
"size": 3210
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,806,088 |
ImmutableList<StoreFile> close() throws IOException {
this.lock.writeLock().lock();
try {
ImmutableList<StoreFile> result = storefiles;
// Clear so metrics doesn't find them.
storefiles = ImmutableList.of();
for (StoreFile f: result) {
f.closeReader();
}
LOG.debug... | ImmutableList<StoreFile> close() throws IOException { this.lock.writeLock().lock(); try { ImmutableList<StoreFile> result = storefiles; storefiles = ImmutableList.of(); for (StoreFile f: result) { f.closeReader(); } LOG.debug(STR + this.storeNameStr); return result; } finally { this.lock.writeLock().unlock(); } } | /**
* Close all the readers
*
* We don't need to worry about subsequent requests because the HRegion holds
* a write lock that will prevent any more reads or writes.
*
* @throws IOException
*/ | Close all the readers We don't need to worry about subsequent requests because the HRegion holds a write lock that will prevent any more reads or writes | close | {
"repo_name": "ryanobjc/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/Store.java",
"license": "apache-2.0",
"size": 47651
} | [
"com.google.common.collect.ImmutableList",
"java.io.IOException"
] | import com.google.common.collect.ImmutableList; import java.io.IOException; | import com.google.common.collect.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 2,266,666 |
static FrequentDirections newInstance(final int k, final int d, final MatrixType type) {
return new FrequentDirections(k, d, null, type);
} | static FrequentDirections newInstance(final int k, final int d, final MatrixType type) { return new FrequentDirections(k, d, null, type); } | /**
* Creates a new instance of a Frequent Directions sketch using a specific MatrixType
* Package-private until (if ever) MTJ works properly.
* @param k Number of dimensions (rows) in the sketch output
* @param d Number of dimensions per input vector (columns)
* @param type MatrixType to use for backing... | Creates a new instance of a Frequent Directions sketch using a specific MatrixType Package-private until (if ever) MTJ works properly | newInstance | {
"repo_name": "DataSketches/sketches-vector",
"path": "src/main/java/org/apache/datasketches/vector/decomposition/FrequentDirections.java",
"license": "apache-2.0",
"size": 18401
} | [
"org.apache.datasketches.vector.matrix.MatrixType"
] | import org.apache.datasketches.vector.matrix.MatrixType; | import org.apache.datasketches.vector.matrix.*; | [
"org.apache.datasketches"
] | org.apache.datasketches; | 2,732,682 |
private Hashtable<String, ContactFieldDTO> initializeFields() {
// now go over the entity specific fields
Hashtable<String, ContactFieldDTO> fields = new Hashtable<String, ContactFieldDTO>();
EntityBL entity = new EntityBL(entityId);
for (ContactFieldTypeDTO field: entity.getEnti... | Hashtable<String, ContactFieldDTO> function() { Hashtable<String, ContactFieldDTO> fields = new Hashtable<String, ContactFieldDTO>(); EntityBL entity = new EntityBL(entityId); for (ContactFieldTypeDTO field: entity.getEntity().getContactFieldTypes()) { ContactFieldDTO fieldDto = new ContactFieldDTO(); fieldDto.setType(... | /**
* Create a Hashtable with the key beign the field type for the
* entity
* @return
*/ | Create a Hashtable with the key beign the field type for the entity | initializeFields | {
"repo_name": "maduhu/jBilling",
"path": "src/java/com/sapienter/jbilling/server/user/ContactBL.java",
"license": "agpl-3.0",
"size": 18155
} | [
"com.sapienter.jbilling.server.user.contact.db.ContactFieldDTO",
"com.sapienter.jbilling.server.user.contact.db.ContactFieldTypeDTO",
"java.util.Hashtable"
] | import com.sapienter.jbilling.server.user.contact.db.ContactFieldDTO; import com.sapienter.jbilling.server.user.contact.db.ContactFieldTypeDTO; import java.util.Hashtable; | import com.sapienter.jbilling.server.user.contact.db.*; import java.util.*; | [
"com.sapienter.jbilling",
"java.util"
] | com.sapienter.jbilling; java.util; | 281,014 |
private VmStatic[] initVmStaticsOrderedByPriority(List<VmStatic> vmStatics) {
VmStatic[] vmStaticArray = new VmStatic[NUM_OF_VM_STATIC_IN_FIXTURES];
vmStaticArray = initVmStaticsOrderedByMigrationSupport(vmStatics);
// Swapping the first two VmStatics
VmStatic tempVmStatic = vmStati... | VmStatic[] function(List<VmStatic> vmStatics) { VmStatic[] vmStaticArray = new VmStatic[NUM_OF_VM_STATIC_IN_FIXTURES]; vmStaticArray = initVmStaticsOrderedByMigrationSupport(vmStatics); VmStatic tempVmStatic = vmStaticArray[0]; vmStaticArray[0] = vmStaticArray[1]; vmStaticArray[1] = tempVmStatic; int arrayLength = vmSt... | /**
* Creates an array of VM static which was initiated for MigrationSupport order, and modified the priority to
* reflect the precedence of the priority column on top the MigrationSupport.
* @return an array of VmStatics, in descending order according to: auto_startup, priority, MigrationSupport. The
... | Creates an array of VM static which was initiated for MigrationSupport order, and modified the priority to reflect the precedence of the priority column on top the MigrationSupport | initVmStaticsOrderedByPriority | {
"repo_name": "jbeecham/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DbFacadeDAOTest.java",
"license": "apache-2.0",
"size": 24932
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.VmStatic"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.VmStatic; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 300,370 |
public @NotNull NextAction processResponse(Packet response) {
return doReturnWith(response);
} | @NotNull NextAction function(Packet response) { return doReturnWith(response); } | /**
* Default no-op implementation.
*/ | Default no-op implementation | processResponse | {
"repo_name": "axDev-JDK/jaxws",
"path": "src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java",
"license": "gpl-2.0",
"size": 2780
} | [
"com.sun.istack.internal.NotNull",
"com.sun.xml.internal.ws.api.message.Packet",
"com.sun.xml.internal.ws.api.pipe.NextAction"
] | import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.NextAction; | import com.sun.istack.internal.*; import com.sun.xml.internal.ws.api.message.*; import com.sun.xml.internal.ws.api.pipe.*; | [
"com.sun.istack",
"com.sun.xml"
] | com.sun.istack; com.sun.xml; | 948,062 |
public static void spawnAsEntity(World worldIn, BlockPos pos, ItemStack stack)
{
if (!worldIn.isRemote && worldIn.getGameRules().getBoolean("doTileDrops") && !worldIn.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
{
if (captureDrops.get(... | static void function(World worldIn, BlockPos pos, ItemStack stack) { if (!worldIn.isRemote && worldIn.getGameRules().getBoolean(STR) && !worldIn.restoringBlockSnapshots) { if (captureDrops.get()) { capturedDrops.get().add(stack); return; } float f = 0.5F; double d0 = (double)(worldIn.rand.nextFloat() * 0.5F) + 0.25D; d... | /**
* Spawns the given ItemStack as an EntityItem into the World at the given position
*/ | Spawns the given ItemStack as an EntityItem into the World at the given position | spawnAsEntity | {
"repo_name": "boredherobrine13/morefuelsmod-1.10",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "lgpl-2.1",
"size": 119133
} | [
"net.minecraft.entity.item.EntityItem",
"net.minecraft.item.ItemStack",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.entity.item.*; import net.minecraft.item.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 1,278,853 |
@Override
public void init(Application application)
{
Http2Settings http2Settings = Http2Settings.Holder.get(application);
http2Settings.setPushBuilder(new UndertowPushBuilder());
} | void function(Application application) { Http2Settings http2Settings = Http2Settings.Holder.get(application); http2Settings.setPushBuilder(new UndertowPushBuilder()); } | /**
* Initializes the push builder API of undertow
*/ | Initializes the push builder API of undertow | init | {
"repo_name": "dashorst/wicket",
"path": "wicket-experimental/wicket-http2/wicket-http2-undertow/src/main/java/org/apache/wicket/http2/Initializer.java",
"license": "apache-2.0",
"size": 1504
} | [
"org.apache.wicket.Application",
"org.apache.wicket.http2.markup.head.UndertowPushBuilder"
] | import org.apache.wicket.Application; import org.apache.wicket.http2.markup.head.UndertowPushBuilder; | import org.apache.wicket.*; import org.apache.wicket.http2.markup.head.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,144,541 |
public void loadXML(Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter ) throws KettleXMLException
{
Props props = null;
if (Props.isInitialized())
{
props=Props.getInstance();
}
... | void function(Node transnode, Repository rep, boolean setInternalVariables, VariableSpace parentVariableSpace, OverwritePrompter prompter ) throws KettleXMLException { Props props = null; if (Props.isInitialized()) { props=Props.getInstance(); } initializeVariablesFrom(parentVariableSpace); try { clearUndo(); clear(); ... | /**
* Parse a file containing the XML that describes the transformation.
*
* @param transnode The XML node to load from
* @param rep The repository to load the default list of database connections from (null if no repository is available)
* @param setInternalVariables true if you want to set th... | Parse a file containing the XML that describes the transformation | loadXML | {
"repo_name": "soluvas/pdi-ce",
"path": "src/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 203052
} | [
"org.pentaho.di.cluster.ClusterSchema",
"org.pentaho.di.cluster.SlaveServer",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.NotePadMeta",
"org.pentaho.di.core.Props",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.exception.Kettle... | import org.pentaho.di.cluster.ClusterSchema; import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.Const; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.Props; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.d... | import org.pentaho.di.cluster.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.gui.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.core.xml.*; import org.pentaho.di.i18n.*; im... | [
"org.pentaho.di",
"org.w3c.dom"
] | org.pentaho.di; org.w3c.dom; | 2,767,906 |
public void update(Property.Builder property, String channelName)
throws ChannelFinderException {
wrappedSubmit(new UpdateChannelProperty(property.toXml(), channelName));
}
private class UpdateChannelProperty implements Runnable {
private final String channelName;
private XmlProperty pxmlProperty;
Upd... | void function(Property.Builder property, String channelName) throws ChannelFinderException { wrappedSubmit(new UpdateChannelProperty(property.toXml(), channelName)); } private class UpdateChannelProperty implements Runnable { private final String channelName; private XmlProperty pxmlProperty; UpdateChannelProperty(XmlP... | /**
* Update Property <tt>property</tt> by adding it to the channel
* <tt>channelName</tt>, without affecting the other channels.
*
* @param property
* - the property to be updated
* @param channelName
* - the channel to which this property should be added or
* updated.... | Update Property property by adding it to the channel channelName, without affecting the other channels | update | {
"repo_name": "ControlSystemStudio/cs-studio",
"path": "thirdparty/plugins/gov.bnl.channelfinder.api/src/gov/bnl/channelfinder/api/ChannelFinderClientImpl.java",
"license": "epl-1.0",
"size": 44373
} | [
"gov.bnl.channelfinder.api.Channel",
"java.util.ArrayList",
"java.util.List"
] | import gov.bnl.channelfinder.api.Channel; import java.util.ArrayList; import java.util.List; | import gov.bnl.channelfinder.api.*; import java.util.*; | [
"gov.bnl.channelfinder",
"java.util"
] | gov.bnl.channelfinder; java.util; | 2,817,598 |
private AFTPClient actionPutFile() throws IOException, PageException {
required("remotefile", remotefile);
required("localfile", localfile);
AFTPClient client = getClient();
Resource local = ResourceUtil.toResourceExisting(pageContext, localfile);// new File(localfile);
// if(failifexists && local.exists()) t... | AFTPClient function() throws IOException, PageException { required(STR, remotefile); required(STR, localfile); AFTPClient client = getClient(); Resource local = ResourceUtil.toResourceExisting(pageContext, localfile); InputStream is = null; try { is = IOUtil.toBufferedInputStream(local.getInputStream()); client.setFile... | /**
* copy a local file to server
*
* @return FTPClient
* @throws IOException
* @throws PageException
*/ | copy a local file to server | actionPutFile | {
"repo_name": "jzuijlek/Lucee",
"path": "core/src/main/java/lucee/runtime/tag/Ftp.java",
"license": "lgpl-2.1",
"size": 26403
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,065,839 |
@Override
public RepositoryObjectType getRepositoryElementType() {
return REPOSITORY_ELEMENT_TYPE;
} | RepositoryObjectType function() { return REPOSITORY_ELEMENT_TYPE; } | /**
* Gets the repository element type.
*
* @return the repository element type
* @see org.pentaho.di.repository.RepositoryElementInterface#getRepositoryElementType()
*/ | Gets the repository element type | getRepositoryElementType | {
"repo_name": "dkincade/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 227503
} | [
"org.pentaho.di.repository.RepositoryObjectType"
] | import org.pentaho.di.repository.RepositoryObjectType; | import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 635,025 |
public Set<byte[]> getFamiliesKeys() {
return Collections.unmodifiableSet(this.families.keySet());
} | Set<byte[]> function() { return Collections.unmodifiableSet(this.families.keySet()); } | /**
* Returns all the column family names of the current table. The map of
* HTableDescriptor contains mapping of family name to HColumnDescriptors.
* This returns all the keys of the family map which represents the column
* family names of the table.
*
* @return Immutable sorted set of the keys of th... | Returns all the column family names of the current table. The map of HTableDescriptor contains mapping of family name to HColumnDescriptors. This returns all the keys of the family map which represents the column family names of the table | getFamiliesKeys | {
"repo_name": "mapr/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java",
"license": "apache-2.0",
"size": 51244
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,172,728 |
public IDataset getFlux(); | IDataset function(); | /**
* flux incident on beam plane area
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_FLUX
* <b>Dimensions:</b> 1: i;
* </p>
*
* @return the value.
*/ | flux incident on beam plane area Type: NX_FLOAT Units: NX_FLUX Dimensions: 1: i; | getFlux | {
"repo_name": "jonahkichwacoders/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXbeam.java",
"license": "epl-1.0",
"size": 5452
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,740,094 |
public ArrayList<Device> getDevicesForUserFromTo(User user) throws InterruptedException, ExecutionException, TimeoutException;
public ArrayList<Device> getDevicesForUserCurrent(User user) throws InterruptedException, ExecutionException, TimeoutException; | ArrayList<Device> getDevicesForUserFromTo(User user) throws InterruptedException, ExecutionException, TimeoutException; public ArrayList<Device> function(User user) throws InterruptedException, ExecutionException, TimeoutException; | /**
* Query to get all devices of a specific user.
* @param user
* User to which the devices should be searched.
* @return
* Returns a JSON-String of the devices of the given user.
*/ | Query to get all devices of a specific user | getDevicesForUserCurrent | {
"repo_name": "trustathsh/metalyzer",
"path": "common/src/main/java/de/hshannover/f4/trust/metalyzer/semantic/interfaces/UserService.java",
"license": "apache-2.0",
"size": 7192
} | [
"de.hshannover.f4.trust.metalyzer.semantic.entities.Device",
"de.hshannover.f4.trust.metalyzer.semantic.entities.User",
"java.util.ArrayList",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.TimeoutException"
] | import de.hshannover.f4.trust.metalyzer.semantic.entities.Device; import de.hshannover.f4.trust.metalyzer.semantic.entities.User; import java.util.ArrayList; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; | import de.hshannover.f4.trust.metalyzer.semantic.entities.*; import java.util.*; import java.util.concurrent.*; | [
"de.hshannover.f4",
"java.util"
] | de.hshannover.f4; java.util; | 986,479 |
public Properties getDsProperties() {
return dsProps;
} | Properties function() { return dsProps; } | /**
* Returns the properties object.
*
* @return dsProps - The properties of the datasources
*/ | Returns the properties object | getDsProperties | {
"repo_name": "FiwareTIConsoft/fiware-metaware",
"path": "Metaware/src/main/java/com/tilab/fiware/metaware/core/MetawareProp.java",
"license": "agpl-3.0",
"size": 3800
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,956,070 |
public static List<ConfiguredNNAddress> flattenAddressMap(
Map<String, Map<String, InetSocketAddress>> map) {
List<ConfiguredNNAddress> ret = Lists.newArrayList();
for (Map.Entry<String, Map<String, InetSocketAddress>> entry :
map.entrySet()) {
String nsId = entry.getKey();
Map<St... | static List<ConfiguredNNAddress> function( Map<String, Map<String, InetSocketAddress>> map) { List<ConfiguredNNAddress> ret = Lists.newArrayList(); for (Map.Entry<String, Map<String, InetSocketAddress>> entry : map.entrySet()) { String nsId = entry.getKey(); Map<String, InetSocketAddress> nnMap = entry.getValue(); for ... | /**
* Flatten the given map, as returned by other functions in this class,
* into a flat list of {@link ConfiguredNNAddress} instances.
*/ | Flatten the given map, as returned by other functions in this class, into a flat list of <code>ConfiguredNNAddress</code> instances | flattenAddressMap | {
"repo_name": "jth/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 58742
} | [
"com.google.common.collect.Lists",
"java.net.InetSocketAddress",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.Lists; import java.net.InetSocketAddress; import java.util.List; import java.util.Map; | import com.google.common.collect.*; import java.net.*; import java.util.*; | [
"com.google.common",
"java.net",
"java.util"
] | com.google.common; java.net; java.util; | 456,668 |
//Abrimos la conexion
ObjectContainer db = getDb_4o();
Equipo e = null;
//Obtenemos el resultado
ObjectSet result = db.queryByExample(query);
if (result.size() > 0) {
//Devolvemos el equipo
e = (Equipo) result.next();
}
//C... | ObjectContainer db = getDb_4o(); Equipo e = null; ObjectSet result = db.queryByExample(query); if (result.size() > 0) { e = (Equipo) result.next(); } db.close(); if (e != null) { e.setConector("db4o"); } return e; } | /**
* Obtener el equipo
*
* @param query Equipo Query para realizar la busqueda
* @return Equipo|null Devuelve el equipo que coincida con la query si no
* coincide devuelve un null
*/ | Obtener el equipo | getEquipo | {
"repo_name": "inakidml/Proyecto_conectores_Acceso_Datos",
"path": "Baloncesto/src/baloncesto/modelo/Conector/DB4OInteface.java",
"license": "apache-2.0",
"size": 27105
} | [
"com.db4o.ObjectContainer",
"com.db4o.ObjectSet"
] | import com.db4o.ObjectContainer; import com.db4o.ObjectSet; | import com.db4o.*; | [
"com.db4o"
] | com.db4o; | 2,338,540 |
public boolean containsEnvCondID( Long id ) {
boolean containsID = false;
if ( !isEmpty() ) {
BioSamEnvConObject envCond = null;
for ( Iterator iter = iterator(); iter.hasNext(); ) {
envCond = (BioSamEnvConObject) iter.next();
if ( id.equals( envCond.get_environmental_condition_id() ) ) {
con... | boolean function( Long id ) { boolean containsID = false; if ( !isEmpty() ) { BioSamEnvConObject envCond = null; for ( Iterator iter = iterator(); iter.hasNext(); ) { envCond = (BioSamEnvConObject) iter.next(); if ( id.equals( envCond.get_environmental_condition_id() ) ) { containsID = true; break; } } } return contain... | /**
* Determines if collection contains an association between bio sample
* and submitted environmental condition id;
*
* @return <code>true</code> if collection contains an association to
* submitted id; <code>false</code> if id not found in collection */ | Determines if collection contains an association between bio sample and submitted environmental condition id | containsEnvCondID | {
"repo_name": "tair/tairwebapp",
"path": "src/org/tair/querytools/BioSamEnvConObjectCollection.java",
"license": "gpl-3.0",
"size": 14881
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,209,348 |
public boolean contains(Material material); | boolean function(Material material); | /**
* Check if the inventory contains any ItemStacks with the given material
*
* @param material The material to check for
* @return If any ItemStacks were found
*/ | Check if the inventory contains any ItemStacks with the given material | contains | {
"repo_name": "xZise/Bukkit",
"path": "src/main/java/org/bukkit/inventory/Inventory.java",
"license": "gpl-3.0",
"size": 6636
} | [
"org.bukkit.Material"
] | import org.bukkit.Material; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 2,130,646 |
ServiceCall<Void> putBigDoubleAsync(double numberBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> putBigDoubleAsync(double numberBody, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* Put big double value 2.5976931e+101.
*
* @param numberBody the double value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/ | Put big double value 2.5976931e+101 | putBigDoubleAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodynumber/Numbers.java",
"license": "mit",
"size": 20998
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 139,041 |
Injector injector = Guice.createInjector(new DfpJaxWsModule());
String userAgent = USER_AGENT;
UserAgentCombiner userAgentCombiner = injector.getInstance(UserAgentCombiner.class);
assertEquals(userAgent, userAgentCombiner.getUserAgent("userAgent"));
} | Injector injector = Guice.createInjector(new DfpJaxWsModule()); String userAgent = USER_AGENT; UserAgentCombiner userAgentCombiner = injector.getInstance(UserAgentCombiner.class); assertEquals(userAgent, userAgentCombiner.getUserAgent(STR)); } | /**
* Tests that the user agent is generated correctly.
*/ | Tests that the user agent is generated correctly | testUserAgent | {
"repo_name": "nafae/developer",
"path": "modules/dfp_appengine/src/test/java/com/google/api/ads/dfp/jaxws/UserAgentCombinerTest.java",
"license": "apache-2.0",
"size": 1683
} | [
"com.google.api.ads.common.lib.useragent.UserAgentCombiner",
"com.google.inject.Guice",
"com.google.inject.Injector"
] | import com.google.api.ads.common.lib.useragent.UserAgentCombiner; import com.google.inject.Guice; import com.google.inject.Injector; | import com.google.api.ads.common.lib.useragent.*; import com.google.inject.*; | [
"com.google.api",
"com.google.inject"
] | com.google.api; com.google.inject; | 2,639,097 |
@Test
public void testTransformMPO() throws Exception {
// Apply the following filter:
// (family=fam AND qualifier=qual1 AND KeyOnlyFilter)
// OR (family=fam AND qualifier=qual2)
final FilterList flist = new FilterList(Operator.MUST_PASS_ONE, Lists.<Filter>newArrayList(
new FilterList(... | void function() throws Exception { final FilterList flist = new FilterList(Operator.MUST_PASS_ONE, Lists.<Filter>newArrayList( new FilterList(Operator.MUST_PASS_ALL, Lists.<Filter>newArrayList( new FamilyFilter(CompareOp.EQUAL, new BinaryComparator(Bytes.toBytes("fam"))), new QualifierFilter(CompareOp.EQUAL, new Binary... | /**
* Tests the behavior of transform() in a hierarchical filter.
*
* transform() only applies after a filterKeyValue() whose return-code includes the KeyValue.
* Lazy evaluation of AND
*/ | Tests the behavior of transform() in a hierarchical filter. transform() only applies after a filterKeyValue() whose return-code includes the KeyValue. Lazy evaluation of AND | testTransformMPO | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java",
"license": "apache-2.0",
"size": 18639
} | [
"com.google.common.collect.Lists",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.KeyValueUtil",
"org.apache.hadoop.hbase.filter.CompareFilter",
"org.apache.hadoop.hbase.filter.FilterList",
"org.apache.hadoop.hbase.util.Bytes",
"org.junit.Assert"
] | import com.google.common.collect.Lists; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.KeyValueUtil; import org.apache.hadoop.hbase.filter.CompareFilter; import org.apache.hadoop.hbase.filter.FilterList; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Assert; | import com.google.common.collect.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"com.google.common",
"org.apache.hadoop",
"org.junit"
] | com.google.common; org.apache.hadoop; org.junit; | 1,304,315 |
public static void rotateAndSend(LiveViewAdapter liveView, int pluginId, Bitmap bitmap, int degrees) {
Bitmap newBitmap = null;
try
{
Matrix matrix = new Matrix();
matrix.postRotate(degrees);
newBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),... | static void function(LiveViewAdapter liveView, int pluginId, Bitmap bitmap, int degrees) { Bitmap newBitmap = null; try { Matrix matrix = new Matrix(); matrix.postRotate(degrees); newBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); } catch(Exception e) { Log.e(PluginConst... | /**
* Rotates and stores image to device
*
* @param bitmap
* @param degrees
* @return
*/ | Rotates and stores image to device | rotateAndSend | {
"repo_name": "russenreaktor/androidFakeCallForLiveView",
"path": "src/com/sonyericsson/extras/liveview/plugins/PluginUtils.java",
"license": "mit",
"size": 7528
} | [
"android.graphics.Bitmap",
"android.graphics.Matrix",
"android.util.Log"
] | import android.graphics.Bitmap; import android.graphics.Matrix; import android.util.Log; | import android.graphics.*; import android.util.*; | [
"android.graphics",
"android.util"
] | android.graphics; android.util; | 2,723,385 |
static String newBlockPoolID() throws UnknownHostException{
String ip = "unknownIP";
try {
ip = DNS.getDefaultIP("default");
} catch (UnknownHostException e) {
LOG.warn("Could not find ip address of \"default\" inteface.");
throw e;
}
int rand = DFSUtil.getSecureRandom().nex... | static String newBlockPoolID() throws UnknownHostException{ String ip = STR; try { ip = DNS.getDefaultIP(STR); } catch (UnknownHostException e) { LOG.warn(STRdefault\STR); throw e; } int rand = DFSUtil.getSecureRandom().nextInt(Integer.MAX_VALUE); String bpid = "BP-" + rand + "-"+ ip + "-" + Time.now(); return bpid; } | /**
* Generate new blockpoolID.
*
* @return new blockpoolID
*/ | Generate new blockpoolID | newBlockPoolID | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java",
"license": "mit",
"size": 36079
} | [
"java.net.UnknownHostException",
"org.apache.hadoop.hdfs.DFSUtil",
"org.apache.hadoop.net.DNS",
"org.apache.hadoop.util.Time"
] | import java.net.UnknownHostException; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.net.DNS; import org.apache.hadoop.util.Time; | import java.net.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.net.*; import org.apache.hadoop.util.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 2,213,942 |
public static List<Path> getFamilyDirs(final FileSystem fs, final Path regionDir) throws IOException {
// assumes we are in a region dir.
FileStatus[] fds = fs.listStatus(regionDir, new FamilyDirFilter(fs));
List<Path> familyDirs = new ArrayList<Path>(fds.length);
for (FileStatus fdfs: fds) {
Pa... | static List<Path> function(final FileSystem fs, final Path regionDir) throws IOException { FileStatus[] fds = fs.listStatus(regionDir, new FamilyDirFilter(fs)); List<Path> familyDirs = new ArrayList<Path>(fds.length); for (FileStatus fdfs: fds) { Path fdPath = fdfs.getPath(); familyDirs.add(fdPath); } return familyDirs... | /**
* Given a particular region dir, return all the familydirs inside it
*
* @param fs A file system for the Path
* @param regionDir Path to a specific region directory
* @return List of paths to valid family directories in region dir.
* @throws IOException
*/ | Given a particular region dir, return all the familydirs inside it | getFamilyDirs | {
"repo_name": "kijiproject/hbase-maven-plugin",
"path": "src/main/java/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "apache-2.0",
"size": 48438
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Pattern",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.PathFilter"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.PathFilter; | import java.io.*; import java.util.*; import java.util.regex.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,557,502 |
ServiceRegistration registerService(Class<?>[] classes, final Dictionary serviceProperties) {
Assert.notEmpty(classes, "at least one class has to be specified for exporting "
+ "(if autoExport is enabled then maybe the object doesn't implement any interface)");
// create an array of classnames (used for reg... | ServiceRegistration registerService(Class<?>[] classes, final Dictionary serviceProperties) { Assert.notEmpty(classes, STR + STR); final String[] names = ClassUtils.toStringArray(classes); Arrays.sort(names); log.info(STR + ObjectUtils.nullSafeToString(names) + "]"); ServiceFactory serviceFactory = new PublishingServic... | /**
* Registration method.
*
* @param classes
* @param serviceProperties
* @return the ServiceRegistration
*/ | Registration method | registerService | {
"repo_name": "glyn/Gemini-Blueprint",
"path": "core/src/main/java/org/eclipse/gemini/blueprint/service/exporter/support/OsgiServiceFactoryBean.java",
"license": "apache-2.0",
"size": 25047
} | [
"java.util.Arrays",
"java.util.Dictionary",
"org.eclipse.gemini.blueprint.context.support.internal.scope.OsgiBundleScope",
"org.eclipse.gemini.blueprint.service.exporter.support.internal.support.PublishingServiceFactory",
"org.eclipse.gemini.blueprint.util.internal.ClassUtils",
"org.osgi.framework.Service... | import java.util.Arrays; import java.util.Dictionary; import org.eclipse.gemini.blueprint.context.support.internal.scope.OsgiBundleScope; import org.eclipse.gemini.blueprint.service.exporter.support.internal.support.PublishingServiceFactory; import org.eclipse.gemini.blueprint.util.internal.ClassUtils; import org.osgi.... | import java.util.*; import org.eclipse.gemini.blueprint.context.support.internal.scope.*; import org.eclipse.gemini.blueprint.service.exporter.support.internal.support.*; import org.eclipse.gemini.blueprint.util.internal.*; import org.osgi.framework.*; import org.springframework.util.*; | [
"java.util",
"org.eclipse.gemini",
"org.osgi.framework",
"org.springframework.util"
] | java.util; org.eclipse.gemini; org.osgi.framework; org.springframework.util; | 488,024 |
public static final boolean imageIsContiguous(RenderedImage image) {
SampleModel sm;
if(image instanceof BufferedImage) {
WritableRaster ras = ((BufferedImage)image).getRaster();
sm = ras.getSampleModel();
} else {
sm = image.getSampleModel();
}
... | static final boolean function(RenderedImage image) { SampleModel sm; if(image instanceof BufferedImage) { WritableRaster ras = ((BufferedImage)image).getRaster(); sm = ras.getSampleModel(); } else { sm = image.getSampleModel(); } if (sm instanceof ComponentSampleModel) { ComponentSampleModel csm = (ComponentSampleModel... | /**
* Returns whether the image has contiguous data across rows.
*/ | Returns whether the image has contiguous data across rows | imageIsContiguous | {
"repo_name": "sommerc/bioformats",
"path": "components/forks/jai/src/com/sun/media/imageioimpl/common/ImageUtil.java",
"license": "gpl-2.0",
"size": 58871
} | [
"java.awt.image.BufferedImage",
"java.awt.image.ComponentSampleModel",
"java.awt.image.RenderedImage",
"java.awt.image.SampleModel",
"java.awt.image.WritableRaster"
] | import java.awt.image.BufferedImage; import java.awt.image.ComponentSampleModel; import java.awt.image.RenderedImage; import java.awt.image.SampleModel; import java.awt.image.WritableRaster; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,707,305 |
public static String getAt(GString text, Range range) {
return getAt(text.toString(), range);
} | static String function(GString text, Range range) { return getAt(text.toString(), range); } | /**
* Support the range subscript operator for GString
*
* @param text a GString
* @param range a Range
* @return the String of characters corresponding to the provided range
* @since 2.3.7
*/ | Support the range subscript operator for GString | getAt | {
"repo_name": "pledbrook/incubator-groovy",
"path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java",
"license": "apache-2.0",
"size": 142054
} | [
"groovy.lang.GString",
"groovy.lang.Range"
] | import groovy.lang.GString; import groovy.lang.Range; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,893,614 |
private static void drawTouchIconToCanvas(Context context, Bitmap touchIcon, Canvas canvas) {
Rect iconBounds = new Rect(0, 0, canvas.getWidth(), canvas.getHeight());
Rect src = new Rect(0, 0, touchIcon.getWidth(), touchIcon.getHeight());
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
... | static void function(Context context, Bitmap touchIcon, Canvas canvas) { Rect iconBounds = new Rect(0, 0, canvas.getWidth(), canvas.getHeight()); Rect src = new Rect(0, 0, touchIcon.getWidth(), touchIcon.getHeight()); Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setFilterBitmap(true); canvas.drawBitmap(touchIc... | /**
* Use touch-icon or higher-resolution favicon and round the corners.
* @param context Context used to get resources.
* @param touchIcon Touch icon bitmap.
* @param canvas Canvas that holds the touch icon.
*/ | Use touch-icon or higher-resolution favicon and round the corners | drawTouchIconToCanvas | {
"repo_name": "TheTypoMaster/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/BookmarkUtils.java",
"license": "bsd-3-clause",
"size": 9637
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Paint",
"android.graphics.Path",
"android.graphics.PorterDuff",
"android.graphics.PorterDuffXfermode",
"android.graphics.Rect",
"android.graphics.RectF",
"android.util.TypedValue"
] | import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; import android.util.Ty... | import android.content.*; import android.graphics.*; import android.util.*; | [
"android.content",
"android.graphics",
"android.util"
] | android.content; android.graphics; android.util; | 2,716,664 |
protected void sequence_MaslModel(ISerializationContext context, MaslModel semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, MaslModel semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* MaslModel returns MaslModel
*
* Constraint:
* elements+=AbstractTopLevelElement*
*/ | Contexts: MaslModel returns MaslModel Constraint: elements+=AbstractTopLevelElement | sequence_MaslModel | {
"repo_name": "perojonsson/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSemanticSequencer.java",
"license": "apache-2.0",
"size": 376780
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.xtuml.bp.xtext.masl.masl.structure.MaslModel"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.xtuml.bp.xtext.masl.masl.structure.MaslModel; | import org.eclipse.xtext.serializer.*; import org.xtuml.bp.xtext.masl.masl.structure.*; | [
"org.eclipse.xtext",
"org.xtuml.bp"
] | org.eclipse.xtext; org.xtuml.bp; | 1,452,198 |
@ServiceMethod(returns = ReturnType.SINGLE)
ManagedDatabaseInner createOrUpdate(
String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); | @ServiceMethod(returns = ReturnType.SINGLE) ManagedDatabaseInner createOrUpdate( String resourceGroupName, String managedInstanceName, String databaseName, ManagedDatabaseInner parameters); | /**
* Creates a new database or updates an existing database.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.... | Creates a new database or updates an existing database | createOrUpdate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ManagedDatabasesClient.java",
"license": "mit",
"size": 37573
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.fluent.models.ManagedDatabaseInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 808,281 |
protected void addSourcePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EAnnotation_source_feature"),
getString("_UI_PropertyDescriptor_desc... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ApiPackage.Literals.EANNOTATION__SOURCE, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE... | /**
* This adds a property descriptor for the Source feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Source feature. | addSourcePropertyDescriptor | {
"repo_name": "generia/apitools",
"path": "editor/de.generia.tools.model.api.editor/src/de/generia/tools/model/api/provider/EAnnotationItemProvider.java",
"license": "lgpl-3.0",
"size": 6180
} | [
"de.generia.tools.model.api.ApiPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import de.generia.tools.model.api.ApiPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import de.generia.tools.model.api.*; import org.eclipse.emf.edit.provider.*; | [
"de.generia.tools",
"org.eclipse.emf"
] | de.generia.tools; org.eclipse.emf; | 2,409,338 |
public boolean isPanningEvent(MouseEvent event)
{
return (event != null) ? event.isShiftDown() && event.isControlDown()
: false;
} | boolean function(MouseEvent event) { return (event != null) ? event.isShiftDown() && event.isControlDown() : false; } | /**
* Note: This is not used during drag and drop operations due to limitations
* of the underlying API. To enable this for move operations set dragEnabled
* to false.
*
* @param event
* @return Returns true if the given event is a panning event.
*/ | Note: This is not used during drag and drop operations due to limitations of the underlying API. To enable this for move operations set dragEnabled to false | isPanningEvent | {
"repo_name": "3w3rt0n/AmeacasInternas",
"path": "src/com/mxgraph/swing/mxGraphComponent.java",
"license": "apache-2.0",
"size": 102365
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 616,704 |
public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy) {
this.headerFilterStrategy = headerFilterStrategy;
} | void function(HeaderFilterStrategy headerFilterStrategy) { this.headerFilterStrategy = headerFilterStrategy; } | /**
* Sets a {@link HeaderFilterStrategy} that will only be applied on producer endpoints (on both directions: request and response).
* <p>Default value: none.</p>
*/ | Sets a <code>HeaderFilterStrategy</code> that will only be applied on producer endpoints (on both directions: request and response). Default value: none | setHeaderFilterStrategy | {
"repo_name": "onders86/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/directvm/DirectVmComponent.java",
"license": "apache-2.0",
"size": 6032
} | [
"org.apache.camel.spi.HeaderFilterStrategy"
] | import org.apache.camel.spi.HeaderFilterStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 591,520 |
@Override
public final void beginDecoding(InputStream istream) throws ContentDecodingException {
if (_resyncable)
istream.mark(_resyncLimit);
try {
setupForDecoding(istream);
} catch (IOException ioe) {
if (! _resyncable)
throw new ContentDecodingException(ioe.getMessage());
Log.severe("Saw e... | final void function(InputStream istream) throws ContentDecodingException { if (_resyncable) istream.mark(_resyncLimit); try { setupForDecoding(istream); } catch (IOException ioe) { if (! _resyncable) throw new ContentDecodingException(ioe.getMessage()); Log.severe(STR, ioe.getMessage()); while (true) { try { resync(ist... | /**
* Reset the Decoder's state and start parsing the input stream.
* Handle resyncing.
*
* @param istream
*/ | Reset the Decoder's state and start parsing the input stream. Handle resyncing | beginDecoding | {
"repo_name": "ebollens/ccnmp",
"path": "javasrc/src/org/ccnx/ccn/impl/encoding/BinaryXMLDecoder.java",
"license": "lgpl-2.1",
"size": 21355
} | [
"java.io.IOException",
"java.io.InputStream",
"org.ccnx.ccn.impl.support.Log",
"org.ccnx.ccn.io.content.ContentDecodingException"
] | import java.io.IOException; import java.io.InputStream; import org.ccnx.ccn.impl.support.Log; import org.ccnx.ccn.io.content.ContentDecodingException; | import java.io.*; import org.ccnx.ccn.impl.support.*; import org.ccnx.ccn.io.content.*; | [
"java.io",
"org.ccnx.ccn"
] | java.io; org.ccnx.ccn; | 942,512 |
public double integrate(double pdfValue) {
if (!isPreprocessed()) {
throw new IllegalStateException("Preprocess before integrating!");
}
if (singleValueDis) {
// There is only zero and one possible if the distribution is single value
if (Precision.equals(pdfValue, 1)) {
return 1;
} else {
r... | double function(double pdfValue) { if (!isPreprocessed()) { throw new IllegalStateException(STR); } if (singleValueDis) { if (Precision.equals(pdfValue, 1)) { return 1; } else { return 0; } } int foundIndex = Arrays.binarySearch(integral, new MonteCarloPoint(0, pdfValue)); if (foundIndex > 0) { while (foundIndex + 1 < ... | /**
* Computes the proportion of the pdf where the function's density values are smaller than the given value
*
* @param pdfValue the density value
*
* @return the proportion of the area with smaller pdf values
*/ | Computes the proportion of the pdf where the function's density values are smaller than the given value | integrate | {
"repo_name": "TKlerx/SADL",
"path": "PDTTA-core/src/sadl/integration/MonteCarloIntegration.java",
"license": "gpl-3.0",
"size": 6835
} | [
"java.util.Arrays",
"org.apache.commons.math3.util.Precision"
] | import java.util.Arrays; import org.apache.commons.math3.util.Precision; | import java.util.*; import org.apache.commons.math3.util.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 942,405 |
public Tree currentTree() {
String path = currentPath();
if (path == null) {
return null;
}
return getTree(path);
} | Tree function() { String path = currentPath(); if (path == null) { return null; } return getTree(path); } | /**
* Get the tree at the current path.
*
* @return the current tree, or null
*/ | Get the tree at the current path | currentTree | {
"repo_name": "chetanmeh/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/SelectorImpl.java",
"license": "apache-2.0",
"size": 28676
} | [
"org.apache.jackrabbit.oak.api.Tree"
] | import org.apache.jackrabbit.oak.api.Tree; | import org.apache.jackrabbit.oak.api.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 2,567,227 |
public void addOperator(Operator operator, Map<PCollection<?>, OutputPort<?>> ports) {
boolean first = true;
for (Map.Entry<PCollection<?>, OutputPort<?>> portEntry : ports.entrySet()) {
if (first) {
addOperator(operator, portEntry.getValue(), portEntry.getKey());
first = false;
} ... | void function(Operator operator, Map<PCollection<?>, OutputPort<?>> ports) { boolean first = true; for (Map.Entry<PCollection<?>, OutputPort<?>> portEntry : ports.entrySet()) { if (first) { addOperator(operator, portEntry.getValue(), portEntry.getKey()); first = false; } else { this.streams.put(portEntry.getKey(), (Pai... | /**
* Register operator and output ports for the given collections.
* @param operator
* @param ports
*/ | Register operator and output ports for the given collections | addOperator | {
"repo_name": "amitsela/beam",
"path": "runners/apex/src/main/java/org/apache/beam/runners/apex/translation/TranslationContext.java",
"license": "apache-2.0",
"size": 7606
} | [
"com.datatorrent.api.Operator",
"java.util.ArrayList",
"java.util.Map",
"org.apache.beam.sdk.values.PCollection",
"org.apache.commons.lang3.tuple.ImmutablePair",
"org.apache.commons.lang3.tuple.Pair"
] | import com.datatorrent.api.Operator; import java.util.ArrayList; import java.util.Map; import org.apache.beam.sdk.values.PCollection; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; | import com.datatorrent.api.*; import java.util.*; import org.apache.beam.sdk.values.*; import org.apache.commons.lang3.tuple.*; | [
"com.datatorrent.api",
"java.util",
"org.apache.beam",
"org.apache.commons"
] | com.datatorrent.api; java.util; org.apache.beam; org.apache.commons; | 1,217,328 |
public static EventFancyScene getEventFancyScene(EFancyScene eventFancyScene) {
return (EventFancyScene) getResource(eventFancyScene, true);
} | static EventFancyScene function(EFancyScene eventFancyScene) { return (EventFancyScene) getResource(eventFancyScene, true); } | /**
* Fetches the requested fancy scene from the cache, or loads it.
*
* @param textbox
* Fancy scene font to load.
* @return Loaded fancy scene.
*/ | Fetches the requested fancy scene from the cache, or loads it | getEventFancyScene | {
"repo_name": "blutorange/lotsOfBSGdx",
"path": "core/src/de/homelab/madgaksha/lotsofbs/resourcecache/ResourceCache.java",
"license": "cc0-1.0",
"size": 12501
} | [
"de.homelab.madgaksha.lotsofbs.cutscenesystem.event.EventFancyScene"
] | import de.homelab.madgaksha.lotsofbs.cutscenesystem.event.EventFancyScene; | import de.homelab.madgaksha.lotsofbs.cutscenesystem.event.*; | [
"de.homelab.madgaksha"
] | de.homelab.madgaksha; | 2,833,627 |
public void testExceptionally_normalCompletion() {
for (boolean createIncomplete : new boolean[] { true, false })
for (Integer v1 : new Integer[] { 1, null })
{
final AtomicInteger a = new AtomicInteger(0);
final CompletableFuture<Integer> f = new CompletableFuture<>();
i... | void function() { for (boolean createIncomplete : new boolean[] { true, false }) for (Integer v1 : new Integer[] { 1, null }) { final AtomicInteger a = new AtomicInteger(0); final CompletableFuture<Integer> f = new CompletableFuture<>(); if (!createIncomplete) assertTrue(f.complete(v1)); final CompletableFuture<Integer... | /**
* exceptionally action is not invoked when source completes
* normally, and source result is propagated
*/ | exceptionally action is not invoked when source completes normally, and source result is propagated | testExceptionally_normalCompletion | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/CompletableFutureTest.java",
"license": "gpl-2.0",
"size": 182910
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.atomic.AtomicInteger"
] | import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 114,244 |
public final void setParameterLong(int idx, int val) {
int pos = WORDCNT + (2 * idx) + 1;
DataPacker.putIntelInt(val, m_smbbuf, pos);
} | final void function(int idx, int val) { int pos = WORDCNT + (2 * idx) + 1; DataPacker.putIntelInt(val, m_smbbuf, pos); } | /**
* Set the specified parameter words.
*
* @param idx Parameter index (zero based).
* @param val Parameter value.
*/ | Set the specified parameter words | setParameterLong | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/server/auth/passthru/SMBPacket.java",
"license": "gpl-3.0",
"size": 31532
} | [
"org.alfresco.jlan.util.DataPacker"
] | import org.alfresco.jlan.util.DataPacker; | import org.alfresco.jlan.util.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 1,325,457 |
public ClusteringServiceConfigurationBuilder resourcePool(String name, long size, MemoryUnit unit, String serverResource) {
return resourcePool(name, new PoolDefinition(size, unit, serverResource));
} | ClusteringServiceConfigurationBuilder function(String name, long size, MemoryUnit unit, String serverResource) { return resourcePool(name, new PoolDefinition(size, unit, serverResource)); } | /**
* Adds a resource pool with the given name and size and consuming the given server resource.
*
* @param name pool name
* @param size pool size
* @param unit pool size unit
* @param serverResource server resource to consume
*
* @return a clustering service configuration builder
*/ | Adds a resource pool with the given name and size and consuming the given server resource | resourcePool | {
"repo_name": "rishabhmonga/ehcache3",
"path": "clustered/client/src/main/java/org/ehcache/clustered/client/config/builders/ClusteringServiceConfigurationBuilder.java",
"license": "apache-2.0",
"size": 4553
} | [
"org.ehcache.clustered.client.config.ClusteringServiceConfiguration",
"org.ehcache.config.units.MemoryUnit"
] | import org.ehcache.clustered.client.config.ClusteringServiceConfiguration; import org.ehcache.config.units.MemoryUnit; | import org.ehcache.clustered.client.config.*; import org.ehcache.config.units.*; | [
"org.ehcache.clustered",
"org.ehcache.config"
] | org.ehcache.clustered; org.ehcache.config; | 1,406,612 |
public Set<Abstraction> applyCallToReturnFlowFunction(Abstraction d1,
Abstraction source, Stmt stmt) {
return applyCallToReturnFlowFunction(d1, source, stmt,
new ByReferenceBoolean(), null, false);
}
| Set<Abstraction> function(Abstraction d1, Abstraction source, Stmt stmt) { return applyCallToReturnFlowFunction(d1, source, stmt, new ByReferenceBoolean(), null, false); } | /**
* Applies all rules to the call-to-return flow function
* @param d1 The context abstraction
* @param source The incoming taint to propagate over the given statement
* @param stmt The statement to which to apply the rules
* @return The collection of outgoing taints
*/ | Applies all rules to the call-to-return flow function | applyCallToReturnFlowFunction | {
"repo_name": "jgarci40/soot-infoflow",
"path": "src/soot/jimple/infoflow/problems/rules/PropagationRuleManager.java",
"license": "lgpl-2.1",
"size": 7788
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 252,816 |
public Object getRenderingHint(RenderingHints.Key hintKey){
return _hints.get(hintKey);
} | Object function(RenderingHints.Key hintKey){ return _hints.get(hintKey); } | /**
* Returns the value of a single preference for the rendering algorithms.
* Hint categories include controls for rendering quality and overall
* time/quality trade-off in the rendering process. Refer to the
* <code>RenderingHints</code> class for definitions of some common
* keys and values... | Returns the value of a single preference for the rendering algorithms. Hint categories include controls for rendering quality and overall time/quality trade-off in the rendering process. Refer to the <code>RenderingHints</code> class for definitions of some common keys and values | getRenderingHint | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/java/org/apache/poi/sl/draw/SLGraphics.java",
"license": "apache-2.0",
"size": 79340
} | [
"java.awt.RenderingHints"
] | import java.awt.RenderingHints; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,025,458 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(EsbPackage.Literals.INBOUND_ENDPOINT__SEQUENCE_INPUT_CONNECTOR,
EsbFactory.eINST... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (EsbPackage.Literals.INBOUND_ENDPOINT__SEQUENCE_INPUT_CONNECTOR, EsbFactory.eINSTANCE.createInboundEndpointSequenceInputConnector())); newCh... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
* describing the children that can be created under this object. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "nwnpallewela/developer-studio",
"path": "esb/plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/InboundEndpointItemProvider.java",
"license": "apache-2.0",
"size": 156993
} | [
"java.util.Collection",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import java.util.Collection; import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import java.util.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"java.util",
"org.wso2.developerstudio"
] | java.util; org.wso2.developerstudio; | 7,317 |
public Map<ShardId, IndexShardSnapshotStatus> currentSnapshotShards(SnapshotId snapshotId) {
SnapshotShards snapshotShards = shardSnapshots.get(snapshotId);
if (snapshotShards == null) {
return null;
} else {
return snapshotShards.shards;
}
} | Map<ShardId, IndexShardSnapshotStatus> function(SnapshotId snapshotId) { SnapshotShards snapshotShards = shardSnapshots.get(snapshotId); if (snapshotShards == null) { return null; } else { return snapshotShards.shards; } } | /**
* Returns status of shards that are snapshotted on the node and belong to the given snapshot
* <p>
* This method is executed on data node
* </p>
*
* @param snapshotId snapshot id
* @return map of shard id to snapshot status
*/ | Returns status of shards that are snapshotted on the node and belong to the given snapshot This method is executed on data node | currentSnapshotShards | {
"repo_name": "pranavraman/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java",
"license": "apache-2.0",
"size": 29353
} | [
"java.util.Map",
"org.elasticsearch.cluster.metadata.SnapshotId",
"org.elasticsearch.index.shard.ShardId",
"org.elasticsearch.index.snapshots.IndexShardSnapshotStatus"
] | import java.util.Map; import org.elasticsearch.cluster.metadata.SnapshotId; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.index.snapshots.IndexShardSnapshotStatus; | import java.util.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.index.shard.*; import org.elasticsearch.index.snapshots.*; | [
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.index"
] | java.util; org.elasticsearch.cluster; org.elasticsearch.index; | 2,470,117 |
private Command prepareSelect(String args) {
Optional<Integer> index = parseIndex(args);
if (!index.isPresent()) {
return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectCommand.MESSAGE_USAGE));
}
return new SelectCommand(index.get());
}
... | Command function(String args) { Optional<Integer> index = parseIndex(args); if (!index.isPresent()) { return new IncorrectCommand(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectCommand.MESSAGE_USAGE)); } return new SelectCommand(index.get()); } /** * Returns the specified index in the {@code command} IF a positive... | /**
* Parses arguments in the context of the select task command.
*
* @param args
* full command args string
* @return the prepared command
*/ | Parses arguments in the context of the select task command | prepareSelect | {
"repo_name": "CS2103AUG2016-W09-C2/main",
"path": "src/main/java/seedu/taskmaster/logic/parser/Parser.java",
"license": "mit",
"size": 30630
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 448,948 |
public java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI> getSubterm_strings_GreaterThanHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI>();
for (Term elemnt : getSubterm()) {
if(... | java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.GreaterThanHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.s... | /**
* This accessor return a list of encapsulated subelement, only of GreaterThanHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of GreaterThanHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_strings_GreaterThanHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/LessThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 108879
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 914,917 |
void removeAttribute(PerunSession sess, Member member, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException; | void removeAttribute(PerunSession sess, Member member, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException; | /**
* Unset particular attribute for the member. Core attributes can't be removed this way.
*
* @param sess perun session
* @param member remove attribute from this member
* @param attribute attribute to remove
*
* @throws InternalErrorException if an exception raise in concrete implementation, the except... | Unset particular attribute for the member. Core attributes can't be removed this way | removeAttribute | {
"repo_name": "jirmauritz/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 193360
} | [
"cz.metacentrum.perun.core.api.AttributeDefinition",
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.... | import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.m... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,296,651 |
private List<Integer> eligibleEntries(){
ArrayList<Integer> eligibleIndices = new ArrayList<Integer>();
for(Integer entry : numbersIndices.keySet()){
Integer complementary = inputK - entry;
if(numbersIndices.get(complementary) != null &&
isEntryLowerThanComplementary(entry)){
//This insert ... | List<Integer> function(){ ArrayList<Integer> eligibleIndices = new ArrayList<Integer>(); for(Integer entry : numbersIndices.keySet()){ Integer complementary = inputK - entry; if(numbersIndices.get(complementary) != null && isEntryLowerThanComplementary(entry)){ eligibleIndices.add(entry); }; } return eligibleIndices; } | /**
*
* This method returns just a list of the keys
* of the 'numberIndices' map. Those indices
* are the ones having the complementary number.
*
* Complexity O(N)
*/ | This method returns just a list of the keys of the 'numberIndices' map. Those indices are the ones having the complementary number. Complexity O(N) | eligibleEntries | {
"repo_name": "Ciriola/wallethub",
"path": "java/kcomplementary/src/main/java/com/wallethub/kcomplementary/algorithm/KComplementary.java",
"license": "mit",
"size": 3794
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,416,711 |
@Nonnull
public OAuth2PermissionGrantCollectionRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | OAuth2PermissionGrantCollectionRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/OAuth2PermissionGrantCollectionRequest.java",
"license": "mit",
"size": 6058
} | [
"com.microsoft.graph.requests.OAuth2PermissionGrantCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.OAuth2PermissionGrantCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,857,371 |
BaseData setMergedConfiguration(List<EndpointGroupStateDto> egsList, BaseData mergedConfiguration); | BaseData setMergedConfiguration(List<EndpointGroupStateDto> egsList, BaseData mergedConfiguration); | /**
* Sets the merged configuration.
*
* @param egsList the egs list
* @param mergedConfiguration the merged configuration
* @return the string
*/ | Sets the merged configuration | setMergedConfiguration | {
"repo_name": "vzhukovskyi/kaa",
"path": "server/operations/src/main/java/org/kaaproject/kaa/server/operations/service/cache/CacheService.java",
"license": "apache-2.0",
"size": 9860
} | [
"java.util.List",
"org.kaaproject.kaa.common.dto.EndpointGroupStateDto",
"org.kaaproject.kaa.server.common.core.configuration.BaseData"
] | import java.util.List; import org.kaaproject.kaa.common.dto.EndpointGroupStateDto; import org.kaaproject.kaa.server.common.core.configuration.BaseData; | import java.util.*; import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.server.common.core.configuration.*; | [
"java.util",
"org.kaaproject.kaa"
] | java.util; org.kaaproject.kaa; | 2,343,119 |
@Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
final Preference preference = findPreference(key);
if (preference != null) {
final Bundle extras = preference.getExtras();
if (preference instanceof ListPreference) {
... | void function(SharedPreferences sharedPreferences, String key) { final Preference preference = findPreference(key); if (preference != null) { final Bundle extras = preference.getExtras(); if (preference instanceof ListPreference) { final String name = extras.getString("icons"); if (name != null) { final String value = ... | /**
* Handles what to do when a preference is altered
*
* @param sharedPreferences to observe
* @param key of the pref that was altered
*/ | Handles what to do when a preference is altered | onSharedPreferenceChanged | {
"repo_name": "Nxt3/IO_Classic_WatchFace",
"path": "wear/src/main/java/io/nxt3/ioclassic/config/SettingsFragment.java",
"license": "gpl-3.0",
"size": 31818
} | [
"android.content.SharedPreferences",
"android.content.res.TypedArray",
"android.os.Bundle",
"android.preference.ListPreference",
"android.preference.Preference"
] | import android.content.SharedPreferences; import android.content.res.TypedArray; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; | import android.content.*; import android.content.res.*; import android.os.*; import android.preference.*; | [
"android.content",
"android.os",
"android.preference"
] | android.content; android.os; android.preference; | 831,273 |
private CarbonFactDataWriter<?> getFactDataWriter(int[] keyBlockSize) {
ColumnarFormatVersion version = CarbonProperties.getInstance().getFormatVersion();
return CarbonDataWriterFactory.getInstance()
.getFactDataWriter(version, getDataWriterVo(keyBlockSize));
} | CarbonFactDataWriter<?> function(int[] keyBlockSize) { ColumnarFormatVersion version = CarbonProperties.getInstance().getFormatVersion(); return CarbonDataWriterFactory.getInstance() .getFactDataWriter(version, getDataWriterVo(keyBlockSize)); } | /**
* Below method will be used to get the fact data writer instance
*
* @param keyBlockSize
* @return data writer instance
*/ | Below method will be used to get the fact data writer instance | getFactDataWriter | {
"repo_name": "JihongMA/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java",
"license": "apache-2.0",
"size": 65163
} | [
"org.apache.carbondata.core.metadata.ColumnarFormatVersion",
"org.apache.carbondata.core.util.CarbonProperties",
"org.apache.carbondata.processing.store.writer.CarbonFactDataWriter"
] | import org.apache.carbondata.core.metadata.ColumnarFormatVersion; import org.apache.carbondata.core.util.CarbonProperties; import org.apache.carbondata.processing.store.writer.CarbonFactDataWriter; | import org.apache.carbondata.core.metadata.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.processing.store.writer.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 1,545,460 |
public java.util.Map<String, Counter> getLimitsMap() {
return java.util.Collections.unmodifiableMap(
internalGetLimits());
} | java.util.Map<String, Counter> function() { return java.util.Collections.unmodifiableMap( internalGetLimits()); } | /**
* <pre>
* map from limiter key to counter
* </pre>
*
* <code>map<string, .com.wonderpush.sdk.inappmessaging.internal.Counter> limits = 1;</code>
*/ | <code> map from limiter key to counter </code> <code>map<string, .com.wonderpush.sdk.inappmessaging.internal.Counter> limits = 1;</code> | getLimitsMap | {
"repo_name": "wonderpush/wonderpush-android-sdk",
"path": "sdk/src/main/java/com/wonderpush/sdk/inappmessaging/internal/RateLimitProto.java",
"license": "apache-2.0",
"size": 5980
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,677,672 |
@Override
public ResourceLocator getResourceLocator() {
return SimpleBPMNEditPlugin.INSTANCE;
} | ResourceLocator function() { return SimpleBPMNEditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "bluezio/simplified-bpmn-example",
"path": "org.eclipse.epsilon.eugenia.bpmn.edit/src/SimpleBPMN/provider/BusinessProcessDiagramItemProvider.java",
"license": "epl-1.0",
"size": 7362
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 104,493 |
public void dropPrimaryKey(Table table) throws IOException
{
print("ALTER TABLE ");
printlnIdentifier(getTableName(table));
printIndent();
print("DROP PRIMARY KEY");
printEndOfStatement();
}
| void function(Table table) throws IOException { print(STR); printlnIdentifier(getTableName(table)); printIndent(); print(STR); printEndOfStatement(); } | /**
* Writes the SQL to drop the primary key of the given table.
*
* @param table The table
*/ | Writes the SQL to drop the primary key of the given table | dropPrimaryKey | {
"repo_name": "jpcb/ddlutils",
"path": "src/main/java/org/apache/ddlutils/platform/sapdb/SapDbBuilder.java",
"license": "apache-2.0",
"size": 7635
} | [
"java.io.IOException",
"org.apache.ddlutils.model.Table"
] | import java.io.IOException; import org.apache.ddlutils.model.Table; | import java.io.*; import org.apache.ddlutils.model.*; | [
"java.io",
"org.apache.ddlutils"
] | java.io; org.apache.ddlutils; | 10,401 |
protected void setReturnFields(String type, SolrQuery solrQuery) {
String returnFields = GlobalProps.getProperty(GlobalProps.PROP_SEARCH_SOLR_RETURNFIELDS);
String[] splitReturnFields = returnFields.split(",");
for (String field : splitReturnFields) {
solrQuery.addField(type + "." + field);
}
}
| void function(String type, SolrQuery solrQuery) { String returnFields = GlobalProps.getProperty(GlobalProps.PROP_SEARCH_SOLR_RETURNFIELDS); String[] splitReturnFields = returnFields.split(","); for (String field : splitReturnFields) { solrQuery.addField(type + "." + field); } } | /**
* Set the fields to return
*
* @param type Add the prefix for the returned field type (e.g. 'unpublished','published','template')
* @param solrQuery The query to set the return fields for
*/ | Set the fields to return | setReturnFields | {
"repo_name": "anu-doi/anudc",
"path": "DataCommons/src/main/java/au/edu/anu/datacommons/data/solr/dao/query/AbstractSolrQuery.java",
"license": "gpl-3.0",
"size": 6864
} | [
"au.edu.anu.datacommons.properties.GlobalProps",
"org.apache.solr.client.solrj.SolrQuery"
] | import au.edu.anu.datacommons.properties.GlobalProps; import org.apache.solr.client.solrj.SolrQuery; | import au.edu.anu.datacommons.properties.*; import org.apache.solr.client.solrj.*; | [
"au.edu.anu",
"org.apache.solr"
] | au.edu.anu; org.apache.solr; | 496,324 |
public List getUniqueCommands() {
List uniqueCommands = new ArrayList();
for (Iterator it = commands.values().iterator(); it.hasNext();) {
Command command = (Command) it.next();
if (!uniqueCommands.contains(command)) {
uniqueCommands.add(command);
}
}
return uniqueCommands;
} | List function() { List uniqueCommands = new ArrayList(); for (Iterator it = commands.values().iterator(); it.hasNext();) { Command command = (Command) it.next(); if (!uniqueCommands.contains(command)) { uniqueCommands.add(command); } } return uniqueCommands; } | /**
* Get the list of commands that have been registered with the provider,
* i.e. the commands that can be issued to the listeners
*
* @return The list of commands (@see Command) that can be issued from this
* provider
*/ | Get the list of commands that have been registered with the provider, i.e. the commands that can be issued to the listeners | getUniqueCommands | {
"repo_name": "dbank-so/fadableUnicodeFont",
"path": "src/org/newdawn/slick/command/InputProvider.java",
"license": "bsd-3-clause",
"size": 12048
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,662,700 |
@Test(groups = "ticket:2962")
public void testDeleteTagUsedByOther() throws Exception {
// set up collaborative group with an "owner" user
EventContext ec = newUserAndGroup("rwra--");
// owner creates the image
Image img = (Image) iUpdate.saveAndReturnObject(mmFactory
... | @Test(groups = STR) void function() throws Exception { EventContext ec = newUserAndGroup(STR); Image img = (Image) iUpdate.saveAndReturnObject(mmFactory .simpleImage(0)); omero.client owner = disconnect(); newUserInGroup(ec); TagAnnotation c = new TagAnnotationI(); c.setTextValue(omero.rtypes.rstring("tag")); c = (TagA... | /**
* Test to delete a tag used by another user.
*
* @throws Exception
* Thrown if an error occurred.
*
* Group changed from RWRW to RWRA for 4.4
*/ | Test to delete a tag used by another user | testDeleteTagUsedByOther | {
"repo_name": "bramalingam/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/DeleteServicePermissionsTest.java",
"license": "gpl-2.0",
"size": 34904
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 1,669,883 |
@Test
public void testTruncateRecovery() throws IOException {
FSNamesystem fsn = cluster.getNamesystem();
String client = "client";
String clientMachine = "clientMachine";
String src = "/test/testTruncateRecovery";
Path srcPath = new Path(src);
byte[] contents = AppendTestUtil.initBuffer(BL... | void function() throws IOException { FSNamesystem fsn = cluster.getNamesystem(); String client = STR; String clientMachine = STR; String src = STR; Path srcPath = new Path(src); byte[] contents = AppendTestUtil.initBuffer(BLOCK_SIZE); writeContents(contents, BLOCK_SIZE, srcPath); INodesInPath iip = fsn.getFSDirectory()... | /**
* Check truncate recovery.
*/ | Check truncate recovery | testTruncateRecovery | {
"repo_name": "anjuncc/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java",
"license": "apache-2.0",
"size": 47135
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.AppendTestUtil",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.util.Time",
"org.ham... | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.AppendTestUtil; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.ut... | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.hamcrest.core",
"org.junit"
] | java.io; org.apache.hadoop; org.hamcrest.core; org.junit; | 75,186 |
@Deprecated
public static SyncInfo getCurrentSync() {
try {
final List<SyncInfo> syncs = getContentService().getCurrentSyncs();
if (syncs.isEmpty()) {
return null;
}
return syncs.get(0);
} catch (RemoteException e) {
thr... | static SyncInfo function() { try { final List<SyncInfo> syncs = getContentService().getCurrentSyncs(); if (syncs.isEmpty()) { return null; } return syncs.get(0); } catch (RemoteException e) { throw new RuntimeException(STR, e); } } | /**
* If a sync is active returns the information about it, otherwise returns null.
* <p>
* This method requires the caller to hold the permission
* {@link android.Manifest.permission#READ_SYNC_STATS}.
* <p>
* @return the SyncInfo for the currently active sync or null if one is not active.... | If a sync is active returns the information about it, otherwise returns null. This method requires the caller to hold the permission <code>android.Manifest.permission#READ_SYNC_STATS</code>. | getCurrentSync | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/content/ContentResolver.java",
"license": "apache-2.0",
"size": 82308
} | [
"android.os.RemoteException",
"java.util.List"
] | import android.os.RemoteException; import java.util.List; | import android.os.*; import java.util.*; | [
"android.os",
"java.util"
] | android.os; java.util; | 428,856 |
public ThingUID getThingUID() {
return thingUID;
} | ThingUID function() { return thingUID; } | /**
* Gets the thing UID.
*
* @return the thing UID
*/ | Gets the thing UID | getThingUID | {
"repo_name": "ibaton/smarthome",
"path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/events/ThingStatusInfoEvent.java",
"license": "epl-1.0",
"size": 2099
} | [
"org.eclipse.smarthome.core.thing.ThingUID"
] | import org.eclipse.smarthome.core.thing.ThingUID; | import org.eclipse.smarthome.core.thing.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 651,104 |
@Test
public void tagNameTest() {
NWiseExtension nWiseExtension = new NWiseExtension();
Assert.assertEquals("nwise", nWiseExtension.getTagName());
} | void function() { NWiseExtension nWiseExtension = new NWiseExtension(); Assert.assertEquals("nwise", nWiseExtension.getTagName()); } | /**
* The nwise tag uses the data generator name space
*/ | The nwise tag uses the data generator name space | tagNameTest | {
"repo_name": "wnilkamal/DataGenerator",
"path": "dg-core/src/test/java/org/finra/datagenerator/engine/scxml/tags/NWiseExtensionTest.java",
"license": "apache-2.0",
"size": 6691
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 434,182 |
public FilterKriteriumDirekt createFKDKassenbuchbezeichnung()
throws Throwable {
return new FilterKriteriumDirekt(FinanzFac.FLR_KASSENBUCH_C_BEZ, "",
FilterKriterium.OPERATOR_LIKE,
LPMain.getTextRespectUISPr("lp.bezeichnung"),
FilterKriteriumDirekt.PROZENT_TRAILING, // Auswertung als 'XX%'
... | FilterKriteriumDirekt function() throws Throwable { return new FilterKriteriumDirekt(FinanzFac.FLR_KASSENBUCH_C_BEZ, STRlp.bezeichnung"), FilterKriteriumDirekt.PROZENT_TRAILING, true, true, Facade.MAX_UNBESCHRAENKT); } | /**
* Direktes Filter Kriterium Kontonummer fuer das PanelQueryKonto.
*
* @return FilterKriteriumDirekt
* @throws Throwable
*/ | Direktes Filter Kriterium Kontonummer fuer das PanelQueryKonto | createFKDKassenbuchbezeichnung | {
"repo_name": "erdincay/lpclientpc",
"path": "src/com/lp/client/finanz/FinanzFilterFactory.java",
"license": "agpl-3.0",
"size": 41475
} | [
"com.lp.server.finanz.service.FinanzFac",
"com.lp.server.util.Facade",
"com.lp.server.util.fastlanereader.service.query.FilterKriteriumDirekt"
] | import com.lp.server.finanz.service.FinanzFac; import com.lp.server.util.Facade; import com.lp.server.util.fastlanereader.service.query.FilterKriteriumDirekt; | import com.lp.server.finanz.service.*; import com.lp.server.util.*; import com.lp.server.util.fastlanereader.service.query.*; | [
"com.lp.server"
] | com.lp.server; | 1,697,442 |
CharArrayBuffer formatHeaderElement(CharArrayBuffer buffer,
HeaderElement elem,
boolean quote); | CharArrayBuffer formatHeaderElement(CharArrayBuffer buffer, HeaderElement elem, boolean quote); | /**
* Formats one header element.
*
* @param buffer the buffer to append to, or
* {@code null} to create a new buffer
* @param elem the header element to format
* @param quote {@code true} to always format with quoted values,
* {@code fals... | Formats one header element | formatHeaderElement | {
"repo_name": "cictourgune/MDP-Airbnb",
"path": "httpcomponents-core-4.4/httpcore/src/main/java/org/apache/http/message/HeaderValueFormatter.java",
"license": "apache-2.0",
"size": 5109
} | [
"org.apache.http.HeaderElement",
"org.apache.http.util.CharArrayBuffer"
] | import org.apache.http.HeaderElement; import org.apache.http.util.CharArrayBuffer; | import org.apache.http.*; import org.apache.http.util.*; | [
"org.apache.http"
] | org.apache.http; | 1,992,618 |
public void setSelection(FilterListItem picked) {
selection = picked;
int scroll = listView.getScrollY();
notifyDataSetInvalidated();
listView.scrollTo(0, scroll);
} | void function(FilterListItem picked) { selection = picked; int scroll = listView.getScrollY(); notifyDataSetInvalidated(); listView.scrollTo(0, scroll); } | /**
* Sets the selected item to this one
* @param picked
*/ | Sets the selected item to this one | setSelection | {
"repo_name": "shaded2/Tasquid",
"path": "astrid/src/com/todoroo/astrid/adapter/FilterAdapter.java",
"license": "gpl-3.0",
"size": 23970
} | [
"com.todoroo.astrid.api.FilterListItem"
] | import com.todoroo.astrid.api.FilterListItem; | import com.todoroo.astrid.api.*; | [
"com.todoroo.astrid"
] | com.todoroo.astrid; | 2,909,709 |
public com.google.protobuf.Empty deleteIntent(com.google.cloud.dialogflow.v2.DeleteIntentRequest request) {
return blockingUnaryCall(
getChannel(), getDeleteIntentMethodHelper(), getCallOptions(), request);
} | com.google.protobuf.Empty function(com.google.cloud.dialogflow.v2.DeleteIntentRequest request) { return blockingUnaryCall( getChannel(), getDeleteIntentMethodHelper(), getCallOptions(), request); } | /**
* <pre>
* Deletes the specified intent.
* </pre>
*/ | <code> Deletes the specified intent. </code> | deleteIntent | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/IntentsGrpc.java",
"license": "bsd-3-clause",
"size": 48285
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 2,293,463 |
@Test
public void testGetDate() throws ParseException, UNISoNException {
final String dateExpected = "Wed, 11 May 2016 13:10:00 GMT";
final NewsArticle test = new NewsArticle();
Assert.assertNull(test.getDate());
test.setDate(dateExpected);
final Calendar actual = Calendar.getInstance();
actual.setTime(... | void function() throws ParseException, UNISoNException { final String dateExpected = STR; final NewsArticle test = new NewsArticle(); Assert.assertNull(test.getDate()); test.setDate(dateExpected); final Calendar actual = Calendar.getInstance(); actual.setTime(test.getDate()); Assert.assertEquals(4, actual.get(Calendar.... | /**
* Test getDate.
*
* @throws ParseException
* Signals that an parse exception in application has occurred..
* @throws UNISoNException
* Signals that an exception in application has occurred..
*/ | Test getDate | testGetDate | {
"repo_name": "leonarduk/unison",
"path": "src/test/java/uk/co/sleonard/unison/input/NewsArticleTest.java",
"license": "apache-2.0",
"size": 4549
} | [
"com.ibm.icu.util.Calendar",
"java.text.ParseException",
"org.junit.Assert",
"uk.co.sleonard.unison.UNISoNException"
] | import com.ibm.icu.util.Calendar; import java.text.ParseException; import org.junit.Assert; import uk.co.sleonard.unison.UNISoNException; | import com.ibm.icu.util.*; import java.text.*; import org.junit.*; import uk.co.sleonard.unison.*; | [
"com.ibm.icu",
"java.text",
"org.junit",
"uk.co.sleonard"
] | com.ibm.icu; java.text; org.junit; uk.co.sleonard; | 1,927,939 |
private SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target, SplitBrainJoinMessage request) {
if (logger.isFineEnabled()) {
logger.fine("Sending SplitBrainJoinMessage to " + target);
}
Connection conn = node.connectionManager.getOrConnect(target, true);
long t... | SplitBrainJoinMessage function(Address target, SplitBrainJoinMessage request) { if (logger.isFineEnabled()) { logger.fine(STR + target); } Connection conn = node.connectionManager.getOrConnect(target, true); long timeout = SPLIT_BRAIN_CONN_TIMEOUT_MILLIS; while (conn == null) { timeout -= SPLIT_BRAIN_SLEEP_TIME_MILLIS;... | /**
* Sends a split brain join request to the target address and returns the response.
*/ | Sends a split brain join request to the target address and returns the response | sendSplitBrainJoinMessage | {
"repo_name": "tufangorel/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/AbstractJoiner.java",
"license": "apache-2.0",
"size": 16493
} | [
"com.hazelcast.internal.cluster.impl.operations.SplitBrainMergeValidationOp",
"com.hazelcast.nio.Address",
"com.hazelcast.nio.Connection",
"com.hazelcast.spi.NodeEngine",
"java.lang.Thread",
"java.util.concurrent.Future",
"java.util.concurrent.TimeUnit",
"java.util.concurrent.TimeoutException"
] | import com.hazelcast.internal.cluster.impl.operations.SplitBrainMergeValidationOp; import com.hazelcast.nio.Address; import com.hazelcast.nio.Connection; import com.hazelcast.spi.NodeEngine; import java.lang.Thread; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.Ti... | import com.hazelcast.internal.cluster.impl.operations.*; import com.hazelcast.nio.*; import com.hazelcast.spi.*; import java.lang.*; import java.util.concurrent.*; | [
"com.hazelcast.internal",
"com.hazelcast.nio",
"com.hazelcast.spi",
"java.lang",
"java.util"
] | com.hazelcast.internal; com.hazelcast.nio; com.hazelcast.spi; java.lang; java.util; | 1,811,619 |
boolean setAuthenticatedUser(BTSUser validUser);
| boolean setAuthenticatedUser(BTSUser validUser); | /** Checks whether the given user is authorized to connect to database, if so it authenticates it.
* @param validUser user to authenticate.
* @return true if user is authorized.
*/ | Checks whether the given user is authorized to connect to database, if so it authenticates it | setAuthenticatedUser | {
"repo_name": "JKatzwinkel/bts",
"path": "org.bbaw.bts.core.controller/src/org/bbaw/bts/core/controller/generalController/BTSUserController.java",
"license": "lgpl-3.0",
"size": 4103
} | [
"org.bbaw.bts.btsmodel.BTSUser"
] | import org.bbaw.bts.btsmodel.BTSUser; | import org.bbaw.bts.btsmodel.*; | [
"org.bbaw.bts"
] | org.bbaw.bts; | 1,272,462 |
public void encode(OutputStream output) throws IOException
{
DHParameters dhParameters = publicKey.getParameters();
BigInteger Ys = publicKey.getY();
TlsDHUtils.writeDHParameter(dhParameters.getP(), output);
TlsDHUtils.writeDHParameter(dhParameters.getG(), output);
TlsDH... | void function(OutputStream output) throws IOException { DHParameters dhParameters = publicKey.getParameters(); BigInteger Ys = publicKey.getY(); TlsDHUtils.writeDHParameter(dhParameters.getP(), output); TlsDHUtils.writeDHParameter(dhParameters.getG(), output); TlsDHUtils.writeDHParameter(Ys, output); } | /**
* Encode this {@link ServerDHParams} to an {@link OutputStream}.
*
* @param output
* the {@link OutputStream} to encode to.
* @throws IOException
*/ | Encode this <code>ServerDHParams</code> to an <code>OutputStream</code> | encode | {
"repo_name": "ripple/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/crypto/tls/ServerDHParams.java",
"license": "isc",
"size": 1885
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.math.BigInteger",
"org.ripple.bouncycastle.crypto.params.DHParameters"
] | import java.io.IOException; import java.io.OutputStream; import java.math.BigInteger; import org.ripple.bouncycastle.crypto.params.DHParameters; | import java.io.*; import java.math.*; import org.ripple.bouncycastle.crypto.params.*; | [
"java.io",
"java.math",
"org.ripple.bouncycastle"
] | java.io; java.math; org.ripple.bouncycastle; | 1,265,503 |
public final T sslContext(SSLContext sslContext) {
this.sslContext = sslContext;
return self();
}
| final T function(SSLContext sslContext) { this.sslContext = sslContext; return self(); } | /**
* Sets a custom SSL context, used to secure the connection.
* This SSL context only takes effect, when setting {@code secure(true)}.
*
* @param sslContext The SSL context.
* @return The builder.
* @see #secure(boolean)
*/ | Sets a custom SSL context, used to secure the connection. This SSL context only takes effect, when setting secure(true) | sslContext | {
"repo_name": "jeozey/XmppServerTester",
"path": "xmpp-core-client/src/main/java/rocks/xmpp/core/session/ConnectionConfiguration.java",
"license": "mit",
"size": 11355
} | [
"javax.net.ssl.SSLContext"
] | import javax.net.ssl.SSLContext; | import javax.net.ssl.*; | [
"javax.net"
] | javax.net; | 2,602,336 |
CallerInfo info = new CallerInfo();
info.photoResource = 0;
info.phoneLabel = null;
info.numberType = 0;
info.numberLabel = null;
info.cachedPhoto = null;
info.isCachedPhotoCurrent = false;
if (Config.LOGV) Log.v(TAG, "construct callerIn... | CallerInfo info = new CallerInfo(); info.photoResource = 0; info.phoneLabel = null; info.numberType = 0; info.numberLabel = null; info.cachedPhoto = null; info.isCachedPhotoCurrent = false; if (Config.LOGV) Log.v(TAG, STR); if (cursor != null) { if (cursor.moveToFirst()) { int columnIndex; columnIndex = cursor.getColum... | /**
* getCallerInfo given a Cursor.
* @param context the context used to retrieve string constants
* @param contactRef the URI to attach to this CallerInfo object
* @param cursor the first object in the cursor is used to build the CallerInfo object.
* @return the CallerInfo which contains ... | getCallerInfo given a Cursor | getCallerInfo | {
"repo_name": "codevise/extended-sipdroid",
"path": "src/org/sipdroid/sipua/phone/CallerInfo.java",
"license": "gpl-3.0",
"size": 8442
} | [
"android.net.Uri",
"android.provider.Contacts",
"android.util.Config",
"android.util.Log"
] | import android.net.Uri; import android.provider.Contacts; import android.util.Config; import android.util.Log; | import android.net.*; import android.provider.*; import android.util.*; | [
"android.net",
"android.provider",
"android.util"
] | android.net; android.provider; android.util; | 1,327,488 |
protected void doTrace(VtiFpRequest request, VtiFpResponse response) throws ServletException, IOException
{
}
| void function(VtiFpRequest request, VtiFpResponse response) throws ServletException, IOException { } | /**
* <p>Wrapped doTrace method.</p>
*
* @param request Vti Frontpage request
* @param response Vti Frontpage response
*/ | Wrapped doTrace method | doTrace | {
"repo_name": "nguyentienlong/community-edition",
"path": "modules/sharepoint/amp/source/java/org/alfresco/module/vti/web/actions/VtiBaseAction.java",
"license": "lgpl-3.0",
"size": 8588
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"org.alfresco.module.vti.web.fp.VtiFpRequest",
"org.alfresco.module.vti.web.fp.VtiFpResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import org.alfresco.module.vti.web.fp.VtiFpRequest; import org.alfresco.module.vti.web.fp.VtiFpResponse; | import java.io.*; import javax.servlet.*; import org.alfresco.module.vti.web.fp.*; | [
"java.io",
"javax.servlet",
"org.alfresco.module"
] | java.io; javax.servlet; org.alfresco.module; | 2,396,880 |
@MethodContract(
pre = @Expression("_m != null"),
post = @Expression("Modifier.isPrivate(_m.getModifiers())")
)
public static boolean isPrivate(Method m) {
assert preArgumentNotNull(m, "m");
return Modifier.isPrivate(m.getModifiers());
} | @MethodContract( pre = @Expression(STR), post = @Expression(STR) ) static boolean function(Method m) { assert preArgumentNotNull(m, "m"); return Modifier.isPrivate(m.getModifiers()); } | /**
* The idiom for finding out whether a method {@code m} is private or not,
* using the standard Java API, is
* {@link Modifier#isPublic(int) Modifier.isPrivate(}{@link Method#getModifiers() m.getModifiers()}{@code )}.
* This shortens that a bit to {@code MethodHelpers.isPrivate(m)}.
*/ | The idiom for finding out whether a method m is private or not, using the standard Java API, is <code>Modifier#isPublic(int) Modifier.isPrivate(</code><code>Method#getModifiers() m.getModifiers()</code>). This shortens that a bit to MethodHelpers.isPrivate(m) | isPrivate | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/util/reflection/dev/d20081112-1807/src/main/java/org/ppwcode/util/reflect_I/MethodHelpers.java",
"license": "apache-2.0",
"size": 24437
} | [
"java.lang.reflect.Method",
"java.lang.reflect.Modifier",
"org.ppwcode.vernacular.exception_II.ProgrammingErrorHelpers",
"org.toryt.annotations_I.Expression",
"org.toryt.annotations_I.MethodContract"
] | import java.lang.reflect.Method; import java.lang.reflect.Modifier; import org.ppwcode.vernacular.exception_II.ProgrammingErrorHelpers; import org.toryt.annotations_I.Expression; import org.toryt.annotations_I.MethodContract; | import java.lang.reflect.*; import org.ppwcode.vernacular.*; import org.toryt.*; | [
"java.lang",
"org.ppwcode.vernacular",
"org.toryt"
] | java.lang; org.ppwcode.vernacular; org.toryt; | 294,055 |
public com.mozu.api.contracts.commerceruntime.payments.BillingInfo setBillingInfo(com.mozu.api.contracts.commerceruntime.payments.BillingInfo billingInfo, String orderId, String updateMode, String version, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.commerceruntime.payments.Billing... | com.mozu.api.contracts.commerceruntime.payments.BillingInfo function(com.mozu.api.contracts.commerceruntime.payments.BillingInfo billingInfo, String orderId, String updateMode, String version, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.payments.BillingInfo> client = com.... | /**
* Updates the billing information supplied for an order.
* <p><pre><code>
* BillingInfo billinginfo = new BillingInfo();
* BillingInfo billingInfo = billinginfo.setBillingInfo( billingInfo, orderId, updateMode, version, responseFields);
* </code></pre></p>
* @param orderId Unique identifier of the o... | Updates the billing information supplied for an order. <code><code> BillingInfo billinginfo = new BillingInfo(); BillingInfo billingInfo = billinginfo.setBillingInfo( billingInfo, orderId, updateMode, version, responseFields); </code></code> | setBillingInfo | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/orders/BillingInfoResource.java",
"license": "mit",
"size": 10907
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 890,386 |
public static void fullyDeleteOnExit(final File file) {
file.deleteOnExit();
if (file.isDirectory()) {
File[] files = file.listFiles();
if (files != null) {
for (File child : files) {
fullyDeleteOnExit(child);
}
}
}
} | static void function(final File file) { file.deleteOnExit(); if (file.isDirectory()) { File[] files = file.listFiles(); if (files != null) { for (File child : files) { fullyDeleteOnExit(child); } } } } | /**
* Register all files recursively to be deleted on exit.
* @param file File/directory to be deleted
*/ | Register all files recursively to be deleted on exit | fullyDeleteOnExit | {
"repo_name": "Ethanlm/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java",
"license": "apache-2.0",
"size": 48731
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,239,206 |
private Computer userInputComputer(Computer oldComputer, int id) throws CDBException {
LOGGER.info("User input new model.Computer, old : " + oldComputer);
try {
String name = lireSaisieUtilisateur("Enter computer Name (before : " + oldComputer.getName() + ") : ");
String int... | Computer function(Computer oldComputer, int id) throws CDBException { LOGGER.info(STR + oldComputer); try { String name = lireSaisieUtilisateur(STR + oldComputer.getName() + STR); String introduced = lireSaisieUtilisateur( STR + oldComputer.getIntroduced() + STR); LocalDateTime intro = null; if (!introduced.equals(STRE... | /**
* Instructs the user to enter information to update a computer.
* @param oldComputer old information
* @param id id of the computer
* @return model.Computer
* @throws CDBException is SQL fail
*/ | Instructs the user to enter information to update a computer | userInputComputer | {
"repo_name": "gdanguy/training-java-gdanguy",
"path": "console/src/main/java/cli/CliController.java",
"license": "apache-2.0",
"size": 15188
} | [
"java.time.LocalDateTime"
] | import java.time.LocalDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,818,622 |
public DurationConfigFieldBuilder range(final Duration minDuration, final Duration maxDuration) {
field.setAllowedRange(minDuration, maxDuration);
return this;
} | DurationConfigFieldBuilder function(final Duration minDuration, final Duration maxDuration) { field.setAllowedRange(minDuration, maxDuration); return this; } | /**
* set the range.
*
* @param minDuration
* min duration
* @param maxDuration
* max duration
* @return the builder
*/ | set the range | range | {
"repo_name": "StBurcher/hawkbit",
"path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/polling/DurationConfigField.java",
"license": "epl-1.0",
"size": 7209
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 990,095 |
public static void writeSpaces(Writer out, int spaces) throws IOException {
if (spaces == 0) {
return;
}
int len = padding.length;
while(spaces > len) {
out.write(padding, 0, len);
spaces -= len;
}
if (spaces > 0) {
out.write(padding, 0, spaces);
}
... | static void function(Writer out, int spaces) throws IOException { if (spaces == 0) { return; } int len = padding.length; while(spaces > len) { out.write(padding, 0, len); spaces -= len; } if (spaces > 0) { out.write(padding, 0, spaces); } } /** * {@inheritDoc} * * @param value {@inheritDoc} * @param start {@inheritDoc}... | /**
* Writes spaces for formatted output
*
* @param out the writer to output to
* @param spaces the number of spaces to write
*
* @throws IOException If an I/O error occurs
*/ | Writes spaces for formatted output | writeSpaces | {
"repo_name": "appnativa/rare",
"path": "source/util/src/com/appnativa/util/XMLUtils.java",
"license": "gpl-3.0",
"size": 15057
} | [
"java.io.IOException",
"java.io.Writer"
] | import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,715,189 |
public void startElement(java.lang.String uri, java.lang.String localName,
java.lang.String rawName, Attributes attributes)
throws SAXException {
iElement++;
contents.reset();
try {
if (rawName.compareTo("dbf") == 0) {
String dbfName = attributes.getValue("name");
String dbfEncoding = attr... | void function(java.lang.String uri, java.lang.String localName, java.lang.String rawName, Attributes attributes) throws SAXException { iElement++; contents.reset(); try { if (rawName.compareTo("dbf") == 0) { String dbfName = attributes.getValue("name"); String dbfEncoding = attributes.getValue(STR); if (dbfEncoding.len... | /**
* method called for each xml element found. <br>
* process logic
* <ul>
* <li>based on the name of the element found
* <li>for each pull appropriate attributes and construct object
* <li>if owned by another class, and all are except for Standard, add it to
* its parents object
* </ul>
*
* @para... | method called for each xml element found. process logic based on the name of the element found for each pull appropriate attributes and construct object if owned by another class, and all are except for Standard, add it to its parents object | startElement | {
"repo_name": "datacleaner/metamodel_extras",
"path": "dbase/src/main/java/org/xBaseJ/XBaseXmlParser.java",
"license": "lgpl-3.0",
"size": 8961
} | [
"java.io.IOException",
"org.xml.sax.Attributes",
"org.xml.sax.SAXException"
] | import java.io.IOException; import org.xml.sax.Attributes; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,645,517 |
public synchronized <E extends Event> void addListener(Class<E> type) {
if (!traces.isEmpty())
for (ChartTrace trace: traces)
trace.addListener(type);
} | synchronized <E extends Event> void function(Class<E> type) { if (!traces.isEmpty()) for (ChartTrace trace: traces) trace.addListener(type); } | /**
* Adds an event to the listeners list of all the traces.
*
* @param type the even added.
*/ | Adds an event to the listeners list of all the traces | addListener | {
"repo_name": "sfrancis1970/EpochX",
"path": "monitor/src/main/java/org/epochx/monitor/chart/Chart.java",
"license": "gpl-3.0",
"size": 8127
} | [
"org.epochx.event.Event"
] | import org.epochx.event.Event; | import org.epochx.event.*; | [
"org.epochx.event"
] | org.epochx.event; | 583,071 |
public void addExceptions(List<Exception> exceptions) {
if (caughtException != null) {
exceptions.add (caughtException);
}
}
| void function(List<Exception> exceptions) { if (caughtException != null) { exceptions.add (caughtException); } } | /** Append any reported exceptions to a master list.
* This is called after the tool has finished running.
*
* @param exceptions List of Exceptions. Exceptions may be appended
* to it by this call.
*/ | Append any reported exceptions to a master list. This is called after the tool has finished running | addExceptions | {
"repo_name": "dbirtwellharvard/fits",
"path": "src/edu/harvard/hul/ois/fits/tools/ToolBase.java",
"license": "gpl-3.0",
"size": 8598
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,319,850 |
public static MozuUrl getOrderNoteUrl(String noteId, String orderId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/notes/{noteId}?responseFields={responseFields}");
formatter.formatUrl("noteId", noteId);
formatter.formatUrl("orderId", orderId);
formatter.... | static MozuUrl function(String noteId, String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, noteId); formatter.formatUrl(STR, orderId); formatter.formatUrl(STR, responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; ... | /**
* Get Resource Url for GetOrderNote
* @param noteId Unique identifier of the order note to retrieve.
* @param orderId Unique identifier of the order associated with the note.
* @param responseFields Use this field to include those fields which are not included by default.
* @return String Resource Url
... | Get Resource Url for GetOrderNote | getOrderNoteUrl | {
"repo_name": "eileenzhuang1/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/urls/commerce/orders/OrderNoteUrl.java",
"license": "mit",
"size": 3463
} | [
"com.mozu.api.MozuUrl",
"com.mozu.api.utils.UrlFormatter"
] | import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; | import com.mozu.api.*; import com.mozu.api.utils.*; | [
"com.mozu.api"
] | com.mozu.api; | 64,546 |
public void setMongoPassword(final String password) {
Preconditions.checkNotNull(password);
set(MONGO_USER_PASSWORD, password);
} | void function(final String password) { Preconditions.checkNotNull(password); set(MONGO_USER_PASSWORD, password); } | /**
* Sets Mongo password
* @param password - password to connect to Mongo
*/ | Sets Mongo password | setMongoPassword | {
"repo_name": "pujav65/incubator-rya",
"path": "dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRdfConfiguration.java",
"license": "apache-2.0",
"size": 8242
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,692,063 |
@Before
public void before() throws Exception {
conf = new AccumuloRdfConfiguration();
conf.setTablePrefix("triplestore_");
final String tableName = GeoWaveGeoIndexer.getTableName(conf);
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, IS_MOCK);
conf.set(ConfigUtils.CLOUDBA... | void function() throws Exception { conf = new AccumuloRdfConfiguration(); conf.setTablePrefix(STR); final String tableName = GeoWaveGeoIndexer.getTableName(conf); conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, IS_MOCK); conf.set(ConfigUtils.CLOUDBASE_USER, ACCUMULO_USER); conf.set(ConfigUtils.CLOUDBASE_PASSWORD, ACCUMU... | /**
* Run before each test method.
* @throws Exception
*/ | Run before each test method | before | {
"repo_name": "meiercaleb/incubator-rya",
"path": "extras/rya.geoindexing/geo.geowave/src/test/java/org/apache/rya/indexing/accumulo/geo/GeoWaveIndexerSfTest.java",
"license": "apache-2.0",
"size": 20551
} | [
"com.google.common.collect.Sets",
"java.util.Set",
"org.apache.accumulo.core.client.admin.TableOperations",
"org.apache.rya.accumulo.AccumuloRdfConfiguration",
"org.apache.rya.indexing.GeoIndexerType",
"org.apache.rya.indexing.accumulo.ConfigUtils"
] | import com.google.common.collect.Sets; import java.util.Set; import org.apache.accumulo.core.client.admin.TableOperations; import org.apache.rya.accumulo.AccumuloRdfConfiguration; import org.apache.rya.indexing.GeoIndexerType; import org.apache.rya.indexing.accumulo.ConfigUtils; | import com.google.common.collect.*; import java.util.*; import org.apache.accumulo.core.client.admin.*; import org.apache.rya.accumulo.*; import org.apache.rya.indexing.*; import org.apache.rya.indexing.accumulo.*; | [
"com.google.common",
"java.util",
"org.apache.accumulo",
"org.apache.rya"
] | com.google.common; java.util; org.apache.accumulo; org.apache.rya; | 697,313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.