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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void notifyListeners(DatasetChangeEvent event) {
Object[] listeners = this.listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == DatasetChangeListener.class) {
((DatasetChangeListener) listeners[i + 1]).data... | void function(DatasetChangeEvent event) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == DatasetChangeListener.class) { ((DatasetChangeListener) listeners[i + 1]).datasetChanged( event); } } } | /**
* Notifies all registered listeners that the dataset has changed.
*
* @param event contains information about the event that triggered the
* notification.
*
* @see #addChangeListener(DatasetChangeListener)
* @see #removeChangeListener(DatasetChangeListener)
... | Notifies all registered listeners that the dataset has changed | notifyListeners | {
"repo_name": "linuxuser586/jfreechart",
"path": "source/org/jfree/data/general/AbstractDataset.java",
"license": "lgpl-2.1",
"size": 9667
} | [
"org.jfree.data.event.DatasetChangeEvent",
"org.jfree.data.event.DatasetChangeListener"
] | import org.jfree.data.event.DatasetChangeEvent; import org.jfree.data.event.DatasetChangeListener; | import org.jfree.data.event.*; | [
"org.jfree.data"
] | org.jfree.data; | 482,210 |
public void setCategoryAnchor(CategoryAnchor anchor) {
Args.nullNotPermitted(anchor, "anchor");
this.categoryAnchor = anchor;
fireAnnotationChanged();
} | void function(CategoryAnchor anchor) { Args.nullNotPermitted(anchor, STR); this.categoryAnchor = anchor; fireAnnotationChanged(); } | /**
* Sets the category anchor point and sends an
* {@link AnnotationChangeEvent} to all registered listeners.
*
* @param anchor the anchor point ({@code null} not permitted).
*
* @see #getCategoryAnchor()
*/ | Sets the category anchor point and sends an <code>AnnotationChangeEvent</code> to all registered listeners | setCategoryAnchor | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/annotations/CategoryTextAnnotation.java",
"license": "lgpl-2.1",
"size": 8545
} | [
"org.jfree.chart.axis.CategoryAnchor",
"org.jfree.chart.internal.Args"
] | import org.jfree.chart.axis.CategoryAnchor; import org.jfree.chart.internal.Args; | import org.jfree.chart.axis.*; import org.jfree.chart.internal.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,429,858 |
public final OnClickListener getQuickContact(final Context context, final View target,
final String number, final int mode, final String[] excludeMimes) {
if (number == null) {
return null;
} | final OnClickListener function(final Context context, final View target, final String number, final int mode, final String[] excludeMimes) { if (number == null) { return null; } | /**
* Get a QuickContact dialog for a given number.
*
* @param context
* The parent Context that may be used as the parent for this dialog.
* @param target
* Specific View from your layout that this dialog should be centered around. In
* particular, if the dialog has a "c... | Get a QuickContact dialog for a given number | getQuickContact | {
"repo_name": "eldabbagh/ub0rlib",
"path": "src/de/ub0r/android/lib/apis/ContactsWrapper.java",
"license": "gpl-3.0",
"size": 14600
} | [
"android.content.Context",
"android.view.View"
] | import android.content.Context; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 286,045 |
private String generate(PreparedStatement pstmt)
{
ResultSet rs = null;
try
{
rs = pstmt.executeQuery();
while (rs.next())
{
MOrder order = new MOrder(getCtx(), rs, get_TrxName());
final boolean consolidate = computeConsolidate(order);
final MDocType docType = MDocType.get(Env.getCtx(),... | String function(PreparedStatement pstmt) { ResultSet rs = null; try { rs = pstmt.executeQuery(); while (rs.next()) { MOrder order = new MOrder(getCtx(), rs, get_TrxName()); final boolean consolidate = computeConsolidate(order); final MDocType docType = MDocType.get(Env.getCtx(), order .getC_DocType_ID()); final boolean... | /**
* Generate Shipments
*
* @param pstmt
* order query
* @return info
*/ | Generate Shipments | generate | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.business/src/main/java-legacy/org/compiere/process/InvoiceGenerate.java",
"license": "gpl-2.0",
"size": 19532
} | [
"java.math.BigDecimal",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.adempiere.exceptions.DBException",
"org.adempiere.model.InterfaceWrapperHelper",
"org.compiere.model.MBPartner",
"org.compiere.model.MDocType",
"org.compiere.model.MInOut",
"org.compiere.model... | import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.adempiere.exceptions.DBException; import org.adempiere.model.InterfaceWrapperHelper; import org.compiere.model.MBPartner; import org.compiere.model.MDocType; import org.compiere.model.MInO... | import java.math.*; import java.sql.*; import org.adempiere.exceptions.*; import org.adempiere.model.*; import org.compiere.model.*; import org.compiere.util.*; | [
"java.math",
"java.sql",
"org.adempiere.exceptions",
"org.adempiere.model",
"org.compiere.model",
"org.compiere.util"
] | java.math; java.sql; org.adempiere.exceptions; org.adempiere.model; org.compiere.model; org.compiere.util; | 1,433,917 |
public static String getOverlayMetadata(
Context context,
String packageName,
String metadata) {
try {
ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo(
packageName, PackageManager.GET_META_DATA);
if (app... | static String function( Context context, String packageName, String metadata) { try { ApplicationInfo appInfo = context.getPackageManager().getApplicationInfo( packageName, PackageManager.GET_META_DATA); if (appInfo.metaData != null) { if (metadata.equals(metadataSamsungSupport)) { try { boolean samsungSupport = appInf... | /**
* Grab a specified metadata from a theme
*
* @param context Context
* @param packageName Package name of the desired app to be checked
* @param metadata Name of the metadata to be acquired
* @return Returns a string of the metadata's output
*/ | Grab a specified metadata from a theme | getOverlayMetadata | {
"repo_name": "iskandar1023/substratum",
"path": "app/src/main/java/projekt/substratum/common/Packages.java",
"license": "gpl-3.0",
"size": 35407
} | [
"android.content.Context",
"android.content.pm.ApplicationInfo",
"android.content.pm.PackageManager"
] | import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; | import android.content.*; import android.content.pm.*; | [
"android.content"
] | android.content; | 1,195,851 |
private JTabbedPane jTabbedPane = new JTabbedPane();
private JPanel messagesPanel = new JPanel(){
public void paintComponent(Graphics g)
{ super.paintComponent(g);
this.setForeground(Color.BLUE);
super.paintComponent(g);
ImageScaler is = new ImageScaler();
ImageIcon icon = new Ima... | JTabbedPane jTabbedPane = new JTabbedPane(); private JPanel messagesPanel = new JPanel(){ public void function(Graphics g) { super.paintComponent(g); this.setForeground(Color.BLUE); super.paintComponent(g); ImageScaler is = new ImageScaler(); ImageIcon icon = new ImageIcon(is.getScaledInstance(STR,600,400)); Image imag... | /**
* added by kumarvi
*/ | added by kumarvi | paintComponent | {
"repo_name": "NCIP/caaers",
"path": "caAERS/software/AntInstaller/src/org/tp23/antinstaller/renderer/swing/ProgressPageRenderer.java",
"license": "bsd-3-clause",
"size": 7595
} | [
"java.awt.Color",
"java.awt.Graphics",
"java.awt.Image",
"javax.swing.ImageIcon",
"javax.swing.JPanel",
"javax.swing.JTabbedPane"
] | import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import javax.swing.ImageIcon; import javax.swing.JPanel; import javax.swing.JTabbedPane; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,725,574 |
public XYItemLabelGenerator getItemLabelGenerator() {
return this.itemLabelGenerator;
}
| XYItemLabelGenerator function() { return this.itemLabelGenerator; } | /**
* Returns the item label generator override.
*
* @return The generator (possibly <code>null</code>).
*
* @since 1.0.5
*
* @see #setItemLabelGenerator(XYItemLabelGenerator)
*
* @deprecated As of version 1.0.6, this override setting should not be
* used.... | Returns the item label generator override | getItemLabelGenerator | {
"repo_name": "lulab/PI",
"path": "MISC_scripts/java/Kevin_scripts/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java",
"license": "gpl-2.0",
"size": 72893
} | [
"org.jfree.chart.labels.XYItemLabelGenerator"
] | import org.jfree.chart.labels.XYItemLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,586,402 |
@Test
public void testNotDiscontinuedApplication() {
final String project4 = helper.getApplicationPath("Family 1", "project4");
final boolean isProject3Discontinued = MetadataHelper.isDiscontinued(project4);
assertFalse(isProject3Discontinued);
} | void function() { final String project4 = helper.getApplicationPath(STR, STR); final boolean isProject3Discontinued = MetadataHelper.isDiscontinued(project4); assertFalse(isProject3Discontinued); } | /**
* Test that we dont label applications as discontinued when they are not.
*/ | Test that we dont label applications as discontinued when they are not | testNotDiscontinuedApplication | {
"repo_name": "pwhittlesea/release-repo",
"path": "src/test/java/uk/me/thega/model/metadata/ApplicationMetadataIT.java",
"license": "mit",
"size": 1184
} | [
"org.junit.Assert",
"uk.me.thega.model.util.MetadataHelper"
] | import org.junit.Assert; import uk.me.thega.model.util.MetadataHelper; | import org.junit.*; import uk.me.thega.model.util.*; | [
"org.junit",
"uk.me.thega"
] | org.junit; uk.me.thega; | 233,963 |
public ConfigProgram getBuilderProgram()
{
return _program;
} | ConfigProgram function() { return _program; } | /**
* Returns the program.
*/ | Returns the program | getBuilderProgram | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/env/deploy/DeployConfig.java",
"license": "gpl-2.0",
"size": 6215
} | [
"com.caucho.config.program.ConfigProgram"
] | import com.caucho.config.program.ConfigProgram; | import com.caucho.config.program.*; | [
"com.caucho.config"
] | com.caucho.config; | 2,247,097 |
//-------------------------------------------------------------------------
public Clock getClock() {
return _delegate.getClock();
} | Clock function() { return _delegate.getClock(); } | /**
* Gets the clock that determines the current time.
*
* @return the clock, not null
*/ | Gets the clock that determines the current time | getClock | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/bean/AbstractDelegatingBeanMaster.java",
"license": "apache-2.0",
"size": 7236
} | [
"org.threeten.bp.Clock"
] | import org.threeten.bp.Clock; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 249,473 |
PreviewSubscription refresh(Context context); | PreviewSubscription refresh(Context context); | /**
* Refreshes the resource to sync with Azure.
*
* @param context The context to associate with this operation.
* @return the refreshed resource.
*/ | Refreshes the resource to sync with Azure | refresh | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/models/PreviewSubscription.java",
"license": "mit",
"size": 4260
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,637,789 |
@Test
public void testLang720() {
final String input = new StringBuilder("\ud842\udfb7").append("A").toString();
final String escaped = StringEscapeUtils.escapeXml(input);
assertEquals(input, escaped);
} | void function() { final String input = new StringBuilder(STR).append("A").toString(); final String escaped = StringEscapeUtils.escapeXml(input); assertEquals(input, escaped); } | /**
* Tests https://issues.apache.org/jira/browse/LANG-720
*/ | Tests HREF | testLang720 | {
"repo_name": "mureinik/commons-lang",
"path": "src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java",
"license": "apache-2.0",
"size": 24707
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,292,771 |
private static ResultTable executeTopVideosQuery(YouTubeAnalytics analytics,
String id) throws IOException {
return analytics.reports()
.query("channel==" + id, // channel id
"2012-01-01", ... | static ResultTable function(YouTubeAnalytics analytics, String id) throws IOException { return analytics.reports() .query(STR + id, STR, STR, STR) .setDimensions("video") .setSort(STR) .setMaxResults(10) .execute(); } | /**
* Returns the top video by views.
*
* @param analytics the analytics service object used to access the API.
* @param id the string id from which to retrieve data.
* @return the response from the API.
* @throws IOException if an API error occurred.
*/ | Returns the top video by views | executeTopVideosQuery | {
"repo_name": "artama/yt-samples-java",
"path": "src/main/java/com/google/api/services/samples/youtube/cmdline/analytics/YouTubeAnalyticsReports.java",
"license": "apache-2.0",
"size": 9041
} | [
"com.google.api.services.youtubeAnalytics.YouTubeAnalytics",
"com.google.api.services.youtubeAnalytics.model.ResultTable",
"java.io.IOException"
] | import com.google.api.services.youtubeAnalytics.YouTubeAnalytics; import com.google.api.services.youtubeAnalytics.model.ResultTable; import java.io.IOException; | import com.google.api.services.*; import java.io.*; | [
"com.google.api",
"java.io"
] | com.google.api; java.io; | 2,172,310 |
public static int put(ByteBuffer source, ByteBuffer destination) {
int srcSize = source.remaining();
int dstSize = destination.remaining();
if (dstSize >= srcSize) {
destination.put(source);
return srcSize;
}
int limit = source.limit();
sourc... | static int function(ByteBuffer source, ByteBuffer destination) { int srcSize = source.remaining(); int dstSize = destination.remaining(); if (dstSize >= srcSize) { destination.put(source); return srcSize; } int limit = source.limit(); source.limit(source.position() + dstSize); destination.put(source); source.limit(limi... | /**
* Puts source contents into the destination buffer until the destination is full.
* @param source the source buffer
* @param destination the destination buffer
* @return the moved size in bytes
* @since 0.5.3
*/ | Puts source contents into the destination buffer until the destination is full | put | {
"repo_name": "asakusafw/asakusafw-compiler",
"path": "vanilla/runtime/core/src/main/java/com/asakusafw/vanilla/core/util/Buffers.java",
"license": "apache-2.0",
"size": 7663
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,942,505 |
public List<ORecordOperation> getNewRecordEntriesByClass(final OClass iClass, final boolean iPolymorphic) {
final List<ORecordOperation> result = new ArrayList<ORecordOperation>();
if (iClass == null)
// RETURN ALL THE RECORDS
for (ORecordOperation entry : recordEntries.values()) {
... | List<ORecordOperation> function(final OClass iClass, final boolean iPolymorphic) { final List<ORecordOperation> result = new ArrayList<ORecordOperation>(); if (iClass == null) for (ORecordOperation entry : recordEntries.values()) { if (entry.type == ORecordOperation.CREATED) result.add(entry); } else { for (ORecordOper... | /**
* Called by class iterator.
*/ | Called by class iterator | getNewRecordEntriesByClass | {
"repo_name": "jdillon/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/tx/OTransactionRealAbstract.java",
"license": "apache-2.0",
"size": 15777
} | [
"com.orientechnologies.orient.core.db.record.ORecordOperation",
"com.orientechnologies.orient.core.metadata.schema.OClass",
"com.orientechnologies.orient.core.record.impl.ODocument",
"java.util.ArrayList",
"java.util.List"
] | import com.orientechnologies.orient.core.db.record.ORecordOperation; import com.orientechnologies.orient.core.metadata.schema.OClass; import com.orientechnologies.orient.core.record.impl.ODocument; import java.util.ArrayList; import java.util.List; | import com.orientechnologies.orient.core.db.record.*; import com.orientechnologies.orient.core.metadata.schema.*; import com.orientechnologies.orient.core.record.impl.*; import java.util.*; | [
"com.orientechnologies.orient",
"java.util"
] | com.orientechnologies.orient; java.util; | 246,259 |
public void disable() throws CANTimeoutException, NullPointerException
{
rear.disableTurnControl();
rear.disableSpeedControl();
front.disableTurnControl();
front.disableSpeedControl();
} | void function() throws CANTimeoutException, NullPointerException { rear.disableTurnControl(); rear.disableSpeedControl(); front.disableTurnControl(); front.disableSpeedControl(); } | /**
* *
* disable()
*
* this method disables control for the steering and drive
*
* @throws CANTimeoutException
* @throws NullPointerException
*/ | disable() this method disables control for the steering and drive | disable | {
"repo_name": "FIRST-FRC-Team-2028/2012",
"path": "src/com/phoebushighschool/phoebusrobotics/telepath/CrabDrive.java",
"license": "bsd-3-clause",
"size": 14707
} | [
"edu.wpi.first.wpilibj.can.CANTimeoutException"
] | import edu.wpi.first.wpilibj.can.CANTimeoutException; | import edu.wpi.first.wpilibj.can.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 151,206 |
@Test
public void testMasterSwitch() {
agent.addConnectedSwitch(dpid1, switch1);
agent.transitionToMasterSwitch(dpid1);
Stream<OpenFlowSwitch> fetchedMasterSwitches =
makeIntoStream(controller.getMasterSwitches());
assertThat(fetchedMasterSwitches.count(), is(1L)... | void function() { agent.addConnectedSwitch(dpid1, switch1); agent.transitionToMasterSwitch(dpid1); Stream<OpenFlowSwitch> fetchedMasterSwitches = makeIntoStream(controller.getMasterSwitches()); assertThat(fetchedMasterSwitches.count(), is(1L)); Stream<OpenFlowSwitch> fetchedActivatedSwitches = makeIntoStream(controller... | /**
* Tests adding master switches.
*/ | Tests adding master switches | testMasterSwitch | {
"repo_name": "wuwenbin2/onos_bgp_evpn",
"path": "protocols/openflow/ctl/src/test/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImplTest.java",
"license": "apache-2.0",
"size": 10571
} | [
"java.util.stream.Stream",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.onosproject.openflow.controller.OpenFlowSwitch"
] | import java.util.stream.Stream; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.openflow.controller.OpenFlowSwitch; | import java.util.stream.*; import org.hamcrest.*; import org.onosproject.openflow.controller.*; | [
"java.util",
"org.hamcrest",
"org.onosproject.openflow"
] | java.util; org.hamcrest; org.onosproject.openflow; | 209,685 |
protected void createSpacer(Composite parent) {
Label spacer= new Label(parent, SWT.NONE);
GridData data= new GridData();
data.horizontalAlignment= GridData.FILL;
data.verticalAlignment= GridData.BEGINNING;
spacer.setLayoutData(data);
} | void function(Composite parent) { Label spacer= new Label(parent, SWT.NONE); GridData data= new GridData(); data.horizontalAlignment= GridData.FILL; data.verticalAlignment= GridData.BEGINNING; spacer.setLayoutData(data); } | /**
* Creates a horizontal spacer line that fills the width of its container.
*
* @param parent the parent control
*/ | Creates a horizontal spacer line that fills the width of its container | createSpacer | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/jarpackager/JarManifestWizardPage.java",
"license": "epl-1.0",
"size": 39332
} | [
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 128,364 |
public Channel<GlobalConnectorSendInterceptor> getGlobalChannel(); | Channel<GlobalConnectorSendInterceptor> function(); | /**
* Returns the {@link Channel} which delivers {@link Event}s to the specific connector send channel ({@link #getSpecificChannel()}).
* The last interceptor splits an invocation of the channel into multiple ones for every {@link BridgeConnector}.
* The channel is invoked by the {@link #send(Event)} met... | Returns the <code>Channel</code> which delivers <code>Event</code>s to the specific connector send channel (<code>#getSpecificChannel()</code>). The last interceptor splits an invocation of the channel into multiple ones for every <code>BridgeConnector</code>. The channel is invoked by the <code>#send(Event)</code> met... | getGlobalChannel | {
"repo_name": "QuarterCode/EventBridge",
"path": "src/main/java/com/quartercode/eventbridge/bridge/module/ConnectorSenderModule.java",
"license": "lgpl-3.0",
"size": 4613
} | [
"com.quartercode.eventbridge.channel.Channel"
] | import com.quartercode.eventbridge.channel.Channel; | import com.quartercode.eventbridge.channel.*; | [
"com.quartercode.eventbridge"
] | com.quartercode.eventbridge; | 2,523,588 |
@Deprecated
public ComponentGenerationContext setDatasource(Datasource datasource) {
this.datasource = datasource;
return this;
} | ComponentGenerationContext function(Datasource datasource) { this.datasource = datasource; return this; } | /**
* Sets a datasource, using fluent API method.
*
* @param datasource a datasource
* @return this object
* @deprecated Use {@link #setValueSource(ValueSource)} instead
*/ | Sets a datasource, using fluent API method | setDatasource | {
"repo_name": "cuba-platform/cuba",
"path": "modules/gui/src/com/haulmont/cuba/gui/components/ComponentGenerationContext.java",
"license": "apache-2.0",
"size": 6921
} | [
"com.haulmont.cuba.gui.data.Datasource"
] | import com.haulmont.cuba.gui.data.Datasource; | import com.haulmont.cuba.gui.data.*; | [
"com.haulmont.cuba"
] | com.haulmont.cuba; | 2,660,224 |
public void paintViewportBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
paintBorder(context, g, x, y, w, h, null);
} | void function(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBorder(context, g, x, y, w, h, null); } | /**
* Paints the border of a viewport.
*
* @param context SynthContext identifying the <code>JComponent</code> and
* <code>Region</code> to paint to
* @param g <code>Graphics</code> to paint to
* @param x X coordinate of the area to paint to
* @param y ... | Paints the border of a viewport | paintViewportBorder | {
"repo_name": "anhtu1995ok/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java",
"license": "apache-2.0",
"size": 119406
} | [
"java.awt.Graphics",
"javax.swing.plaf.synth.SynthContext"
] | import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext; | import java.awt.*; import javax.swing.plaf.synth.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,401,469 |
@Override
public void onDialogPhotoClick(DialogFragment dialog) {
// User touched the dialog's "Take picture" button
dialog.dismiss();
dispatchTakePictureIntent();
} | void function(DialogFragment dialog) { dialog.dismiss(); dispatchTakePictureIntent(); } | /**
* The dialog fragment receives a reference to this Activity through the
* Fragment.onAttach() callback, which it uses to call the following methods
* defined by the ListDialogFragment.ListDialogListener interface.
*/ | The dialog fragment receives a reference to this Activity through the Fragment.onAttach() callback, which it uses to call the following methods defined by the ListDialogFragment.ListDialogListener interface | onDialogPhotoClick | {
"repo_name": "Sam1301/zulip-android",
"path": "app/src/main/java/com/zulip/android/activities/ZulipActivity.java",
"license": "apache-2.0",
"size": 109783
} | [
"android.app.DialogFragment"
] | import android.app.DialogFragment; | import android.app.*; | [
"android.app"
] | android.app; | 988,930 |
public synchronized void prepareChannelsForShutdown () {
if (!globalErrorBasedFlowControlEnabled) {
globalErrorBasedFlowControlEnabled = true;
shutDownTriggered = true;
log.info("Prepare channels for shutdown.");
for (AndesChannel channel : channels) {
... | synchronized void function () { if (!globalErrorBasedFlowControlEnabled) { globalErrorBasedFlowControlEnabled = true; shutDownTriggered = true; log.info(STR); for (AndesChannel channel : channels) { channel.notifyGlobalBufferBasedFlowControlActivation(); } scheduledBufferBasedFlowControlTimeoutFuture = executor.schedul... | /**
* Notify all channels to enable flow control when shutdown hook triggered to avoid message loss in publishers
*/ | Notify all channels to enable flow control when shutdown hook triggered to avoid message loss in publishers | prepareChannelsForShutdown | {
"repo_name": "prabathariyaratna/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/FlowControlManager.java",
"license": "apache-2.0",
"size": 16184
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,788,445 |
if (client == null) {
throw new NullPointerException("Cannot attach headers to a null client");
}
if (client instanceof AbstractStub) {
return (T) MetadataUtils.attachHeaders((AbstractStub) client, extraHeaders);
} else if (client instanceof MutinyClient) {
Mu... | if (client == null) { throw new NullPointerException(STR); } if (client instanceof AbstractStub) { return (T) MetadataUtils.attachHeaders((AbstractStub) client, extraHeaders); } else if (client instanceof MutinyClient) { MutinyClient mutinyClient = (MutinyClient) client; AbstractStub stub = MetadataUtils.attachHeaders(... | /**
* Attach headers to a gRPC client.
*
* To make a call with headers, first invoke this method and then perform the intended call with the <b>returned</b> client
*
* @param client any kind of gRPC client
* @param extraHeaders headers to attach
* @param <T> type of the client
* ... | Attach headers to a gRPC client. To make a call with headers, first invoke this method and then perform the intended call with the returned client | attachHeaders | {
"repo_name": "quarkusio/quarkus",
"path": "extensions/grpc/runtime/src/main/java/io/quarkus/grpc/GrpcClientUtils.java",
"license": "apache-2.0",
"size": 1407
} | [
"io.grpc.stub.AbstractStub",
"io.grpc.stub.MetadataUtils",
"io.quarkus.grpc.runtime.MutinyClient"
] | import io.grpc.stub.AbstractStub; import io.grpc.stub.MetadataUtils; import io.quarkus.grpc.runtime.MutinyClient; | import io.grpc.stub.*; import io.quarkus.grpc.runtime.*; | [
"io.grpc.stub",
"io.quarkus.grpc"
] | io.grpc.stub; io.quarkus.grpc; | 2,136,485 |
public boolean isVisibleInBoundingBox(final XBoundingBox box) {
final FeatureFactory ff = getFeatureFactory();
if (ff instanceof AbstractFeatureFactory) {
final List<org.deegree.style.se.unevaluated.Style> styles = ((AbstractFeatureFactory)ff).getStyle(
((AbstractFea... | boolean function(final XBoundingBox box) { final FeatureFactory ff = getFeatureFactory(); if (ff instanceof AbstractFeatureFactory) { final List<org.deegree.style.se.unevaluated.Style> styles = ((AbstractFeatureFactory)ff).getStyle( ((AbstractFeatureFactory)ff).layerName); if (styles != null) { for (final org.deegree.s... | /**
* Determines if this service has any restriction that forbids the retrieval of features for the given bounding box.
*
* @param box DOCUMENT ME!
*
* @return false, iff any restriction (e.g. the scale) prevents the retrieval of features for the given bounding
* box
*/ | Determines if this service has any restriction that forbids the retrieval of features for the given bounding box | isVisibleInBoundingBox | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/featureservice/AbstractFeatureService.java",
"license": "lgpl-3.0",
"size": 82123
} | [
"de.cismet.cismap.commons.XBoundingBox",
"de.cismet.cismap.commons.featureservice.factory.AbstractFeatureFactory",
"de.cismet.cismap.commons.featureservice.factory.FeatureFactory",
"de.cismet.cismap.commons.featureservice.style.Style",
"de.cismet.cismap.commons.interaction.CismapBroker",
"java.beans.Prope... | import de.cismet.cismap.commons.XBoundingBox; import de.cismet.cismap.commons.featureservice.factory.AbstractFeatureFactory; import de.cismet.cismap.commons.featureservice.factory.FeatureFactory; import de.cismet.cismap.commons.featureservice.style.Style; import de.cismet.cismap.commons.interaction.CismapBroker; import... | import de.cismet.cismap.commons.*; import de.cismet.cismap.commons.featureservice.factory.*; import de.cismet.cismap.commons.featureservice.style.*; import de.cismet.cismap.commons.interaction.*; import java.beans.*; import java.util.*; import javax.swing.*; | [
"de.cismet.cismap",
"java.beans",
"java.util",
"javax.swing"
] | de.cismet.cismap; java.beans; java.util; javax.swing; | 1,557,295 |
SocketAddress getRemoteAddress(); | SocketAddress getRemoteAddress(); | /**
* Returns the socket address of remote peer.
*/ | Returns the socket address of remote peer | getRemoteAddress | {
"repo_name": "lucastheisen/mina-sshd",
"path": "sshd-core/src/main/java/org/apache/sshd/common/io/IoSession.java",
"license": "apache-2.0",
"size": 2734
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 325,539 |
public void trigger(Block b, Player p) {
if(this.action != null) {
this.action.fire(p, null, null);
}
if (puzzleBuildingBlock != null) {
puzzleBuildingBlock.put("active", true);
}
} | void function(Block b, Player p) { if(this.action != null) { this.action.fire(p, null, null); } if (puzzleBuildingBlock != null) { puzzleBuildingBlock.put(STR, true); } } | /**
* Trigger this BlockTarget
*
* @param b The Block that was pushed on this target
* @param p The Player who has pushed the triggering Block on this target
*/ | Trigger this BlockTarget | trigger | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "src/games/stendhal/server/entity/mapstuff/block/BlockTarget.java",
"license": "gpl-2.0",
"size": 3962
} | [
"games.stendhal.server.entity.player.Player"
] | import games.stendhal.server.entity.player.Player; | import games.stendhal.server.entity.player.*; | [
"games.stendhal.server"
] | games.stendhal.server; | 1,946,212 |
@Before
public void setUp() throws Exception {
final String[] args = {
"nameStringExists=valueStringExists",
"nameIntegerExists=111",
"nameLongExists=333",
"nameDoubleExists=555.666",
};
this.argMap = new ArgMap(args);
} | void function() throws Exception { final String[] args = { STR, STR, STR, STR, }; this.argMap = new ArgMap(args); } | /**
* Sets the up.
*
* @throws Exception the exception
*/ | Sets the up | setUp | {
"repo_name": "petezybrick/iote2e",
"path": "iote2e-tests/src/main/java/com/pzybrick/iote2e/tests/common/TestArgMap.java",
"license": "apache-2.0",
"size": 4502
} | [
"com.pzybrick.iote2e.common.utils.ArgMap"
] | import com.pzybrick.iote2e.common.utils.ArgMap; | import com.pzybrick.iote2e.common.utils.*; | [
"com.pzybrick.iote2e"
] | com.pzybrick.iote2e; | 782,049 |
@Authorized({PrivilegeConstants.EDIT_USER_PASSWORDS})
public void changePassword(User user, String newPassword) throws APIException;
| @Authorized({PrivilegeConstants.EDIT_USER_PASSWORDS}) void function(User user, String newPassword) throws APIException; | /**
* Changes password of {@link User} passed in
* @param user user whose password is to be changed
* @param newPassword new password to set
* @throws APIException
* @should update password of given user when logged in user has edit users password privilege
* @should not update password of given user when l... | Changes password of <code>User</code> passed in | changePassword | {
"repo_name": "koskedk/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/UserService.java",
"license": "mpl-2.0",
"size": 19669
} | [
"org.openmrs.User",
"org.openmrs.annotation.Authorized",
"org.openmrs.util.PrivilegeConstants"
] | import org.openmrs.User; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants; | import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*; | [
"org.openmrs",
"org.openmrs.annotation",
"org.openmrs.util"
] | org.openmrs; org.openmrs.annotation; org.openmrs.util; | 365,725 |
private void doLayout() {
// Measure and update the layout so that it will take up the entire surface space
// when it is drawn.
int measuredWidth = View.MeasureSpec.makeMeasureSpec(mSurfaceWidth,
View.MeasureSpec.EXACTLY);
int measuredHeight = View.MeasureSpec.makeMe... | void function() { int measuredWidth = View.MeasureSpec.makeMeasureSpec(mSurfaceWidth, View.MeasureSpec.EXACTLY); int measuredHeight = View.MeasureSpec.makeMeasureSpec(mSurfaceHeight, View.MeasureSpec.EXACTLY); mLayout.measure(measuredWidth, measuredHeight); mLayout.layout(0, 0, mLayout.getMeasuredWidth(), mLayout.getMe... | /**
* Requests that the views redo their layout. This must be called manually every time the
* tips view's text is updated because this layout doesn't exist in a GUI thread where those
* requests will be enqueued automatically.
*/ | Requests that the views redo their layout. This must be called manually every time the tips view's text is updated because this layout doesn't exist in a GUI thread where those requests will be enqueued automatically | doLayout | {
"repo_name": "ZackFreedman/Voidstar-AutoHud",
"path": "src/com/voidstar/glass/autohud/HudRenderer.java",
"license": "apache-2.0",
"size": 8258
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,695,438 |
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayLi... | void function() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table girl
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table girl | clear | {
"repo_name": "zuoqing135du/SpringBoot",
"path": "src/main/java/com/zuoqing/demo/entity/DemoGirlExample.java",
"license": "apache-2.0",
"size": 13900
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 271,238 |
@AllowedFFDC({ "com.ibm.websphere.security.jwt.InvalidClaimException" })
@Test
public void NoOPMangleJWT1ServerTests_Missing_aud() throws Exception {
String badJwtToken = buildAJWTToken(testSettings, Constants.PAYLOAD_AUDIENCE, null);
String[] errorMsgs = null;
if (testSettings.get... | @AllowedFFDC({ STR }) void function() throws Exception { String badJwtToken = buildAJWTToken(testSettings, Constants.PAYLOAD_AUDIENCE, null); String[] errorMsgs = null; if (testSettings.getUseJwtConsumer()) { errorMsgs = new String[] { MessageConstants.CWWKS6031E_JWT_CONSUMER_CANNOT_PROCESS_STRING + ".+\\[" + testSetti... | /**
* Create a JWT token with a missing "aud" - there is an audience in the config
* The request should fail with a 401 exception
*
* @throws Exception
*/ | Create a JWT token with a missing "aud" - there is an audience in the config The request should fail with a 401 exception | NoOPMangleJWT1ServerTests_Missing_aud | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.security.oauth.oidc_fat.common/src/com/ibm/ws/security/oauth_oidc/fat/commonTest/sharedTests/JwtCommonTests.java",
"license": "epl-1.0",
"size": 48785
} | [
"com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants",
"com.ibm.ws.security.oauth_oidc.fat.commonTest.MessageConstants"
] | import com.ibm.ws.security.oauth_oidc.fat.commonTest.Constants; import com.ibm.ws.security.oauth_oidc.fat.commonTest.MessageConstants; | import com.ibm.ws.security.oauth_oidc.fat.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 558,954 |
public void setSource(File file) throws IOException {
File original = file;
m_structure = null;
setRetrieval(NONE);
if (file == null)
throw new IOException("Source file object is null!");
// try {
String fName = file.getPath();
try {
if (m_env == null) {
m... | void function(File file) throws IOException { File original = file; m_structure = null; setRetrieval(NONE); if (file == null) throw new IOException(STR); String fName = file.getPath(); try { if (m_env == null) { m_env = Environment.getSystemWide(); } fName = m_env.substitute(fName); } catch (Exception e) { } file = new... | /**
* Resets the Loader object and sets the source of the data set to be
* the supplied File object.
*
* @param file the source file.
* @throws IOException if an error occurs
*/ | Resets the Loader object and sets the source of the data set to be the supplied File object | setSource | {
"repo_name": "goddesss/DataModeling",
"path": "src/weka/core/converters/AbstractFileLoader.java",
"license": "gpl-2.0",
"size": 9004
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.zip.GZIPInputStream"
] | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.zip.GZIPInputStream; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,866,269 |
public void updateRef(String columnName, Ref x)
throws SQLException
{
throw Util.notImplemented();
} | void function(String columnName, Ref x) throws SQLException { throw Util.notImplemented(); } | /**
* JDBC 3.0
*
* Updates the designated column with a java.sql.Ref value. The updater methods are
* used to update column values in the current row or the insert row. The
* updater methods do not update the underlying database; instead the updateRow
* or insertRow methods are called to update ... | JDBC 3.0 Updates the designated column with a java.sql.Ref value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database | updateRef | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/jdbc/EmbedResultSet20.java",
"license": "apache-2.0",
"size": 16017
} | [
"com.pivotal.gemfirexd.internal.impl.jdbc.Util",
"java.sql.Ref",
"java.sql.SQLException"
] | import com.pivotal.gemfirexd.internal.impl.jdbc.Util; import java.sql.Ref; import java.sql.SQLException; | import com.pivotal.gemfirexd.internal.impl.jdbc.*; import java.sql.*; | [
"com.pivotal.gemfirexd",
"java.sql"
] | com.pivotal.gemfirexd; java.sql; | 1,067,022 |
private SpecialEventTO setPresaleConfigurationToBooking( SpecialEventTO specialEventTO )
{
if( this.rulePresaleStartDate != null )
{
specialEventTO.getPresaleTO().setDtStartDayPresale( this.rulePresaleStartDate );
}
if( this.rulePresaleFinalDate != null )
{
specialEventTO.getPresaleT... | SpecialEventTO function( SpecialEventTO specialEventTO ) { if( this.rulePresaleStartDate != null ) { specialEventTO.getPresaleTO().setDtStartDayPresale( this.rulePresaleStartDate ); } if( this.rulePresaleFinalDate != null ) { specialEventTO.getPresaleTO().setDtFinalDayPresale( this.rulePresaleFinalDate ); } if( this.ru... | /**
* Method that sets the value of presale parameters to a
* {@link mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO} object.
*
* @param specialEventTO, a {@link mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO} object without presale
* configuration.
* @return specialEv... | Method that sets the value of presale parameters to a <code>mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO</code> object | setPresaleConfigurationToBooking | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-web/src/main/java/mx/com/cinepolis/digital/booking/web/beans/booking/SpecialEventBookingBean.java",
"license": "epl-1.0",
"size": 52069
} | [
"mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO"
] | import mx.com.cinepolis.digital.booking.commons.to.SpecialEventTO; | import mx.com.cinepolis.digital.booking.commons.to.*; | [
"mx.com.cinepolis"
] | mx.com.cinepolis; | 628,422 |
public static ImageIcon getInputIcon(ArgumentTreeNode.ArgumentNode argumentNode) {
Gem.PartInput inputPart = argumentNode.getArgument();
return ((ArgumentTreeNode.CollectorNode)argumentNode.getParent()).getCollectorGem().isReflected(inputPart) ?
... | static ImageIcon function(ArgumentTreeNode.ArgumentNode argumentNode) { Gem.PartInput inputPart = argumentNode.getArgument(); return ((ArgumentTreeNode.CollectorNode)argumentNode.getParent()).getCollectorGem().isReflected(inputPart) ? partInputIcon : unusedInputIcon; } /** * {@inheritDoc} | /**
* Get the appropriate small icon to use for the given argument node.
* @param argumentNode the node for the argument to be represented.
* @return the corresponding icon.
*/ | Get the appropriate small icon to use for the given argument node | getInputIcon | {
"repo_name": "levans/Open-Quark",
"path": "src/Quark_Gems/src/org/openquark/gems/client/ArgumentTree.java",
"license": "bsd-3-clause",
"size": 47118
} | [
"javax.swing.ImageIcon",
"org.openquark.gems.client.ArgumentTreeNode",
"org.openquark.gems.client.Gem"
] | import javax.swing.ImageIcon; import org.openquark.gems.client.ArgumentTreeNode; import org.openquark.gems.client.Gem; | import javax.swing.*; import org.openquark.gems.client.*; | [
"javax.swing",
"org.openquark.gems"
] | javax.swing; org.openquark.gems; | 2,264,764 |
public static int compileProgram(String[] vertexCode, String[] fragmentCode) {
return compileProgram(TextUtils.join("\n", vertexCode), TextUtils.join("\n", fragmentCode));
} | static int function(String[] vertexCode, String[] fragmentCode) { return compileProgram(TextUtils.join("\n", vertexCode), TextUtils.join("\n", fragmentCode)); } | /**
* Builds a GL shader program from vertex and fragment shader code.
*
* @param vertexCode GLES20 vertex shader program as arrays of strings. Strings are joined by
* adding a new line character in between each of them.
* @param fragmentCode GLES20 fragment shader program as arrays of strings. Strin... | Builds a GL shader program from vertex and fragment shader code | compileProgram | {
"repo_name": "amzn/exoplayer-amazon-port",
"path": "library/core/src/main/java/com/google/android/exoplayer2/util/GlUtil.java",
"license": "apache-2.0",
"size": 14290
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,847,869 |
IntentIntegrator.forSupportFragment(fragment)
.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES)
.setPrompt(prompt)
.setResultDisplayDuration(5)
.setCameraId(0)
.autoWide()
.initiateScan();
}
| IntentIntegrator.forSupportFragment(fragment) .setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES) .setPrompt(prompt) .setResultDisplayDuration(5) .setCameraId(0) .autoWide() .initiateScan(); } | /**
* Launches the ZXing QR code scanner.
*
* @param fragment The fragment that uses the scanner.
* @param prompt The prompt message.
*/ | Launches the ZXing QR code scanner | initiateScan | {
"repo_name": "timberdoodle/TimberdoodleApp",
"path": "project/app/src/main/java/de/tu_darmstadt/adtn/ui/groupmanager/QRReaderWriter.java",
"license": "gpl-2.0",
"size": 3431
} | [
"com.google.zxing.integration.android.IntentIntegrator"
] | import com.google.zxing.integration.android.IntentIntegrator; | import com.google.zxing.integration.android.*; | [
"com.google.zxing"
] | com.google.zxing; | 2,844,783 |
public void addAndRemoveEventListenerTypedNullType() throws Exception {
// Create a listener that just adds the events to a list
TestFlowableEventListener newListener = new TestFlowableEventListener();
// Add event-listener to dispatcher
dispatcher.addEventListener(newListener, (Fl... | void function() throws Exception { TestFlowableEventListener newListener = new TestFlowableEventListener(); dispatcher.addEventListener(newListener, (FlowableEngineEventType) null); ActivitiEntityEventImpl event1 = new ActivitiEntityEventImpl(new TaskEntity(), FlowableEngineEventType.ENTITY_CREATED); ActivitiEntityEven... | /**
* Test that adding a listener with a null-type is never called.
*/ | Test that adding a listener with a null-type is never called | addAndRemoveEventListenerTypedNullType | {
"repo_name": "sibok666/flowable-engine",
"path": "modules/flowable5-test/src/test/java/org/activiti/engine/test/api/event/FlowableEventDispatcherTest.java",
"license": "apache-2.0",
"size": 12219
} | [
"org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl",
"org.activiti.engine.impl.persistence.entity.TaskEntity",
"org.flowable.engine.delegate.event.FlowableEngineEventType"
] | import org.activiti.engine.delegate.event.impl.ActivitiEntityEventImpl; import org.activiti.engine.impl.persistence.entity.TaskEntity; import org.flowable.engine.delegate.event.FlowableEngineEventType; | import org.activiti.engine.delegate.event.impl.*; import org.activiti.engine.impl.persistence.entity.*; import org.flowable.engine.delegate.event.*; | [
"org.activiti.engine",
"org.flowable.engine"
] | org.activiti.engine; org.flowable.engine; | 2,078,621 |
@Test
public void testEditsLogOldRename() throws Exception {
DistributedFileSystem fs = (DistributedFileSystem) cluster.getFileSystem();
Path src1 = getTestRootPath(fc, "testEditsLogOldRename/srcdir/src1");
Path dst1 = getTestRootPath(fc, "testEditsLogOldRename/dstdir/dst1");
createFile(src1);
f... | void function() throws Exception { DistributedFileSystem fs = (DistributedFileSystem) cluster.getFileSystem(); Path src1 = getTestRootPath(fc, STR); Path dst1 = getTestRootPath(fc, STR); createFile(src1); fs.mkdirs(dst1.getParent()); createFile(dst1); fs.setQuota(dst1.getParent(), 2, HdfsConstants.QUOTA_DONT_SET); Syst... | /**
* Perform operations such as setting quota, deletion of files, rename and
* ensure system can apply edits log during startup.
*/ | Perform operations such as setting quota, deletion of files, rename and ensure system can apply edits log during startup | testEditsLogOldRename | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java",
"license": "apache-2.0",
"size": 12051
} | [
"org.apache.hadoop.fs.FileContextTestHelper",
"org.apache.hadoop.hdfs.DistributedFileSystem",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.junit.Assert"
] | import org.apache.hadoop.fs.FileContextTestHelper; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.junit.Assert; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,146,889 |
public Coverage subtract(final Coverage source, final double[] constants)
throws CoverageProcessingException {
return doOperation("SubtractConst", source, "constants", constants);
} | Coverage function(final Coverage source, final double[] constants) throws CoverageProcessingException { return doOperation(STR, source, STR, constants); } | /**
* Subtracts constants (one for each band) from every sample values of the source coverage.
*
* @param source The source coverage.
* @param constants The constants to subtract to each band.
* @throws CoverageProcessingException if the operation can't be applied.
* @see org.geotools.cove... | Subtracts constants (one for each band) from every sample values of the source coverage | subtract | {
"repo_name": "geotools/geotools",
"path": "modules/library/coverage/src/main/java/org/geotools/coverage/processing/Operations.java",
"license": "lgpl-2.1",
"size": 44693
} | [
"org.opengis.coverage.Coverage"
] | import org.opengis.coverage.Coverage; | import org.opengis.coverage.*; | [
"org.opengis.coverage"
] | org.opengis.coverage; | 1,668,500 |
Object readDatabaseObject(File file) throws PersistenceException; | Object readDatabaseObject(File file) throws PersistenceException; | /**
* Reads an object from an specified file.
*/ | Reads an object from an specified file | readDatabaseObject | {
"repo_name": "openengsb/openengsb",
"path": "components/persistence/src/main/java/org/openengsb/core/persistence/internal/ObjectPersistenceBackend.java",
"license": "apache-2.0",
"size": 1387
} | [
"java.io.File",
"org.openengsb.core.api.persistence.PersistenceException"
] | import java.io.File; import org.openengsb.core.api.persistence.PersistenceException; | import java.io.*; import org.openengsb.core.api.persistence.*; | [
"java.io",
"org.openengsb.core"
] | java.io; org.openengsb.core; | 2,560,001 |
protected void initLifecycleProcessor() {
ConfigurableListableBeanFactory beanFactory = getBeanFactory();
if (beanFactory.containsLocalBean(LIFECYCLE_PROCESSOR_BEAN_NAME)) {
this.lifecycleProcessor =
beanFactory.getBean(LIFECYCLE_PROCESSOR_BEAN_NAME, LifecycleProcessor.class);
if (logger.isDebugEnable... | void function() { ConfigurableListableBeanFactory beanFactory = getBeanFactory(); if (beanFactory.containsLocalBean(LIFECYCLE_PROCESSOR_BEAN_NAME)) { this.lifecycleProcessor = beanFactory.getBean(LIFECYCLE_PROCESSOR_BEAN_NAME, LifecycleProcessor.class); if (logger.isDebugEnabled()) { logger.debug(STR + this.lifecyclePr... | /**
* Initialize the LifecycleProcessor.
* Uses DefaultLifecycleProcessor if none defined in the context.
* @see org.springframework.context.support.DefaultLifecycleProcessor
*/ | Initialize the LifecycleProcessor. Uses DefaultLifecycleProcessor if none defined in the context | initLifecycleProcessor | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java",
"license": "apache-2.0",
"size": 47683
} | [
"org.springframework.beans.factory.config.ConfigurableListableBeanFactory",
"org.springframework.context.LifecycleProcessor"
] | import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.context.LifecycleProcessor; | import org.springframework.beans.factory.config.*; import org.springframework.context.*; | [
"org.springframework.beans",
"org.springframework.context"
] | org.springframework.beans; org.springframework.context; | 2,564,310 |
@Override
public void encodeBegin(FacesContext context, UIComponent component)
throws IOException {
if ((context == null) || (component == null)) {
throw new NullPointerException();
}
} | void function(FacesContext context, UIComponent component) throws IOException { if ((context == null) (component == null)) { throw new NullPointerException(); } } | /**
* <p>No begin encoding is required.</p>
*
* @param context <code>FacesContext</code>for the current request
* @param component <code>UIComponent</code> to be decoded
*/ | No begin encoding is required | encodeBegin | {
"repo_name": "osmanpub/oracle-samples",
"path": "case-studies/dukes-bookstore/src/main/java/javaeetutorial/dukesbookstore/renderers/AreaRenderer.java",
"license": "apache-2.0",
"size": 5364
} | [
"java.io.IOException",
"javax.faces.component.UIComponent",
"javax.faces.context.FacesContext"
] | import java.io.IOException; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; | import java.io.*; import javax.faces.component.*; import javax.faces.context.*; | [
"java.io",
"javax.faces"
] | java.io; javax.faces; | 424,008 |
@Deprecated
public void display(Location center, double range) {
display(0, 0, 0, 0, 1, center, range);
} | void function(Location center, double range) { display(0, 0, 0, 0, 1, center, range); } | /**
* Helper method to migrate pre-3.0 Effects.
*
* @param center
* @param range
*/ | Helper method to migrate pre-3.0 Effects | display | {
"repo_name": "axelrindle/ParticleEffectLib",
"path": "src/main/java/de/lalo5/particleeffectlib/util/ParticleEffect.java",
"license": "mit",
"size": 60607
} | [
"org.bukkit.Location"
] | import org.bukkit.Location; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 1,750,551 |
public static ControlDecorationSupport create(ValidationStatusProvider validationStatusProvider, int position,
Composite composite) {
return create(validationStatusProvider, position, composite, new ControlDecorationUpdater());
}
| static ControlDecorationSupport function(ValidationStatusProvider validationStatusProvider, int position, Composite composite) { return create(validationStatusProvider, position, composite, new ControlDecorationUpdater()); } | /**
* Creates a ControlDecorationSupport which observes the validation status of the specified
* {@link ValidationStatusProvider}, and displays a {@link ControlDecoration} over the underlying SWT control of all
* target observables that implement {@link ISWTObservable} or {@link IViewerObservable}.
*
* ... | Creates a ControlDecorationSupport which observes the validation status of the specified <code>ValidationStatusProvider</code>, and displays a <code>ControlDecoration</code> over the underlying SWT control of all target observables that implement <code>ISWTObservable</code> or <code>IViewerObservable</code> | create | {
"repo_name": "gulliverrr/hestia-engine-dev",
"path": "src/opt/boilercontrol/libs/org.eclipse.paho.ui/org.eclipse.paho.ui.core/src/org/eclipse/paho/mqtt/ui/support/fieldassist/ControlDecorationSupport.java",
"license": "gpl-3.0",
"size": 11798
} | [
"org.eclipse.core.databinding.ValidationStatusProvider",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.core.databinding.ValidationStatusProvider; import org.eclipse.swt.widgets.Composite; | import org.eclipse.core.databinding.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.core",
"org.eclipse.swt"
] | org.eclipse.core; org.eclipse.swt; | 207,455 |
private void writePrimitiveArrayFallback(Object array) {
writeAMF3();
buf.put(AMF3.TYPE_ARRAY);
if (hasReference(array)) {
putInteger(getReferenceId(array) << 1);
return;
}
storeReference(array);
amf3_mode += 1;
int count = Array.getLen... | void function(Object array) { writeAMF3(); buf.put(AMF3.TYPE_ARRAY); if (hasReference(array)) { putInteger(getReferenceId(array) << 1); return; } storeReference(array); amf3_mode += 1; int count = Array.getLength(array); putInteger(count << 1 1); putString(""); for (int i = 0; i < count; i++) { Serializer.serialize(thi... | /**
* Use the general ARRAY type, writing the primitive array as an array of objects (the boxed primitives) instead.
*/ | Use the general ARRAY type, writing the primitive array as an array of objects (the boxed primitives) instead | writePrimitiveArrayFallback | {
"repo_name": "Red5/red5-io",
"path": "src/main/java/org/red5/io/amf3/Output.java",
"license": "apache-2.0",
"size": 21199
} | [
"java.lang.reflect.Array",
"org.red5.io.object.Serializer"
] | import java.lang.reflect.Array; import org.red5.io.object.Serializer; | import java.lang.reflect.*; import org.red5.io.object.*; | [
"java.lang",
"org.red5.io"
] | java.lang; org.red5.io; | 641,226 |
public SearchSourceBuilder query(QueryBuilder<?> query) {
this.queryBuilder = query;
return this;
} | SearchSourceBuilder function(QueryBuilder<?> query) { this.queryBuilder = query; return this; } | /**
* Sets the search query for this request.
*
* @see org.elasticsearch.index.query.QueryBuilders
*/ | Sets the search query for this request | query | {
"repo_name": "clintongormley/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 56204
} | [
"org.elasticsearch.index.query.QueryBuilder"
] | import org.elasticsearch.index.query.QueryBuilder; | import org.elasticsearch.index.query.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 401,131 |
@ApiModelProperty(value = "The list of items.")
public List<RecycleBinItem> getRecycleBinItems() {
return recycleBinItems;
} | @ApiModelProperty(value = STR) List<RecycleBinItem> function() { return recycleBinItems; } | /**
* The list of items.
* @return recycleBinItems
**/ | The list of items | getRecycleBinItems | {
"repo_name": "iterate-ch/cyberduck",
"path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/RecycleBinContents.java",
"license": "gpl-3.0",
"size": 3584
} | [
"ch.cyberduck.core.storegate.io.swagger.client.model.RecycleBinItem",
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import ch.cyberduck.core.storegate.io.swagger.client.model.RecycleBinItem; import io.swagger.annotations.ApiModelProperty; import java.util.List; | import ch.cyberduck.core.storegate.io.swagger.client.model.*; import io.swagger.annotations.*; import java.util.*; | [
"ch.cyberduck.core",
"io.swagger.annotations",
"java.util"
] | ch.cyberduck.core; io.swagger.annotations; java.util; | 726,990 |
default void sendMessage(CommandSender sender, String message) {
sender.sendMessage(format(message));
} | default void sendMessage(CommandSender sender, String message) { sender.sendMessage(format(message)); } | /**
* Send command message.
*
* @param sender the @{@link org.bukkit.command.CommandSender} sender
* @param message the {@link java.lang.String} message
*/ | Send command message | sendMessage | {
"repo_name": "Relicum/Ipsum",
"path": "src/main/java/com/relicum/ipsum/Locale/IMessage.java",
"license": "gpl-3.0",
"size": 6841
} | [
"org.bukkit.command.CommandSender"
] | import org.bukkit.command.CommandSender; | import org.bukkit.command.*; | [
"org.bukkit.command"
] | org.bukkit.command; | 87,780 |
protected void addTlv(ByteBuffer buf, byte type, List<InetAddress> addrs) {
if (addrs != null && addrs.size() > 0) {
buf.put(type);
buf.put((byte)(4 * addrs.size()));
for (InetAddress addr : addrs) {
buf.put(addr.getAddress());
}
}
... | void function(ByteBuffer buf, byte type, List<InetAddress> addrs) { if (addrs != null && addrs.size() > 0) { buf.put(type); buf.put((byte)(4 * addrs.size())); for (InetAddress addr : addrs) { buf.put(addr.getAddress()); } } } | /**
* Adds an optional parameter containing a list of IP addresses.
*/ | Adds an optional parameter containing a list of IP addresses | addTlv | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/net/dhcp/DhcpPacket.java",
"license": "gpl-3.0",
"size": 30293
} | [
"java.net.InetAddress",
"java.nio.ByteBuffer",
"java.util.List"
] | import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.List; | import java.net.*; import java.nio.*; import java.util.*; | [
"java.net",
"java.nio",
"java.util"
] | java.net; java.nio; java.util; | 1,834,596 |
public boolean deleteDirectory () {
if (type == FileType.Classpath) throw new GdxRuntimeException("Cannot delete a classpath file: " + file);
if (type == FileType.Internal) throw new GdxRuntimeException("Cannot delete an internal file: " + file);
return deleteDirectory(file());
}
| boolean function () { if (type == FileType.Classpath) throw new GdxRuntimeException(STR + file); if (type == FileType.Internal) throw new GdxRuntimeException(STR + file); return deleteDirectory(file()); } | /** Deletes this file or directory and all children, recursively.
* @throw GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} file. */ | Deletes this file or directory and all children, recursively | deleteDirectory | {
"repo_name": "GreenLightning/libgdx",
"path": "backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/FileWrapper.java",
"license": "apache-2.0",
"size": 25372
} | [
"com.badlogic.gdx.Files",
"com.badlogic.gdx.utils.GdxRuntimeException"
] | import com.badlogic.gdx.Files; import com.badlogic.gdx.utils.GdxRuntimeException; | import com.badlogic.gdx.*; import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,611,970 |
private static int computeEncodedDate(java.util.Date value) throws StandardException
{
return computeEncodedDate( value, null);
} | static int function(java.util.Date value) throws StandardException { return computeEncodedDate( value, null); } | /**
* Compute the encoded date given a date
*
*/ | Compute the encoded date given a date | computeEncodedDate | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLDate.java",
"license": "apache-2.0",
"size": 37644
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"java.sql.Date"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import java.sql.Date; | import com.pivotal.gemfirexd.internal.iapi.error.*; import java.sql.*; | [
"com.pivotal.gemfirexd",
"java.sql"
] | com.pivotal.gemfirexd; java.sql; | 1,049,345 |
@NonNull
Loader<SortedList<T>> getLoader(); | Loader<SortedList<T>> getLoader(); | /**
* Get a loader that lists the files in the current path,
* and monitors changes.
*/ | Get a loader that lists the files in the current path, and monitors changes | getLoader | {
"repo_name": "stari4ek/NoNonsense-FilePicker",
"path": "library/src/main/java/com/nononsenseapps/filepicker/LogicHandler.java",
"license": "mpl-2.0",
"size": 2849
} | [
"android.support.v4.content.Loader",
"android.support.v7.util.SortedList"
] | import android.support.v4.content.Loader; import android.support.v7.util.SortedList; | import android.support.v4.content.*; import android.support.v7.util.*; | [
"android.support"
] | android.support; | 1,920,766 |
public void setTeNodeKeys(List<TeNodeKey> teNodeKeys) {
this.teNodeKeys = teNodeKeys;
} | void function(List<TeNodeKey> teNodeKeys) { this.teNodeKeys = teNodeKeys; } | /**
* Sets the list of TE node keys.
*
* @param teNodeKeys the teNodeKeys to set
*/ | Sets the list of TE node keys | setTeNodeKeys | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/InternalTeTopology.java",
"license": "apache-2.0",
"size": 6338
} | [
"java.util.List",
"org.onosproject.tetopology.management.api.node.TeNodeKey"
] | import java.util.List; import org.onosproject.tetopology.management.api.node.TeNodeKey; | import java.util.*; import org.onosproject.tetopology.management.api.node.*; | [
"java.util",
"org.onosproject.tetopology"
] | java.util; org.onosproject.tetopology; | 1,639,541 |
public IEntityGroupStore newGroupStore(ComponentGroupServiceDescriptor svcDescriptor)
throws GroupsException {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Creating New Grouper IEntityGroupStore");
}
return getGroupStore();
} | IEntityGroupStore function(ComponentGroupServiceDescriptor svcDescriptor) throws GroupsException { if (LOGGER.isDebugEnabled()) { LOGGER.debug(STR); } return getGroupStore(); } | /**
* Construction with parameters.
*
* @param svcDescriptor The parameters.
* @return The instance.
* @throws GroupsException if there is an error
* @see IEntityGroupStoreFactory
* #newGroupStore(org.apereo.portal.groups.ComponentGroupServiceDescriptor)
*/ | Construction with parameters | newGroupStore | {
"repo_name": "stalele/uPortal",
"path": "uPortal-groups/uPortal-groups-grouper/src/main/java/org/apereo/portal/groups/grouper/GrouperEntityGroupStoreFactory.java",
"license": "apache-2.0",
"size": 3018
} | [
"org.apereo.portal.groups.ComponentGroupServiceDescriptor",
"org.apereo.portal.groups.GroupsException",
"org.apereo.portal.groups.IEntityGroupStore"
] | import org.apereo.portal.groups.ComponentGroupServiceDescriptor; import org.apereo.portal.groups.GroupsException; import org.apereo.portal.groups.IEntityGroupStore; | import org.apereo.portal.groups.*; | [
"org.apereo.portal"
] | org.apereo.portal; | 1,023,837 |
public static SqlValidatorWithHints newValidator(
SqlOperatorTable opTab,
SqlValidatorCatalogReader catalogReader,
RelDataTypeFactory typeFactory,
SqlConformance conformance) {
return new SqlValidatorImpl(opTab, catalogReader, typeFactory,
conformance);
} | static SqlValidatorWithHints function( SqlOperatorTable opTab, SqlValidatorCatalogReader catalogReader, RelDataTypeFactory typeFactory, SqlConformance conformance) { return new SqlValidatorImpl(opTab, catalogReader, typeFactory, conformance); } | /**
* Factory method for {@link SqlValidator}.
*/ | Factory method for <code>SqlValidator</code> | newValidator | {
"repo_name": "b-slim/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java",
"license": "apache-2.0",
"size": 42728
} | [
"org.apache.calcite.rel.type.RelDataTypeFactory",
"org.apache.calcite.sql.SqlOperatorTable"
] | import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.sql.SqlOperatorTable; | import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 228,400 |
ByteBuffer buffer = BufferUtils.readFixedData(getChannel(), (int) (getHeader().getEventLength() - Constants.MYSQL.FIXED_EVENT_LENGTH));
this.binlogVersion = buffer.getShort();
byte[] serverVersion = new byte[50];
buffer.get(serverVersion);
this.serverVersion = new String(serverVersion, ... | ByteBuffer buffer = BufferUtils.readFixedData(getChannel(), (int) (getHeader().getEventLength() - Constants.MYSQL.FIXED_EVENT_LENGTH)); this.binlogVersion = buffer.getShort(); byte[] serverVersion = new byte[50]; buffer.get(serverVersion); this.serverVersion = new String(serverVersion, 0, 50); this.createTimestamp = bu... | /**
* header (19 bytes)
* binlog version (2 bytes)
* server version (ST_SERVER_VER_LEN = 50 bytes)
* timestamp (4 bytes)
* Summing those lengths yields 19 + 2 + 50 + 4 = 75
*/ | header (19 bytes) binlog version (2 bytes) server version (ST_SERVER_VER_LEN = 50 bytes) timestamp (4 bytes) Summing those lengths yields 19 + 2 + 50 + 4 = 75 | doing | {
"repo_name": "tctxl/gulosity",
"path": "parse/src/main/java/com/opdar/gulosity/event/binlog/FormatDescriptionEvent.java",
"license": "apache-2.0",
"size": 1816
} | [
"com.opdar.gulosity.base.Constants",
"com.opdar.gulosity.utils.BufferUtils",
"java.nio.ByteBuffer"
] | import com.opdar.gulosity.base.Constants; import com.opdar.gulosity.utils.BufferUtils; import java.nio.ByteBuffer; | import com.opdar.gulosity.base.*; import com.opdar.gulosity.utils.*; import java.nio.*; | [
"com.opdar.gulosity",
"java.nio"
] | com.opdar.gulosity; java.nio; | 2,894,405 |
@ApiModelProperty(example = "null", required = true, value = "planet_id integer")
public Integer getPlanetId() {
return planetId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return planetId; } | /**
* planet_id integer
*
* @return planetId
**/ | planet_id integer | getPlanetId | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/PlanetResponse.java",
"license": "apache-2.0",
"size": 4828
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 691,785 |
public BitSet reachpositive(STPG stpg, BitSet remain, BitSet origin, boolean min1, boolean min2)
{
int n, iters;
BitSet u, soln;
boolean u_done;
long timer;
// Start precomputation
timer = System.currentTimeMillis();
if (verbosity >= 1)
mainLog.println("Starting ReachPositive (" + (min1 ? "min" : ... | BitSet function(STPG stpg, BitSet remain, BitSet origin, boolean min1, boolean min2) { int n, iters; BitSet u, soln; boolean u_done; long timer; timer = System.currentTimeMillis(); if (verbosity >= 1) mainLog.println(STR + (min1 ? "min" : "max") + (min2 ? "min" : "max") + ")..."); if (origin.cardinality() == 0) { soln ... | /**
* Determine the states of an STPG which, with min/max probability strictly greater than 0,
* are reached from a state in {@code origin}, while remaining in sates of {@code remain}.
* @param stpg The STPG
* @param remain The states to remain in
* @param origin Origin states
* @param min1 Min or max proba... | Determine the states of an STPG which, with min/max probability strictly greater than 0, are reached from a state in origin, while remaining in sates of remain | reachpositive | {
"repo_name": "azlanismail/prismgames",
"path": "src/explicit/SMGModelChecker.java",
"license": "gpl-2.0",
"size": 111183
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,924,171 |
void handleEnter(MouseEvent e); | void handleEnter(MouseEvent e); | /** handles the enter event of the mouse
*
* @param e
*/ | handles the enter event of the mouse | handleEnter | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/gui/jmodel/controller/UIState.java",
"license": "lgpl-3.0",
"size": 2048
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 299,919 |
void onShortcutIntentCreated(Uri uri, Intent shortcutIntent);
}
public ShortcutIntentBuilder(Context context, OnShortcutIntentCreatedListener listener) {
mContext = context;
mListener = listener;
mResources = context.getResources();
final ActivityManager am = (ActivityM... | void onShortcutIntentCreated(Uri uri, Intent shortcutIntent); } public ShortcutIntentBuilder(Context context, OnShortcutIntentCreatedListener listener) { mContext = context; mListener = listener; mResources = context.getResources(); final ActivityManager am = (ActivityManager) context .getSystemService(Context.ACTIVITY... | /**
* Callback for shortcut intent creation.
*
* @param uri the original URI for which the shortcut intent has been
* created.
* @param shortcutIntent resulting shortcut intent.
*/ | Callback for shortcut intent creation | onShortcutIntentCreated | {
"repo_name": "GuillaumeDelente/contact-picker",
"path": "library/src/main/java/com/guillaumedelente/android/contacts/common/list/ShortcutIntentBuilder.java",
"license": "apache-2.0",
"size": 16906
} | [
"android.app.ActivityManager",
"android.content.Context",
"android.content.Intent",
"android.net.Uri"
] | import android.app.ActivityManager; import android.content.Context; import android.content.Intent; import android.net.Uri; | import android.app.*; import android.content.*; import android.net.*; | [
"android.app",
"android.content",
"android.net"
] | android.app; android.content; android.net; | 736,557 |
private static void proxyLink(HttpServletRequest req,
HttpServletResponse resp, URI link, Cookie c, String proxyHost)
throws IOException {
org.apache.commons.httpclient.URI uri =
new org.apache.commons.httpclient.URI(link.toString(), false);
HttpClientParams params = new HttpClientParams()... | static void function(HttpServletRequest req, HttpServletResponse resp, URI link, Cookie c, String proxyHost) throws IOException { org.apache.commons.httpclient.URI uri = new org.apache.commons.httpclient.URI(link.toString(), false); HttpClientParams params = new HttpClientParams(); params.setCookiePolicy(CookiePolicy.B... | /**
* Download link and have it be the response.
* @param req the http request
* @param resp the http response
* @param link the link to download
* @param c the cookie to set if any
* @throws IOException on any error.
*/ | Download link and have it be the response | proxyLink | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java",
"license": "apache-2.0",
"size": 12848
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"java.net.InetAddress",
"java.net.URI",
"java.net.URLEncoder",
"java.util.Enumeration",
"javax.servlet.http.Cookie",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.commons.httpcl... | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.InetAddress; import java.net.URI; import java.net.URLEncoder; import java.util.Enumeration; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; ... | import java.io.*; import java.net.*; import java.util.*; import javax.servlet.http.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.cookie.*; import org.apache.commons.httpclient.methods.*; import org.apache.commons.httpclient.params.*; import org.apache.hadoop.io.*; | [
"java.io",
"java.net",
"java.util",
"javax.servlet",
"org.apache.commons",
"org.apache.hadoop"
] | java.io; java.net; java.util; javax.servlet; org.apache.commons; org.apache.hadoop; | 1,524,334 |
public List<RelationArgument> getArguments() {
return arguments;
} | List<RelationArgument> function() { return arguments; } | /**
* Gets the arguments.
*
* @return the arguments
*/ | Gets the arguments | getArguments | {
"repo_name": "JoshSharpe/java-sdk",
"path": "natural-language-understanding/src/main/java/com/ibm/watson/developer_cloud/natural_language_understanding/v1/model/RelationsResult.java",
"license": "apache-2.0",
"size": 2543
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,765,275 |
public IProblem getSolvableProblem() throws ContradictionException {
return this.getSolvableProblem(true);
} | IProblem function() throws ContradictionException { return this.getSolvableProblem(true); } | /**
* If called before, this will return the previous solver!
*
* @return the problem with tunings
* @throws ContradictionException
*/ | If called before, this will return the previous solver | getSolvableProblem | {
"repo_name": "thomwiggers/find-shortest-slp",
"path": "src/main/java/nl/thomwiggers/slpsat/SlpProblem.java",
"license": "gpl-3.0",
"size": 18471
} | [
"org.sat4j.specs.ContradictionException",
"org.sat4j.specs.IProblem"
] | import org.sat4j.specs.ContradictionException; import org.sat4j.specs.IProblem; | import org.sat4j.specs.*; | [
"org.sat4j.specs"
] | org.sat4j.specs; | 944,558 |
public BDD domain() {
BDDFactory factory = getFactory();
BigInteger val = size().subtract(BigInteger.ONE);
BDD d = factory.one();
int[] ivar = vars();
for (int n = 0; n < this.varNum(); n++) {
if (val.testBit(0))
d.orWit... | BDD function() { BDDFactory factory = getFactory(); BigInteger val = size().subtract(BigInteger.ONE); BDD d = factory.one(); int[] ivar = vars(); for (int n = 0; n < this.varNum(); n++) { if (val.testBit(0)) d.orWith(factory.nithVar(ivar[n])); else d.andWith(factory.nithVar(ivar[n])); val = val.shiftRight(1); } return ... | /**
* <p>Returns what corresponds to a disjunction of all possible values of this
* domain. This is more efficient than doing ithVar(0) OR ithVar(1) ...
* explicitly for all values in the domain.</p>
*
* <p>Compare to fdd_domain.</p>
*/ | Returns what corresponds to a disjunction of all possible values of this domain. This is more efficient than doing ithVar(0) OR ithVar(1) ... explicitly for all values in the domain. Compare to fdd_domain | domain | {
"repo_name": "sfrancis1970/EpochX",
"path": "version1/semantics-src/net/sf/javabdd/BDDDomain.java",
"license": "gpl-3.0",
"size": 12668
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 978,734 |
private void extractFiles(File archive, File destination, Engine engine) throws AnalysisException {
if (archive != null && destination != null) {
String archiveExt = FileUtils.getFileExtension(archive.getName());
if (archiveExt == null) {
return;
}
... | void function(File archive, File destination, Engine engine) throws AnalysisException { if (archive != null && destination != null) { String archiveExt = FileUtils.getFileExtension(archive.getName()); if (archiveExt == null) { return; } archiveExt = archiveExt.toLowerCase(); final FileInputStream fis; try { fis = new F... | /**
* Extracts the contents of an archive into the specified directory.
*
* @param archive an archive file such as a WAR or EAR
* @param destination a directory to extract the contents to
* @param engine the scanning engine
* @throws AnalysisException thrown if the archive is not found
... | Extracts the contents of an archive into the specified directory | extractFiles | {
"repo_name": "Prakhash/security-tools",
"path": "external/dependency-check-core-3.0.2/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java",
"license": "apache-2.0",
"size": 26188
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"org.owasp.dependencycheck.Engine",
"org.owasp.dependencycheck.analyzer.exception.AnalysisException",
"org.owasp.dependencycheck.utils.FileUtils"
] | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import org.owasp.dependencycheck.Engine; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.utils.FileUtils; | import java.io.*; import org.owasp.dependencycheck.*; import org.owasp.dependencycheck.analyzer.exception.*; import org.owasp.dependencycheck.utils.*; | [
"java.io",
"org.owasp.dependencycheck"
] | java.io; org.owasp.dependencycheck; | 472,411 |
private void backwardSingleChain(ArrayList<DNCRPNode> nodes) {
if (debug) {
logln("--- backward smoothing chain: " + nodes.toString());
}
int tau = nodes.size() - 1;
double[] posMean = nodes.get(tau).getContent().getMean();
double[] posVar = nodes.get(tau).getCont... | void function(ArrayList<DNCRPNode> nodes) { if (debug) { logln(STR + nodes.toString()); } int tau = nodes.size() - 1; double[] posMean = nodes.get(tau).getContent().getMean(); double[] posVar = nodes.get(tau).getContent().getVariance(); for (int t = tau - 1; t >= 0; t--) { double[] curMean = nodes.get(t).getContent().g... | /**
* Perform backward smoothing for a single chain
*
* @param node The chain
*/ | Perform backward smoothing for a single chain | backwardSingleChain | {
"repo_name": "vietansegan/segan",
"path": "src/sampler/dynamic/DHLDASampler.java",
"license": "apache-2.0",
"size": 82530
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 775,329 |
@Override
public Object clone() {
Vector<String> compClone = new Vector<String>();
Enumeration<String> compEnum = this.components.elements();
while (compEnum.hasMoreElements()) {
compClone.addElement(compEnum.nextElement());
}
return new DNSName(compClone);
... | Object function() { Vector<String> compClone = new Vector<String>(); Enumeration<String> compEnum = this.components.elements(); while (compEnum.hasMoreElements()) { compClone.addElement(compEnum.nextElement()); } return new DNSName(compClone); } | /**
* Returns clone of the current name.
* @see java.lang.Object#clone()
*/ | Returns clone of the current name | clone | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/jndi/src/main/java/org/apache/harmony/jndi/provider/dns/DNSName.java",
"license": "apache-2.0",
"size": 13693
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,152,522 |
public VirtualMachineScaleSetInner withSku(Sku sku) {
this.sku = sku;
return this;
} | VirtualMachineScaleSetInner function(Sku sku) { this.sku = sku; return this; } | /**
* Set the virtual machine scale set sku.
*
* @param sku the sku value to set
* @return the VirtualMachineScaleSetInner object itself.
*/ | Set the virtual machine scale set sku | withSku | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/implementation/VirtualMachineScaleSetInner.java",
"license": "mit",
"size": 16799
} | [
"com.microsoft.azure.management.compute.v2019_03_01.Sku"
] | import com.microsoft.azure.management.compute.v2019_03_01.Sku; | import com.microsoft.azure.management.compute.v2019_03_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,890,227 |
public static AbstractAction getImportAction(JabRefFrame frame, boolean openInNew) {
class ImportAction extends MnemonicAwareAction {
private final JabRefFrame frame;
private final boolean openInNew;
public ImportAction(JabRefFrame frame, boolean openInNew) {
... | static AbstractAction function(JabRefFrame frame, boolean openInNew) { class ImportAction extends MnemonicAwareAction { private final JabRefFrame frame; private final boolean openInNew; public ImportAction(JabRefFrame frame, boolean openInNew) { this.frame = frame; this.openInNew = openInNew; putValue(Action.NAME, open... | /**
* Create an AbstractAction for performing an Import operation.
* @param frame The JabRefFrame of this JabRef instance.
* @param openInNew Indicate whether the action should open into a new database or
* into the currently open one.
* @return The action.
*/ | Create an AbstractAction for performing an Import operation | getImportAction | {
"repo_name": "RodrigoRubino/DC-UFSCar-ES2-201601-Grupo-Brainstorm",
"path": "src/main/java/net/sf/jabref/importer/ImportFormats.java",
"license": "gpl-2.0",
"size": 7983
} | [
"javax.swing.AbstractAction",
"javax.swing.Action",
"net.sf.jabref.Globals",
"net.sf.jabref.gui.JabRefFrame",
"net.sf.jabref.gui.actions.MnemonicAwareAction",
"net.sf.jabref.gui.keyboard.KeyBinding",
"net.sf.jabref.logic.l10n.Localization"
] | import javax.swing.AbstractAction; import javax.swing.Action; import net.sf.jabref.Globals; import net.sf.jabref.gui.JabRefFrame; import net.sf.jabref.gui.actions.MnemonicAwareAction; import net.sf.jabref.gui.keyboard.KeyBinding; import net.sf.jabref.logic.l10n.Localization; | import javax.swing.*; import net.sf.jabref.*; import net.sf.jabref.gui.*; import net.sf.jabref.gui.actions.*; import net.sf.jabref.gui.keyboard.*; import net.sf.jabref.logic.l10n.*; | [
"javax.swing",
"net.sf.jabref"
] | javax.swing; net.sf.jabref; | 2,085,856 |
@Override
public void chartChanged(ChartChangeEvent event) {
draw();
} | void function(ChartChangeEvent event) { draw(); } | /**
* Receives a notification from the chart that it has been changed and
* responds by redrawing the chart entirely.
*
* @param event event information.
*/ | Receives a notification from the chart that it has been changed and responds by redrawing the chart entirely | chartChanged | {
"repo_name": "informatik-mannheim/Moduro-Toolbox",
"path": "src/main/java/de/hs/mannheim/modUro/controller/diagram/fx/ChartCanvas.java",
"license": "apache-2.0",
"size": 19514
} | [
"org.jfree.chart.event.ChartChangeEvent"
] | import org.jfree.chart.event.ChartChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,108,588 |
@Override
public int quantityDropped(Random par1Random){
return 1;
} | int function(Random par1Random){ return 1; } | /**
* Returns the quantity of items to drop on block destruction.
*/ | Returns the quantity of items to drop on block destruction | quantityDropped | {
"repo_name": "wormzjl/PneumaticCraft",
"path": "src/pneumaticCraft/common/block/pneumaticPlants/BlockLightningPlant.java",
"license": "gpl-3.0",
"size": 1535
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 397,320 |
public BufferedImage readImage(InputStream in)
throws IOException, ServiceException; | BufferedImage function(InputStream in) throws IOException, ServiceException; | /**
* Reads an image using JAI Image I/O using the JPEG 2000 codec.
* @param in Target input stream.
* @returns An AWT buffered image.
* @throws IOException Thrown if there is an error reading from or writing
* to one of the target streams / buffers.
* @throws ServiceException Thrown if there is an er... | Reads an image using JAI Image I/O using the JPEG 2000 codec | readImage | {
"repo_name": "ximenesuk/bioformats",
"path": "components/scifio/src/loci/formats/services/JAIIIOService.java",
"license": "gpl-2.0",
"size": 6392
} | [
"java.awt.image.BufferedImage",
"java.io.IOException",
"java.io.InputStream"
] | import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; | import java.awt.image.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 2,861,467 |
public void setBegdat(Date begdat) {
this.begdat = begdat;
} | void function(Date begdat) { this.begdat = begdat; } | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ACTCIT.BEGDAT
*
* @param begdat the value for ACTCIT.BEGDAT
*
* @mbggenerated Sun Nov 21 21:36:06 CST 2010
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column ACTCIT.BEGDAT | setBegdat | {
"repo_name": "rongshang/fbi-cbs2",
"path": "common/main/java/cbs/repository/account/other/model/Actcit.java",
"license": "unlicense",
"size": 14022
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 193,123 |
public XmlKeyInfoKeyNameTransformer getXmlSigKeyInfoKeyNameTransformer() {
return XmlKeyInfoKeyNameTransformer.from(getConfig().get(XML_SIG_KEY_INFO_KEY_NAME_TRANSFORMER), DEFAULT_XML_KEY_INFO_KEY_NAME_TRANSFORMER);
} | XmlKeyInfoKeyNameTransformer function() { return XmlKeyInfoKeyNameTransformer.from(getConfig().get(XML_SIG_KEY_INFO_KEY_NAME_TRANSFORMER), DEFAULT_XML_KEY_INFO_KEY_NAME_TRANSFORMER); } | /**
* Always returns non-{@code null} result.
* @return Configured ransformer of {@link #DEFAULT_XML_KEY_INFO_KEY_NAME_TRANSFORMER} if not set.
*/ | Always returns non-null result | getXmlSigKeyInfoKeyNameTransformer | {
"repo_name": "abstractj/keycloak",
"path": "services/src/main/java/org/keycloak/broker/saml/SAMLIdentityProviderConfig.java",
"license": "apache-2.0",
"size": 15850
} | [
"org.keycloak.saml.common.util.XmlKeyInfoKeyNameTransformer"
] | import org.keycloak.saml.common.util.XmlKeyInfoKeyNameTransformer; | import org.keycloak.saml.common.util.*; | [
"org.keycloak.saml"
] | org.keycloak.saml; | 2,258,441 |
public PublicKey getPublicKey() {
PublicKey publicKey = null;
try {
publicKey = new JcaPEMKeyConverter().setProvider(SECURITY_PROVIDER).
getPublicKey(mCsr.getSubjectPublicKeyInfo());
} catch (PEMException e) {
Log.error(e.getMessage());
}
... | PublicKey function() { PublicKey publicKey = null; try { publicKey = new JcaPEMKeyConverter().setProvider(SECURITY_PROVIDER). getPublicKey(mCsr.getSubjectPublicKeyInfo()); } catch (PEMException e) { Log.error(e.getMessage()); } return publicKey; } | /**
* Returns public key
*/ | Returns public key | getPublicKey | {
"repo_name": "iotivity/iotivity",
"path": "cloud/account/src/main/java/org/iotivity/cloud/accountserver/x509/cert/CSRParser.java",
"license": "apache-2.0",
"size": 3674
} | [
"java.security.PublicKey",
"org.bouncycastle.openssl.PEMException",
"org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter"
] | import java.security.PublicKey; import org.bouncycastle.openssl.PEMException; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; | import java.security.*; import org.bouncycastle.openssl.*; import org.bouncycastle.openssl.jcajce.*; | [
"java.security",
"org.bouncycastle.openssl"
] | java.security; org.bouncycastle.openssl; | 1,478,170 |
private void writeObject(final ObjectOutputStream out) throws IOException {
out.writeObject(mapper.getClass());
jobConf.write(out);
} | void function(final ObjectOutputStream out) throws IOException { out.writeObject(mapper.getClass()); jobConf.write(out); } | /**
* Custom serialization methods.
* @see <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html">http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html</a>
*/ | Custom serialization methods | writeObject | {
"repo_name": "oscarceballos/flink-1.3.2",
"path": "flink-connectors/flink-hadoop-compatibility/src/main/java/org/apache/flink/hadoopcompatibility/mapred/HadoopMapFunction.java",
"license": "apache-2.0",
"size": 5162
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,768,350 |
private JPanel createStringPanel() {
tableModel = new PowerTableModel(new String[] { COL_RESOURCE_NAME }, new Class[] { String.class });
stringTable = new JTable(tableModel);
stringTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
TextAreaCellRenderer render... | JPanel function() { tableModel = new PowerTableModel(new String[] { COL_RESOURCE_NAME }, new Class[] { String.class }); stringTable = new JTable(tableModel); stringTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer()); TextAreaCellRenderer renderer = new TextAreaCellRenderer(); stringTable.setRowHei... | /**
* Create a panel allowing the user to supply a list of string patterns to
* test against.
*
* @return a new panel for adding string patterns
*/ | Create a panel allowing the user to supply a list of string patterns to test against | createStringPanel | {
"repo_name": "tuanhq/jmeter",
"path": "src/components/org/apache/jmeter/assertions/gui/AssertionGui.java",
"license": "apache-2.0",
"size": 15221
} | [
"java.awt.BorderLayout",
"java.awt.Dimension",
"javax.swing.BorderFactory",
"javax.swing.JPanel",
"javax.swing.JScrollPane",
"javax.swing.JTable",
"org.apache.jmeter.gui.util.HeaderAsPropertyRenderer",
"org.apache.jmeter.gui.util.PowerTableModel",
"org.apache.jmeter.gui.util.TextAreaCellRenderer",
... | import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer; import org.apache.jmeter.gui.util.PowerTableModel; import org.apache.jmeter.gui.uti... | import java.awt.*; import javax.swing.*; import org.apache.jmeter.gui.util.*; import org.apache.jmeter.util.*; | [
"java.awt",
"javax.swing",
"org.apache.jmeter"
] | java.awt; javax.swing; org.apache.jmeter; | 865,668 |
public static IgniteKernal localIgnite() throws IllegalArgumentException {
String name = U.getCurrentIgniteName();
if (U.isCurrentIgniteNameSet(name))
return gridx(name);
else if (Thread.currentThread() instanceof IgniteThread)
return gridx(((IgniteThread)Thread.curr... | static IgniteKernal function() throws IllegalArgumentException { String name = U.getCurrentIgniteName(); if (U.isCurrentIgniteNameSet(name)) return gridx(name); else if (Thread.currentThread() instanceof IgniteThread) return gridx(((IgniteThread)Thread.currentThread()).getGridName()); else throw new IllegalArgumentExce... | /**
* Gets a name of the grid from thread local config, which is owner of current thread.
*
* @return Grid instance related to current thread
* @throws IllegalArgumentException Thrown to indicate, that current thread is not an {@link IgniteThread}.
*/ | Gets a name of the grid from thread local config, which is owner of current thread | localIgnite | {
"repo_name": "afinka77/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java",
"license": "apache-2.0",
"size": 105099
} | [
"org.apache.ignite.internal.util.typedef.internal.U",
"org.apache.ignite.thread.IgniteThread"
] | import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.thread.IgniteThread; | import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.thread.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 813,452 |
private Collection getConsentList(IBizLogic bizLogic, String cpId) throws BizLogicException
{
final Collection consentTierCollection = (Collection) bizLogic.retrieveAttribute(
CollectionProtocol.class.getName(), Long.parseLong(cpId),
"elements(consentTierCollection)");
return consentTierCollection;
... | Collection function(IBizLogic bizLogic, String cpId) throws BizLogicException { final Collection consentTierCollection = (Collection) bizLogic.retrieveAttribute( CollectionProtocol.class.getName(), Long.parseLong(cpId), STR); return consentTierCollection; } | /**
* Gets the consent list.
*
* @param bizLogic : bizLogic
* @param cpId : cpId
*
* @return Collection : Collection
*
* @throws BizLogicException : BizLogicException
*/ | Gets the consent list | getConsentList | {
"repo_name": "NCIP/catissue-core",
"path": "software/caTissue/modules/core/src/main/java/edu/wustl/catissuecore/action/ParticipantAction.java",
"license": "bsd-3-clause",
"size": 34994
} | [
"edu.wustl.catissuecore.domain.CollectionProtocol",
"edu.wustl.common.bizlogic.IBizLogic",
"edu.wustl.common.exception.BizLogicException",
"java.util.Collection"
] | import edu.wustl.catissuecore.domain.CollectionProtocol; import edu.wustl.common.bizlogic.IBizLogic; import edu.wustl.common.exception.BizLogicException; import java.util.Collection; | import edu.wustl.catissuecore.domain.*; import edu.wustl.common.bizlogic.*; import edu.wustl.common.exception.*; import java.util.*; | [
"edu.wustl.catissuecore",
"edu.wustl.common",
"java.util"
] | edu.wustl.catissuecore; edu.wustl.common; java.util; | 2,013,367 |
@Override
public ValueFlowMap<V> merge(ValueFlowMap<V> o) {
if (!isViable() || !o.isViable()){
return isViable?new ValueFlowMap<V>(this):new ValueFlowMap<V>(o);
}
ValueFlowMap<V> result, smaller;
//clone the bigger set
if (this.size() > o.size(... | ValueFlowMap<V> function(ValueFlowMap<V> o) { if (!isViable() !o.isViable()){ return isViable?new ValueFlowMap<V>(this):new ValueFlowMap<V>(o); } ValueFlowMap<V> result, smaller; if (this.size() > o.size()){ result = new ValueFlowMap<V>(this); smaller = o; } else { result = new ValueFlowMap<V>(o); smaller = this; } for... | /**
* Returns a new ValueFlowMap, which is a merge of the two maps
*/ | Returns a new ValueFlowMap, which is a merge of the two maps | merge | {
"repo_name": "Sable/mclab-core",
"path": "languages/Natlab/src/natlab/tame/valueanalysis/ValueFlowMap.java",
"license": "apache-2.0",
"size": 6573
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,011,594 |
public static void createSchema(Connection connection, String dialect) {
executeScript(connection, "org/sonar/core/persistence/schema-" + dialect + ".ddl");
executeScript(connection, "org/sonar/core/persistence/rows-" + dialect + ".sql");
} | static void function(Connection connection, String dialect) { executeScript(connection, STR + dialect + ".ddl"); executeScript(connection, STR + dialect + ".sql"); } | /**
* The connection is commited in this method but not closed.
*/ | The connection is commited in this method but not closed | createSchema | {
"repo_name": "jmecosta/sonar",
"path": "sonar-core/src/main/java/org/sonar/core/persistence/DdlUtils.java",
"license": "lgpl-3.0",
"size": 2287
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 466,937 |
public void writeRating(String id, String commonName, String cultivar, String gardenLocation, int likes, int dislikes, int visits, int comments){
Row row = ratingsSheet.createRow(ratingCount);
Cell cell = row.createCell(0);
cell.setCellValue(id);
cell = row.createCell(1);
c... | void function(String id, String commonName, String cultivar, String gardenLocation, int likes, int dislikes, int visits, int comments){ Row row = ratingsSheet.createRow(ratingCount); Cell cell = row.createCell(0); cell.setCellValue(id); cell = row.createCell(1); cell.setCellValue(commonName); cell = row.createCell(2); ... | /**
* Adds the given information as a new row to the sheet.
* @param id: plant ID number
* @param commonName: common name of flower
* @param cultivar: cultivar name of flower
* @param gardenLocation: bed number of flower
* @param likes: number of likes on the flower
* @param dislikes:... | Adds the given information as a new row to the sheet | writeRating | {
"repo_name": "UMM-CSci-3601-S17/digital-display-garden-iteration-3-dorfner",
"path": "server/src/main/java/umm3601/digitalDisplayGarden/CollectedDataWriter.java",
"license": "mit",
"size": 5165
} | [
"org.apache.poi.ss.usermodel.Cell",
"org.apache.poi.ss.usermodel.Row"
] | import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; | import org.apache.poi.ss.usermodel.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,665,279 |
protected Rational readUnsignedRational() throws IOException {
long nomi = readUnsignedLong();
long denomi = readUnsignedLong();
return new Rational(nomi, denomi);
} | Rational function() throws IOException { long nomi = readUnsignedLong(); long denomi = readUnsignedLong(); return new Rational(nomi, denomi); } | /**
* Reads value of type {@link ExifTag#TYPE_UNSIGNED_RATIONAL} from the
* InputStream.
*/ | Reads value of type <code>ExifTag#TYPE_UNSIGNED_RATIONAL</code> from the InputStream | readUnsignedRational | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/Mms/src/com/android/mms/exif/ExifParser.java",
"license": "gpl-3.0",
"size": 34352
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,216,645 |
//create platform config
PlatformConfig cfg = new PlatformConfig(
this,
ServiceType.IN_PROC,
ModeType.SERVER,
"0.0.0.0", // bind to all available interfaces
0,
QualityOfService.LOW);
OcPlatform.Configure(cfg)... | PlatformConfig cfg = new PlatformConfig( this, ServiceType.IN_PROC, ModeType.SERVER, STR, 0, QualityOfService.LOW); OcPlatform.Configure(cfg); logMessage(TAG + STR); refrigerator = new Refrigerator(mContext); } | /**
* configure OIC platform and call findResource
*/ | configure OIC platform and call findResource | initOICStack | {
"repo_name": "WojciechLuczkow/iotivity",
"path": "android/examples/fridgeserver/src/main/java/org/iotivity/base/examples/fridgeserver/FridgeServer.java",
"license": "apache-2.0",
"size": 4829
} | [
"org.iotivity.base.ModeType",
"org.iotivity.base.OcPlatform",
"org.iotivity.base.PlatformConfig",
"org.iotivity.base.QualityOfService",
"org.iotivity.base.ServiceType"
] | import org.iotivity.base.ModeType; import org.iotivity.base.OcPlatform; import org.iotivity.base.PlatformConfig; import org.iotivity.base.QualityOfService; import org.iotivity.base.ServiceType; | import org.iotivity.base.*; | [
"org.iotivity.base"
] | org.iotivity.base; | 558,046 |
private UserSession getUserSessionFor(String userName) {
// do not call from somewhere else then signOffAndClear!!
Set authUserSessionsCopy = new HashSet(authUserSessions);
for (Iterator iterator = authUserSessionsCopy.iterator(); iterator.hasNext();) {
UserSession userSession = ... | UserSession function(String userName) { Set authUserSessionsCopy = new HashSet(authUserSessions); for (Iterator iterator = authUserSessionsCopy.iterator(); iterator.hasNext();) { UserSession userSession = (UserSession) iterator.next(); if (userName.equalsIgnoreCase(userSession.getIdentity().getName()) && userSession.ge... | /**
* Lookup non-webdav UserSession for username.
*
* @param userName
* @return user-session or null when no session was founded.
*/ | Lookup non-webdav UserSession for username | getUserSessionFor | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/presentation/commons/session/UserSession.java",
"license": "apache-2.0",
"size": 28956
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set"
] | import java.util.HashSet; import java.util.Iterator; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,464,551 |
doAutowireBean(invocationContext.getTarget());
try {
invocationContext.proceed();
}
catch (RuntimeException ex) {
doReleaseBean(invocationContext.getTarget());
throw ex;
}
catch (Error err) {
doReleaseBean(invocationContext.getTarget());
throw err;
}
catch (Exception ex) {
doReleaseBea... | doAutowireBean(invocationContext.getTarget()); try { invocationContext.proceed(); } catch (RuntimeException ex) { doReleaseBean(invocationContext.getTarget()); throw ex; } catch (Error err) { doReleaseBean(invocationContext.getTarget()); throw err; } catch (Exception ex) { doReleaseBean(invocationContext.getTarget()); ... | /**
* Autowire the target bean after construction as well as after passivation.
* @param invocationContext the EJB3 invocation context
*/ | Autowire the target bean after construction as well as after passivation | autowireBean | {
"repo_name": "sunpy1106/SpringBeanLifeCycle",
"path": "src/main/java/org/springframework/ejb/interceptor/SpringBeanAutowiringInterceptor.java",
"license": "apache-2.0",
"size": 8809
} | [
"javax.ejb.EJBException"
] | import javax.ejb.EJBException; | import javax.ejb.*; | [
"javax.ejb"
] | javax.ejb; | 477,538 |
static String getArrayElementStringValue(Node n) {
return (NodeUtil.isNullOrUndefined(n) || n.isEmpty())
? "" : getStringValue(n);
} | static String getArrayElementStringValue(Node n) { return (NodeUtil.isNullOrUndefined(n) n.isEmpty()) ? "" : getStringValue(n); } | /**
* When converting arrays to string using Array.prototype.toString or
* Array.prototype.join, the rules for conversion to String are different
* than converting each element individually. Specifically, "null" and
* "undefined" are converted to an empty string.
* @param n A node that is a member of an... | When converting arrays to string using Array.prototype.toString or Array.prototype.join, the rules for conversion to String are different than converting each element individually. Specifically, "null" and "undefined" are converted to an empty string | getArrayElementStringValue | {
"repo_name": "blickly/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 103104
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,554,814 |
public Properties getProperties()
{
return properties;
} | Properties function() { return properties; } | /**
* Retrieves the properties of the instance to be created using this builder.
*
* @return the properties of the instance to be created using this builder.
*/ | Retrieves the properties of the instance to be created using this builder | getProperties | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/remote.device/src/com/motorola/studio/android/remote/RemoteDeviceInstanceBuilder.java",
"license": "gpl-2.0",
"size": 2537
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,735,056 |
private void validateFeatureList(Feature f) {
int lv = f.lv;
int ancestorLV = f.ancestorLV;
EnumSet<Feature> ancestorSet = LayoutVersion.map.get(ancestorLV);
assertNotNull(ancestorSet);
for (Feature feature : ancestorSet) {
assertTrue("LV " + lv + " does nto support " + feature
+ ... | void function(Feature f) { int lv = f.lv; int ancestorLV = f.ancestorLV; EnumSet<Feature> ancestorSet = LayoutVersion.map.get(ancestorLV); assertNotNull(ancestorSet); for (Feature feature : ancestorSet) { assertTrue(STR + lv + STR + feature + STR + f.ancestorLV, LayoutVersion.supports(feature, lv)); } } | /**
* Given feature {@code f}, ensures the layout version of that feature
* supports all the features supported by it's ancestor.
*/ | Given feature f, ensures the layout version of that feature supports all the features supported by it's ancestor | validateFeatureList | {
"repo_name": "gndpig/hadoop",
"path": "src/test/org/apache/hadoop/hdfs/protocol/TestLayoutVersion.java",
"license": "apache-2.0",
"size": 2612
} | [
"java.util.EnumSet",
"org.apache.hadoop.hdfs.protocol.LayoutVersion",
"org.junit.Assert"
] | import java.util.EnumSet; import org.apache.hadoop.hdfs.protocol.LayoutVersion; import org.junit.Assert; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 2,434,217 |
public static StoredResultSet fromTailer(ExcerptTailer tailer)
{
ResultStore.ColumnDefsReader reader = new ResultStore.ColumnDefsReader();
boolean hasMoreResultSets = tailer.readDocument(reader);
ResultHandler.ComparableColumnDefinitions defs = new StoredComparableColumnDefinitions(reade... | static StoredResultSet function(ExcerptTailer tailer) { ResultStore.ColumnDefsReader reader = new ResultStore.ColumnDefsReader(); boolean hasMoreResultSets = tailer.readDocument(reader); ResultHandler.ComparableColumnDefinitions defs = new StoredComparableColumnDefinitions(reader.columnDefinitions, reader.wasFailed, ne... | /**
* creates a ComparableResultSet based on the data in tailer
*/ | creates a ComparableResultSet based on the data in tailer | fromTailer | {
"repo_name": "josh-mckenzie/cassandra",
"path": "tools/fqltool/src/org/apache/cassandra/fqltool/StoredResultSet.java",
"license": "apache-2.0",
"size": 9691
} | [
"net.openhft.chronicle.queue.ExcerptTailer"
] | import net.openhft.chronicle.queue.ExcerptTailer; | import net.openhft.chronicle.queue.*; | [
"net.openhft.chronicle"
] | net.openhft.chronicle; | 1,791,562 |
EAttribute getIStatistic_Value(); | EAttribute getIStatistic_Value(); | /**
* Returns the meta object for the attribute '{@link ch.elexis.core.ui.usage.model.IStatistic#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see ch.elexis.core.ui.usage.model.IStatistic#getValue()
* @see #getIS... | Returns the meta object for the attribute '<code>ch.elexis.core.ui.usage.model.IStatistic#getValue Value</code>'. | getIStatistic_Value | {
"repo_name": "elexis/elexis-3-core",
"path": "bundles/ch.elexis.core.ui.usage/src-gen/ch/elexis/core/ui/usage/model/ModelPackage.java",
"license": "epl-1.0",
"size": 19236
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,259,370 |
@Test
public void testCacheIdleVerifyDumpForCorruptedDataOnSystemCache() throws Exception {
int parts = 32;
atomicConfiguration = new AtomicConfiguration()
.setAffinity(new RendezvousAffinityFunction(false, parts))
.setBackups(2);
IgniteEx ignite = crd;
... | void function() throws Exception { int parts = 32; atomicConfiguration = new AtomicConfiguration() .setAffinity(new RendezvousAffinityFunction(false, parts)) .setBackups(2); IgniteEx ignite = crd; injectTestSystemOut(); for (int i = 0; i < 100; i++) { ignite.semaphore("s" + i, i, false, true); ignite.atomicSequence("sq... | /**
* Tests that idle verify print partitions info over system caches.
*
* @throws Exception If failed.
*/ | Tests that idle verify print partitions info over system caches | testCacheIdleVerifyDumpForCorruptedDataOnSystemCache | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java",
"license": "apache-2.0",
"size": 58296
} | [
"java.nio.file.Files",
"java.nio.file.Paths",
"java.util.regex.Matcher",
"org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction",
"org.apache.ignite.configuration.AtomicConfiguration",
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.internal.processors.cache.CacheGroupContext"... | import java.nio.file.Files; import java.nio.file.Paths; import java.util.regex.Matcher; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.AtomicConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cach... | import java.nio.file.*; import java.util.regex.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.datastructures.*; import org.apache.ig... | [
"java.nio",
"java.util",
"org.apache.ignite"
] | java.nio; java.util; org.apache.ignite; | 539,790 |
public void setEntries(List<Entry> entries) {
this.entries = entries;
} | void function(List<Entry> entries) { this.entries = entries; } | /**
* Method description
*
*
* @param entries
*/ | Method description | setEntries | {
"repo_name": "Fosstrak/fosstrak-webadapters",
"path": "src/main/java/org/fosstrak/webadapters/epcis/model/Form.java",
"license": "gpl-3.0",
"size": 4532
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,320,342 |
RegistrationRequest getOriginalRegistrationRequest(); | RegistrationRequest getOriginalRegistrationRequest(); | /**
* Returns the request sent from the node to the hub to register the proxy.
*
* @return the original node registration request.
*/ | Returns the request sent from the node to the hub to register the proxy | getOriginalRegistrationRequest | {
"repo_name": "alexkogon/grid-refactor-commons",
"path": "src/main/java/org/openqa/grid/internal/RemoteProxy.java",
"license": "apache-2.0",
"size": 6878
} | [
"org.openqa.grid.common.RegistrationRequest"
] | import org.openqa.grid.common.RegistrationRequest; | import org.openqa.grid.common.*; | [
"org.openqa.grid"
] | org.openqa.grid; | 2,398,742 |
public ServiceCallConfigurationDefinition expression(Expression expression) {
setExpression(expression);
return this;
} | ServiceCallConfigurationDefinition function(Expression expression) { setExpression(expression); return this; } | /**
* Sets a custom {@link Expression} to use.
*/ | Sets a custom <code>Expression</code> to use | expression | {
"repo_name": "lburgazzoli/apache-camel",
"path": "camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java",
"license": "apache-2.0",
"size": 21269
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 497,280 |
public static List<String> listPartitionValues(String filePath, String root) {
if (filePath == null || root == null) {
return Collections.emptyList();
}
int rootDepth = new Path(root).depth();
Path path = new Path(filePath);
int parentDepth = path.getParent().depth();
int diffCount = p... | static List<String> function(String filePath, String root) { if (filePath == null root == null) { return Collections.emptyList(); } int rootDepth = new Path(root).depth(); Path path = new Path(filePath); int parentDepth = path.getParent().depth(); int diffCount = parentDepth - rootDepth; if (diffCount < 1) { return Col... | /**
* Compares root and file path to determine directories
* that are present in the file path but absent in root.
* Example: root - a/b/c, filePath - a/b/c/d/e/0_0_0.parquet, result - d/e.
* Stores different directory names in the list in successive order.
*
*
* @param filePath file path
* @par... | Compares root and file path to determine directories that are present in the file path but absent in root. Example: root - a/b/c, filePath - a/b/c/d/e/0_0_0.parquet, result - d/e. Stores different directory names in the list in successive order | listPartitionValues | {
"repo_name": "superbstreak/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/ColumnExplorer.java",
"license": "apache-2.0",
"size": 11919
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.fs.Path"
] | import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.hadoop.fs.Path; | import java.util.*; import org.apache.hadoop.fs.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,881,528 |
private boolean shouldStayWithinHost(ExternalNavigationParams params, boolean isLink,
boolean isFormSubmit, List<ResolveInfo> resolvingInfos, boolean isExternalProtocol) {
if (isExternalProtocol) return false;
GURL previousUrl = getLastCommittedUrl();
if (previousUrl == null) pr... | boolean function(ExternalNavigationParams params, boolean isLink, boolean isFormSubmit, List<ResolveInfo> resolvingInfos, boolean isExternalProtocol) { if (isExternalProtocol) return false; GURL previousUrl = getLastCommittedUrl(); if (previousUrl == null) previousUrl = params.getReferrerUrl(); if (previousUrl.isEmpty(... | /**
* Current URL has at least one specialized handler available. For navigations
* within the same host, keep the navigation inside the browser unless the set of
* available apps to handle the new navigation is different. http://crbug.com/463138
*/ | Current URL has at least one specialized handler available. For navigations within the same host, keep the navigation inside the browser unless the set of available apps to handle the new navigation is different. HREF | shouldStayWithinHost | {
"repo_name": "chromium/chromium",
"path": "components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java",
"license": "bsd-3-clause",
"size": 97251
} | [
"android.content.Intent",
"android.content.pm.ResolveInfo",
"android.net.Uri",
"android.text.TextUtils",
"java.util.List",
"org.chromium.base.Log"
] | import android.content.Intent; import android.content.pm.ResolveInfo; import android.net.Uri; import android.text.TextUtils; import java.util.List; import org.chromium.base.Log; | import android.content.*; import android.content.pm.*; import android.net.*; import android.text.*; import java.util.*; import org.chromium.base.*; | [
"android.content",
"android.net",
"android.text",
"java.util",
"org.chromium.base"
] | android.content; android.net; android.text; java.util; org.chromium.base; | 978,015 |
@Test
public void testEdges() {
assertSame(query.edges().iterator().next().getClass(), SchemaFilterEdge.class);
assertTrue(queryStub.edgesCalled);
} | void function() { assertSame(query.edges().iterator().next().getClass(), SchemaFilterEdge.class); assertTrue(queryStub.edgesCalled); } | /**
* {@code edges()} delegates to the wrapped {@link com.tinkerpop.blueprints.GraphQuery} but also converts retrieved
* edges to a list of {@link SchemaFilterEdge}.
*/ | edges() delegates to the wrapped <code>com.tinkerpop.blueprints.GraphQuery</code> but also converts retrieved edges to a list of <code>SchemaFilterEdge</code> | testEdges | {
"repo_name": "b-long/ezbake-data-access",
"path": "ezgraph/blueprints/src/test/java/ezbake/data/graph/blueprints/schema/SchemaFilterGraphQueryTest.java",
"license": "apache-2.0",
"size": 4561
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,329,110 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.