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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
void uploadKey(String publicKey) throws IOException, UnauthorizedException; | void uploadKey(String publicKey) throws IOException, UnauthorizedException; | /**
* Upload public key part to Repository management.
*
* @throws IOException
* if an i/o error occurs
* @throws UnauthorizedException
* if user is not authorized to access SSH key storage
*/ | Upload public key part to Repository management | uploadKey | {
"repo_name": "snjeza/che",
"path": "wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshKeyUploader.java",
"license": "epl-1.0",
"size": 1394
} | [
"java.io.IOException",
"org.eclipse.che.api.core.UnauthorizedException"
] | import java.io.IOException; import org.eclipse.che.api.core.UnauthorizedException; | import java.io.*; import org.eclipse.che.api.core.*; | [
"java.io",
"org.eclipse.che"
] | java.io; org.eclipse.che; | 71,148 |
private static Map<Exp, Exp> newUnifyMaps(Map<Exp, Exp> m1, Map<Exp, Exp> m2) {
Set<Map.Entry<Exp, Exp>> entrySet = m2.entrySet();
Iterator<Map.Entry<Exp, Exp>> entryIter = entrySet.iterator();
Exp otherExp;
Map<Exp, Exp> retval = m1;
Map.Entry<Exp, Exp> entry;
while... | static Map<Exp, Exp> function(Map<Exp, Exp> m1, Map<Exp, Exp> m2) { Set<Map.Entry<Exp, Exp>> entrySet = m2.entrySet(); Iterator<Map.Entry<Exp, Exp>> entryIter = entrySet.iterator(); Exp otherExp; Map<Exp, Exp> retval = m1; Map.Entry<Exp, Exp> entry; while (retval != null && entryIter.hasNext()) { entry = entryIter.next... | /**
* <p>(TODO) See newBind</p>
* @param m1
* @param m2
* @return
*/ | (TODO) See newBind | newUnifyMaps | {
"repo_name": "mikekab/RESOLVE",
"path": "src/main/java/edu/clemson/cs/r2jt/rewriteprover/Utilities.java",
"license": "bsd-3-clause",
"size": 16876
} | [
"edu.clemson.cs.r2jt.absyn.Exp",
"java.util.Iterator",
"java.util.Map",
"java.util.Set"
] | import edu.clemson.cs.r2jt.absyn.Exp; import java.util.Iterator; import java.util.Map; import java.util.Set; | import edu.clemson.cs.r2jt.absyn.*; import java.util.*; | [
"edu.clemson.cs",
"java.util"
] | edu.clemson.cs; java.util; | 2,676,075 |
@UnAdaptableTest
public void testSerializeWithoutApp() throws Exception {
AuraContext ctx = Aura.getContextService().startContext(Mode.PROD, Format.JSON, Authentication.UNAUTHENTICATED);
ctx.setFrameworkUID("#FAKEUID#");
String res = JsonEncoder.serialize(ctx, ctx.getJsonSerializationCon... | void function() throws Exception { AuraContext ctx = Aura.getContextService().startContext(Mode.PROD, Format.JSON, Authentication.UNAUTHENTICATED); ctx.setFrameworkUID(STR); String res = JsonEncoder.serialize(ctx, ctx.getJsonSerializationContext()); goldFileJson(res); } | /**
* App not serialized for context without descriptor.
*/ | App not serialized for context without descriptor | testSerializeWithoutApp | {
"repo_name": "badlogicmanpreet/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/context/AuraContextImplTest.java",
"license": "apache-2.0",
"size": 34455
} | [
"org.auraframework.Aura",
"org.auraframework.system.AuraContext",
"org.auraframework.util.json.JsonEncoder"
] | import org.auraframework.Aura; import org.auraframework.system.AuraContext; import org.auraframework.util.json.JsonEncoder; | import org.auraframework.*; import org.auraframework.system.*; import org.auraframework.util.json.*; | [
"org.auraframework",
"org.auraframework.system",
"org.auraframework.util"
] | org.auraframework; org.auraframework.system; org.auraframework.util; | 234,997 |
void forceCheckAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | void forceCheckAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | /**
* Check if value of this group attribute has valid semantics no matter if attribute is required or not.
*
* @param sess perun session
* @param group group for which you want to check validity of attribute
* @param attribute attribute to check
*
* @throws InternalErrorException if an exception raise in... | Check if value of this group attribute has valid semantics no matter if attribute is required or not | forceCheckAttributeSemantics | {
"repo_name": "zlamalp/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 244560
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Group",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.core.api.exceptions.WrongReferenceAttributeValueException"
] | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metacentrum.perun.core.api.exceptions.WrongReferenceAttributeValueException; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,814,145 |
public void doView_next(RunData runData)
{
// access the portlet element id to find our state
String peid = ((JetspeedRunData) runData).getJs_peid();
SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid);
// set the flag to go to the next message on the next view
state.setAttribut... | void function(RunData runData) { String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); state.setAttribute(STATE_GO_NEXT, ""); } | /**
* Handle a next-message (view) request.
*/ | Handle a next-message (view) request | doView_next | {
"repo_name": "OpenCollabZA/sakai",
"path": "velocity/tool/src/java/org/sakaiproject/cheftool/PagedResourceHelperAction.java",
"license": "apache-2.0",
"size": 19147
} | [
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.event.api.*; | [
"org.sakaiproject.event"
] | org.sakaiproject.event; | 2,387,883 |
public final Property<HolidaySource> holidaySource() {
return metaBean().holidaySource().createProperty(this);
} | final Property<HolidaySource> function() { return metaBean().holidaySource().createProperty(this); } | /**
* Gets the the {@code holidaySource} property.
* @return the property, not null
*/ | Gets the the holidaySource property | holidaySource | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/tool/ToolContext.java",
"license": "apache-2.0",
"size": 69098
} | [
"com.opengamma.core.holiday.HolidaySource",
"org.joda.beans.Property"
] | import com.opengamma.core.holiday.HolidaySource; import org.joda.beans.Property; | import com.opengamma.core.holiday.*; import org.joda.beans.*; | [
"com.opengamma.core",
"org.joda.beans"
] | com.opengamma.core; org.joda.beans; | 74,878 |
Set<Application> getApplications(); | Set<Application> getApplications(); | /**
* Returns the set of all installed applications.
*
* @return set of installed apps
*/ | Returns the set of all installed applications | getApplications | {
"repo_name": "kuujo/onos",
"path": "core/api/src/main/java/org/onosproject/app/ApplicationService.java",
"license": "apache-2.0",
"size": 2624
} | [
"java.util.Set",
"org.onosproject.core.Application"
] | import java.util.Set; import org.onosproject.core.Application; | import java.util.*; import org.onosproject.core.*; | [
"java.util",
"org.onosproject.core"
] | java.util; org.onosproject.core; | 2,374,973 |
private void flushMessages() {
try {
messageBufferFlushingLock.writeLock().lock();
if(!partList.isEmpty()) {
directMessageStoreManager.storeMessagePart(partList);
}
if(!metaList.isEmpty()) {
directMessageStoreManager.storeMet... | void function() { try { messageBufferFlushingLock.writeLock().lock(); if(!partList.isEmpty()) { directMessageStoreManager.storeMessagePart(partList); } if(!metaList.isEmpty()) { directMessageStoreManager.storeMetaData(metaList); } partList.clear(); metaList.clear(); } catch (AndesException e) { log.error(STR, e); } fin... | /**
* Flush buffered messages to store and clear up the buffers
*/ | Flush buffered messages to store and clear up the buffers | flushMessages | {
"repo_name": "Niranjan-K/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/storemanager/ExecutorBasedStoringManager.java",
"license": "apache-2.0",
"size": 19063
} | [
"org.wso2.andes.kernel.AndesException"
] | import org.wso2.andes.kernel.AndesException; | import org.wso2.andes.kernel.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 748,090 |
public Transporter getDescriptorForAlias(Transporter theClass)
{
return handleByMode();
}
| Transporter function(Transporter theClass) { return handleByMode(); } | /**
* Extract descriptor from the session
*/ | Extract descriptor from the session | getDescriptorForAlias | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/suncorba/CORBARemoteSessionControllerDispatcherForTestingExceptions.java",
"license": "epl-1.0",
"size": 15143
} | [
"org.eclipse.persistence.internal.sessions.remote.Transporter"
] | import org.eclipse.persistence.internal.sessions.remote.Transporter; | import org.eclipse.persistence.internal.sessions.remote.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,424,660 |
int compareRow(RecordIdentifier other) {
return compareToInternal(other);
} | int compareRow(RecordIdentifier other) { return compareToInternal(other); } | /**
* Compare rows without considering the currentWriteId.
* @param other the value to compare to
* @return -1, 0, +1
*/ | Compare rows without considering the currentWriteId | compareRow | {
"repo_name": "jcamachor/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcRawRecordMerger.java",
"license": "apache-2.0",
"size": 60863
} | [
"org.apache.hadoop.hive.ql.io.RecordIdentifier"
] | import org.apache.hadoop.hive.ql.io.RecordIdentifier; | import org.apache.hadoop.hive.ql.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,528,507 |
public void setLocations(Collection<String> locationStrings) {
List<PropertiesLocation> locations = new ArrayList<>();
if (locationStrings != null) {
for (String locationString : locationStrings) {
locations.add(new PropertiesLocation(locationString));
}
... | void function(Collection<String> locationStrings) { List<PropertiesLocation> locations = new ArrayList<>(); if (locationStrings != null) { for (String locationString : locationStrings) { locations.add(new PropertiesLocation(locationString)); } } setLocations(locations); } | /**
* A list of locations to load properties.
* This option will override any default locations and only use the locations from this option.
*/ | A list of locations to load properties. This option will override any default locations and only use the locations from this option | setLocations | {
"repo_name": "kevinearls/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java",
"license": "apache-2.0",
"size": 20108
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,610,423 |
public HTTPResourceInteractionModel getDynamicResource(String path) {
return resources.get(path);
} | HTTPResourceInteractionModel function(String path) { return resources.get(path); } | /**
* Using the path lookup the resource; return null if a resource has not been previously registered.
* @param path
* @return
*/ | Using the path lookup the resource; return null if a resource has not been previously registered | getDynamicResource | {
"repo_name": "ritumalhotra8/IRIS",
"path": "interaction-winkext/src/main/java/com/temenos/interaction/winkext/RegistrarWithSingletons.java",
"license": "agpl-3.0",
"size": 5990
} | [
"com.temenos.interaction.core.rim.HTTPResourceInteractionModel"
] | import com.temenos.interaction.core.rim.HTTPResourceInteractionModel; | import com.temenos.interaction.core.rim.*; | [
"com.temenos.interaction"
] | com.temenos.interaction; | 1,875,310 |
boolean jobIsRunning(YadaJob yadaJob) {
if (yadaJob==null) {
return false;
}
ListenableFuture<?> jobHandle = yadaJob.yadaInternalJobHandle;
if (jobHandle!=null) {
boolean running = !jobHandle.isDone();
return running;
}
return false;
} | boolean jobIsRunning(YadaJob yadaJob) { if (yadaJob==null) { return false; } ListenableFuture<?> jobHandle = yadaJob.yadaInternalJobHandle; if (jobHandle!=null) { boolean running = !jobHandle.isDone(); return running; } return false; } | /**
* Returns true if the job is actually running in a thread
* @param yadaJob
* @return
*/ | Returns true if the job is actually running in a thread | jobIsRunning | {
"repo_name": "xtianus/yadaframework",
"path": "YadaWeb/src/main/java/net/yadaframework/components/YadaJobScheduler.java",
"license": "mit",
"size": 12088
} | [
"com.google.common.util.concurrent.ListenableFuture",
"net.yadaframework.persistence.entity.YadaJob"
] | import com.google.common.util.concurrent.ListenableFuture; import net.yadaframework.persistence.entity.YadaJob; | import com.google.common.util.concurrent.*; import net.yadaframework.persistence.entity.*; | [
"com.google.common",
"net.yadaframework.persistence"
] | com.google.common; net.yadaframework.persistence; | 2,422,987 |
public void addSpeakerButtonPressed(View _view) {
Intent intent = new Intent(this, AddSpeakerActivity1.class);
intent.putExtra("origin", 0);
startActivity(intent);
} | void function(View _view) { Intent intent = new Intent(this, AddSpeakerActivity1.class); intent.putExtra(STR, 0); startActivity(intent); } | /**
* Starts the AddSpeakerActivity.
*
* @param _view The add-speaker button that was pressed.
*/ | Starts the AddSpeakerActivity | addSpeakerButtonPressed | {
"repo_name": "aikuma/aikuma",
"path": "Aikuma/src/org/lp20/aikuma/ui/MainSpeakersActivity.java",
"license": "agpl-3.0",
"size": 2364
} | [
"android.content.Intent",
"android.view.View"
] | import android.content.Intent; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 1,948,326 |
public static void addVdsAlert(Guid vdsId, AuditLogType type, AuditLogDirector auditLogDirector, AuditLogableBase alert) {
alert.setVdsId(vdsId);
AlertDirector.alert(alert, type, auditLogDirector);
} | static void function(Guid vdsId, AuditLogType type, AuditLogDirector auditLogDirector, AuditLogableBase alert) { alert.setVdsId(vdsId); AlertDirector.alert(alert, type, auditLogDirector); } | /**
* Adds an alert
*/ | Adds an alert | addVdsAlert | {
"repo_name": "OpenUniversity/ovirt-engine",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AlertDirector.java",
"license": "apache-2.0",
"size": 2674
} | [
"org.ovirt.engine.core.common.AuditLogType",
"org.ovirt.engine.core.compat.Guid"
] | import org.ovirt.engine.core.common.AuditLogType; import org.ovirt.engine.core.compat.Guid; | import org.ovirt.engine.core.common.*; import org.ovirt.engine.core.compat.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 2,167,876 |
private List<File> cleanupOldGenerations(int gcGeneration) throws IOException {
final int reclaimGeneration = gcGeneration - gcOptions.getRetainedGenerations(); | List<File> function(int gcGeneration) throws IOException { final int reclaimGeneration = gcGeneration - gcOptions.getRetainedGenerations(); | /**
* Cleanup segments that are from an old generation. That segments whose generation
* is {@code gcGeneration - SegmentGCOptions.getRetainedGenerations()} or older.
* @param gcGeneration
* @return list of files to be removed
* @throws IOException
*/ | Cleanup segments that are from an old generation. That segments whose generation is gcGeneration - SegmentGCOptions.getRetainedGenerations() or older | cleanupOldGenerations | {
"repo_name": "yesil/jackrabbit-oak",
"path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/FileStore.java",
"license": "apache-2.0",
"size": 51876
} | [
"java.io.File",
"java.io.IOException",
"java.util.List"
] | import java.io.File; import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,482,388 |
private boolean readConfigToEnd(long timeoutMs) {
log.info("Current config state offset {} is behind group assignment {}, reading to end of config log", configState.offset(), assignment.offset());
try {
configBackingStore.refresh(timeoutMs, TimeUnit.MILLISECONDS);
configState... | boolean function(long timeoutMs) { log.info(STR, configState.offset(), assignment.offset()); try { configBackingStore.refresh(timeoutMs, TimeUnit.MILLISECONDS); configState = configBackingStore.snapshot(); log.info(STR, configState.offset()); return true; } catch (TimeoutException e) { log.warn(STR, e); member.maybeLea... | /**
* Try to read to the end of the config log within the given timeout
* @param timeoutMs maximum time to wait to sync to the end of the log
* @return true if successful, false if timed out
*/ | Try to read to the end of the config log within the given timeout | readConfigToEnd | {
"repo_name": "sebadiaz/kafka",
"path": "connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java",
"license": "apache-2.0",
"size": 62284
} | [
"java.util.concurrent.TimeUnit",
"java.util.concurrent.TimeoutException"
] | import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,578,879 |
// Explicit component update is required since the component already exists
// and we can't want to wait for the next LaF change
onUpdateUi.accept(component);
synchronized (listeners) {
listeners.compute(component, (k, v) -> {
if (v == null) {
//no... | onUpdateUi.accept(component); synchronized (listeners) { listeners.compute(component, (k, v) -> { if (v == null) { return Collections.singletonList((Consumer<JComponent>) onUpdateUi); } List<Consumer<JComponent>> res = v.size() == 1 ? new ArrayList<>(v) : v; res.add((Consumer<JComponent>) onUpdateUi); return res; }); }... | /**
* Attaches a configuration action that is executed when Look and Feel changes.
* <p>Note: the action is executed when {@code withDynamic} is called, and the action is
* executed even if the new and the old LaFs are the same.</p>
* @param component component to update
* @param onUpdateUi act... | Attaches a configuration action that is executed when Look and Feel changes. Note: the action is executed when withDynamic is called, and the action is executed even if the new and the old LaFs are the same | withDynamic | {
"repo_name": "apache/jmeter",
"path": "src/jorphan/src/main/java/org/apache/jorphan/gui/DynamicStyle.java",
"license": "apache-2.0",
"size": 9039
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.function.Consumer",
"javax.swing.JComponent"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.Consumer; import javax.swing.JComponent; | import java.util.*; import java.util.function.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 2,434,010 |
void toTextFile(Configuration conf, File file) throws IOException; | void toTextFile(Configuration conf, File file) throws IOException; | /**
* Stores the given Configuration in the given Text File.
*
* @param conf the Configuration to store
* @param file the file to store the Configuration in
* @throws java.io.IOException if there is an IO error in the process.
*/ | Stores the given Configuration in the given Text File | toTextFile | {
"repo_name": "dongjoon-hyun/reef",
"path": "lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/ConfigurationSerializer.java",
"license": "apache-2.0",
"size": 5771
} | [
"java.io.File",
"java.io.IOException",
"org.apache.reef.tang.Configuration"
] | import java.io.File; import java.io.IOException; import org.apache.reef.tang.Configuration; | import java.io.*; import org.apache.reef.tang.*; | [
"java.io",
"org.apache.reef"
] | java.io; org.apache.reef; | 1,261,098 |
static int computeEncodedTime(Calendar cal) throws StandardException
{
return computeEncodedTime(cal.get(Calendar.HOUR_OF_DAY),
cal.get(Calendar.MINUTE),
cal.get(Calendar.SECOND));
} | static int computeEncodedTime(Calendar cal) throws StandardException { return computeEncodedTime(cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND)); } | /**
* Calculate the encoded time from a Calendar object
* encoded time is hour << 16 + min << 8 + sec
* this function is also used by SQLTimestamp
*
* @param cal calendar with time set
* @return encoded time
*
* @exception StandardException if the time is not in the DB2 range
*/ | Calculate the encoded time from a Calendar object encoded time is hour << 16 + min << 8 + sec this function is also used by SQLTimestamp | computeEncodedTime | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLTime.java",
"license": "apache-2.0",
"size": 38540
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"java.util.Calendar"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import java.util.Calendar; | import com.pivotal.gemfirexd.internal.iapi.error.*; import java.util.*; | [
"com.pivotal.gemfirexd",
"java.util"
] | com.pivotal.gemfirexd; java.util; | 2,732,801 |
public static Dictionary buildDictionary(ObjectStream<Parse> data, HeadRules rules,
TrainingParameters params) throws IOException {
int cutoff = params.getIntParameter("dict", TrainingParameters.CUTOFF_PARAM, 5);
NGramModel mdict = new NGramModel();
Parse p;
while ((p = data.read()) != null) {... | static Dictionary function(ObjectStream<Parse> data, HeadRules rules, TrainingParameters params) throws IOException { int cutoff = params.getIntParameter("dict", TrainingParameters.CUTOFF_PARAM, 5); NGramModel mdict = new NGramModel(); Parse p; while ((p = data.read()) != null) { p.updateHeads(rules); Parse[] pwords = ... | /**
* Creates a n-gram dictionary from the specified data stream using the specified
* head rule and specified cut-off.
*
* @param data The data stream of parses.
* @param rules The head rules for the parses.
* @param params can contain a cutoff, the minimum number of entries required for the
* ... | Creates a n-gram dictionary from the specified data stream using the specified head rule and specified cut-off | buildDictionary | {
"repo_name": "manjeetk09/GoogleScrapper",
"path": "opennlp/tools/parser/AbstractBottomUpParser.java",
"license": "gpl-2.0",
"size": 21305
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 818,647 |
public void setDateEntered(Timestamp value) {
set(2, value);
} | void function(Timestamp value) { set(2, value); } | /**
* Setter for <code>sugarcrm_4_12.schedulers.date_entered</code>.
*/ | Setter for <code>sugarcrm_4_12.schedulers.date_entered</code> | setDateEntered | {
"repo_name": "SmartMedicalServices/SpringJOOQ",
"path": "src/main/java/com/sms/sis/db/tables/records/SchedulersRecord.java",
"license": "gpl-3.0",
"size": 15656
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,590,619 |
public String[] getInputTypes() {
String inlist = inputTypes();
ArrayList inarray = new ArrayList();
while (inlist.indexOf(" ") > -1) {
inarray.add(inlist.substring(0, inlist.indexOf(" ")));
inlist = inlist.substring(inlist.indexOf(" ") + 1);
}
if ((... | String[] function() { String inlist = inputTypes(); ArrayList inarray = new ArrayList(); while (inlist.indexOf(" ") > -1) { inarray.add(inlist.substring(0, inlist.indexOf(" "))); inlist = inlist.substring(inlist.indexOf(" ") + 1); } if ((!inlist.equals("none")) && (!inlist.equals(""))) { inarray.add(inlist); } String[]... | /**
* This method should be overridden to return an array of the data input types accepted by this unit (returns
* triana.types.TrianaType by default).
*
* @return an array of the input types for this unit
*/ | This method should be overridden to return an array of the data input types accepted by this unit (returns triana.types.TrianaType by default) | getInputTypes | {
"repo_name": "CSCSI/Triana",
"path": "triana-types/src/main/java/triana/types/OldUnit.java",
"license": "apache-2.0",
"size": 30439
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 571,625 |
HeaderElement parseHeaderElement(
ru.radiomayak.http.util.CharArrayBuffer buffer,
ParserCursor cursor) throws ParseException; | HeaderElement parseHeaderElement( ru.radiomayak.http.util.CharArrayBuffer buffer, ParserCursor cursor) throws ParseException; | /**
* Parses a single header element.
* A header element consist of a semicolon-separate list
* of name=value definitions.
*
* @param buffer buffer holding the element to parse
* @param cursor the parser cursor containing the current position and
* the bounds wi... | Parses a single header element. A header element consist of a semicolon-separate list of name=value definitions | parseHeaderElement | {
"repo_name": "kalikov/lighthouse",
"path": "app/src/main/java/ru/radiomayak/http/message/HeaderValueParser.java",
"license": "apache-2.0",
"size": 5218
} | [
"ru.radiomayak.http.HeaderElement",
"ru.radiomayak.http.ParseException"
] | import ru.radiomayak.http.HeaderElement; import ru.radiomayak.http.ParseException; | import ru.radiomayak.http.*; | [
"ru.radiomayak.http"
] | ru.radiomayak.http; | 134,151 |
Predicate[] getPredicates();
| Predicate[] getPredicates(); | /**
* Gets the predicates being decorated as an array.
* <p/>
* The array may be the internal data structure of the predicate and thus
* should not be altered.
*
* @return the predicates being decorated
*/ | Gets the predicates being decorated as an array. The array may be the internal data structure of the predicate and thus should not be altered | getPredicates | {
"repo_name": "stefandmn/AREasy",
"path": "src/java/org/areasy/common/data/workers/functors/PredicateDecorator.java",
"license": "lgpl-3.0",
"size": 1365
} | [
"org.areasy.common.data.type.Predicate"
] | import org.areasy.common.data.type.Predicate; | import org.areasy.common.data.type.*; | [
"org.areasy.common"
] | org.areasy.common; | 2,475,739 |
private void createFiles() {
configf = new File(getDataFolder(), "config.yml");
swearf = new File(getDataFolder(), "words.yml");
if (!configf.exists()) {
configf.getParentFile().mkdirs();
saveResource("config.yml", false);
}
if (!swearf.exists()) {
... | void function() { configf = new File(getDataFolder(), STR); swearf = new File(getDataFolder(), STR); if (!configf.exists()) { configf.getParentFile().mkdirs(); saveResource(STR, false); } if (!swearf.exists()) { swearf.getParentFile().mkdirs(); saveResource(STR, false); } try { config.load(configf); swears.load(swearf)... | /**
* Creates the config.yml and the words.yml
*
* @author Isaiah Patton
* */ | Creates the config.yml and the words.yml | createFiles | {
"repo_name": "BSwear/BSwearPlus",
"path": "src/main/java/io/github/bswearteam/bswear/Main.java",
"license": "gpl-3.0",
"size": 11047
} | [
"java.io.File",
"java.io.IOException",
"org.bukkit.configuration.InvalidConfigurationException"
] | import java.io.File; import java.io.IOException; import org.bukkit.configuration.InvalidConfigurationException; | import java.io.*; import org.bukkit.configuration.*; | [
"java.io",
"org.bukkit.configuration"
] | java.io; org.bukkit.configuration; | 872,305 |
@Override
public void setParent(PassiveScanThread parent) {
this.parent = parent;
}
| void function(PassiveScanThread parent) { this.parent = parent; } | /**
* Set the Scanner thread parent object
*
* @param parent the PassiveScanThread parent object
*/ | Set the Scanner thread parent object | setParent | {
"repo_name": "msrader/zap-extensions",
"path": "src/org/zaproxy/zap/extension/pscanrules/ApplicationErrorScanner.java",
"license": "apache-2.0",
"size": 5808
} | [
"org.zaproxy.zap.extension.pscan.PassiveScanThread"
] | import org.zaproxy.zap.extension.pscan.PassiveScanThread; | import org.zaproxy.zap.extension.pscan.*; | [
"org.zaproxy.zap"
] | org.zaproxy.zap; | 402,382 |
@Test
public void testGetConfigurationConcurrently() throws Exception
{
final int threadCount = 32;
CountDownLatch startLatch = new CountDownLatch(1);
CountDownLatch endLatch = new CountDownLatch(threadCount);
ConfigurationBuilder<?> builder =
new BasicConfigu... | void function() throws Exception { final int threadCount = 32; CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch endLatch = new CountDownLatch(threadCount); ConfigurationBuilder<?> builder = new BasicConfigurationBuilder<PropertiesConfiguration>( PropertiesConfiguration.class); AccessBuilderThread[] thr... | /**
* Tests whether the builder can be accessed by multiple threads and that
* only a single result object is produced.
*/ | Tests whether the builder can be accessed by multiple threads and that only a single result object is produced | testGetConfigurationConcurrently | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/builder/TestBasicConfigurationBuilder.java",
"license": "apache-2.0",
"size": 28990
} | [
"java.util.HashSet",
"java.util.Set",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"org.apache.commons.configuration2.PropertiesConfiguration",
"org.junit.Assert"
] | import java.util.HashSet; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.commons.configuration2.PropertiesConfiguration; import org.junit.Assert; | import java.util.*; import java.util.concurrent.*; import org.apache.commons.configuration2.*; import org.junit.*; | [
"java.util",
"org.apache.commons",
"org.junit"
] | java.util; org.apache.commons; org.junit; | 204,898 |
public void movePlayersToSafety() {
for (final Player player : Bukkit.getServer().getOnlinePlayers()) {
final double x = player.getLocation().getX();
final double y = player.getLocation().getY();
final double z = player.getLocation().getZ();
final Vector vector = new Vector(x, y, z);
if (this.region... | void function() { for (final Player player : Bukkit.getServer().getOnlinePlayers()) { final double x = player.getLocation().getX(); final double y = player.getLocation().getY(); final double z = player.getLocation().getZ(); final Vector vector = new Vector(x, y, z); if (this.region.contains(vector)) { player.sendMessag... | /**
* Move any players who are currently in region to be restored to safety.
*
* This prevents players from being encased in stone or other materials when the region is restored from the snapshot.
*/ | Move any players who are currently in region to be restored to safety. This prevents players from being encased in stone or other materials when the region is restored from the snapshot | movePlayersToSafety | {
"repo_name": "grandwazir/TimedRestore",
"path": "src/main/java/name/richardson/james/bukkit/timedrestore/region/RestoreRegion.java",
"license": "gpl-3.0",
"size": 6747
} | [
"com.sk89q.worldedit.Vector",
"com.sk89q.worldedit.snapshots.InvalidSnapshotException",
"com.sk89q.worldedit.snapshots.Snapshot",
"com.sk89q.worldedit.snapshots.SnapshotRepository",
"name.richardson.james.bukkit.utilities.colours.ColourScheme",
"org.bukkit.Bukkit",
"org.bukkit.entity.Player"
] | import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.snapshots.InvalidSnapshotException; import com.sk89q.worldedit.snapshots.Snapshot; import com.sk89q.worldedit.snapshots.SnapshotRepository; import name.richardson.james.bukkit.utilities.colours.ColourScheme; import org.bukkit.Bukkit; import org.bukkit.entity... | import com.sk89q.worldedit.*; import com.sk89q.worldedit.snapshots.*; import name.richardson.james.bukkit.utilities.colours.*; import org.bukkit.*; import org.bukkit.entity.*; | [
"com.sk89q.worldedit",
"name.richardson.james",
"org.bukkit",
"org.bukkit.entity"
] | com.sk89q.worldedit; name.richardson.james; org.bukkit; org.bukkit.entity; | 2,014,935 |
// @Override
public Statement createStatement(final int resultSetType,
final int resultSetConcurrency) throws SQLException {
final Connection con = this.undecorate();
return con.createStatement(resultSetType, resultSetConcurrency);
} | final int resultSetConcurrency) throws SQLException { final Connection con = this.undecorate(); return con.createStatement(resultSetType, resultSetConcurrency); } | /**
* Liefert Statment
*
* @param resultSetType
* int
* @param resultSetConcurrency
* int
* @return Statement
* @throws NullPointerException
* , wenn Connection NULL ist
* @throws SQLException
* SQL-Fehler
**/ | Liefert Statment | createStatement | {
"repo_name": "csc19601128/misc-examples",
"path": "querydsl/src/main/java/org/csc/phynixx/sqlquery/db/ConnectionWrapper.java",
"license": "apache-2.0",
"size": 25337
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 459,512 |
private void loadBinaryData(DataInputStream dis, boolean isBigEndian)
throws IOException {
for (int f=0; f < numFrames; f++) {
times[f] = Utility.readFloat(dis, isBigEndian);
// Ignore the 'breaks' field
Utility.readFloat(dis, isBigEndian);
for (... | void function(DataInputStream dis, boolean isBigEndian) throws IOException { for (int f=0; f < numFrames; f++) { times[f] = Utility.readFloat(dis, isBigEndian); Utility.readFloat(dis, isBigEndian); for (int c=0; c < numChannels; c++) { frames[f][c] = Utility.readFloat(dis, isBigEndian); } } } | /**
* load the data section of the lpc file as ascii text
*
* @param dis DataInputStream to read from
* @param isBigEndian whether or not the data in the file is in
* big endian byte order
*
* @throws IOException on ill-formatted input
*/ | load the data section of the lpc file as ascii text | loadBinaryData | {
"repo_name": "edwardtoday/PolyU_MScST",
"path": "COMP5517/JavaSpeech/freetts-1.2.2-src/freetts-1.2.2/tools/ArcticToFreeTTS/src/FindSTS.java",
"license": "mit",
"size": 31020
} | [
"java.io.DataInputStream",
"java.io.IOException"
] | import java.io.DataInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,506,632 |
public Collection<User> getUsers() {
return provider.getUsers();
} | Collection<User> function() { return provider.getUsers(); } | /**
* Returns an unmodifiable Collection of all users in the system.
*
* @return an unmodifiable Collection of all users.
*/ | Returns an unmodifiable Collection of all users in the system | getUsers | {
"repo_name": "akrherz/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/openfire/user/UserManager.java",
"license": "apache-2.0",
"size": 25408
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,495,689 |
private JButton getJButtonSetupCopy() {
if (jButtonSetupCopy == null) {
jButtonSetupCopy = new JButton();
jButtonSetupCopy.setPreferredSize(new Dimension(26, 26));
jButtonSetupCopy.setIcon(GlobalInfo.getInternalImageIcon("Copy.png"));
jButtonSetupCopy.setToolTipText("Setup kopieren");
jButtonSetupCo... | JButton function() { if (jButtonSetupCopy == null) { jButtonSetupCopy = new JButton(); jButtonSetupCopy.setPreferredSize(new Dimension(26, 26)); jButtonSetupCopy.setIcon(GlobalInfo.getInternalImageIcon(STR)); jButtonSetupCopy.setToolTipText(STR); jButtonSetupCopy.addActionListener(this); } return jButtonSetupCopy; } | /**
* This method initialises jButtonSetupCopy
* @return javax.swing.JButton
*/ | This method initialises jButtonSetupCopy | getJButtonSetupCopy | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/gui/projectwindow/simsetup/SetupSelectorToolbar.java",
"license": "lgpl-2.1",
"size": 16739
} | [
"java.awt.Dimension",
"javax.swing.JButton"
] | import java.awt.Dimension; import javax.swing.JButton; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,842,083 |
@Path("attack-detection")
public AttackDetectionResource getAttackDetection() {
AttackDetectionResource resource = new AttackDetectionResource(auth, realm, adminEvent);
ResteasyProviderFactory.getInstance().injectProperties(resource);
return resource;
} | @Path(STR) AttackDetectionResource function() { AttackDetectionResource resource = new AttackDetectionResource(auth, realm, adminEvent); ResteasyProviderFactory.getInstance().injectProperties(resource); return resource; } | /**
* Base path for managing attack detection.
*
* @return
*/ | Base path for managing attack detection | getAttackDetection | {
"repo_name": "chameleon82/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/RealmAdminResource.java",
"license": "apache-2.0",
"size": 32591
} | [
"javax.ws.rs.Path",
"org.jboss.resteasy.spi.ResteasyProviderFactory"
] | import javax.ws.rs.Path; import org.jboss.resteasy.spi.ResteasyProviderFactory; | import javax.ws.rs.*; import org.jboss.resteasy.spi.*; | [
"javax.ws",
"org.jboss.resteasy"
] | javax.ws; org.jboss.resteasy; | 542,610 |
//---------------//
// checkHeadSide //
//---------------//
private int checkHeadSide (Inter head)
{
if (head.isVip()) {
logger.info("VIP checkHeadSide for {}", head);
}
int modifs = 0;
// Check all connected stems
Set<Relation> stem... | int function (Inter head) { if (head.isVip()) { logger.info(STR, head); } int modifs = 0; Set<Relation> stemRels = sig.getRelations(head, HeadStemRelation.class); RelsLoop: for (Relation relation : stemRels) { HeadStemRelation rel = (HeadStemRelation) relation; StemInter stem = (StemInter) sig.getEdgeTarget(rel); int d... | /**
* If head is on the wrong side of the stem, check if there is a head on the other
* side, located one or two step(s) further.
* <p>
* If the side is wrong and there is no head on the other side, simply remove this head-stem
* relation.
* TODO: If head and stem really overlap, ins... | If head is on the wrong side of the stem, check if there is a head on the other side, located one or two step(s) further. If the side is wrong and there is no head on the other side, simply remove this head-stem relation | checkHeadSide | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/sig/SigReducer.java",
"license": "agpl-3.0",
"size": 72261
} | [
"java.util.Set",
"org.audiveris.omr.sheet.Staff",
"org.audiveris.omr.sig.inter.AbstractPitchedInter",
"org.audiveris.omr.sig.inter.Inter",
"org.audiveris.omr.sig.inter.StemInter",
"org.audiveris.omr.sig.relation.Exclusion",
"org.audiveris.omr.sig.relation.HeadStemRelation",
"org.audiveris.omr.sig.rela... | import java.util.Set; import org.audiveris.omr.sheet.Staff; import org.audiveris.omr.sig.inter.AbstractPitchedInter; import org.audiveris.omr.sig.inter.Inter; import org.audiveris.omr.sig.inter.StemInter; import org.audiveris.omr.sig.relation.Exclusion; import org.audiveris.omr.sig.relation.HeadStemRelation; import org... | import java.util.*; import org.audiveris.omr.sheet.*; import org.audiveris.omr.sig.inter.*; import org.audiveris.omr.sig.relation.*; import org.audiveris.omr.util.*; | [
"java.util",
"org.audiveris.omr"
] | java.util; org.audiveris.omr; | 1,990,040 |
public void recycle() {
LOG.trace("enter HttpMethodBase.recycle()");
releaseConnection();
path = null;
followRedirects = false;
doAuthentication = true;
queryString = null;
getRequestHeaderGroup().clear();
getResponseHeaderGroup().clear();
ge... | void function() { LOG.trace(STR); releaseConnection(); path = null; followRedirects = false; doAuthentication = true; queryString = null; getRequestHeaderGroup().clear(); getResponseHeaderGroup().clear(); getResponseTrailerHeaderGroup().clear(); statusLine = null; effectiveVersion = null; aborted = false; used = false;... | /**
* Recycles the HTTP method so that it can be used again.
* Note that all of the instance variables will be reset
* once this method has been called. This method will also
* release the connection being used by this HTTP method.
*
* @see #releaseConnection()
*
* @deprecated ... | Recycles the HTTP method so that it can be used again. Note that all of the instance variables will be reset once this method has been called. This method will also release the connection being used by this HTTP method | recycle | {
"repo_name": "magneticmoon/httpclient3-ntml",
"path": "src/java/org/apache/commons/httpclient/HttpMethodBase.java",
"license": "apache-2.0",
"size": 86671
} | [
"org.apache.commons.httpclient.params.HttpMethodParams"
] | import org.apache.commons.httpclient.params.HttpMethodParams; | import org.apache.commons.httpclient.params.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,839,485 |
public static void addUser
(
String userName,
String password,
TransactionController tc
)
throws SQLException
{
try {
LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC();
DataDictionary dd = lcc.getDataDictionary();
... | static void function ( String userName, String password, TransactionController tc ) throws SQLException { try { LanguageConnectionContext lcc = ConnectionUtil.getCurrentLCC(); DataDictionary dd = lcc.getDataDictionary(); dd.startWriting(lcc); UserDescriptor userDescriptor = makeUserDescriptor( dd, tc, userName, passwor... | /**
* Create a new user (this entry is called when bootstrapping the credentials of the DBO
* at database creation time.
*/ | Create a new user (this entry is called when bootstrapping the credentials of the DBO at database creation time | addUser | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/catalog/SystemProcedures.java",
"license": "apache-2.0",
"size": 85864
} | [
"java.sql.SQLException",
"org.apache.derby.iapi.error.PublicAPI",
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.reference.Property",
"org.apache.derby.iapi.sql.conn.ConnectionUtil",
"org.apache.derby.iapi.sql.conn.LanguageConnectionContext",
"org.apache.derby.iapi.sql.dictionar... | import java.sql.SQLException; import org.apache.derby.iapi.error.PublicAPI; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.Property; import org.apache.derby.iapi.sql.conn.ConnectionUtil; import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; import org.apache.derb... | import java.sql.*; import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.sql.conn.*; import org.apache.derby.iapi.sql.dictionary.*; import org.apache.derby.iapi.store.access.*; | [
"java.sql",
"org.apache.derby"
] | java.sql; org.apache.derby; | 2,376,958 |
AnnotatedElement getAnnotatedElement(); | AnnotatedElement getAnnotatedElement(); | /**
* returns the annotated element, that is the source for this annotation.
*
* @return
*/ | returns the annotated element, that is the source for this annotation | getAnnotatedElement | {
"repo_name": "etecture/dynamic-resources",
"path": "dynamic-resources-extension/src/main/java/de/etecture/opensource/dynamicresources/metadata/annotated/Annotated.java",
"license": "bsd-3-clause",
"size": 2292
} | [
"java.lang.reflect.AnnotatedElement"
] | import java.lang.reflect.AnnotatedElement; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,102,090 |
@Override
public Cacheable getBlock(BlockCacheKey key, boolean caching, boolean repeat,
boolean updateCacheMetrics) {
if (!cacheEnabled) {
return null;
}
RAMQueueEntry re = ramCache.get(key);
if (re != null) {
if (updateCacheMetrics) {
cacheStats.hit(caching, key.isPrimary(... | Cacheable function(BlockCacheKey key, boolean caching, boolean repeat, boolean updateCacheMetrics) { if (!cacheEnabled) { return null; } RAMQueueEntry re = ramCache.get(key); if (re != null) { if (updateCacheMetrics) { cacheStats.hit(caching, key.isPrimary(), key.getBlockType()); } re.access(accessCount.incrementAndGet... | /**
* Get the buffer of the block with the specified key.
* @param key block's cache key
* @param caching true if the caller caches blocks on cache misses
* @param repeat Whether this is a repeat lookup for the same block
* @param updateCacheMetrics Whether we should update cache metrics or not
* @ret... | Get the buffer of the block with the specified key | getBlock | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java",
"license": "apache-2.0",
"size": 62104
} | [
"java.io.IOException",
"java.util.concurrent.locks.ReentrantReadWriteLock",
"org.apache.hadoop.hbase.io.hfile.BlockCacheKey",
"org.apache.hadoop.hbase.io.hfile.Cacheable"
] | import java.io.IOException; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.hadoop.hbase.io.hfile.BlockCacheKey; import org.apache.hadoop.hbase.io.hfile.Cacheable; | import java.io.*; import java.util.concurrent.locks.*; import org.apache.hadoop.hbase.io.hfile.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,620,992 |
private Attribute code(DirectClassFile cf, int offset, int length,
ParseObserver observer) {
if (length < 12) {
return throwSeverelyTruncated();
}
ByteArray bytes = cf.getBytes();
ConstantPool pool = cf.getConstantPool();
int maxStack = bytes.getUnsig... | Attribute function(DirectClassFile cf, int offset, int length, ParseObserver observer) { if (length < 12) { return throwSeverelyTruncated(); } ByteArray bytes = cf.getBytes(); ConstantPool pool = cf.getConstantPool(); int maxStack = bytes.getUnsignedShort(offset); int maxLocals = bytes.getUnsignedShort(offset + 2); int... | /**
* Parses a {@code Code} attribute.
*/ | Parses a Code attribute | code | {
"repo_name": "alibaba/atlas",
"path": "atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/cf/direct/StdAttributeFactory.java",
"license": "apache-2.0",
"size": 27349
} | [
"com.taobao.android.dx.cf.attrib.AttCode",
"com.taobao.android.dx.cf.code.ByteCatchList",
"com.taobao.android.dx.cf.code.BytecodeArray",
"com.taobao.android.dx.cf.iface.Attribute",
"com.taobao.android.dx.cf.iface.ParseObserver",
"com.taobao.android.dx.cf.iface.StdAttributeList",
"com.taobao.android.dx.r... | import com.taobao.android.dx.cf.attrib.AttCode; import com.taobao.android.dx.cf.code.ByteCatchList; import com.taobao.android.dx.cf.code.BytecodeArray; import com.taobao.android.dx.cf.iface.Attribute; import com.taobao.android.dx.cf.iface.ParseObserver; import com.taobao.android.dx.cf.iface.StdAttributeList; import com... | import com.taobao.android.dx.cf.attrib.*; import com.taobao.android.dx.cf.code.*; import com.taobao.android.dx.cf.iface.*; import com.taobao.android.dx.rop.cst.*; import com.taobao.android.dx.util.*; | [
"com.taobao.android"
] | com.taobao.android; | 1,825,141 |
public final MultipartResolver getMultipartResolver() {
return this.multipartResolver;
} | final MultipartResolver function() { return this.multipartResolver; } | /**
* Obtain this servlet's MultipartResolver, if any.
* @return the MultipartResolver used by this servlet, or {@code null} if none
* (indicating that no multipart support is available)
*/ | Obtain this servlet's MultipartResolver, if any | getMultipartResolver | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java",
"license": "apache-2.0",
"size": 56975
} | [
"org.springframework.web.multipart.MultipartResolver"
] | import org.springframework.web.multipart.MultipartResolver; | import org.springframework.web.multipart.*; | [
"org.springframework.web"
] | org.springframework.web; | 1,520,915 |
public List<ProcessingChain> fetchByParameters(ParameterMap... values) {
return fetch(ProcessingChainTable.PROCESSING_CHAIN.PARAMETERS, values);
} | List<ProcessingChain> function(ParameterMap... values) { return fetch(ProcessingChainTable.PROCESSING_CHAIN.PARAMETERS, values); } | /**
* Fetch records that have <code>parameters IN (values)</code>
*/ | Fetch records that have <code>parameters IN (values)</code> | fetchByParameters | {
"repo_name": "openforis/calc",
"path": "calc-core/src/generated/java/org/openforis/calc/persistence/jooq/tables/daos/ProcessingChainDao.java",
"license": "mit",
"size": 3080
} | [
"java.util.List",
"org.openforis.calc.chain.ProcessingChain",
"org.openforis.calc.engine.ParameterMap",
"org.openforis.calc.persistence.jooq.tables.ProcessingChainTable"
] | import java.util.List; import org.openforis.calc.chain.ProcessingChain; import org.openforis.calc.engine.ParameterMap; import org.openforis.calc.persistence.jooq.tables.ProcessingChainTable; | import java.util.*; import org.openforis.calc.chain.*; import org.openforis.calc.engine.*; import org.openforis.calc.persistence.jooq.tables.*; | [
"java.util",
"org.openforis.calc"
] | java.util; org.openforis.calc; | 1,292,442 |
public void testFindMinimumStackedRangeValue() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
// an empty dataset should return a null max
Number min = DatasetUtilities.findMinimumStackedRangeValue(dataset);
assertNull(min);
dataset.addValue(1.0, "R1", "C1... | void function() { DefaultCategoryDataset dataset = new DefaultCategoryDataset(); Number min = DatasetUtilities.findMinimumStackedRangeValue(dataset); assertNull(min); dataset.addValue(1.0, "R1", "C1"); min = DatasetUtilities.findMinimumStackedRangeValue(dataset); assertEquals(0.0, min.doubleValue(), EPSILON); dataset.a... | /**
* A simple check for the findMinimumStackedRangeValue() method.
*/ | A simple check for the findMinimumStackedRangeValue() method | testFindMinimumStackedRangeValue | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_1/tests/org/jfree/data/general/junit/DatasetUtilitiesTests.java",
"license": "gpl-2.0",
"size": 50590
} | [
"org.jfree.data.category.DefaultCategoryDataset",
"org.jfree.data.general.DatasetUtilities"
] | import org.jfree.data.category.DefaultCategoryDataset; import org.jfree.data.general.DatasetUtilities; | import org.jfree.data.category.*; import org.jfree.data.general.*; | [
"org.jfree.data"
] | org.jfree.data; | 2,589,975 |
void initBus(BusAttachment busAttachment) throws Exception; | void initBus(BusAttachment busAttachment) throws Exception; | /**
* Initialize client by passing the BusAttachment
* @param busAttachment BusAttachment associated with this ClientBase instance
* @throws Exception error indicating failure to initialize the client
*/ | Initialize client by passing the BusAttachment | initBus | {
"repo_name": "octoblu/alljoyn",
"path": "alljoyn/services/about/java/src/org/alljoyn/services/common/ClientBase.java",
"license": "isc",
"size": 2372
} | [
"org.alljoyn.bus.BusAttachment"
] | import org.alljoyn.bus.BusAttachment; | import org.alljoyn.bus.*; | [
"org.alljoyn.bus"
] | org.alljoyn.bus; | 2,204,410 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "susinda/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/OAuthMediatorInputConnectorItemProvider.java",
"license": "apache-2.0",
"size": 2893
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 809,103 |
RestartTimingType getRestart(); | RestartTimingType getRestart(); | /**
* Returns the value of the '<em><b>Restart</b></em>' attribute.
* The default value is <code>"default"</code>.
* The literals are from the enumeration {@link org.w3._2001.smil20.RestartTimingType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Restart</em>' attribute isn... | Returns the value of the 'Restart' attribute. The default value is <code>"default"</code>. The literals are from the enumeration <code>org.w3._2001.smil20.RestartTimingType</code>. If the meaning of the 'Restart' attribute isn't clear, there really should be more of a description here... | getRestart | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/org/w3/_2001/smil20/language/AnimateType.java",
"license": "lgpl-2.1",
"size": 42171
} | [
"org.w3._2001.smil20.RestartTimingType"
] | import org.w3._2001.smil20.RestartTimingType; | import org.w3.*; | [
"org.w3"
] | org.w3; | 2,631,449 |
public CcCompilationHelper addDefines(NestedSet<String> defines) {
this.defines.addAll(defines.toList());
return this;
} | CcCompilationHelper function(NestedSet<String> defines) { this.defines.addAll(defines.toList()); return this; } | /**
* Adds the given defines to the compiler command line of this target as well as its dependent
* targets.
*/ | Adds the given defines to the compiler command line of this target as well as its dependent targets | addDefines | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java",
"license": "apache-2.0",
"size": 92871
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,746,857 |
public static synchronized UnicastConnectionManager getInstance(int port, RMIServerSocketFactory ssf) throws RemoteException {
//System.out.println("getInstance: " + port + "," + ssf);
if (ssf == null) {
ssf = defaultSocketFactory;
}
TripleKey key = new TripleKey(localhost, port, ssf);
UnicastConnectionMana... | static synchronized UnicastConnectionManager function(int port, RMIServerSocketFactory ssf) throws RemoteException { if (ssf == null) { ssf = defaultSocketFactory; } TripleKey key = new TripleKey(localhost, port, ssf); UnicastConnectionManager man = (UnicastConnectionManager)servers.get(key); if (man == null) { man = n... | /**
* Return a server connection manager which will accept connection on the
* given port.
*/ | Return a server connection manager which will accept connection on the given port | getInstance | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java",
"license": "bsd-3-clause",
"size": 14399
} | [
"java.rmi.RemoteException",
"java.rmi.server.RMIServerSocketFactory"
] | import java.rmi.RemoteException; import java.rmi.server.RMIServerSocketFactory; | import java.rmi.*; import java.rmi.server.*; | [
"java.rmi"
] | java.rmi; | 2,554,652 |
public Map<String, Object> convert(String subject, InputStream in,
RDFFormat format, Object context) {
Collection<Statement> g = RdfUtils.readRdfToGraph(in, format, "");
return convert(subject, context, g);
} | Map<String, Object> function(String subject, InputStream in, RDFFormat format, Object context) { Collection<Statement> g = RdfUtils.readRdfToGraph(in, format, ""); return convert(subject, context, g); } | /**
* You can easily convert the map to json using the object mapper provided by
* {@link #getObjectMapper}.
*
* @param in an input stream containing rdf data
* @param format the rdf format
* @param subject the root subject node of the resource
* @param context to create valid json-ld you have to provide... | You can easily convert the map to json using the object mapper provided by <code>#getObjectMapper</code> | convert | {
"repo_name": "jschnasse/regal-api",
"path": "app/de/hbz/lobid/helper/JsonConverter.java",
"license": "apache-2.0",
"size": 11921
} | [
"java.io.InputStream",
"java.util.Collection",
"java.util.Map",
"org.eclipse.rdf4j.model.Statement",
"org.eclipse.rdf4j.rio.RDFFormat"
] | import java.io.InputStream; import java.util.Collection; import java.util.Map; import org.eclipse.rdf4j.model.Statement; import org.eclipse.rdf4j.rio.RDFFormat; | import java.io.*; import java.util.*; import org.eclipse.rdf4j.model.*; import org.eclipse.rdf4j.rio.*; | [
"java.io",
"java.util",
"org.eclipse.rdf4j"
] | java.io; java.util; org.eclipse.rdf4j; | 1,911,481 |
private void restoreDeleted(List<S3ObjectSummary> summaries,
List<String> prefixes, boolean recursive, String prefix) {
// Go through all deleted keys
for (String key : new HashSet<>(delayedDeletes.keySet())) {
Delete delete = delayedDeletes.get(key);
if (isKeyDelayed(delete.time(), key)) {... | void function(List<S3ObjectSummary> summaries, List<String> prefixes, boolean recursive, String prefix) { for (String key : new HashSet<>(delayedDeletes.keySet())) { Delete delete = delayedDeletes.get(key); if (isKeyDelayed(delete.time(), key)) { if (isDescendant(prefix, key, recursive)) { if (delete.summary() != null)... | /**
* Main logic for
* {@link #restoreListObjects(ListObjectsRequest, ObjectListing)} and
* the v2 variant above.
* @param summaries object summary list to modify.
* @param prefixes prefix list to modify
* @param recursive true if recursive list request
* @param prefix prefix for original list requ... | Main logic for <code>#restoreListObjects(ListObjectsRequest, ObjectListing)</code> and the v2 variant above | restoreDeleted | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/InconsistentAmazonS3Client.java",
"license": "apache-2.0",
"size": 23350
} | [
"com.amazonaws.services.s3.model.S3ObjectSummary",
"java.util.HashSet",
"java.util.List"
] | import com.amazonaws.services.s3.model.S3ObjectSummary; import java.util.HashSet; import java.util.List; | import com.amazonaws.services.s3.model.*; import java.util.*; | [
"com.amazonaws.services",
"java.util"
] | com.amazonaws.services; java.util; | 1,171,579 |
String result = null;
// Search 1: System property
result = System.getProperty("tupelo."+prpName);
// Search 2: a fixed file = $HOME/.tupelo
if( result == null ) {
String userHome = System.getProperty( "user.home" );
File dir = new File( userHome );
File f = new File( dir, ".tupelo" );
if( f.i... | String result = null; result = System.getProperty(STR+prpName); if( result == null ) { String userHome = System.getProperty( STR ); File dir = new File( userHome ); File f = new File( dir, STR ); if( f.isFile() && f.canRead() ) { log.info( STR + f + STR + prpName ); try { FileInputStream fis = new FileInputStream( f );... | /**
Locate a property value given a property name. We look in four places
for the properties 'file', in this order: <br>
1: Specified as JVM arguments, prefixed with tupelo.* (Example: -Dtupelo.store=./test-store) <br>
2: In a real file name $(HOME)/.tupelo <br>
3: In a real file name /etc/tupelo.prp... | (Example: -Dtupelo.store=./test-store) | locatePropertyValue | {
"repo_name": "uw-dims/tupelo",
"path": "utils/src/main/java/edu/uw/apl/tupelo/utils/Discovery.java",
"license": "bsd-3-clause",
"size": 4744
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Properties"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,245,762 |
public HColumnDescriptor setCompactionCompressionType(
Compression.Algorithm type) {
return setValue(COMPRESSION_COMPACT, type.getName().toUpperCase());
} | HColumnDescriptor function( Compression.Algorithm type) { return setValue(COMPRESSION_COMPACT, type.getName().toUpperCase()); } | /**
* Compression types supported in hbase.
* LZO is not bundled as part of the hbase distribution.
* See <a href="http://wiki.apache.org/hadoop/UsingLzoCompression">LZO Compression</a>
* for how to enable it.
* @param type Compression type setting.
* @return this (for chained invocation)
*/ | Compression types supported in hbase. LZO is not bundled as part of the hbase distribution. See LZO Compression for how to enable it | setCompactionCompressionType | {
"repo_name": "ddraj/hbase-mttr",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java",
"license": "apache-2.0",
"size": 38954
} | [
"org.apache.hadoop.hbase.io.compress.Compression"
] | import org.apache.hadoop.hbase.io.compress.Compression; | import org.apache.hadoop.hbase.io.compress.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,279,265 |
public BlackBerryLocation getLocation(int timeout) {
stopTracking();
retryAttempt = 0;
lastValidFixTime = System.currentTimeMillis();
currentOptimalModeIsGeolocation = true;
switchToGPS = false;
log("Acquiring single location fix.. timeout="+timeout);
return getSingleFix(timeout);
}
| BlackBerryLocation function(int timeout) { stopTracking(); retryAttempt = 0; lastValidFixTime = System.currentTimeMillis(); currentOptimalModeIsGeolocation = true; switchToGPS = false; log(STR+timeout); return getSingleFix(timeout); } | /**
* Gets a single location fix and stops. Note that if this method is called in the middle of a tracking session, this method
* will stop the tracking session before attempting a single location fix. This is a blocking call.
* @param timeout Maximum time this method is allowed to spend to get a location. If a... | Gets a single location fix and stops. Note that if this method is called in the middle of a tracking session, this method will stop the tracking session before attempting a single location fix. This is a blocking call | getLocation | {
"repo_name": "russelldavies/mobileminder-blackberry",
"path": "src/rimx/location/simplelocation/SimpleLocationProvider.java",
"license": "apache-2.0",
"size": 41232
} | [
"net.rim.device.api.gps.BlackBerryLocation"
] | import net.rim.device.api.gps.BlackBerryLocation; | import net.rim.device.api.gps.*; | [
"net.rim.device"
] | net.rim.device; | 1,912,694 |
public void addToMainPart(PresentationObject object) {
this.mainTable.add(object, 2, this.mainRow++);
} | void function(PresentationObject object) { this.mainTable.add(object, 2, this.mainRow++); } | /**
* Adds object to the next row in the main table
*
* @param object
*/ | Adds object to the next row in the main table | addToMainPart | {
"repo_name": "idega/is.idega.block.family",
"path": "src/java/is/idega/block/family/presentation/UserEditor.java",
"license": "gpl-3.0",
"size": 71915
} | [
"com.idega.presentation.PresentationObject"
] | import com.idega.presentation.PresentationObject; | import com.idega.presentation.*; | [
"com.idega.presentation"
] | com.idega.presentation; | 2,205,367 |
interface WithAttributes {
WithCreate withAttributes(Map<String, List<String>> attributes);
} | interface WithAttributes { WithCreate withAttributes(Map<String, List<String>> attributes); } | /**
* Specifies the attributes property: The attributes for the Type..
*
* @param attributes The attributes for the Type.
* @return the next definition stage.
*/ | Specifies the attributes property: The attributes for the Type. | withAttributes | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/customerinsights/azure-resourcemanager-customerinsights/src/main/java/com/azure/resourcemanager/customerinsights/models/InteractionResourceFormat.java",
"license": "mit",
"size": 32810
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,762,278 |
public DomainClass getRootInstance() {
DomainClass root = null;
for (ProcessNode node: getNodes()) {
if (node instanceof DomainClass && node.getStereotype().equals("root_instance"))
return (DomainClass)node;
}
return root;
} | DomainClass function() { DomainClass root = null; for (ProcessNode node: getNodes()) { if (node instanceof DomainClass && node.getStereotype().equals(STR)) return (DomainClass)node; } return root; } | /**
* Returns the first root instance of the DomainModel (if any exists)
* @return
*/ | Returns the first root instance of the DomainModel (if any exists) | getRootInstance | {
"repo_name": "frapu78/processeditor",
"path": "src/net/frapu/code/visualization/domainModel/DomainModel.java",
"license": "apache-2.0",
"size": 2415
} | [
"net.frapu.code.visualization.ProcessNode"
] | import net.frapu.code.visualization.ProcessNode; | import net.frapu.code.visualization.*; | [
"net.frapu.code"
] | net.frapu.code; | 433,113 |
public void showMemoryUsage() {
logger.info("Memory used in task " + taskAttemptId);
synchronized (this) {
long memoryAccountedForByConsumers = 0;
for (MemoryConsumer c: consumers) {
long totalMemUsage = c.getUsed();
memoryAccountedForByConsumers += totalMemUsage;
if (total... | void function() { logger.info(STR + taskAttemptId); synchronized (this) { long memoryAccountedForByConsumers = 0; for (MemoryConsumer c: consumers) { long totalMemUsage = c.getUsed(); memoryAccountedForByConsumers += totalMemUsage; if (totalMemUsage > 0) { logger.info(STR + c + STR + Utils.bytesToString(totalMemUsage))... | /**
* Dump the memory usage of all consumers.
*/ | Dump the memory usage of all consumers | showMemoryUsage | {
"repo_name": "pgandhi999/spark",
"path": "core/src/main/java/org/apache/spark/memory/TaskMemoryManager.java",
"license": "apache-2.0",
"size": 19775
} | [
"org.apache.spark.util.Utils"
] | import org.apache.spark.util.Utils; | import org.apache.spark.util.*; | [
"org.apache.spark"
] | org.apache.spark; | 294,629 |
public static final DatabaseMeta findDatabase(List<DatabaseMeta> databases, ObjectId id)
{
if (databases == null)
return null;
for (DatabaseMeta ci : databases)
{
if (ci.getObjectId()!=null && ci.getObjectId().equals(id)) {
return ci;
... | static final DatabaseMeta function(List<DatabaseMeta> databases, ObjectId id) { if (databases == null) return null; for (DatabaseMeta ci : databases) { if (ci.getObjectId()!=null && ci.getObjectId().equals(id)) { return ci; } } return null; } | /**
* Find a database with a certain ID in an arraylist of databases.
* @param databases The ArrayList of databases
* @param id The id of the database connection
* @return The database object if one was found, null otherwise.
*/ | Find a database with a certain ID in an arraylist of databases | findDatabase | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src-db/org/pentaho/di/core/database/DatabaseMeta.java",
"license": "apache-2.0",
"size": 86047
} | [
"java.util.List",
"org.pentaho.di.repository.ObjectId"
] | import java.util.List; import org.pentaho.di.repository.ObjectId; | import java.util.*; import org.pentaho.di.repository.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 1,222,528 |
public static MozuClient<com.mozu.api.contracts.reference.TimeZoneCollection> getTimeZonesClient() throws Exception
{
return getTimeZonesClient( null);
} | static MozuClient<com.mozu.api.contracts.reference.TimeZoneCollection> function() throws Exception { return getTimeZonesClient( null); } | /**
* Retrieves the entire list of time zones that the system supports.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.reference.TimeZoneCollection> mozuClient=GetTimeZonesClient();
* client.setBaseAddress(url);
* client.executeRequest();
* TimeZoneCollection timeZoneCollection = client.Result();
* ... | Retrieves the entire list of time zones that the system supports. <code><code> MozuClient mozuClient=GetTimeZonesClient(); client.setBaseAddress(url); client.executeRequest(); TimeZoneCollection timeZoneCollection = client.Result(); </code></code> | getTimeZonesClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/ReferenceDataClient.java",
"license": "mit",
"size": 27032
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,472,085 |
Observable<ServiceResponse<CheckNameAvailabilityResult>> checkNameAvailabilityAsync(StorageAccountCheckNameAvailabilityParameters accountName); | Observable<ServiceResponse<CheckNameAvailabilityResult>> checkNameAvailabilityAsync(StorageAccountCheckNameAvailabilityParameters accountName); | /**
* Checks that account name is valid and is not in use.
*
* @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
* @return the observable to the Chec... | Checks that account name is valid and is not in use | checkNameAvailabilityAsync | {
"repo_name": "tbombach/autorest",
"path": "Samples/azure-storage/Azure.Java/StorageAccounts.java",
"license": "mit",
"size": 26344
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 741,106 |
CriteriaHelper.pollUiThread(Criteria.equals(shouldBeShown, new Callable<Boolean>() { | CriteriaHelper.pollUiThread(Criteria.equals(shouldBeShown, new Callable<Boolean>() { | /**
* Wait for an interstitial (or lack thereof) to be shown.
* Disclaimer: when |shouldBeShown| is false, it isn't clear that the interstitial would never
* be shown at some point in the near future. There isn't currently a way to wait for some event
* that would indicate this, unfortunately.
... | Wait for an interstitial (or lack thereof) to be shown. Disclaimer: when |shouldBeShown| is false, it isn't clear that the interstitial would never be shown at some point in the near future. There isn't currently a way to wait for some event that would indicate this, unfortunately | waitForInterstitial | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/SafeBrowsingTest.java",
"license": "bsd-3-clause",
"size": 4607
} | [
"java.util.concurrent.Callable",
"org.chromium.content_public.browser.test.util.Criteria",
"org.chromium.content_public.browser.test.util.CriteriaHelper"
] | import java.util.concurrent.Callable; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper; | import java.util.concurrent.*; import org.chromium.content_public.browser.test.util.*; | [
"java.util",
"org.chromium.content_public"
] | java.util; org.chromium.content_public; | 1,287,287 |
public void uploadCompleteStorage(LocalStorageData localStorageData, final CmrRepositoryDefinition cmrRepositoryDefinition, SubMonitor subMonitor) throws Exception {
if (!localStorageData.isFullyDownloaded()) {
throw new StorageException("Can not upload storage that is not fully downloaded.");
} | void function(LocalStorageData localStorageData, final CmrRepositoryDefinition cmrRepositoryDefinition, SubMonitor subMonitor) throws Exception { if (!localStorageData.isFullyDownloaded()) { throw new StorageException(STR); } | /**
* Uploads a complete storage to the {@link CmrRepositoryDefinition} upload folder. All files
* belonging to the local storage data will be uploaded to the temporary directory.
*
* @param localStorageData
* Storage to upload.
* @param cmrRepositoryDefinition
* Repository definiti... | Uploads a complete storage to the <code>CmrRepositoryDefinition</code> upload folder. All files belonging to the local storage data will be uploaded to the temporary directory | uploadCompleteStorage | {
"repo_name": "stefansiegl/inspectIT",
"path": "inspectIT/src/info/novatec/inspectit/rcp/storage/InspectITStorageManager.java",
"license": "agpl-3.0",
"size": 39644
} | [
"info.novatec.inspectit.rcp.repository.CmrRepositoryDefinition",
"info.novatec.inspectit.storage.LocalStorageData",
"info.novatec.inspectit.storage.StorageException",
"org.eclipse.core.runtime.SubMonitor"
] | import info.novatec.inspectit.rcp.repository.CmrRepositoryDefinition; import info.novatec.inspectit.storage.LocalStorageData; import info.novatec.inspectit.storage.StorageException; import org.eclipse.core.runtime.SubMonitor; | import info.novatec.inspectit.rcp.repository.*; import info.novatec.inspectit.storage.*; import org.eclipse.core.runtime.*; | [
"info.novatec.inspectit",
"org.eclipse.core"
] | info.novatec.inspectit; org.eclipse.core; | 2,066,406 |
private void writeQName(final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
final java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix... | void function(final javax.xml.namespace.QName qname, final javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { final java.lang.String namespaceURI = qname.getNamespaceURI(); if (namespaceURI != null) { java.lang.String prefix = xmlWriter.getPrefix(namespaceURI); if (prefix == null) ... | /**
* method to handle Qnames
*/ | method to handle Qnames | writeQName | {
"repo_name": "caiocteodoro/nfe",
"path": "src/main/java/com/fincatto/documentofiscal/cte300/webservices/statusservico/CteStatusServicoStub.java",
"license": "apache-2.0",
"size": 91957
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 1,598,673 |
public static Test suite() {
return new TestSuite(PassThroughTest.class);
} | static Test function() { return new TestSuite(PassThroughTest.class); } | /**
* Returns the test suite.
*
* @return the suite
*/ | Returns the test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging/src/test/java/adams/data/image/transformer/subimages/PassThroughTest.java",
"license": "gpl-3.0",
"size": 2335
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 964,577 |
public Object createProxy(String implem) throws ClassNotFoundException, LuaException
{
synchronized (L)
{
if (!isTable())
throw new LuaException("Invalid Object. Must be Table.");
StringTokenizer st = new StringTokenizer(implem, ",");
Class[] interfaces = new Class[st.countTokens()];
for (int i... | Object function(String implem) throws ClassNotFoundException, LuaException { synchronized (L) { if (!isTable()) throw new LuaException(STR); StringTokenizer st = new StringTokenizer(implem, ","); Class[] interfaces = new Class[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); i++) interfaces[i] = LuaClassLoader.fo... | /**
* Function that creates a java proxy to the object represented by <code>this</code>
*
* @param implem
* Interfaces that are implemented, separated by <code>,</code>
*/ | Function that creates a java proxy to the object represented by <code>this</code> | createProxy | {
"repo_name": "harite/ZjDroid",
"path": "src/org/keplerproject/luajava/LuaObject.java",
"license": "apache-2.0",
"size": 11820
} | [
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Proxy",
"java.util.StringTokenizer"
] | import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import java.util.StringTokenizer; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,697,548 |
public void fireCellSpanAdded(CellSpan newSpan) {
SpanModelEvent event = new SpanModelEvent(this, SpanModelEvent.SPAN_ADDED,
newSpan.getRow(), newSpan.getColumn(), 1, 1, newSpan
.getRowCount(), newSpan.getColumnCount());
fireSpanChanged(event);
} | void function(CellSpan newSpan) { SpanModelEvent event = new SpanModelEvent(this, SpanModelEvent.SPAN_ADDED, newSpan.getRow(), newSpan.getColumn(), 1, 1, newSpan .getRowCount(), newSpan.getColumnCount()); fireSpanChanged(event); } | /**
* Notifies all <code>SpanModelListeners</code> that registered themselves
* as listeners for this SpanModel that a span was added
*/ | Notifies all <code>SpanModelListeners</code> that registered themselves as listeners for this SpanModel that a span was added | fireCellSpanAdded | {
"repo_name": "nextreports/nextreports-designer",
"path": "src/ro/nextreports/designer/grid/AbstractSpanModel.java",
"license": "apache-2.0",
"size": 4104
} | [
"ro.nextreports.designer.grid.event.SpanModelEvent"
] | import ro.nextreports.designer.grid.event.SpanModelEvent; | import ro.nextreports.designer.grid.event.*; | [
"ro.nextreports.designer"
] | ro.nextreports.designer; | 2,568,933 |
public List<String> getVariableNames() {
return this.variableNames;
}
// expanding | List<String> function() { return this.variableNames; } | /**
* Return the names of the variables in the template, in order.
* @return the template variable names
*/ | Return the names of the variables in the template, in order | getVariableNames | {
"repo_name": "bboyfeiyu/spring-android",
"path": "spring-android-rest-template/src/main/java/org/springframework/web/util/UriTemplate.java",
"license": "apache-2.0",
"size": 8648
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,966,867 |
public static void setRegistrationId(Context context, String registrationId) {
C2DMSettings.setC2DMRegistrationId(context, registrationId);
} | static void function(Context context, String registrationId) { C2DMSettings.setC2DMRegistrationId(context, registrationId); } | /**
* Sets the C2DM registration ID for the application stored within settings.
*/ | Sets the C2DM registration ID for the application stored within settings | setRegistrationId | {
"repo_name": "leighpauls/k2cro4",
"path": "third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android/c2dm/C2DMTestUtil.java",
"license": "bsd-3-clause",
"size": 1314
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 296,717 |
public ServiceFuture<PublicIPPrefixInner> getByResourceGroupAsync(String resourceGroupName, String publicIpPrefixName, String expand, final ServiceCallback<PublicIPPrefixInner> serviceCallback) {
return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixNa... | ServiceFuture<PublicIPPrefixInner> function(String resourceGroupName, String publicIpPrefixName, String expand, final ServiceCallback<PublicIPPrefixInner> serviceCallback) { return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, publicIpPrefixName, expand), serviceCallback); } | /**
* Gets the specified public IP prefix in a specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param publicIpPrefixName The name of the public IP prefix.
* @param expand Expands referenced resources.
* @param serviceCallback the async ServiceCallba... | Gets the specified public IP prefix in a specified resource group | getByResourceGroupAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixesInner.java",
"license": "mit",
"size": 78189
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 941,100 |
@Test
public void testGetNVCL2_0_JobsScalarBinned_EmptyCSV() throws Exception {
final String boreholeId = "BOREHOLE_1234";
final String[] jobIds = new String[] {"job1","job2","job3"};
final double binSizeMetres = 1.0;
context.checking(new Expectations() {
{
... | void function() throws Exception { final String boreholeId = STR; final String[] jobIds = new String[] {"job1","job2","job3"}; final double binSizeMetres = 1.0; context.checking(new Expectations() { { atLeast(1).of(mockMethodMaker).getNVCLJobsScalarMethod(with(any(String.class)), with(any(String.class)), with(any(Strin... | /**
* Tests parsing of a download job scalars request into a BinnedCSVResponse
*
* @throws Exception
*/ | Tests parsing of a download job scalars request into a BinnedCSVResponse | testGetNVCL2_0_JobsScalarBinned_EmptyCSV | {
"repo_name": "victortey/AuScope-Portal",
"path": "src/test/java/org/auscope/portal/server/web/service/TestNVCL2_0_DataService.java",
"license": "lgpl-3.0",
"size": 25259
} | [
"org.auscope.portal.core.server.http.HttpClientInputStream",
"org.auscope.portal.server.domain.nvcldataservice.BinnedCSVResponse",
"org.jmock.Expectations",
"org.junit.Assert"
] | import org.auscope.portal.core.server.http.HttpClientInputStream; import org.auscope.portal.server.domain.nvcldataservice.BinnedCSVResponse; import org.jmock.Expectations; import org.junit.Assert; | import org.auscope.portal.core.server.http.*; import org.auscope.portal.server.domain.nvcldataservice.*; import org.jmock.*; import org.junit.*; | [
"org.auscope.portal",
"org.jmock",
"org.junit"
] | org.auscope.portal; org.jmock; org.junit; | 128,762 |
private void setList(final QualityTestSuiteList list) {
this.list = list;
} | void function(final QualityTestSuiteList list) { this.list = list; } | /**
* Set the list.
* @param list The list to set
*/ | Set the list | setList | {
"repo_name": "GenomicParisCentre/doelan",
"path": "src/main/java/fr/ens/transcriptome/doelan/gui/NewTestSuiteWidget.java",
"license": "gpl-2.0",
"size": 9957
} | [
"fr.ens.transcriptome.doelan.data.QualityTestSuiteList"
] | import fr.ens.transcriptome.doelan.data.QualityTestSuiteList; | import fr.ens.transcriptome.doelan.data.*; | [
"fr.ens.transcriptome"
] | fr.ens.transcriptome; | 1,691,353 |
@Override
public Response apisApiIdThumbnailGet(String apiId, String accept, String ifNoneMatch,
String ifModifiedSince) {
try {
APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider();
String tenantDomain = RestApiUtil.getLoggedI... | Response function(String apiId, String accept, String ifNoneMatch, String ifModifiedSince) { try { APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(); String tenantDomain = RestApiUtil.getLoggedInUserTenantDomain(); APIIdentifier apiIdentifier = APIMappingUtil.getAPIIdentifierFromApiIdOrUUID(apiId, tenantD... | /**
* Retrieves the thumbnail image of an API specified by API identifier
*
* @param apiId API Id
* @param accept Accept header value
* @param ifNoneMatch If-None-Match header value
* @param ifModifiedSince If-Modified-Since header value
* @return Thumbnail imag... | Retrieves the thumbnail image of an API specified by API identifier | apisApiIdThumbnailGet | {
"repo_name": "nuwand/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 106859
} | [
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.model.APIIdentifier",
"org.wso2.carbon.apimgt.api.model.ResourceFile",
"org.wso2.carbon.apimgt.rest.api.publisher.utils.ma... | import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.ResourceFile; import org.wso2.carbon.apimgt.rest.ap... | import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.publisher.utils.mappings.*; import org.wso2.carbon.apimgt.rest.api.util.*; import org.wso2.carbon.apimgt.rest.api.util.utils.*; | [
"javax.ws",
"org.wso2.carbon"
] | javax.ws; org.wso2.carbon; | 1,454,698 |
private Iterator<double[]> createRandomIterator(final long numSamples) {
final List<City> cityList = new ArrayList<City>();
cityList.addAll(cities); | Iterator<double[]> function(final long numSamples) { final List<City> cityList = new ArrayList<City>(); cityList.addAll(cities); | /**
* Creates an iterator that will present a series of city's coordinates in
* a random order.
*
* @param numSamples Number of samples.
* @return the iterator.
*/ | Creates an iterator that will present a series of city's coordinates in a random order | createRandomIterator | {
"repo_name": "venkateshamurthy/java-quantiles",
"path": "src/test/java/org/apache/commons/math3/ml/neuralnet/sofm/TravellingSalesmanSolver.java",
"license": "apache-2.0",
"size": 12900
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 551,105 |
public void mouseExited(MouseEvent e)
{
handleEvent(e);
} | void function(MouseEvent e) { handleEvent(e); } | /**
* This method is called when the mouse exits the glass pane.
*
* @param e
* The MouseEvent.
*/ | This method is called when the mouse exits the glass pane | mouseExited | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java",
"license": "gpl-2.0",
"size": 49056
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 612,503 |
@Test
public final void testCreateTransmitExceptionXBeeTransmitStatusNull() {
// Setup the resources for the test.
String message = "There was a problem transmitting the XBee API packet.";
XBeeTransmitStatus transmitStatus = null;
// Call the method under test.
TransmitException e = new TransmitExcepti... | final void function() { String message = STR; XBeeTransmitStatus transmitStatus = null; TransmitException e = new TransmitException(transmitStatus); assertThat(STR, e.getMessage(), is(equalTo(message))); assertThat(STR, e.getCause(), is(nullValue(Throwable.class))); assertThat(STR, e.getTransmitStatus(), is(nullValue(X... | /**
* Test method for {@link com.digi.xbee.api.exceptions.TransmitException#TransmitException(XBeeTransmitStatus)}.
*/ | Test method for <code>com.digi.xbee.api.exceptions.TransmitException#TransmitException(XBeeTransmitStatus)</code> | testCreateTransmitExceptionXBeeTransmitStatusNull | {
"repo_name": "GUBotDev/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/exceptions/TransmitExceptionTest.java",
"license": "mpl-2.0",
"size": 20489
} | [
"com.digi.xbee.api.models.XBeeTransmitStatus",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import com.digi.xbee.api.models.XBeeTransmitStatus; import org.hamcrest.core.Is; import org.junit.Assert; | import com.digi.xbee.api.models.*; import org.hamcrest.core.*; import org.junit.*; | [
"com.digi.xbee",
"org.hamcrest.core",
"org.junit"
] | com.digi.xbee; org.hamcrest.core; org.junit; | 2,089,141 |
private void binaryDataTest(int startByte, int dataMaxSize)
throws IOException, Exception {
byte data[] = new byte[dataMaxSize];
for (int i = 0; i < data.length; i++) {
byte b = (byte)((i + startByte) % 256);
data[i] = b;
}
Link l = new Link(1, 1, 1, LinkStore.VISIBILITY_DEFAULT,
... | void function(int startByte, int dataMaxSize) throws IOException, Exception { byte data[] = new byte[dataMaxSize]; for (int i = 0; i < data.length; i++) { byte b = (byte)((i + startByte) % 256); data[i] = b; } Link l = new Link(1, 1, 1, LinkStore.VISIBILITY_DEFAULT, data, 1, 1); byte updateData[] = new byte[dataMaxSize... | /**
* Test insertion/update of binary data: insert binary string with
* bytes [startByte:startByte + dataMaxSize) and read back
* @throws IOException
* @throws Exception
*/ | Test insertion/update of binary data: insert binary string with bytes [startByte:startByte + dataMaxSize) and read back | binaryDataTest | {
"repo_name": "Percona-QA/toku-qa",
"path": "tokudb/software/linkbench/src/test/java/com/facebook/LinkBench/LinkStoreTestBase.java",
"license": "gpl-2.0",
"size": 30692
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,312,944 |
public static boolean hasFileWithName(DataSource dataSource,
long instrumentId, String filename)
throws DatabaseException, MissingParamException {
boolean result = false;
MissingParam.checkMissing(dataSource, "dataSource");
MissingParam.checkZeroPositive(instrumentId, "instrumentId");
Missing... | static boolean function(DataSource dataSource, long instrumentId, String filename) throws DatabaseException, MissingParamException { boolean result = false; MissingParam.checkMissing(dataSource, STR); MissingParam.checkZeroPositive(instrumentId, STR); MissingParam.checkMissing(filename, STR); Connection conn = null; Pr... | /**
* Determine whether or not an instrument has a file with the specified name
*
* @param dataSource
* A data source
* @param instrumentId
* The instrument's database ID
* @param filename
* The filename
* @return {@code true} if a file exists; {@code false} if it d... | Determine whether or not an instrument has a file with the specified name | hasFileWithName | {
"repo_name": "squaregoldfish/QuinCe",
"path": "WebApp/src/uk/ac/exeter/QuinCe/data/Files/DataFileDB.java",
"license": "gpl-3.0",
"size": 38666
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"javax.sql.DataSource",
"uk.ac.exeter.QuinCe"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.sql.DataSource; import uk.ac.exeter.QuinCe; | import java.sql.*; import javax.sql.*; import uk.ac.exeter.*; | [
"java.sql",
"javax.sql",
"uk.ac.exeter"
] | java.sql; javax.sql; uk.ac.exeter; | 1,612,348 |
void add(long timestamp, List<Metric> metrics) throws Exception;
| void add(long timestamp, List<Metric> metrics) throws Exception; | /**
* If headers exist, the metrics will be matched against headers.
*
* @throws Exception on type mismatch between headers (if present) and the row elements.
*/ | If headers exist, the metrics will be matched against headers | add | {
"repo_name": "NovaOrdis/series",
"path": "src/main/java/com/novaordis/series/Series.java",
"license": "apache-2.0",
"size": 2927
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,291,177 |
public T getMessage(String code, Locale locale) {
return getMessageFromProvider(code, locale);
} | T function(String code, Locale locale) { return getMessageFromProvider(code, locale); } | /**
* Returns the content of the message with the specified code and locale
*/ | Returns the content of the message with the specified code and locale | getMessage | {
"repo_name": "Softhouse/orchid",
"path": "se.softhouse.garden.orchid.commons/src/main/java/se/softhouse/garden/orchid/commons/text/storage/OrchidMessageStorage.java",
"license": "mit",
"size": 3799
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,223,020 |
private void applyAlterDatabase(Db db)
throws ImpalaRuntimeException {
MetaStoreClient msClient = catalog_.getMetaStoreClient();
try {
msClient.getHiveClient().alterDatabase(db.getName(), db.getMetaStoreDb());
} catch (TException e) {
throw new ImpalaRuntimeException(
String.fo... | void function(Db db) throws ImpalaRuntimeException { MetaStoreClient msClient = catalog_.getMetaStoreClient(); try { msClient.getHiveClient().alterDatabase(db.getName(), db.getMetaStoreDb()); } catch (TException e) { throw new ImpalaRuntimeException( String.format(HMS_RPC_ERROR_FORMAT_STR, STR), e); } finally { msClien... | /**
* Updates the database object in the metastore.
*/ | Updates the database object in the metastore | applyAlterDatabase | {
"repo_name": "cloudera/recordservice",
"path": "fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java",
"license": "apache-2.0",
"size": 126551
} | [
"com.cloudera.impala.catalog.Db",
"com.cloudera.impala.catalog.MetaStoreClientPool",
"com.cloudera.impala.common.ImpalaRuntimeException",
"org.apache.thrift.TException"
] | import com.cloudera.impala.catalog.Db; import com.cloudera.impala.catalog.MetaStoreClientPool; import com.cloudera.impala.common.ImpalaRuntimeException; import org.apache.thrift.TException; | import com.cloudera.impala.catalog.*; import com.cloudera.impala.common.*; import org.apache.thrift.*; | [
"com.cloudera.impala",
"org.apache.thrift"
] | com.cloudera.impala; org.apache.thrift; | 2,502,091 |
public void update(MotionEvent event, int policyFlags) {
mMetaState = event.getMetaState();
boolean moved = detectMovement(event);
cacheLastEvent(event, policyFlags, mLastMotionEvent == null || moved );
if (moved) {
rescheduleClick(mDelay);
... | void function(MotionEvent event, int policyFlags) { mMetaState = event.getMetaState(); boolean moved = detectMovement(event); cacheLastEvent(event, policyFlags, mLastMotionEvent == null moved ); if (moved) { rescheduleClick(mDelay); } } | /**
* Updates properties that should be used for click event sequence initiated by this object,
* as well as the time at which click will be scheduled.
* Should be called whenever new motion event is observed.
*
* @param event Motion event whose properties should be used as ... | Updates properties that should be used for click event sequence initiated by this object, as well as the time at which click will be scheduled. Should be called whenever new motion event is observed | update | {
"repo_name": "xorware/android_frameworks_base",
"path": "services/accessibility/java/com/android/server/accessibility/AutoclickController.java",
"license": "apache-2.0",
"size": 17851
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 2,558,489 |
protected DatumAuthorityFactory getDatumAuthorityFactory(final String code)
throws FactoryException {
if (datumFactory == null) {
throw missingFactory(DatumAuthorityFactory.class, code);
}
return datumFactory;
} | DatumAuthorityFactory function(final String code) throws FactoryException { if (datumFactory == null) { throw missingFactory(DatumAuthorityFactory.class, code); } return datumFactory; } | /**
* Returns the datum factory to use for the specified code. The default implementation always
* returns the factory specified at construction time. Subclasses can override this method in
* order to select a different factory implementation depending on the code value.
*
* @param code The aut... | Returns the datum factory to use for the specified code. The default implementation always returns the factory specified at construction time. Subclasses can override this method in order to select a different factory implementation depending on the code value | getDatumAuthorityFactory | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java",
"license": "lgpl-2.1",
"size": 54063
} | [
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.datum.DatumAuthorityFactory"
] | import org.opengis.referencing.FactoryException; import org.opengis.referencing.datum.DatumAuthorityFactory; | import org.opengis.referencing.*; import org.opengis.referencing.datum.*; | [
"org.opengis.referencing"
] | org.opengis.referencing; | 698,282 |
public Set<String> getTopics() {
return Collections.unmodifiableSet(position.keySet());
} | Set<String> function() { return Collections.unmodifiableSet(position.keySet()); } | /**
* Return the topics that are represented in this Position.
*/ | Return the topics that are represented in this Position | getTopics | {
"repo_name": "TiVo/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/query/Position.java",
"license": "apache-2.0",
"size": 6825
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 219,544 |
public EdmEntityContainer getEntityContainer();
/**
* Gets the start entity set - identical to the target entity set if no navigation
* has been used.
* @return {@link EdmEntitySet} | EdmEntityContainer function(); /** * Gets the start entity set - identical to the target entity set if no navigation * has been used. * @return {@link EdmEntitySet} | /**
* Gets the target entity container.
* @return {@link EdmEntityContainer} the target entity container
*/ | Gets the target entity container | getEntityContainer | {
"repo_name": "SAP/cloud-odata-java",
"path": "odata-api/src/main/java/com/sap/core/odata/api/uri/info/GetEntitySetCountUriInfo.java",
"license": "apache-2.0",
"size": 4033
} | [
"com.sap.core.odata.api.edm.EdmEntityContainer",
"com.sap.core.odata.api.edm.EdmEntitySet"
] | import com.sap.core.odata.api.edm.EdmEntityContainer; import com.sap.core.odata.api.edm.EdmEntitySet; | import com.sap.core.odata.api.edm.*; | [
"com.sap.core"
] | com.sap.core; | 1,457,176 |
public double impliedVolatilityBachelier(
ResolvedIborCapFloorLeg capFloorLeg,
RatesProvider multicurve,
SingleCurrencyModelParameters model) {
double pvRational = presentValue(capFloorLeg, multicurve, model).getAmount();
return impliedVolatilityBachelier(capFloorLeg, multicurve, pvRational... | double function( ResolvedIborCapFloorLeg capFloorLeg, RatesProvider multicurve, SingleCurrencyModelParameters model) { double pvRational = presentValue(capFloorLeg, multicurve, model).getAmount(); return impliedVolatilityBachelier(capFloorLeg, multicurve, pvRational, model.getValuationDateTime()); } | /**
* Computes the implied volatility in the Bachelier model.
* <p>
* The cap/floor price is computed in the rational model and the implied volatility for that price is computed.
* The implied volatility is the constant volatility for all caplets/floorlets composing the leg.
*
* @param capFloorLeg t... | Computes the implied volatility in the Bachelier model. The cap/floor price is computed in the rational model and the implied volatility for that price is computed. The implied volatility is the constant volatility for all caplets/floorlets composing the leg | impliedVolatilityBachelier | {
"repo_name": "marc-henrard/RisQ-ir-models",
"path": "src/main/java/marc/henrard/murisq/pricer/capfloor/SingleCurrencyModelCapFloorLegPricer.java",
"license": "apache-2.0",
"size": 6285
} | [
"com.opengamma.strata.pricer.rate.RatesProvider",
"com.opengamma.strata.product.capfloor.ResolvedIborCapFloorLeg"
] | import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.capfloor.ResolvedIborCapFloorLeg; | import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.capfloor.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 1,942,428 |
public Request classes(Computer computer,
Class<?>... classes) {
try {
//For Android
AllDefaultPossibilitiesBuilder builder = new AndroidAllDefaultPossibilitiesBuilder(true);
Runner suite = computer.getSuite(builder,
... | Request function(Computer computer, Class<?>... classes) { try { AllDefaultPossibilitiesBuilder builder = new AndroidAllDefaultPossibilitiesBuilder(true); Runner suite = computer.getSuite(builder, classes); return Request.runner(suite); } catch (InitializationError e) { throw new RuntimeException(STR); } } | /**
* Create a <code>Request</code> that, when processed, will run all the tests
* in a set of classes.
* @param computer Helps construct Runners from classes
* @param classes the classes containing the tests
* @return a <code>Request</code> that will cause all tests in the classes to be run
... | Create a <code>Request</code> that, when processed, will run all the tests in a set of classes | classes | {
"repo_name": "esmasui/AndroidJUnit4",
"path": "android-junit4/src/main/java/com/uphyca/testing/android/suitebuilder/JUnit4TestSuiteBuilder.java",
"license": "apache-2.0",
"size": 14302
} | [
"com.uphyca.testing.junit.internal.builders.AndroidAllDefaultPossibilitiesBuilder",
"org.junit.internal.builders.AllDefaultPossibilitiesBuilder",
"org.junit.runner.Computer",
"org.junit.runner.Request",
"org.junit.runner.Runner",
"org.junit.runners.model.InitializationError"
] | import com.uphyca.testing.junit.internal.builders.AndroidAllDefaultPossibilitiesBuilder; import org.junit.internal.builders.AllDefaultPossibilitiesBuilder; import org.junit.runner.Computer; import org.junit.runner.Request; import org.junit.runner.Runner; import org.junit.runners.model.InitializationError; | import com.uphyca.testing.junit.internal.builders.*; import org.junit.internal.builders.*; import org.junit.runner.*; import org.junit.runners.model.*; | [
"com.uphyca.testing",
"org.junit.internal",
"org.junit.runner",
"org.junit.runners"
] | com.uphyca.testing; org.junit.internal; org.junit.runner; org.junit.runners; | 2,770,016 |
@SuppressLint("NewApi")
public static void tryAccessibilityAnnounce(View view, CharSequence text) {
if (isJellybeanOrLater() && view != null && text != null) {
view.announceForAccessibility(text);
}
} | @SuppressLint(STR) static void function(View view, CharSequence text) { if (isJellybeanOrLater() && view != null && text != null) { view.announceForAccessibility(text); } } | /**
* Try to speak the specified text, for accessibility. Only available on JB or later.
* @param text Text to announce.
*/ | Try to speak the specified text, for accessibility. Only available on JB or later | tryAccessibilityAnnounce | {
"repo_name": "douglasknudsen/MaterialDateTimePicker",
"path": "library/src/main/java/com/wdullaer/materialdatetimepicker/Utils.java",
"license": "apache-2.0",
"size": 5447
} | [
"android.annotation.SuppressLint",
"android.view.View"
] | import android.annotation.SuppressLint; import android.view.View; | import android.annotation.*; import android.view.*; | [
"android.annotation",
"android.view"
] | android.annotation; android.view; | 1,352,306 |
private void generateToString(Map<String, Integer> columnTypes,
String [] colNames, StringBuilder sb) {
// Save the delimiters to the class.
sb.append(" private final DelimiterSet __outputDelimiters = ");
sb.append(options.getOutputDelimiters().formatConstructor() + ";\n");
// The default toS... | void function(Map<String, Integer> columnTypes, String [] colNames, StringBuilder sb) { sb.append(STR); sb.append(options.getOutputDelimiters().formatConstructor() + ";\n"); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); sb... | /**
* Generate the toString() method.
* @param columnTypes - mapping from column names to sql types
* @param colNames - ordered list of column names for table.
* @param sb - StringBuilder to append code to
*/ | Generate the toString() method | generateToString | {
"repo_name": "infinidb/sqoop",
"path": "src/java/org/apache/sqoop/orm/ClassWriter.java",
"license": "apache-2.0",
"size": 50350
} | [
"com.cloudera.sqoop.lib.FieldFormatter",
"java.util.Map"
] | import com.cloudera.sqoop.lib.FieldFormatter; import java.util.Map; | import com.cloudera.sqoop.lib.*; import java.util.*; | [
"com.cloudera.sqoop",
"java.util"
] | com.cloudera.sqoop; java.util; | 1,902,038 |
protected synchronized void refreshServers() {
StringBuilder refreshResult = new StringBuilder();
Set<Server> availableReadServers = new HashSet<>();
Server[] newReadServers;
if (writeServer == null || !writeServer.isAvailable()) {
logger.debug("[refreshServers] write se... | synchronized void function() { StringBuilder refreshResult = new StringBuilder(); Set<Server> availableReadServers = new HashSet<>(); Server[] newReadServers; if (writeServer == null !writeServer.isAvailable()) { logger.debug(STR); for (Server server : SERVERS) { if (server.isAvailable() && server.isMaster()) { writeSe... | /**
* Reorganises the list of read servers based on current master / write server and list of available servers.
*/ | Reorganises the list of read servers based on current master / write server and list of available servers | refreshServers | {
"repo_name": "owetterau/neo4j-websockets",
"path": "client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java",
"license": "lgpl-3.0",
"size": 17168
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,684,087 |
public boolean saveProperties(
@NonNull File file,
@NonNull Properties props,
@NonNull String comments); | boolean function( @NonNull File file, @NonNull Properties props, @NonNull String comments); | /**
* Saves (write, store) the given {@link Properties} into the given {@link File}.
*
* @param file A non-null file to write to.
* @param props The properties to write.
* @param comments A non-null description of the properly list, written in the file.
* @return True if the properties cou... | Saves (write, store) the given <code>Properties</code> into the given <code>File</code> | saveProperties | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/io/IFileOp.java",
"license": "gpl-2.0",
"size": 5103
} | [
"com.android.annotations.NonNull",
"java.io.File",
"java.util.Properties"
] | import com.android.annotations.NonNull; import java.io.File; import java.util.Properties; | import com.android.annotations.*; import java.io.*; import java.util.*; | [
"com.android.annotations",
"java.io",
"java.util"
] | com.android.annotations; java.io; java.util; | 2,722,054 |
protected void resetVersion() {
MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion();
version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion());
VERSION.set(handle, version);
} | void function() { MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion(); version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion()); VERSION.set(handle, version); } | /**
* Reset the version string to the default state.
*/ | Reset the version string to the default state | resetVersion | {
"repo_name": "dmulloy2/ProtocolLib",
"path": "src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java",
"license": "gpl-2.0",
"size": 17792
} | [
"com.comphenix.protocol.utility.MinecraftProtocolVersion",
"com.comphenix.protocol.utility.MinecraftVersion"
] | import com.comphenix.protocol.utility.MinecraftProtocolVersion; import com.comphenix.protocol.utility.MinecraftVersion; | import com.comphenix.protocol.utility.*; | [
"com.comphenix.protocol"
] | com.comphenix.protocol; | 820,764 |
public static Map getCacheServers() {
List cacheServers = cache.getCacheServers();
Map cacheServersMap = new HashMap();
Iterator itr = cacheServers.iterator();
int bridgeServerCounter = 0;
int receiverServerCounter = 0;
while (itr.hasNext()) {
CacheServerImpl cacheServer = (CacheServerI... | static Map function() { List cacheServers = cache.getCacheServers(); Map cacheServersMap = new HashMap(); Iterator itr = cacheServers.iterator(); int bridgeServerCounter = 0; int receiverServerCounter = 0; while (itr.hasNext()) { CacheServerImpl cacheServer = (CacheServerImpl) itr.next(); if (cacheServer.getAcceptor().... | /**
* Returns a Map that contains the count for number of bridge server and number of Receivers.
*
* @return Map
*/ | Returns a Map that contains the count for number of bridge server and number of Receivers | getCacheServers | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-wan/src/test/java/org/apache/geode/internal/cache/wan/WANTestBase.java",
"license": "apache-2.0",
"size": 154839
} | [
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.apache.geode.internal.cache.CacheServerImpl"
] | import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.geode.internal.cache.CacheServerImpl; | import java.util.*; import org.apache.geode.internal.cache.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 2,090,907 |
public OHttpResponseWrapper writeRecord(final ORecord<?> iRecord, final String iFetchPlan) throws IOException {
response.writeRecord(iRecord, iFetchPlan, null);
return this;
} | OHttpResponseWrapper function(final ORecord<?> iRecord, final String iFetchPlan) throws IOException { response.writeRecord(iRecord, iFetchPlan, null); return this; } | /**
* Writes a record as response. The record is serialized in JSON format.
*
* @param iContent
* Record to serialize
* @param iFetchPlan
* Fetch plan to specify nested records
* @return The object itself for fluent chained calls
*/ | Writes a record as response. The record is serialized in JSON format | writeRecord | {
"repo_name": "delebash/orientdb-parent",
"path": "server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponseWrapper.java",
"license": "apache-2.0",
"size": 11003
} | [
"com.orientechnologies.orient.core.record.ORecord",
"java.io.IOException"
] | import com.orientechnologies.orient.core.record.ORecord; import java.io.IOException; | import com.orientechnologies.orient.core.record.*; import java.io.*; | [
"com.orientechnologies.orient",
"java.io"
] | com.orientechnologies.orient; java.io; | 334,669 |
private void waitForPanelToEnterState(final @PanelState int state) {
CriteriaHelper.pollUiThread(() -> {
Criteria.checkThat(mPanel, Matchers.notNullValue());
Criteria.checkThat(mPanel.getPanelState(), Matchers.is(state));
Criteria.checkThat(mPanel.isHeightAnimationRunning... | void function(final @PanelState int state) { CriteriaHelper.pollUiThread(() -> { Criteria.checkThat(mPanel, Matchers.notNullValue()); Criteria.checkThat(mPanel.getPanelState(), Matchers.is(state)); Criteria.checkThat(mPanel.isHeightAnimationRunning(), Matchers.is(false)); }); } | /**
* Waits for the Search Panel to enter the given {@code PanelState} and assert.
* @param state The {@link PanelState} to wait for.
*/ | Waits for the Search Panel to enter the given PanelState and assert | waitForPanelToEnterState | {
"repo_name": "chromium/chromium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java",
"license": "bsd-3-clause",
"size": 109454
} | [
"org.chromium.base.test.util.Criteria",
"org.chromium.base.test.util.CriteriaHelper",
"org.chromium.chrome.browser.compositor.bottombar.OverlayPanel",
"org.hamcrest.Matchers"
] | import org.chromium.base.test.util.Criteria; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel; import org.hamcrest.Matchers; | import org.chromium.base.test.util.*; import org.chromium.chrome.browser.compositor.bottombar.*; import org.hamcrest.*; | [
"org.chromium.base",
"org.chromium.chrome",
"org.hamcrest"
] | org.chromium.base; org.chromium.chrome; org.hamcrest; | 1,314,905 |
public static void zip(File directory, File zipfile, FileFilter fileFilter) {
try {
URI base = directory.toURI();
ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(zipfile));
zip(base, directory.listFiles(fileFilter), zipOutputStream,fileFilter);
zipOutputStream.close();
... | static void function(File directory, File zipfile, FileFilter fileFilter) { try { URI base = directory.toURI(); ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(zipfile)); zip(base, directory.listFiles(fileFilter), zipOutputStream,fileFilter); zipOutputStream.close(); } catch (IOException ioe)... | /**
* Zip a list of files.
*
* @param sourceFiles
* Files to be zipped.
* @param zipfile
* The zip file that should be created.
*/ | Zip a list of files | zip | {
"repo_name": "DenHaag-TAI/layer7-monitor",
"path": "src/main/java/nl/denhaag/twb/util/Util.java",
"license": "gpl-3.0",
"size": 7419
} | [
"java.io.File",
"java.io.FileFilter",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.zip.ZipOutputStream"
] | import java.io.File; import java.io.FileFilter; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipOutputStream; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 608,628 |
@POST
@Consumes(MediaType.WILDCARD)
@Produces(MediaType.TEXT_PLAIN)
@Path("/token/identity-provider")
@ApiOperation(
value = "Create token using identity provider",
notes = "Creates a token for accessing the REST API via a custom identity provider. " +
"Th... | @Consumes(MediaType.WILDCARD) @Produces(MediaType.TEXT_PLAIN) @Path(STR) @ApiOperation( value = STR, notes = STR + STR + STR + STR + STR + STR, response = String.class ) @ApiResponses({ @ApiResponse(code = 400, message = HttpStatusMessages.MESSAGE_400), @ApiResponse(code = 401, message = HttpStatusMessages.MESSAGE_401)... | /**
* Creates a token for accessing the REST API using a custom identity provider configured using NiFi Registry extensions.
*
* @param httpServletRequest the servlet request
* @return A JWT (string)
*/ | Creates a token for accessing the REST API using a custom identity provider configured using NiFi Registry extensions | createAccessTokenUsingIdentityProviderCredentials | {
"repo_name": "MikeThomsen/nifi",
"path": "nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/AccessResource.java",
"license": "apache-2.0",
"size": 40812
} | [
"io.swagger.annotations.ApiOperation",
"io.swagger.annotations.ApiResponse",
"io.swagger.annotations.ApiResponses",
"java.net.URI",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",... | import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import java.net.URI; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import... | import io.swagger.annotations.*; import java.net.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.nifi.registry.security.authentication.*; import org.apache.nifi.registry.security.authentication.exception.*; import org.apache.nifi.registry.web.exception.*; | [
"io.swagger.annotations",
"java.net",
"javax.servlet",
"javax.ws",
"org.apache.nifi"
] | io.swagger.annotations; java.net; javax.servlet; javax.ws; org.apache.nifi; | 488,789 |
public @Nonnull MachineImage constrainedTo(@Nonnull String dataCenterId) {
this.providerDataCenterId = dataCenterId;
return this;
} | @Nonnull MachineImage function(@Nonnull String dataCenterId) { this.providerDataCenterId = dataCenterId; return this; } | /**
* Indicates the data center in which virtual machine instances created from this image must be launched for
* images that are data center constrained.
* @param dataCenterId the ID of the data center to which this image is constrained
* @return this
*/ | Indicates the data center in which virtual machine instances created from this image must be launched for images that are data center constrained | constrainedTo | {
"repo_name": "vladmunthiu/dasein-cloud-core-GR-fork",
"path": "src/main/java/org/dasein/cloud/compute/MachineImage.java",
"license": "apache-2.0",
"size": 23262
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,278,000 |
int addConstraint(String tableName, String constraintClassName)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException; | int addConstraint(String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException; | /**
* Add a new constraint to a table.
*
* @param tableName
* the name of the table
* @param constraintClassName
* the full name of the constraint class
* @return the unique number assigned to the constraint
* @throws AccumuloException
* thrown if the constraint ha... | Add a new constraint to a table | addConstraint | {
"repo_name": "ivakegg/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java",
"license": "apache-2.0",
"size": 43874
} | [
"org.apache.accumulo.core.client.AccumuloException",
"org.apache.accumulo.core.client.AccumuloSecurityException",
"org.apache.accumulo.core.client.TableNotFoundException"
] | import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.TableNotFoundException; | import org.apache.accumulo.core.client.*; | [
"org.apache.accumulo"
] | org.apache.accumulo; | 1,752,773 |
CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) {
checkState(keyEquivalence == null, "key equivalence was already set to %s", keyEquivalence);
keyEquivalence = checkNotNull(equivalence);
return this;
} | CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { checkState(keyEquivalence == null, STR, keyEquivalence); keyEquivalence = checkNotNull(equivalence); return this; } | /**
* Sets a custom {@code Equivalence} strategy for comparing keys.
*
* <p>By default, the cache uses {@link Equivalences#identity} to determine key equality when
* {@link #weakKeys} is specified, and {@link Equivalences#equals()} otherwise.
*/ | Sets a custom Equivalence strategy for comparing keys. By default, the cache uses <code>Equivalences#identity</code> to determine key equality when <code>#weakKeys</code> is specified, and <code>Equivalences#equals()</code> otherwise | keyEquivalence | {
"repo_name": "lshain-android-source/external-guava",
"path": "guava/src/com/google/common/cache/CacheBuilder.java",
"license": "apache-2.0",
"size": 35579
} | [
"com.google.common.base.Equivalence",
"com.google.common.base.Preconditions"
] | import com.google.common.base.Equivalence; import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,596,882 |
public DatabaseField buildField(String fieldName) {
XMLField xmlField = new XMLField(fieldName);
xmlField.setNamespaceResolver(this.getNamespaceResolver());
//xmlField.initialize();
return xmlField;
}
| DatabaseField function(String fieldName) { XMLField xmlField = new XMLField(fieldName); xmlField.setNamespaceResolver(this.getNamespaceResolver()); return xmlField; } | /**
* INTERNAL:
* A DatabaseField is built from the given field name.
*/ | A DatabaseField is built from the given field name | buildField | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/XMLDescriptor.java",
"license": "epl-1.0",
"size": 45778
} | [
"org.eclipse.persistence.internal.helper.DatabaseField"
] | import org.eclipse.persistence.internal.helper.DatabaseField; | import org.eclipse.persistence.internal.helper.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 172,697 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.