method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void writeObject(ObjectOutputStream s)
throws IOException
{
s.defaultWriteObject();
s.writeInt(size);
for (int i = table.length - 2; i >= 0; i -= 2)
{
Object key = table[i];
if (key != tombstone && key != emptyslot)
{
s.writeObject(key);
... | void function(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); s.writeInt(size); for (int i = table.length - 2; i >= 0; i -= 2) { Object key = table[i]; if (key != tombstone && key != emptyslot) { s.writeObject(key); s.writeObject(table[i + 1]); } } } | /**
* Writes the object to a serial stream.
*
* @param s the stream to write to
* @throws IOException if the underlying stream fails
* @serialData outputs the size (int), followed by that many key (Object)
* and value (Object) pairs, with the pairs in no particular
* order
... | Writes the object to a serial stream | writeObject | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/java/util/IdentityHashMap.java",
"license": "bsd-3-clause",
"size": 28607
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 363,710 |
public void removeScheduledJob(String name) {
ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class,
QuartzSchedulingService.class, false);
service.removeScheduledJob(name);
} | void function(String name) { ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false); service.removeScheduledJob(name); } | /**
* Removes scheduled job from scheduling service list
*
* @param name
* Scheduled job name
*/ | Removes scheduled job from scheduling service list | removeScheduledJob | {
"repo_name": "ant-media/Ant-Media-Server",
"path": "src/main/java/org/red5/server/adapter/MultiThreadedApplicationAdapter.java",
"license": "apache-2.0",
"size": 42040
} | [
"org.red5.server.api.scheduling.ISchedulingService",
"org.red5.server.scheduling.QuartzSchedulingService",
"org.red5.server.util.ScopeUtils"
] | import org.red5.server.api.scheduling.ISchedulingService; import org.red5.server.scheduling.QuartzSchedulingService; import org.red5.server.util.ScopeUtils; | import org.red5.server.api.scheduling.*; import org.red5.server.scheduling.*; import org.red5.server.util.*; | [
"org.red5.server"
] | org.red5.server; | 507,750 |
protected boolean removeFromMain(IsWidget widget) {
return m_main.remove(widget);
} | boolean function(IsWidget widget) { return m_main.remove(widget); } | /**
* Removes the given widget from the main panel.<p>
*
* @param widget the widget to remove
*
* @return <code>true</code> if the widget was a child of the main panel
*/ | Removes the given widget from the main panel | removeFromMain | {
"repo_name": "sbonoc/opencms-core",
"path": "src-gwt/org/opencms/ade/galleries/client/ui/CmsGalleryField.java",
"license": "lgpl-2.1",
"size": 30381
} | [
"com.google.gwt.user.client.ui.IsWidget"
] | import com.google.gwt.user.client.ui.IsWidget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,376,260 |
public void doDraw(Graphics2D g)
{
if(style == Style.INVISIBLE) return; // nothing to draw
Shape fillShape = getFillShape();
switch(style) {
case ROTATE:
g.setColor(Color.GREEN);
break;
case SEGMENT:
g.setColor(new Color(0, 128, 255));
break;
default:
g.setColor(Color.YELLOW);
break;... | void function(Graphics2D g) { if(style == Style.INVISIBLE) return; Shape fillShape = getFillShape(); switch(style) { case ROTATE: g.setColor(Color.GREEN); break; case SEGMENT: g.setColor(new Color(0, 128, 255)); break; default: g.setColor(Color.YELLOW); break; } g.fill(fillShape); g.setColor(Color.BLACK); g.draw(fillSh... | /**
* Draws itself, the look depends on style. If
* the style is Style.INVISIBLE, nothing is drawn at all
*/ | Draws itself, the look depends on style. If the style is Style.INVISIBLE, nothing is drawn at all | doDraw | {
"repo_name": "PathVisio/pathvisio",
"path": "modules/org.pathvisio.core/src/org/pathvisio/core/view/Handle.java",
"license": "apache-2.0",
"size": 7748
} | [
"java.awt.Color",
"java.awt.Graphics2D",
"java.awt.Shape"
] | import java.awt.Color; import java.awt.Graphics2D; import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 729,854 |
@Test
public void testProcessingTimeTimerWithState() throws Exception {
KeyedProcessOperator<Integer, Integer, String> operator =
new KeyedProcessOperator<>(new TriggeringStatefulFlatMapFunction(TimeDomain.PROCESSING_TIME));
OneInputStreamOperatorTestHarness<Integer, String> testHarness =
new KeyedOne... | void function() throws Exception { KeyedProcessOperator<Integer, Integer, String> operator = new KeyedProcessOperator<>(new TriggeringStatefulFlatMapFunction(TimeDomain.PROCESSING_TIME)); OneInputStreamOperatorTestHarness<Integer, String> testHarness = new KeyedOneInputStreamOperatorTestHarness<>(operator, new Identity... | /**
* Verifies that we don't have leakage between different keys.
*/ | Verifies that we don't have leakage between different keys | testProcessingTimeTimerWithState | {
"repo_name": "hequn8128/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/KeyedProcessOperatorTest.java",
"license": "apache-2.0",
"size": 20447
} | [
"java.util.concurrent.ConcurrentLinkedQueue",
"org.apache.flink.api.common.typeinfo.BasicTypeInfo",
"org.apache.flink.streaming.api.TimeDomain",
"org.apache.flink.streaming.runtime.streamrecord.StreamRecord",
"org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness",
"org.apache.flink.strea... | import java.util.concurrent.ConcurrentLinkedQueue; import org.apache.flink.api.common.typeinfo.BasicTypeInfo; import org.apache.flink.streaming.api.TimeDomain; import org.apache.flink.streaming.runtime.streamrecord.StreamRecord; import org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness; import org.a... | import java.util.concurrent.*; import org.apache.flink.api.common.typeinfo.*; import org.apache.flink.streaming.api.*; import org.apache.flink.streaming.runtime.streamrecord.*; import org.apache.flink.streaming.util.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 214,937 |
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeInt(this.chunkPosCoord.chunkXPos);
buf.writeInt(this.chunkPosCoord.chunkZPos);
buf.writeVarIntToBuffer(this.changedBlocks.length);
for (BlockUpdateData s22packetmultiblockchange$blockupdatedata : this.ch... | void function(PacketBuffer buf) throws IOException { buf.writeInt(this.chunkPosCoord.chunkXPos); buf.writeInt(this.chunkPosCoord.chunkZPos); buf.writeVarIntToBuffer(this.changedBlocks.length); for (BlockUpdateData s22packetmultiblockchange$blockupdatedata : this.changedBlocks) { buf.writeShort(s22packetmultiblockchange... | /**
* Writes the raw packet data to the data stream.
*/ | Writes the raw packet data to the data stream | writePacketData | {
"repo_name": "TorchPowered/CraftBloom",
"path": "src/net/minecraft/network/play/server/S22PacketMultiBlockChange.java",
"license": "mit",
"size": 3400
} | [
"java.io.IOException",
"net.minecraft.block.Block",
"net.minecraft.network.PacketBuffer"
] | import java.io.IOException; import net.minecraft.block.Block; import net.minecraft.network.PacketBuffer; | import java.io.*; import net.minecraft.block.*; import net.minecraft.network.*; | [
"java.io",
"net.minecraft.block",
"net.minecraft.network"
] | java.io; net.minecraft.block; net.minecraft.network; | 1,095,505 |
@SuppressWarnings("deprecation")
public void setStatusBarTintDrawable(Drawable drawable) {
if (mStatusBarAvailable) {
mStatusBarTintView.setBackgroundDrawable(drawable);
}
} | @SuppressWarnings(STR) void function(Drawable drawable) { if (mStatusBarAvailable) { mStatusBarTintView.setBackgroundDrawable(drawable); } } | /**
* Apply the specified drawable to the system status bar.
*
* @param drawable The drawable to use as the background, or null to remove it.
*/ | Apply the specified drawable to the system status bar | setStatusBarTintDrawable | {
"repo_name": "yuzhicong/LoveHuaLi",
"path": "app/src/main/java/com/yzc/lovehuali/tool/SystemBarTintManager.java",
"license": "mit",
"size": 19991
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 1,568,293 |
public static HashMap <String, Integer> getSplinePriorityLUT(){
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("*****BODY******", 0);
map.put("**RightArm", 0);
map.put("**LeftArm", 0);
map.put("**RightLeg", 0);
map.put("**LeftLeg", 0);
map.put("*****RLUNG******", 8);
map.put("... | static HashMap <String, Integer> function(){ HashMap<String, Integer> map = new HashMap<String, Integer>(); map.put(STR, 0); map.put(STR, 0); map.put(STR, 0); map.put(STR, 0); map.put(STR, 0); map.put(STR, 8); map.put(STR, 8); map.put(STR, 20); map.put(STR, 10); map.put(STR, 60); map.put(STR, 10); map.put(STR, 10); map... | /**
* Look up table for the priorites of the different shapes.
* Shapes with a higher priority are drawn over shapes with lower priority.
* @return the prioirity lut
*/ | Look up table for the priorites of the different shapes. Shapes with a higher priority are drawn over shapes with lower priority | getSplinePriorityLUT | {
"repo_name": "YixingHuang/CONRAD",
"path": "src/edu/stanford/rsl/conrad/phantom/xcat/XCatScene.java",
"license": "gpl-3.0",
"size": 67798
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,153,220 |
public static Matrix4f getScaleMatrix(Vector3f scale)
{
return getScaleMatrix(scale.getX(), scale.getY(), scale.getZ());
}
| static Matrix4f function(Vector3f scale) { return getScaleMatrix(scale.getX(), scale.getY(), scale.getZ()); } | /**
* Creates a matrix that represents a scale operation in the modelview stack
* @param scale the scale vector
* @return the matrix representing the scale operation
*/ | Creates a matrix that represents a scale operation in the modelview stack | getScaleMatrix | {
"repo_name": "guyfleeman/rayburn",
"path": "src/com/rayburn/engine/util/MathUtil.java",
"license": "gpl-3.0",
"size": 24632
} | [
"org.lwjgl.util.vector.Matrix4f",
"org.lwjgl.util.vector.Vector3f"
] | import org.lwjgl.util.vector.Matrix4f; import org.lwjgl.util.vector.Vector3f; | import org.lwjgl.util.vector.*; | [
"org.lwjgl.util"
] | org.lwjgl.util; | 927,993 |
@Test
public void testCoveredStartKey() throws Exception {
FullyQualifiedTableName table =
FullyQualifiedTableName.valueOf("tableCoveredStartKey");
try {
setupTable(table);
assertEquals(ROWKEYS.length, countRows());
// Mess it up by creating an overlap in the metadata
HRegio... | void function() throws Exception { FullyQualifiedTableName table = FullyQualifiedTableName.valueOf(STR); try { setupTable(table); assertEquals(ROWKEYS.length, countRows()); HRegionInfo hriOverlap = createRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes("A2"), Bytes.toBytes("B2")); TEST_UTIL.getHBaseCluster().getMas... | /**
* This creates and fixes a bad table where a region overlaps two regions --
* a start key contained in another region and its end key is contained in
* yet another region.
*/ | This creates and fixes a bad table where a region overlaps two regions -- a start key contained in another region and its end key is contained in yet another region | testCoveredStartKey | {
"repo_name": "francisliu/hbase_namespace",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java",
"license": "apache-2.0",
"size": 76656
} | [
"org.apache.hadoop.hbase.FullyQualifiedTableName",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.util.hbck.HbckTestingUtil",
"org.junit.Assert"
] | import org.apache.hadoop.hbase.FullyQualifiedTableName; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.util.hbck.HbckTestingUtil; import org.junit.Assert; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.hbck.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,945,392 |
public void parseResponse(InputStream input, HttpState state, HttpConnection conn)
throws IOException, HttpException {
try
{
int code = getStatusLine().getStatusCode();
if (code == WebdavStatus.SC_CONFLICT ||
code == WebdavStatus.SC_MULTI_STATUS ||... | void function(InputStream input, HttpState state, HttpConnection conn) throws IOException, HttpException { try { int code = getStatusLine().getStatusCode(); if (code == WebdavStatus.SC_CONFLICT code == WebdavStatus.SC_MULTI_STATUS code == WebdavStatus.SC_FORBIDDEN ) { parseXMLResponse(input); } } catch (IOException e) ... | /**
* Parse response.
*
* @param input Input stream
*/ | Parse response | parseResponse | {
"repo_name": "markkimsal/pengyou-clients",
"path": "lib-client/src/main/java/org/pengyou/client/lib/methods/PropPatchMethod.java",
"license": "apache-2.0",
"size": 8070
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.commons.httpclient.HttpConnection",
"org.apache.commons.httpclient.HttpException",
"org.apache.commons.httpclient.HttpState",
"org.pengyou.client.lib.util.WebdavStatus"
] | import java.io.IOException; import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpState; import org.pengyou.client.lib.util.WebdavStatus; | import java.io.*; import org.apache.commons.httpclient.*; import org.pengyou.client.lib.util.*; | [
"java.io",
"org.apache.commons",
"org.pengyou.client"
] | java.io; org.apache.commons; org.pengyou.client; | 1,267,380 |
protected static WorkspaceInitializer createInitializer(ProjectImporter importer) {
assertNotNull("Project importer argument cannot be null.", importer);
return new WorkspaceInitializer(new Supplier<Void>() { | static WorkspaceInitializer function(ProjectImporter importer) { assertNotNull(STR, importer); return new WorkspaceInitializer(new Supplier<Void>() { | /**
* Creates a workspace initializer with the given project importer.
*
* @param importer
* the importer to import the project into the workspace.
* @return a new initializer instance.
*/ | Creates a workspace initializer with the given project importer | createInitializer | {
"repo_name": "lbeurerkellner/n4js",
"path": "tests/org.eclipse.n4js.ui.tests/src/org/eclipse/n4js/tests/bugs/WorkspaceInitializer.java",
"license": "epl-1.0",
"size": 2786
} | [
"com.google.common.base.Supplier",
"org.junit.Assert"
] | import com.google.common.base.Supplier; import org.junit.Assert; | import com.google.common.base.*; import org.junit.*; | [
"com.google.common",
"org.junit"
] | com.google.common; org.junit; | 2,028,143 |
@JsonSetter("voiceUriId")
public void setVoiceUriId (int value) {
this.voiceUriId = value;
}
| @JsonSetter(STR) void function (int value) { this.voiceUriId = value; } | /** SETTER
* The identifier of the voice URI
*/ | SETTER The identifier of the voice URI | setVoiceUriId | {
"repo_name": "voxbone/voxapi-client-java",
"path": "APIv3SandboxLib/src/com/voxbone/sandbox/models/VoiceUriSaveModel.java",
"license": "mit",
"size": 2525
} | [
"com.fasterxml.jackson.annotation.JsonSetter"
] | import com.fasterxml.jackson.annotation.JsonSetter; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 865,901 |
RecordSetListResponse list(String resourceGroupName, String zoneName, RecordType recordType, RecordSetListParameters parameters) throws IOException, ServiceException; | RecordSetListResponse list(String resourceGroupName, String zoneName, RecordType recordType, RecordSetListParameters parameters) throws IOException, ServiceException; | /**
* Lists the RecordSets of a specified type in a DNS zone.
*
* @param resourceGroupName Required. The name of the resource group that
* contains the zone.
* @param zoneName Required. The name of the zone from which to enumerate
* RecordsSets.
* @param recordType Required. The type of reco... | Lists the RecordSets of a specified type in a DNS zone | list | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "resource-management/azure-mgmt-dns/src/main/java/com/microsoft/azure/management/dns/RecordSetOperations.java",
"license": "apache-2.0",
"size": 10744
} | [
"com.microsoft.azure.management.dns.models.RecordSetListParameters",
"com.microsoft.azure.management.dns.models.RecordSetListResponse",
"com.microsoft.azure.management.dns.models.RecordType",
"com.microsoft.windowsazure.exception.ServiceException",
"java.io.IOException"
] | import com.microsoft.azure.management.dns.models.RecordSetListParameters; import com.microsoft.azure.management.dns.models.RecordSetListResponse; import com.microsoft.azure.management.dns.models.RecordType; import com.microsoft.windowsazure.exception.ServiceException; import java.io.IOException; | import com.microsoft.azure.management.dns.models.*; import com.microsoft.windowsazure.exception.*; import java.io.*; | [
"com.microsoft.azure",
"com.microsoft.windowsazure",
"java.io"
] | com.microsoft.azure; com.microsoft.windowsazure; java.io; | 2,668,993 |
public boolean addGroup(IGMPGroup group) {
checkNotNull(group);
switch (this.igmpType) {
case TYPE_IGMPV3_MEMBERSHIP_QUERY:
if (group instanceof IGMPMembership) {
return false;
}
if (group.sources.size() > 1) {
... | boolean function(IGMPGroup group) { checkNotNull(group); switch (this.igmpType) { case TYPE_IGMPV3_MEMBERSHIP_QUERY: if (group instanceof IGMPMembership) { return false; } if (group.sources.size() > 1) { return false; } break; case TYPE_IGMPV3_MEMBERSHIP_REPORT: if (group instanceof IGMPMembership) { return false; } br... | /**
* Add a multicast group to this IGMP message.
*
* @param group the IGMPGroup will be IGMPQuery or IGMPMembership depending on the message type.
* @return true if group was valid and added, false otherwise.
*/ | Add a multicast group to this IGMP message | addGroup | {
"repo_name": "packet-tracker/onos",
"path": "utils/misc/src/main/java/org/onlab/packet/IGMP.java",
"license": "apache-2.0",
"size": 9865
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,003,851 |
public final Region createRegion(String name,
RegionAttributes attrs)
throws CacheException {
return createRegion(name, "root", attrs);
} | final Region function(String name, RegionAttributes attrs) throws CacheException { return createRegion(name, "root", attrs); } | /**
* Returns a region with the given name and attributes
*/ | Returns a region with the given name and attributes | createRegion | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache30/CacheTestCase.java",
"license": "apache-2.0",
"size": 21662
} | [
"com.gemstone.gemfire.cache.CacheException",
"com.gemstone.gemfire.cache.Region",
"com.gemstone.gemfire.cache.RegionAttributes"
] | import com.gemstone.gemfire.cache.CacheException; import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.RegionAttributes; | import com.gemstone.gemfire.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 697,222 |
int countBySearchOrder(@NotNull SearchOrder searchOrder);
/**
* Finds a single page of entity ids matching the provided {@link SearchOrder} | int countBySearchOrder(@NotNull SearchOrder searchOrder); /** * Finds a single page of entity ids matching the provided {@link SearchOrder} | /**
* Counts all persisted entities of type {@code T} matching the provided
* {@link SearchOrder} specification.
*
* @param searchOrder
* the search specification
* @return T entity count
*/ | Counts all persisted entities of type T matching the provided <code>SearchOrder</code> specification | countBySearchOrder | {
"repo_name": "ursjoss/sipamato",
"path": "core/core-persistence-jooq/src/main/java/ch/difty/scipamato/core/persistence/paper/searchorder/BySearchOrderRepository.java",
"license": "gpl-3.0",
"size": 2253
} | [
"ch.difty.scipamato.core.entity.search.SearchOrder",
"org.jetbrains.annotations.NotNull"
] | import ch.difty.scipamato.core.entity.search.SearchOrder; import org.jetbrains.annotations.NotNull; | import ch.difty.scipamato.core.entity.search.*; import org.jetbrains.annotations.*; | [
"ch.difty.scipamato",
"org.jetbrains.annotations"
] | ch.difty.scipamato; org.jetbrains.annotations; | 2,065,080 |
@Transactional(propagation = Propagation.REQUIRED)
public Project create(final Project project, Long parentId) {
project.setOwner(authManager.getAuthorizedUser());
Project helpProject = project;
boolean newProject = checkNewProject(helpProject);
projectDao.saveProject(helpProje... | @Transactional(propagation = Propagation.REQUIRED) Project function(final Project project, Long parentId) { project.setOwner(authManager.getAuthorizedUser()); Project helpProject = project; boolean newProject = checkNewProject(helpProject); projectDao.saveProject(helpProject, parentId); Project loadedProject = this.loa... | /**
* Saves a new project to the database or updates an existing one. Also saves all project items passed, if they
* are not null. If a {@param parentId} is specified, saves a new project into existing parent project. Works only
* for creating new project
*
* @param project a {@code Project} to... | Saves a new project to the database or updates an existing one. Also saves all project items passed, if they are not null. If a parentId is specified, saves a new project into existing parent project. Works only for creating new project | create | {
"repo_name": "epam/NGB",
"path": "server/catgenome/src/main/java/com/epam/catgenome/manager/project/ProjectManager.java",
"license": "mit",
"size": 33785
} | [
"com.epam.catgenome.component.MessageHelper",
"com.epam.catgenome.constant.MessagesConstants",
"com.epam.catgenome.entity.BiologicalDataItem",
"com.epam.catgenome.entity.BiologicalDataItemFormat",
"com.epam.catgenome.entity.gene.GeneFile",
"com.epam.catgenome.entity.project.Project",
"com.epam.catgenome... | import com.epam.catgenome.component.MessageHelper; import com.epam.catgenome.constant.MessagesConstants; import com.epam.catgenome.entity.BiologicalDataItem; import com.epam.catgenome.entity.BiologicalDataItemFormat; import com.epam.catgenome.entity.gene.GeneFile; import com.epam.catgenome.entity.project.Project; impor... | import com.epam.catgenome.component.*; import com.epam.catgenome.constant.*; import com.epam.catgenome.entity.*; import com.epam.catgenome.entity.gene.*; import com.epam.catgenome.entity.project.*; import com.epam.catgenome.entity.reference.*; import com.epam.catgenome.entity.vcf.*; import java.util.*; import java.util... | [
"com.epam.catgenome",
"java.util",
"org.springframework.transaction",
"org.springframework.util"
] | com.epam.catgenome; java.util; org.springframework.transaction; org.springframework.util; | 245,105 |
void appendBlocks(INodeFile [] inodes, int totalAddedBlocks) {
int size = this.blocks.length;
BlockInfo[] newlist = new BlockInfo[size + totalAddedBlocks];
System.arraycopy(this.blocks, 0, newlist, 0, size);
for(INodeFile in: inodes) {
System.arraycopy(in.blocks, 0, newlist, size, in.blocks.le... | void appendBlocks(INodeFile [] inodes, int totalAddedBlocks) { int size = this.blocks.length; BlockInfo[] newlist = new BlockInfo[size + totalAddedBlocks]; System.arraycopy(this.blocks, 0, newlist, 0, size); for(INodeFile in: inodes) { System.arraycopy(in.blocks, 0, newlist, size, in.blocks.length); size += in.blocks.l... | /**
* append array of blocks to this.blocks
*/ | append array of blocks to this.blocks | appendBlocks | {
"repo_name": "aseldawy/spatialhadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/INodeFile.java",
"license": "apache-2.0",
"size": 6889
} | [
"org.apache.hadoop.hdfs.server.namenode.BlocksMap"
] | import org.apache.hadoop.hdfs.server.namenode.BlocksMap; | import org.apache.hadoop.hdfs.server.namenode.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,891,970 |
@Test
public void readCount() {
DataSource source = new SimpleFileDataSource(
"src/test/resources/archive-ramps-1H.csv", 10);
try {
start = dateFormat.parse("2014-12-04 00:00").toInstant();
end = dateFormat.parse("2014-12-04 00:30").toInstant();
... | void function() { DataSource source = new SimpleFileDataSource( STR, 10); try { start = dateFormat.parse(STR).toInstant(); end = dateFormat.parse(STR).toInstant(); DataRequestThread thread = new DataRequestThread(STR, source, TimeInterval.between(start, end)); thread.addListener(new TUListener()); startAndCount(thread)... | /**
* Test that no data is missing when requesting the source.
*/ | Test that no data is missing when requesting the source | readCount | {
"repo_name": "ControlSystemStudio/diirt",
"path": "pvmanager/datasource-timecache/src/test/java/org/diirt/datasource/timecache/impl/SimpleFileDataSourceUnitTests.java",
"license": "mit",
"size": 10917
} | [
"org.diirt.datasource.timecache.DataRequestThread",
"org.diirt.datasource.timecache.impl.SimpleFileDataSource",
"org.diirt.datasource.timecache.source.DataSource",
"org.diirt.util.time.TimeInterval",
"org.junit.Assert"
] | import org.diirt.datasource.timecache.DataRequestThread; import org.diirt.datasource.timecache.impl.SimpleFileDataSource; import org.diirt.datasource.timecache.source.DataSource; import org.diirt.util.time.TimeInterval; import org.junit.Assert; | import org.diirt.datasource.timecache.*; import org.diirt.datasource.timecache.impl.*; import org.diirt.datasource.timecache.source.*; import org.diirt.util.time.*; import org.junit.*; | [
"org.diirt.datasource",
"org.diirt.util",
"org.junit"
] | org.diirt.datasource; org.diirt.util; org.junit; | 809,483 |
public static @NonNull IdentityCredentialStore getInstance(@NonNull Context context) {
Context appContext = context.getApplicationContext();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
IdentityCredentialStore store =
HardwareIdentityCredentialStore.getInstan... | static @NonNull IdentityCredentialStore function(@NonNull Context context) { Context appContext = context.getApplicationContext(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { IdentityCredentialStore store = HardwareIdentityCredentialStore.getInstanceIfSupported(appContext); if (store != null) { return store; ... | /**
* Gets the default {@link IdentityCredentialStore}.
*
* @param context the application context.
* @return the {@link IdentityCredentialStore}.
*/ | Gets the default <code>IdentityCredentialStore</code> | getInstance | {
"repo_name": "google/mdl-ref-apps",
"path": "identity/src/main/java/androidx/security/identity/IdentityCredentialStore.java",
"license": "apache-2.0",
"size": 15421
} | [
"android.content.Context",
"android.os.Build",
"androidx.annotation.NonNull"
] | import android.content.Context; import android.os.Build; import androidx.annotation.NonNull; | import android.content.*; import android.os.*; import androidx.annotation.*; | [
"android.content",
"android.os",
"androidx.annotation"
] | android.content; android.os; androidx.annotation; | 2,573,074 |
protected final void setHeaderScroll(int value) {
if (DEBUG) {
Log.d(LOG_TAG, "setHeaderScroll: " + value);
}
// Clamp value to with pull scroll range
final int maximumPullScroll = getMaximumPullScroll();
value = Math
.min(maximumPullScroll, Math.max(-maximumPullScroll, value));
if (mLayoutVisib... | final void function(int value) { if (DEBUG) { Log.d(LOG_TAG, STR + value); } final int maximumPullScroll = getMaximumPullScroll(); value = Math .min(maximumPullScroll, Math.max(-maximumPullScroll, value)); if (mLayoutVisibilityChangesEnabled) { if (value < 0) { mHeaderLayout.setVisibility(View.VISIBLE); } else if (valu... | /**
* Helper method which just calls scrollTo() in the correct scrolling
* direction.
*
* @param value
* - New Scroll value
*/ | Helper method which just calls scrollTo() in the correct scrolling direction | setHeaderScroll | {
"repo_name": "lingganhezi/dedecmsapp",
"path": "android/PulltoRefresh/src/com/handmark/pulltorefresh/library/PullToRefreshBase.java",
"license": "apache-2.0",
"size": 47334
} | [
"android.util.Log",
"android.view.View",
"com.handmark.pulltorefresh.library.internal.ViewCompat"
] | import android.util.Log; import android.view.View; import com.handmark.pulltorefresh.library.internal.ViewCompat; | import android.util.*; import android.view.*; import com.handmark.pulltorefresh.library.internal.*; | [
"android.util",
"android.view",
"com.handmark.pulltorefresh"
] | android.util; android.view; com.handmark.pulltorefresh; | 1,818,546 |
public static void setNumLinesPerSplit(Job job, int numLines) {
job.getConfiguration().setInt(LINES_PER_MAP, numLines);
} | static void function(Job job, int numLines) { job.getConfiguration().setInt(LINES_PER_MAP, numLines); } | /**
* Set the number of lines per split
* @param job the job to modify
* @param numLines the number of lines per split
*/ | Set the number of lines per split | setNumLinesPerSplit | {
"repo_name": "kbase/jnomics",
"path": "src/main/java/edu/cshl/schatz/jnomics/manager/server/NLineInputFormat.java",
"license": "mit",
"size": 5779
} | [
"org.apache.hadoop.mapreduce.Job"
] | import org.apache.hadoop.mapreduce.Job; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,102,718 |
protected InputStream openInputStream(Request request) throws IOException, URISyntaxException {
final URLConnection urlConnection = request.getURL().openConnection();
configURLConnection(urlConnection);
request.setResponseContentLength(urlConnection.getContentLength());
return urlConnection.getInputSt... | InputStream function(Request request) throws IOException, URISyntaxException { final URLConnection urlConnection = request.getURL().openConnection(); configURLConnection(urlConnection); request.setResponseContentLength(urlConnection.getContentLength()); return urlConnection.getInputStream(); } | /**
* Helper method for subclasses - actually opens an {@link java.io.InputStream} and sets
* content length inside the passed {@link ru.jango.j0loader.Request} object -
* {@link ru.jango.j0loader.Request#setResponseContentLength(long)}.
*/ | Helper method for subclasses - actually opens an <code>java.io.InputStream</code> and sets content length inside the passed <code>ru.jango.j0loader.Request</code> object - <code>ru.jango.j0loader.Request#setResponseContentLength(long)</code> | openInputStream | {
"repo_name": "janng0/Android-J0Loader",
"path": "src/main/java/ru/jango/j0loader/DataLoader.java",
"license": "mit",
"size": 22767
} | [
"java.io.IOException",
"java.io.InputStream",
"java.net.URISyntaxException",
"java.net.URLConnection"
] | import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.net.URLConnection; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,604,320 |
private boolean matchQueryParams(MultiValueMap<String, String> registeredRedirectUriQueryParams,
MultiValueMap<String, String> requestedRedirectUriQueryParams) {
Iterator<String> iter = registeredRedirectUriQueryParams.keySet().iterator();
while (iter.hasNext()) {
String key = iter.next();
List... | boolean function(MultiValueMap<String, String> registeredRedirectUriQueryParams, MultiValueMap<String, String> requestedRedirectUriQueryParams) { Iterator<String> iter = registeredRedirectUriQueryParams.keySet().iterator(); while (iter.hasNext()) { String key = iter.next(); List<String> registeredRedirectUriQueryParams... | /**
* Checks whether the registered redirect uri query params key and values contains match the requested set
*
* The requested redirect uri query params are allowed to contain additional params which will be retained
*
* @param registeredRedirectUriQueryParams
* @param requestedRedirectUriQueryParams
* @... | Checks whether the registered redirect uri query params key and values contains match the requested set The requested redirect uri query params are allowed to contain additional params which will be retained | matchQueryParams | {
"repo_name": "spring-projects/spring-security-oauth",
"path": "spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/endpoint/DefaultRedirectResolver.java",
"license": "apache-2.0",
"size": 9182
} | [
"java.util.Iterator",
"java.util.List",
"org.springframework.util.MultiValueMap"
] | import java.util.Iterator; import java.util.List; import org.springframework.util.MultiValueMap; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 574,820 |
public void setTime(final Date time) {
_time = time;
} | void function(final Date time) { _time = time; } | /**
* Sets the value of field 'time'. The field 'time' has the following
* description: The time at which this event was generated. The time is in
* the format generated by the java.text.DateFormat using the
* DateFormat.FULL style for the default locale. For example:
* "Monday, February 18, 2002 3:01:58 PM E... | Sets the value of field 'time'. The field 'time' has the following description: The time at which this event was generated. The time is in the format generated by the java.text.DateFormat using the DateFormat.FULL style for the default locale. For example: "Monday, February 18, 2002 3:01:58 PM EST" | setTime | {
"repo_name": "jeffgdotorg/opennms",
"path": "features/events/api/src/main/java/org/opennms/netmgt/xml/event/Event.java",
"license": "gpl-2.0",
"size": 49673
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,665,467 |
public void setOrigin(BlockVector3 origin) {
checkNotNull(origin);
this.origin = origin;
} | void function(BlockVector3 origin) { checkNotNull(origin); this.origin = origin; } | /**
* Set the origin.
*
* @param origin the origin
*/ | Set the origin | setOrigin | {
"repo_name": "HolodeckOne-Minecraft/WorldEdit",
"path": "worldedit-core/src/main/java/com/sk89q/worldedit/function/pattern/RepeatingExtentPattern.java",
"license": "gpl-3.0",
"size": 2773
} | [
"com.google.common.base.Preconditions",
"com.sk89q.worldedit.math.BlockVector3"
] | import com.google.common.base.Preconditions; import com.sk89q.worldedit.math.BlockVector3; | import com.google.common.base.*; import com.sk89q.worldedit.math.*; | [
"com.google.common",
"com.sk89q.worldedit"
] | com.google.common; com.sk89q.worldedit; | 139,190 |
private Translet getTransletInstance()
throws TransformerConfigurationException {
try {
if (_name == null) return null;
if (_class == null) defineTransletClasses();
// The translet needs to keep a reference to all its auxiliary
// class to prevent the GC from collecting them
A... | Translet function() throws TransformerConfigurationException { try { if (_name == null) return null; if (_class == null) defineTransletClasses(); AbstractTranslet translet = (AbstractTranslet) _class[_transletIndex].newInstance(); translet.postInitialization(); translet.setTemplates(this); if (_auxClasses != null) { tr... | /**
* This method generates an instance of the translet class that is
* wrapped inside this Template. The translet instance will later
* be wrapped inside a Transformer object.
*/ | This method generates an instance of the translet class that is wrapped inside this Template. The translet instance will later be wrapped inside a Transformer object | getTransletInstance | {
"repo_name": "oscerd/servicemix-bundles",
"path": "xalan-2.7.2/src/main/java/org/apache/xalan/xsltc/trax/TemplatesImpl.java",
"license": "apache-2.0",
"size": 12518
} | [
"javax.xml.transform.TransformerConfigurationException",
"org.apache.xalan.xsltc.Translet",
"org.apache.xalan.xsltc.compiler.util.ErrorMsg",
"org.apache.xalan.xsltc.runtime.AbstractTranslet"
] | import javax.xml.transform.TransformerConfigurationException; import org.apache.xalan.xsltc.Translet; import org.apache.xalan.xsltc.compiler.util.ErrorMsg; import org.apache.xalan.xsltc.runtime.AbstractTranslet; | import javax.xml.transform.*; import org.apache.xalan.xsltc.*; import org.apache.xalan.xsltc.compiler.util.*; import org.apache.xalan.xsltc.runtime.*; | [
"javax.xml",
"org.apache.xalan"
] | javax.xml; org.apache.xalan; | 961,591 |
public Artist findByG_S_First(long groupId, int status,
com.liferay.portal.kernel.util.OrderByComparator<Artist> orderByComparator)
throws NoSuchArtistException; | Artist function(long groupId, int status, com.liferay.portal.kernel.util.OrderByComparator<Artist> orderByComparator) throws NoSuchArtistException; | /**
* Returns the first artist in the ordered set where groupId = ? and status = ?.
*
* @param groupId the group ID
* @param status the status
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching artist
* @throws NoSuchArtistException i... | Returns the first artist in the ordered set where groupId = ? and status = ? | findByG_S_First | {
"repo_name": "liferay-labs/jukebox-portlet",
"path": "jukebox/jukebox-api/src/main/java/org/liferay/jukebox/service/persistence/ArtistPersistence.java",
"license": "gpl-2.0",
"size": 89289
} | [
"org.liferay.jukebox.exception.NoSuchArtistException",
"org.liferay.jukebox.model.Artist"
] | import org.liferay.jukebox.exception.NoSuchArtistException; import org.liferay.jukebox.model.Artist; | import org.liferay.jukebox.exception.*; import org.liferay.jukebox.model.*; | [
"org.liferay.jukebox"
] | org.liferay.jukebox; | 2,640,499 |
protected boolean checkRole(User user,String groupDn){
boolean isSelf = false;
Groups groups = user.getGroups();
for (Group group : groups.values()){
String dn = Val.chkStr(group.getDistinguishedName());
if(dn.equals(groupDn)){
isSelf = true;
break;
}
}
return isSelf;
} | boolean function(User user,String groupDn){ boolean isSelf = false; Groups groups = user.getGroups(); for (Group group : groups.values()){ String dn = Val.chkStr(group.getDistinguishedName()); if(dn.equals(groupDn)){ isSelf = true; break; } } return isSelf; } | /**
* Checks if user role matches provided groups distinguished name.
* @param user user
* @param groupDn group distingushed name
* @return true if managed user role is same as groupDn
*/ | Checks if user role matches provided groups distinguished name | checkRole | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/server/identity/ManageUserServlet.java",
"license": "apache-2.0",
"size": 33983
} | [
"com.esri.gpt.framework.security.principal.Group",
"com.esri.gpt.framework.security.principal.Groups",
"com.esri.gpt.framework.security.principal.User",
"com.esri.gpt.framework.util.Val"
] | import com.esri.gpt.framework.security.principal.Group; import com.esri.gpt.framework.security.principal.Groups; import com.esri.gpt.framework.security.principal.User; import com.esri.gpt.framework.util.Val; | import com.esri.gpt.framework.security.principal.*; import com.esri.gpt.framework.util.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 1,875,203 |
private static void filteredCopy(File source, Path destination, Set<File> skip,
Map<File, String> replace) throws IOException {
File destinationFile = destination.toFile();
if (source.isDirectory()) {
File[] children = source.listFiles();
if (children != null) {
if (!destinationFile... | static void function(File source, Path destination, Set<File> skip, Map<File, String> replace) throws IOException { File destinationFile = destination.toFile(); if (source.isDirectory()) { File[] children = source.listFiles(); if (children != null) { if (!destinationFile.exists()) { boolean success = destinationFile.mk... | /**
* Copies one resource directory tree into another; skipping some files, replacing the contents of
* some, and passing everything else through unmodified
*/ | Copies one resource directory tree into another; skipping some files, replacing the contents of some, and passing everything else through unmodified | filteredCopy | {
"repo_name": "hhclam/bazel",
"path": "src/tools/android/java/com/google/devtools/build/android/ResourceShrinker.java",
"license": "apache-2.0",
"size": 38577
} | [
"com.google.common.base.Charsets",
"com.google.common.io.Files",
"java.io.File",
"java.io.IOException",
"java.nio.file.Path",
"java.util.Map",
"java.util.Set"
] | import com.google.common.base.Charsets; import com.google.common.io.Files; import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.util.Map; import java.util.Set; | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.nio.file.*; import java.util.*; | [
"com.google.common",
"java.io",
"java.nio",
"java.util"
] | com.google.common; java.io; java.nio; java.util; | 1,530,631 |
public List<Part> getParts() {
return body.getParts();
} | List<Part> function() { return body.getParts(); } | /**
* This method is used to get all <code>Part</code> objects that
* are associated with the request. Each attachment contains the
* body and headers associated with it. If the request is not a
* multipart POST request then this will return an empty list.
*
* @return the list of parts associ... | This method is used to get all <code>Part</code> objects that are associated with the request. Each attachment contains the body and headers associated with it. If the request is not a multipart POST request then this will return an empty list | getParts | {
"repo_name": "TehSomeLuigi/SomeLuigisPeripherals2",
"path": "src_simpleframework/trs/org/simpleframework/http/core/RequestEntity.java",
"license": "gpl-3.0",
"size": 13622
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 199,597 |
private void processIntent(Intent intent) {
if (intent == null) {
return;
}
Bundle extras = intent.getExtras();
if (extras.containsKey(FamiliarConstants.KEY_FIVE_MINUTE_WARNING)) {
mFiveMinuteWarning = extras.getBoolean(FamiliarConstants.KE... | void function(Intent intent) { if (intent == null) { return; } Bundle extras = intent.getExtras(); if (extras.containsKey(FamiliarConstants.KEY_FIVE_MINUTE_WARNING)) { mFiveMinuteWarning = extras.getBoolean(FamiliarConstants.KEY_FIVE_MINUTE_WARNING); } if (extras.containsKey(FamiliarConstants.KEY_TEN_MINUTE_WARNING)) {... | /**
* Intents come in when the service is started & through the broadcast receiver.
* This processes them just the same, setting up warning booleans and managing the
* countdown timer.
*
* @param intent The intent to process
*/ | Intents come in when the service is started & through the broadcast receiver. This processes them just the same, setting up warning booleans and managing the countdown timer | processIntent | {
"repo_name": "fenfir/mtg-familiar",
"path": "wear/src/main/java/com/gelakinetic/mtgfam/CountdownService.java",
"license": "mit",
"size": 13237
} | [
"android.content.Intent",
"android.os.Bundle"
] | import android.content.Intent; import android.os.Bundle; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,039,098 |
static void closeOnFlush(Channel ch) {
if (ch.isConnected()) {
ch.write(ChannelBuffers.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE);
}
}
| static void closeOnFlush(Channel ch) { if (ch.isConnected()) { ch.write(ChannelBuffers.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE); } } | /**
* Closes the specified channel after all queued write requests are flushed.
*/ | Closes the specified channel after all queued write requests are flushed | closeOnFlush | {
"repo_name": "edouardswiac/Java-Websockify",
"path": "src/main/java/com/netiq/websockify/DirectProxyHandler.java",
"license": "mit",
"size": 6377
} | [
"org.jboss.netty.buffer.ChannelBuffers",
"org.jboss.netty.channel.Channel",
"org.jboss.netty.channel.ChannelFutureListener"
] | import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelFutureListener; | import org.jboss.netty.buffer.*; import org.jboss.netty.channel.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 545,450 |
private Entry readEntry(BufferedReader reader) throws IOException {
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
Entry entry = parseEntry(line);
if (entry != null) {
return entry;
}
}
return null;
} | Entry function(BufferedReader reader) throws IOException { for (String line = reader.readLine(); line != null; line = reader.readLine()) { Entry entry = parseEntry(line); if (entry != null) { return entry; } } return null; } | /**
* Reads next entry from the reader.
*
* @return entry or <code>null</code> if no more data in the stream
* @throws IOException if reading from stream fails
*/ | Reads next entry from the reader | readEntry | {
"repo_name": "pandzel/RobotsTxt",
"path": "src/main/java/com/panforge/robotstxt/RobotsTxtReader.java",
"license": "apache-2.0",
"size": 5753
} | [
"java.io.BufferedReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,689,437 |
public com.google.container.v1.Operation setNodePoolManagement(com.google.container.v1.SetNodePoolManagementRequest request) {
return blockingUnaryCall(
getChannel(), getSetNodePoolManagementMethodHelper(), getCallOptions(), request);
} | com.google.container.v1.Operation function(com.google.container.v1.SetNodePoolManagementRequest request) { return blockingUnaryCall( getChannel(), getSetNodePoolManagementMethodHelper(), getCallOptions(), request); } | /**
* <pre>
* Sets the NodeManagement options for a node pool.
* </pre>
*/ | <code> Sets the NodeManagement options for a node pool. </code> | setNodePoolManagement | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterManagerGrpc.java",
"license": "bsd-3-clause",
"size": 147597
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 2,509,946 |
Coordinate3D getLocation(); | Coordinate3D getLocation(); | /**
* Method to get the location of the Chest.
*
* @return The location of the Chest.
*/ | Method to get the location of the Chest | getLocation | {
"repo_name": "SmithsGaming/Tiny-Storage",
"path": "src/main/java/com/smithsmodding/tinystorage/api/common/chest/IModularChest.java",
"license": "gpl-3.0",
"size": 2086
} | [
"com.smithsmodding.smithscore.util.common.positioning.Coordinate3D"
] | import com.smithsmodding.smithscore.util.common.positioning.Coordinate3D; | import com.smithsmodding.smithscore.util.common.positioning.*; | [
"com.smithsmodding.smithscore"
] | com.smithsmodding.smithscore; | 1,266,637 |
public Queue<Station> approxShortestPath(Station start, Station end)
{
//Create a hash from station IDs to extra data needed for this algorithm.
HashMap<String, ApproxSearchExtra> station_extras =
new HashMap<String, ApproxSearchExtra>();
for (Station station : getStations())
station_extras.... | Queue<Station> function(Station start, Station end) { HashMap<String, ApproxSearchExtra> station_extras = new HashMap<String, ApproxSearchExtra>(); for (Station station : getStations()) station_extras.put(station.getId(), new ApproxSearchExtra()); HashSet<Station> closed = new HashSet<Station>(); HashSet<Station> open ... | /**
Find an approximated shortest path between two stations. Uses A* algorithm to
find the result.
@param start Beginning station in path.
@param end Station to search.
@return Path of stations from start to end. Null if a best path could not be
found.
*/ | algorithm to | approxShortestPath | {
"repo_name": "meoblast001/thugaim",
"path": "src/info/meoblast001/thugaim/StationGraph.java",
"license": "mit",
"size": 10864
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Queue"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Queue; | import java.util.*; | [
"java.util"
] | java.util; | 2,217,249 |
@Observer(KiWiEvents.ACTIVITY_TWEET)
public void tweetActivity(User user, ContentItem message) {
TweetActivity a = new TweetActivity();
a.setUser(user);
a.setContentItem(message);
entityManager.persist(a);
log.debug("registered user activity of user #0: #1",user.getLogi... | @Observer(KiWiEvents.ACTIVITY_TWEET) void function(User user, ContentItem message) { TweetActivity a = new TweetActivity(); a.setUser(user); a.setContentItem(message); entityManager.persist(a); log.debug(STR,user.getLogin(),message); } | /**
* Register that a user has performed a free-form activity inside the KiWi system
* that he manually specified. The activity is passed as argument "message".
*
* @param user the user who performed the activity
* @param message the description of the activity performed
*/ | Register that a user has performed a free-form activity inside the KiWi system that he manually specified. The activity is passed as argument "message" | tweetActivity | {
"repo_name": "fregaham/KiWi",
"path": "src/action/kiwi/service/activity/ActivityLoggingServiceImpl.java",
"license": "bsd-3-clause",
"size": 14398
} | [
"kiwi.api.event.KiWiEvents",
"kiwi.model.activity.TweetActivity",
"kiwi.model.content.ContentItem",
"kiwi.model.user.User",
"org.jboss.seam.annotations.Observer"
] | import kiwi.api.event.KiWiEvents; import kiwi.model.activity.TweetActivity; import kiwi.model.content.ContentItem; import kiwi.model.user.User; import org.jboss.seam.annotations.Observer; | import kiwi.api.event.*; import kiwi.model.activity.*; import kiwi.model.content.*; import kiwi.model.user.*; import org.jboss.seam.annotations.*; | [
"kiwi.api.event",
"kiwi.model.activity",
"kiwi.model.content",
"kiwi.model.user",
"org.jboss.seam"
] | kiwi.api.event; kiwi.model.activity; kiwi.model.content; kiwi.model.user; org.jboss.seam; | 2,170,220 |
@Message(id=16832, value = "Unexpected JSON parse exception, check your transformer configuration")
SwitchYardException unexpectedJSONParseException(@Cause JsonParseException e); | @Message(id=16832, value = STR) SwitchYardException unexpectedJSONParseException(@Cause JsonParseException e); | /**
* unexpectedJSONParseException method definition.
* @param e e
* @return SwitchYardException
*/ | unexpectedJSONParseException method definition | unexpectedJSONParseException | {
"repo_name": "cunningt/switchyard",
"path": "core/transform/src/main/java/org/switchyard/transform/internal/TransformMessages.java",
"license": "apache-2.0",
"size": 22568
} | [
"org.codehaus.jackson.JsonParseException",
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.Message",
"org.switchyard.SwitchYardException"
] | import org.codehaus.jackson.JsonParseException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.switchyard.SwitchYardException; | import org.codehaus.jackson.*; import org.jboss.logging.annotations.*; import org.switchyard.*; | [
"org.codehaus.jackson",
"org.jboss.logging",
"org.switchyard"
] | org.codehaus.jackson; org.jboss.logging; org.switchyard; | 2,377,666 |
List<T> getListByWxAccountId(Class<T> entityClass, String wxAccountId); | List<T> getListByWxAccountId(Class<T> entityClass, String wxAccountId); | /**
* Get entity list by WxAccountId.
*
* @param wxAccountId
* @return
*/ | Get entity list by WxAccountId | getListByWxAccountId | {
"repo_name": "jarvisji/Demo-Java-RestService",
"path": "src/main/java/net/freecoder/restdemo/dao/CommonDao.java",
"license": "apache-2.0",
"size": 2305
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,346,698 |
private String generateNewWindowId()
{
//X TODO proper mechanism
return "" + (new Random()).nextInt() % 10000;
} | String function() { return "" + (new Random()).nextInt() % 10000; } | /**
* Create a unique windowId
* @return
*/ | Create a unique windowId | generateNewWindowId | {
"repo_name": "tremes/deltaspike",
"path": "deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java",
"license": "apache-2.0",
"size": 14828
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 2,587,704 |
public ArrayList getSynchronisedData(int index) {
if (index >= synchronisedData.length) {
return synchronisedData[synchronisedData.length - 1];
} else if (index < 0) {
return synchronisedData[0];
}
return synchronisedData[index];
... | ArrayList function(int index) { if (index >= synchronisedData.length) { return synchronisedData[synchronisedData.length - 1]; } else if (index < 0) { return synchronisedData[0]; } return synchronisedData[index]; } | /**
* Gets the synchronised data at the specified index.
* @param index
* @return the data arraylist at the specified index, or the last data ArrayList
* if the index is out of bounds to the right, or the first data ArrayList if the
* index is negative. Returns null if there... | Gets the synchronised data at the specified index | getSynchronisedData | {
"repo_name": "tectronics/ingatan",
"path": "src/org/ingatan/component/text/DataTable.java",
"license": "gpl-3.0",
"size": 31472
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,090,094 |
EReference getCatchEvent_EventDefinitionRefs(); | EReference getCatchEvent_EventDefinitionRefs(); | /**
* Returns the meta object for the reference list '{@link org.eclipse.bpmn2.CatchEvent#getEventDefinitionRefs <em>Event Definition Refs</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Event Definition Refs</em>'.
* @see org.ecli... | Returns the meta object for the reference list '<code>org.eclipse.bpmn2.CatchEvent#getEventDefinitionRefs Event Definition Refs</code>'. | getCatchEvent_EventDefinitionRefs | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,407,984 |
public void drawTextBox()
{
if(getVisible())
{
if(getEnableBackgroundDrawing())
{
drawRect(xPosition - 1, yPosition - 1, xPosition + width + 1,
yPosition + height + 1, -6250336);
drawRect(xPosition, yPosition, xPosition + width, yPosition
+ height, -16777216);
}
int var1 = isEn... | void function() { if(getVisible()) { if(getEnableBackgroundDrawing()) { drawRect(xPosition - 1, yPosition - 1, xPosition + width + 1, yPosition + height + 1, -6250336); drawRect(xPosition, yPosition, xPosition + width, yPosition + height, -16777216); } int var1 = isEnabled ? enabledColor : disabledColor; int var2 = cur... | /**
* Draws the textbox
*/ | Draws the textbox | drawTextBox | {
"repo_name": "WurstContributor/Wurst-Client",
"path": "Wurst Client/src/tk/wurst_client/alts/gui/GuiEmailField.java",
"license": "mpl-2.0",
"size": 16948
} | [
"net.minecraft.client.gui.Gui"
] | import net.minecraft.client.gui.Gui; | import net.minecraft.client.gui.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 2,227,428 |
public static URI uri(final WebPositionsData data, final UniqueId overridePositionId) {
final String positionId = data.getBestPositionUriId(overridePositionId);
return data.getUriInfo().getBaseUriBuilder().path(MinimalWebPositionResource.class).build(positionId);
} | static URI function(final WebPositionsData data, final UniqueId overridePositionId) { final String positionId = data.getBestPositionUriId(overridePositionId); return data.getUriInfo().getBaseUriBuilder().path(MinimalWebPositionResource.class).build(positionId); } | /**
* Builds a URI for this resource.
*
* @param data
* the data, not null
* @param overridePositionId
* the override position id, null uses information from data
* @return the URI, not null
*/ | Builds a URI for this resource | uri | {
"repo_name": "McLeodMoores/starling",
"path": "projects/web/src/main/java/com/opengamma/web/position/MinimalWebPositionResource.java",
"license": "apache-2.0",
"size": 9957
} | [
"com.opengamma.id.UniqueId"
] | import com.opengamma.id.UniqueId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 456,962 |
public static String lastElement(List<String> strings) {
checkArgument(!strings.isEmpty(), "empty list");
return strings.get(strings.size() - 1);
} | static String function(List<String> strings) { checkArgument(!strings.isEmpty(), STR); return strings.get(strings.size() - 1); } | /**
* Last element of a (non-empty) list.
* @param strings strings in
* @return the last one.
*/ | Last element of a (non-empty) list | lastElement | {
"repo_name": "nandakumar131/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/MagicCommitPaths.java",
"license": "apache-2.0",
"size": 7796
} | [
"java.util.List",
"org.apache.hadoop.thirdparty.com.google.common.base.Preconditions"
] | import java.util.List; import org.apache.hadoop.thirdparty.com.google.common.base.Preconditions; | import java.util.*; import org.apache.hadoop.thirdparty.com.google.common.base.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 387,430 |
public AutofillDialogField[] getSection(int section) {
AutofillDialogField[] fields = getFieldsForSection(section);
if (fields == null) return null;
for (AutofillDialogField field : fields) {
View currentField = findViewById(
AutofillDialogUtils.getViewIDForF... | AutofillDialogField[] function(int section) { AutofillDialogField[] fields = getFieldsForSection(section); if (fields == null) return null; for (AutofillDialogField field : fields) { View currentField = findViewById( AutofillDialogUtils.getViewIDForField(section, field.mFieldType)); if (currentField == null) continue; ... | /**
* Return the array that holds all the data about the fields in the given section.
* @param section The section to return the data for.
* @return An array containing the data for each field in the given section.
*/ | Return the array that holds all the data about the fields in the given section | getSection | {
"repo_name": "windyuuy/opera",
"path": "chromium/src/chrome/android/java/src/org/chromium/chrome/browser/autofill/AutofillDialog.java",
"license": "bsd-3-clause",
"size": 34715
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 224,531 |
@NonNull
public List<SectionedItemList> getSectionedLists() {
return CollectionUtils.emptyIfNull(mSectionedLists);
} | List<SectionedItemList> function() { return CollectionUtils.emptyIfNull(mSectionedLists); } | /**
* Returns the list of {@link SectionedItemList} instances to be displayed in the template.
*
* @see Builder#addSectionedList(SectionedItemList)
*/ | Returns the list of <code>SectionedItemList</code> instances to be displayed in the template | getSectionedLists | {
"repo_name": "AndroidX/androidx",
"path": "car/app/app/src/main/java/androidx/car/app/model/ListTemplate.java",
"license": "apache-2.0",
"size": 14769
} | [
"androidx.car.app.utils.CollectionUtils",
"java.util.List"
] | import androidx.car.app.utils.CollectionUtils; import java.util.List; | import androidx.car.app.utils.*; import java.util.*; | [
"androidx.car",
"java.util"
] | androidx.car; java.util; | 1,800,086 |
public void contextReset() {
pending.set(new LinkedList<GridCacheMvccCandidate>());
} | void function() { pending.set(new LinkedList<GridCacheMvccCandidate>()); } | /**
* Reset MVCC context.
*/ | Reset MVCC context | contextReset | {
"repo_name": "apacheignite/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java",
"license": "apache-2.0",
"size": 40929
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 2,237,057 |
private boolean checkTableExists(String tableName) {
try {
DatabaseMetaData metaData = dbConnection.getMetaData();
ResultSet tableResults = metaData.getTables(null, null, tableName, null);
if (tableResults.isBeforeFirst()) {
if (log.isDebugEna... | boolean function(String tableName) { try { DatabaseMetaData metaData = dbConnection.getMetaData(); ResultSet tableResults = metaData.getTables(null, null, tableName, null); if (tableResults.isBeforeFirst()) { if (log.isDebugEnabled()) { log.debug(STR + tableName + STR + dataSourceLocation); } return true; } else { clos... | /**
* checkTableExists methods checks whether the table specified exists in the specified database
*
* @param tableName name of table from which data must be retrieved
* @return true if table exists in the database
*/ | checkTableExists methods checks whether the table specified exists in the specified database | checkTableExists | {
"repo_name": "grainier/carbon-analytics",
"path": "components/org.wso2.carbon.event.simulator.core/src/main/java/org/wso2/carbon/event/simulator/core/internal/generator/database/util/DatabaseConnector.java",
"license": "apache-2.0",
"size": 17756
} | [
"java.sql.DatabaseMetaData",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.wso2.carbon.event.simulator.core.exception.EventGenerationException"
] | import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import org.wso2.carbon.event.simulator.core.exception.EventGenerationException; | import java.sql.*; import org.wso2.carbon.event.simulator.core.exception.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 246,278 |
public static byte[] getDigestOrFail(Path path, long fileSize) throws IOException {
byte[] md5bin = getFastDigest(path);
if (md5bin != null && !binaryDigestWellFormed(md5bin)) {
// Fail-soft in cases where md5bin is non-null, but not a valid digest.
String msg = String.format("Malformed digest '%... | static byte[] function(Path path, long fileSize) throws IOException { byte[] md5bin = getFastDigest(path); if (md5bin != null && !binaryDigestWellFormed(md5bin)) { String msg = String.format(STR, BaseEncoding.base16().lowerCase().encode(md5bin), path); LoggingUtil.logToRemote(Level.SEVERE, msg, new IllegalStateExceptio... | /**
* Get the md5 digest of {@code path}, using a constant-time xattr call if the filesystem supports
* it, and calculating the digest manually otherwise.
*
* @param path Path of the file.
* @param fileSize size of the file. Used to determine if digest calculation should be done
* serially or in paral... | Get the md5 digest of path, using a constant-time xattr call if the filesystem supports it, and calculating the digest manually otherwise | getDigestOrFail | {
"repo_name": "mikelalcon/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/cache/DigestUtils.java",
"license": "apache-2.0",
"size": 5047
} | [
"com.google.common.io.BaseEncoding",
"com.google.devtools.build.lib.util.LoggingUtil",
"com.google.devtools.build.lib.vfs.Path",
"java.io.IOException",
"java.util.logging.Level"
] | import com.google.common.io.BaseEncoding; import com.google.devtools.build.lib.util.LoggingUtil; import com.google.devtools.build.lib.vfs.Path; import java.io.IOException; import java.util.logging.Level; | import com.google.common.io.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; import java.util.logging.*; | [
"com.google.common",
"com.google.devtools",
"java.io",
"java.util"
] | com.google.common; com.google.devtools; java.io; java.util; | 2,405,850 |
Set<Scope> getScopesForApplicationSubscription(String username, int applicationId)
throws APIManagementException; | Set<Scope> getScopesForApplicationSubscription(String username, int applicationId) throws APIManagementException; | /**
* Returns a set of scopes associated with an application subscription.
*
* @param username subscriber of the application
* @param applicationId applicationId of the application
* @return set of scopes.
* @throws APIManagementException
*/ | Returns a set of scopes associated with an application subscription | getScopesForApplicationSubscription | {
"repo_name": "bhathiya/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIConsumer.java",
"license": "apache-2.0",
"size": 44201
} | [
"java.util.Set",
"org.wso2.carbon.apimgt.api.model.Scope"
] | import java.util.Set; import org.wso2.carbon.apimgt.api.model.Scope; | import java.util.*; import org.wso2.carbon.apimgt.api.model.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,751,105 |
public String getCreateDirectoryCommand(Job job,String paramFile,String xmlPath,String project,List<String> externalFiles,List<String> subJobList) {
xmlPath = getDirectoryPath(xmlPath);
//Get comma separated files from list.
String external_Files="";
String subJobFiles="";
if(!externalFiles.isEmpty())
... | String function(Job job,String paramFile,String xmlPath,String project,List<String> externalFiles,List<String> subJobList) { xmlPath = getDirectoryPath(xmlPath); String external_Files=STRSTR/STR/STR/").append(GradleCommandConstants.REMOTE_FIXED_DIRECTORY_RESOURCES); return command.toString(); } | /**
*
* return directory creation command to create directory structure on remote server needed to run job and move required files.
* @param job
* @param paramFile
* @param xmlPath
* @param project
* @param externalFiles
* @return String (Command)
*/ | return directory creation command to create directory structure on remote server needed to run job and move required files | getCreateDirectoryCommand | {
"repo_name": "capitalone/Hydrograph",
"path": "hydrograph.ui/hydrograph.ui.graph/src/main/java/hydrograph/ui/graph/utility/JobScpAndProcessUtility.java",
"license": "apache-2.0",
"size": 28190
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,198,525 |
@Test
public void testPartitionOps() throws Exception {
Database db1 = new DatabaseBuilder()
.setName(DB1)
.setDescription("description")
.setLocation("locationurl")
.build(conf);
try (AutoCloseable c = deadline()) {
objectStore.createDatabase(db1);
}
StorageDes... | void function() throws Exception { Database db1 = new DatabaseBuilder() .setName(DB1) .setDescription(STR) .setLocation(STR) .build(conf); try (AutoCloseable c = deadline()) { objectStore.createDatabase(db1); } StorageDescriptor sd = createFakeSd(STR); HashMap<String, String> tableParams = new HashMap<>(); tableParams.... | /**
* Tests partition operations
*/ | Tests partition operations | testPartitionOps | {
"repo_name": "sankarh/hive",
"path": "standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java",
"license": "apache-2.0",
"size": 62235
} | [
"java.util.HashMap",
"org.apache.hadoop.hive.metastore.api.Database",
"org.apache.hadoop.hive.metastore.api.FieldSchema",
"org.apache.hadoop.hive.metastore.api.StorageDescriptor",
"org.apache.hadoop.hive.metastore.client.builder.DatabaseBuilder",
"org.junit.Assert"
] | import java.util.HashMap; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.StorageDescriptor; import org.apache.hadoop.hive.metastore.client.builder.DatabaseBuilder; import org.junit.Assert; | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.client.builder.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 1,399,192 |
public static int getWidestView(Context context, Adapter adapter) {
int maxWidth = 0;
View view = null;
FrameLayout fakeParent = new FrameLayout(context);
for (int i=0, count = adapter.getCount(); i<count; i++) {
view = adapter.getView(i, view, fakeParent);
vi... | static int function(Context context, Adapter adapter) { int maxWidth = 0; View view = null; FrameLayout fakeParent = new FrameLayout(context); for (int i=0, count = adapter.getCount(); i<count; i++) { view = adapter.getView(i, view, fakeParent); view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); int width ... | /**
* Computes the widest view in an adapter, best used when you need to wrap_content on a ListView, please be careful
* and don't use it on an adapter that is extremely numerous in items or it will take a long time.
*
* @param context Some context
* @param adapter The adapter to process
*... | Computes the widest view in an adapter, best used when you need to wrap_content on a ListView, please be careful and don't use it on an adapter that is extremely numerous in items or it will take a long time | getWidestView | {
"repo_name": "AlburIvan/ContextualDropdown",
"path": "contextualdropdown/src/main/java/com/raworkstudio/contexdropdown/OptionDropDown.java",
"license": "apache-2.0",
"size": 7407
} | [
"android.content.Context",
"android.view.View",
"android.widget.Adapter",
"android.widget.FrameLayout"
] | import android.content.Context; import android.view.View; import android.widget.Adapter; import android.widget.FrameLayout; | import android.content.*; import android.view.*; import android.widget.*; | [
"android.content",
"android.view",
"android.widget"
] | android.content; android.view; android.widget; | 208,919 |
public TofuRenderVisitor create(
Appendable outputBuf,
TemplateRegistry templateRegistry,
ImmutableMap<String, ? extends SoyJavaPrintDirective> printDirectives,
SoyRecord data,
@Nullable SoyRecord ijData,
@Nullable Set<String> activeDelPackageNames,
@Nullable SoyMsgBundle msg... | TofuRenderVisitor function( Appendable outputBuf, TemplateRegistry templateRegistry, ImmutableMap<String, ? extends SoyJavaPrintDirective> printDirectives, SoyRecord data, @Nullable SoyRecord ijData, @Nullable Set<String> activeDelPackageNames, @Nullable SoyMsgBundle msgBundle, @Nullable SoyIdRenamingMap xidRenamingMap... | /**
* Creates a TofuRenderVisitor.
*
* @param outputBuf The Appendable to append the output to.
* @param templateRegistry A registry of all templates.
* @param data The current template data.
* @param ijData The current injected data.
* @param activeDelPackageNames The set of active delegate packag... | Creates a TofuRenderVisitor | create | {
"repo_name": "iacdingping/closure-templates",
"path": "java/src/com/google/template/soy/tofu/internal/TofuRenderVisitorFactory.java",
"license": "apache-2.0",
"size": 3010
} | [
"com.google.common.collect.ImmutableMap",
"com.google.template.soy.data.SoyRecord",
"com.google.template.soy.msgs.SoyMsgBundle",
"com.google.template.soy.shared.SoyCssRenamingMap",
"com.google.template.soy.shared.SoyIdRenamingMap",
"com.google.template.soy.shared.restricted.SoyJavaPrintDirective",
"com.... | import com.google.common.collect.ImmutableMap; import com.google.template.soy.data.SoyRecord; import com.google.template.soy.msgs.SoyMsgBundle; import com.google.template.soy.shared.SoyCssRenamingMap; import com.google.template.soy.shared.SoyIdRenamingMap; import com.google.template.soy.shared.restricted.SoyJavaPrintDi... | import com.google.common.collect.*; import com.google.template.soy.data.*; import com.google.template.soy.msgs.*; import com.google.template.soy.shared.*; import com.google.template.soy.shared.restricted.*; import com.google.template.soy.soytree.*; import java.util.*; import javax.annotation.*; | [
"com.google.common",
"com.google.template",
"java.util",
"javax.annotation"
] | com.google.common; com.google.template; java.util; javax.annotation; | 1,021,789 |
void pushClientStatistics(ClientDescriptor from, ContextualStatistics... statistics); | void pushClientStatistics(ClientDescriptor from, ContextualStatistics... statistics); | /**
* Push some client statistics coming fro
* <p>
* Can be called from active entity onlym a client descriptor into the service. This will be put in a best effort-buffer.
*/ | Push some client statistics coming fro Can be called from active entity onlym a client descriptor into the service. This will be put in a best effort-buffer | pushClientStatistics | {
"repo_name": "mathieucarbou/terracotta-platform",
"path": "management/monitoring-service/src/main/java/org/terracotta/management/service/monitoring/MonitoringService.java",
"license": "apache-2.0",
"size": 5634
} | [
"org.terracotta.entity.ClientDescriptor",
"org.terracotta.management.model.stats.ContextualStatistics"
] | import org.terracotta.entity.ClientDescriptor; import org.terracotta.management.model.stats.ContextualStatistics; | import org.terracotta.entity.*; import org.terracotta.management.model.stats.*; | [
"org.terracotta.entity",
"org.terracotta.management"
] | org.terracotta.entity; org.terracotta.management; | 2,157,343 |
public boolean resolveTypeParameterBounds(Set<LexicalPhrase> unresolvedLexicalPhrases) throws NameConflictException, ConceptualException
{
boolean changed = false;
Set<TypeDefinition> notFullyResolved = new HashSet<TypeDefinition>();
while (parentsToResolve.isEmpty() && !typeBoundsToResolve.isEmpty())
... | boolean function(Set<LexicalPhrase> unresolvedLexicalPhrases) throws NameConflictException, ConceptualException { boolean changed = false; Set<TypeDefinition> notFullyResolved = new HashSet<TypeDefinition>(); while (parentsToResolve.isEmpty() && !typeBoundsToResolve.isEmpty()) { TypeDefinition toResolve = typeBoundsToR... | /**
* Resolves the type parameter bounds of all type definitions in the typeBoundsToResolve queue.
* @param unresolvedLexicalPhrases - the set containing the LexicalPhrase of each QName which has been tried for resolution unsuccessfully since the last change was made
* @return true if any successful processing... | Resolves the type parameter bounds of all type definitions in the typeBoundsToResolve queue | resolveTypeParameterBounds | {
"repo_name": "abryant/Compiler",
"path": "src/compiler/language/translator/conceptual/TypeResolver.java",
"license": "bsd-3-clause",
"size": 71538
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 901,416 |
private void updateNPC(PacketBuilder packet, NPC npc) {
int mask = 0;
final UpdateFlags flags = npc.getUpdateFlags();
if(flags.get(UpdateFlag.ANIMATION)) {
mask |= 0x10;
}
if(flags.get(UpdateFlag.HIT)) {
mask |= 0x8;
}
if(flags.get(UpdateFlag.GRAPHICS)) {
mask |= 0x80;
}
if(flags.get... | void function(PacketBuilder packet, NPC npc) { int mask = 0; final UpdateFlags flags = npc.getUpdateFlags(); if(flags.get(UpdateFlag.ANIMATION)) { mask = 0x10; } if(flags.get(UpdateFlag.HIT)) { mask = 0x8; } if(flags.get(UpdateFlag.GRAPHICS)) { mask = 0x80; } if(flags.get(UpdateFlag.FACE_ENTITY)) { mask = 0x20; } if(fl... | /**
* Update an NPC.
* @param packet The update block.
* @param npc The npc.
*/ | Update an NPC | updateNPC | {
"repo_name": "ThomasPapp/zHyperion",
"path": "src/org/hyperion/rs2/task/impl/NPCUpdateTask.java",
"license": "mit",
"size": 7988
} | [
"org.hyperion.rs2.model.Entity",
"org.hyperion.rs2.model.Location",
"org.hyperion.rs2.model.UpdateFlags",
"org.hyperion.rs2.net.PacketBuilder"
] | import org.hyperion.rs2.model.Entity; import org.hyperion.rs2.model.Location; import org.hyperion.rs2.model.UpdateFlags; import org.hyperion.rs2.net.PacketBuilder; | import org.hyperion.rs2.model.*; import org.hyperion.rs2.net.*; | [
"org.hyperion.rs2"
] | org.hyperion.rs2; | 2,529,181 |
private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) {
HttpGet request = new HttpGet(url);
request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA));
return execute(request, url, "retrieve metadata");
} | CloseableHttpResponse function(String url) { HttpGet request = new HttpGet(url); request.setHeader(new BasicHeader(HttpHeaders.ACCEPT, ACCEPT_META_DATA)); return execute(request, url, STR); } | /**
* Retrieves the meta-data of the service at the specified URL.
* @param url the URL
* @return the response
*/ | Retrieves the meta-data of the service at the specified URL | executeInitializrMetadataRetrieval | {
"repo_name": "bbrouwer/spring-boot",
"path": "spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java",
"license": "apache-2.0",
"size": 8831
} | [
"org.apache.http.HttpHeaders",
"org.apache.http.client.methods.CloseableHttpResponse",
"org.apache.http.client.methods.HttpGet",
"org.apache.http.message.BasicHeader"
] | import org.apache.http.HttpHeaders; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.message.BasicHeader; | import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.message.*; | [
"org.apache.http"
] | org.apache.http; | 145,292 |
public VpnServerConfigurationInner withVpnAuthenticationTypes(List<VpnAuthenticationType> vpnAuthenticationTypes) {
this.vpnAuthenticationTypes = vpnAuthenticationTypes;
return this;
} | VpnServerConfigurationInner function(List<VpnAuthenticationType> vpnAuthenticationTypes) { this.vpnAuthenticationTypes = vpnAuthenticationTypes; return this; } | /**
* Set the vpnAuthenticationTypes property: VPN authentication types for the VpnServerConfiguration.
*
* @param vpnAuthenticationTypes the vpnAuthenticationTypes value to set.
* @return the VpnServerConfigurationInner object itself.
*/ | Set the vpnAuthenticationTypes property: VPN authentication types for the VpnServerConfiguration | withVpnAuthenticationTypes | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/VpnServerConfigurationInner.java",
"license": "mit",
"size": 17216
} | [
"com.azure.resourcemanager.network.models.VpnAuthenticationType",
"java.util.List"
] | import com.azure.resourcemanager.network.models.VpnAuthenticationType; import java.util.List; | import com.azure.resourcemanager.network.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 885,243 |
@Test
public void testSetJvmOptionsServer() throws IOException {
Resource server = new Resource();
server.setId(1234);
server.setName("server1");
final JvmOptionsResponse expected = new JvmOptionsResponse();
expected.setStatus(ResponseStatus.SUCCESS);
final JvmOpt... | void function() throws IOException { Resource server = new Resource(); server.setId(1234); server.setName(STR); final JvmOptionsResponse expected = new JvmOptionsResponse(); expected.setStatus(ResponseStatus.SUCCESS); final JvmOptions options = new JvmOptions(); options.getOption().add(STR); options.getOption().add(STR... | /**
* Verifies successful set of JVM Options to a server
*
* @throws IOException
*/ | Verifies successful set of JVM Options to a server | testSetJvmOptionsServer | {
"repo_name": "pivotal/tcs-hq-management-plugin",
"path": "com.springsource.hq.plugin.tcserver.cli/com.springsource.hq.plugin.tcserver.cli.client/src/test/java/com/springsource/hq/plugin/tcserver/cli/client/configuration/WebServiceConfigurationRepositoryTest.java",
"license": "gpl-2.0",
"size": 12687
} | [
"com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptions",
"com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptionsRequest",
"com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptionsResponse",
"com.springsource.hq.plugin.tcserver.cli.client.schema.Resource",
"com.springsource.hq.pl... | import com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptions; import com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptionsRequest; import com.springsource.hq.plugin.tcserver.cli.client.schema.JvmOptionsResponse; import com.springsource.hq.plugin.tcserver.cli.client.schema.Resource; import com.spri... | import com.springsource.hq.plugin.tcserver.cli.client.schema.*; import java.io.*; import org.easymock.*; import org.junit.*; | [
"com.springsource.hq",
"java.io",
"org.easymock",
"org.junit"
] | com.springsource.hq; java.io; org.easymock; org.junit; | 331,352 |
public static PGUserDatabaseConnections newInstance(
final String userID,
final char[] password,
final String databaseDriverClassName,
final String initialisationQuery,
final String readOnlyDatabaseConnectionString,
final String writeOnlyDatabaseConnectionString)
throws RIFServiceException {
PGUs... | static PGUserDatabaseConnections function( final String userID, final char[] password, final String databaseDriverClassName, final String initialisationQuery, final String readOnlyDatabaseConnectionString, final String writeOnlyDatabaseConnectionString) throws RIFServiceException { PGUserDatabaseConnections userDatabas... | /**
* This method is used to ensure safe construction of a pre-set collection of database
* connections that are associated with a user
* @param userID
* @param password
* @param databaseDriverClassName
* @param initialisationQuery
* @param readOnlyDatabaseConnectionString
* @param writeOnlyDatabaseCon... | This method is used to ensure safe construction of a pre-set collection of database connections that are associated with a user | newInstance | {
"repo_name": "smallAreaHealthStatisticsUnit/rapidInquiryFacility",
"path": "rifGenericLibrary/src/main/java/org/sahsu/rif/generic/datastorage/pg/PGUserDatabaseConnections.java",
"license": "lgpl-3.0",
"size": 13799
} | [
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.Collections",
"java.util.HashSet",
"java.util.Set",
"org.sahsu.rif.generic.datastorage.SQLQueryUtility",
"org.sahsu.rif.generic.system.RIFGenericLibraryError",
"org.sahsu.rif.generic.... | import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.sahsu.rif.generic.datastorage.SQLQueryUtility; import org.sahsu.rif.generic.system.RIFGenericLibraryError; ... | import java.sql.*; import java.util.*; import org.sahsu.rif.generic.datastorage.*; import org.sahsu.rif.generic.system.*; | [
"java.sql",
"java.util",
"org.sahsu.rif"
] | java.sql; java.util; org.sahsu.rif; | 37,670 |
private static Map<String, String> retrieveFlinkProperties(Map<String, String> hiveTableParams) {
return hiveTableParams.entrySet().stream()
.filter(e -> e.getKey().startsWith(FLINK_PROPERTY_PREFIX) || e.getKey().equals(CatalogConfig.IS_GENERIC))
.collect(Collectors.toMap(e -> e.getKey().replace(FLINK_PROPER... | static Map<String, String> function(Map<String, String> hiveTableParams) { return hiveTableParams.entrySet().stream() .filter(e -> e.getKey().startsWith(FLINK_PROPERTY_PREFIX) e.getKey().equals(CatalogConfig.IS_GENERIC)) .collect(Collectors.toMap(e -> e.getKey().replace(FLINK_PROPERTY_PREFIX, ""), e -> e.getValue())); ... | /**
* Filter out Hive-created properties, and return Flink-created properties.
* Note that 'is_generic' is a special key and this method will leave it as-is.
*/ | Filter out Hive-created properties, and return Flink-created properties. Note that 'is_generic' is a special key and this method will leave it as-is | retrieveFlinkProperties | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java",
"license": "apache-2.0",
"size": 47653
} | [
"java.util.Map",
"java.util.stream.Collectors",
"org.apache.flink.table.catalog.config.CatalogConfig"
] | import java.util.Map; import java.util.stream.Collectors; import org.apache.flink.table.catalog.config.CatalogConfig; | import java.util.*; import java.util.stream.*; import org.apache.flink.table.catalog.config.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 245,907 |
public Path getTaskAttemptPath(TaskAttemptContext context) {
return new Path(getPendingTaskAttemptsPath(context),
String.valueOf(context.getTaskAttemptID()));
} | Path function(TaskAttemptContext context) { return new Path(getPendingTaskAttemptsPath(context), String.valueOf(context.getTaskAttemptID())); } | /**
* Compute the path where the output of a task attempt is stored until
* that task is committed.
*
* @param context the context of the task attempt.
* @return the path where a task attempt should be stored.
*/ | Compute the path where the output of a task attempt is stored until that task is committed | getTaskAttemptPath | {
"repo_name": "cnfire/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.java",
"license": "apache-2.0",
"size": 23132
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapreduce.TaskAttemptContext"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.TaskAttemptContext; | import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 760,771 |
public void writeHeader(ImageOutputStream out, DcmEncodeParam encParam,
int tag, int vr, int len) throws IOException {
if (encParam.byteOrder == ByteOrder.LITTLE_ENDIAN) {
out.write(tag >> 16);
out.write(tag >> 24);
out.write(tag >> 0);
out.write(t... | void function(ImageOutputStream out, DcmEncodeParam encParam, int tag, int vr, int len) throws IOException { if (encParam.byteOrder == ByteOrder.LITTLE_ENDIAN) { out.write(tag >> 16); out.write(tag >> 24); out.write(tag >> 0); out.write(tag >> 8); } else { out.write(tag >> 24); out.write(tag >> 16); out.write(tag >> 8)... | /**
* Description of the Method
*
* @param out
* Description of the Parameter
* @param encParam
* Description of the Parameter
* @param tag
* Description of the Parameter
* @param vr
* Description of the Parameter
* @par... | Description of the Method | writeHeader | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_31/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86527
} | [
"java.io.IOException",
"java.nio.ByteOrder",
"javax.imageio.stream.ImageOutputStream",
"org.dcm4che.data.DcmEncodeParam",
"org.dcm4che.dict.VRs"
] | import java.io.IOException; import java.nio.ByteOrder; import javax.imageio.stream.ImageOutputStream; import org.dcm4che.data.DcmEncodeParam; import org.dcm4che.dict.VRs; | import java.io.*; import java.nio.*; import javax.imageio.stream.*; import org.dcm4che.data.*; import org.dcm4che.dict.*; | [
"java.io",
"java.nio",
"javax.imageio",
"org.dcm4che.data",
"org.dcm4che.dict"
] | java.io; java.nio; javax.imageio; org.dcm4che.data; org.dcm4che.dict; | 1,516,493 |
public Response getJson(
@QueryParam("plan") String plan,
@QueryParam("phase") String phase,
@QueryParam("step") String step,
@QueryParam("sync") boolean sync); | Response function( @QueryParam("plan") String plan, @QueryParam("phase") String phase, @QueryParam("step") String step, @QueryParam("sync") boolean sync); | /**
* Called to retun JSON response of requested endpoint.
* @param plan (optional) Plan to drill down on.
* @param phase (optional) Phase to drill down on.
* @param step (optional) Step to drill down on.
* @param sync (optional) Poll backend State-Stores.
* @return JSON response of the requested debu... | Called to retun JSON response of requested endpoint | getJson | {
"repo_name": "mesosphere/dcos-commons",
"path": "sdk/scheduler/src/main/java/com/mesosphere/sdk/debug/DebugEndpoint.java",
"license": "apache-2.0",
"size": 710
} | [
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Response"
] | import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; | import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 2,671,491 |
public MetadataList withValue(List<MetadataModelInner> value) {
this.value = value;
return this;
} | MetadataList function(List<MetadataModelInner> value) { this.value = value; return this; } | /**
* Set the value property: Array of metadata.
*
* @param value the value value to set.
* @return the MetadataList object itself.
*/ | Set the value property: Array of metadata | withValue | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/MetadataList.java",
"license": "mit",
"size": 2114
} | [
"com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner",
"java.util.List"
] | import com.azure.resourcemanager.securityinsights.fluent.models.MetadataModelInner; import java.util.List; | import com.azure.resourcemanager.securityinsights.fluent.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 87,254 |
String getRoutingKey(CommandMessage<?> command); | String getRoutingKey(CommandMessage<?> command); | /**
* Generates a routing key for the given <code>command</code>. Commands that should be handled by the same segment,
* should result in the same routing key.
*
* @param command the command to create a routing key for
* @return the routing key for the command
*/ | Generates a routing key for the given <code>command</code>. Commands that should be handled by the same segment, should result in the same routing key | getRoutingKey | {
"repo_name": "christiaandejong/AxonFramework",
"path": "distributed-commandbus/src/main/java/org/axonframework/commandhandling/distributed/RoutingStrategy.java",
"license": "apache-2.0",
"size": 1343
} | [
"org.axonframework.commandhandling.CommandMessage"
] | import org.axonframework.commandhandling.CommandMessage; | import org.axonframework.commandhandling.*; | [
"org.axonframework.commandhandling"
] | org.axonframework.commandhandling; | 2,144,579 |
@Test
public void decodingTest() throws Exception
{
//non thread safe
TestMessageHandler handler = new TestMessageHandler();
FakeWebsockSession session = new FakeWebsockSession();
Basic remote = session.getBasicRemote();
BinaryTransferUtil binary = new BinaryTransfer... | void function() throws Exception { TestMessageHandler handler = new TestMessageHandler(); FakeWebsockSession session = new FakeWebsockSession(); Basic remote = session.getBasicRemote(); BinaryTransferUtil binary = new BinaryTransferUtil(remote, handler, false); binary.setFormat(WebsockConstants.BSON_FORMAT, WebsockCons... | /**
* Tests the decoding of binary encoded messages.
*/ | Tests the decoding of binary encoded messages | decodingTest | {
"repo_name": "iisys-hof/neo4j-websocket-common",
"path": "src/test/java/de/hofuniversity/iisys/neo4j/websock/query/encoding/BinaryTransferUtilTest.java",
"license": "apache-2.0",
"size": 9542
} | [
"de.hofuniversity.iisys.neo4j.websock.queries.FakeWebsockSession",
"de.hofuniversity.iisys.neo4j.websock.queries.TestMessageHandler",
"de.hofuniversity.iisys.neo4j.websock.query.EQueryType",
"de.hofuniversity.iisys.neo4j.websock.query.WebsockQuery",
"de.hofuniversity.iisys.neo4j.websock.query.encoding.unsaf... | import de.hofuniversity.iisys.neo4j.websock.queries.FakeWebsockSession; import de.hofuniversity.iisys.neo4j.websock.queries.TestMessageHandler; import de.hofuniversity.iisys.neo4j.websock.query.EQueryType; import de.hofuniversity.iisys.neo4j.websock.query.WebsockQuery; import de.hofuniversity.iisys.neo4j.websock.query.... | import de.hofuniversity.iisys.neo4j.websock.queries.*; import de.hofuniversity.iisys.neo4j.websock.query.*; import de.hofuniversity.iisys.neo4j.websock.query.encoding.unsafe.*; import de.hofuniversity.iisys.neo4j.websock.session.*; import java.nio.*; import javax.websocket.*; import org.junit.*; | [
"de.hofuniversity.iisys",
"java.nio",
"javax.websocket",
"org.junit"
] | de.hofuniversity.iisys; java.nio; javax.websocket; org.junit; | 2,295,118 |
@Override
public void loadLoanAccountSummary(int loanAccountNumber) {
replaceFragment(LoanAccountSummaryFragment.newInstance(loanAccountNumber), true, R.id
.container);
} | void function(int loanAccountNumber) { replaceFragment(LoanAccountSummaryFragment.newInstance(loanAccountNumber), true, R.id .container); } | /**
* Called when a Loan Account is Selected
* from the list of Loan Accounts on Client Details Fragment
* It displays the summary of the Selected Loan Account
*/ | Called when a Loan Account is Selected from the list of Loan Accounts on Client Details Fragment It displays the summary of the Selected Loan Account | loadLoanAccountSummary | {
"repo_name": "nellyk/android-client",
"path": "mifosng-android/src/main/java/com/mifos/mifosxdroid/online/ClientActivity.java",
"license": "mpl-2.0",
"size": 4524
} | [
"com.mifos.mifosxdroid.online.loanaccountsummary.LoanAccountSummaryFragment"
] | import com.mifos.mifosxdroid.online.loanaccountsummary.LoanAccountSummaryFragment; | import com.mifos.mifosxdroid.online.loanaccountsummary.*; | [
"com.mifos.mifosxdroid"
] | com.mifos.mifosxdroid; | 2,553,797 |
public void run() {
if (out != null) {
try {
outPutContent(out, path, encoding);
} catch (IOException e) {
// Most IOExceptions are quasi normal here :
// when an indexed document is too huge,
// the lucene engine close the pipe as soon as
// ... | void function() { if (out != null) { try { outPutContent(out, path, encoding); } catch (IOException e) { SilverTrace.info(STR, STR, STR, path, e); } finally { try { out.close(); } catch (IOException e) { } } } } private final Writer out; private final String path; private final String encoding; } | /**
* Method declaration
* @see
*/ | Method declaration | run | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/org/silverpeas/search/indexEngine/parser/PipedParser.java",
"license": "agpl-3.0",
"size": 3925
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"java.io.IOException",
"java.io.Writer"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; import java.io.IOException; import java.io.Writer; | import com.stratelia.silverpeas.silvertrace.*; import java.io.*; | [
"com.stratelia.silverpeas",
"java.io"
] | com.stratelia.silverpeas; java.io; | 284,130 |
public void setOnColor(Color rgb) {
if(this.onColor != null && this.onColor.equals(rgb))
return;
this.onColor = rgb;
for (LEDFigure led : ledFigures) {
led.setOnColor(rgb);
}
} | void function(Color rgb) { if(this.onColor != null && this.onColor.equals(rgb)) return; this.onColor = rgb; for (LEDFigure led : ledFigures) { led.setOnColor(rgb); } } | /**
* Set the color to be displayed if a bit is 1.
* @param onColor the onColor to set
*/ | Set the color to be displayed if a bit is 1 | setOnColor | {
"repo_name": "ESSICS/cs-studio",
"path": "applications/opibuilder/opibuilder-plugins/org.csstudio.swt.widgets/src/org/csstudio/swt/widgets/figures/ByteMonitorFigure.java",
"license": "epl-1.0",
"size": 15612
} | [
"org.eclipse.swt.graphics.Color"
] | import org.eclipse.swt.graphics.Color; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,913,702 |
public static URI createRemainingURI(URI originalURI, Map<String, Object> params) throws URISyntaxException {
String s = createQueryString(params);
if (s.length() == 0) {
s = null;
}
return createURIWithQuery(originalURI, s);
} | static URI function(URI originalURI, Map<String, Object> params) throws URISyntaxException { String s = createQueryString(params); if (s.length() == 0) { s = null; } return createURIWithQuery(originalURI, s); } | /**
* Creates a URI from the original URI and the remaining parameters
* <p/>
* Used by various Camel components
*/ | Creates a URI from the original URI and the remaining parameters Used by various Camel components | createRemainingURI | {
"repo_name": "tkopczynski/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/URISupport.java",
"license": "apache-2.0",
"size": 24840
} | [
"java.net.URISyntaxException",
"java.util.Map"
] | import java.net.URISyntaxException; import java.util.Map; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 1,301,161 |
LocatedBlock appendFile(String src, String holder, String clientMachine
) throws IOException {
if (supportAppends == false) {
throw new IOException("Append to hdfs not supported." +
" Please refer to dfs.support.append configuration parameter.");
}
startFileInternal... | LocatedBlock appendFile(String src, String holder, String clientMachine ) throws IOException { if (supportAppends == false) { throw new IOException(STR + STR); } startFileInternal(src, null, holder, clientMachine, false, true, (short)maxReplication, (long)0); getEditLog().logSync(); synchronized (this) { INodeFileUnder... | /**
* Append to an existing file in the namespace.
*/ | Append to an existing file in the namespace | appendFile | {
"repo_name": "fchu/hadoop-0.20.205",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 212199
} | [
"java.io.IOException",
"java.util.Collection",
"java.util.EnumSet",
"java.util.Iterator",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.protocol.LocatedBlock",
"org.apache.hadoop.hdfs.security.token.block.BlockTokenSecretManager",
"org.apache.hadoop.hdfs.server.namenode.BlocksMap",
... | import java.io.IOException; import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.security.token.block.BlockTokenSecretManager; import org.apache.hadoop.hdfs.serve... | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,709,513 |
@Test
public void testRequesterThrottling() throws IOException, Exception {
long startId = 1000000;
// Small test
long idCount = getIDCount() / 10;
int linksPerId = 3;
Properties props = basicProps();
int requests = 2000;
long timeLimit = requests;
int requestsPerSec = 500; // Limit... | void function() throws IOException, Exception { long startId = 1000000; long idCount = getIDCount() / 10; int linksPerId = 3; Properties props = basicProps(); int requests = 2000; long timeLimit = requests; int requestsPerSec = 500; fillLoadProps(props, startId, idCount, linksPerId); fillReqProps(props, startId, idCoun... | /**
* Test that the requester throttling slows down requests
* @throws Exception
* @throws IOException
*/ | Test that the requester throttling slows down requests | testRequesterThrottling | {
"repo_name": "Percona-QA/toku-qa",
"path": "tokudb/software/linkbench/src/test/java/com/facebook/LinkBench/LinkStoreTestBase.java",
"license": "gpl-2.0",
"size": 30692
} | [
"com.facebook.LinkBench",
"java.io.IOException",
"java.util.Properties",
"java.util.Random"
] | import com.facebook.LinkBench; import java.io.IOException; import java.util.Properties; import java.util.Random; | import com.facebook.*; import java.io.*; import java.util.*; | [
"com.facebook",
"java.io",
"java.util"
] | com.facebook; java.io; java.util; | 2,312,947 |
public void inputCharsetName(@Nullable String inputCharsetName) {
this.inputCharsetName = inputCharsetName;
} | void function(@Nullable String inputCharsetName) { this.inputCharsetName = inputCharsetName; } | /**
* Sets the input file charset name. The null here means "not specified".
*
* @param inputCharsetName The input file charset name.
*/ | Sets the input file charset name. The null here means "not specified" | inputCharsetName | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadCsvFormat.java",
"license": "apache-2.0",
"size": 5023
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,191,070 |
public com.mozu.api.contracts.productadmin.ProductPropertyValueLocalizedContent addPropertyValueLocalizedContent(com.mozu.api.contracts.productadmin.ProductPropertyValueLocalizedContent localizedContent, String productCode, String attributeFQN, String value, String responseFields) throws Exception
{
MozuClient<co... | com.mozu.api.contracts.productadmin.ProductPropertyValueLocalizedContent function(com.mozu.api.contracts.productadmin.ProductPropertyValueLocalizedContent localizedContent, String productCode, String attributeFQN, String value, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.Pro... | /**
* Adds a property value for localized content. This content is set by the locale code.
* <p><pre><code>
* ProductProperty productproperty = new ProductProperty();
* ProductPropertyValueLocalizedContent productPropertyValueLocalizedContent = productproperty.addPropertyValueLocalizedContent( localizedContent... | Adds a property value for localized content. This content is set by the locale code. <code><code> ProductProperty productproperty = new ProductProperty(); ProductPropertyValueLocalizedContent productPropertyValueLocalizedContent = productproperty.addPropertyValueLocalizedContent( localizedContent, productCode, attribut... | addPropertyValueLocalizedContent | {
"repo_name": "bhewett/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/products/ProductPropertyResource.java",
"license": "mit",
"size": 23967
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,540,590 |
public static boolean equal(
final String desc1,
RelDataType type1,
final String desc2,
RelDataType type2,
Litmus litmus) {
if (!areRowTypesEqual(type1, type2, false)) {
return litmus.fail("Type mismatch:\n{}:\n{}\n{}:\n{}",
desc1, type1.getFullTypeString(),
... | static boolean function( final String desc1, RelDataType type1, final String desc2, RelDataType type2, Litmus litmus) { if (!areRowTypesEqual(type1, type2, false)) { return litmus.fail(STR, desc1, type1.getFullTypeString(), desc2, type2.getFullTypeString()); } return litmus.succeed(); } | /**
* Returns whether two types are equal using
* {@link #areRowTypesEqual(RelDataType, RelDataType, boolean)}. Both types
* must not be null.
*
* @param desc1 Description of role of first type
* @param type1 First type
* @param desc2 Description of role of second type
* @param type2 Second type... | Returns whether two types are equal using <code>#areRowTypesEqual(RelDataType, RelDataType, boolean)</code>. Both types must not be null | equal | {
"repo_name": "dindin5258/calcite",
"path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java",
"license": "apache-2.0",
"size": 130007
} | [
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.util.Litmus"
] | import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.util.Litmus; | import org.apache.calcite.rel.type.*; import org.apache.calcite.util.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 709,217 |
public WorkingUnitFinder getWorkingUnitFinder() {
return workingUnitFinder;
} | WorkingUnitFinder function() { return workingUnitFinder; } | /**
* Returns the working unit finder.
*
* @return the working unit finder
*/ | Returns the working unit finder | getWorkingUnitFinder | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/src/org/opencps/usermgt/service/base/EmployeeServiceBaseImpl.java",
"license": "agpl-3.0",
"size": 12728
} | [
"org.opencps.usermgt.service.persistence.WorkingUnitFinder"
] | import org.opencps.usermgt.service.persistence.WorkingUnitFinder; | import org.opencps.usermgt.service.persistence.*; | [
"org.opencps.usermgt"
] | org.opencps.usermgt; | 1,231,047 |
public static BinaryResult create(InputStream data) {
return new Stream(data);
}
private String contentType = OCTET_STREAM;
private String characterEncoding;
private long contentLength = -1;
private boolean gzip = true;
private boolean base64 = false;
private String attachmentName; | static BinaryResult function(InputStream data) { return new Stream(data); } private String contentType = OCTET_STREAM; private String characterEncoding; private long contentLength = -1; private boolean gzip = true; private boolean base64 = false; private String attachmentName; | /**
* Produce an {@code application/octet-stream} of unknown length by copying
* the InputStream until EOF. The server glue will automatically close this
* stream when copying is complete.
*/ | Produce an application/octet-stream of unknown length by copying the InputStream until EOF. The server glue will automatically close this stream when copying is complete | create | {
"repo_name": "gcoders/gerrit",
"path": "gerrit-extension-api/src/main/java/com/google/gerrit/extensions/restapi/BinaryResult.java",
"license": "apache-2.0",
"size": 7764
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 117,696 |
EReference getObjectDefinition_Identifiers(); | EReference getObjectDefinition_Identifiers(); | /**
* Returns the meta object for the containment reference list '{@link org.xtuml.bp.xtext.masl.masl.structure.ObjectDefinition#getIdentifiers <em>Identifiers</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Identifiers</em>'.
* @see ... | Returns the meta object for the containment reference list '<code>org.xtuml.bp.xtext.masl.masl.structure.ObjectDefinition#getIdentifiers Identifiers</code>'. | getObjectDefinition_Identifiers | {
"repo_name": "lwriemen/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/emf-gen/org/xtuml/bp/xtext/masl/masl/structure/StructurePackage.java",
"license": "apache-2.0",
"size": 189771
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,703,199 |
@Override
public boolean hasRole(Principal principal, String role)
{
getLogger().debug("hasRole (" + (principal != null ? principal.getName() : "UNKNOWN") + ", " + role + ")");
try
{
return ((VistaRealmPrincipal) principal).hasRole(role);
}
catch (ClassCastException ccX)
{
getLogger().error("Exp... | boolean function(Principal principal, String role) { getLogger().debug(STR + (principal != null ? principal.getName() : STR) + STR + role + ")"); try { return ((VistaRealmPrincipal) principal).hasRole(role); } catch (ClassCastException ccX) { getLogger().error(STR + principal.getClass().getName() + STR); return false; ... | /**
* This must be overridden because the RealmBase implementation expects an
* instance of GenericPrincipal
*
* @see org.apache.catalina.Realm.hasRole(Principal principal, String role)
*/ | This must be overridden because the RealmBase implementation expects an instance of GenericPrincipal | hasRole | {
"repo_name": "VHAINNOVATIONS/Telepathology",
"path": "Source/Java/ImagingVistaRealm/main/src/java/gov/va/med/imaging/tomcat/vistarealm/AbstractVistaRealmImpl.java",
"license": "apache-2.0",
"size": 60100
} | [
"java.security.Principal",
"org.apache.catalina.Container"
] | import java.security.Principal; import org.apache.catalina.Container; | import java.security.*; import org.apache.catalina.*; | [
"java.security",
"org.apache.catalina"
] | java.security; org.apache.catalina; | 1,851,509 |
protected TInitState copyInto(TInitState copyObj) throws TorqueException
{
return copyInto(copyObj, true);
} | TInitState function(TInitState copyObj) throws TorqueException { return copyInto(copyObj, true); } | /**
* Fills the copyObj with the contents of this object.
* The associated objects are also copied and treated as new objects.
*
* @param copyObj the object to fill.
*/ | Fills the copyObj with the contents of this object. The associated objects are also copied and treated as new objects | copyInto | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTInitState.java",
"license": "gpl-3.0",
"size": 31398
} | [
"org.apache.torque.TorqueException"
] | import org.apache.torque.TorqueException; | import org.apache.torque.*; | [
"org.apache.torque"
] | org.apache.torque; | 2,518,836 |
ExitCode precompleteCommand(ExitCode originalExit) {
eventBus.post(new CommandPrecompleteEvent(originalExit));
// If Blaze did not suffer an infrastructure failure, check for errors in modules.
ExitCode exitCode = originalExit;
if (!originalExit.isInfrastructureFailure()) {
if (pendingException ... | ExitCode precompleteCommand(ExitCode originalExit) { eventBus.post(new CommandPrecompleteEvent(originalExit)); ExitCode exitCode = originalExit; if (!originalExit.isInfrastructureFailure()) { if (pendingException != null) { exitCode = pendingException.getExitCode(); } } pendingException = null; return exitCode; } | /**
* Hook method called by the BlazeCommandDispatcher right before the dispatch
* of each command ends (while its outcome can still be modified).
*/ | Hook method called by the BlazeCommandDispatcher right before the dispatch of each command ends (while its outcome can still be modified) | precompleteCommand | {
"repo_name": "charlieaustin/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java",
"license": "apache-2.0",
"size": 69352
} | [
"com.google.devtools.build.lib.util.ExitCode"
] | import com.google.devtools.build.lib.util.ExitCode; | import com.google.devtools.build.lib.util.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,160,772 |
void init(Schema outputSchema); | void init(Schema outputSchema); | /**
* Initializes by providing the output schema.
* @param outputSchema
*/ | Initializes by providing the output schema | init | {
"repo_name": "fx19880617/pinot-1",
"path": "thirdeye/thirdeye-hadoop/src/main/java/com/linkedin/thirdeye/hadoop/transform/TransformUDF.java",
"license": "apache-2.0",
"size": 1098
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 147,167 |
public List<String> queryUris(String query, String queriedVar) {
List<String> uris = new ArrayList<String>();
for (QuerySolution solution : this.query(query)) {
Resource res = solution.getResource(queriedVar);
if (res != null) {
uris.add(FmtUtils.stringForNode(res.asNode()));
}
}
return uri... | List<String> function(String query, String queriedVar) { List<String> uris = new ArrayList<String>(); for (QuerySolution solution : this.query(query)) { Resource res = solution.getResource(queriedVar); if (res != null) { uris.add(FmtUtils.stringForNode(res.asNode())); } } return uris; } | /**
* Returns a list of URIs which are found via the given query.
* @param query The query to be performed
* @param queriedVar The variable where the URLs to be returned is stored
* @return List of found URIs or empty list
*/ | Returns a list of URIs which are found via the given query | queryUris | {
"repo_name": "Fiware/apps.WMarket",
"path": "src/main/java/org/fiware/apps/marketplace/rdf/RdfHelper.java",
"license": "bsd-3-clause",
"size": 11481
} | [
"com.hp.hpl.jena.query.QuerySolution",
"com.hp.hpl.jena.rdf.model.Resource",
"com.hp.hpl.jena.sparql.util.FmtUtils",
"java.util.ArrayList",
"java.util.List"
] | import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.rdf.model.Resource; import com.hp.hpl.jena.sparql.util.FmtUtils; import java.util.ArrayList; import java.util.List; | import com.hp.hpl.jena.query.*; import com.hp.hpl.jena.rdf.model.*; import com.hp.hpl.jena.sparql.util.*; import java.util.*; | [
"com.hp.hpl",
"java.util"
] | com.hp.hpl; java.util; | 997,346 |
HSLFSlideShow ppt = new HSLFSlideShow();
HSLFSlide slide = ppt.createSlide();
HSLFTable tbl = slide.createTable(2, 5);
HSLFTableCell cell = tbl.getCell(0, 0);
//table cells have type=TextHeaderAtom.OTHER_TYPE, see bug #46033
assertEquals(TextHeaderAtom.OTHER_TYPE, cell.getText... | HSLFSlideShow ppt = new HSLFSlideShow(); HSLFSlide slide = ppt.createSlide(); HSLFTable tbl = slide.createTable(2, 5); HSLFTableCell cell = tbl.getCell(0, 0); assertEquals(TextHeaderAtom.OTHER_TYPE, cell.getTextParagraphs().get(0).getRunType()); HSLFShape tblSh = slide.getShapes().get(0); assertTrue(tblSh instanceof HS... | /**
* Test that ShapeFactory works properly and returns <code>Table</code>
*/ | Test that ShapeFactory works properly and returns <code>Table</code> | testShapeFactory | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/scratchpad/testcases/org/apache/poi/hslf/model/TestTable.java",
"license": "apache-2.0",
"size": 5765
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"org.apache.poi.hslf.record.TextHeaderAtom",
"org.apache.poi.hslf.usermodel.HSLFShape",
"org.apache.poi.hslf.usermodel.HSLFSlide",
"org.apache.poi.hslf.usermodel.HSLFSlideShow",
"org.apache.poi.hslf.usermodel.HSLFTable",
"org.apache.poi.... | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import org.apache.poi.hslf.record.TextHeaderAtom; import org.apache.poi.hslf.usermodel.HSLFShape; import org.apache.poi.hslf.usermodel.HSLFSlide; import org.apache.poi.hslf.usermodel.HSLFSlideShow; import org.apache.poi.hslf.usermodel.HSLFTable;... | import java.io.*; import org.apache.poi.hslf.record.*; import org.apache.poi.hslf.usermodel.*; import org.junit.*; | [
"java.io",
"org.apache.poi",
"org.junit"
] | java.io; org.apache.poi; org.junit; | 200,009 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/SurfaceTypeItemProvider.java",
"license": "apache-2.0",
"size": 7760
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 1,037,757 |
public List<IntArrayList> findComponents() {
int nodes = graph.getNodes();
for (int start = 0; start < nodes; start++) {
if (nodeIndex[start] == 0
&& !ignoreSet.contains(start)
&& !graph.isNodeRemoved(start))
strongConnect(start);
... | List<IntArrayList> function() { int nodes = graph.getNodes(); for (int start = 0; start < nodes; start++) { if (nodeIndex[start] == 0 && !ignoreSet.contains(start) && !graph.isNodeRemoved(start)) strongConnect(start); } return components; } | /**
* Find and return list of all strongly connected components in g.
*/ | Find and return list of all strongly connected components in g | findComponents | {
"repo_name": "ammagamma/graphhopper",
"path": "core/src/main/java/com/graphhopper/routing/subnetwork/TarjansSCCAlgorithm.java",
"license": "apache-2.0",
"size": 7960
} | [
"com.carrotsearch.hppc.IntArrayList",
"java.util.List"
] | import com.carrotsearch.hppc.IntArrayList; import java.util.List; | import com.carrotsearch.hppc.*; import java.util.*; | [
"com.carrotsearch.hppc",
"java.util"
] | com.carrotsearch.hppc; java.util; | 1,888,866 |
private AccessRuleList createAccessRuleList(PropertyReader runtimeSettings,
String aclProperty, int interval)
throws InvalidPropertyValueException {
String acl = runtimeSettings.get(aclProperty);
// New access control list is empty
if (acl == null || acl.trim().length() < 1) {
... | AccessRuleList function(PropertyReader runtimeSettings, String aclProperty, int interval) throws InvalidPropertyValueException { String acl = runtimeSettings.get(aclProperty); if (acl == null acl.trim().length() < 1) { if (aclProperty.equals(ACL_PROPERTY)) { Log.log_3426(aclProperty); } return AccessRuleList.EMPTY; } e... | /**
* Creates the access rule list for the given property.
*
* @param runtimeSettings
* the runtime properties, never <code>null</code>.
*
* @param aclProperty
* the ACL property, never <code>null</code>
*
* @param interval
* the interval in seconds to chack if the ACL f... | Creates the access rule list for the given property | createAccessRuleList | {
"repo_name": "znerd/xins",
"path": "src/java/org/xins/server/API.java",
"license": "bsd-3-clause",
"size": 55693
} | [
"org.xins.common.collections.InvalidPropertyValueException",
"org.xins.common.collections.PropertyReader",
"org.xins.common.text.ParseException"
] | import org.xins.common.collections.InvalidPropertyValueException; import org.xins.common.collections.PropertyReader; import org.xins.common.text.ParseException; | import org.xins.common.collections.*; import org.xins.common.text.*; | [
"org.xins.common"
] | org.xins.common; | 122,316 |
public void updateArtifacts(List<Artifact> artifactsToUpdate) {
artifactsToUpdate.forEach(artifactToUpdate -> {
LifecycleEvent lifecycleEvent = new LifecycleEvent(artifactToUpdate, new Date(),
LifecycleEvent.STATE.BEFORE_UPDATE_EVENT);
try {
fireLi... | void function(List<Artifact> artifactsToUpdate) { artifactsToUpdate.forEach(artifactToUpdate -> { LifecycleEvent lifecycleEvent = new LifecycleEvent(artifactToUpdate, new Date(), LifecycleEvent.STATE.BEFORE_UPDATE_EVENT); try { fireLifecycleEvent(lifecycleEvent); Deployer deployer = getDeployer(artifactToUpdate.getType... | /**
* Updates the artifacts found in the artifacts to be updated list.
*
* @param artifactsToUpdate list of artifacts to update
*/ | Updates the artifacts found in the artifacts to be updated list | updateArtifacts | {
"repo_name": "Shakila/carbon-deployment",
"path": "components/org.wso2.carbon.deployment.engine/src/main/java/org/wso2/carbon/deployment/engine/internal/DeploymentEngine.java",
"license": "apache-2.0",
"size": 18276
} | [
"java.io.PrintWriter",
"java.io.StringWriter",
"java.util.Date",
"java.util.List",
"org.wso2.carbon.deployment.engine.Artifact",
"org.wso2.carbon.deployment.engine.Deployer",
"org.wso2.carbon.deployment.engine.LifecycleEvent",
"org.wso2.carbon.deployment.engine.exception.CarbonDeploymentException"
] | import java.io.PrintWriter; import java.io.StringWriter; import java.util.Date; import java.util.List; import org.wso2.carbon.deployment.engine.Artifact; import org.wso2.carbon.deployment.engine.Deployer; import org.wso2.carbon.deployment.engine.LifecycleEvent; import org.wso2.carbon.deployment.engine.exception.CarbonD... | import java.io.*; import java.util.*; import org.wso2.carbon.deployment.engine.*; import org.wso2.carbon.deployment.engine.exception.*; | [
"java.io",
"java.util",
"org.wso2.carbon"
] | java.io; java.util; org.wso2.carbon; | 32,223 |
public Tile getTile(int x, int y, int zoom) {
return new Tile(x, y, zoom) { | Tile function(int x, int y, int zoom) { return new Tile(x, y, zoom) { | /**
* Gets an instance of an empty tile for the given tile position and zoom on
* the world map.
*
* @param x
* The tile's x position on the world map.
* @param y
* The tile's y position on the world map.
* @param zoom
* The current zoom lev... | Gets an instance of an empty tile for the given tile position and zoom on the world map | getTile | {
"repo_name": "Gotusso/SwingX-GIS",
"path": "src/main/java/org/jdesktop/swingx/mapviewer/empty/EmptyTileFactory.java",
"license": "lgpl-2.1",
"size": 2599
} | [
"org.jdesktop.swingx.mapviewer.Tile"
] | import org.jdesktop.swingx.mapviewer.Tile; | import org.jdesktop.swingx.mapviewer.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 2,066,468 |
private Rectangle mr_paint_calcRectangleLocation(final MouseEvent _event) {
//pnt_start is equal to null if the selection is performed through
//one click.
if (pnt_start != null) {
int xLocation = Math.min(pnt_start.x, _event.getX());
int yLocation = Math.min(pnt_start.y, _event.g... | Rectangle function(final MouseEvent _event) { if (pnt_start != null) { int xLocation = Math.min(pnt_start.x, _event.getX()); int yLocation = Math.min(pnt_start.y, _event.getY()); xLocation = Math.max(0, xLocation); yLocation = Math.max(0, yLocation); int xSize = Math.min(State.getImageShowSize().width - xLocation, Math... | /**
* Method used for getting the location of the selection rectangle box.
* @param _event the MouseEvent.
* @return the location
*/ | Method used for getting the location of the selection rectangle box | mr_paint_calcRectangleLocation | {
"repo_name": "juliusHuelsmann/paint",
"path": "PaintNotes/src/main/java/control/ControlPaint.java",
"license": "apache-2.0",
"size": 100849
} | [
"java.awt.Rectangle",
"java.awt.event.MouseEvent"
] | import java.awt.Rectangle; import java.awt.event.MouseEvent; | import java.awt.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,040,051 |
static public EPlan loadPlanFromFile (URI uri, ResourceSet resourceSet) {
try {
if (resourceSet==null) resourceSet = new ResourceSetImpl();
resourceSet.getLoadOptions().put(EnsembleOption.OPTION_TO_DISABLE_PLAN_ADVISOR, Boolean.TRUE);
return EPlanUtils.loadPlanIntoResourceSetWithErrorChecking(resourceSet,... | static EPlan function (URI uri, ResourceSet resourceSet) { try { if (resourceSet==null) resourceSet = new ResourceSetImpl(); resourceSet.getLoadOptions().put(EnsembleOption.OPTION_TO_DISABLE_PLAN_ADVISOR, Boolean.TRUE); return EPlanUtils.loadPlanIntoResourceSetWithErrorChecking(resourceSet, uri, null); } catch (Excepti... | /**
* Loads a plan from a .plan file.
* @param uri a .plan file
* @param resourceSet shared ResourceSet, or null if it can be standalone
* @return null on failure, or a plan object
*/ | Loads a plan from a .plan file | loadPlanFromFile | {
"repo_name": "nasa/OpenSPIFe",
"path": "gov.nasa.ensemble.core.model.plan.diff/src/gov/nasa/ensemble/core/model/plan/diff/top/PlanDiffUtils.java",
"license": "apache-2.0",
"size": 13005
} | [
"gov.nasa.ensemble.common.EnsembleOption",
"gov.nasa.ensemble.common.logging.LogUtil",
"gov.nasa.ensemble.core.model.plan.EPlan",
"gov.nasa.ensemble.core.model.plan.util.EPlanUtils",
"org.eclipse.emf.ecore.resource.ResourceSet",
"org.eclipse.emf.ecore.resource.impl.ResourceSetImpl"
] | import gov.nasa.ensemble.common.EnsembleOption; import gov.nasa.ensemble.common.logging.LogUtil; import gov.nasa.ensemble.core.model.plan.EPlan; import gov.nasa.ensemble.core.model.plan.util.EPlanUtils; import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; | import gov.nasa.ensemble.common.*; import gov.nasa.ensemble.common.logging.*; import gov.nasa.ensemble.core.model.plan.*; import gov.nasa.ensemble.core.model.plan.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.ecore.resource.impl.*; | [
"gov.nasa.ensemble",
"org.eclipse.emf"
] | gov.nasa.ensemble; org.eclipse.emf; | 1,356,500 |
HttpHeaders headers = new HttpHeaders();
if (ex instanceof NoSuchRequestHandlingMethodException) {
HttpStatus status = HttpStatus.NOT_FOUND;
return handleNoSuchRequestHandlingMethod((NoSuchRequestHandlingMethodException) ex, headers, status, request);
}
else if (ex instanceof HttpRequestMethodNotSupporte... | HttpHeaders headers = new HttpHeaders(); if (ex instanceof NoSuchRequestHandlingMethodException) { HttpStatus status = HttpStatus.NOT_FOUND; return handleNoSuchRequestHandlingMethod((NoSuchRequestHandlingMethodException) ex, headers, status, request); } else if (ex instanceof HttpRequestMethodNotSupportedException) { H... | /**
* Provides handling for standard Spring MVC exceptions.
* @param ex the target exception
* @param request the current request
*/ | Provides handling for standard Spring MVC exceptions | handleException | {
"repo_name": "kingtang/spring-learn",
"path": "spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java",
"license": "gpl-3.0",
"size": 17606
} | [
"org.springframework.beans.ConversionNotSupportedException",
"org.springframework.beans.TypeMismatchException",
"org.springframework.http.HttpHeaders",
"org.springframework.http.HttpStatus",
"org.springframework.http.converter.HttpMessageNotReadableException",
"org.springframework.http.converter.HttpMessa... | import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.co... | import org.springframework.beans.*; import org.springframework.http.*; import org.springframework.http.converter.*; import org.springframework.validation.*; import org.springframework.web.*; import org.springframework.web.bind.*; import org.springframework.web.multipart.support.*; import org.springframework.web.servlet... | [
"org.springframework.beans",
"org.springframework.http",
"org.springframework.validation",
"org.springframework.web"
] | org.springframework.beans; org.springframework.http; org.springframework.validation; org.springframework.web; | 2,444,750 |
private boolean loginMissingToken(NextFilter nextFilter,
IoSession session,
HttpRequestMessage httpRequest,
AuthenticationToken authToken,
TypedCallbackHandlerMap a... | boolean function(NextFilter nextFilter, IoSession session, HttpRequestMessage httpRequest, AuthenticationToken authToken, TypedCallbackHandlerMap additionalCallbacks) { DefaultLoginResult loginResult = null; ResultAwareLoginContext loginContext = null; ResourceAddress address = httpRequest.getLocalAddress(); String htt... | /**
* Handle the initial "login" attempt where the client has presumably
* not sent any specific authentication token yet.
* @return always returns false.
*/ | Handle the initial "login" attempt where the client has presumably not sent any specific authentication token yet | loginMissingToken | {
"repo_name": "michaelcretzman/gateway",
"path": "transport/http/src/main/java/org/kaazing/gateway/transport/http/bridge/filter/HttpLoginSecurityFilter.java",
"license": "apache-2.0",
"size": 24897
} | [
"java.lang.String",
"javax.security.auth.login.LoginException",
"org.apache.mina.core.session.IoSession",
"org.kaazing.gateway.resource.address.ResourceAddress",
"org.kaazing.gateway.resource.address.http.HttpResourceAddress",
"org.kaazing.gateway.security.LoginContextFactory",
"org.kaazing.gateway.secu... | import java.lang.String; import javax.security.auth.login.LoginException; import org.apache.mina.core.session.IoSession; import org.kaazing.gateway.resource.address.ResourceAddress; import org.kaazing.gateway.resource.address.http.HttpResourceAddress; import org.kaazing.gateway.security.LoginContextFactory; import org.... | import java.lang.*; import javax.security.auth.login.*; import org.apache.mina.core.session.*; import org.kaazing.gateway.resource.address.*; import org.kaazing.gateway.resource.address.http.*; import org.kaazing.gateway.security.*; import org.kaazing.gateway.security.auth.*; import org.kaazing.gateway.security.auth.co... | [
"java.lang",
"javax.security",
"org.apache.mina",
"org.kaazing.gateway"
] | java.lang; javax.security; org.apache.mina; org.kaazing.gateway; | 913,333 |
public static Map<String, Object> endPreviousDay(GenericValue techDataCalendar, Timestamp dateFrom) {
Map<String, Object> result = new HashMap<String, Object>();
Timestamp dateTo = null;
GenericValue techDataCalendarWeek = null;
// TODO read TechDataCalendarExcWeek to manage except... | static Map<String, Object> function(GenericValue techDataCalendar, Timestamp dateFrom) { Map<String, Object> result = new HashMap<String, Object>(); Timestamp dateTo = null; GenericValue techDataCalendarWeek = null; try { techDataCalendarWeek = techDataCalendar.getRelatedOne(STR, true); } catch (GenericEntityException ... | /** Used to move in a TechDataCalenda, produce the Timestamp for the end of the previous day available and its associated capacity.
* If the dateFrom (param in) is not in an available TechDataCalendar period, the return value is the previous day available
*
* @param techDataCalendar The TechDataC... | Used to move in a TechDataCalenda, produce the Timestamp for the end of the previous day available and its associated capacity. If the dateFrom (param in) is not in an available TechDataCalendar period, the return value is the previous day available | endPreviousDay | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-17.12.04/applications/manufacturing/src/main/java/org/apache/ofbiz/manufacturing/techdata/TechDataServices.java",
"license": "apache-2.0",
"size": 28665
} | [
"com.ibm.icu.util.Calendar",
"java.sql.Time",
"java.sql.Timestamp",
"java.util.HashMap",
"java.util.Map",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.base.util.UtilDateTime",
"org.apache.ofbiz.entity.GenericEntityException",
"org.apache.ofbiz.entity.GenericValue",
"org.apache.ofbiz.servi... | import com.ibm.icu.util.Calendar; import java.sql.Time; import java.sql.Timestamp; import java.util.HashMap; import java.util.Map; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilDateTime; import org.apache.ofbiz.entity.GenericEntityException; import org.apache.ofbiz.entity.GenericValue; ... | import com.ibm.icu.util.*; import java.sql.*; import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.service.*; | [
"com.ibm.icu",
"java.sql",
"java.util",
"org.apache.ofbiz"
] | com.ibm.icu; java.sql; java.util; org.apache.ofbiz; | 984,000 |
private void checkType(int value)
{
IconManager im = IconManager.getInstance();
switch (value) {
case DATASET:
name = NAME_DATASET;
putValue(Action.SHORT_DESCRIPTION,
UIUtilities.formatToolTipText(DESCRIPTION_DATASET));
putValue(Action.SMALL_ICON, im.getIcon(IconManager.DATASET... | void function(int value) { IconManager im = IconManager.getInstance(); switch (value) { case DATASET: name = NAME_DATASET; putValue(Action.SHORT_DESCRIPTION, UIUtilities.formatToolTipText(DESCRIPTION_DATASET)); putValue(Action.SMALL_ICON, im.getIcon(IconManager.DATASET)); break; default: break; } } | /**
* Checks if the passed value is supported.
*
* @param value The value to handle.
*/ | Checks if the passed value is supported | checkType | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/actions/CreateObjectWithChildren.java",
"license": "gpl-2.0",
"size": 5906
} | [
"javax.swing.Action",
"org.openmicroscopy.shoola.agents.treeviewer.IconManager",
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import javax.swing.Action; import org.openmicroscopy.shoola.agents.treeviewer.IconManager; import org.openmicroscopy.shoola.util.ui.UIUtilities; | import javax.swing.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.util.ui.*; | [
"javax.swing",
"org.openmicroscopy.shoola"
] | javax.swing; org.openmicroscopy.shoola; | 2,759,132 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.