method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private boolean loadModelIfNecessary(String modelId, Consumer consumer, ActionListener<LocalModel> modelActionListener) {
synchronized (loadingListeners) {
ModelAndConsumer cachedModel = localModelCache.get(modelId);
if (cachedModel != null) {
cachedModel.consumers.ad... | boolean function(String modelId, Consumer consumer, ActionListener<LocalModel> modelActionListener) { synchronized (loadingListeners) { ModelAndConsumer cachedModel = localModelCache.get(modelId); if (cachedModel != null) { cachedModel.consumers.add(consumer); try { cachedModel.model.acquire(); } catch (CircuitBreaking... | /**
* If the model is cached it is returned directly to the listener
* else if the model is CURRENTLY being loaded the listener is added to be notified when it is loaded
* else the model load is initiated.
*
* @param modelId The model to get
* @param consumer The model consumer
* @par... | If the model is cached it is returned directly to the listener else if the model is CURRENTLY being loaded the listener is added to be notified when it is loaded else the model load is initiated | loadModelIfNecessary | {
"repo_name": "gingerwizard/elasticsearch",
"path": "x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/inference/loadingservice/ModelLoadingService.java",
"license": "apache-2.0",
"size": 30517
} | [
"java.util.ArrayDeque",
"java.util.Queue",
"org.apache.logging.log4j.message.ParameterizedMessage",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.common.breaker.CircuitBreakingException"
] | import java.util.ArrayDeque; import java.util.Queue; import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.breaker.CircuitBreakingException; | import java.util.*; import org.apache.logging.log4j.message.*; import org.elasticsearch.action.*; import org.elasticsearch.common.breaker.*; | [
"java.util",
"org.apache.logging",
"org.elasticsearch.action",
"org.elasticsearch.common"
] | java.util; org.apache.logging; org.elasticsearch.action; org.elasticsearch.common; | 1,368,138 |
public void drawRangeLine(Graphics2D g2,
XYPlot plot,
ValueAxis axis,
Rectangle2D dataArea,
double value,
Paint paint,
Stroke stro... | void function(Graphics2D g2, XYPlot plot, ValueAxis axis, Rectangle2D dataArea, double value, Paint paint, Stroke stroke) { Range range = axis.getRange(); if (!range.contains(value)) { return; } PlotOrientation orientation = plot.getOrientation(); Line2D line = null; double v = axis.valueToJava2D(value, dataArea, plot.... | /**
* Draws a line perpendicular to the range axis.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param axis the value axis.
* @param dataArea the area for plotting data (not yet adjusted for any 3D
* effect).
* @param value the value... | Draws a line perpendicular to the range axis | drawRangeLine | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java",
"license": "gpl-2.0",
"size": 67112
} | [
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Stroke",
"java.awt.geom.Line2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.PlotOrientation",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.Range"
] | import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.data.Range; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.data.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 1,829,347 |
long createProject(String userId, Project project, String projectSettings); | long createProject(String userId, Project project, String projectSettings); | /**
* Creates a new project and uploads the files.
*
* <p>
* This is an atomic operation.
*
* @param userId user id
* @param project project information
* @param projectSettings project settings
* @return project id
*/ | Creates a new project and uploads the files. This is an atomic operation | createProject | {
"repo_name": "rkipper/AppInventor_RK",
"path": "appinventor/appengine/src/com/google/appinventor/server/storage/StorageIo.java",
"license": "mit",
"size": 12012
} | [
"com.google.appinventor.shared.rpc.project.Project"
] | import com.google.appinventor.shared.rpc.project.Project; | import com.google.appinventor.shared.rpc.project.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 1,571,070 |
public static int checkedSubtract(int a, int b) {
long result = (long) a - b;
checkNoOverflow(result == (int) result);
return (int) result;
} | static int function(int a, int b) { long result = (long) a - b; checkNoOverflow(result == (int) result); return (int) result; } | /**
* Returns the difference of {@code a} and {@code b}, provided it does not overflow.
*
* @throws ArithmeticException if {@code a - b} overflows in signed {@code int} arithmetic
*/ | Returns the difference of a and b, provided it does not overflow | checkedSubtract | {
"repo_name": "10xEngineer/My-Wallet-Android",
"path": "src/com/google/common/math/IntMath.java",
"license": "gpl-3.0",
"size": 18313
} | [
"com.google.common.math.MathPreconditions"
] | import com.google.common.math.MathPreconditions; | import com.google.common.math.*; | [
"com.google.common"
] | com.google.common; | 2,053,716 |
public void finishTxOnRecovery(final IgniteInternalTx tx, boolean commit) {
if (log.isDebugEnabled())
log.debug("Finishing prepared transaction [tx=" + tx + ", commit=" + commit + ']');
if (!tx.markFinalizing(RECOVERY_FINISH)) {
if (log.isDebugEnabled())
log.... | void function(final IgniteInternalTx tx, boolean commit) { if (log.isDebugEnabled()) log.debug(STR + tx + STR + commit + ']'); if (!tx.markFinalizing(RECOVERY_FINISH)) { if (log.isDebugEnabled()) log.debug(STR + tx); return; } if (tx instanceof IgniteTxRemoteEx) { IgniteTxRemoteEx rmtTx = (IgniteTxRemoteEx)tx; rmtTx.do... | /**
* Commits or rolls back prepared transaction.
*
* @param tx Transaction.
* @param commit Whether transaction should be committed or rolled back.
*/ | Commits or rolls back prepared transaction | finishTxOnRecovery | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java",
"license": "apache-2.0",
"size": 89685
} | [
"java.util.Collections",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion"
] | import java.util.Collections; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; | import java.util.*; import org.apache.ignite.internal.processors.cache.version.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,381,628 |
@Test(timeout = 120_000L)
public void testScaleDownBeforeFirstCheckpoint() throws Exception {
String topic = "scale-down-before-first-checkpoint";
List<AutoCloseable> operatorsToClose = new ArrayList<>();
int preScaleDownParallelism = Math.max(2, FlinkKafkaProducer011.SAFE_SCALE_DOWN_FACTOR);
for (int subt... | @Test(timeout = 120_000L) void function() throws Exception { String topic = STR; List<AutoCloseable> operatorsToClose = new ArrayList<>(); int preScaleDownParallelism = Math.max(2, FlinkKafkaProducer011.SAFE_SCALE_DOWN_FACTOR); for (int subtaskIndex = 0; subtaskIndex < preScaleDownParallelism; subtaskIndex++) { OneInpu... | /**
* This tests checks whether FlinkKafkaProducer011 correctly aborts lingering transactions after a failure,
* which happened before first checkpoint and was followed up by reducing the parallelism.
* If such transactions were left alone lingering it consumers would be unable to read committed records
* that ... | This tests checks whether FlinkKafkaProducer011 correctly aborts lingering transactions after a failure, which happened before first checkpoint and was followed up by reducing the parallelism. If such transactions were left alone lingering it consumers would be unable to read committed records that were created after t... | testScaleDownBeforeFirstCheckpoint | {
"repo_name": "haohui/flink",
"path": "flink-connectors/flink-connector-kafka-0.11/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer011Tests.java",
"license": "apache-2.0",
"size": 21062
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness",
"org.junit.Test"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.flink.streaming.util.OneInputStreamOperatorTestHarness; import org.junit.Test; | import java.util.*; import org.apache.flink.streaming.util.*; import org.junit.*; | [
"java.util",
"org.apache.flink",
"org.junit"
] | java.util; org.apache.flink; org.junit; | 2,078,697 |
public void setBorderRadius(int borderRadius) {
// resets callback
setBorderRadius((BorderRadiusCallback<DatasetContext>) null);
// stores value
getConfiguration().getElements().getBar().setBorderRadius(borderRadius);
} | void function(int borderRadius) { setBorderRadius((BorderRadiusCallback<DatasetContext>) null); getConfiguration().getElements().getBar().setBorderRadius(borderRadius); } | /**
* Sets the bar border radius (in pixels).
*
* @param borderRadius the bar border radius (in pixels).
*/ | Sets the bar border radius (in pixels) | setBorderRadius | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/configuration/Bar.java",
"license": "apache-2.0",
"size": 21987
} | [
"org.pepstock.charba.client.callbacks.BorderRadiusCallback",
"org.pepstock.charba.client.callbacks.DatasetContext"
] | import org.pepstock.charba.client.callbacks.BorderRadiusCallback; import org.pepstock.charba.client.callbacks.DatasetContext; | import org.pepstock.charba.client.callbacks.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 2,487,946 |
@Override
public void onItemSelected(ScheduleBundle chosenSchedule) {
if (twoPane) {
// In two-pane mode, show the detail view in this activity by
// adding or replacing the detail fragment using a
// fragment transaction.
Bundle arguments = new Bundle();
arguments.putLong(Experime... | void function(ScheduleBundle chosenSchedule) { if (twoPane) { Bundle arguments = new Bundle(); arguments.putLong(Experiment.EXPERIMENT_SERVER_ID_EXTRA_KEY, experiment.getExperimentDAO().getId()); arguments.putString(Experiment.EXPERIMENT_GROUP_NAME_EXTRA_KEY, chosenSchedule.group.getName()); arguments.putLong(ScheduleD... | /**
* Callback method from {@link ScheduleListFragment.Callbacks} indicating that
* the item with the given ID was selected.
*/ | Callback method from <code>ScheduleListFragment.Callbacks</code> indicating that the item with the given ID was selected | onItemSelected | {
"repo_name": "kehollin/paco",
"path": "Paco/src/com/pacoapp/paco/ui/ScheduleListActivity.java",
"license": "apache-2.0",
"size": 12268
} | [
"android.content.Intent",
"android.os.Bundle",
"com.pacoapp.paco.model.Experiment"
] | import android.content.Intent; import android.os.Bundle; import com.pacoapp.paco.model.Experiment; | import android.content.*; import android.os.*; import com.pacoapp.paco.model.*; | [
"android.content",
"android.os",
"com.pacoapp.paco"
] | android.content; android.os; com.pacoapp.paco; | 672,130 |
private static void checkNoErrors(@NotNull Project project) {
for(Notification notification : EventLog.getLogModel(project).getNotifications()) {
assertThat(notification.getType()).isNotEqualTo(NotificationType.ERROR);
}
} | static void function(@NotNull Project project) { for(Notification notification : EventLog.getLogModel(project).getNotifications()) { assertThat(notification.getType()).isNotEqualTo(NotificationType.ERROR); } } | /**
* Checks that no errors are present in the event log
*/ | Checks that no errors are present in the event log | checkNoErrors | {
"repo_name": "consulo/consulo-android",
"path": "android/android/guiTestSrc/com/android/tools/idea/tests/gui/theme/ThemeEditorTest.java",
"license": "apache-2.0",
"size": 6826
} | [
"com.intellij.notification.EventLog",
"com.intellij.notification.Notification",
"com.intellij.notification.NotificationType",
"com.intellij.openapi.project.Project",
"org.fest.assertions.Assertions",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.notification.EventLog; import com.intellij.notification.Notification; import com.intellij.notification.NotificationType; import com.intellij.openapi.project.Project; import org.fest.assertions.Assertions; import org.jetbrains.annotations.NotNull; | import com.intellij.notification.*; import com.intellij.openapi.project.*; import org.fest.assertions.*; import org.jetbrains.annotations.*; | [
"com.intellij.notification",
"com.intellij.openapi",
"org.fest.assertions",
"org.jetbrains.annotations"
] | com.intellij.notification; com.intellij.openapi; org.fest.assertions; org.jetbrains.annotations; | 2,180,994 |
public static void provisioningSuccess(Collection<? extends Container> containers, Long timeout, Callback<Container> onFailed) throws ProvisionException, InterruptedException {
if (containers.isEmpty()) {
return;
}
StringBuilder sb = new StringBuilder();
sb.append(" ");
... | static void function(Collection<? extends Container> containers, Long timeout, Callback<Container> onFailed) throws ProvisionException, InterruptedException { if (containers.isEmpty()) { return; } StringBuilder sb = new StringBuilder(); sb.append(" "); for (Container c : containers) { sb.append(c.getId()).append(" "); ... | /**
* Wait for a container to provision and assert its status.
*
* @param containers
* @param timeout
* @param onFailed
* @throws Exception
*/ | Wait for a container to provision and assert its status | provisioningSuccess | {
"repo_name": "alexeev/jboss-fuse-mirror",
"path": "fabric/fabric-itests/common/src/main/java/io/fabric8/itests/paxexam/support/Provision.java",
"license": "apache-2.0",
"size": 12147
} | [
"io.fabric8.api.Container",
"java.util.Collection"
] | import io.fabric8.api.Container; import java.util.Collection; | import io.fabric8.api.*; import java.util.*; | [
"io.fabric8.api",
"java.util"
] | io.fabric8.api; java.util; | 1,781,161 |
@Override
public Struct toStruct() {
return data.toStruct(version);
} | Struct function() { return data.toStruct(version); } | /**
* Visible for testing.
*/ | Visible for testing | toStruct | {
"repo_name": "sslavic/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/requests/AlterPartitionReassignmentsRequest.java",
"license": "apache-2.0",
"size": 4638
} | [
"org.apache.kafka.common.protocol.types.Struct"
] | import org.apache.kafka.common.protocol.types.Struct; | import org.apache.kafka.common.protocol.types.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 757,949 |
@Override
public User getByLogin(String login) throws DaoException {
User user;
try {
Session session = getSession();
Query query = session.createQuery(HQL_GET_BY_LOGIN);
query.setParameter(QUERY_PARAMETER_LOGIN, login);
user = (User) query.uniqueR... | User function(String login) throws DaoException { User user; try { Session session = getSession(); Query query = session.createQuery(HQL_GET_BY_LOGIN); query.setParameter(QUERY_PARAMETER_LOGIN, login); user = (User) query.uniqueResult(); } catch(HibernateException e){ throw new DaoException(MESSAGE_GET_BY_LOGIN_FAILED,... | /**
* Set user status to DB
*
* @param login - The login of the user
* @throws DaoException If something fails at DB level
*/ | Set user status to DB | getByLogin | {
"repo_name": "alexeykish/aircompany-spring",
"path": "dao/src/main/java/by/pvt/kish/aircompany/dao/impl/UserDAO.java",
"license": "gpl-3.0",
"size": 3783
} | [
"by.pvt.kish.aircompany.exceptions.DaoException",
"by.pvt.kish.aircompany.pojos.User",
"org.hibernate.HibernateException",
"org.hibernate.Query",
"org.hibernate.Session"
] | import by.pvt.kish.aircompany.exceptions.DaoException; import by.pvt.kish.aircompany.pojos.User; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; | import by.pvt.kish.aircompany.exceptions.*; import by.pvt.kish.aircompany.pojos.*; import org.hibernate.*; | [
"by.pvt.kish",
"org.hibernate"
] | by.pvt.kish; org.hibernate; | 2,491,790 |
//-----------------------------------------------------------------------
public MetaProperty<Period> period() {
return period;
} | MetaProperty<Period> function() { return period; } | /**
* The meta-property for the {@code period} property.
* @return the meta-property, not null
*/ | The meta-property for the period property | period | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/common/GenericVolatilitySurfacePeriodParameterMetadata.java",
"license": "apache-2.0",
"size": 13509
} | [
"java.time.Period",
"org.joda.beans.MetaProperty"
] | import java.time.Period; import org.joda.beans.MetaProperty; | import java.time.*; import org.joda.beans.*; | [
"java.time",
"org.joda.beans"
] | java.time; org.joda.beans; | 65,336 |
CompletionStage<GetResult<V>> casGetAndTouch(String key, int ttl); | CompletionStage<GetResult<V>> casGetAndTouch(String key, int ttl); | /**
* Get the value for the provided key, including the CAS value, and sets the expiration
*
* @param key First key, must not be null
* @param ttl The TTL in seconds
* @return A future representing completion of the request, with the value, including the CAS
* value, or null if the value does not exis... | Get the value for the provided key, including the CAS value, and sets the expiration | casGetAndTouch | {
"repo_name": "mattnworb/folsom",
"path": "src/main/java/com/spotify/folsom/BinaryMemcacheClient.java",
"license": "apache-2.0",
"size": 4229
} | [
"java.util.concurrent.CompletionStage"
] | import java.util.concurrent.CompletionStage; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,091,707 |
@NonNull
public TaskListener getListener() {
return taskListener;
} | TaskListener function() { return taskListener; } | /**
* Offers a way to write to the log file for this agent.
* @since 2.9
*/ | Offers a way to write to the log file for this agent | getListener | {
"repo_name": "v1v/jenkins",
"path": "core/src/main/java/hudson/slaves/SlaveComputer.java",
"license": "mit",
"size": 43097
} | [
"hudson.model.TaskListener"
] | import hudson.model.TaskListener; | import hudson.model.*; | [
"hudson.model"
] | hudson.model; | 2,850,753 |
@Test
public void testRestoringFromSavepoint() throws Exception {
// create savepoint data
final long savepointId = 42L;
final File savepointFile = createSavepoint(savepointId);
// set savepoint settings
final SavepointRestoreSettings savepointRestoreSettings = SavepointRestoreSettings.forPath(
savep... | void function() throws Exception { final long savepointId = 42L; final File savepointFile = createSavepoint(savepointId); final SavepointRestoreSettings savepointRestoreSettings = SavepointRestoreSettings.forPath( savepointFile.getAbsolutePath(), true); final JobGraph jobGraph = createJobGraphWithCheckpointing(savepoin... | /**
* Tests that a JobMaster will restore the given JobGraph from its savepoint upon
* initial submission.
*/ | Tests that a JobMaster will restore the given JobGraph from its savepoint upon initial submission | testRestoringFromSavepoint | {
"repo_name": "gyfora/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java",
"license": "apache-2.0",
"size": 83823
} | [
"java.io.File",
"org.apache.flink.runtime.checkpoint.CompletedCheckpoint",
"org.apache.flink.runtime.checkpoint.StandaloneCheckpointIDCounter",
"org.apache.flink.runtime.checkpoint.StandaloneCompletedCheckpointStore",
"org.apache.flink.runtime.checkpoint.TestingCheckpointRecoveryFactory",
"org.apache.flin... | import java.io.File; import org.apache.flink.runtime.checkpoint.CompletedCheckpoint; import org.apache.flink.runtime.checkpoint.StandaloneCheckpointIDCounter; import org.apache.flink.runtime.checkpoint.StandaloneCompletedCheckpointStore; import org.apache.flink.runtime.checkpoint.TestingCheckpointRecoveryFactory; impor... | import java.io.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.rpc.*; import org.hamcrest.*; | [
"java.io",
"org.apache.flink",
"org.hamcrest"
] | java.io; org.apache.flink; org.hamcrest; | 874,709 |
@Test
public void testPersistentAuthOtherPreferencesInSameHeader() {
assertEquals(FiltersHelper.PREFER_PERSISTENCE_AUTH, getPrefer("persistent-auth, x, y"));
assertEquals(FiltersHelper.PREFER_PERSISTENCE_AUTH, getPrefer("x, persistent-auth, y"));
assertEquals(FiltersHelper.PREFER_PERSIST... | void function() { assertEquals(FiltersHelper.PREFER_PERSISTENCE_AUTH, getPrefer(STR)); assertEquals(FiltersHelper.PREFER_PERSISTENCE_AUTH, getPrefer(STR)); assertEquals(FiltersHelper.PREFER_PERSISTENCE_AUTH, getPrefer(STR)); } | /**
* Check that the persistent authentication preference is recognized when there are other preferences in the same
* header.
*/ | Check that the persistent authentication preference is recognized when there are other preferences in the same header | testPersistentAuthOtherPreferencesInSameHeader | {
"repo_name": "OpenUniversity/ovirt-engine",
"path": "backend/manager/modules/aaa/src/test/java/org/ovirt/engine/core/aaa/filters/FiltersHelperTest.java",
"license": "apache-2.0",
"size": 4232
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,101,494 |
@IdValue
@SetValue
public Set<Integer> getTraits(); | Set<Integer> function(); | /**
* Gets the set of major traits ids of this character's specialization.
* <br>May be empty if the characters has yet to unlock traits for this specialization.
* @return A non-modifiable {@code Set<Integer>}, never {@code null}.
*/ | Gets the set of major traits ids of this character's specialization. May be empty if the characters has yet to unlock traits for this specialization | getTraits | {
"repo_name": "fabricebouye/gw2-web-api-mapping",
"path": "src/api/web/gw2/mapping/v2/characters/id/specializations/CharacterSpecialization.java",
"license": "bsd-3-clause",
"size": 1111
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,678,330 |
public void onDirectoryDelete(final FileChangeObserver observer,final File directory) {
onDirectoryChanged(observer,FileChangeEvent.DirectoryDelete, directory);
}
| void function(final FileChangeObserver observer,final File directory) { onDirectoryChanged(observer,FileChangeEvent.DirectoryDelete, directory); } | /**
* Directory deleted Event.
*
* @param directory The directory deleted (ignored)
*/ | Directory deleted Event | onDirectoryDelete | {
"repo_name": "bingo-open-source/bingo-core",
"path": "core-lang/src/main/java/bingo/lang/io/monitor/FileChangeListenerAdaptor1.java",
"license": "apache-2.0",
"size": 3518
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,263,080 |
public byte[] evaluateChallenge(byte[] challenge) throws MessagingException {
// we create the challenge from the userid and password information (the
// "shared secret").
byte[] passBytes;
try {
// get the password in an UTF-8 encoding to create the token
pa... | byte[] function(byte[] challenge) throws MessagingException { byte[] passBytes; try { passBytes = password.getBytes("UTF-8"); byte[] digest = computeCramDigest(passBytes, challenge); String responseString = username + " " + new String(Hex.encode(digest)); complete = true; return responseString.getBytes(); } catch (Unsu... | /**
* Evaluate a CRAM-MD5 login challenge, returning the a result string that
* should satisfy the clallenge.
*
* @param challenge
* The decoded challenge data, as a byte array.
*
* @return A formatted challege response, as an array of bytes.
* @exception MessagingEx... | Evaluate a CRAM-MD5 login challenge, returning the a result string that should satisfy the clallenge | evaluateChallenge | {
"repo_name": "apache/geronimo-javamail",
"path": "geronimo-javamail_1.3.1/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/authentication/CramMD5Authenticator.java",
"license": "apache-2.0",
"size": 5731
} | [
"java.io.UnsupportedEncodingException",
"javax.mail.MessagingException",
"org.apache.geronimo.mail.util.Hex"
] | import java.io.UnsupportedEncodingException; import javax.mail.MessagingException; import org.apache.geronimo.mail.util.Hex; | import java.io.*; import javax.mail.*; import org.apache.geronimo.mail.util.*; | [
"java.io",
"javax.mail",
"org.apache.geronimo"
] | java.io; javax.mail; org.apache.geronimo; | 1,779,548 |
public void testSessionClosedProtections() throws Throwable {
prepare();
Session s = getSessionUnderTest();
release( s );
done();
assertFalse( s.isOpen() );
assertFalse( s.isConnected() );
assertNotNull( s.getStatistics() );
assertNotNull( s.toString() );
try {
s.createQuery( "from Silly" ).lis... | void function() throws Throwable { prepare(); Session s = getSessionUnderTest(); release( s ); done(); assertFalse( s.isOpen() ); assertFalse( s.isConnected() ); assertNotNull( s.getStatistics() ); assertNotNull( s.toString() ); try { s.createQuery( STR ).list(); fail( STR ); } catch( Throwable ignore ) { } try { s.get... | /**
* Test that session-closed protections work properly in all environments.
*
* @throws Throwable
*/ | Test that session-closed protections work properly in all environments | testSessionClosedProtections | {
"repo_name": "cacheonix/cacheonix-core",
"path": "3rdparty/hibernate-3.2/test/org/hibernate/test/connections/ConnectionManagementTestCase.java",
"license": "lgpl-2.1",
"size": 7770
} | [
"org.hibernate.Session"
] | import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 596,912 |
@Beta
public DeviceId getDeviceId(DataNode node) {
String[] temp;
String ip, port;
if (node.type() == DataNode.Type.SINGLE_INSTANCE_LEAF_VALUE_NODE) {
temp = ((LeafNode) node).asString().split("\\:");
if (temp.length != 3) {
throw new IllegalStateE... | DeviceId function(DataNode node) { String[] temp; String ip, port; if (node.type() == DataNode.Type.SINGLE_INSTANCE_LEAF_VALUE_NODE) { temp = ((LeafNode) node).asString().split("\\:"); if (temp.length != 3) { throw new IllegalStateException(new NetconfException(STR)); } ip = temp[1]; port = temp[2]; } else if (node.typ... | /**
* Retrieves device id from Data node.
*
* @param node the node associated with the event
* @return the deviceId of the effected device
*/ | Retrieves device id from Data node | getDeviceId | {
"repo_name": "kuujo/onos",
"path": "apps/netconf/client/src/main/java/org/onosproject/netconf/client/impl/NetconfActiveComponent.java",
"license": "apache-2.0",
"size": 16593
} | [
"java.net.URISyntaxException",
"org.onosproject.net.DeviceId",
"org.onosproject.netconf.NetconfException",
"org.onosproject.yang.model.DataNode",
"org.onosproject.yang.model.LeafNode",
"org.onosproject.yang.model.ListKey"
] | import java.net.URISyntaxException; import org.onosproject.net.DeviceId; import org.onosproject.netconf.NetconfException; import org.onosproject.yang.model.DataNode; import org.onosproject.yang.model.LeafNode; import org.onosproject.yang.model.ListKey; | import java.net.*; import org.onosproject.net.*; import org.onosproject.netconf.*; import org.onosproject.yang.model.*; | [
"java.net",
"org.onosproject.net",
"org.onosproject.netconf",
"org.onosproject.yang"
] | java.net; org.onosproject.net; org.onosproject.netconf; org.onosproject.yang; | 882,471 |
public synchronized final void putMap(final Map<?, ?> map) {
if (map != null) {
for (final Map.Entry<?, ?> e : map.entrySet()) {
this.put(String.valueOf(e.getKey()), e.getValue());
}
}
}
| synchronized final void function(final Map<?, ?> map) { if (map != null) { for (final Map.Entry<?, ?> e : map.entrySet()) { this.put(String.valueOf(e.getKey()), e.getValue()); } } } | /**
* Store some information from a map
*
* @param map
* the map
*/ | Store some information from a map | putMap | {
"repo_name": "optimizationBenchmarking/utils-base",
"path": "src/main/java/org/optimizationBenchmarking/utils/config/ConfigurationBuilder.java",
"license": "gpl-3.0",
"size": 10445
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 958,060 |
public static Boolean setup(){
if(c == null)
new SQLite(Main.DB_FILE);
try {
//Settings Table and Data
query("CREATE TABLE `settings` (`name` VARCHAR, `value` VARCHAR)");
query("INSERT INTO `settings` VALUES('client_id','581650568827-44vbqcoujflbo87hbirj... | static Boolean function(){ if(c == null) new SQLite(Main.DB_FILE); try { query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); query(STR); setVersion(Main.getDBVersion()); } catch (SQLException e) { LOG.error(STR,e); return false;... | /**
* Sets the Database up.
*
* @return True if the database was created successfully. False if there was an error.
*/ | Sets the Database up | setup | {
"repo_name": "Meduax/YouPloader",
"path": "src/main/java/at/becast/youploader/database/SQLite.java",
"license": "mit",
"size": 18018
} | [
"at.becast.youploader.Main",
"java.sql.SQLException"
] | import at.becast.youploader.Main; import java.sql.SQLException; | import at.becast.youploader.*; import java.sql.*; | [
"at.becast.youploader",
"java.sql"
] | at.becast.youploader; java.sql; | 2,860,335 |
BackupInner innerModel();
interface Definition
extends DefinitionStages.Blank,
DefinitionStages.WithLocation,
DefinitionStages.WithParentResource,
DefinitionStages.WithCreate {
}
interface DefinitionStages {
interface Blank extends ... | BackupInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithLocation { } | /**
* Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupInner object.
*
* @return the inner object.
*/ | Gets the inner com.azure.resourcemanager.netapp.fluent.models.BackupInner object | innerModel | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/Backup.java",
"license": "mit",
"size": 9170
} | [
"com.azure.resourcemanager.netapp.fluent.models.BackupInner"
] | import com.azure.resourcemanager.netapp.fluent.models.BackupInner; | import com.azure.resourcemanager.netapp.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,164,396 |
void onChildStartedNativeGesture(MotionEvent androidEvent); | void onChildStartedNativeGesture(MotionEvent androidEvent); | /**
* Called when a child starts a native gesture (e.g. a scroll in a ScrollView). Should be called
* from the child's onTouchIntercepted implementation.
*/ | Called when a child starts a native gesture (e.g. a scroll in a ScrollView). Should be called from the child's onTouchIntercepted implementation | onChildStartedNativeGesture | {
"repo_name": "dikaiosune/react-native",
"path": "ReactAndroid/src/main/java/com/facebook/react/uimanager/RootView.java",
"license": "bsd-3-clause",
"size": 759
} | [
"android.view.MotionEvent"
] | import android.view.MotionEvent; | import android.view.*; | [
"android.view"
] | android.view; | 1,217,612 |
private byte[] createExpectedFilepartOutput(
String boundaryString,
String fileField,
File file,
String mimeType,
byte[] fileContent,
boolean firstMultipart,
boolean lastMultipart) throws IOException {
final byte[] D... | byte[] function( String boundaryString, String fileField, File file, String mimeType, byte[] fileContent, boolean firstMultipart, boolean lastMultipart) throws IOException { final byte[] DASH_DASH = "--".getBytes(ISO_8859_1); final ByteArrayOutputStream output = new ByteArrayOutputStream(); if(firstMultipart) { output.... | /**
* Create the expected file multipart
*
* @param lastMultipart true if this is the last multipart in the request
*/ | Create the expected file multipart | createExpectedFilepartOutput | {
"repo_name": "botelhojp/apache-jmeter-2.10",
"path": "test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java",
"license": "apache-2.0",
"size": 73627
} | [
"java.io.ByteArrayOutputStream",
"java.io.File",
"java.io.IOException"
] | import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 72,299 |
static void quiesceCommonPool() {
common.awaitQuiescence(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
}
/**
* Interface for extending managed parallelism for tasks running
* in {@link ForkJoinPool}s.
*
* <p>A {@code ManagedBlocker} provides two methods. Method
* {@link #isReleas... | static void quiesceCommonPool() { common.awaitQuiescence(Long.MAX_VALUE, TimeUnit.NANOSECONDS); } /** * Interface for extending managed parallelism for tasks running * in {@link ForkJoinPool}s. * * <p>A {@code ManagedBlocker} provides two methods. Method * {@link #isReleasable} must return {@code true} if blocking is *... | /**
* Waits and/or attempts to assist performing tasks indefinitely
* until the {@link #commonPool()} {@link #isQuiescent}.
*/ | Waits and/or attempts to assist performing tasks indefinitely until the <code>#commonPool()</code> <code>#isQuiescent</code> | quiesceCommonPool | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/java/util/concurrent/ForkJoinPool.java",
"license": "apache-2.0",
"size": 151621
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,749,576 |
Map<Plugin, PluginUpdatesDetails> lookupPluginsUpdates( Set<Plugin> plugins, Boolean allowSnapshots )
throws ArtifactMetadataRetrievalException, InvalidVersionSpecificationException; | Map<Plugin, PluginUpdatesDetails> lookupPluginsUpdates( Set<Plugin> plugins, Boolean allowSnapshots ) throws ArtifactMetadataRetrievalException, InvalidVersionSpecificationException; | /**
* Looks up the updates for a set of plugins.
*
* @param plugins The set of {@link Plugin} instances to look up.
* @param allowSnapshots Include snapshots in the list of updates.
* @return A map, keyed by plugin, with values of type {@link org.codehaus.mojo.versions.PluginUpdatesDetails}.
... | Looks up the updates for a set of plugins | lookupPluginsUpdates | {
"repo_name": "prostagma/versions-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/versions/api/VersionsHelper.java",
"license": "apache-2.0",
"size": 11691
} | [
"java.util.Map",
"java.util.Set",
"org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException",
"org.apache.maven.artifact.versioning.InvalidVersionSpecificationException",
"org.apache.maven.model.Plugin",
"org.codehaus.mojo.versions.PluginUpdatesDetails"
] | import java.util.Map; import java.util.Set; import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException; import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; import org.apache.maven.model.Plugin; import org.codehaus.mojo.versions.PluginUpdatesDetails; | import java.util.*; import org.apache.maven.artifact.metadata.*; import org.apache.maven.artifact.versioning.*; import org.apache.maven.model.*; import org.codehaus.mojo.versions.*; | [
"java.util",
"org.apache.maven",
"org.codehaus.mojo"
] | java.util; org.apache.maven; org.codehaus.mojo; | 1,961,971 |
public void gameOver (ServerConnectionThread conn, int tableNum, int resultType) {
Connect4Model model = ((Connect4Model)getModel(tableNum));
int player = getSeatNum(conn.getUsername(), tableNum);
// Status is either -1, DRAW or WIN
int status = -1;
Point lastMove = model.getLastMove();
... | void function (ServerConnectionThread conn, int tableNum, int resultType) { Connect4Model model = ((Connect4Model)getModel(tableNum)); int player = getSeatNum(conn.getUsername(), tableNum); int status = -1; Point lastMove = model.getLastMove(); if (model.isGameWon(player, lastMove.x, lastMove.y)) status = IGameOver.WIN... | /**
* This method is called when a client says that the game
* is over.
*
* @see org.jogre.server.ServerController#gameOver(int)
*/ | This method is called when a client says that the game is over | gameOver | {
"repo_name": "lsilvestre/Jogre",
"path": "games/connect4/src/org/jogre/connect4/server/Connect4ServerController.java",
"license": "gpl-2.0",
"size": 2816
} | [
"java.awt.Point",
"org.jogre.common.IGameOver",
"org.jogre.connect4.client.Connect4Model",
"org.jogre.server.ServerConnectionThread"
] | import java.awt.Point; import org.jogre.common.IGameOver; import org.jogre.connect4.client.Connect4Model; import org.jogre.server.ServerConnectionThread; | import java.awt.*; import org.jogre.common.*; import org.jogre.connect4.client.*; import org.jogre.server.*; | [
"java.awt",
"org.jogre.common",
"org.jogre.connect4",
"org.jogre.server"
] | java.awt; org.jogre.common; org.jogre.connect4; org.jogre.server; | 2,536,078 |
public OperatorHLAPI getContainerOperatorHLAPI(){
if(item.getContainerOperator() == null) return null;
Operator object = item.getContainerOperator();
if(object.getClass().equals(fr.lip6.move.pnml.hlpn.lists.impl.EmptyListImpl.class)){
return new fr.lip6.move.pnml.hlpn.lists.hlapi.EmptyListHLAPI((fr.l... | OperatorHLAPI function(){ if(item.getContainerOperator() == null) return null; Operator object = item.getContainerOperator(); if(object.getClass().equals(fr.lip6.move.pnml.hlpn.lists.impl.EmptyListImpl.class)){ return new fr.lip6.move.pnml.hlpn.lists.hlapi.EmptyListHLAPI((fr.lip6.move.pnml.hlpn.lists.EmptyList)object);... | /**
* This accessor automatically encapsulate an element of the current object.
* WARNING : this creates a new object in memory.
* @return : null if the element is null
*/ | This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory | getContainerOperatorHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/LengthHLAPI.java",
"license": "epl-1.0",
"size": 108262
} | [
"fr.lip6.move.pnml.hlpn.lists.Length",
"fr.lip6.move.pnml.hlpn.terms.Operator",
"fr.lip6.move.pnml.hlpn.terms.hlapi.OperatorHLAPI"
] | import fr.lip6.move.pnml.hlpn.lists.Length; import fr.lip6.move.pnml.hlpn.terms.Operator; import fr.lip6.move.pnml.hlpn.terms.hlapi.OperatorHLAPI; | import fr.lip6.move.pnml.hlpn.lists.*; import fr.lip6.move.pnml.hlpn.terms.*; import fr.lip6.move.pnml.hlpn.terms.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 379,214 |
public boolean upgradeSSTablesInKeyspace(String keyspace,
boolean excludeCurrentVersion) throws ClusterDataAdminException {
return ClusterMBeanProxy.getClusterStorageMBeanService().upgradeSSTables(keyspace,
excludeCurrentVersion);
} | boolean function(String keyspace, boolean excludeCurrentVersion) throws ClusterDataAdminException { return ClusterMBeanProxy.getClusterStorageMBeanService().upgradeSSTables(keyspace, excludeCurrentVersion); } | /**
* Upgrade SSTables in keyspace
* @param keyspace Name of the keyspace
* @return return true if operation success and else false
* @throws org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException for unable to Upgrade SSTables in keyspace due to exception
*/ | Upgrade SSTables in keyspace | upgradeSSTablesInKeyspace | {
"repo_name": "lankavitharana/carbon-storage-management",
"path": "components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/src/main/java/org/wso2/carbon/cassandra/cluster/mgt/service/ClusterOperationAdmin.java",
"license": "apache-2.0",
"size": 23939
} | [
"org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException",
"org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy"
] | import org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException; import org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy; | import org.wso2.carbon.cassandra.cluster.mgt.exception.*; import org.wso2.carbon.cassandra.cluster.mgt.mbean.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 857,907 |
public boolean isAtLeastAndroidLollipop() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
} | boolean function() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP; } | /**
* Checks is device has installed at least Lollipop Android version
*
* @return true if has installed at least Lollipop and false in opposite case
*/ | Checks is device has installed at least Lollipop Android version | isAtLeastAndroidLollipop | {
"repo_name": "nicks258/Beacon",
"path": "library/src/main/java/com/github/pwittchen/reactivebeacons/library/rx2/ReactiveBeacons.java",
"license": "apache-2.0",
"size": 5748
} | [
"android.os.Build"
] | import android.os.Build; | import android.os.*; | [
"android.os"
] | android.os; | 390,762 |
private String getRecommenderInputTable(String cp, String type) throws MasterNotRunningException,
ZooKeeperConnectionException
{
// Is it a text based recommender, than we need the collection table
// if it's a rating based recommender, we need the user table
if (TaskConfig.RECOMMENDER_TYPE_ITEMBASED.equa... | String function(String cp, String type) throws MasterNotRunningException, ZooKeeperConnectionException { if (TaskConfig.RECOMMENDER_TYPE_ITEMBASED.equals(type) TaskConfig.RECOMMENDER_TYPE_USERBASED.equals(type)) { HBaseUserTable table = new HBaseUserTable(HBaseManager.getInstance(config.getZooKeeperHost())); final Stri... | /**
* Get the input table for the recommender
* @param cp
* @return
* @throws MasterNotRunningException
* @throws ZooKeeperConnectionException
*/ | Get the input table for the recommender | getRecommenderInputTable | {
"repo_name": "beeldengeluid/zieook",
"path": "backend/zieook-backend/zieook-backend-workflow/src/main/java/nl/gridline/zieook/workflow/WorkflowScheduler.java",
"license": "apache-2.0",
"size": 39409
} | [
"nl.gridline.zieook.data.hbase.HBaseManager",
"nl.gridline.zieook.data.hbase.model.HBaseCollectionTable",
"nl.gridline.zieook.data.hbase.model.HBaseUserTable",
"nl.gridline.zieook.mapreduce.TaskConfig",
"org.apache.hadoop.hbase.MasterNotRunningException",
"org.apache.hadoop.hbase.ZooKeeperConnectionExcept... | import nl.gridline.zieook.data.hbase.HBaseManager; import nl.gridline.zieook.data.hbase.model.HBaseCollectionTable; import nl.gridline.zieook.data.hbase.model.HBaseUserTable; import nl.gridline.zieook.mapreduce.TaskConfig; import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.ZooKeepe... | import nl.gridline.zieook.data.hbase.*; import nl.gridline.zieook.data.hbase.model.*; import nl.gridline.zieook.mapreduce.*; import org.apache.hadoop.hbase.*; | [
"nl.gridline.zieook",
"org.apache.hadoop"
] | nl.gridline.zieook; org.apache.hadoop; | 1,892,847 |
public void disallowSnapshot(String[] argv) throws IOException {
DistributedFileSystem dfs = getDFS();
try {
dfs.disallowSnapshot(new Path(argv[1]));
} catch (SnapshotException e) {
throw new RemoteException(e.getClass().getName(), e.getMessage());
}
System.out.println("Disallowing s... | void function(String[] argv) throws IOException { DistributedFileSystem dfs = getDFS(); try { dfs.disallowSnapshot(new Path(argv[1])); } catch (SnapshotException e) { throw new RemoteException(e.getClass().getName(), e.getMessage()); } System.out.println(STR + argv[1] + STR); } | /**
* Allow snapshot on a directory.
* Usage: hdfs dfsadmin -disallowSnapshot snapshotDir
* @param argv List of of command line parameters.
* @exception IOException
*/ | Allow snapshot on a directory. Usage: hdfs dfsadmin -disallowSnapshot snapshotDir | disallowSnapshot | {
"repo_name": "jth/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java",
"license": "apache-2.0",
"size": 77393
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DistributedFileSystem",
"org.apache.hadoop.hdfs.protocol.SnapshotException",
"org.apache.hadoop.ipc.RemoteException"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.protocol.SnapshotException; import org.apache.hadoop.ipc.RemoteException; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.ipc.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,779,044 |
default void beforeIndexCreated(Index index, Settings indexSettings) {
} | default void beforeIndexCreated(Index index, Settings indexSettings) { } | /**
* Called before the index gets created. Note that this is also called
* when the index is created on data nodes
*/ | Called before the index gets created. Note that this is also called when the index is created on data nodes | beforeIndexCreated | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexEventListener.java",
"license": "apache-2.0",
"size": 6701
} | [
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.index.Index"
] | import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.Index; | import org.elasticsearch.common.settings.*; import org.elasticsearch.index.*; | [
"org.elasticsearch.common",
"org.elasticsearch.index"
] | org.elasticsearch.common; org.elasticsearch.index; | 1,826,555 |
private synchronized String getFeatureVectorString(TensorFlow tensorFlow, StudentImage studentImage){
// Load image into OpenCV Mat object
Mat img = Imgcodecs.imread(studentImage.getImageFileUrl());
Log.i(getClass().getName(), "StudentImage has been loaded from file " + studentImage.getImage... | synchronized String function(TensorFlow tensorFlow, StudentImage studentImage){ Mat img = Imgcodecs.imread(studentImage.getImageFileUrl()); Log.i(getClass().getName(), STR + studentImage.getImageFileUrl()); Mat featureVector = tensorFlow.getFeatureVector(img); List<Float> featureVectorList = new ArrayList<>(); Converte... | /**
* Load image into OpenCV Mat object
* Extract features from TensorFlow model
* @param tensorFlow
* @param studentImage
* @return
*/ | Load image into OpenCV Mat object Extract features from TensorFlow model | getFeatureVectorString | {
"repo_name": "schaemik/literacyapp-android",
"path": "app/src/main/java/org/literacyapp/authentication/thread/TrainingThread.java",
"license": "apache-2.0",
"size": 17883
} | [
"android.util.Log",
"ch.zhaw.facerecognitionlibrary.Recognition",
"java.util.ArrayList",
"java.util.List",
"org.literacyapp.model.StudentImage",
"org.opencv.core.Mat",
"org.opencv.imgcodecs.Imgcodecs",
"org.opencv.utils.Converters"
] | import android.util.Log; import ch.zhaw.facerecognitionlibrary.Recognition; import java.util.ArrayList; import java.util.List; import org.literacyapp.model.StudentImage; import org.opencv.core.Mat; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.utils.Converters; | import android.util.*; import ch.zhaw.facerecognitionlibrary.*; import java.util.*; import org.literacyapp.model.*; import org.opencv.core.*; import org.opencv.imgcodecs.*; import org.opencv.utils.*; | [
"android.util",
"ch.zhaw.facerecognitionlibrary",
"java.util",
"org.literacyapp.model",
"org.opencv.core",
"org.opencv.imgcodecs",
"org.opencv.utils"
] | android.util; ch.zhaw.facerecognitionlibrary; java.util; org.literacyapp.model; org.opencv.core; org.opencv.imgcodecs; org.opencv.utils; | 124,289 |
private void filterData() {
if (null == lineIndexes || lineIndexes.isEmpty()) {
return;
}
final List<Integer> requiredNumbers = convertStringOfNumbersToList(lineIndexes.trim());
if (null == requiredNumbers || requiredNumbers.size() == 0) {
return;
}
final List<Map<String, Object>> filteredData = ne... | void function() { if (null == lineIndexes lineIndexes.isEmpty()) { return; } final List<Integer> requiredNumbers = convertStringOfNumbersToList(lineIndexes.trim()); if (null == requiredNumbers requiredNumbers.size() == 0) { return; } final List<Map<String, Object>> filteredData = new ArrayList<Map<String, Object>>(); f... | /**
* Change the data received from the collector to include only the lines
* that are specified in the line indexes parameter
*/ | Change the data received from the collector to include only the lines that are specified in the line indexes parameter | filterData | {
"repo_name": "Top-Q/jsystem",
"path": "jsystem-core-projects/jsystemAnt/src/main/java/com/aqua/anttask/jsystem/JSystemDataDrivenTask.java",
"license": "apache-2.0",
"size": 7522
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 499,007 |
final synchronized void _sendDo(int option)
throws IOException
{
if (debug) // || debugoptions)
{
System.err.println("DO: " + TelnetOption.getOption(option));
}
_output_.write(_COMMAND_DO);
_output_.write(option);
_output_.flush();
... | final synchronized void _sendDo(int option) throws IOException { if (debug) { System.err.println(STR + TelnetOption.getOption(option)); } _output_.write(_COMMAND_DO); _output_.write(option); _output_.flush(); } | /**
* Sends a DO.
*
* @param option - Option code.
* @throws IOException - Exception in I/O.
**/ | Sends a DO | _sendDo | {
"repo_name": "freeacs/spp",
"path": "src/org/apache/commons/net/telnet/Telnet.java",
"license": "mit",
"size": 33872
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 413,533 |
public void testIsDebit_errorCorrection_target_expense_negativeAmount() throws Exception {
AccountingDocument accountingDocument = IsDebitTestUtils.getErrorCorrectionDocument(SpringContext.getBean(DocumentService.class), IndirectCostAdjustmentDocument.class);
AccountingLine accountingLine = IsDebitT... | void function() throws Exception { AccountingDocument accountingDocument = IsDebitTestUtils.getErrorCorrectionDocument(SpringContext.getBean(DocumentService.class), IndirectCostAdjustmentDocument.class); AccountingLine accountingLine = IsDebitTestUtils.getExpenseLine(accountingDocument, TargetAccountingLine.class, NEGA... | /**
* tests an <code>IllegalStateExcpetion</code> is thrown for a negative expense
*
* @throws Exception
*/ | tests an <code>IllegalStateExcpetion</code> is thrown for a negative expense | testIsDebit_errorCorrection_target_expense_negativeAmount | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/test/java/org/kuali/kfs/fp/document/validation/impl/IndirectCostAdjustmentDocumentRuleTest.java",
"license": "agpl-3.0",
"size": 42744
} | [
"org.kuali.kfs.fp.document.IndirectCostAdjustmentDocument",
"org.kuali.kfs.kns.service.DataDictionaryService",
"org.kuali.kfs.krad.service.DocumentService",
"org.kuali.kfs.sys.businessobject.AccountingLine",
"org.kuali.kfs.sys.businessobject.TargetAccountingLine",
"org.kuali.kfs.sys.context.SpringContext"... | import org.kuali.kfs.fp.document.IndirectCostAdjustmentDocument; import org.kuali.kfs.kns.service.DataDictionaryService; import org.kuali.kfs.krad.service.DocumentService; import org.kuali.kfs.sys.businessobject.AccountingLine; import org.kuali.kfs.sys.businessobject.TargetAccountingLine; import org.kuali.kfs.sys.conte... | import org.kuali.kfs.fp.document.*; import org.kuali.kfs.kns.service.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.sys.businessobject.*; import org.kuali.kfs.sys.context.*; import org.kuali.kfs.sys.document.*; import org.kuali.kfs.sys.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,473,105 |
public double getMarginLeft() {
// get the value
String valueString = mElement.getFoMarginLeftAttribute();
// check if a value was returned
if (valueString == null) {
// if not use the default length
valueString = DEFAULT_LENGTH;
}
// return the converted value
return Length.parseDouble(valueStri... | double function() { String valueString = mElement.getFoMarginLeftAttribute(); if (valueString == null) { valueString = DEFAULT_LENGTH; } return Length.parseDouble(valueString, Unit.MILLIMETER); } | /**
* Get the size of the left margin of this <code>ParagraphProperties</code>
*
* @return the size of the left margin (in Millimeter)
* @since 0.7
*/ | Get the size of the left margin of this <code>ParagraphProperties</code> | getMarginLeft | {
"repo_name": "jbjonesjr/geoproponis",
"path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/style/ParagraphProperties.java",
"license": "gpl-2.0",
"size": 11817
} | [
"org.odftoolkit.odfdom.type.Length"
] | import org.odftoolkit.odfdom.type.Length; | import org.odftoolkit.odfdom.type.*; | [
"org.odftoolkit.odfdom"
] | org.odftoolkit.odfdom; | 2,401,827 |
public static FeedbackSessionAttributes getFeedbackSession(String courseId, String feedbackSessionName) {
Map<String, String> params = createParamMap(BackDoorOperation.OPERATION_GET_FEEDBACK_SESSION_AS_JSON);
params.put(BackDoorOperation.PARAMETER_FEEDBACK_SESSION_NAME, feedbackSessionName);
... | static FeedbackSessionAttributes function(String courseId, String feedbackSessionName) { Map<String, String> params = createParamMap(BackDoorOperation.OPERATION_GET_FEEDBACK_SESSION_AS_JSON); params.put(BackDoorOperation.PARAMETER_FEEDBACK_SESSION_NAME, feedbackSessionName); params.put(BackDoorOperation.PARAMETER_COURS... | /**
* Gets a feedback session data from the datastore.
*/ | Gets a feedback session data from the datastore | getFeedbackSession | {
"repo_name": "VamsiSangam/teammates",
"path": "src/test/java/teammates/test/driver/BackDoor.java",
"license": "gpl-2.0",
"size": 22650
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,424,851 |
public void setAppResources(AbstractAppResources appResources,
Properties appDefaults, Class<?> context) throws AppException {
this.appDefaults = new ContextProperties(context, appDefaults);
this.defaultResources = appResources;
} | void function(AbstractAppResources appResources, Properties appDefaults, Class<?> context) throws AppException { this.appDefaults = new ContextProperties(context, appDefaults); this.defaultResources = appResources; } | /**
* Sets the application resources and the default properties.
*
* @param appResources
* the {@link AbstractAppResources}.
*
* @param appDefaults
* the application default {@link Properties}.
*
* @param context
* the context {@link Cla... | Sets the application resources and the default properties | setAppResources | {
"repo_name": "devent/globalpom-utils",
"path": "globalpomutils-projects/src/main/java/com/anrisoftware/globalpom/projects/appresources/AppResourcesLoader.java",
"license": "apache-2.0",
"size": 6082
} | [
"com.anrisoftware.globalpom.projects.appexceptions.AppException",
"com.anrisoftware.propertiesutils.ContextProperties",
"java.util.Properties"
] | import com.anrisoftware.globalpom.projects.appexceptions.AppException; import com.anrisoftware.propertiesutils.ContextProperties; import java.util.Properties; | import com.anrisoftware.globalpom.projects.appexceptions.*; import com.anrisoftware.propertiesutils.*; import java.util.*; | [
"com.anrisoftware.globalpom",
"com.anrisoftware.propertiesutils",
"java.util"
] | com.anrisoftware.globalpom; com.anrisoftware.propertiesutils; java.util; | 1,981,015 |
public static Set<Action> createConfigActions(User user, Collection<Long> revisions,
Collection<Long> serverIds, ActionType type, Date earliest,
ActionChain actionChain) {
List <Server> servers = SystemManager.hydrateServerFromIds(serverIds, user);
return createConfigActionForServer... | static Set<Action> function(User user, Collection<Long> revisions, Collection<Long> serverIds, ActionType type, Date earliest, ActionChain actionChain) { List <Server> servers = SystemManager.hydrateServerFromIds(serverIds, user); return createConfigActionForServers(user, revisions, servers, type, earliest, actionChain... | /**
* Creates configuration actions for the given server IDs.
* @param user the user scheduling actions
* @param revisions a set of revision IDs
* @param serverIds a set of server IDs
* @param type the type of configuration action
* @param earliest the earliest execution date
* @param... | Creates configuration actions for the given server IDs | createConfigActions | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/action/ActionChainManager.java",
"license": "gpl-2.0",
"size": 23405
} | [
"com.redhat.rhn.domain.action.Action",
"com.redhat.rhn.domain.action.ActionChain",
"com.redhat.rhn.domain.action.ActionType",
"com.redhat.rhn.domain.server.Server",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.manager.system.SystemManager",
"java.util.Collection",
"java.util.Date",
"java.util.... | import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionChain; import com.redhat.rhn.domain.action.ActionType; import com.redhat.rhn.domain.server.Server; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.manager.system.SystemManager; import java.util.Collection; import java.ut... | import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.manager.system.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 1,617,506 |
public static ch48Type fromPerUnaligned(byte[] encodedBytes) {
ch48Type result = new ch48Type();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static ch48Type function(byte[] encodedBytes) { ch48Type result = new ch48Type(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new ch48Type from encoded stream.
*/ | Creates a new ch48Type from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/ver2_ulp_components/SupportedWLANApsChannel11a.java",
"license": "apache-2.0",
"size": 60534
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,495,982 |
public void setTransactionSettlementAmount(String transactionSettlementAmount) {
if (StringUtils.isNotBlank(transactionSettlementAmount)) {
this.transactionSettlementAmount = new KualiDecimal(transactionSettlementAmount);
}
else {
this.transactionSettlementAmount... | void function(String transactionSettlementAmount) { if (StringUtils.isNotBlank(transactionSettlementAmount)) { this.transactionSettlementAmount = new KualiDecimal(transactionSettlementAmount); } else { this.transactionSettlementAmount = KualiDecimal.ZERO; } } | /**
* Sets the transactionSettlementAmount attribute.
*
* @param transactionSettlementAmount The transactionSettlementAmount to set.
*/ | Sets the transactionSettlementAmount attribute | setTransactionSettlementAmount | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/businessobject/ProcurementCardTransaction.java",
"license": "agpl-3.0",
"size": 36114
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.apache.commons.lang.*; import org.kuali.rice.core.api.util.type.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 2,696,959 |
public AnnotatedTypeBuilder<X> removeFromParameter(AnnotatedParameter<? super X> parameter,
Class<? extends Annotation> annotationType)
{
if (parameter.getDeclaringCallable().getJavaMember() instanceof Method)
{
Method method = (... | AnnotatedTypeBuilder<X> function(AnnotatedParameter<? super X> parameter, Class<? extends Annotation> annotationType) { if (parameter.getDeclaringCallable().getJavaMember() instanceof Method) { Method method = (Method) parameter.getDeclaringCallable().getJavaMember(); return removeFromMethodParameter(method, parameter.... | /**
* Remove an annotation from the specified parameter.
*
* @param parameter the parameter to remove the annotation from
* @param annotationType the annotation type to remove
* @throws IllegalArgumentException if the annotationType is null, if the
* c... | Remove an annotation from the specified parameter | removeFromParameter | {
"repo_name": "kenfinnigan/DeltaSpike",
"path": "deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/metadata/builder/AnnotatedTypeBuilder.java",
"license": "apache-2.0",
"size": 39728
} | [
"java.lang.annotation.Annotation",
"java.lang.reflect.Constructor",
"java.lang.reflect.Method",
"javax.enterprise.inject.spi.AnnotatedParameter"
] | import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import javax.enterprise.inject.spi.AnnotatedParameter; | import java.lang.annotation.*; import java.lang.reflect.*; import javax.enterprise.inject.spi.*; | [
"java.lang",
"javax.enterprise"
] | java.lang; javax.enterprise; | 1,874,887 |
public IgniteUuid xid(); | IgniteUuid function(); | /**
* Gets unique identifier for this transaction.
*
* @return Transaction UID.
*/ | Gets unique identifier for this transaction | xid | {
"repo_name": "amirakhmedov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java",
"license": "apache-2.0",
"size": 18876
} | [
"org.apache.ignite.lang.IgniteUuid"
] | import org.apache.ignite.lang.IgniteUuid; | import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,141,622 |
private Map<ConfigurationKey, Object> getSystemProperties() {
Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class);
for (ConfigurationKey key : ConfigurationKey.values()) {
String property = getSystemProperty(key.get());
if (prop... | Map<ConfigurationKey, Object> function() { Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (ConfigurationKey key : ConfigurationKey.values()) { String property = getSystemProperty(key.get()); if (property != null) { processKeyValue(found, key, property); } } retu... | /**
* Iterate through the {@link ConfigurationKey#values()} and try to get a system property for every key. The value is automatically converted - a runtime
* exception may be thrown during conversion.
*
* @return all the properties set as system properties
*/ | Iterate through the <code>ConfigurationKey#values()</code> and try to get a system property for every key. The value is automatically converted - a runtime exception may be thrown during conversion | getSystemProperties | {
"repo_name": "weld/core",
"path": "impl/src/main/java/org/jboss/weld/config/WeldConfiguration.java",
"license": "apache-2.0",
"size": 20464
} | [
"java.util.EnumMap",
"java.util.Map"
] | import java.util.EnumMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,103,256 |
public static Endpoint getEndpointInjection(CamelContext camelContext, String uri, String ref, String injectionPointName, boolean mandatory) {
if (ObjectHelper.isNotEmpty(uri) && ObjectHelper.isNotEmpty(ref)) {
throw new IllegalArgumentException("Both uri and name is provided, only either one is... | static Endpoint function(CamelContext camelContext, String uri, String ref, String injectionPointName, boolean mandatory) { if (ObjectHelper.isNotEmpty(uri) && ObjectHelper.isNotEmpty(ref)) { throw new IllegalArgumentException(STR + uri + STR + ref); } Endpoint endpoint; if (isNotEmpty(uri)) { endpoint = camelContext.g... | /**
* Evaluates the @EndpointInject annotation using the given context
*/ | Evaluates the @EndpointInject annotation using the given context | getEndpointInjection | {
"repo_name": "jkorab/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java",
"license": "apache-2.0",
"size": 32345
} | [
"org.apache.camel.CamelContext",
"org.apache.camel.Endpoint",
"org.apache.camel.util.ObjectHelper"
] | import org.apache.camel.CamelContext; import org.apache.camel.Endpoint; import org.apache.camel.util.ObjectHelper; | import org.apache.camel.*; import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 792,767 |
protected Set<Itemset> generateCandidateSizeK(Set<Itemset> levelK_1) {
// Initialize the set of candidates
Set<Itemset> candidates = new HashSet<Itemset>();
// For each itemset I1 and I2 of level k-1
for(Itemset itemset1 : levelK_1){
for(Itemset itemset2 : levelK_1){
// If I1 is smaller than I... | Set<Itemset> function(Set<Itemset> levelK_1) { Set<Itemset> candidates = new HashSet<Itemset>(); for(Itemset itemset1 : levelK_1){ for(Itemset itemset2 : levelK_1){ Integer missing = itemset1.allTheSameExceptLastItem(itemset2); if(missing != null ){ int newItemset[] = new int[itemset1.size()+1]; System.arraycopy(itemse... | /**
* Generating candidate itemsets of size k from frequent itemsets of size
* k-1. This is called "apriori-gen" in the paper by agrawal. This method is
* also used by the Apriori algorithm for generating candidates.
*
* @param levelK_1 a set of itemsets of size k-1
* @return a set of candidates
... | Generating candidate itemsets of size k from frequent itemsets of size k-1. This is called "apriori-gen" in the paper by agrawal. This method is also used by the Apriori algorithm for generating candidates | generateCandidateSizeK | {
"repo_name": "matheusmmcs/SPMF-UseSkill",
"path": "src/ca/pfv/spmf/algorithms/sequential_rules/cmrules/AlgoCMRules.java",
"license": "mit",
"size": 26989
} | [
"ca.pfv.spmf.patterns.itemset_array_integers_with_tids.Itemset",
"java.util.HashSet",
"java.util.Set"
] | import ca.pfv.spmf.patterns.itemset_array_integers_with_tids.Itemset; import java.util.HashSet; import java.util.Set; | import ca.pfv.spmf.patterns.itemset_array_integers_with_tids.*; import java.util.*; | [
"ca.pfv.spmf",
"java.util"
] | ca.pfv.spmf; java.util; | 879,781 |
protected void onUnhandledInboundException(Throwable cause) {
try {
logger.warn(
"An exceptionCaught() event was fired, and it reached at the tail of the pipeline. " +
"It usually means the last handler in the pipeline did not handle the exception.... | void function(Throwable cause) { try { logger.warn( STR + STR, cause); } finally { ReferenceCountUtil.release(cause); } } | /**
* Called once a {@link Throwable} hit the end of the {@link ChannelPipeline} without been handled by the user
* in {@link ChannelHandler#exceptionCaught(ChannelHandlerContext, Throwable)}.
*/ | Called once a <code>Throwable</code> hit the end of the <code>ChannelPipeline</code> without been handled by the user in <code>ChannelHandler#exceptionCaught(ChannelHandlerContext, Throwable)</code> | onUnhandledInboundException | {
"repo_name": "bryce-anderson/netty",
"path": "transport/src/main/java/io/netty/channel/DefaultChannelPipeline.java",
"license": "apache-2.0",
"size": 50951
} | [
"io.netty.util.ReferenceCountUtil"
] | import io.netty.util.ReferenceCountUtil; | import io.netty.util.*; | [
"io.netty.util"
] | io.netty.util; | 850,007 |
public PactDslResponse body(DslPart body) {
DslPart parent = body.close();
if (parent instanceof PactDslJsonRootValue) {
((PactDslJsonRootValue)parent).setEncodeJson(true);
}
responseMatchers.addCategory(parent.getMatchers());
responseGenerators.addGenerators(parent.generator... | PactDslResponse function(DslPart body) { DslPart parent = body.close(); if (parent instanceof PactDslJsonRootValue) { ((PactDslJsonRootValue)parent).setEncodeJson(true); } responseMatchers.addCategory(parent.getMatchers()); responseGenerators.addGenerators(parent.generators); Charset charset = Charset.defaultCharset();... | /**
* Response body to return
*
* @param body Response body built using the Pact body DSL
*/ | Response body to return | body | {
"repo_name": "DiUS/pact-jvm",
"path": "consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslResponse.java",
"license": "apache-2.0",
"size": 16762
} | [
"au.com.dius.pact.core.model.OptionalBody",
"java.nio.charset.Charset",
"org.apache.http.entity.ContentType"
] | import au.com.dius.pact.core.model.OptionalBody; import java.nio.charset.Charset; import org.apache.http.entity.ContentType; | import au.com.dius.pact.core.model.*; import java.nio.charset.*; import org.apache.http.entity.*; | [
"au.com.dius",
"java.nio",
"org.apache.http"
] | au.com.dius; java.nio; org.apache.http; | 490,120 |
boolean clientSelectByPrimaryKeyMethodGenerated(Method method,
Interface interfaze, IntrospectedTable introspectedTable); | boolean clientSelectByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable); | /**
* This method is called when the selectByPrimaryKey method has been
* generated in the client interface.
*
* @param method
* the generated selectByPrimaryKey method
* @param interfaze
* the partially implemented client interface. You can add
* ... | This method is called when the selectByPrimaryKey method has been generated in the client interface | clientSelectByPrimaryKeyMethodGenerated | {
"repo_name": "NanYoMy/mybatis-generator",
"path": "src/main/java/org/mybatis/generator/api/Plugin.java",
"license": "mit",
"size": 72792
} | [
"org.mybatis.generator.api.dom.java.Interface",
"org.mybatis.generator.api.dom.java.Method"
] | import org.mybatis.generator.api.dom.java.Interface; import org.mybatis.generator.api.dom.java.Method; | import org.mybatis.generator.api.dom.java.*; | [
"org.mybatis.generator"
] | org.mybatis.generator; | 2,749,848 |
public Map<String, Summoner> getSummoner(String... names){
return get(String.format("by-name/%s", Joiner.on(',').skipNulls().join(Arrays.asList(names))))
.getEntity(new GenericType<Map<String, Summoner>>(){});
} | Map<String, Summoner> function(String... names){ return get(String.format(STR, Joiner.on(',').skipNulls().join(Arrays.asList(names)))) .getEntity(new GenericType<Map<String, Summoner>>(){}); } | /**
* Get summoner objects mapped by standardized summoner name
* @see <a href="https://developer.riotgames.com/api/methods#!/355/1196">https://developer.riotgames.com/api/methods#!/355/1196</a>
* @param names one or more summoner names
* @return a map of summoner data
*/ | Get summoner objects mapped by standardized summoner name | getSummoner | {
"repo_name": "jlinn/riot-api-java",
"path": "src/main/java/net/joelinn/riot/summoner/SummonerClient.java",
"license": "apache-2.0",
"size": 4262
} | [
"com.google.common.base.Joiner",
"com.sun.jersey.api.client.GenericType",
"java.util.Arrays",
"java.util.Map",
"net.joelinn.riot.summoner.dto.Summoner"
] | import com.google.common.base.Joiner; import com.sun.jersey.api.client.GenericType; import java.util.Arrays; import java.util.Map; import net.joelinn.riot.summoner.dto.Summoner; | import com.google.common.base.*; import com.sun.jersey.api.client.*; import java.util.*; import net.joelinn.riot.summoner.dto.*; | [
"com.google.common",
"com.sun.jersey",
"java.util",
"net.joelinn.riot"
] | com.google.common; com.sun.jersey; java.util; net.joelinn.riot; | 1,498,740 |
@Impure
public static void warning(@Nonnull CharSequence message, @Nullable Throwable throwable, @NonCaptured @Unmodified @Nonnull @NullableElements Object... arguments) {
Logger.log(Level.WARNING, message, throwable, arguments);
} | static void function(@Nonnull CharSequence message, @Nullable Throwable throwable, @NonCaptured @Unmodified @Nonnull @NullableElements Object... arguments) { Logger.log(Level.WARNING, message, throwable, arguments); } | /**
* Logs the given message and throwable as a warning that indicate potential problems in the program.
* Each dollar sign in the message is replaced with the corresponding argument.
*/ | Logs the given message and throwable as a warning that indicate potential problems in the program. Each dollar sign in the message is replaced with the corresponding argument | warning | {
"repo_name": "synacts/digitalid-utility",
"path": "logging/src/main/java/net/digitalid/utility/logging/Log.java",
"license": "apache-2.0",
"size": 7290
} | [
"javax.annotation.Nonnull",
"javax.annotation.Nullable",
"net.digitalid.utility.annotations.ownership.NonCaptured",
"net.digitalid.utility.annotations.parameter.Unmodified",
"net.digitalid.utility.logging.logger.Logger",
"net.digitalid.utility.validation.annotations.elements.NullableElements"
] | import javax.annotation.Nonnull; import javax.annotation.Nullable; import net.digitalid.utility.annotations.ownership.NonCaptured; import net.digitalid.utility.annotations.parameter.Unmodified; import net.digitalid.utility.logging.logger.Logger; import net.digitalid.utility.validation.annotations.elements.NullableEleme... | import javax.annotation.*; import net.digitalid.utility.annotations.ownership.*; import net.digitalid.utility.annotations.parameter.*; import net.digitalid.utility.logging.logger.*; import net.digitalid.utility.validation.annotations.elements.*; | [
"javax.annotation",
"net.digitalid.utility"
] | javax.annotation; net.digitalid.utility; | 325,205 |
EAttribute getFeatureCall_ArrayAccess(); | EAttribute getFeatureCall_ArrayAccess(); | /**
* Returns the meta object for the attribute '{@link org.yakindu.base.expressions.expressions.FeatureCall#isArrayAccess <em>Array Access</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Array Access</em>'.
* @see org.yakindu.base.expressions.express... | Returns the meta object for the attribute '<code>org.yakindu.base.expressions.expressions.FeatureCall#isArrayAccess Array Access</code>'. | getFeatureCall_ArrayAccess | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.base.expressions/emf-gen/org/yakindu/base/expressions/expressions/ExpressionsPackage.java",
"license": "epl-1.0",
"size": 108238
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,930,868 |
public Sku sku() {
return this.sku;
} | Sku function() { return this.sku; } | /**
* Get the sku property: The SKU (pricing tier) of the server.
*
* @return the sku value.
*/ | Get the sku property: The SKU (pricing tier) of the server | sku | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/fluent/models/ServerInner.java",
"license": "mit",
"size": 15590
} | [
"com.azure.resourcemanager.postgresql.models.Sku"
] | import com.azure.resourcemanager.postgresql.models.Sku; | import com.azure.resourcemanager.postgresql.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,301,448 |
@Override public T visitLeftJoin(@NotNull CQLParser.LeftJoinContext ctx) { return visitChildren(ctx); } | @Override public T visitLeftJoin(@NotNull CQLParser.LeftJoinContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
* <p/>
* The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitDatasourceQueryArguments | {
"repo_name": "jack6215/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserBaseVisitor.java",
"license": "apache-2.0",
"size": 44928
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,486,289 |
private void writeNodes(RowOutputInterface out) throws IOException {
out.writeSize(storageSize);
Node n = nPrimaryNode;
while (n != null) {
n.write(out);
n = n.nNext;
}
hasNodesChanged = false;
} | void function(RowOutputInterface out) throws IOException { out.writeSize(storageSize); Node n = nPrimaryNode; while (n != null) { n.write(out); n = n.nNext; } hasNodesChanged = false; } | /**
* Writes the Nodes, immediately after the row size.
*
* @param out
*
* @throws IOException
* @throws HsqlException
*/ | Writes the Nodes, immediately after the row size | writeNodes | {
"repo_name": "proudh0n/emergencymasta",
"path": "hsqldb/src/org/hsqldb/CachedRow.java",
"license": "gpl-2.0",
"size": 11612
} | [
"java.io.IOException",
"org.hsqldb.rowio.RowOutputInterface"
] | import java.io.IOException; import org.hsqldb.rowio.RowOutputInterface; | import java.io.*; import org.hsqldb.rowio.*; | [
"java.io",
"org.hsqldb.rowio"
] | java.io; org.hsqldb.rowio; | 2,401,892 |
public static TemplateQueryBuilder templateQuery(Template template) {
return new TemplateQueryBuilder(template);
} | static TemplateQueryBuilder function(Template template) { return new TemplateQueryBuilder(template); } | /**
* Facilitates creating template query requests using an inline script
*/ | Facilitates creating template query requests using an inline script | templateQuery | {
"repo_name": "markharwood/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java",
"license": "apache-2.0",
"size": 31175
} | [
"org.elasticsearch.script.Template"
] | import org.elasticsearch.script.Template; | import org.elasticsearch.script.*; | [
"org.elasticsearch.script"
] | org.elasticsearch.script; | 2,335,366 |
public List<AstNode> getStatements() {
List<AstNode> stmts = new ArrayList<AstNode>();
Node n = getFirstChild();
while (n != null) {
stmts.add((AstNode)n);
n = n.getNext();
}
return stmts;
} | List<AstNode> function() { List<AstNode> stmts = new ArrayList<AstNode>(); Node n = getFirstChild(); while (n != null) { stmts.add((AstNode)n); n = n.getNext(); } return stmts; } | /**
* Returns a copy of the child list, with each child cast to an
* {@link AstNode}.
* @throws ClassCastException if any non-{@code AstNode} objects are
* in the child list, e.g. if this method is called after the code
* generator begins the tree transformation.
*/ | Returns a copy of the child list, with each child cast to an <code>AstNode</code> | getStatements | {
"repo_name": "tntim96/rhino-jscover-repackaged",
"path": "src/jscover/mozilla/javascript/ast/Scope.java",
"license": "mpl-2.0",
"size": 7389
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,193,370 |
public String getFontName(Locale lc)
{
return peer.getFontName(this, lc);
} | String function(Locale lc) { return peer.getFontName(this, lc); } | /**
* Returns the font face name of the font. A font face name describes a
* specific variant of a font family (such as Helvetica Bold). It is more
* specific than both a font family name (such as Helvetica).
*
* @param lc The locale in which to describe the name of the font face.
*
* @return A st... | Returns the font face name of the font. A font face name describes a specific variant of a font family (such as Helvetica Bold). It is more specific than both a font family name (such as Helvetica) | getFontName | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/java/awt/Font.java",
"license": "gpl-2.0",
"size": 44671
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 504,228 |
public BatchAIBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
private SerializerAdapter serializerAdapter; | BatchAIBuilder function(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } private SerializerAdapter serializerAdapter; | /**
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
* @return the BatchAIBuilder.
*/ | Sets The HTTP pipeline to send requests through | pipeline | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batchai/azure-resourcemanager-batchai/src/main/java/com/azure/resourcemanager/batchai/implementation/BatchAIBuilder.java",
"license": "mit",
"size": 4347
} | [
"com.azure.core.http.HttpPipeline",
"com.azure.core.util.serializer.SerializerAdapter"
] | import com.azure.core.http.HttpPipeline; import com.azure.core.util.serializer.SerializerAdapter; | import com.azure.core.http.*; import com.azure.core.util.serializer.*; | [
"com.azure.core"
] | com.azure.core; | 2,256,351 |
if (name == null) name = AppConstants.ROOT_FOLDER;
List<String> children = new ArrayList<String>();
List<String> feedIds = new ArrayList<String>();
for (JsonElement jsonElement : arrayValue) {
// a folder array contains either feed IDs or nested folder objects
if(jsonElement.isJsonPrimitive()... | if (name == null) name = AppConstants.ROOT_FOLDER; List<String> children = new ArrayList<String>(); List<String> feedIds = new ArrayList<String>(); for (JsonElement jsonElement : arrayValue) { if(jsonElement.isJsonPrimitive()) { feedIds.add(jsonElement.getAsString()); } else if (jsonElement.isJsonObject()) { Set<Entry<... | /**
* Parses a folder, which is a list of feeds and/or more folders.
*
* @param parentNames folder that surrounded this folder.
* @param name the name of this folder or null if root.
* @param arrayValue the contents to be parsed.
*/ | Parses a folder, which is a list of feeds and/or more folders | parseFolderArray | {
"repo_name": "samuelclay/NewsBlur",
"path": "clients/android/NewsBlur/src/com/newsblur/network/domain/FeedFolderResponse.java",
"license": "mit",
"size": 6769
} | [
"android.util.Log",
"com.google.gson.JsonArray",
"com.google.gson.JsonElement",
"com.google.gson.JsonObject",
"com.newsblur.domain.Folder",
"com.newsblur.util.AppConstants",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.Set"
] | import android.util.Log; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.newsblur.domain.Folder; import com.newsblur.util.AppConstants; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; | import android.util.*; import com.google.gson.*; import com.newsblur.domain.*; import com.newsblur.util.*; import java.util.*; | [
"android.util",
"com.google.gson",
"com.newsblur.domain",
"com.newsblur.util",
"java.util"
] | android.util; com.google.gson; com.newsblur.domain; com.newsblur.util; java.util; | 2,612,129 |
public void navigate() {
browser.navigate().refresh();
Graphene.goTo(this.getClass());
Console.withBrowser(browser).waitUntilLoaded();
} | void function() { browser.navigate().refresh(); Graphene.goTo(this.getClass()); Console.withBrowser(browser).waitUntilLoaded(); } | /**
* Navigates to page url
*/ | Navigates to page url | navigate | {
"repo_name": "cypo721/testsuite",
"path": "src/main/java/org/jboss/hal/testsuite/page/BasePage.java",
"license": "lgpl-2.1",
"size": 8940
} | [
"org.jboss.arquillian.graphene.Graphene",
"org.jboss.hal.testsuite.util.Console"
] | import org.jboss.arquillian.graphene.Graphene; import org.jboss.hal.testsuite.util.Console; | import org.jboss.arquillian.graphene.*; import org.jboss.hal.testsuite.util.*; | [
"org.jboss.arquillian",
"org.jboss.hal"
] | org.jboss.arquillian; org.jboss.hal; | 585,507 |
public static Pattern getEndsWithAnyPattern(String[] terms){
StringBuffer sb = new StringBuffer();
sb.append("(?s).*");
buildFindAnyPattern(terms, sb);
sb.append("\\z");
return Pattern.compile(sb.toString());
} | static Pattern function(String[] terms){ StringBuffer sb = new StringBuffer(); sb.append(STR); buildFindAnyPattern(terms, sb); sb.append("\\z"); return Pattern.compile(sb.toString()); } | /**
* Compile a pattern that can will match a string if the string
* ends with any of the given terms.
* <p>
* Usage:<br>
* <code>boolean b = getEndsWithAnyPattern(terms).matcher(s).matches();</code>
* <p>
* If multiple strings are matched against the same set of terms,
* it is more efficient to reuse t... | Compile a pattern that can will match a string if the string ends with any of the given terms. Usage: <code>boolean b = getEndsWithAnyPattern(terms).matcher(s).matches();</code> If multiple strings are matched against the same set of terms, it is more efficient to reuse the pattern returned by this function | getEndsWithAnyPattern | {
"repo_name": "jimmyLian001/SpringLearn",
"path": "src/main/java/com/jimmy/Util/StringHelper.java",
"license": "apache-2.0",
"size": 55239
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,942,362 |
public DBResult query(String query) {
return query(new CustomQuery(query));
} | DBResult function(String query) { return query(new CustomQuery(query)); } | /**
* Queries an SQL string query and returns the result as DBResult.
*
* @param query the SQL string query.
* @return the result as DBResult.
*/ | Queries an SQL string query and returns the result as DBResult | query | {
"repo_name": "JackWhite20/Cyclone",
"path": "core/src/main/java/de/jackwhite20/cyclone/Cyclone.java",
"license": "gpl-3.0",
"size": 5635
} | [
"de.jackwhite20.cyclone.db.DBResult",
"de.jackwhite20.cyclone.query.CustomQuery"
] | import de.jackwhite20.cyclone.db.DBResult; import de.jackwhite20.cyclone.query.CustomQuery; | import de.jackwhite20.cyclone.db.*; import de.jackwhite20.cyclone.query.*; | [
"de.jackwhite20.cyclone"
] | de.jackwhite20.cyclone; | 1,394,962 |
@Override
public AspectGenerator<X> create(AnnotatedMethod<? super X> method,
boolean isEnhanced)
{
return _next.create(method, isEnhanced);
} | AspectGenerator<X> function(AnnotatedMethod<? super X> method, boolean isEnhanced) { return _next.create(method, isEnhanced); } | /**
* Returns an aspect for the method if one exists.
*/ | Returns an aspect for the method if one exists | create | {
"repo_name": "CleverCloud/Quercus",
"path": "resin/src/main/java/com/caucho/config/gen/AbstractAspectFactory.java",
"license": "gpl-2.0",
"size": 3630
} | [
"javax.enterprise.inject.spi.AnnotatedMethod"
] | import javax.enterprise.inject.spi.AnnotatedMethod; | import javax.enterprise.inject.spi.*; | [
"javax.enterprise"
] | javax.enterprise; | 1,817,383 |
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
if (headerField != null) {
for (String rateLimitField : headerField) {
String[] split = rateLimitField.split(":");
if (split.length == 2) {
map.put(Integer.valueOf(split[1]), Integer.valueOf(split[0]));
}
}
}
return map... | Map<Integer, Integer> map = new HashMap<Integer, Integer>(); if (headerField != null) { for (String rateLimitField : headerField) { String[] split = rateLimitField.split(":"); if (split.length == 2) { map.put(Integer.valueOf(split[1]), Integer.valueOf(split[0])); } } } return map; } | /**
* Parses a given header field of rate limits or rate limit counts.
*
* @param headerField
* header field to parse
* @return A map, mapping interval to rate limit / rate limit count
*/ | Parses a given header field of rate limits or rate limit counts | getIntervalCountMapFromHeaderField | {
"repo_name": "taycaldwell/riot-api-java",
"path": "src/main/java/net/rithms/riot/api/request/ratelimit/BufferedRateLimitHandler.java",
"license": "apache-2.0",
"size": 5284
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 957,121 |
private Set<SosProcedureDescription> getChildProcedures()
throws OwsExceptionReport {
final Collection<String> childIdentfiers =
getCache().getChildProcedures(getIdentifier(), false, false);
if (CollectionHelper.isEmpty(childIdentfiers)) {
return Sets.newHas... | Set<SosProcedureDescription> function() throws OwsExceptionReport { final Collection<String> childIdentfiers = getCache().getChildProcedures(getIdentifier(), false, false); if (CollectionHelper.isEmpty(childIdentfiers)) { return Sets.newHashSet(); } if (procedureCache == null) { procedureCache = createProcedureCache();... | /**
* Add a collection of child procedures to a procedure
*
* @param procedure
* Parent procedure identifier
* @param outputFormat
* Procedure description format
* @param version
* Service version
* @param cache
* Loaded proce... | Add a collection of child procedures to a procedure | getChildProcedures | {
"repo_name": "nuest/SOS",
"path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/util/procedure/enrich/RelatedProceduresEnrichment.java",
"license": "gpl-2.0",
"size": 8356
} | [
"com.google.common.collect.Sets",
"java.util.Collection",
"java.util.Set",
"org.n52.sos.ds.hibernate.entities.Procedure",
"org.n52.sos.ds.hibernate.entities.TProcedure",
"org.n52.sos.ds.hibernate.entities.ValidProcedureTime",
"org.n52.sos.ogc.gml.time.TimePeriod",
"org.n52.sos.ogc.ows.OwsExceptionRepo... | import com.google.common.collect.Sets; import java.util.Collection; import java.util.Set; import org.n52.sos.ds.hibernate.entities.Procedure; import org.n52.sos.ds.hibernate.entities.TProcedure; import org.n52.sos.ds.hibernate.entities.ValidProcedureTime; import org.n52.sos.ogc.gml.time.TimePeriod; import org.n52.sos.o... | import com.google.common.collect.*; import java.util.*; import org.n52.sos.ds.hibernate.entities.*; import org.n52.sos.ogc.gml.time.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.ogc.sos.*; import org.n52.sos.util.*; | [
"com.google.common",
"java.util",
"org.n52.sos"
] | com.google.common; java.util; org.n52.sos; | 1,577,890 |
@Nullable()
public String getKeyTabPath()
{
return keyTabPath;
} | @Nullable() String function() { return keyTabPath; } | /**
* Retrieves the path to the keytab file from which to obtain the user
* credentials. This will only be used if {@link #useKeyTab} returns
* {@code true}.
*
* @return The path to the keytab file from which to obtain the user
* credentials, or {@code null} if the default keytab location s... | Retrieves the path to the keytab file from which to obtain the user credentials. This will only be used if <code>#useKeyTab</code> returns true | getKeyTabPath | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/GSSAPIBindRequestProperties.java",
"license": "gpl-2.0",
"size": 37081
} | [
"com.unboundid.util.Nullable"
] | import com.unboundid.util.Nullable; | import com.unboundid.util.*; | [
"com.unboundid.util"
] | com.unboundid.util; | 1,294,672 |
public McastRouteSource findMcastSource(IpPrefix saddr, IpPrefix gaddr) {
McastRouteGroup grp = findMcastGroup(checkNotNull(gaddr));
if (grp == null) {
return null;
}
return grp.findSource(saddr);
} | McastRouteSource function(IpPrefix saddr, IpPrefix gaddr) { McastRouteGroup grp = findMcastGroup(checkNotNull(gaddr)); if (grp == null) { return null; } return grp.findSource(saddr); } | /**
* Find the multicast (S, G) entry if it exists.
*
* @param saddr the source address
* @param gaddr the group address
* @return The multicast source route entry if it exists, null if it does not.
*/ | Find the multicast (S, G) entry if it exists | findMcastSource | {
"repo_name": "packet-tracker/onos-1.4.0-custom-build",
"path": "apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteTable.java",
"license": "apache-2.0",
"size": 11479
} | [
"org.onlab.packet.IpPrefix"
] | import org.onlab.packet.IpPrefix; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 1,603,210 |
public boolean isUnrestricted(Player player) {
return validationService.isUnrestricted(player.getName());
} | boolean function(Player player) { return validationService.isUnrestricted(player.getName()); } | /**
* Check whether the given player is unrestricted. For such players, AuthMe will not require
* them to authenticate.
*
* @param player The player to verify
* @return true if the player is unrestricted
* @see fr.xephi.authme.settings.properties.RestrictionSettings#UNRESTRICTED_NAMES
... | Check whether the given player is unrestricted. For such players, AuthMe will not require them to authenticate | isUnrestricted | {
"repo_name": "Xephi/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/api/v3/AuthMeApi.java",
"license": "gpl-3.0",
"size": 11098
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 312,381 |
public NetworkBuilder<N, E> expectedEdgeCount(int expectedEdgeCount) {
this.expectedEdgeCount = Optional.of(checkNonNegative(expectedEdgeCount));
return this;
} | NetworkBuilder<N, E> function(int expectedEdgeCount) { this.expectedEdgeCount = Optional.of(checkNonNegative(expectedEdgeCount)); return this; } | /**
* Specifies the expected number of edges in the network.
*
* @throws IllegalArgumentException if {@code expectedEdgeCount} is negative
*/ | Specifies the expected number of edges in the network | expectedEdgeCount | {
"repo_name": "mosoft521/guava",
"path": "guava/src/com/google/common/graph/NetworkBuilder.java",
"license": "apache-2.0",
"size": 7152
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 501,813 |
List<Tag> getAllTags();
| List<Tag> getAllTags(); | /**
* Retrieves all the platform tags from the database
*
* @return tags
*/ | Retrieves all the platform tags from the database | getAllTags | {
"repo_name": "CCAFS/tpe",
"path": "tpe/src/main/java/org/cgiar/dapa/ccafs/tpe/service/ITPEService.java",
"license": "gpl-3.0",
"size": 16640
} | [
"java.util.List",
"org.cgiar.dapa.ccafs.tpe.entity.Tag"
] | import java.util.List; import org.cgiar.dapa.ccafs.tpe.entity.Tag; | import java.util.*; import org.cgiar.dapa.ccafs.tpe.entity.*; | [
"java.util",
"org.cgiar.dapa"
] | java.util; org.cgiar.dapa; | 2,740,480 |
@Override public void enterVariableInit(@NotNull BigDataScriptParser.VariableInitContext ctx) { } | @Override public void enterVariableInit(@NotNull BigDataScriptParser.VariableInitContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitKill | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptBaseListener.java",
"license": "apache-2.0",
"size": 36363
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 449,940 |
public Bitmap makeIcon() {
int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
mContainer.measure(measureSpec, measureSpec);
int measuredWidth = mContainer.getMeasuredWidth();
int measuredHeight = mContainer.getMeasuredHeight();
mContainer.l... | Bitmap function() { int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); mContainer.measure(measureSpec, measureSpec); int measuredWidth = mContainer.getMeasuredWidth(); int measuredHeight = mContainer.getMeasuredHeight(); mContainer.layout(0, 0, measuredWidth, measuredHeight); if (mRota... | /**
* Creates an icon with the current content and style.
* <p/>
* This method is useful if a custom view has previously been set, or if text content is not
* applicable.
*/ | Creates an icon with the current content and style. This method is useful if a custom view has previously been set, or if text content is not applicable | makeIcon | {
"repo_name": "googlemaps/android-maps-utils",
"path": "library/src/main/java/com/google/maps/android/ui/IconGenerator.java",
"license": "apache-2.0",
"size": 9647
} | [
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Color",
"android.view.View"
] | import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.view.View; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 2,711,041 |
@Override
public Constructor<CompilerPhase> getClassConstructor() {
return constructor;
}
private BasicBlock[] topOrder;
@Override
public String getName() { return "Estimate Block Frequencies"; } | Constructor<CompilerPhase> function() { return constructor; } private BasicBlock[] topOrder; public String getName() { return STR; } | /**
* Get a constructor object for this compiler phase
* @return compiler phase constructor
*/ | Get a constructor object for this compiler phase | getClassConstructor | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/controlflow/EstimateBlockFrequencies.java",
"license": "epl-1.0",
"size": 10563
} | [
"java.lang.reflect.Constructor",
"org.jikesrvm.compilers.opt.driver.CompilerPhase",
"org.jikesrvm.compilers.opt.ir.BasicBlock"
] | import java.lang.reflect.Constructor; import org.jikesrvm.compilers.opt.driver.CompilerPhase; import org.jikesrvm.compilers.opt.ir.BasicBlock; | import java.lang.reflect.*; import org.jikesrvm.compilers.opt.driver.*; import org.jikesrvm.compilers.opt.ir.*; | [
"java.lang",
"org.jikesrvm.compilers"
] | java.lang; org.jikesrvm.compilers; | 1,048,297 |
public static void writeLines(File file, String encoding, Collection<?> lines, boolean append) throws IOException {
writeLines(file, encoding, lines, null, append);
}
| static void function(File file, String encoding, Collection<?> lines, boolean append) throws IOException { writeLines(file, encoding, lines, null, append); } | /**
* Writes the <code>toString()</code> value of each item in a collection to
* the specified <code>File</code> line by line, optionally appending.
* The specified character encoding and the default line ending will be used.
*
* @param file the file to write to
* @param encoding... | Writes the <code>toString()</code> value of each item in a collection to the specified <code>File</code> line by line, optionally appending. The specified character encoding and the default line ending will be used | writeLines | {
"repo_name": "wzx54321/XinFramework",
"path": "app/src/main/java/com/xin/framework/xinframwork/utils/common/io/FileUtils.java",
"license": "apache-2.0",
"size": 107383
} | [
"java.io.File",
"java.io.IOException",
"java.util.Collection"
] | import java.io.File; import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 266,929 |
public LocalDate getStartSubscription() {
return startSubscription;
} | LocalDate function() { return startSubscription; } | /**
* getter for startSubscription
* @return startSubscription
*/ | getter for startSubscription | getStartSubscription | {
"repo_name": "Team08DatabaseProject/Healthy-Food-Ltd.",
"path": "src/classpackage/Subscription.java",
"license": "apache-2.0",
"size": 3995
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 1,646,417 |
public static void readProps(
ASTNode prop, Map<String, String> mapProp) {
for (int propChild = 0; propChild < prop.getChildCount(); propChild++) {
String key = unescapeSQLString(prop.getChild(propChild).getChild(0)
.getText());
String value = null;
if (prop.getChild(propChild).ge... | static void function( ASTNode prop, Map<String, String> mapProp) { for (int propChild = 0; propChild < prop.getChildCount(); propChild++) { String key = unescapeSQLString(prop.getChild(propChild).getChild(0) .getText()); String value = null; if (prop.getChild(propChild).getChild(1) != null) { value = unescapeSQLString(... | /**
* Converts parsed key/value properties pairs into a map.
*
* @param prop ASTNode parent of the key/value pairs
*
* @param mapProp property map which receives the mappings
*/ | Converts parsed key/value properties pairs into a map | readProps | {
"repo_name": "winningsix/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java",
"license": "apache-2.0",
"size": 46907
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 394,931 |
T setStyleFrom(StyleSet<?> source);
class Set implements StyleSet<Set> {
TextColor foregroundColor, backgroundColor;
EnumSet<SGR> style = EnumSet.noneOf(SGR.class);
public Set() {}
public Set(StyleSet<?> source) {
setStyleFrom(source);
} | T setStyleFrom(StyleSet<?> source); class Set implements StyleSet<Set> { TextColor foregroundColor, backgroundColor; EnumSet<SGR> style = EnumSet.noneOf(SGR.class); Set() {} public Set(StyleSet<?> source) { function(source); } | /**
* copy colors and set of SGR codes
* @param source Modifiers to set as active
* @return Itself
*/ | copy colors and set of SGR codes | setStyleFrom | {
"repo_name": "avl42/lanterna",
"path": "src/main/java/com/googlecode/lanterna/graphics/StyleSet.java",
"license": "lgpl-3.0",
"size": 3954
} | [
"com.googlecode.lanterna.TextColor",
"java.util.EnumSet"
] | import com.googlecode.lanterna.TextColor; import java.util.EnumSet; | import com.googlecode.lanterna.*; import java.util.*; | [
"com.googlecode.lanterna",
"java.util"
] | com.googlecode.lanterna; java.util; | 836,084 |
protected void setBaseComplexFractalSettings(ComplexFractal val) {
Objects.requireNonNull(val);
setCriticalR(String.format(Locale.ENGLISH, "%f", val.getCriticalR()));
setMaxIter(String.valueOf(val.getMaxIter()));
} | void function(ComplexFractal val) { Objects.requireNonNull(val); setCriticalR(String.format(Locale.ENGLISH, "%f", val.getCriticalR())); setMaxIter(String.valueOf(val.getMaxIter())); } | /**
* Sets {@code criticalR} and {@code maxIter} properties from {@code ComplexFractal}.
*
* @param val ComplexFractal object
* @throws NullPointerException if val if null
*/ | Sets criticalR and maxIter properties from ComplexFractal | setBaseComplexFractalSettings | {
"repo_name": "vznncv/ComplexFractal",
"path": "src/local/complexfractal/model/ComplexFractalPropertyVersion.java",
"license": "mit",
"size": 3712
} | [
"java.util.Locale",
"java.util.Objects"
] | import java.util.Locale; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 955,472 |
private PriorityQueue<Integer> populatedQueue(int n) {
PriorityQueue<Integer> q = new PriorityQueue<Integer>(n);
assertTrue(q.isEmpty());
for (int i = n - 1; i >= 0; i -= 2)
assertTrue(q.offer(new Integer(i)));
for (int i = (n & 1); i < n; i += 2)
assertTrue(q... | PriorityQueue<Integer> function(int n) { PriorityQueue<Integer> q = new PriorityQueue<Integer>(n); assertTrue(q.isEmpty()); for (int i = n - 1; i >= 0; i -= 2) assertTrue(q.offer(new Integer(i))); for (int i = (n & 1); i < n; i += 2) assertTrue(q.offer(new Integer(i))); assertFalse(q.isEmpty()); assertEquals(n, q.size(... | /**
* Returns a new queue of given size containing consecutive
* Integers 0 ... n.
*/ | Returns a new queue of given size containing consecutive Integers 0 ... n | populatedQueue | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/PriorityQueueTest.java",
"license": "gpl-2.0",
"size": 14297
} | [
"java.util.PriorityQueue"
] | import java.util.PriorityQueue; | import java.util.*; | [
"java.util"
] | java.util; | 504,103 |
public void setProperty(QName name, PropertyValue value); | void function(QName name, PropertyValue value); | /**
* Set a property on this store. Replaces if property already exists.
* @param name The QName of the property.
* @param value The actual PropertyValue.
*/ | Set a property on this store. Replaces if property already exists | setProperty | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/repo/avm/AVMStore.java",
"license": "lgpl-3.0",
"size": 17578
} | [
"org.alfresco.repo.domain.PropertyValue",
"org.alfresco.service.namespace.QName"
] | import org.alfresco.repo.domain.PropertyValue; import org.alfresco.service.namespace.QName; | import org.alfresco.repo.domain.*; import org.alfresco.service.namespace.*; | [
"org.alfresco.repo",
"org.alfresco.service"
] | org.alfresco.repo; org.alfresco.service; | 2,898,223 |
@Test
public void testSimpleEditLayout_PanelLayout() {
SimpleEditLayout<Integer, TestEntity> layout = createLayout(e1, "TestEntityGroups",
new FormOptions().setEditAllowed(true).setAttributeGroupMode(AttributeGroupMode.PANEL));
layout.build();
// try hiding an attribute ... | void function() { SimpleEditLayout<Integer, TestEntity> layout = createLayout(e1, STR, new FormOptions().setEditAllowed(true).setAttributeGroupMode(AttributeGroupMode.PANEL)); layout.build(); assertTrue(layout.getEditForm().isAttributeGroupVisible(STR)); layout.getEditForm().setAttributeGroupVisible(STR, false); assert... | /**
* Test the creation of a layout with multiple panels
*/ | Test the creation of a layout with multiple panels | testSimpleEditLayout_PanelLayout | {
"repo_name": "opencirclesolutions/dynamo",
"path": "dynamo-frontend/src/test/java/com/ocs/dynamo/ui/composite/layout/SimpleEditLayoutTest.java",
"license": "apache-2.0",
"size": 7206
} | [
"com.ocs.dynamo.domain.TestEntity",
"com.ocs.dynamo.ui.composite.type.AttributeGroupMode",
"org.junit.jupiter.api.Assertions"
] | import com.ocs.dynamo.domain.TestEntity; import com.ocs.dynamo.ui.composite.type.AttributeGroupMode; import org.junit.jupiter.api.Assertions; | import com.ocs.dynamo.domain.*; import com.ocs.dynamo.ui.composite.type.*; import org.junit.jupiter.api.*; | [
"com.ocs.dynamo",
"org.junit.jupiter"
] | com.ocs.dynamo; org.junit.jupiter; | 2,575,829 |
public static void closeView() {
IWorkbenchPage page1 = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page1.hideView(view);
}
| static void function() { IWorkbenchPage page1 = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); page1.hideView(view); } | /**
* hides this view
*/ | hides this view | closeView | {
"repo_name": "lsanzdiaz/MITK-BiiG",
"path": "Build/Tools/StateMachineEditor/src/debug/DebugEventsList.java",
"license": "bsd-3-clause",
"size": 5106
} | [
"org.eclipse.ui.IWorkbenchPage",
"org.eclipse.ui.PlatformUI"
] | import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 1,649,028 |
@Nonnull
static <T> T newMixin(@Nonnull final Class<T> as,
final Object... delegates) {
return as.cast(newProxyInstance(as.getClassLoader(), new Class[]{as},
new MixinHandler<>(as,
new MixedDelegates(delegates).mixinDelegates())));
} | static <T> T newMixin(@Nonnull final Class<T> as, final Object... delegates) { return as.cast(newProxyInstance(as.getClassLoader(), new Class[]{as}, new MixinHandler<>(as, new MixedDelegates(delegates).mixinDelegates()))); } | /**
* Creates a new mixin. If <var>as</var> extends {@code Mixin}, provides a
* supporting {@link #mixinDelegates()} method giving public access to
* <var>delegates</var>.
*
* @param as a superinterface of visible public methods implemented by
* <var>delegates</var>, never missing
* ... | Creates a new mixin. If as extends Mixin, provides a supporting <code>#mixinDelegates()</code> method giving public access to delegates | newMixin | {
"repo_name": "binkley/binkley",
"path": "mixin/src/main/java/hm/binkley/util/Mixin.java",
"license": "unlicense",
"size": 2147
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 423,724 |
public static String readTextFile(final DataInputStream is)
throws IOException {
byte[] dataBuf = new byte[is.available()];
is.readFully(dataBuf);
int offset = 0;
int length = dataBuf.length;
Charset charset = StandardCharsets.US_ASCII;
if (dataBuf.length > 3 && dataBuf[0] == -17 && data... | static String function(final DataInputStream is) throws IOException { byte[] dataBuf = new byte[is.available()]; is.readFully(dataBuf); int offset = 0; int length = dataBuf.length; Charset charset = StandardCharsets.US_ASCII; if (dataBuf.length > 3 && dataBuf[0] == -17 && dataBuf[1] == -69 && dataBuf[2] == -65) { chars... | /**
* Read file as text file return as US-ASCII string
* @param is DataInputStream
* @return String
* @throws IOException if there is any problem with the DataInputStream
*/ | Read file as text file return as US-ASCII string | readTextFile | {
"repo_name": "tuomount/Open-Realms-of-Stars",
"path": "src/main/java/org/openRealmOfStars/utilities/IOUtilities.java",
"license": "gpl-2.0",
"size": 11062
} | [
"java.io.DataInputStream",
"java.io.IOException",
"java.nio.charset.Charset",
"java.nio.charset.StandardCharsets"
] | import java.io.DataInputStream; import java.io.IOException; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 976,474 |
@Override
public String[] getAttributeNames() throws FileSystemException {
getAttributes();
final Set<String> names = attrs.keySet();
return names.toArray(new String[names.size()]);
}
| String[] function() throws FileSystemException { getAttributes(); final Set<String> names = attrs.keySet(); return names.toArray(new String[names.size()]); } | /**
* Lists the attributes of this file.
*
* @return An array of attribute names.
* @throws FileSystemException if an error occurs.
*/ | Lists the attributes of this file | getAttributeNames | {
"repo_name": "seeburger-ag/commons-vfs",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java",
"license": "apache-2.0",
"size": 30062
} | [
"java.util.Set",
"org.apache.commons.vfs2.FileSystemException"
] | import java.util.Set; import org.apache.commons.vfs2.FileSystemException; | import java.util.*; import org.apache.commons.vfs2.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,657,173 |
@Deprecated
public void setIdentifier(Reference identifier) {
setLocationRef(identifier);
} | void function(Reference identifier) { setLocationRef(identifier); } | /**
* Sets the optional identifier. This is useful when the representation is
* accessible from a location separate from the representation's resource
* URI, for example when content negotiation occurs.<br>
* <br>
* Note that when used with HTTP connectors, this property maps to the
* "Con... | Sets the optional identifier. This is useful when the representation is accessible from a location separate from the representation's resource URI, for example when content negotiation occurs. Note that when used with HTTP connectors, this property maps to the "Content-Location" header | setIdentifier | {
"repo_name": "debrief/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/representation/Variant.java",
"license": "epl-1.0",
"size": 19532
} | [
"org.restlet.data.Reference"
] | import org.restlet.data.Reference; | import org.restlet.data.*; | [
"org.restlet.data"
] | org.restlet.data; | 2,556,526 |
public static List<UserDTO> listUsers() {
Connection c = Configuration.getConnection();
List<UserDTO> ret = new ArrayList<UserDTO>();
PreparedStatement cStmt = null;
try {
cStmt = c.prepareStatement(SQL_LIST_USERS);
if (cStmt.execute()) {
ResultSet rs = cStmt.getResultSet();
while (rs.next())... | static List<UserDTO> function() { Connection c = Configuration.getConnection(); List<UserDTO> ret = new ArrayList<UserDTO>(); PreparedStatement cStmt = null; try { cStmt = c.prepareStatement(SQL_LIST_USERS); if (cStmt.execute()) { ResultSet rs = cStmt.getResultSet(); while (rs.next()) { UserDTO u = new UserDTO(); u.set... | /**
* Get list of all users in the system.
*
* @return List of user objects.
*/ | Get list of all users in the system | listUsers | {
"repo_name": "freemed/remitt",
"path": "src/main/java/org/remitt/datastore/UserManagement.java",
"license": "gpl-2.0",
"size": 6379
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.ArrayList",
"java.util.List",
"org.remitt.prototype.UserDTO",
"org.remitt.server.Configuration",
"org.remitt.server.DbUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; import org.remitt.prototype.UserDTO; import org.remitt.server.Configuration; import org.remitt.server.DbUtil; | import java.sql.*; import java.util.*; import org.remitt.prototype.*; import org.remitt.server.*; | [
"java.sql",
"java.util",
"org.remitt.prototype",
"org.remitt.server"
] | java.sql; java.util; org.remitt.prototype; org.remitt.server; | 2,263,547 |
@SuppressWarnings ("unchecked")
private void createDSSchema(AxisService axisService, DataService dataService)
throws DataServiceFault {
NamespaceMap map = new NamespaceMap();
map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX, Java2WSDLConstants.URI_2001_SCHEMA_XSD);
axisService.setNamespaceMap(map... | @SuppressWarnings (STR) void function(AxisService axisService, DataService dataService) throws DataServiceFault { NamespaceMap map = new NamespaceMap(); map.put(Java2WSDLConstants.DEFAULT_SCHEMA_NAMESPACE_PREFIX, Java2WSDLConstants.URI_2001_SCHEMA_XSD); axisService.setNamespaceMap(map); DataServiceDocLitWrappedSchemaGe... | /**
* Creates a schema from a DataService object, to be used later in WSDL generation.
*/ | Creates a schema from a DataService object, to be used later in WSDL generation | createDSSchema | {
"repo_name": "wso2/carbon-data",
"path": "components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/DBDeployer.java",
"license": "apache-2.0",
"size": 51673
} | [
"org.apache.axis2.description.AxisService",
"org.apache.axis2.description.java2wsdl.Java2WSDLConstants",
"org.apache.ws.commons.schema.utils.NamespaceMap",
"org.wso2.carbon.dataservices.core.engine.DataService"
] | import org.apache.axis2.description.AxisService; import org.apache.axis2.description.java2wsdl.Java2WSDLConstants; import org.apache.ws.commons.schema.utils.NamespaceMap; import org.wso2.carbon.dataservices.core.engine.DataService; | import org.apache.axis2.description.*; import org.apache.axis2.description.java2wsdl.*; import org.apache.ws.commons.schema.utils.*; import org.wso2.carbon.dataservices.core.engine.*; | [
"org.apache.axis2",
"org.apache.ws",
"org.wso2.carbon"
] | org.apache.axis2; org.apache.ws; org.wso2.carbon; | 2,490,069 |
public NameParser getNameParser (String name)
{
return _parser;
} | NameParser function (String name) { return _parser; } | /**
* Return a NameParser for this Context.
*
* @param name a <code>Name</code> value
* @return a <code>NameParser</code> value
*/ | Return a NameParser for this Context | getNameParser | {
"repo_name": "sdw2330976/Research-jetty-9.2.5",
"path": "jetty-jndi/src/main/java/org/eclipse/jetty/jndi/NamingContext.java",
"license": "apache-2.0",
"size": 43667
} | [
"javax.naming.NameParser"
] | import javax.naming.NameParser; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 1,111,378 |
public SelenideElement groupAttributeInput() {
return $("#ldap-group-attr");
}
/**
* Set value into {@link #groupAttributeInput()} | SelenideElement function() { return $(STR); } /** * Set value into {@link #groupAttributeInput()} | /**
* Group Membership Attribute input
* @return element
*/ | Group Membership Attribute input | groupAttributeInput | {
"repo_name": "apiman/apiman-test",
"path": "apiman-it-ui/src/test/java/io/apiman/test/integration/ui/support/selenide/pages/policies/AddLdapBASICAuthenticationPolicyPage.java",
"license": "apache-2.0",
"size": 7128
} | [
"com.codeborne.selenide.SelenideElement"
] | import com.codeborne.selenide.SelenideElement; | import com.codeborne.selenide.*; | [
"com.codeborne.selenide"
] | com.codeborne.selenide; | 1,405,592 |
public List<String> communities() {
return this.communities;
} | List<String> function() { return this.communities; } | /**
* Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'].
*
* @return the communities value
*/ | Get the collection for bgp community values to filter on. e.g. ['12076:5010','12076:5020'] | communities | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteFilterRuleInner.java",
"license": "mit",
"size": 6359
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 616,540 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<String> getMemberGroups(String objectId, boolean securityEnabledOnly, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<String> getMemberGroups(String objectId, boolean securityEnabledOnly, Context context); | /**
* Gets a collection that contains the object IDs of the groups of which the user is a member.
*
* @param objectId The object ID of the user for which to get group membership.
* @param securityEnabledOnly If true, only membership in security-enabled groups should be checked. Otherwise,
* ... | Gets a collection that contains the object IDs of the groups of which the user is a member | getMemberGroups | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/UsersClient.java",
"license": "mit",
"size": 16793
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,334,213 |
@SuppressWarnings("ConstantConditions")
public static void encodeToFile(byte[] dataToEncode, String filename) throws IOException {
if(dataToEncode == null) {
throw new NullPointerException("Data to encode was null.");
} // end iff
OutputStream bos = null;
try {
bos = new OutputStream(n... | @SuppressWarnings(STR) static void function(byte[] dataToEncode, String filename) throws IOException { if(dataToEncode == null) { throw new NullPointerException(STR); } OutputStream bos = null; try { bos = new OutputStream(new FileOutputStream(filename), ENCODE); bos.write(dataToEncode); } catch(IOException e) { throw ... | /**
* Convenience method for encoding data to a file.
* <p/>
* <p>
* As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In
* earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it.
* </p>
*
* @par... | Convenience method for encoding data to a file. As of v 2.3, if there is a error, the method will throw an java.io.IOException. This is new to v2.3! In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it. | encodeToFile | {
"repo_name": "apruden/magma",
"path": "magma-api/src/main/java/org/obiba/magma/type/Base64.java",
"license": "gpl-3.0",
"size": 74368
} | [
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,815,569 |
void scanStat(Tree tree) {
if (!alive && tree != null) {
log.error(tree.pos, "unreachable.stmt");
if (tree.tag != Tree.SKIP)
alive = true;
}
scan(tree);
} | void scanStat(Tree tree) { if (!alive && tree != null) { log.error(tree.pos, STR); if (tree.tag != Tree.SKIP) alive = true; } scan(tree); } | /**
* Analyze a statement. Check that statement is reachable.
*/ | Analyze a statement. Check that statement is reachable | scanStat | {
"repo_name": "nileshpatelksy/hello-pod-cast",
"path": "archive/FILE/Compiler/java_GJC1.42_src/src/com/sun/tools/javac/v8/comp/Flow.java",
"license": "apache-2.0",
"size": 36551
} | [
"com.sun.tools.javac.v8.tree.Tree"
] | import com.sun.tools.javac.v8.tree.Tree; | import com.sun.tools.javac.v8.tree.*; | [
"com.sun.tools"
] | com.sun.tools; | 422,234 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.