method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public ServiceFuture<Void> patch504Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(patch504WithServiceResponseAsync(booleanValue), serviceCallback);
} | ServiceFuture<Void> function(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(patch504WithServiceResponseAsync(booleanValue), serviceCallback); } | /**
* Return 504 status code, then 200 after retry.
*
* @param booleanValue Simple boolean value true
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@li... | Return 504 status code, then 200 after retry | patch504Async | {
"repo_name": "veronicagg/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpRetrysImpl.java",
"license": "mit",
"size": 42483
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 470,556 |
public static void mockDatanodeBlkPinning(final DataNode dn,
final boolean pinned) throws IOException {
final FsDatasetSpi<? extends FsVolumeSpi> data = dn.data;
dn.data = Mockito.spy(data); | static void function(final DataNode dn, final boolean pinned) throws IOException { final FsDatasetSpi<? extends FsVolumeSpi> data = dn.data; dn.data = Mockito.spy(data); | /**
* This method is used to mock the data node block pinning API.
*
* @param dn datanode
* @param pinned true if the block is pinned, false otherwise
* @throws IOException
*/ | This method is used to mock the data node block pinning API | mockDatanodeBlkPinning | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/InternalDataNodeTestUtils.java",
"license": "apache-2.0",
"size": 6787
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi",
"org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi",
"org.mockito.Mockito"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsDatasetSpi; import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi; import org.mockito.Mockito; | import java.io.*; import org.apache.hadoop.hdfs.server.datanode.fsdataset.*; import org.mockito.*; | [
"java.io",
"org.apache.hadoop",
"org.mockito"
] | java.io; org.apache.hadoop; org.mockito; | 1,634,933 |
public static boolean tryToSetAnimationsAndTransitions(float[] animationScales)
throws SetAnimationScalesFailedException {
// Permission is not granted for M emulators. Testing possible workarounds.
grantSetAnimationScalePermissionForM();
// Test exception on M devices.
... | static boolean function(float[] animationScales) throws SetAnimationScalesFailedException { grantSetAnimationScalePermissionForM(); if (isWritePermissionDenied() && Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { Log.w(TAG, STR + SET_ANIMATION_SCALE + STR); return false; } else if (reflectivelySetAnimationScales(anima... | /**
* Sets animation and transition scales reflectively. Requires SET_ANIMATION_SCALE permission.
*
* @param animationScales The animation and transition scales to be set.
* @return True if animations are successfully set. False if write permission is denied.
* @throws SetAnimationScalesFailedE... | Sets animation and transition scales reflectively. Requires SET_ANIMATION_SCALE permission | tryToSetAnimationsAndTransitions | {
"repo_name": "ardock/android-topeka",
"path": "app/src/androidTest/java/com/google/samples/apps/topeka/rule/AnimationAwareWriter.java",
"license": "apache-2.0",
"size": 15155
} | [
"android.os.Build",
"android.util.Log"
] | import android.os.Build; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 241,862 |
private double getLengthDim(final Object gemNr,
final GerinneGeschlFlaechenReportDialog.Art art,
final Integer from,
final Integer till) {
final List<GmdPartObjGeschl> gemList = gemPartMap.get(gemNr);
double length = 0;
for (final GmdPartObjGeschl tmp : g... | double function(final Object gemNr, final GerinneGeschlFlaechenReportDialog.Art art, final Integer from, final Integer till) { final List<GmdPartObjGeschl> gemList = gemPartMap.get(gemNr); double length = 0; for (final GmdPartObjGeschl tmp : gemList) { if (tmp.getArt().equals(art.name()) && valueBetween(tmp.getDim(), f... | /**
* DOCUMENT ME!
*
* @param gemNr DOCUMENT ME!
* @param art DOCUMENT ME!
* @param from DOCUMENT ME!
* @param till DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getLengthDim | {
"repo_name": "cismet/watergis-client",
"path": "src/main/java/de/cismet/watergis/reports/GerinneGFlReport.java",
"license": "lgpl-3.0",
"size": 159735
} | [
"de.cismet.watergis.gui.dialog.GerinneGeschlFlaechenReportDialog",
"de.cismet.watergis.reports.types.GmdPartObjGeschl",
"java.util.List"
] | import de.cismet.watergis.gui.dialog.GerinneGeschlFlaechenReportDialog; import de.cismet.watergis.reports.types.GmdPartObjGeschl; import java.util.List; | import de.cismet.watergis.gui.dialog.*; import de.cismet.watergis.reports.types.*; import java.util.*; | [
"de.cismet.watergis",
"java.util"
] | de.cismet.watergis; java.util; | 489,798 |
public void setFooterResource(@LayoutRes int footerResource) {
this.footerResource = footerResource;
} | void function(@LayoutRes int footerResource) { this.footerResource = footerResource; } | /**
* Sets the layout resource to be inflated as footer. It should contain a TextView with id set
* to android.R.id.text1, where the text will be added.
* @param footerResource A valid xml layout resource, or 0 to use dropDownResource instead.
*/ | Sets the layout resource to be inflated as footer. It should contain a TextView with id set to android.R.id.text1, where the text will be added | setFooterResource | {
"repo_name": "SimplicityApks/ReminderDatePicker",
"path": "lib/src/main/java/com/simplicityapks/reminderdatepicker/lib/PickerSpinnerAdapter.java",
"license": "apache-2.0",
"size": 12234
} | [
"android.support.annotation.LayoutRes"
] | import android.support.annotation.LayoutRes; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,007,164 |
@Override
public void generateCopyUpdateObject(JavaWriter out,
String dst, String src,
int updateIndex)
throws IOException
{
} | void function(JavaWriter out, String dst, String src, int updateIndex) throws IOException { } | /**
* Updates the cached copy.
*/ | Updates the cached copy | generateCopyUpdateObject | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/amber/field/EntityMapField.java",
"license": "gpl-2.0",
"size": 6848
} | [
"com.caucho.java.JavaWriter",
"java.io.IOException"
] | import com.caucho.java.JavaWriter; import java.io.IOException; | import com.caucho.java.*; import java.io.*; | [
"com.caucho.java",
"java.io"
] | com.caucho.java; java.io; | 2,838,310 |
@Test
public void testPublicCloneable() {
StandardXYItemLabelGenerator g1 = new StandardXYItemLabelGenerator();
assertTrue(g1 instanceof PublicCloneable);
} | void function() { StandardXYItemLabelGenerator g1 = new StandardXYItemLabelGenerator(); assertTrue(g1 instanceof PublicCloneable); } | /**
* Check to ensure that this class implements PublicCloneable.
*/ | Check to ensure that this class implements PublicCloneable | testPublicCloneable | {
"repo_name": "raincs13/phd",
"path": "tests/org/jfree/chart/labels/StandardXYItemLabelGeneratorTest.java",
"license": "lgpl-2.1",
"size": 7099
} | [
"org.jfree.util.PublicCloneable",
"org.junit.Assert"
] | import org.jfree.util.PublicCloneable; import org.junit.Assert; | import org.jfree.util.*; import org.junit.*; | [
"org.jfree.util",
"org.junit"
] | org.jfree.util; org.junit; | 1,843,760 |
public void saveUpdatedBean(ListModelElement wrapper, Object bean) {
((NameObject)wrapper.wrapper).setObject(bean);
} | void function(ListModelElement wrapper, Object bean) { ((NameObject)wrapper.wrapper).setObject(bean); } | /**
* save update bean
* @param wrapper
* @param bean
*/ | save update bean | saveUpdatedBean | {
"repo_name": "fanruan/finereport-design",
"path": "designer_base/src/com/fr/design/gui/controlpane/NameObjectCreator.java",
"license": "gpl-3.0",
"size": 1719
} | [
"com.fr.design.gui.ilist.ListModelElement",
"com.fr.general.NameObject"
] | import com.fr.design.gui.ilist.ListModelElement; import com.fr.general.NameObject; | import com.fr.design.gui.ilist.*; import com.fr.general.*; | [
"com.fr.design",
"com.fr.general"
] | com.fr.design; com.fr.general; | 1,440,566 |
public static void addAreas(AbstractLayoutManager parentLM,
PositionIterator parentIter, LayoutContext layoutContext) {
LayoutManager childLM;
LayoutContext lc = LayoutContext.offspringOf(layoutContext);
LayoutManager firstLM = null;
LayoutManager lastLM = null;
P... | static void function(AbstractLayoutManager parentLM, PositionIterator parentIter, LayoutContext layoutContext) { LayoutManager childLM; LayoutContext lc = LayoutContext.offspringOf(layoutContext); LayoutManager firstLM = null; LayoutManager lastLM = null; Position firstPos = null; Position lastPos = null; if (parentLM ... | /**
* Creates the child areas for the given layout manager.
* @param parentLM the parent layout manager
* @param parentIter the position iterator
* @param layoutContext the layout context
*/ | Creates the child areas for the given layout manager | addAreas | {
"repo_name": "chunlinyao/fop",
"path": "fop-core/src/main/java/org/apache/fop/layoutmgr/AreaAdditionUtil.java",
"license": "apache-2.0",
"size": 4740
} | [
"java.util.LinkedList",
"org.apache.fop.layoutmgr.SpaceResolver"
] | import java.util.LinkedList; import org.apache.fop.layoutmgr.SpaceResolver; | import java.util.*; import org.apache.fop.layoutmgr.*; | [
"java.util",
"org.apache.fop"
] | java.util; org.apache.fop; | 1,321,570 |
public List<Person> getByPersonId(Integer[] personIds);
| List<Person> function(Integer[] personIds); | /**
* Returns persons identified by personId. Person contains general info attributes.
*
* @author Coni
*/ | Returns persons identified by personId. Person contains general info attributes | getByPersonId | {
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaOM/JavaSource/ro/cs/om/model/dao/IDaoPerson.java",
"license": "agpl-3.0",
"size": 11283
} | [
"java.util.List",
"ro.cs.om.entity.Person"
] | import java.util.List; import ro.cs.om.entity.Person; | import java.util.*; import ro.cs.om.entity.*; | [
"java.util",
"ro.cs.om"
] | java.util; ro.cs.om; | 2,491,949 |
private void checkAndNotifyNFCEnabled() {
if (!m_nfcManager.isNFCEnabled()) {
Toast.makeText(this,
"NFC disabled, must enable before Android Beam will work.",
Toast.LENGTH_LONG).show();
}
} | void function() { if (!m_nfcManager.isNFCEnabled()) { Toast.makeText(this, STR, Toast.LENGTH_LONG).show(); } } | /**
* Checks if NFC is enabled and notifies the user if it is not.
*/ | Checks if NFC is enabled and notifies the user if it is not | checkAndNotifyNFCEnabled | {
"repo_name": "tbporter/Cypher-Sydekick",
"path": "CypherSydekick/src/com/github/tbporter/cypher_sydekick/activities/ChatClientActivity.java",
"license": "apache-2.0",
"size": 16421
} | [
"android.widget.Toast"
] | import android.widget.Toast; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,005,173 |
public void testReadLock_lockUnlock() {
StampedLock lock = new StampedLock();
for (Function<StampedLock, Long> readLocker : readLockers())
for (BiConsumer<StampedLock, Long> readUnlocker : readUnlockers()) {
long s = 42;
for (int i = 0; i < 2; i++) {
... | void function() { StampedLock lock = new StampedLock(); for (Function<StampedLock, Long> readLocker : readLockers()) for (BiConsumer<StampedLock, Long> readUnlocker : readUnlockers()) { long s = 42; for (int i = 0; i < 2; i++) { s = assertValid(lock, readLocker.apply(lock)); assertFalse(lock.isWriteLocked()); assertTru... | /**
* read-locking, then unlocking, an unlocked lock succeed
*/ | read-locking, then unlocking, an unlocked lock succeed | testReadLock_lockUnlock | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/StampedLockTest.java",
"license": "gpl-2.0",
"size": 57159
} | [
"java.util.concurrent.locks.StampedLock",
"java.util.function.BiConsumer",
"java.util.function.Function"
] | import java.util.concurrent.locks.StampedLock; import java.util.function.BiConsumer; import java.util.function.Function; | import java.util.concurrent.locks.*; import java.util.function.*; | [
"java.util"
] | java.util; | 846,456 |
private void loadMetaData() throws Exception
{
cpcRefsetConcept = dwh.makeRefsetTypeConcept(null, cpcRefsetConceptKey, null, null, defaultTime);
allCUIRefsetConcept = dwh.makeRefsetTypeConcept(null, allCUIConcepts, null, null, defaultTime);
// from http://www.nlm.nih.gov/research/umls/rxnorm/docs/2013/rxnorm... | void function() throws Exception { cpcRefsetConcept = dwh.makeRefsetTypeConcept(null, cpcRefsetConceptKey, null, null, defaultTime); allCUIRefsetConcept = dwh.makeRefsetTypeConcept(null, allCUIConcepts, null, null, defaultTime); dwh.makeOtherMetadataRootNode(sourceMetadata, defaultTime); dwh.makeOtherTypeConcept(dwh.ge... | /**
* Load meta data.
*
* @throws Exception the exception
*/ | Load meta data | loadMetaData | {
"repo_name": "OSEHRA/ISAAC",
"path": "misc/importers/src/main/java/sh/isaac/convert/mojo/rxnorm/RxNormImportHK2Direct.java",
"license": "apache-2.0",
"size": 84371
} | [
"java.sql.Statement",
"sh.isaac.api.component.semantic.version.dynamic.DynamicDataType"
] | import java.sql.Statement; import sh.isaac.api.component.semantic.version.dynamic.DynamicDataType; | import java.sql.*; import sh.isaac.api.component.semantic.version.dynamic.*; | [
"java.sql",
"sh.isaac.api"
] | java.sql; sh.isaac.api; | 1,212,035 |
public boolean setDefaultAttribute(Attribute attr, boolean editable) {
Attribute prevAttr = attributes.get(attr.getName());
this.addConfigAttributeName(attr.getName());
if (prevAttr == null) {
attributes.put(attr);
return true;
}
if (editable != prev... | boolean function(Attribute attr, boolean editable) { Attribute prevAttr = attributes.get(attr.getName()); this.addConfigAttributeName(attr.getName()); if (prevAttr == null) { attributes.put(attr); return true; } if (editable != prevAttr.isEditable()) { prevAttr.setEditable(editable); attributes.put(prevAttr); return tr... | /**
* Set default attribute and update editable flag. If attribute is already set, the stored value
* will be kept as-is.
*
* @return true if new attribute has been set or flags has been changed, false if previous value
* has been kept.
*/ | Set default attribute and update editable flag. If attribute is already set, the stored value will be kept as-is | setDefaultAttribute | {
"repo_name": "NLeSC/Platinum",
"path": "ptk-vbrowser-vrs/src/main/java/nl/esciencecenter/vbrowser/vrs/registry/ResourceConfigInfo.java",
"license": "apache-2.0",
"size": 11136
} | [
"nl.esciencecenter.vbrowser.vrs.data.Attribute"
] | import nl.esciencecenter.vbrowser.vrs.data.Attribute; | import nl.esciencecenter.vbrowser.vrs.data.*; | [
"nl.esciencecenter.vbrowser"
] | nl.esciencecenter.vbrowser; | 380,270 |
EAttribute getFuelAllocationSchedule_FuelAllocationEndDate(); | EAttribute getFuelAllocationSchedule_FuelAllocationEndDate(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Generation.Production.FuelAllocationSchedule#getFuelAllocationEndDate <em>Fuel Allocation End Date</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Fuel Allocation End Date</em>'.
* @... | Returns the meta object for the attribute '<code>CIM.IEC61970.Generation.Production.FuelAllocationSchedule#getFuelAllocationEndDate Fuel Allocation End Date</code>'. | getFuelAllocationSchedule_FuelAllocationEndDate | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Generation/Production/ProductionPackage.java",
"license": "mit",
"size": 499866
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 806,811 |
public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
{
if (pool == null)
{
log.tracef("No pooling strategy found! for connection manager : %s", this);
return null;
}
else
{
return pool.getManagedConnectionFactory();
}
} | javax.resource.spi.ManagedConnectionFactory function() { if (pool == null) { log.tracef(STR, this); return null; } else { return pool.getManagedConnectionFactory(); } } | /**
* Gets managed connection factory.
* @return managed connection factory
*/ | Gets managed connection factory | getManagedConnectionFactory | {
"repo_name": "ironjacamar/ironjacamar",
"path": "core/impl/src/main/java/org/jboss/jca/core/connectionmanager/AbstractConnectionManager.java",
"license": "lgpl-2.1",
"size": 30747
} | [
"javax.resource.spi.ManagedConnectionFactory"
] | import javax.resource.spi.ManagedConnectionFactory; | import javax.resource.spi.*; | [
"javax.resource"
] | javax.resource; | 2,427,908 |
@MediumTest
public void testLoadFromLocalDataDir() {
ClassLoader loader = DexLoader.load(
mRemoteContext, DEX_ASSET_NAME, CANARY_CLASS_NAME, null, mLocalDexDir);
assertNotNull(loader);
assertTrue(canLoadCanaryClass(loader));
// Check that the dex file was extract... | void function() { ClassLoader loader = DexLoader.load( mRemoteContext, DEX_ASSET_NAME, CANARY_CLASS_NAME, null, mLocalDexDir); assertNotNull(loader); assertTrue(canLoadCanaryClass(loader)); assertTrue(mLocalDexDir.exists()); File[] localDexDirFiles = mLocalDexDir.listFiles(); assertNotNull(localDexDirFiles); Arrays.sor... | /**
* That that {@link DexLoader#load()} falls back to extracting the dex from the APK to the
* local data directory and creating the ClassLoader from the extracted dex if creating the
* ClassLoader from the cached data in the remote Context's data directory fails.
*/ | That that <code>DexLoader#load()</code> falls back to extracting the dex from the APK to the local data directory and creating the ClassLoader from the extracted dex if creating the ClassLoader from the cached data in the remote Context's data directory fails | testLoadFromLocalDataDir | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/webapk/shell_apk/javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java",
"license": "bsd-3-clause",
"size": 12381
} | [
"java.io.File",
"java.util.Arrays"
] | import java.io.File; import java.util.Arrays; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,486,953 |
public static List<Series> querySeriesList(
Long indicatorId, Integer startYear, Integer endYear) {
List<Point> points = Point.objects
.where()
.eq("series.indicator.id", indicatorId)
.ge("year", startYear)
.le("year", endYear)
... | static List<Series> function( Long indicatorId, Integer startYear, Integer endYear) { List<Point> points = Point.objects .where() .eq(STR, indicatorId) .ge("year", startYear) .le("year", endYear) .query() .fetch(STR) .fetch(STR) .fetch(STR) .findList(); Map<Series, List<Point>> pointsBySeries = new HashMap<Series, List... | /**
* Query series.
*
* @param indicatorId ID of {@link Indicator}.
* @param startYear Start year of the query interval.
* @param endYear End year of the query interval.
* @return List of series.
*/ | Query series | querySeriesList | {
"repo_name": "snogaraleal/wbi",
"path": "app/services/WBIExplorationService.java",
"license": "gpl-3.0",
"size": 4563
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,824,463 |
private static void transformMotionEventToLocal(@NonNull View view, @NonNull MotionEvent ev) {
final ViewParent parent = view.getParent();
if (parent instanceof View) {
final View vp = (View) parent;
transformMotionEventToLocal(vp, ev);
ev.... | static void function(@NonNull View view, @NonNull MotionEvent ev) { final ViewParent parent = view.getParent(); if (parent instanceof View) { final View vp = (View) parent; transformMotionEventToLocal(vp, ev); ev.offsetLocation(vp.getScrollX(), vp.getScrollY()); } ev.offsetLocation(-view.getLeft(), -view.getTop()); Mat... | /**
* Recursive helper method that applies transformations in post-order.
*
* @param ev the on-screen motion event
*/ | Recursive helper method that applies transformations in post-order | transformMotionEventToLocal | {
"repo_name": "makovkastar/AcDisplay",
"path": "project/app/src/main/java/com/achep/acdisplay/utils/ViewUtils.java",
"license": "gpl-2.0",
"size": 10830
} | [
"android.graphics.Matrix",
"android.support.annotation.NonNull",
"android.view.MotionEvent",
"android.view.View",
"android.view.ViewParent"
] | import android.graphics.Matrix; import android.support.annotation.NonNull; import android.view.MotionEvent; import android.view.View; import android.view.ViewParent; | import android.graphics.*; import android.support.annotation.*; import android.view.*; | [
"android.graphics",
"android.support",
"android.view"
] | android.graphics; android.support; android.view; | 2,147,452 |
public void filterErrorHandler(boolean exclude, int errorHandler)
{
if (exclude)
{
tags.add(new MonitorTag(Monitor.MONITOR_BLOCK_FILTER_TAG_NOT));
}
tags.add(new MonitorTag(Monitor.MONITOR_BLOCK_FILTER_TAG_ERROR_HANDLER,
new Integer(errorHandler)));
} | void function(boolean exclude, int errorHandler) { if (exclude) { tags.add(new MonitorTag(Monitor.MONITOR_BLOCK_FILTER_TAG_NOT)); } tags.add(new MonitorTag(Monitor.MONITOR_BLOCK_FILTER_TAG_ERROR_HANDLER, new Integer(errorHandler))); } | /**
* Add a filter criteria for the error handler address of a block.
*
* @param exclude whether or not to invert the filter criteria.
* @param errorHandler the error handler address value.
*/ | Add a filter criteria for the error handler address of a block | filterErrorHandler | {
"repo_name": "debabratahazra/OptimaLA",
"path": "Optima/com.ose.system/src/com/ose/system/BlockFilter.java",
"license": "epl-1.0",
"size": 7348
} | [
"com.ose.system.service.monitor.Monitor",
"com.ose.system.service.monitor.MonitorTag"
] | import com.ose.system.service.monitor.Monitor; import com.ose.system.service.monitor.MonitorTag; | import com.ose.system.service.monitor.*; | [
"com.ose.system"
] | com.ose.system; | 817,399 |
protected void handleIdle(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// Skip sent data
skipData(req);
RTMPTConnection connection = getClientConnection(req);
if (connection == null) {
handleBadRequest("Idle: unknown client with id: " + getClientId(req)... | void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { skipData(req); RTMPTConnection connection = getClientConnection(req); if (connection == null) { handleBadRequest(STR + getClientId(req), resp); return; } else if (connection.isClosing()) { returnMessage((byte) 0, resp... | /**
* Poll RTMPT session for updates.
*
* @param req
* Servlet request
* @param resp
* Servlet response
* @throws ServletException
* Servlet exception
* @throws IOException
* I/O exception
*/ | Poll RTMPT session for updates | handleIdle | {
"repo_name": "OpenCorrelate/red5load",
"path": "red5/src/main/java/org/red5/server/net/rtmpt/RTMPTServlet.java",
"license": "lgpl-3.0",
"size": 15637
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,384,860 |
public static String processMessageDigestForData(MessageDigest messageDigest, byte[] data) {
String output = ""; //$NON-NLS-1$
if (messageDigest != null) {
// Get the digest for the given data
messageDigest.update(data);
byte[] digest = messageDigest.digest();
... | static String function(MessageDigest messageDigest, byte[] data) { String output = ""; if (messageDigest != null) { messageDigest.update(data); byte[] digest = messageDigest.digest(); output = Base64Coder.encode(digest); } return output; } | /**
* Calculate the digest specified by byte array of data
* @param messageDigest
* @param data
* @return digest in string with base64 encoding.
*/ | Calculate the digest specified by byte array of data | processMessageDigestForData | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.dynacache/src/com/ibm/ws/cache/util/MessageDigestUtility.java",
"license": "epl-1.0",
"size": 2433
} | [
"com.ibm.ws.common.internal.encoder.Base64Coder",
"java.security.MessageDigest"
] | import com.ibm.ws.common.internal.encoder.Base64Coder; import java.security.MessageDigest; | import com.ibm.ws.common.internal.encoder.*; import java.security.*; | [
"com.ibm.ws",
"java.security"
] | com.ibm.ws; java.security; | 2,206,408 |
public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
{
if (!p_149727_1_.isRemote && p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_) == nul... | boolean function(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { if (!p_149727_1_.isRemote && p_149727_1_.getTileEntity(p_149727_2_, p_149727_3_, p_149727_4_) == null) { p_149727_1_.setBlockToAir(... | /**
* Called upon block activation (right click on the block.)
*/ | Called upon block activation (right click on the block.) | onBlockActivated | {
"repo_name": "CheeseL0ver/Ore-TTM",
"path": "build/tmp/recompSrc/net/minecraft/block/BlockPistonMoving.java",
"license": "lgpl-2.1",
"size": 10129
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.world.World"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; | import net.minecraft.entity.player.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.world; | 2,304,161 |
public Rectangle getBounds() {
Rectangle bounds;
int x, y;
int width, height;
if(image_ != null) {
width = image_.getWidth(layer_.getPane().getComponent());
height = image_.getHeight(layer_.getPane().getComponent());
x = layer_.getXPtoD(porigin_.x);
y = layer_.getYPtoD(porigin_... | Rectangle function() { Rectangle bounds; int x, y; int width, height; if(image_ != null) { width = image_.getWidth(layer_.getPane().getComponent()); height = image_.getHeight(layer_.getPane().getComponent()); x = layer_.getXPtoD(porigin_.x); y = layer_.getYPtoD(porigin_.y); switch(halign_) { case RIGHT: x = x - width; ... | /**
* Get the bounding rectangle.
*
* @return bounding rectangle
*/ | Get the bounding rectangle | getBounds | {
"repo_name": "kernsuite-debian/lofar",
"path": "JAVA/GUI/Plotter/src/gov/noaa/pmel/sgt/Logo.java",
"license": "gpl-3.0",
"size": 10060
} | [
"java.awt.Rectangle"
] | import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,596,077 |
public void setCdataSectionElements(Vector URI_and_localNames); | void function(Vector URI_and_localNames); | /**
* Sets the value coming from the xsl:output cdata-section-elements
* stylesheet property.
*
* This sets the elements whose text elements are to be output as CDATA
* sections.
* @param URI_and_localNames pairs of namespace URI and local names that
* identify elements whose text ele... | Sets the value coming from the xsl:output cdata-section-elements stylesheet property. This sets the elements whose text elements are to be output as CDATA sections | setCdataSectionElements | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java",
"license": "mit",
"size": 6446
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 653,586 |
public IIOMetadataFormat getImageMetadataFormat(String formatName) {
return getMetadataFormat(formatName,
supportsStandardImageMetadataFormat,
nativeImageMetadataFormatName,
nativeImageMetadataFormatClassName,... | IIOMetadataFormat function(String formatName) { return getMetadataFormat(formatName, supportsStandardImageMetadataFormat, nativeImageMetadataFormatName, nativeImageMetadataFormatClassName, extraImageMetadataFormatNames, extraImageMetadataFormatClassNames); } | /**
* Returns an <code>IIOMetadataFormat</code> object describing the
* given image metadata format, or <code>null</code> if no
* description is available. The supplied name must be the native
* image metadata format name, the standard metadata format name,
* or one of those returned by
*... | Returns an <code>IIOMetadataFormat</code> object describing the given image metadata format, or <code>null</code> if no description is available. The supplied name must be the native image metadata format name, the standard metadata format name, or one of those returned by <code>getExtraImageMetadataFormatNames</code> | getImageMetadataFormat | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/imageio/spi/ImageReaderWriterSpi.java",
"license": "mit",
"size": 25626
} | [
"javax.imageio.metadata.IIOMetadataFormat"
] | import javax.imageio.metadata.IIOMetadataFormat; | import javax.imageio.metadata.*; | [
"javax.imageio"
] | javax.imageio; | 2,403,935 |
public void setSelectedIndices(Vector<Integer> selectedIndices) {
this.selectedIndices = selectedIndices;
if (selectedIndices != null) {
numberOfSelectedRows = selectedIndices.size();
} else {
numberOfSelectedRows = parentTable.getRowNumber();
}
fireEvent();
}
| void function(Vector<Integer> selectedIndices) { this.selectedIndices = selectedIndices; if (selectedIndices != null) { numberOfSelectedRows = selectedIndices.size(); } else { numberOfSelectedRows = parentTable.getRowNumber(); } fireEvent(); } | /**
* Sets selected indices.
*
* @param selectedIndices the selected indices
*/ | Sets selected indices | setSelectedIndices | {
"repo_name": "cm-is-dog/rapidminer-studio-core",
"path": "src/main/java/com/rapidminer/datatable/DataTableView.java",
"license": "agpl-3.0",
"size": 6858
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,395,526 |
public static Object invokeMethodSafe(Method method, Object instance, Object... parameters)
throws InvocationTargetException, IllegalAccessException {
Object answer;
if (!method.isAccessible()) {
method.setAccessible(true);
}
if (parameters != null) {
... | static Object function(Method method, Object instance, Object... parameters) throws InvocationTargetException, IllegalAccessException { Object answer; if (!method.isAccessible()) { method.setAccessible(true); } if (parameters != null) { answer = method.invoke(instance, parameters); } else { answer = method.invoke(insta... | /**
* A helper method to invoke a method via reflection in a safe way by allowing to invoke methods that are not
* accessible by default and wrap any exceptions as {@link RuntimeCamelException} instances
*
* @param method the method to invoke
* @param instance the object instance (or nu... | A helper method to invoke a method via reflection in a safe way by allowing to invoke methods that are not accessible by default and wrap any exceptions as <code>RuntimeCamelException</code> instances | invokeMethodSafe | {
"repo_name": "pmoerenhout/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/ObjectHelper.java",
"license": "apache-2.0",
"size": 37962
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 32,060 |
public static synchronized void broadcastPropertyChange(PropertyChangeEvent event) {
for (IPropertyChangeListener listener : propertyChangeListeners)
listener.propertyChange(event);
}
static class RIRefresh extends Job implements RepositoryListener {
RIRefresh() {
super(UIText.Activator_refreshJobName)... | static synchronized void function(PropertyChangeEvent event) { for (IPropertyChangeListener listener : propertyChangeListeners) listener.propertyChange(event); } static class RIRefresh extends Job implements RepositoryListener { RIRefresh() { super(UIText.Activator_refreshJobName); } private Set<IProject> projectsToSca... | /**
* Broadcast a Team property change.
*
* @param event
* The event to broadcast
*/ | Broadcast a Team property change | broadcastPropertyChange | {
"repo_name": "spearce/egit",
"path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java",
"license": "epl-1.0",
"size": 12546
} | [
"java.util.LinkedHashSet",
"java.util.Set",
"org.eclipse.core.resources.IProject",
"org.eclipse.core.runtime.jobs.Job",
"org.eclipse.jface.util.IPropertyChangeListener",
"org.eclipse.jface.util.PropertyChangeEvent",
"org.eclipse.jgit.lib.RepositoryListener"
] | import java.util.LinkedHashSet; import java.util.Set; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.jgit.lib.RepositoryListener; | import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.jobs.*; import org.eclipse.jface.util.*; import org.eclipse.jgit.lib.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.jface",
"org.eclipse.jgit"
] | java.util; org.eclipse.core; org.eclipse.jface; org.eclipse.jgit; | 2,353,741 |
static public void main(String[] args) {
junit.textui.TestRunner runner = new junit.textui.TestRunner();
System.exit(
TestRunner.run(runner.getTest(uk.ac.shef.wit.simmetrics.metrichandlers.TestSuite.class.getName())).
wasSuccessful() ? 0 : 1
... | static void function(String[] args) { junit.textui.TestRunner runner = new junit.textui.TestRunner(); System.exit( TestRunner.run(runner.getTest(uk.ac.shef.wit.simmetrics.metrichandlers.TestSuite.class.getName())). wasSuccessful() ? 0 : 1 ); } | /**
* main method for the junit testing.
*
* @param args - unused
*/ | main method for the junit testing | main | {
"repo_name": "entityresolution/Entity_Resolution_Service_Intermediary_OSGi",
"path": "src/test/java/uk/ac/shef/wit/simmetrics/metrichandlers/TestSuite.java",
"license": "apache-2.0",
"size": 3410
} | [
"junit.textui.TestRunner"
] | import junit.textui.TestRunner; | import junit.textui.*; | [
"junit.textui"
] | junit.textui; | 2,538,069 |
@JmeThread
private void setAudioKey(@NotNull final AudioKey audioKey) {
this.audioKey = audioKey;
} | void function(@NotNull final AudioKey audioKey) { this.audioKey = audioKey; } | /**
* Set the audio key.
*
* @param audioKey the audio key.
*/ | Set the audio key | setAudioKey | {
"repo_name": "JavaSaBr/jME3-SpaceShift-Editor",
"path": "src/main/java/com/ss/editor/part3d/editor/impl/audio/AudioViewer3DPart.java",
"license": "apache-2.0",
"size": 6688
} | [
"com.jme3.audio.AudioKey",
"org.jetbrains.annotations.NotNull"
] | import com.jme3.audio.AudioKey; import org.jetbrains.annotations.NotNull; | import com.jme3.audio.*; import org.jetbrains.annotations.*; | [
"com.jme3.audio",
"org.jetbrains.annotations"
] | com.jme3.audio; org.jetbrains.annotations; | 759,397 |
public boolean parseFile(String fileName, boolean ns){
FileInputStream fis = null;
File f = null;
try{
f = new File(fileName);
fis = new FileInputStream(f);
byte[] b = new byte[(int) f.length()];
//fis.read(b);
int offset = 0;
int... | boolean function(String fileName, boolean ns){ FileInputStream fis = null; File f = null; try{ f = new File(fileName); fis = new FileInputStream(f); byte[] b = new byte[(int) f.length()]; int offset = 0; int numRead = 0; int numOfBytes = 1048576; if (b.length-offset<numOfBytes) {numOfBytes=b.length-offset;} while (offs... | /**
* This method parses the XML file and returns a boolean indicating
* if it is successful or not.When set to true,
* VTDGen conforms to XML namespace 1.0 spec
* @param fileName
* @param ns namespace aware or not
* @return boolean indicating whether the parseFile is a success
*
*/ | This method parses the XML file and returns a boolean indicating if it is successful or not.When set to true, VTDGen conforms to XML namespace 1.0 spec | parseFile | {
"repo_name": "CoolBalance/vtd-xml",
"path": "src/main/java/com/ximpleware/VTDGen.java",
"license": "gpl-2.0",
"size": 146974
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,353,932 |
public void parse(String[] argv) throws Exception
{
CommandLine cl = parser.parse(options, argv);
if ( cl.hasOption("h") )
{
printUsage(true);
}
// Add individual files.
if (cl.hasOption("f"))
{
String[] infilepaths = cl.getOptionValues("f");
for (int i=0; i<infilepaths.length; i+... | void function(String[] argv) throws Exception { CommandLine cl = parser.parse(options, argv); if ( cl.hasOption("h") ) { printUsage(true); } if (cl.hasOption("f")) { String[] infilepaths = cl.getOptionValues("f"); for (int i=0; i<infilepaths.length; i++) { infiles.add(new File(infilepaths[i])); } } if (cl.hasOption("i"... | /**
* Parse the arguments for concat options.
* @param argv The raw command-line options.
*/ | Parse the arguments for concat options | parse | {
"repo_name": "petricm/LCIO",
"path": "src/java/hep/lcio/util/ConcatenateCommandHandler.java",
"license": "bsd-3-clause",
"size": 2973
} | [
"java.io.File",
"java.util.Iterator",
"java.util.List",
"org.apache.commons.cli.CommandLine"
] | import java.io.File; import java.util.Iterator; import java.util.List; import org.apache.commons.cli.CommandLine; | import java.io.*; import java.util.*; import org.apache.commons.cli.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 1,799,941 |
private List<String> getPosTags(String word) {
List<WordData> lwd = dictLookup.lookup(word);
ArrayList<String> postags = new ArrayList<String>();
for (WordData wd : lwd) {
postags.add(wd.getTag().toString());
}
return postags;
} | List<String> function(String word) { List<WordData> lwd = dictLookup.lookup(word); ArrayList<String> postags = new ArrayList<String>(); for (WordData wd : lwd) { postags.add(wd.getTag().toString()); } return postags; } | /**
* Returns a list of the word's POS tags
* @param word
* @return
*/ | Returns a list of the word's POS tags | getPosTags | {
"repo_name": "ManolitoOctaviano/Language-Identification",
"path": "src/dev/de/danielnaber/languagetool/dev/conversion/RuleCoverage.java",
"license": "lgpl-2.1",
"size": 30649
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,869,472 |
void sendOutboundDirect(MimeMessage message); | void sendOutboundDirect(MimeMessage message); | /**
* Send an outbound mime message with direct.
* @param message to be sent.
*/ | Send an outbound mime message with direct | sendOutboundDirect | {
"repo_name": "sailajaa/CONNECT",
"path": "Product/Production/Services/DirectCore/src/main/java/gov/hhs/fha/nhinc/direct/DirectSender.java",
"license": "bsd-3-clause",
"size": 2412
} | [
"javax.mail.internet.MimeMessage"
] | import javax.mail.internet.MimeMessage; | import javax.mail.internet.*; | [
"javax.mail"
] | javax.mail; | 2,391,602 |
public AggregateDefinition aggregate(Expression correlationExpression, AggregationStrategy aggregationStrategy) {
AggregateDefinition answer = new AggregateDefinition(correlationExpression, aggregationStrategy);
addOutput(answer);
return answer;
} | AggregateDefinition function(Expression correlationExpression, AggregationStrategy aggregationStrategy) { AggregateDefinition answer = new AggregateDefinition(correlationExpression, aggregationStrategy); addOutput(answer); return answer; } | /**
* <a href="http://camel.apache.org/aggregator.html">Aggregator EIP:</a>
* Creates an aggregator allowing you to combine a number of messages together into a single message.
*
* @param correlationExpression the expression used to calculate the
* correlation key. ... | Creates an aggregator allowing you to combine a number of messages together into a single message | aggregate | {
"repo_name": "grange74/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 152533
} | [
"org.apache.camel.Expression",
"org.apache.camel.processor.aggregate.AggregationStrategy"
] | import org.apache.camel.Expression; import org.apache.camel.processor.aggregate.AggregationStrategy; | import org.apache.camel.*; import org.apache.camel.processor.aggregate.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,797,736 |
static boolean validateConstraint
(
String constraintName,
String constraintText,
TableDescriptor td,
LanguageConnectionContext lcc,
boolean isCheckConstraint
)
throws StandardException
{
StringBuilder checkStmt = new StringBuilder();
checkStmt.append("SELECT COUNT(*) FR... | static boolean validateConstraint ( String constraintName, String constraintText, TableDescriptor td, LanguageConnectionContext lcc, boolean isCheckConstraint ) throws StandardException { StringBuilder checkStmt = new StringBuilder(); checkStmt.append(STR); checkStmt.append(td.getQualifiedName()); checkStmt.append(STR)... | /**
* Evaluate a check constraint or not null column constraint.
* Generate a query of the
* form SELECT COUNT(*) FROM t where NOT(<check constraint>)
* and run it by compiling and executing it. Will
* work ok if the table is empty and query returns null.
*
* @param constraintName constraint name
* ... | Evaluate a check constraint or not null column constraint. Generate a query of the form SELECT COUNT(*) FROM t where NOT() and run it by compiling and executing it. Will work ok if the table is empty and query returns null | validateConstraint | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/execute/ConstraintConstantAction.java",
"license": "apache-2.0",
"size": 15600
} | [
"com.pivotal.gemfirexd.internal.engine.distributed.utils.GemFireXDUtils",
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"com.pivotal.gemfirexd.internal.iapi.reference.SQLState",
"com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager",
"com.pivotal.gemfirexd.internal.iapi.sql.Pre... | import com.pivotal.gemfirexd.internal.engine.distributed.utils.GemFireXDUtils; import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.reference.SQLState; import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager; import com.pivotal.gemfirexd.interna... | import com.pivotal.gemfirexd.internal.engine.distributed.utils.*; import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.reference.*; import com.pivotal.gemfirexd.internal.iapi.services.sanity.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; import com.pivotal.gemfirexd.inter... | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 2,558,410 |
public List<AndesMessageMetadata> getNextNMessageMetadataFromDLC(final String dlcQueueName, long firstMsgId,
int count) throws AndesException {
return MessagingEngine.getInstance().getNextNMessageMetadataFromDLC(dlcQueueName, firstMsgId, count);
} | List<AndesMessageMetadata> function(final String dlcQueueName, long firstMsgId, int count) throws AndesException { return MessagingEngine.getInstance().getNextNMessageMetadataFromDLC(dlcQueueName, firstMsgId, count); } | /**
* Get message metadata in dlc for a given number of messages starting from a specified id.
*
* @param dlcQueueName name of the dead letter channel queue
* @param firstMsgId id of the starting id
* @param count maximum num of messages to return
* @return List of message metadat... | Get message metadata in dlc for a given number of messages starting from a specified id | getNextNMessageMetadataFromDLC | {
"repo_name": "ramith/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/Andes.java",
"license": "apache-2.0",
"size": 35104
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,776,916 |
public static boolean updateObject(Object object) {
boolean result = true;
Transaction transaction = null;
try {
session = HibernateConnection.getSession();
transaction = session.getTransaction();
transaction.begin();
session.update(object);
transaction.commit();
} catch (Exception e) {
e.... | static boolean function(Object object) { boolean result = true; Transaction transaction = null; try { session = HibernateConnection.getSession(); transaction = session.getTransaction(); transaction.begin(); session.update(object); transaction.commit(); } catch (Exception e) { e.printStackTrace(); transaction.rollback()... | /**
* Update object.
*
* @param object
* the object
* @return true, if successful
*/ | Update object | updateObject | {
"repo_name": "Maracars/POPBL5",
"path": "src/domain/dao/HibernateGeneric.java",
"license": "gpl-3.0",
"size": 3455
} | [
"org.hibernate.Transaction"
] | import org.hibernate.Transaction; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 2,151,798 |
@GwtIncompatible // concurrency
public static void awaitUninterruptibly(CountDownLatch latch) {
boolean interrupted = false;
try {
while (true) {
try {
latch.await();
return;
} catch (InterruptedException e) {
interrupted = true;
}
}
} fi... | @GwtIncompatible static void function(CountDownLatch latch) { boolean interrupted = false; try { while (true) { try { latch.await(); return; } catch (InterruptedException e) { interrupted = true; } } } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } /** * Invokes {@code latch.}{@link CountDownLat... | /**
* Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly.
*/ | Invokes latch.<code>CountDownLatch#await() await()</code> uninterruptibly | awaitUninterruptibly | {
"repo_name": "jakubmalek/guava",
"path": "guava/src/com/google/common/util/concurrent/Uninterruptibles.java",
"license": "apache-2.0",
"size": 10685
} | [
"com.google.common.annotations.GwtIncompatible",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit"
] | import com.google.common.annotations.GwtIncompatible; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; | import com.google.common.annotations.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 280,878 |
public static final Result getClusteredTransformationResult( LogChannelInterface log, TransSplitter transSplitter,
Job parentJob ) {
return getClusteredTransformationResult( log, transSplitter, parentJob, false );
} | static final Result function( LogChannelInterface log, TransSplitter transSplitter, Job parentJob ) { return getClusteredTransformationResult( log, transSplitter, parentJob, false ); } | /**
* Gets the clustered transformation result.
*
* @param log the log channel interface
* @param transSplitter the TransSplitter object
* @param parentJob the parent job
* @return the clustered transformation result
*/ | Gets the clustered transformation result | getClusteredTransformationResult | {
"repo_name": "e-cuellar/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199294
} | [
"org.pentaho.di.core.Result",
"org.pentaho.di.core.logging.LogChannelInterface",
"org.pentaho.di.job.Job",
"org.pentaho.di.trans.cluster.TransSplitter"
] | import org.pentaho.di.core.Result; import org.pentaho.di.core.logging.LogChannelInterface; import org.pentaho.di.job.Job; import org.pentaho.di.trans.cluster.TransSplitter; | import org.pentaho.di.core.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.job.*; import org.pentaho.di.trans.cluster.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,093,283 |
@Test
public void testTransformDocRetrieveResp2AuditMsg() {
LogDocRetrieveResultRequestType logMessage = new LogDocRetrieveResultRequestType();
DocRetrieveResponseMessageType docRespMessage = new DocRetrieveResponseMessageType();
AssertionType assertion = new AssertionType();
Re... | void function() { LogDocRetrieveResultRequestType logMessage = new LogDocRetrieveResultRequestType(); DocRetrieveResponseMessageType docRespMessage = new DocRetrieveResponseMessageType(); AssertionType assertion = new AssertionType(); RetrieveDocumentSetResponseType message = new RetrieveDocumentSetResponseType(); Docu... | /**
* Test of transformDocRetrieveResp2AuditMsg method, of class DocumentRetrieveTransforms.
*/ | Test of transformDocRetrieveResp2AuditMsg method, of class DocumentRetrieveTransforms | testTransformDocRetrieveResp2AuditMsg | {
"repo_name": "sailajaa/CONNECT",
"path": "Product/Production/Common/CONNECTCoreLib/src/test/java/gov/hhs/fha/nhinc/transform/audit/DocumentRetrieveTransformsTest.java",
"license": "bsd-3-clause",
"size": 10223
} | [
"com.services.nhinc.schema.auditmessage.AuditMessageType",
"com.services.nhinc.schema.auditmessage.AuditSourceIdentificationType",
"com.services.nhinc.schema.auditmessage.EventIdentificationType",
"com.services.nhinc.schema.auditmessage.ParticipantObjectIdentificationType",
"gov.hhs.fha.nhinc.common.auditlo... | import com.services.nhinc.schema.auditmessage.AuditMessageType; import com.services.nhinc.schema.auditmessage.AuditSourceIdentificationType; import com.services.nhinc.schema.auditmessage.EventIdentificationType; import com.services.nhinc.schema.auditmessage.ParticipantObjectIdentificationType; import gov.hhs.fha.nhinc.... | import com.services.nhinc.schema.auditmessage.*; import gov.hhs.fha.nhinc.common.auditlog.*; import gov.hhs.fha.nhinc.common.nhinccommon.*; import org.junit.*; | [
"com.services.nhinc",
"gov.hhs.fha",
"org.junit"
] | com.services.nhinc; gov.hhs.fha; org.junit; | 335,386 |
public static HttpServletResponse toHttp(final ServletResponse response) {
return (HttpServletResponse) response;
}
| static HttpServletResponse function(final ServletResponse response) { return (HttpServletResponse) response; } | /**
* A convenience method that merely casts the incoming
* <code>ServletResponse</code> to an <code>HttpServletResponse</code>:
* <p/>
* <code>return (HttpServletResponse)response;</code>
* <p/>
* Logic could be changed in the future for logging or throwing an meaningful
* exception in non HTTP re... | A convenience method that merely casts the incoming <code>ServletResponse</code> to an <code>HttpServletResponse</code>: <code>return (HttpServletResponse)response;</code> Logic could be changed in the future for logging or throwing an meaningful exception in non HTTP request environments (e.g. Portlet API) | toHttp | {
"repo_name": "qudh1/focusture",
"path": "frame/src/main/java/cn/hybris/util/WebUtils.java",
"license": "apache-2.0",
"size": 2764
} | [
"javax.servlet.ServletResponse",
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; | import javax.servlet.*; import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,675,513 |
public static LanguageType addNonUniqueCode(LanguageType lt, String code) {
checksPrefixSuffixSpace(code);
if(code.length() > 12) {
System.out.println("Error in LanguageType.addNonUniqueCode(): the language code '"+code+
"' is too long (.length() > 12)!");// zh-class... | static LanguageType function(LanguageType lt, String code) { checksPrefixSuffixSpace(code); if(code.length() > 12) { System.out.println(STR+code+ STR); return null; } if(code2lang.containsKey(code)) { System.out.println(STR+code+ STR); return null; } if(multiple_codes2type.containsKey(code)) { System.out.println(STR+co... | /** Adds one more language code for this language.
*/ | Adds one more language code for this language | addNonUniqueCode | {
"repo_name": "lolocripto/wikokit",
"path": "common_wiki/src/wikokit/base/wikipedia/language/LanguageType.java",
"license": "apache-2.0",
"size": 232076
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,812,646 |
ResourcePoolsBuilder resourcePoolsBuilder = ResourcePoolsBuilder.newResourcePoolsBuilder()
.heap(10000, EntryUnit.ENTRIES)
.disk(1000000, MemoryUnit.MB, false);
ACL_IP_CACHE = apiExposeSpecification.getCacheManager().createCache(Constant.ACL_IP_CHECKER, CacheConfigurationBuilder... | ResourcePoolsBuilder resourcePoolsBuilder = ResourcePoolsBuilder.newResourcePoolsBuilder() .heap(10000, EntryUnit.ENTRIES) .disk(1000000, MemoryUnit.MB, false); ACL_IP_CACHE = apiExposeSpecification.getCacheManager().createCache(Constant.ACL_IP_CHECKER, CacheConfigurationBuilder.newCacheConfigurationBuilder(String.clas... | /**
* Create a cache for the IP_ACL in the node.
*/ | Create a cache for the IP_ACL in the node | afterPropertiesSet | {
"repo_name": "longcoding/undefined-gateway",
"path": "src/main/java/com/longcoding/moon/helpers/AclIpChecker.java",
"license": "mit",
"size": 3002
} | [
"org.ehcache.config.builders.CacheConfigurationBuilder",
"org.ehcache.config.builders.ResourcePoolsBuilder",
"org.ehcache.config.units.EntryUnit",
"org.ehcache.config.units.MemoryUnit"
] | import org.ehcache.config.builders.CacheConfigurationBuilder; import org.ehcache.config.builders.ResourcePoolsBuilder; import org.ehcache.config.units.EntryUnit; import org.ehcache.config.units.MemoryUnit; | import org.ehcache.config.builders.*; import org.ehcache.config.units.*; | [
"org.ehcache.config"
] | org.ehcache.config; | 2,538,304 |
@Override
protected Map<String,Object> referenceData(HttpServletRequest request) throws Exception {
Map<String, Object> model = new HashMap<String, Object>();
List<UserGroup> groups = userGroupService.findAll();
model.put("groups", (groups.size() > 0) ? groups : null);
model.put("officeList", getSystemCodes... | Map<String,Object> function(HttpServletRequest request) throws Exception { Map<String, Object> model = new HashMap<String, Object>(); List<UserGroup> groups = userGroupService.findAll(); model.put(STR, (groups.size() > 0) ? groups : null); model.put(STR, getSystemCodesByCategory(BaseUser.CATEGORY_OFFICE)); return model... | /**
* Overidden to provide usergroup list to page
*/ | Overidden to provide usergroup list to page | referenceData | {
"repo_name": "Letractively/open-tides",
"path": "src/org/opentides/controller/UserController.java",
"license": "apache-2.0",
"size": 3263
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"org.opentides.bean.user.BaseUser",
"org.opentides.bean.user.UserGroup"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.opentides.bean.user.BaseUser; import org.opentides.bean.user.UserGroup; | import java.util.*; import javax.servlet.http.*; import org.opentides.bean.user.*; | [
"java.util",
"javax.servlet",
"org.opentides.bean"
] | java.util; javax.servlet; org.opentides.bean; | 2,087,086 |
public static String readPlainRequest(HttpServletRequest req) throws IOException {
try (BufferedReader br = req.getReader()) {
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null)
sb.append(line);
return... | static String function(HttpServletRequest req) throws IOException { try (BufferedReader br = req.getReader()) { StringBuilder sb = new StringBuilder(); String line; while ((line = br.readLine()) != null) sb.append(line); return sb.toString(); } } | /**
* Read content of the servlet request as plain text (whatever content-type is declared). The charset declared in the request body will be used.
*/ | Read content of the servlet request as plain text (whatever content-type is declared). The charset declared in the request body will be used | readPlainRequest | {
"repo_name": "akapps/rest-toolkit",
"path": "src/test/java/org/akapps/rest/test/utils/ServletUtils.java",
"license": "mit",
"size": 1920
} | [
"java.io.BufferedReader",
"java.io.IOException",
"javax.servlet.http.HttpServletRequest"
] | import java.io.BufferedReader; import java.io.IOException; import javax.servlet.http.HttpServletRequest; | import java.io.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,628,684 |
private boolean upstreamAppHasPartitionInfo(StreamDefinition stream, StreamAppDefinition currentApp,
Map<String, String> streamDeploymentProperties) {
Iterator<StreamAppDefinition> iterator = stream.getDeploymentOrderIterator();
while (iterator.hasNext()) {
StreamAppDefinition app = iterator.next();
if ... | boolean function(StreamDefinition stream, StreamAppDefinition currentApp, Map<String, String> streamDeploymentProperties) { Iterator<StreamAppDefinition> iterator = stream.getDeploymentOrderIterator(); while (iterator.hasNext()) { StreamAppDefinition app = iterator.next(); if (app.equals(currentApp) && iterator.hasNext... | /**
* Return {@code true} if the upstream app (the app that appears before
* the provided app) contains partition related properties.
* @param stream stream for the app
* @param currentApp app for which to determine if the upstream app
* ha... | Return true if the upstream app (the app that appears before the provided app) contains partition related properties | upstreamAppHasPartitionInfo | {
"repo_name": "sabbyanandan/spring-cloud-dataflow",
"path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/StreamDeploymentController.java",
"license": "apache-2.0",
"size": 20811
} | [
"java.util.Iterator",
"java.util.Map",
"org.springframework.cloud.dataflow.core.BindingPropertyKeys",
"org.springframework.cloud.dataflow.core.StreamAppDefinition",
"org.springframework.cloud.dataflow.core.StreamDefinition"
] | import java.util.Iterator; import java.util.Map; import org.springframework.cloud.dataflow.core.BindingPropertyKeys; import org.springframework.cloud.dataflow.core.StreamAppDefinition; import org.springframework.cloud.dataflow.core.StreamDefinition; | import java.util.*; import org.springframework.cloud.dataflow.core.*; | [
"java.util",
"org.springframework.cloud"
] | java.util; org.springframework.cloud; | 1,049,222 |
public static Table createMobTable(final HBaseTestingUtility util,
final TableName tableName, final byte[]... families) throws IOException {
HTableDescriptor htd = new HTableDescriptor(tableName);
for (byte[] family : families) {
HColumnDescriptor hcd = new HColumnDescriptor(family);
// Disa... | static Table function(final HBaseTestingUtility util, final TableName tableName, final byte[]... families) throws IOException { HTableDescriptor htd = new HTableDescriptor(tableName); for (byte[] family : families) { HColumnDescriptor hcd = new HColumnDescriptor(family); hcd.setBloomFilterType(BloomType.NONE); hcd.setM... | /**
* Create a Mob table.
*
* @param util
* @param tableName
* @param families
* @return An HTable instance for the created table.
* @throws IOException
*/ | Create a Mob table | createMobTable | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/MobSnapshotTestingUtils.java",
"license": "apache-2.0",
"size": 5980
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HBaseTestingUtility",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.client.ConnectionFactory",
"org.apache.hadoop.hbase.client.Table",
"org.apache.ha... | import java.io.IOException; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.client.Tabl... | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.regionserver.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 273,309 |
public Certs addClusterCertificate(final String alias, final byte[] cert) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException {
return addClusterCertificate(alias, new ByteArrayInputStream(cert));
} | Certs function(final String alias, final byte[] cert) throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException { return addClusterCertificate(alias, new ByteArrayInputStream(cert)); } | /**
* Helper in case the cluster certificate is already loaded is a byte[]
*
* @param alias The name under which to store the certificate (just pick something sane)
* @param cert The bytes of the certificate
* @return The Certs object for method chaining
*/ | Helper in case the cluster certificate is already loaded is a byte[] | addClusterCertificate | {
"repo_name": "goshawkdb/java-client",
"path": "src/main/java/io/goshawkdb/client/Certs.java",
"license": "apache-2.0",
"size": 11833
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.security.KeyStoreException",
"java.security.NoSuchAlgorithmException",
"java.security.cert.CertificateException"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; | import java.io.*; import java.security.*; import java.security.cert.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 150,866 |
String unlockNodes(String sessionId, Set<String> nodeUrls) throws RestServerException, ServiceException; | String unlockNodes(String sessionId, Set<String> nodeUrls) throws RestServerException, ServiceException; | /**
* Unlock a set of nodes
* @param sessionId current session
* @param nodeUrls nodes to unlock
* @return true upon success
* @throws RestServerException
* @throws ServiceException
*/ | Unlock a set of nodes | unlockNodes | {
"repo_name": "acontes/scheduling_portal",
"path": "src/org/ow2/proactive_grid_cloud_portal/rm/client/RMService.java",
"license": "agpl-3.0",
"size": 9162
} | [
"java.util.Set",
"org.ow2.proactive_grid_cloud_portal.common.shared.RestServerException",
"org.ow2.proactive_grid_cloud_portal.common.shared.ServiceException"
] | import java.util.Set; import org.ow2.proactive_grid_cloud_portal.common.shared.RestServerException; import org.ow2.proactive_grid_cloud_portal.common.shared.ServiceException; | import java.util.*; import org.ow2.proactive_grid_cloud_portal.common.shared.*; | [
"java.util",
"org.ow2.proactive_grid_cloud_portal"
] | java.util; org.ow2.proactive_grid_cloud_portal; | 1,290,629 |
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
Tr.entry(tc, "run");
}
try {
framework.stopChain(chainName, 0L);
} catch (Exception e) {
FFDCFilter.processException(e, getClass().getName() + ".run", "68",
... | if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "run"); } try { framework.stopChain(chainName, 0L); } catch (Exception e) { FFDCFilter.processException(e, getClass().getName() + ".run", "68", this, new Object[] { chainName }); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabl... | /**
* This method will be called when the secondsToWait expires after this task
* has been placed in the channel framework's timer.
*
* @see java.lang.Runnable#run()
*/ | This method will be called when the secondsToWait expires after this task has been placed in the channel framework's timer | run | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.channelfw/src/com/ibm/ws/channelfw/internal/chains/StopChainTask.java",
"license": "epl-1.0",
"size": 2870
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.ffdc.FFDCFilter"
] | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.ffdc.FFDCFilter; | import com.ibm.websphere.ras.*; import com.ibm.ws.ffdc.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 1,028,407 |
private String readFirstLine(File file) {
List<String> lines = null;
try {
lines = IOUtils.readLines(new FileInputStream(file));
} catch (IOException ioe) {
// no exception handling - we just return the empty String
}
return lines != null && lines.size... | String function(File file) { List<String> lines = null; try { lines = IOUtils.readLines(new FileInputStream(file)); } catch (IOException ioe) { } return lines != null && lines.size() > 0 ? lines.get(0) : ""; } | /**
* Reads the first line from specified file
*/ | Reads the first line from specified file | readFirstLine | {
"repo_name": "andiikaa/openhab2",
"path": "addons/io/org.openhab.io.openhabcloud/src/main/java/org/openhab/io/openhabcloud/internal/CloudService.java",
"license": "epl-1.0",
"size": 13915
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.util.List",
"org.apache.commons.io.IOUtils"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.List; import org.apache.commons.io.IOUtils; | import java.io.*; import java.util.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 1,448,973 |
List<String> getActiveProfileIds(); | List<String> getActiveProfileIds(); | /**
* Gets the identifiers of those profiles that should be activated by explicit demand.
*
* @return The identifiers of those profiles to activate, never {@code null}.
*/ | Gets the identifiers of those profiles that should be activated by explicit demand | getActiveProfileIds | {
"repo_name": "rogerchina/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java",
"license": "apache-2.0",
"size": 13022
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 432,194 |
public List<AccountingLineTableTransformation> getPostTablificationTransformations() {
return postTablificationTransformations;
}
| List<AccountingLineTableTransformation> function() { return postTablificationTransformations; } | /**
* Gets the postTablificationTransformations attribute.
*
* @return Returns the postTablificationTransformations.
*/ | Gets the postTablificationTransformations attribute | getPostTablificationTransformations | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/service/impl/AccountingLineRenderingServiceImpl.java",
"license": "apache-2.0",
"size": 20557
} | [
"java.util.List",
"org.kuali.kfs.sys.document.service.AccountingLineTableTransformation"
] | import java.util.List; import org.kuali.kfs.sys.document.service.AccountingLineTableTransformation; | import java.util.*; import org.kuali.kfs.sys.document.service.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,575,671 |
Range<T> span(); | Range<T> span(); | /**
* Returns the minimal range which {@linkplain Range#encloses(Range) encloses} all ranges in this range set.
*
* @return
*/ | Returns the minimal range which Range#encloses(Range) encloses all ranges in this range set | span | {
"repo_name": "massakam/pulsar",
"path": "pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/LongPairRangeSet.java",
"license": "apache-2.0",
"size": 9155
} | [
"com.google.common.collect.Range"
] | import com.google.common.collect.Range; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,248,540 |
public static boolean isEmpty(Object o)
{
if (o==null)
return true;
if (o==NO_VALUE)
throw new InvalidValueException(o);
if ((o instanceof String) && ((String)o).length()==0)
return true;
if ((o instanceof Object[]) && ((Object[])o).length==0)
... | static boolean function(Object o) { if (o==null) return true; if (o==NO_VALUE) throw new InvalidValueException(o); if ((o instanceof String) && ((String)o).length()==0) return true; if ((o instanceof Object[]) && ((Object[])o).length==0) return true; if ((o instanceof Collection<?>) && ((Collection<?>)o).isEmpty()) ret... | /**
* Checks whether an object has no value.
* A Object is empty if and only if the Object is null or if its an empty string.
* @param o the object to check
* @return true if the Object is null or if its an empty string.
*/ | Checks whether an object has no value. A Object is empty if and only if the Object is null or if its an empty string | isEmpty | {
"repo_name": "apache/empire-db",
"path": "empire-db/src/main/java/org/apache/empire/commons/ObjectUtils.java",
"license": "apache-2.0",
"size": 35601
} | [
"java.util.Collection",
"org.apache.empire.exceptions.InvalidValueException"
] | import java.util.Collection; import org.apache.empire.exceptions.InvalidValueException; | import java.util.*; import org.apache.empire.exceptions.*; | [
"java.util",
"org.apache.empire"
] | java.util; org.apache.empire; | 2,819,047 |
public String run(String tag, String containerName, boolean detached, boolean autoRemove,
Map<String, String> env, Map<String, String> ports, Map<String, String> volumes,
List<String> volumesFrom, List<String> links); | String function(String tag, String containerName, boolean detached, boolean autoRemove, Map<String, String> env, Map<String, String> ports, Map<String, String> volumes, List<String> volumesFrom, List<String> links); | /**
* Run the given image in a container with the given name.
*
* @param tag the image to run
* @param containerName the name of the container to create
* @param detached should the container be run in the background (aka detached)
* @param autoRemove should the container be removed when ... | Run the given image in a container with the given name | run | {
"repo_name": "Transmode/gradle-docker",
"path": "src/main/java/se/transmode/gradle/plugins/docker/client/DockerClient.java",
"license": "apache-2.0",
"size": 2412
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 629,379 |
default AbstractLocalDateAssert<?> assertThat(final LocalDate localDate) {
return Assertions.assertThat(localDate);
} | default AbstractLocalDateAssert<?> assertThat(final LocalDate localDate) { return Assertions.assertThat(localDate); } | /**
* Creates a new instance of <code>{@link LocalDateAssert}</code>.
*
* @param localDate the actual value.
* @return the created assertion object.
*/ | Creates a new instance of <code><code>LocalDateAssert</code></code> | assertThat | {
"repo_name": "ChrisA89/assertj-core",
"path": "src/main/java/org/assertj/core/api/WithAssertions.java",
"license": "apache-2.0",
"size": 102131
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 242,348 |
public void removeModifyListener(ModifyListener listener) {
checkWidget();
if (listener == null)
SWT.error(SWT.ERROR_NULL_ARGUMENT);
removeListener(SWT.Modify, listener);
} | void function(ModifyListener listener) { checkWidget(); if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); removeListener(SWT.Modify, listener); } | /**
* Removes the listener from the collection of listeners who will be
* notified when the receiver's text is modified.
*
* @param listener
* the listener which should no longer be notified
* @exception IllegalArgumentException
* <ul>
* <li>ERROR_NULL_ARGUMENT ... | Removes the listener from the collection of listeners who will be notified when the receiver's text is modified | removeModifyListener | {
"repo_name": "xored/q7.quality.mockups",
"path": "plugins/com.xored.q7.quality.mockups.issues/src/com/xored/q7/quality/mockups/issues/parts/internal/VeryCustomCombo.java",
"license": "epl-1.0",
"size": 69643
} | [
"org.eclipse.swt.SWT",
"org.eclipse.swt.events.ModifyListener"
] | import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyListener; | import org.eclipse.swt.*; import org.eclipse.swt.events.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 700,288 |
List<TComputedValuesBean> loadByWorkItemsAndTypesAndPerson(int[] workItemIDs, int computedValueType, Integer person);
| List<TComputedValuesBean> loadByWorkItemsAndTypesAndPerson(int[] workItemIDs, int computedValueType, Integer person); | /**
* Loads a computedValuesBean from the TComputedValues table for workItemIDs, computedValueType and person
* @param workItemIDs
* @param computedValueType
* @param person
* @return
*/ | Loads a computedValuesBean from the TComputedValues table for workItemIDs, computedValueType and person | loadByWorkItemsAndTypesAndPerson | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/dao/ComputedValuesDAO.java",
"license": "gpl-3.0",
"size": 4871
} | [
"com.aurel.track.beans.TComputedValuesBean",
"java.util.List"
] | import com.aurel.track.beans.TComputedValuesBean; import java.util.List; | import com.aurel.track.beans.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 306,757 |
public Object yyparse (yyInput yyLex)
throws java.io.IOException, yyException {
if (yyMax <= 0) yyMax = 256; // initial size
int yyState = 0, yyStates[] = new int[yyMax]; // state stack
Object yyVal = null, yyVals[] = new Object[yyMax]; // value stack
int yyToken = -1; // current input
i... | Object function (yyInput yyLex) throws java.io.IOException, yyException { if (yyMax <= 0) yyMax = 256; int yyState = 0, yyStates[] = new int[yyMax]; Object yyVal = null, yyVals[] = new Object[yyMax]; int yyToken = -1; int yyErrorFlag = 0; yyLoop: for (int yyTop = 0;; ++ yyTop) { if (yyTop >= yyStates.length) { int[] i ... | /** the generated parser.
Maintains a state and a value stack, currently with fixed maximum size.
@param yyLex scanner.
@return result of the last reduction, if any.
@throws yyException on irrecoverable parse error.
*/ | the generated parser | yyparse | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/xml/xpath/XPathParser.java",
"license": "bsd-3-clause",
"size": 54214
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"javax.xml.namespace.QName",
"org.w3c.dom.Node"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.xml.namespace.QName; import org.w3c.dom.Node; | import java.util.*; import javax.xml.namespace.*; import org.w3c.dom.*; | [
"java.util",
"javax.xml",
"org.w3c.dom"
] | java.util; javax.xml; org.w3c.dom; | 667,674 |
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
Object childFeature = feature;
Object childObject = child;
boolean qualify =
childFeature == OclPackage.Literals.COLLECTION_RANGE_CS__FROM ||
childFeature == OclPackage.Literals.COLL... | String function(Object owner, Object feature, Object child, Collection<?> selection) { Object childFeature = feature; Object childObject = child; boolean qualify = childFeature == OclPackage.Literals.COLLECTION_RANGE_CS__FROM childFeature == OclPackage.Literals.COLLECTION_RANGE_CS__TO; if (qualify) { return getString (... | /**
* This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for <code>org.eclipse.emf.edit.command.CreateChildCommand</code>. | getCreateChildText | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.language.ocl.edit/src/org/dresdenocl/language/ocl/provider/CollectionRangeCSItemProvider.java",
"license": "lgpl-3.0",
"size": 16364
} | [
"java.util.Collection",
"org.dresdenocl.language.ocl.OclPackage"
] | import java.util.Collection; import org.dresdenocl.language.ocl.OclPackage; | import java.util.*; import org.dresdenocl.language.ocl.*; | [
"java.util",
"org.dresdenocl.language"
] | java.util; org.dresdenocl.language; | 1,692,628 |
MappingComponent getMap();
}
//~ Inner Classes ----------------------------------------------------------
private final class WFSCall implements WFSCallback {
//~ Methods ------------------------------------------------------------ | MappingComponent getMap(); } private final class WFSCall implements WFSCallback { | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getMap | {
"repo_name": "cismet/cids-custom-crisma-pilot-d",
"path": "src/main/java/de/cismet/cids/custom/crisma/pilotD/worldstate/ShakemapView.java",
"license": "lgpl-3.0",
"size": 34754
} | [
"de.cismet.cismap.commons.gui.MappingComponent"
] | import de.cismet.cismap.commons.gui.MappingComponent; | import de.cismet.cismap.commons.gui.*; | [
"de.cismet.cismap"
] | de.cismet.cismap; | 1,320,493 |
public ColorPalette getSelectedPalette() {
PaletteSample sample = (PaletteSample) this.selector.getSelectedItem();
return sample.getPalette();
} | ColorPalette function() { PaletteSample sample = (PaletteSample) this.selector.getSelectedItem(); return sample.getPalette(); } | /**
* Returns the selected palette.
*
* @return The selected palette.
*/ | Returns the selected palette | getSelectedPalette | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/editor/PaletteChooserPanel.java",
"license": "lgpl-2.1",
"size": 2852
} | [
"org.jfree.chart.plot.ColorPalette"
] | import org.jfree.chart.plot.ColorPalette; | import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 133,313 |
final FudgeContext context = new FudgeContext();
context.getObjectDictionary().addBuilder(ObjectId.class, new ObjectIdFudgeBuilder());
setContext(context);
final ObjectId object = ObjectId.of("A", "B");
assertEncodeDecodeCycle(ObjectId.class, object);
} | final FudgeContext context = new FudgeContext(); context.getObjectDictionary().addBuilder(ObjectId.class, new ObjectIdFudgeBuilder()); setContext(context); final ObjectId object = ObjectId.of("A", "B"); assertEncodeDecodeCycle(ObjectId.class, object); } | /**
* Tests encoding/decoding an object id.
*/ | Tests encoding/decoding an object id | testBuilder | {
"repo_name": "McLeodMoores/starling",
"path": "projects/util/src/test/java/com/opengamma/id/ObjectIdFudgeEncodingTest.java",
"license": "apache-2.0",
"size": 2991
} | [
"org.fudgemsg.FudgeContext"
] | import org.fudgemsg.FudgeContext; | import org.fudgemsg.*; | [
"org.fudgemsg"
] | org.fudgemsg; | 1,160,742 |
@Override
public boolean canHandleDestination(String destination) {
Matcher matcher = DESTINATION_PATTERN.matcher(destination);
return matcher.matches();
} | boolean function(String destination) { Matcher matcher = DESTINATION_PATTERN.matcher(destination); return matcher.matches(); } | /**
* Check if the destination path can be handled by this event handler
*
* @param destination the destination
* @return true if the event handler manage the destination
*/ | Check if the destination path can be handled by this event handler | canHandleDestination | {
"repo_name": "alien4cloud/alien4cloud",
"path": "alien4cloud-rest-api/src/main/java/alien4cloud/rest/deployment/DeploymentEventHandler.java",
"license": "apache-2.0",
"size": 6745
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,515,616 |
private int saveChildren(ReadOnlyList<INode> children,
DataOutputStream out, boolean inSnapshot, Counter counter)
throws IOException {
// Write normal children INode.
out.writeInt(children.size());
int dirNum = 0;
for(INode child : children) {
// print all children fi... | int function(ReadOnlyList<INode> children, DataOutputStream out, boolean inSnapshot, Counter counter) throws IOException { out.writeInt(children.size()); int dirNum = 0; for(INode child : children) { saveINode2Image(child, out, false, referenceMap, counter); if (child.isDirectory()) { dirNum++; } else if (inSnapshot &&... | /**
* Save children INodes.
* @param children The list of children INodes
* @param out The DataOutputStream to write
* @param inSnapshot Whether the parent directory or its ancestor is in
* the deleted list of some snapshot (caused by rename or
* deletio... | Save children INodes | saveChildren | {
"repo_name": "an3m0na/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormat.java",
"license": "apache-2.0",
"size": 54896
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress",
"org.apache.hadoop.hdfs.util.ReadOnlyList"
] | import java.io.DataOutputStream; import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.startupprogress.StartupProgress; import org.apache.hadoop.hdfs.util.ReadOnlyList; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.startupprogress.*; import org.apache.hadoop.hdfs.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 693,279 |
private void emitSubroutine(final Instantiation instant,
final List<Instantiation> worklist, final InsnList newInstructions,
final List<TryCatchBlockNode> newTryCatchBlocks,
final List<LocalVariableNode> newLocalVariables) {
LabelNode duplbl = null;
if (LOGGING) ... | void function(final Instantiation instant, final List<Instantiation> worklist, final InsnList newInstructions, final List<TryCatchBlockNode> newTryCatchBlocks, final List<LocalVariableNode> newLocalVariables) { LabelNode duplbl = null; if (LOGGING) { log(STR); log(STR + instant.subroutine); } for (int i = 0, c = instru... | /**
* Emits one instantiation of one subroutine, specified by
* <code>instant</code>. May add new instantiations that are invoked by this
* one to the <code>worklist</code> parameter, and new try/catch blocks to
* <code>newTryCatchBlocks</code>.
*
* @param instant
* the in... | Emits one instantiation of one subroutine, specified by <code>instant</code>. May add new instantiations that are invoked by this one to the <code>worklist</code> parameter, and new try/catch blocks to <code>newTryCatchBlocks</code> | emitSubroutine | {
"repo_name": "FFY00/deobfuscator",
"path": "src/main/java/com/javadeobfuscator/deobfuscator/org/objectweb/asm/commons/JSRInlinerAdapter.java",
"license": "apache-2.0",
"size": 31946
} | [
"com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.AbstractInsnNode",
"com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.InsnList",
"com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.InsnNode",
"com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.JumpInsnNode",
"com.javadeobfuscato... | import com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.AbstractInsnNode; import com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.InsnList; import com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.InsnNode; import com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.JumpInsnNode; import com.j... | import com.javadeobfuscator.deobfuscator.org.objectweb.asm.tree.*; import java.util.*; | [
"com.javadeobfuscator.deobfuscator",
"java.util"
] | com.javadeobfuscator.deobfuscator; java.util; | 1,200,193 |
public static void setSignature(Assertion assertion, String signatureAlgorithm, String digestAlgorithm,
X509Credential cred) throws IdentitySAML2QueryException {
try {
doSetSignature(assertion, signatureAlgorithm, digestAlgorithm, cred);
} catch (Iden... | static void function(Assertion assertion, String signatureAlgorithm, String digestAlgorithm, X509Credential cred) throws IdentitySAML2QueryException { try { doSetSignature(assertion, signatureAlgorithm, digestAlgorithm, cred); } catch (IdentityException e) { log.error(STR+assertion.getID(),e); throw new IdentitySAML2Qu... | /**
* This method is used to set signature to a assertion
*
* @param assertion created assertion need to sign
* @param signatureAlgorithm signature algorithm
* @param digestAlgorithm cryptographic hash algorithm
* @param cred X509Credential instance
* @throws... | This method is used to set signature to a assertion | setSignature | {
"repo_name": "wso2-extensions/identity-inbound-auth-saml",
"path": "components/org.wso2.carbon.identity.query.saml/src/main/java/org/wso2/carbon/identity/query/saml/util/OpenSAML3Util.java",
"license": "apache-2.0",
"size": 17022
} | [
"org.opensaml.saml.saml2.core.Assertion",
"org.opensaml.security.x509.X509Credential",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.identity.query.saml.exception.IdentitySAML2QueryException"
] | import org.opensaml.saml.saml2.core.Assertion; import org.opensaml.security.x509.X509Credential; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.query.saml.exception.IdentitySAML2QueryException; | import org.opensaml.saml.saml2.core.*; import org.opensaml.security.x509.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.query.saml.exception.*; | [
"org.opensaml.saml",
"org.opensaml.security",
"org.wso2.carbon"
] | org.opensaml.saml; org.opensaml.security; org.wso2.carbon; | 1,463,346 |
@Override
public void close() throws IOException {
if (!closed) {
try {
if (!eof && state != CHUNK_INVALID) {
// read and discard the remainder of the message
final byte buff[] = new byte[BUFFER_SIZE];
while (read(buff) >= 0) {
}
}
} finally {
eof = true;
closed = true;
... | void function() throws IOException { if (!closed) { try { if (!eof && state != CHUNK_INVALID) { final byte buff[] = new byte[BUFFER_SIZE]; while (read(buff) >= 0) { } } } finally { eof = true; closed = true; } } } | /**
* Upon close, this reads the remainder of the chunked message,
* leaving the underlying socket at a position to start reading the
* next response without scanning.
* @throws IOException in case of an I/O error
*/ | Upon close, this reads the remainder of the chunked message, leaving the underlying socket at a position to start reading the next response without scanning | close | {
"repo_name": "reon-io/sdk",
"path": "reon-api-java/src/main/java/io/reon/http/ChunkedInputStream.java",
"license": "apache-2.0",
"size": 7324
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 521,696 |
protected void ensureClusterStateConsistency() throws IOException {
if (cluster() != null) {
ClusterState masterClusterState = client().admin().cluster().prepareState().all().get().getState();
byte[] masterClusterStateBytes = ClusterState.Builder.toBytes(masterClusterState);
... | void function() throws IOException { if (cluster() != null) { ClusterState masterClusterState = client().admin().cluster().prepareState().all().get().getState(); byte[] masterClusterStateBytes = ClusterState.Builder.toBytes(masterClusterState); masterClusterState = ClusterState.Builder.fromBytes(masterClusterStateBytes... | /**
* Verifies that all nodes that have the same version of the cluster state as master have same cluster state
*/ | Verifies that all nodes that have the same version of the cluster state as master have same cluster state | ensureClusterStateConsistency | {
"repo_name": "xuzha/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 97056
} | [
"java.io.IOException",
"java.util.Map",
"org.elasticsearch.client.Client",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.test.XContentTestUtils"
] | import java.io.IOException; import java.util.Map; import org.elasticsearch.client.Client; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.test.XContentTestUtils; | import java.io.*; import java.util.*; import org.elasticsearch.client.*; import org.elasticsearch.cluster.*; import org.elasticsearch.test.*; | [
"java.io",
"java.util",
"org.elasticsearch.client",
"org.elasticsearch.cluster",
"org.elasticsearch.test"
] | java.io; java.util; org.elasticsearch.client; org.elasticsearch.cluster; org.elasticsearch.test; | 1,479,749 |
private void readObject(ObjectInputStream s) {
try {
s.defaultReadObject();
} catch (Exception e) {
throw new IOFailure("Unexpected error during deserialization", e);
}
log = LogFactory.getLog(getClass().getName());
} | void function(ObjectInputStream s) { try { s.defaultReadObject(); } catch (Exception e) { throw new IOFailure(STR, e); } log = LogFactory.getLog(getClass().getName()); } | /**
* Invoke default method for deserializing object, and reinitialise the
* logger.
* @param s the ObjectInputStream from which the object is read
*/ | Invoke default method for deserializing object, and reinitialise the logger | readObject | {
"repo_name": "netarchivesuite/netarchivesuite-svngit-migration",
"path": "src/dk/netarkivet/common/utils/batch/FileListJob.java",
"license": "lgpl-2.1",
"size": 3899
} | [
"dk.netarkivet.common.exceptions.IOFailure",
"java.io.ObjectInputStream",
"org.apache.commons.logging.LogFactory"
] | import dk.netarkivet.common.exceptions.IOFailure; import java.io.ObjectInputStream; import org.apache.commons.logging.LogFactory; | import dk.netarkivet.common.exceptions.*; import java.io.*; import org.apache.commons.logging.*; | [
"dk.netarkivet.common",
"java.io",
"org.apache.commons"
] | dk.netarkivet.common; java.io; org.apache.commons; | 1,729,678 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(CvlPackage.Literals.REPLACEMENT_FRAGMENT_TYPE__REPLACEMENT_BOUNDARY_ELEMENT,
Cvl... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (CvlPackage.Literals.REPLACEMENT_FRAGMENT_TYPE__REPLACEMENT_BOUNDARY_ELEMENT, CvlFactory.eINSTANCE.createToReplacement())); newChildDescript... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "diverse-project/kcvl",
"path": "fr.inria.diverse.kcvl.metamodel.edit/src/main/java/org/omg/CVLMetamodelMaster/cvl/provider/ReplacementFragmentTypeItemProvider.java",
"license": "epl-1.0",
"size": 4951
} | [
"java.util.Collection",
"org.omg.CVLMetamodelMaster"
] | import java.util.Collection; import org.omg.CVLMetamodelMaster; | import java.util.*; import org.omg.*; | [
"java.util",
"org.omg"
] | java.util; org.omg; | 1,256,664 |
OdeSystem getOdeSystem(); | OdeSystem getOdeSystem(); | /**
* Returns ODE system which is used for the simulation
*
* @return ODE system
*/ | Returns ODE system which is used for the simulation | getOdeSystem | {
"repo_name": "VojtechBruza/parasim",
"path": "extensions/computation-simulation-api/src/main/java/org/sybila/parasim/computation/simulation/api/Configuration.java",
"license": "gpl-3.0",
"size": 2229
} | [
"org.sybila.parasim.model.ode.OdeSystem"
] | import org.sybila.parasim.model.ode.OdeSystem; | import org.sybila.parasim.model.ode.*; | [
"org.sybila.parasim"
] | org.sybila.parasim; | 1,611,075 |
public static boolean isFixed(ItemStack itemstack){
fixTags(itemstack);
return itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag("compressedtooldata").getBoolean("fixed");
} | static boolean function(ItemStack itemstack){ fixTags(itemstack); return itemstack.writeToNBT(new NBTTagCompound()).getCompoundTag("tag").getCompoundTag(STR).getBoolean("fixed"); } | /**
* Getter for mode fixation
* @param itemstack = itemstack that we are checking
* @return is current mode fixed
*/ | Getter for mode fixation | isFixed | {
"repo_name": "elix-x/toolscompressor",
"path": "src/main/java/code/elix_x/mods/toolscompressor/items/ItemCompressedTools.java",
"license": "lgpl-3.0",
"size": 48122
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.item.*; import net.minecraft.nbt.*; | [
"net.minecraft.item",
"net.minecraft.nbt"
] | net.minecraft.item; net.minecraft.nbt; | 1,654,434 |
public void attackEntityWithRangedAttack(EntityLivingBase target, float distanceFactor)
{
EntitySnowball entitysnowball = new EntitySnowball(this.worldObj, this);
double d0 = target.posY + (double)target.getEyeHeight() - 1.100000023841858D;
double d1 = target.posX - this.posX;
do... | void function(EntityLivingBase target, float distanceFactor) { EntitySnowball entitysnowball = new EntitySnowball(this.worldObj, this); double d0 = target.posY + (double)target.getEyeHeight() - 1.100000023841858D; double d1 = target.posX - this.posX; double d2 = d0 - entitysnowball.posY; double d3 = target.posZ - this.... | /**
* Attack the specified entity using a ranged attack.
*
* @param distanceFactor How far the target is, normalized and clamped between 0.1 and 1.0
*/ | Attack the specified entity using a ranged attack | attackEntityWithRangedAttack | {
"repo_name": "EPIICTHUNDERCAT/TameableMobs",
"path": "src/main/java/com/github/epiicthundercat/tameablemobs/mobs/TameableSnowman.java",
"license": "mit",
"size": 35195
} | [
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.entity.projectile.EntitySnowball",
"net.minecraft.init.SoundEvents",
"net.minecraft.util.math.MathHelper"
] | import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.init.SoundEvents; import net.minecraft.util.math.MathHelper; | import net.minecraft.entity.*; import net.minecraft.entity.projectile.*; import net.minecraft.init.*; import net.minecraft.util.math.*; | [
"net.minecraft.entity",
"net.minecraft.init",
"net.minecraft.util"
] | net.minecraft.entity; net.minecraft.init; net.minecraft.util; | 2,756,378 |
public static void scrollNodeIntoView(WebContents webContents, String nodeId)
throws InterruptedException, TimeoutException {
scrollNodeIntoViewByJs(webContents, "document.getElementById('" + nodeId + "')");
} | static void function(WebContents webContents, String nodeId) throws InterruptedException, TimeoutException { scrollNodeIntoViewByJs(webContents, STR + nodeId + "')"); } | /**
* Scrolls the view to ensure that the required DOM node is visible.
* @param webContents The WebContents in which the node lives.
* @param nodeId The id of the node.
*/ | Scrolls the view to ensure that the required DOM node is visible | scrollNodeIntoView | {
"repo_name": "wuhengzhi/chromium-crosswalk",
"path": "content/public/test/android/javatests/src/org/chromium/content/browser/test/util/DOMUtils.java",
"license": "bsd-3-clause",
"size": 22347
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.content_public.browser.WebContents"
] | import java.util.concurrent.TimeoutException; import org.chromium.content_public.browser.WebContents; | import java.util.concurrent.*; import org.chromium.content_public.browser.*; | [
"java.util",
"org.chromium.content_public"
] | java.util; org.chromium.content_public; | 2,255,960 |
public boolean checkAnswer(int answer) {
MathProblemType operator = currentProblem.getProblemType();
int[] nbrs = currentProblem.getNumbers();
boolean correctAnswer = answer == operator.getResult(nbrs);
if (correctAnswer) {
completedProblemsInARow++;
} else {
completedProblemsInARow = 0;
}
set... | boolean function(int answer) { MathProblemType operator = currentProblem.getProblemType(); int[] nbrs = currentProblem.getNumbers(); boolean correctAnswer = answer == operator.getResult(nbrs); if (correctAnswer) { completedProblemsInARow++; } else { completedProblemsInARow = 0; } setDifficulty(); return correctAnswer; ... | /**
* Checks if the user has answered the current problem correctly.
*
* @param answer
* The Users Answer
* @return If it was correct or not
*/ | Checks if the user has answered the current problem correctly | checkAnswer | {
"repo_name": "abjugard/DAT255-EpiClock",
"path": "src/edu/chalmers/dat255/group09/Alarmed/modules/mathModule/controller/MathController.java",
"license": "apache-2.0",
"size": 3771
} | [
"edu.chalmers.dat255.group09.Alarmed"
] | import edu.chalmers.dat255.group09.Alarmed; | import edu.chalmers.dat255.group09.*; | [
"edu.chalmers.dat255"
] | edu.chalmers.dat255; | 716,046 |
public static List<Movie> readMovies(Context context, long channelId) {
return getList(context, Movie.class, PREFS_SUBSCRIBED_MOVIES_PREFIX + channelId);
} | static List<Movie> function(Context context, long channelId) { return getList(context, Movie.class, PREFS_SUBSCRIBED_MOVIES_PREFIX + channelId); } | /**
* Reads the {@link List<Movie>} from {@link SharedPreferences} for a given channel.
*
* @param context used for getting an instance of shared preferences.
* @param channelId of the channel that the movies are associated with.
* @return a list of movies or an empty list if none exist.
*... | Reads the <code>List</code> from <code>SharedPreferences</code> for a given channel | readMovies | {
"repo_name": "googlecodelabs/tv-recommendations",
"path": "5-opt-in-channels/src/main/java/com/example/android/tv/recommendations/util/SharedPreferencesHelper.java",
"license": "apache-2.0",
"size": 6083
} | [
"android.content.Context",
"com.example.android.tv.recommendations.model.Movie",
"java.util.List"
] | import android.content.Context; import com.example.android.tv.recommendations.model.Movie; import java.util.List; | import android.content.*; import com.example.android.tv.recommendations.model.*; import java.util.*; | [
"android.content",
"com.example.android",
"java.util"
] | android.content; com.example.android; java.util; | 795,102 |
private ArrowBuf allocateTemporaryBuffer(int size) {
return parentColumnReader.parentReader.getOperatorContext().getAllocator().buffer(size);
} | ArrowBuf function(int size) { return parentColumnReader.parentReader.getOperatorContext().getAllocator().buffer(size); } | /**
* Allocate a buffer which the user should release immediately. The reader does not manage release of these buffers.
*/ | Allocate a buffer which the user should release immediately. The reader does not manage release of these buffers | allocateTemporaryBuffer | {
"repo_name": "dremio/dremio-oss",
"path": "sabot/kernel/src/main/java/com/dremio/exec/store/parquet/columnreaders/PageReader.java",
"license": "apache-2.0",
"size": 18225
} | [
"org.apache.arrow.memory.ArrowBuf"
] | import org.apache.arrow.memory.ArrowBuf; | import org.apache.arrow.memory.*; | [
"org.apache.arrow"
] | org.apache.arrow; | 1,458,853 |
// TODO how to handle this more efficiently
public List<SignupMeetingWrapper> getAllSignupMeetings() {
try {
loadMeetings(VIEW_ALL, null);
} catch (Exception e) {
log.error(Utilities.rb.getString("failed.fetch_allEvents_from_db") + " - " + e.getMessage());
Utilities.addErrorMessage(Utilities.rb.g... | List<SignupMeetingWrapper> function() { try { loadMeetings(VIEW_ALL, null); } catch (Exception e) { log.error(Utilities.rb.getString(STR) + STR + e.getMessage()); Utilities.addErrorMessage(Utilities.rb.getString(STR)); } return signupMeetings; } | /**
* This is a getter method for UI and returns all signup meetings. Ignores any filters.
*
* @return a list of SignupMeetingWrapper objects.
*/ | This is a getter method for UI and returns all signup meetings. Ignores any filters | getAllSignupMeetings | {
"repo_name": "hackbuteer59/sakai",
"path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/SignupMeetingsBean.java",
"license": "apache-2.0",
"size": 34780
} | [
"java.util.List",
"org.sakaiproject.signup.tool.util.Utilities"
] | import java.util.List; import org.sakaiproject.signup.tool.util.Utilities; | import java.util.*; import org.sakaiproject.signup.tool.util.*; | [
"java.util",
"org.sakaiproject.signup"
] | java.util; org.sakaiproject.signup; | 328,551 |
private void injectAllOpenablesForPackageFragment(
IPackageFragment packFrag,
ArrayList openables) {
try {
IPackageFragmentRoot root = (IPackageFragmentRoot) packFrag.getParent();
int kind = root.getKind();
if (kind != 0) {
boolean isSourcePackageFragment = (kind == IPackageFragmentRoot.K_SOURCE)... | void function( IPackageFragment packFrag, ArrayList openables) { try { IPackageFragmentRoot root = (IPackageFragmentRoot) packFrag.getParent(); int kind = root.getKind(); if (kind != 0) { boolean isSourcePackageFragment = (kind == IPackageFragmentRoot.K_SOURCE); if (isSourcePackageFragment) { ICompilationUnit[] cus = p... | /**
* Adds all of the openables defined within this package fragment to the
* list.
*/ | Adds all of the openables defined within this package fragment to the list | injectAllOpenablesForPackageFragment | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.core/src/org/eclipse/jdt/internal/core/hierarchy/RegionBasedHierarchyBuilder.java",
"license": "epl-1.0",
"size": 7066
} | [
"java.util.ArrayList",
"org.eclipse.jdt.core.ICompilationUnit",
"org.eclipse.jdt.core.IOrdinaryClassFile",
"org.eclipse.jdt.core.IPackageFragment",
"org.eclipse.jdt.core.IPackageFragmentRoot",
"org.eclipse.jdt.core.JavaModelException"
] | import java.util.ArrayList; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.IOrdinaryClassFile; import org.eclipse.jdt.core.IPackageFragment; import org.eclipse.jdt.core.IPackageFragmentRoot; import org.eclipse.jdt.core.JavaModelException; | import java.util.*; import org.eclipse.jdt.core.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 532,116 |
public java.lang.String getAdditionalDataComponent() {
FormDefinitionViewerOutDto outputDto = ((FormDefinitionViewerComponent) getComponent()).getFormDefinitionViewerOutDto();
return outputDto != null ? outputDto.getAdditionalDataComponent() : null;
} | java.lang.String function() { FormDefinitionViewerOutDto outputDto = ((FormDefinitionViewerComponent) getComponent()).getFormDefinitionViewerOutDto(); return outputDto != null ? outputDto.getAdditionalDataComponent() : null; } | /** Getter for property additionalDataComponent.
* @return Value of property additionalDataComponent.
*/ | Getter for property additionalDataComponent | getAdditionalDataComponent | {
"repo_name": "snavaneethan1/jaffa-framework",
"path": "jaffa-components-printing/source/java/org/jaffa/modules/printing/components/formdefinitionviewer/ui/FormDefinitionViewerForm.java",
"license": "gpl-3.0",
"size": 8199
} | [
"org.jaffa.modules.printing.components.formdefinitionviewer.dto.FormDefinitionViewerOutDto"
] | import org.jaffa.modules.printing.components.formdefinitionviewer.dto.FormDefinitionViewerOutDto; | import org.jaffa.modules.printing.components.formdefinitionviewer.dto.*; | [
"org.jaffa.modules"
] | org.jaffa.modules; | 931,175 |
public VoltTable mutateTable(VoltTable table, boolean allowIdenty) {
int totalMutations = 0;
int columnDrops;
int columnAdds;
int columnGrows;
int[] pkeyIndexes = table.m_extraMetadata.pkeyIndexes.clone();
int partitionColIndex = table.m_extraMetadata.partitionColInd... | VoltTable function(VoltTable table, boolean allowIdenty) { int totalMutations = 0; int columnDrops; int columnAdds; int columnGrows; int[] pkeyIndexes = table.m_extraMetadata.pkeyIndexes.clone(); int partitionColIndex = table.m_extraMetadata.partitionColIndex; do { columnDrops = Math.min((int) (Math.abs(m_rand.nextGaus... | /**
* Given a VoltTable with schema metadata, return a new VoltTable with schema
* metadata that had been changed slightly.
*
* Four kinds of changes will be aplied:
* 1. Dropping columns.
* 2. Adding columns.
* 3. Widening columns.
* 4. Re-ordering columns.
*/ | Given a VoltTable with schema metadata, return a new VoltTable with schema metadata that had been changed slightly. Four kinds of changes will be aplied: 1. Dropping columns. 2. Adding columns. 3. Widening columns. 4. Re-ordering columns | mutateTable | {
"repo_name": "deerwalk/voltdb",
"path": "src/frontend/org/voltdb/TableHelper.java",
"license": "agpl-3.0",
"size": 62713
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 173,051 |
public void setRefHLAPI(
PlaceNodeHLAPI elem){
if(elem!=null)
item.setRef((PlaceNode)elem.getContainedItem());
}
| void function( PlaceNodeHLAPI elem){ if(elem!=null) item.setRef((PlaceNode)elem.getContainedItem()); } | /**
* set Ref
*/ | set Ref | setRefHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/hlapi/RefPlaceHLAPI.java",
"license": "epl-1.0",
"size": 12993
} | [
"fr.lip6.move.pnml.symmetricnet.hlcorestructure.PlaceNode"
] | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.PlaceNode; | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 763,666 |
@Test
public void testCanDeleteAllocationPerc() {
Order order = new Order();
order.allocationPercentual=1.0f;
order.completePercentual=0.0f;
assertFalse(order.canDelete());
}
| void function() { Order order = new Order(); order.allocationPercentual=1.0f; order.completePercentual=0.0f; assertFalse(order.canDelete()); } | /**
* Test can't delete because allocation percentual
* greater than 0
*/ | Test can't delete because allocation percentual greater than 0 | testCanDeleteAllocationPerc | {
"repo_name": "Aula13/A-WMS",
"path": "test/org/wms/model/order/OrderUnitTest.java",
"license": "cc0-1.0",
"size": 10463
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,467,866 |
public SDVariable getOutput(){
return y;
} | SDVariable function(){ return y; } | /**
* Get y, the output of the cell for all time steps.
*
* Shape depends on data format (in layer config):<br>
* TNS -> [timeSteps, batchSize, numUnits]<br>
* NST -> [batchSize, numUnits, timeSteps]<br>
* NTS -> [batchSize, timeSteps, numUnits]<br>
*/ | Get y, the output of the cell for all time steps. Shape depends on data format (in layer config): TNS -> [timeSteps, batchSize, numUnits] NST -> [batchSize, numUnits, timeSteps] NTS -> [batchSize, timeSteps, numUnits] | getOutput | {
"repo_name": "RobAltena/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/recurrent/outputs/LSTMLayerOutputs.java",
"license": "apache-2.0",
"size": 5426
} | [
"org.nd4j.autodiff.samediff.SDVariable"
] | import org.nd4j.autodiff.samediff.SDVariable; | import org.nd4j.autodiff.samediff.*; | [
"org.nd4j.autodiff"
] | org.nd4j.autodiff; | 635,972 |
public Color getHealthyColor(){
return healthyColor;
}
| Color function(){ return healthyColor; } | /**
* This method returns the color of healthy trees
* @return the color of healthy trees
*/ | This method returns the color of healthy trees | getHealthyColor | {
"repo_name": "SOCR/HTML5_WebSite",
"path": "SOCR2.8/src/edu/uah/math/devices/Forest.java",
"license": "lgpl-3.0",
"size": 12896
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,400,159 |
public List<SubResource> applicationSecurityGroups() {
return this.applicationSecurityGroups;
} | List<SubResource> function() { return this.applicationSecurityGroups; } | /**
* Get the applicationSecurityGroups property: Specifies an array of references to application security group.
*
* @return the applicationSecurityGroups value.
*/ | Get the applicationSecurityGroups property: Specifies an array of references to application security group | applicationSecurityGroups | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIpConfigurationProperties.java",
"license": "mit",
"size": 9775
} | [
"com.azure.core.management.SubResource",
"java.util.List"
] | import com.azure.core.management.SubResource; import java.util.List; | import com.azure.core.management.*; import java.util.*; | [
"com.azure.core",
"java.util"
] | com.azure.core; java.util; | 598,537 |
@RequiresPermission(permission.CAMERA)
public boolean hasCameraWithLensFacing(@CameraSelector.LensFacing int lensFacing) {
return mCameraModule.hasCameraWithLensFacing(lensFacing);
} | @RequiresPermission(permission.CAMERA) boolean function(@CameraSelector.LensFacing int lensFacing) { return mCameraModule.hasCameraWithLensFacing(lensFacing); } | /**
* Queries whether the current device has a camera with the specified direction.
*
* @return True if the device supports the direction.
* @throws IllegalStateException if the CAMERA permission is not currently granted.
*/ | Queries whether the current device has a camera with the specified direction | hasCameraWithLensFacing | {
"repo_name": "WhisperSystems/TextSecure",
"path": "app/src/main/java/androidx/camera/view/SignalCameraView.java",
"license": "gpl-3.0",
"size": 27646
} | [
"androidx.annotation.RequiresPermission",
"androidx.camera.core.CameraSelector"
] | import androidx.annotation.RequiresPermission; import androidx.camera.core.CameraSelector; | import androidx.annotation.*; import androidx.camera.core.*; | [
"androidx.annotation",
"androidx.camera"
] | androidx.annotation; androidx.camera; | 2,089,138 |
@WrapToScript
public Session createSession(IFile modelFile) throws InvocationTargetException, InterruptedException {
SiriusSessionCreationOperation operation = new SiriusSessionCreationOperation(modelFile);
operation.run(new NullProgressMonitor());
Session siriusSession = operation.getCreatedSession();
... | Session function(IFile modelFile) throws InvocationTargetException, InterruptedException { SiriusSessionCreationOperation operation = new SiriusSessionCreationOperation(modelFile); operation.run(new NullProgressMonitor()); Session siriusSession = operation.getCreatedSession(); DAnalysis root = (DAnalysis) siriusSession... | /**
* Create a Sirius {@link Session} for the provided model file. It uses the first available {@link Viewpoint} that
* can be applied to the model file and applies it. If <code>initialization</code> is set to <code>true</code> in
* the representation definition, then Sirius will create automatically.
* @... | Create a Sirius <code>Session</code> for the provided model file. It uses the first available <code>Viewpoint</code> that can be applied to the model file and applies it. If <code>initialization</code> is set to <code>true</code> in the representation definition, then Sirius will create automatically | createSession | {
"repo_name": "alainbernard/ease-sirius",
"path": "org.eclipse.sirius.ease/src/org/eclipse/sirius/ease/SiriusModule.java",
"license": "epl-1.0",
"size": 13827
} | [
"java.lang.reflect.InvocationTargetException",
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.NullProgressMonitor",
"org.eclipse.sirius.business.api.session.Session",
"org.eclipse.sirius.ui.business.api.dialect.DialectUIManager",
"org.eclipse.sirius.viewpoint.DAnalysis",
"org.eclipse.siri... | import java.lang.reflect.InvocationTargetException; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.sirius.business.api.session.Session; import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; import org.eclipse.sirius.viewpoint.DAnalysis; imp... | import java.lang.reflect.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.sirius.business.api.session.*; import org.eclipse.sirius.ui.business.api.dialect.*; import org.eclipse.sirius.viewpoint.*; | [
"java.lang",
"org.eclipse.core",
"org.eclipse.sirius"
] | java.lang; org.eclipse.core; org.eclipse.sirius; | 1,714,859 |
public void setUser(CmsUser user) {
m_user = user;
} | void function(CmsUser user) { m_user = user; } | /**
* Sets the user to check the visited resources for.<p>
*
* @param user the user to check the visited resources for
*/ | Sets the user to check the visited resources for | setUser | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/db/CmsVisitedByFilter.java",
"license": "lgpl-2.1",
"size": 7332
} | [
"org.opencms.file.CmsUser"
] | import org.opencms.file.CmsUser; | import org.opencms.file.*; | [
"org.opencms.file"
] | org.opencms.file; | 990,785 |
@Nonnull
public EducationClassDeltaCollectionRequest orderBy(@Nonnull final String value) {
addOrderByOption(value);
return this;
} | EducationClassDeltaCollectionRequest function(@Nonnull final String value) { addOrderByOption(value); return this; } | /**
* Sets the order by clause for the request
*
* @param value the order by clause
* @return the updated request
*/ | Sets the order by clause for the request | orderBy | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/EducationClassDeltaCollectionRequest.java",
"license": "mit",
"size": 5420
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,206,435 |
public IScope scope_MOperatingSystem(final MSwPackage swp, EReference reference)
{
Collection <MCommonPackageElement> elements = null;
final List<MCommonPackage> imports = ((MCommonPackageFile)swp.eContainer()).getImports();
try {
elements = PDLLibraryManager.getLibraryManager().
getElementsOfClas... | IScope function(final MSwPackage swp, EReference reference) { Collection <MCommonPackageElement> elements = null; final List<MCommonPackage> imports = ((MCommonPackageFile)swp.eContainer()).getImports(); try { elements = PDLLibraryManager.getLibraryManager(). getElementsOfClass(imports, reference.getEReferenceType()); ... | /**
* Provides the scope with the list of operating systems that can be
* included in the definition of a software package. This list includes
* the OSs present in the PDL packages imported by the software package.
*
* @param swp the software package.
* @param reference the object representing the referen... | Provides the scope with the list of operating systems that can be included in the definition of a software package. This list includes the OSs present in the PDL packages imported by the software package | scope_MOperatingSystem | {
"repo_name": "parraman/micobs",
"path": "mesp/es.uah.aut.srg.micobs.mesp.editor.swp/src/es/uah/aut/srg/micobs/mesp/lang/scoping/SWPScopeProvider.java",
"license": "epl-1.0",
"size": 45945
} | [
"es.uah.aut.srg.micobs.common.MCommonPackage",
"es.uah.aut.srg.micobs.common.MCommonPackageElement",
"es.uah.aut.srg.micobs.common.MCommonPackageFile",
"es.uah.aut.srg.micobs.library.LibraryManagerException",
"es.uah.aut.srg.micobs.mesp.mespswp.MSwPackage",
"es.uah.aut.srg.micobs.pdl.library.pdllibrary.ma... | import es.uah.aut.srg.micobs.common.MCommonPackage; import es.uah.aut.srg.micobs.common.MCommonPackageElement; import es.uah.aut.srg.micobs.common.MCommonPackageFile; import es.uah.aut.srg.micobs.library.LibraryManagerException; import es.uah.aut.srg.micobs.mesp.mespswp.MSwPackage; import es.uah.aut.srg.micobs.pdl.libr... | import es.uah.aut.srg.micobs.common.*; import es.uah.aut.srg.micobs.library.*; import es.uah.aut.srg.micobs.mesp.mespswp.*; import es.uah.aut.srg.micobs.pdl.library.pdllibrary.manager.*; import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.scoping.*; | [
"es.uah.aut",
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | es.uah.aut; java.util; org.eclipse.emf; org.eclipse.xtext; | 2,320,478 |
protected RexNode encodeValue(RexNode value, RelDataType decimalType) {
return encodeValue(value, decimalType, false);
} | RexNode function(RexNode value, RelDataType decimalType) { return encodeValue(value, decimalType, false); } | /**
* Casts a decimal's integer representation to a decimal node. If the
* expression is not the expected integer type, then it is casted first.
*
* <p>This method does not request an overflow check.
*
* @param value integer representation of decimal
* @param decimalType type in... | Casts a decimal's integer representation to a decimal node. If the expression is not the expected integer type, then it is casted first. This method does not request an overflow check | encodeValue | {
"repo_name": "wanglan/calcite",
"path": "core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java",
"license": "apache-2.0",
"size": 44026
} | [
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rex.RexNode"
] | import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rex.RexNode; | import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,464,554 |
@JsonIgnore
public CompletableFuture<V> getFutureResult() {
if (operationResult instanceof Dormant)
((Dormant) operationResult).wakeUp();
return operationResult;
} | CompletableFuture<V> function() { if (operationResult instanceof Dormant) ((Dormant) operationResult).wakeUp(); return operationResult; } | /**
* Returns the future result of the async operation
*/ | Returns the future result of the async operation | getFutureResult | {
"repo_name": "davebarnes97/geode",
"path": "geode-management/src/main/java/org/apache/geode/management/api/ClusterManagementOperationResult.java",
"license": "apache-2.0",
"size": 4394
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.geode.management.internal.Dormant"
] | import java.util.concurrent.CompletableFuture; import org.apache.geode.management.internal.Dormant; | import java.util.concurrent.*; import org.apache.geode.management.internal.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 530,876 |
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
buttonGroup1 = new javax.swing.ButtonGroup();
jPanel1 = new javax.swing.JPanel();
panelHaut = new javax.swi... | void function() { java.awt.GridBagConstraints gridBagConstraints; buttonGroup1 = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); panelHaut = new javax.swing.JPanel(); panelMarges = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.sw... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "brunetton/Livret",
"path": "livret/livret/CFenetre.java",
"license": "gpl-2.0",
"size": 53550
} | [
"javax.swing.JSpinner"
] | import javax.swing.JSpinner; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,011,240 |
@Function(name = "toLocaleString", arity = 0)
public static Object toLocaleString(ExecutionContext cx, Object thisValue, Object locales, Object options) {
SIMDValue value = thisSIMDValue(cx, thisValue);
// FIXME: spec issue - retrieve list separator from... | @Function(name = STR, arity = 0) static Object function(ExecutionContext cx, Object thisValue, Object locales, Object options) { SIMDValue value = thisSIMDValue(cx, thisValue); String separator = cx.getRealm().getListSeparator(); CharSequence[] list = new CharSequence[VECTOR_LENGTH]; for (int i = 0; i < VECTOR_LENGTH; ... | /**
* SIMDConstructor.prototype.toLocaleString( [ reserved1 [, reserved2 ] )
*
* @param cx
* the execution context
* @param thisValue
* the function this-value
* @param locales
* the optional locales array
... | SIMDConstructor.prototype.toLocaleString( [ reserved1 [, reserved2 ] ) | toLocaleString | {
"repo_name": "jugglinmike/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/objects/simd/Int16x8Prototype.java",
"license": "mit",
"size": 6832
} | [
"com.github.anba.es6draft.runtime.AbstractOperations",
"com.github.anba.es6draft.runtime.ExecutionContext",
"com.github.anba.es6draft.runtime.internal.Properties",
"com.github.anba.es6draft.runtime.objects.simd.SIMD"
] | import com.github.anba.es6draft.runtime.AbstractOperations; import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.Properties; import com.github.anba.es6draft.runtime.objects.simd.SIMD; | import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; import com.github.anba.es6draft.runtime.objects.simd.*; | [
"com.github.anba"
] | com.github.anba; | 1,336,350 |
public HttpRequest receive(final Appendable appendable)
throws HttpRequestException {
final BufferedReader reader = bufferedReader();
return new CloseOperation<HttpRequest>(reader, ignoreCloseExceptions) { | HttpRequest function(final Appendable appendable) throws HttpRequestException { final BufferedReader reader = bufferedReader(); return new CloseOperation<HttpRequest>(reader, ignoreCloseExceptions) { | /**
* Receive response into the given appendable
*
* @param appendable
* @return this request
* @throws HttpRequestException
*/ | Receive response into the given appendable | receive | {
"repo_name": "INK-Team/INK-Project",
"path": "app/plugins/cordova-plugin-http/src/android/com/synconset/CordovaHTTP/HttpRequest.java",
"license": "apache-2.0",
"size": 91684
} | [
"java.io.BufferedReader"
] | import java.io.BufferedReader; | import java.io.*; | [
"java.io"
] | java.io; | 1,977,298 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.