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 void getOneSchema(RoutingContext routingContext) {
SchemaRegisterProcessor.forwardGetOneSchema(vertx, routingContext, schema_registry_host_and_port);
}
/**
* Get one task logs with task id specified from repo
*
* @api {get} /logs/:taskId 2. Get a task status
* ... | void function(RoutingContext routingContext) { SchemaRegisterProcessor.forwardGetOneSchema(vertx, routingContext, schema_registry_host_and_port); } /** * Get one task logs with task id specified from repo * * @api {get} /logs/:taskId 2. Get a task status * @apiVersion 0.1.1 * @apiName getOneLogs * @apiGroup All * @apiP... | /**
* Get one schema with schema subject specified
* 1) Retrieve a specific subject latest information:
* curl -X GET -i http://localhost:8081/subjects/Kafka-value/versions/latest
*
* 2) Retrieve a specific subject compatibility:
* curl -X GET -i http://localhost:8081/config/finance-... | Get one schema with schema subject specified 1) Retrieve a specific subject latest information: curl -X GET -i HREF 2) Retrieve a specific subject compatibility: curl -X GET -i HREF | getOneSchema | {
"repo_name": "allenzhangliugen/df_data_service",
"path": "src/main/java/com/datafibers/service/DFDataProcessor.java",
"license": "apache-2.0",
"size": 96438
} | [
"com.datafibers.processor.SchemaRegisterProcessor",
"io.vertx.core.json.JsonObject",
"io.vertx.ext.web.RoutingContext",
"org.bson.types.ObjectId"
] | import com.datafibers.processor.SchemaRegisterProcessor; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.RoutingContext; import org.bson.types.ObjectId; | import com.datafibers.processor.*; import io.vertx.core.json.*; import io.vertx.ext.web.*; import org.bson.types.*; | [
"com.datafibers.processor",
"io.vertx.core",
"io.vertx.ext",
"org.bson.types"
] | com.datafibers.processor; io.vertx.core; io.vertx.ext; org.bson.types; | 2,852,687 |
public static GrpcExampleHeaders of(@NotNull String serviceType, @NotNull String methodName,
@NotNull CharSequence name, @NotNull String value) {
return of(serviceType, methodName, HttpHeaders.of(name, value));
}
/**
* Returns a new {@link GrpcExampleHea... | static GrpcExampleHeaders function(@NotNull String serviceType, @NotNull String methodName, @NotNull CharSequence name, @NotNull String value) { return of(serviceType, methodName, HttpHeaders.of(name, value)); } /** * Returns a new {@link GrpcExampleHeaders} with the specified {@code serviceType} | /**
* Returns a new {@link GrpcExampleHeaders} for the method with the specified {@code serviceType},
* {@code methodName}, {@code name} and {@code value}.
*/ | Returns a new <code>GrpcExampleHeaders</code> for the method with the specified serviceType, methodName, name and value | of | {
"repo_name": "anuraaga/armeria",
"path": "spring/boot-autoconfigure/src/main/java/com/linecorp/armeria/spring/GrpcExampleHeaders.java",
"license": "apache-2.0",
"size": 3577
} | [
"com.linecorp.armeria.common.HttpHeaders",
"javax.validation.constraints.NotNull"
] | import com.linecorp.armeria.common.HttpHeaders; import javax.validation.constraints.NotNull; | import com.linecorp.armeria.common.*; import javax.validation.constraints.*; | [
"com.linecorp.armeria",
"javax.validation"
] | com.linecorp.armeria; javax.validation; | 1,799,187 |
private String getECMCardTitle(Context context, Phone phone) {
String rawNumber = phone.getLine1Number(); // may be null or empty
String formattedNumber;
if (!TextUtils.isEmpty(rawNumber)) {
formattedNumber = PhoneNumberUtils.formatNumber(rawNumber);
} else {
... | String function(Context context, Phone phone) { String rawNumber = phone.getLine1Number(); String formattedNumber; if (!TextUtils.isEmpty(rawNumber)) { formattedNumber = PhoneNumberUtils.formatNumber(rawNumber); } else { formattedNumber = context.getString(R.string.unknown); } String titleFormat = context.getString(R.s... | /**
* Returns the special card title used in emergency callback mode (ECM),
* which shows your own phone number.
*/ | Returns the special card title used in emergency callback mode (ECM), which shows your own phone number | getECMCardTitle | {
"repo_name": "risingsunm/Phone_4.0",
"path": "src/com/android/phone/CallCard.java",
"license": "gpl-3.0",
"size": 103627
} | [
"android.content.Context",
"android.telephony.PhoneNumberUtils",
"android.text.TextUtils",
"com.android.internal.telephony.Phone"
] | import android.content.Context; import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import com.android.internal.telephony.Phone; | import android.content.*; import android.telephony.*; import android.text.*; import com.android.internal.telephony.*; | [
"android.content",
"android.telephony",
"android.text",
"com.android.internal"
] | android.content; android.telephony; android.text; com.android.internal; | 192,841 |
private static Point getCodecMaxSize(MediaCodecInfo codecInfo, Format format) {
boolean isVerticalVideo = format.height > format.width;
int formatLongEdgePx = isVerticalVideo ? format.height : format.width;
int formatShortEdgePx = isVerticalVideo ? format.width : format.height;
float aspectRatio = (fl... | static Point function(MediaCodecInfo codecInfo, Format format) { boolean isVerticalVideo = format.height > format.width; int formatLongEdgePx = isVerticalVideo ? format.height : format.width; int formatShortEdgePx = isVerticalVideo ? format.width : format.height; float aspectRatio = (float) formatShortEdgePx / formatLo... | /**
* Returns a maximum video size to use when configuring a codec for {@code format} in a way that
* will allow possible adaptation to other compatible formats that are expected to have the same
* aspect ratio, but whose sizes are unknown.
*
* @param codecInfo Information about the {@link MediaCodec} be... | Returns a maximum video size to use when configuring a codec for format in a way that will allow possible adaptation to other compatible formats that are expected to have the same aspect ratio, but whose sizes are unknown | getCodecMaxSize | {
"repo_name": "androidx/media",
"path": "libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java",
"license": "apache-2.0",
"size": 80768
} | [
"android.graphics.Point",
"androidx.media3.common.Format",
"androidx.media3.common.util.Util",
"androidx.media3.exoplayer.mediacodec.MediaCodecInfo",
"androidx.media3.exoplayer.mediacodec.MediaCodecUtil"
] | import android.graphics.Point; import androidx.media3.common.Format; import androidx.media3.common.util.Util; import androidx.media3.exoplayer.mediacodec.MediaCodecInfo; import androidx.media3.exoplayer.mediacodec.MediaCodecUtil; | import android.graphics.*; import androidx.media3.common.*; import androidx.media3.common.util.*; import androidx.media3.exoplayer.mediacodec.*; | [
"android.graphics",
"androidx.media3"
] | android.graphics; androidx.media3; | 1,486,561 |
private void whenTabSelected(int num){
onView(withId(R.id.tabSpinner)).perform(click());
onData(is(instanceOf(Tab.class))).atPosition(num).perform(click());
} | void function(int num){ onView(withId(R.id.tabSpinner)).perform(click()); onData(is(instanceOf(Tab.class))).atPosition(num).perform(click()); } | /**
* Select the tab number 'x'
* @param num Index of the tab to select
*/ | Select the tab number 'x' | whenTabSelected | {
"repo_name": "RobbiNespu/malariapp",
"path": "app/src/androidTest/java/org/eyeseetea/malariacare/test/SurveyScoresEspressoTest.java",
"license": "gpl-3.0",
"size": 8975
} | [
"android.support.test.espresso.Espresso",
"org.eyeseetea.malariacare.database.model.Tab"
] | import android.support.test.espresso.Espresso; import org.eyeseetea.malariacare.database.model.Tab; | import android.support.test.espresso.*; import org.eyeseetea.malariacare.database.model.*; | [
"android.support",
"org.eyeseetea.malariacare"
] | android.support; org.eyeseetea.malariacare; | 2,001,170 |
public static <E extends Identifiable> List<E> findEntitiesMarkedForDeletion(EntityManager em, Class<E> type) {
requireArgument(em != null, "Entity Manager cannot be null");
TypedQuery<E> query = em.createNamedQuery("JPAEntity.findByDeleteMarker", type);
query.setHint("javax.persistence.ca... | static <E extends Identifiable> List<E> function(EntityManager em, Class<E> type) { requireArgument(em != null, STR); TypedQuery<E> query = em.createNamedQuery(STR, type); query.setHint(STR, STR); try { query.setParameter(STR, true); return query.getResultList(); } catch (NoResultException ex) { return new ArrayList<>(... | /**
* Finds all entities that have been marked for deletion.
*
* @param <E> The JPA entity type.
* @param em The entity manager to use. Cannot be null.
* @param type The runtime type to cast the result value to.
*
* @return The list of matching entities. Will never be nu... | Finds all entities that have been marked for deletion | findEntitiesMarkedForDeletion | {
"repo_name": "jbhatt-salesforce/Warden-Service",
"path": "ArgusCore/src/main/java/com/salesforce/dva/argus/entity/JPAEntity.java",
"license": "bsd-3-clause",
"size": 11030
} | [
"com.salesforce.dva.argus.system.SystemAssert",
"java.util.ArrayList",
"java.util.List",
"javax.persistence.EntityManager",
"javax.persistence.NoResultException",
"javax.persistence.TypedQuery"
] | import com.salesforce.dva.argus.system.SystemAssert; import java.util.ArrayList; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.TypedQuery; | import com.salesforce.dva.argus.system.*; import java.util.*; import javax.persistence.*; | [
"com.salesforce.dva",
"java.util",
"javax.persistence"
] | com.salesforce.dva; java.util; javax.persistence; | 2,381,744 |
private SystemConfiguration getSystemConfiguration() throws IOException {
final String bfhome = getenv(ENV_BELFRAMEWORK_HOME);
if (hasLength(bfhome)) {
return createSystemConfiguration();
}
String cmdHome = getenv(CMD_HOME);
// assert that CMD_HOME is set, alert... | SystemConfiguration function() throws IOException { final String bfhome = getenv(ENV_BELFRAMEWORK_HOME); if (hasLength(bfhome)) { return createSystemConfiguration(); } String cmdHome = getenv(CMD_HOME); assert noLength(cmdHome); if (noLength(cmdHome)) { throw new IllegalStateException(STR); } String cfgPath = asPath(ge... | /**
* Obtain the {@link SystemConfiguration}.<br>
* Defaults to obtaining via the BELFRAMEWORK_HOME environment variable.
*
* @return
* @throws Exception
*/ | Obtain the <code>SystemConfiguration</code>. Defaults to obtaining via the BELFRAMEWORK_HOME environment variable | getSystemConfiguration | {
"repo_name": "OpenBEL/export-orthology",
"path": "src/main/java/org/openbel/framework/tools/ExportOrthology.java",
"license": "apache-2.0",
"size": 11636
} | [
"java.io.File",
"java.io.IOException",
"java.lang.System",
"org.openbel.framework.common.BELUtilities",
"org.openbel.framework.common.cfg.SystemConfiguration"
] | import java.io.File; import java.io.IOException; import java.lang.System; import org.openbel.framework.common.BELUtilities; import org.openbel.framework.common.cfg.SystemConfiguration; | import java.io.*; import java.lang.*; import org.openbel.framework.common.*; import org.openbel.framework.common.cfg.*; | [
"java.io",
"java.lang",
"org.openbel.framework"
] | java.io; java.lang; org.openbel.framework; | 2,575,455 |
private it.eng.eli4u.imieidati.services.database.entities.Sezione updateSection(
Sezione sezione,
it.eng.eli4u.imieidati.services.database.entities.Sezione existingSection) {
existingSection.setCodice(sezione.getCodice());
existingSection.setId(Double.parseDouble(sezione.getId()));
existingSection.setDes... | it.eng.eli4u.imieidati.services.database.entities.Sezione function( Sezione sezione, it.eng.eli4u.imieidati.services.database.entities.Sezione existingSection) { existingSection.setCodice(sezione.getCodice()); existingSection.setId(Double.parseDouble(sezione.getId())); existingSection.setDescrizione(sezione.getDescrizi... | /**
* Utils Method for updating Sezione Database from Sezione Model info
*/ | Utils Method for updating Sezione Database from Sezione Model info | updateSection | {
"repo_name": "ComuneBologna/servizi-online",
"path": "IMieiDati/src/main/java/it/eng/eli4u/imieidati/services/database/HibernateDatabaseServiceImpl.java",
"license": "agpl-3.0",
"size": 19195
} | [
"it.eng.eli4u.imieidati.model.ParametroServizio",
"it.eng.eli4u.imieidati.model.Sezione",
"java.util.HashSet",
"java.util.Set"
] | import it.eng.eli4u.imieidati.model.ParametroServizio; import it.eng.eli4u.imieidati.model.Sezione; import java.util.HashSet; import java.util.Set; | import it.eng.eli4u.imieidati.model.*; import java.util.*; | [
"it.eng.eli4u",
"java.util"
] | it.eng.eli4u; java.util; | 2,001,299 |
@Test
public void deleteTripTest() {
TripEntity entity = data.get(1);
tripLogic.deleteTrip(entity.getId());
TripEntity deleted = em.find(TripEntity.class, entity.getId());
Assert.assertNull(deleted);
} | void function() { TripEntity entity = data.get(1); tripLogic.deleteTrip(entity.getId()); TripEntity deleted = em.find(TripEntity.class, entity.getId()); Assert.assertNull(deleted); } | /**
* Prueba para eliminar un Trip
*
* @generated
*/ | Prueba para eliminar un Trip | deleteTripTest | {
"repo_name": "Uniandes-MISO4203/turism-201620-2",
"path": "turism-logic/src/test/java/co/edu/uniandes/csw/turism/test/logic/TripLogicTest.java",
"license": "mit",
"size": 12441
} | [
"co.edu.uniandes.csw.turism.entities.TripEntity",
"org.junit.Assert"
] | import co.edu.uniandes.csw.turism.entities.TripEntity; import org.junit.Assert; | import co.edu.uniandes.csw.turism.entities.*; import org.junit.*; | [
"co.edu.uniandes",
"org.junit"
] | co.edu.uniandes; org.junit; | 1,467,438 |
private static synchronized int nextId() {
return sysId++;
}
public ExpressionSys(BdsNode parent, ParseTree tree) {
super(parent, tree);
} | static synchronized int function() { return sysId++; } public ExpressionSys(BdsNode parent, ParseTree tree) { super(parent, tree); } | /**
* Get a sys ID
*/ | Get a sys ID | nextId | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/lang/ExpressionSys.java",
"license": "apache-2.0",
"size": 4949
} | [
"org.antlr.v4.runtime.tree.ParseTree"
] | import org.antlr.v4.runtime.tree.ParseTree; | import org.antlr.v4.runtime.tree.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,505,627 |
public static String getAvailabilityDescription(Context context, Parking parking, boolean longVersion) {
String format;
String availability = null, reportedAvailability = null, ago = null, pressButton = "";
Resources res = context.getResources();
if (longVersion) {
if (... | static String function(Context context, Parking parking, boolean longVersion) { String format; String availability = null, reportedAvailability = null, ago = null, pressButton = ""; Resources res = context.getResources(); if (longVersion) { if (parking.isAvailabilityReportOutdated()) { format = res.getString(R.string.a... | /**
* formats description of availability
* @param context for getting resources
* @param parking the car park whose availability should be described
* @param longVersion which version to produce, original (long, true) or shortened for bubble (false)
* @return a string describing the availabili... | formats description of availability | getAvailabilityDescription | {
"repo_name": "jacekkopecky/parkjam",
"path": "src/uk/ac/open/kmi/parking/ParkingDetailsActivity.java",
"license": "apache-2.0",
"size": 36536
} | [
"android.content.Context",
"android.content.res.Resources",
"uk.ac.open.kmi.parking.Parking"
] | import android.content.Context; import android.content.res.Resources; import uk.ac.open.kmi.parking.Parking; | import android.content.*; import android.content.res.*; import uk.ac.open.kmi.parking.*; | [
"android.content",
"uk.ac.open"
] | android.content; uk.ac.open; | 58,034 |
@Override
public void onRedeclaration(
Scope s, String name, Node n, CompilerInput input) {
Preconditions.checkState(n.isName());
Node parent = n.getParent();
Var v = s.getVar(name);
if (s.isGlobal()) {
// We allow variables to be duplicate declared if one
// dec... | void function( Scope s, String name, Node n, CompilerInput input) { Preconditions.checkState(n.isName()); Node parent = n.getParent(); Var v = s.getVar(name); if (s.isGlobal()) { if (v.isExtern() && !input.isExtern()) { if (hasOkDuplicateDeclaration.add(v)) { return; } } } if (parent.isFunction()) { if (v.getParentNode... | /**
* Remove duplicate VAR declarations encountered discovered during
* scope creation.
*/ | Remove duplicate VAR declarations encountered discovered during scope creation | onRedeclaration | {
"repo_name": "Pimm/closure-compiler",
"path": "src/com/google/javascript/jscomp/Normalize.java",
"license": "apache-2.0",
"size": 28373
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,859,760 |
void dropIndex(JobId jobId, String dataverseName, String datasetName, String indexName)
throws MetadataException, RemoteException; | void dropIndex(JobId jobId, String dataverseName, String datasetName, String indexName) throws MetadataException, RemoteException; | /**
* Deletes the index with given name, in given dataverse and dataset,
* acquiring local locks on behalf of the given transaction id.
*
* @param jobId
* A globally unique id for an active metadata transaction.
* @param dataverseName
* Name of the datavers holdi... | Deletes the index with given name, in given dataverse and dataset, acquiring local locks on behalf of the given transaction id | dropIndex | {
"repo_name": "heriram/incubator-asterixdb",
"path": "asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/api/IMetadataNode.java",
"license": "apache-2.0",
"size": 29351
} | [
"java.rmi.RemoteException",
"org.apache.asterix.common.transactions.JobId",
"org.apache.asterix.metadata.MetadataException"
] | import java.rmi.RemoteException; import org.apache.asterix.common.transactions.JobId; import org.apache.asterix.metadata.MetadataException; | import java.rmi.*; import org.apache.asterix.common.transactions.*; import org.apache.asterix.metadata.*; | [
"java.rmi",
"org.apache.asterix"
] | java.rmi; org.apache.asterix; | 1,325,660 |
void sendRawLineAvoidingDuplication(@Nonnull String message); | void sendRawLineAvoidingDuplication(@Nonnull String message); | /**
* Sends a raw IRC message, unless the exact same message is already in
* the queue of messages not yet sent.
*
* @param message message to send
* @throws IllegalArgumentException if message is null
*/ | Sends a raw IRC message, unless the exact same message is already in the queue of messages not yet sent | sendRawLineAvoidingDuplication | {
"repo_name": "ammaraskar/KittehIRCClientLib",
"path": "src/main/java/org/kitteh/irc/client/library/Client.java",
"license": "mit",
"size": 10050
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,037,068 |
public Image loadSingleImageFromRMS(String recordName, String imageName,
int recordId) throws PersistenceMechanismException {
System.out.println("ImageAccessor.loadSingleImageFromRMS()");
Image img = null;
byte[] imageData = loadImageBytesFromRMS(recordName, imageName,
recordId);
img = Image.createImage... | Image function(String recordName, String imageName, int recordId) throws PersistenceMechanismException { System.out.println(STR); Image img = null; byte[] imageData = loadImageBytesFromRMS(recordName, imageName, recordId); img = Image.createImage(imageData, 0, imageData.length); return img; } | /**
* Fetch a single image from the Record Store This should be used for
* loading images on-demand (only when they are viewed or sent via SMS etc.)
* to reduce startup time by loading them all at once.
* @throws PersistenceMechanismException
*/ | Fetch a single image from the Record Store This should be used for loading images on-demand (only when they are viewed or sent via SMS etc.) to reduce startup time by loading them all at once | loadSingleImageFromRMS | {
"repo_name": "leotizzei/MobileMedia-Cosmos-v1",
"path": "src/br/unicamp/ic/sed/mobilemedia/filesystemmgr/impl/ImageAccessor.java",
"license": "mit",
"size": 16161
} | [
"br.unicamp.ic.sed.mobilemedia.filesystemmgr.spec.excep.PersistenceMechanismException",
"javax.microedition.lcdui.Image"
] | import br.unicamp.ic.sed.mobilemedia.filesystemmgr.spec.excep.PersistenceMechanismException; import javax.microedition.lcdui.Image; | import br.unicamp.ic.sed.mobilemedia.filesystemmgr.spec.excep.*; import javax.microedition.lcdui.*; | [
"br.unicamp.ic",
"javax.microedition"
] | br.unicamp.ic; javax.microedition; | 2,895,304 |
public static Collection<URI> getNameServiceUris(Configuration conf,
String... keys) {
Set<URI> ret = new HashSet<URI>();
// We're passed multiple possible configuration keys for any given NN or HA
// nameservice, and search the config in order of these keys. In order to
// make sure that a... | static Collection<URI> function(Configuration conf, String... keys) { Set<URI> ret = new HashSet<URI>(); Set<URI> nonPreferredUris = new HashSet<URI>(); for (String nsId : DFSUtilClient.getNameServiceIds(conf)) { if (HAUtil.isHAEnabled(conf, nsId)) { try { ret.add(new URI(HdfsConstants.HDFS_URI_SCHEME + STRhdfs", NetUt... | /**
* Get a URI for each configured nameservice. If a nameservice is
* HA-enabled, then the logical URI of the nameservice is returned. If the
* nameservice is not HA-enabled, then a URI corresponding to the address of
* the single NN for that nameservice is returned.
*
* @param conf configuration
... | Get a URI for each configured nameservice. If a nameservice is HA-enabled, then the logical URI of the nameservice is returned. If the nameservice is not HA-enabled, then a URI corresponding to the address of the single NN for that nameservice is returned | getNameServiceUris | {
"repo_name": "jth/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 58742
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.Set",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.hdfs.protocol.HdfsConstants",
"org.apache.hadoop.net.NetUtils"
] | import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.net.NetUtils; | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.net.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 456,670 |
public static boolean getBoolean(@NonNullable Document document,
@NonNullable FieldPath fieldPath, @Nullable boolean defaultValue) {
Boolean docValue = document.getBooleanObj(fieldPath);
return docValue != null ? docValue : defaultValue;
} | static boolean function(@NonNullable Document document, @NonNullable FieldPath fieldPath, @Nullable boolean defaultValue) { Boolean docValue = document.getBooleanObj(fieldPath); return docValue != null ? docValue : defaultValue; } | /**
* Returns the value at the specified fieldPath as a {@link boolean} or the
* specified {@code defaultValue} if the specified {@code FieldPath} does not
* exist in the document.
*
* @throws TypeException if the value at the fieldPath is not of
* <code>BOOLEAN</code> type
*/ | Returns the value at the specified fieldPath as a <code>boolean</code> or the specified defaultValue if the specified FieldPath does not exist in the document | getBoolean | {
"repo_name": "ojai/ojai",
"path": "java/core/src/main/java/org/ojai/util/Documents.java",
"license": "apache-2.0",
"size": 21639
} | [
"org.ojai.Document",
"org.ojai.FieldPath",
"org.ojai.annotation.API"
] | import org.ojai.Document; import org.ojai.FieldPath; import org.ojai.annotation.API; | import org.ojai.*; import org.ojai.annotation.*; | [
"org.ojai",
"org.ojai.annotation"
] | org.ojai; org.ojai.annotation; | 393,889 |
public List<TileImprovement> getCompletedTileImprovements() {
if (tileItemContainer == null) {
return Collections.emptyList();
} else {
List<TileImprovement> result = new ArrayList<TileImprovement>();
for (TileImprovement improvement : tileItemContainer.getImprove... | List<TileImprovement> function() { if (tileItemContainer == null) { return Collections.emptyList(); } else { List<TileImprovement> result = new ArrayList<TileImprovement>(); for (TileImprovement improvement : tileItemContainer.getImprovements()) { if (improvement.getTurnsToComplete() == 0) { result.add(improvement); } ... | /**
* Returns a List of completed <code>TileImprovements</code>.
*
* @return a List of <code>TileImprovements</code>
*/ | Returns a List of completed <code>TileImprovements</code> | getCompletedTileImprovements | {
"repo_name": "tectronics/reformationofeurope",
"path": "src/net/sf/freecol/common/model/Tile.java",
"license": "gpl-2.0",
"size": 60810
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 750,696 |
public void addPortfolioRequirementNames(final String securityType, final Set<String> requiredOutputs) {
ArgumentChecker.notNull(securityType, "securityType");
ArgumentChecker.notNull(requiredOutputs, "requiredOutput");
for (final String requiredOutput : requiredOutputs) {
addPortfolioRequirementNam... | void function(final String securityType, final Set<String> requiredOutputs) { ArgumentChecker.notNull(securityType, STR); ArgumentChecker.notNull(requiredOutputs, STR); for (final String requiredOutput : requiredOutputs) { addPortfolioRequirementName(securityType, requiredOutput); } } | /**
* Adds a set of required portfolio outputs for the given security type with no value constraints. This is equivalent to calling
* {@link #addPortfolioRequirements (String, Set)} with {@code ValueProperties.none ()} against each output name.
*
* @param securityType
* the type of security for ... | Adds a set of required portfolio outputs for the given security type with no value constraints. This is equivalent to calling <code>#addPortfolioRequirements (String, Set)</code> with ValueProperties.none () against each output name | addPortfolioRequirementNames | {
"repo_name": "McLeodMoores/starling",
"path": "projects/engine/src/main/java/com/opengamma/engine/view/ViewCalculationConfiguration.java",
"license": "apache-2.0",
"size": 25723
} | [
"com.opengamma.util.ArgumentChecker",
"java.util.Set"
] | import com.opengamma.util.ArgumentChecker; import java.util.Set; | import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.util",
"java.util"
] | com.opengamma.util; java.util; | 2,509,021 |
void DeleteRecursive(File fileOrDirectory) {
if (fileOrDirectory.isDirectory())
for (File child : fileOrDirectory.listFiles())
DeleteRecursive(child);
fileOrDirectory.delete();
} | void DeleteRecursive(File fileOrDirectory) { if (fileOrDirectory.isDirectory()) for (File child : fileOrDirectory.listFiles()) DeleteRecursive(child); fileOrDirectory.delete(); } | /**
* Delete in a recursive way
* @param fileOrDirectory file or dir to delete
*/ | Delete in a recursive way | DeleteRecursive | {
"repo_name": "ashmikuz/Open-file-manager",
"path": "src/com/open/file/manager/FileOperations.java",
"license": "gpl-3.0",
"size": 16454
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,204,639 |
public String getNameString() {
StringBuffer result = new StringBuffer(64);
int ind = 0;
Iterator<String> iter = this.keySet().iterator();
while (iter.hasNext()) {
String name = iter.next();
if (ind > 0) {
result.append(',');
}
... | String function() { StringBuffer result = new StringBuffer(64); int ind = 0; Iterator<String> iter = this.keySet().iterator(); while (iter.hasNext()) { String name = iter.next(); if (ind > 0) { result.append(','); } result.append(name); ind ++; } return result.toString(); } | /** Gets a concatenated String of the names/keys separated by commas
* @return "a,b,c" for example
*/ | Gets a concatenated String of the names/keys separated by commas | getNameString | {
"repo_name": "gfis/ramath",
"path": "src/main/java/org/teherba/ramath/symbolic/VariableMap.java",
"license": "apache-2.0",
"size": 21964
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,732,489 |
public synchronized final Method getMethodToExecute() {
return methodToExecute;
} | synchronized final Method function() { return methodToExecute; } | /**
* Provides the value of the methodToExecute field.
*
* @return the methodToExecute
*/ | Provides the value of the methodToExecute field | getMethodToExecute | {
"repo_name": "fluca1978/WhiteCat",
"path": "src/main/java/whitecat/core/role/task/MethodTaskExecutor.java",
"license": "gpl-3.0",
"size": 6446
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 895,444 |
@SelectProvider(type=VerifySecureSqlProvider.class, method="countByExample")
int countByExample(VerifySecureCriteria example); | @SelectProvider(type=VerifySecureSqlProvider.class, method=STR) int countByExample(VerifySecureCriteria example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table VERIFY_SECURE
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table VERIFY_SECURE | countByExample | {
"repo_name": "agwlvssainokuni/springapp",
"path": "foundation/src/test/java/cherry/foundation/db/gen/mapper/VerifySecureMapper.java",
"license": "apache-2.0",
"size": 6785
} | [
"org.apache.ibatis.annotations.SelectProvider"
] | import org.apache.ibatis.annotations.SelectProvider; | import org.apache.ibatis.annotations.*; | [
"org.apache.ibatis"
] | org.apache.ibatis; | 1,849,627 |
public SnomedDescriptionSearchRequestBuilder filterByConcept(String conceptFilter) {
return addOption(OptionKey.CONCEPT, conceptFilter);
}
| SnomedDescriptionSearchRequestBuilder function(String conceptFilter) { return addOption(OptionKey.CONCEPT, conceptFilter); } | /**
* Filters descriptions by their concept. The filter value accepts ECL expressions (including single ID).
*
* @param conceptFilter
* @return
*/ | Filters descriptions by their concept. The filter value accepts ECL expressions (including single ID) | filterByConcept | {
"repo_name": "IHTSDO/snow-owl",
"path": "snomed/com.b2international.snowowl.snomed.datastore/src/com/b2international/snowowl/snomed/datastore/request/SnomedDescriptionSearchRequestBuilder.java",
"license": "apache-2.0",
"size": 16777
} | [
"com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequest"
] | import com.b2international.snowowl.snomed.datastore.request.SnomedDescriptionSearchRequest; | import com.b2international.snowowl.snomed.datastore.request.*; | [
"com.b2international.snowowl"
] | com.b2international.snowowl; | 1,141,923 |
public void lock(Inode node, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException,
DotStateException; | void function(Inode node, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException, DotStateException; | /**
* Use to lock a node
*
* @param node
* @param user
* @param respectFrontendRoles
* @throws DotDataException
* @throws DotSecurityException
* @throws DotStateException
* - if the node is null
*/ | Use to lock a node | lock | {
"repo_name": "wisdom-garden/dotcms",
"path": "src/com/dotmarketing/business/skeleton/DotCMSAPI.java",
"license": "gpl-3.0",
"size": 24636
} | [
"com.dotmarketing.beans.Inode",
"com.dotmarketing.business.DotStateException",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.liferay.portal.model.User"
] | import com.dotmarketing.beans.Inode; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.liferay.portal.model.User; | import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.liferay.portal.model.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.liferay.portal"
] | com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.exception; com.liferay.portal; | 1,222,918 |
default PathMapping stripParents() {
return new StripParents(this);
} | default PathMapping stripParents() { return new StripParents(this); } | /**
* Creates a new {@link PathMapping} that removes all parent components from the matched path so that
* the {@link ServiceInvocationContext#mappedPath()} contains only a single path component. This method
* is useful when you are interested only in the file name part of the path.
*/ | Creates a new <code>PathMapping</code> that removes all parent components from the matched path so that the <code>ServiceInvocationContext#mappedPath()</code> contains only a single path component. This method is useful when you are interested only in the file name part of the path | stripParents | {
"repo_name": "synk/armeria",
"path": "src/main/java/com/linecorp/armeria/server/PathMapping.java",
"license": "apache-2.0",
"size": 9358
} | [
"com.linecorp.armeria.server.PathManipulators"
] | import com.linecorp.armeria.server.PathManipulators; | import com.linecorp.armeria.server.*; | [
"com.linecorp.armeria"
] | com.linecorp.armeria; | 884,672 |
protected Object getDataObjectFromXML(String maintainableTagName) {
String maintXml = StringUtils.substringBetween(xmlDocumentContents, "<" + maintainableTagName + ">",
"</" + maintainableTagName + ">");
boolean ignoreMissingFields = false;
String classAndDocTypeNames =... | Object function(String maintainableTagName) { String maintXml = StringUtils.substringBetween(xmlDocumentContents, "<" + maintainableTagName + ">", "</" + maintainableTagName + ">"); boolean ignoreMissingFields = false; String classAndDocTypeNames = ConfigContext.getCurrentContextConfig().getProperty(KRADConstants.Confi... | /**
* Get data object from XML
*
* <p>
* Retrieves substring of document contents from maintainable tag name. Then use xml service to translate xml into
* a business object.
* </p>
*
* @param maintainableTagName the xml tag name of the maintainable
* @return data ob... | Get data object from XML Retrieves substring of document contents from maintainable tag name. Then use xml service to translate xml into a business object. | getDataObjectFromXML | {
"repo_name": "ewestfal/rice-svn2git-test",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/maintenance/MaintenanceDocumentBase.java",
"license": "apache-2.0",
"size": 49628
} | [
"java.util.Arrays",
"java.util.List",
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.core.api.config.property.ConfigContext",
"org.kuali.rice.kew.api.KewApiServiceLocator",
"org.kuali.rice.kew.api.doctype.DocumentType",
"org.kuali.rice.krad.service.KRADServiceLocator",
"org.kuali.rice.krad.uti... | import java.util.Arrays; import java.util.List; import org.apache.commons.lang.StringUtils; import org.kuali.rice.core.api.config.property.ConfigContext; import org.kuali.rice.kew.api.KewApiServiceLocator; import org.kuali.rice.kew.api.doctype.DocumentType; import org.kuali.rice.krad.service.KRADServiceLocator; import ... | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.core.api.config.property.*; import org.kuali.rice.kew.api.*; import org.kuali.rice.kew.api.doctype.*; import org.kuali.rice.krad.service.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 2,359,771 |
void init(Partition p) throws Exception; | void init(Partition p) throws Exception; | /**
* Inits the JDBC Reader helper with a given Spark partition.
* @param p Spark partition.
* @throws Exception
*/ | Inits the JDBC Reader helper with a given Spark partition | init | {
"repo_name": "Stratio/deep-spark",
"path": "deep-jdbc/src/main/java/com/stratio/deep/jdbc/reader/IJdbcReader.java",
"license": "apache-2.0",
"size": 1377
} | [
"org.apache.spark.Partition"
] | import org.apache.spark.Partition; | import org.apache.spark.*; | [
"org.apache.spark"
] | org.apache.spark; | 2,764,991 |
public static <T extends IHTMLElement> T findElementByHTMLPointer( Class<T> type, IHTMLContext context,
String htmlPointer )
{
IHTMLElement element = findElementAndIdentify(type, context, createUnqualifiedElement(context, htmlPointer), true);
if( element == null )
{
return null;
}
el... | static <T extends IHTMLElement> T function( Class<T> type, IHTMLContext context, String htmlPointer ) { IHTMLElement element = findElementAndIdentify(type, context, createUnqualifiedElement(context, htmlPointer), true); if( element == null ) { return null; } else if( type.isInstance(element) ) { return type.cast(elemen... | /**
* Find a typed HTML element inside the context based on the HTML Pointer
*
* @param type
* @param context
* @param htmlPointer
* @return the element
*/ | Find a typed HTML element inside the context based on the HTML Pointer | findElementByHTMLPointer | {
"repo_name": "noushadali/uiunit-core",
"path": "src/java/com/cordys/cm/uiunit/elements/finder/ElementFinder.java",
"license": "apache-2.0",
"size": 14519
} | [
"com.cordys.cm.uiunit.elements.html.IHTMLElement",
"com.cordys.cm.uiunit.exceptions.UIUnitException",
"com.cordys.cm.uiunit.framework.IHTMLContext",
"com.cordys.cm.uiunit.message.Messages"
] | import com.cordys.cm.uiunit.elements.html.IHTMLElement; import com.cordys.cm.uiunit.exceptions.UIUnitException; import com.cordys.cm.uiunit.framework.IHTMLContext; import com.cordys.cm.uiunit.message.Messages; | import com.cordys.cm.uiunit.elements.html.*; import com.cordys.cm.uiunit.exceptions.*; import com.cordys.cm.uiunit.framework.*; import com.cordys.cm.uiunit.message.*; | [
"com.cordys.cm"
] | com.cordys.cm; | 1,729,998 |
private static boolean IsComment (final String s) {
Pattern p = Pattern.compile("^( )*#.*");
Matcher m = p.matcher(s);
if (m.matches()) {
return true;
}
return false;
} | static boolean function (final String s) { Pattern p = Pattern.compile(STR); Matcher m = p.matcher(s); if (m.matches()) { return true; } return false; } | /** Checks if is comment.
*
* @param s the s
* @return true, if successful */ | Checks if is comment | IsComment | {
"repo_name": "sabarjp/VictusLudus",
"path": "victusludus/src/com/teamderpy/victusludus/readerwriter/JLDLRandomReaderWriter.java",
"license": "mit",
"size": 11630
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 319,234 |
void setMain() {
if (mToken == null) {
Log.w(TAG, "The session has been already released");
return;
}
try {
mService.setMainSession(mToken, mUserId);
} catch (RemoteException e) {
throw new RuntimeExc... | void setMain() { if (mToken == null) { Log.w(TAG, STR); return; } try { mService.setMainSession(mToken, mUserId); } catch (RemoteException e) { throw new RuntimeException(e); } } | /**
* Sets this as the main session. The main session is a session whose corresponding TV
* input determines the HDMI-CEC active source device.
*
* @see TvView#setMain
*/ | Sets this as the main session. The main session is a session whose corresponding TV input determines the HDMI-CEC active source device | setMain | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/media/java/android/media/tv/TvInputManager.java",
"license": "gpl-3.0",
"size": 72558
} | [
"android.os.RemoteException",
"android.util.Log"
] | import android.os.RemoteException; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 1,604,187 |
public Future<Object> keyUp(ISelector selector); | Future<Object> function(ISelector selector); | /**
* Triggers a key up event on the elements specified by the given selector.
* Typically only focused elements can be triggered.
*
* @param selector
*
* @see <a href="http://api.jquery.com/keyup/">api.jquery.com/keyup/</a>
*/ | Triggers a key up event on the elements specified by the given selector. Typically only focused elements can be triggered | keyUp | {
"repo_name": "ag-se/swt-browser-improved",
"path": "src/main/java/de/fu_berlin/inf/ag_se/browser/extensions/IJQueryBrowser.java",
"license": "mit",
"size": 4513
} | [
"de.fu_berlin.inf.ag_se.browser.html.ISelector",
"java.util.concurrent.Future"
] | import de.fu_berlin.inf.ag_se.browser.html.ISelector; import java.util.concurrent.Future; | import de.fu_berlin.inf.ag_se.browser.html.*; import java.util.concurrent.*; | [
"de.fu_berlin.inf",
"java.util"
] | de.fu_berlin.inf; java.util; | 1,421,816 |
public void testImplicitColumnNames() {
IgniteCache<Key, Person> p = ignite(0).cache("K2P").withKeepBinary();
p.query(new SqlFieldsQuery(
"insert into Person values (1, 1, 'Vova')")).getAll();
assertEquals(createPerson(1, "Vova"), p.get(new Key(1)));
p.query(new SqlFie... | void function() { IgniteCache<Key, Person> p = ignite(0).cache("K2P").withKeepBinary(); p.query(new SqlFieldsQuery( STR)).getAll(); assertEquals(createPerson(1, "Vova"), p.get(new Key(1))); p.query(new SqlFieldsQuery( STR)).getAll(); assertEquals(createPerson(2, "Sergi"), p.get(new Key(2))); assertEquals(createPerson(3... | /**
* Test insert with implicit column names.
*/ | Test insert with implicit column names | testImplicitColumnNames | {
"repo_name": "irudyak/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInsertSqlQuerySelfTest.java",
"license": "apache-2.0",
"size": 8210
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.query.SqlFieldsQuery"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.SqlFieldsQuery; | import org.apache.ignite.*; import org.apache.ignite.cache.query.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,029,298 |
private void addRelevantProjectDependenciesToClasspath(List<URL> path) throws MojoExecutionException {
if (this.includeProjectDependencies) {
try {
getLog().debug("Project Dependencies will be included.");
URL mainClasses = new File(project.getBuild().getOutputDi... | void function(List<URL> path) throws MojoExecutionException { if (this.includeProjectDependencies) { try { getLog().debug(STR); URL mainClasses = new File(project.getBuild().getOutputDirectory()).toURI().toURL(); getLog().debug(STR + mainClasses); path.add(mainClasses); Set<Artifact> dependencies = CastUtils.cast(proje... | /**
* Add any relevant project dependencies to the classpath. Takes
* includeProjectDependencies into consideration.
*
* @param path classpath of {@link java.net.URL} objects
* @throws org.apache.maven.plugin.MojoExecutionException
*/ | Add any relevant project dependencies to the classpath. Takes includeProjectDependencies into consideration | addRelevantProjectDependenciesToClasspath | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "tooling/maven/guice-maven-plugin/src/main/java/org/apache/camel/guice/maven/RunMojo.java",
"license": "apache-2.0",
"size": 33301
} | [
"java.io.File",
"java.net.MalformedURLException",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.apache.camel.util.CastUtils",
"org.apache.maven.artifact.Artifact",
"org.apache.maven.plugin.MojoExecutionException"
] | import java.io.File; import java.net.MalformedURLException; import java.util.Iterator; import java.util.List; import java.util.Set; import org.apache.camel.util.CastUtils; import org.apache.maven.artifact.Artifact; import org.apache.maven.plugin.MojoExecutionException; | import java.io.*; import java.net.*; import java.util.*; import org.apache.camel.util.*; import org.apache.maven.artifact.*; import org.apache.maven.plugin.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.camel",
"org.apache.maven"
] | java.io; java.net; java.util; org.apache.camel; org.apache.maven; | 13,178 |
public static void prepDropdowns(RequestContext ctx, Channel original) {
User loggedInUser = ctx.getCurrentUser();
// populate parent base channels
List<Map<String, String>> baseChannels = new ArrayList<Map<String, String>>();
List<Channel> bases = ChannelManager.findAllBaseChannelsF... | static void function(RequestContext ctx, Channel original) { User loggedInUser = ctx.getCurrentUser(); List<Map<String, String>> baseChannels = new ArrayList<Map<String, String>>(); List<Channel> bases = ChannelManager.findAllBaseChannelsForOrg( loggedInUser); LocalizationService ls = LocalizationService.getInstance();... | /**
* prep the dropdown menues for the edit page
* @param ctx request context for this request
* @param original original channel if cloning, null otherwise
*/ | prep the dropdown menues for the edit page | prepDropdowns | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/action/channel/manage/EditChannelAction.java",
"license": "gpl-2.0",
"size": 34562
} | [
"com.redhat.rhn.common.localization.LocalizationService",
"com.redhat.rhn.domain.channel.Channel",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.struts.RequestContext",
"com.redhat.rhn.manager.channel.ChannelManager",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import com.redhat.rhn.common.localization.LocalizationService; import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.struts.RequestContext; import com.redhat.rhn.manager.channel.ChannelManager; import java.util.ArrayList; import java.util.List; import java.... | import com.redhat.rhn.common.localization.*; import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.struts.*; import com.redhat.rhn.manager.channel.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 1,764,116 |
public void addRow(Vector rowData)
{
int rowIndex = dataVector.size();
dataVector.add(rowData);
newRowsAdded(new TableModelEvent(
this, rowIndex, rowIndex, -1, TableModelEvent.INSERT)
);
} | void function(Vector rowData) { int rowIndex = dataVector.size(); dataVector.add(rowData); newRowsAdded(new TableModelEvent( this, rowIndex, rowIndex, -1, TableModelEvent.INSERT) ); } | /**
* Adds a new row containing the specified data to the table and sends a
* {@link TableModelEvent} to all registered listeners.
*
* @param rowData the row data (<code>null</code> permitted).
*/ | Adds a new row containing the specified data to the table and sends a <code>TableModelEvent</code> to all registered listeners | addRow | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/table/DefaultTableModel.java",
"license": "gpl-2.0",
"size": 18390
} | [
"java.util.Vector",
"javax.swing.event.TableModelEvent"
] | import java.util.Vector; import javax.swing.event.TableModelEvent; | import java.util.*; import javax.swing.event.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,206,240 |
public Builder setProjectionData(@Nullable byte[] projectionData) {
this.projectionData = projectionData;
return this;
} | Builder function(@Nullable byte[] projectionData) { this.projectionData = projectionData; return this; } | /**
* Sets {@link Format#projectionData}. The default value is {@code null}.
*
* @param projectionData The {@link Format#projectionData}.
* @return The builder.
*/ | Sets <code>Format#projectionData</code>. The default value is null | setProjectionData | {
"repo_name": "stari4ek/ExoPlayer",
"path": "library/common/src/main/java/com/google/android/exoplayer2/Format.java",
"license": "apache-2.0",
"size": 57447
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 1,961,297 |
public static Optional<CxxPreprocessorInput> queryMetadataCxxPreprocessorInput(
ActionGraphBuilder graphBuilder,
BuildTarget baseTarget,
CxxPlatform platform,
HeaderVisibility visibility) {
return graphBuilder.requireMetadata(
baseTarget.withAppendedFlavors(
MetadataTyp... | static Optional<CxxPreprocessorInput> function( ActionGraphBuilder graphBuilder, BuildTarget baseTarget, CxxPlatform platform, HeaderVisibility visibility) { return graphBuilder.requireMetadata( baseTarget.withAppendedFlavors( MetadataType.CXX_PREPROCESSOR_INPUT.getFlavor(), platform.getFlavor(), visibility.getFlavor()... | /**
* Convenience function to query the {@link CxxPreprocessorInput} metadata of a target.
*
* <p>Use this function instead of constructing the BuildTarget manually.
*/ | Convenience function to query the <code>CxxPreprocessorInput</code> metadata of a target. Use this function instead of constructing the BuildTarget manually | queryMetadataCxxPreprocessorInput | {
"repo_name": "brettwooldridge/buck",
"path": "src/com/facebook/buck/cxx/CxxLibraryDescription.java",
"license": "apache-2.0",
"size": 18419
} | [
"com.facebook.buck.core.model.BuildTarget",
"com.facebook.buck.core.rules.ActionGraphBuilder",
"com.facebook.buck.cxx.toolchain.CxxPlatform",
"com.facebook.buck.cxx.toolchain.HeaderVisibility",
"java.util.Optional"
] | import com.facebook.buck.core.model.BuildTarget; import com.facebook.buck.core.rules.ActionGraphBuilder; import com.facebook.buck.cxx.toolchain.CxxPlatform; import com.facebook.buck.cxx.toolchain.HeaderVisibility; import java.util.Optional; | import com.facebook.buck.core.model.*; import com.facebook.buck.core.rules.*; import com.facebook.buck.cxx.toolchain.*; import java.util.*; | [
"com.facebook.buck",
"java.util"
] | com.facebook.buck; java.util; | 83,805 |
private void calculaInitLayers(LFSData data, int xSize, int ySize) {
Random rand = new Random();
unitsInterval = new LFSUnit[xSize][ySize];
unitsVector = new LFSUnit[xSize][ySize];
for (int j = 0; j < ySize; j++) {
for (int i = 0; i < xSize; i++) {
unitsInterval[i][j] = new LFSUnit(data, i, ... | void function(LFSData data, int xSize, int ySize) { Random rand = new Random(); unitsInterval = new LFSUnit[xSize][ySize]; unitsVector = new LFSUnit[xSize][ySize]; for (int j = 0; j < ySize; j++) { for (int i = 0; i < xSize; i++) { unitsInterval[i][j] = new LFSUnit(data, i, j, data.dim(), rand, true, LFSUnit.INIT_INTER... | /**
* Precalc of Interval and Vector initializatons
*
* @param data
* @param xSize
* @param ySize
*/ | Precalc of Interval and Vector initializatons | calculaInitLayers | {
"repo_name": "vbuendia/lfsom",
"path": "lfsom/src/lfsom/experiment/TrainSelector.java",
"license": "apache-2.0",
"size": 27595
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 2,376,539 |
@Test
public void testFilters() throws Exception {
final byte [] c1 = COLUMNS[1];
ColumnFamilyDescriptor cfd =
ColumnFamilyDescriptorBuilder.newBuilder(c0)
.setMinVersions(2).setMaxVersions(1000).setTimeToLive(1).
setKeepDeletedCells(KeepDeletedCells.FALSE).build();
ColumnFamilyDe... | void function() throws Exception { final byte [] c1 = COLUMNS[1]; ColumnFamilyDescriptor cfd = ColumnFamilyDescriptorBuilder.newBuilder(c0) .setMinVersions(2).setMaxVersions(1000).setTimeToLive(1). setKeepDeletedCells(KeepDeletedCells.FALSE).build(); ColumnFamilyDescriptor cfd2 = ColumnFamilyDescriptorBuilder.newBuilde... | /**
* Verify that basic filters still behave correctly with
* minimum versions enabled.
*/ | Verify that basic filters still behave correctly with minimum versions enabled | testFilters | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java",
"license": "apache-2.0",
"size": 20304
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.HBaseTestingUtility",
"org.apache.hadoop.hbase.KeepDeletedCells",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.client.ColumnFamilyDescriptor",
"org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuilder",
"org.apache.... | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.KeepDeletedCells; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptorBuil... | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 666,778 |
@Test(expected = IllegalArgumentException.class)
public void testeNullWahlkreisgewinner() {
// Fail bedeutet: Es wurde keine Exception geworfen, obwohl null als
// Wahlkreisgewinner gesetzt wurde.
wk.setGewinner(null);
} | @Test(expected = IllegalArgumentException.class) void function() { wk.setGewinner(null); } | /**
* Setzt null als Wahlkreisgewinner.
*/ | Setzt null als Wahlkreisgewinner | testeNullWahlkreisgewinner | {
"repo_name": "Bundeswahlrechner/Bundeswahlrechner",
"path": "mandatsverteilung/src/test/java/edu/kit/iti/formal/mandatsverteilung/datenhaltung/WahlkreisTest.java",
"license": "gpl-3.0",
"size": 2971
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,278,075 |
protected BPlusTree.IndexEntry saveBulk (Object id, BPlusTree.Node node, boolean isDuplicateEnabled){
Container container = determineTreeContainer.invoke(node);
container.update(id, node);
Separator sep = (Separator) btree.separator(node.getLast()).clone();
return (BPlusTree.IndexEntry)((BPlusTree.Index... | BPlusTree.IndexEntry function (Object id, BPlusTree.Node node, boolean isDuplicateEnabled){ Container container = determineTreeContainer.invoke(node); container.update(id, node); Separator sep = (Separator) btree.separator(node.getLast()).clone(); return (BPlusTree.IndexEntry)((BPlusTree.IndexEntry)btree.createIndexEnt... | /**
* Saves a node of the tree to external memory.
* @param id
* @param node
* @param isDuplicateEnabled
* @return
*/ | Saves a node of the tree to external memory | saveBulk | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/indexStructures/BPlusTreeBulkLoading.java",
"license": "lgpl-3.0",
"size": 11328
} | [
"xxl.core.collections.containers.Container",
"xxl.core.indexStructures.BPlusTree"
] | import xxl.core.collections.containers.Container; import xxl.core.indexStructures.BPlusTree; | import xxl.core.*; import xxl.core.collections.containers.*; | [
"xxl.core",
"xxl.core.collections"
] | xxl.core; xxl.core.collections; | 2,645,941 |
@Override
protected TestEnvironment createTestEnvironment(
TestParameters Param, PrintWriter log) throws Exception {
XInterface oObj = null;
XNameAccess PageStyles = null;
XStyle StdStyle = null;
XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(XStyleFamilies... | TestEnvironment function( TestParameters Param, PrintWriter log) throws Exception { XInterface oObj = null; XNameAccess PageStyles = null; XStyle StdStyle = null; XStyleFamiliesSupplier StyleFam = UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc); XNameAccess StyleFamNames = StyleFam.getStyleFamilies();... | /**
* Called to create an instance of <code>TestEnvironment</code>
* with an object to test and related objects. Obtains style
* <code>Standard</code> from style family <code>PageStyles</code>.
* Changes values of property <code>FooterIsOn</code> by <code>true</code>.
* Changes zoom value to 10%(foo... | Called to create an instance of <code>TestEnvironment</code> with an object to test and related objects. Obtains style <code>Standard</code> from style family <code>PageStyles</code>. Changes values of property <code>FooterIsOn</code> by <code>true</code>. Changes zoom value to 10%(footer must be in visible area of the... | createTestEnvironment | {
"repo_name": "jvanz/core",
"path": "qadevOOo/tests/java/mod/_sw/SwAccessibleFooterView.java",
"license": "gpl-3.0",
"size": 5986
} | [
"com.sun.star.accessibility.AccessibleRole",
"com.sun.star.accessibility.XAccessible",
"com.sun.star.awt.XWindow",
"com.sun.star.beans.XPropertySet",
"com.sun.star.container.XNameAccess",
"com.sun.star.frame.XController",
"com.sun.star.frame.XModel",
"com.sun.star.style.XStyle",
"com.sun.star.style.... | import com.sun.star.accessibility.AccessibleRole; import com.sun.star.accessibility.XAccessible; import com.sun.star.awt.XWindow; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XNameAccess; import com.sun.star.frame.XController; import com.sun.star.frame.XModel; import com.sun.star.style.XStyle; ... | import com.sun.star.accessibility.*; import com.sun.star.awt.*; import com.sun.star.beans.*; import com.sun.star.container.*; import com.sun.star.frame.*; import com.sun.star.style.*; import com.sun.star.uno.*; import com.sun.star.view.*; import java.io.*; | [
"com.sun.star",
"java.io"
] | com.sun.star; java.io; | 2,637,506 |
if (legacySerializer == null) {
legacySerializer = LegacyComponentSerializer.builder().character('\u00a7').build();
}
return legacySerializer;
} | if (legacySerializer == null) { legacySerializer = LegacyComponentSerializer.builder().character('\u00a7').build(); } return legacySerializer; } | /**
* Gets a {@link LegacyComponentSerializer} configured for uSkyBlock's (translatable) messages.
* @return LegacyComponentSerializer configured for uSkyblock's (translatable) messages.
*/ | Gets a <code>LegacyComponentSerializer</code> configured for uSkyBlock's (translatable) messages | getLegacySerializer | {
"repo_name": "rlf/uSkyBlock",
"path": "uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/player/NotificationManager.java",
"license": "gpl-3.0",
"size": 1943
} | [
"net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer"
] | import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; | import net.kyori.adventure.text.serializer.legacy.*; | [
"net.kyori.adventure"
] | net.kyori.adventure; | 2,278,041 |
public BigDecimal getChangeAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChangeAmt);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChangeAmt); if (bd == null) return Env.ZERO; return bd; } | /** Get ChangeAmt.
@return ChangeAmt */ | Get ChangeAmt | getChangeAmt | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/X_A_Asset_Change.java",
"license": "gpl-2.0",
"size": 44348
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,951,111 |
public void addEventListener(EventListener listener); | void function(EventListener listener); | /**
* Add an event listener to this view.
* @param listener The listener to add.
*/ | Add an event listener to this view | addEventListener | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/modules/foundation/appbase/src/classes/org/jdesktop/wonderland/modules/appbase/client/view/View2D.java",
"license": "agpl-3.0",
"size": 14251
} | [
"org.jdesktop.wonderland.client.input.EventListener"
] | import org.jdesktop.wonderland.client.input.EventListener; | import org.jdesktop.wonderland.client.input.*; | [
"org.jdesktop.wonderland"
] | org.jdesktop.wonderland; | 2,291,098 |
private void storeLargeComments(String statement) {
isReadyToCollectModificationHistory(statement);
if (StringUtil.isComment(statement) && !statement.equalsIgnoreCase("")) {
if (isReadyToCollectComment)
stepByStepLargeComment += statement + GenerateDocConstants.LINE_BRK_S... | void function(String statement) { isReadyToCollectModificationHistory(statement); if (StringUtil.isComment(statement) && !statement.equalsIgnoreCase(STR<doc @history>STRSTRSTRSTR"; } } | /**
* store the more info comments in a private variable
*
* @param statement - single line read from basic file
*/ | store the more info comments in a private variable | storeLargeComments | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/basic/ui/com.odcgroup.basic.ui/src/main/java/com/temenos/t24/tools/eclipse/basic/wizards/docgeneration/file/BasicFileReader.java",
"license": "epl-1.0",
"size": 9779
} | [
"com.temenos.t24.tools.eclipse.basic.utils.StringUtil"
] | import com.temenos.t24.tools.eclipse.basic.utils.StringUtil; | import com.temenos.t24.tools.eclipse.basic.utils.*; | [
"com.temenos.t24"
] | com.temenos.t24; | 646,708 |
public Iterator<Key> iterator() {
return st.keySet().iterator();
} | Iterator<Key> function() { return st.keySet().iterator(); } | /**
* Return an <tt>Iterator</tt> for the keys in the table.
* To iterate over all of the keys in the symbol table <tt>st</tt>, use the
* foreach notation: <tt>for (Key key : st)</tt>.
*/ | Return an Iterator for the keys in the table. To iterate over all of the keys in the symbol table st, use the foreach notation: for (Key key : st) | iterator | {
"repo_name": "tsourolampis/Optimal-Quasicliques",
"path": "src/GraphUtilities/ST.java",
"license": "mit",
"size": 2793
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 245,078 |
public void waitUnlock(FullPageId id) {
if (!hasLockedPages)
return;
synchronized (locked) {
if (!hasLockedPages)
return;
boolean interrupted = false;
while (locked.contains(id)) {
... | void function(FullPageId id) { if (!hasLockedPages) return; synchronized (locked) { if (!hasLockedPages) return; boolean interrupted = false; while (locked.contains(id)) { if (log.isDebugEnabled()) log.debug(STR + id + STR); try { locked.wait(); } catch (InterruptedException e) { interrupted = true; } } if (interrupted... | /**
* Method is returned when page is available to be loaded from store, or waits for replacement finish.
*
* @param id full page ID to be loaded from store.
*/ | Method is returned when page is available to be loaded from store, or waits for replacement finish | waitUnlock | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/DelayedPageReplacementTracker.java",
"license": "apache-2.0",
"size": 6976
} | [
"org.apache.ignite.internal.pagemem.FullPageId"
] | import org.apache.ignite.internal.pagemem.FullPageId; | import org.apache.ignite.internal.pagemem.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 199,038 |
public static org.opennms.netmgt.config.reporting.Time unmarshal(
final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
return (org.opennms.netmgt.config.reporting.Time) Unmarshaller.unmarshal(org.opennms.netmgt.config.reporti... | static org.opennms.netmgt.config.reporting.Time function( final java.io.Reader reader) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { return (org.opennms.netmgt.config.reporting.Time) Unmarshaller.unmarshal(org.opennms.netmgt.config.reporting.Time.class, reader); } | /**
* Method unmarshal.
*
* @param reader
* @throws org.exolab.castor.xml.MarshalException if object is
* null or if any SAXException is thrown during marshaling
* @throws org.exolab.castor.xml.ValidationException if this
* object is an invalid instance according to the schema
*... | Method unmarshal | unmarshal | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/reporting/Time.java",
"license": "gpl-2.0",
"size": 6618
} | [
"org.exolab.castor.xml.Unmarshaller"
] | import org.exolab.castor.xml.Unmarshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 2,214,832 |
public String getElementIDByLabel(final String inLabel) throws CodeNotFoundException {
Iterator<CodeListItem> lItems = getElementIdCollection().iterator();
while (lItems.hasNext()) {
final CodeListItem lItem = lItems.next();
if (lItem.getLabel().equals(inLabel)) {
... | String function(final String inLabel) throws CodeNotFoundException { Iterator<CodeListItem> lItems = getElementIdCollection().iterator(); while (lItems.hasNext()) { final CodeListItem lItem = lItems.next(); if (lItem.getLabel().equals(inLabel)) { return lItem.getElementID(); } } lItems = getElementIdCollection().iterat... | /** Translate a label to the appropriate ElementID.
*
* @param inLabel java.lang.String the label to translate
* @return java.lang.String the appropriate ElementID
* @exception CodeNotFoundException: If no appropriate ElementID can be found */ | Translate a label to the appropriate ElementID | getElementIDByLabel | {
"repo_name": "aktion-hip/vif",
"path": "org.hip.viffw/src/org/hip/kernel/code/CodeList.java",
"license": "gpl-2.0",
"size": 13274
} | [
"java.util.Iterator",
"java.util.StringTokenizer"
] | import java.util.Iterator; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 2,214,840 |
public final boolean matches(final ByteReader targetFile, final long maxBytesToScan) {
boolean matchResult = true;
// Use a local reference to the sequence list for better performance:
final SubSequence[] seq = this.sequences;
boolean fixedSubsequence;
if (reverseOrder... | final boolean function(final ByteReader targetFile, final long maxBytesToScan) { boolean matchResult = true; final SubSequence[] seq = this.sequences; boolean fixedSubsequence; if (reverseOrder) { fixedSubsequence = this.anchoredToEOF; final long fileSize = targetFile.getNumBytes() - 1L; targetFile.setFileMarker(fileSi... | /**
* checks whether the binary file specified by targetFile matches
* with this byte sequence.
*
* @param targetFile The binary file to be identified
* @param maxBytesToScan the maximum number of bytes to scan from the start
* or the end of a file, or a negative number meaning a ful... | checks whether the binary file specified by targetFile matches with this byte sequence | matches | {
"repo_name": "Det-Kongelige-Bibliotek/droid",
"path": "droid-core/src/main/java/uk/gov/nationalarchives/droid/core/signature/droid6/ByteSequence.java",
"license": "bsd-3-clause",
"size": 21349
} | [
"uk.gov.nationalarchives.droid.core.signature.ByteReader"
] | import uk.gov.nationalarchives.droid.core.signature.ByteReader; | import uk.gov.nationalarchives.droid.core.signature.*; | [
"uk.gov.nationalarchives"
] | uk.gov.nationalarchives; | 1,646,665 |
protected void transformResource(final Assertions.Resource resource, final Transformer transformer,
final String targetDir) throws Exception {
if (resource.getFilename().endsWith(".txml")) {
StreamSource txmlSource = new StreamSource(new FileInputStream(new F... | void function(final Assertions.Resource resource, final Transformer transformer, final String targetDir) throws Exception { if (resource.getFilename().endsWith(".txml")) { StreamSource txmlSource = new StreamSource(new FileInputStream(new File(TXML_TESTS_DIR, resource.getFilename()))); transformer.transform(txmlSource,... | /**
* XSL transform a W3C IRP test SCXML resource to a datamodel specific location and format,
* or simply copy a non SCXML resource to that location.
* @param resource the test resource definition
* @param transformer the XSL transformer to use
* @param targetDir the target location for the tr... | XSL transform a W3C IRP test SCXML resource to a datamodel specific location and format, or simply copy a non SCXML resource to that location | transformResource | {
"repo_name": "svn2github/commons-scxml2",
"path": "src/test/java/org/apache/commons/scxml2/w3c/W3CTests.java",
"license": "apache-2.0",
"size": 31800
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileOutputStream",
"javax.xml.transform.Transformer",
"javax.xml.transform.stream.StreamResult",
"javax.xml.transform.stream.StreamSource",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import javax.xml.transform.Transformer; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.apache.commons.io.FileUtils; | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; import org.apache.commons.io.*; | [
"java.io",
"javax.xml",
"org.apache.commons"
] | java.io; javax.xml; org.apache.commons; | 708,164 |
T disable(Long id) throws EntityNotFoundException; | T disable(Long id) throws EntityNotFoundException; | /**
* Disables one entity in the application.
*
* @param id Identifier of the entity to be disabled.
* @return {@link entityDto} with the values of the disabled entity.
* @throws entityNotFoundException If the entity to disable does not exist.
*/ | Disables one entity in the application | disable | {
"repo_name": "giste/spring-server",
"path": "src/main/java/org/giste/spring/server/service/CrudeService.java",
"license": "gpl-3.0",
"size": 1178
} | [
"org.giste.spring.server.service.exception.EntityNotFoundException"
] | import org.giste.spring.server.service.exception.EntityNotFoundException; | import org.giste.spring.server.service.exception.*; | [
"org.giste.spring"
] | org.giste.spring; | 1,191,331 |
protected native int nativeSetBuffers(long pointer, ByteBuffer parameter_buffer, int parameter_buffer_size,
ByteBuffer resultBuffer, int result_buffer_size,
ByteBuffer exceptionBuffer, int exception_buffer_size); | native int function(long pointer, ByteBuffer parameter_buffer, int parameter_buffer_size, ByteBuffer resultBuffer, int result_buffer_size, ByteBuffer exceptionBuffer, int exception_buffer_size); | /**
* Sets (or re-sets) all the shared direct byte buffers in the EE.
* @param pointer
* @param parameter_buffer
* @param parameter_buffer_size
* @param resultBuffer
* @param result_buffer_size
* @param exceptionBuffer
* @param exception_buffer_size
* @return error code
... | Sets (or re-sets) all the shared direct byte buffers in the EE | nativeSetBuffers | {
"repo_name": "wwgong/CVoltDB",
"path": "src/frontend/org/voltdb/jni/ExecutionEngine.java",
"license": "gpl-3.0",
"size": 27290
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,759,699 |
public final Charset getCharset() {
return this.charset;
} | final Charset function() { return this.charset; } | /**
* Return the charset to use for reading from the resource,
* or {@code null} if none specified.
*/ | Return the charset to use for reading from the resource, or null if none specified | getCharset | {
"repo_name": "hanyosh/gagu",
"path": "gagu-core/src/main/java/com/github/gagu/core/io/support/EncodedResource.java",
"license": "apache-2.0",
"size": 4634
} | [
"java.nio.charset.Charset"
] | import java.nio.charset.Charset; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 696,451 |
@Test (timeout=300000)
public void testIdCmp() {
final PermissionStatus perm = PermissionStatus.createImmutable(
"user", "group", FsPermission.createImmutable((short)0));
final INodeDirectory snapshottable = new INodeDirectory(0,
DFSUtil.string2Bytes("foo"), perm, 0L);
snapshottable.addS... | @Test (timeout=300000) void function() { final PermissionStatus perm = PermissionStatus.createImmutable( "user", "group", FsPermission.createImmutable((short)0)); final INodeDirectory snapshottable = new INodeDirectory(0, DFSUtil.string2Bytes("foo"), perm, 0L); snapshottable.addSnapshottableFeature(); final Snapshot[] ... | /**
* Test {@link Snapshot#ID_COMPARATOR}.
*/ | Test <code>Snapshot#ID_COMPARATOR</code> | testIdCmp | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java",
"license": "apache-2.0",
"size": 11770
} | [
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.fs.permission.PermissionStatus",
"org.apache.hadoop.hdfs.DFSUtil",
"org.apache.hadoop.hdfs.server.namenode.INodeDirectory",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.fs.permission.PermissionStatus; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,807,756 |
@WebMethod
@Path("/checkForUserInAuthzGroup")
@Produces("text/plain")
@GET
public boolean checkForUserInAuthzGroup(
@WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
@WebParam(name = "authzgroupid", partName = "authzgroupid") @Qu... | @Path(STR) @Produces(STR) boolean function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String authzgroupid, @WebParam(name = "eid", partName = "eid") @QueryParam("eid") String eid) { Session s = establishSession(sessionid); if (ADMIN_S... | /**
* Check if a user is in a particular authzgroup
*
* @param sessionid the id of a valid session, generally the admin user
* @param authzgroupid the id of the authzgroup or site you want to check (if site: /site/SITEID)
* @param eid the userid of the person you want to check
... | Check if a user is in a particular authzgroup | checkForUserInAuthzGroup | {
"repo_name": "pushyamig/sakai",
"path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java",
"license": "apache-2.0",
"size": 209455
} | [
"java.util.Iterator",
"javax.jws.WebParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"org.sakaiproject.authz.api.AuthzGroup",
"org.sakaiproject.tool.api.Session",
"org.sakaiproject.user.api.User"
] | import java.util.Iterator; import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.tool.api.Session; import org.sakaiproject.user.api.User; | import java.util.*; import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.user.api.*; | [
"java.util",
"javax.jws",
"javax.ws",
"org.sakaiproject.authz",
"org.sakaiproject.tool",
"org.sakaiproject.user"
] | java.util; javax.jws; javax.ws; org.sakaiproject.authz; org.sakaiproject.tool; org.sakaiproject.user; | 1,446,601 |
//@pda jdbc40
public SQLXML getSQLXML(int columnIndex) throws SQLException
{
validateResultSet();
return resultSet_.getSQLXML(columnIndex);
}
//@pda jdbc40 | SQLXML function(int columnIndex) throws SQLException { validateResultSet(); return resultSet_.getSQLXML(columnIndex); } | /**
* Retrieves the value of the designated column in the current row of
* this <code>ResultSet</code> as a
* <code>java.sql.SQLXML</code> object in the Java programming language.
* @param columnIndex the first column is 1, the second is 2, ...
* @return a <code>SQLXML</code> object that maps... | Retrieves the value of the designated column in the current row of this <code>ResultSet</code> as a <code>java.sql.SQLXML</code> object in the Java programming language | getSQLXML | {
"repo_name": "piguangming/jt400",
"path": "jdbc40/com/ibm/as400/access/AS400JDBCRowSet.java",
"license": "epl-1.0",
"size": 308525
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 522,762 |
@Override
public SCMNodeMetric getNodeStat(DatanodeDetails datanodeDetails) {
return new SCMNodeMetric(nodeMetricMap.get(datanodeDetails.getUuid()));
} | SCMNodeMetric function(DatanodeDetails datanodeDetails) { return new SCMNodeMetric(nodeMetricMap.get(datanodeDetails.getUuid())); } | /**
* Return the node stat of the specified datanode.
* @param datanodeDetails - datanode details.
* @return node stat if it is live/stale, null if it is dead or does't exist.
*/ | Return the node stat of the specified datanode | getNodeStat | {
"repo_name": "ChetnaChaudhari/hadoop",
"path": "hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/MockNodeManager.java",
"license": "apache-2.0",
"size": 15150
} | [
"org.apache.hadoop.hdds.protocol.DatanodeDetails",
"org.apache.hadoop.hdds.scm.container.placement.metrics.SCMNodeMetric"
] | import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apache.hadoop.hdds.scm.container.placement.metrics.SCMNodeMetric; | import org.apache.hadoop.hdds.protocol.*; import org.apache.hadoop.hdds.scm.container.placement.metrics.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,636,281 |
final public void enable() {
if (enabled)
throw new PluginException(this, "Plugin is already enabled");
try {
enabled = true;
onEnable();
} catch (final Exception e) {
enabled = false;
Logging.getLogger().error(
"Could not enable " + ChatColor.RED + getName()
+ ChatColor.WHITE
... | final void function() { if (enabled) throw new PluginException(this, STR); try { enabled = true; onEnable(); } catch (final Exception e) { enabled = false; Logging.getLogger().error( STR + ChatColor.RED + getName() + ChatColor.WHITE + STR); throw new PluginException(this, STR, e); } } | /**
* Used to enable the plugin
*
* @throws PluginException
* If the plugin is already enabled, or if couldn't be enabled
*/ | Used to enable the plugin | enable | {
"repo_name": "MarineMC/MarineStandalone",
"path": "src/main/java/org/marinemc/plugins/Plugin.java",
"license": "gpl-2.0",
"size": 6006
} | [
"org.marinemc.game.chat.ChatColor",
"org.marinemc.logging.Logging"
] | import org.marinemc.game.chat.ChatColor; import org.marinemc.logging.Logging; | import org.marinemc.game.chat.*; import org.marinemc.logging.*; | [
"org.marinemc.game",
"org.marinemc.logging"
] | org.marinemc.game; org.marinemc.logging; | 53,174 |
public static ims.core.resource.domain.objects.HcpLocation extractHcpLocation(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.HCPLocationLiteVo valueObject)
{
return extractHcpLocation(domainFactory, valueObject, new HashMap());
}
| static ims.core.resource.domain.objects.HcpLocation function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.HCPLocationLiteVo valueObject) { return extractHcpLocation(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractHcpLocation | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/HCPLocationLiteVoAssembler.java",
"license": "agpl-3.0",
"size": 18249
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 899,115 |
Matrix buildSymmetric(); | Matrix buildSymmetric(); | /**
* Commits the building process and returns a symmetric matrix.
*
* @return a freshly built matrix
*/ | Commits the building process and returns a symmetric matrix | buildSymmetric | {
"repo_name": "fernandoj92/mvca-parkinson",
"path": "ltm-analysis/src/main/java/org/la4j/matrix/builder/MatrixBuilder.java",
"license": "apache-2.0",
"size": 3015
} | [
"org.la4j.matrix.Matrix"
] | import org.la4j.matrix.Matrix; | import org.la4j.matrix.*; | [
"org.la4j.matrix"
] | org.la4j.matrix; | 656,949 |
@Deactivate
protected void deactivate(ComponentContext cc) {
globalHandlerServiceSR.deactivate(cc);
this.cContext = null;
if (listener != null) {
LibertyApplicationBusFactory.getInstance().unregisterApplicationBusListener(listener);
}
} | void function(ComponentContext cc) { globalHandlerServiceSR.deactivate(cc); this.cContext = null; if (listener != null) { LibertyApplicationBusFactory.getInstance().unregisterApplicationBusListener(listener); } } | /**
* DS-driven de-activation
*/ | DS-driven de-activation | deactivate | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/globalhandler/JaxwsGlobalHandlerServiceImpl.java",
"license": "epl-1.0",
"size": 4738
} | [
"com.ibm.ws.jaxws.bus.LibertyApplicationBusFactory",
"org.osgi.service.component.ComponentContext"
] | import com.ibm.ws.jaxws.bus.LibertyApplicationBusFactory; import org.osgi.service.component.ComponentContext; | import com.ibm.ws.jaxws.bus.*; import org.osgi.service.component.*; | [
"com.ibm.ws",
"org.osgi.service"
] | com.ibm.ws; org.osgi.service; | 1,616,881 |
public NotePadMeta getNote( int x, int y ) {
int i, s;
s = notes.size();
for ( i = s - 1; i >= 0; i-- ) {
// Back to front because drawing goes from start to end
NotePadMeta ni = notes.get( i );
Point loc = ni.getLocation();
Point p = new Point( loc.x, loc.y );
if ( x >= p.x... | NotePadMeta function( int x, int y ) { int i, s; s = notes.size(); for ( i = s - 1; i >= 0; i-- ) { NotePadMeta ni = notes.get( i ); Point loc = ni.getLocation(); Point p = new Point( loc.x, loc.y ); if ( x >= p.x && x <= p.x + ni.width + 2 * Const.NOTE_MARGIN && y >= p.y && y <= p.y + ni.height + 2 * Const.NOTE_MARGIN... | /**
* Find the note that is located on a certain point on the canvas.
*
* @param x the x-coordinate of the point queried
* @param y the y-coordinate of the point queried
* @return The note information if a note is located at the point. Otherwise, if nothing was found: null.
*/ | Find the note that is located on a certain point on the canvas | getNote | {
"repo_name": "tmcsantos/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 56783
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.NotePadMeta",
"org.pentaho.di.core.gui.Point"
] | import org.pentaho.di.core.Const; import org.pentaho.di.core.NotePadMeta; import org.pentaho.di.core.gui.Point; | import org.pentaho.di.core.*; import org.pentaho.di.core.gui.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,358,516 |
public static String compound(String destName, String busName)
{
if (tc.isEntryEnabled())
SibTr.entry(tc, "compound");
String compound = destName + SEPERATOR + busName;
if (tc.isEntryEnabled())
SibTr.exit(tc, "compound", compound);
return compound... | static String function(String destName, String busName) { if (tc.isEntryEnabled()) SibTr.entry(tc, STR); String compound = destName + SEPERATOR + busName; if (tc.isEntryEnabled()) SibTr.exit(tc, STR, compound); return compound; } | /**
* Create a compound destination name.
*
* @param destName
* @param busName
* @return The compound destination name
*/ | Create a compound destination name | compound | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/utils/AliasChainValidator.java",
"license": "epl-1.0",
"size": 8594
} | [
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.ws.sib.utils.ras.SibTr; | import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 808,364 |
@Validate
public void init() {
// restores jms message consumers in the case they were destroyed.
// Actually they are destroyed every time, this component stops, the
// difference is only when component first time is instantiated and new
// message consumers have came
... | void function() { Set<ProviderMessageConsumer> consumers = jmsMessageConsumers.keySet(); for (ProviderMessageConsumer providerMessageConsumer : consumers) { if (jmsMessageConsumers.get(providerMessageConsumer) == null) { bindMessageConsumer(providerMessageConsumer); } } } | /**
* validates iPOJO instance
*/ | validates iPOJO instance | init | {
"repo_name": "Communote/communote-server",
"path": "communote/plugins/communote-message-queue/communote-plugins-mq-adapter-jms/src/main/java/com/communote/plugins/mq/provider/jms/ConsumerFactory.java",
"license": "apache-2.0",
"size": 6502
} | [
"com.communote.plugins.mq.service.provider.ProviderMessageConsumer",
"java.util.Set"
] | import com.communote.plugins.mq.service.provider.ProviderMessageConsumer; import java.util.Set; | import com.communote.plugins.mq.service.provider.*; import java.util.*; | [
"com.communote.plugins",
"java.util"
] | com.communote.plugins; java.util; | 188,995 |
public GoogleCredentials getGoogleCredentials() throws ProcessException; | GoogleCredentials function() throws ProcessException; | /**
* Get Google Credentials
* @return Valid Google Credentials suitable for authorizing requests on the platform.
* @throws ProcessException process exception in case there is problem in getting credentials
*/ | Get Google Credentials | getGoogleCredentials | {
"repo_name": "YolandaMDavis/nifi",
"path": "nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-services-api/src/main/java/org/apache/nifi/gcp/credentials/service/GCPCredentialsService.java",
"license": "apache-2.0",
"size": 1954
} | [
"com.google.auth.oauth2.GoogleCredentials",
"org.apache.nifi.processor.exception.ProcessException"
] | import com.google.auth.oauth2.GoogleCredentials; import org.apache.nifi.processor.exception.ProcessException; | import com.google.auth.oauth2.*; import org.apache.nifi.processor.exception.*; | [
"com.google.auth",
"org.apache.nifi"
] | com.google.auth; org.apache.nifi; | 2,258,538 |
public static void monitorRemoteTransformation( LogChannelInterface log, String carteObjectId, String transName,
SlaveServer remoteSlaveServer ) {
monitorRemoteTransformation( log, carteObjectId, transName, remoteSlaveServer, 5 );
} | static void function( LogChannelInterface log, String carteObjectId, String transName, SlaveServer remoteSlaveServer ) { monitorRemoteTransformation( log, carteObjectId, transName, remoteSlaveServer, 5 ); } | /**
* Monitors a remote transformation every 5 seconds.
*
* @param log the log channel interface
* @param carteObjectId the Carte object ID
* @param transName the transformation name
* @param remoteSlaveServer the remote slave server
*/ | Monitors a remote transformation every 5 seconds | monitorRemoteTransformation | {
"repo_name": "e-cuellar/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199294
} | [
"org.pentaho.di.cluster.SlaveServer",
"org.pentaho.di.core.logging.LogChannelInterface"
] | import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.logging.LogChannelInterface; | import org.pentaho.di.cluster.*; import org.pentaho.di.core.logging.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,093,304 |
public void put(UUID playerUUID, List<String> playerMessages) {
messages.put(playerUUID, playerMessages);
} | void function(UUID playerUUID, List<String> playerMessages) { messages.put(playerUUID, playerMessages); } | /**
* Stores a message for player
*
* @param playerUUID
* @param playerMessages
*/ | Stores a message for player | put | {
"repo_name": "tastybento/beaconz",
"path": "src/main/java/com/wasteofplastic/beaconz/Messages.java",
"license": "mit",
"size": 8056
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,753,342 |
public void retain(BigInteger[] array) {
this.data.retainAll(Arrays.asList(array));
} | void function(BigInteger[] array) { this.data.retainAll(Arrays.asList(array)); } | /**
* Retains all the values in the array.
* @param BigInteger[] data for retention
*/ | Retains all the values in the array | retain | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigintegerflex/plate/WellBigInteger.java",
"license": "apache-2.0",
"size": 25563
} | [
"java.math.BigInteger",
"java.util.Arrays"
] | import java.math.BigInteger; import java.util.Arrays; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,379,231 |
@RequestMapping(value = "/hue/groups/delete", method = RequestMethod.POST)
String deleteGroup(@ModelAttribute(value="deleteId") String id, Model model) {
HueUtil.deleteGroupWithId(id, config);
populateGroupsInModel(model);
return "groups";
} | @RequestMapping(value = STR, method = RequestMethod.POST) String deleteGroup(@ModelAttribute(value=STR) String id, Model model) { HueUtil.deleteGroupWithId(id, config); populateGroupsInModel(model); return STR; } | /**
* Post method for deleting a group.
*
* @param id
* @param model
* @return
*/ | Post method for deleting a group | deleteGroup | {
"repo_name": "snieking/HueServer",
"path": "src/main/java/com/sonie/web/controller/HueGuiController.java",
"license": "mit",
"size": 3547
} | [
"com.sonie.web.util.HueUtil",
"org.springframework.ui.Model",
"org.springframework.web.bind.annotation.ModelAttribute",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import com.sonie.web.util.HueUtil; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import com.sonie.web.util.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; | [
"com.sonie.web",
"org.springframework.ui",
"org.springframework.web"
] | com.sonie.web; org.springframework.ui; org.springframework.web; | 1,310,596 |
public static MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> getValidationResultsClient(String orderId) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.orders.OrderValidationResultUrl.getValidationResultsUrl(orderId);
String verb = "GET";
Class<?> clz = n... | static MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> function(String orderId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.OrderValidationResultUrl.getValidationResultsUrl(orderId); String verb = "GET"; Class<?> clz = new ArrayList<com.mozu.api.contracts.com... | /**
*
* <p><pre><code>
* MozuClient<List<com.mozu.api.contracts.commerceruntime.orders.OrderValidationResult>> mozuClient=GetValidationResultsClient( orderId);
* client.setBaseAddress(url);
* client.executeRequest();
* OrderValidationResult orderValidationResult = client.Result();
* </code></pre><... | <code><code> MozuClient> mozuClient=GetValidationResultsClient( orderId); client.setBaseAddress(url); client.executeRequest(); OrderValidationResult orderValidationResult = client.Result(); </code></code> | getValidationResultsClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderValidationResultClient.java",
"license": "mit",
"size": 4990
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl",
"java.util.ArrayList",
"java.util.List"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List; | import com.mozu.api.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 118,116 |
public OperationsNodeInfo getNodeInfo() {
return nodeInfo;
} | OperationsNodeInfo function() { return nodeInfo; } | /**
* Self NodeInfo getter.
*
* @return OperationsNodeInfo
*/ | Self NodeInfo getter | getNodeInfo | {
"repo_name": "vzhukovskyi/kaa",
"path": "server/common/zk/src/main/java/org/kaaproject/kaa/server/common/zk/operations/OperationsNode.java",
"license": "apache-2.0",
"size": 3435
} | [
"org.kaaproject.kaa.server.common.zk.gen.OperationsNodeInfo"
] | import org.kaaproject.kaa.server.common.zk.gen.OperationsNodeInfo; | import org.kaaproject.kaa.server.common.zk.gen.*; | [
"org.kaaproject.kaa"
] | org.kaaproject.kaa; | 1,655,633 |
public String getDateOnly(final Date date) {
DateFormat df = getDateOnlyFormat();
synchronized (df) {
return df.format(date);
}
} | String function(final Date date) { DateFormat df = getDateOnlyFormat(); synchronized (df) { return df.format(date); } } | /**
* Gets the date only.
*
* @param date
* the date
* @return the date only
*/ | Gets the date only | getDateOnly | {
"repo_name": "rPraml/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/utils/DominoFormatter.java",
"license": "apache-2.0",
"size": 4617
} | [
"com.ibm.icu.text.DateFormat",
"java.util.Date"
] | import com.ibm.icu.text.DateFormat; import java.util.Date; | import com.ibm.icu.text.*; import java.util.*; | [
"com.ibm.icu",
"java.util"
] | com.ibm.icu; java.util; | 1,390,664 |
public Optional<FieldChange> clearField(String name, EntryEventSource eventSource) {
String fieldName = toLowerCase(name);
if (BibEntry.ID_FIELD.equals(fieldName)) {
throw new IllegalArgumentException("The field name '" + name + "' is reserved");
}
Optional<String> oldV... | Optional<FieldChange> function(String name, EntryEventSource eventSource) { String fieldName = toLowerCase(name); if (BibEntry.ID_FIELD.equals(fieldName)) { throw new IllegalArgumentException(STR + name + STR); } Optional<String> oldValue = getField(fieldName); if (!oldValue.isPresent()) { return Optional.empty(); } ch... | /**
* Remove the mapping for the field name, and notify listeners about
* the change including the {@link EntryEventSource}.
*
* @param name The field to clear.
* @param eventSource the source a new {@link FieldChangedEvent} should be posten from.
*/ | Remove the mapping for the field name, and notify listeners about the change including the <code>EntryEventSource</code> | clearField | {
"repo_name": "grimes2/jabref",
"path": "src/main/java/net/sf/jabref/model/entry/BibEntry.java",
"license": "mit",
"size": 28780
} | [
"java.util.Optional",
"net.sf.jabref.model.FieldChange",
"net.sf.jabref.model.entry.event.EntryEventSource",
"net.sf.jabref.model.entry.event.FieldChangedEvent"
] | import java.util.Optional; import net.sf.jabref.model.FieldChange; import net.sf.jabref.model.entry.event.EntryEventSource; import net.sf.jabref.model.entry.event.FieldChangedEvent; | import java.util.*; import net.sf.jabref.model.*; import net.sf.jabref.model.entry.event.*; | [
"java.util",
"net.sf.jabref"
] | java.util; net.sf.jabref; | 1,095,553 |
// =================================================================
//
// 智能云空调控制相关
//
// =================================================================
public void cSwitchOn(XPGWifiDevice xpgWifiDevice, boolean isOn) {
cWrite(xpgWifiDevice, JsonKeys.ON_OFF, isOn);
cGetStatus(xpgWifiDevice);
} | void function(XPGWifiDevice xpgWifiDevice, boolean isOn) { cWrite(xpgWifiDevice, JsonKeys.ON_OFF, isOn); cGetStatus(xpgWifiDevice); } | /**
* C switch on.
*
* @param xpgWifiDevice
* the xpg wifi device
* @param isOn
* the is on
*/ | C switch on | cSwitchOn | {
"repo_name": "gizwits/airconditioner-android",
"path": "src/com/gizwits/framework/sdk/CmdCenter.java",
"license": "mit",
"size": 11287
} | [
"com.gizwits.framework.config.JsonKeys",
"com.xtremeprog.xpgconnect.XPGWifiDevice"
] | import com.gizwits.framework.config.JsonKeys; import com.xtremeprog.xpgconnect.XPGWifiDevice; | import com.gizwits.framework.config.*; import com.xtremeprog.xpgconnect.*; | [
"com.gizwits.framework",
"com.xtremeprog.xpgconnect"
] | com.gizwits.framework; com.xtremeprog.xpgconnect; | 1,816,111 |
public static <T> List<List<T>> findPathsDepthLimited(
final ImmutableGraph<T> graph,
final T start,
final T goal,
final int max_depth) {
//TODO: Make iterative version
List<List<T>> resultPaths = new ArrayList<>();
Set<T> explored = new Hash... | static <T> List<List<T>> function( final ImmutableGraph<T> graph, final T start, final T goal, final int max_depth) { List<List<T>> resultPaths = new ArrayList<>(); Set<T> explored = new HashSet<>(); List<T> currentPath = new ArrayList<>(); currentPath.add(start); _findPathsDepthLimited(graph, start, goal, currentPath,... | /**
* Finds all paths from the <code>start</code> node to the <code>goal</code> in <code>graph</code>.
* The paths found have at most <code>max_detph</code> length
*
* @param graph Guava graph were paths are found
* @param start Node were searched paths begin
* @param goal Node were search... | Finds all paths from the <code>start</code> node to the <code>goal</code> in <code>graph</code>. The paths found have at most <code>max_detph</code> length | findPathsDepthLimited | {
"repo_name": "manumartin/examples",
"path": "code_interviews/ryanair/src/main/java/interconnections/graph/GraphUtils.java",
"license": "mit",
"size": 2823
} | [
"com.google.common.graph.ImmutableGraph",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import com.google.common.graph.ImmutableGraph; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; | import com.google.common.graph.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 941,888 |
@Override
public Group parse(JSONArray array) throws JSONException {
Group<FoursquareType> group = new Group<FoursquareType>();
parse(group, array);
return group;
} | Group function(JSONArray array) throws JSONException { Group<FoursquareType> group = new Group<FoursquareType>(); parse(group, array); return group; } | /**
* Here we are getting a straight JSONArray and do not expect the 'type' attribute.
*/ | Here we are getting a straight JSONArray and do not expect the 'type' attribute | parse | {
"repo_name": "dazuiba/foursquared-dz",
"path": "main/src/com/joelapenna/foursquare/parsers/json/GroupParser.java",
"license": "apache-2.0",
"size": 2439
} | [
"com.joelapenna.foursquare.types.FoursquareType",
"com.joelapenna.foursquare.types.Group",
"org.json.JSONArray",
"org.json.JSONException"
] | import com.joelapenna.foursquare.types.FoursquareType; import com.joelapenna.foursquare.types.Group; import org.json.JSONArray; import org.json.JSONException; | import com.joelapenna.foursquare.types.*; import org.json.*; | [
"com.joelapenna.foursquare",
"org.json"
] | com.joelapenna.foursquare; org.json; | 101,533 |
boolean hasConflictingEnchant(Enchantment ench); | boolean hasConflictingEnchant(Enchantment ench); | /**
* Checks if the specified enchantment conflicts with any enchantments in
* this ItemMeta.
*
* @param ench enchantment to test
* @return true if the enchantment conflicts, false otherwise
*/ | Checks if the specified enchantment conflicts with any enchantments in this ItemMeta | hasConflictingEnchant | {
"repo_name": "BukkitDocChinese/BukkitAPI",
"path": "src/main/java/org/bukkit/inventory/meta/ItemMeta.java",
"license": "gpl-3.0",
"size": 3511
} | [
"org.bukkit.enchantments.Enchantment"
] | import org.bukkit.enchantments.Enchantment; | import org.bukkit.enchantments.*; | [
"org.bukkit.enchantments"
] | org.bukkit.enchantments; | 739,494 |
int countPreferred(boolean value) {
if (type == CLASS || type == RESOURCE) { // leaf
return (value == preferred) ? 1 : 0;
} else {
int total = 0;
Iterator it = nodes.iterator();
while (it.hasNext()) {
Graph g = (Graph) it.next();
total += g.countPreferred(value);
}
return total;
... | int countPreferred(boolean value) { if (type == CLASS type == RESOURCE) { return (value == preferred) ? 1 : 0; } else { int total = 0; Iterator it = nodes.iterator(); while (it.hasNext()) { Graph g = (Graph) it.next(); total += g.countPreferred(value); } return total; } } | /**
* Count the number of child leaf nodes which
* have a preferred state matching the given value. If this
* is a leaf node, return 1 if the value matches the preferred
* state of this node.
*
* @param value the preferred value to search for
* @return the number of leaf nodes having the given value
*/ | Count the number of child leaf nodes which have a preferred state matching the given value. If this is a leaf node, return 1 if the value matches the preferred state of this node | countPreferred | {
"repo_name": "apache/river",
"path": "src/com/sun/jini/tool/PreferredListGen.java",
"license": "apache-2.0",
"size": 84436
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,589,178 |
ByteBuf buf = Unpooled.copiedBuffer("TestBuffer", CharsetUtil.ISO_8859_1);
ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(buf);
boolean error;
int i = 0;
try {
for (;;) {
buffer.getUnsignedByte(i);
i++;
}
} ca... | ByteBuf buf = Unpooled.copiedBuffer(STR, CharsetUtil.ISO_8859_1); ReplayingDecoderByteBuf buffer = new ReplayingDecoderByteBuf(buf); boolean error; int i = 0; try { for (;;) { buffer.getUnsignedByte(i); i++; } } catch (Signal e) { error = true; } assertTrue(error); assertEquals(10, i); buf.release(); } | /**
* See https://github.com/netty/netty/issues/445
*/ | See HREF | testGetUnsignedByte | {
"repo_name": "NiteshKant/netty",
"path": "codec/src/test/java/io/netty/handler/codec/ReplayingDecoderByteBufTest.java",
"license": "apache-2.0",
"size": 2779
} | [
"io.netty.buffer.ByteBuf",
"io.netty.buffer.Unpooled",
"io.netty.util.CharsetUtil",
"io.netty.util.Signal",
"org.junit.jupiter.api.Assertions"
] | import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.util.CharsetUtil; import io.netty.util.Signal; import org.junit.jupiter.api.Assertions; | import io.netty.buffer.*; import io.netty.util.*; import org.junit.jupiter.api.*; | [
"io.netty.buffer",
"io.netty.util",
"org.junit.jupiter"
] | io.netty.buffer; io.netty.util; org.junit.jupiter; | 849,072 |
String getMessageThreadID() {
return this.messageThreadID;
}
static class Attachment {
private String name = "";
private String localPath = "";
private long size = 0L;
private long crTime = 0L;
private long cTime = 0L;
private long aTime = ... | String getMessageThreadID() { return this.messageThreadID; } static class Attachment { private String name = STR"; private long size = 0L; private long crTime = 0L; private long cTime = 0L; private long aTime = 0L; private long mTime = 0L; private TskData.EncodingType encodingType = TskData.EncodingType.NONE; | /**
* Returns the ThreadID for this message.
*
* @return - the message thread ID or "" is non is available
*/ | Returns the ThreadID for this message | getMessageThreadID | {
"repo_name": "esaunders/autopsy",
"path": "thunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/EmailMessage.java",
"license": "apache-2.0",
"size": 9334
} | [
"org.sleuthkit.datamodel.TskData"
] | import org.sleuthkit.datamodel.TskData; | import org.sleuthkit.datamodel.*; | [
"org.sleuthkit.datamodel"
] | org.sleuthkit.datamodel; | 1,307,659 |
void setOnPageChangeListener(ViewPager.OnPageChangeListener listener); | void setOnPageChangeListener(ViewPager.OnPageChangeListener listener); | /**
* Set a page change listener which will receive forwarded events.
*
* @param listener
*/ | Set a page change listener which will receive forwarded events | setOnPageChangeListener | {
"repo_name": "w20583/smartedu",
"path": "src/com/engc/smartedu/widget/PageIndicator.java",
"license": "gpl-3.0",
"size": 1833
} | [
"android.support.v4.view.ViewPager"
] | import android.support.v4.view.ViewPager; | import android.support.v4.view.*; | [
"android.support"
] | android.support; | 2,138,010 |
public static <T extends JSONEntity> PaginatedResults<T> readResponseVariablePaginatedResults(
MockHttpServletResponse response, Class<? extends T> clazz)
throws Exception {
JSONObjectAdapterImpl adapter = ServletTestHelperUtils
.readResponseJSON(response);
return PaginatedResults.createFromJSONObjectA... | static <T extends JSONEntity> PaginatedResults<T> function( MockHttpServletResponse response, Class<? extends T> clazz) throws Exception { JSONObjectAdapterImpl adapter = ServletTestHelperUtils .readResponseJSON(response); return PaginatedResults.createFromJSONObjectAdapter(adapter, clazz); } | /**
* Extracts the JSON content of a HTTP response and parses it into a set of
* variable paginated results
*/ | Extracts the JSON content of a HTTP response and parses it into a set of variable paginated results | readResponseVariablePaginatedResults | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/repository/src/test/java/org/sagebionetworks/repo/web/controller/ServletTestHelperUtils.java",
"license": "apache-2.0",
"size": 8799
} | [
"org.sagebionetworks.reflection.model.PaginatedResults",
"org.sagebionetworks.schema.adapter.JSONEntity",
"org.sagebionetworks.schema.adapter.org.json.JSONObjectAdapterImpl",
"org.springframework.mock.web.MockHttpServletResponse"
] | import org.sagebionetworks.reflection.model.PaginatedResults; import org.sagebionetworks.schema.adapter.JSONEntity; import org.sagebionetworks.schema.adapter.org.json.JSONObjectAdapterImpl; import org.springframework.mock.web.MockHttpServletResponse; | import org.sagebionetworks.reflection.model.*; import org.sagebionetworks.schema.adapter.*; import org.sagebionetworks.schema.adapter.org.json.*; import org.springframework.mock.web.*; | [
"org.sagebionetworks.reflection",
"org.sagebionetworks.schema",
"org.springframework.mock"
] | org.sagebionetworks.reflection; org.sagebionetworks.schema; org.springframework.mock; | 1,986,839 |
boolean isRenderable(View view);
/**
* Renders the given {@link View} for the given {@link Locale} to the given {@link
* OutputStream}.
*
* @param view a view
* @param locale the locale in which the view should be rendered
* @param output the output stream
* @throws IOExcep... | boolean isRenderable(View view); /** * Renders the given {@link View} for the given {@link Locale} to the given { * OutputStream}. * * @param view a view * @param locale the locale in which the view should be rendered * @param output the output stream * @throws IOException if there is an error writing to {@code output} | /**
* Returns {@code true} if the renderer can render the given {@link View}.
*
* @param view a view
* @return {@code true} if {@code view} can be rendered
*/ | Returns true if the renderer can render the given <code>View</code> | isRenderable | {
"repo_name": "dropwizard/dropwizard",
"path": "dropwizard-views/src/main/java/io/dropwizard/views/ViewRenderer.java",
"license": "apache-2.0",
"size": 1324
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.util.Locale"
] | import java.io.IOException; import java.io.OutputStream; import java.util.Locale; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,394,052 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Plugin.class)) {
case PomPackage.PLUGIN__GROUP_ID:
case PomPackage.PLUGIN__ARTIFACT_ID:
case PomPackage.PLUGIN__VERSION:
case PomPackage.PLUGIN__EXTENSIONS:
c... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Plugin.class)) { case PomPackage.PLUGIN__GROUP_ID: case PomPackage.PLUGIN__ARTIFACT_ID: case PomPackage.PLUGIN__VERSION: case PomPackage.PLUGIN__EXTENSIONS: case PomPackage.PLUGIN__INHERITED: fireNotifyChanged(new... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "Treehopper/EclipseAugments",
"path": "pom-editor/eu.hohenegger.xsd.pom.ui/src-gen/eu/hohenegger/xsd/pom/provider/PluginItemProvider.java",
"license": "epl-1.0",
"size": 10027
} | [
"eu.hohenegger.xsd.pom.Plugin",
"eu.hohenegger.xsd.pom.PomPackage",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import eu.hohenegger.xsd.pom.Plugin; import eu.hohenegger.xsd.pom.PomPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import eu.hohenegger.xsd.pom.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"eu.hohenegger.xsd",
"org.eclipse.emf"
] | eu.hohenegger.xsd; org.eclipse.emf; | 288,065 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback);
... | ServiceFuture<Void> function(String resourceGroupName, String accountName, String dataLakeStoreAccountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, dataLakeStoreAccountName), serviceCallback); } | /**
* Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param accountName The name of the Data Lake Analytics account from which to rem... | Updates the Data Lake Analytics account specified to remove the specified Data Lake Store account | deleteAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/DataLakeStoreAccountsImpl.java",
"license": "mit",
"size": 58011
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,927,814 |
public IndexResponse index(IndexRequest indexRequest, Header... headers) throws IOException {
return performRequestAndParseEntity(indexRequest, Request::index, IndexResponse::fromXContent, emptySet(), headers);
} | IndexResponse function(IndexRequest indexRequest, Header... headers) throws IOException { return performRequestAndParseEntity(indexRequest, Request::index, IndexResponse::fromXContent, emptySet(), headers); } | /**
* Index a document using the Index API
*
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html">Index API on elastic.co</a>
*/ | Index a document using the Index API See Index API on elastic.co | index | {
"repo_name": "rlugojr/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java",
"license": "apache-2.0",
"size": 18775
} | [
"java.io.IOException",
"java.util.Collections",
"org.apache.http.Header",
"org.elasticsearch.action.index.IndexRequest",
"org.elasticsearch.action.index.IndexResponse"
] | import java.io.IOException; import java.util.Collections; import org.apache.http.Header; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.index.IndexResponse; | import java.io.*; import java.util.*; import org.apache.http.*; import org.elasticsearch.action.index.*; | [
"java.io",
"java.util",
"org.apache.http",
"org.elasticsearch.action"
] | java.io; java.util; org.apache.http; org.elasticsearch.action; | 1,146,936 |
public Object object()
{
if (m_DTMXRTreeFrag.getXPathContext() != null)
return new com.sun.org.apache.xml.internal.dtm.ref.DTMNodeIterator((DTMIterator)(new com.sun.org.apache.xpath.internal.NodeSetDTM(m_dtmRoot, m_DTMXRTreeFrag.getXPathContext().getDTMManager())));
else
return super.object();
... | Object function() { if (m_DTMXRTreeFrag.getXPathContext() != null) return new com.sun.org.apache.xml.internal.dtm.ref.DTMNodeIterator((DTMIterator)(new com.sun.org.apache.xpath.internal.NodeSetDTM(m_dtmRoot, m_DTMXRTreeFrag.getXPathContext().getDTMManager()))); else return super.object(); } public XRTreeFrag(Expression... | /**
* Return a java object that's closest to the representation
* that should be handed to an extension.
*
* @return The object that this class wraps
*/ | Return a java object that's closest to the representation that should be handed to an extension | object | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java",
"license": "apache-2.0",
"size": 7691
} | [
"com.sun.org.apache.xml.internal.dtm.DTMIterator",
"com.sun.org.apache.xpath.internal.Expression"
] | import com.sun.org.apache.xml.internal.dtm.DTMIterator; import com.sun.org.apache.xpath.internal.Expression; | import com.sun.org.apache.xml.internal.dtm.*; import com.sun.org.apache.xpath.internal.*; | [
"com.sun.org"
] | com.sun.org; | 2,740,747 |
public Set<IntMetadataType> metadataTypes() {
return metadataTypes;
} | Set<IntMetadataType> function() { return metadataTypes; } | /**
* Returns a set of metadata types specified in this objective.
*
* @return instruction bitmap
*/ | Returns a set of metadata types specified in this objective | metadataTypes | {
"repo_name": "kuujo/onos",
"path": "apps/inbandtelemetry/api/src/main/java/org/onosproject/inbandtelemetry/api/IntObjective.java",
"license": "apache-2.0",
"size": 4419
} | [
"java.util.Set",
"org.onosproject.inbandtelemetry.api.IntIntent"
] | import java.util.Set; import org.onosproject.inbandtelemetry.api.IntIntent; | import java.util.*; import org.onosproject.inbandtelemetry.api.*; | [
"java.util",
"org.onosproject.inbandtelemetry"
] | java.util; org.onosproject.inbandtelemetry; | 2,410,637 |
private void sendRequestRecord() throws IllegalStateException, SocketException, IOException {
String request = "RECORD rtsp://"+mHost+":"+mPort+mPath+" RTSP/1.0\r\n" +
"Range: npt=0.000-" +
addHeaders();
Log.i(TAG,request.substring(0, request.indexOf("\r\n")));
mOutputStream.write(request.getBytes("UTF... | void function() throws IllegalStateException, SocketException, IOException { String request = STRRange: npt=0.000-STR\r\nSTRUTF-8")); Response.parseResponse(mBufferedReader); } | /**
* Forges and sends the RECORD request
*/ | Forges and sends the RECORD request | sendRequestRecord | {
"repo_name": "ChristieEnglish/spydroid-ipcamera",
"path": "src/net/majorkernelpanic/streaming/rtsp/RtspClient.java",
"license": "gpl-3.0",
"size": 12674
} | [
"java.io.IOException",
"java.net.SocketException"
] | import java.io.IOException; import java.net.SocketException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,667,884 |
@Test
public void testCQClientOnRedundantBucketReceivesCQEvents() throws Exception {
// dataStore2 is DataStore
// implicit put of DELTA_KEY creates primary bucket on dataStore2
dataStore2.invoke(() -> createCacheServerWithPR(REGION_NAME, 1, 50, 2, false, null));
// dataStore3 is BridgeServer
/... | void function() throws Exception { dataStore2.invoke(() -> createCacheServerWithPR(REGION_NAME, 1, 50, 2, false, null)); int port3 = dataStore3.invoke(() -> createCacheServerWithPR(REGION_NAME, 1, 50, 2, false, null)); int port1 = dataStore1.invoke(() -> createCacheServerWithPR(REGION_NAME, 1, 0, 2, false, null)); crea... | /**
* Topology: PR: Accessor,DataStore,cache server; configured for 2 buckets and redundancy 1
* DataStore has primary while BridgeServer has secondary of bucket. client connects to PR
* Accessor client1 connects to PR BridgeServer client1 registers CQ client puts delta objects on
* accessor Verify on clien... | DataStore has primary while BridgeServer has secondary of bucket. client connects to PR Accessor client1 connects to PR BridgeServer client1 registers CQ client puts delta objects on accessor Verify on client1 that queryUpdate and queryDestroy are executed properly | testCQClientOnRedundantBucketReceivesCQEvents | {
"repo_name": "davebarnes97/geode",
"path": "geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PRDeltaPropagationDUnitTest.java",
"license": "apache-2.0",
"size": 42201
} | [
"org.apache.geode.DeltaTestImpl"
] | import org.apache.geode.DeltaTestImpl; | import org.apache.geode.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,246,219 |
private void notifyForProcessingEnded(final RuleContext processingContext, final Context<String, Object> context) {
if (shouldCallProcessingEnd(processingContext)) {
transactionSupport.invokeInNewTx(() -> {
for (RuleOperation rule : configuration.getOperations()) {
if (rule.isApplicable(processingConte... | void function(final RuleContext processingContext, final Context<String, Object> context) { if (shouldCallProcessingEnd(processingContext)) { transactionSupport.invokeInNewTx(() -> { for (RuleOperation rule : configuration.getOperations()) { if (rule.isApplicable(processingContext)) { updateState(processingContext, Exe... | /**
* Notify for processing ended. Calls all operations to notify them that a processing using the current context is
* ending.
*
* @param processingContext
* the processing context
* @param context
* the context
*/ | Notify for processing ended. Calls all operations to notify them that a processing using the current context is ending | notifyForProcessingEnded | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/extensions/rules/rules-core/src/main/java/com/sirma/itt/seip/rule/EntityRecongnitionRule.java",
"license": "lgpl-3.0",
"size": 18956
} | [
"com.sirma.itt.emf.rule.RuleContext",
"com.sirma.itt.emf.rule.RuleOperation",
"com.sirma.itt.seip.context.Context"
] | import com.sirma.itt.emf.rule.RuleContext; import com.sirma.itt.emf.rule.RuleOperation; import com.sirma.itt.seip.context.Context; | import com.sirma.itt.emf.rule.*; import com.sirma.itt.seip.context.*; | [
"com.sirma.itt"
] | com.sirma.itt; | 2,907,632 |
public static BitcoinCharts createInstance() {
return RestProxyFactory.createProxy(BitcoinCharts.class, "http://api.bitcoincharts.com");
} | static BitcoinCharts function() { return RestProxyFactory.createProxy(BitcoinCharts.class, "http: } | /**
* Get a RestProxy for BitcoinCharts
*
* @return the Rest Proxy
*/ | Get a RestProxy for BitcoinCharts | createInstance | {
"repo_name": "habibmasuro/XChange",
"path": "xchange-bitcoincharts/src/main/java/com/xeiam/xchange/bitcoincharts/BitcoinChartsFactory.java",
"license": "mit",
"size": 1602
} | [
"si.mazi.rescu.RestProxyFactory"
] | import si.mazi.rescu.RestProxyFactory; | import si.mazi.rescu.*; | [
"si.mazi.rescu"
] | si.mazi.rescu; | 649,053 |
void shaderUniformPutVectorf(
JCGLProgramUniformType u,
FloatBuffer value)
throws
JCGLException,
JCGLExceptionProgramNotActive,
JCGLExceptionProgramTypeError; | void shaderUniformPutVectorf( JCGLProgramUniformType u, FloatBuffer value) throws JCGLException, JCGLExceptionProgramNotActive, JCGLExceptionProgramTypeError; | /**
* Upload the value {@code value} to the uniform {@code u}.
*
* This method is provided to allow for the use of array-typed uniforms in
* GLSL programs, where the type of the array elements are scalar floating
* point values, or vector floating point values.
*
* @param u The u variable.
*... | Upload the value value to the uniform u. This method is provided to allow for the use of array-typed uniforms in GLSL programs, where the type of the array elements are scalar floating point values, or vector floating point values | shaderUniformPutVectorf | {
"repo_name": "io7m/jcanephora",
"path": "com.io7m.jcanephora.core/src/main/java/com/io7m/jcanephora/core/api/JCGLShaderUniformsType.java",
"license": "isc",
"size": 30467
} | [
"com.io7m.jcanephora.core.JCGLException",
"com.io7m.jcanephora.core.JCGLExceptionProgramNotActive",
"com.io7m.jcanephora.core.JCGLExceptionProgramTypeError",
"com.io7m.jcanephora.core.JCGLProgramUniformType",
"java.nio.FloatBuffer"
] | import com.io7m.jcanephora.core.JCGLException; import com.io7m.jcanephora.core.JCGLExceptionProgramNotActive; import com.io7m.jcanephora.core.JCGLExceptionProgramTypeError; import com.io7m.jcanephora.core.JCGLProgramUniformType; import java.nio.FloatBuffer; | import com.io7m.jcanephora.core.*; import java.nio.*; | [
"com.io7m.jcanephora",
"java.nio"
] | com.io7m.jcanephora; java.nio; | 330,890 |
private void runAfterDismiss(Runnable task) {
mDialog.dismiss();
if (DeviceFormFactor.isTablet(mContext)) {
task.run();
} else {
mContainer.postDelayed(task, FADE_DURATION + CLOSE_CLEANUP_DELAY);
}
} | void function(Runnable task) { mDialog.dismiss(); if (DeviceFormFactor.isTablet(mContext)) { task.run(); } else { mContainer.postDelayed(task, FADE_DURATION + CLOSE_CLEANUP_DELAY); } } | /**
* Dismiss the popup, and then run a task after the animation has completed (if there is one).
*/ | Dismiss the popup, and then run a task after the animation has completed (if there is one) | runAfterDismiss | {
"repo_name": "ds-hwang/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/pageinfo/WebsiteSettingsPopup.java",
"license": "bsd-3-clause",
"size": 40660
} | [
"org.chromium.ui.base.DeviceFormFactor"
] | import org.chromium.ui.base.DeviceFormFactor; | import org.chromium.ui.base.*; | [
"org.chromium.ui"
] | org.chromium.ui; | 1,622,027 |
@ModelAttribute(FORM_NAME)
public CalendarPreferencesCommand getForm(PortletRequest request) throws Exception {
CalendarPreferencesCommand form = new CalendarPreferencesCommand();
PortletPreferences prefs = request.getPreferences();
form.setTimezone(prefs.getValue("timezone", "America/New_York"));
r... | @ModelAttribute(FORM_NAME) CalendarPreferencesCommand function(PortletRequest request) throws Exception { CalendarPreferencesCommand form = new CalendarPreferencesCommand(); PortletPreferences prefs = request.getPreferences(); form.setTimezone(prefs.getValue(STR, STR)); return form; } | /**
* Return a pre-populated preferences form for the current user.
*/ | Return a pre-populated preferences form for the current user | getForm | {
"repo_name": "bjagg/CalendarPortlet",
"path": "src/main/java/org/jasig/portlet/calendar/mvc/controller/EditCalendarSubscriptionsController.java",
"license": "apache-2.0",
"size": 10270
} | [
"javax.portlet.PortletPreferences",
"javax.portlet.PortletRequest",
"org.jasig.portlet.calendar.mvc.CalendarPreferencesCommand",
"org.springframework.web.bind.annotation.ModelAttribute"
] | import javax.portlet.PortletPreferences; import javax.portlet.PortletRequest; import org.jasig.portlet.calendar.mvc.CalendarPreferencesCommand; import org.springframework.web.bind.annotation.ModelAttribute; | import javax.portlet.*; import org.jasig.portlet.calendar.mvc.*; import org.springframework.web.bind.annotation.*; | [
"javax.portlet",
"org.jasig.portlet",
"org.springframework.web"
] | javax.portlet; org.jasig.portlet; org.springframework.web; | 2,033,940 |
protected void drawItemLabel(Graphics2D g2,
CategoryDataset data,
int row,
int column,
CategoryPlot plot,
CategoryItemLabelGenerator generator,
... | void function(Graphics2D g2, CategoryDataset data, int row, int column, CategoryPlot plot, CategoryItemLabelGenerator generator, Rectangle2D bar, boolean negative) { String label = generator.generateLabel(data, row, column); if (label == null) { return; } Font labelFont = getItemLabelFont(row, column); g2.setFont(label... | /**
* Draws an item label. This method is overridden so that the bar can be
* used to calculate the label anchor point.
*
* @param g2 the graphics device.
* @param data the dataset.
* @param row the row.
* @param column the column.
* @param plot the plot.
* @p... | Draws an item label. This method is overridden so that the bar can be used to calculate the label anchor point | drawItemLabel | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/source/org/jfree/chart/renderer/category/BarRenderer.java",
"license": "gpl-2.0",
"size": 50261
} | [
"java.awt.Font",
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Shape",
"java.awt.geom.Point2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.labels.CategoryItemLabelGenerator",
"org.jfree.chart.labels.ItemLabelPosition",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.data.category.CategoryD... | import java.awt.Font; import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Shape; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.labels.CategoryItemLabelGenerator; import org.jfree.chart.labels.ItemLabelPosition; import org.jfree.chart.plot.CategoryPlot; import org.... | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.labels.*; import org.jfree.chart.plot.*; import org.jfree.data.category.*; import org.jfree.text.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data",
"org.jfree.text"
] | java.awt; org.jfree.chart; org.jfree.data; org.jfree.text; | 2,669,366 |
public void route(Connection conn) {
PointList points = conn.getPoints();
points.removeAllPoints();
List bendpoints = (List) getConstraint(conn);
if (bendpoints == null)
bendpoints = Collections.EMPTY_LIST;
Point ref1, ref2;
if (bendpoints.isEmpty()) {
ref1 = conn.getTargetAnchor().ge... | void function(Connection conn) { PointList points = conn.getPoints(); points.removeAllPoints(); List bendpoints = (List) getConstraint(conn); if (bendpoints == null) bendpoints = Collections.EMPTY_LIST; Point ref1, ref2; if (bendpoints.isEmpty()) { ref1 = conn.getTargetAnchor().getReferencePoint(); ref2 = conn.getSourc... | /**
* Routes the {@link Connection}. Expects the constraint to be a List of
* {@link org.eclipse.draw2d.Bendpoint Bendpoints}.
*
* @param conn
* The connection to route
*/ | Routes the <code>Connection</code>. Expects the constraint to be a List of <code>org.eclipse.draw2d.Bendpoint Bendpoints</code> | route | {
"repo_name": "opensagres/xdocreport.eclipse",
"path": "rap/org.eclipse.draw2d/src/org/eclipse/draw2d/BendpointConnectionRouter.java",
"license": "lgpl-2.1",
"size": 3301
} | [
"java.util.Collections",
"java.util.List",
"org.eclipse.draw2d.geometry.Point",
"org.eclipse.draw2d.geometry.PointList"
] | import java.util.Collections; import java.util.List; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; | import java.util.*; import org.eclipse.draw2d.geometry.*; | [
"java.util",
"org.eclipse.draw2d"
] | java.util; org.eclipse.draw2d; | 1,249,850 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.