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 checkConformsToRegexes(D value){
//Not checking the datatype because the regex will always be null for non strings.
superSet().forEach(sup -> {
String regex = sup.getRegex();
if (regex != null && !Pattern.matches(regex, (String) value)) {
throw Gr... | void function(D value){ superSet().forEach(sup -> { String regex = sup.getRegex(); if (regex != null && !Pattern.matches(regex, (String) value)) { throw GraknTxOperationException.regexFailure(this, (String) value, regex); } }); } | /**
* Checks if all the regex's of the types of this resource conforms to the value provided.
*
* @throws GraknTxOperationException when the value does not conform to the regex of its types
* @param value The value to check the regexes against.
*/ | Checks if all the regex's of the types of this resource conforms to the value provided | checkConformsToRegexes | {
"repo_name": "pluraliseseverythings/grakn",
"path": "grakn-kb/src/main/java/ai/grakn/kb/internal/concept/AttributeTypeImpl.java",
"license": "gpl-3.0",
"size": 7333
} | [
"ai.grakn.exception.GraknTxOperationException",
"java.util.regex.Pattern"
] | import ai.grakn.exception.GraknTxOperationException; import java.util.regex.Pattern; | import ai.grakn.exception.*; import java.util.regex.*; | [
"ai.grakn.exception",
"java.util"
] | ai.grakn.exception; java.util; | 322,238 |
Stream<Resource> streamAll(ResourcePath path) throws IOException; | Stream<Resource> streamAll(ResourcePath path) throws IOException; | /**
* Loads all the {@link Resource resources} at the given path from all
* active {@link PackContents pack contents}.
*
* @param path The path to the resource
* @return The list of all resources at the path
* @throws IOException If a resource could not be read
* @throws FileNotFoundE... | Loads all the <code>Resource resources</code> at the given path from all active <code>PackContents pack contents</code> | streamAll | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/resource/ResourceManager.java",
"license": "mit",
"size": 3023
} | [
"java.io.IOException",
"java.util.stream.Stream"
] | import java.io.IOException; import java.util.stream.Stream; | import java.io.*; import java.util.stream.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,805,366 |
@Deprecated
private static CouponFixed[] init(final Currency currency, final double[] paymentTimes, final double notional, final double couponRate,
final double[] yearFractions, final String yieldCurveName) {
ArgumentChecker.notNull(paymentTimes, "payment times");
ArgumentChecker.isTrue(paymentTimes.l... | static CouponFixed[] function(final Currency currency, final double[] paymentTimes, final double notional, final double couponRate, final double[] yearFractions, final String yieldCurveName) { ArgumentChecker.notNull(paymentTimes, STR); ArgumentChecker.isTrue(paymentTimes.length > 0, STR); ArgumentChecker.notNull(yearF... | /**
* A list of fixed coupon from payment times and year fractions and unique notional and rate.
*
* @param currency
* The payment currency.
* @param paymentTimes
* The times (in year) of payment.
* @param notional
* The common notional.
* @param couponRate
* ... | A list of fixed coupon from payment times and year fractions and unique notional and rate | init | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/interestrate/annuity/derivative/AnnuityCouponFixed.java",
"license": "apache-2.0",
"size": 12103
} | [
"com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixed",
"com.opengamma.util.ArgumentChecker",
"com.opengamma.util.money.Currency"
] | import com.opengamma.analytics.financial.interestrate.payments.derivative.CouponFixed; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.money.Currency; | import com.opengamma.analytics.financial.interestrate.payments.derivative.*; import com.opengamma.util.*; import com.opengamma.util.money.*; | [
"com.opengamma.analytics",
"com.opengamma.util"
] | com.opengamma.analytics; com.opengamma.util; | 1,915,797 |
public void deleteAllDescendantPortfolios(DbSession dbSession, String rootUuid) {
// not audited but it's part of DefineWs
mapper(dbSession).deleteAllDescendantPortfolios(rootUuid);
} | void function(DbSession dbSession, String rootUuid) { mapper(dbSession).deleteAllDescendantPortfolios(rootUuid); } | /**
* Does NOT delete related references and project/branch selections!
*/ | Does NOT delete related references and project/branch selections | deleteAllDescendantPortfolios | {
"repo_name": "SonarSource/sonarqube",
"path": "server/sonar-db-dao/src/main/java/org/sonar/db/portfolio/PortfolioDao.java",
"license": "lgpl-3.0",
"size": 11013
} | [
"org.sonar.db.DbSession"
] | import org.sonar.db.DbSession; | import org.sonar.db.*; | [
"org.sonar.db"
] | org.sonar.db; | 1,717,808 |
private void buildMap() {
// The cursor is sorted by date
// The ItemMap will store the number of items in each bin.
int array[] = new int[DateSorter.DAY_COUNT];
// Zero out the array.
for (int j = 0; j < DateSorter.DAY_COUNT; j++) {
array[j] = 0;
}
... | void function() { int array[] = new int[DateSorter.DAY_COUNT]; for (int j = 0; j < DateSorter.DAY_COUNT; j++) { array[j] = 0; } mNumberOfBins = 0; int dateIndex = -1; if (mCursor.moveToFirst() && mCursor.getCount() > 0) { while (!mCursor.isAfterLast()) { long date = getLong(mDateIndex); int index = mDateSorter.getIndex... | /**
* Set up the bins for determining which items belong to which groups.
*/ | Set up the bins for determining which items belong to which groups | buildMap | {
"repo_name": "theunbelievablerepo/browser-jb",
"path": "src/com/android/browser/DateSortedExpandableListAdapter.java",
"license": "apache-2.0",
"size": 12810
} | [
"android.webkit.DateSorter"
] | import android.webkit.DateSorter; | import android.webkit.*; | [
"android.webkit"
] | android.webkit; | 366,059 |
private ObjectProvider getStateManagerForEmbeddedObject(ObjectProvider ownerSM)
{
ExecutionContext ec = ownerSM.getExecutionContext();
AbstractMemberMetaData theMmd = mmd;
if (mmd.getParent() instanceof EmbeddedMetaData)
{
// Get the real owner classMetaData (wh... | ObjectProvider function(ObjectProvider ownerSM) { ExecutionContext ec = ownerSM.getExecutionContext(); AbstractMemberMetaData theMmd = mmd; if (mmd.getParent() instanceof EmbeddedMetaData) { AbstractClassMetaData cmd = ec.getMetaDataManager().getMetaDataForClass(mmd.getClassName(), clr); theMmd = cmd.getMetaDataForMemb... | /**
* Accessor for the StateManager of the embedded PC object when provided with the owner object.
* @param ownerSM StateManager of the owner
* @return StateManager of the embedded object
*/ | Accessor for the StateManager of the embedded PC object when provided with the owner object | getStateManagerForEmbeddedObject | {
"repo_name": "GoogleCloudPlatform/datanucleus-appengine",
"path": "src/org/datanucleus/store/mapped/mapping/EmbeddedPCMapping.java",
"license": "apache-2.0",
"size": 6915
} | [
"org.datanucleus.ExecutionContext",
"org.datanucleus.metadata.AbstractClassMetaData",
"org.datanucleus.metadata.AbstractMemberMetaData",
"org.datanucleus.metadata.EmbeddedMetaData",
"org.datanucleus.state.ObjectProvider"
] | import org.datanucleus.ExecutionContext; import org.datanucleus.metadata.AbstractClassMetaData; import org.datanucleus.metadata.AbstractMemberMetaData; import org.datanucleus.metadata.EmbeddedMetaData; import org.datanucleus.state.ObjectProvider; | import org.datanucleus.*; import org.datanucleus.metadata.*; import org.datanucleus.state.*; | [
"org.datanucleus",
"org.datanucleus.metadata",
"org.datanucleus.state"
] | org.datanucleus; org.datanucleus.metadata; org.datanucleus.state; | 731,863 |
public Set<HabitatMToM> getHabitats()
{
return habitats;
}
| Set<HabitatMToM> function() { return habitats; } | /**
* Gets the habitats.
*
* @return the habitats
*/ | Gets the habitats | getHabitats | {
"repo_name": "impetus-opensource/Kundera",
"path": "src/kundera-hbase/kundera-hbase-v2/src/test/java/com/impetus/client/hbase/crud/association/PersonnelMToM.java",
"license": "apache-2.0",
"size": 3205
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,138,341 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ApplicationPackageInner> list(
String resourceGroupName, String accountName, String applicationName, Integer maxresults, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ApplicationPackageInner> list( String resourceGroupName, String accountName, String applicationName, Integer maxresults, Context context); | /**
* Lists all of the application packages in the specified application.
*
* @param resourceGroupName The name of the resource group that contains the Batch account.
* @param accountName The name of the Batch account.
* @param applicationName The name of the application. This must be unique wi... | Lists all of the application packages in the specified application | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java",
"license": "mit",
"size": 12031
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.batch.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,520,334 |
@VisibleForTesting
void printModuleGraphJsonTo(Appendable out) throws IOException {
out.append(compiler.getDegenerateModuleGraph().toJson().toString());
} | void printModuleGraphJsonTo(Appendable out) throws IOException { out.append(compiler.getDegenerateModuleGraph().toJson().toString()); } | /**
* Prints the current module graph as JSON.
*/ | Prints the current module graph as JSON | printModuleGraphJsonTo | {
"repo_name": "rintaro/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 74845
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,465,987 |
protected Size2D arrangeNN(Graphics2D g2) {
Rectangle2D contentSize = new Rectangle2D.Double();
if (this.line != null) {
contentSize.setRect(this.line.getBounds2D());
}
if (this.shape != null) {
contentSize = contentSize.createUnion(this.shape.getBounds2... | Size2D function(Graphics2D g2) { Rectangle2D contentSize = new Rectangle2D.Double(); if (this.line != null) { contentSize.setRect(this.line.getBounds2D()); } if (this.shape != null) { contentSize = contentSize.createUnion(this.shape.getBounds2D()); } return new Size2D(contentSize.getWidth(), contentSize.getHeight()); } | /**
* Performs the layout with no constraint, so the content size is
* determined by the bounds of the shape and/or line drawn to represent
* the series.
*
* @param g2 the graphics device.
*
* @return The content size.
*/ | Performs the layout with no constraint, so the content size is determined by the bounds of the shape and/or line drawn to represent the series | arrangeNN | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/main/java/org/jfree/chart/title/LegendGraphic.java",
"license": "lgpl-2.1",
"size": 23216
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.ui.Size2D"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.ui.Size2D; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.ui.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,769,685 |
protected void throwError(final String source, final String message)
throws ServletException
{
ctx_.log(source + ": ERROR: " + message);
throw new ServletException(message);
} | void function(final String source, final String message) throws ServletException { ctx_.log(source + STR + message); throw new ServletException(message); } | /** Convenience method for logging an error and throwing a {@link
* javax.servlet.ServletException}.
*/ | Convenience method for logging an error and throwing a <code>javax.servlet.ServletException</code> | throwError | {
"repo_name": "uzh/gridcertlib",
"path": "django/src/main/java/ch/swing/gridcertlib/django/SlcsInit.java",
"license": "apache-2.0",
"size": 15405
} | [
"javax.servlet.ServletException"
] | import javax.servlet.ServletException; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,473,472 |
public Sequence<C> getTargetSequence(Sequence<C> editingSequence) {
if (sequence == null && stringSequence != null) {
try {
sequence = new BasicSequence<C>(
stringSequence, editingSequence.getCompoundSet());
} catch (CompoundNotFoundException ... | Sequence<C> function(Sequence<C> editingSequence) { if (sequence == null && stringSequence != null) { try { sequence = new BasicSequence<C>( stringSequence, editingSequence.getCompoundSet()); } catch (CompoundNotFoundException e) { logger.error(STR, e.getMessage()); } } return sequence; } | /**
* Returns the Sequence which is our edit.
*
* @param editingSequence Asked for in-case we need to do String to
* Sequence conversion so we need a CompoundSet which is given
* by the Sequence we are editing
* @return The Sequence<C> object we wish to insert
... | Returns the Sequence which is our edit | getTargetSequence | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-core/src/main/java/org/biojava3/core/sequence/edits/Edit.java",
"license": "lgpl-2.1",
"size": 11060
} | [
"org.biojava3.core.exceptions.CompoundNotFoundException",
"org.biojava3.core.sequence.BasicSequence",
"org.biojava3.core.sequence.template.Sequence"
] | import org.biojava3.core.exceptions.CompoundNotFoundException; import org.biojava3.core.sequence.BasicSequence; import org.biojava3.core.sequence.template.Sequence; | import org.biojava3.core.exceptions.*; import org.biojava3.core.sequence.*; import org.biojava3.core.sequence.template.*; | [
"org.biojava3.core"
] | org.biojava3.core; | 398,244 |
public static <T> SkylarkNestedSet of(Class<T> contentType, NestedSet<T> set) {
return of(SkylarkType.of(contentType), set);
}
private static final SkylarkType DICT_LIST_UNION =
SkylarkType.Union.of(SkylarkType.DICT, SkylarkType.LIST); | static <T> SkylarkNestedSet function(Class<T> contentType, NestedSet<T> set) { return of(SkylarkType.of(contentType), set); } private static final SkylarkType DICT_LIST_UNION = SkylarkType.Union.of(SkylarkType.DICT, SkylarkType.LIST); | /**
* Returns a type safe SkylarkNestedSet. Use this instead of the constructor if possible.
*/ | Returns a type safe SkylarkNestedSet. Use this instead of the constructor if possible | of | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/SkylarkNestedSet.java",
"license": "apache-2.0",
"size": 17261
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,779,610 |
protected void handleRadiusPacket(RADIUS radiusPacket) throws StateMachineException {
StateMachine stateMachine = StateMachine.lookupStateMachineById(radiusPacket.getIdentifier());
if (stateMachine == null) {
log.error("Invalid session identifier, exiting...");
... | void function(RADIUS radiusPacket) throws StateMachineException { StateMachine stateMachine = StateMachine.lookupStateMachineById(radiusPacket.getIdentifier()); if (stateMachine == null) { log.error(STR); return; } EAP eapPayload; Ethernet eth; switch (radiusPacket.getCode()) { case RADIUS.RADIUS_CODE_ACCESS_CHALLENGE:... | /**
* Handles RADIUS packets.
*
* @param radiusPacket RADIUS packet coming from the RADIUS server.
*/ | Handles RADIUS packets | handleRadiusPacket | {
"repo_name": "packet-tracker/onos-1.4.0-custom-build",
"path": "apps/aaa/src/main/java/org/onosproject/aaa/AAA.java",
"license": "apache-2.0",
"size": 22385
} | [
"org.onlab.packet.Ethernet",
"org.onlab.packet.MacAddress",
"org.onlab.packet.RADIUSAttribute"
] | import org.onlab.packet.Ethernet; import org.onlab.packet.MacAddress; import org.onlab.packet.RADIUSAttribute; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 1,921,031 |
public int diff_xIndex(LinkedList<Diff> diffs, int loc) {
int chars1 = 0;
int chars2 = 0;
int last_chars1 = 0;
int last_chars2 = 0;
Diff lastDiff = null;
for (Diff aDiff : diffs) {
if (aDiff.operation != Operation.INSERT) {
// Equality or deletion.
chars1 += aDiff.text.le... | int function(LinkedList<Diff> diffs, int loc) { int chars1 = 0; int chars2 = 0; int last_chars1 = 0; int last_chars2 = 0; Diff lastDiff = null; for (Diff aDiff : diffs) { if (aDiff.operation != Operation.INSERT) { chars1 += aDiff.text.length(); } if (aDiff.operation != Operation.DELETE) { chars2 += aDiff.text.length();... | /**
* loc is a location in text1, compute and return the equivalent location in
* text2.
* e.g. "The cat" vs "The big cat", 1->1, 5->8
* @param diffs LinkedList of Diff objects.
* @param loc Location within text1.
* @return Location within text2.
*/ | loc is a location in text1, compute and return the equivalent location in text2. e.g. "The cat" vs "The big cat", 1->1, 5->8 | diff_xIndex | {
"repo_name": "bluelatex/bluelatex-server",
"path": "core/src/main/java/name/fraser/neil/plaintext/DiffMatchPatch.java",
"license": "apache-2.0",
"size": 85286
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,517,629 |
protected void addConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ConfigurationAtom_configuration_feature"),
getString("_UI_Pro... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RulesPackage.Literals.CONFIGURATION_ATOM__CONFIGURATION, true, false, true, null, null, null)); } | /**
* This adds a property descriptor for the Configuration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Configuration feature. | addConfigurationPropertyDescriptor | {
"repo_name": "paetti1988/qmate",
"path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/rules/provider/ConfigurationAtomItemProvider.java",
"license": "apache-2.0",
"size": 4130
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.tud.inf.st.mbt.rules.RulesPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.tud.inf.st.mbt.rules.RulesPackage; | import org.eclipse.emf.edit.provider.*; import org.tud.inf.st.mbt.rules.*; | [
"org.eclipse.emf",
"org.tud.inf"
] | org.eclipse.emf; org.tud.inf; | 2,332,346 |
void add(final AllocatedSlot slot, final long timestamp) {
checkNotNull(slot);
SlotAndTimestamp previous = availableSlots.put(
slot.getAllocationId(), new SlotAndTimestamp(slot, timestamp));
if (previous == null) {
final ResourceID resourceID = slot.getTaskManagerLocation().getResourceID();
... | void add(final AllocatedSlot slot, final long timestamp) { checkNotNull(slot); SlotAndTimestamp previous = availableSlots.put( slot.getAllocationId(), new SlotAndTimestamp(slot, timestamp)); if (previous == null) { final ResourceID resourceID = slot.getTaskManagerLocation().getResourceID(); final String host = slot.get... | /**
* Adds an available slot.
*
* @param slot The slot to add
*/ | Adds an available slot | add | {
"repo_name": "mylog00/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPool.java",
"license": "apache-2.0",
"size": 62423
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.flink.runtime.clusterframework.types.ResourceID",
"org.apache.flink.util.Preconditions"
] | import java.util.HashSet; import java.util.Set; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.util.Preconditions; | import java.util.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.util.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 2,154,695 |
private static void addLibraryPath(String jdkRootDirectory)
throws Throwable {
String libraryPath = System.getProperty(JAVA_LIBRARY_PATH);
String jreLibraryPath = getJreLibraryPath(jdkRootDirectory);
System.setProperty(JAVA_LIBRARY_PATH, libraryPath + File.pathSeparator
... | static void function(String jdkRootDirectory) throws Throwable { String libraryPath = System.getProperty(JAVA_LIBRARY_PATH); String jreLibraryPath = getJreLibraryPath(jdkRootDirectory); System.setProperty(JAVA_LIBRARY_PATH, libraryPath + File.pathSeparator + jreLibraryPath); Class<ClassLoader> clazz = ClassLoader.class... | /**
* Adds the library path to the system class loader.
*
* @param jdkRootDirectory
* The JDK root directory
* @throws Throwable
*/ | Adds the library path to the system class loader | addLibraryPath | {
"repo_name": "TANGO-Project/code-optimiser-plugin",
"path": "bundles/org.jvmmonitor.tools/src/org/jvmmonitor/internal/tools/Tools.java",
"license": "apache-2.0",
"size": 20072
} | [
"java.io.File",
"java.lang.reflect.Field"
] | import java.io.File; import java.lang.reflect.Field; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 2,390,934 |
public static byte[] hmacSha512(byte[] message, byte[] secret) {
try {
Mac mac = Mac.getInstance("HmacSHA512");
mac.init(new SecretKeySpec(secret, "HmacSHA512"));
return mac.doFinal(message);
} catch (NoSuchAlgorithmException | InvalidKeyException e) {
... | static byte[] function(byte[] message, byte[] secret) { try { Mac mac = Mac.getInstance(STR); mac.init(new SecretKeySpec(secret, STR)); return mac.doFinal(message); } catch (NoSuchAlgorithmException InvalidKeyException e) { return null; } } | /**
* Encrypt the provided byte array.
*
* @param message The data to encrypt.
* @param secret The encryption secret.
* @return the encrypted byte array.
*/ | Encrypt the provided byte array | hmacSha512 | {
"repo_name": "echsylon/kraken",
"path": "library/src/main/java/com/echsylon/kraken/internal/Utils.java",
"license": "apache-2.0",
"size": 10311
} | [
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"javax.crypto.Mac",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; | import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 881,665 |
@BodyParser.Of(BodyParser.Json.class)
public static Result monitorCallback() {
JsonNode message = request().body().asJson();
Long alarmId = message.get("affectedAssetId").asLong();
Alarm a = Alarm.get(alarmId);
String type = message.get("misbehaviourTypeId").asText();
i... | @BodyParser.Of(BodyParser.Json.class) static Result function() { JsonNode message = request().body().asJson(); Long alarmId = message.get(STR).asLong(); Alarm a = Alarm.get(alarmId); String type = message.get(STR).asText(); if (a != null && a.id != 0) { switch (type) { case STR: EventHandler.dispatch(new MonitorEvent(E... | /**
* Endpoint for receiving callbacks from the IBM Monitor
* @return A Result object HTTP Response
*/ | Endpoint for receiving callbacks from the IBM Monitor | monitorCallback | {
"repo_name": "SINTEF-SIT/emht",
"path": "app/monitor/external/ibm/IBMController.java",
"license": "mit",
"size": 1285
} | [
"com.fasterxml.jackson.databind.JsonNode"
] | import com.fasterxml.jackson.databind.JsonNode; | import com.fasterxml.jackson.databind.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,299,237 |
@Test
public void shouldAbleToInjectValueInODataCompositeResourceID2() throws URIException, NullPointerException, CloneNotSupportedException {
doTestInjectParameter(VARIANT_ODATA_ID_QUERY,
new URI("http",null,"localhost",50050,"/remoting/servlet.svc/DisplayItem(seqno=576460752035250185L,table='B0A43AE... | void function() throws URIException, NullPointerException, CloneNotSupportedException { doTestInjectParameter(VARIANT_ODATA_ID_QUERY, new URI("http",null,STR,50050,STR), "table", STR, STR, "http: ); } | /**
* Test intended to demonstrate a basic use case and help developing the class
* Handling the OData resource ID (composite ID)
*
* @throws org.apache.commons.httpclient.URIException
* @throws NullPointerException
* @throws CloneNotSupportedException
*/ | Test intended to demonstrate a basic use case and help developing the class Handling the OData resource ID (composite ID) | shouldAbleToInjectValueInODataCompositeResourceID2 | {
"repo_name": "0xkasun/zaproxy",
"path": "test/org/parosproxy/paros/core/scanner/VariantODataUnitTest.java",
"license": "apache-2.0",
"size": 10100
} | [
"org.apache.commons.httpclient.URIException"
] | import org.apache.commons.httpclient.URIException; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,900,837 |
private List<FileDescriptor> walk(File root, String regexp) {
List<FileDescriptor> descriptors = new ArrayList<>();
File[] list = root.listFiles();
for (File f : list) {
if (f.isDirectory()) {
logger.log(ILoggingLogLevel.Debug,LOG_TAG, "Dir: " + f.getAbsoluteFile(... | List<FileDescriptor> function(File root, String regexp) { List<FileDescriptor> descriptors = new ArrayList<>(); File[] list = root.listFiles(); for (File f : list) { if (f.isDirectory()) { logger.log(ILoggingLogLevel.Debug,LOG_TAG, STR + f.getAbsoluteFile()); } else { logger.log(ILoggingLogLevel.Debug,LOG_TAG, STR + f.... | /**
* Recursive list directory
* @param root
* @return FileDescriptor
*/ | Recursive list directory | walk | {
"repo_name": "AdaptiveMe/adaptive-arp-android",
"path": "adaptive-arp-rt/mobile/src/main/java/me/adaptive/arp/impl/FileDelegate.java",
"license": "apache-2.0",
"size": 16070
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List",
"me.adaptive.arp.api.FileDescriptor",
"me.adaptive.arp.api.ILoggingLogLevel",
"me.adaptive.arp.common.Utils"
] | import java.io.File; import java.util.ArrayList; import java.util.List; import me.adaptive.arp.api.FileDescriptor; import me.adaptive.arp.api.ILoggingLogLevel; import me.adaptive.arp.common.Utils; | import java.io.*; import java.util.*; import me.adaptive.arp.api.*; import me.adaptive.arp.common.*; | [
"java.io",
"java.util",
"me.adaptive.arp"
] | java.io; java.util; me.adaptive.arp; | 377,867 |
@Generated
@Selector("stringFromByteCount:countStyle:")
public static native String stringFromByteCountCountStyle(long byteCount, @NInt long countStyle); | @Selector(STR) static native String function(long byteCount, @NInt long countStyle); | /**
* Shortcut for converting a byte count into a string without creating an NSByteCountFormatter and an NSNumber. If you need to specify options other than countStyle, create an instance of NSByteCountFormatter first.
*/ | Shortcut for converting a byte count into a string without creating an NSByteCountFormatter and an NSNumber. If you need to specify options other than countStyle, create an instance of NSByteCountFormatter first | stringFromByteCountCountStyle | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/foundation/NSByteCountFormatter.java",
"license": "apache-2.0",
"size": 14829
} | [
"org.moe.natj.general.ann.NInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,543,267 |
private String process() throws IOException
{
final StringBuilder out = new StringBuilder();
final Block parent = this.readLines();
parent.removeSurroundingEmptyLines();
this.recurse(parent, false);
Block block = parent.blocks;
while (block != null)
{
... | String function() throws IOException { final StringBuilder out = new StringBuilder(); final Block parent = this.readLines(); parent.removeSurroundingEmptyLines(); this.recurse(parent, false); Block block = parent.blocks; while (block != null) { this.emitter.emit(out, block); block = block.next; } return out.toString();... | /**
* Does all the processing.
*
* @return The processed String.
* @throws IOException
* If an IO error occurred.
*/ | Does all the processing | process | {
"repo_name": "rjeschke/txtmark",
"path": "src/main/java/com/github/rjeschke/txtmark/Processor.java",
"license": "apache-2.0",
"size": 33678
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,031,299 |
public PreparedStatement preparedStatement(final String query)
throws SQLException {
return getConnection().prepareStatement(query);
} | PreparedStatement function(final String query) throws SQLException { return getConnection().prepareStatement(query); } | /**
* Creates a PreparedStatement object for sending parameterized SQL
* statements to the database.
*
* @param query
* an SQL statement that may contain one or more '?' IN parameter
* placeholders
*
* @return new default PreparedStatement object containing the pre-compiled
* ... | Creates a PreparedStatement object for sending parameterized SQL statements to the database | preparedStatement | {
"repo_name": "schnatterer/songbirdDbApi4j",
"path": "src/main/java/info/schnatterer/songbirddbapi4j/SongbirdDbConnection.java",
"license": "apache-2.0",
"size": 5753
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import java.sql.PreparedStatement; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,534,547 |
public byte[] timeoutSign(byte[] input, long expirationTime)
throws KeyczarException {
ByteBuffer output =
ByteBuffer.allocate(signer.digestSize() + Signer.TIMESTAMP_SIZE);
timeoutSign(ByteBuffer.wrap(input), expirationTime, output);
output.reset();
byte[]... | byte[] function(byte[] input, long expirationTime) throws KeyczarException { ByteBuffer output = ByteBuffer.allocate(signer.digestSize() + Signer.TIMESTAMP_SIZE); timeoutSign(ByteBuffer.wrap(input), expirationTime, output); output.reset(); byte[] outputBytes = new byte[output.remaining()]; output.get(outputBytes); retu... | /**
* Sign the given input and return a signature that is valid until the
* expiration time given as the number of milliseconds since "the epoch"
* of 1/1/1970 00:00:00 GMT
*
* @param input The input to be signed
* @param expirationTime The expiration time in milliseconds since 1/... | Sign the given input and return a signature that is valid until the expiration time given as the number of milliseconds since "the epoch" of 1/1/1970 00:00:00 GMT | timeoutSign | {
"repo_name": "241180/Oryx",
"path": "oryx-crypt/src/com/oryx/TimeoutSigner.java",
"license": "gpl-3.0",
"size": 4977
} | [
"com.oryx.exceptions.KeyczarException",
"java.nio.ByteBuffer"
] | import com.oryx.exceptions.KeyczarException; import java.nio.ByteBuffer; | import com.oryx.exceptions.*; import java.nio.*; | [
"com.oryx.exceptions",
"java.nio"
] | com.oryx.exceptions; java.nio; | 355,618 |
void reportRequest(HttpServletRequest request, Split requestSplit, List<Split> splits);
| void reportRequest(HttpServletRequest request, Split requestSplit, List<Split> splits); | /**
* Reports request that exceeds the threshold.
*
* @param request offending HTTP request
* @param requestSplit split measuring the offending request
* @param splits list of all splits started for this request
*/ | Reports request that exceeds the threshold | reportRequest | {
"repo_name": "virgo47/javasimon",
"path": "javaee/src/main/java/org/javasimon/javaee/reqreporter/RequestReporter.java",
"license": "bsd-3-clause",
"size": 979
} | [
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"org.javasimon.Split"
] | import java.util.List; import javax.servlet.http.HttpServletRequest; import org.javasimon.Split; | import java.util.*; import javax.servlet.http.*; import org.javasimon.*; | [
"java.util",
"javax.servlet",
"org.javasimon"
] | java.util; javax.servlet; org.javasimon; | 677,361 |
public boolean validateTotalDollarAmountIsLessThanPurchaseOrderTotalLimit(PurchasingDocument purDocument) {
boolean valid = true;
if (ObjectUtils.isNotNull(purDocument.getPurchaseOrderTotalLimit()) && ObjectUtils.isNotNull(((AmountTotaling) purDocument).getTotalDollarAmount())) {
Kual... | boolean function(PurchasingDocument purDocument) { boolean valid = true; if (ObjectUtils.isNotNull(purDocument.getPurchaseOrderTotalLimit()) && ObjectUtils.isNotNull(((AmountTotaling) purDocument).getTotalDollarAmount())) { KualiDecimal totalAmount = ((AmountTotaling) purDocument).getTotalDollarAmount(); if (((AmountTo... | /**
* Validate that if the PurchaseOrderTotalLimit is not null then the TotalDollarAmount cannot be greater than the
* PurchaseOrderTotalLimit.
*
* @param purDocument The purchase order document to be validated.
* @return True if the TotalDollarAmount is less than the PurchaseOrderTotalLi... | Validate that if the PurchaseOrderTotalLimit is not null then the TotalDollarAmount cannot be greater than the PurchaseOrderTotalLimit | validateTotalDollarAmountIsLessThanPurchaseOrderTotalLimit | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/purap/document/validation/impl/PurchaseOrderDocumentPreRules.java",
"license": "agpl-3.0",
"size": 8390
} | [
"org.kuali.kfs.module.purap.PurapKeyConstants",
"org.kuali.kfs.module.purap.document.PurchasingDocument",
"org.kuali.kfs.sys.document.AmountTotaling",
"org.kuali.rice.core.api.util.type.KualiDecimal",
"org.kuali.rice.kns.util.KNSGlobalVariables",
"org.kuali.rice.krad.util.ObjectUtils"
] | import org.kuali.kfs.module.purap.PurapKeyConstants; import org.kuali.kfs.module.purap.document.PurchasingDocument; import org.kuali.kfs.sys.document.AmountTotaling; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.kns.util.KNSGlobalVariables; import org.kuali.rice.krad.util.ObjectUtils; | import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.document.*; import org.kuali.kfs.sys.document.*; import org.kuali.rice.core.api.util.type.*; import org.kuali.rice.kns.util.*; import org.kuali.rice.krad.util.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 2,470,864 |
default void send(String body, HttpResponseStatus statusCode) {
send(body, statusCode, APPLICATION_JSON_UTF8);
} | default void send(String body, HttpResponseStatus statusCode) { send(body, statusCode, APPLICATION_JSON_UTF8); } | /**
* Send the body string and complete the action.
*
* @param body
* the body string that should be send
* @param statusCode
* the status code to send
*/ | Send the body string and complete the action | send | {
"repo_name": "gentics/mesh",
"path": "common-api/src/main/java/com/gentics/mesh/handler/ActionContext.java",
"license": "apache-2.0",
"size": 3461
} | [
"io.netty.handler.codec.http.HttpResponseStatus"
] | import io.netty.handler.codec.http.HttpResponseStatus; | import io.netty.handler.codec.http.*; | [
"io.netty.handler"
] | io.netty.handler; | 567,133 |
protected native static long LASGuid_AsString(@Ptr long hId);
public static LiblasLibrary.LASVLRH LASVLR_Create() {
return new LiblasLibrary.LASVLRH(LASVLR_Create$2());
} | native static long LASGuid_AsString(@Ptr long hId); public static LiblasLibrary.LASVLRH function() { return new LiblasLibrary.LASVLRH(LASVLR_Create$2()); } | /**
* Creates a new VLR record<br>
* @return a new VLR record<br>
* Original signature : <code>LASVLRH LASVLR_Create()</code><br>
* <i>native declaration : liblas.h:1040</i>
*/ | Creates a new VLR record | LASVLR_Create | {
"repo_name": "petvana/las-bridj",
"path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java",
"license": "bsd-3-clause",
"size": 116212
} | [
"org.bridj.ann.Ptr"
] | import org.bridj.ann.Ptr; | import org.bridj.ann.*; | [
"org.bridj.ann"
] | org.bridj.ann; | 1,558,142 |
@Override
public void destroyObject(PStmtKey key,
PooledObject<DelegatingPreparedStatement> p)
throws Exception {
p.getObject().getInnermostDelegate().close();
}
/**
* {@link KeyedPooledObjectFactory} method for validating
* pooled statements. Currently always ... | void function(PStmtKey key, PooledObject<DelegatingPreparedStatement> p) throws Exception { p.getObject().getInnermostDelegate().close(); } /** * {@link KeyedPooledObjectFactory} method for validating * pooled statements. Currently always returns true. * * @param key ignored * @param p ignored * @return {@code true} | /**
* {@link KeyedPooledObjectFactory} method for destroying
* PoolablePreparedStatements and PoolableCallableStatements.
* Closes the underlying statement.
*
* @param key ignored
* @param p the wrapped pooled statement to be destroyed.
*/ | <code>KeyedPooledObjectFactory</code> method for destroying PoolablePreparedStatements and PoolableCallableStatements. Closes the underlying statement | destroyObject | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/PoolingConnection.java",
"license": "mit",
"size": 16159
} | [
"org.apache.tomcat.dbcp.pool2.KeyedPooledObjectFactory",
"org.apache.tomcat.dbcp.pool2.PooledObject"
] | import org.apache.tomcat.dbcp.pool2.KeyedPooledObjectFactory; import org.apache.tomcat.dbcp.pool2.PooledObject; | import org.apache.tomcat.dbcp.pool2.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 1,197,239 |
static void sha256digest(@Nonnull byte[] data, int dataStart, int dataLength, @Nonnull byte[] output, int outputStart) {
MessageDigest digest;
try {
digest = MessageDigest.getInstance("SHA-256");
digest.update(data, dataStart, dataLength);
digest.digest(output, ou... | static void sha256digest(@Nonnull byte[] data, int dataStart, int dataLength, @Nonnull byte[] output, int outputStart) { MessageDigest digest; try { digest = MessageDigest.getInstance(STR); digest.update(data, dataStart, dataLength); digest.digest(output, outputStart, 256 / 8); } catch (GeneralSecurityException e) { th... | /**
* Simple utility to calculate the SHA-256 digest.
*
* @param data
* value to digest a portion of.
* @param dataStart
* index into data for where to begin digest.
* @param dataLength
* number of bytes to digest.
* @param output
* array... | Simple utility to calculate the SHA-256 digest | sha256digest | {
"repo_name": "harningt/atomun-mnemonic",
"path": "src/main/java/us/eharning/atomun/mnemonic/spi/bip0039/BIP0039MnemonicUtility.java",
"license": "apache-2.0",
"size": 7400
} | [
"com.google.common.base.Throwables",
"java.security.GeneralSecurityException",
"java.security.MessageDigest",
"javax.annotation.Nonnull"
] | import com.google.common.base.Throwables; import java.security.GeneralSecurityException; import java.security.MessageDigest; import javax.annotation.Nonnull; | import com.google.common.base.*; import java.security.*; import javax.annotation.*; | [
"com.google.common",
"java.security",
"javax.annotation"
] | com.google.common; java.security; javax.annotation; | 1,604,538 |
public static String transformHtmlCode(String text) {
return StringEscapeUtils.unescapeHtml4(text);
} | static String function(String text) { return StringEscapeUtils.unescapeHtml4(text); } | /**
* This method transforms a text with caracter specificly encoded for HTML by a text encoded in
* according to the Java code.
*
* @param text (String) a single text which contains a lot of forbidden caracters. This text must
* not be null
* @return Returns the transformed text without specific code... | This method transforms a text with caracter specificly encoded for HTML by a text encoded in according to the Java code | transformHtmlCode | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/util/EncodeHelper.java",
"license": "agpl-3.0",
"size": 6447
} | [
"org.apache.commons.lang3.StringEscapeUtils"
] | import org.apache.commons.lang3.StringEscapeUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,479,350 |
super.startParsing( attrs );
propertyName = attrs.getValue( getUri(), "name" );
if ( propertyName == null ) {
throw new ParseException( "Required attribute 'name' is null.", getLocator() );
}
// yes, this is how the report designer parses this property, so we have to follow that strange road too
... | super.startParsing( attrs ); propertyName = attrs.getValue( getUri(), "name" ); if ( propertyName == null ) { throw new ParseException( STR, getLocator() ); } array = ( attrs.getValue( getUri(), "array" ) != null ); } | /**
* Starts parsing.
*
* @param attrs the attributes.
* @throws SAXException if there is a parsing error.
*/ | Starts parsing | startParsing | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/extensions-reportdesigner-parser/src/main/java/org/pentaho/reporting/engine/classic/extensions/parsers/reportdesigner/datasets/ReportFunctionPropertyReadHandler.java",
"license": "lgpl-2.1",
"size": 3755
} | [
"org.pentaho.reporting.libraries.xmlns.parser.ParseException"
] | import org.pentaho.reporting.libraries.xmlns.parser.ParseException; | import org.pentaho.reporting.libraries.xmlns.parser.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 673,354 |
public static File getFile(Context context, Uri uri) {
if (uri != null) {
String path = getPath(context, uri);
if (path != null && isLocal(path)) {
return new File(path);
}
}
return null;
} | static File function(Context context, Uri uri) { if (uri != null) { String path = getPath(context, uri); if (path != null && isLocal(path)) { return new File(path); } } return null; } | /**
* Convert Uri into File, if possible.
*
* @return file A local file that the Uri was pointing to, or null if the
* Uri is unsupported or pointed to a remote resource.
* @author paulburke
* @see #getPath(Context, Uri)
*/ | Convert Uri into File, if possible | getFile | {
"repo_name": "jinkim608/SnapPoll",
"path": "SnapPollAndroidClient/app/src/main/java/dev/jinkim/snappollandroid/util/efilechooser/FileUtils.java",
"license": "apache-2.0",
"size": 18029
} | [
"android.content.Context",
"android.net.Uri",
"java.io.File"
] | import android.content.Context; import android.net.Uri; import java.io.File; | import android.content.*; import android.net.*; import java.io.*; | [
"android.content",
"android.net",
"java.io"
] | android.content; android.net; java.io; | 1,971,685 |
protected static Tool doMROnTableTest(HBaseTestingUtility util, String family,
String data, String[] args, int valueMultiplier)
throws Exception {
String table = args[args.length - 1];
Configuration conf = new Configuration(util.getConfiguration());
// populate input file
FileSystem fs = File... | static Tool function(HBaseTestingUtility util, String family, String data, String[] args, int valueMultiplier) throws Exception { String table = args[args.length - 1]; Configuration conf = new Configuration(util.getConfiguration()); FileSystem fs = FileSystem.get(conf); Path inputPath = fs.makeQualified(new Path(util.g... | /**
* Run an ImportTsv job and perform basic validation on the results.
* Returns the ImportTsv <code>Tool</code> instance so that other tests can
* inspect it for further validation as necessary. This method is static to
* insure non-reliance on instance's util/conf facilities.
* @param args Any argumen... | Run an ImportTsv job and perform basic validation on the results. Returns the ImportTsv <code>Tool</code> instance so that other tests can inspect it for further validation as necessary. This method is static to insure non-reliance on instance's util/conf facilities | doMROnTableTest | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportTsv.java",
"license": "apache-2.0",
"size": 13576
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HBaseTestingUtility",
"org.apache.hadoop.hbase.util.Bytes",
"org.... | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.util.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 741,324 |
public static Range findStackedRangeBounds(CategoryDataset dataset,
KeyToGroupMap map) {
Range result = null;
if (dataset != null) {
// create an array holding the group indices...
int[] groupIndex = new int[dat... | static Range function(CategoryDataset dataset, KeyToGroupMap map) { Range result = null; if (dataset != null) { int[] groupIndex = new int[dataset.getRowCount()]; for (int i = 0; i < dataset.getRowCount(); i++) { groupIndex[i] = map.getGroupIndex( map.getGroup(dataset.getRowKey(i)) ); } int groupCount = map.getGroupCou... | /**
* Returns the minimum and maximum values for the dataset's range
* (y-values), assuming that the series in one category are stacked.
*
* @param dataset the dataset.
* @param map a structure that maps series to groups.
*
* @return The value range (<code>null</code> if the datase... | Returns the minimum and maximum values for the dataset's range (y-values), assuming that the series in one category are stacked | findStackedRangeBounds | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/data/general/DatasetUtilities.java",
"license": "apache-2.0",
"size": 58159
} | [
"org.jfree.data.KeyToGroupMap",
"org.jfree.data.Range",
"org.jfree.data.category.CategoryDataset"
] | import org.jfree.data.KeyToGroupMap; import org.jfree.data.Range; import org.jfree.data.category.CategoryDataset; | import org.jfree.data.*; import org.jfree.data.category.*; | [
"org.jfree.data"
] | org.jfree.data; | 450,138 |
@ApiModelProperty(example = "null", value = "")
public ChannelPreferencesTheme getChannelPreferencesTheme() {
return channelPreferencesTheme;
} | @ApiModelProperty(example = "null", value = "") ChannelPreferencesTheme function() { return channelPreferencesTheme; } | /**
* Get channelPreferencesTheme
* @return channelPreferencesTheme
**/ | Get channelPreferencesTheme | getChannelPreferencesTheme | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/DemographicsThemes.java",
"license": "apache-2.0",
"size": 14131
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 209,047 |
public static byte min(byte... array) {
checkArgument(array.length > 0);
byte min = array[0];
for (int i = 1; i < array.length; i++) {
if (array[i] < min) {
min = array[i];
}
}
return min;
} | static byte function(byte... array) { checkArgument(array.length > 0); byte min = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < min) { min = array[i]; } } return min; } | /**
* Returns the least value present in {@code array}.
*
* @param array a <i>nonempty</i> array of {@code byte} values
* @return the value present in {@code array} that is less than or equal to
* every other value in the array
* @throws IllegalArgumentException if {@code array} is empty
*/ | Returns the least value present in array | min | {
"repo_name": "paulmartel/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/primitives/SignedBytes.java",
"license": "agpl-3.0",
"size": 7068
} | [
"com.google_voltpatches.common.base.Preconditions"
] | import com.google_voltpatches.common.base.Preconditions; | import com.google_voltpatches.common.base.*; | [
"com.google_voltpatches.common"
] | com.google_voltpatches.common; | 2,187,655 |
public static boolean isUnauthorized(final Exception e) {
if (e instanceof RequestException)
return ((RequestException) e).getStatus() == HTTP_UNAUTHORIZED;
String message = null;
if (e instanceof IOException)
message = e.getMessage();
final Throwable cause =... | static boolean function(final Exception e) { if (e instanceof RequestException) return ((RequestException) e).getStatus() == HTTP_UNAUTHORIZED; String message = null; if (e instanceof IOException) message = e.getMessage(); final Throwable cause = e.getCause(); if (cause instanceof IOException) { String causeMessage = c... | /**
* Is the given {@link Exception} due to a 401 Unauthorized API response?
*
* @param e
* @return true if 401, false otherwise
*/ | Is the given <code>Exception</code> due to a 401 Unauthorized API response | isUnauthorized | {
"repo_name": "DeLaSalleUniversity-Manila/forkhub-JeraldLimqueco",
"path": "app/src/main/java/com/github/mobile/accounts/AccountUtils.java",
"license": "apache-2.0",
"size": 12236
} | [
"android.text.TextUtils",
"java.io.IOException",
"org.eclipse.egit.github.core.client.RequestException"
] | import android.text.TextUtils; import java.io.IOException; import org.eclipse.egit.github.core.client.RequestException; | import android.text.*; import java.io.*; import org.eclipse.egit.github.core.client.*; | [
"android.text",
"java.io",
"org.eclipse.egit"
] | android.text; java.io; org.eclipse.egit; | 1,782,471 |
private void addActionLink(StyledText styledText, int action, String label,
Object... data) {
String s = styledText.getText();
int start = (s == null ? 0 : s.length());
styledText.append(label);
StyleRange sr = new ActionLinkStyleRange(action, data);
sr.start = s... | void function(StyledText styledText, int action, String label, Object... data) { String s = styledText.getText(); int start = (s == null ? 0 : s.length()); styledText.append(label); StyleRange sr = new ActionLinkStyleRange(action, data); sr.start = start; sr.length = label.length(); sr.fontStyle = SWT.NORMAL; sr.underl... | /**
* Add a URL-looking link to the styled text widget.
* <p/>
* A mouse-click listener is setup and it interprets the link based on the
* action, corresponding to the value fields in {@link ActionLinkStyleRange}.
*/ | Add a URL-looking link to the styled text widget. A mouse-click listener is setup and it interprets the link based on the action, corresponding to the value fields in <code>ActionLinkStyleRange</code> | addActionLink | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java",
"license": "gpl-2.0",
"size": 114055
} | [
"com.android.resources.ResourceType",
"org.eclipse.swt.custom.StyleRange",
"org.eclipse.swt.custom.StyledText"
] | import com.android.resources.ResourceType; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; | import com.android.resources.*; import org.eclipse.swt.custom.*; | [
"com.android.resources",
"org.eclipse.swt"
] | com.android.resources; org.eclipse.swt; | 2,273,034 |
protected void parseError(String message) throws IOException {
throw new IOException("parse error: " + filename + ": " + st.lineno()
+ ": " + message);
}
// Access | void function(String message) throws IOException { throw new IOException(STR + filename + STR + st.lineno() + STR + message); } | /**
* Generate a parse error.
*/ | Generate a parse error | parseError | {
"repo_name": "margaritis/gs-core",
"path": "src/org/graphstream/stream/file/FileSourceBase.java",
"license": "lgpl-3.0",
"size": 32992
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,597,212 |
public static java.util.Set extractTemplateBoSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.TemplateBoLiteVoCollection voCollection)
{
return extractTemplateBoSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.TemplateBoLiteVoCollection voCollection) { return extractTemplateBoSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.admin.domain.objects.TemplateBo set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.admin.domain.objects.TemplateBo set from the value object collection | extractTemplateBoSet | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/TemplateBoLiteVoAssembler.java",
"license": "agpl-3.0",
"size": 17553
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,020,590 |
void processOverReplicatedBlocksOnReCommission(
final DatanodeDescriptor srcNode) {
if (!namesystem.isPopulatingReplQueues()) {
return;
}
final Iterator<? extends Block> it = srcNode.getBlockIterator();
int numOverReplicated = 0;
while(it.hasNext()) {
final Block block = it.next(... | void processOverReplicatedBlocksOnReCommission( final DatanodeDescriptor srcNode) { if (!namesystem.isPopulatingReplQueues()) { return; } final Iterator<? extends Block> it = srcNode.getBlockIterator(); int numOverReplicated = 0; while(it.hasNext()) { final Block block = it.next(); BlockCollection bc = blocksMap.getBlo... | /**
* On stopping decommission, check if the node has excess replicas.
* If there are any excess replicas, call processOverReplicatedBlock().
* Process over replicated blocks only when active NN is out of safe mode.
*/ | On stopping decommission, check if the node has excess replicas. If there are any excess replicas, call processOverReplicatedBlock(). Process over replicated blocks only when active NN is out of safe mode | processOverReplicatedBlocksOnReCommission | {
"repo_name": "Reidddddd/mo-hadoop2.6.0",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 146902
} | [
"java.util.Iterator",
"org.apache.hadoop.hdfs.protocol.Block"
] | import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.Block; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,113,376 |
private void setAuthenticatedUser(WilddogUser wilddogUser) {
if (wilddogUser != null) {
mPasswordLoginButton.setVisibility(View.GONE);
mAnonymousLoginButton.setVisibility(View.GONE);
mWeiboButton.setVisibility(View.GONE);
mQQButton.setVisibility(V... | void function(WilddogUser wilddogUser) { if (wilddogUser != null) { mPasswordLoginButton.setVisibility(View.GONE); mAnonymousLoginButton.setVisibility(View.GONE); mWeiboButton.setVisibility(View.GONE); mQQButton.setVisibility(View.GONE); mLoggedInStatusTextView.setVisibility(View.VISIBLE); String name = null; String pr... | /**
* Once a user is logged in, take the mAuthData provided from Wilddog and "use" it.
*/ | Once a user is logged in, take the mAuthData provided from Wilddog and "use" it | setAuthenticatedUser | {
"repo_name": "WildDogTeam/demo-android-login",
"path": "app/src/main/java/com/wilddog/samples/logindemo/MainActivity.java",
"license": "mit",
"size": 11275
} | [
"android.util.Log",
"android.view.View",
"com.wilddog.wilddogauth.model.WilddogUser"
] | import android.util.Log; import android.view.View; import com.wilddog.wilddogauth.model.WilddogUser; | import android.util.*; import android.view.*; import com.wilddog.wilddogauth.model.*; | [
"android.util",
"android.view",
"com.wilddog.wilddogauth"
] | android.util; android.view; com.wilddog.wilddogauth; | 120,970 |
public void call(String name, Object value) throws IOException {
if (generator.isExcludingFieldsNamed(name) || generator.isExcludingValues(value)) {
return;
}
writeName(name);
writeValue(value);
} | void function(String name, Object value) throws IOException { if (generator.isExcludingFieldsNamed(name) generator.isExcludingValues(value)) { return; } writeName(name); writeValue(value); } | /**
* Writes the name and value of a JSON attribute
*
* @param name The attribute name
* @param value The value
* @throws IOException
*/ | Writes the name and value of a JSON attribute | call | {
"repo_name": "apache/groovy",
"path": "subprojects/groovy-json/src/main/java/groovy/json/StreamingJsonBuilder.java",
"license": "apache-2.0",
"size": 32482
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,354,756 |
// [TARGET putWithDeferredIdAllocation(FullEntity...)]
public List<Key> multiplePutEntitiesDeferredId() {
Datastore datastore = transaction.getDatastore();
// [START multiplePutEntitiesDeferredId]
IncompleteKey key1 = datastore.newKeyFactory().setKind("MyKind").newKey();
FullEntity.Builder entityBui... | List<Key> function() { Datastore datastore = transaction.getDatastore(); IncompleteKey key1 = datastore.newKeyFactory().setKind(STR).newKey(); FullEntity.Builder entityBuilder1 = FullEntity.newBuilder(key1); entityBuilder1.set(STR, STR); FullEntity entity1 = entityBuilder1.build(); IncompleteKey key2 = datastore.newKey... | /**
* Example of putting multiple entities with deferred id allocation.
*/ | Example of putting multiple entities with deferred id allocation | multiplePutEntitiesDeferredId | {
"repo_name": "jabubake/google-cloud-java",
"path": "google-cloud-examples/src/main/java/com/google/cloud/examples/datastore/snippets/TransactionSnippets.java",
"license": "apache-2.0",
"size": 14132
} | [
"com.google.cloud.datastore.Datastore",
"com.google.cloud.datastore.FullEntity",
"com.google.cloud.datastore.IncompleteKey",
"com.google.cloud.datastore.Key",
"com.google.cloud.datastore.Transaction",
"java.util.List"
] | import com.google.cloud.datastore.Datastore; import com.google.cloud.datastore.FullEntity; import com.google.cloud.datastore.IncompleteKey; import com.google.cloud.datastore.Key; import com.google.cloud.datastore.Transaction; import java.util.List; | import com.google.cloud.datastore.*; import java.util.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 184,898 |
Collection<Expense> createExpenses(Long reportId, List<Long> chargeIds); | Collection<Expense> createExpenses(Long reportId, List<Long> chargeIds); | /**
* Adds the selected charges to the expense report.
* Creates and returns a new expense for each charge.
*
* @param reportId the expense report id
* @param chargeIds the eligible charge ids
* @return an expense for each charge
*/ | Adds the selected charges to the expense report. Creates and returns a new expense for each charge | createExpenses | {
"repo_name": "spring-projects/html5expense",
"path": "server/api/src/main/java/com/springsource/html5expense/ExpenseReportingService.java",
"license": "apache-2.0",
"size": 3457
} | [
"java.util.Collection",
"java.util.List"
] | import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 692,255 |
public static SimpleExoPlayer newSimpleInstance(Context context, TrackSelector trackSelector,
LoadControl loadControl, DrmSessionManager drmSessionManager,
boolean preferExtensionDecoders, long allowedVideoJoiningTimeMs) {
return new SimpleExoPlayer(context, trackSelector, loadControl, drmSessionManag... | static SimpleExoPlayer function(Context context, TrackSelector trackSelector, LoadControl loadControl, DrmSessionManager drmSessionManager, boolean preferExtensionDecoders, long allowedVideoJoiningTimeMs) { return new SimpleExoPlayer(context, trackSelector, loadControl, drmSessionManager, preferExtensionDecoders, allow... | /**
* Creates a {@link SimpleExoPlayer} instance. Must be called from a thread that has an associated
* {@link Looper}.
*
* @param context A {@link Context}.
* @param trackSelector The {@link TrackSelector} that will be used by the instance.
* @param loadControl The {@link LoadControl} that will be us... | Creates a <code>SimpleExoPlayer</code> instance. Must be called from a thread that has an associated <code>Looper</code> | newSimpleInstance | {
"repo_name": "Ood-Tsen/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer2/ExoPlayerFactory.java",
"license": "apache-2.0",
"size": 5898
} | [
"android.content.Context",
"com.google.android.exoplayer2.drm.DrmSessionManager",
"com.google.android.exoplayer2.trackselection.TrackSelector"
] | import android.content.Context; import com.google.android.exoplayer2.drm.DrmSessionManager; import com.google.android.exoplayer2.trackselection.TrackSelector; | import android.content.*; import com.google.android.exoplayer2.drm.*; import com.google.android.exoplayer2.trackselection.*; | [
"android.content",
"com.google.android"
] | android.content; com.google.android; | 1,365,829 |
public void hookToOut() {
originalOut = Optional.of(System.out);
System.setOut(this);
} | void function() { originalOut = Optional.of(System.out); System.setOut(this); } | /**
* Sets {@link System#setOut(PrintStream)} to this. Use {@link #unhook()} if you are done to use the original out
* again.
*/ | Sets <code>System#setOut(PrintStream)</code> to this. Use <code>#unhook()</code> if you are done to use the original out again | hookToOut | {
"repo_name": "CubicVoxel/openspacebox",
"path": "realm-designer/src/main/java/li/yuri/openspacebox/realmdesigner/util/ListenerPrintStream.java",
"license": "gpl-3.0",
"size": 2687
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,796,533 |
public int readSInt32() throws IOException
{
return decodeZigZag32(readRawVarint32());
} | int function() throws IOException { return decodeZigZag32(readRawVarint32()); } | /**
* Read an {@code sint32} field value from the stream.
*/ | Read an sint32 field value from the stream | readSInt32 | {
"repo_name": "protostuff/protostuff-me",
"path": "src/main/java/io/protostuff/me/CodedInput.java",
"license": "apache-2.0",
"size": 38548
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 988,771 |
void beforeRollbackPatch(Connection connection, RollbackPatch patch); | void beforeRollbackPatch(Connection connection, RollbackPatch patch); | /**
* Before the patch rollback is executed
* @param connection connection
* @param patch patch to rollback
*/ | Before the patch rollback is executed | beforeRollbackPatch | {
"repo_name": "m-szalik/dbpatch",
"path": "dbpatch-core/src/main/java/org/jsoftware/dbpatch/impl/extension/Extension.java",
"license": "apache-2.0",
"size": 2253
} | [
"java.sql.Connection",
"org.jsoftware.dbpatch.config.RollbackPatch"
] | import java.sql.Connection; import org.jsoftware.dbpatch.config.RollbackPatch; | import java.sql.*; import org.jsoftware.dbpatch.config.*; | [
"java.sql",
"org.jsoftware.dbpatch"
] | java.sql; org.jsoftware.dbpatch; | 1,352,237 |
public void reallocDataBuffer() {
long baseSize = valueAllocationSizeInBytes;
final int currentBufferCapacity = valueBuffer.capacity();
if (baseSize < (long) currentBufferCapacity) {
baseSize = (long) currentBufferCapacity;
}
long newAllocationSize = baseSize * 2L;
newAllocationSize = ... | void function() { long baseSize = valueAllocationSizeInBytes; final int currentBufferCapacity = valueBuffer.capacity(); if (baseSize < (long) currentBufferCapacity) { baseSize = (long) currentBufferCapacity; } long newAllocationSize = baseSize * 2L; newAllocationSize = BaseAllocator.nextPowerOfTwo(newAllocationSize); a... | /**
* Reallocate the data buffer. Data Buffer stores the actual data for
* VARCHAR or VARBINARY elements in the vector. The behavior is to double
* the size of buffer.
* @throws OversizedAllocationException if the desired new size is more than
* max allowed
* @thro... | Reallocate the data buffer. Data Buffer stores the actual data for VARCHAR or VARBINARY elements in the vector. The behavior is to double the size of buffer | reallocDataBuffer | {
"repo_name": "yufeldman/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/BaseVariableWidthVector.java",
"license": "apache-2.0",
"size": 44093
} | [
"io.netty.buffer.ArrowBuf",
"org.apache.arrow.memory.BaseAllocator",
"org.apache.arrow.vector.util.OversizedAllocationException"
] | import io.netty.buffer.ArrowBuf; import org.apache.arrow.memory.BaseAllocator; import org.apache.arrow.vector.util.OversizedAllocationException; | import io.netty.buffer.*; import org.apache.arrow.memory.*; import org.apache.arrow.vector.util.*; | [
"io.netty.buffer",
"org.apache.arrow"
] | io.netty.buffer; org.apache.arrow; | 2,829,989 |
List<OfProperty> selectList01(@Param(PARAM_CATALOG) String catalog,
@Param(PARAM_SCHEMA) String schema,
@Param(PARAM_ASCENDING) boolean ascending,
RowBounds rowBounds); | List<OfProperty> selectList01(@Param(PARAM_CATALOG) String catalog, @Param(PARAM_SCHEMA) String schema, @Param(PARAM_ASCENDING) boolean ascending, RowBounds rowBounds); | /**
* Selects entities.
*
* @param catalog an optional value for database catalog; may be
* {@code null}.
* @param schema an optional value for database schema; may be {@code null}.
* @param ascending ordering info.
* @param rowBounds pagination info
* @return a list of selected ... | Selects entities | selectList01 | {
"repo_name": "jinahya/openfire-bind",
"path": "src/main/java/com/github/jinahya/openfire/ibatis/mapper/OfPropertyMapper.java",
"license": "apache-2.0",
"size": 2437
} | [
"com.github.jinahya.openfire.persistence.OfProperty",
"java.util.List",
"org.apache.ibatis.annotations.Param",
"org.apache.ibatis.session.RowBounds"
] | import com.github.jinahya.openfire.persistence.OfProperty; import java.util.List; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.session.RowBounds; | import com.github.jinahya.openfire.persistence.*; import java.util.*; import org.apache.ibatis.annotations.*; import org.apache.ibatis.session.*; | [
"com.github.jinahya",
"java.util",
"org.apache.ibatis"
] | com.github.jinahya; java.util; org.apache.ibatis; | 232,603 |
public static TweetButton share(URL url) {
Objects.requireNonNull(url);
try {
return share(url.toURI());
} catch (Exception e) {
throw new IllegalArgumentException("Invalid url: " + url, e);
}
} | static TweetButton function(URL url) { Objects.requireNonNull(url); try { return share(url.toURI()); } catch (Exception e) { throw new IllegalArgumentException(STR + url, e); } } | /**
* Creates a new <a href="https://dev.twitter.com/web/tweet-button">Tweet button</a>
* for the given url.
*
* @param url The url to be shared
* @return a tweet button instance
*/ | Creates a new Tweet button for the given url | share | {
"repo_name": "mcollovati/vaadin-twitter-widgets",
"path": "twitter-widgets-addon/src/main/java/org/vaadin/addon/twitter/TweetButton.java",
"license": "apache-2.0",
"size": 9681
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,454,537 |
@Test
public void testEnableAllEvents() {
session.enableAllEvents();
List<EventRule> expectedCommands = Collections.singletonList(
eventRuleFactory.createRuleAllEvents());
List<EventRule> actualCommands = clientListener.getEnabledEventCommands();
assertEquals(ex... | void function() { session.enableAllEvents(); List<EventRule> expectedCommands = Collections.singletonList( eventRuleFactory.createRuleAllEvents()); List<EventRule> actualCommands = clientListener.getEnabledEventCommands(); assertEquals(expectedCommands, actualCommands); } | /**
* Test an "enable-event -a" command.
*/ | Test an "enable-event -a" command | testEnableAllEvents | {
"repo_name": "alexmonthy/ust-java-tests",
"path": "lttng-ust-java-tests-common/src/test/java/org/lttng/ust/agent/integration/client/TcpClientIT.java",
"license": "gpl-2.0",
"size": 25122
} | [
"java.util.Collections",
"java.util.List",
"org.junit.jupiter.api.Assertions",
"org.lttng.ust.agent.session.EventRule"
] | import java.util.Collections; import java.util.List; import org.junit.jupiter.api.Assertions; import org.lttng.ust.agent.session.EventRule; | import java.util.*; import org.junit.jupiter.api.*; import org.lttng.ust.agent.session.*; | [
"java.util",
"org.junit.jupiter",
"org.lttng.ust"
] | java.util; org.junit.jupiter; org.lttng.ust; | 1,005,623 |
Vector3D getVelocity(AbsoluteDate date, Vector3D position, Frame frame)
throws OrekitException; | Vector3D getVelocity(AbsoluteDate date, Vector3D position, Frame frame) throws OrekitException; | /** Get the inertial velocity of atmosphere molecules.
* @param date current date
* @param position current position in frame
* @param frame the frame in which is defined the position
* @return velocity (m/s) (defined in the same frame as the position)
* @exception OrekitException if some conve... | Get the inertial velocity of atmosphere molecules | getVelocity | {
"repo_name": "treeform/orekit",
"path": "src/main/java/org/orekit/forces/drag/Atmosphere.java",
"license": "apache-2.0",
"size": 2277
} | [
"org.apache.commons.math3.geometry.euclidean.threed.Vector3D",
"org.orekit.errors.OrekitException",
"org.orekit.frames.Frame",
"org.orekit.time.AbsoluteDate"
] | import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.orekit.errors.OrekitException; import org.orekit.frames.Frame; import org.orekit.time.AbsoluteDate; | import org.apache.commons.math3.geometry.euclidean.threed.*; import org.orekit.errors.*; import org.orekit.frames.*; import org.orekit.time.*; | [
"org.apache.commons",
"org.orekit.errors",
"org.orekit.frames",
"org.orekit.time"
] | org.apache.commons; org.orekit.errors; org.orekit.frames; org.orekit.time; | 2,285,198 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(LDataType.class)) {
case LunTypesPackage.LDATA_TYPE__AS_PRIMITIVE:
case LunTypesPackage.LDATA_TYPE__DATE:
case LunTypesPackage.LDATA_TYPE__AS_BLOB:
case LunTypesPackage.L... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(LDataType.class)) { case LunTypesPackage.LDATA_TYPE__AS_PRIMITIVE: case LunTypesPackage.LDATA_TYPE__DATE: case LunTypesPackage.LDATA_TYPE__AS_BLOB: case LunTypesPackage.LDATA_TYPE__LENGTH: case LunTypesPackage.LDA... | /**
* 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": "lunifera/lunifera-dsl",
"path": "org.lunifera.dsl.semantic.common.edit/src/org/lunifera/dsl/semantic/common/types/provider/LDataTypeItemProvider.java",
"license": "epl-1.0",
"size": 13450
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.lunifera.dsl.semantic.common.types.LDataType",
"org.lunifera.dsl.semantic.common.types.LunTypesPackage"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.lunifera.dsl.semantic.common.types.LDataType; import org.lunifera.dsl.semantic.common.types.LunTypesPackage; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.lunifera.dsl.semantic.common.types.*; | [
"org.eclipse.emf",
"org.lunifera.dsl"
] | org.eclipse.emf; org.lunifera.dsl; | 2,822,030 |
public ConvertedDocument convertMimeMessage(Message msg, File doc) throws MessagingException,
IOException {
ConvertedDocument parentMsgDoc = new ConvertedDocument(doc);
parentMsgDoc.is_RFC822_attachment = true;
//parentMsgDoc.setEncoding(parseCharset(msg.getContentType()));
... | ConvertedDocument function(Message msg, File doc) throws MessagingException, IOException { ConvertedDocument parentMsgDoc = new ConvertedDocument(doc); parentMsgDoc.is_RFC822_attachment = true; setMailAttributes(parentMsgDoc, msg); StringBuilder rawText = new StringBuilder(); String messageFilePrefix = (doc != null ? F... | /**
* Convert the MIME Message with or without the File doc.
* -- live email capture from a mailbox: you have the MimeMessage; there is no File object
* -- email capture from a filesystem: you retrieved the MimeMessage from a File object
*
* @param msg
* @param doc
* @return do... | Convert the MIME Message with or without the File doc. -- live email capture from a mailbox: you have the MimeMessage; there is no File object -- email capture from a filesystem: you retrieved the MimeMessage from a File object | convertMimeMessage | {
"repo_name": "voyagersearch/Xponents",
"path": "XText/src/main/java/org/opensextant/xtext/converters/MessageConverter.java",
"license": "apache-2.0",
"size": 25528
} | [
"java.io.File",
"java.io.IOException",
"javax.mail.Message",
"javax.mail.MessagingException",
"org.apache.commons.io.FilenameUtils",
"org.opensextant.xtext.ConvertedDocument"
] | import java.io.File; import java.io.IOException; import javax.mail.Message; import javax.mail.MessagingException; import org.apache.commons.io.FilenameUtils; import org.opensextant.xtext.ConvertedDocument; | import java.io.*; import javax.mail.*; import org.apache.commons.io.*; import org.opensextant.xtext.*; | [
"java.io",
"javax.mail",
"org.apache.commons",
"org.opensextant.xtext"
] | java.io; javax.mail; org.apache.commons; org.opensextant.xtext; | 1,250,119 |
public static Map<String,Pool> getAll() {
return PoolManagerImpl.getPMI().getMap();
} | static Map<String,Pool> function() { return PoolManagerImpl.getPMI().getMap(); } | /**
* Returns a map containing all the pools in this manager.
* The keys are pool names
* and the values are {@link Pool} instances.
* <p> The map contains the pools that this manager knows of at the time of this call.
* The map is free to be changed without affecting this manager.
* @return a Map tha... | Returns a map containing all the pools in this manager. The keys are pool names and the values are <code>Pool</code> instances. The map contains the pools that this manager knows of at the time of this call. The map is free to be changed without affecting this manager | getAll | {
"repo_name": "ameybarve15/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/PoolManager.java",
"license": "apache-2.0",
"size": 3090
} | [
"com.gemstone.gemfire.internal.cache.PoolManagerImpl",
"java.util.Map"
] | import com.gemstone.gemfire.internal.cache.PoolManagerImpl; import java.util.Map; | import com.gemstone.gemfire.internal.cache.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 1,674,321 |
public int getPasswordExpirationDays() throws AS400SecurityException, IOException {
if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Getting password expiration warning days.");
chooseImpl();
signon(false);
int days = getDaysToExpiration();
if (Trace.traceOn... | int function() throws AS400SecurityException, IOException { if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, STR); chooseImpl(); signon(false); int days = getDaysToExpiration(); if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, STR + days); return days; } | /**
* Returns the number of days until the user profile's password expires.
* <p>A connection is required to retrieve this information. If a connection
* has not been established, one is created to retrieve the information.
* @return The number of days until the user profiles' password expires.
... | Returns the number of days until the user profile's password expires. A connection is required to retrieve this information. If a connection has not been established, one is created to retrieve the information | getPasswordExpirationDays | {
"repo_name": "piguangming/jt400",
"path": "src/com/ibm/as400/access/AS400.java",
"license": "epl-1.0",
"size": 195720
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 930,020 |
public List<T> results(int m) {
return this.responses.get(m).getResults();
} | List<T> function(int m) { return this.responses.get(m).getResults(); } | /**
* Fetch the list of results of the m-response.
* @param m Position of the response from the array of responses.
* @return the list of results of the m-response.
*/ | Fetch the list of results of the m-response | results | {
"repo_name": "opencb/java-common-libs",
"path": "commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/DataResponse.java",
"license": "apache-2.0",
"size": 5539
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,971,738 |
public EnumDescriptorProto getProto() {
return proto;
} | EnumDescriptorProto function() { return proto; } | /**
* Returns the underlying proto representation.
*/ | Returns the underlying proto representation | getProto | {
"repo_name": "googleapis/api-compiler",
"path": "src/main/java/com/google/api/tools/framework/model/EnumType.java",
"license": "apache-2.0",
"size": 4515
} | [
"com.google.protobuf.DescriptorProtos"
] | import com.google.protobuf.DescriptorProtos; | import com.google.protobuf.*; | [
"com.google.protobuf"
] | com.google.protobuf; | 417,224 |
private boolean handleOrganizationAssignment( Organization o, DualListModel<User> userAssignment, DualListModel<UserGroup> groupAssignment )
throws MergeException {
EntityTransaction t = PersistenceUtil.getEntityManager().getTransaction();
try {
t.begin();
UserDao uDao = new UserDao();
UserGroupDao u... | boolean function( Organization o, DualListModel<User> userAssignment, DualListModel<UserGroup> groupAssignment ) throws MergeException { EntityTransaction t = PersistenceUtil.getEntityManager().getTransaction(); try { t.begin(); UserDao uDao = new UserDao(); UserGroupDao ugDao = new UserGroupDao(); List<User> usrToMerg... | /**
* Handle the organization assignment
*
* @param o
* organization
* @param userAssignment
* dual list with assigned users
* @param groupAssignment
* dual list with assigned groups
* @throws MergeException
* on merge errors
*/ | Handle the organization assignment | handleOrganizationAssignment | {
"repo_name": "PE-INTERNATIONAL/soda4lca",
"path": "Node/src/main/java/de/iai/ilcd/webgui/controller/admin/OrganizationHandler.java",
"license": "gpl-3.0",
"size": 13189
} | [
"de.iai.ilcd.model.dao.MergeException",
"de.iai.ilcd.model.dao.UserDao",
"de.iai.ilcd.model.dao.UserGroupDao",
"de.iai.ilcd.model.security.Organization",
"de.iai.ilcd.model.security.User",
"de.iai.ilcd.model.security.UserGroup",
"de.iai.ilcd.persistence.PersistenceUtil",
"java.util.ArrayList",
"java... | import de.iai.ilcd.model.dao.MergeException; import de.iai.ilcd.model.dao.UserDao; import de.iai.ilcd.model.dao.UserGroupDao; import de.iai.ilcd.model.security.Organization; import de.iai.ilcd.model.security.User; import de.iai.ilcd.model.security.UserGroup; import de.iai.ilcd.persistence.PersistenceUtil; import java.u... | import de.iai.ilcd.model.dao.*; import de.iai.ilcd.model.security.*; import de.iai.ilcd.persistence.*; import java.util.*; import javax.persistence.*; import org.primefaces.model.*; | [
"de.iai.ilcd",
"java.util",
"javax.persistence",
"org.primefaces.model"
] | de.iai.ilcd; java.util; javax.persistence; org.primefaces.model; | 2,147,614 |
public LRDetailedView closeToLRDetailedView() {
selenium.click("ui=courseEditor::toolbox_editorTools_closeEditor()");
selenium.waitForPageToLoad("30000");
return new LRDetailedView(selenium);
} | LRDetailedView function() { selenium.click(STR); selenium.waitForPageToLoad("30000"); return new LRDetailedView(selenium); } | /**
* Call this if the CourseEditor was created via the LRDetailedView, or if the course was just imported/created.
*
* @return
*/ | Call this if the CourseEditor was created via the LRDetailedView, or if the course was just imported/created | closeToLRDetailedView | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/test/java/org/olat/test/util/selenium/olatapi/course/editor/CourseEditor.java",
"license": "apache-2.0",
"size": 29757
} | [
"org.olat.test.util.selenium.olatapi.lr.LRDetailedView"
] | import org.olat.test.util.selenium.olatapi.lr.LRDetailedView; | import org.olat.test.util.selenium.olatapi.lr.*; | [
"org.olat.test"
] | org.olat.test; | 2,390,878 |
public static void stopService(Collection<?> services) {
if (services == null) {
return;
}
RuntimeException firstException = null;
for (Object value : services) {
try {
stopService(value);
} catch (RuntimeException e) {
... | static void function(Collection<?> services) { if (services == null) { return; } RuntimeException firstException = null; for (Object value : services) { try { stopService(value); } catch (RuntimeException e) { if (LOG.isDebugEnabled()) { LOG.debug(STR, value, e); } if (firstException == null) { firstException = e; } } ... | /**
* Stops each element of the given {@code services} if {@code services} itself is not {@code null}, otherwise this
* method would return immediately.
* <p/>
* If there's any exception being thrown while stopping the elements one after the other this method would rethrow
* the <b>first</b> su... | Stops each element of the given services if services itself is not null, otherwise this method would return immediately. If there's any exception being thrown while stopping the elements one after the other this method would rethrow the first such exception being thrown | stopService | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/support/service/ServiceHelper.java",
"license": "apache-2.0",
"size": 18881
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,462,185 |
private static PkgLookupResult checkIfPackage(
Environment env, TraversalRequest traversal, FileInfo rootInfo)
throws MissingDepException, FileSymlinkException, InconsistentFilesystemException,
IOException, InterruptedException {
Preconditions.checkArgument(rootInfo.type.exists() && !rootInf... | static PkgLookupResult function( Environment env, TraversalRequest traversal, FileInfo rootInfo) throws MissingDepException, FileSymlinkException, InconsistentFilesystemException, IOException, InterruptedException { Preconditions.checkArgument(rootInfo.type.exists() && !rootInfo.type.isFile(), STR, traversal, rootInfo)... | /**
* Checks whether the {@code traversal}'s path refers to a package directory.
*
* @return the result of the lookup; it contains potentially new {@link TraversalRequest} and
* {@link FileInfo} so the caller should use these instead of the old ones (this happens when
* a package is found, but un... | Checks whether the traversal's path refers to a package directory | checkIfPackage | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunction.java",
"license": "apache-2.0",
"size": 21632
} | [
"com.google.common.base.Verify",
"com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue",
"com.google.devtools.build.lib.util.Preconditions",
"com.google.devtools.build.lib.vfs.Path",
"java.io.IOException"
] | import com.google.common.base.Verify; import com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.Path; import java.io.IOException; | import com.google.common.base.*; import com.google.devtools.build.lib.skyframe.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; | [
"com.google.common",
"com.google.devtools",
"java.io"
] | com.google.common; com.google.devtools; java.io; | 765,004 |
Response<CheckNameResult> checkNameAvailabilityWithResponse(
String resourceGroupName,
String clusterName,
ManagedPrivateEndpointsCheckNameRequest resourceName,
Context context); | Response<CheckNameResult> checkNameAvailabilityWithResponse( String resourceGroupName, String clusterName, ManagedPrivateEndpointsCheckNameRequest resourceName, Context context); | /**
* Checks that the managed private endpoints resource name is valid and is not already in use.
*
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param resourceName The name of the resource.
* ... | Checks that the managed private endpoints resource name is valid and is not already in use | checkNameAvailabilityWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ManagedPrivateEndpoints.java",
"license": "mit",
"size": 9374
} | [
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,889,636 |
private static boolean isUnderneathClassLoader(ClassLoader candidate, ClassLoader parent) {
if (candidate == parent) {
return true;
}
if (candidate == null) {
return false;
}
ClassLoader classLoaderToCheck = candidate;
while (classLoaderToCheck != null) {
classLoaderToCheck = classLoaderToCheck.... | static boolean function(ClassLoader candidate, ClassLoader parent) { if (candidate == parent) { return true; } if (candidate == null) { return false; } ClassLoader classLoaderToCheck = candidate; while (classLoaderToCheck != null) { classLoaderToCheck = classLoaderToCheck.getParent(); if (classLoaderToCheck == parent) ... | /**
* Check whether the given ClassLoader is underneath the given parent,
* that is, whether the parent is within the candidate's hierarchy.
* @param candidate the candidate ClassLoader to check
* @param parent the parent ClassLoader to check for
*/ | Check whether the given ClassLoader is underneath the given parent, that is, whether the parent is within the candidate's hierarchy | isUnderneathClassLoader | {
"repo_name": "shivpun/spring-framework",
"path": "spring-beans/java/org/springframework/beans/CachedIntrospectionResults.java",
"license": "apache-2.0",
"size": 14755
} | [
"java.beans.BeanInfo",
"java.beans.Introspector",
"java.beans.PropertyDescriptor",
"java.util.LinkedHashMap",
"java.util.Map",
"java.util.concurrent.ConcurrentMap",
"org.springframework.core.convert.TypeDescriptor"
] | import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.ConcurrentMap; import org.springframework.core.convert.TypeDescriptor; | import java.beans.*; import java.util.*; import java.util.concurrent.*; import org.springframework.core.convert.*; | [
"java.beans",
"java.util",
"org.springframework.core"
] | java.beans; java.util; org.springframework.core; | 462,264 |
public static String getExtensionByMimeType(String type) {
MimeTypes types = getDefaultMimeTypes();
try {
return types.forName(type).getExtension();
} catch (Exception e) {
LOGGER.warn("Can't detect extension for MIME-type " + type, e);
return "";
... | static String function(String type) { MimeTypes types = getDefaultMimeTypes(); try { return types.forName(type).getExtension(); } catch (Exception e) { LOGGER.warn(STR + type, e); return ""; } } | /**
* Generate attachment extension from mime type
*
* @param type valid mime-type
* @return extension if it's known for specified mime-type, or empty string
* otherwise
*/ | Generate attachment extension from mime type | getExtensionByMimeType | {
"repo_name": "allure-framework/allure1",
"path": "allure-java-adaptor-api/src/main/java/ru/yandex/qatools/allure/utils/AllureResultsUtils.java",
"license": "apache-2.0",
"size": 12123
} | [
"org.apache.tika.mime.MimeTypes"
] | import org.apache.tika.mime.MimeTypes; | import org.apache.tika.mime.*; | [
"org.apache.tika"
] | org.apache.tika; | 2,560,644 |
public FlightInfo getExportedKeys(final TableRef tableRef, final CallOption... options) {
Objects.requireNonNull(tableRef.getTable(), "Table cannot be null.");
final CommandGetExportedKeys.Builder builder = CommandGetExportedKeys.newBuilder();
if (tableRef.getCatalog() != null) {
builder.setCatalo... | FlightInfo function(final TableRef tableRef, final CallOption... options) { Objects.requireNonNull(tableRef.getTable(), STR); final CommandGetExportedKeys.Builder builder = CommandGetExportedKeys.newBuilder(); if (tableRef.getCatalog() != null) { builder.setCatalog(tableRef.getCatalog()); } if (tableRef.getDbSchema() !... | /**
* Retrieves a description about the foreign key columns that reference the primary key columns of the given table.
*
* @param tableRef An object which hold info about catalog, dbSchema and table.
* @param options RPC-layer hints for this call.
* @return a FlightInfo object representing the stream(... | Retrieves a description about the foreign key columns that reference the primary key columns of the given table | getExportedKeys | {
"repo_name": "kou/arrow",
"path": "java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlClient.java",
"license": "apache-2.0",
"size": 24301
} | [
"com.google.protobuf.Any",
"java.util.Objects",
"org.apache.arrow.flight.CallOption",
"org.apache.arrow.flight.FlightDescriptor",
"org.apache.arrow.flight.FlightInfo",
"org.apache.arrow.flight.sql.impl.FlightSql",
"org.apache.arrow.flight.sql.util.TableRef"
] | import com.google.protobuf.Any; import java.util.Objects; import org.apache.arrow.flight.CallOption; import org.apache.arrow.flight.FlightDescriptor; import org.apache.arrow.flight.FlightInfo; import org.apache.arrow.flight.sql.impl.FlightSql; import org.apache.arrow.flight.sql.util.TableRef; | import com.google.protobuf.*; import java.util.*; import org.apache.arrow.flight.*; import org.apache.arrow.flight.sql.impl.*; import org.apache.arrow.flight.sql.util.*; | [
"com.google.protobuf",
"java.util",
"org.apache.arrow"
] | com.google.protobuf; java.util; org.apache.arrow; | 2,089,625 |
@JsonProperty("IP")
public String getIp() {
return this.ip;
} | @JsonProperty("IP") String function() { return this.ip; } | /**
* Gets the ip.
*
* @return the ip
*/ | Gets the ip | getIp | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "services/azure-media/src/main/java/com/microsoft/windowsazure/services/media/models/Ipv4.java",
"license": "apache-2.0",
"size": 1382
} | [
"org.codehaus.jackson.annotate.JsonProperty"
] | import org.codehaus.jackson.annotate.JsonProperty; | import org.codehaus.jackson.annotate.*; | [
"org.codehaus.jackson"
] | org.codehaus.jackson; | 1,455,798 |
if (cache == null) {
cache = new CommandCache(cachePath);
} else {
// reset cache to new file
cache = new CommandCache(cachePath);
}
return cache;
}
private CommandCache(String cachePath) {
if (cachePath == null) {
cachePath = System.getProperty("user.home") + "/nikobus.cache";
log.info(... | if (cache == null) { cache = new CommandCache(cachePath); } else { cache = new CommandCache(cachePath); } return cache; } private CommandCache(String cachePath) { if (cachePath == null) { cachePath = System.getProperty(STR) + STR; log.info(STR, cachePath); } path = cachePath; properties = new Properties(); try { File f... | /**
* Get the command cache at the specified location. If it doesn't exists, a
* new one is created.
*
* @param cachePath
* @return existing or new cache.
*/ | Get the command cache at the specified location. If it doesn't exists, a new one is created | getCache | {
"repo_name": "noushadali/openhab",
"path": "bundles/binding/org.openhab.binding.nikobus/src/main/java/org/openhab/binding/nikobus/internal/util/CommandCache.java",
"license": "gpl-3.0",
"size": 3865
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.Properties"
] | import java.io.File; import java.io.FileInputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,766,278 |
public String get_parameter(String name, @Optional double modifier)
{
if ("fontname".equals(name)) {
PDFFont font = _stream.getFont();
if (font != null)
return font.getFontName();
else
return null;
}
else
return null;
} | String function(String name, @Optional double modifier) { if (STR.equals(name)) { PDFFont font = _stream.getFont(); if (font != null) return font.getFontName(); else return null; } else return null; } | /**
* Returns the value for a parameter.
*/ | Returns the value for a parameter | get_parameter | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/quercus/lib/pdf/PDF.java",
"license": "gpl-2.0",
"size": 20638
} | [
"com.caucho.quercus.annotation.Optional"
] | import com.caucho.quercus.annotation.Optional; | import com.caucho.quercus.annotation.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,708,321 |
public ProtocolOnlineReviewDocumentBase getProtocolOnlineReviewDocument() {
return protocolOnlineReviewDocument;
} | ProtocolOnlineReviewDocumentBase function() { return protocolOnlineReviewDocument; } | /**
* Gets the protocolReviewDocument attribute.
* @return Returns the protocolReviewDocument.
*/ | Gets the protocolReviewDocument attribute | getProtocolOnlineReviewDocument | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/protocol/onlinereview/ProtocolOnlineReviewBase.java",
"license": "apache-2.0",
"size": 19952
} | [
"org.kuali.kra.protocol.ProtocolOnlineReviewDocumentBase"
] | import org.kuali.kra.protocol.ProtocolOnlineReviewDocumentBase; | import org.kuali.kra.protocol.*; | [
"org.kuali.kra"
] | org.kuali.kra; | 277,938 |
void setDevice(MDevice value); | void setDevice(MDevice value); | /**
* Sets the device to be deployed.
* @param value the new deployed device.
* @see #getDevice()
* @generated
*/ | Sets the device to be deployed | setDevice | {
"repo_name": "parraman/micobs",
"path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevmcad/MDeployedDevice.java",
"license": "epl-1.0",
"size": 2234
} | [
"es.uah.aut.srg.micobs.pdl.MDevice"
] | import es.uah.aut.srg.micobs.pdl.MDevice; | import es.uah.aut.srg.micobs.pdl.*; | [
"es.uah.aut"
] | es.uah.aut; | 2,858,394 |
Customer createCustomer(Customer customer); | Customer createCustomer(Customer customer); | /**
* Erzeugt einen neuen Benutzer im System.
*/ | Erzeugt einen neuen Benutzer im System | createCustomer | {
"repo_name": "Am3o/eShop",
"path": "Microservice/Authentication/src/main/java/de/hska/iwi/microservice/authentication/service/IAuthenticationServiceFacade.java",
"license": "apache-2.0",
"size": 2110
} | [
"de.hska.iwi.microservice.authentication.entity.Customer"
] | import de.hska.iwi.microservice.authentication.entity.Customer; | import de.hska.iwi.microservice.authentication.entity.*; | [
"de.hska.iwi"
] | de.hska.iwi; | 2,481,245 |
public Map<String, String> getBlockStorageIdMap() {
return blockStorageIdMap;
} | Map<String, String> function() { return blockStorageIdMap; } | /**
* returns map of blocklocation and storage id
* @return
*/ | returns map of blocklocation and storage id | getBlockStorageIdMap | {
"repo_name": "ksimar/incubator-carbondata",
"path": "hadoop/src/main/java/org/apache/carbondata/hadoop/CarbonInputSplit.java",
"license": "apache-2.0",
"size": 9592
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,755,160 |
@Test(expected = IndexOutOfBoundsException.class)
public void testCleanTable() {
indexTableModel.update(new ArrayList(), new ArrayList());
assertNull("The list should be empty!", indexTableModel.getAnime(0));
}//end of the method testCleanTable | @Test(expected = IndexOutOfBoundsException.class) void function() { indexTableModel.update(new ArrayList(), new ArrayList()); assertNull(STR, indexTableModel.getAnime(0)); } | /**
* Test if the empty tableModel returns null or thows exception
*/ | Test if the empty tableModel returns null or thows exception | testCleanTable | {
"repo_name": "jmayer13/COVA2",
"path": "src/test/java/cova2/view/tableModel/IndexTableModelTest.java",
"license": "gpl-3.0",
"size": 4117
} | [
"java.util.ArrayList",
"org.junit.Assert",
"org.junit.Test"
] | import java.util.ArrayList; import org.junit.Assert; import org.junit.Test; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 706,224 |
final SecurityProvider provider = createSecurityProvider(repo);
final ComponentInfo info = new ComponentInfo(SecurityProvider.class, getClassifier());
info.addAttribute(ComponentInfoAttributes.LEVEL, 1);
info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteSecurityProvider.class);
repo.re... | final SecurityProvider provider = createSecurityProvider(repo); final ComponentInfo info = new ComponentInfo(SecurityProvider.class, getClassifier()); info.addAttribute(ComponentInfoAttributes.LEVEL, 1); info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemoteSecurityProvider.class); repo.registerComponent(... | /**
* Initializes the security provider, setting up component information and REST.
* Override using {@link #createSecurityProvider(ComponentRepository)}.
*
* @param repo the component repository, not null
* @param configuration the remaining configuration, not null
*/ | Initializes the security provider, setting up component information and REST. Override using <code>#createSecurityProvider(ComponentRepository)</code> | init | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-Component/src/main/java/com/opengamma/component/factory/provider/SecurityProviderComponentFactory.java",
"license": "apache-2.0",
"size": 10491
} | [
"com.opengamma.component.ComponentInfo",
"com.opengamma.component.factory.ComponentInfoAttributes",
"com.opengamma.provider.security.SecurityProvider",
"com.opengamma.provider.security.impl.DataSecurityProviderResource",
"com.opengamma.provider.security.impl.RemoteSecurityProvider"
] | import com.opengamma.component.ComponentInfo; import com.opengamma.component.factory.ComponentInfoAttributes; import com.opengamma.provider.security.SecurityProvider; import com.opengamma.provider.security.impl.DataSecurityProviderResource; import com.opengamma.provider.security.impl.RemoteSecurityProvider; | import com.opengamma.component.*; import com.opengamma.component.factory.*; import com.opengamma.provider.security.*; import com.opengamma.provider.security.impl.*; | [
"com.opengamma.component",
"com.opengamma.provider"
] | com.opengamma.component; com.opengamma.provider; | 2,286,464 |
public InputStream getInputStream() {
if (isLiveOrCompiled())
if(!this.getCapability(ALLOW_URL_READ))
throw new CapabilityNotSetException(J3dI18N.getString("MediaContainer4"));
return ((MediaContainerRetained)this.retained).getInputStream();
} | InputStream function() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_URL_READ)) throw new CapabilityNotSetException(J3dI18N.getString(STR)); return ((MediaContainerRetained)this.retained).getInputStream(); } | /**
* Retrieve Input Stream.
* @return reference to input stream containing sound data
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene graph
* @since Java 3D 1.2
*/ | Retrieve Input Stream | getInputStream | {
"repo_name": "philipwhiuk/j3d-core",
"path": "src/classes/share/javax/media/j3d/MediaContainer.java",
"license": "gpl-2.0",
"size": 13363
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,784,990 |
@Override
public CacheServer[] getCacheServers(String durableClientId) throws AdminException {
Collection serversForDurableClient = new ArrayList();
CacheServer[] servers = getCacheServers();
for (int i = 0; i < servers.length; i++) {
RemoteApplicationVM vm = (RemoteApplicationVM) ((CacheServerIm... | CacheServer[] function(String durableClientId) throws AdminException { Collection serversForDurableClient = new ArrayList(); CacheServer[] servers = getCacheServers(); for (int i = 0; i < servers.length; i++) { RemoteApplicationVM vm = (RemoteApplicationVM) ((CacheServerImpl) servers[i]).getGemFireVM(); if (vm != null ... | /**
* Returns all the cache server members of the distributed system which are hosting a client queue
* for the particular durable-client having the given durableClientId
*
* @param durableClientId - durable-id of the client
* @return array of CacheServer(s) having the queue for the durable client
*
... | Returns all the cache server members of the distributed system which are hosting a client queue for the particular durable-client having the given durableClientId | getCacheServers | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java",
"license": "apache-2.0",
"size": 81159
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.apache.geode.admin.AdminException",
"org.apache.geode.admin.CacheServer",
"org.apache.geode.internal.admin.remote.RemoteApplicationVM"
] | import java.util.ArrayList; import java.util.Collection; import org.apache.geode.admin.AdminException; import org.apache.geode.admin.CacheServer; import org.apache.geode.internal.admin.remote.RemoteApplicationVM; | import java.util.*; import org.apache.geode.admin.*; import org.apache.geode.internal.admin.remote.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 921,876 |
CalendarDateSeries<Double> getRawHistoricalValues(); | CalendarDateSeries<Double> getRawHistoricalValues(); | /**
* Uncoordinated prices/index values
*/ | Uncoordinated prices/index values | getRawHistoricalValues | {
"repo_name": "optimatika/ojAlgo-finance",
"path": "src/main/java/org/ojalgo/finance/business/FinancialMarket.java",
"license": "mit",
"size": 15067
} | [
"org.ojalgo.series.CalendarDateSeries"
] | import org.ojalgo.series.CalendarDateSeries; | import org.ojalgo.series.*; | [
"org.ojalgo.series"
] | org.ojalgo.series; | 2,110,002 |
public void setJobListener(final JobListener jl)
{
jobListener = jl;
} | void function(final JobListener jl) { jobListener = jl; } | /**
* Sets a listener to be invoked immediately after this map op's build()
* has executed.
*
* @param jl
*/ | Sets a listener to be invoked immediately after this map op's build() has executed | setJobListener | {
"repo_name": "bradh/mrgeo",
"path": "mrgeo-core/src/main/java/org/mrgeo/mapalgebra/MapOp.java",
"license": "apache-2.0",
"size": 20082
} | [
"org.mrgeo.mapreduce.job.JobListener"
] | import org.mrgeo.mapreduce.job.JobListener; | import org.mrgeo.mapreduce.job.*; | [
"org.mrgeo.mapreduce"
] | org.mrgeo.mapreduce; | 562,764 |
Reader tryGetReader(File cacheDir, HttpServletRequest request, MutableObject<SourceMap> sourceMap) {
Reader reader = null;
if (content != null || filename != null) {
try {
reader = getReader(cacheDir, request, sourceMap);
} catch (IOException e) {
// If we get a FileNotFoundException,... | Reader tryGetReader(File cacheDir, HttpServletRequest request, MutableObject<SourceMap> sourceMap) { Reader reader = null; if (content != null filename != null) { try { reader = getReader(cacheDir, request, sourceMap); } catch (IOException e) { if (log.isLoggable(Level.INFO)) log.info( MessageFormat.format( Messages.Mo... | /**
* A version of getReader that can fail, but won't throw
* @param cacheDir
* The location of the cache directory on the server
* @param request
* the request object
* @param sourceMap
* Output - a reference to the source map for the module associated with
* ... | A version of getReader that can fail, but won't throw | tryGetReader | {
"repo_name": "OpenNTF/JavascriptAggregator",
"path": "jaggr-core/src/main/java/com/ibm/jaggr/core/impl/module/ModuleImpl.java",
"license": "apache-2.0",
"size": 34275
} | [
"com.ibm.jaggr.core.cache.ICacheManager",
"com.ibm.jaggr.core.modulebuilder.SourceMap",
"java.io.File",
"java.io.IOException",
"java.io.Reader",
"java.text.MessageFormat",
"java.util.concurrent.ExecutorService",
"java.util.logging.Level",
"javax.servlet.http.HttpServletRequest",
"org.apache.common... | import com.ibm.jaggr.core.cache.ICacheManager; import com.ibm.jaggr.core.modulebuilder.SourceMap; import java.io.File; import java.io.IOException; import java.io.Reader; import java.text.MessageFormat; import java.util.concurrent.ExecutorService; import java.util.logging.Level; import javax.servlet.http.HttpServletRequ... | import com.ibm.jaggr.core.cache.*; import com.ibm.jaggr.core.modulebuilder.*; import java.io.*; import java.text.*; import java.util.concurrent.*; import java.util.logging.*; import javax.servlet.http.*; import org.apache.commons.lang3.mutable.*; | [
"com.ibm.jaggr",
"java.io",
"java.text",
"java.util",
"javax.servlet",
"org.apache.commons"
] | com.ibm.jaggr; java.io; java.text; java.util; javax.servlet; org.apache.commons; | 2,528,651 |
@Override
@SuppressWarnings("unchecked")
public void keys(List<T> list) {
list.clear();
for (int i = table.length; i-- > 0;) {
if (state[i] == FULL) {
list.add((T)table[i]);
}
}
}
/**
* Fills all pairs satisfying a given condition into the specified lists. Fills into the l... | @SuppressWarnings(STR) void function(List<T> list) { list.clear(); for (int i = table.length; i-- > 0;) { if (state[i] == FULL) { list.add((T)table[i]); } } } /** * Fills all pairs satisfying a given condition into the specified lists. Fills into the lists, starting at index 0. * After this call returns the specified l... | /**
* Fills all keys contained in the receiver into the specified list. Fills the list, starting at index 0. After this
* call returns the specified list has a new size that equals <tt>this.size()</tt>.
* This method can be used
* to iterate over the keys of the receiver.
*
* @param list the list to ... | Fills all keys contained in the receiver into the specified list. Fills the list, starting at index 0. After this call returns the specified list has a new size that equals this.size(). This method can be used to iterate over the keys of the receiver | keys | {
"repo_name": "genericDataCompany/hsandbox",
"path": "common/mahout-distribution-0.7-hadoop1/math/target/generated-sources/org/apache/mahout/math/map/OpenObjectIntHashMap.java",
"license": "apache-2.0",
"size": 19799
} | [
"java.util.List",
"org.apache.mahout.math.function.ObjectIntProcedure"
] | import java.util.List; import org.apache.mahout.math.function.ObjectIntProcedure; | import java.util.*; import org.apache.mahout.math.function.*; | [
"java.util",
"org.apache.mahout"
] | java.util; org.apache.mahout; | 1,550,804 |
public void setTextVAlign(final VerticalAlign newTextVAlign) {
this.textVAlign = newTextVAlign;
}
| void function(final VerticalAlign newTextVAlign) { this.textVAlign = newTextVAlign; } | /**
* set text vertical alignment.
* @param newTextVAlign text vertical alignment
*/ | set text vertical alignment | setTextVAlign | {
"repo_name": "xranby/nifty-gui",
"path": "nifty-core/src/main/java/de/lessvoid/nifty/elements/render/TextRenderer.java",
"license": "bsd-2-clause",
"size": 15014
} | [
"de.lessvoid.nifty.layout.align.VerticalAlign"
] | import de.lessvoid.nifty.layout.align.VerticalAlign; | import de.lessvoid.nifty.layout.align.*; | [
"de.lessvoid.nifty"
] | de.lessvoid.nifty; | 1,363,882 |
public FlowElementInput getElementPort() {
return this.input;
} | FlowElementInput function() { return this.input; } | /**
* Returns the corresponding element port.
* @return the corresponding element port
*/ | Returns the corresponding element port | getElementPort | {
"repo_name": "cocoatomo/asakusafw",
"path": "mapreduce/compiler/core/src/main/java/com/asakusafw/compiler/flow/plan/FlowBlock.java",
"license": "apache-2.0",
"size": 41698
} | [
"com.asakusafw.vocabulary.flow.graph.FlowElementInput"
] | import com.asakusafw.vocabulary.flow.graph.FlowElementInput; | import com.asakusafw.vocabulary.flow.graph.*; | [
"com.asakusafw.vocabulary"
] | com.asakusafw.vocabulary; | 2,651,161 |
public void updateGroup(
com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest request,
io.grpc.stub.StreamObserver<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup>
responseObserver) {
asyncUnimplementedUnaryCall(getUpdateGroupMethodHelper(), responseObserve... | void function( com.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest request, io.grpc.stub.StreamObserver<com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup> responseObserver) { asyncUnimplementedUnaryCall(getUpdateGroupMethodHelper(), responseObserver); } | /**
*
*
* <pre>
* Replace the data for the specified group.
* Fails if the group does not exist.
* </pre>
*/ | <code> Replace the data for the specified group. Fails if the group does not exist. </code> | updateGroup | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-error-reporting-v1beta1/src/main/java/com/google/devtools/clouderrorreporting/v1beta1/ErrorGroupServiceGrpc.java",
"license": "apache-2.0",
"size": 18645
} | [
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,876,658 |
public boolean canAddNode(
IUserLayoutNodeDescription node, String parentId, String nextSiblingId)
throws PortalException; | boolean function( IUserLayoutNodeDescription node, String parentId, String nextSiblingId) throws PortalException; | /**
* Test if a particular node can be added at a given location.
*
* @param node an <code>UserLayoutNodeDescription</code> value describing the node to be added.
* @param parentId a <code>String</code> id of a parent to which the node to be added.
* @param nextSiblingId a <code>String</code> i... | Test if a particular node can be added at a given location | canAddNode | {
"repo_name": "jl1955/uPortal5",
"path": "uPortal-core/src/main/java/org/apereo/portal/layout/IUserLayoutManager.java",
"license": "apache-2.0",
"size": 12317
} | [
"org.apereo.portal.PortalException",
"org.apereo.portal.layout.node.IUserLayoutNodeDescription"
] | import org.apereo.portal.PortalException; import org.apereo.portal.layout.node.IUserLayoutNodeDescription; | import org.apereo.portal.*; import org.apereo.portal.layout.node.*; | [
"org.apereo.portal"
] | org.apereo.portal; | 1,011,951 |
void delete(String resourceGroupName, String clusterName, String managedPrivateEndpointName, Context context); | void delete(String resourceGroupName, String clusterName, String managedPrivateEndpointName, Context context); | /**
* Deletes a managed private endpoint.
*
* @param resourceGroupName The name of the resource group containing the Kusto cluster.
* @param clusterName The name of the Kusto cluster.
* @param managedPrivateEndpointName The name of the managed private endpoint.
* @param context The context... | Deletes a managed private endpoint | delete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ManagedPrivateEndpoints.java",
"license": "mit",
"size": 9374
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,889,640 |
public void marshal(java.io.Writer out)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
Marshaller.marshal(this, out);
} //-- void marshal(java.io.Writer) | void function(java.io.Writer out) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException { Marshaller.marshal(this, out); } | /**
* Method marshal
*
* @param out
*/ | Method marshal | marshal | {
"repo_name": "brandt/GridSphere",
"path": "src/org/gridsphere/portletcontainer/impl/descriptor/PreferencesValidator.java",
"license": "apache-2.0",
"size": 2439
} | [
"org.exolab.castor.xml.Marshaller"
] | import org.exolab.castor.xml.Marshaller; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 481,312 |
private void readInnerClassesAttribute(int attribute_length) throws InvalidClassFileFormatException, IOException {
int number_of_classes = in.readUnsignedShort();
if (attribute_length != number_of_classes * 8) {
throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseE... | void function(int attribute_length) throws InvalidClassFileFormatException, IOException { int number_of_classes = in.readUnsignedShort(); if (attribute_length != number_of_classes * 8) { throw new InvalidClassFileFormatException(expectedClassDescriptor, codeBaseEntry); } for (int i = 0; i < number_of_classes; i++) { in... | /**
* Read an InnerClasses attribute.
*
* @param attribute_length
* length of attribute (excluding first 6 bytes)
* @throws InvalidClassFileFormatException
* @throws IOException
*/ | Read an InnerClasses attribute | readInnerClassesAttribute | {
"repo_name": "jesusaplsoft/FindAllBugs",
"path": "findbugs/src/java/edu/umd/cs/findbugs/classfile/engine/ClassParser.java",
"license": "gpl-2.0",
"size": 20269
} | [
"edu.umd.cs.findbugs.classfile.InvalidClassFileFormatException",
"java.io.IOException"
] | import edu.umd.cs.findbugs.classfile.InvalidClassFileFormatException; import java.io.IOException; | import edu.umd.cs.findbugs.classfile.*; import java.io.*; | [
"edu.umd.cs",
"java.io"
] | edu.umd.cs; java.io; | 1,177,492 |
public void listNotificationChannels(com.google.monitoring.v3.ListNotificationChannelsRequest request,
io.grpc.stub.StreamObserver<com.google.monitoring.v3.ListNotificationChannelsResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getListNotificationChannelsMethodHelper(), ge... | void function(com.google.monitoring.v3.ListNotificationChannelsRequest request, io.grpc.stub.StreamObserver<com.google.monitoring.v3.ListNotificationChannelsResponse> responseObserver) { asyncUnaryCall( getChannel().newCall(getListNotificationChannelsMethodHelper(), getCallOptions()), request, responseObserver); } | /**
* <pre>
* Lists the notification channels that have been created for the project.
* </pre>
*/ | <code> Lists the notification channels that have been created for the project. </code> | listNotificationChannels | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-monitoring-v3/src/main/java/com/google/monitoring/v3/NotificationChannelServiceGrpc.java",
"license": "bsd-3-clause",
"size": 71600
} | [
"io.grpc.stub.ClientCalls",
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 251,677 |
private ResultSet executeSimpleQuery(Session session, String statement, int offset, int limit) throws RepositoryException {
log.debug("executeSimpleQuery({}, {}, {}, {})", new Object[] { session, statement, offset, limit });
ResultSet rs = new ResultSet();
if (statement != null && !statement.equals("")) {
... | ResultSet function(Session session, String statement, int offset, int limit) throws RepositoryException { log.debug(STR, new Object[] { session, statement, offset, limit }); ResultSet rs = new ResultSet(); if (statement != null && !statement.equals(STRpath:STRpath:\"/" + Repository.ROOT + "\" STRlimit:STRlimit:STR..STR... | /**
* Execute simple query
*/ | Execute simple query | executeSimpleQuery | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/module/jcr/JcrSearchModule.java",
"license": "gpl-3.0",
"size": 33721
} | [
"com.openkm.bean.Repository",
"com.openkm.bean.ResultSet",
"com.openkm.core.RepositoryException",
"javax.jcr.Session"
] | import com.openkm.bean.Repository; import com.openkm.bean.ResultSet; import com.openkm.core.RepositoryException; import javax.jcr.Session; | import com.openkm.bean.*; import com.openkm.core.*; import javax.jcr.*; | [
"com.openkm.bean",
"com.openkm.core",
"javax.jcr"
] | com.openkm.bean; com.openkm.core; javax.jcr; | 1,406,471 |
private Stack<Resource> getResourceStack() {
Stack<Resource> v = new Stack<>();
for (IStorageIterator it = storage.iterate(); it.hasMore(); ) {
Resource r = (Resource)it.nextRecord();
v.push(r);
}
return v;
} | Stack<Resource> function() { Stack<Resource> v = new Stack<>(); for (IStorageIterator it = storage.iterate(); it.hasMore(); ) { Resource r = (Resource)it.nextRecord(); v.push(r); } return v; } | /**
* Get the all the resources in this table's storage.
*/ | Get the all the resources in this table's storage | getResourceStack | {
"repo_name": "dimagi/commcare",
"path": "src/main/java/org/commcare/resources/model/ResourceTable.java",
"license": "apache-2.0",
"size": 49850
} | [
"java.util.Stack",
"org.javarosa.core.services.storage.IStorageIterator"
] | import java.util.Stack; import org.javarosa.core.services.storage.IStorageIterator; | import java.util.*; import org.javarosa.core.services.storage.*; | [
"java.util",
"org.javarosa.core"
] | java.util; org.javarosa.core; | 2,355,506 |
public boolean addRequest(final DownloadRequest request)
throws NullPointerException {
// It is key to keep the map and queue in lock step
if (request == null) {
// We can't add a null entry into the queue so let's throw what the underlying
... | boolean function(final DownloadRequest request) throws NullPointerException { if (request == null) { throw new NullPointerException(); } final long requestId = request.mAttachmentId; if (requestId < 0) { LogUtils.d(LOG_TAG, STR); return false; } debugTrace(STR, requestId); synchronized (mLock) { final boolean exists = ... | /**
* This function will add the request to our collections if it does not already
* exist. If it does exist, the function will silently succeed.
* @param request The {@link DownloadRequest} that should be added to our queue
* @return true if it was added (or already exists), false o... | This function will add the request to our collections if it does not already exist. If it does exist, the function will silently succeed | addRequest | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/Email/provider_src/com/android/email/service/AttachmentService.java",
"license": "gpl-3.0",
"size": 66935
} | [
"com.android.mail.utils.LogUtils"
] | import com.android.mail.utils.LogUtils; | import com.android.mail.utils.*; | [
"com.android.mail"
] | com.android.mail; | 1,077,102 |
private void createContents() {
this.shell = new Shell(this.getParent(), this.getStyle());
this.shell.setText(this.getText());
this.shell.setLayout(new GridLayout(1, false));
Composite select = new Composite(this.shell, SWT.NONE);
select.setLayout(new RowLayout());
s... | void function() { this.shell = new Shell(this.getParent(), this.getStyle()); this.shell.setText(this.getText()); this.shell.setLayout(new GridLayout(1, false)); Composite select = new Composite(this.shell, SWT.NONE); select.setLayout(new RowLayout()); select.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); this.s... | /**
* Create contents of the dialog.
*/ | Create contents of the dialog | createContents | {
"repo_name": "asukaceres/logbook_kai",
"path": "main/logbook/gui/CalcExpDialog.java",
"license": "mit",
"size": 16204
} | [
"java.util.Map",
"org.eclipse.swt.layout.FillLayout",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.layout.RowLayout",
"org.eclipse.swt.widgets.Button",
"org.eclipse.swt.widgets.Combo",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label",
... | import java.util.Map; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.ecl... | import java.util.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 513,712 |
List<Attribute> getAttributes(PerunSession sess, Member member) throws InternalErrorException; | List<Attribute> getAttributes(PerunSession sess, Member member) throws InternalErrorException; | /**
* Get all <b>non-empty</b> attributes associated with the member.
*
* @param sess perun session
* @param member to get the attributes from
* @return list of attributes
*
* @throws InternalErrorException if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptio... | Get all non-empty attributes associated with the member | getAttributes | {
"repo_name": "jirmauritz/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 193360
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,296,442 |
@NonNull
Single<Boolean> delete(@NonNull final T id); | Single<Boolean> delete(@NonNull final T id); | /**
* The standard store interface for deleting a singular data item. Takes an identifier to be
* deleted, and returns Single that emits when the operation has been executed.
*
* @param id Id of the item to delete from the store.
* @return Single that emits true if value was deleted, and false ... | The standard store interface for deleting a singular data item. Takes an identifier to be deleted, and returns Single that emits when the operation has been executed | delete | {
"repo_name": "apoi/reark",
"path": "reark/src/main/java/io/reark/reark/data/stores/interfaces/StoreDeleteInterface.java",
"license": "mit",
"size": 1902
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 331,096 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.