method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected Component newRatingStarBar(String id, IModel<Integer> nrOfStars) { return new RatingStarBar(id, nrOfStars); }
Component function(String id, IModel<Integer> nrOfStars) { return new RatingStarBar(id, nrOfStars); }
/** * Creates a new bar filled with stars to click on. * * @param id * the bar id * @param nrOfStars * the number of stars to generate * @return the bar with rating stars */
Creates a new bar filled with stars to click on
newRatingStarBar
{ "repo_name": "Servoy/wicket", "path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/rating/RatingPanel.java", "license": "apache-2.0", "size": 14143 }
[ "org.apache.wicket.Component", "org.apache.wicket.model.IModel" ]
import org.apache.wicket.Component; import org.apache.wicket.model.IModel;
import org.apache.wicket.*; import org.apache.wicket.model.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,634,045
public static void removeRemoteAddress() { MDC.remove(PARAMETER_REMOTE_ADDRESS); }
static void function() { MDC.remove(PARAMETER_REMOTE_ADDRESS); }
/** * Removes from the thread space the remote address */
Removes from the thread space the remote address
removeRemoteAddress
{ "repo_name": "accesstest3/cfunambol", "path": "common/server-framework/src/main/java/com/funambol/framework/logging/LogContext.java", "license": "agpl-3.0", "size": 10237 }
[ "org.apache.log4j.MDC" ]
import org.apache.log4j.MDC;
import org.apache.log4j.*;
[ "org.apache.log4j" ]
org.apache.log4j;
1,078,138
protected void fireValueChange(boolean force) { String currentValue = getValue(); if (force || !currentValue.equals(m_previousValue)) { m_previousValue = currentValue; ValueChangeEvent.fire(this, currentValue); } }
void function(boolean force) { String currentValue = getValue(); if (force !currentValue.equals(m_previousValue)) { m_previousValue = currentValue; ValueChangeEvent.fire(this, currentValue); } }
/** * Fires the value change event, if the value has changed.<p> * * @param force <code>true</code> to force firing the event, not regarding an actually changed value */
Fires the value change event, if the value has changed
fireValueChange
{ "repo_name": "mediaworx/opencms-core", "path": "src-gwt/org/opencms/acacia/client/widgets/A_CmsEditWidget.java", "license": "lgpl-2.1", "size": 3671 }
[ "com.google.gwt.event.logical.shared.ValueChangeEvent" ]
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.*;
[ "com.google.gwt" ]
com.google.gwt;
1,059,904
protected void beforeNode(SimpleNode node) throws Exception { this.lastNode = node; beforeNodeWithoutSettintgLastNode(node); }
void function(SimpleNode node) throws Exception { this.lastNode = node; beforeNodeWithoutSettintgLastNode(node); }
/** * Writes the specials before and starts recording * @throws Exception */
Writes the specials before and starts recording
beforeNode
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev.parser/src/org/python/pydev/parser/prettyprinterv2/PrettyPrinterUtilsV2.java", "license": "epl-1.0", "size": 5384 }
[ "org.python.pydev.parser.jython.SimpleNode" ]
import org.python.pydev.parser.jython.SimpleNode;
import org.python.pydev.parser.jython.*;
[ "org.python.pydev" ]
org.python.pydev;
2,543,119
public void run() { _saveCancelled = false; PhotoTableEntry entry = null; Photo photo = null; int numPhotos = _photoTableModel.getRowCount(); _progressBar.setMaximum(numPhotos); _progressBar.setValue(0); _progressBar.setVisible(true); boolean overwriteFlag = _overwriteCheckbox.isSelected(); int nu...
void function() { _saveCancelled = false; PhotoTableEntry entry = null; Photo photo = null; int numPhotos = _photoTableModel.getRowCount(); _progressBar.setMaximum(numPhotos); _progressBar.setValue(0); _progressBar.setVisible(true); boolean overwriteFlag = _overwriteCheckbox.isSelected(); int numSaved = 0, numFailed = ...
/** * Run method for saving in separate thread */
Run method for saving in separate thread
run
{ "repo_name": "sebastic/GpsPrune", "path": "tim/prune/save/ExifSaver.java", "license": "gpl-2.0", "size": 14654 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,660,146
static native int jni_CSSNodeGetInstanceCount(); private CSSNode mParent; private List<CSSNode> mChildren; private MeasureFunction mMeasureFunction; private long mNativePointer; private Object mData; private boolean mHasSetPadding = false; private boolean mHasSetMargin = false; private boolean mHasS...
static native int jni_CSSNodeGetInstanceCount(); private CSSNode mParent; private List<CSSNode> mChildren; private MeasureFunction mMeasureFunction; private long mNativePointer; private Object mData; private boolean mHasSetPadding = false; private boolean mHasSetMargin = false; private boolean mHasSetBorder = false; pr...
/** * Get native instance count. Useful for testing only. */
Get native instance count. Useful for testing only
jni_CSSNodeGetInstanceCount
{ "repo_name": "tausifmuzaffar/bisApp", "path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/csslayout/CSSNode.java", "license": "apache-2.0", "size": 16508 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
599,851
public Date getLastUpdated() { return lastUpdated; }
Date function() { return lastUpdated; }
/** * Gets the date when the feed was last updated. * Added so that easy comparison between feeds should work. * @return */
Gets the date when the feed was last updated. Added so that easy comparison between feeds should work
getLastUpdated
{ "repo_name": "Z-app/zmote", "path": "src/se/z_app/social/Feed.java", "license": "bsd-2-clause", "size": 2321 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
75,300
public String toHexString() { StringBuilder sb = new StringBuilder(bytes.length * 2); for (byte b : bytes) { sb.append(Hex.getString(b)); } return sb.toString(); }
String function() { StringBuilder sb = new StringBuilder(bytes.length * 2); for (byte b : bytes) { sb.append(Hex.getString(b)); } return sb.toString(); }
/** * This will take this string and create a hex representation of the bytes that make the string. * * @return A hex string representing the bytes in this string. */
This will take this string and create a hex representation of the bytes that make the string
toHexString
{ "repo_name": "ZhenyaM/veraPDF-pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/cos/COSString.java", "license": "apache-2.0", "size": 8958 }
[ "org.apache.pdfbox.util.Hex" ]
import org.apache.pdfbox.util.Hex;
import org.apache.pdfbox.util.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
467,442
public void setUserPersistence(UserPersistence userPersistence) { this.userPersistence = userPersistence; }
void function(UserPersistence userPersistence) { this.userPersistence = userPersistence; }
/** * Sets the user persistence. * * @param userPersistence the user persistence */
Sets the user persistence
setUserPersistence
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/whp_sites_countryLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 175847 }
[ "com.liferay.portal.service.persistence.UserPersistence" ]
import com.liferay.portal.service.persistence.UserPersistence;
import com.liferay.portal.service.persistence.*;
[ "com.liferay.portal" ]
com.liferay.portal;
684,788
public SecurityType getSecurityType() { return securityType; }
SecurityType function() { return securityType; }
/** * Gets this ClusterEntity's security type. * * @return the current SecurityType */
Gets this ClusterEntity's security type
getSecurityType
{ "repo_name": "radicalbit/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java", "license": "apache-2.0", "size": 10466 }
[ "org.apache.ambari.server.state.SecurityType" ]
import org.apache.ambari.server.state.SecurityType;
import org.apache.ambari.server.state.*;
[ "org.apache.ambari" ]
org.apache.ambari;
2,029,680
private static String encodeBytes( byte[] source ) { // Since we're not going to have the GZIP encoding turned on, // we're not going to have an java.io.IOException thrown, so // we should not force the user to have to catch it. String encoded = null; try { encode...
static String function( byte[] source ) { String encoded = null; try { encoded = encodeBytes(source, 0, source.length, NO_OPTIONS); } catch (java.io.IOException ex) { assert false : ex.getMessage(); } assert encoded != null; return encoded; }
/** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @return The data in Base64-encoded form * @throws NullPointerException if source array is null * @since 1.4 */
Encodes a byte array into Base64 notation. Does not GZip-compress data
encodeBytes
{ "repo_name": "ryanlfoster/httpsig-java", "path": "api/src/main/java/net/adamcin/httpsig/api/Base64.java", "license": "unlicense", "size": 88397 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,332,194
@Test public void testSpiQueryUsesDedicatedThreadPool() throws Exception { startGrid("server"); try (Ignite client = startGrid("client")) { IgniteCache<Byte, Byte> cache = client.cache(CACHE_NAME); for (byte b = 0; b < Byte.MAX_VALUE; ++b) cache.put(b, b...
void function() throws Exception { startGrid(STR); try (Ignite client = startGrid(STR)) { IgniteCache<Byte, Byte> cache = client.cache(CACHE_NAME); for (byte b = 0; b < Byte.MAX_VALUE; ++b) cache.put(b, b); QueryCursor<Cache.Entry<Byte, Byte>> cursor = cache.query(new SpiQuery<Byte, Byte>()); List<Cache.Entry<Byte, Byt...
/** * Tests that SPI queries are executed in dedicated pool * @throws Exception If failed. */
Tests that SPI queries are executed in dedicated pool
testSpiQueryUsesDedicatedThreadPool
{ "repo_name": "andrey-kuznetsov/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteQueryDedicatedPoolTest.java", "license": "apache-2.0", "size": 11273 }
[ "java.util.List", "javax.cache.Cache", "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCache", "org.apache.ignite.cache.query.QueryCursor", "org.apache.ignite.cache.query.SpiQuery", "org.apache.ignite.internal.managers.communication.GridIoPolicy" ]
import java.util.List; import javax.cache.Cache; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SpiQuery; import org.apache.ignite.internal.managers.communication.GridIoPolicy;
import java.util.*; import javax.cache.*; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.managers.communication.*;
[ "java.util", "javax.cache", "org.apache.ignite" ]
java.util; javax.cache; org.apache.ignite;
2,154,947
public static void d(String message, Object... args) { if(MDMAgent.getIsDebuggable() && message != null){ // do something for a debug build Logger.d(message,args); } }
static void function(String message, Object... args) { if(MDMAgent.getIsDebuggable() && message != null){ Logger.d(message,args); } }
/** * Send a DEBUG log message * @param message String message to log * @param args Objects */
Send a DEBUG log message
d
{ "repo_name": "flyve-mdm/flyve-mdm-android", "path": "app/src/main/java/org/flyve/mdm/agent/utils/FlyveLog.java", "license": "gpl-3.0", "size": 4734 }
[ "com.orhanobut.logger.Logger", "org.flyve.mdm.agent.ui.MDMAgent" ]
import com.orhanobut.logger.Logger; import org.flyve.mdm.agent.ui.MDMAgent;
import com.orhanobut.logger.*; import org.flyve.mdm.agent.ui.*;
[ "com.orhanobut.logger", "org.flyve.mdm" ]
com.orhanobut.logger; org.flyve.mdm;
1,937,514
public static <K, V> Hashtable<K, V> newHashtable( ) { Hashtable<K, V> piTmp0 = null; piTmp0 = AccessController.doPrivileged( new PrivilegedAction<Hashtable<K, V>>( ) {
static <K, V> Hashtable<K, V> function( ) { Hashtable<K, V> piTmp0 = null; piTmp0 = AccessController.doPrivileged( new PrivilegedAction<Hashtable<K, V>>( ) {
/** * Instantiate a new Hashtable * * @param <K> * @param <V> * @return */
Instantiate a new Hashtable
newHashtable
{ "repo_name": "Charling-Huang/birt", "path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/util/SecurityUtil.java", "license": "epl-1.0", "size": 23839 }
[ "java.security.AccessController", "java.security.PrivilegedAction", "java.util.Hashtable" ]
import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Hashtable;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,865,575
public void setLocalSubscription(LocalSubscription localSubscription) { this.localSubscription = localSubscription; }
void function(LocalSubscription localSubscription) { this.localSubscription = localSubscription; }
/** * Set AMQP local subscription for current event * * @param localSubscription * Local subscription */
Set AMQP local subscription for current event
setLocalSubscription
{ "repo_name": "Asitha/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/delivery/DeliveryEventData.java", "license": "apache-2.0", "size": 5039 }
[ "org.wso2.andes.subscription.LocalSubscription" ]
import org.wso2.andes.subscription.LocalSubscription;
import org.wso2.andes.subscription.*;
[ "org.wso2.andes" ]
org.wso2.andes;
1,830,134
File home = new File(MEDIA_PATH); if(!home.exists()) { home.mkdir(); return songsList; } if (home.listFiles(new FileExtensionFilter()).length > 0) { songsList.clear();; for (File file : home.listFiles(new FileExtensionFilter())) { HashMap<String, St...
File home = new File(MEDIA_PATH); if(!home.exists()) { home.mkdir(); return songsList; } if (home.listFiles(new FileExtensionFilter()).length > 0) { songsList.clear();; for (File file : home.listFiles(new FileExtensionFilter())) { HashMap<String, String> song = new HashMap<String, String>(); song.put(STR, file.getName(...
/** * Function to read all mp3 files from sdcard * and store the details in ArrayList * */
Function to read all mp3 files from sdcard and store the details in ArrayList
getPlayList
{ "repo_name": "farleylai/xLL", "path": "Android/xLL/src/main/java/edu/uiowa/cs/xll/SongsManager.java", "license": "gpl-3.0", "size": 5151 }
[ "java.io.File", "java.util.HashMap" ]
import java.io.File; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,489,487
public void testMetatdataAfterProcRecompile () throws SQLException { Statement stmt = createStatement(); stmt.executeUpdate("create procedure dummyint( " + "in a integer, in b integer, " + "out c integer, inout d integer) " + "language java external name " ...
void function () throws SQLException { Statement stmt = createStatement(); stmt.executeUpdate(STR + STR + STR + STR + STR + STR + STR); CallableStatement cs = prepareCall(STR); cs.registerOutParameter(3,Types.INTEGER); cs.registerOutParameter(4,Types.INTEGER); cs.setInt(1,1); cs.setInt(2,1); cs.setInt(4,4); String para...
/** * test behaviour of meta data and out params after re-compile * * @exception SQLException if error occurs */
test behaviour of meta data and out params after re-compile
testMetatdataAfterProcRecompile
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java", "license": "agpl-3.0", "size": 46727 }
[ "java.sql.CallableStatement", "java.sql.SQLException", "java.sql.Statement", "java.sql.Types" ]
import java.sql.CallableStatement; import java.sql.SQLException; import java.sql.Statement; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,299,642
public IndexSearcher createSearcher() { MemoryIndexReader reader = new MemoryIndexReader(); IndexSearcher searcher = new IndexSearcher(reader); // ensures no auto-close !! reader.setSearcher(searcher); // to later get hold of searcher.getSimilarity() return searcher; }
IndexSearcher function() { MemoryIndexReader reader = new MemoryIndexReader(); IndexSearcher searcher = new IndexSearcher(reader); reader.setSearcher(searcher); return searcher; }
/** * Creates and returns a searcher that can be used to execute arbitrary * Lucene queries and to collect the resulting query results as hits. * * @return a searcher */
Creates and returns a searcher that can be used to execute arbitrary Lucene queries and to collect the resulting query results as hits
createSearcher
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java", "license": "apache-2.0", "size": 46620 }
[ "org.apache.lucene.search.IndexSearcher" ]
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.*;
[ "org.apache.lucene" ]
org.apache.lucene;
883,823
public List<ACL> convertLong(Long aclL) { return dataTree.convertLong(aclL); }
List<ACL> function(Long aclL) { return dataTree.convertLong(aclL); }
/** * convert from long to the acl entry * @param aclL the long for which to get the acl * @return the acl corresponding to this long entry */
convert from long to the acl entry
convertLong
{ "repo_name": "tenaciousjzh/titan-solr-cloud-test", "path": "zookeeper-3.3.5/src/java/main/org/apache/zookeeper/server/ZKDatabase.java", "license": "apache-2.0", "size": 15873 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,315,048
private JPanel buildDataTypeTabbedPane() { IconManager icons = IconManager.getInstance(); Icon projectIcon = icons.getIcon(IconManager.PROJECT); projectPanel = buildProjectSelectionPanel(); Icon screenIcon = icons.getIcon(IconManager.SCREEN); screenPanel = buildScreenSelectionPanel(); tabbedPane = ...
JPanel function() { IconManager icons = IconManager.getInstance(); Icon projectIcon = icons.getIcon(IconManager.PROJECT); projectPanel = buildProjectSelectionPanel(); Icon screenIcon = icons.getIcon(IconManager.SCREEN); screenPanel = buildScreenSelectionPanel(); tabbedPane = new JTabbedPane(); tabbedPane.addTab(TEXT_PR...
/** * Builds a TabbedPane holding the Screen / Project import sections * @return The tab panel for Screen / Project selection */
Builds a TabbedPane holding the Screen / Project import sections
buildDataTypeTabbedPane
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/LocationDialog.java", "license": "gpl-2.0", "size": 56281 }
[ "javax.swing.Icon", "javax.swing.JPanel", "javax.swing.JTabbedPane", "org.openmicroscopy.shoola.agents.fsimporter.IconManager" ]
import javax.swing.Icon; import javax.swing.JPanel; import javax.swing.JTabbedPane; import org.openmicroscopy.shoola.agents.fsimporter.IconManager;
import javax.swing.*; import org.openmicroscopy.shoola.agents.fsimporter.*;
[ "javax.swing", "org.openmicroscopy.shoola" ]
javax.swing; org.openmicroscopy.shoola;
1,965,275
public boolean doAllTasks() throws InterruptedException { Toast.makeText(context, "Synchronizing...", Toast.LENGTH_LONG).show(); getOrder(); //Bulk.Builder bulkB = new Bulk.Builder().defaultIndex(db).defaultType("habittype"); String previousAction = "start"; HabitType prev...
boolean function() throws InterruptedException { Toast.makeText(context, STR, Toast.LENGTH_LONG).show(); getOrder(); String previousAction = "start"; HabitType previousHabit = null; for (int i=0; i<k.length; i++){ String gsonObject = v[i]; HabitType hT = gson.fromJson(gsonObject, HabitType.class); if(k[i].equals("a")){...
/** * looks through all the tasks and perfroms the appropriate actions */
looks through all the tasks and perfroms the appropriate actions
doAllTasks
{ "repo_name": "CMPUT301F17T28/NOTcmput301", "path": "app/src/main/java/com/notcmput301/habitbook/NetworkHandler.java", "license": "mit", "size": 12404 }
[ "android.util.Log", "android.widget.Toast" ]
import android.util.Log; import android.widget.Toast;
import android.util.*; import android.widget.*;
[ "android.util", "android.widget" ]
android.util; android.widget;
1,962,819
private void setupMenu() { final JMenuBar menu = new JMenuBar(); menu.add(createEditMenu()); menu.add(createMeasuresMenu()); menu.add(createHelpMenu()); setJMenuBar(menu); }
void function() { final JMenuBar menu = new JMenuBar(); menu.add(createEditMenu()); menu.add(createMeasuresMenu()); menu.add(createHelpMenu()); setJMenuBar(menu); }
/** * Setup the form's main menu. */
Setup the form's main menu
setupMenu
{ "repo_name": "larmer01/Mote", "path": "src/edu/missouristate/mote/Mote.java", "license": "mit", "size": 13787 }
[ "javax.swing.JMenuBar" ]
import javax.swing.JMenuBar;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,677,061
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": "electrum/presto", "path": "lib/trino-array/src/main/java/io/trino/array/ByteBigArray.java", "license": "apache-2.0", "size": 5379 }
[ "io.airlift.slice.SizeOf" ]
import io.airlift.slice.SizeOf;
import io.airlift.slice.*;
[ "io.airlift.slice" ]
io.airlift.slice;
2,479,694
private void setTimeModified(long milliseconds) { TextView tv = getView().findViewById(R.id.fdModified); if (tv != null) { tv.setText(DisplayUtils.unixTimeToHumanReadable(milliseconds)); } }
void function(long milliseconds) { TextView tv = getView().findViewById(R.id.fdModified); if (tv != null) { tv.setText(DisplayUtils.unixTimeToHumanReadable(milliseconds)); } }
/** * Updates the time that the file was last modified * * @param milliseconds Unix time to set */
Updates the time that the file was last modified
setTimeModified
{ "repo_name": "hannesa2/owncloud-android", "path": "owncloudApp/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java", "license": "gpl-2.0", "size": 19935 }
[ "android.widget.TextView", "com.owncloud.android.utils.DisplayUtils" ]
import android.widget.TextView; import com.owncloud.android.utils.DisplayUtils;
import android.widget.*; import com.owncloud.android.utils.*;
[ "android.widget", "com.owncloud.android" ]
android.widget; com.owncloud.android;
225,175
public static Collection<LineageEventBuilder> load(Collection<? extends State> states) { Preconditions.checkArgument(states != null && !states.isEmpty()); Set<LineageEventBuilder> allEvents = Sets.newHashSet(); for (State state : states) { Map<String, LineageEventBuilder> branchedEvents = load(state...
static Collection<LineageEventBuilder> function(Collection<? extends State> states) { Preconditions.checkArgument(states != null && !states.isEmpty()); Set<LineageEventBuilder> allEvents = Sets.newHashSet(); for (State state : states) { Map<String, LineageEventBuilder> branchedEvents = load(state); allEvents.addAll(bra...
/** * Load all lineage information from {@link State}s of a dataset * * @param states All states which belong to the same dataset * @return A collection of {@link LineageEventBuilder}s put in the state */
Load all lineage information from <code>State</code>s of a dataset
load
{ "repo_name": "pcadabam/gobblin", "path": "gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/event/lineage/LineageInfo.java", "license": "apache-2.0", "size": 10129 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Sets", "java.util.Collection", "java.util.Map", "java.util.Set", "org.apache.gobblin.configuration.State" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import java.util.Collection; import java.util.Map; import java.util.Set; import org.apache.gobblin.configuration.State;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.gobblin.configuration.*;
[ "com.google.common", "java.util", "org.apache.gobblin" ]
com.google.common; java.util; org.apache.gobblin;
1,348,935
public void setOperationName(QName operationName);
void function(QName operationName);
/** * Sets the name of the operation to be invoked using this * <code>Call</code> instance. * * @param operationName QName of the operation to be * invoked using the Call instance */
Sets the name of the operation to be invoked using this <code>Call</code> instance
setOperationName
{ "repo_name": "jgallimore/axis-with-mods", "path": "src/javax/xml/rpc/Call.java", "license": "apache-2.0", "size": 16285 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,172,521
void handleEmpty(AppliedPTransform<?, ?, ?> transform);
void handleEmpty(AppliedPTransform<?, ?, ?> transform);
/** * Handle an input bundle that did not require processing. * * <p>This occurs when a Source has no splits that can currently produce outputs. */
Handle an input bundle that did not require processing. This occurs when a Source has no splits that can currently produce outputs
handleEmpty
{ "repo_name": "lukecwik/incubator-beam", "path": "runners/direct-java/src/main/java/org/apache/beam/runners/direct/CompletionCallback.java", "license": "apache-2.0", "size": 1830 }
[ "org.apache.beam.sdk.runners.AppliedPTransform" ]
import org.apache.beam.sdk.runners.AppliedPTransform;
import org.apache.beam.sdk.runners.*;
[ "org.apache.beam" ]
org.apache.beam;
2,545,017
@Test(expectedExceptions = IllegalArgumentException.class) public void testContainsAllNull() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); test.containsAll(null); }
@Test(expectedExceptions = IllegalArgumentException.class) void function() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); test.containsAll(null); }
/** * Tests that the containsAll() method does not accept null. */
Tests that the containsAll() method does not accept null
testContainsAllNull
{ "repo_name": "McLeodMoores/starling", "path": "projects/util/src/test/java/com/opengamma/id/ExternalIdBundleTest.java", "license": "apache-2.0", "size": 22614 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,503,137
public static HOGMConstantDeclaration makeConstantDeclaration( Expression expression) { HOGMConstantDeclaration declaration = null; if (Expressions.hasFunctor(expression, FUNCTOR_CONSTANT_DECLARATION)) { int numArgs = expression.numberOfArguments(); if (numArgs > 0) { // Extract arguments Expr...
static HOGMConstantDeclaration function( Expression expression) { HOGMConstantDeclaration declaration = null; if (Expressions.hasFunctor(expression, FUNCTOR_CONSTANT_DECLARATION)) { int numArgs = expression.numberOfArguments(); if (numArgs > 0) { Expression name = expression.get(0); Expression arity = Expressions.ZERO;...
/** * Make a constant declaration object. Will default the arity of the * constant declaration to 0 and range to be of sort 'Boolean' if not * specified in the expression passed in. * * @param expression * an expression in the form of a constant declaration. * @return a HOGMConstantDeclaration...
Make a constant declaration object. Will default the arity of the constant declaration to 0 and range to be of sort 'Boolean' if not specified in the expression passed in
makeConstantDeclaration
{ "repo_name": "aic-sri-international/aic-praise", "path": "src/main/java/com/sri/ai/praise/core/representation/classbased/hogm/components/HOGMConstantDeclaration.java", "license": "bsd-3-clause", "size": 12484 }
[ "com.sri.ai.expresso.api.Expression", "com.sri.ai.expresso.helper.Expressions" ]
import com.sri.ai.expresso.api.Expression; import com.sri.ai.expresso.helper.Expressions;
import com.sri.ai.expresso.api.*; import com.sri.ai.expresso.helper.*;
[ "com.sri.ai" ]
com.sri.ai;
2,176,769
protected void assertSubsumedBy(String subAtomicConcept,String superAtomicConcept,boolean expectedResult) { if (!subAtomicConcept.contains("#")) subAtomicConcept=NS+subAtomicConcept; if (!superAtomicConcept.contains("#")) superAtomicConcept=NS+superAtomicConcept; ...
void function(String subAtomicConcept,String superAtomicConcept,boolean expectedResult) { if (!subAtomicConcept.contains("#")) subAtomicConcept=NS+subAtomicConcept; if (!superAtomicConcept.contains("#")) superAtomicConcept=NS+superAtomicConcept; OWLClass subClass=m_dataFactory.getOWLClass(IRI.create(subAtomicConcept));...
/** * Tests whether the atomic concept subAtomicConcept is subsumed by the atomic concept superAtomicConcept and asserts that this coincides with the expected result. * * @param subAtomicConcept * a string that represents an atomic concept. If no prefix is given, NS is used as prefix ...
Tests whether the atomic concept subAtomicConcept is subsumed by the atomic concept superAtomicConcept and asserts that this coincides with the expected result
assertSubsumedBy
{ "repo_name": "hrsky/PIOT", "path": "src/Hermit/test/org/semanticweb/HermiT/reasoner/AbstractReasonerTest.java", "license": "gpl-2.0", "size": 26913 }
[ "org.semanticweb.owlapi.model.IRI", "org.semanticweb.owlapi.model.OWLClass" ]
import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
1,621,693
public String getAsText() { for(int i=0;i<stdColors.length;i++) { if(stdColors[i].equals(getValue())) { return stdColorNames[i]; } } return "#" + Integer.toHexString(((Color)getValue()...
String function() { for(int i=0;i<stdColors.length;i++) { if(stdColors[i].equals(getValue())) { return stdColorNames[i]; } } return "#" + Integer.toHexString(((Color)getValue()).getRGB() & 0x00FFFFFF); }
/** getAsText for Color turns the color into either one of the standard ** colors or into an RGB hex value with # prepended. **/
getAsText for Color turns the color into either one of the standard
getAsText
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/java/beans/editors/ColorEditor.java", "license": "gpl-2.0", "size": 4205 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,809,654
public void shutdown() { if (plugins != null) { for (ServicePlugin p : plugins) { try { p.stop(); LOG.info("Stopped plug-in " + p); } catch (Throwable t) { LOG.warn("ServicePlugin " + p + " could not be stopped", t); } } } this.unRegis...
void function() { if (plugins != null) { for (ServicePlugin p : plugins) { try { p.stop(); LOG.info(STR + p); } catch (Throwable t) { LOG.warn(STR + p + STR, t); } } } this.unRegisterMXBean(); if (infoServer != null) { try { infoServer.stop(); } catch (Exception e) { LOG.warn(STR, e); } } if (ipcServer != null) { ipcSe...
/** * Shut down this instance of the datanode. * Returns only after shutdown is complete. * This method can only be called by the offerService thread. * Otherwise, deadlock might occur. */
Shut down this instance of the datanode. Returns only after shutdown is complete. This method can only be called by the offerService thread. Otherwise, deadlock might occur
shutdown
{ "repo_name": "williamsentosa/hadoop-modified", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 85969 }
[ "java.io.IOException", "org.apache.hadoop.ipc.RPC", "org.apache.hadoop.util.ServicePlugin" ]
import java.io.IOException; import org.apache.hadoop.ipc.RPC; import org.apache.hadoop.util.ServicePlugin;
import java.io.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,016,707
private UnconditionalValueDerefSet propagateDerefSetsToMergeInputValues(UnconditionalValueDerefSet fact, Edge edge) { ValueNumberFrame blockValueNumberFrame = vnaDataflow.getResultFact(edge.getSource()); ValueNumberFrame targetValueNumberFrame = vnaDataflow.getStartFact(edge.getTarget()); ...
UnconditionalValueDerefSet function(UnconditionalValueDerefSet fact, Edge edge) { ValueNumberFrame blockValueNumberFrame = vnaDataflow.getResultFact(edge.getSource()); ValueNumberFrame targetValueNumberFrame = vnaDataflow.getStartFact(edge.getTarget()); UnconditionalValueDerefSet originalFact = fact; fact = duplicateFa...
/** * Find out if any VNs in the source block contribute to unconditionally * dereferenced VNs in the target block. If so, the VN in the source block * is also unconditionally dereferenced, and we must propagate the target * VN's dereferences. * * @param fact * a dataflow v...
Find out if any VNs in the source block contribute to unconditionally dereferenced VNs in the target block. If so, the VN in the source block is also unconditionally dereferenced, and we must propagate the target VN's dereferences
propagateDerefSetsToMergeInputValues
{ "repo_name": "OpenNTF/FindBug-for-Domino-Designer", "path": "findBugsEclipsePlugin/src/edu/umd/cs/findbugs/ba/deref/UnconditionalValueDerefAnalysis.java", "license": "lgpl-3.0", "size": 41057 }
[ "edu.umd.cs.findbugs.ba.Edge", "edu.umd.cs.findbugs.ba.vna.AvailableLoad", "edu.umd.cs.findbugs.ba.vna.ValueNumber", "edu.umd.cs.findbugs.ba.vna.ValueNumberFrame" ]
import edu.umd.cs.findbugs.ba.Edge; import edu.umd.cs.findbugs.ba.vna.AvailableLoad; import edu.umd.cs.findbugs.ba.vna.ValueNumber; import edu.umd.cs.findbugs.ba.vna.ValueNumberFrame;
import edu.umd.cs.findbugs.ba.*; import edu.umd.cs.findbugs.ba.vna.*;
[ "edu.umd.cs" ]
edu.umd.cs;
585,574
public void givesHintToOther(Player target, Suit suit);
void function(Player target, Suit suit);
/** * The player gives a hint to another player. * * The target player learns which of her cards have the given suit. * * @param target the player receiving the hint * @param suit the suit that is revealed */
The player gives a hint to another player. The target player learns which of her cards have the given suit
givesHintToOther
{ "repo_name": "kazocsaba/Hanabi", "path": "Player-API/src/main/java/hu/kazocsaba/hanabi/player/api/OtherPlayerActionFeedback.java", "license": "mit", "size": 2228 }
[ "hu.kazocsaba.hanabi.model.Player", "hu.kazocsaba.hanabi.model.Suit" ]
import hu.kazocsaba.hanabi.model.Player; import hu.kazocsaba.hanabi.model.Suit;
import hu.kazocsaba.hanabi.model.*;
[ "hu.kazocsaba.hanabi" ]
hu.kazocsaba.hanabi;
2,380,353
private ClassReader typeInfo(final String type) { return new ClassReader(this.bytes.getBytes(type).value()); }
ClassReader function(final String type) { return new ClassReader(this.bytes.getBytes(type).value()); }
/** * Returns a ClassReader corresponding to the given class or interface. * * @param type * the internal name of a class or interface. * @return the ClassReader corresponding to 'type'. */
Returns a ClassReader corresponding to the given class or interface
typeInfo
{ "repo_name": "y252zhan/pitest-diff", "path": "pitest/src/main/java/org/pitest/util/ComputeClassWriter.java", "license": "apache-2.0", "size": 6487 }
[ "org.objectweb.asm.ClassReader" ]
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
434,019
public Date getLastModified() { return lastModified; }
Date function() { return lastModified; }
/** * DOCUMENTATION PENDING * * @return DOCUMENTATION PENDING */
DOCUMENTATION PENDING
getLastModified
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-hibernate/src/java/org/sakaiproject/tool/assessment/data/dao/questionpool/QuestionPoolData.java", "license": "apache-2.0", "size": 11219 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,836,769
public Builder addExpand(String element) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.add(element); return this; }
Builder function(String element) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.add(element); return this; }
/** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * ApplePayDomainCreateParams#expand} for the field documentation. */
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>ApplePayDomainCreateParams#expand</code> for the field documentation
addExpand
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/ApplePayDomainCreateParams.java", "license": "mit", "size": 3711 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
758,707
public void updateEncryptLayout() { if (!mPgpData.hasSignatureKey()) { mCryptoSignatureCheckbox.setText(R.string.btn_crypto_sign); mCryptoSignatureCheckbox.setChecked(false); mCryptoSignatureUserId.setVisibility(View.INVISIBLE); mCryptoSignatureUserIdRest.setV...
void function() { if (!mPgpData.hasSignatureKey()) { mCryptoSignatureCheckbox.setText(R.string.btn_crypto_sign); mCryptoSignatureCheckbox.setChecked(false); mCryptoSignatureUserId.setVisibility(View.INVISIBLE); mCryptoSignatureUserIdRest.setVisibility(View.INVISIBLE); } else { mCryptoSignatureCheckbox.setText(STRSTR <S...
/** * Fill the encrypt layout with the latest data about signature key and encryption keys. */
Fill the encrypt layout with the latest data about signature key and encryption keys
updateEncryptLayout
{ "repo_name": "hoverkey/honeybee", "path": "sdk/examples/k9mail/src/com/fsck/k9/activity/MessageCompose.java", "license": "lgpl-3.0", "size": 152924 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,710,604
public String getContextURL(Mode mode, Format format, String desc, Class<? extends BaseComponentDef> type, boolean modified) throws QuickFixException { return getContextURL(mode, format, definitionService.getDefDescriptor(desc, type), modified); }
String function(Mode mode, Format format, String desc, Class<? extends BaseComponentDef> type, boolean modified) throws QuickFixException { return getContextURL(mode, format, definitionService.getDefDescriptor(desc, type), modified); }
/** * Get a context for use with a get/post. * * @param mode the Aura mode to use. * @param format the format (HTML vs JSON) to use * @param desc the descriptor name to set as the primary object. * @param type the type of descriptor. * @param modified break the context uid. */
Get a context for use with a get/post
getContextURL
{ "repo_name": "madmax983/aura", "path": "aura-impl/src/test/java/org/auraframework/impl/util/AuraTestingUtil.java", "license": "apache-2.0", "size": 32783 }
[ "org.auraframework.def.BaseComponentDef", "org.auraframework.system.AuraContext", "org.auraframework.throwable.quickfix.QuickFixException" ]
import org.auraframework.def.BaseComponentDef; import org.auraframework.system.AuraContext; import org.auraframework.throwable.quickfix.QuickFixException;
import org.auraframework.def.*; import org.auraframework.system.*; import org.auraframework.throwable.quickfix.*;
[ "org.auraframework.def", "org.auraframework.system", "org.auraframework.throwable" ]
org.auraframework.def; org.auraframework.system; org.auraframework.throwable;
1,202,819
public final void startFakeDeath() { setIsFakeDeath(true); abortAttack(); abortCast(); getAI().notifyEvent(CtrlEvent.EVT_FAKE_DEATH, null); broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_START_FAKEDEATH)); }
final void function() { setIsFakeDeath(true); abortAttack(); abortCast(); getAI().notifyEvent(CtrlEvent.EVT_FAKE_DEATH, null); broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_START_FAKEDEATH)); }
/** * Active the abnormal effect Fake Death flag, notify the L2Character AI and send Server->Client UserInfo/CharInfo packet.<BR> * <BR> */
Active the abnormal effect Fake Death flag, notify the L2Character AI and send Server->Client UserInfo/CharInfo packet.
startFakeDeath
{ "repo_name": "oonym/l2InterludeServer", "path": "L2J_Server/java/net/sf/l2j/gameserver/model/L2Character.java", "license": "gpl-2.0", "size": 231634 }
[ "net.sf.l2j.gameserver.ai.CtrlEvent", "net.sf.l2j.gameserver.serverpackets.ChangeWaitType" ]
import net.sf.l2j.gameserver.ai.CtrlEvent; import net.sf.l2j.gameserver.serverpackets.ChangeWaitType;
import net.sf.l2j.gameserver.ai.*; import net.sf.l2j.gameserver.serverpackets.*;
[ "net.sf.l2j" ]
net.sf.l2j;
1,958,081
public DiscoveryNode getNode() { return node; }
DiscoveryNode function() { return node; }
/** * Node the store belongs to */
Node the store belongs to
getNode
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoresResponse.java", "license": "apache-2.0", "size": 14579 }
[ "org.elasticsearch.cluster.node.DiscoveryNode" ]
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
2,882,486
@XmlElement(name = "permission") public <P extends Permission> P getPermission();
@XmlElement(name = STR) <P extends Permission> P function();
/** * Gets the {@link Permission} that this {@link RolePermission} has. * * @return The {@link Permission} that this {@link RolePermission} has. */
Gets the <code>Permission</code> that this <code>RolePermission</code> has
getPermission
{ "repo_name": "cbaerikebc/kapua", "path": "service/security/authorization/api/src/main/java/org/eclipse/kapua/service/authorization/role/RolePermission.java", "license": "epl-1.0", "size": 3250 }
[ "javax.xml.bind.annotation.XmlElement", "org.eclipse.kapua.service.authorization.permission.Permission" ]
import javax.xml.bind.annotation.XmlElement; import org.eclipse.kapua.service.authorization.permission.Permission;
import javax.xml.bind.annotation.*; import org.eclipse.kapua.service.authorization.permission.*;
[ "javax.xml", "org.eclipse.kapua" ]
javax.xml; org.eclipse.kapua;
2,261,167
public static RenderingControl getRenderingControl(Registry context, Long pixelsID, boolean init) { if (!(context.equals(registry))) throw new IllegalArgumentException("Not allow to access method."); if (init && singleton.rndSvcProxiesCount.containsKey(pixelsID)) { Integer count = singleton.rndSvcProxi...
static RenderingControl function(Registry context, Long pixelsID, boolean init) { if (!(context.equals(registry))) throw new IllegalArgumentException(STR); if (init && singleton.rndSvcProxiesCount.containsKey(pixelsID)) { Integer count = singleton.rndSvcProxiesCount.get(pixelsID); count++; singleton.rndSvcProxiesCount....
/** * Returns the {@link RenderingControl} linked to the passed set of pixels, * returns <code>null</code> if no proxy associated. * * @param context Reference to the registry. To ensure that agents cannot * call the method. It must be a reference to the * container's re...
Returns the <code>RenderingControl</code> linked to the passed set of pixels, returns <code>null</code> if no proxy associated
getRenderingControl
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/PixelsServicesFactory.java", "license": "gpl-2.0", "size": 25213 }
[ "org.openmicroscopy.shoola.env.config.Registry" ]
import org.openmicroscopy.shoola.env.config.Registry;
import org.openmicroscopy.shoola.env.config.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,782,839
@Generated @Selector("timeoutIntervalForResource") public native double timeoutIntervalForResource();
@Selector(STR) native double function();
/** * If set, overrides the timeout interval for any network resources retrieved by this operation. * If not explicitly set, defaults to a value based on the operation's @c qualityOfService * * @see NSURLSessionConfiguration.timeoutIntervalForResource */
If set, overrides the timeout interval for any network resources retrieved by this operation. If not explicitly set, defaults to a value based on the operation's @c qualityOfService
timeoutIntervalForResource
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/cloudkit/CKOperationConfiguration.java", "license": "apache-2.0", "size": 13522 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
525,498
public String create() { try { this.crudService = new BreakTimeCRUDService(); BreakTimeCRUD crud = crudService.getBreakTimeCRUDPort(); this.promoFinderService = new PromoFinderService(); PromoFinder finderPort = promoFinderService.getPromoFinderPort(); ...
String function() { try { this.crudService = new BreakTimeCRUDService(); BreakTimeCRUD crud = crudService.getBreakTimeCRUDPort(); this.promoFinderService = new PromoFinderService(); PromoFinder finderPort = promoFinderService.getPromoFinderPort(); cBreakTime.setStart(DateFormat.toXmlCalendar(startDate)); cBreakTime.set...
/** * Create a break time * @return a string indicating the break time is created */
Create a break time
create
{ "repo_name": "malaverdiere/jseduite", "path": "hci/WebAdmin/src/java/webadmin/breaktime/BreakTimeManagedBean.java", "license": "lgpl-3.0", "size": 14652 }
[ "fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTime", "fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTimeCRUD", "fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTimeCRUDService", "fr.unice.i3s.modalis.jseduite.technical.breaktime.Promo", "fr.unice.i3s.modalis.jseduite.technical.prom...
import fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTime; import fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTimeCRUD; import fr.unice.i3s.modalis.jseduite.technical.breaktime.BreakTimeCRUDService; import fr.unice.i3s.modalis.jseduite.technical.breaktime.Promo; import fr.unice.i3s.modalis.jseduite....
import fr.unice.i3s.modalis.jseduite.technical.breaktime.*; import fr.unice.i3s.modalis.jseduite.technical.promos.*; import java.util.*;
[ "fr.unice.i3s", "java.util" ]
fr.unice.i3s; java.util;
1,667,084
@Override public int hashCode() { if (isNaN()) { return 9; } return MathUtils.hash(data); }
int function() { if (isNaN()) { return 9; } return MathUtils.hash(data); }
/** * {@inheritDoc} All {@code NaN} values have the same hash code. */
All NaN values have the same hash code
hashCode
{ "repo_name": "tbepler/seq-svm", "path": "src/org/apache/commons/math3/linear/ArrayRealVector.java", "license": "mit", "size": 30088 }
[ "org.apache.commons.math3.util.MathUtils" ]
import org.apache.commons.math3.util.MathUtils;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
177,849
public static <T> Set<Class<? super T>> getDirectlyImplementedInterfaces(Class<T> clazz) { Contracts.assertNotNull( clazz ); Set<Class<? super T>> classes = newHashSet(); getImplementedInterfaces( clazz, classes ); return classes; }
static <T> Set<Class<? super T>> function(Class<T> clazz) { Contracts.assertNotNull( clazz ); Set<Class<? super T>> classes = newHashSet(); getImplementedInterfaces( clazz, classes ); return classes; }
/** * Gets all interfaces (and recursively their super-interfaces) which the * given class directly implements. Interfaces implemented by super-classes * are not contained. * * @param clazz the class for which to retrieve the implemented interfaces * @param <T> the type of the class * * @return Set of a...
Gets all interfaces (and recursively their super-interfaces) which the given class directly implements. Interfaces implemented by super-classes are not contained
getDirectlyImplementedInterfaces
{ "repo_name": "mxrenkin/hibernate-validator", "path": "engine/src/main/java/org/hibernate/validator/internal/util/classhierarchy/ClassHierarchyHelper.java", "license": "apache-2.0", "size": 4208 }
[ "java.util.Set", "org.hibernate.validator.internal.util.CollectionHelper", "org.hibernate.validator.internal.util.Contracts" ]
import java.util.Set; import org.hibernate.validator.internal.util.CollectionHelper; import org.hibernate.validator.internal.util.Contracts;
import java.util.*; import org.hibernate.validator.internal.util.*;
[ "java.util", "org.hibernate.validator" ]
java.util; org.hibernate.validator;
2,286,286
public List<? extends PartitionId> getMappedPartitionIds() { ImmutableList.Builder<PartitionId> builder = new ImmutableList.Builder<PartitionId>(); for (String partitionName : _record.getMapFields().keySet()) { builder.add(PartitionId.from(partitionName)); } return builder.build(); }
List<? extends PartitionId> function() { ImmutableList.Builder<PartitionId> builder = new ImmutableList.Builder<PartitionId>(); for (String partitionName : _record.getMapFields().keySet()) { builder.add(PartitionId.from(partitionName)); } return builder.build(); }
/** * Get the currently mapped partitions * @return list of Partition objects (immutable) */
Get the currently mapped partitions
getMappedPartitionIds
{ "repo_name": "Teino1978-Corp/Teino1978-Corp-helix", "path": "helix-core/src/main/java/org/apache/helix/model/ResourceAssignment.java", "license": "apache-2.0", "size": 6878 }
[ "com.google.common.collect.ImmutableList", "java.util.List", "org.apache.helix.api.id.PartitionId" ]
import com.google.common.collect.ImmutableList; import java.util.List; import org.apache.helix.api.id.PartitionId;
import com.google.common.collect.*; import java.util.*; import org.apache.helix.api.id.*;
[ "com.google.common", "java.util", "org.apache.helix" ]
com.google.common; java.util; org.apache.helix;
2,721,403
public void updateMailboxCallback(MessagingException result, long accountId, long mailboxId, int progress, int numNewMessages, ArrayList<Long> addedMessages) { }
void function(MessagingException result, long accountId, long mailboxId, int progress, int numNewMessages, ArrayList<Long> addedMessages) { }
/** * Callback for updateMailbox. Note: This looks a lot like checkMailCallback, but it's a * separate call used only by UI's, so we can keep things separate. * * @param result If null, the operation completed without error * @param accountId The account being operated on ...
Callback for updateMailbox. Note: This looks a lot like checkMailCallback, but it's a separate call used only by UI's, so we can keep things separate
updateMailboxCallback
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Email/src/com/android/email/Controller.java", "license": "gpl-2.0", "size": 126082 }
[ "com.android.emailcommon.mail.MessagingException", "java.util.ArrayList" ]
import com.android.emailcommon.mail.MessagingException; import java.util.ArrayList;
import com.android.emailcommon.mail.*; import java.util.*;
[ "com.android.emailcommon", "java.util" ]
com.android.emailcommon; java.util;
630,984
public Collection getNoTypeTopics() { return returntopics; }
Collection function() { return returntopics; }
/** * Returns a Collection of Topics which have no type. */
Returns a Collection of Topics which have no type
getNoTypeTopics
{ "repo_name": "ontopia/ontopia", "path": "ontopia-engine/src/main/java/net/ontopia/topicmaps/cmdlineutils/statistics/NoTypeCount.java", "license": "apache-2.0", "size": 2925 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,366,991
public void alignToTop(@NonNull NodeBase node, int yOffset, boolean appendAsCreateJs) { alignToTop(node, yOffset, appendAsCreateJs, false); }
void function(@NonNull NodeBase node, int yOffset, boolean appendAsCreateJs) { alignToTop(node, yOffset, appendAsCreateJs, false); }
/** * Adds javascript that aligns node top to top of specified node, with applying y offset. * * @param node * @param yOffset * @param appendAsCreateJs When T, renders javascript into appendCreateJS buffer, otherwise adds it as appendJavascript. */
Adds javascript that aligns node top to top of specified node, with applying y offset
alignToTop
{ "repo_name": "fjalvingh/domui", "path": "to.etc.domui/src/main/java/to/etc/domui/dom/html/NodeBase.java", "license": "lgpl-2.1", "size": 75752 }
[ "org.eclipse.jdt.annotation.NonNull" ]
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
195,473
@Contract(pure = true) public static int[] appendToNew(int[] array, int value){ int[] bigger = new int[array.length + 1]; for (int i = 0; i < array.length; i++){ bigger[i] = array[i]; } bigger[bigger.length - 1] = value; return bigger; }
@Contract(pure = true) static int[] function(int[] array, int value){ int[] bigger = new int[array.length + 1]; for (int i = 0; i < array.length; i++){ bigger[i] = array[i]; } bigger[bigger.length - 1] = value; return bigger; }
/** * Takes an array and appends a new value to said array * * @bigo The time complexity of appendArray is n * @attempts 1 attempt(s) were made by @user on bigo.Algo.appendToNew * @param array The array on which to append * @param value The value to append * @return The appendedArray,...
Takes an array and appends a new value to said array
appendToNew
{ "repo_name": "funkeyfreak/GitGood", "path": "Languages/Java/crackingthecodinginterview/bigo/src/main/java/com/gitgood/crackingthecodinginterview/bigo/Algo.java", "license": "apache-2.0", "size": 10175 }
[ "org.jetbrains.annotations.Contract" ]
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,367,373
void closeTemplate(PDDocument template) throws IOException;
void closeTemplate(PDDocument template) throws IOException;
/** * Closes template * @param template * @throws IOException */
Closes template
closeTemplate
{ "repo_name": "kzganesan/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java", "license": "apache-2.0", "size": 6647 }
[ "java.io.IOException", "org.apache.pdfbox.pdmodel.PDDocument" ]
import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument;
import java.io.*; import org.apache.pdfbox.pdmodel.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
1,468,306
private void validateFixedPartitionAttributesAgainstRedundantCopies() { for (FixedPartitionAttributesImpl fpa : this.pr.getFixedPartitionAttributesImpl()) { List<FixedPartitionAttributesImpl> allSameFPAs = this.pr.getRegionAdvisor().adviseSameFPAs(fpa); allSameFPAs.add(fpa); if (!allS...
void function() { for (FixedPartitionAttributesImpl fpa : this.pr.getFixedPartitionAttributesImpl()) { List<FixedPartitionAttributesImpl> allSameFPAs = this.pr.getRegionAdvisor().adviseSameFPAs(fpa); allSameFPAs.add(fpa); if (!allSameFPAs.isEmpty()) { int numSecondaries = 0; for (FixedPartitionAttributes otherfpa : all...
/** * Validate that for the given partition, number if secondaries are never exceed redundant copies * defined Validate that the num-buckets defined for a partition are same across all datastores */
Validate that for the given partition, number if secondaries are never exceed redundant copies defined Validate that the num-buckets defined for a partition are same across all datastores
validateFixedPartitionAttributesAgainstRedundantCopies
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionRegionConfigValidator.java", "license": "apache-2.0", "size": 22196 }
[ "java.util.List", "org.apache.geode.cache.FixedPartitionAttributes", "org.apache.geode.internal.i18n.LocalizedStrings" ]
import java.util.List; import org.apache.geode.cache.FixedPartitionAttributes; import org.apache.geode.internal.i18n.LocalizedStrings;
import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.internal.i18n.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
731,640
public static <K> void merge(K[] S1, K[] S2, K[] dest, Comparator<K> comp) { int i = 0; // index of S1 to be merged int j = 0; // index of S2 to be merged while(i + j < dest.length) { // merge the arrays if (j == S2.length || (i < S1.length && comp.compare(S1[i], S2[j]) < 0)) { dest[i + j]...
static <K> void function(K[] S1, K[] S2, K[] dest, Comparator<K> comp) { int i = 0; int j = 0; while(i + j < dest.length) { if (j == S2.length (i < S1.length && comp.compare(S1[i], S2[j]) < 0)) { dest[i + j] = S1[i++]; } else { dest[i + j] = S2[j++]; } } }
/** * Merge contents of the two source arrays into the destination array * * @param S1 source 1 for merging * @param S2 source 2 for merging * @param dest array that will contain the merged array data * @param comp Object that implements the Comparator interface, used to compare elements during sort ...
Merge contents of the two source arrays into the destination array
merge
{ "repo_name": "Nicholas-Daddona/CS253-Project-4", "path": "src/Sorting.java", "license": "gpl-3.0", "size": 3523 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
1,178,827
private static void processMethods(DirectClassFile cf, CfOptions args, ClassDefItem out) { CstType thisClass = cf.getThisClass(); MethodList methods = cf.getMethods(); int sz = methods.size(); for (int i = 0; i < sz; i++) { Method one = methods.get(i); ...
static void function(DirectClassFile cf, CfOptions args, ClassDefItem out) { CstType thisClass = cf.getThisClass(); MethodList methods = cf.getMethods(); int sz = methods.size(); for (int i = 0; i < sz; i++) { Method one = methods.get(i); try { CstMethodRef meth = new CstMethodRef(thisClass, one.getNat()); int accessFl...
/** * Processes the methods of the given class. * * @param cf {@code non-null;} class being translated * @param args {@code non-null;} command-line args * @param out {@code non-null;} output class */
Processes the methods of the given class
processMethods
{ "repo_name": "MoSync/MoSync", "path": "tools/android/dx/src/com/android/dx/dex/cf/CfTranslator.java", "license": "gpl-2.0", "size": 14763 }
[ "com.android.dx.cf.code.ConcreteMethod", "com.android.dx.cf.code.Ropper", "com.android.dx.cf.direct.DirectClassFile", "com.android.dx.cf.iface.Method", "com.android.dx.cf.iface.MethodList", "com.android.dx.dex.code.DalvCode", "com.android.dx.dex.code.PositionList", "com.android.dx.dex.code.RopTranslat...
import com.android.dx.cf.code.ConcreteMethod; import com.android.dx.cf.code.Ropper; import com.android.dx.cf.direct.DirectClassFile; import com.android.dx.cf.iface.Method; import com.android.dx.cf.iface.MethodList; import com.android.dx.dex.code.DalvCode; import com.android.dx.dex.code.PositionList; import com.android....
import com.android.dx.cf.code.*; import com.android.dx.cf.direct.*; import com.android.dx.cf.iface.*; import com.android.dx.dex.code.*; import com.android.dx.dex.file.*; import com.android.dx.rop.annotation.*; import com.android.dx.rop.code.*; import com.android.dx.rop.cst.*; import com.android.dx.rop.type.*; import co...
[ "com.android.dx" ]
com.android.dx;
2,471,600
List<T> detachAll(Iterator<T> entities);
List<T> detachAll(Iterator<T> entities);
/** * Calls attach first to simplify usage out of transaction. * If detaching just created object (with temporary id until commit), returned pojo will be tracked * and correct id set automatically after commit. * * @param entities entities objects * @return detached entities list (unproxie...
Calls attach first to simplify usage out of transaction. If detaching just created object (with temporary id until commit), returned pojo will be tracked and correct id set automatically after commit
detachAll
{ "repo_name": "xvik/guice-persist-orient", "path": "src/main/java/ru/vyarus/guice/persist/orient/support/repository/mixin/crud/BaseObjectCrud.java", "license": "mit", "size": 4165 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,807,438
public void runWithEvent(Event event);
void function(Event event);
/** * Runs this action, passing the triggering SWT event. As of 2.0, * <code>ActionContributionItem</code> calls this method instead of * <code>run()</code>. The default implementation of this method in * <code>Action</code> simply calls <code>run()</code> for backwards * compatibility. * * @param event ...
Runs this action, passing the triggering SWT event. As of 2.0, <code>ActionContributionItem</code> calls this method instead of <code>run()</code>. The default implementation of this method in <code>Action</code> simply calls <code>run()</code> for backwards compatibility
runWithEvent
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/action/IAction.java", "license": "epl-1.0", "size": 17313 }
[ "org.eclipse.swt.widgets.Event" ]
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,461,813
public static void populateEditDialogFromCursor( AlertDialog.Builder builder, final Context context, final Cursor c, LinearLayout diagLayout, final DBUpdater dbup, final RefreshInterface refresher, final DialogType dt, C...
static void function( AlertDialog.Builder builder, final Context context, final Cursor c, LinearLayout diagLayout, final DBUpdater dbup, final RefreshInterface refresher, final DialogType dt, CharacterDBHelper dbh) { final HashMap<String, Object> editableColumns = new HashMap<String, Object>(); for (String s : c.getCol...
/** * <p> * Populate the dialog with an editable interface for the contents of the cursor. * </p> * @param builder DialogBuilder that's being built * @param context App/Activity context * @param c Cursor that points to the current values in the database. The columns * of this...
Populate the dialog with an editable interface for the contents of the cursor.
populateEditDialogFromCursor
{ "repo_name": "gik0geck0/AlterEgo", "path": "CODE/AlterEgo/src/edu/mines/alterego/DialogFactory.java", "license": "mit", "size": 12062 }
[ "android.app.AlertDialog", "android.content.Context", "android.database.Cursor", "android.text.InputType", "android.view.Gravity", "android.view.ViewGroup", "android.widget.CheckBox", "android.widget.EditText", "android.widget.LinearLayout", "android.widget.TextView", "java.util.HashMap" ]
import android.app.AlertDialog; import android.content.Context; import android.database.Cursor; import android.text.InputType; import android.view.Gravity; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; i...
import android.app.*; import android.content.*; import android.database.*; import android.text.*; import android.view.*; import android.widget.*; import java.util.*;
[ "android.app", "android.content", "android.database", "android.text", "android.view", "android.widget", "java.util" ]
android.app; android.content; android.database; android.text; android.view; android.widget; java.util;
1,667,907
@Incubating @Input // We track this as an input since the Scala compiler output may depend on it. // TODO: This should be replaced by a property in the Scala toolchain as soon as we model these. protected String getJvmVersion() { return JavaVersion.current().getMajorVersion(); }
String function() { return JavaVersion.current().getMajorVersion(); }
/** * The Java major version of the JVM the Scala compiler is running on. * * @since 4.1 */
The Java major version of the JVM the Scala compiler is running on
getJvmVersion
{ "repo_name": "gstevey/gradle", "path": "subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaCompile.java", "license": "apache-2.0", "size": 5128 }
[ "org.gradle.api.JavaVersion" ]
import org.gradle.api.JavaVersion;
import org.gradle.api.*;
[ "org.gradle.api" ]
org.gradle.api;
1,468,010
public Collection<String> getAllowedSuffixes() { return allowedSuffixes; }
Collection<String> function() { return allowedSuffixes; }
/** * <p>Return the collection of extensions to be parsed.</p> * * <p>This collection is backed by the collection used by the crawler, feel free to manipulate.<br /> * <strong>NOTE</strong>Please do not manipulate after starting the crawler.</p> * * @return {@link Collection} of String. ...
Return the collection of extensions to be parsed. This collection is backed by the collection used by the crawler, feel free to manipulate. NOTEPlease do not manipulate after starting the crawler
getAllowedSuffixes
{ "repo_name": "cloudbearings/SiteCrawler", "path": "src/main/java/com/salesforce/webdev/sitecrawler/SiteCrawler.java", "license": "bsd-3-clause", "size": 49094 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
906,639
public boolean has(CommandSender sender, Command command, String[] args, boolean allowConsole) { if(sender instanceof ConsoleCommandSender) return allowConsole; if(failed) return ((Player)sender).isOp(); return permission.has(sender, getBaseNode() + ".commands." + command.getName() + "." + StringUtil...
boolean function(CommandSender sender, Command command, String[] args, boolean allowConsole) { if(sender instanceof ConsoleCommandSender) return allowConsole; if(failed) return ((Player)sender).isOp(); return permission.has(sender, getBaseNode() + STR + command.getName() + "." + StringUtils.join(args).toLowerCase()); }
/** * Check if the user has a command node, based on this plugin's generated permissions. * * @param sender the user to check for permission. * @param command the command to check for permission. * @param args args to add as a sub-node of this command. * @param allowConsole whether to allow console a...
Check if the user has a command node, based on this plugin's generated permissions
has
{ "repo_name": "InsomniaxGaming/OWHQuests", "path": "src/info/omgwtfhax/quests/vault/Permissions.java", "license": "gpl-3.0", "size": 3850 }
[ "org.apache.commons.lang.StringUtils", "org.bukkit.command.Command", "org.bukkit.command.CommandSender", "org.bukkit.command.ConsoleCommandSender", "org.bukkit.entity.Player" ]
import org.apache.commons.lang.StringUtils; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player;
import org.apache.commons.lang.*; import org.bukkit.command.*; import org.bukkit.entity.*;
[ "org.apache.commons", "org.bukkit.command", "org.bukkit.entity" ]
org.apache.commons; org.bukkit.command; org.bukkit.entity;
729,353
Map<K, V> entriesOnlyOnRight();
Map<K, V> entriesOnlyOnRight();
/** * Returns an unmodifiable map containing the entries from the right map whose * keys are not present in the left map. */
Returns an unmodifiable map containing the entries from the right map whose keys are not present in the left map
entriesOnlyOnRight
{ "repo_name": "monokurobo/guava", "path": "guava/src/com/google/common/collect/MapDifference.java", "license": "apache-2.0", "size": 3259 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,864,195
protected void addColorsToList(List<Integer> list, boolean reversed) { // If the colors should not be inverted, simple add them. if (!reversed) { for (int color : colors) { list.add(color); } } // Otherwise, we need to iterate over the color array in reverse. else { for (in...
void function(List<Integer> list, boolean reversed) { if (!reversed) { for (int color : colors) { list.add(color); } } else { for (int i = colors.length - 1; i >= 0; i--) { list.add(colors[i]); } } return; } } private final ArrayList<Integer> colors; private int n; public LinearColorFactory() { colors = new ArrayList<I...
/** * Adds the colors for the theme to the specified list. * * @param list * The list to add colors to. * @param reversed * If true, the colors will be added in the reverse order. */
Adds the colors for the theme to the specified list
addColorsToList
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.client.widgets/src/org/eclipse/ice/client/widgets/analysis/LinearColorFactory.java", "license": "epl-1.0", "size": 8093 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
948,510
static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
static <K, V> void populateMap(Map<K, V> map, ObjectInputStream stream) throws IOException, ClassNotFoundException { int size = stream.readInt(); populateMap(map, stream, size); }
/** * Populates a map by reading an input stream, as part of deserialization. * See {@link #writeMap} for the data format. */
Populates a map by reading an input stream, as part of deserialization. See <code>#writeMap</code> for the data format
populateMap
{ "repo_name": "mike10004/appengine-imaging", "path": "gaecompat-awt-imaging/src/common/com/gaecompat/repackaged/com/google/common/collect/Serialization.java", "license": "apache-2.0", "size": 8363 }
[ "java.io.IOException", "java.io.ObjectInputStream", "java.util.Map" ]
import java.io.IOException; import java.io.ObjectInputStream; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
216,306
@SuppressWarnings({ "rawtypes", "unchecked" }) private boolean hasExit(ASTBlockStatement block) { List exitBlocks = block.findDescendantsOfType(ASTReturnStatement.class); exitBlocks.addAll(block.findDescendantsOfType(ASTThrowStatement.class)); if (exitBlocks.isEmpty()) return false; ...
@SuppressWarnings({ STR, STR }) boolean function(ASTBlockStatement block) { List exitBlocks = block.findDescendantsOfType(ASTReturnStatement.class); exitBlocks.addAll(block.findDescendantsOfType(ASTThrowStatement.class)); if (exitBlocks.isEmpty()) return false; for (int i=0; i<exitBlocks.size(); i++) { Node exitNode = ...
/** * Returns whether the block contains a return call or throws an exception. * Exclude blocks that have these things as part of an inner class. * * @param block ASTBlockStatement * @return boolean */
Returns whether the block contains a return call or throws an exception. Exclude blocks that have these things as part of an inner class
hasExit
{ "repo_name": "StephaneMangin/V-V-TP3", "path": "src/main/java/net/sourceforge/pmd/lang/java/rule/optimizations/PrematureDeclarationRule.java", "license": "bsd-3-clause", "size": 6357 }
[ "java.util.List", "net.sourceforge.pmd.lang.ast.Node", "net.sourceforge.pmd.lang.java.ast.ASTBlockStatement", "net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration", "net.sourceforge.pmd.lang.java.ast.ASTReturnStatement", "net.sourceforge.pmd.lang.java.ast.ASTThrowStatement" ]
import java.util.List; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTBlockStatement; import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration; import net.sourceforge.pmd.lang.java.ast.ASTReturnStatement; import net.sourceforge.pmd.lang.java.ast.ASTThrowStatement;
import java.util.*; import net.sourceforge.pmd.lang.ast.*; import net.sourceforge.pmd.lang.java.ast.*;
[ "java.util", "net.sourceforge.pmd" ]
java.util; net.sourceforge.pmd;
949,714
public IExpr getLHS() { return fLhsPatternExpr; }
IExpr function() { return fLhsPatternExpr; }
/** * Get the "left-hand-side" of a pattern-matching rule. * * @return */
Get the "left-hand-side" of a pattern-matching rule
getLHS
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/patternmatching/IPatternMatcher.java", "license": "gpl-3.0", "size": 7895 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
1,425,001
public static boolean checkMissing(HashSet<String> missing) { int num = missing.size(); if (num == 0) return true; StringBuffer sb = new StringBuffer(); sb.append("The following librar"); sb.append(num == 1 ? "y was" : "ies were"); sb.append(" not found:"); Iterator<String> iter = missing....
static boolean function(HashSet<String> missing) { int num = missing.size(); if (num == 0) return true; StringBuffer sb = new StringBuffer(); sb.append(STR); sb.append(num == 1 ? STR : STR); sb.append(STR); Iterator<String> iter = missing.iterator(); for (int i=0; i<num; i++) sb.append(STR + iter.next()); String them =...
/** * Reports missing libraries in the given hash set to the user. * @return true iff no libraries are missing (the hash set is empty). */
Reports missing libraries in the given hash set to the user
checkMissing
{ "repo_name": "JoeHsiao/bioformats", "path": "components/bio-formats-plugins/src/loci/plugins/util/LibraryChecker.java", "license": "gpl-2.0", "size": 5959 }
[ "java.util.HashSet", "java.util.Iterator" ]
import java.util.HashSet; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,665,646
public String toString(NumberFormat formatter) { return "(" + formatter.format(x) + " " + formatter.format(y) + " " + formatter.format(z) + " " + formatter.format(w) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ }
String function(NumberFormat formatter) { return "(" + formatter.format(x) + " " + formatter.format(y) + " " + formatter.format(z) + " " + formatter.format(w) + ")"; }
/** * Return a string representation of this vector by formatting the vector components with the given {@link NumberFormat}. * * @param formatter * the {@link NumberFormat} used to format the vector components with * @return the string representation */
Return a string representation of this vector by formatting the vector components with the given <code>NumberFormat</code>
toString
{ "repo_name": "FortressBuilder/JOML", "path": "src/org/joml/Vector4f.java", "license": "mit", "size": 42415 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
10,561
public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }
static ImageDescriptor function(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); }
/** * Returns an image descriptor for the image file at the given * plug-in relative path * * @param path the path * @return the image descriptor */
Returns an image descriptor for the image file at the given plug-in relative path
getImageDescriptor
{ "repo_name": "gattifrancesco/chemanalysis", "path": "test.rcp/src/test/rcp/Activator.java", "license": "gpl-3.0", "size": 1338 }
[ "org.eclipse.jface.resource.ImageDescriptor" ]
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,448,448
private void handleNonCORS(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { // Let request pass. filterChain.doFilter(request, response); }
void function(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { filterChain.doFilter(request, response); }
/** * Handles a request, that's not a CORS request, but is a valid request i.e. * it is not a cross-origin request. This implementation, just forwards the * request down the filter chain. * * @param request * The {@link HttpServletRequest} object. * @param response * ...
Handles a request, that's not a CORS request, but is a valid request i.e. it is not a cross-origin request. This implementation, just forwards the request down the filter chain
handleNonCORS
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-7.0.63-sourcecode/target/classes/org/apache/catalina/filters/CorsFilter.java", "license": "apache-2.0", "size": 44391 }
[ "java.io.IOException", "javax.servlet.FilterChain", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,326,735
@Nullable public static Result decodeRgb(@NonNull final int[] pixels, final int width, final int height) { return decodeRgb(pixels, width, height, null); }
static Result function(@NonNull final int[] pixels, final int width, final int height) { return decodeRgb(pixels, width, height, null); }
/** * Decode barcode from RGB pixels array * * @param pixels Colors in standard Android ARGB format * @param width Image width * @param height Image height * @return Decode result, if barcode was decoded successfully, {@code null} otherwise * @see Color */
Decode barcode from RGB pixels array
decodeRgb
{ "repo_name": "yuriy-budiyev/code-scanner", "path": "src/main/java/com/budiyev/android/codescanner/BarcodeUtils.java", "license": "mit", "size": 11092 }
[ "androidx.annotation.NonNull", "com.google.zxing.Result" ]
import androidx.annotation.NonNull; import com.google.zxing.Result;
import androidx.annotation.*; import com.google.zxing.*;
[ "androidx.annotation", "com.google.zxing" ]
androidx.annotation; com.google.zxing;
2,642,766
int updateByPrimaryKeySelective(DBGWRouter record);
int updateByPrimaryKeySelective(DBGWRouter record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table gw_router * * @mbggenerated Tue Apr 28 19:19:52 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table gw_router
updateByPrimaryKeySelective
{ "repo_name": "wolabs/womano", "path": "main/java/com/culabs/nfvo/dao/DBGWRouterMapper.java", "license": "apache-2.0", "size": 1627 }
[ "com.culabs.nfvo.model.db.DBGWRouter" ]
import com.culabs.nfvo.model.db.DBGWRouter;
import com.culabs.nfvo.model.db.*;
[ "com.culabs.nfvo" ]
com.culabs.nfvo;
2,627,676
public void destroy() { LogManager.shutdown(); XLog.Info.reset(); XLogStreamer.Filter.reset(); } public static final String USER = "USER"; public static final String GROUP = "GROUP";
void function() { LogManager.shutdown(); XLog.Info.reset(); XLogStreamer.Filter.reset(); } public static final String USER = "USER"; public static final String GROUP = "GROUP";
/** * Destroy the log service. */
Destroy the log service
destroy
{ "repo_name": "cloudera/oozie", "path": "core/src/main/java/org/apache/oozie/service/XLogService.java", "license": "apache-2.0", "size": 12472 }
[ "org.apache.log4j.LogManager", "org.apache.oozie.util.XLog", "org.apache.oozie.util.XLogStreamer" ]
import org.apache.log4j.LogManager; import org.apache.oozie.util.XLog; import org.apache.oozie.util.XLogStreamer;
import org.apache.log4j.*; import org.apache.oozie.util.*;
[ "org.apache.log4j", "org.apache.oozie" ]
org.apache.log4j; org.apache.oozie;
1,954,815
public void NESSIEinit() { Arrays.fill(bitLength, (byte)0); bufferBits = bufferPos = 0; buffer[0] = 0; // it's only necessary to cleanup buffer[bufferPos]. Arrays.fill(hash, 0L); // initial value }
void function() { Arrays.fill(bitLength, (byte)0); bufferBits = bufferPos = 0; buffer[0] = 0; Arrays.fill(hash, 0L); }
/** * Initialize the hashing state. */
Initialize the hashing state
NESSIEinit
{ "repo_name": "AlterRS/Deobfuscator", "path": "deps/com/method/rscd/util/Whirlpool.java", "license": "mit", "size": 14420 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,573,587
public void startCall(String method) throws IOException { int offset = _offset; if (SIZE < offset + 32) { flush(); offset = 0; } byte []buffer = _buffer; buffer[offset++] = (byte) 'c'; buffer[offset++] = (byte) 2; buffer[offset++] = (byte) 0; buffer[offset++] ...
void function(String method) throws IOException { int offset = _offset; if (SIZE < offset + 32) { flush(); offset = 0; } byte []buffer = _buffer; buffer[offset++] = (byte) 'c'; buffer[offset++] = (byte) 2; buffer[offset++] = (byte) 0; buffer[offset++] = (byte) 'm'; int len = method.length(); buffer[offset++] = (byte) (...
/** * Starts the method call. Clients would use <code>startCall</code> * instead of <code>call</code> if they wanted finer control over * writing the arguments, or needed to write headers. * * <code><pre> * c major minor * m b16 b8 method-name * </pre></code> * * @param method the method ...
Starts the method call. Clients would use <code>startCall</code> instead of <code>call</code> if they wanted finer control over writing the arguments, or needed to write headers. <code><code> c major minor m b16 b8 method-name </code></code>
startCall
{ "repo_name": "pvo99i/hessdroid", "path": "src/com/caucho/hessian/io/Hessian2Output.java", "license": "apache-2.0", "size": 35695 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,858,941
public ScheduledExecutorService getScheduledTasksExecutor() { return scheduledTasksExecutor; }
ScheduledExecutorService function() { return scheduledTasksExecutor; }
/** * Executes periodic background tasks in MembershipService. */
Executes periodic background tasks in MembershipService
getScheduledTasksExecutor
{ "repo_name": "lalithsuresh/rapid", "path": "rapid/src/main/java/com/vrg/rapid/SharedResources.java", "license": "apache-2.0", "size": 6144 }
[ "java.util.concurrent.ScheduledExecutorService" ]
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,370,095
@Override public QuotaSource getQuotaSource() { return quotaSource; }
QuotaSource function() { return quotaSource; }
/** * This {@link QuotaEnforcer} doesn't require any {@link QuotaSource} since it will fetch the quota internally. * @return a null QuotaSource. */
This <code>QuotaEnforcer</code> doesn't require any <code>QuotaSource</code> since it will fetch the quota internally
getQuotaSource
{ "repo_name": "linkedin/ambry", "path": "ambry-quota/src/main/java/com/github/ambry/quota/storage/StorageQuotaEnforcer.java", "license": "apache-2.0", "size": 14238 }
[ "com.github.ambry.quota.QuotaSource" ]
import com.github.ambry.quota.QuotaSource;
import com.github.ambry.quota.*;
[ "com.github.ambry" ]
com.github.ambry;
1,216,870
public String getKey(int index) { if (index == 0) { return "HTTP_STATUS_CODE"; } index--; if (headers == null) { return null; } if (keys == null) { keys = new ArrayList<String>(headers.size()); keys.addAll(headers.keySet()); } return keys.get(index); }
String function(int index) { if (index == 0) { return STR; } index--; if (headers == null) { return null; } if (keys == null) { keys = new ArrayList<String>(headers.size()); keys.addAll(headers.keySet()); } return keys.get(index); }
/** * Get the key at the specified position. * @param index the index * @return the key at the specified index or null */
Get the key at the specified position
getKey
{ "repo_name": "sparseware/ccp-bellavista", "path": "shared/com/sparseware/bellavista/service/HttpHeaders.java", "license": "apache-2.0", "size": 5375 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
437,734
private Block earliestBlock(Node node) { ControlFlowGraph cfg = loops.getCFG(); Block earliest = earliestCache.getAndGrow(node); if (earliest != null) { return earliest; } earliest = cfg.getNodeToBlock().isNew(node) ? null : cfg.getNode...
Block function(Node node) { ControlFlowGraph cfg = loops.getCFG(); Block earliest = earliestCache.getAndGrow(node); if (earliest != null) { return earliest; } earliest = cfg.getNodeToBlock().isNew(node) ? null : cfg.getNodeToBlock().get(node); if (earliest == null) { if (node instanceof IntegerDivRemNode) { earliest = ...
/** * Determines the earliest block in which the given node can be scheduled. */
Determines the earliest block in which the given node can be scheduled
earliestBlock
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/SpeculativeGuardMovementPhase.java", "license": "gpl-2.0", "size": 32192 }
[ "org.graalvm.compiler.core.common.cfg.Loop", "org.graalvm.compiler.graph.Node", "org.graalvm.compiler.nodes.GuardNode", "org.graalvm.compiler.nodes.LogicNode", "org.graalvm.compiler.nodes.PhiNode", "org.graalvm.compiler.nodes.calc.CompareNode", "org.graalvm.compiler.nodes.calc.IntegerBelowNode", "org....
import org.graalvm.compiler.core.common.cfg.Loop; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.GuardNode; import org.graalvm.compiler.nodes.LogicNode; import org.graalvm.compiler.nodes.PhiNode; import org.graalvm.compiler.nodes.calc.CompareNode; import org.graalvm.compiler.nodes.calc.Intege...
import org.graalvm.compiler.core.common.cfg.*; import org.graalvm.compiler.graph.*; import org.graalvm.compiler.nodes.*; import org.graalvm.compiler.nodes.calc.*; import org.graalvm.compiler.nodes.cfg.*; import org.graalvm.compiler.nodes.java.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
1,588,038
@Override public boolean performOk() { //IMPORTANT: we must call the perform before restoring the modules because this //info is going to be used when restoring them. super.performOk(); //we need to update the tree so that the environment variables stay correct. pathEdit...
boolean function() { super.performOk(); pathEditor.updateTree(); IInterpreterManager interpreterManager = getInterpreterManager(); String newStringToPersist = AbstractInterpreterManager.getStringToPersist(pathEditor.getExesList()); String oldStringToPersist = AbstractInterpreterManager.getStringToPersist(interpreterMan...
/** * Applies changes (if any) * * @see org.eclipse.jface.preference.IPreferencePage#performOk() */
Applies changes (if any)
performOk
{ "repo_name": "fabioz/Pydev", "path": "plugins/org.python.pydev/src/org/python/pydev/ui/pythonpathconf/AbstractInterpreterPreferencesPage.java", "license": "epl-1.0", "size": 8745 }
[ "org.python.pydev.ast.interpreter_managers.AbstractInterpreterManager", "org.python.pydev.core.IInterpreterManager", "org.python.pydev.ui.dialogs.PyDialogHelpers" ]
import org.python.pydev.ast.interpreter_managers.AbstractInterpreterManager; import org.python.pydev.core.IInterpreterManager; import org.python.pydev.ui.dialogs.PyDialogHelpers;
import org.python.pydev.ast.interpreter_managers.*; import org.python.pydev.core.*; import org.python.pydev.ui.dialogs.*;
[ "org.python.pydev" ]
org.python.pydev;
2,385,577
public @Nonnull Connection getROConnection() throws SQLException { Connection c = getDataSource().getConnection(); c.setAutoCommit(false); setReadOnly(c, true); return c; }
@Nonnull Connection function() throws SQLException { Connection c = getDataSource().getConnection(); c.setAutoCommit(false); setReadOnly(c, true); return c; }
/** * Obtain a {@link Connection} suitable for read-only operations. */
Obtain a <code>Connection</code> suitable for read-only operations
getROConnection
{ "repo_name": "ieb/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/rdb/RDBConnectionHandler.java", "license": "apache-2.0", "size": 7434 }
[ "java.sql.Connection", "java.sql.SQLException", "javax.annotation.Nonnull" ]
import java.sql.Connection; import java.sql.SQLException; import javax.annotation.Nonnull;
import java.sql.*; import javax.annotation.*;
[ "java.sql", "javax.annotation" ]
java.sql; javax.annotation;
1,997,661
@Override public TargetLocationRequest createOrderConfirmRequest(String name, String orderId, String orderTotal, String productPurchasedId, Map<String, Object> parameters) { return Target.createOrderConfirmRequest(name, orderId, orderTotal, productPurchasedId, parameters); }
TargetLocationRequest function(String name, String orderId, String orderTotal, String productPurchasedId, Map<String, Object> parameters) { return Target.createOrderConfirmRequest(name, orderId, orderTotal, productPurchasedId, parameters); }
/** * <pre> * TargetLocationRequest orderConfirm = Target.createOrderConfirmRequest("orderConfirm", "order", "47.88", "3722", null); * <pre/> * @param name * @param orderId * @param orderTotal * @param productPurchasedId * @param parameters * @return */
<code> TargetLocationRequest orderConfirm = Target.createOrderConfirmRequest("orderConfirm", "order", "47.88", "3722", null);
createOrderConfirmRequest
{ "repo_name": "pjq/omniture", "path": "omniture/src/me/pjq/omniture/MyTarget.java", "license": "apache-2.0", "size": 2001 }
[ "com.adobe.mobile.Target", "com.adobe.mobile.TargetLocationRequest", "java.util.Map" ]
import com.adobe.mobile.Target; import com.adobe.mobile.TargetLocationRequest; import java.util.Map;
import com.adobe.mobile.*; import java.util.*;
[ "com.adobe.mobile", "java.util" ]
com.adobe.mobile; java.util;
853,102
@Test public void testBuySuitForGroom() { // **at hotel's dressing room** npc = SingletonRepository.getNPCList().get("Timothy"); en = npc.getEngine(); player.setQuest(QUEST_SLOT, "engaged"); en.step(player, "hi"); assertEquals("Good day! If you're a prospective groom I can #help you prepare for your w...
void function() { npc = SingletonRepository.getNPCList().get(STR); en = npc.getEngine(); player.setQuest(QUEST_SLOT, STR); en.step(player, "hi"); assertEquals(STR, getReply(npc)); en.step(player, "help"); assertEquals(STR, getReply(npc)); en.step(player, "wear"); assertEquals(STR, getReply(npc)); PlayerTestHelper.equip...
/** * Tests for buySuitForGroom. */
Tests for buySuitForGroom
testBuySuitForGroom
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "tests/games/stendhal/server/maps/quests/MarriageTest.java", "license": "gpl-2.0", "size": 21613 }
[ "games.stendhal.server.core.engine.SingletonRepository", "org.junit.Assert" ]
import games.stendhal.server.core.engine.SingletonRepository; import org.junit.Assert;
import games.stendhal.server.core.engine.*; import org.junit.*;
[ "games.stendhal.server", "org.junit" ]
games.stendhal.server; org.junit;
2,597,543
protected static IEventAggregator createEventAggregator(ITreeStorageAdapter treeStorageAdapter, IObjectStore objectStore, FileSyncer fileSyncer, MBassador<IBusEvent> globalEventBus) { // Add sync file change listener to event aggregator SyncFileChangeListener syncFileChangeListener = new SyncFileCha...
static IEventAggregator function(ITreeStorageAdapter treeStorageAdapter, IObjectStore objectStore, FileSyncer fileSyncer, MBassador<IBusEvent> globalEventBus) { SyncFileChangeListener syncFileChangeListener = new SyncFileChangeListener(fileSyncer); ExecutorService executorService = Executors.newSingleThreadExecutor(); ...
/** * Create and start event aggregator * * @param treeStorageAdapter A tree storage adapter pointing to the root path to watch for changes * @param objectStore The object store to check for versions * @param fileSyncer The file syncer to create the listener for events * @p...
Create and start event aggregator
createEventAggregator
{ "repo_name": "p2p-sync/sync", "path": "src/test/java/org/rmatil/sync/test/messaging/base/BaseNetworkHandlerTest.java", "license": "apache-2.0", "size": 16857 }
[ "java.nio.file.Path", "java.nio.file.Paths", "java.util.ArrayList", "java.util.List", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "net.engio.mbassy.bus.MBassador", "org.rmatil.sync.core.eventbus.IBusEvent", "org.rmatil.sync.core.init.eventaggregator.EventAggregatorIniti...
import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import net.engio.mbassy.bus.MBassador; import org.rmatil.sync.core.eventbus.IBusEvent; import org.rmatil.sync.core.init.eventaggre...
import java.nio.file.*; import java.util.*; import java.util.concurrent.*; import net.engio.mbassy.bus.*; import org.rmatil.sync.core.eventbus.*; import org.rmatil.sync.core.init.eventaggregator.*; import org.rmatil.sync.core.syncer.file.*; import org.rmatil.sync.event.aggregator.api.*; import org.rmatil.sync.persisten...
[ "java.nio", "java.util", "net.engio.mbassy", "org.rmatil.sync" ]
java.nio; java.util; net.engio.mbassy; org.rmatil.sync;
2,020,031
private void parseValueIgnore() throws IOException { final byte newLine = this.newLine; final byte delimiter = this.delimiter; final TextOutput output = this.output; final TextInput input = this.input; byte ch = this.ch; while (ch != delimiter && ch != newLine) { output.appendIgnoringWh...
void function() throws IOException { final byte newLine = this.newLine; final byte delimiter = this.delimiter; final TextOutput output = this.output; final TextInput input = this.input; byte ch = this.ch; while (ch != delimiter && ch != newLine) { output.appendIgnoringWhitespace(ch); ch = input.nextChar(); } this.ch = ...
/** * Function parses an individual field and ignores any white spaces encountered * by not appending it to the output vector * @throws IOException */
Function parses an individual field and ignores any white spaces encountered by not appending it to the output vector
parseValueIgnore
{ "repo_name": "superbstreak/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/text/compliant/TextReader.java", "license": "apache-2.0", "size": 16098 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,352,799
public static boolean hasChosenToSyncPasswordsWithNoCustomPassphrase(SyncService syncService) { return PasswordManagerHelper.hasChosenToSyncPasswords(syncService) && !syncService.isUsingExplicitPassphrase(); }
static boolean function(SyncService syncService) { return PasswordManagerHelper.hasChosenToSyncPasswords(syncService) && !syncService.isUsingExplicitPassphrase(); }
/** * Checks whether the sync feature is enabled, the user has chosen to sync passwords and * they haven't set up a custom passphrase. * Note that this doesn't mean that passwords are actively syncing. * * @param syncService the service to query about the sync status. * @return true if ...
Checks whether the sync feature is enabled, the user has chosen to sync passwords and they haven't set up a custom passphrase. Note that this doesn't mean that passwords are actively syncing
hasChosenToSyncPasswordsWithNoCustomPassphrase
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/browser/password_manager/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerHelper.java", "license": "bsd-3-clause", "size": 9182 }
[ "org.chromium.chrome.browser.sync.SyncService" ]
import org.chromium.chrome.browser.sync.SyncService;
import org.chromium.chrome.browser.sync.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
31,812
public CampaignSchedulerService getCampaignScheduler(final String campaignName) { CampaignRecord campaign = campaignRecordService.findByName(campaignName); if (campaign == null) { throw new CampaignNotFoundException(format("Campaign (%s) not found.", campaignName)); } C...
CampaignSchedulerService function(final String campaignName) { CampaignRecord campaign = campaignRecordService.findByName(campaignName); if (campaign == null) { throw new CampaignNotFoundException(format(STR, campaignName)); } CampaignSchedulerService schedulerService = campaignSchedulerServices.get(campaign.toCampaign...
/** * Retrieves campaign scheduler for the given campaign name, based on this campaign type. * * @param campaignName the campaign name to retrieve the scheduler for * @return scheduler service for the corresponding campaign type * @throws CampaignNotFoundException if campaign of such name des n...
Retrieves campaign scheduler for the given campaign name, based on this campaign type
getCampaignScheduler
{ "repo_name": "wstrzelczyk/modules", "path": "message-campaign/src/main/java/org/motechproject/messagecampaign/scheduler/CampaignSchedulerFactory.java", "license": "bsd-3-clause", "size": 3731 }
[ "org.motechproject.messagecampaign.domain.campaign.CampaignRecord", "org.motechproject.messagecampaign.exception.CampaignNotFoundException" ]
import org.motechproject.messagecampaign.domain.campaign.CampaignRecord; import org.motechproject.messagecampaign.exception.CampaignNotFoundException;
import org.motechproject.messagecampaign.domain.campaign.*; import org.motechproject.messagecampaign.exception.*;
[ "org.motechproject.messagecampaign" ]
org.motechproject.messagecampaign;
306,108
public static LoginSessionToken parse(final JSONObject jsonObject) throws ParseException { // Parse value if (! jsonObject.containsKey("session_token")) return null; String value = JSONObjectUtils.getString(jsonObject, "session_token"); return new LoginSessionToken(value); }
static LoginSessionToken function(final JSONObject jsonObject) throws ParseException { if (! jsonObject.containsKey(STR)) return null; String value = JSONObjectUtils.getString(jsonObject, STR); return new LoginSessionToken(value); }
/** * Parses a refresh token from a JSON object access token response. * * @param jsonObject The JSON object to parse. Must not be * {@code null}. * * @return The refresh token, {@code null} if not found. * * @throws ParseException If the JSON object couldn't be parsed to a * ...
Parses a refresh token from a JSON object access token response
parse
{ "repo_name": "thomasletsch/oauth", "path": "oauth-server/src/main/java/de/adorsys/oauth/server/LoginSessionToken.java", "license": "apache-2.0", "size": 2982 }
[ "com.nimbusds.oauth2.sdk.ParseException", "com.nimbusds.oauth2.sdk.util.JSONObjectUtils", "net.minidev.json.JSONObject" ]
import com.nimbusds.oauth2.sdk.ParseException; import com.nimbusds.oauth2.sdk.util.JSONObjectUtils; import net.minidev.json.JSONObject;
import com.nimbusds.oauth2.sdk.*; import com.nimbusds.oauth2.sdk.util.*; import net.minidev.json.*;
[ "com.nimbusds.oauth2", "net.minidev.json" ]
com.nimbusds.oauth2; net.minidev.json;
680,267
return ArrayUtils.toPrimitive(Arrays.copyOf(peaks.values().toArray(), peaks.values().toArray().length, Double[].class)); }
return ArrayUtils.toPrimitive(Arrays.copyOf(peaks.values().toArray(), peaks.values().toArray().length, Double[].class)); }
/** * get the spectrum intensities as an array * * @param peaks the peak map (key: M/Z ratio, value: intensity) * @return the intensities array */
get the spectrum intensities as an array
getIntensitiesArray
{ "repo_name": "compomics/spectrawl", "path": "src/main/java/com/compomics/spectrawl/util/PeakUtils.java", "license": "apache-2.0", "size": 1385 }
[ "java.util.Arrays", "org.apache.commons.lang.ArrayUtils" ]
import java.util.Arrays; import org.apache.commons.lang.ArrayUtils;
import java.util.*; import org.apache.commons.lang.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
528,444
public Theme getTheme( ) { return null; }
Theme function( ) { return null; }
/** * Returns the theme of the report design/library. * * @return the theme of the report design/library */
Returns the theme of the report design/library
getTheme
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/ModuleImpl.java", "license": "epl-1.0", "size": 72136 }
[ "org.eclipse.birt.report.model.elements.Theme" ]
import org.eclipse.birt.report.model.elements.Theme;
import org.eclipse.birt.report.model.elements.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
650,752
public void testNoCommentsSingleFile() { GitHubFile file = GitHubFile.builder() .filename("a.txt") .build(); Commit commit = Commit.builder() .files(Collections.singletonList(file)) .build(); FullCommit full = new FullCommit(c...
void function() { GitHubFile file = GitHubFile.builder() .filename("a.txt") .build(); Commit commit = Commit.builder() .files(Collections.singletonList(file)) .build(); FullCommit full = new FullCommit(commit); assertTrue(full.isEmpty()); assertEquals(1, full.getFiles().size()); }
/** * Test commit with no comments and one file */
Test commit with no comments and one file
testNoCommentsSingleFile
{ "repo_name": "cnoldtree/PocketHub", "path": "app/src/androidTest/java/com/github/pockethub/android/tests/commit/FullCommitTest.java", "license": "apache-2.0", "size": 4293 }
[ "com.github.pockethub.android.core.commit.FullCommit", "com.meisolsson.githubsdk.model.Commit", "com.meisolsson.githubsdk.model.GitHubFile", "java.util.Collections" ]
import com.github.pockethub.android.core.commit.FullCommit; import com.meisolsson.githubsdk.model.Commit; import com.meisolsson.githubsdk.model.GitHubFile; import java.util.Collections;
import com.github.pockethub.android.core.commit.*; import com.meisolsson.githubsdk.model.*; import java.util.*;
[ "com.github.pockethub", "com.meisolsson.githubsdk", "java.util" ]
com.github.pockethub; com.meisolsson.githubsdk; java.util;
2,581,665
public void processTuple(K key, V val) { HashMap<K,V> tuple = new HashMap<K,V>(1); tuple.put(key,val); MutableInt i = map.get(tuple); if (i == null) { i = new MutableInt(0); map.put(cloneTuple(tuple), i); } i.increment(); } protected HashMap<HashMap<K,V>, MutableInt> map ...
void function(K key, V val) { HashMap<K,V> tuple = new HashMap<K,V>(1); tuple.put(key,val); MutableInt i = map.get(tuple); if (i == null) { i = new MutableInt(0); map.put(cloneTuple(tuple), i); } i.increment(); } protected HashMap<HashMap<K,V>, MutableInt> map = new HashMap<HashMap<K,V>, MutableInt>();
/** * Reference counts each tuple * @param key tuple key * @param val tuple value */
Reference counts each tuple
processTuple
{ "repo_name": "ananthc/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/util/BaseUniqueKeyValueCounter.java", "license": "apache-2.0", "size": 2090 }
[ "java.util.HashMap", "org.apache.commons.lang.mutable.MutableInt" ]
import java.util.HashMap; import org.apache.commons.lang.mutable.MutableInt;
import java.util.*; import org.apache.commons.lang.mutable.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,984,997
private void actionExecuteRangeQuery(final CommandLine line) { if(! line.hasOption(CLIParameter.TABLE)) { System.err.println("Query should be performed, but no table was specified"); printHelpAndExit(); } try { System.out.println("Executing the range query..."); final String table = line.get...
void function(final CommandLine line) { if(! line.hasOption(CLIParameter.TABLE)) { System.err.println(STR); printHelpAndExit(); } try { System.out.println(STR); final String table = line.getOptionValue(CLIParameter.TABLE); final Hyperrectangle boundingBox = getBoundingBoxFromArgs(line); final String customFilterClass =...
/** * Execute the given query * @param line */
Execute the given query
actionExecuteRangeQuery
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-tools/src/main/java/org/bboxdb/tools/cli/CLI.java", "license": "apache-2.0", "size": 41886 }
[ "org.apache.commons.cli.CommandLine", "org.bboxdb.commons.math.Hyperrectangle" ]
import org.apache.commons.cli.CommandLine; import org.bboxdb.commons.math.Hyperrectangle;
import org.apache.commons.cli.*; import org.bboxdb.commons.math.*;
[ "org.apache.commons", "org.bboxdb.commons" ]
org.apache.commons; org.bboxdb.commons;
295,462
int invalidateAfter(int position) { if (mData == null) { return RecyclerView.NO_POSITION; } if (position >= mData.length) { return RecyclerView.NO_POSITION; } int endPosition = invalidateFullSpansAfter(position); ...
int invalidateAfter(int position) { if (mData == null) { return RecyclerView.NO_POSITION; } if (position >= mData.length) { return RecyclerView.NO_POSITION; } int endPosition = invalidateFullSpansAfter(position); if (endPosition == RecyclerView.NO_POSITION) { Arrays.fill(mData, position, mData.length, LayoutParams.INVA...
/** * returns end position for invalidation. */
returns end position for invalidation
invalidateAfter
{ "repo_name": "jun0813/Telegram-plusplus", "path": "TMessagesProj/src/main/java/org/telegramsecureplus/android/support/widget/StaggeredGridLayoutManager.java", "license": "gpl-2.0", "size": 105905 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,992,032
private LockGrantorId waitForLockGrantorFutureResult( FutureResult<LockGrantorId> lockGrantorFutureResultRef, long timeToWait, final TimeUnit timeUnit) { LockGrantorId lockGrantorIdRef = null; while (lockGrantorIdRef == null) { boolean interrupted = Thread.interrupted(); try { ...
LockGrantorId function( FutureResult<LockGrantorId> lockGrantorFutureResultRef, long timeToWait, final TimeUnit timeUnit) { LockGrantorId lockGrantorIdRef = null; while (lockGrantorIdRef == null) { boolean interrupted = Thread.interrupted(); try { checkDestroyed(); if (timeToWait == 0) { lockGrantorIdRef = lockGrantorF...
/** * Returns lockGrantorId when lockGrantorFutureResultRef has been set by another thread. * * @param lockGrantorFutureResultRef FutureResult to wait for * @param timeToWait how many ms to wait, 0 = forever * @param timeUnit the unit of measure for timeToWait * @return the LockGrantorId or null if Fu...
Returns lockGrantorId when lockGrantorFutureResultRef has been set by another thread
waitForLockGrantorFutureResult
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java", "license": "apache-2.0", "size": 109340 }
[ "java.util.concurrent.CancellationException", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException", "org.apache.geode.internal.util.concurrent.FutureResult" ]
import java.util.concurrent.CancellationException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.apache.geode.internal.util.concurrent.FutureResult;
import java.util.concurrent.*; import org.apache.geode.internal.util.concurrent.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,984,441
EReference getNameReference_Name();
EReference getNameReference_Name();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.astm.NameReference#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Name</em>'. * @see org.xtext.example.delphi.astm.NameReference...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.astm.NameReference#getName Name</code>'.
getNameReference_Name
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/AstmPackage.java", "license": "epl-1.0", "size": 670467 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,037,372
@ApiOperation(value = "Synchronize rules on the switch", response = SwitchSyncResult.class) @PatchMapping(path = "/{switch_id}/synchronize") @ResponseStatus(HttpStatus.OK) public CompletableFuture<SwitchSyncResult> syncSwitch(@PathVariable(name = "switch_id") SwitchId switchId, ...
@ApiOperation(value = STR, response = SwitchSyncResult.class) @PatchMapping(path = STR) @ResponseStatus(HttpStatus.OK) CompletableFuture<SwitchSyncResult> function(@PathVariable(name = STR) SwitchId switchId, @RequestBody SwitchSyncRequest request) { return switchService.syncSwitch(switchId, request.isRemoveExcess()); ...
/** * Synchronize (install) missing flows that should be on the switch but exist only in the database. * Optionally removes excess rules from the switch. * * @return the synchronization result. */
Synchronize (install) missing flows that should be on the switch but exist only in the database. Optionally removes excess rules from the switch
syncSwitch
{ "repo_name": "telstra/open-kilda", "path": "src-java/northbound-service/northbound/src/main/java/org/openkilda/northbound/controller/v1/SwitchController.java", "license": "apache-2.0", "size": 23736 }
[ "io.swagger.annotations.ApiOperation", "java.util.concurrent.CompletableFuture", "org.openkilda.model.SwitchId", "org.openkilda.northbound.dto.v1.switches.SwitchSyncRequest", "org.openkilda.northbound.dto.v1.switches.SwitchSyncResult", "org.springframework.http.HttpStatus", "org.springframework.web.bind...
import io.swagger.annotations.ApiOperation; import java.util.concurrent.CompletableFuture; import org.openkilda.model.SwitchId; import org.openkilda.northbound.dto.v1.switches.SwitchSyncRequest; import org.openkilda.northbound.dto.v1.switches.SwitchSyncResult; import org.springframework.http.HttpStatus; import org.spri...
import io.swagger.annotations.*; import java.util.concurrent.*; import org.openkilda.model.*; import org.openkilda.northbound.dto.v1.switches.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "io.swagger.annotations", "java.util", "org.openkilda.model", "org.openkilda.northbound", "org.springframework.http", "org.springframework.web" ]
io.swagger.annotations; java.util; org.openkilda.model; org.openkilda.northbound; org.springframework.http; org.springframework.web;
1,983,609
public void testStudyUpdateOfStudySite_StudyPersonnelUpdate() throws Exception { CaaersServiceResponse response = createStudy("studydata/CreateStudyTest.xml"); System.out.println(Helper.toString(response)); studies = (gov.nih.nci.cabig.caaers.integration.schema.study.Studies) unmarshaller....
void function() throws Exception { CaaersServiceResponse response = createStudy(STR); System.out.println(Helper.toString(response)); studies = (gov.nih.nci.cabig.caaers.integration.schema.study.Studies) unmarshaller.unmarshal(createInputStream(STR)); response = studyProcessor.updateStudy(studies); System.out.println(He...
/** * 1 StudyPersonnel exists on for University of Jonathan Dean * Tests the updation of status and roleCode */
1 StudyPersonnel exists on for University of Jonathan Dean Tests the updation of status and roleCode
testStudyUpdateOfStudySite_StudyPersonnelUpdate
{ "repo_name": "CBIIT/caaers", "path": "caAERS/software/core/src/test/java/gov/nih/nci/cabig/caaers/api/StudyProcessorTest.java", "license": "bsd-3-clause", "size": 25447 }
[ "gov.nih.nci.cabig.caaers.api.impl.Helper", "gov.nih.nci.cabig.caaers.domain.StudyPersonnel", "gov.nih.nci.cabig.caaers.domain.StudySite", "gov.nih.nci.cabig.caaers.integration.schema.common.CaaersServiceResponse", "gov.nih.nci.cabig.caaers.security.SecurityTestUtils" ]
import gov.nih.nci.cabig.caaers.api.impl.Helper; import gov.nih.nci.cabig.caaers.domain.StudyPersonnel; import gov.nih.nci.cabig.caaers.domain.StudySite; import gov.nih.nci.cabig.caaers.integration.schema.common.CaaersServiceResponse; import gov.nih.nci.cabig.caaers.security.SecurityTestUtils;
import gov.nih.nci.cabig.caaers.api.impl.*; import gov.nih.nci.cabig.caaers.domain.*; import gov.nih.nci.cabig.caaers.integration.schema.common.*; import gov.nih.nci.cabig.caaers.security.*;
[ "gov.nih.nci" ]
gov.nih.nci;
2,828,141
public Set<IpAddress> getRangedIps(String start, String end) throws AddressStringException { Set<IpAddress> ips = new HashSet<>(); IPAddress lower = new IPAddressString(start).toAddress(); IPAddress upper = new IPAddressString(end).toAddress(); IPAddressSeqRange range = lower.toSeque...
Set<IpAddress> function(String start, String end) throws AddressStringException { Set<IpAddress> ips = new HashSet<>(); IPAddress lower = new IPAddressString(start).toAddress(); IPAddress upper = new IPAddressString(end).toAddress(); IPAddressSeqRange range = lower.toSequentialRange(upper); for (IPAddress addr : range....
/** * Obtains the IP address list from the given start and end range. * * @param start start range * @param end end range * @return IP address list from the given start and end range * @throws AddressStringException exception */
Obtains the IP address list from the given start and end range
getRangedIps
{ "repo_name": "opennetworkinglab/onos", "path": "apps/kubevirt-networking/api/src/main/java/org/onosproject/kubevirtnetworking/api/KubevirtIpPool.java", "license": "apache-2.0", "size": 5531 }
[ "java.util.HashSet", "java.util.Set", "org.onlab.packet.IpAddress" ]
import java.util.HashSet; import java.util.Set; import org.onlab.packet.IpAddress;
import java.util.*; import org.onlab.packet.*;
[ "java.util", "org.onlab.packet" ]
java.util; org.onlab.packet;
2,685,160