method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private int getDesiredHeight(Layout layout) {
if (layout == null) {
return 0;
}
int linecount = layout.getLineCount();
// APPCELERATOR TITANIUM CUSTOMIZATION:
int desired = layout.getLineTop(linecount) - getAdditionalItemHeight();
if (Build.VERSION.SDK_INT < 21) {
d... | int function(Layout layout) { if (layout == null) { return 0; } int linecount = layout.getLineCount(); int desired = layout.getLineTop(linecount) - getAdditionalItemHeight(); if (Build.VERSION.SDK_INT < 21) { desired -= getItemOffset() * 2; } else { desired += getTextSize(); } desired = Math.max(desired, getSuggestedMi... | /**
* Calculates desired height for layout
*
* @param layout
* the source layout
* @return the desired layout height
*/ | Calculates desired height for layout | getDesiredHeight | {
"repo_name": "collinprice/titanium_mobile",
"path": "android/modules/ui/src/java/kankan/wheel/widget/WheelView.java",
"license": "apache-2.0",
"size": 20534
} | [
"android.os.Build",
"android.text.Layout"
] | import android.os.Build; import android.text.Layout; | import android.os.*; import android.text.*; | [
"android.os",
"android.text"
] | android.os; android.text; | 159,033 |
public static InsnList addLogHeaderOldApi(String className) {
return addLogHeader(className, TYPE_JOBCONF);
} | static InsnList function(String className) { return addLogHeader(className, TYPE_JOBCONF); } | /**
* <p>
* This method provides instructions to log header row
* </p>
*
* @param className
* Class which has called the logger
* @return InsnList Instructions
*/ | This method provides instructions to log header row | addLogHeaderOldApi | {
"repo_name": "impetus-opensource/jumbune",
"path": "debugger/src/main/java/org/jumbune/debugger/instrumentation/utils/InstrumentUtil.java",
"license": "lgpl-3.0",
"size": 33467
} | [
"org.objectweb.asm.tree.InsnList"
] | import org.objectweb.asm.tree.InsnList; | import org.objectweb.asm.tree.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 264,286 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(RefLocationType.class)) {
case GmlPackage.REF_LOCATION_TYPE__AFFINE_PLACEMENT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false))... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(RefLocationType.class)) { case GmlPackage.REF_LOCATION_TYPE__AFFINE_PLACEMENT: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notifi... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/RefLocationTypeItemProvider.java",
"license": "apache-2.0",
"size": 4987
} | [
"net.opengis.gml.GmlPackage",
"net.opengis.gml.RefLocationType",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import net.opengis.gml.GmlPackage; import net.opengis.gml.RefLocationType; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import net.opengis.gml.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"net.opengis.gml",
"org.eclipse.emf"
] | net.opengis.gml; org.eclipse.emf; | 2,466,774 |
public void unbindENC ()
{
try
{
InitialContext ic = new InitialContext();
Context env = (Context)ic.lookup("java:comp/env");
__log.debug("Unbinding java:comp/env/"+getJndiName());
env.unbind(getJndiName());
}
catch (NamingException... | void function () { try { InitialContext ic = new InitialContext(); Context env = (Context)ic.lookup(STR); __log.debug(STR+getJndiName()); env.unbind(getJndiName()); } catch (NamingException e) { __log.warn(e); } } | /**
* Unbind this NamingEntry from a java:comp/env
*/ | Unbind this NamingEntry from a java:comp/env | unbindENC | {
"repo_name": "whiteley/jetty8",
"path": "jetty-plus/src/main/java/org/eclipse/jetty/plus/jndi/NamingEntry.java",
"license": "apache-2.0",
"size": 6187
} | [
"javax.naming.Context",
"javax.naming.InitialContext",
"javax.naming.NamingException"
] | import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,340,774 |
private int workOutHeight(Transaction transaction) {
return -1; // -1 = we do not know. TODO probably needs replacing by height on TransactionConfidence.
} | int function(Transaction transaction) { return -1; } | /**
* Work out the height of the block chain in which the transaction appears.
*
* @param transaction
* @return
*/ | Work out the height of the block chain in which the transaction appears | workOutHeight | {
"repo_name": "PaulSnow/multibit",
"path": "src/main/java/org/multibit/model/bitcoin/BitcoinModel.java",
"license": "mit",
"size": 29100
} | [
"com.google.bitcoin.core.Transaction"
] | import com.google.bitcoin.core.Transaction; | import com.google.bitcoin.core.*; | [
"com.google.bitcoin"
] | com.google.bitcoin; | 2,578,381 |
private Project createProjectWithAssignedPersons_1(String title) throws Exception
{
// create new project
Project project = new Project();
project.setTitle(title);
// create two persons and assign project
// and assign persons with project
Person... | Project function(String title) throws Exception { Project project = new Project(); project.setTitle(title); Person p1 = new Person(); p1.setFirstname(title); broker.beginTransaction(); broker.store(p1); List projects_1 = new ArrayList(); projects_1.add(project); p1.setProjects(projects_1); Person p2 = new Person(); p2.... | /**
* Create a project with two persons
* @param title
* @return
* @throws Exception
*/ | Create a project with two persons | createProjectWithAssignedPersons_1 | {
"repo_name": "kuali/ojb-1.0.4",
"path": "src/test/org/apache/ojb/broker/MtoNMapping.java",
"license": "apache-2.0",
"size": 24919
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,599,738 |
EReference getTypeArguments_T13(); | EReference getTypeArguments_T13(); | /**
* Returns the meta object for the containment reference list '{@link com.euclideanspace.spad.editor.TypeArguments#getT13 <em>T13</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>T13</em>'.
* @see com.euclideanspace.spad.editor... | Returns the meta object for the containment reference list '<code>com.euclideanspace.spad.editor.TypeArguments#getT13 T13</code>'. | getTypeArguments_T13 | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,649 |
public void delete( final int userID, final String userSessionId,
final int forUserID, final List<Integer> messageIDS ) throws SiteException; | void function( final int userID, final String userSessionId, final int forUserID, final List<Integer> messageIDS ) throws SiteException; | /**
* This method allows to delete user messages
* @param userID the user unique ID
* @param userSessionId the user's session id
* @param forUserID the user we want to delete messages for
* @param messageIDS the list of message ID for the messages we want to delete
* @throws SiteException if the user is not... | This method allows to delete user messages | delete | {
"repo_name": "ivan-zapreev/x-cure-chat",
"path": "src/com/xcurechat/client/rpc/MessageManager.java",
"license": "gpl-3.0",
"size": 4995
} | [
"com.xcurechat.client.rpc.exceptions.SiteException",
"java.util.List"
] | import com.xcurechat.client.rpc.exceptions.SiteException; import java.util.List; | import com.xcurechat.client.rpc.exceptions.*; import java.util.*; | [
"com.xcurechat.client",
"java.util"
] | com.xcurechat.client; java.util; | 585,316 |
public ByteBuffer getBuffer() {
return data.asReadOnlyBuffer();
}
| ByteBuffer function() { return data.asReadOnlyBuffer(); } | /**
* Get master data as read only ByteBuffer
* @return
*/ | Get master data as read only ByteBuffer | getBuffer | {
"repo_name": "taimos/openhab",
"path": "bundles/binding/org.openhab.binding.ebus/src/main/java/org/openhab/binding/ebus/internal/EBusTelegram.java",
"license": "epl-1.0",
"size": 3164
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,086,042 |
public static void main(String[] args) {
Log.printLine("Starting CloudSimExample7...");
try {
// First step: Initialize the CloudSim package. It should be called
// before creating any entities.
int num_user = 2; // number of grid users
Calendar calendar = Calendar.getInstance();
boolean trace_... | static void function(String[] args) { Log.printLine(STR); try { int num_user = 2; Calendar calendar = Calendar.getInstance(); boolean trace_flag = false; CloudSim.init(num_user, calendar, trace_flag); Datacenter datacenter0 = createDatacenter(STR); Datacenter datacenter1 = createDatacenter(STR); DatacenterBroker broker... | /**
* Creates main() to run this example
*/ | Creates main() to run this example | main | {
"repo_name": "RohanKabra/adaptiveCloudsim",
"path": "src/org/cloudbus/cloudsim/examples/CloudSimExample7.java",
"license": "lgpl-3.0",
"size": 10307
} | [
"java.util.Calendar",
"org.cloudbus.cloudsim.Datacenter",
"org.cloudbus.cloudsim.DatacenterBroker",
"org.cloudbus.cloudsim.Log",
"org.cloudbus.cloudsim.core.CloudSim"
] | import java.util.Calendar; import org.cloudbus.cloudsim.Datacenter; import org.cloudbus.cloudsim.DatacenterBroker; import org.cloudbus.cloudsim.Log; import org.cloudbus.cloudsim.core.CloudSim; | import java.util.*; import org.cloudbus.cloudsim.*; import org.cloudbus.cloudsim.core.*; | [
"java.util",
"org.cloudbus.cloudsim"
] | java.util; org.cloudbus.cloudsim; | 1,134,363 |
@Nullable private GridCacheMvccCandidate addEntry(
AffinityTopologyVersion topVer,
GridNearCacheEntry entry,
UUID dhtNodeId
) throws GridCacheEntryRemovedException {
// Check if lock acquisition is timed out.
if (timedOut)
return null;
// Add local lo... | @Nullable GridCacheMvccCandidate function( AffinityTopologyVersion topVer, GridNearCacheEntry entry, UUID dhtNodeId ) throws GridCacheEntryRemovedException { if (timedOut) return null; GridCacheMvccCandidate c = entry.addNearLocal( dhtNodeId, threadId, lockVer, topVer, timeout, !inTx(), inTx(), implicitSingleTx() ); if... | /**
* Adds entry to future.
*
* @param topVer Topology version.
* @param entry Entry to add.
* @param dhtNodeId DHT node ID.
* @return Lock candidate.
* @throws GridCacheEntryRemovedException If entry was removed.
*/ | Adds entry to future | addEntry | {
"repo_name": "adeelmahmood/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearLockFuture.java",
"license": "apache-2.0",
"size": 56727
} | [
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException",
"org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate",
"org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry",
"org.jetbrai... | import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate; import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry; impo... | import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,502,145 |
public static ListenableFuture<Void> allOf(ListenableFuture<?>... futures)
{
return new AllOfFuture(Arrays.asList(futures));
} | static ListenableFuture<Void> function(ListenableFuture<?>... futures) { return new AllOfFuture(Arrays.asList(futures)); } | /**
* Returns future that will be completed once all of the dependent futures are completed.
*
* If any of the futures fail this future will fail immediately.
*
* @param futures
* dependent futures
*
* @return
* future that will complete once all of {@code futures} complete
*/ | Returns future that will be completed once all of the dependent futures are completed. If any of the futures fail this future will fail immediately | allOf | {
"repo_name": "kvr000/zbynek-concurrent-pof",
"path": "zbynek-lwfuture-pof/src/main/java/cz/znj/kvr/sw/pof/concurrent/lwfuture/concurrent/Futures.java",
"license": "apache-2.0",
"size": 6884
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 298,115 |
@Test
public void testLogOnSpecificLevel() throws Exception {
final BlockingQueue<SyslogServerEventIF> queue = BlockedSyslogServerEventHandler.getQueue();
executeOperation(Operations.createWriteAttributeOperation(SYSLOG_HANDLER_ADDR, "level", "ERROR"));
queue.clear();
makeLogs();... | void function() throws Exception { final BlockingQueue<SyslogServerEventIF> queue = BlockedSyslogServerEventHandler.getQueue(); executeOperation(Operations.createWriteAttributeOperation(SYSLOG_HANDLER_ADDR, "level", "ERROR")); queue.clear(); makeLogs(); testLog(queue, Level.ERROR); testLog(queue, Level.FATAL); Assert.a... | /**
* Tests that only messages on specific level or higher level are logged to syslog.
*/ | Tests that only messages on specific level or higher level are logged to syslog | testLogOnSpecificLevel | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "testsuite/standalone/src/test/java/org/jboss/as/test/integration/logging/syslog/SyslogHandlerTestCase.java",
"license": "lgpl-2.1",
"size": 10185
} | [
"java.util.concurrent.BlockingQueue",
"org.jboss.as.controller.client.helpers.Operations",
"org.jboss.as.test.syslogserver.BlockedSyslogServerEventHandler",
"org.jboss.logging.Logger",
"org.junit.Assert",
"org.productivity.java.syslog4j.server.SyslogServerEventIF"
] | import java.util.concurrent.BlockingQueue; import org.jboss.as.controller.client.helpers.Operations; import org.jboss.as.test.syslogserver.BlockedSyslogServerEventHandler; import org.jboss.logging.Logger; import org.junit.Assert; import org.productivity.java.syslog4j.server.SyslogServerEventIF; | import java.util.concurrent.*; import org.jboss.as.controller.client.helpers.*; import org.jboss.as.test.syslogserver.*; import org.jboss.logging.*; import org.junit.*; import org.productivity.java.syslog4j.server.*; | [
"java.util",
"org.jboss.as",
"org.jboss.logging",
"org.junit",
"org.productivity.java"
] | java.util; org.jboss.as; org.jboss.logging; org.junit; org.productivity.java; | 2,078,533 |
public void evictFromMemoryCache(final Uri uri) {
Predicate<CacheKey> predicate = predicateForUri(uri);
mBitmapMemoryCache.removeAll(predicate);
mEncodedMemoryCache.removeAll(predicate);
} | void function(final Uri uri) { Predicate<CacheKey> predicate = predicateForUri(uri); mBitmapMemoryCache.removeAll(predicate); mEncodedMemoryCache.removeAll(predicate); } | /**
* Removes all images with the specified {@link Uri} from memory cache.
* @param uri The uri of the image to evict
*/ | Removes all images with the specified <code>Uri</code> from memory cache | evictFromMemoryCache | {
"repo_name": "HKMOpen/fresco",
"path": "imagepipeline/src/main/java/com/facebook/imagepipeline/core/ImagePipeline.java",
"license": "bsd-3-clause",
"size": 21396
} | [
"android.net.Uri",
"com.android.internal.util.Predicate",
"com.facebook.cache.common.CacheKey"
] | import android.net.Uri; import com.android.internal.util.Predicate; import com.facebook.cache.common.CacheKey; | import android.net.*; import com.android.internal.util.*; import com.facebook.cache.common.*; | [
"android.net",
"com.android.internal",
"com.facebook.cache"
] | android.net; com.android.internal; com.facebook.cache; | 137,230 |
private static String buildMessage(String format, Object... args) {
String msg = (args == null) ? format : String.format(Locale.US, format, args);
// 拿到 栈轨迹 数据
StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();
String caller = "<unknown>";
// Wa... | static String function(String format, Object... args) { String msg = (args == null) ? format : String.format(Locale.US, format, args); StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace(); String caller = STR; for (int i = 2; i < trace.length; i++) { Class<?> clazz = trace[i].getClass(); if (!... | /**
* Formats the caller's provided message and prepends useful info like
* calling thread ID and method name.
*/ | Formats the caller's provided message and prepends useful info like calling thread ID and method name | buildMessage | {
"repo_name": "CaMnter/AndroidLife",
"path": "volley/src/main/java/com/android/volley/VolleyLog.java",
"license": "apache-2.0",
"size": 8911
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Locale"
] | import java.util.ArrayList; import java.util.List; import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,377,377 |
synchronized void clearEventActionpointRequest(
IProgressMonitor progressMonitor,
int id)
throws ServiceException, IOException
{
synchronized (lock)
{
init(null);
try
{
monitor.clearEventActionpointRequest(... | synchronized void clearEventActionpointRequest( IProgressMonitor progressMonitor, int id) throws ServiceException, IOException { synchronized (lock) { init(null); try { monitor.clearEventActionpointRequest(id); } catch (IOException e) { disconnect(); throw e; } waitForEndmark(progressMonitor); } } | /**
* Request for clearing an event action point.
*
* @param progressMonitor the progress monitor used for cancellation.
* @param id the id of the event action point to be cleared
* or ~0 to clear all.
* @throws IOException if an I/O exception occurred; target i... | Request for clearing an event action point | clearEventActionpointRequest | {
"repo_name": "debabratahazra/OptimaLA",
"path": "Optima/com.ose.system/src/com/ose/system/Target.java",
"license": "epl-1.0",
"size": 501290
} | [
"java.io.IOException",
"org.eclipse.core.runtime.IProgressMonitor"
] | import java.io.IOException; import org.eclipse.core.runtime.IProgressMonitor; | import java.io.*; import org.eclipse.core.runtime.*; | [
"java.io",
"org.eclipse.core"
] | java.io; org.eclipse.core; | 598,834 |
public void elementStarted(String name,
String systemId,
int lineNr)
{
Properties attribs
= (Properties) this.attributeDefaultValues.get(name);
if (attribs == null) {
attribs = new Properties();
} else {
a... | void function(String name, String systemId, int lineNr) { Properties attribs = (Properties) this.attributeDefaultValues.get(name); if (attribs == null) { attribs = new Properties(); } else { attribs = (Properties) attribs.clone(); } this.currentElements.push(attribs); } | /**
* Indicates that an element has been started.
*
* @param name the name of the element.
* @param systemId the system ID of the XML data of the element.
* @param lineNr the line number in the XML data of the element.
*/ | Indicates that an element has been started | elementStarted | {
"repo_name": "runqingz/umple",
"path": "Umplificator/UmplifiedProjects/jhotdraw7/srcUmple/net/n3/nanoxml/NonValidator.java",
"license": "mit",
"size": 16734
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 134,708 |
public void readFont(InputStream is, String name, FontContainer fontContainer,
Map<Integer, Integer> subsetGlyphs, boolean cid) throws IOException {
this.cid = cid;
if (subsetGlyphs.isEmpty()) {
return;
}
this.fontFile = new FontFileReader(is);
... | void function(InputStream is, String name, FontContainer fontContainer, Map<Integer, Integer> subsetGlyphs, boolean cid) throws IOException { this.cid = cid; if (subsetGlyphs.isEmpty()) { return; } this.fontFile = new FontFileReader(is); size += fontFile.getAllBytes().length; readDirTabs(); readFontHeader(); getNumGlyp... | /**
* Returns a subset of the original font.
*
* @param is font file
* @param name name
* @param fontContainer fontContainer
* @param subsetGlyphs Map of glyphs (glyphs has old index as (Integer) key and
* new index as (Integer) value)
* @param cid is cid
* @throws IOExcepti... | Returns a subset of the original font | readFont | {
"repo_name": "sbsdev/fop-pdf-images",
"path": "src/main/java/org/apache/fop/renderer/pdf/pdfbox/MergeTTFonts.java",
"license": "apache-2.0",
"size": 16952
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.Map",
"org.apache.fop.fonts.truetype.FontFileReader"
] | import java.io.IOException; import java.io.InputStream; import java.util.Map; import org.apache.fop.fonts.truetype.FontFileReader; | import java.io.*; import java.util.*; import org.apache.fop.fonts.truetype.*; | [
"java.io",
"java.util",
"org.apache.fop"
] | java.io; java.util; org.apache.fop; | 618,196 |
public void setParents(TreeBrowserDisplay node, Collection parents);
| void function(TreeBrowserDisplay node, Collection parents); | /**
* Converts the collection of parents into their corresponding UI
* components and adds them to the passed node.
*
* @param node The node to handle. Mustn't be <code>null</code>.
* @param parents Collection of parents to display.
*/ | Converts the collection of parents into their corresponding UI components and adds them to the passed node | setParents | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/browser/Browser.java",
"license": "gpl-2.0",
"size": 3815
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,645,551 |
public Rectangle2D getViewArea() {
return viewArea;
} | Rectangle2D function() { return viewArea; } | /**
* Get the view area of this viewport.
*
* @return the viewport rectangle area
*/ | Get the view area of this viewport | getViewArea | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/area/RegionViewport.java",
"license": "apache-2.0",
"size": 4388
} | [
"java.awt.geom.Rectangle2D"
] | import java.awt.geom.Rectangle2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,089,805 |
@SuppressWarnings("unused")
@CalledByNative
private void initFromNativeTabContents(int nativeTabContents) {
mContentView = ContentView.newInstance(
getContext(), nativeTabContents, ContentView.PERSONALITY_CHROME);
if (mContentView.getUrl() != null) mUrlTextView.setText(mConte... | @SuppressWarnings(STR) void function(int nativeTabContents) { mContentView = ContentView.newInstance( getContext(), nativeTabContents, ContentView.PERSONALITY_CHROME); if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.getUrl()); ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentVi... | /**
* Initializes the ContentView based on the native tab contents pointer passed in.
* @param nativeTabContents The pointer to the native tab contents object.
*/ | Initializes the ContentView based on the native tab contents pointer passed in | initFromNativeTabContents | {
"repo_name": "Crystalnix/BitPop",
"path": "content/shell/android/java/src/org/chromium/content_shell/Shell.java",
"license": "bsd-3-clause",
"size": 7045
} | [
"android.widget.FrameLayout",
"org.chromium.content.browser.ContentView"
] | import android.widget.FrameLayout; import org.chromium.content.browser.ContentView; | import android.widget.*; import org.chromium.content.browser.*; | [
"android.widget",
"org.chromium.content"
] | android.widget; org.chromium.content; | 787,534 |
@SimpleFunction(description = "Requests the " + MAX_MENTIONS_RETURNED
+ " most "
+ "recent mentions of the logged-in user. When the mentions have been "
+ "retrieved, the system will raise the <code>MentionsReceived</code> "
+ "event and set the <code>Mentions</code> property to the list of "... | @SimpleFunction(description = STR + MAX_MENTIONS_RETURNED + STR + STR + STR + STR + STR + STR + STR + STR) void function() { if (twitter == null userName.length() == 0) { form.dispatchErrorOccurredEvent(this, STR, ErrorMessages.ERROR_TWITTER_REQUEST_MENTIONS_FAILED, STR); return; } AsynchUtil.runAsynchronously(new Runn... | /**
* Gets the most recent messages where your username is mentioned.
*/ | Gets the most recent messages where your username is mentioned | RequestMentions | {
"repo_name": "anseo/friedgerAI24BLE",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Twitter.java",
"license": "mit",
"size": 38565
} | [
"com.google.appinventor.components.annotations.SimpleFunction",
"com.google.appinventor.components.runtime.util.AsynchUtil",
"com.google.appinventor.components.runtime.util.ErrorMessages",
"java.util.Collections",
"java.util.List"
] | import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.AsynchUtil; import com.google.appinventor.components.runtime.util.ErrorMessages; import java.util.Collections; import java.util.List; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; import java.util.*; | [
"com.google.appinventor",
"java.util"
] | com.google.appinventor; java.util; | 1,363,997 |
if (sIsBrowserInitialized) return true;
Log.d(TAG, "Performing one-time browser initialization");
// Initializing the command line must occur before loading the library.
if (!CommandLine.isInitialized()) {
ContentApplication.initCommandLine(context);
if (context instan... | if (sIsBrowserInitialized) return true; Log.d(TAG, STR); if (!CommandLine.isInitialized()) { ContentApplication.initCommandLine(context); if (context instanceof Activity) { Intent launchingIntent = ((Activity) context).getIntent(); String[] commandLineParams = getCommandLineParamsFromIntent(launchingIntent); if (comman... | /**
* Starts the browser process synchronously, returning success or failure. If the browser has
* already started, immediately returns true without performing any more initialization.
* This may only be called on the UI thread.
*
* @return whether or not the process started successfully
*... | Starts the browser process synchronously, returning success or failure. If the browser has already started, immediately returns true without performing any more initialization. This may only be called on the UI thread | initializeBrowser | {
"repo_name": "guorendong/iridium-browser-ubuntu",
"path": "chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java",
"license": "bsd-3-clause",
"size": 3724
} | [
"android.app.Activity",
"android.content.Intent",
"android.util.Log",
"org.chromium.base.CommandLine",
"org.chromium.base.library_loader.LibraryLoader",
"org.chromium.base.library_loader.LibraryProcessType",
"org.chromium.base.library_loader.ProcessInitException",
"org.chromium.content.app.ContentAppl... | import android.app.Activity; import android.content.Intent; import android.util.Log; import org.chromium.base.CommandLine; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.LibraryProcessType; import org.chromium.base.library_loader.ProcessInitException; import org.chromium.... | import android.app.*; import android.content.*; import android.util.*; import org.chromium.base.*; import org.chromium.base.library_loader.*; import org.chromium.content.app.*; import org.chromium.content.browser.*; import org.chromium.content.common.*; import org.chromium.net.*; | [
"android.app",
"android.content",
"android.util",
"org.chromium.base",
"org.chromium.content",
"org.chromium.net"
] | android.app; android.content; android.util; org.chromium.base; org.chromium.content; org.chromium.net; | 679,162 |
private void buildGetOIDListBody(InvocableMemberBodyBuilder bodyBuilder) {
// List<String> result = new ArrayList<String>(list.size());
bodyBuilder.appendFormalLine(String.format(
"%s result = new %s(%s.size());",
helper.getFinalTypeName(LIST_STRING),
... | void function(InvocableMemberBodyBuilder bodyBuilder) { bodyBuilder.appendFormalLine(String.format( STR, helper.getFinalTypeName(LIST_STRING), helper.getFinalTypeName(ARRAYLIST_STRING), listOfEntityName)); bodyBuilder.appendFormalLine(String.format(STR, helper.getFinalTypeName(entity), entityName, listOfEntityName)); b... | /**
* Build method body for getOIDList method
*
* @param bodyBuilder
*/ | Build method body for getOIDList method | buildGetOIDListBody | {
"repo_name": "osroca/gvnix",
"path": "addon-web-mvc/addon/src/main/java/org/gvnix/addon/web/mvc/addon/batch/WebJpaBatchMetadata.java",
"license": "gpl-3.0",
"size": 58704
} | [
"org.springframework.roo.classpath.itd.InvocableMemberBodyBuilder",
"org.springframework.roo.model.JavaType"
] | import org.springframework.roo.classpath.itd.InvocableMemberBodyBuilder; import org.springframework.roo.model.JavaType; | import org.springframework.roo.classpath.itd.*; import org.springframework.roo.model.*; | [
"org.springframework.roo"
] | org.springframework.roo; | 1,909,120 |
protected HttpResponse perform(HttpRequestBase method, HttpContext context) throws Exception {
return getHttpClient().execute(method, context);
} | HttpResponse function(HttpRequestBase method, HttpContext context) throws Exception { return getHttpClient().execute(method, context); } | /**
* Performs request method with HttpContext. HttpContext typically contains cookie store with all cookies to include
* with request
*
* @param method request method
* @param context httpcontext
* @return request response
* @throws Exception
*/ | Performs request method with HttpContext. HttpContext typically contains cookie store with all cookies to include with request | perform | {
"repo_name": "forcedotcom/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/util/IntegrationTestCase.java",
"license": "apache-2.0",
"size": 8487
} | [
"org.apache.http.HttpResponse",
"org.apache.http.client.methods.HttpRequestBase",
"org.apache.http.protocol.HttpContext"
] | import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.protocol.HttpContext; | import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.protocol.*; | [
"org.apache.http"
] | org.apache.http; | 2,772,487 |
private int primUpdate(IPermission perm, PreparedStatement ps) throws Exception
{
java.sql.Timestamp ts = null;
// UPDATE COLUMNS:
ps.clearParameters();
// TYPE:
if ( perm.getType() == null )
{ ps.setNull(1, Types.VARCHAR); }
else
{ ps.setString(... | int function(IPermission perm, PreparedStatement ps) throws Exception { java.sql.Timestamp ts = null; ps.clearParameters(); if ( perm.getType() == null ) { ps.setNull(1, Types.VARCHAR); } else { ps.setString(1, perm.getType()); } if ( perm.getEffective() == null ) { ps.setNull(2, Types.TIMESTAMP); } else { ts = new jav... | /**
* Set the params on the PreparedStatement and execute the update.
* @param perm org.jasig.portal.security.IPermission
* @param ps java.sql.PreparedStatement - the PreparedStatement for updating a Permission row.
* @return int - the return code from the PreparedStatement
* @exception Excepti... | Set the params on the PreparedStatement and execute the update | primUpdate | {
"repo_name": "ASU-Capstone/uPortal-Forked",
"path": "uportal-war/src/main/java/org/jasig/portal/security/provider/RDBMPermissionImpl.java",
"license": "apache-2.0",
"size": 30705
} | [
"java.sql.PreparedStatement",
"java.sql.Timestamp",
"java.sql.Types",
"org.jasig.portal.security.IPermission"
] | import java.sql.PreparedStatement; import java.sql.Timestamp; import java.sql.Types; import org.jasig.portal.security.IPermission; | import java.sql.*; import org.jasig.portal.security.*; | [
"java.sql",
"org.jasig.portal"
] | java.sql; org.jasig.portal; | 1,875,341 |
@Deprecated
public void setSessionAuthenticationStrategy(SessionAuthenticationStrategy sessionAuthenticationStrategy) {
Assert.notNull(sessionAuthenticationStrategy, "authenticatedSessionStrategy must not be null");
this.sessionAuthenticationStrategy = sessionAuthenticationStrategy;
} | void function(SessionAuthenticationStrategy sessionAuthenticationStrategy) { Assert.notNull(sessionAuthenticationStrategy, STR); this.sessionAuthenticationStrategy = sessionAuthenticationStrategy; } | /**
* Sets the strategy object which handles the session management behaviour when a
* user has been authenticated during the current request.
*
* @param sessionAuthenticationStrategy the strategy object. If not set, a {@link SessionFixationProtectionStrategy} is used.
* @deprecated Use constru... | Sets the strategy object which handles the session management behaviour when a user has been authenticated during the current request | setSessionAuthenticationStrategy | {
"repo_name": "dsyer/spring-security",
"path": "web/src/main/java/org/springframework/security/web/session/SessionManagementFilter.java",
"license": "apache-2.0",
"size": 7119
} | [
"org.springframework.security.web.authentication.session.SessionAuthenticationStrategy",
"org.springframework.util.Assert"
] | import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; import org.springframework.util.Assert; | import org.springframework.security.web.authentication.session.*; import org.springframework.util.*; | [
"org.springframework.security",
"org.springframework.util"
] | org.springframework.security; org.springframework.util; | 923,907 |
@TargetApi(21)
public void register() {
if (receiver != null) {
Intent initialStickyIntent =
context.registerReceiver(receiver, new IntentFilter(AudioManager.ACTION_HDMI_AUDIO_PLUG));
if (initialStickyIntent != null) {
receiver.onReceive(context, initialStickyIntent);
retur... | @TargetApi(21) void function() { if (receiver != null) { Intent initialStickyIntent = context.registerReceiver(receiver, new IntentFilter(AudioManager.ACTION_HDMI_AUDIO_PLUG)); if (initialStickyIntent != null) { receiver.onReceive(context, initialStickyIntent); return; } } listener.onAudioCapabilitiesChanged(DEFAULT_AU... | /**
* Registers to notify the listener when audio capabilities change. The listener will immediately
* receive the current audio capabilities. It is important to call {@link #unregister} so that
* the listener can be garbage collected.
*/ | Registers to notify the listener when audio capabilities change. The listener will immediately receive the current audio capabilities. It is important to call <code>#unregister</code> so that the listener can be garbage collected | register | {
"repo_name": "galihrepo/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer/audio/AudioCapabilitiesReceiver.java",
"license": "apache-2.0",
"size": 3730
} | [
"android.annotation.TargetApi",
"android.content.Intent",
"android.content.IntentFilter",
"android.media.AudioManager"
] | import android.annotation.TargetApi; import android.content.Intent; import android.content.IntentFilter; import android.media.AudioManager; | import android.annotation.*; import android.content.*; import android.media.*; | [
"android.annotation",
"android.content",
"android.media"
] | android.annotation; android.content; android.media; | 2,593,333 |
@SuppressWarnings("unchecked")
public static <T extends Serializable> T safeGetSerializableExtra(Intent intent, String name) {
try {
return (T) intent.getSerializableExtra(name);
} catch (ClassCastException ex) {
Log.e(TAG, "Invalide class for Serializable: " + name, ex);... | @SuppressWarnings(STR) static <T extends Serializable> T function(Intent intent, String name) { try { return (T) intent.getSerializableExtra(name); } catch (ClassCastException ex) { Log.e(TAG, STR + name, ex); return null; } catch (Throwable t) { Log.e(TAG, STR + intent); return null; } } | /**
* Just like {@link Intent#getSerializableExtra(String)} but doesn't throw exceptions.
*/ | Just like <code>Intent#getSerializableExtra(String)</code> but doesn't throw exceptions | safeGetSerializableExtra | {
"repo_name": "endlessm/chromium-browser",
"path": "base/android/java/src/org/chromium/base/IntentUtils.java",
"license": "bsd-3-clause",
"size": 16738
} | [
"android.content.Intent",
"java.io.Serializable"
] | import android.content.Intent; import java.io.Serializable; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 2,245,822 |
public static Expression getFirstPKColumnExpression(Connection conn, String fullTableName) throws SQLException {
PTable table = getTable(conn, fullTableName);
return getFirstPKColumnExpression(table);
} | static Expression function(Connection conn, String fullTableName) throws SQLException { PTable table = getTable(conn, fullTableName); return getFirstPKColumnExpression(table); } | /**
* Get expression that may be used to evaluate to the value of the first
* column of a given row in a Phoenix table.
* @param conn open Phoenix connection
* @param fullTableName full table name
* @return An expression that may be evaluated for a row in the provided table.
* @throws SQL... | Get expression that may be used to evaluate to the value of the first column of a given row in a Phoenix table | getFirstPKColumnExpression | {
"repo_name": "twdsilva/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java",
"license": "apache-2.0",
"size": 71490
} | [
"java.sql.Connection",
"java.sql.SQLException",
"org.apache.phoenix.expression.Expression",
"org.apache.phoenix.schema.PTable"
] | import java.sql.Connection; import java.sql.SQLException; import org.apache.phoenix.expression.Expression; import org.apache.phoenix.schema.PTable; | import java.sql.*; import org.apache.phoenix.expression.*; import org.apache.phoenix.schema.*; | [
"java.sql",
"org.apache.phoenix"
] | java.sql; org.apache.phoenix; | 972,770 |
@Test
void checkAllMatrixMult() {
int numChecked = 0;
Method methods[] = CommonOps_ZDRM.class.getMethods();
for (Method method : methods) {
String name = method.getName();
if (!name.startsWith("mult"))
continue;
// System.... | void checkAllMatrixMult() { int numChecked = 0; Method methods[] = CommonOps_ZDRM.class.getMethods(); for (Method method : methods) { String name = method.getName(); if (!name.startsWith("mult")) continue; Class[] params = method.getParameterTypes(); boolean add = name.contains("Add"); boolean hasAlpha = double.class =... | /**
* Make sure the multiplication methods here have the same behavior as the ones in MatrixMatrixMult.
*/ | Make sure the multiplication methods here have the same behavior as the ones in MatrixMatrixMult | checkAllMatrixMult | {
"repo_name": "lessthanoptimal/ejml",
"path": "main/ejml-zdense/test/org/ejml/dense/row/TestCommonOps_ZDRM.java",
"license": "apache-2.0",
"size": 24364
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"org.junit.jupiter.api.Assertions"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.junit.jupiter.api.Assertions; | import java.lang.reflect.*; import org.junit.jupiter.api.*; | [
"java.lang",
"org.junit.jupiter"
] | java.lang; org.junit.jupiter; | 95,351 |
public int getRunLimit(Set<? extends Attribute> attributes); | int function(Set<? extends Attribute> attributes); | /**
* Returns the index of the last character in the run that has the same
* attribute values for the attributes in the set as the current character.
*
* @param attributes
* the set of attributes which the run is based on.
* @return the index of the last character of the current... | Returns the index of the last character in the run that has the same attribute values for the attributes in the set as the current character | getRunLimit | {
"repo_name": "openweave/openweave-core",
"path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/java/text/AttributedCharacterIterator.java",
"license": "apache-2.0",
"size": 8416
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,369,094 |
public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic) {
return __MetricV2.createPrecisionMetric(monotonic);
}
| static Metric<AbstractILMultiDimensional> function(boolean monotonic) { return __MetricV2.createPrecisionMetric(monotonic); } | /**
* Creates an instance of the precision metric.
* The default aggregate function, which is the arithmetic mean, will be used.
* This metric will respect attribute weights defined in the configuration.
*
* @param monotonic If set to true, the monotonic variant of the metric will be created
... | Creates an instance of the precision metric. The default aggregate function, which is the arithmetic mean, will be used. This metric will respect attribute weights defined in the configuration | createPrecisionMetric | {
"repo_name": "arx-deidentifier/arx",
"path": "src/main/org/deidentifier/arx/metric/Metric.java",
"license": "apache-2.0",
"size": 74297
} | [
"org.deidentifier.arx.metric.v2.AbstractILMultiDimensional"
] | import org.deidentifier.arx.metric.v2.AbstractILMultiDimensional; | import org.deidentifier.arx.metric.v2.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 243,828 |
public void deletePreset(String presetName) {
DeletePresetRequest request = new DeletePresetRequest();
request.setPresetName(presetName);
deletePreset(request);
} | void function(String presetName) { DeletePresetRequest request = new DeletePresetRequest(); request.setPresetName(presetName); deletePreset(request); } | /**
* Deletes a preset with specified name.
*
* @param presetName The name of a preset.
*
*/ | Deletes a preset with specified name | deletePreset | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/media/MediaClient.java",
"license": "apache-2.0",
"size": 91398
} | [
"com.baidubce.services.media.model.DeletePresetRequest"
] | import com.baidubce.services.media.model.DeletePresetRequest; | import com.baidubce.services.media.model.*; | [
"com.baidubce.services"
] | com.baidubce.services; | 1,847,309 |
public Module getModule(String uri) {
return ModuleUtils.getModule(_modules,uri);
} | Module function(String uri) { return ModuleUtils.getModule(_modules,uri); } | /**
* Returns the module identified by a given URI.
* <p>
* @param uri the URI of the ModuleImpl.
* @return The module with the given URI, <b>null</b> if none.
*/ | Returns the module identified by a given URI. | getModule | {
"repo_name": "4thline/feeds",
"path": "src/main/java/com/sun/syndication/feed/atom/Person.java",
"license": "agpl-3.0",
"size": 5381
} | [
"com.sun.syndication.feed.module.Module",
"com.sun.syndication.feed.module.impl.ModuleUtils"
] | import com.sun.syndication.feed.module.Module; import com.sun.syndication.feed.module.impl.ModuleUtils; | import com.sun.syndication.feed.module.*; import com.sun.syndication.feed.module.impl.*; | [
"com.sun.syndication"
] | com.sun.syndication; | 1,801,847 |
@Message(id = 96, value = "No protocols in common, supported=(%s), requested=(%s)")
StartException noProtocolsInCommon(String supported, String requested); | @Message(id = 96, value = STR) StartException noProtocolsInCommon(String supported, String requested); | /**
* Create an {@link StartException} where the requested protocols do not match any of the supported protocols.
*
* @param supported the supported protocols
* @param requested the requested protocols
* @return a {@link StartException} for the error.
*/ | Create an <code>StartException</code> where the requested protocols do not match any of the supported protocols | noProtocolsInCommon | {
"repo_name": "aloubyansky/wildfly-core",
"path": "domain-management/src/main/java/org/jboss/as/domain/management/logging/DomainManagementLogger.java",
"license": "lgpl-2.1",
"size": 66389
} | [
"org.jboss.logging.annotations.Message",
"org.jboss.msc.service.StartException"
] | import org.jboss.logging.annotations.Message; import org.jboss.msc.service.StartException; | import org.jboss.logging.annotations.*; import org.jboss.msc.service.*; | [
"org.jboss.logging",
"org.jboss.msc"
] | org.jboss.logging; org.jboss.msc; | 1,817,695 |
private boolean initializeInfrastructureMode(String macAddr, String ssid) throws Exception {
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
int sleep = 0;
// Make sure WiFi is enabled.
Log.i(TAG, "Enabling WiFi");
while (!wifi.isWifiEnabled() && sleep < 10000) { // Wait for no m... | boolean function(String macAddr, String ssid) throws Exception { WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); int sleep = 0; Log.i(TAG, STR); while (!wifi.isWifiEnabled() && sleep < 10000) { wifi.setWifiEnabled(true); sleep += 1000; try { Thread.sleep(1000); } catch (InterruptedException e) ... | /**
* Tries to put the phone in infrastructure mode with SSID = ssid
* @param macAddr this phone's MacAddress
* @param ssid the network's ssid
* @return true iff the phone successfully connects to SSID network
* @throws Exception
*/ | Tries to put the phone in infrastructure mode with SSID = ssid | initializeInfrastructureMode | {
"repo_name": "everdefiant/posit-mobile.plugin",
"path": "src/org/hfoss/adhoc/AdhocService.java",
"license": "lgpl-2.1",
"size": 20830
} | [
"android.content.Context",
"android.net.wifi.SupplicantState",
"android.net.wifi.WifiInfo",
"android.net.wifi.WifiManager",
"android.util.Log",
"org.hfoss.posit.android.utilities.Utils"
] | import android.content.Context; import android.net.wifi.SupplicantState; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.util.Log; import org.hfoss.posit.android.utilities.Utils; | import android.content.*; import android.net.wifi.*; import android.util.*; import org.hfoss.posit.android.utilities.*; | [
"android.content",
"android.net",
"android.util",
"org.hfoss.posit"
] | android.content; android.net; android.util; org.hfoss.posit; | 2,222,942 |
public void readData(DataInput in, boolean forceExtFormat) throws IOException
{
final int ctrl = in.readUnsignedByte();
int dataLen;
extFormat = forceExtFormat || (ctrl & 0x80) == 0;
if (extFormat)
dataLen = readDataExtendedHeader(in, ctrl);
else dataLen = readDataShortHead... | void function(DataInput in, boolean forceExtFormat) throws IOException { final int ctrl = in.readUnsignedByte(); int dataLen; extFormat = forceExtFormat (ctrl & 0x80) == 0; if (extFormat) dataLen = readDataExtendedHeader(in, ctrl); else dataLen = readDataShortHeader(in, ctrl); int tpci = in.readUnsignedByte(); transpor... | /**
* Initialize the object from a {@link DataInput data input stream}. The
* first byte of the stream is expected to be the first byte of the frame
* body, excluding the frame type.
*
* @param in - the input stream to read.
* @param forceExtFormat - enforce extended frame format.
*
* @t... | Initialize the object from a <code>DataInput data input stream</code>. The first byte of the stream is expected to be the first byte of the frame body, excluding the frame type | readData | {
"repo_name": "Paolo-Maffei/freebus-fts",
"path": "freebus-fts-knxcomm/src/main/java/org/freebus/knxcomm/telegram/Telegram.java",
"license": "gpl-3.0",
"size": 17404
} | [
"java.io.DataInput",
"java.io.IOException",
"org.freebus.fts.common.address.GroupAddress",
"org.freebus.knxcomm.application.ApplicationFactory",
"org.freebus.knxcomm.application.ApplicationType"
] | import java.io.DataInput; import java.io.IOException; import org.freebus.fts.common.address.GroupAddress; import org.freebus.knxcomm.application.ApplicationFactory; import org.freebus.knxcomm.application.ApplicationType; | import java.io.*; import org.freebus.fts.common.address.*; import org.freebus.knxcomm.application.*; | [
"java.io",
"org.freebus.fts",
"org.freebus.knxcomm"
] | java.io; org.freebus.fts; org.freebus.knxcomm; | 1,302,735 |
void saveScmUsed() {
if (scmUsedFile.exists() && !scmUsedFile.delete()) {
LOG.warn("Failed to delete old scmUsed file in {}.", rootDir);
}
OutputStreamWriter out = null;
try {
long used = getScmUsed();
if (used > 0) {
out = new OutputStreamWriter(new FileOutputStream(scmUsedF... | void saveScmUsed() { if (scmUsedFile.exists() && !scmUsedFile.delete()) { LOG.warn(STR, rootDir); } OutputStreamWriter out = null; try { long used = getScmUsed(); if (used > 0) { out = new OutputStreamWriter(new FileOutputStream(scmUsedFile), StandardCharsets.UTF_8); out.write(Long.toString(used) + " " + Long.toString(... | /**
* Write the current scmUsed to the cache file.
*/ | Write the current scmUsed to the cache file | saveScmUsed | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java",
"license": "apache-2.0",
"size": 5345
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter",
"java.nio.charset.StandardCharsets",
"org.apache.hadoop.io.IOUtils",
"org.apache.hadoop.util.Time"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.nio.charset.StandardCharsets; import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.util.Time; | import java.io.*; import java.nio.charset.*; import org.apache.hadoop.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.nio",
"org.apache.hadoop"
] | java.io; java.nio; org.apache.hadoop; | 231,554 |
private int findClosestXAxisIndex(XYSeries ps, double targetValue)
{
// Set the initial start and stop indices, ignoring the first and last
// points
int lowerIndex = 1;
int upperIndex = ps.getItemCount() - 2;
// Check if the upper index is less than the lower index
... | int function(XYSeries ps, double targetValue) { int lowerIndex = 1; int upperIndex = ps.getItemCount() - 2; if (upperIndex < lowerIndex) { upperIndex = lowerIndex; } int dataIndex = (lowerIndex + upperIndex) / 2; while ((ps.getX(dataIndex).doubleValue() != targetValue) && (lowerIndex <= upperIndex)) { if (ps.getX(dataI... | /**************************************************************************
* Perform a binary search on the x-axis values for the plot under the
* mouse pointer to find the index into the data set closest to where the
* pointer is positioned
*
* @param ps
* reference to the pl... | Perform a binary search on the x-axis values for the plot under the mouse pointer to find the index into the data set closest to where the pointer is positioned | findClosestXAxisIndex | {
"repo_name": "CACTUS-Mission/TRAPSat",
"path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMXYPlotHandler.java",
"license": "mit",
"size": 134723
} | [
"org.jfree.data.xy.XYSeries"
] | import org.jfree.data.xy.XYSeries; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 2,503,718 |
@RequestMapping(value = "/editcampaign", method = RequestMethod.GET)
public String edit(@RequestParam(value = "Id", required = true) String ID, ModelMap map) {
logger.debug("### edit method starting...");
CampaignPromotion promotion = promotionService.locateCampaignById(ID);
CampaignPromotionsForm campa... | @RequestMapping(value = STR, method = RequestMethod.GET) String function(@RequestParam(value = "Id", required = true) String ID, ModelMap map) { logger.debug(STR); CampaignPromotion promotion = promotionService.locateCampaignById(ID); CampaignPromotionsForm campaignPromotionsForm = new CampaignPromotionsForm(promotion)... | /**
* This method is used to fetch campaign promotion for editing it.
*
* @param ID
* @param map
* @return String
*/ | This method is used to fetch campaign promotion for editing it | edit | {
"repo_name": "backbrainer/cpbm-customization",
"path": "citrix.cpbm.custom.portal/src/main/java/com/citrix/cpbm/portal/fragment/controllers/AbstractCampaignPromotionsController.java",
"license": "bsd-2-clause",
"size": 10939
} | [
"com.vmops.model.CampaignPromotion",
"com.vmops.model.CampaignPromotionDiscountAmount",
"com.vmops.model.CurrencyValue",
"com.vmops.web.forms.CampaignPromotionsForm",
"java.math.BigDecimal",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.springframework.ui.ModelMap",
"org.springframe... | import com.vmops.model.CampaignPromotion; import com.vmops.model.CampaignPromotionDiscountAmount; import com.vmops.model.CurrencyValue; import com.vmops.web.forms.CampaignPromotionsForm; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.ui.Mod... | import com.vmops.model.*; import com.vmops.web.forms.*; import java.math.*; import java.util.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; | [
"com.vmops.model",
"com.vmops.web",
"java.math",
"java.util",
"org.springframework.ui",
"org.springframework.web"
] | com.vmops.model; com.vmops.web; java.math; java.util; org.springframework.ui; org.springframework.web; | 226,277 |
public Enumeration<?> elements() {
return delegate.elements();
}
| Enumeration<?> function() { return delegate.elements(); } | /**
* Returns an enumeration of the components of this list.
*
* @return an enumeration of the components of this list
* @see Vector#elements()
*/ | Returns an enumeration of the components of this list | elements | {
"repo_name": "mbshopM/openconcerto",
"path": "OpenConcerto/src/org/openconcerto/ui/DefaultListModel.java",
"license": "gpl-3.0",
"size": 17050
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 734,561 |
public List<Connection> getConnections() {
return this.connections;
} | List<Connection> function() { return this.connections; } | /**
* Returns the connections for other ports.
* @return the connections
*/ | Returns the connections for other ports | getConnections | {
"repo_name": "asakusafw/asakusafw-mapreduce",
"path": "compiler/core/src/main/java/com/asakusafw/compiler/flow/plan/FlowBlock.java",
"license": "apache-2.0",
"size": 41698
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,177,026 |
public static RelDataType extractLastNFields(RelDataTypeFactory typeFactory,
RelDataType type, int numToKeep) {
assert type.isStruct();
assert type.getFieldCount() >= numToKeep;
final int fieldsCnt = type.getFieldCount();
return typeFactory.createStructType(
type.getFieldList().subList(f... | static RelDataType function(RelDataTypeFactory typeFactory, RelDataType type, int numToKeep) { assert type.isStruct(); assert type.getFieldCount() >= numToKeep; final int fieldsCnt = type.getFieldCount(); return typeFactory.createStructType( type.getFieldList().subList(fieldsCnt - numToKeep, fieldsCnt)); } | /**
* Keeps only the last N fields and returns the new struct type.
*/ | Keeps only the last N fields and returns the new struct type | extractLastNFields | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java",
"license": "apache-2.0",
"size": 50603
} | [
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rel.type.RelDataTypeFactory"
] | import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; | import org.apache.calcite.rel.type.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 2,872,408 |
EAttribute getDocument_Key(); | EAttribute getDocument_Key(); | /**
* Returns the meta object for the attribute '
* {@link de.tudresden.slr.model.bibtex.Document#getKey <em>Key</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @return the meta object for the attribute '<em>Key</em>'.
* @see de.tudresden.slr.model.bibtex.Document#getKey()
* @see #getDocument... | Returns the meta object for the attribute ' <code>de.tudresden.slr.model.bibtex.Document#getKey Key</code>'. | getDocument_Key | {
"repo_name": "sebastiangoetz/slr-toolkit",
"path": "plugins/de.tudresden.slr.model.bibtex/src/de/tudresden/slr/model/bibtex/BibtexPackage.java",
"license": "epl-1.0",
"size": 17796
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,747,931 |
public static <T extends Chunkable> List<byte[]> chunksFrom(T chunkable, int chunkLength) {
List<byte[]> chunks = new ArrayList<>();
int chunkCount = chunkCountFrom(chunkable, chunkLength);
for (int i = 0; i < chunkCount; i++) {
byte[] chunk = chunkFrom(chunkable, chunkLength, ... | static <T extends Chunkable> List<byte[]> function(T chunkable, int chunkLength) { List<byte[]> chunks = new ArrayList<>(); int chunkCount = chunkCountFrom(chunkable, chunkLength); for (int i = 0; i < chunkCount; i++) { byte[] chunk = chunkFrom(chunkable, chunkLength, i); chunks.add(chunk); } return chunks; } | /**
* Retrieve all chunks for a given chunk length.
* The final chunk may be shorter than the other chunks if it's been truncated.
*
* @param chunkLength The length of each chunk
* @return A list of chunks (byte arrays)
*/ | Retrieve all chunks for a given chunk length. The final chunk may be shorter than the other chunks if it's been truncated | chunksFrom | {
"repo_name": "colus001/Bean-Android-SDK",
"path": "sdk/src/main/java/com/punchthrough/bean/sdk/internal/utility/Chunk.java",
"license": "mit",
"size": 3238
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,310,288 |
public static String replaceSystemProperties(Object source) {
return new StrSubstitutor(StrLookup.systemPropertiesLookup()).replace(source);
}
//-----------------------------------------------------------------------
public StrSubstitutor() {
this((StrLookup) null, DEFAULT_PREFIX, ... | static String function(Object source) { return new StrSubstitutor(StrLookup.systemPropertiesLookup()).replace(source); } public StrSubstitutor() { this((StrLookup) null, DEFAULT_PREFIX, DEFAULT_SUFFIX, DEFAULT_ESCAPE); } public StrSubstitutor(Map valueMap) { this(StrLookup.mapLookup(valueMap), DEFAULT_PREFIX, DEFAULT_S... | /**
* Replaces all the occurrences of variables in the given source object with
* their matching values from the system properties.
*
* @param source the source text containing the variables to substitute, null returns null
* @return the result of the replace operation
*/ | Replaces all the occurrences of variables in the given source object with their matching values from the system properties | replaceSystemProperties | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/clang/src/main/java/org/apache/commons/lang/text/StrSubstitutor.java",
"license": "gpl-2.0",
"size": 37494
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,202,120 |
public static XMLStreamReader createXMLStreamReader(InputStream stream)
throws IOException, XMLStreamException {
XMLInputFactory factory = XMLInputFactory.newInstance();
//disable DTD resolver
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
XMLStreamReader reader = factory.createXMLStreamReader(st... | static XMLStreamReader function(InputStream stream) throws IOException, XMLStreamException { XMLInputFactory factory = XMLInputFactory.newInstance(); factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); XMLStreamReader reader = factory.createXMLStreamReader(stream); return reader; } | /**
* Returns a XMLStreamReader for the XML document at the given input stream.
*/ | Returns a XMLStreamReader for the XML document at the given input stream | createXMLStreamReader | {
"repo_name": "Xenoage/Zong",
"path": "utils/utils-jse/src/com/xenoage/utils/jse/xml/XMLReader.java",
"license": "agpl-3.0",
"size": 8697
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.xml.stream.XMLInputFactory",
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamReader"
] | import java.io.IOException; import java.io.InputStream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; | import java.io.*; import javax.xml.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,429,772 |
public XmlAnyDefinition findConnection(String name)
{
List<XmlAnyDefinition> connections = Utility.getConnections().getChildDefinitions("Reference");
XmlAnyDefinition connection = null;
for (XmlAnyDefinition currConnection : connections)
{
if (name.equals(currConnection.getAttributeValue("name... | XmlAnyDefinition function(String name) { List<XmlAnyDefinition> connections = Utility.getConnections().getChildDefinitions(STR); XmlAnyDefinition connection = null; for (XmlAnyDefinition currConnection : connections) { if (name.equals(currConnection.getAttributeValue("name"))) { connection = currConnection; break; } } ... | /**
* Find a connection in connections.xml
* @param name
* @return
*/ | Find a connection in connections.xml | findConnection | {
"repo_name": "oracle/mobile-persistence",
"path": "Projects/Framework/Runtime/src/oracle/ateam/sample/mobile/v2/persistence/manager/AbstractRemotePersistenceManager.java",
"license": "mit",
"size": 16445
} | [
"java.util.List",
"oracle.adfmf.util.Utility",
"oracle.adfmf.util.XmlAnyDefinition"
] | import java.util.List; import oracle.adfmf.util.Utility; import oracle.adfmf.util.XmlAnyDefinition; | import java.util.*; import oracle.adfmf.util.*; | [
"java.util",
"oracle.adfmf.util"
] | java.util; oracle.adfmf.util; | 1,633,251 |
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String serviceName, String namedValueId, String ifMatch) {
deleteAsync(resourceGroupName, serviceName, namedValueId, ifMatch).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String serviceName, String namedValueId, String ifMatch) { deleteAsync(resourceGroupName, serviceName, namedValueId, ifMatch).block(); } | /**
* Deletes specific named value from the API Management service instance.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param namedValueId Identifier of the NamedValue.
* @param ifMatch ETag of the Entity. ET... | Deletes specific named value from the API Management service instance | delete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/NamedValuesClientImpl.java",
"license": "mit",
"size": 110327
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,688,607 |
public void init(Object operand,
Object operatorOrOpType,
Object methodNameOrAddedArgs)
throws StandardException {
this.operand = (ValueNode)operand;
this.operator = (String)operatorOrOpType;
this.methodName = (String)methodNameOrAddedAr... | void function(Object operand, Object operatorOrOpType, Object methodNameOrAddedArgs) throws StandardException { this.operand = (ValueNode)operand; this.operator = (String)operatorOrOpType; this.methodName = (String)methodNameOrAddedArgs; } | /**
* Initializer for a UnaryOperatorNode.
*
* <ul>
* @param operand The operand of the node
* @param operator The name of the operator,
* @param methodName Name of the method
*/ | Initializer for a UnaryOperatorNode. | init | {
"repo_name": "youngor/openclouddb",
"path": "src/main/java/com/akiban/sql/parser/UnaryOperatorNode.java",
"license": "apache-2.0",
"size": 6265
} | [
"com.akiban.sql.StandardException"
] | import com.akiban.sql.StandardException; | import com.akiban.sql.*; | [
"com.akiban.sql"
] | com.akiban.sql; | 882,625 |
@Override
public ArrayList<Mueble> getInventario()
{
return inventario;
} | ArrayList<Mueble> function() { return inventario; } | /**
* Devuelve el inventario de muebles que se encuentran en el carrito
* @return inventario Lista con los muebles que se encuentran en el carrito
*/ | Devuelve el inventario de muebles que se encuentran en el carrito | getInventario | {
"repo_name": "diego41dc/laboratorio3",
"path": "Lab3-MueblesDeLosAlpes-ejb/src/java/com/losalpes/servicios/ServicioCarritoMock.java",
"license": "gpl-2.0",
"size": 6244
} | [
"com.losalpes.entities.Mueble",
"java.util.ArrayList"
] | import com.losalpes.entities.Mueble; import java.util.ArrayList; | import com.losalpes.entities.*; import java.util.*; | [
"com.losalpes.entities",
"java.util"
] | com.losalpes.entities; java.util; | 395,782 |
public String[] getGroups() throws XMLDBException;
| String[] function() throws XMLDBException; | /**
* Retrieve a list of all existing groups.
*
* Please note: new groups are created automatically if a new group
* is assigned to a user. You can't add or remove them.
*
* @return List of all existing groups.
* @throws XMLDBException
*/ | Retrieve a list of all existing groups. Please note: new groups are created automatically if a new group is assigned to a user. You can't add or remove them | getGroups | {
"repo_name": "shabanovd/exist",
"path": "src/org/exist/xmldb/UserManagementService.java",
"license": "lgpl-2.1",
"size": 12212
} | [
"org.xmldb.api.base.XMLDBException"
] | import org.xmldb.api.base.XMLDBException; | import org.xmldb.api.base.*; | [
"org.xmldb.api"
] | org.xmldb.api; | 309,375 |
Future<Boolean> reindexAsync( String path ) throws RepositoryException; | Future<Boolean> reindexAsync( String path ) throws RepositoryException; | /**
* Asynchronously crawl and index the content starting at the supplied path in this workspace, to the designated depth.
*
* @param path the path of the content to be indexed
* @return a future representing the asynchronous operation; never null
* @throws IllegalArgumentException if the work... | Asynchronously crawl and index the content starting at the supplied path in this workspace, to the designated depth | reindexAsync | {
"repo_name": "flownclouds/modeshape",
"path": "modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/Workspace.java",
"license": "apache-2.0",
"size": 4627
} | [
"java.util.concurrent.Future",
"javax.jcr.RepositoryException"
] | import java.util.concurrent.Future; import javax.jcr.RepositoryException; | import java.util.concurrent.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 1,071,412 |
public static javax.xml.namespace.QName parseQName( String lexicalXSDQName,
NamespaceContext nsc) {
if (theConverter == null) initConverter();
return theConverter.parseQName( lexicalXSDQName, nsc );
} | static javax.xml.namespace.QName function( String lexicalXSDQName, NamespaceContext nsc) { if (theConverter == null) initConverter(); return theConverter.parseQName( lexicalXSDQName, nsc ); } | /**
* <p>
* Converts the string argument into a byte value.
*
* <p>
* String parameter <tt>lexicalXSDQname</tt> must conform to lexical value space specifed at
* <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part 2:Datatypes specification:QNames</a>
*
* @param lexi... | Converts the string argument into a byte value. String parameter lexicalXSDQname must conform to lexical value space specifed at XML Schema Part 2:Datatypes specification:QNames | parseQName | {
"repo_name": "shelan/jdk9-mirror",
"path": "jaxws/src/java.xml.bind/share/classes/javax/xml/bind/DatatypeConverter.java",
"license": "gpl-2.0",
"size": 25871
} | [
"javax.xml.namespace.NamespaceContext"
] | import javax.xml.namespace.NamespaceContext; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 1,793,312 |
protected static SegmentInfos readLastCommittedSegmentInfos(final SearcherManager sm, final Store store) throws IOException {
IndexSearcher searcher = sm.acquire();
try {
IndexCommit latestCommit = ((DirectoryReader) searcher.getIndexReader()).getIndexCommit();
return Lucene.... | static SegmentInfos function(final SearcherManager sm, final Store store) throws IOException { IndexSearcher searcher = sm.acquire(); try { IndexCommit latestCommit = ((DirectoryReader) searcher.getIndexReader()).getIndexCommit(); return Lucene.readSegmentInfos(latestCommit); } catch (IOException e) { try { return stor... | /**
* Read the last segments info from the commit pointed to by the searcher manager
*/ | Read the last segments info from the commit pointed to by the searcher manager | readLastCommittedSegmentInfos | {
"repo_name": "nomoa/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/engine/Engine.java",
"license": "apache-2.0",
"size": 43677
} | [
"java.io.IOException",
"org.apache.lucene.index.DirectoryReader",
"org.apache.lucene.index.IndexCommit",
"org.apache.lucene.index.SegmentInfos",
"org.apache.lucene.search.IndexSearcher",
"org.apache.lucene.search.SearcherManager",
"org.elasticsearch.common.lucene.Lucene",
"org.elasticsearch.index.stor... | import java.io.IOException; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexCommit; import org.apache.lucene.index.SegmentInfos; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.SearcherManager; import org.elasticsearch.common.lucene.Lucene; import org.e... | import java.io.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.elasticsearch.common.lucene.*; import org.elasticsearch.index.store.*; | [
"java.io",
"org.apache.lucene",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; org.apache.lucene; org.elasticsearch.common; org.elasticsearch.index; | 2,577,881 |
public boolean remoteEquals(RemoteRef sub) {
if (sub instanceof UnicastRef)
return ref.remoteEquals(((UnicastRef)sub).ref);
return false;
} | boolean function(RemoteRef sub) { if (sub instanceof UnicastRef) return ref.remoteEquals(((UnicastRef)sub).ref); return false; } | /** default implementation of equals for remote objects
*/ | default implementation of equals for remote objects | remoteEquals | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/rmi/server/UnicastRef.java",
"license": "gpl-2.0",
"size": 18433
} | [
"java.rmi.server.RemoteRef"
] | import java.rmi.server.RemoteRef; | import java.rmi.server.*; | [
"java.rmi"
] | java.rmi; | 1,578,367 |
static public PyThread[] ThreadsFromXML(AbstractDebugTarget target, String payload) throws CoreException {
try {
SAXParser parser = getSAXParser();
XMLToThreadInfo info = new XMLToThreadInfo(target);
parser.parse(new ByteArrayInputStream(payload.getBytes()), info);
... | static PyThread[] function(AbstractDebugTarget target, String payload) throws CoreException { try { SAXParser parser = getSAXParser(); XMLToThreadInfo info = new XMLToThreadInfo(target); parser.parse(new ByteArrayInputStream(payload.getBytes()), info); return info.threads.toArray(new PyThread[0]); } catch (CoreExceptio... | /**
* Creates IThread[] from the XML response
*/ | Creates IThread[] from the XML response | ThreadsFromXML | {
"repo_name": "rgom/Pydev",
"path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/model/XMLUtils.java",
"license": "epl-1.0",
"size": 25976
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"javax.xml.parsers.SAXParser",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IStatus",
"org.python.pydev.debug.core.PydevDebugPlugin",
"org.xml.sax.SAXException"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import javax.xml.parsers.SAXParser; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.python.pydev.debug.core.PydevDebugPlugin; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import org.eclipse.core.runtime.*; import org.python.pydev.debug.core.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.eclipse.core",
"org.python.pydev",
"org.xml.sax"
] | java.io; javax.xml; org.eclipse.core; org.python.pydev; org.xml.sax; | 1,357,057 |
@Override
public byte[] getFirstRowKey() {
byte[] firstKey = getFirstKey();
return firstKey == null? null: KeyValue.createKeyValueFromKey(firstKey).getRow();
} | byte[] function() { byte[] firstKey = getFirstKey(); return firstKey == null? null: KeyValue.createKeyValueFromKey(firstKey).getRow(); } | /**
* TODO left from {@link HFile} version 1: move this to StoreFile after Ryan's
* patch goes in to eliminate {@link KeyValue} here.
*
* @return the first row key, or null if the file is empty.
*/ | TODO left from <code>HFile</code> version 1: move this to StoreFile after Ryan's patch goes in to eliminate <code>KeyValue</code> here | getFirstRowKey | {
"repo_name": "Guavus/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java",
"license": "apache-2.0",
"size": 60332
} | [
"org.apache.hadoop.hbase.KeyValue"
] | import org.apache.hadoop.hbase.KeyValue; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,487,910 |
public static RootFinderConfig.Builder builder() {
return new RootFinderConfig.Builder();
}
private RootFinderConfig(
double absoluteTolerance,
double relativeTolerance,
int maximumSteps) {
ArgChecker.notNegativeOrZero(absoluteTolerance, "absoluteTolerance");
ArgChecker.notNegativeO... | static RootFinderConfig.Builder function() { return new RootFinderConfig.Builder(); } private RootFinderConfig( double absoluteTolerance, double relativeTolerance, int maximumSteps) { ArgChecker.notNegativeOrZero(absoluteTolerance, STR); ArgChecker.notNegativeOrZero(relativeTolerance, STR); ArgChecker.notNegativeOrZero... | /**
* Returns a builder used to create an instance of the bean.
* @return the builder, not null
*/ | Returns a builder used to create an instance of the bean | builder | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/measure/src/main/java/com/opengamma/strata/measure/curve/RootFinderConfig.java",
"license": "apache-2.0",
"size": 14805
} | [
"com.opengamma.strata.collect.ArgChecker"
] | import com.opengamma.strata.collect.ArgChecker; | import com.opengamma.strata.collect.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 1,239,372 |
EClass getGlobalScriptTask(); | EClass getGlobalScriptTask(); | /**
* Returns the meta object for class '{@link org.eclipse.bpmn2.GlobalScriptTask <em>Global Script Task</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Global Script Task</em>'.
* @see org.eclipse.bpmn2.GlobalScriptTask
* @generated
*/ | Returns the meta object for class '<code>org.eclipse.bpmn2.GlobalScriptTask Global Script Task</code>'. | getGlobalScriptTask | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,299 |
private static void initDocument() throws Exception
{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dbBuilder = dbFactory.newDocumentBuilder();
doc = dbBuilder.parse(pathToResource);
docAlive = true;
} | static void function() throws Exception { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dbBuilder = dbFactory.newDocumentBuilder(); doc = dbBuilder.parse(pathToResource); docAlive = true; } | /**
* Initializes the Document representation of the salesforceMetadata.xml file
*
* @throws Exception
*/ | Initializes the Document representation of the salesforceMetadata.xml file | initDocument | {
"repo_name": "aesanch2/salesforce-migration-assistant",
"path": "src/main/java/org/jenkinsci/plugins/sma/SMAMetadataTypes.java",
"license": "mit",
"size": 4153
} | [
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory"
] | import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; | import javax.xml.parsers.*; | [
"javax.xml"
] | javax.xml; | 155,932 |
public static Context chain(Context... contexts) {
return chain(ImmutableList.copyOf(contexts));
} | static Context function(Context... contexts) { return chain(ImmutableList.copyOf(contexts)); } | /** Returns a context that wraps a list of contexts.
*
* <p>A call to {@code unwrap(C)} will return the first object that is an
* instance of {@code C}.
*
* <p>If any of the contexts is a {@link Context}, recursively looks in that
* object. Thus this method can be used to chain contexts.
*/ | Returns a context that wraps a list of contexts. A call to unwrap(C) will return the first object that is an instance of C. If any of the contexts is a <code>Context</code>, recursively looks in that object. Thus this method can be used to chain contexts | chain | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/plan/Contexts.java",
"license": "apache-2.0",
"size": 4588
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 168,528 |
private CmsPair<String, List<Object>> prepareRewriteAliasConditions(CmsRewriteAliasFilter filter) {
List<String> conditions = new ArrayList<String>();
conditions.add("1 = 1");
List<Object> parameters = new ArrayList<Object>();
if (filter.getSiteRoot() != null) {
paramete... | CmsPair<String, List<Object>> function(CmsRewriteAliasFilter filter) { List<String> conditions = new ArrayList<String>(); conditions.add(STR); List<Object> parameters = new ArrayList<Object>(); if (filter.getSiteRoot() != null) { parameters.add(filter.getSiteRoot()); conditions.add(STR); } if (filter.getId() != null) {... | /**
* Helper method to prepare the SQL conditions for accessing rewrite aliases using a given filter.<p>
*
* @param filter the filter to use for rewrite aliases
*
* @return a pair consisting of an SQL condition string and a list of query parameters
*/ | Helper method to prepare the SQL conditions for accessing rewrite aliases using a given filter | prepareRewriteAliasConditions | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/db/generic/CmsVfsDriver.java",
"license": "lgpl-2.1",
"size": 206070
} | [
"java.util.ArrayList",
"java.util.List",
"org.opencms.db.CmsRewriteAliasFilter",
"org.opencms.util.CmsPair",
"org.opencms.util.CmsStringUtil"
] | import java.util.ArrayList; import java.util.List; import org.opencms.db.CmsRewriteAliasFilter; import org.opencms.util.CmsPair; import org.opencms.util.CmsStringUtil; | import java.util.*; import org.opencms.db.*; import org.opencms.util.*; | [
"java.util",
"org.opencms.db",
"org.opencms.util"
] | java.util; org.opencms.db; org.opencms.util; | 586,933 |
Optional<List<Double>> getDoubleList(DataQuery path); | Optional<List<Double>> getDoubleList(DataQuery path); | /**
* Gets the {@link List} of {@link Double} by path, if available.
*
* <p>If a {@link List} of {@link Double} does not exist, or the data
* residing at the path is not an instance of a {@link List} of
* {@link Double}, an absent is returned.</p>
*
* @param path The path of the value... | Gets the <code>List</code> of <code>Double</code> by path, if available. If a <code>List</code> of <code>Double</code> does not exist, or the data residing at the path is not an instance of a <code>List</code> of <code>Double</code>, an absent is returned | getDoubleList | {
"repo_name": "ryantheleach/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/data/DataView.java",
"license": "mit",
"size": 17130
} | [
"java.util.List",
"java.util.Optional"
] | import java.util.List; import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 668,076 |
public void launchGuestUser(View view) {
FirebaseAuth.getInstance().signInAnonymously().addOnCompleteListener(task -> {
if (task.isSuccessful()) {
Bundle bundle = new Bundle();
bundle.putSerializable("user", User.getGuest());
Intent intent = new In... | void function(View view) { FirebaseAuth.getInstance().signInAnonymously().addOnCompleteListener(task -> { if (task.isSuccessful()) { Bundle bundle = new Bundle(); bundle.putSerializable("user", User.getGuest()); Intent intent = new Intent(this, WelcomeScreenController.class); intent.putExtras(bundle); startActivity(int... | /**
* Launch Guest user
* @param view current view
*/ | Launch Guest user | launchGuestUser | {
"repo_name": "Zighome24/CS2340_GoGreek",
"path": "app/RatTracker2k17/app/src/main/java/edu/gatech/cs2340/rattracker2k17/Controller/HomeScreenController.java",
"license": "mit",
"size": 2705
} | [
"android.content.Intent",
"android.os.Bundle",
"android.util.Log",
"android.view.View",
"android.widget.Toast",
"com.google.firebase.auth.FirebaseAuth",
"edu.gatech.cs2340.rattracker2k17.Model"
] | import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; import com.google.firebase.auth.FirebaseAuth; import edu.gatech.cs2340.rattracker2k17.Model; | import android.content.*; import android.os.*; import android.util.*; import android.view.*; import android.widget.*; import com.google.firebase.auth.*; import edu.gatech.cs2340.rattracker2k17.*; | [
"android.content",
"android.os",
"android.util",
"android.view",
"android.widget",
"com.google.firebase",
"edu.gatech.cs2340"
] | android.content; android.os; android.util; android.view; android.widget; com.google.firebase; edu.gatech.cs2340; | 1,841,595 |
public List<Integer> emit(Collection<Tuple> anchors, List<Object> tuple) {
return emit(Utils.DEFAULT_STREAM_ID, anchors, tuple);
} | List<Integer> function(Collection<Tuple> anchors, List<Object> tuple) { return emit(Utils.DEFAULT_STREAM_ID, anchors, tuple); } | /**
* Emits a new tuple to the default stream anchored on a group of input tuples. The emitted
* values must be immutable.
*
* @param anchors the tuples to anchor to
* @param tuple the new output tuple from this bolt
* @return the list of task ids that this new tuple was sent to
*/ | Emits a new tuple to the default stream anchored on a group of input tuples. The emitted values must be immutable | emit | {
"repo_name": "mrknmc/storm-mc",
"path": "storm-multicore/src/jvm/backtype/storm/task/OutputCollector.java",
"license": "apache-2.0",
"size": 9283
} | [
"java.util.Collection",
"java.util.List"
] | import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 507,481 |
public boolean isTrendVisible(final StaplerRequest request) {
GraphConfigurationView configuration = createUserConfiguration(request);
return configuration.isVisible() && configuration.hasMeaningfulGraph();
}
| boolean function(final StaplerRequest request) { GraphConfigurationView configuration = createUserConfiguration(request); return configuration.isVisible() && configuration.hasMeaningfulGraph(); } | /**
* Returns whether the trend graph is visible.
*
* @param request
* the request to get the cookie from
* @return <code>true</code> if the trend is visible
*/ | Returns whether the trend graph is visible | isTrendVisible | {
"repo_name": "recena/analysis-core-plugin",
"path": "src/main/java/hudson/plugins/analysis/core/AbstractProjectAction.java",
"license": "mit",
"size": 15161
} | [
"hudson.plugins.analysis.graph.GraphConfigurationView",
"org.kohsuke.stapler.StaplerRequest"
] | import hudson.plugins.analysis.graph.GraphConfigurationView; import org.kohsuke.stapler.StaplerRequest; | import hudson.plugins.analysis.graph.*; import org.kohsuke.stapler.*; | [
"hudson.plugins.analysis",
"org.kohsuke.stapler"
] | hudson.plugins.analysis; org.kohsuke.stapler; | 1,630,445 |
public void buildGraphicsNode(BridgeContext ctx,
Element e,
GraphicsNode node) {
ShapeNode shapeNode = (ShapeNode)node;
shapeNode.setShapePainter(createShapePainter(ctx, e, shapeNode));
super.buildGraphicsNode(ctx, e, node);... | void function(BridgeContext ctx, Element e, GraphicsNode node) { ShapeNode shapeNode = (ShapeNode)node; shapeNode.setShapePainter(createShapePainter(ctx, e, shapeNode)); super.buildGraphicsNode(ctx, e, node); } | /**
* Builds using the specified BridgeContext and element, the
* specified graphics node.
*
* @param ctx the bridge context to use
* @param e the element that describes the graphics node to build
* @param node the graphics node to build
*/ | Builds using the specified BridgeContext and element, the specified graphics node | buildGraphicsNode | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/bridge/SVGShapeElementBridge.java",
"license": "gpl-3.0",
"size": 7295
} | [
"org.apache.batik.gvt.GraphicsNode",
"org.apache.batik.gvt.ShapeNode",
"org.w3c.dom.Element"
] | import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.ShapeNode; import org.w3c.dom.Element; | import org.apache.batik.gvt.*; import org.w3c.dom.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 599,122 |
public static SchemaLocation getSchemaLocationForOGC() {
return SCHEMA_LOCATION_OGC;
}
| static SchemaLocation function() { return SCHEMA_LOCATION_OGC; } | /**
* SOS OGC schema location
*
* @return QName of schema location
*/ | SOS OGC schema location | getSchemaLocationForOGC | {
"repo_name": "sauloperez/sos",
"path": "src/core/api/src/main/java/org/n52/sos/util/N52XmlHelper.java",
"license": "apache-2.0",
"size": 11089
} | [
"org.n52.sos.w3c.SchemaLocation"
] | import org.n52.sos.w3c.SchemaLocation; | import org.n52.sos.w3c.*; | [
"org.n52.sos"
] | org.n52.sos; | 2,055,217 |
private String saveLoan() {
AutoCompleteTextView mUserText = (AutoCompleteTextView) getView().findViewById(R.id.loan_to_who);
String friend = mUserText.getText().toString();
BookData values = mEditManager.getBookData();
values.putString(CatalogueDBAdapter.KEY_LOANED_TO, friend);
mDbHelper.createLoan(v... | String function() { AutoCompleteTextView mUserText = (AutoCompleteTextView) getView().findViewById(R.id.loan_to_who); String friend = mUserText.getText().toString(); BookData values = mEditManager.getBookData(); values.putString(CatalogueDBAdapter.KEY_LOANED_TO, friend); mDbHelper.createLoan(values); return friend; } | /**
* Save the user and book combination as a loan in the database
*
* @return the user
*/ | Save the user and book combination as a loan in the database | saveLoan | {
"repo_name": "Imkal/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/BookEditLoaned.java",
"license": "gpl-3.0",
"size": 6346
} | [
"android.widget.AutoCompleteTextView"
] | import android.widget.AutoCompleteTextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 738,229 |
public void start_logfile(File p_filename)
{
if (board_is_read_only)
{
return;
}
logfile.start_write(p_filename);
} | void function(File p_filename) { if (board_is_read_only) { return; } logfile.start_write(p_filename); } | /**
* From here on the interactive actions are written to a logfile.
*/ | From here on the interactive actions are written to a logfile | start_logfile | {
"repo_name": "32bitmicro/Freerouting",
"path": "sources/interactive/BoardHandling.java",
"license": "gpl-3.0",
"size": 56816
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 468,197 |
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {
if (bevelType == RAISED) {
paintRaisedBevel(c, g, x, y, width, height);
} else if (bevelType == LOWERED) {
paintLoweredBevel(c, g, x, y, width, height);
}
} | void function(Component c, Graphics g, int x, int y, int width, int height) { if (bevelType == RAISED) { paintRaisedBevel(c, g, x, y, width, height); } else if (bevelType == LOWERED) { paintLoweredBevel(c, g, x, y, width, height); } } | /**
* Paints the border for the specified component with the specified
* position and size.
* @param c the component for which this border is being painted
* @param g the paint graphics
* @param x the x position of the painted border
* @param y the y position of the painted border
* @... | Paints the border for the specified component with the specified position and size | paintBorder | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/javax/swing/border/BevelBorder.java",
"license": "mit",
"size": 10390
} | [
"java.awt.Component",
"java.awt.Graphics"
] | import java.awt.Component; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,972,916 |
public void addPropertyChangeListener(final PropertyChangeListener listener) {
change.addPropertyChangeListener(listener);
} | void function(final PropertyChangeListener listener) { change.addPropertyChangeListener(listener); } | /**
* Method registers a property change listener which will be informed about state transitions.
*
* @param listener the change listener to register.
*/ | Method registers a property change listener which will be informed about state transitions | addPropertyChangeListener | {
"repo_name": "openbase/jul",
"path": "pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java",
"license": "lgpl-3.0",
"size": 7704
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,044,787 |
public static void serialize(Object o, String file, boolean compress) {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
serialize(o, fos, compress);
fos.flush();
} catch (IOException e) {
throw new RuntimeException(e);
... | static void function(Object o, String file, boolean compress) { FileOutputStream fos = null; try { fos = new FileOutputStream(file); serialize(o, fos, compress); fos.flush(); } catch (IOException e) { throw new RuntimeException(e); } finally { Execute.close(fos, logger); } } | /**
* method for quick serialization of an object
* @param o
* @param file
*/ | method for quick serialization of an object | serialize | {
"repo_name": "linkedin/indextank-engine",
"path": "flaptor-util/com/flaptor/util/IOUtil.java",
"license": "apache-2.0",
"size": 10370
} | [
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,738,922 |
public void sendData(SerialMessage serialMessage)
{
if (serialMessage.getMessageClass() != SerialMessageClass.SendData) {
logger.error(String.format("Invalid message class %s (0x%02X) for sendData", serialMessage.getMessageClass().getLabel(), serialMessage.getMessageClass().getKey()));
return;
... | void function(SerialMessage serialMessage) { if (serialMessage.getMessageClass() != SerialMessageClass.SendData) { logger.error(String.format(STR, serialMessage.getMessageClass().getLabel(), serialMessage.getMessageClass().getKey())); return; } if (serialMessage.getMessageType() != SerialMessageType.Request) { logger.e... | /**
* Transmits the SerialMessage to a single Z-Wave Node.
* Sets the transmission options as well.
* @param serialMessage the Serial message to send.
*/ | Transmits the SerialMessage to a single Z-Wave Node. Sets the transmission options as well | sendData | {
"repo_name": "noushadali/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java",
"license": "gpl-3.0",
"size": 53107
} | [
"org.openhab.binding.zwave.internal.commandclass.ZWaveCommandClass",
"org.openhab.binding.zwave.internal.commandclass.ZWaveWakeUpCommandClass",
"org.openhab.binding.zwave.internal.protocol.SerialMessage",
"org.openhab.binding.zwave.internal.protocol.ZWaveNode"
] | import org.openhab.binding.zwave.internal.commandclass.ZWaveCommandClass; import org.openhab.binding.zwave.internal.commandclass.ZWaveWakeUpCommandClass; import org.openhab.binding.zwave.internal.protocol.SerialMessage; import org.openhab.binding.zwave.internal.protocol.ZWaveNode; | import org.openhab.binding.zwave.internal.commandclass.*; import org.openhab.binding.zwave.internal.protocol.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 82,613 |
public String extractEcosystem(String baseEcosystem, VulnerableSoftware parsedCpe) {
return extractEcosystem(baseEcosystem, parsedCpe.getVendor(), parsedCpe.getProduct(), parsedCpe.getTargetSw());
} | String function(String baseEcosystem, VulnerableSoftware parsedCpe) { return extractEcosystem(baseEcosystem, parsedCpe.getVendor(), parsedCpe.getProduct(), parsedCpe.getTargetSw()); } | /**
* Attempts to determine the ecosystem based on the vendor, product and
* targetSw.
*
* @param baseEcosystem the base ecosystem
* @param parsedCpe the CPE identifier
* @return the ecosystem if one is identified
*/ | Attempts to determine the ecosystem based on the vendor, product and targetSw | extractEcosystem | {
"repo_name": "jeremylong/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveItemOperator.java",
"license": "apache-2.0",
"size": 9748
} | [
"org.owasp.dependencycheck.dependency.VulnerableSoftware"
] | import org.owasp.dependencycheck.dependency.VulnerableSoftware; | import org.owasp.dependencycheck.dependency.*; | [
"org.owasp.dependencycheck"
] | org.owasp.dependencycheck; | 626,843 |
public void run() throws IOException {
execTransfer();
execCircuit();
interpretResult();
}
| void function() throws IOException { execTransfer(); execCircuit(); interpretResult(); } | /**
* Method for running the AES op (client and server).
*
* @throws IOException
*/ | Method for running the AES op (client and server) | run | {
"repo_name": "factcenter/inchworm",
"path": "src/main/java/org/factcenter/fastgc/inchworm/AesOpCommon.java",
"license": "mit",
"size": 15497
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,932,878 |
public static ByteBuffer encrypt(String data) {
return encrypt(data, DEFAULT_KEY);
}
/**
* Encrypt the {@code data} string using the {@code key} | static ByteBuffer function(String data) { return encrypt(data, DEFAULT_KEY); } /** * Encrypt the {@code data} string using the {@code key} | /**
* Encrypt the specified {@code data} string.
*
* @param data
* @return a byte buffer with the encrypted data
*/ | Encrypt the specified data string | encrypt | {
"repo_name": "bigtreeljc/concourse",
"path": "concourse-driver-java/src/main/java/org/cinchapi/concourse/security/ClientSecurity.java",
"license": "apache-2.0",
"size": 4507
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,338,427 |
public synchronized void nodeEvent(final RMNodeEvent event) {
// Update cumulative times based on activity and inactivity during the last time interval
final long currentTimeStamp = System.nanoTime();
final long timeInterval = currentTimeStamp - this.previousTimeStamp;
this.cumulativ... | synchronized void function(final RMNodeEvent event) { final long currentTimeStamp = System.nanoTime(); final long timeInterval = currentTimeStamp - this.previousTimeStamp; this.cumulativeActivityTime += this.busyNodesCount * timeInterval; this.cumulativeInactivityTime += this.freeNodesCount * timeInterval; this.previou... | /**
* Handle incoming node events of the Resource Manager
* @param event incoming event
*/ | Handle incoming node events of the Resource Manager | nodeEvent | {
"repo_name": "ShatalovYaroslav/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/utils/RMStatistics.java",
"license": "agpl-3.0",
"size": 20823
} | [
"org.ow2.proactive.resourcemanager.common.NodeState",
"org.ow2.proactive.resourcemanager.common.event.RMNodeEvent"
] | import org.ow2.proactive.resourcemanager.common.NodeState; import org.ow2.proactive.resourcemanager.common.event.RMNodeEvent; | import org.ow2.proactive.resourcemanager.common.*; import org.ow2.proactive.resourcemanager.common.event.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 1,059,816 |
void overconstrainedAdjustEndIndent(Object source, String elementName, int amount, Locator loc); | void overconstrainedAdjustEndIndent(Object source, String elementName, int amount, Locator loc); | /**
* An overconstrained geometry adjustment rule was triggered (5.3.4, XSL 1.0).
* @param source the event source
* @param elementName the formatting object
* @param amount the amount of the adjustment (in mpt)
* @param loc the location of the error or null
* @event.severity INFO
*/ | An overconstrained geometry adjustment rule was triggered (5.3.4, XSL 1.0) | overconstrainedAdjustEndIndent | {
"repo_name": "StrategyObject/fop",
"path": "src/java/org/apache/fop/layoutmgr/BlockLevelEventProducer.java",
"license": "apache-2.0",
"size": 8564
} | [
"org.xml.sax.Locator"
] | import org.xml.sax.Locator; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,774,288 |
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
if (stack.hasDisplayName())
{
TileEntity tileentity = worldIn.getTileEntity(pos);
i... | void function(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { super.onBlockPlacedBy(worldIn, pos, state, placer, stack); if (stack.hasDisplayName()) { TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof TileEntityHopper) { ((TileEntityHopper)tileenti... | /**
* Called by ItemBlocks after a block is set in the world, to allow post-place logic
*/ | Called by ItemBlocks after a block is set in the world, to allow post-place logic | onBlockPlacedBy | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockHopper.java",
"license": "lgpl-2.1",
"size": 10212
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.item.ItemStack",
"net.minecraft.tileentity.TileEntity",
"net.minecraft.tileentity.TileEntityHopper",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityHopper; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.tileentity.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.tileentity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.item; net.minecraft.tileentity; net.minecraft.util; net.minecraft.world; | 871,490 |
public String getSum(File file){
try {
return getSum(new FileInputStream(file));
} catch (FileNotFoundException e) {
return "failed: "+e.getMessage();
}
} | String function(File file){ try { return getSum(new FileInputStream(file)); } catch (FileNotFoundException e) { return STR+e.getMessage(); } } | /**
* Gets the checksum for the given file
* @param file
* @return
*/ | Gets the checksum for the given file | getSum | {
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/util/CheckSum.java",
"license": "gpl-3.0",
"size": 5435
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 1,938,548 |
public IntroductoryTour startTour(String tourKey) {
IntroductoryTour tour = null;
Class<? extends IntroductoryTour> tourClass = tours.get(tourKey);
try {
tour = tourClass.newInstance();
tour.startTour();
} catch (InstantiationException e) {
LogService.getRoot().log(Level.WARNING, NOT_STARTED, new Ob... | IntroductoryTour function(String tourKey) { IntroductoryTour tour = null; Class<? extends IntroductoryTour> tourClass = tours.get(tourKey); try { tour = tourClass.newInstance(); tour.startTour(); } catch (InstantiationException e) { LogService.getRoot().log(Level.WARNING, NOT_STARTED, new Object[] {tourKey}); throw new... | /**
* Starts the Tour with the given key and returns the running object
* @param tourKey key/name of the Tour
* @return returns the running object or throws a RuntimeException if the key doesn't match any tour.
*/ | Starts the Tour with the given key and returns the running object | startTour | {
"repo_name": "aborg0/RapidMiner-Unuk",
"path": "src/com/rapidminer/gui/tour/TourManager.java",
"license": "agpl-3.0",
"size": 9825
} | [
"com.rapidminer.tools.LogService",
"java.util.logging.Level"
] | import com.rapidminer.tools.LogService; import java.util.logging.Level; | import com.rapidminer.tools.*; import java.util.logging.*; | [
"com.rapidminer.tools",
"java.util"
] | com.rapidminer.tools; java.util; | 424,687 |
ModTweaker.LATE_ADDITIONS.add(new Add(new MoistenerRecipe(toStack(input), toStack(output), packagingTime)));
}
private static class Add extends BaseAddForestry<IMoistenerRecipe> {
public Add(IMoistenerRecipe recipe) {
super(Moistener.name, RecipeManagers.moistenerManager, recip... | ModTweaker.LATE_ADDITIONS.add(new Add(new MoistenerRecipe(toStack(input), toStack(output), packagingTime))); } private static class Add extends BaseAddForestry<IMoistenerRecipe> { public Add(IMoistenerRecipe recipe) { super(Moistener.name, RecipeManagers.moistenerManager, recipe); } | /**
* Adds recipe to Moistener
*
* @param output recipe product
* @param input required item
* @param packagingTime amount of ticks per crafting operation
*/ | Adds recipe to Moistener | addRecipe | {
"repo_name": "jaredlll08/ModTweaker",
"path": "src/main/java/com/blamejared/compat/forestry/Moistener.java",
"license": "mit",
"size": 6344
} | [
"com.blamejared.ModTweaker",
"com.blamejared.mtlib.helpers.InputHelper",
"com.blamejared.mtlib.utils.BaseAddForestry"
] | import com.blamejared.ModTweaker; import com.blamejared.mtlib.helpers.InputHelper; import com.blamejared.mtlib.utils.BaseAddForestry; | import com.blamejared.*; import com.blamejared.mtlib.helpers.*; import com.blamejared.mtlib.utils.*; | [
"com.blamejared",
"com.blamejared.mtlib"
] | com.blamejared; com.blamejared.mtlib; | 826,708 |
protected static HandleType of(MethodDescription.InDefinedShape methodDescription) {
if (methodDescription.isStatic()) {
return INVOKE_STATIC;
} else if (methodDescription.isPrivate()) {
return INVOKE_SPECIAL;
} else if ... | static HandleType function(MethodDescription.InDefinedShape methodDescription) { if (methodDescription.isStatic()) { return INVOKE_STATIC; } else if (methodDescription.isPrivate()) { return INVOKE_SPECIAL; } else if (methodDescription.isConstructor()) { return INVOKE_SPECIAL_CONSTRUCTOR; } else if (methodDescription.ge... | /**
* Extracts a handle type for invoking the given method.
*
* @param methodDescription The method for which a handle type should be found.
* @return The handle type for the given method.
*/ | Extracts a handle type for invoking the given method | of | {
"repo_name": "mches/byte-buddy",
"path": "byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java",
"license": "apache-2.0",
"size": 59108
} | [
"net.bytebuddy.description.method.MethodDescription"
] | import net.bytebuddy.description.method.MethodDescription; | import net.bytebuddy.description.method.*; | [
"net.bytebuddy.description"
] | net.bytebuddy.description; | 581,544 |
@Inject
@Optional
protected void cutText(@UIEventTopic(TestEditorUIEventConstants.EDIT_CONTEXTMENU_CNTRL_X) String data) {
if (isThisPartOnTop() && !isFocusInSubComponent()) {
String textData = getStyledText().getSelectionText();
if (textData != null && textData.length() > 0) {
TestEditorTestData... | void function(@UIEventTopic(TestEditorUIEventConstants.EDIT_CONTEXTMENU_CNTRL_X) String data) { if (isThisPartOnTop() && !isFocusInSubComponent()) { String textData = getStyledText().getSelectionText(); if (textData != null && textData.length() > 0) { TestEditorTestDataTransferContainer dataContainer = testCaseControll... | /**
* cut the selected testComponent and store the text in the clipboard.
*
* @param data
* optional data
*/ | cut the selected testComponent and store the text in the clipboard | cutText | {
"repo_name": "test-editor/test-editor",
"path": "ui/org.testeditor.ui/src/main/java/org/testeditor/ui/parts/editor/view/TestEditorViewBasis.java",
"license": "epl-1.0",
"size": 29767
} | [
"org.eclipse.e4.ui.di.UIEventTopic",
"org.testeditor.ui.constants.TestEditorUIEventConstants"
] | import org.eclipse.e4.ui.di.UIEventTopic; import org.testeditor.ui.constants.TestEditorUIEventConstants; | import org.eclipse.e4.ui.di.*; import org.testeditor.ui.constants.*; | [
"org.eclipse.e4",
"org.testeditor.ui"
] | org.eclipse.e4; org.testeditor.ui; | 536,876 |
public long sizeOf()
{
return INSTANCE_SIZE + SizeOf.sizeOf(array) + (segments * SIZE_OF_SEGMENT);
} | long function() { return INSTANCE_SIZE + SizeOf.sizeOf(array) + (segments * SIZE_OF_SEGMENT); } | /**
* Returns the size of this big array in bytes.
*/ | Returns the size of this big array in bytes | sizeOf | {
"repo_name": "Teradata/presto",
"path": "presto-array/src/main/java/com/facebook/presto/array/LongBigArray.java",
"license": "apache-2.0",
"size": 4220
} | [
"io.airlift.slice.SizeOf"
] | import io.airlift.slice.SizeOf; | import io.airlift.slice.*; | [
"io.airlift.slice"
] | io.airlift.slice; | 2,375,606 |
public List<JsonRpcResponse> submit(Wavelet wavelet, String rpcServerUrl) throws IOException {
return waveService.submit(wavelet, rpcServerUrl);
}
/**
* Returns an empty/blind stub of a wavelet with the given wave id and wavelet
* id.
*
* Call this method if you would like to apply wavelet-only o... | List<JsonRpcResponse> function(Wavelet wavelet, String rpcServerUrl) throws IOException { return waveService.submit(wavelet, rpcServerUrl); } /** * Returns an empty/blind stub of a wavelet with the given wave id and wavelet * id. * * Call this method if you would like to apply wavelet-only operations * without fetching... | /**
* Submits the pending operations associated with this {@link Wavelet}.
*
* @param wavelet the bundle that contains the operations to be submitted.
* @param rpcServerUrl the active gateway to send the operations to.
* @return a list of {@link JsonRpcResponse} that represents the responses
* fro... | Submits the pending operations associated with this <code>Wavelet</code> | submit | {
"repo_name": "gburd/wave",
"path": "src/com/google/wave/api/AbstractRobot.java",
"license": "apache-2.0",
"size": 33213
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,209,304 |
private void addComponents(Color borderColor)
{
// create the labels
generationLabel = new JLabel(GENERATION + " 0.");
statusLabel = new JLabel(status);
currentCursorPositionLabel = new JLabel(CURSOR_POSITION_STRING);
currentCursorValueLabel = new JLabel(CURSOR_VALUE_STRING);
String ruleSelecti... | void function(Color borderColor) { generationLabel = new JLabel(GENERATION + STR); statusLabel = new JLabel(status); currentCursorPositionLabel = new JLabel(CURSOR_POSITION_STRING); currentCursorValueLabel = new JLabel(CURSOR_VALUE_STRING); String ruleSelection = (String) outerPanel.getRulePanel().getRuleTree() .getSel... | /**
* Create and arrange a panel holding the CA status messages.
*
* @return The panel holding the status messages such as the current rule,
* current generation, my moniker, etc.
*/ | Create and arrange a panel holding the CA status messages | addComponents | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "cellularAutomata/graphics/StatusPanel.java",
"license": "apache-2.0",
"size": 22629
} | [
"java.awt.Color",
"java.awt.Dimension",
"java.awt.FlowLayout",
"java.awt.Font",
"java.awt.GridBagLayout",
"javax.swing.BorderFactory",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridBagLayout; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,999,255 |
public void onUsbMassStorageConnectionChanged(boolean connected) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeInt(((con... | void function(boolean connected) throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeInt(((connected) ? (1) : (0))); mRemote.transact(Stub.TRANSACTION_onUsbMassStorageConnectionChanged, _data, _reply, 0); _reply.readException(... | /**
* Detection state of USB Mass Storage has changed
*
* @param available true if a UMS host is connected.
*/ | Detection state of USB Mass Storage has changed | onUsbMassStorageConnectionChanged | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/os/storage/IMountServiceListener.java",
"license": "apache-2.0",
"size": 6607
} | [
"android.os.Parcel",
"android.os.RemoteException"
] | import android.os.Parcel; import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,050,340 |
public Value value() throws IOException;
| Value function() throws IOException; | /**
* Consume {@link JsonStreamToken#VALUE} token.
* @return value
* @throws IOException
*/ | Consume <code>JsonStreamToken#VALUE</code> token | value | {
"repo_name": "AntonMykolaienko/xml2json",
"path": "staxon/core/src/main/java/de/odysseus/staxon/json/stream/JsonStreamSource.java",
"license": "apache-2.0",
"size": 2650
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,437,269 |
private JPanel getSecurityContainerPanel() {
if (securityContainerPanel == null) {
securityContainerPanel = new MethodSecurityPanel(info, info.getService(), method);
securityContainerPanel.setBorder(BorderFactory.createTitledBorder(null,
"Method Level Security Configu... | JPanel function() { if (securityContainerPanel == null) { securityContainerPanel = new MethodSecurityPanel(info, info.getService(), method); securityContainerPanel.setBorder(BorderFactory.createTitledBorder(null, STR, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, PortalLookAndFeel.getPanelLab... | /**
* This method initializes securityContainerPanel
*
* @return javax.swing.JPanel
*/ | This method initializes securityContainerPanel | getSecurityContainerPanel | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/introduce/src/java/Portal/gov/nih/nci/cagrid/introduce/portal/modification/services/methods/MethodViewer.java",
"license": "bsd-3-clause",
"size": 133307
} | [
"gov.nih.nci.cagrid.common.portal.PortalLookAndFeel",
"gov.nih.nci.cagrid.introduce.portal.modification.security.MethodSecurityPanel",
"javax.swing.BorderFactory",
"javax.swing.JPanel",
"javax.swing.border.TitledBorder"
] | import gov.nih.nci.cagrid.common.portal.PortalLookAndFeel; import gov.nih.nci.cagrid.introduce.portal.modification.security.MethodSecurityPanel; import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.border.TitledBorder; | import gov.nih.nci.cagrid.common.portal.*; import gov.nih.nci.cagrid.introduce.portal.modification.security.*; import javax.swing.*; import javax.swing.border.*; | [
"gov.nih.nci",
"javax.swing"
] | gov.nih.nci; javax.swing; | 1,692,403 |
public ResponseManager getResponseManager(){
return s.getResponseManager();
} | ResponseManager function(){ return s.getResponseManager(); } | /**
* The response manager of the active instance
* @return the response manager
*/ | The response manager of the active instance | getResponseManager | {
"repo_name": "ulyfm/FD2",
"path": "FoodDrop/src/us/noop/server/Main.java",
"license": "bsd-3-clause",
"size": 1598
} | [
"us.noop.server.response.ResponseManager"
] | import us.noop.server.response.ResponseManager; | import us.noop.server.response.*; | [
"us.noop.server"
] | us.noop.server; | 2,148,513 |
@SuppressWarnings("unchecked") private static ChangeBlockEvent.Pre callChangeBlockEventPre(final WorldServerBridge worldIn, final ImmutableList<Location<World>> locations, @Nullable Object source) {
try (final CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
... | @SuppressWarnings(STR) static ChangeBlockEvent.Pre function(final WorldServerBridge worldIn, final ImmutableList<Location<World>> locations, @Nullable Object source) { try (final CauseStackManager.StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) { final PhaseContext<?> phaseContext = PhaseTracker.getI... | /**
* Processes pre block event data then fires event.
*
* @param worldIn The world
* @param locations The locations affected
* @param source The source of event
* @return The event
*/ | Processes pre block event data then fires event | callChangeBlockEventPre | {
"repo_name": "SpongePowered/SpongeCommon",
"path": "src/main/java/org/spongepowered/common/event/SpongeCommonEventFactory.java",
"license": "mit",
"size": 99325
} | [
"com.google.common.collect.ImmutableList",
"javax.annotation.Nullable",
"net.minecraft.entity.player.EntityPlayer",
"org.spongepowered.api.Sponge",
"org.spongepowered.api.entity.living.player.Player",
"org.spongepowered.api.entity.living.player.User",
"org.spongepowered.api.event.CauseStackManager",
"... | import com.google.common.collect.ImmutableList; import javax.annotation.Nullable; import net.minecraft.entity.player.EntityPlayer; import org.spongepowered.api.Sponge; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.entity.living.player.User; import org.spongepowered.api.event.Cau... | import com.google.common.collect.*; import javax.annotation.*; import net.minecraft.entity.player.*; import org.spongepowered.api.*; import org.spongepowered.api.entity.living.player.*; import org.spongepowered.api.event.*; import org.spongepowered.api.event.block.*; import org.spongepowered.api.event.cause.*; import o... | [
"com.google.common",
"javax.annotation",
"net.minecraft.entity",
"org.spongepowered.api",
"org.spongepowered.common"
] | com.google.common; javax.annotation; net.minecraft.entity; org.spongepowered.api; org.spongepowered.common; | 1,341,463 |
private Object deparsePrimitive(Object obj, PrimitiveObjectInspector primOI) {
return primOI.getPrimitiveJavaObject(obj);
} | Object function(Object obj, PrimitiveObjectInspector primOI) { return primOI.getPrimitiveJavaObject(obj); } | /**
* Deparses a primitive type.
*
* @param obj - Hive object to deparse
* @param primOI - ObjectInspector for the object
* @return - A deparsed object
*/ | Deparses a primitive type | deparsePrimitive | {
"repo_name": "micmiu/bigdata-tutorial",
"path": "hive-demo/src/main/java/com/micmiu/hive/serde/JSONCDHSerDe.java",
"license": "apache-2.0",
"size": 13815
} | [
"org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector"
] | import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; | import org.apache.hadoop.hive.serde2.objectinspector.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 967,905 |
public void pow(final double a,
final double[] operand, final int operandOffset,
final double[] result, final int resultOffset) {
// create the function value and derivatives
// [a^x, ln(a) a^x, ln(a)^2 a^x,, ln(a)^3 a^x, ... ]
final double[] function... | void function(final double a, final double[] operand, final int operandOffset, final double[] result, final int resultOffset) { final double[] function = new double[1 + order]; if (a == 0) { if (operand[operandOffset] == 0) { function[0] = 1; double infinity = Double.POSITIVE_INFINITY; for (int i = 1; i < function.leng... | /** Compute power of a double to a derivative structure.
* @param a number to exponentiate
* @param operand array holding the power
* @param operandOffset offset of the power in its array
* @param result array where result must be stored (for
* power the result array <em>cannot</em> be the inpu... | Compute power of a double to a derivative structure | pow | {
"repo_name": "virtualdataset/metagen-java",
"path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/analysis/differentiation/DSCompiler.java",
"license": "apache-2.0",
"size": 78787
} | [
"java.util.Arrays",
"org.apache.commons.math4.util.FastMath"
] | import java.util.Arrays; import org.apache.commons.math4.util.FastMath; | import java.util.*; import org.apache.commons.math4.util.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 566,840 |
public @Nullable Map<String, Object> getExportedViewConstants() {
return null;
} | @Nullable Map<String, Object> function() { return null; } | /**
* Returns a map of view-specific constants that are injected to JavaScript. These constants are
* made accessible via UIManager.<ViewName>.Constants.
*/ | Returns a map of view-specific constants that are injected to JavaScript. These constants are made accessible via UIManager..Constants | getExportedViewConstants | {
"repo_name": "Helena-High/school-app",
"path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java",
"license": "apache-2.0",
"size": 7681
} | [
"java.util.Map",
"javax.annotation.Nullable"
] | import java.util.Map; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 2,267,899 |
public static final AtomicQuantityImpl createAtomicQuantity (
URI uri,
Units units,
DataType datatype,
String value
)
throws SetDataException, IllegalAccessException
{
logger.debug(" create AQ.");
logger.debug(" create AQ. Got URI:"+uri.toASCIIString());
AtomicQuantityImpl q = new AtomicQua... | static final AtomicQuantityImpl function ( URI uri, Units units, DataType datatype, String value ) throws SetDataException, IllegalAccessException { logger.debug(STR); logger.debug(STR+uri.toASCIIString()); AtomicQuantityImpl q = new AtomicQuantityImpl(uri); q.setUnits(units); q.setDataType(datatype); q.setValue(value,... | /** General helper method to construct atomic quantities.
*
* @param id
* @param units
* @param datatype
* @param value
* @param properties
* @return
* @throws SetDataException
* @throws IllegalAccessException
*/ | General helper method to construct atomic quantities | createAtomicQuantity | {
"repo_name": "brianthomas/qml",
"path": "src/main/java/net/datamodel/qml/builder/SimpleQuantityBuilder.java",
"license": "lgpl-3.0",
"size": 4740
} | [
"net.datamodel.qml.DataType",
"net.datamodel.qml.SetDataException",
"net.datamodel.qml.Units",
"net.datamodel.qml.core.AtomicQuantityImpl"
] | import net.datamodel.qml.DataType; import net.datamodel.qml.SetDataException; import net.datamodel.qml.Units; import net.datamodel.qml.core.AtomicQuantityImpl; | import net.datamodel.qml.*; import net.datamodel.qml.core.*; | [
"net.datamodel.qml"
] | net.datamodel.qml; | 2,771,332 |
public Map<String, String> getExtraHeaders() {
return mExtraHeaders;
} | Map<String, String> function() { return mExtraHeaders; } | /**
* Return the extra headers as a map.
*/ | Return the extra headers as a map | getExtraHeaders | {
"repo_name": "CTSRD-SOAAP/chromium-42.0.2311.135",
"path": "content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java",
"license": "bsd-3-clause",
"size": 15043
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 799,581 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.