method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Map<Long, ProjectMetadata> getAllProjectMetadata() {
return _projectsMetadata;
} | Map<Long, ProjectMetadata> function() { return _projectsMetadata; } | /**
* Gets all the project Metadata currently held in memory
* @return
*/ | Gets all the project Metadata currently held in memory | getAllProjectMetadata | {
"repo_name": "DTL-FAIRData/FAIRifier",
"path": "main/src/com/google/refine/ProjectManager.java",
"license": "mit",
"size": 15656
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,230,191 |
public DatabaseMeta[] getUsedDatabaseConnections() {
return new DatabaseMeta[] {};
} | DatabaseMeta[] function() { return new DatabaseMeta[] {}; } | /**
* This method returns all the database connections that are used by the step.
*
* @return an array of database connections meta-data. Return an empty array if no connections are used.
*/ | This method returns all the database connections that are used by the step | getUsedDatabaseConnections | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/step/BaseStepMeta.java",
"license": "apache-2.0",
"size": 37553
} | [
"org.pentaho.di.core.database.DatabaseMeta"
] | import org.pentaho.di.core.database.DatabaseMeta; | import org.pentaho.di.core.database.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 837,799 |
Set<String> getRequiredHandlers(); | Set<String> getRequiredHandlers(); | /**
* Gets the set of handler names that must successfully authenticate credentials in order to access the service.
* An empty set indicates that there are no requirements on particular authentication handlers; any will suffice.
*
* @return Non -null set of required handler names.
*/ | Gets the set of handler names that must successfully authenticate credentials in order to access the service. An empty set indicates that there are no requirements on particular authentication handlers; any will suffice | getRequiredHandlers | {
"repo_name": "PetrGasparik/cas",
"path": "cas-server-core-api-services/src/main/java/org/jasig/cas/services/RegisteredService.java",
"license": "apache-2.0",
"size": 5441
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 641,471 |
public void abortCheckpointOnBarrier(long checkpointId, Throwable cause) throws IOException {
throw new UnsupportedOperationException(String.format("abortCheckpointOnBarrier not supported by %s", this.getClass().getName()));
} | void function(long checkpointId, Throwable cause) throws IOException { throw new UnsupportedOperationException(String.format(STR, this.getClass().getName())); } | /**
* Aborts a checkpoint as the result of receiving possibly some checkpoint barriers,
* but at least one {@link org.apache.flink.runtime.io.network.api.CancelCheckpointMarker}.
*
* <p>This requires implementing tasks to forward a
* {@link org.apache.flink.runtime.io.network.api.CancelCheckpointMarker} to th... | Aborts a checkpoint as the result of receiving possibly some checkpoint barriers, but at least one <code>org.apache.flink.runtime.io.network.api.CancelCheckpointMarker</code>. This requires implementing tasks to forward a <code>org.apache.flink.runtime.io.network.api.CancelCheckpointMarker</code> to their outputs | abortCheckpointOnBarrier | {
"repo_name": "bowenli86/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/tasks/AbstractInvokable.java",
"license": "apache-2.0",
"size": 12124
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,685,026 |
private String getMessage(User user, String body,
PhotoIdentification photoIdentification) {
String bodyFormatted = "";
ArrayList<String> list = new ArrayList<String>();
String url = "http://www.aves.brasil.nom.br/servlet/initIdentification?photoId="
+ photoI... | String function(User user, String body, PhotoIdentification photoIdentification) { String bodyFormatted = STRhttp: + photoIdentification.getPhoto().getId(); list.add(user.getName()); list.add(photoIdentification.getUser().getName()); list.add(url); try { bodyFormatted = MessageComposer.formatMessage(body, list); } catc... | /**
* Formats the message to be sent to the photo author about a new
* identification that has been done to his/her photo
*
* @param user
* The photo author
* @param body
* The body text template to be formatted
* @param photo
* The... | Formats the message to be sent to the photo author about a new identification that has been done to his/her photo | getMessage | {
"repo_name": "BackupTheBerlios/arara-svn",
"path": "core/tags/arara-1.1/src/main/java/net/indrix/arara/model/PhotoModel.java",
"license": "gpl-2.0",
"size": 27468
} | [
"net.indrix.arara.tools.email.MessageComposer",
"net.indrix.arara.tools.email.WrongNumberOfValuesException",
"net.indrix.arara.vo.PhotoIdentification",
"net.indrix.arara.vo.User"
] | import net.indrix.arara.tools.email.MessageComposer; import net.indrix.arara.tools.email.WrongNumberOfValuesException; import net.indrix.arara.vo.PhotoIdentification; import net.indrix.arara.vo.User; | import net.indrix.arara.tools.email.*; import net.indrix.arara.vo.*; | [
"net.indrix.arara"
] | net.indrix.arara; | 654,007 |
private void initDate() {
if (!has_date) {
has_date = true;
current_date = new Date();
if (MyDebug.LOG) Log.d(TAG, "picture taken on date: " + current_date);
}
} | void function() { if (!has_date) { has_date = true; current_date = new Date(); if (MyDebug.LOG) Log.d(TAG, STR + current_date); } } | /**
* Ensures we get the same date for both JPEG and RAW; and that we set the date ASAP so
* that it corresponds to actual photo time.
*/ | Ensures we get the same date for both JPEG and RAW; and that we set the date ASAP so that it corresponds to actual photo time | initDate | {
"repo_name": "phimpme/android-prototype",
"path": "app/src/main/java/org/fossasia/phimpme/opencamera/Preview/Preview.java",
"license": "apache-2.0",
"size": 178799
} | [
"android.util.Log",
"java.util.Date",
"org.fossasia.phimpme.opencamera.Camera"
] | import android.util.Log; import java.util.Date; import org.fossasia.phimpme.opencamera.Camera; | import android.util.*; import java.util.*; import org.fossasia.phimpme.opencamera.*; | [
"android.util",
"java.util",
"org.fossasia.phimpme"
] | android.util; java.util; org.fossasia.phimpme; | 1,648,238 |
private JSONWriter end(char m, char c) throws JSONException {
if (this.mode != m) {
throw new JSONException(m == 'a' ? "Misplaced endArray." : "Misplaced endObject.");
}
this.pop(m);
try {
this.writer.write(c);
} catch (IOException e) {
throw new JSONException(e);
}
this.... | JSONWriter function(char m, char c) throws JSONException { if (this.mode != m) { throw new JSONException(m == 'a' ? STR : STR); } this.pop(m); try { this.writer.write(c); } catch (IOException e) { throw new JSONException(e); } this.comma = true; return this; } | /**
* End something.
*
* @param m
* Mode
* @param c
* Closing character
* @return this
* @throws JSONException
* If unbalanced.
*/ | End something | end | {
"repo_name": "Activiti/Activiti",
"path": "activiti-core/activiti-engine/src/main/java/org/activiti/engine/impl/util/json/JSONWriter.java",
"license": "apache-2.0",
"size": 10248
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 232,666 |
public void workOn(final Controller controller, final DataObject dataObject, final Object content,
final QueryPane queryPane)
{
this.dataObject = dataObject;
this.queryPane = queryPane;
try
{
JPanel panel = (JPanel) new JPanel();
JPanel toolbar = (JPanel) new JPanel();
panel.setLayout(new Gr... | void function(final Controller controller, final DataObject dataObject, final Object content, final QueryPane queryPane) { this.dataObject = dataObject; this.queryPane = queryPane; try { JPanel panel = (JPanel) new JPanel(); JPanel toolbar = (JPanel) new JPanel(); panel.setLayout(new GridBagLayout()); toolbar.setLayout... | /**
* Will be called on a query pane to generate all needed swing components
*
* @param Controller
* The controller for the dataobject.
* @param DataObject
* The data object for the display.
* @param Object
* The content container. In swing it is a JPanel object.
* @pa... | Will be called on a query pane to generate all needed swing components | workOn | {
"repo_name": "iritgo/iritgo-aktario",
"path": "aktario-framework/src/main/java/de/iritgo/aktario/framework/dataobject/gui/DefaultQueryRenderer.java",
"license": "apache-2.0",
"size": 23096
} | [
"de.iritgo.aktario.framework.base.DataObject",
"de.iritgo.aktario.framework.client.Client",
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"java.util.Iterator",
"java.util.Properties",
"javax.swing.JComboBox",
"javax.swing.JPanel",
"javax.swing.JTextField"
] | import de.iritgo.aktario.framework.base.DataObject; import de.iritgo.aktario.framework.client.Client; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.util.Iterator; import java.util.Properties; import javax.swing.JComboBox; import javax.swing.JPanel; import javax.s... | import de.iritgo.aktario.framework.base.*; import de.iritgo.aktario.framework.client.*; import java.awt.*; import java.util.*; import javax.swing.*; | [
"de.iritgo.aktario",
"java.awt",
"java.util",
"javax.swing"
] | de.iritgo.aktario; java.awt; java.util; javax.swing; | 1,901,752 |
@Test
public void processPresenceDefaultValue() throws IOException, ParserException {
YangNode node = manager.getDataModel("src/test/resources/PresenceDefaultValue.yang");
assertThat((node instanceof YangModule), is(true));
// Check whether the node type is set properly to module.
... | void function() throws IOException, ParserException { YangNode node = manager.getDataModel(STR); assertThat((node instanceof YangModule), is(true)); assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); YangModule yangNode = (YangModule) node; assertThat(yangNode.getName(), is("Test")); YangContainer yangContai... | /**
* checks default value of presence statement.
*/ | checks default value of presence statement | processPresenceDefaultValue | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "utils/yangutils/src/test/java/org/onosproject/yangutils/parser/impl/listeners/PresenceListenerTest.java",
"license": "apache-2.0",
"size": 3724
} | [
"java.io.IOException",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.junit.Test",
"org.onosproject.yangutils.datamodel.YangContainer",
"org.onosproject.yangutils.datamodel.YangModule",
"org.onosproject.yangutils.datamodel.YangNode",
"org.onosproject.yangutils.datamodel.YangNodeType",
"... | import java.io.IOException; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.Test; import org.onosproject.yangutils.datamodel.YangContainer; import org.onosproject.yangutils.datamodel.YangModule; import org.onosproject.yangutils.datamodel.YangNode; import org.onosproject.yangutils.datam... | import java.io.*; import org.hamcrest.*; import org.junit.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.parser.exceptions.*; | [
"java.io",
"org.hamcrest",
"org.junit",
"org.onosproject.yangutils"
] | java.io; org.hamcrest; org.junit; org.onosproject.yangutils; | 853,939 |
private ConcurrentMap<GroupId, StoredGroupEntry> getGroupIdTable(DeviceId deviceId) {
return createIfAbsentUnchecked(groupEntriesById,
deviceId, lazyEmptyGroupIdTable());
} | ConcurrentMap<GroupId, StoredGroupEntry> function(DeviceId deviceId) { return createIfAbsentUnchecked(groupEntriesById, deviceId, lazyEmptyGroupIdTable()); } | /**
* Returns the group id table for specified device.
*
* @param deviceId identifier of the device
* @return Map representing group key table of given device.
*/ | Returns the group id table for specified device | getGroupIdTable | {
"repo_name": "kuangrewawa/onos",
"path": "core/store/trivial/src/main/java/org/onosproject/store/trivial/impl/SimpleGroupStore.java",
"license": "apache-2.0",
"size": 21672
} | [
"java.util.concurrent.ConcurrentMap",
"org.apache.commons.lang3.concurrent.ConcurrentUtils",
"org.onosproject.core.GroupId",
"org.onosproject.net.DeviceId",
"org.onosproject.net.group.StoredGroupEntry"
] | import java.util.concurrent.ConcurrentMap; import org.apache.commons.lang3.concurrent.ConcurrentUtils; import org.onosproject.core.GroupId; import org.onosproject.net.DeviceId; import org.onosproject.net.group.StoredGroupEntry; | import java.util.concurrent.*; import org.apache.commons.lang3.concurrent.*; import org.onosproject.core.*; import org.onosproject.net.*; import org.onosproject.net.group.*; | [
"java.util",
"org.apache.commons",
"org.onosproject.core",
"org.onosproject.net"
] | java.util; org.apache.commons; org.onosproject.core; org.onosproject.net; | 1,109,277 |
public CollectionOfExtensionProperty withAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
return this;
} | CollectionOfExtensionProperty function(Map<String, Object> additionalProperties) { this.additionalProperties = additionalProperties; return this; } | /**
* Set the additionalProperties property: Collection of extensionProperty.
*
* @param additionalProperties the additionalProperties value to set.
* @return the CollectionOfExtensionProperty object itself.
*/ | Set the additionalProperties property: Collection of extensionProperty | withAdditionalProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/CollectionOfExtensionProperty.java",
"license": "mit",
"size": 3531
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 245,236 |
public static <T>CompletableFuture<T> completedExceptionally(Throwable cause) {
CompletableFuture<T> result = new CompletableFuture<>();
result.completeExceptionally(cause);
return result;
} | static <T>CompletableFuture<T> function(Throwable cause) { CompletableFuture<T> result = new CompletableFuture<>(); result.completeExceptionally(cause); return result; } | /**
* Returns an exceptionally completed {@link CompletableFuture}.
*
* @param cause to complete the future with
* @param <T> type of the future
* @return An exceptionally completed CompletableFuture
*/ | Returns an exceptionally completed <code>CompletableFuture</code> | completedExceptionally | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java",
"license": "apache-2.0",
"size": 35693
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,521,091 |
protected List<Widget> createColumn(MdfModelElement me, Widget parentWidget) {
Class<?> c = COLUMN_BUILDERS.get(parentWidget.getTypeName());
WidgetBuilder wb = (WidgetBuilder) ClassUtils.newInstance(getClass().getClassLoader(), c.getName(), this, me);
return wb.buildWidgets();
}
| List<Widget> function(MdfModelElement me, Widget parentWidget) { Class<?> c = COLUMN_BUILDERS.get(parentWidget.getTypeName()); WidgetBuilder wb = (WidgetBuilder) ClassUtils.newInstance(getClass().getClassLoader(), c.getName(), this, me); return wb.buildWidgets(); } | /**
* Creates a Column containing a ColumnHeader and a ColumnBody.
*
* @param me
* The MdfModelElement
* @param parentWidget
* The parent Widget
* @return List containing the Column
*/ | Creates a Column containing a ColumnHeader and a ColumnBody | createColumn | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/ui/com.odcgroup.page.transformmodel.ui/src/main/java/com/odcgroup/page/transformmodel/ui/builder/AbstractWidgetBuilder.java",
"license": "epl-1.0",
"size": 22676
} | [
"com.odcgroup.mdf.metamodel.MdfModelElement",
"com.odcgroup.page.model.Widget",
"com.odcgroup.page.util.ClassUtils",
"java.util.List"
] | import com.odcgroup.mdf.metamodel.MdfModelElement; import com.odcgroup.page.model.Widget; import com.odcgroup.page.util.ClassUtils; import java.util.List; | import com.odcgroup.mdf.metamodel.*; import com.odcgroup.page.model.*; import com.odcgroup.page.util.*; import java.util.*; | [
"com.odcgroup.mdf",
"com.odcgroup.page",
"java.util"
] | com.odcgroup.mdf; com.odcgroup.page; java.util; | 715,390 |
public void sendCommand(NikobusCommand cmd) throws Exception {
if (cmd.getAck() != null) {
// send & wait for ACK
log.trace("Sending command with ack {}", cmd.getCommand());
NikobusAckMonitor monitor = new NikobusAckMonitor(cmd);
commandReceiver.register(mon... | void function(NikobusCommand cmd) throws Exception { if (cmd.getAck() != null) { log.trace(STR, cmd.getCommand()); NikobusAckMonitor monitor = new NikobusAckMonitor(cmd); commandReceiver.register(monitor); try { monitor.waitForAck(commandSender); } finally { commandReceiver.unregister(monitor); } } else { log.trace(STR... | /**
* Send a command via the serial port to the Nikobus.
*
* @param nikobusCommand
* command to send
* @throws Exception
* TimeoutException if waitForAck is true and no ack was
* received within the timeout limit.
*/ | Send a command via the serial port to the Nikobus | sendCommand | {
"repo_name": "openhab/openhab",
"path": "bundles/binding/org.openhab.binding.nikobus/src/main/java/org/openhab/binding/nikobus/internal/NikobusBinding.java",
"license": "epl-1.0",
"size": 13056
} | [
"org.openhab.binding.nikobus.internal.core.NikobusAckMonitor",
"org.openhab.binding.nikobus.internal.core.NikobusCommand"
] | import org.openhab.binding.nikobus.internal.core.NikobusAckMonitor; import org.openhab.binding.nikobus.internal.core.NikobusCommand; | import org.openhab.binding.nikobus.internal.core.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 490,599 |
private static String getHostName(Configuration config)
throws UnknownHostException {
String name = config.get(DFS_DATANODE_HOST_NAME_KEY);
if (name == null) {
name = DNS.getDefaultHost(
config.get(DFS_DATANODE_DNS_INTERFACE_KEY,
DFS_DATANODE_DNS_INTERFACE_DEFAULT),
... | static String function(Configuration config) throws UnknownHostException { String name = config.get(DFS_DATANODE_HOST_NAME_KEY); if (name == null) { name = DNS.getDefaultHost( config.get(DFS_DATANODE_DNS_INTERFACE_KEY, DFS_DATANODE_DNS_INTERFACE_DEFAULT), config.get(DFS_DATANODE_DNS_NAMESERVER_KEY, DFS_DATANODE_DNS_NAM... | /**
* Returns the hostname for this datanode. If the hostname is not
* explicitly configured in the given config, then it is determined
* via the DNS class.
*
* @param config configuration
* @return the hostname (NB: may not be a FQDN)
* @throws UnknownHostException if the dfs.datanode.dns.interfac... | Returns the hostname for this datanode. If the hostname is not explicitly configured in the given config, then it is determined via the DNS class | getHostName | {
"repo_name": "VicoWu/hadoop-2.7.3",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 119126
} | [
"java.net.UnknownHostException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.net.DNS"
] | import java.net.UnknownHostException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.net.DNS; | import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.net.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 202,042 |
public Contents fetchWith(final Parameters params, final Tracer tracer) {
// use a latch to await execution of all fragments:
final CountDownLatch latch = new CountDownLatch(1);
final Contents.Builder contents = contentsBuilder();
from(fragments)
.flatMap((fragment) ... | Contents function(final Parameters params, final Tracer tracer) { final CountDownLatch latch = new CountDownLatch(1); final Contents.Builder contents = contentsBuilder(); from(fragments) .flatMap((fragment) -> fragment.fetchWith(tracer, params)) .subscribe( contents::add, (t) -> LOG.error(t.getMessage(), t), latch::cou... | /**
* Concurrently fetches the fragments of the page and returns the {@link Content#isAvailable() available} {@link Contents}.
*
* @param params Parameters used to fetch the content
* @param tracer the Tracer used to process {@link TraceEvent trace events}.
* @return available Contents
*/ | Concurrently fetches the fragments of the page and returns the <code>Content#isAvailable() available</code> <code>Contents</code> | fetchWith | {
"repo_name": "gsteinacker/rx-composer",
"path": "composer-core/src/main/java/de/otto/rx/composer/page/Page.java",
"license": "apache-2.0",
"size": 5478
} | [
"com.google.common.collect.ImmutableList",
"de.otto.rx.composer.content.Contents",
"de.otto.rx.composer.content.Parameters",
"de.otto.rx.composer.content.Statistics",
"de.otto.rx.composer.tracer.Tracer",
"java.util.concurrent.CountDownLatch"
] | import com.google.common.collect.ImmutableList; import de.otto.rx.composer.content.Contents; import de.otto.rx.composer.content.Parameters; import de.otto.rx.composer.content.Statistics; import de.otto.rx.composer.tracer.Tracer; import java.util.concurrent.CountDownLatch; | import com.google.common.collect.*; import de.otto.rx.composer.content.*; import de.otto.rx.composer.tracer.*; import java.util.concurrent.*; | [
"com.google.common",
"de.otto.rx",
"java.util"
] | com.google.common; de.otto.rx; java.util; | 979,575 |
private int[] executeBatchInternal(final List<Object>[] batchValues) {
if (logger.isDebugEnabled()) {
logger.debug("Executing statement " + getInsertString() + " with batch of size: " + batchValues.length);
} | int[] function(final List<Object>[] batchValues) { if (logger.isDebugEnabled()) { logger.debug(STR + getInsertString() + STR + batchValues.length); } | /**
* Delegate method to execute the batch insert.
*/ | Delegate method to execute the batch insert | executeBatchInternal | {
"repo_name": "kingtang/spring-learn",
"path": "spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java",
"license": "gpl-3.0",
"size": 22130
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,361,257 |
public boolean forceReparsing(Parser parser) {
for (int i=0; i<getParserCount(); i++) {
if (getParser(i)==parser) {
forceReparsing(i);
return true;
}
}
return false;
} | boolean function(Parser parser) { for (int i=0; i<getParserCount(); i++) { if (getParser(i)==parser) { forceReparsing(i); return true; } } return false; } | /**
* Forces re-parsing with a specific parser. Note that if this parser is
* not installed on this text area, nothing will happen.
*
* @param parser The parser that should re-parse this text area's contents.
* This should be installed on this text area.
* @return Whether the parser was installed on... | Forces re-parsing with a specific parser. Note that if this parser is not installed on this text area, nothing will happen | forceReparsing | {
"repo_name": "buffis/ESPlorer",
"path": "ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java",
"license": "gpl-2.0",
"size": 92142
} | [
"org.fife.ui.rsyntaxtextarea.parser.Parser"
] | import org.fife.ui.rsyntaxtextarea.parser.Parser; | import org.fife.ui.rsyntaxtextarea.parser.*; | [
"org.fife.ui"
] | org.fife.ui; | 269,533 |
public ClipboardSelection getObject() throws RemoteException; | ClipboardSelection function() throws RemoteException; | /**
* Method declaration
* @return
* @throws RemoteException
* @see
*/ | Method declaration | getObject | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "ejb-core/clipboard/src/main/java/com/stratelia/webactiv/clipboard/control/ejb/Clipboard.java",
"license": "agpl-3.0",
"size": 4087
} | [
"com.silverpeas.util.clipboard.ClipboardSelection",
"java.rmi.RemoteException"
] | import com.silverpeas.util.clipboard.ClipboardSelection; import java.rmi.RemoteException; | import com.silverpeas.util.clipboard.*; import java.rmi.*; | [
"com.silverpeas.util",
"java.rmi"
] | com.silverpeas.util; java.rmi; | 549,546 |
private Put preparePut(String columnFamily, Object rowKey, Map<String, Attribute> columns, Map<String, Object> values)
throws IOException
{
Put p = new Put(HBaseUtils.getBytes(rowKey));
for (String columnName : columns.keySet())
{
Attribute column = columns.get(co... | Put function(String columnFamily, Object rowKey, Map<String, Attribute> columns, Map<String, Object> values) throws IOException { Put p = new Put(HBaseUtils.getBytes(rowKey)); for (String columnName : columns.keySet()) { Attribute column = columns.get(columnName); if (!column.isCollection() && !((SingularAttribute) col... | /**
* Prepare put.
*
* @param columnFamily
* the column family
* @param rowKey
* the row key
* @param columns
* the columns
* @param values TODO
* @param columnFamilyObj
* the column family obj
* @return the put
... | Prepare put | preparePut | {
"repo_name": "impetus-opensource/Kundera",
"path": "src/kundera-hbase/kundera-hbase/src/main/java/com/impetus/client/hbase/service/HBaseWriter.java",
"license": "apache-2.0",
"size": 12038
} | [
"com.impetus.client.hbase.utils.HBaseUtils",
"com.impetus.kundera.property.PropertyAccessException",
"java.io.IOException",
"java.util.Map",
"javax.persistence.metamodel.Attribute",
"javax.persistence.metamodel.SingularAttribute",
"org.apache.hadoop.hbase.client.Put",
"org.apache.hadoop.hbase.util.Byt... | import com.impetus.client.hbase.utils.HBaseUtils; import com.impetus.kundera.property.PropertyAccessException; import java.io.IOException; import java.util.Map; import javax.persistence.metamodel.Attribute; import javax.persistence.metamodel.SingularAttribute; import org.apache.hadoop.hbase.client.Put; import org.apach... | import com.impetus.client.hbase.utils.*; import com.impetus.kundera.property.*; import java.io.*; import java.util.*; import javax.persistence.metamodel.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"com.impetus.client",
"com.impetus.kundera",
"java.io",
"java.util",
"javax.persistence",
"org.apache.hadoop"
] | com.impetus.client; com.impetus.kundera; java.io; java.util; javax.persistence; org.apache.hadoop; | 120,181 |
public void saveRule(Rule rule, RuleChange change) {
rule.setLastModified(new Date());
Session session1 = getHibernateTemplate().getSessionFactory().openSession();
Transaction tx = session1.beginTransaction();
session1.saveOrUpdate(rule);
session1.save(change);
tx.c... | void function(Rule rule, RuleChange change) { rule.setLastModified(new Date()); Session session1 = getHibernateTemplate().getSessionFactory().openSession(); Transaction tx = session1.beginTransaction(); session1.saveOrUpdate(rule); session1.save(change); tx.commit(); session1.close(); } | /**
* Save a rule and a change log entry in one go. (Uses a transaction).
* @param rule
* @param change
*/ | Save a rule and a change log entry in one go. (Uses a transaction) | saveRule | {
"repo_name": "iipc/openwayback-access-control",
"path": "oracle/src/main/java/org/archive/accesscontrol/model/HibernateRuleDao.java",
"license": "apache-2.0",
"size": 5412
} | [
"java.util.Date",
"org.hibernate.Session",
"org.hibernate.Transaction"
] | import java.util.Date; import org.hibernate.Session; import org.hibernate.Transaction; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 2,914,365 |
public boolean performFinish() {
final String containerName = page.getContainerName();
final String fileName = page.getFileName();
this.newName = fileName;
int seperatorIdx = newName.indexOf('.');
if (seperatorIdx != -1) {
newName = newName.substring(0, seperatorIdx);
}
final IFile file;
try {
... | boolean function() { final String containerName = page.getContainerName(); final String fileName = page.getFileName(); this.newName = fileName; int seperatorIdx = newName.indexOf('.'); if (seperatorIdx != -1) { newName = newName.substring(0, seperatorIdx); } final IFile file; try { file = getFile(fileName, containerNam... | /**
* This method is called when 'Finish' button is pressed in the wizard. We will
* create an operation and run it using the wizard as execution context.
*/ | This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using the wizard as execution context | performFinish | {
"repo_name": "HyVar/DarwinSPL",
"path": "plugins/eu.hyvar.mspl.manifest.resource.hymanifest.ui/src-gen/eu/hyvar/mspl/manifest/resource/hymanifest/ui/HymanifestNewFileWizard.java",
"license": "apache-2.0",
"size": 6546
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.swt.widgets.MessageBox"
] | import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.widgets.MessageBox; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.core",
"org.eclipse.swt"
] | org.eclipse.core; org.eclipse.swt; | 581,813 |
public BitmapDrawable pixelizeImage(float pixelizationFactor, Bitmap bitmap) {
if (mIsBuiltinPixelizationChecked) {
return builtInPixelization(pixelizationFactor, bitmap);
} else {
return customImagePixelization(pixelizationFactor, bitmap);
}
}
private c... | BitmapDrawable function(float pixelizationFactor, Bitmap bitmap) { if (mIsBuiltinPixelizationChecked) { return builtInPixelization(pixelizationFactor, bitmap); } else { return customImagePixelization(pixelizationFactor, bitmap); } } private class PixelizeImageAsyncTask extends AsyncTask<Object, Void, BitmapDrawable> { | /**
* Selects either the custom pixelization algorithm that sets and gets bitmap
* pixels manually or the one that uses built-in bitmap operations.
*/ | Selects either the custom pixelization algorithm that sets and gets bitmap pixels manually or the one that uses built-in bitmap operations | pixelizeImage | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/development/samples/devbytes/graphics/ImagePixelization/src/com/example/android/imagepixelization/ImagePixelization.java",
"license": "apache-2.0",
"size": 12338
} | [
"android.graphics.Bitmap",
"android.graphics.drawable.BitmapDrawable",
"android.os.AsyncTask"
] | import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.os.AsyncTask; | import android.graphics.*; import android.graphics.drawable.*; import android.os.*; | [
"android.graphics",
"android.os"
] | android.graphics; android.os; | 1,740,116 |
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
if (createChildMenuManager != null) {
depopulateManager(createChildMenuManager, createChildActions);
}
if (createSiblingMenuManager != null) {
depopulateManager(createSiblingMenuManager, createS... | void function(SelectionChangedEvent event) { depopulateManager(createChildMenuManager, createChildActions); } if (createSiblingMenuManager != null) { depopulateManager(createSiblingMenuManager, createSiblingActions); } Collection<?> newSiblingDescriptors = null; ISelection selection = event.getSelection(); if (selectio... | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
* handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
* that can be added to the selected object and updating the menus accordingly.
* <!-- begin-user-doc -->
* <!-- end-u... | This implements <code>org.eclipse.jface.viewers.ISelectionChangedListener</code>, handling <code>org.eclipse.jface.viewers.SelectionChangedEvent</code>s by querying for the children and siblings that can be added to the selected object and updating the menus accordingly. | selectionChanged | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.editor/src/org/w3/_1999/xlink/presentation/XlinkActionBarContributor.java",
"license": "apache-2.0",
"size": 14063
} | [
"java.util.Collection",
"org.eclipse.emf.edit.domain.EditingDomain",
"org.eclipse.emf.edit.domain.IEditingDomainProvider",
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.IStructuredSelection",
"org.eclipse.jface.viewers.SelectionChangedEvent"
] | import java.util.Collection; import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; | import java.util.*; import org.eclipse.emf.edit.domain.*; import org.eclipse.jface.viewers.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.jface"
] | java.util; org.eclipse.emf; org.eclipse.jface; | 1,994,928 |
EClass getWidget(); | EClass getWidget(); | /**
* Returns the meta object for class '{@link lasser.sketch.Widget <em>Widget</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Widget</em>'.
* @see lasser.sketch.Widget
* @generated
*/ | Returns the meta object for class '<code>lasser.sketch.Widget Widget</code>'. | getWidget | {
"repo_name": "osanchezUM/guizmo",
"path": "src/lasser/sketch/SketchPackage.java",
"license": "apache-2.0",
"size": 90672
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,765,107 |
void write(ByteCodeWriter out)
throws IOException
{
out.write(ConstantPool.CP_INTERFACE_METHOD_REF);
out.writeShort(_classIndex);
out.writeShort(_nameAndTypeIndex);
} | void write(ByteCodeWriter out) throws IOException { out.write(ConstantPool.CP_INTERFACE_METHOD_REF); out.writeShort(_classIndex); out.writeShort(_nameAndTypeIndex); } | /**
* Writes the contents of the pool entry.
*/ | Writes the contents of the pool entry | write | {
"repo_name": "CleverCloud/Quercus",
"path": "resin/src/main/java/com/caucho/bytecode/InterfaceMethodRefConstant.java",
"license": "gpl-2.0",
"size": 2777
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,624,740 |
private int amountToScrollToNewFocus(int direction, View newFocus, int positionOfNewFocus) {
int amountToScroll = 0;
newFocus.getDrawingRect(mTempRect);
offsetDescendantRectToMyCoords(newFocus, mTempRect);
if (direction == View.FOCUS_UP) {
if (mTempRect.top < mListPadding... | int function(int direction, View newFocus, int positionOfNewFocus) { int amountToScroll = 0; newFocus.getDrawingRect(mTempRect); offsetDescendantRectToMyCoords(newFocus, mTempRect); if (direction == View.FOCUS_UP) { if (mTempRect.top < mListPadding.top) { amountToScroll = mListPadding.top - mTempRect.top; if (positionO... | /**
* Determine how much we need to scroll in order to get newFocus in view.
* @param direction either {@link android.view.View#FOCUS_UP} or
* {@link android.view.View#FOCUS_DOWN}.
* @param newFocus The view that would take focus.
* @param positionOfNewFocus The position of the list item... | Determine how much we need to scroll in order to get newFocus in view | amountToScrollToNewFocus | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/widget/ListView.java",
"license": "gpl-3.0",
"size": 155378
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 476,110 |
FoodData getFoodData(); | FoodData getFoodData(); | /**
* Gets a copy of the current {@link FoodData} for this {@link Human}.
*
* @return A copy of the current food data
*/ | Gets a copy of the current <code>FoodData</code> for this <code>Human</code> | getFoodData | {
"repo_name": "jonk1993/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/entity/living/Human.java",
"license": "mit",
"size": 2892
} | [
"org.spongepowered.api.data.manipulator.mutable.entity.FoodData"
] | import org.spongepowered.api.data.manipulator.mutable.entity.FoodData; | import org.spongepowered.api.data.manipulator.mutable.entity.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 80,857 |
public RuleBlock<?> prepareRuleFontFace(List<Declaration> decl); | RuleBlock<?> function(List<Declaration> decl); | /**
* Creates RuleFontFace, block of rules associated with specific font
* @param decl List of declarations
* @return RuleFontFace
*/ | Creates RuleFontFace, block of rules associated with specific font | prepareRuleFontFace | {
"repo_name": "mantlik/swingbox-javahelp-viewer",
"path": "src/main/java/cz/vutbr/web/csskit/antlr/Preparator.java",
"license": "lgpl-3.0",
"size": 3221
} | [
"cz.vutbr.web.css.Declaration",
"cz.vutbr.web.css.RuleBlock",
"java.util.List"
] | import cz.vutbr.web.css.Declaration; import cz.vutbr.web.css.RuleBlock; import java.util.List; | import cz.vutbr.web.css.*; import java.util.*; | [
"cz.vutbr.web",
"java.util"
] | cz.vutbr.web; java.util; | 2,317,438 |
public JobExecution launchJob( String job ); | JobExecution function( String job ); | /**
* Launch a batch job, and block until complete. If job has a
* JobParametersIncrementer, then parameters from previous job run
* will be passed.
*
* Will propogate first exception if ExitStatus==FAILED
* @param jobService
* @param job The job name
* @return JobExecution
*/ | Launch a batch job, and block until complete. If job has a JobParametersIncrementer, then parameters from previous job run will be passed. Will propogate first exception if ExitStatus==FAILED | launchJob | {
"repo_name": "coder36/sbent",
"path": "sbent/src/main/java/coder36/sbent/testing/JobLaunchingService.java",
"license": "apache-2.0",
"size": 1802
} | [
"org.springframework.batch.core.JobExecution"
] | import org.springframework.batch.core.JobExecution; | import org.springframework.batch.core.*; | [
"org.springframework.batch"
] | org.springframework.batch; | 834,415 |
return OpenWireQueue.DATA_STRUCTURE_TYPE;
} | return OpenWireQueue.DATA_STRUCTURE_TYPE; } | /**
* Return the type of Data Structure we marshal
*
* @return short representation of the type data structure
*/ | Return the type of Data Structure we marshal | getDataStructureType | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v7/OpenWireQueueMarshaller.java",
"license": "apache-2.0",
"size": 3546
} | [
"org.apache.activemq.openwire.commands.OpenWireQueue"
] | import org.apache.activemq.openwire.commands.OpenWireQueue; | import org.apache.activemq.openwire.commands.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,069,076 |
private String[] getWeatherDataFromJson(String forecastJsonStr, int numDays)
throws JSONException {
// These are the names of the JSON objects that need to be extracted.
final String OWM_LIST = "list";
final String OWM_WEATHER = "weather";
final S... | String[] function(String forecastJsonStr, int numDays) throws JSONException { final String OWM_LIST = "list"; final String OWM_WEATHER = STR; final String OWM_TEMPERATURE = "temp"; final String OWM_MAX = "max"; final String OWM_MIN = "min"; final String OWM_DESCRIPTION = "main"; JSONObject forecastJson = new JSONObject... | /**
* Take the String representing the complete forecast in JSON Format and
* pull out the data we need to construct the Strings needed for the wireframes.
*
* Fortunately parsing is easy: constructor takes the JSON string and converts it
* into an Object hierarchy for us.
... | Take the String representing the complete forecast in JSON Format and pull out the data we need to construct the Strings needed for the wireframes. Fortunately parsing is easy: constructor takes the JSON string and converts it into an Object hierarchy for us | getWeatherDataFromJson | {
"repo_name": "emil-io/sunshine",
"path": "app/src/main/java/com/sunshine/redwood/sunshine/ForecastFragment.java",
"license": "mit",
"size": 12277
} | [
"android.text.format.Time",
"android.util.Log",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import android.text.format.Time; import android.util.Log; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import android.text.format.*; import android.util.*; import org.json.*; | [
"android.text",
"android.util",
"org.json"
] | android.text; android.util; org.json; | 2,518,395 |
public static boolean isUserAgentIE(ExternalContext.Request request) {
final String userAgent = getUserAgentLowerCase(request);
return userAgent != null && userAgent.contains("msie") && ! userAgent.contains("opera");
} | static boolean function(ExternalContext.Request request) { final String userAgent = getUserAgentLowerCase(request); return userAgent != null && userAgent.contains("msie") && ! userAgent.contains("opera"); } | /**
* Test whether the user agent is IE.
*/ | Test whether the user agent is IE | isUserAgentIE | {
"repo_name": "wesley1001/orbeon-forms",
"path": "src/main/java/org/orbeon/oxf/util/UserAgent.java",
"license": "lgpl-2.1",
"size": 2147
} | [
"org.orbeon.oxf.pipeline.api.ExternalContext"
] | import org.orbeon.oxf.pipeline.api.ExternalContext; | import org.orbeon.oxf.pipeline.api.*; | [
"org.orbeon.oxf"
] | org.orbeon.oxf; | 2,482,061 |
@Test
public void testUpdateDeviceFailsForMissingContentType(final TestContext context) {
registry.registerDevice(TENANT, deviceId, new JsonObject())
.compose(ok -> {
// now try to update the device with missing content type
final JsonObject requestBody = new... | void function(final TestContext context) { registry.registerDevice(TENANT, deviceId, new JsonObject()) .compose(ok -> { final JsonObject requestBody = new JsonObject().put(RegistrationConstants.FIELD_PAYLOAD_DEVICE_ID, deviceId).put(STR, STR); return registry.updateDevice(TENANT, deviceId, requestBody, null, HttpURLCon... | /**
* Verifies that an update request fails if it contains no content type.
*
* @param context The vert.x test context.
*/ | Verifies that an update request fails if it contains no content type | testUpdateDeviceFailsForMissingContentType | {
"repo_name": "dejanb/hono",
"path": "tests/src/test/java/org/eclipse/hono/tests/registry/DeviceRegistrationHttpIT.java",
"license": "epl-1.0",
"size": 11405
} | [
"io.vertx.core.json.JsonObject",
"io.vertx.ext.unit.TestContext",
"java.net.HttpURLConnection",
"org.eclipse.hono.util.RegistrationConstants"
] | import io.vertx.core.json.JsonObject; import io.vertx.ext.unit.TestContext; import java.net.HttpURLConnection; import org.eclipse.hono.util.RegistrationConstants; | import io.vertx.core.json.*; import io.vertx.ext.unit.*; import java.net.*; import org.eclipse.hono.util.*; | [
"io.vertx.core",
"io.vertx.ext",
"java.net",
"org.eclipse.hono"
] | io.vertx.core; io.vertx.ext; java.net; org.eclipse.hono; | 735,503 |
@Test
@SmallTest
@Feature({"Preferences"})
public void testNoCookieSettingsManaged() throws Exception {
checkDefaultCookiesSettingManaged(false);
checkThirdPartyCookieBlockingManaged(false);
// The ContentSetting and ThirdPartyCookieBlocking are unmanaged. This means all buttons
... | @Feature({STR}) void function() throws Exception { checkDefaultCookiesSettingManaged(false); checkThirdPartyCookieBlockingManaged(false); SettingsActivity settingsActivity = SiteSettingsTestUtils.startSiteSettingsCategory(SiteSettingsCategory.Type.COOKIES); checkFourStateCookieToggleButtonEnabled(settingsActivity, Cook... | /**
* Ensure no radio buttons are enforced when cookie settings are unmanaged.
*/ | Ensure no radio buttons are enforced when cookie settings are unmanaged | testNoCookieSettingsManaged | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/SiteSettingsTest.java",
"license": "bsd-3-clause",
"size": 67829
} | [
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.browser.settings.SettingsActivity",
"org.chromium.components.browser_ui.site_settings.FourStateCookieSettingsPreference",
"org.chromium.components.browser_ui.site_settings.SiteSettingsCategory"
] | import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.settings.SettingsActivity; import org.chromium.components.browser_ui.site_settings.FourStateCookieSettingsPreference; import org.chromium.components.browser_ui.site_settings.SiteSettingsCategory; | import org.chromium.base.test.util.*; import org.chromium.chrome.browser.settings.*; import org.chromium.components.browser_ui.site_settings.*; | [
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.components"
] | org.chromium.base; org.chromium.chrome; org.chromium.components; | 888,984 |
public static boolean addCertificate(String username, byte[] certificateBytes)
throws AuthenticationFailedException {
Map<String, String> claims = new HashMap<>();
UserRealm userRealm = getUserRealm(username);
try {
if (userRealm != null) {
X509Certifi... | static boolean function(String username, byte[] certificateBytes) throws AuthenticationFailedException { Map<String, String> claims = new HashMap<>(); UserRealm userRealm = getUserRealm(username); try { if (userRealm != null) { X509Certificate x509Certificate = X509Certificate.getInstance(certificateBytes); claims.put(... | /**
* Add certificate into claims.
*
* @param username name of the user
* @param certificateBytes x509 certificate
* @return boolean status of the action
* @throws AuthenticationFailedException authentication failed exception
*/ | Add certificate into claims | addCertificate | {
"repo_name": "vives/identity-outbound-auth-x509",
"path": "component/authenticator/src/main/java/org/wso2/carbon/identity/authenticator/x509Certificate/X509CertificateUtil.java",
"license": "apache-2.0",
"size": 9561
} | [
"java.util.HashMap",
"java.util.Map",
"javax.security.cert.CertificateException",
"javax.security.cert.X509Certificate",
"org.apache.axiom.om.util.Base64",
"org.wso2.carbon.context.CarbonContext",
"org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException",
... | import java.util.HashMap; import java.util.Map; import javax.security.cert.CertificateException; import javax.security.cert.X509Certificate; import org.apache.axiom.om.util.Base64; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.identity.application.authentication.framework.exception.Authentication... | import java.util.*; import javax.security.cert.*; import org.apache.axiom.om.util.*; import org.wso2.carbon.context.*; import org.wso2.carbon.identity.application.authentication.framework.exception.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.*; import org.wso2.carbon.utils.multitenancy.*; | [
"java.util",
"javax.security",
"org.apache.axiom",
"org.wso2.carbon"
] | java.util; javax.security; org.apache.axiom; org.wso2.carbon; | 1,682,953 |
@Nonnull
Filter toHBaseFilter(); | Filter toHBaseFilter(); | /**
* Translate the filter to a HBase specific {@link Filter} which can be applied
* to a {@link org.apache.hadoop.hbase.client.Scan} instance.
*
* @return the translated filter instance
*/ | Translate the filter to a HBase specific <code>Filter</code> which can be applied to a <code>org.apache.hadoop.hbase.client.Scan</code> instance | toHBaseFilter | {
"repo_name": "smee/gradoop",
"path": "gradoop-store/gradoop-hbase/src/main/java/org/gradoop/storage/impl/hbase/filter/api/HBaseElementFilter.java",
"license": "apache-2.0",
"size": 2091
} | [
"org.apache.hadoop.hbase.filter.Filter"
] | import org.apache.hadoop.hbase.filter.Filter; | import org.apache.hadoop.hbase.filter.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 26,486 |
@Test
public void testLocalCircuitId() throws Exception {
p2PHelloPdu.setLocalCircuitId((byte) 1);
resultByte = p2PHelloPdu.localCircuitId();
assertThat(resultByte, is((byte) 1));
} | void function() throws Exception { p2PHelloPdu.setLocalCircuitId((byte) 1); resultByte = p2PHelloPdu.localCircuitId(); assertThat(resultByte, is((byte) 1)); } | /**
* Tests localCircuitId() getter method.
*/ | Tests localCircuitId() getter method | testLocalCircuitId | {
"repo_name": "kuujo/onos",
"path": "protocols/isis/isisio/src/test/java/org/onosproject/isis/io/isispacket/pdu/P2PHelloPduTest.java",
"license": "apache-2.0",
"size": 9779
} | [
"org.hamcrest.CoreMatchers",
"org.hamcrest.MatcherAssert"
] | import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 2,809,239 |
@SuppressWarnings("unchecked")
public static <T> Optional<T> getResultForMatcher(
ChromeTraceEventMatcher<T> matcher, Map<ChromeTraceEventMatcher<?>, Object> results) {
T result = (T) results.get(matcher);
return Optional.ofNullable(result);
} | @SuppressWarnings(STR) static <T> Optional<T> function( ChromeTraceEventMatcher<T> matcher, Map<ChromeTraceEventMatcher<?>, Object> results) { T result = (T) results.get(matcher); return Optional.ofNullable(result); } | /**
* Designed for use with the result of {@link ChromeTraceParser#parse(Path, Set)}. Helper function
* to avoid some distasteful casting logic.
*/ | Designed for use with the result of <code>ChromeTraceParser#parse(Path, Set)</code>. Helper function to avoid some distasteful casting logic | getResultForMatcher | {
"repo_name": "marcinkwiatkowski/buck",
"path": "src/com/facebook/buck/util/trace/ChromeTraceParser.java",
"license": "apache-2.0",
"size": 5944
} | [
"java.util.Map",
"java.util.Optional"
] | import java.util.Map; import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,357,621 |
private SchedulerContext createContext(Instance instance) {
SchedulerContext context = new SchedulerContext();
instance.setId("emf:instanceId");
instance.setProperties(new HashMap<String, Serializable>());
InstanceReference reference = InstanceReferenceMock.createGeneric(instance);
context.put(DeleteInstan... | SchedulerContext function(Instance instance) { SchedulerContext context = new SchedulerContext(); instance.setId(STR); instance.setProperties(new HashMap<String, Serializable>()); InstanceReference reference = InstanceReferenceMock.createGeneric(instance); context.put(DeleteInstanceSchedulerExecutor.INSTANCE_REFERENCE,... | /**
* Creates the context.
*
* @param instance
* the instance
* @return the scheduler context
*/ | Creates the context | createContext | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/instance-core/src/test/java/com/sirma/itt/seip/instance/archive/DeleteInstanceSchedulerExecutorTest.java",
"license": "lgpl-3.0",
"size": 7148
} | [
"com.sirma.itt.seip.domain.instance.Instance",
"com.sirma.itt.seip.domain.instance.InstanceReference",
"com.sirma.itt.seip.domain.security.ActionTypeConstants",
"com.sirma.itt.seip.tasks.SchedulerContext",
"com.sirma.itt.seip.testutil.mocks.InstanceReferenceMock",
"java.io.Serializable",
"java.util.Hash... | import com.sirma.itt.seip.domain.instance.Instance; import com.sirma.itt.seip.domain.instance.InstanceReference; import com.sirma.itt.seip.domain.security.ActionTypeConstants; import com.sirma.itt.seip.tasks.SchedulerContext; import com.sirma.itt.seip.testutil.mocks.InstanceReferenceMock; import java.io.Serializable; i... | import com.sirma.itt.seip.domain.instance.*; import com.sirma.itt.seip.domain.security.*; import com.sirma.itt.seip.tasks.*; import com.sirma.itt.seip.testutil.mocks.*; import java.io.*; import java.util.*; | [
"com.sirma.itt",
"java.io",
"java.util"
] | com.sirma.itt; java.io; java.util; | 1,400,198 |
private void createTable() {
Composite tablePartComposite = new Composite(composite, SWT.FILL);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.heightHint = 240;
tablePartComposite.setLayoutData(gridData);
TableColumnLayout tableColumnLay... | void function() { Composite tablePartComposite = new Composite(composite, SWT.FILL); GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); gridData.heightHint = 240; tablePartComposite.setLayoutData(gridData); TableColumnLayout tableColumnLayout = new TableColumnLayout(); tablePartComposite.setLayout(tableC... | /**
* createTable
* void
*/ | createTable void | createTable | {
"repo_name": "SK-HOLDINGS-CC/NEXCORE-UML-Modeler",
"path": "nexcore.tool.uml.ui.project/src/java/nexcore/tool/uml/ui/project/wizards/ApplyProfileWizardPage.java",
"license": "epl-1.0",
"size": 13726
} | [
"org.eclipse.jface.layout.TableColumnLayout",
"org.eclipse.jface.viewers.ArrayContentProvider",
"org.eclipse.jface.viewers.ColumnWeightData",
"org.eclipse.jface.viewers.TableViewer",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.TableColumn"
] | import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Tabl... | import org.eclipse.jface.layout.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 2,582,167 |
void onTouchUp(float x, float y);
}
private static final int DEFAULT_DRAWING_PEN_WIDTH = 2;
private static final int DEFAULT_ERASING_PEN_WIDTH = 4;
private static final int DEFAULT_DRAWING_PEN_COLOR = Color.WHITE;
public WeakReference<TouchEventListener> mTouchEventLi... | void onTouchUp(float x, float y); } private static final int DEFAULT_DRAWING_PEN_WIDTH = 2; private static final int DEFAULT_ERASING_PEN_WIDTH = 4; private static final int DEFAULT_DRAWING_PEN_COLOR = Color.WHITE; public WeakReference<TouchEventListener> mTouchEventListener = new WeakReference<FingerDrawingView.TouchEv... | /**
* Called when a touch up event is dispatched to a view.
*
* @param x
* the event X position.
* @param y
* the event Y position.
*/ | Called when a touch up event is dispatched to a view | onTouchUp | {
"repo_name": "elbaquero/fingerdrawingview",
"path": "FingerDrawingViewLib/src/fr/elbaquero/fingerdrawingview/FingerDrawingView.java",
"license": "apache-2.0",
"size": 16348
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Color",
"android.graphics.Paint",
"android.graphics.Path",
"android.graphics.RectF",
"android.graphics.drawable.BitmapDrawable",
"android.util.AttributeSet",
"android.view.View",
"android.widget.Fr... | import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.graphics.drawable.BitmapDrawable; import android.util.AttributeSet; import android.vie... | import android.content.*; import android.graphics.*; import android.graphics.drawable.*; import android.util.*; import android.view.*; import android.widget.*; import java.lang.ref.*; | [
"android.content",
"android.graphics",
"android.util",
"android.view",
"android.widget",
"java.lang"
] | android.content; android.graphics; android.util; android.view; android.widget; java.lang; | 2,638,963 |
protected void initialize(Configuration conf) throws IOException {
InetSocketAddress socAddr = getRpcServerAddress(conf);
UserGroupInformation.setConfiguration(conf);
SecurityUtil.login(conf, DFSConfigKeys.DFS_NAMENODE_KEYTAB_FILE_KEY,
DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, socAddr.getHostName(... | void function(Configuration conf) throws IOException { InetSocketAddress socAddr = getRpcServerAddress(conf); UserGroupInformation.setConfiguration(conf); SecurityUtil.login(conf, DFSConfigKeys.DFS_NAMENODE_KEYTAB_FILE_KEY, DFSConfigKeys.DFS_NAMENODE_USER_NAME_KEY, socAddr.getHostName()); int handlerCount = conf.getInt... | /**
* Initialize name-node.
*
* @param conf the configuration
*/ | Initialize name-node | initialize | {
"repo_name": "cloudera/hadoop-hdfs",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 56509
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.CommonConfigurationKeys",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.apache.hadoop.hdfs.HDFSPolicyProvider",
"org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols",
"org.apache.hado... | import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.HDFSPolicyProvider; import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols;... | import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 2,222,026 |
public void fireProgressEvent(int pct, String note) {
ProgressEvent pe = new ProgressEvent(this, pct, pct, note);
for (int i = 0; i < listeners.size(); i++) {
listeners.get(i).updateProgress(pe);
}
}
/**
* Adds a {@link ProgressListener}.
* @param l thef{@link ProgressListener} | void function(int pct, String note) { ProgressEvent pe = new ProgressEvent(this, pct, pct, note); for (int i = 0; i < listeners.size(); i++) { listeners.get(i).updateProgress(pe); } } /** * Adds a {@link ProgressListener}. * @param l thef{@link ProgressListener} | /**
* Fires a {@link ProgressEvent}.
* @param pct percent done
* @param note progress note
*/ | Fires a <code>ProgressEvent</code> | fireProgressEvent | {
"repo_name": "Apelon-VA/va-isaac-gui",
"path": "import-export/src/main/java/gov/va/isaac/ie/exporter/OWLExporter.java",
"license": "apache-2.0",
"size": 22149
} | [
"gov.va.isaac.util.ProgressEvent",
"gov.va.isaac.util.ProgressListener"
] | import gov.va.isaac.util.ProgressEvent; import gov.va.isaac.util.ProgressListener; | import gov.va.isaac.util.*; | [
"gov.va.isaac"
] | gov.va.isaac; | 713,616 |
public void removeFrdParameterRule6(FrdParameterRule6 frdParameterRule6); | void function(FrdParameterRule6 frdParameterRule6); | /**
* removeFrdParameterRule6 - removes a FrdParameterRule6
*
* @param frdParameterRule6
*/ | removeFrdParameterRule6 - removes a FrdParameterRule6 | removeFrdParameterRule6 | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdParameterRule6SessionEJBRemote.java",
"license": "apache-2.0",
"size": 2718
} | [
"com.gdn.venice.persistence.FrdParameterRule6"
] | import com.gdn.venice.persistence.FrdParameterRule6; | import com.gdn.venice.persistence.*; | [
"com.gdn.venice"
] | com.gdn.venice; | 389,113 |
public OutputStream getOutputStream() {
return outputStream;
} | OutputStream function() { return outputStream; } | /**
* Returns the {@link OutputStream} for output for the command.
*
* @see CommandScope#setOutput(OutputStream)
*/ | Returns the <code>OutputStream</code> for output for the command | getOutputStream | {
"repo_name": "liquibase/liquibase",
"path": "liquibase-core/src/main/java/liquibase/command/CommandResultsBuilder.java",
"license": "apache-2.0",
"size": 2231
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,777,060 |
private static Vector permuteList(
Vector arr,
SecureRandom rand)
{
Vector retval = new Vector();
Vector tmp = new Vector();
for (int i = 0; i < arr.size(); i++)
{
tmp.addElement(arr.elementAt(i));
}
retval.addElement(tmp.elementAt(0... | static Vector function( Vector arr, SecureRandom rand) { Vector retval = new Vector(); Vector tmp = new Vector(); for (int i = 0; i < arr.size(); i++) { tmp.addElement(arr.elementAt(i)); } retval.addElement(tmp.elementAt(0)); tmp.removeElementAt(0); while (tmp.size() != 0) { retval.insertElementAt(tmp.elementAt(0), get... | /**
* Generates a permuted ArrayList from the original one. The original List
* is not modified
*
* @param arr
* the ArrayList to be permuted
* @param rand
* the source of Randomness for permutation
* @return a new ArrayList with the permuted elements.
... | Generates a permuted ArrayList from the original one. The original List is not modified | permuteList | {
"repo_name": "bullda/DroidText",
"path": "src/bouncycastle/repack/org/bouncycastle/crypto/generators/NaccacheSternKeyPairGenerator.java",
"license": "lgpl-3.0",
"size": 11488
} | [
"java.security.SecureRandom",
"java.util.Vector"
] | import java.security.SecureRandom; import java.util.Vector; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,956,202 |
final Collection<SkyKey> getNextDirtyDirectDeps() throws InterruptedException {
Preconditions.checkState(dirtyState == DirtyState.CHECK_DEPENDENCIES, this);
Preconditions.checkState(dirtyDirectDepIndex < getNumOfGroupsInLastBuildDirectDeps(), this);
return getLastBuildDirectDeps().get(dirtyDirectDepIndex+... | final Collection<SkyKey> getNextDirtyDirectDeps() throws InterruptedException { Preconditions.checkState(dirtyState == DirtyState.CHECK_DEPENDENCIES, this); Preconditions.checkState(dirtyDirectDepIndex < getNumOfGroupsInLastBuildDirectDeps(), this); return getLastBuildDirectDeps().get(dirtyDirectDepIndex++); } | /**
* Gets the next children to be re-evaluated to see if this dirty node needs to be re-evaluated.
*
* <p>See {@link NodeEntry#getNextDirtyDirectDeps}.
*/ | Gets the next children to be re-evaluated to see if this dirty node needs to be re-evaluated. See <code>NodeEntry#getNextDirtyDirectDeps</code> | getNextDirtyDirectDeps | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/skyframe/DirtyBuildingState.java",
"license": "apache-2.0",
"size": 9812
} | [
"com.google.devtools.build.lib.util.Preconditions",
"com.google.devtools.build.skyframe.NodeEntry",
"java.util.Collection"
] | import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.skyframe.NodeEntry; import java.util.Collection; | import com.google.devtools.build.lib.util.*; import com.google.devtools.build.skyframe.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 1,484,693 |
public User getUser() {
return user;
} | User function() { return user; } | /**
* Returns user account information.
*
* @return user account information
*/ | Returns user account information | getUser | {
"repo_name": "farxinu/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/Ode.java",
"license": "apache-2.0",
"size": 89453
} | [
"com.google.appinventor.shared.rpc.user.User"
] | import com.google.appinventor.shared.rpc.user.User; | import com.google.appinventor.shared.rpc.user.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,585,419 |
public AbstractTripleStore getTripleStore() {
return ((BigdataSailConnection) getSailConnection()).database;
} | AbstractTripleStore function() { return ((BigdataSailConnection) getSailConnection()).database; } | /**
* Return the backing {@link AbstractTripleStore} object. Caution MUST be
* used when accessing this object as the access goes around the SAIL API.
*/ | Return the backing <code>AbstractTripleStore</code> object. Caution MUST be used when accessing this object as the access goes around the SAIL API | getTripleStore | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata-sails/src/java/com/bigdata/rdf/sail/BigdataSailRepositoryConnection.java",
"license": "gpl-2.0",
"size": 11961
} | [
"com.bigdata.rdf.sail.BigdataSail",
"com.bigdata.rdf.store.AbstractTripleStore"
] | import com.bigdata.rdf.sail.BigdataSail; import com.bigdata.rdf.store.AbstractTripleStore; | import com.bigdata.rdf.sail.*; import com.bigdata.rdf.store.*; | [
"com.bigdata.rdf"
] | com.bigdata.rdf; | 2,521,054 |
public CableModemHistoryPersistence getCableModemHistoryPersistence() {
return cableModemHistoryPersistence;
} | CableModemHistoryPersistence function() { return cableModemHistoryPersistence; } | /**
* Returns the cable modem history persistence.
*
* @return the cable modem history persistence
*/ | Returns the cable modem history persistence | getCableModemHistoryPersistence | {
"repo_name": "nms-htc/cmts-mo-portlet",
"path": "docroot/WEB-INF/src/com/cmcti/cmts/domain/service/base/OptionServiceBaseImpl.java",
"license": "apache-2.0",
"size": 27716
} | [
"com.cmcti.cmts.domain.service.persistence.CableModemHistoryPersistence"
] | import com.cmcti.cmts.domain.service.persistence.CableModemHistoryPersistence; | import com.cmcti.cmts.domain.service.persistence.*; | [
"com.cmcti.cmts"
] | com.cmcti.cmts; | 704,562 |
void setAll(Map<K, V> values); | void setAll(Map<K, V> values); | /**
* Set the given values under.
* @param values the values.
*/ | Set the given values under | setAll | {
"repo_name": "Arabidopsis-Information-Portal/intermine",
"path": "bio/sources/araport/araport-chado-db/main/src/org/intermine/bio/dataloader/util/MultiValueMap.java",
"license": "lgpl-2.1",
"size": 1006
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,477,152 |
public void registerPrototype(String name, Class clazz, MutablePropertyValues pvs) throws BeansException {
getDefaultListableBeanFactory().registerBeanDefinition(name, new RootBeanDefinition(clazz, pvs, false));
} | void function(String name, Class clazz, MutablePropertyValues pvs) throws BeansException { getDefaultListableBeanFactory().registerBeanDefinition(name, new RootBeanDefinition(clazz, pvs, false)); } | /**
* Register a prototype bean with the underlying bean factory.
* <p>For more advanced needs, register with the underlying BeanFactory directly.
* @see #getDefaultListableBeanFactory
*/ | Register a prototype bean with the underlying bean factory. For more advanced needs, register with the underlying BeanFactory directly | registerPrototype | {
"repo_name": "mattxia/spring-2.5-analysis",
"path": "src/org/springframework/context/support/StaticApplicationContext.java",
"license": "apache-2.0",
"size": 4412
} | [
"org.springframework.beans.BeansException",
"org.springframework.beans.MutablePropertyValues",
"org.springframework.beans.factory.support.RootBeanDefinition"
] | import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.RootBeanDefinition; | import org.springframework.beans.*; import org.springframework.beans.factory.support.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 1,082,377 |
protected void codecVeryLargeTest(final CompressionCodec codec, final double sigma)
throws Exception {
RandomDistribution.DiscreteRNG rng =
new RandomDistribution.Zipf(new Random(), 0, Byte.MAX_VALUE, sigma);
final byte[][] input = new byte[1][VERY_LARGE_SIZE];
fill(rng, input);
codecTes... | void function(final CompressionCodec codec, final double sigma) throws Exception { RandomDistribution.DiscreteRNG rng = new RandomDistribution.Zipf(new Random(), 0, Byte.MAX_VALUE, sigma); final byte[][] input = new byte[1][VERY_LARGE_SIZE]; fill(rng, input); codecTest(codec, input); } | /**
* Test with a very large input (100MB) as a single input buffer.
*/ | Test with a very large input (100MB) as a single input buffer | codecVeryLargeTest | {
"repo_name": "mahak/hbase",
"path": "hbase-common/src/test/java/org/apache/hadoop/hbase/io/compress/CompressionTestBase.java",
"license": "apache-2.0",
"size": 6673
} | [
"java.util.Random",
"org.apache.hadoop.hbase.util.RandomDistribution",
"org.apache.hadoop.io.compress.CompressionCodec"
] | import java.util.Random; import org.apache.hadoop.hbase.util.RandomDistribution; import org.apache.hadoop.io.compress.CompressionCodec; | import java.util.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.io.compress.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,948,937 |
int updateByPrimaryKeyWithBLOBs(DBVolumeBackups record); | int updateByPrimaryKeyWithBLOBs(DBVolumeBackups record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table volume_backups
*
* @mbggenerated Tue May 26 15:53:09 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table volume_backups | updateByPrimaryKeyWithBLOBs | {
"repo_name": "wolabs/womano",
"path": "main/java/com/culabs/unicomportal/dao/DBVolumeBackupsMapper.java",
"license": "apache-2.0",
"size": 1871
} | [
"com.culabs.unicomportal.model.db.DBVolumeBackups"
] | import com.culabs.unicomportal.model.db.DBVolumeBackups; | import com.culabs.unicomportal.model.db.*; | [
"com.culabs.unicomportal"
] | com.culabs.unicomportal; | 334,771 |
FileResponse processFile(AuthenticationToken token, FileRequest request); | FileResponse processFile(AuthenticationToken token, FileRequest request); | /**
* <p>Processes a File.</p>
*
* @param token User Authentication Token
* @param request File Request Object
* @return File Response, including error information
*/ | Processes a File | processFile | {
"repo_name": "IWSDevelopers/iws",
"path": "iws-api/src/main/java/net/iaeste/iws/api/Storage.java",
"license": "apache-2.0",
"size": 3268
} | [
"net.iaeste.iws.api.dtos.AuthenticationToken",
"net.iaeste.iws.api.requests.FileRequest",
"net.iaeste.iws.api.responses.FileResponse"
] | import net.iaeste.iws.api.dtos.AuthenticationToken; import net.iaeste.iws.api.requests.FileRequest; import net.iaeste.iws.api.responses.FileResponse; | import net.iaeste.iws.api.dtos.*; import net.iaeste.iws.api.requests.*; import net.iaeste.iws.api.responses.*; | [
"net.iaeste.iws"
] | net.iaeste.iws; | 2,364,899 |
@Test
public void testBug36421_part3() {
Query q = null;
try {
q = qs.newQuery("SELECT DISTINCT * FROM $1 z where z.status = 'active'");
QueryObserverImpl observer = new QueryObserverImpl();
QueryObserverHolder.setInstance(observer);
q.execute(new Object[] {CacheUtils.getRegion("/po... | void function() { Query q = null; try { q = qs.newQuery(STR); QueryObserverImpl observer = new QueryObserverImpl(); QueryObserverHolder.setInstance(observer); q.execute(new Object[] {CacheUtils.getRegion("/pos")}); if (!observer.isIndexesUsed) { fail(STR); } assertTrue(observer.indexesUsed.get(0).equals(STR)); region =... | /**
* Test to check if a parametrized query when using different bind arguments of Region uses the
* index correctly
*/ | Test to check if a parametrized query when using different bind arguments of Region uses the index correctly | testBug36421_part3 | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/test/java/org/apache/geode/cache/query/internal/index/IndexUseJUnitTest.java",
"license": "apache-2.0",
"size": 63947
} | [
"org.apache.geode.cache.query.CacheUtils",
"org.apache.geode.cache.query.IndexType",
"org.apache.geode.cache.query.Query",
"org.apache.geode.cache.query.data.Portfolio",
"org.apache.geode.cache.query.internal.QueryObserverHolder",
"org.junit.Assert"
] | import org.apache.geode.cache.query.CacheUtils; import org.apache.geode.cache.query.IndexType; import org.apache.geode.cache.query.Query; import org.apache.geode.cache.query.data.Portfolio; import org.apache.geode.cache.query.internal.QueryObserverHolder; import org.junit.Assert; | import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.data.*; import org.apache.geode.cache.query.internal.*; import org.junit.*; | [
"org.apache.geode",
"org.junit"
] | org.apache.geode; org.junit; | 2,330,678 |
public ErasureCodeType getErasureCode() {
return this.codeType;
} | ErasureCodeType function() { return this.codeType; } | /**
* Get the destination path of this policy.
*/ | Get the destination path of this policy | getErasureCode | {
"repo_name": "jchen123/hadoop-20-warehouse-fix",
"path": "src/contrib/raid/src/java/org/apache/hadoop/raid/protocol/PolicyInfo.java",
"license": "apache-2.0",
"size": 8167
} | [
"org.apache.hadoop.raid.ErasureCodeType"
] | import org.apache.hadoop.raid.ErasureCodeType; | import org.apache.hadoop.raid.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,216,574 |
public static ceylon.language.meta.declaration.NestableDeclaration getOrCreateMetamodel(java.lang.Class<?> klass){
synchronized(getLock()){
ceylon.language.meta.declaration.NestableDeclaration result = classToDeclaration.get(klass);
if (result == null) {
// FIXME: is ... | static ceylon.language.meta.declaration.NestableDeclaration function(java.lang.Class<?> klass){ synchronized(getLock()){ ceylon.language.meta.declaration.NestableDeclaration result = classToDeclaration.get(klass); if (result == null) { String typeName = klass.getName(); com.redhat.ceylon.model.typechecker.model.Module ... | /**
* This is also used by generated code in the JVM compiler, for type declaration literals.
* In theory this can only be used for ClassOrInterface or TypeAlias.
*/ | This is also used by generated code in the JVM compiler, for type declaration literals. In theory this can only be used for ClassOrInterface or TypeAlias | getOrCreateMetamodel | {
"repo_name": "gijsleussink/ceylon",
"path": "language/runtime/com/redhat/ceylon/compiler/java/runtime/metamodel/Metamodel.java",
"license": "apache-2.0",
"size": 116272
} | [
"com.redhat.ceylon.model.loader.ModelLoader",
"com.redhat.ceylon.model.typechecker.model.TypeDeclaration"
] | import com.redhat.ceylon.model.loader.ModelLoader; import com.redhat.ceylon.model.typechecker.model.TypeDeclaration; | import com.redhat.ceylon.model.loader.*; import com.redhat.ceylon.model.typechecker.model.*; | [
"com.redhat.ceylon"
] | com.redhat.ceylon; | 781,580 |
ColumnType columnType = SchemaUtils.type(DataType.DECIMAL, 10, 4, false);
assertTrue("ColumnType type incorrect", columnType.getType().equals(DataType.DECIMAL));
assertTrue("ColumnType width incorrect", columnType.getWidth() == 10);
assertTrue("ColumnType scale incorrect", columnType.getScale() == 4);
... | ColumnType columnType = SchemaUtils.type(DataType.DECIMAL, 10, 4, false); assertTrue(STR, columnType.getType().equals(DataType.DECIMAL)); assertTrue(STR, columnType.getWidth() == 10); assertTrue(STR, columnType.getScale() == 4); assertFalse(STR, columnType.isNullable()); } | /**
* Tests that the type method creates a {@link ColumnType} with the requested properties.
*/ | Tests that the type method creates a <code>ColumnType</code> with the requested properties | testCreatingAColumnTypeNotNullable | {
"repo_name": "badgerwithagun/morf",
"path": "morf-core/src/test/java/org/alfasoftware/morf/metadata/TestSchemaUtils.java",
"license": "apache-2.0",
"size": 3968
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 602,475 |
public static Boolean getRequestParameterAsBoolean(ServletRequest request, String parameterName) {
Boolean parameterValue = null;
String parameterValueStr = request.getParameter(parameterName);
if (StringUtils.isNotBlank(parameterValueStr)) {
parameterValue = (Boolean) new Boole... | static Boolean function(ServletRequest request, String parameterName) { Boolean parameterValue = null; String parameterValueStr = request.getParameter(parameterName); if (StringUtils.isNotBlank(parameterValueStr)) { parameterValue = (Boolean) new BooleanFormatter().convertFromPresentationFormat(parameterValueStr); } re... | /**
* Retrieves value for the given parameter name in the request and attempts to convert to a Boolean using
* the <code>BooleanFormatter</code>
*
* @param request - servlet request containing parameters
* @param parameterName - name of parameter to retrieve value for
* @return Boolean set... | Retrieves value for the given parameter name in the request and attempts to convert to a Boolean using the <code>BooleanFormatter</code> | getRequestParameterAsBoolean | {
"repo_name": "ricepanda/rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/util/KRADUtils.java",
"license": "apache-2.0",
"size": 69178
} | [
"javax.servlet.ServletRequest",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.web.format.BooleanFormatter"
] | import javax.servlet.ServletRequest; import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.web.format.BooleanFormatter; | import javax.servlet.*; import org.apache.commons.lang.*; import org.kuali.rice.core.web.format.*; | [
"javax.servlet",
"org.apache.commons",
"org.kuali.rice"
] | javax.servlet; org.apache.commons; org.kuali.rice; | 1,761,594 |
protected void registerExtendMenuItem() {
for (int i = 0; i < itemStrings.length; i++) {
inputMenu.registerExtendMenuItem(itemStrings[i], itemdrawables[i], itemIds[i], extendMenuItemClickListener);
}
//单聊下才有语音通话和视频通话的功能
if (chatType == EaseConstant.CHATTYPE_SINGLE){
... | void function() { for (int i = 0; i < itemStrings.length; i++) { inputMenu.registerExtendMenuItem(itemStrings[i], itemdrawables[i], itemIds[i], extendMenuItemClickListener); } if (chatType == EaseConstant.CHATTYPE_SINGLE){ inputMenu.registerExtendMenuItem(R.string.attach_voice_call,R.drawable.attach_voice_call_new, ITE... | /**
* register extend menu, item id need > 3 if you override this method and keep exist item
*/ | register extend menu, item id need > 3 if you override this method and keep exist item | registerExtendMenuItem | {
"repo_name": "Zhangsongsong/GraduationPro",
"path": "毕业设计/code/android/YYFramework/src/com/hyphenate/easeui/ui/EaseChatFragment.java",
"license": "apache-2.0",
"size": 74701
} | [
"com.hyphenate.easeui.EaseConstant"
] | import com.hyphenate.easeui.EaseConstant; | import com.hyphenate.easeui.*; | [
"com.hyphenate.easeui"
] | com.hyphenate.easeui; | 833,723 |
public static String fileToString(String fileName, String endOfLineString, boolean xmlEncode) throws IOException {
FileReader reader = new FileReader(fileName);
try {
return readerToString(reader, endOfLineString, xmlEncode);
}
finally {
reader.close();
}
}
| static String function(String fileName, String endOfLineString, boolean xmlEncode) throws IOException { FileReader reader = new FileReader(fileName); try { return readerToString(reader, endOfLineString, xmlEncode); } finally { reader.close(); } } | /**
* Please consider using resourceToString() instead of relying on files.
*/ | Please consider using resourceToString() instead of relying on files | fileToString | {
"repo_name": "smhoekstra/iaf",
"path": "JavaSource/nl/nn/adapterframework/util/Misc.java",
"license": "apache-2.0",
"size": 20782
} | [
"java.io.FileReader",
"java.io.IOException"
] | import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,956,531 |
public boolean isOptOut() {
synchronized(optOutLock) {
try {
// Reload the metrics file
configuration.load(CONFIG_FILE);
} catch (IOException ex) {
Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
... | boolean function() { synchronized(optOutLock) { try { configuration.load(CONFIG_FILE); } catch (IOException ex) { Bukkit.getLogger().log(Level.INFO, STR + ex.getMessage()); return true; } catch (InvalidConfigurationException ex) { Bukkit.getLogger().log(Level.INFO, STR + ex.getMessage()); return true; } return configur... | /**
* Has the server owner denied plugin metrics?
*
* @return
*/ | Has the server owner denied plugin metrics | isOptOut | {
"repo_name": "syamn/PistonJump",
"path": "src/main/java/syam/PistonJump/Util/Metrics.java",
"license": "gpl-3.0",
"size": 20402
} | [
"java.io.IOException",
"java.util.logging.Level",
"org.bukkit.Bukkit",
"org.bukkit.configuration.InvalidConfigurationException"
] | import java.io.IOException; import java.util.logging.Level; import org.bukkit.Bukkit; import org.bukkit.configuration.InvalidConfigurationException; | import java.io.*; import java.util.logging.*; import org.bukkit.*; import org.bukkit.configuration.*; | [
"java.io",
"java.util",
"org.bukkit",
"org.bukkit.configuration"
] | java.io; java.util; org.bukkit; org.bukkit.configuration; | 1,145,842 |
private void cidsBeanChanged(final double value) {
if (LOG.isDebugEnabled()) {
LOG.debug("cidsbean changed: " + value, new CurrentStackTrace());
}
try {
lockBeanChange(true);
setChangedSinceDrop(true);
setValueToSpinner(value);
s... | void function(final double value) { if (LOG.isDebugEnabled()) { LOG.debug(STR + value, new CurrentStackTrace()); } try { lockBeanChange(true); setChangedSinceDrop(true); setValueToSpinner(value); setValueToLabel(value); setValueToFeature(value); if (isInited() && isEditable()) { updateGeometry(); } } finally { lockBean... | /**
* DOCUMENT ME!
*
* @param value DOCUMENT ME!
*/ | DOCUMENT ME | cidsBeanChanged | {
"repo_name": "cismet/cids-custom-wrrl-db-mv",
"path": "src/main/java/de/cismet/cids/custom/objecteditors/wrrl_db_mv/StationEditor.java",
"license": "lgpl-3.0",
"size": 50885
} | [
"de.cismet.tools.CurrentStackTrace"
] | import de.cismet.tools.CurrentStackTrace; | import de.cismet.tools.*; | [
"de.cismet.tools"
] | de.cismet.tools; | 2,575,268 |
void clearData(User user); | void clearData(User user); | /**
* Clears all data for a specific user. After calling this method the {@code user}s account is reset to zero and all consumptions are removed.
* @param user
*/ | Clears all data for a specific user. After calling this method the users account is reset to zero and all consumptions are removed | clearData | {
"repo_name": "atomfrede/freezing-octo-bear",
"path": "mate.service/src/main/java/de/atomfrede/mate/service/admin/AdminService.java",
"license": "apache-2.0",
"size": 529
} | [
"de.atomfrede.mate.domain.entities.user.User"
] | import de.atomfrede.mate.domain.entities.user.User; | import de.atomfrede.mate.domain.entities.user.*; | [
"de.atomfrede.mate"
] | de.atomfrede.mate; | 1,395,704 |
private Time getProperFutureTime(Time originalTime) {
// check whether the time is past already.
// If yes, add three days to the current time
Time time = originalTime;
if (TimeService.newTime().after(time))
{
time = TimeService.newTime(TimeService.newTime().getTime() + 3*24*60*60*1000);
}
retur... | Time function(Time originalTime) { Time time = originalTime; if (TimeService.newTime().after(time)) { time = TimeService.newTime(TimeService.newTime().getTime() + 3*24*60*60*1000); } return time; } | /**
* Checks whether the time is already past.
* If yes, return the time of three days from current time;
* Otherwise, return the original time
* @param originalTime
* @return
*/ | Checks whether the time is already past. If yes, return the time of three days from current time; Otherwise, return the original time | getProperFutureTime | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 631432
} | [
"org.sakaiproject.time.api.Time",
"org.sakaiproject.time.cover.TimeService"
] | import org.sakaiproject.time.api.Time; import org.sakaiproject.time.cover.TimeService; | import org.sakaiproject.time.api.*; import org.sakaiproject.time.cover.*; | [
"org.sakaiproject.time"
] | org.sakaiproject.time; | 683,172 |
public boolean skipString(String s) throws IOException {
if (DEBUG_BUFFER) {
System.out.print("(skipString, \""+s+"\": ");
XMLEntityManager.print(fCurrentEntity);
System.out.println();
}
// load more characters, if needed
if (fCurrentEntity.positi... | boolean function(String s) throws IOException { if (DEBUG_BUFFER) { System.out.print(STR"+s+"\STR); XMLEntityManager.print(fCurrentEntity); System.out.println(); } if (fCurrentEntity.position == fCurrentEntity.count) { load(0, true); } final int length = s.length(); for (int i = 0; i < length; i++) { char c = fCurrentE... | /**
* Skips the specified string appearing immediately on the input.
* <p>
* <strong>Note:</strong> The characters are consumed only if they are
* space characters.
*
* @param s The string to skip.
*
* @return Returns true if the string was skipped.
*
* @throws IOExcept... | Skips the specified string appearing immediately on the input. Note: The characters are consumed only if they are space characters | skipString | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xerces-2_9_1/src/org/apache/xerces/impl/XMLEntityScanner.java",
"license": "gpl-3.0",
"size": 71056
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,059,519 |
public void createSpan(com.google.devtools.cloudtrace.v2.Span request,
io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v2.Span> responseObserver) {
asyncUnimplementedUnaryCall(getCreateSpanMethodHelper(), responseObserver);
} | void function(com.google.devtools.cloudtrace.v2.Span request, io.grpc.stub.StreamObserver<com.google.devtools.cloudtrace.v2.Span> responseObserver) { asyncUnimplementedUnaryCall(getCreateSpanMethodHelper(), responseObserver); } | /**
* <pre>
* Creates a new span.
* </pre>
*/ | <code> Creates a new span. </code> | createSpan | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-trace-v2/src/main/java/com/google/devtools/cloudtrace/v2/TraceServiceGrpc.java",
"license": "bsd-3-clause",
"size": 17732
} | [
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,439,853 |
private BlockReaderPeer nextDomainPeer() {
if (remainingCacheTries > 0) {
Peer peer = clientContext.getPeerCache().get(datanode, true);
if (peer != null) {
LOG.trace("nextDomainPeer: reusing existing peer {}", peer);
return new BlockReaderPeer(peer, true);
}
}
DomainSocke... | BlockReaderPeer function() { if (remainingCacheTries > 0) { Peer peer = clientContext.getPeerCache().get(datanode, true); if (peer != null) { LOG.trace(STR, peer); return new BlockReaderPeer(peer, true); } } DomainSocket sock = clientContext.getDomainSocketFactory(). createSocket(pathInfo, conf.getSocketTimeout()); if ... | /**
* Get the next DomainPeer-- either from the cache or by creating it.
*
* @return the next DomainPeer, or null if we could not construct one.
*/ | Get the next DomainPeer-- either from the cache or by creating it | nextDomainPeer | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java",
"license": "apache-2.0",
"size": 32853
} | [
"org.apache.hadoop.hdfs.net.DomainPeer",
"org.apache.hadoop.hdfs.net.Peer",
"org.apache.hadoop.net.unix.DomainSocket"
] | import org.apache.hadoop.hdfs.net.DomainPeer; import org.apache.hadoop.hdfs.net.Peer; import org.apache.hadoop.net.unix.DomainSocket; | import org.apache.hadoop.hdfs.net.*; import org.apache.hadoop.net.unix.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,807,138 |
public InputStream[] buildInputs(FileSystem srcFs, Path srcFile,
FileStatus srcStat, FileSystem parityFs, Path parityFile,
FileStatus parityStat, int stripeIdx, long offsetInBlock,
List<Integer> erasedLocations, List<Integer> locationsToRead,
ErasureCode code) throws IOException {
InputStr... | InputStream[] function(FileSystem srcFs, Path srcFile, FileStatus srcStat, FileSystem parityFs, Path parityFile, FileStatus parityStat, int stripeIdx, long offsetInBlock, List<Integer> erasedLocations, List<Integer> locationsToRead, ErasureCode code) throws IOException { InputStream[] inputs = new InputStream[codec.str... | /**
* Builds (codec.stripeLength + codec.parityLength) inputs given some erased
* locations.
* Outputs:
* - the array of input streams @param inputs
* - the list of erased locations @param erasedLocations.
* - the list of locations that are not read @param locationsToNotRead.
*/ | Builds (codec.stripeLength + codec.parityLength) inputs given some erased locations. Outputs: - the array of input streams @param inputs - the list of erased locations @param erasedLocations. - the list of locations that are not read @param locationsToNotRead | buildInputs | {
"repo_name": "srijeyanthan/hops",
"path": "hops-erasure-coding/src/main/java/io/hops/erasure_coding/StripeReader.java",
"license": "apache-2.0",
"size": 6827
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.List",
"org.apache.hadoop.fs.ChecksumException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.BlockMissingException"
] | import java.io.IOException; import java.io.InputStream; import java.util.List; import org.apache.hadoop.fs.ChecksumException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.BlockMissingException; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 821,421 |
public Map<String, NXguide> getAllGuide(); | Map<String, NXguide> function(); | /**
* Get all NXguide nodes:
* <ul>
* <li></li>
* </ul>
*
* @return a map from node names to the NXguide for that node.
*/ | Get all NXguide nodes: | getAllGuide | {
"repo_name": "willrogers/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXinstrument.java",
"license": "epl-1.0",
"size": 15199
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,698,464 |
public static boolean isVisible(GridCacheContext cctx, MvccSnapshot snapshot, long mvccCrd, long mvccCntr,
int opCntr) throws IgniteCheckedException {
return isVisible(cctx, snapshot, mvccCrd, mvccCntr, opCntr, true);
} | static boolean function(GridCacheContext cctx, MvccSnapshot snapshot, long mvccCrd, long mvccCntr, int opCntr) throws IgniteCheckedException { return isVisible(cctx, snapshot, mvccCrd, mvccCntr, opCntr, true); } | /**
* Checks if version is visible from the given snapshot.
*
* @param cctx Cache context.
* @param snapshot Snapshot.
* @param mvccCrd Mvcc coordinator.
* @param mvccCntr Mvcc counter.
* @param opCntr Operation counter.
* @return {@code True} if visible.
* @throws IgniteChe... | Checks if version is visible from the given snapshot | isVisible | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccUtils.java",
"license": "apache-2.0",
"size": 36938
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.GridCacheContext"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContext; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 235,716 |
public UserCustomCursor queryForChunk(String[] columns,
GeometryEnvelope envelope, String orderBy, int limit) {
return queryForChunk(false, columns, envelope, orderBy, limit);
} | UserCustomCursor function(String[] columns, GeometryEnvelope envelope, String orderBy, int limit) { return queryForChunk(false, columns, envelope, orderBy, limit); } | /**
* Query for rows within the geometry envelope, starting at the offset and
* returning no more than the limit
*
* @param columns columns
* @param envelope geometry envelope
* @param orderBy order by
* @param limit chunk limit
* @return cursor
* @since 6.2.0
*/ | Query for rows within the geometry envelope, starting at the offset and returning no more than the limit | queryForChunk | {
"repo_name": "ngageoint/geopackage-android",
"path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java",
"license": "mit",
"size": 276322
} | [
"mil.nga.geopackage.user.custom.UserCustomCursor",
"mil.nga.sf.GeometryEnvelope"
] | import mil.nga.geopackage.user.custom.UserCustomCursor; import mil.nga.sf.GeometryEnvelope; | import mil.nga.geopackage.user.custom.*; import mil.nga.sf.*; | [
"mil.nga.geopackage",
"mil.nga.sf"
] | mil.nga.geopackage; mil.nga.sf; | 347,350 |
public void getEntityType(
com.google.cloud.dialogflow.v2.GetEntityTypeRequest request,
io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.EntityType> responseObserver) {
asyncUnimplementedUnaryCall(getGetEntityTypeMethodHelper(), responseObserver);
} | void function( com.google.cloud.dialogflow.v2.GetEntityTypeRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.EntityType> responseObserver) { asyncUnimplementedUnaryCall(getGetEntityTypeMethodHelper(), responseObserver); } | /**
*
*
* <pre>
* Retrieves the specified entity type.
* </pre>
*/ | <code> Retrieves the specified entity type. </code> | getEntityType | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesGrpc.java",
"license": "apache-2.0",
"size": 71064
} | [
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,158,355 |
public synchronized void checkPoint(Controlled cont, boolean forInput) {
if (stoppingRequested == true) { throw new StoppingRequestedError(); }
switch (status) {
case (RUNNING):
break;
case (PAUSEREQ):
status = PAUSED;
if... | synchronized void function(Controlled cont, boolean forInput) { if (stoppingRequested == true) { throw new StoppingRequestedError(); } switch (status) { case (RUNNING): break; case (PAUSEREQ): status = PAUSED; if (cont != null) { cont.suspend(); } if (!forInput) { for (Iterator i = pauseListeners.iterator(); i.hasNext(... | /**
* Pauses the execution, if pause() method has been called since
* previous checkpoint.
* @param cont the controlled thread. Null is also accepted
* @param forInput if the pausing is for input when the pause listeners are not notified.
*/ | Pauses the execution, if pause() method has been called since previous checkpoint | checkPoint | {
"repo_name": "moegyver/mJeliot",
"path": "Jeliot/src/jeliot/theater/ThreadController.java",
"license": "mit",
"size": 5497
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,454,546 |
final void ensureNonEmpty(final String name, final CharSequence text) {
if (text == null) {
throw new NullArgumentException(errors().getString(Errors.Keys.NullArgument_1, name));
}
if (text.length() == 0) {
throw new IllegalArgumentException(errors().getString(Errors.... | final void ensureNonEmpty(final String name, final CharSequence text) { if (text == null) { throw new NullArgumentException(errors().getString(Errors.Keys.NullArgument_1, name)); } if (text.length() == 0) { throw new IllegalArgumentException(errors().getString(Errors.Keys.EmptyArgument_1, name)); } } | /**
* Same as {@link org.apache.sis.util.ArgumentChecks#ensureNonEmpty(String, CharSequence)},
* but uses the current locale in case of error.
*
* @param name the name of the argument to be checked. Used only if an exception is thrown.
* @param text the user argument to check against null v... | Same as <code>org.apache.sis.util.ArgumentChecks#ensureNonEmpty(String, CharSequence)</code>, but uses the current locale in case of error | ensureNonEmpty | {
"repo_name": "Geomatys/sis",
"path": "core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java",
"license": "apache-2.0",
"size": 24793
} | [
"org.apache.sis.util.NullArgumentException",
"org.apache.sis.util.resources.Errors"
] | import org.apache.sis.util.NullArgumentException; import org.apache.sis.util.resources.Errors; | import org.apache.sis.util.*; import org.apache.sis.util.resources.*; | [
"org.apache.sis"
] | org.apache.sis; | 2,292,403 |
@Override
public String toString() {
MoreObjects.ToStringHelper s = MoreObjects.toStringHelper(this);
if (initialCapacity != UNSET_INT) {
s.add("initialCapacity", initialCapacity);
}
if (concurrencyLevel != UNSET_INT) {
s.add("concurrencyLevel", concurrencyLevel);
}
if (maximumSi... | String function() { MoreObjects.ToStringHelper s = MoreObjects.toStringHelper(this); if (initialCapacity != UNSET_INT) { s.add(STR, initialCapacity); } if (concurrencyLevel != UNSET_INT) { s.add(STR, concurrencyLevel); } if (maximumSize != UNSET_INT) { s.add(STR, maximumSize); } if (maximumWeight != UNSET_INT) { s.add(... | /**
* Returns a string representation for this CacheBuilder instance. The exact form of the returned
* string is not specified.
*/ | Returns a string representation for this CacheBuilder instance. The exact form of the returned string is not specified | toString | {
"repo_name": "DavesMan/guava",
"path": "guava/src/com/google/common/cache/CacheBuilder.java",
"license": "apache-2.0",
"size": 39588
} | [
"com.google.common.base.Ascii",
"com.google.common.base.MoreObjects"
] | import com.google.common.base.Ascii; import com.google.common.base.MoreObjects; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,784,210 |
private boolean includeDefaultUrl(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
if (this.defaultUrl == null) {
return false;
}
doInclude(request, response, this.defaultUrl);
return true;
} | boolean function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (this.defaultUrl == null) { return false; } doInclude(request, response, this.defaultUrl); return true; } | /**
* Include the specified default URL, if appropriate.
* @param request current HTTP request
* @param response current HTTP response
* @return whether a default URL was included
* @throws ServletException if thrown by the RequestDispatcher
* @throws IOException if thrown by the RequestDispatcher
*/ | Include the specified default URL, if appropriate | includeDefaultUrl | {
"repo_name": "dachengxi/spring1.1.1_source",
"path": "src/org/springframework/web/servlet/ResourceServlet.java",
"license": "mit",
"size": 12472
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 199,154 |
int insertSelective(SysLoginInfo record); | int insertSelective(SysLoginInfo record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sys_logininfo
*
* @mbggenerated Mon Aug 18 00:48:04 CST 2014
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table sys_logininfo | insertSelective | {
"repo_name": "simbest/simbest-cores",
"path": "src/main/java/com/simbest/cores/admin/syslog/service/ISysLoginInfoService.java",
"license": "apache-2.0",
"size": 3249
} | [
"com.simbest.cores.admin.syslog.model.SysLoginInfo"
] | import com.simbest.cores.admin.syslog.model.SysLoginInfo; | import com.simbest.cores.admin.syslog.model.*; | [
"com.simbest.cores"
] | com.simbest.cores; | 1,295,294 |
void create(ExecutionEntity scopeExecution); | void create(ExecutionEntity scopeExecution); | /**
* Creates this instance and attachs it to the given execution.
*
* @param scopeExecution the execution to attach the new instance
*/ | Creates this instance and attachs it to the given execution | create | {
"repo_name": "subhrajyotim/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/impl/migration/instance/EmergingInstance.java",
"license": "apache-2.0",
"size": 1039
} | [
"org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity"
] | import org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity; | import org.camunda.bpm.engine.impl.persistence.entity.*; | [
"org.camunda.bpm"
] | org.camunda.bpm; | 2,128,756 |
private JPanel getContentPanel() {
if (contentPanel == null) {
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.fill = GridBagConstraints.BOTH;
gridBagConstraints.weighty = 1.0;
gridBagConstraints.gridx = 0;
grid... | JPanel function() { if (contentPanel == null) { GridBagConstraints gridBagConstraints = new GridBagConstraints(); gridBagConstraints.fill = GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.weightx = 1.0; contentPanel = new JPanel()... | /**
* This method initializes contentPanel
*
* @return javax.swing.JPanel
*/ | This method initializes contentPanel | getContentPanel | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gridgrouper/browser/GroupManagementBrowser.java",
"license": "bsd-3-clause",
"size": 14698
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"javax.swing.JPanel"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 699,050 |
public BlockPos blockPosFromInt(int serialized) {
int x = this.xPosition * 16 + (serialized & XZ_MASK);
int y = (serialized >> Y_SHIFT) & Y_INT_MASK;
int z = this.zPosition * 16 + ((serialized >> Z_INT_SHIFT) & XZ_MASK);
return new BlockPos(x, y, z);
} | BlockPos function(int serialized) { int x = this.xPosition * 16 + (serialized & XZ_MASK); int y = (serialized >> Y_SHIFT) & Y_INT_MASK; int z = this.zPosition * 16 + ((serialized >> Z_INT_SHIFT) & XZ_MASK); return new BlockPos(x, y, z); } | /**
* Create a BlockPos from a serialized chunk position
*/ | Create a BlockPos from a serialized chunk position | blockPosFromInt | {
"repo_name": "clienthax/SpongeCommon",
"path": "src/main/java/org/spongepowered/common/mixin/core/world/MixinChunk.java",
"license": "mit",
"size": 44149
} | [
"net.minecraft.util.BlockPos"
] | import net.minecraft.util.BlockPos; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,071,939 |
public Observable<ServiceResponse<Page<RouteTableInner>>> listNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<RouteTableInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all route tables in a subscription.
*
ServiceResponse<PageImpl<RouteTableInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<RouteTableInn... | Gets all route tables in a subscription | listNextSinglePageAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteTablesInner.java",
"license": "mit",
"size": 75681
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,830,106 |
private void evaluateTopN()
{
// must go thru 1+ times as must gather up values then go back and set hidden ...
// identifies top n values then displays ALL rows that contain those values
ArrayList top10 = new ArrayList();
int n = ((!fPercent) ? wTop10 : (getSheet().getNumRows() / wTop10));
double[] maxVa... | void function() { ArrayList top10 = new ArrayList(); int n = ((!fPercent) ? wTop10 : (getSheet().getNumRows() / wTop10)); double[] maxVals = new double[n]; for( int i = 0; i < n; i++ ) { maxVals[i] = Double.NEGATIVE_INFINITY; } double curmin = Double.NEGATIVE_INFINITY; Row[] rows = getSheet().getRows(); for( int i = 1;... | /**
* evaluates a Top-N condition, hiding rows that are not in the top N values of the column
*
* @see evaluateBottomN for descending or Bottom-N evaluation
*/ | evaluates a Top-N condition, hiding rows that are not in the top N values of the column | evaluateTopN | {
"repo_name": "Maxels88/openxls",
"path": "src/main/java/org/openxls/formats/XLS/AutoFilter.java",
"license": "gpl-3.0",
"size": 34186
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,588,165 |
@Test
public void testInvalidObjectHandle1() throws NoSuchMethodException, SecurityException {
final MockFunctionRegistry registry = MockFunctionRegistry.builder()
.xlFunction(TestClass.class.getMethod("method", Double.class))
.build();
final InvokerFactory invokerFactory = new ReflectiveInv... | void function() throws NoSuchMethodException, SecurityException { final MockFunctionRegistry registry = MockFunctionRegistry.builder() .xlFunction(TestClass.class.getMethod(STR, Double.class)) .build(); final InvokerFactory invokerFactory = new ReflectiveInvokerFactory(EXCEL, TYPE_CONVERTERS); final ExcelFunctionCallHa... | /**
* Tests the return value when the object that the method is being called on is not in the heap.
* @throws NoSuchMethodException if the method cannot be found
* @throws SecurityException if the method cannot be found
*/ | Tests the return value when the object that the method is being called on is not in the heap | testInvalidObjectHandle1 | {
"repo_name": "McLeodMoores/xl4j",
"path": "xll-core/src/test/java/com/mcleodmoores/xl4j/v1/DefaultExcelFunctionCallHandlerTest.java",
"license": "gpl-3.0",
"size": 15948
} | [
"com.mcleodmoores.xl4j.v1.api.core.ExcelCallback",
"com.mcleodmoores.xl4j.v1.api.core.ExcelFunctionCallHandler",
"com.mcleodmoores.xl4j.v1.api.core.FunctionDefinition",
"com.mcleodmoores.xl4j.v1.api.core.InvokerFactory",
"com.mcleodmoores.xl4j.v1.api.values.XLError",
"com.mcleodmoores.xl4j.v1.api.values.X... | import com.mcleodmoores.xl4j.v1.api.core.ExcelCallback; import com.mcleodmoores.xl4j.v1.api.core.ExcelFunctionCallHandler; import com.mcleodmoores.xl4j.v1.api.core.FunctionDefinition; import com.mcleodmoores.xl4j.v1.api.core.InvokerFactory; import com.mcleodmoores.xl4j.v1.api.values.XLError; import com.mcleodmoores.xl4... | import com.mcleodmoores.xl4j.v1.api.core.*; import com.mcleodmoores.xl4j.v1.api.values.*; import com.mcleodmoores.xl4j.v1.core.*; import com.mcleodmoores.xl4j.v1.invoke.*; import com.mcleodmoores.xl4j.v1.xll.*; import java.util.*; import org.testng.*; | [
"com.mcleodmoores.xl4j",
"java.util",
"org.testng"
] | com.mcleodmoores.xl4j; java.util; org.testng; | 1,954,237 |
public Integer getJvmRTClassPathIndex() throws SnmpStatusException {
return new Integer(index);
} | Integer function() throws SnmpStatusException { return new Integer(index); } | /**
* Getter for the "JvmRTClassPathIndex" variable.
*/ | Getter for the "JvmRTClassPathIndex" variable | getJvmRTClassPathIndex | {
"repo_name": "openjdk/jdk7u",
"path": "jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTClassPathEntryImpl.java",
"license": "gpl-2.0",
"size": 2512
} | [
"com.sun.jmx.snmp.SnmpStatusException"
] | import com.sun.jmx.snmp.SnmpStatusException; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 205,043 |
public final DBCommand join(DBColumnExpr left, DBColumn right, DBJoinType joinType, DBCompareExpr... addlConstraints)
{
if (left==null || right==null || left.getSourceColumn()==null)
throw new InvalidArgumentException("left|right", left);
if (left.getSourceColumn().getRowSet()==right... | final DBCommand function(DBColumnExpr left, DBColumn right, DBJoinType joinType, DBCompareExpr... addlConstraints) { if (left==null right==null left.getSourceColumn()==null) throw new InvalidArgumentException(STR, left); if (left.getSourceColumn().getRowSet()==right.getRowSet()) throw new InvalidArgumentException(STR, ... | /**
* Adds a join based on two columns to the list of join expressions.
*
* Migration hint from 2.x -> replace ").where(" with just ","
*
* @param left the left join value
* @param right the right join
* @param joinType type of join ({@link DBJoinType#INNER}, {@link DBJoinType#LEFT... | Adds a join based on two columns to the list of join expressions. Migration hint from 2.x -> replace ").where(" with just "," | join | {
"repo_name": "apache/empire-db",
"path": "empire-db/src/main/java/org/apache/empire/db/DBCommand.java",
"license": "apache-2.0",
"size": 61286
} | [
"org.apache.empire.db.expr.compare.DBCompareExpr",
"org.apache.empire.db.expr.join.DBColumnJoinExpr",
"org.apache.empire.exceptions.InvalidArgumentException"
] | import org.apache.empire.db.expr.compare.DBCompareExpr; import org.apache.empire.db.expr.join.DBColumnJoinExpr; import org.apache.empire.exceptions.InvalidArgumentException; | import org.apache.empire.db.expr.compare.*; import org.apache.empire.db.expr.join.*; import org.apache.empire.exceptions.*; | [
"org.apache.empire"
] | org.apache.empire; | 420,087 |
public Group getGroup(String itemName) {
if (itemName == null) {
throw new IllegalArgumentException("itemName must not be null");
}
return autoGroup.get(itemName);
} | Group function(String itemName) { if (itemName == null) { throw new IllegalArgumentException(STR); } return autoGroup.get(itemName); } | /**
* Gets the Group that was stored for this item the last time, or null, if no such Group exists
*/ | Gets the Group that was stored for this item the last time, or null, if no such Group exists | getGroup | {
"repo_name": "FAU-Inf2/kwikshop-android",
"path": "app/src/main/java/de/fau/cs/mad/kwikshop/android/model/AutoCompletionHelper.java",
"license": "mit",
"size": 7475
} | [
"de.fau.cs.mad.kwikshop.common.Group"
] | import de.fau.cs.mad.kwikshop.common.Group; | import de.fau.cs.mad.kwikshop.common.*; | [
"de.fau.cs"
] | de.fau.cs; | 571,084 |
private FormLayout initForm() {
FormLayout form = new FormLayout();
form.setWidth("100%");
m_targetPath = new CmsPathSelectField();
m_targetPath.setCaption(
CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_COPY_MOVE_TARGET_0));
m_targetPat... | FormLayout function() { FormLayout form = new FormLayout(); form.setWidth("100%"); m_targetPath = new CmsPathSelectField(); m_targetPath.setCaption( CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_COPY_MOVE_TARGET_0)); m_targetPath.setFileSelectCaption( CmsVaadinUtils.getMessageText(Messages.GU... | /**
* Initializes the form fields.<p>
*
* @return the form component
*/ | Initializes the form fields | initForm | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/ui/dialogs/CmsCopyMoveDialog.java",
"license": "lgpl-2.1",
"size": 38610
} | [
"com.vaadin.ui.FormLayout",
"com.vaadin.v7.ui.ComboBox",
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.file.types.CmsResourceTypeFolderSubSitemap",
"org.opencms.ui.CmsVaadinUtils",
"org.opencms.ui.components.fileselect.CmsPathSelectField"
] | import com.vaadin.ui.FormLayout; import com.vaadin.v7.ui.ComboBox; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.file.types.CmsResourceTypeFolderSubSitemap; import org.opencms.ui.CmsVaadinUtils; import org.opencms.ui.components.fileselect.CmsPathSelectField; | import com.vaadin.ui.*; import com.vaadin.v7.ui.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.ui.*; import org.opencms.ui.components.fileselect.*; | [
"com.vaadin.ui",
"com.vaadin.v7",
"org.opencms.file",
"org.opencms.ui"
] | com.vaadin.ui; com.vaadin.v7; org.opencms.file; org.opencms.ui; | 1,677,579 |
@Test
public void testView_4Args() {
ByteBuffer buffer = ByteBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN);
for (int i = 0; i < 100; i++) {
buffer.put((byte) i);
}
int offset = 20;
buffer.position(offset);
String filename = "pkg/foo.class";
byte[] extraData = { 1, 2, 3, 4, 5}... | void function() { ByteBuffer buffer = ByteBuffer.allocate(100).order(ByteOrder.LITTLE_ENDIAN); for (int i = 0; i < 100; i++) { buffer.put((byte) i); } int offset = 20; buffer.position(offset); String filename = STR; byte[] extraData = { 1, 2, 3, 4, 5}; String comment = "c"; int expMark = (int) ZipInputStream.CENSIG; in... | /**
* Test of view method, of class DirectoryEntry.
*/ | Test of view method, of class DirectoryEntry | testView_4Args | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/test/java/com/google/devtools/build/android/ziputils/DirectoryEntryTest.java",
"license": "apache-2.0",
"size": 8037
} | [
"java.nio.ByteBuffer",
"java.nio.ByteOrder",
"java.util.zip.ZipInputStream",
"org.junit.Assert"
] | import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.zip.ZipInputStream; import org.junit.Assert; | import java.nio.*; import java.util.zip.*; import org.junit.*; | [
"java.nio",
"java.util",
"org.junit"
] | java.nio; java.util; org.junit; | 2,768,540 |
Map<String, String> getDefaultReplacementParameters(); | Map<String, String> getDefaultReplacementParameters(); | /**
* Returns the default replacement parameters for the renderer.
*
* @return the default replacement parameters for the renderer
*/ | Returns the default replacement parameters for the renderer | getDefaultReplacementParameters | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/common/notification/NotificationRenderer.java",
"license": "apache-2.0",
"size": 1281
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,505,257 |
public static <IN, OUT> CompletableFuture<OUT> thenComposeAsyncIfNotDone(
CompletableFuture<IN> completableFuture,
Executor executor,
Function<? super IN, ? extends CompletionStage<OUT>> composeFun) {
return completableFuture.isDone() ?
completableFuture.thenCompose(composeFun) :
completableFuture.then... | static <IN, OUT> CompletableFuture<OUT> function( CompletableFuture<IN> completableFuture, Executor executor, Function<? super IN, ? extends CompletionStage<OUT>> composeFun) { return completableFuture.isDone() ? completableFuture.thenCompose(composeFun) : completableFuture.thenComposeAsync(composeFun, executor); } | /**
* This function takes a {@link CompletableFuture} and a function to compose with this future. If the input future
* is already done, this function returns {@link CompletableFuture#thenCompose(Function)}. Otherwise, the return
* value is {@link CompletableFuture#thenComposeAsync(Function, Executor)} with the g... | This function takes a <code>CompletableFuture</code> and a function to compose with this future. If the input future is already done, this function returns <code>CompletableFuture#thenCompose(Function)</code>. Otherwise, the return value is <code>CompletableFuture#thenComposeAsync(Function, Executor)</code> with the gi... | thenComposeAsyncIfNotDone | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java",
"license": "apache-2.0",
"size": 35693
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.CompletionStage",
"java.util.concurrent.Executor",
"java.util.function.Function"
] | import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.concurrent.Executor; import java.util.function.Function; | import java.util.concurrent.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,521,097 |
public EditableImage copy() {
ColorModel colorModel = image.getColorModel();
boolean isAlphaPremultiplied = colorModel.isAlphaPremultiplied();
WritableRaster writeableRaster = image.copyData(null);
return new EditableImage(new BufferedImage(colorModel, writeableRaster, isAlphaPremultiplied, null));
... | EditableImage function() { ColorModel colorModel = image.getColorModel(); boolean isAlphaPremultiplied = colorModel.isAlphaPremultiplied(); WritableRaster writeableRaster = image.copyData(null); return new EditableImage(new BufferedImage(colorModel, writeableRaster, isAlphaPremultiplied, null)); } | /**
* Returns a copy of this EditableImage.
* @return A copy of this EditableImage.
*/ | Returns a copy of this EditableImage | copy | {
"repo_name": "anthonyjchriste/683f13",
"path": "CannyEdgeDetector/src/edu/achriste/image/EditableImage.java",
"license": "gpl-3.0",
"size": 6034
} | [
"java.awt.image.BufferedImage",
"java.awt.image.ColorModel",
"java.awt.image.WritableRaster"
] | import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.WritableRaster; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 329,099 |
public void parseOperationsForApiRoutes() throws NoSuchMethodException, SecurityException {
final HashMap<String, ArrayList<String>> rpcs = new HashMap<>();
final HashMap<String, ArrayList<String>> rpcInputMessages = new HashMap<>();
final HashMap<String, String> retMessages = new HashMap<>();
Set<C... | void function() throws NoSuchMethodException, SecurityException { final HashMap<String, ArrayList<String>> rpcs = new HashMap<>(); final HashMap<String, ArrayList<String>> rpcInputMessages = new HashMap<>(); final HashMap<String, String> retMessages = new HashMap<>(); Set<Class<? extends ServiceEnabledCommand>> t = nul... | /**
* This method parses all the Geowave Operation classes and creates the info to generate a gRPC
* based on the operation.
*
* @throws SecurityException
* @throws NoSuchMethodException
*/ | This method parses all the Geowave Operation classes and creates the info to generate a gRPC based on the operation | parseOperationsForApiRoutes | {
"repo_name": "locationtech/geowave",
"path": "services/grpc/protobuf-generator/src/main/java/org/locationtech/geowave/service/grpc/GeowaveOperationGrpcGenerator.java",
"license": "apache-2.0",
"size": 11576
} | [
"java.lang.reflect.Modifier",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.Set",
"org.locationtech.geowave.core.cli.api.ServiceEnabledCommand",
"org.reflections.Reflections"
] | import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.HashMap; import java.util.Set; import org.locationtech.geowave.core.cli.api.ServiceEnabledCommand; import org.reflections.Reflections; | import java.lang.reflect.*; import java.util.*; import org.locationtech.geowave.core.cli.api.*; import org.reflections.*; | [
"java.lang",
"java.util",
"org.locationtech.geowave",
"org.reflections"
] | java.lang; java.util; org.locationtech.geowave; org.reflections; | 526,398 |
default String contentOf(final File file) {
return Assertions.contentOf(file);
} | default String contentOf(final File file) { return Assertions.contentOf(file); } | /**
* Loads the text content of a file with the default character set, so that it can be passed to
* {@link #assertThat(String)}.
* <p>
* Note that this will load the entire file in memory; for larger files, there might be a more efficient alternative
* with {@link #assertThat(File)}.
* </p>
*
*... | Loads the text content of a file with the default character set, so that it can be passed to <code>#assertThat(String)</code>. Note that this will load the entire file in memory; for larger files, there might be a more efficient alternative with <code>#assertThat(File)</code>. | contentOf | {
"repo_name": "ChrisA89/assertj-core",
"path": "src/main/java/org/assertj/core/api/WithAssertions.java",
"license": "apache-2.0",
"size": 102131
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 242,336 |
public List getView() {
return view;
} | List function() { return view; } | /**
* Return the list of depots in the client view
*
* @return list of deopots
*/ | Return the list of depots in the client view | getView | {
"repo_name": "ModelN/build-management",
"path": "mn-build-core/src/main/java/com/modeln/build/perforce/Client.java",
"license": "mit",
"size": 24456
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 247,565 |
private static ReplicaRecoveryInfo callInitReplicaRecovery(
InterDatanodeProtocol datanode,
RecoveringBlock rBlock) throws IOException {
try {
return datanode.initReplicaRecovery(rBlock);
} catch(RemoteException re) {
throw re.unwrapRemoteException();
}
} | static ReplicaRecoveryInfo function( InterDatanodeProtocol datanode, RecoveringBlock rBlock) throws IOException { try { return datanode.initReplicaRecovery(rBlock); } catch(RemoteException re) { throw re.unwrapRemoteException(); } } | /**
* Convenience method, which unwraps RemoteException.
* @throws IOException not a RemoteException.
*/ | Convenience method, which unwraps RemoteException | callInitReplicaRecovery | {
"repo_name": "oza/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 116795
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.protocol.BlockRecoveryCommand",
"org.apache.hadoop.hdfs.server.protocol.InterDatanodeProtocol",
"org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo",
"org.apache.hadoop.ipc.RemoteException"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.protocol.BlockRecoveryCommand; import org.apache.hadoop.hdfs.server.protocol.InterDatanodeProtocol; import org.apache.hadoop.hdfs.server.protocol.ReplicaRecoveryInfo; import org.apache.hadoop.ipc.RemoteException; | import java.io.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.ipc.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,036,197 |
public boolean hasUtil(final String util, final String box) {
InternalVariables.found = false;
// only for busybox and toolbox
if (!(box.endsWith("toolbox") || box.endsWith("busybox"))) {
return false;
}
try {
CommandCapture command = new CommandCa... | boolean function(final String util, final String box) { InternalVariables.found = false; if (!(box.endsWith(STR) box.endsWith(STR))) { return false; } try { CommandCapture command = new CommandCapture(0, false, box.endsWith(STR) ? box + " " + util : box + STR) { | /**
* Checks whether the toolbox or busybox binary contains a specific util
*
* @param util
* @param box Should contain "toolbox" or "busybox"
* @return true if it contains this util
*/ | Checks whether the toolbox or busybox binary contains a specific util | hasUtil | {
"repo_name": "Octo-Kat/platform_packages_apps_FileManager",
"path": "src/com/stericson/RootTools/internal/RootToolsInternalMethods.java",
"license": "gpl-2.0",
"size": 55878
} | [
"com.stericson.RootTools"
] | import com.stericson.RootTools; | import com.stericson.*; | [
"com.stericson"
] | com.stericson; | 882,231 |
public static String[] toStringArray(Collection<String> collection) {
if (collection == null) {
return null;
}
return collection.toArray(new String[collection.size()]);
} | static String[] function(Collection<String> collection) { if (collection == null) { return null; } return collection.toArray(new String[collection.size()]); } | /**
* Copy the given Collection into a String array.
* The Collection must contain String elements only.
*
* @param collection the Collection to copy
* @return the String array (<code>null</code> if the passed-in
* Collection was <code>null</code>)
*/ | Copy the given Collection into a String array. The Collection must contain String elements only | toStringArray | {
"repo_name": "qwerty4030/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/common/Strings.java",
"license": "apache-2.0",
"size": 30929
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,130,317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.