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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
FeatureMap getAnyAttribute();
| FeatureMap getAnyAttribute(); | /**
* Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
* The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Any Attribute</em>' attribute list.
* @see org.liquibase... | Returns the value of the 'Any Attribute' attribute list. The list contents are of type <code>org.eclipse.emf.ecore.util.FeatureMap.Entry</code>. | getAnyAttribute | {
"repo_name": "Treehopper/EclipseAugments",
"path": "liquibase-editor/eu.hohenegger.xsd.liquibase/src-gen/org/liquibase/xml/ns/dbchangelog/IncludeAllType.java",
"license": "epl-1.0",
"size": 8559
} | [
"org.eclipse.emf.ecore.util.FeatureMap"
] | import org.eclipse.emf.ecore.util.FeatureMap; | import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,624,638 |
private LinkedList<Diff> diff_compute(String text1, String text2,
boolean checklines, long deadline) {
LinkedList<Diff> diffs = new LinkedList<Diff>();
if (text1.length() == 0) {
// Just add some text (speedup).
diffs.add(new Diff(Operation.INSERT, text2));... | LinkedList<Diff> function(String text1, String text2, boolean checklines, long deadline) { LinkedList<Diff> diffs = new LinkedList<Diff>(); if (text1.length() == 0) { diffs.add(new Diff(Operation.INSERT, text2)); return diffs; } if (text2.length() == 0) { diffs.add(new Diff(Operation.DELETE, text1)); return diffs; } St... | /**
* Find the differences between two texts. Assumes that the texts do not
* have any common prefix or suffix.
* @param text1 Old string to be diffed.
* @param text2 New string to be diffed.
* @param checklines Speedup flag. If false, then don't run a
* line-level diff first to identify the cha... | Find the differences between two texts. Assumes that the texts do not have any common prefix or suffix | diff_compute | {
"repo_name": "Floobits/eclipse",
"path": "src/floobits/common/dmp/diff_match_patch.java",
"license": "apache-2.0",
"size": 89016
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,616,742 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jButtonRefreshLocalServices = new javax.swi... | void function() { jPanel1 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButtonRefreshLocalServices = new javax.swing.JButton(); jButtonRefreshLocalClients = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); jTextAreaLocalServices = new javax.... | /**
* This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "DSG-UniFE/ramp",
"path": "src/it/unibo/deis/lia/ramp/RampGUIJFrame.java",
"license": "mit",
"size": 49579
} | [
"javax.swing.JCheckBox",
"javax.swing.JPanel"
] | import javax.swing.JCheckBox; import javax.swing.JPanel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 316,858 |
public Timestamp getConversionDate ()
{
return (Timestamp)get_Value(COLUMNNAME_ConversionDate);
} | Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_ConversionDate); } | /** Get Conversion Date.
@return Date for selecting conversion rate
*/ | Get Conversion Date | getConversionDate | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_M_DiscountSchemaLine.java",
"license": "gpl-2.0",
"size": 23581
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,114,209 |
public Arc getDirectedArcLinking(Integer input, Integer output) {
Set<Arc> inputOutputs = getOutputs(input);
if (inputOutputs == null)
return null;
int ioSize = inputOutputs.size();
Set<Arc> outputInputs = getInputs(output);
if (outputInputs == null)
return null;
int oiSize = outputInputs.size();
... | Arc function(Integer input, Integer output) { Set<Arc> inputOutputs = getOutputs(input); if (inputOutputs == null) return null; int ioSize = inputOutputs.size(); Set<Arc> outputInputs = getInputs(output); if (outputInputs == null) return null; int oiSize = outputInputs.size(); Set<Arc> searchList = (ioSize < oiSize) ? ... | /**
* Return the (input,output) directed arc in this. If more than one arc link
* those nodes, there is no mean to know which one is returned. If there is
* no arc, null is returned.
*
* @param input
* @param output
* @return An arc linking input and output, null if no link exists or f n1
* or ... | Return the (input,output) directed arc in this. If more than one arc link those nodes, there is no mean to know which one is returned. If there is no arc, null is returned | getDirectedArcLinking | {
"repo_name": "noormoha/DCCast",
"path": "dccast/graphTheory/graph/Graph.java",
"license": "mit",
"size": 64339
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,258,643 |
@Override
public void messageReceived(IoSession session, Object message) {
logger.debug("CLIENT - Message received: " + session);
IoBuffer buf = (IoBuffer) message;
try {
if (file == null) {
file = File.createTempFile("http", ".html");
logger.... | void function(IoSession session, Object message) { logger.debug(STR + session); IoBuffer buf = (IoBuffer) message; try { if (file == null) { file = File.createTempFile("http", ".html"); logger.info(STR + file.getAbsolutePath()); wChannel = new FileOutputStream(file, false).getChannel(); } wChannel.write(buf.buf()); } c... | /**
* Writes the request result to a temporary file.
*/ | Writes the request result to a temporary file | messageReceived | {
"repo_name": "sardine/mina-ja",
"path": "src/mina-example/src/test/java/org/apache/mina/example/proxy/ClientSessionHandler.java",
"license": "apache-2.0",
"size": 5427
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"org.apache.mina.core.buffer.IoBuffer",
"org.apache.mina.core.session.IoSession"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.session.IoSession; | import java.io.*; import org.apache.mina.core.buffer.*; import org.apache.mina.core.session.*; | [
"java.io",
"org.apache.mina"
] | java.io; org.apache.mina; | 2,350,790 |
public static @NonNull String getReasonString(int reason) {
switch (reason) {
case BOND_SUCCESS:
return "BOND_SUCCESS";
case REASON_AUTH_FAILED:
return "REASON_AUTH_FAILED";
case REASON_AUTH_REJECTED:
return "REASON_AUTH_R... | static @NonNull String function(int reason) { switch (reason) { case BOND_SUCCESS: return STR; case REASON_AUTH_FAILED: return STR; case REASON_AUTH_REJECTED: return STR; case REASON_AUTH_CANCELED: return STR; case REASON_REMOTE_DEVICE_DOWN: return STR; case REASON_DISCOVERY_IN_PROGRESS: return STR; case REASON_AUTH_TI... | /**
* Returns the corresponding constant name for a given {@code REASON_*} value.
*
* @see #REASON_UNKNOWN_FAILURE
* @see #REASON_ANDROID_API_CHANGED
* @see #BOND_SUCCESS
* @see #REASON_AUTH_FAILED
* @see #REASON_AUTH_REJECTED
* @see #REASON_AUTH_CANCELED
* @see #REASON_REMO... | Returns the corresponding constant name for a given REASON_* value | getReasonString | {
"repo_name": "hello/android-buruberi",
"path": "buruberi-core/src/main/java/is/hello/buruberi/bluetooth/errors/BondException.java",
"license": "apache-2.0",
"size": 6815
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,351,578 |
public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException {
if (algorithm == null) {
throw new NullPointerException("algorithm == null");
}
Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null);
return new SecureRandom((SecureRando... | static SecureRandom function(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(STR); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new SecureRandom((SecureRandomSpi) sap.spi, sap.provider, algorithm); } /** * Returns a new instance of... | /**
* Returns a new instance of {@code SecureRandom} that utilizes the
* specified algorithm.
*
* @param algorithm
* the name of the algorithm to use.
* @return a new instance of {@code SecureRandom} that utilizes the
* specified algorithm.
* @throws NoSuchAlgo... | Returns a new instance of SecureRandom that utilizes the specified algorithm | getInstance | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "libcore/luni/src/main/java/java/security/SecureRandom.java",
"license": "gpl-3.0",
"size": 12026
} | [
"org.apache.harmony.security.fortress.Engine"
] | import org.apache.harmony.security.fortress.Engine; | import org.apache.harmony.security.fortress.*; | [
"org.apache.harmony"
] | org.apache.harmony; | 314,341 |
@Transition(from = "ONLINE", to = "OFFLINE")
public void releaseShard(Message m, NotificationContext context) {
if (!TCSShardLockRegistry.getLockRegistry().isRegistered(shardName)) {
LOGGER.error("releaseShard notification received for a shard that was never owned: {}", shardName);
... | @Transition(from = STR, to = STR) void function(Message m, NotificationContext context) { if (!TCSShardLockRegistry.getLockRegistry().isRegistered(shardName)) { LOGGER.error(STR, shardName); return; } cleanup(); waitForCleanup(); TCSShardLockRegistry.getLockRegistry().unregister(shardName); LOGGER.info(STR, shardName);... | /**
* Release the shard. Perform TCSShardRunner cleanup.
*
* @param m
* @param context
*/ | Release the shard. Perform TCSShardRunner cleanup | releaseShard | {
"repo_name": "orchestration-svc/tcs",
"path": "tcs/src/main/java/net/tcs/shard/TCSShardLock.java",
"license": "apache-2.0",
"size": 3784
} | [
"java.util.Date",
"org.apache.helix.NotificationContext",
"org.apache.helix.model.Message",
"org.apache.helix.participant.statemachine.Transition"
] | import java.util.Date; import org.apache.helix.NotificationContext; import org.apache.helix.model.Message; import org.apache.helix.participant.statemachine.Transition; | import java.util.*; import org.apache.helix.*; import org.apache.helix.model.*; import org.apache.helix.participant.statemachine.*; | [
"java.util",
"org.apache.helix"
] | java.util; org.apache.helix; | 2,033,390 |
public void removeActionListener(ActionListener listener) {
listeners.remove(listener);
}
| void function(ActionListener listener) { listeners.remove(listener); } | /**
* Remove a listener from this editor. It will no longer be notified
*
* @param listener The listener to be removed
*/ | Remove a listener from this editor. It will no longer be notified | removeActionListener | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/trunk/Slick/tools/org/newdawn/slick/tools/peditor/GradientEditor.java",
"license": "bsd-2-clause",
"size": 11814
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 409,334 |
public List<String> getGroups(final DirContext dirContext) throws NamingException {
LOGGER.debug("Retrieving all groups");
final List<String> groupDns = new ArrayList<>();
final SearchControls sc = new SearchControls();
sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
final N... | List<String> function(final DirContext dirContext) throws NamingException { LOGGER.debug(STR); final List<String> groupDns = new ArrayList<>(); final SearchControls sc = new SearchControls(); sc.setSearchScope(SearchControls.SUBTREE_SCOPE); final NamingEnumeration<SearchResult> ne = dirContext.search(BASE_DN, GROUPS_FI... | /**
* Retrieves a list of all the groups in the directory.
* @param dirContext a DirContext
* @return A list of Strings representing the fully qualified DN of each group
* @throws NamingException if an exception if thrown
* @since 1.4.0
*/ | Retrieves a list of all the groups in the directory | getGroups | {
"repo_name": "stevespringett/Alpine",
"path": "alpine/src/main/java/alpine/auth/LdapConnectionWrapper.java",
"license": "apache-2.0",
"size": 18965
} | [
"java.util.ArrayList",
"java.util.List",
"javax.naming.NamingEnumeration",
"javax.naming.NamingException",
"javax.naming.directory.DirContext",
"javax.naming.directory.SearchControls",
"javax.naming.directory.SearchResult"
] | import java.util.ArrayList; import java.util.List; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; | import java.util.*; import javax.naming.*; import javax.naming.directory.*; | [
"java.util",
"javax.naming"
] | java.util; javax.naming; | 42,236 |
public SnackBar actionRipple(int resId){
if(resId != 0)
ViewUtil.setBackground(mAction, new RippleDrawable.Builder(getContext(), resId).build());
return this;
} | SnackBar function(int resId){ if(resId != 0) ViewUtil.setBackground(mAction, new RippleDrawable.Builder(getContext(), resId).build()); return this; } | /**
* Set the style of RippleEffect of the ActionButton.
* @param resId The resourceId of RippleEffect.
* @return This SnackBar for chaining methods.
*/ | Set the style of RippleEffect of the ActionButton | actionRipple | {
"repo_name": "winhtaikaung/2015_ramdhantimetable",
"path": "libMaterialFramework/src/main/java/com/rey/material/widget/SnackBar.java",
"license": "apache-2.0",
"size": 28220
} | [
"com.rey.material.drawable.RippleDrawable",
"com.rey.material.util.ViewUtil"
] | import com.rey.material.drawable.RippleDrawable; import com.rey.material.util.ViewUtil; | import com.rey.material.drawable.*; import com.rey.material.util.*; | [
"com.rey.material"
] | com.rey.material; | 1,429,133 |
public void setValues(List<String> values) {
this.selectedValues = values;
}
/**
* Set the list of selected values. The specified values must be Strings and
* match the values of the Options.
* <p/>
* For example:
* <pre class="prettyprint">
* CheckList check... | void function(List<String> values) { this.selectedValues = values; } /** * Set the list of selected values. The specified values must be Strings and * match the values of the Options. * <p/> * For example: * <pre class=STR> * CheckList checkList = new CheckList(STR); * * public void onInit() { * List options = new Arra... | /**
* Set the list of selected values. The specified values must be Strings and
* match the values of the Options.
*
* @deprecated use {@link #setSelectedValues(List)} instead
*
* @param values a list of strings or null
*/ | Set the list of selected values. The specified values must be Strings and match the values of the Options | setValues | {
"repo_name": "medgar/click",
"path": "extras/src/org/apache/click/extras/control/CheckList.java",
"license": "apache-2.0",
"size": 41312
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.click.control.Option"
] | import java.util.ArrayList; import java.util.List; import org.apache.click.control.Option; | import java.util.*; import org.apache.click.control.*; | [
"java.util",
"org.apache.click"
] | java.util; org.apache.click; | 1,248,714 |
@Override
public void setIntProperty(final String name, final int value) throws JMSException {
if (ActiveMQRAMessage.trace) {
ActiveMQRALogger.LOGGER.trace("setIntProperty(" + name + ", " + value + ")");
}
message.setIntProperty(name, value);
} | void function(final String name, final int value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace(STR + name + STR + value + ")"); } message.setIntProperty(name, value); } | /**
* Set property
*
* @param name The name
* @param value The value
* @throws JMSException Thrown if an error occurs
*/ | Set property | setIntProperty | {
"repo_name": "franz1981/activemq-artemis",
"path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java",
"license": "apache-2.0",
"size": 21145
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 681,820 |
public synchronized void registerMetadataMapper(String name, MetadataFieldMapper.TypeParser parser) {
if (metadataMapperParsers.containsKey(name)) {
throw new IllegalArgumentException("A mapper is already registered for metadata mapper [" + name + "]");
}
metadataMapperParsers.pu... | synchronized void function(String name, MetadataFieldMapper.TypeParser parser) { if (metadataMapperParsers.containsKey(name)) { throw new IllegalArgumentException(STR + name + "]"); } metadataMapperParsers.put(name, parser); } | /**
* Register a root mapper under the given name.
*/ | Register a root mapper under the given name | registerMetadataMapper | {
"repo_name": "jbertouch/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/indices/IndicesModule.java",
"license": "apache-2.0",
"size": 10170
} | [
"org.elasticsearch.index.mapper.MetadataFieldMapper"
] | import org.elasticsearch.index.mapper.MetadataFieldMapper; | import org.elasticsearch.index.mapper.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,504,321 |
public static int xa_status()
{
try {
return getUserTransaction().getStatus();
} catch (Exception e) {
throw new QuercusModuleException(e);
}
} | static int function() { try { return getUserTransaction().getStatus(); } catch (Exception e) { throw new QuercusModuleException(e); } } | /**
* Returns the JTA status code for the current transation.
*/ | Returns the JTA status code for the current transation | xa_status | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/quercus/lib/ResinModule.java",
"license": "gpl-2.0",
"size": 13473
} | [
"com.caucho.quercus.QuercusModuleException"
] | import com.caucho.quercus.QuercusModuleException; | import com.caucho.quercus.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 791,464 |
@Override
public void onViewReady(View view, Bundle savedInstanceState, Reason reason) {
super.onViewReady(view, savedInstanceState, reason);
if (reason.isFirstTime()) {
CounterMasterInsideView f = new CounterMasterInsideView();
getChildFragmentManager().beginTransactio... | void function(View view, Bundle savedInstanceState, Reason reason) { super.onViewReady(view, savedInstanceState, reason); if (reason.isFirstTime()) { CounterMasterInsideView f = new CounterMasterInsideView(); getChildFragmentManager().beginTransaction() .replace(R.id.screen_master_anotherFragmentContainer, f).commit();... | /**
* Lifecycle similar to onViewCreated by with more granular control with an extra argument to
* indicate why this view is created: 1. first time created, or 2. rotated or 3. restored
* @param view The root view of the fragment
* @param savedInstanceState The savedInstanceState when the fragment i... | Lifecycle similar to onViewCreated by with more granular control with an extra argument to indicate why this view is created: 1. first time created, or 2. rotated or 3. restored | onViewReady | {
"repo_name": "kejunxia/AndroidMvc",
"path": "samples/simple-mvp/app/src/main/java/com/shipdream/lib/android/mvc/samples/simple/mvp/view/CounterMasterScreen.java",
"license": "apache-2.0",
"size": 4257
} | [
"android.os.Bundle",
"android.view.View",
"com.shipdream.lib.android.mvc.Reason"
] | import android.os.Bundle; import android.view.View; import com.shipdream.lib.android.mvc.Reason; | import android.os.*; import android.view.*; import com.shipdream.lib.android.mvc.*; | [
"android.os",
"android.view",
"com.shipdream.lib"
] | android.os; android.view; com.shipdream.lib; | 2,396,146 |
public interface OnItemLongClickListener {
boolean onItemLongClick(StaggeredGridView parent, View view, int position, long id);
} | interface OnItemLongClickListener { boolean function(StaggeredGridView parent, View view, int position, long id); } | /**
* Callback method to be invoked when an item in this view has been
* clicked and held.
*
* Implementers can call getItemAtPosition(position) if they need to access
* the data associated with the selected item.
*
* @param parent The AbsListView where the... | Callback method to be invoked when an item in this view has been clicked and held. Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item | onItemLongClick | {
"repo_name": "kitek/PullToRefresh-StaggeredGridView",
"path": "library/src/android/support/v4/widget/StaggeredGridView.java",
"license": "apache-2.0",
"size": 91620
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,670,981 |
void pushContainerIdsToReconciliationQueue(List<Long> scopeIds);
| void pushContainerIdsToReconciliationQueue(List<Long> scopeIds); | /**
* Push the given container IDs to the Replication Delta queue. The worker
* listing to this queue will reconcile any differences between the truth
* and replication data for all of the given container IDs. .
*
* @param scopeIds
*/ | Push the given container IDs to the Replication Delta queue. The worker listing to this queue will reconcile any differences between the truth and replication data for all of the given container IDs. | pushContainerIdsToReconciliationQueue | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/entity/ReplicationMessageManager.java",
"license": "apache-2.0",
"size": 1013
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,918,108 |
default void checkCanAddColumn(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, SchemaTableName tableName)
{
denyAddColumn(tableName.toString());
} | default void checkCanAddColumn(ConnectorTransactionHandle transactionHandle, ConnectorIdentity identity, SchemaTableName tableName) { denyAddColumn(tableName.toString()); } | /**
* Check if identity is allowed to add columns to the specified table in this catalog.
*
* @throws com.facebook.presto.spi.security.AccessDeniedException if not allowed
*/ | Check if identity is allowed to add columns to the specified table in this catalog | checkCanAddColumn | {
"repo_name": "troels/nz-presto",
"path": "presto-spi/src/main/java/com/facebook/presto/spi/connector/ConnectorAccessControl.java",
"license": "apache-2.0",
"size": 15585
} | [
"com.facebook.presto.spi.SchemaTableName",
"com.facebook.presto.spi.security.AccessDeniedException",
"com.facebook.presto.spi.security.ConnectorIdentity"
] | import com.facebook.presto.spi.SchemaTableName; import com.facebook.presto.spi.security.AccessDeniedException; import com.facebook.presto.spi.security.ConnectorIdentity; | import com.facebook.presto.spi.*; import com.facebook.presto.spi.security.*; | [
"com.facebook.presto"
] | com.facebook.presto; | 2,872,258 |
private void takeOwnership(Pool pool) throws ConfigurationException {
try {
LOGGER.debug("Take ownership of host " + config.getAgentHostname());
pool.takeOwnership(config.getAgentOwnedByUuid(), "");
} catch (Ovm3ResourceException e) {
String msg = "Failed to take ... | void function(Pool pool) throws ConfigurationException { try { LOGGER.debug(STR + config.getAgentHostname()); pool.takeOwnership(config.getAgentOwnedByUuid(), STRFailed to take ownership of host " + config.getAgentHostname(); LOGGER.error(msg); throw new ConfigurationException(msg); } } | /**
* If you don't own the host you can't fiddle with it.
*
* @param pool
* @throws ConfigurationException
*/ | If you don't own the host you can't fiddle with it | takeOwnership | {
"repo_name": "ikoula/cloudstack",
"path": "plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3StoragePool.java",
"license": "gpl-2.0",
"size": 30133
} | [
"com.cloud.hypervisor.ovm3.objects.Pool",
"javax.naming.ConfigurationException"
] | import com.cloud.hypervisor.ovm3.objects.Pool; import javax.naming.ConfigurationException; | import com.cloud.hypervisor.ovm3.objects.*; import javax.naming.*; | [
"com.cloud.hypervisor",
"javax.naming"
] | com.cloud.hypervisor; javax.naming; | 406,985 |
private int processOperation() throws IOException {
int ret = 0;
CodieCommandType operation;
byte[] dataPackage = outputStream.toByteArray();
try {
operation = checkHeaderContent(dataPackage);
} catch (IllegalArgumentException e) {
throw new IOException(e);
}
switch (operation) {
case... | int function() throws IOException { int ret = 0; CodieCommandType operation; byte[] dataPackage = outputStream.toByteArray(); try { operation = checkHeaderContent(dataPackage); } catch (IllegalArgumentException e) { throw new IOException(e); } switch (operation) { case Null: case Echo: break; case BatteryGetSoc: ret = ... | /**
* This is the actual method that is doing the requested operation.
*/ | This is the actual method that is doing the requested operation | processOperation | {
"repo_name": "csorbazoli/CodieController",
"path": "src/hu/herba/util/bluetooth/mock/CodieMockOperation.java",
"license": "gpl-3.0",
"size": 15567
} | [
"hu.herba.util.codie.model.CodieCommandType",
"java.io.IOException"
] | import hu.herba.util.codie.model.CodieCommandType; import java.io.IOException; | import hu.herba.util.codie.model.*; import java.io.*; | [
"hu.herba.util",
"java.io"
] | hu.herba.util; java.io; | 2,683,963 |
public static boolean registerLocaleChangeListener(final EComponentI component) {
for (Object o : SystemSettings.getSingleton().propertyChangeSupport.getPropertyChangeListeners()) {
try {
PropertyChangeListenerProxy pclp = (PropertyChangeListenerProxy) o;
if (!org.swingeasy.WeakReferencedListener.is... | static boolean function(final EComponentI component) { for (Object o : SystemSettings.getSingleton().propertyChangeSupport.getPropertyChangeListeners()) { try { PropertyChangeListenerProxy pclp = (PropertyChangeListenerProxy) o; if (!org.swingeasy.WeakReferencedListener.isWrapped(pclp.getListener())) { continue; } Prop... | /**
* register component as a locale change listener
*/ | register component as a locale change listener | registerLocaleChangeListener | {
"repo_name": "jurgendl/swing-easy",
"path": "src/main/java/org/swingeasy/UIUtils.java",
"license": "mit",
"size": 27249
} | [
"java.beans.PropertyChangeListener",
"java.beans.PropertyChangeListenerProxy",
"org.swingeasy.system.SystemSettings"
] | import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListenerProxy; import org.swingeasy.system.SystemSettings; | import java.beans.*; import org.swingeasy.system.*; | [
"java.beans",
"org.swingeasy.system"
] | java.beans; org.swingeasy.system; | 1,460,084 |
public void setPersonService(PersonService personService) {
this.personService = personService;
}
| void function(PersonService personService) { this.personService = personService; } | /**
* Sets the implementation of the PersonService for this service to use
* @param parameterService an implementation of PersonService
*/ | Sets the implementation of the PersonService for this service to use | setPersonService | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/tem/document/service/impl/TravelPaymentsHelperServiceImpl.java",
"license": "agpl-3.0",
"size": 15757
} | [
"org.kuali.rice.kim.api.identity.PersonService"
] | import org.kuali.rice.kim.api.identity.PersonService; | import org.kuali.rice.kim.api.identity.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 296,676 |
public boolean next(StringValue target) {
final char[] data = this.toTokenize.getCharArray();
final int limit = this.limit;
int pos = this.pos;
// skip the delimiter
for (; pos < limit && Character.isWhitespace(data[pos]); pos++);
if (pos >= limit) {
this.pos = pos;
return false;
... | boolean function(StringValue target) { final char[] data = this.toTokenize.getCharArray(); final int limit = this.limit; int pos = this.pos; for (; pos < limit && Character.isWhitespace(data[pos]); pos++); if (pos >= limit) { this.pos = pos; return false; } final int start = pos; for (; pos < limit && !Character.isWhit... | /**
* Gets the next token from the string. If another token is available, the token is stored
* in the given target StringValue object.
*
* @param target The StringValue object to store the next token in.
* @return True, if there was another token, false if not.
*/ | Gets the next token from the string. If another token is available, the token is stored in the given target StringValue object | next | {
"repo_name": "fanzhidongyzby/flink",
"path": "flink-core/src/main/java/org/apache/flink/util/StringValueUtils.java",
"license": "apache-2.0",
"size": 4808
} | [
"org.apache.flink.types.StringValue"
] | import org.apache.flink.types.StringValue; | import org.apache.flink.types.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,131,189 |
public void addIconToFrontOfRetrieveList(DockerContainerElement offering, Label imageLabel) {
synchronized (lock) {
// Add to front (this may create a duplicate; dupes are checked in IconRetrieveRunnable)
ServiceWizardMapEntry me = new ServiceWizardMapEntry(offering, imageLabel);
iconsToRetrieve.add... | void function(DockerContainerElement offering, Label imageLabel) { synchronized (lock) { ServiceWizardMapEntry me = new ServiceWizardMapEntry(offering, imageLabel); iconsToRetrieve.add(0, me); lock.notifyAll(); } } | /**
* Add icon to the front of the list, for icons the user is currently viewing
*/ | Add icon to the front of the list, for icons the user is currently viewing | addIconToFrontOfRetrieveList | {
"repo_name": "osswangxining/dockerfoundry",
"path": "cn.dockerfoundry.ide.eclipse.server.ui/src/cn/dockerfoundry/ide/eclipse/server/ui/internal/wizards/DockerFoundryServiceWizardPageLeftPanel.java",
"license": "apache-2.0",
"size": 42259
} | [
"cn.dockerfoundry.ide.eclipse.explorer.ui.domain.DockerContainerElement",
"org.eclipse.swt.widgets.Label"
] | import cn.dockerfoundry.ide.eclipse.explorer.ui.domain.DockerContainerElement; import org.eclipse.swt.widgets.Label; | import cn.dockerfoundry.ide.eclipse.explorer.ui.domain.*; import org.eclipse.swt.widgets.*; | [
"cn.dockerfoundry.ide",
"org.eclipse.swt"
] | cn.dockerfoundry.ide; org.eclipse.swt; | 611,130 |
public static IntValuedEnum<RTresult> rtBufferUnmapEx(RTbuffer buffer, int level)
{
return FlagSet.fromValue(rtBufferUnmapEx(Pointer.getPeer(buffer), level), RTresult.class);
} | static IntValuedEnum<RTresult> function(RTbuffer buffer, int level) { return FlagSet.fromValue(rtBufferUnmapEx(Pointer.getPeer(buffer), level), RTresult.class); } | /**
* Original signature : <code>RTresult rtBufferUnmapEx(RTbuffer, unsigned int)</code><br>
* <i>native declaration : include\optix_host.h:8811</i>
*/ | Original signature : <code>RTresult rtBufferUnmapEx(RTbuffer, unsigned int)</code> native declaration : include\optix_host.h:8811 | rtBufferUnmapEx | {
"repo_name": "fetox74/optix-wrapper",
"path": "src/main/java/com/fetoxdevelopments/optix/api/RT.java",
"license": "mit",
"size": 162970
} | [
"com.fetoxdevelopments.optix.api.enumeration.RTresult",
"com.fetoxdevelopments.optix.api.struct.RTbuffer",
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import com.fetoxdevelopments.optix.api.enumeration.RTresult; import com.fetoxdevelopments.optix.api.struct.RTbuffer; import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import com.fetoxdevelopments.optix.api.enumeration.*; import com.fetoxdevelopments.optix.api.struct.*; import org.bridj.*; | [
"com.fetoxdevelopments.optix",
"org.bridj"
] | com.fetoxdevelopments.optix; org.bridj; | 861,302 |
void cancel(@NonNull String workSpecId); | void cancel(@NonNull String workSpecId); | /**
* Cancel the work identified by the given {@link WorkSpec} id.
*
* @param workSpecId The id of the work to stopWork
*/ | Cancel the work identified by the given <code>WorkSpec</code> id | cancel | {
"repo_name": "AndroidX/androidx",
"path": "work/work-runtime/src/main/java/androidx/work/impl/Scheduler.java",
"license": "apache-2.0",
"size": 1967
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 1,418,648 |
protected Exp copy() {
throw new MiscErrorException("Shouldn't be calling copy() from type " + this.getClass(),
new CloneNotSupportedException());
} | Exp function() { throw new MiscErrorException(STR + this.getClass(), new CloneNotSupportedException()); } | /**
* <p>
* Implemented by concrete subclasses of {@link Exp} to manufacture a copy of themselves.
* </p>
*
* @return A new {@link Exp} that is a deep copy of the original.
*/ | Implemented by concrete subclasses of <code>Exp</code> to manufacture a copy of themselves. | copy | {
"repo_name": "ClemsonRSRG/RESOLVE",
"path": "src/java/edu/clemson/rsrg/absyn/expressions/Exp.java",
"license": "bsd-3-clause",
"size": 16432
} | [
"edu.clemson.rsrg.statushandling.exception.MiscErrorException"
] | import edu.clemson.rsrg.statushandling.exception.MiscErrorException; | import edu.clemson.rsrg.statushandling.exception.*; | [
"edu.clemson.rsrg"
] | edu.clemson.rsrg; | 342,114 |
public WebPage afterSaveOrUpdate(); | WebPage function(); | /**
* Will be called directly after storing the data object (insert, update, delete). If any page is returned then proceed a redirect to this
* given page.
*/ | Will be called directly after storing the data object (insert, update, delete). If any page is returned then proceed a redirect to this given page | afterSaveOrUpdate | {
"repo_name": "developerleo/ProjectForge-2nd",
"path": "src/main/java/org/projectforge/web/wicket/IEditPage.java",
"license": "gpl-3.0",
"size": 4949
} | [
"org.apache.wicket.markup.html.WebPage"
] | import org.apache.wicket.markup.html.WebPage; | import org.apache.wicket.markup.html.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 621,665 |
@Test
public void testCloning() throws CloneNotSupportedException {
MultiplePiePlot p1 = new MultiplePiePlot();
Rectangle2D rect = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0);
p1.setLegendItemShape(rect);
MultiplePiePlot p2 = (MultiplePiePlot) p1.clone();
assertNotSa... | void function() throws CloneNotSupportedException { MultiplePiePlot p1 = new MultiplePiePlot(); Rectangle2D rect = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0); p1.setLegendItemShape(rect); MultiplePiePlot p2 = (MultiplePiePlot) p1.clone(); assertNotSame(p1, p2); assertSame(p1.getClass(), p2.getClass()); assertEquals(p1,... | /**
* Some basic checks for the clone() method.
* @throws CloneNotSupportedException
*/ | Some basic checks for the clone() method | testCloning | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/test/java/org/jfree/chart/plot/MultiplePiePlotTest.java",
"license": "lgpl-2.1",
"size": 8098
} | [
"java.awt.geom.Rectangle2D",
"org.junit.Assert"
] | import java.awt.geom.Rectangle2D; import org.junit.Assert; | import java.awt.geom.*; import org.junit.*; | [
"java.awt",
"org.junit"
] | java.awt; org.junit; | 751,923 |
protected void configureTransformer(Transformer transformer, Exchange exchange) throws Exception {
if (uriResolver == null) {
uriResolver = new XsltUriResolver(exchange.getContext(), null);
}
transformer.setURIResolver(uriResolver);
if (errorListener == null) {
... | void function(Transformer transformer, Exchange exchange) throws Exception { if (uriResolver == null) { uriResolver = new XsltUriResolver(exchange.getContext(), null); } transformer.setURIResolver(uriResolver); if (errorListener == null) { transformer.setErrorListener(new DefaultTransformErrorHandler(exchange)); } else... | /**
* Configures the transformer with exchange specific parameters
*/ | Configures the transformer with exchange specific parameters | configureTransformer | {
"repo_name": "punkhorn/camel-upstream",
"path": "components/camel-xslt/src/main/java/org/apache/camel/component/xslt/XsltBuilder.java",
"license": "apache-2.0",
"size": 20689
} | [
"javax.xml.transform.Transformer",
"org.apache.camel.Exchange"
] | import javax.xml.transform.Transformer; import org.apache.camel.Exchange; | import javax.xml.transform.*; import org.apache.camel.*; | [
"javax.xml",
"org.apache.camel"
] | javax.xml; org.apache.camel; | 1,196,489 |
protected NavigationItemEnum getSelfNavDrawerItem() {
return NavigationItemEnum.INVALID;
} | NavigationItemEnum function() { return NavigationItemEnum.INVALID; } | /**
* Returns the navigation drawer item that corresponds to this Activity. Subclasses of
* BaseActivity override this to indicate what nav drawer item corresponds to them Return
* NAVDRAWER_ITEM_INVALID to mean that this Activity should not have a Nav Drawer.
*/ | Returns the navigation drawer item that corresponds to this Activity. Subclasses of BaseActivity override this to indicate what nav drawer item corresponds to them Return NAVDRAWER_ITEM_INVALID to mean that this Activity should not have a Nav Drawer | getSelfNavDrawerItem | {
"repo_name": "amardeshbd/iosched",
"path": "android/src/main/java/com/google/samples/apps/iosched/ui/BaseActivity.java",
"license": "apache-2.0",
"size": 25417
} | [
"com.google.samples.apps.iosched.navigation.NavigationModel"
] | import com.google.samples.apps.iosched.navigation.NavigationModel; | import com.google.samples.apps.iosched.navigation.*; | [
"com.google.samples"
] | com.google.samples; | 1,904,914 |
public Invitation getInvitation(Connection connection, int id) throws SQLException {
Invitation invitation = null;
ResultSet rs = null;
PreparedStatement pstmt = null;
try {
pstmt = connection.prepareStatement(SELECT_INVITATION_BY_ID);
pstmt.setInt(1, id);
rs = pstmt.executeQuery();... | Invitation function(Connection connection, int id) throws SQLException { Invitation invitation = null; ResultSet rs = null; PreparedStatement pstmt = null; try { pstmt = connection.prepareStatement(SELECT_INVITATION_BY_ID); pstmt.setInt(1, id); rs = pstmt.executeQuery(); if (rs.next()) { invitation = new Invitation(); ... | /**
* retrieve an invitation
* @param connection
* @param id
* @return Invitation
* @throws SQLException
* @return an invitation
*/ | retrieve an invitation | getInvitation | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/socialNetwork/invitation/InvitationDao.java",
"license": "agpl-3.0",
"size": 9433
} | [
"com.stratelia.webactiv.util.DBUtil",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.Date"
] | import com.stratelia.webactiv.util.DBUtil; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Date; | import com.stratelia.webactiv.util.*; import java.sql.*; import java.util.*; | [
"com.stratelia.webactiv",
"java.sql",
"java.util"
] | com.stratelia.webactiv; java.sql; java.util; | 969,686 |
public void testLastElement() {
LinkedList q = populatedQueue(SIZE);
for (int i = SIZE - 1; i >= 0; --i) {
assertEquals(i, q.getLast());
assertEquals(i, q.pollLast());
}
try {
q.getLast();
shouldThrow();
} catch (NoSuchElementEx... | void function() { LinkedList q = populatedQueue(SIZE); for (int i = SIZE - 1; i >= 0; --i) { assertEquals(i, q.getLast()); assertEquals(i, q.pollLast()); } try { q.getLast(); shouldThrow(); } catch (NoSuchElementException success) {} assertNull(q.peekLast()); } | /**
* getLast returns next element, or throws NSEE if empty
*/ | getLast returns next element, or throws NSEE if empty | testLastElement | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/LinkedListTest.java",
"license": "gpl-2.0",
"size": 20195
} | [
"java.util.LinkedList",
"java.util.NoSuchElementException"
] | import java.util.LinkedList; import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,550,901 |
@SuppressWarnings("unused")
public Builder setExecutors(Executor httpExecutor, Executor callbackExecutor) {
builder.setExecutors(httpExecutor, callbackExecutor);
return this;
} | @SuppressWarnings(STR) Builder function(Executor httpExecutor, Executor callbackExecutor) { builder.setExecutors(httpExecutor, callbackExecutor); return this; } | /**
* Executors used for asynchronous HTTP client downloads and callbacks.
*
* @param httpExecutor Executor on which HTTP client calls will be made.
* @param callbackExecutor Executor on which any Callback methods will be invoked. If
* this argument is {@code null} then callba... | Executors used for asynchronous HTTP client downloads and callbacks | setExecutors | {
"repo_name": "tiagobarreto/retroauth",
"path": "retroauth/src/main/java/eu/unicate/retroauth/AuthRestAdapter.java",
"license": "apache-2.0",
"size": 11386
} | [
"java.util.concurrent.Executor"
] | import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,269,473 |
@Test
public void testBlockMetaDataInfoWithHostname() throws Exception {
assumeTrue(System.getProperty("os.name").startsWith("Linux"));
checkBlockMetaDataInfo(true);
} | void function() throws Exception { assumeTrue(System.getProperty(STR).startsWith("Linux")); checkBlockMetaDataInfo(true); } | /**
* The same as above, but use hostnames for DN<->DN communication
*/ | The same as above, but use hostnames for DNDN communication | testBlockMetaDataInfoWithHostname | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java",
"license": "apache-2.0",
"size": 16007
} | [
"org.junit.Assume"
] | import org.junit.Assume; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,753,864 |
public static OutcomeBuilder errorOutcome(
RequestHeader request, Status status, String title, String detail, Outcomes outcomes
)
{
Status theStatus = status != null ? status : Status.INTERNAL_SERVER_ERROR;
String theTitle = hasText( title ) ? title : theStatus.code() + SPACE + theSt... | static OutcomeBuilder function( RequestHeader request, Status status, String title, String detail, Outcomes outcomes ) { Status theStatus = status != null ? status : Status.INTERNAL_SERVER_ERROR; String theTitle = hasText( title ) ? title : theStatus.code() + SPACE + theStatus.reasonPhrase(); String preferredMimeType =... | /**
* Build a default error outcome.
* <p>
* Respect content-type negociation to output a {@literal HTML}, {@literal JSON} or {@literal text/plain} outcome.
*
* @param request Request header or null, {@literal text/plain} will be used if null
* @param status Outcome status or null, {@liter... | Build a default error outcome. Respect content-type negociation to output a HTML, JSON or text/plain outcome | errorOutcome | {
"repo_name": "werval/werval",
"path": "io.werval/io.werval.api/src/main/java/io/werval/api/outcomes/DefaultErrorOutcomes.java",
"license": "apache-2.0",
"size": 4187
} | [
"io.werval.api.http.RequestHeader",
"io.werval.api.http.Status",
"io.werval.util.Strings"
] | import io.werval.api.http.RequestHeader; import io.werval.api.http.Status; import io.werval.util.Strings; | import io.werval.api.http.*; import io.werval.util.*; | [
"io.werval.api",
"io.werval.util"
] | io.werval.api; io.werval.util; | 177,404 |
@Test
public void testSorted() {
Random random = new Random(3456);
for(int i =0 ; i < nbRepeats ; i++){
// create sorted and check it is sorted
TreeList<Integer> list = createSorted(random);
assertTrue(isSorted(list));
assertTrue(isIndicesCorrect(list));
}
} | void function() { Random random = new Random(3456); for(int i =0 ; i < nbRepeats ; i++){ TreeList<Integer> list = createSorted(random); assertTrue(isSorted(list)); assertTrue(isIndicesCorrect(list)); } } | /**
* Create a sorted list and check it is sorted
*/ | Create a sorted list and check it is sorted | testSorted | {
"repo_name": "PGWelch/com.opendoorlogistics",
"path": "com.opendoorlogistics.core/src/tests/com/opendoorlogistics/core/utils/TreeListTest.java",
"license": "lgpl-3.0",
"size": 8679
} | [
"com.opendoorlogistics.core.utils.TreeList",
"java.util.Random",
"junit.framework.Assert"
] | import com.opendoorlogistics.core.utils.TreeList; import java.util.Random; import junit.framework.Assert; | import com.opendoorlogistics.core.utils.*; import java.util.*; import junit.framework.*; | [
"com.opendoorlogistics.core",
"java.util",
"junit.framework"
] | com.opendoorlogistics.core; java.util; junit.framework; | 1,202,478 |
public Job run(Flow flow, Map<Component, List<Property>> componentMap,
String name, String description, String mirexSubmissionCode,int taskId)
throws MeandreServerException {
HashMap<String, String> paramMap = new HashMap<String, String>();
Component component;
for (Entry<Component, List<Property>> maps... | Job function(Flow flow, Map<Component, List<Property>> componentMap, String name, String description, String mirexSubmissionCode,int taskId) throws MeandreServerException { HashMap<String, String> paramMap = new HashMap<String, String>(); Component component; for (Entry<Component, List<Property>> mapsEntry : componentM... | /**
* Create a job with all the properties in datatypeMaps.
*
* @param flow
* Flow that the job is based on.
* @param componentMap
* All parameters.
* @param name
* Job name
* @param description
* Job description
* @return the job object created with th... | Create a job with all the properties in datatypeMaps | run | {
"repo_name": "kumaramit01/DIY",
"path": "webapp/src/main/java/org/imirsel/nema/webapp/webflow/TasksServiceImpl.java",
"license": "apache-2.0",
"size": 29539
} | [
"java.util.Date",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.jcr.SimpleCredentials",
"org.imirsel.nema.flowservice.MeandreServerException",
"org.imirsel.nema.model.Component",
"org.imirsel.nema.model.Flow",
"org.imirsel.nema.model.Job",
"org.imirsel.nema.model.Property",
"org... | import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.jcr.SimpleCredentials; import org.imirsel.nema.flowservice.MeandreServerException; import org.imirsel.nema.model.Component; import org.imirsel.nema.model.Flow; import org.imirsel.nema.model.Job; import org.imirsel... | import java.util.*; import javax.jcr.*; import org.imirsel.nema.flowservice.*; import org.imirsel.nema.model.*; | [
"java.util",
"javax.jcr",
"org.imirsel.nema"
] | java.util; javax.jcr; org.imirsel.nema; | 2,492,492 |
private void updateAcceptButton() {
((TextView) getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done_textview")))
.setEnabled(fileNames.size() != 0);
getActionBar().getCustomView().findViewById(fakeR.getId("id", "actionbar_done")).setEnabled(fileNames.size() ... | void function() { ((TextView) getActionBar().getCustomView().findViewById(fakeR.getId("id", STR))) .setEnabled(fileNames.size() != 0); getActionBar().getCustomView().findViewById(fakeR.getId("id", STR)).setEnabled(fileNames.size() != 0); } | /*********************
* Helper Methods
********************/ | Helper Methods | updateAcceptButton | {
"repo_name": "zobbe/cordova-plugin-image-picker-pernexus",
"path": "src/android/Library/src/MultiImageChooserActivity.java",
"license": "mit",
"size": 27026
} | [
"android.widget.TextView"
] | import android.widget.TextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,628,564 |
public static void clear() {
XmlAuthorization.currentDocUri = null;
if (XmlAuthorization.userRoles != null) {
XmlAuthorization.userRoles.clear();
XmlAuthorization.userRoles = null;
}
if (XmlAuthorization.rolePermissions != null) {
XmlAuthorization.rolePermissions.clear();
XmlA... | static void function() { XmlAuthorization.currentDocUri = null; if (XmlAuthorization.userRoles != null) { XmlAuthorization.userRoles.clear(); XmlAuthorization.userRoles = null; } if (XmlAuthorization.rolePermissions != null) { XmlAuthorization.rolePermissions.clear(); XmlAuthorization.rolePermissions = null; } XmlAutho... | /**
* Clear all the statically cached information.
*/ | Clear all the statically cached information | clear | {
"repo_name": "sshcherbakov/incubator-geode",
"path": "gemfire-core/src/test/java/templates/security/XmlAuthorization.java",
"license": "apache-2.0",
"size": 26018
} | [
"java.util.regex.Pattern",
"org.xml.sax.EntityResolver"
] | import java.util.regex.Pattern; import org.xml.sax.EntityResolver; | import java.util.regex.*; import org.xml.sax.*; | [
"java.util",
"org.xml.sax"
] | java.util; org.xml.sax; | 2,127,688 |
public void hide(Animation anim) {
hide(true, anim);
}
| void function(Animation anim) { hide(true, anim); } | /**
* Make the badge non-visible in the UI.
*
* @param anim Animation to apply to the view when made non-visible.
*/ | Make the badge non-visible in the UI | hide | {
"repo_name": "Cangol/GBF",
"path": "app/src/com/azhuoinfo/gbf/view/BadgeView.java",
"license": "apache-2.0",
"size": 12103
} | [
"android.view.animation.Animation"
] | import android.view.animation.Animation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 714,309 |
public Builder setNegativeButton(String negativeButtonText, DialogInterface.OnClickListener listener) {
this.negativeButtonText = negativeButtonText;
this.negativeButtonClickListener = listener;
return this;
} | Builder function(String negativeButtonText, DialogInterface.OnClickListener listener) { this.negativeButtonText = negativeButtonText; this.negativeButtonClickListener = listener; return this; } | /**
* Set the negative button text and it's listener
*
* @param negativeButtonText
* @param listener
* @return
*/ | Set the negative button text and it's listener | setNegativeButton | {
"repo_name": "rAntonioh/Anki-Android",
"path": "src/com/ichi2/themes/StyledDialog.java",
"license": "gpl-3.0",
"size": 21874
} | [
"android.content.DialogInterface"
] | import android.content.DialogInterface; | import android.content.*; | [
"android.content"
] | android.content; | 2,387,671 |
void updateRegionMaximumEditLogSeqNum(Entry entry) {
synchronized (regionMaximumEditLogSeqNum) {
Long currentMaxSeqNum = regionMaximumEditLogSeqNum.get(entry.getKey()
.getEncodedRegionName());
if (currentMaxSeqNum == null || entry.getKey().getLogSeqNum() > currentMaxSeqNum) {
... | void updateRegionMaximumEditLogSeqNum(Entry entry) { synchronized (regionMaximumEditLogSeqNum) { Long currentMaxSeqNum = regionMaximumEditLogSeqNum.get(entry.getKey() .getEncodedRegionName()); if (currentMaxSeqNum == null entry.getKey().getLogSeqNum() > currentMaxSeqNum) { regionMaximumEditLogSeqNum.put(entry.getKey().... | /**
*
* Update region's maximum edit log SeqNum.
*/ | Update region's maximum edit log SeqNum | updateRegionMaximumEditLogSeqNum | {
"repo_name": "Guavus/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALSplitter.java",
"license": "apache-2.0",
"size": 84996
} | [
"org.apache.hadoop.hbase.wal.WAL"
] | import org.apache.hadoop.hbase.wal.WAL; | import org.apache.hadoop.hbase.wal.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,114,369 |
private CssFile parseCssFile(Parser parser, String filename, Filter filter)
{
InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename);
String css = inputStreamToText(is);
CssFile rules = parser.parseCSS(css, filter);
return rules;
} | CssFile function(Parser parser, String filename, Filter filter) { InputStream is = this.getClass().getClassLoader().getResourceAsStream(filename); String css = inputStreamToText(is); CssFile rules = parser.parseCSS(css, filter); return rules; } | /**
* Parse CSS file from classpath
* @param parser
* @param filename
* @return
*/ | Parse CSS file from classpath | parseCssFile | {
"repo_name": "aleksi1/Purity-CSS",
"path": "src/test/java/com/purity/css/CommentTest.java",
"license": "mit",
"size": 2130
} | [
"com.purity.css.model.CssFile",
"java.io.InputStream"
] | import com.purity.css.model.CssFile; import java.io.InputStream; | import com.purity.css.model.*; import java.io.*; | [
"com.purity.css",
"java.io"
] | com.purity.css; java.io; | 1,873,422 |
private void unregisterListeners() {
// BEGIN_INCLUDE(unregister)
SensorManager sensorManager =
(SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE);
sensorManager.unregisterListener(mListener);
Log.i(TAG, "Sensor listener unregistered.");
... | void function() { SensorManager sensorManager = (SensorManager) getActivity().getSystemService(Activity.SENSOR_SERVICE); sensorManager.unregisterListener(mListener); Log.i(TAG, STR); } | /**
* Unregisters the sensor listener if it is registered.
*/ | Unregisters the sensor listener if it is registered | unregisterListeners | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "developers/samples/android/sensors/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/BatchStepSensorFragment.java",
"license": "gpl-3.0",
"size": 25011
} | [
"android.app.Activity",
"android.hardware.SensorManager",
"com.example.android.common.logger.Log"
] | import android.app.Activity; import android.hardware.SensorManager; import com.example.android.common.logger.Log; | import android.app.*; import android.hardware.*; import com.example.android.common.logger.*; | [
"android.app",
"android.hardware",
"com.example.android"
] | android.app; android.hardware; com.example.android; | 325 |
public void addProduct(Product product) {
if (product != null) {
try {
listModel.addElements(product);
} catch (ValidationException ve) {
Debug.trace(ve);
}
}
} | void function(Product product) { if (product != null) { try { listModel.addElements(product); } catch (ValidationException ve) { Debug.trace(ve); } } } | /**
* Allows clients to add single products.
*
* @param product A product to add.
*/ | Allows clients to add single products | addProduct | {
"repo_name": "arraydev/snap-desktop",
"path": "snap-ui/src/main/java/org/esa/snap/framework/ui/product/SourceProductList.java",
"license": "gpl-3.0",
"size": 10757
} | [
"com.bc.ceres.binding.ValidationException",
"org.esa.snap.framework.datamodel.Product",
"org.esa.snap.util.Debug"
] | import com.bc.ceres.binding.ValidationException; import org.esa.snap.framework.datamodel.Product; import org.esa.snap.util.Debug; | import com.bc.ceres.binding.*; import org.esa.snap.framework.datamodel.*; import org.esa.snap.util.*; | [
"com.bc.ceres",
"org.esa.snap"
] | com.bc.ceres; org.esa.snap; | 1,485,613 |
static public String getPortletId(PortletHolder portlet){
try {
return portlet.getPortletName(); //.split("@")[1];
} catch (Exception e) {
return portlet.toString();
}
} | static String function(PortletHolder portlet){ try { return portlet.getPortletName(); } catch (Exception e) { return portlet.toString(); } } | /**
* Calcul un id unique pour un portlet
* @param portlet le <code>portletHolder</code> réferencant le portlet
* @return un <code>String</code> indiquant un id unique
*/ | Calcul un id unique pour un portlet | getPortletId | {
"repo_name": "seb0uil/tportal",
"path": "src/net/tinyportal/javax/portlet/TpPortletURL.java",
"license": "gpl-2.0",
"size": 3938
} | [
"net.tinyportal.bean.PortletHolder"
] | import net.tinyportal.bean.PortletHolder; | import net.tinyportal.bean.*; | [
"net.tinyportal.bean"
] | net.tinyportal.bean; | 1,123,804 |
void switchComponent(String componentName) {
RootLayoutPanel.get().clear();
if (componentName == null && components.keySet().size() > 0) {
componentName = (String) components.keySet().toArray()[0];
}
// Is it a not yet instantiated module?
final TWICEModule module = modules.get(componentName);
if (mod... | void switchComponent(String componentName) { RootLayoutPanel.get().clear(); if (componentName == null && components.keySet().size() > 0) { componentName = (String) components.keySet().toArray()[0]; } final TWICEModule module = modules.get(componentName); if (module != null) { final String moduleComponentName = componen... | /**
* Switch to a specific component ({@link TWICEModule}). If the module has not been accessed yet, it is instantiated and the callback is invoked.
*
* @param componentName
*/ | Switch to a specific component (<code>TWICEModule</code>). If the module has not been accessed yet, it is instantiated and the callback is invoked | switchComponent | {
"repo_name": "incidincer/twice",
"path": "DynamicLayout/src/main/java/ch/unifr/pai/twice/layout/client/mobile/MobileInterface.java",
"license": "apache-2.0",
"size": 11013
} | [
"ch.unifr.pai.twice.module.client.TWICEModule",
"ch.unifr.pai.twice.module.client.TWICEModuleController",
"com.google.gwt.user.client.rpc.AsyncCallback",
"com.google.gwt.user.client.ui.RootLayoutPanel",
"com.google.gwt.user.client.ui.Widget"
] | import ch.unifr.pai.twice.module.client.TWICEModule; import ch.unifr.pai.twice.module.client.TWICEModuleController; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.RootLayoutPanel; import com.google.gwt.user.client.ui.Widget; | import ch.unifr.pai.twice.module.client.*; import com.google.gwt.user.client.rpc.*; import com.google.gwt.user.client.ui.*; | [
"ch.unifr.pai",
"com.google.gwt"
] | ch.unifr.pai; com.google.gwt; | 2,183,748 |
@Test public void testPushFilterPastAggFour() {
final HepProgram preProgram =
HepProgram.builder()
.addRuleInstance(AggregateProjectMergeRule.INSTANCE)
.addRuleInstance(AggregateFilterTransposeRule.INSTANCE)
.build();
final HepProgram program =
HepProgram.bu... | @Test void function() { final HepProgram preProgram = HepProgram.builder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .addRuleInstance(AggregateFilterTransposeRule.INSTANCE) .build(); final HepProgram program = HepProgram.builder() .addRuleInstance(FilterAggregateTransposeRule.INSTANCE) .build(); final String... | /** Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-1109">[CALCITE-1109]
* FilterAggregateTransposeRule pushes down incorrect condition</a>. */ | Test case for [CALCITE-1109] | testPushFilterPastAggFour | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java",
"license": "apache-2.0",
"size": 255036
} | [
"org.apache.calcite.plan.hep.HepProgram",
"org.apache.calcite.rel.rules.AggregateFilterTransposeRule",
"org.apache.calcite.rel.rules.AggregateProjectMergeRule",
"org.apache.calcite.rel.rules.FilterAggregateTransposeRule",
"org.junit.Test"
] | import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.rel.rules.AggregateFilterTransposeRule; import org.apache.calcite.rel.rules.AggregateProjectMergeRule; import org.apache.calcite.rel.rules.FilterAggregateTransposeRule; import org.junit.Test; | import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.rules.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 2,617,369 |
void writeStreamValue(DBRProgressMonitor monitor, @NotNull DBPDataSource dataSource, @NotNull DBSTypedObject type, @NotNull DBDContent object, @NotNull Writer writer)
throws DBCException, IOException; | void writeStreamValue(DBRProgressMonitor monitor, @NotNull DBPDataSource dataSource, @NotNull DBSTypedObject type, @NotNull DBDContent object, @NotNull Writer writer) throws DBCException, IOException; | /**
* Writes content value.
* Must use native content representation.
*/ | Writes content value. Must use native content representation | writeStreamValue | {
"repo_name": "ruspl-afed/dbeaver",
"path": "plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/data/DBDContentValueHandler.java",
"license": "apache-2.0",
"size": 1451
} | [
"java.io.IOException",
"java.io.Writer",
"org.jkiss.code.NotNull",
"org.jkiss.dbeaver.model.DBPDataSource",
"org.jkiss.dbeaver.model.exec.DBCException",
"org.jkiss.dbeaver.model.runtime.DBRProgressMonitor",
"org.jkiss.dbeaver.model.struct.DBSTypedObject"
] | import java.io.IOException; import java.io.Writer; import org.jkiss.code.NotNull; import org.jkiss.dbeaver.model.DBPDataSource; import org.jkiss.dbeaver.model.exec.DBCException; import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; import org.jkiss.dbeaver.model.struct.DBSTypedObject; | import java.io.*; import org.jkiss.code.*; import org.jkiss.dbeaver.model.*; import org.jkiss.dbeaver.model.exec.*; import org.jkiss.dbeaver.model.runtime.*; import org.jkiss.dbeaver.model.struct.*; | [
"java.io",
"org.jkiss.code",
"org.jkiss.dbeaver"
] | java.io; org.jkiss.code; org.jkiss.dbeaver; | 2,048,871 |
public SingleServerConfig setAddress(String address) {
if (address != null) {
this.address = URIBuilder.create(address);
}
return this;
} | SingleServerConfig function(String address) { if (address != null) { this.address = URIBuilder.create(address); } return this; } | /**
* Set server address. Use follow format -- host:port
*
* @param address of Redis
* @return config
*/ | Set server address. Use follow format -- host:port | setAddress | {
"repo_name": "jackygurui/redisson",
"path": "redisson/src/main/java/org/redisson/config/SingleServerConfig.java",
"license": "apache-2.0",
"size": 5595
} | [
"org.redisson.misc.URIBuilder"
] | import org.redisson.misc.URIBuilder; | import org.redisson.misc.*; | [
"org.redisson.misc"
] | org.redisson.misc; | 1,432,226 |
public void visit(final ISimpleTreeIndexAccess ndx,
final IAbstractNodeData node) {
final PageStats stats = this;
if (stats.nvisited == 0) {
stats.name = ((ICheckpointProtocol) ndx).getIndexMetadata()
.getName();
stats.indexType = ((ICheckp... | void function(final ISimpleTreeIndexAccess ndx, final IAbstractNodeData node) { final PageStats stats = this; if (stats.nvisited == 0) { stats.name = ((ICheckpointProtocol) ndx).getIndexMetadata() .getName(); stats.indexType = ((ICheckpointProtocol) ndx).getCheckpoint() .getIndexType(); } final IIdentityAccess po = (II... | /**
* Visit a node or leaf, updating the {@link PageStats}.
* <p>
* Note: This method MUST be extended to capture at least the initialization
* of the {@link #ntuples}, {@link #nnodes}, {@link #nleaves}, and
* {@link #m} fields.
*
* @param ndx
* The index.
* @par... | Visit a node or leaf, updating the <code>PageStats</code>. Note: This method MUST be extended to capture at least the initialization of the <code>#ntuples</code>, <code>#nnodes</code>, <code>#nleaves</code>, and <code>#m</code> fields | visit | {
"repo_name": "blazegraph/database",
"path": "bigdata-core/bigdata/src/java/com/bigdata/btree/PageStats.java",
"license": "gpl-2.0",
"size": 13315
} | [
"com.bigdata.btree.data.IAbstractNodeData",
"com.bigdata.btree.data.ILeafData",
"com.bigdata.rawstore.IRawStore"
] | import com.bigdata.btree.data.IAbstractNodeData; import com.bigdata.btree.data.ILeafData; import com.bigdata.rawstore.IRawStore; | import com.bigdata.btree.data.*; import com.bigdata.rawstore.*; | [
"com.bigdata.btree",
"com.bigdata.rawstore"
] | com.bigdata.btree; com.bigdata.rawstore; | 431,450 |
protected int getAverageGroundLevel(World worldIn, StructureBoundingBox structurebb)
{
int i = 0;
int j = 0;
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for (int k = this.boundingBox.minZ; k ... | int function(World worldIn, StructureBoundingBox structurebb) { int i = 0; int j = 0; BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); for (int k = this.boundingBox.minZ; k <= this.boundingBox.maxZ; ++k) { for (int l = this.boundingBox.minX; l <= this.boundingBox.maxX; ++l) { blockpos... | /**
* Discover the y coordinate that will serve as the ground level of the supplied BoundingBox. (A median of
* all the levels in the BB's horizontal rectangle).
*/ | Discover the y coordinate that will serve as the ground level of the supplied BoundingBox. (A median of all the levels in the BB's horizontal rectangle) | getAverageGroundLevel | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureVillagePieces.java",
"license": "lgpl-2.1",
"size": 136606
} | [
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.util; net.minecraft.world; | 166,098 |
public void testDefaultFetchGroup()
{
// Department
ClassMetaData cmd = (ClassMetaData) metaDataMgr.getMetaDataForClass(Department.class.getName(), clr);
String prefix = cmd.getFullClassName() + " : ";
// "manager"
AbstractMemberMetaData fmd = cmd.getMetaDataForMember("m... | void function() { ClassMetaData cmd = (ClassMetaData) metaDataMgr.getMetaDataForClass(Department.class.getName(), clr); String prefix = cmd.getFullClassName() + STR; AbstractMemberMetaData fmd = cmd.getMetaDataForMember(STR); assertEquals(prefix + STR, FieldPersistenceModifier.PERSISTENT, fmd.getPersistenceModifier());... | /**
* Test enabling forgotten DFG on a field in "package.jdo".
*/ | Test enabling forgotten DFG on a field in "package.jdo" | testDefaultFetchGroup | {
"repo_name": "hopecee/texsts",
"path": "jdo/general/src/test/org/datanucleus/tests/metadata/AnnotationPlusXMLOverrideTest.java",
"license": "apache-2.0",
"size": 9179
} | [
"org.datanucleus.metadata.AbstractMemberMetaData",
"org.datanucleus.metadata.ClassMetaData",
"org.datanucleus.metadata.FieldPersistenceModifier",
"org.datanucleus.samples.ann_xml.override.Department"
] | import org.datanucleus.metadata.AbstractMemberMetaData; import org.datanucleus.metadata.ClassMetaData; import org.datanucleus.metadata.FieldPersistenceModifier; import org.datanucleus.samples.ann_xml.override.Department; | import org.datanucleus.metadata.*; import org.datanucleus.samples.ann_xml.override.*; | [
"org.datanucleus.metadata",
"org.datanucleus.samples"
] | org.datanucleus.metadata; org.datanucleus.samples; | 838,956 |
@Test
@ExpectedFFDC(repeatAction = RepeatOnErrorEE8.ID_FAIL,
value = { "javax.ejb.EJBException", "com.ibm.ws.container.service.state.StateChangeException" })
@ExpectedFFDC(repeatAction = RepeatOnErrorEE9.ID_FAIL,
value = { "javax.ejb.EJBException", "com.ibm.ws.container.s... | @ExpectedFFDC(repeatAction = RepeatOnErrorEE8.ID_FAIL, value = { STR, STR }) @ExpectedFFDC(repeatAction = RepeatOnErrorEE9.ID_FAIL, value = { STR, STR }) void function() throws Exception { testHelper(9, STR, false); } | /**
* Binding name contains blank (" ") string
*/ | Binding name contains blank (" ") string | testBlankString | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.bindings_fat/fat/src/com/ibm/ws/ejbcontainer/bindings/fat/tests/BndErrorTest.java",
"license": "epl-1.0",
"size": 18010
} | [
"com.ibm.ws.ejbcontainer.bindings.fat.tests.repeataction.RepeatOnErrorEE8",
"com.ibm.ws.ejbcontainer.bindings.fat.tests.repeataction.RepeatOnErrorEE9"
] | import com.ibm.ws.ejbcontainer.bindings.fat.tests.repeataction.RepeatOnErrorEE8; import com.ibm.ws.ejbcontainer.bindings.fat.tests.repeataction.RepeatOnErrorEE9; | import com.ibm.ws.ejbcontainer.bindings.fat.tests.repeataction.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,875,953 |
public MatchQueryBuilder zeroTermsQuery(MatchQuery.ZeroTermsQuery zeroTermsQuery) {
if (zeroTermsQuery == null) {
throw new IllegalArgumentException("[" + NAME + "] requires zeroTermsQuery to be non-null");
}
this.zeroTermsQuery = zeroTermsQuery;
return this;
} | MatchQueryBuilder function(MatchQuery.ZeroTermsQuery zeroTermsQuery) { if (zeroTermsQuery == null) { throw new IllegalArgumentException("[" + NAME + STR); } this.zeroTermsQuery = zeroTermsQuery; return this; } | /**
* Sets query to use in case no query terms are available, e.g. after analysis removed them.
* Defaults to {@link MatchQuery.ZeroTermsQuery#NONE}, but can be set to
* {@link MatchQuery.ZeroTermsQuery#ALL} instead.
*/ | Sets query to use in case no query terms are available, e.g. after analysis removed them. Defaults to <code>MatchQuery.ZeroTermsQuery#NONE</code>, but can be set to <code>MatchQuery.ZeroTermsQuery#ALL</code> instead | zeroTermsQuery | {
"repo_name": "strapdata/elassandra",
"path": "server/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java",
"license": "apache-2.0",
"size": 24176
} | [
"org.elasticsearch.index.search.MatchQuery"
] | import org.elasticsearch.index.search.MatchQuery; | import org.elasticsearch.index.search.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 612,025 |
public ProximityPlacementGroupInner withColocationStatus(InstanceViewStatus colocationStatus) {
this.colocationStatus = colocationStatus;
return this;
} | ProximityPlacementGroupInner function(InstanceViewStatus colocationStatus) { this.colocationStatus = colocationStatus; return this; } | /**
* Set the colocationStatus property: Describes colocation status of the Proximity Placement Group.
*
* @param colocationStatus the colocationStatus value to set.
* @return the ProximityPlacementGroupInner object itself.
*/ | Set the colocationStatus property: Describes colocation status of the Proximity Placement Group | withColocationStatus | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/ProximityPlacementGroupInner.java",
"license": "mit",
"size": 5932
} | [
"com.azure.resourcemanager.compute.models.InstanceViewStatus"
] | import com.azure.resourcemanager.compute.models.InstanceViewStatus; | import com.azure.resourcemanager.compute.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,609,448 |
public void addOverlay(ArrayList<OverlayItem> items) {
mOverlays.addAll(items);
populate();
} | void function(ArrayList<OverlayItem> items) { mOverlays.addAll(items); populate(); } | /**
* Method that copies a list of overlay items to an existing array list.
*
* @param overlay
*/ | Method that copies a list of overlay items to an existing array list | addOverlay | {
"repo_name": "Drakuwa/aBusTripMK2",
"path": "src/com/app/busmk2/model/MyItemizedOverlay.java",
"license": "gpl-3.0",
"size": 2160
} | [
"com.google.android.maps.OverlayItem",
"java.util.ArrayList"
] | import com.google.android.maps.OverlayItem; import java.util.ArrayList; | import com.google.android.maps.*; import java.util.*; | [
"com.google.android",
"java.util"
] | com.google.android; java.util; | 2,138,803 |
public void set(String name, String value, String source) {
Preconditions.checkArgument(
name != null,
"Property name must not be null");
Preconditions.checkArgument(
value != null,
"The value of property %s must not be null", name);
name = name.trim();
DeprecationConte... | void function(String name, String value, String source) { Preconditions.checkArgument( name != null, STR); Preconditions.checkArgument( value != null, STR, name); name = name.trim(); DeprecationContext deprecations = deprecationContext.get(); if (deprecations.getDeprecatedKeyMap().isEmpty()) { getProps(); } getOverlay(... | /**
* Set the <code>value</code> of the <code>name</code> property. If
* <code>name</code> is deprecated, it also sets the <code>value</code> to
* the keys that replace the deprecated key. Name will be trimmed before put
* into configuration.
*
* @param name property name.
* @param value property... | Set the <code>value</code> of the <code>name</code> property. If <code>name</code> is deprecated, it also sets the <code>value</code> to the keys that replace the deprecated key. Name will be trimmed before put into configuration | set | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 128054
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,996,856 |
T visitRelationship(@NotNull QueryParser.RelationshipContext ctx);
/**
* Visit a parse tree produced by the {@code retrievalQuery} | T visitRelationship(@NotNull QueryParser.RelationshipContext ctx); /** * Visit a parse tree produced by the {@code retrievalQuery} | /**
* Visit a parse tree produced by {@link QueryParser#relationship}.
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>QueryParser#relationship</code> | visitRelationship | {
"repo_name": "objectof-group/objectof",
"path": "model/src/main/java/net/objectof/model/query/parser/QueryParserVisitor.java",
"license": "gpl-3.0",
"size": 3624
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,108,161 |
public EntityPool loadEntitiesWithProperty(Property prop, boolean value){
Collection<Resource> resources = new HashSet<Resource>();
ResIterator it = model.listResourcesWithProperty(prop, value);
while(it.hasNext())
resources.add(it.nextResource());
return loadEntityPoolFromResources(resources);
}
| EntityPool function(Property prop, boolean value){ Collection<Resource> resources = new HashSet<Resource>(); ResIterator it = model.listResourcesWithProperty(prop, value); while(it.hasNext()) resources.add(it.nextResource()); return loadEntityPoolFromResources(resources); } | /**
* Loads entities that have a certain property.
*
* @param prop The property
* @param value The property's value
* @return An entity pool with all entities that have this property.
*/ | Loads entities that have a certain property | loadEntitiesWithProperty | {
"repo_name": "ox-it/gaboto",
"path": "src/main/java/net/sf/gaboto/GabotoSnapshot.java",
"license": "bsd-3-clause",
"size": 15861
} | [
"com.hp.hpl.jena.rdf.model.Property",
"com.hp.hpl.jena.rdf.model.ResIterator",
"com.hp.hpl.jena.rdf.model.Resource",
"java.util.Collection",
"java.util.HashSet",
"net.sf.gaboto.node.pool.EntityPool"
] | import com.hp.hpl.jena.rdf.model.Property; import com.hp.hpl.jena.rdf.model.ResIterator; import com.hp.hpl.jena.rdf.model.Resource; import java.util.Collection; import java.util.HashSet; import net.sf.gaboto.node.pool.EntityPool; | import com.hp.hpl.jena.rdf.model.*; import java.util.*; import net.sf.gaboto.node.pool.*; | [
"com.hp.hpl",
"java.util",
"net.sf.gaboto"
] | com.hp.hpl; java.util; net.sf.gaboto; | 2,245,774 |
public static void insert(Any any, TaggedComponent that)
{
any.insert_Streamable(new TaggedComponentHolder(that));
} | static void function(Any any, TaggedComponent that) { any.insert_Streamable(new TaggedComponentHolder(that)); } | /**
* Insert the TaggedComponent into the given Any. This method uses the
* TaggedComponentHolder.
*
* @param any the Any to insert into.
* @param that the TaggedComponent to insert.
*/ | Insert the TaggedComponent into the given Any. This method uses the TaggedComponentHolder | insert | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/org/omg/IOP/TaggedComponentHelper.java",
"license": "bsd-3-clause",
"size": 5712
} | [
"org.omg.CORBA"
] | import org.omg.CORBA; | import org.omg.*; | [
"org.omg"
] | org.omg; | 301,271 |
public User getUser(String sessionId, boolean refresh) {
User details = userSessionService.getUserData(sessionId);
if (details != null && refresh && autorefresh) {
userSessionService.refreshSession(sessionId, userSessionService.getRefreshToken(sessionId));
}
return details;
} | User function(String sessionId, boolean refresh) { User details = userSessionService.getUserData(sessionId); if (details != null && refresh && autorefresh) { userSessionService.refreshSession(sessionId, userSessionService.getRefreshToken(sessionId)); } return details; } | /**
* Gets the User object associated to the given sessionId (if it exists).
*
* @param sessionId
* @return
*/ | Gets the User object associated to the given sessionId (if it exists) | getUser | {
"repo_name": "geosolutions-it/geostore",
"path": "src/modules/rest/impl/src/main/java/it/geosolutions/geostore/services/rest/impl/RESTSessionServiceImpl.java",
"license": "gpl-3.0",
"size": 6520
} | [
"it.geosolutions.geostore.core.model.User"
] | import it.geosolutions.geostore.core.model.User; | import it.geosolutions.geostore.core.model.*; | [
"it.geosolutions.geostore"
] | it.geosolutions.geostore; | 1,613,628 |
synchronized <T extends PipelineOptions> T cloneAs(Object proxy, Class<T> iface) {
PipelineOptions clonedOptions;
try {
clonedOptions = MAPPER.readValue(MAPPER.writeValueAsBytes(proxy), PipelineOptions.class);
} catch (IOException e) {
throw new IllegalStateException("Failed to serialize the p... | synchronized <T extends PipelineOptions> T cloneAs(Object proxy, Class<T> iface) { PipelineOptions clonedOptions; try { clonedOptions = MAPPER.readValue(MAPPER.writeValueAsBytes(proxy), PipelineOptions.class); } catch (IOException e) { throw new IllegalStateException(STR, e); } for (Class<? extends PipelineOptions> kno... | /**
* Backing implementation for {@link PipelineOptions#cloneAs(Class)}.
*
* @return A copy of the PipelineOptions.
*/ | Backing implementation for <code>PipelineOptions#cloneAs(Class)</code> | cloneAs | {
"repo_name": "elibixby/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/options/ProxyInvocationHandler.java",
"license": "apache-2.0",
"size": 28201
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 327,028 |
public ConnectionListener findConnectionListener(ManagedConnection mc); | ConnectionListener function(ManagedConnection mc); | /**
* Find a connection listener
* @param mc The managed connection
* @return The connection listener
*/ | Find a connection listener | findConnectionListener | {
"repo_name": "ironjacamar/ironjacamar",
"path": "core/impl/src/main/java/org/jboss/jca/core/connectionmanager/pool/api/Pool.java",
"license": "lgpl-2.1",
"size": 5769
} | [
"javax.resource.spi.ManagedConnection",
"org.jboss.jca.core.connectionmanager.listener.ConnectionListener"
] | import javax.resource.spi.ManagedConnection; import org.jboss.jca.core.connectionmanager.listener.ConnectionListener; | import javax.resource.spi.*; import org.jboss.jca.core.connectionmanager.listener.*; | [
"javax.resource",
"org.jboss.jca"
] | javax.resource; org.jboss.jca; | 787,799 |
public String modelChange (MInvoiceLine iLine, int type) throws Exception
{
if (type == TYPE_BEFORE_NEW && iLine.getC_OrderLine_ID() > 0)
{
I_W_C_InvoiceLine iLineW = POWrapper.create(iLine, I_W_C_InvoiceLine.class);
I_W_C_OrderLine oLineW = POWrapper.create(new MOrderLine(Env.getCtx(), iLine.getC_OrderLi... | String function (MInvoiceLine iLine, int type) throws Exception { if (type == TYPE_BEFORE_NEW && iLine.getC_OrderLine_ID() > 0) { I_W_C_InvoiceLine iLineW = POWrapper.create(iLine, I_W_C_InvoiceLine.class); I_W_C_OrderLine oLineW = POWrapper.create(new MOrderLine(Env.getCtx(), iLine.getC_OrderLine_ID(), null), I_W_C_Or... | /**
* Model Change of a monitored Table.
* Called after PO.beforeSave/PO.beforeDelete
* when you called addModelChange for the table
* @param po persistent object
* @param type TYPE_
* @return error message or null
* @exception Exception if the recipient wishes the change to be not ac... | Model Change of a monitored Table. Called after PO.beforeSave/PO.beforeDelete when you called addModelChange for the table | modelChange | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "palmetal_to_lbrk/base/src/org/adempierelbr/validator/VLBROrder.java",
"license": "gpl-2.0",
"size": 19917
} | [
"org.adempiere.model.POWrapper",
"org.compiere.model.MInvoiceLine",
"org.compiere.model.MOrderLine",
"org.compiere.util.Env"
] | import org.adempiere.model.POWrapper; import org.compiere.model.MInvoiceLine; import org.compiere.model.MOrderLine; import org.compiere.util.Env; | import org.adempiere.model.*; import org.compiere.model.*; import org.compiere.util.*; | [
"org.adempiere.model",
"org.compiere.model",
"org.compiere.util"
] | org.adempiere.model; org.compiere.model; org.compiere.util; | 1,394,779 |
@MatchRule("(AArch64PointerAdd=addP base ZeroExtend)")
@MatchRule("(AArch64PointerAdd=addP base (LeftShift ZeroExtend Constant))")
public ComplexMatchResult extendedPointerAddShift(AArch64PointerAddNode addP) {
ValueNode offset = addP.getOffset();
ZeroExtendNode zeroExtend;
int shift... | @MatchRule(STR) @MatchRule(STR) ComplexMatchResult function(AArch64PointerAddNode addP) { ValueNode offset = addP.getOffset(); ZeroExtendNode zeroExtend; int shiftAmt; if (offset instanceof ZeroExtendNode) { zeroExtend = (ZeroExtendNode) offset; shiftAmt = 0; } else { LeftShiftNode shift = (LeftShiftNode) offset; zeroE... | /**
* Goal: Fold zero extend and (optional) shift into AArch64 add/sub (extended register)
* instruction.
*/ | Goal: Fold zero extend and (optional) shift into AArch64 add/sub (extended register) instruction | extendedPointerAddShift | {
"repo_name": "smarr/Truffle",
"path": "compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java",
"license": "gpl-2.0",
"size": 42516
} | [
"org.graalvm.compiler.asm.aarch64.AArch64Assembler",
"org.graalvm.compiler.core.common.LIRKind",
"org.graalvm.compiler.core.match.ComplexMatchResult",
"org.graalvm.compiler.core.match.MatchRule",
"org.graalvm.compiler.lir.Variable",
"org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp",
"org.graalvm.co... | import org.graalvm.compiler.asm.aarch64.AArch64Assembler; import org.graalvm.compiler.core.common.LIRKind; import org.graalvm.compiler.core.match.ComplexMatchResult; import org.graalvm.compiler.core.match.MatchRule; import org.graalvm.compiler.lir.Variable; import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp; i... | import org.graalvm.compiler.asm.aarch64.*; import org.graalvm.compiler.core.common.*; import org.graalvm.compiler.core.match.*; import org.graalvm.compiler.lir.*; import org.graalvm.compiler.lir.aarch64.*; import org.graalvm.compiler.nodes.*; import org.graalvm.compiler.nodes.calc.*; | [
"org.graalvm.compiler"
] | org.graalvm.compiler; | 2,171,389 |
public void setCookieMaxAge(@Nullable Integer cookieMaxAge) {
this.cookieMaxAge = cookieMaxAge;
} | void function(@Nullable Integer cookieMaxAge) { this.cookieMaxAge = cookieMaxAge; } | /**
* Use the given maximum age (in seconds) for cookies created by this generator.
* Useful special value: -1 ... not persistent, deleted when client shuts down.
* <p>Default is no specific maximum age at all, using the Servlet container's
* default.
* @see jakarta.servlet.http.Cookie#setMaxAge
*/ | Use the given maximum age (in seconds) for cookies created by this generator. Useful special value: -1 ... not persistent, deleted when client shuts down. Default is no specific maximum age at all, using the Servlet container's default | setCookieMaxAge | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-web/src/main/java/org/springframework/web/util/CookieGenerator.java",
"license": "apache-2.0",
"size": 6965
} | [
"org.springframework.lang.Nullable"
] | import org.springframework.lang.Nullable; | import org.springframework.lang.*; | [
"org.springframework.lang"
] | org.springframework.lang; | 398,879 |
public static LimitsDto asDto(Limits limits) {
return newDto(LimitsDto.class).withRam(limits.getRam());
} | static LimitsDto function(Limits limits) { return newDto(LimitsDto.class).withRam(limits.getRam()); } | /**
* Converts {@link Limits} to {@link LimitsDto}.
*/ | Converts <code>Limits</code> to <code>LimitsDto</code> | asDto | {
"repo_name": "evidolob/che",
"path": "wsmaster/che-core-api-machine/src/main/java/org/eclipse/che/api/machine/server/DtoConverter.java",
"license": "epl-1.0",
"size": 7427
} | [
"org.eclipse.che.api.core.model.machine.Limits",
"org.eclipse.che.api.machine.shared.dto.LimitsDto",
"org.eclipse.che.dto.server.DtoFactory"
] | import org.eclipse.che.api.core.model.machine.Limits; import org.eclipse.che.api.machine.shared.dto.LimitsDto; import org.eclipse.che.dto.server.DtoFactory; | import org.eclipse.che.api.core.model.machine.*; import org.eclipse.che.api.machine.shared.dto.*; import org.eclipse.che.dto.server.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 911,384 |
@Override
public void skippedEntity(final String name) throws SAXException {
if (buffer) {
events.add(new SkippedEntity(name));
} else {
super.skippedEntity(name);
}
} | void function(final String name) throws SAXException { if (buffer) { events.add(new SkippedEntity(name)); } else { super.skippedEntity(name); } } | /**
* Buffers a skippedEntity event if buffer is set to true.
*
* @param name the name of the skipped entity. If it is a parameter entity,
* the name will begin with '%', and if it is the external DTD
* subset, it will be the string "[dtd]"
* @throws SAXException No... | Buffers a skippedEntity event if buffer is set to true | skippedEntity | {
"repo_name": "gchq/stroom",
"path": "stroom-pipeline/src/test/java/stroom/pipeline/util/BufferFilter.java",
"license": "apache-2.0",
"size": 9888
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,077,811 |
@Test
public void encodesAndDecodes() throws IOException {
final String urn = "urn:test:8";
final Identity identity = new Identity.Simple(urn);
final Codec codec = new CcHex(new CcPlain());
MatcherAssert.assertThat(
codec.decode(codec.encode(identity)).urn(),
... | void function() throws IOException { final String urn = STR; final Identity identity = new Identity.Simple(urn); final Codec codec = new CcHex(new CcPlain()); MatcherAssert.assertThat( codec.decode(codec.encode(identity)).urn(), Matchers.equalTo(urn) ); } | /**
* CcHex can encode and decode.
* @throws IOException If some problem inside
*/ | CcHex can encode and decode | encodesAndDecodes | {
"repo_name": "bdragan/takes",
"path": "src/test/java/org/takes/facets/auth/codecs/CcHexTest.java",
"license": "mit",
"size": 3307
} | [
"java.io.IOException",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.takes.facets.auth.Identity"
] | import java.io.IOException; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.facets.auth.Identity; | import java.io.*; import org.hamcrest.*; import org.takes.facets.auth.*; | [
"java.io",
"org.hamcrest",
"org.takes.facets"
] | java.io; org.hamcrest; org.takes.facets; | 1,492,014 |
File getSourceFile();
| File getSourceFile(); | /**
* Returns a source file (if any) for this cached binary.
* If the file size is less than the size of a single cache block,
* the source file may not be set, and this method will return null.
*
* @return The source file, or null if not set.
*/ | Returns a source file (if any) for this cached binary. If the file size is less than the size of a single cache block, the source file may not be set, and this method will return null | getSourceFile | {
"repo_name": "Det-Kongelige-Bibliotek/droid",
"path": "droid-core-interfaces/src/main/java/uk/gov/nationalarchives/droid/core/interfaces/resource/CachedBytes.java",
"license": "bsd-3-clause",
"size": 3115
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 450,789 |
Task setTaskRead(String taskId, boolean isRead) throws TaskNotFoundException;
/**
* This method provides a query builder for quering the database.
* @return a {@link TaskQuery} | Task setTaskRead(String taskId, boolean isRead) throws TaskNotFoundException; /** * This method provides a query builder for quering the database. * @return a {@link TaskQuery} | /**
* Marks a task as read.
* @param taskId
* the id of the task to be updated
* @param isRead
* the new status of the read flag.
* @return Task the updated Task
*/ | Marks a task as read | setTaskRead | {
"repo_name": "eberhardmayer/taskana",
"path": "lib/taskana-core/src/main/java/org/taskana/TaskService.java",
"license": "apache-2.0",
"size": 2936
} | [
"org.taskana.exceptions.TaskNotFoundException",
"org.taskana.model.Task",
"org.taskana.persistence.TaskQuery"
] | import org.taskana.exceptions.TaskNotFoundException; import org.taskana.model.Task; import org.taskana.persistence.TaskQuery; | import org.taskana.exceptions.*; import org.taskana.model.*; import org.taskana.persistence.*; | [
"org.taskana.exceptions",
"org.taskana.model",
"org.taskana.persistence"
] | org.taskana.exceptions; org.taskana.model; org.taskana.persistence; | 2,575,405 |
public void append(int key, int value) {
if (mSize != 0 && key <= mKeys[mSize - 1]) {
put(key, value);
return;
}
mKeys = GrowingArrayUtils.append(mKeys, mSize, key);
mValues = GrowingArrayUtils.append(mValues, mSize, value);
mSize++;
}
/**
... | void function(int key, int value) { if (mSize != 0 && key <= mKeys[mSize - 1]) { put(key, value); return; } mKeys = GrowingArrayUtils.append(mKeys, mSize, key); mValues = GrowingArrayUtils.append(mValues, mSize, value); mSize++; } /** * {@inheritDoc} | /**
* Puts a key/value pair into the array, optimizing for the case where
* the key is greater than all existing keys in the array.
*/ | Puts a key/value pair into the array, optimizing for the case where the key is greater than all existing keys in the array | append | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/util/SparseIntArray.java",
"license": "gpl-3.0",
"size": 8515
} | [
"com.android.internal.util.GrowingArrayUtils"
] | import com.android.internal.util.GrowingArrayUtils; | import com.android.internal.util.*; | [
"com.android.internal"
] | com.android.internal; | 2,352,919 |
public void deleteLessonClass(LessonClass lessonClass); | void function(LessonClass lessonClass); | /**
* Deletes a Lesson <b>permanently</b>.
*
* @param lesson
* the Lesson to remove.
*/ | Deletes a Lesson permanently | deleteLessonClass | {
"repo_name": "lamsfoundation/lams",
"path": "lams_common/src/java/org/lamsfoundation/lams/lesson/dao/ILessonClassDAO.java",
"license": "gpl-2.0",
"size": 2091
} | [
"org.lamsfoundation.lams.lesson.LessonClass"
] | import org.lamsfoundation.lams.lesson.LessonClass; | import org.lamsfoundation.lams.lesson.*; | [
"org.lamsfoundation.lams"
] | org.lamsfoundation.lams; | 2,259,303 |
@ApiModelProperty(value = "What theme to use")
public String getTheme() {
return theme;
} | @ApiModelProperty(value = STR) String function() { return theme; } | /**
* What theme to use
* @return theme
**/ | What theme to use | getTheme | {
"repo_name": "iterate-ch/cyberduck",
"path": "storegate/src/main/java/ch/cyberduck/core/storegate/io/swagger/client/model/ModelConfiguration.java",
"license": "gpl-3.0",
"size": 27397
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,167,712 |
@Override
public TransactionId getTransactionId() {
TXStateProxy t = getTXState();
TransactionId ret = null;
if (t != null) {
ret = t.getTransactionId();
}
return ret;
} | TransactionId function() { TXStateProxy t = getTXState(); TransactionId ret = null; if (t != null) { ret = t.getTransactionId(); } return ret; } | /**
* Gets the current transaction identifier or null if no transaction exists
*
*/ | Gets the current transaction identifier or null if no transaction exists | getTransactionId | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java",
"license": "apache-2.0",
"size": 65792
} | [
"org.apache.geode.cache.TransactionId"
] | import org.apache.geode.cache.TransactionId; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 533,996 |
public List<Clazz> selectClassList();
| List<Clazz> function(); | /**
* <i>This method selects <b>all</b> classes from the table and returns them as a {@link List}.</i>
*
* @return A list of {@link Clazz} objects
* @see ClassDAO
*/ | This method selects all classes from the table and returns them as a <code>List</code> | selectClassList | {
"repo_name": "satanko-com/AllGrade",
"path": "WebAllGrade/src/main/java/com/satanko/weballgrade/data/dao/ClassDAO.java",
"license": "mit",
"size": 1634
} | [
"com.satanko.weballgrade.data.model.Clazz",
"java.util.List"
] | import com.satanko.weballgrade.data.model.Clazz; import java.util.List; | import com.satanko.weballgrade.data.model.*; import java.util.*; | [
"com.satanko.weballgrade",
"java.util"
] | com.satanko.weballgrade; java.util; | 1,812,022 |
public br.gov.camara.edemocracia.portlets.priorizacao.model.Voto removeByP_U(
long propostaId, long userId)
throws br.gov.camara.edemocracia.portlets.priorizacao.NoSuchVotoException,
com.liferay.portal.kernel.exception.SystemException; | br.gov.camara.edemocracia.portlets.priorizacao.model.Voto function( long propostaId, long userId) throws br.gov.camara.edemocracia.portlets.priorizacao.NoSuchVotoException, com.liferay.portal.kernel.exception.SystemException; | /**
* Removes the voto where propostaId = ? and userId = ? from the database.
*
* @param propostaId the proposta ID
* @param userId the user ID
* @return the voto that was removed
* @throws SystemException if a system exception occurred
*/ | Removes the voto where propostaId = ? and userId = ? from the database | removeByP_U | {
"repo_name": "camaradosdeputadosoficial/edemocracia",
"path": "cd-priorizacao-portlet/src/main/java/br/gov/camara/edemocracia/portlets/priorizacao/service/persistence/VotoPersistence.java",
"license": "lgpl-2.1",
"size": 23760
} | [
"br.gov.camara.edemocracia.portlets.priorizacao.model.Voto"
] | import br.gov.camara.edemocracia.portlets.priorizacao.model.Voto; | import br.gov.camara.edemocracia.portlets.priorizacao.model.*; | [
"br.gov.camara"
] | br.gov.camara; | 2,733,841 |
public Builder withTopoCache(TopoCache topoCache) {
this.topoCache = topoCache;
return this;
} | Builder function(TopoCache topoCache) { this.topoCache = topoCache; return this; } | /**
* Use the following topo cache instead of creating out own.
* This is intended mostly for internal testing with Mocks.
*/ | Use the following topo cache instead of creating out own. This is intended mostly for internal testing with Mocks | withTopoCache | {
"repo_name": "hmcc/storm",
"path": "storm-server/src/main/java/org/apache/storm/LocalCluster.java",
"license": "apache-2.0",
"size": 44006
} | [
"org.apache.storm.daemon.nimbus.TopoCache"
] | import org.apache.storm.daemon.nimbus.TopoCache; | import org.apache.storm.daemon.nimbus.*; | [
"org.apache.storm"
] | org.apache.storm; | 2,367,846 |
public void onMenuButtonClicked(View menuButton) {
// When the kiss bar is displayed, the button can still be clicked in a few areas (due to favorite margin)
// To fix this, we discard any click event occurring when the kissbar is displayed
if (!isViewingSearchResults()) {
return... | void function(View menuButton) { if (!isViewingSearchResults()) { return; } if (!forwarderManager.onMenuButtonClicked(this.menuButton)) { this.menuButton.showContextMenu(); this.menuButton.performHapticFeedback(LONG_PRESS); } } | /**
* Display menu, on short or long press.
*
* @param menuButton "kebab" menu (3 dots)
*/ | Display menu, on short or long press | onMenuButtonClicked | {
"repo_name": "Neamar/KISS",
"path": "app/src/main/java/fr/neamar/kiss/MainActivity.java",
"license": "gpl-3.0",
"size": 34380
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,894,422 |
public boolean bundleTgzExists() {
return Try.of(()->new File( ConfigUtils.getBundlePath() + File.separator + id + ".tar.gz" ).exists()).getOrElse(false);
}
| boolean function() { return Try.of(()->new File( ConfigUtils.getBundlePath() + File.separator + id + STR ).exists()).getOrElse(false); } | /**
* Checks if the bundle was already generated based on the id: BUNDLE_ID.tar.gz
* @return boolean - true if the bundle exists.
*/ | Checks if the bundle was already generated based on the id: BUNDLE_ID.tar.gz | bundleTgzExists | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/publisher/bundle/bean/Bundle.java",
"license": "gpl-3.0",
"size": 2308
} | [
"com.dotmarketing.util.ConfigUtils",
"io.vavr.control.Try",
"java.io.File"
] | import com.dotmarketing.util.ConfigUtils; import io.vavr.control.Try; import java.io.File; | import com.dotmarketing.util.*; import io.vavr.control.*; import java.io.*; | [
"com.dotmarketing.util",
"io.vavr.control",
"java.io"
] | com.dotmarketing.util; io.vavr.control; java.io; | 96,891 |
public static <T> EnhancedAnnotatedType<T> getEjbImplementationClass(SessionBean<T> bean) {
return getEjbImplementationClass(bean.getEjbDescriptor(), bean.getBeanManager(), bean.getEnhancedAnnotated());
} | static <T> EnhancedAnnotatedType<T> function(SessionBean<T> bean) { return getEjbImplementationClass(bean.getEjbDescriptor(), bean.getBeanManager(), bean.getEnhancedAnnotated()); } | /**
* Returns {@link EnhancedAnnotatedType} for the EJB implementation class. Throws {@link IllegalStateException} if called after bootstrap.
*
* @param bean
* @throws IllegalStateException if called after bootstrap
* @return {@link EnhancedAnnotatedType} representation of this EJB's implementa... | Returns <code>EnhancedAnnotatedType</code> for the EJB implementation class. Throws <code>IllegalStateException</code> if called after bootstrap | getEjbImplementationClass | {
"repo_name": "weld/core",
"path": "modules/ejb/src/main/java/org/jboss/weld/module/ejb/SessionBeans.java",
"license": "apache-2.0",
"size": 6824
} | [
"org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType",
"org.jboss.weld.bean.SessionBean"
] | import org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType; import org.jboss.weld.bean.SessionBean; | import org.jboss.weld.annotated.enhanced.*; import org.jboss.weld.bean.*; | [
"org.jboss.weld"
] | org.jboss.weld; | 2,592,121 |
public static String fillString(String str, Double reqLength) {
char[] chars = str.toCharArray();
StringBuffer result = new StringBuffer();
Double length = 0.0;
// Cut size:
for (int i = 0; i < chars.length; i++) {
Double charLength = SIZE_MAP.get(chars[i]);
if(charLength == null) charL... | static String function(String str, Double reqLength) { char[] chars = str.toCharArray(); StringBuffer result = new StringBuffer(); Double length = 0.0; for (int i = 0; i < chars.length; i++) { Double charLength = SIZE_MAP.get(chars[i]); if(charLength == null) charLength = DEFAULT_LENGTH; if(length + charLength > reqLen... | /**
* Fills a string.
*
* @param str string to fill
* @param reqLength required length
* @return string with the given length
*/ | Fills a string | fillString | {
"repo_name": "andfRa/Saga",
"path": "src/org/saga/utility/chat/ChatFiller.java",
"license": "gpl-3.0",
"size": 5324
} | [
"org.bukkit.ChatColor"
] | import org.bukkit.ChatColor; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 1,050,884 |
public void onIOError(IOException ex); | void function(IOException ex); | /**
* Triggered on any IOException error. This method should be overridden for custom
* implementation of error handling (e.g. when network is not available).
* @param ex
*/ | Triggered on any IOException error. This method should be overridden for custom implementation of error handling (e.g. when network is not available) | onIOError | {
"repo_name": "tempbottle/gritsgame",
"path": "wasd/src/net/tootallnate/websocket/WebSocketListener.java",
"license": "apache-2.0",
"size": 2376
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,617,650 |
public void deleteVersion(Version version) throws RedmineException {
transport
.deleteObject(Version.class, Integer.toString(version.getId()));
}
/**
* delivers a list of {@link Version}s of a {@link Project}
*
* @param projectID the ID of the {@link Project}
* @... | void function(Version version) throws RedmineException { transport .deleteObject(Version.class, Integer.toString(version.getId())); } /** * delivers a list of {@link Version}s of a {@link Project} * * @param projectID the ID of the {@link Project} * @return the list of {@link Version}s of the {@link Project} | /**
* deletes a new {@link Version} from the {@link Project} contained. <br>
*
* @param version the {@link Version}.
* @throws RedmineAuthenticationException thrown in case something went wrong while trying to login
* @throws RedmineException thrown in case something went wrong in Redmin... | deletes a new <code>Version</code> from the <code>Project</code> contained. | deleteVersion | {
"repo_name": "liqinlong/L_Redmine",
"path": "src/com/taskadapter/redmineapi/ProjectManager.java",
"license": "apache-2.0",
"size": 8778
} | [
"com.taskadapter.redmineapi.bean.Project",
"com.taskadapter.redmineapi.bean.Version"
] | import com.taskadapter.redmineapi.bean.Project; import com.taskadapter.redmineapi.bean.Version; | import com.taskadapter.redmineapi.bean.*; | [
"com.taskadapter.redmineapi"
] | com.taskadapter.redmineapi; | 153,113 |
public Engine.IndexCommitRef acquireSafeIndexCommit() throws EngineException {
final IndexShardState state = this.state; // one time volatile read
// we allow snapshot on closed index shard, since we want to do one after we close the shard and before we close the engine
if (state == IndexSha... | Engine.IndexCommitRef function() throws EngineException { final IndexShardState state = this.state; if (state == IndexShardState.STARTED state == IndexShardState.CLOSED) { return getEngine().acquireSafeIndexCommit(); } else { throw new IllegalIndexShardStateException(shardId, state, STR); } } | /**
* Snapshots the most recent safe index commit from the currently running engine.
* All index files referenced by this index commit won't be freed until the commit/snapshot is closed.
*/ | Snapshots the most recent safe index commit from the currently running engine. All index files referenced by this index commit won't be freed until the commit/snapshot is closed | acquireSafeIndexCommit | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 137199
} | [
"org.elasticsearch.index.engine.Engine",
"org.elasticsearch.index.engine.EngineException"
] | import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.engine.EngineException; | import org.elasticsearch.index.engine.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 1,212,873 |
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
} | Builder function(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; } | /**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Eps#extraParams} for the
* field documentatio... | Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>PaymentIntentConfirmParams.PaymentMethodOptions.Eps#extraParams</code> for the field documentation | putExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/PaymentIntentConfirmParams.java",
"license": "mit",
"size": 315067
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,063,081 |
private void registerNonExists(
final EntityKey[] keys,
final Loadable[] persisters,
final SessionImplementor session) {
final int[] owners = getOwners();
if ( owners != null ) {
EntityType[] ownerAssociationTypes = getOwnerAssociationTypes();
for ( int i = 0; i < keys.length; i++ ) {
int o... | void function( final EntityKey[] keys, final Loadable[] persisters, final SessionImplementor session) { final int[] owners = getOwners(); if ( owners != null ) { EntityType[] ownerAssociationTypes = getOwnerAssociationTypes(); for ( int i = 0; i < keys.length; i++ ) { int owner = owners[i]; if ( owner > -1 ) { EntityKe... | /**
* For missing objects associated by one-to-one with another object in the
* result set, register the fact that the the object is missing with the
* session.
*/ | For missing objects associated by one-to-one with another object in the result set, register the fact that the the object is missing with the session | registerNonExists | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/ldae/java/org/hibernate/loader/Loader.java",
"license": "lgpl-2.1",
"size": 89234
} | [
"org.hibernate.engine.spi.EntityKey",
"org.hibernate.engine.spi.PersistenceContext",
"org.hibernate.engine.spi.SessionImplementor",
"org.hibernate.persister.entity.Loadable",
"org.hibernate.type.EntityType"
] | import org.hibernate.engine.spi.EntityKey; import org.hibernate.engine.spi.PersistenceContext; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.persister.entity.Loadable; import org.hibernate.type.EntityType; | import org.hibernate.engine.spi.*; import org.hibernate.persister.entity.*; import org.hibernate.type.*; | [
"org.hibernate.engine",
"org.hibernate.persister",
"org.hibernate.type"
] | org.hibernate.engine; org.hibernate.persister; org.hibernate.type; | 514,273 |
public static void downto(Date self, Date to, Closure closure) {
if (self.compareTo(to) >= 0) {
for (Date i = (Date) self.clone(); i.compareTo(to) >= 0; i = previous(i)) {
closure.call(i);
}
} else
throw new GroovyRuntimeException("The argument (" ... | static void function(Date self, Date to, Closure closure) { if (self.compareTo(to) >= 0) { for (Date i = (Date) self.clone(); i.compareTo(to) >= 0; i = previous(i)) { closure.call(i); } } else throw new GroovyRuntimeException(STR + to + STR + self + STR); } | /**
* Iterates from this date down to the given date, inclusive,
* decrementing by one day each time.
*
* @param self a Date
* @param to another Date to go down to
* @param closure the closure to call
* @since 2.2
*/ | Iterates from this date down to the given date, inclusive, decrementing by one day each time | downto | {
"repo_name": "komalsukhani/debian-groovy2",
"path": "src/main/org/codehaus/groovy/runtime/DateGroovyMethods.java",
"license": "apache-2.0",
"size": 26450
} | [
"groovy.lang.Closure",
"groovy.lang.GroovyRuntimeException",
"java.util.Date"
] | import groovy.lang.Closure; import groovy.lang.GroovyRuntimeException; import java.util.Date; | import groovy.lang.*; import java.util.*; | [
"groovy.lang",
"java.util"
] | groovy.lang; java.util; | 575,163 |
public void configure() {
from("jms:queue:loanReplyQueue").process(new Processor() { | void function() { from(STR).process(new Processor() { | /**
* Lets configure the Camel routing rules using Java code to pull the response message
*/ | Lets configure the Camel routing rules using Java code to pull the response message | configure | {
"repo_name": "chicagozer/rheosoft",
"path": "examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/queue/version/Client.java",
"license": "apache-2.0",
"size": 3824
} | [
"org.apache.camel.Processor"
] | import org.apache.camel.Processor; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 479,578 |
public Optional<Charset> getEncoding() {
return Optional.ofNullable(encoding);
} | Optional<Charset> function() { return Optional.ofNullable(encoding); } | /**
* Returns the encoding used during parsing.
*/ | Returns the encoding used during parsing | getEncoding | {
"repo_name": "grimes2/jabref",
"path": "src/main/java/net/sf/jabref/model/metadata/MetaData.java",
"license": "mit",
"size": 10186
} | [
"java.nio.charset.Charset",
"java.util.Optional"
] | import java.nio.charset.Charset; import java.util.Optional; | import java.nio.charset.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 856,200 |
static boolean isExprAssign(Node n) {
return n.isExprResult()
&& n.getFirstChild().isAssign();
} | static boolean isExprAssign(Node n) { return n.isExprResult() && n.getFirstChild().isAssign(); } | /**
* Is this node an assignment expression statement?
*
* @param n The node
* @return True if {@code n} is EXPR_RESULT and {@code n}'s
* first child is ASSIGN
*/ | Is this node an assignment expression statement | isExprAssign | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 170457
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,364,057 |
void insertEmail(Email email); | void insertEmail(Email email); | /**
* Insert a new {@link Email}.
*
* @param email the {@link Email} to insert
*/ | Insert a new <code>Email</code> | insertEmail | {
"repo_name": "ppwozniak/java-openid-server",
"path": "jos-dao/src/main/java/pl/jdevelopers/jos/dao/EmailDao.java",
"license": "gpl-3.0",
"size": 2873
} | [
"pl.jdevelopers.jos.domain.Email"
] | import pl.jdevelopers.jos.domain.Email; | import pl.jdevelopers.jos.domain.*; | [
"pl.jdevelopers.jos"
] | pl.jdevelopers.jos; | 2,296,654 |
public static GSSCredential getDelegation(String server, int port,
String username, char[] passphrase, int lifetimeInSeconds)
throws Exception {
MyProxy myproxy = new MyProxy(server, port);
GSSCredential credential = null;
try {
credential = myproxy.get(us... | static GSSCredential function(String server, int port, String username, char[] passphrase, int lifetimeInSeconds) throws Exception { MyProxy myproxy = new MyProxy(server, port); GSSCredential credential = null; try { credential = myproxy.get(username, new String(passphrase), lifetimeInSeconds); } catch (MyProxyExceptio... | /**
* Retrieves a {@link GSSCredential} from a myproxy server using username
* and password.
* This method is used when you want to retrieve a proxy that has got the
* "allow anonymous retriever" flag enabled.
*
* @param server the hostname of the myproxy server
* @param port the po... | Retrieves a <code>GSSCredential</code> from a myproxy server using username and password. This method is used when you want to retrieve a proxy that has got the "allow anonymous retriever" flag enabled | getDelegation | {
"repo_name": "AuScope/GeodesyWorkflow",
"path": "src/main/java/org/auscope/gridtools/MyProxyManager.java",
"license": "gpl-3.0",
"size": 3874
} | [
"org.globus.myproxy.MyProxy",
"org.globus.myproxy.MyProxyException",
"org.ietf.jgss.GSSCredential"
] | import org.globus.myproxy.MyProxy; import org.globus.myproxy.MyProxyException; import org.ietf.jgss.GSSCredential; | import org.globus.myproxy.*; import org.ietf.jgss.*; | [
"org.globus.myproxy",
"org.ietf.jgss"
] | org.globus.myproxy; org.ietf.jgss; | 1,799,789 |
private int getOptionsGroupCount() {
int count = 0;
try {
long conf = mDeck.getLong("conf");
for (JSONObject deck : mCol.getDecks().all()) {
if (deck.getInt("dyn") == 1) {
continue;
}
if (deck.getLong("conf")... | int function() { int count = 0; try { long conf = mDeck.getLong("conf"); for (JSONObject deck : mCol.getDecks().all()) { if (deck.getInt("dyn") == 1) { continue; } if (deck.getLong("conf") == conf) { count++; } } } catch (JSONException e) { throw new RuntimeException(e); } return count; } | /**
* Returns the number of decks using the options group of the current deck.
*/ | Returns the number of decks using the options group of the current deck | getOptionsGroupCount | {
"repo_name": "mikeAopeneng/joyo-kanji",
"path": "KanjiDroid/src/main/java/website/openeng/anki/DeckOptions.java",
"license": "gpl-2.0",
"size": 33380
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,303,956 |
private static class ResetTrackingCommand extends CommandBase
{
@Override
public String getName()
{
return "reset";
} | static class ResetTrackingCommand extends CommandBase { public String function() { return "reset"; } | /**
* Gets the name of the command
*/ | Gets the name of the command | getName | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraftforge/server/command/CommandTrack.java",
"license": "gpl-3.0",
"size": 12900
} | [
"net.minecraft.command.CommandBase"
] | import net.minecraft.command.CommandBase; | import net.minecraft.command.*; | [
"net.minecraft.command"
] | net.minecraft.command; | 1,882,816 |
public IconType<FacesConfigPropertyType<T>> getOrCreateIcon()
{
List<Node> nodeList = childNode.get("icon");
if (nodeList != null && nodeList.size() > 0)
{
return new IconTypeImpl<FacesConfigPropertyType<T>>(this, "icon", childNode, nodeList.get(0));
}
return createIcon();
... | IconType<FacesConfigPropertyType<T>> function() { List<Node> nodeList = childNode.get("icon"); if (nodeList != null && nodeList.size() > 0) { return new IconTypeImpl<FacesConfigPropertyType<T>>(this, "icon", childNode, nodeList.get(0)); } return createIcon(); } | /**
* If not already created, a new <code>icon</code> element will be created and returned.
* Otherwise, the first existing <code>icon</code> element will be returned.
* @return the instance defined for the element <code>icon</code>
*/ | If not already created, a new <code>icon</code> element will be created and returned. Otherwise, the first existing <code>icon</code> element will be returned | getOrCreateIcon | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig21/FacesConfigPropertyTypeImpl.java",
"license": "epl-1.0",
"size": 14828
} | [
"java.util.List",
"org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigPropertyType",
"org.jboss.shrinkwrap.descriptor.api.javaee5.IconType",
"org.jboss.shrinkwrap.descriptor.impl.javaee5.IconTypeImpl",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import java.util.List; import org.jboss.shrinkwrap.descriptor.api.facesconfig21.FacesConfigPropertyType; import org.jboss.shrinkwrap.descriptor.api.javaee5.IconType; import org.jboss.shrinkwrap.descriptor.impl.javaee5.IconTypeImpl; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import java.util.*; import org.jboss.shrinkwrap.descriptor.api.facesconfig21.*; import org.jboss.shrinkwrap.descriptor.api.javaee5.*; import org.jboss.shrinkwrap.descriptor.impl.javaee5.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"java.util",
"org.jboss.shrinkwrap"
] | java.util; org.jboss.shrinkwrap; | 2,778,051 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.