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 List<AbstractFile> getVirtualDirectoryParents(List<LayoutFile> layoutFiles) throws TskCoreException {
// Keep track of which parent IDs we've already looked at to avoid unneccessary database lookups
Set<Long> processedParentIds = new HashSet<>();
// For each layout file, go ... | List<AbstractFile> function(List<LayoutFile> layoutFiles) throws TskCoreException { Set<Long> processedParentIds = new HashSet<>(); List<AbstractFile> parentFiles = new ArrayList<>(); for (LayoutFile file : layoutFiles) { AbstractFile currentFile = file; while (currentFile.getParentId().isPresent() && !processedParentI... | /**
* Return a list of all virtual directory parents of the list of carved files.
* These directories were likely just created while adding the carved files to the
* case database. The directories will include the main "$CarvedFiles" folder and
* any subfolders.
*
* @param layoutFiles Lis... | Return a list of all virtual directory parents of the list of carved files. These directories were likely just created while adding the carved files to the case database. The directories will include the main "$CarvedFiles" folder and any subfolders | getVirtualDirectoryParents | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/photoreccarver/PhotoRecCarverFileIngestModule.java",
"license": "apache-2.0",
"size": 34068
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.Content",
"org.sleuthkit.datamodel.DataSource",
"org.sleuthkit.datamodel.LayoutFile",
"org.sleuthkit.datamodel.TskCoreException",
"org.sleuthkit.datamodel... | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.DataSource; import org.sleuthkit.datamodel.LayoutFile; import org.sleuthkit.datamodel.TskCoreException; i... | import java.util.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 2,183,804 |
public void setGroupLights(Group group, List<HueObject> lights) throws IOException, ApiException {
requireAuthentication();
if (!group.isModifiable()) {
throw new IllegalArgumentException("Group cannot be modified");
}
String body = gson.toJson(new SetAttributesRequest(... | void function(Group group, List<HueObject> lights) throws IOException, ApiException { requireAuthentication(); if (!group.isModifiable()) { throw new IllegalArgumentException(STR); } String body = gson.toJson(new SetAttributesRequest(lights)); Result result = http.put(getRelativeURL(STR + enc(group.getId())), body); ha... | /**
* Changes the lights in the group.
*
* @param group group
* @param lights new lights [1..16]
* @throws UnauthorizedException thrown if the user no longer exists
* @throws EntityNotAvailableException thrown if the specified group no longer exists
*/ | Changes the lights in the group | setGroupLights | {
"repo_name": "MikeJMajor/openhab2-addons-dlinksmarthome",
"path": "bundles/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/HueBridge.java",
"license": "epl-1.0",
"size": 41678
} | [
"java.io.IOException",
"java.util.List",
"org.openhab.binding.hue.internal.HttpClient",
"org.openhab.binding.hue.internal.exceptions.ApiException"
] | import java.io.IOException; import java.util.List; import org.openhab.binding.hue.internal.HttpClient; import org.openhab.binding.hue.internal.exceptions.ApiException; | import java.io.*; import java.util.*; import org.openhab.binding.hue.internal.*; import org.openhab.binding.hue.internal.exceptions.*; | [
"java.io",
"java.util",
"org.openhab.binding"
] | java.io; java.util; org.openhab.binding; | 2,187,284 |
private static void deleteOldFeedItems(AdWordsServices adWordsServices, AdWordsSession session,
Set<Long> feedItemIds, Feed feed) throws Exception {
// Get the FeedItemService.
FeedItemServiceInterface feedItemService =
adWordsServices.get(session, FeedItemServiceInterface.class);
if (feedI... | static void function(AdWordsServices adWordsServices, AdWordsSession session, Set<Long> feedItemIds, Feed feed) throws Exception { FeedItemServiceInterface feedItemService = adWordsServices.get(session, FeedItemServiceInterface.class); if (feedItemIds.isEmpty()) { return; } List<FeedItemOperation> operations = Lists.ne... | /**
* Deletes the old feed items for which extension settings have been created.
*/ | Deletes the old feed items for which extension settings have been created | deleteOldFeedItems | {
"repo_name": "gawkermedia/googleads-java-lib",
"path": "examples/adwords_axis/src/main/java/adwords/axis/v201601/migration/MigrateToExtensionSettings.java",
"license": "apache-2.0",
"size": 23065
} | [
"com.google.api.ads.adwords.axis.factory.AdWordsServices",
"com.google.api.ads.adwords.axis.v201601.cm.Feed",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItem",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItemOperation",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItemServiceInterface",
"com.g... | import com.google.api.ads.adwords.axis.factory.AdWordsServices; import com.google.api.ads.adwords.axis.v201601.cm.Feed; import com.google.api.ads.adwords.axis.v201601.cm.FeedItem; import com.google.api.ads.adwords.axis.v201601.cm.FeedItemOperation; import com.google.api.ads.adwords.axis.v201601.cm.FeedItemServiceInterf... | import com.google.api.ads.adwords.axis.factory.*; import com.google.api.ads.adwords.axis.v201601.cm.*; import com.google.api.ads.adwords.lib.client.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.api",
"com.google.common",
"java.util"
] | com.google.api; com.google.common; java.util; | 1,439,312 |
public List<Partition> getPartitionsViaSqlFilter(
String dbName, String tblName, List<String> partNames) throws MetaException {
if (partNames.isEmpty()) {
return new ArrayList<Partition>();
}
return getPartitionsViaSqlFilterInternal(dbName, tblName, null,
"\"PARTITIONS\".\"PART_NAME\" ... | List<Partition> function( String dbName, String tblName, List<String> partNames) throws MetaException { if (partNames.isEmpty()) { return new ArrayList<Partition>(); } return getPartitionsViaSqlFilterInternal(dbName, tblName, null, "\"PARTITIONS\".\"PART_NAME\STR + makeParams(partNames.size()) + ")", partNames, new Arr... | /**
* Gets partitions by using direct SQL queries.
* Note that batching is not needed for this method - list of names implies the batch size;
* @param dbName Metastore db name.
* @param tblName Metastore table name.
* @param partNames Partition names to get.
* @return List of partitions.
*/ | Gets partitions by using direct SQL queries. Note that batching is not needed for this method - list of names implies the batch size | getPartitionsViaSqlFilter | {
"repo_name": "cloudera/recordservice",
"path": "thirdparty/hive-1.1.0-cdh5.9.0-SNAPSHOT/src/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java",
"license": "apache-2.0",
"size": 66747
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hive.metastore.api.MetaException",
"org.apache.hadoop.hive.metastore.api.Partition"
] | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Partition; | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,550,705 |
public void writeOptionalNamedWriteable(@Nullable NamedWriteable namedWriteable) throws IOException {
if (namedWriteable == null) {
writeBoolean(false);
} else {
writeBoolean(true);
writeNamedWriteable(namedWriteable);
}
} | void function(@Nullable NamedWriteable namedWriteable) throws IOException { if (namedWriteable == null) { writeBoolean(false); } else { writeBoolean(true); writeNamedWriteable(namedWriteable); } } | /**
* Write an optional {@link NamedWriteable} to the stream.
*/ | Write an optional <code>NamedWriteable</code> to the stream | writeOptionalNamedWriteable | {
"repo_name": "strahanjen/strahanjen.github.io",
"path": "elasticsearch-master/core/src/main/java/org/elasticsearch/common/io/stream/StreamOutput.java",
"license": "bsd-3-clause",
"size": 30518
} | [
"java.io.IOException",
"org.elasticsearch.common.Nullable"
] | import java.io.IOException; import org.elasticsearch.common.Nullable; | import java.io.*; import org.elasticsearch.common.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 705,621 |
public void testCertificateFactory06() throws CertificateException {
if (!X509Support) {
fail(NotSupportMsg);
return;
}
Provider provider = null;
for (int i = 0; i < validValues.length; i++) {
try {
CertificateFactory.getInstance(va... | void function() throws CertificateException { if (!X509Support) { fail(NotSupportMsg); return; } Provider provider = null; for (int i = 0; i < validValues.length; i++) { try { CertificateFactory.getInstance(validValues[i], provider); fail(STR); } catch (IllegalArgumentException e) { } } } | /**
* Test for <code>getInstance(String type, Provider provider)</code>
* method
* Assertion: throws IllegalArgumentException when provider is null
*/ | Test for <code>getInstance(String type, Provider provider)</code> method Assertion: throws IllegalArgumentException when provider is null | testCertificateFactory06 | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/CertificateFactory1Test.java",
"license": "gpl-3.0",
"size": 26047
} | [
"java.security.Provider",
"java.security.cert.CertificateException",
"java.security.cert.CertificateFactory"
] | import java.security.Provider; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 1,569,500 |
public void testGetPropertyDotDotSlashName() throws RepositoryException, NotExecutableException {
Node parent;
try {
parent = testRootNode.getParent();
} catch (Exception e) {
throw new NotExecutableException();
}
Property pt = parent.getProperty(jcrP... | void function() throws RepositoryException, NotExecutableException { Node parent; try { parent = testRootNode.getParent(); } catch (Exception e) { throw new NotExecutableException(); } Property pt = parent.getProperty(jcrPrimaryType); String otherRelPath = DOTDOT + "/" + jcrPrimaryType; assertTrue(pt.isSame(testRootNod... | /**
* <code>Node.getProperty("../jcr:primaryType") </code> applied to any
* test node must return the same Property as
* {@link Node#getProperty(String) Node.getParent().getProperty("jcr:primaryType")}.
*
* @throws RepositoryException
* @throws NotExecutableException if the parent cannot b... | <code>Node.getProperty("../jcr:primaryType") </code> applied to any test node must return the same Property as <code>Node#getProperty(String) Node.getParent().getProperty("jcr:primaryType")</code> | testGetPropertyDotDotSlashName | {
"repo_name": "tripodsan/jackrabbit",
"path": "jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java",
"license": "apache-2.0",
"size": 8477
} | [
"javax.jcr.Node",
"javax.jcr.Property",
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.test.NotExecutableException"
] | import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.RepositoryException; import org.apache.jackrabbit.test.NotExecutableException; | import javax.jcr.*; import org.apache.jackrabbit.test.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 1,213,402 |
public BigDecimal calculate(List<BigDecimal> list, double[] weights, MathContext mc) {
if(list.size() == 0) {
return new BigDecimal(0);
}
BigDecimal sum = new BigDecimal(0);
BigDecimal sumSquares = new BigDecimal(0);
for(int i = 0; i < list.size(); i++) {
... | BigDecimal function(List<BigDecimal> list, double[] weights, MathContext mc) { if(list.size() == 0) { return new BigDecimal(0); } BigDecimal sum = new BigDecimal(0); BigDecimal sumSquares = new BigDecimal(0); for(int i = 0; i < list.size(); i++) { BigDecimal value = list.get(i).multiply(BigDecimal.valueOf(weights[i]), ... | /**
* Calculates the weighted contra-harmonic mean.
* @param List<BigDecimal> the list
* @param double[] weights for the data set
* @param MathContext the math context
* @return the result
*/ | Calculates the weighted contra-harmonic mean | calculate | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigintegerflex/stat/ContraharmonicMeanBigInteger.java",
"license": "apache-2.0",
"size": 8236
} | [
"java.math.BigDecimal",
"java.math.MathContext",
"java.util.List"
] | import java.math.BigDecimal; import java.math.MathContext; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,093,362 |
private int dispatch(CommandLine cmd, Options opts)
throws Exception {
Command dbCmd = null;
try {
if (cmd.hasOption(DiskBalancerCLI.PLAN)) {
dbCmd = new PlanCommand(getConf(), printStream);
}
if (cmd.hasOption(DiskBalancerCLI.EXECUTE)) {
dbCmd = new ExecuteCommand(get... | int function(CommandLine cmd, Options opts) throws Exception { Command dbCmd = null; try { if (cmd.hasOption(DiskBalancerCLI.PLAN)) { dbCmd = new PlanCommand(getConf(), printStream); } if (cmd.hasOption(DiskBalancerCLI.EXECUTE)) { dbCmd = new ExecuteCommand(getConf()); } if (cmd.hasOption(DiskBalancerCLI.QUERY)) { dbCm... | /**
* Dispatches calls to the right command Handler classes.
*
* @param cmd - CommandLine
* @param opts options of command line
* @param out the output stream used for printing
*/ | Dispatches calls to the right command Handler classes | dispatch | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DiskBalancerCLI.java",
"license": "apache-2.0",
"size": 15442
} | [
"org.apache.commons.cli.CommandLine",
"org.apache.commons.cli.Options",
"org.apache.hadoop.hdfs.server.diskbalancer.command.CancelCommand",
"org.apache.hadoop.hdfs.server.diskbalancer.command.Command",
"org.apache.hadoop.hdfs.server.diskbalancer.command.ExecuteCommand",
"org.apache.hadoop.hdfs.server.disk... | import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.apache.hadoop.hdfs.server.diskbalancer.command.CancelCommand; import org.apache.hadoop.hdfs.server.diskbalancer.command.Command; import org.apache.hadoop.hdfs.server.diskbalancer.command.ExecuteCommand; import org.apache.hadoop... | import org.apache.commons.cli.*; import org.apache.hadoop.hdfs.server.diskbalancer.command.*; | [
"org.apache.commons",
"org.apache.hadoop"
] | org.apache.commons; org.apache.hadoop; | 513,325 |
public MailSessionType<SessionBeanType<T>> createMailSession()
{
return new MailSessionTypeImpl<SessionBeanType<T>>(this, "mail-session", childNode);
} | MailSessionType<SessionBeanType<T>> function() { return new MailSessionTypeImpl<SessionBeanType<T>>(this, STR, childNode); } | /**
* Creates a new <code>mail-session</code> element
* @return the new created instance of <code>MailSessionType<SessionBeanType<T>></code>
*/ | Creates a new <code>mail-session</code> element | createMailSession | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar32/SessionBeanTypeImpl.java",
"license": "epl-1.0",
"size": 107840
} | [
"org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType",
"org.jboss.shrinkwrap.descriptor.api.javaee7.MailSessionType",
"org.jboss.shrinkwrap.descriptor.impl.javaee7.MailSessionTypeImpl"
] | import org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType; import org.jboss.shrinkwrap.descriptor.api.javaee7.MailSessionType; import org.jboss.shrinkwrap.descriptor.impl.javaee7.MailSessionTypeImpl; | import org.jboss.shrinkwrap.descriptor.api.ejbjar32.*; import org.jboss.shrinkwrap.descriptor.api.javaee7.*; import org.jboss.shrinkwrap.descriptor.impl.javaee7.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,761,693 |
public boolean isVariableArity() {
for (Modifier m : modifiers) {
if (m instanceof Modifier.VarArgs) {
return true;
}
}
return false;
}
}
public static class JavaConstructor extends JavaMethod {
public JavaConstructor(List<Modifier> modifiers, String name,
List<JavaPa... | boolean function() { for (Modifier m : modifiers) { if (m instanceof Modifier.VarArgs) { return true; } } return false; } } public static class JavaConstructor extends JavaMethod { public JavaConstructor(List<Modifier> modifiers, String name, List<JavaParameter> parameters, boolean varargs, List<Type.Variable> typePara... | /**
* Check whether this method has varargs
*/ | Check whether this method has varargs | isVariableArity | {
"repo_name": "DavePearce/jkit",
"path": "jkit/java/tree/Decl.java",
"license": "gpl-2.0",
"size": 17063
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 601,114 |
public void addCRL(X509CRLHolder crl)
{
crls.add(crl.toASN1Structure());
} | void function(X509CRLHolder crl) { crls.add(crl.toASN1Structure()); } | /**
* Add a CRL to the CRL set to be included with the generated SignedData message.
*
* @param crl the CRL to be included.
*/ | Add a CRL to the CRL set to be included with the generated SignedData message | addCRL | {
"repo_name": "sake/bouncycastle-java",
"path": "j2me/org/bouncycastle/cms/CMSSignedGenerator.java",
"license": "mit",
"size": 10273
} | [
"org.bouncycastle.cert.X509CRLHolder"
] | import org.bouncycastle.cert.X509CRLHolder; | import org.bouncycastle.cert.*; | [
"org.bouncycastle.cert"
] | org.bouncycastle.cert; | 1,281,355 |
protected int getRegistryPort() {
// First port choice is the "registryPort" init parameter
try {
return Integer.parseInt(getInitParameter("registryPort"));
}
// Fallback choice is the default registry port (1099)
catch (NumberFormatException e) {
return Registry.REGISTRY_PORT;
}
} | int function() { try { return Integer.parseInt(getInitParameter(STR)); } catch (NumberFormatException e) { return Registry.REGISTRY_PORT; } } | /**
* Returns the port where the registry should be running. By default the
* port is the default registry port (1099). This can be overridden with the
* <tt>registryPort</tt> init parameter.
*
* @return the port for the registry
*/ | Returns the port where the registry should be running. By default the port is the default registry port (1099). This can be overridden with the registryPort init parameter | getRegistryPort | {
"repo_name": "zhengjiabin/domeke",
"path": "core/src/main/java/com/domeke/app/cos/RemoteHttpServlet.java",
"license": "apache-2.0",
"size": 4506
} | [
"java.rmi.registry.Registry"
] | import java.rmi.registry.Registry; | import java.rmi.registry.*; | [
"java.rmi"
] | java.rmi; | 157,930 |
public static Intent getQueryInstalledBrowsersIntent() {
return new Intent()
.setAction(Intent.ACTION_VIEW)
.addCategory(Intent.CATEGORY_BROWSABLE)
.setData(Uri.parse("http://"));
} | static Intent function() { return new Intent() .setAction(Intent.ACTION_VIEW) .addCategory(Intent.CATEGORY_BROWSABLE) .setData(Uri.parse("http: } | /**
* Returns the Intent to query a list of installed browser apps.
*/ | Returns the Intent to query a list of installed browser apps | getQueryInstalledBrowsersIntent | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkUtils.java",
"license": "bsd-3-clause",
"size": 14229
} | [
"android.content.Intent",
"android.net.Uri"
] | import android.content.Intent; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 2,576,582 |
public void fillInColors(Graphics2D pG2d, Color pColor) {
double x = coloringBar.getMinX();
double y1 = coloringBar.getMinY();
double h = coloringBar.getHeight();
for (int i = 0; i < coloringColors.length; i++) {
// only need to draw one color, other will show through from strain
// fill
if (!color... | void function(Graphics2D pG2d, Color pColor) { double x = coloringBar.getMinX(); double y1 = coloringBar.getMinY(); double h = coloringBar.getHeight(); for (int i = 0; i < coloringColors.length; i++) { if (!coloringColors[i]) { coloringBar.setRect(x + i, y1, 1, h); pG2d.setColor(pColor); pG2d.fill(coloringBar); } } col... | /**
* Draw the second background color (used when the two-tone coloring option
* is set)
*
* @param pG2d
* the graphics object to draw to
* @param pColor
* the color to use
*/ | Draw the second background color (used when the two-tone coloring option is set) | fillInColors | {
"repo_name": "jmeppley/strainer",
"path": "src/amd/strainer/display/DisplayGeometry.java",
"license": "lgpl-3.0",
"size": 10978
} | [
"java.awt.Color",
"java.awt.Graphics2D"
] | import java.awt.Color; import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,746,653 |
static public double chisq(double df,
double x) throws ArithmeticException {
if ((x < 0.0) || (df < 1.0)) {
return 0.0;
}
return igam(df / 2.0, x / 2.0);
} | static double function(double df, double x) throws ArithmeticException { if ((x < 0.0) (df < 1.0)) { return 0.0; } return igam(df / 2.0, x / 2.0); } | /**
* Returns the area under the left hand tail (from 0 to x)
* of the Chi square probability density function with
* v degrees of freedom.
*
* @param df degrees of freedom
* @param x double value
* @return the Chi-Square function.
*
* @throws ArithmeticException
*/ | Returns the area under the left hand tail (from 0 to x) of the Chi square probability density function with v degrees of freedom | chisq | {
"repo_name": "macaroons-io/macaroons-io.github.io",
"path": "jmacaroons2js/src/main/resources/com/googlecode/cryptogwt/emul/java/security/SpecialMathFunction.java",
"license": "apache-2.0",
"size": 45250
} | [
"java.lang.ArithmeticException"
] | import java.lang.ArithmeticException; | import java.lang.*; | [
"java.lang"
] | java.lang; | 2,191,914 |
private Optional<ZonedDateTime> getMaintenanceWindowEndTime() {
return getMaintenanceWindowStartTime()
.map(start -> start.plus(MaintenanceScheduleHelper.convertToISODuration(maintenanceWindowDuration)));
} | Optional<ZonedDateTime> function() { return getMaintenanceWindowStartTime() .map(start -> start.plus(MaintenanceScheduleHelper.convertToISODuration(maintenanceWindowDuration))); } | /**
* Returns the end time of next available or active maintenance window for
* the {@link Action} as {@link ZonedDateTime}. If a maintenance window is
* already active, the end time of currently active window is returned.
*
* @return the end time of window as { @link Optional<ZonedDateTime>}.
... | Returns the end time of next available or active maintenance window for the <code>Action</code> as <code>ZonedDateTime</code>. If a maintenance window is already active, the end time of currently active window is returned | getMaintenanceWindowEndTime | {
"repo_name": "eclipse/hawkbit",
"path": "hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/model/JpaAction.java",
"license": "epl-1.0",
"size": 14259
} | [
"java.time.ZonedDateTime",
"java.util.Optional",
"org.eclipse.hawkbit.repository.MaintenanceScheduleHelper"
] | import java.time.ZonedDateTime; import java.util.Optional; import org.eclipse.hawkbit.repository.MaintenanceScheduleHelper; | import java.time.*; import java.util.*; import org.eclipse.hawkbit.repository.*; | [
"java.time",
"java.util",
"org.eclipse.hawkbit"
] | java.time; java.util; org.eclipse.hawkbit; | 184,570 |
public OMVRBTreePersistent<OIdentifiable, OIdentifiable> save() {
return this;
}
| OMVRBTreePersistent<OIdentifiable, OIdentifiable> function() { return this; } | /**
* Do nothing since the set is early saved
*/ | Do nothing since the set is early saved | save | {
"repo_name": "DiceHoldingsInc/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java",
"license": "apache-2.0",
"size": 18609
} | [
"com.orientechnologies.orient.core.db.record.OIdentifiable"
] | import com.orientechnologies.orient.core.db.record.OIdentifiable; | import com.orientechnologies.orient.core.db.record.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 751,455 |
@SuppressWarnings("unused")
private void createUser(final String type, final String name,
final String id, final String password) throws MiniProjectException {
if (SaveLoad.PERSON_TYPE_ADMINISTRATOR.equals(type)) {
new model.person.Administrator(name, id, password);
} el... | @SuppressWarnings(STR) void function(final String type, final String name, final String id, final String password) throws MiniProjectException { if (SaveLoad.PERSON_TYPE_ADMINISTRATOR.equals(type)) { new model.person.Administrator(name, id, password); } else { if (((Map) Config.getConfiguration().get( SaveLoad.PERSON_T... | /**
* Creates the user.
*
* @param type
* the type
* @param name
* the name
* @param id
* the id
* @param password
* the password
* @throws MiniProjectException
* the mini project exception
*/ | Creates the user | createUser | {
"repo_name": "neowutran/projetFinalSI3",
"path": "src/views/etat/Administrator.java",
"license": "mit",
"size": 13213
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,911,705 |
public double[ ][ ] forward( double[ ][ ] matTime, int lvlM, int lvlN )
throws JWaveException {
int noOfRows = matTime.length;
int noOfCols = matTime[ 0 ].length;
double[ ][ ] matHilb = new double[ noOfRows ][ noOfCols ];
for( int i = 0; i < noOfRows; i++ ) {
double[ ] arrTime = new do... | double[ ][ ] function( double[ ][ ] matTime, int lvlM, int lvlN ) throws JWaveException { int noOfRows = matTime.length; int noOfCols = matTime[ 0 ].length; double[ ][ ] matHilb = new double[ noOfRows ][ noOfCols ]; for( int i = 0; i < noOfRows; i++ ) { double[ ] arrTime = new double[ noOfCols ]; for( int j = 0; j < no... | /**
* Performs the 2-D forward transform from time domain to frequency or Hilbert
* domain of a certain level for a given matrix depending on the used
* transform algorithm by inheritance. The supported level has to match the
* possible dimensions of the given matrix.
*
* @date 10.02.2010 11:00:29
... | Performs the 2-D forward transform from time domain to frequency or Hilbert domain of a certain level for a given matrix depending on the used transform algorithm by inheritance. The supported level has to match the possible dimensions of the given matrix | forward | {
"repo_name": "RaineForest/ECG-Viewer",
"path": "JWave/src/math/jwave/transforms/BasicTransform.java",
"license": "gpl-2.0",
"size": 22386
} | [
"math.jwave.exceptions.JWaveException"
] | import math.jwave.exceptions.JWaveException; | import math.jwave.exceptions.*; | [
"math.jwave.exceptions"
] | math.jwave.exceptions; | 1,483,441 |
public void reportJSException(String instanceId, String function,
String exception) {
WXLogUtils.e("reportJSException >>>> instanceId:" + instanceId
+ ", exception function:" + function + ", exception:"
+ exception);
WXSDKInstance instance = null;
... | void function(String instanceId, String function, String exception) { WXLogUtils.e(STR + instanceId + STR + function + STR + exception); WXSDKInstance instance = null; if (instanceId != null && (instance = WXSDKManager.getInstance().getSDKInstance(instanceId)) != null) { instance.onJSException(WXErrorCode.WX_ERR_JS_EXE... | /**
* Report JavaScript Exception
*/ | Report JavaScript Exception | reportJSException | {
"repo_name": "leoward/incubator-weex",
"path": "android/sdk/src/main/java/com/taobao/weex/bridge/WXBridgeManager.java",
"license": "apache-2.0",
"size": 77660
} | [
"com.taobao.weex.WXEnvironment",
"com.taobao.weex.WXSDKInstance",
"com.taobao.weex.WXSDKManager",
"com.taobao.weex.adapter.IWXJSExceptionAdapter",
"com.taobao.weex.bridge.WXModuleManager",
"com.taobao.weex.common.WXErrorCode",
"com.taobao.weex.common.WXJSExceptionInfo",
"com.taobao.weex.dom.DOMAction"... | import com.taobao.weex.WXEnvironment; import com.taobao.weex.WXSDKInstance; import com.taobao.weex.WXSDKManager; import com.taobao.weex.adapter.IWXJSExceptionAdapter; import com.taobao.weex.bridge.WXModuleManager; import com.taobao.weex.common.WXErrorCode; import com.taobao.weex.common.WXJSExceptionInfo; import com.tao... | import com.taobao.weex.*; import com.taobao.weex.adapter.*; import com.taobao.weex.bridge.*; import com.taobao.weex.common.*; import com.taobao.weex.dom.*; import com.taobao.weex.dom.action.*; import com.taobao.weex.utils.*; | [
"com.taobao.weex"
] | com.taobao.weex; | 2,487,989 |
@Override
public void endElement(String uri, String localName, String qName) throws SAXException {
if (qName.equals(Constants.STATUS)) {
if (stacktree.peek() instanceof Status) {
stacktree.pop();
}
} else if (qName.equals(Constants.JVM)) {
if (... | void function(String uri, String localName, String qName) throws SAXException { if (qName.equals(Constants.STATUS)) { if (stacktree.peek() instanceof Status) { stacktree.pop(); } } else if (qName.equals(Constants.JVM)) { if (stacktree.peek() instanceof Jvm) { stacktree.pop(); } } else if (qName.equals(Constants.MEMORY)... | /**
* Receive notification of the end of an element.
*
* <p>
* By default, do nothing. Application writers may override this method in a
* subclass to take specific actions at the end of each element (such as
* finalising a tree node or writing output to a file).
* </p>
*
* ... | Receive notification of the end of an element. By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file). | endElement | {
"repo_name": "Nachiket90/jmeter-sample",
"path": "src/monitor/model/org/apache/jmeter/monitor/parser/MonitorHandler.java",
"license": "apache-2.0",
"size": 14836
} | [
"org.apache.jmeter.monitor.model.Connector",
"org.apache.jmeter.monitor.model.Jvm",
"org.apache.jmeter.monitor.model.Memory",
"org.apache.jmeter.monitor.model.RequestInfo",
"org.apache.jmeter.monitor.model.Status",
"org.apache.jmeter.monitor.model.ThreadInfo",
"org.apache.jmeter.monitor.model.Worker",
... | import org.apache.jmeter.monitor.model.Connector; import org.apache.jmeter.monitor.model.Jvm; import org.apache.jmeter.monitor.model.Memory; import org.apache.jmeter.monitor.model.RequestInfo; import org.apache.jmeter.monitor.model.Status; import org.apache.jmeter.monitor.model.ThreadInfo; import org.apache.jmeter.moni... | import org.apache.jmeter.monitor.model.*; import org.xml.sax.*; | [
"org.apache.jmeter",
"org.xml.sax"
] | org.apache.jmeter; org.xml.sax; | 2,520,357 |
@Override
public Map<LocalDate, MultipleCurrencyAmount> visitForexDefinition(final ForexDefinition fx, final DoubleTimeSeries<LocalDate> indexFixingTimeSeries) {
s_logger.info("An index fixing time series was supplied, but will not be used");
return visitForexDefinition(fx);
} | Map<LocalDate, MultipleCurrencyAmount> function(final ForexDefinition fx, final DoubleTimeSeries<LocalDate> indexFixingTimeSeries) { s_logger.info(STR); return visitForexDefinition(fx); } | /**
* Returns a map containing a single date and payment.
* @param fx The FX instrument, not null
* @param indexFixingTimeSeries Not used
* @return A map containing the (single) payment date and amount
*/ | Returns a map containing a single date and payment | visitForexDefinition | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/instrument/FixedReceiveCashFlowVisitor.java",
"license": "apache-2.0",
"size": 20143
} | [
"com.opengamma.analytics.financial.forex.definition.ForexDefinition",
"com.opengamma.util.money.MultipleCurrencyAmount",
"com.opengamma.util.timeseries.DoubleTimeSeries",
"java.util.Map",
"javax.time.calendar.LocalDate"
] | import com.opengamma.analytics.financial.forex.definition.ForexDefinition; import com.opengamma.util.money.MultipleCurrencyAmount; import com.opengamma.util.timeseries.DoubleTimeSeries; import java.util.Map; import javax.time.calendar.LocalDate; | import com.opengamma.analytics.financial.forex.definition.*; import com.opengamma.util.money.*; import com.opengamma.util.timeseries.*; import java.util.*; import javax.time.calendar.*; | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util",
"javax.time"
] | com.opengamma.analytics; com.opengamma.util; java.util; javax.time; | 1,482,101 |
protected void outdateLabel(Label label) {
String originalText = label.getText();
if(originalText.length() == 0) {
return;
}
String[] tokens = originalText.split(Constants.endl);
String phrase = "*OLD*";
// checks if the label has any text
if(tokens.length > 0) {
// checks if th... | void function(Label label) { String originalText = label.getText(); if(originalText.length() == 0) { return; } String[] tokens = originalText.split(Constants.endl); String phrase = "*OLD*"; if(tokens.length > 0) { String[] words = tokens[0].trim().split(" "); if(words.length > 0 && !words[words.length - 1].equals(phras... | /**
* Adds *OLD* message at the end of a label's first line of text
*
* @param label Target Label
*/ | Adds *OLD* message at the end of a label's first line of text | outdateLabel | {
"repo_name": "ronia/flame",
"path": "src/flame/client/xteam/InfoTab.java",
"license": "mit",
"size": 30289
} | [
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,294,537 |
//-----------------------------------------------------------------------
public Builder cashFlowDetails(List<FloatingCashFlowDetails> cashFlowDetails) {
JodaBeanUtils.notNull(cashFlowDetails, "cashFlowDetails");
this._cashFlowDetails = cashFlowDetails;
return this;
} | Builder function(List<FloatingCashFlowDetails> cashFlowDetails) { JodaBeanUtils.notNull(cashFlowDetails, STR); this._cashFlowDetails = cashFlowDetails; return this; } | /**
* Sets the {@code cashFlowDetails} property in the builder.
* @param cashFlowDetails the new value, not null
* @return this, for chaining, not null
*/ | Sets the cashFlowDetails property in the builder | cashFlowDetails | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/FloatingLegCashFlows.java",
"license": "apache-2.0",
"size": 26803
} | [
"java.util.List",
"org.joda.beans.JodaBeanUtils"
] | import java.util.List; import org.joda.beans.JodaBeanUtils; | import java.util.*; import org.joda.beans.*; | [
"java.util",
"org.joda.beans"
] | java.util; org.joda.beans; | 1,157,815 |
public static Iterable<String> run(Class<?> vertexClass,
Class<?> vertexCombinerClass, Class<?> vertexInputFormatClass,
Class<?> vertexOutputFormatClass, Map<String, String> params,
String... data) throws Exception {
File tmpDir = null;
try {
// prep... | static Iterable<String> function(Class<?> vertexClass, Class<?> vertexCombinerClass, Class<?> vertexInputFormatClass, Class<?> vertexOutputFormatClass, Map<String, String> params, String... data) throws Exception { File tmpDir = null; try { tmpDir = createTestDir(vertexClass); File inputFile = createTempFile(tmpDir, ST... | /**
* Attempts to run the vertex internally in the current JVM, reading from and writing to a
* temporary folder on local disk. Will start an own zookeeper instance.
*
* @param vertexClass the vertex class to instantiate
* @param vertexCombinerClass the vertex combiner to use (or null)
*... | Attempts to run the vertex internally in the current JVM, reading from and writing to a temporary folder on local disk. Will start an own zookeeper instance | run | {
"repo_name": "serafett/giraphx",
"path": "src/main/java/org/apache/giraph/utils/InternalVertexRunner.java",
"license": "apache-2.0",
"size": 9611
} | [
"java.io.File",
"java.util.Map",
"java.util.Properties",
"org.apache.giraph.graph.GiraphJob",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapreduce.lib.input.FileInputFormat",
"org.apache.hadoop.mapreduce.lib.output.FileOutputFormat",
"org.apache.zookeeper... | import java.io.File; import java.util.Map; import java.util.Properties; import org.apache.giraph.graph.GiraphJob; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; i... | import java.io.*; import java.util.*; import org.apache.giraph.graph.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.lib.input.*; import org.apache.hadoop.mapreduce.lib.output.*; import org.apache.zookeeper.server.*; import org.apache.zookeeper.server.quorum.*; | [
"java.io",
"java.util",
"org.apache.giraph",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.io; java.util; org.apache.giraph; org.apache.hadoop; org.apache.zookeeper; | 1,835,016 |
public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request,
io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(METHOD_TEST_IAM_PERMISSIONS, getCallOptions()), request, responseObserver);
... | void function(com.google.iam.v1.TestIamPermissionsRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse> responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_TEST_IAM_PERMISSIONS, getCallOptions()), request, responseObserver); } } public static final class InstanceAdminBlo... | /**
* <pre>
* Returns permissions that the caller has on the specified instance resource.
* Attempting this RPC on a non-existent Cloud Spanner instance resource will
* result in a NOT_FOUND error if the user has `spanner.instances.list`
* permission on the containing Google Cloud Project. Othe... | <code> Returns permissions that the caller has on the specified instance resource. Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has `spanner.instances.list` permission on the containing Google Cloud Project. Otherwise returns an empty set of permissi... | testIamPermissions | {
"repo_name": "eoogbe/api-client-staging",
"path": "generated/java/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java",
"license": "bsd-3-clause",
"size": 60430
} | [
"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; | 2,139,981 |
protected boolean deleteFile(String fileName, String subFolder) {
String filePath = getFilePath(fileName, subFolder);
LOGGER.debug("Deleting file '" + filePath + "'");
File file = new File(filePath);
if (file.exists()) {
if (file.canWrite()) {
try {
if(file.isDirectory()){
FileUtils.deleteQ... | boolean function(String fileName, String subFolder) { String filePath = getFilePath(fileName, subFolder); LOGGER.debug(STR + filePath + "'"); File file = new File(filePath); if (file.exists()) { if (file.canWrite()) { try { if(file.isDirectory()){ FileUtils.deleteQuietly(file); }else{ file.delete(); } return true; } ca... | /**
* Delete a file
*
* @param fileName
* @param subFolder
* @return true if the file has been delete or false otherwise
*/ | Delete a file | deleteFile | {
"repo_name": "offtherailz/OpenSDI-Manager2",
"path": "src/modules/filemanager/src/main/java/it/geosolutions/opensdi2/mvc/BaseFileManager.java",
"license": "gpl-3.0",
"size": 21874
} | [
"java.io.File",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import org.apache.commons.io.FileUtils; | import java.io.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 1,674,896 |
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String virtualHubName, String connectionName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String virtualHubName, String connectionName, Context context); | /**
* Deletes a VirtualHubBgpConnection.
*
* @param resourceGroupName The resource group name of the VirtualHubBgpConnection.
* @param virtualHubName The name of the VirtualHub.
* @param connectionName The name of the connection.
* @param context The context to associate with this operatio... | Deletes a VirtualHubBgpConnection | delete | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubBgpConnectionsClient.java",
"license": "mit",
"size": 18886
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,383,331 |
public static java.util.List extractCarePlanList(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.CarePlanCollection voCollection)
{
return extractCarePlanList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.CarePlanCollection voCollection) { return extractCarePlanList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.nursing.careplans.domain.objects.CarePlan list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.nursing.careplans.domain.objects.CarePlan list from the value object collection | extractCarePlanList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/CarePlanAssembler.java",
"license": "agpl-3.0",
"size": 27021
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,271,801 |
public void setOptions(String options) {
try {
JSONObject root = new JSONObject(options);
getState().setOptions(root);
} catch (JSONException e) {
e.printStackTrace();
}
} | void function(String options) { try { JSONObject root = new JSONObject(options); getState().setOptions(root); } catch (JSONException e) { e.printStackTrace(); } } | /**
* Set the options.
*
* @param options
* the options to set.
*/ | Set the options | setOptions | {
"repo_name": "johnmmcparland/vaadin_cookbook",
"path": "Chapter03/flotChart/src/main/java/com/mcparland/john/vaadin_cookbook/FlotChart.java",
"license": "apache-2.0",
"size": 3131
} | [
"org.json.JSONException",
"org.json.JSONObject"
] | import org.json.JSONException; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,570,636 |
public void showSelection(Application o3smeasuresPlugin) {
formatter = new DecimalFormat("#.###", new DecimalFormatSymbols(new Locale("en", "US")));
createProjectModel(o3smeasuresPlugin);
}
| void function(Application o3smeasuresPlugin) { formatter = new DecimalFormat("#.###", new DecimalFormatSymbols(new Locale("en", "US"))); createProjectModel(o3smeasuresPlugin); } | /**
* Method that shows the given selection in this view
*
* @author Mariana Azevedo
* @since 23/09/2019
*
* @param itemMeasured
*/ | Method that shows the given selection in this view | showSelection | {
"repo_name": "mariazevedo88/o3smeasures-tool",
"path": "src/io/github/mariazevedo88/o3smeasures/plugin/views/SecondaryMeasuresView.java",
"license": "gpl-3.0",
"size": 12217
} | [
"io.github.mariazevedo88.o3smeasures.main.Application",
"java.text.DecimalFormat",
"java.text.DecimalFormatSymbols",
"java.util.Locale"
] | import io.github.mariazevedo88.o3smeasures.main.Application; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Locale; | import io.github.mariazevedo88.o3smeasures.main.*; import java.text.*; import java.util.*; | [
"io.github.mariazevedo88",
"java.text",
"java.util"
] | io.github.mariazevedo88; java.text; java.util; | 405,451 |
@JSSetter
public void setLayer(Scriptable layer) {
if (this.layer != null) {
// TODO: clear queued modifications?
}
this.layer = layer;
} | void function(Scriptable layer) { if (this.layer != null) { } this.layer = layer; } | /**
* Set the layer from which this feature was accessed.
* TODO: Remove this from the API when Layer is implemented as a wrapper.
* @param layer
* @return
*/ | Set the layer from which this feature was accessed | setLayer | {
"repo_name": "jericks/geoscript-js",
"path": "src/main/java/org/geoscript/js/feature/Feature.java",
"license": "mit",
"size": 14856
} | [
"org.mozilla.javascript.Scriptable"
] | import org.mozilla.javascript.Scriptable; | import org.mozilla.javascript.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,372,540 |
public Enumeration<Entity> getCarcassEntities() {
Vector<Entity> carcasses = new Vector<Entity>();
for (Entity entity : entities) {
if (entity.isCarcass()) {
carcasses.addElement(entity);
}
}
return carcasses.elements();
} | Enumeration<Entity> function() { Vector<Entity> carcasses = new Vector<Entity>(); for (Entity entity : entities) { if (entity.isCarcass()) { carcasses.addElement(entity); } } return carcasses.elements(); } | /**
* Returns an enumeration of "carcass" entities, i.e., vehicles with dead
* crews that are still on the map.
*/ | Returns an enumeration of "carcass" entities, i.e., vehicles with dead crews that are still on the map | getCarcassEntities | {
"repo_name": "chvink/kilomek",
"path": "megamek/src/megamek/common/Game.java",
"license": "gpl-3.0",
"size": 117578
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,733,710 |
if (i.equals(j)) return 0.0;
if (i instanceof Service && j instanceof Service) {
return calcDist((Service) i, (Service) j);
} else if (i instanceof Service && j instanceof Shipment) {
return calcDist((Service) i, (Shipment) j);
} else if (i instanceof Shipment && j insta... | if (i.equals(j)) return 0.0; if (i instanceof Service && j instanceof Service) { return calcDist((Service) i, (Service) j); } else if (i instanceof Service && j instanceof Shipment) { return calcDist((Service) i, (Shipment) j); } else if (i instanceof Shipment && j instanceof Service) { return calcDist((Service) j, (Sh... | /**
* Calculates and returns the average distance between two jobs based on the input-transport costs.
* <p>
* <p>If the distance between two jobs cannot be calculated with input-transport costs, it tries the euclidean distance between these jobs.
*/ | Calculates and returns the average distance between two jobs based on the input-transport costs. If the distance between two jobs cannot be calculated with input-transport costs, it tries the euclidean distance between these jobs | getDistance | {
"repo_name": "terryturner/VRPinGMapFx",
"path": "jsprit-master/jsprit-core/src/main/java/com/graphhopper/jsprit/core/algorithm/ruin/distance/AvgServiceAndShipmentDistance.java",
"license": "apache-2.0",
"size": 3978
} | [
"com.graphhopper.jsprit.core.problem.job.Service",
"com.graphhopper.jsprit.core.problem.job.Shipment"
] | import com.graphhopper.jsprit.core.problem.job.Service; import com.graphhopper.jsprit.core.problem.job.Shipment; | import com.graphhopper.jsprit.core.problem.job.*; | [
"com.graphhopper.jsprit"
] | com.graphhopper.jsprit; | 1,865,831 |
void featuresProcessed(Object element, CodeSyncAlgorithm codeSyncAlgorithm);
| void featuresProcessed(Object element, CodeSyncAlgorithm codeSyncAlgorithm); | /**
* Called from {@link CodeSyncAlgorithm} after all the features of <code>element</code> have been processed.
*
* @author Mariana
*/ | Called from <code>CodeSyncAlgorithm</code> after all the features of <code>element</code> have been processed | featuresProcessed | {
"repo_name": "flower-platform/flower-platform-4",
"path": "org.flowerplatform.codesync/src/org/flowerplatform/codesync/adapter/IModelAdapter.java",
"license": "gpl-3.0",
"size": 5461
} | [
"org.flowerplatform.codesync.CodeSyncAlgorithm"
] | import org.flowerplatform.codesync.CodeSyncAlgorithm; | import org.flowerplatform.codesync.*; | [
"org.flowerplatform.codesync"
] | org.flowerplatform.codesync; | 988,023 |
public Resource getOuterBlock(final Resource box) {
return (Resource) getOuterBlock.apply(box);
} | Resource function(final Resource box) { return (Resource) getOuterBlock.apply(box); } | /**
* Get outer block. It must exist.
*/ | Get outer block. It must exist | getOuterBlock | {
"repo_name": "ruslanrf/wpps",
"path": "wpps_plugins/tuwien.dbai.wpps.core/src/tuwien/dbai/wpps/core/wpmodel/physmodel/bgm/instadp/rdfimpl/BoxImpl.java",
"license": "gpl-2.0",
"size": 12888
} | [
"com.hp.hpl.jena.rdf.model.Resource"
] | import com.hp.hpl.jena.rdf.model.Resource; | import com.hp.hpl.jena.rdf.model.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 491,615 |
protected boolean hasPermissionToSubmit(String actionTypeCode, ProtocolBase protocol, ActionRightMapping rightMapper) {
rightMapper.setActionTypeCode(actionTypeCode);
rulesList.get(PERMISSIONS_SUBMIT_RULE).executeRules(rightMapper);
return rightMapper.isAllowed() ? kraAuthorizationService.ha... | boolean function(String actionTypeCode, ProtocolBase protocol, ActionRightMapping rightMapper) { rightMapper.setActionTypeCode(actionTypeCode); rulesList.get(PERMISSIONS_SUBMIT_RULE).executeRules(rightMapper); return rightMapper.isAllowed() ? kraAuthorizationService.hasPermission(getUserIdentifier(), protocol, rightMap... | /**
* This method is to check if user has permission to submit
*/ | This method is to check if user has permission to submit | hasPermissionToSubmit | {
"repo_name": "sanjupolus/KC6.oLatest",
"path": "coeus-impl/src/main/java/org/kuali/kra/iacuc/actions/submit/IacucProtocolActionServiceImpl.java",
"license": "agpl-3.0",
"size": 9716
} | [
"org.kuali.kra.protocol.ProtocolBase",
"org.kuali.kra.protocol.actions.submit.ActionRightMapping"
] | import org.kuali.kra.protocol.ProtocolBase; import org.kuali.kra.protocol.actions.submit.ActionRightMapping; | import org.kuali.kra.protocol.*; import org.kuali.kra.protocol.actions.submit.*; | [
"org.kuali.kra"
] | org.kuali.kra; | 531,624 |
public RSyntaxTextArea getTextArea() {
return textArea;
}
| RSyntaxTextArea function() { return textArea; } | /**
* Returns the text area that was parsed.
*
* @return The text area.
*/ | Returns the text area that was parsed | getTextArea | {
"repo_name": "Thecarisma/powertext",
"path": "Power Text Spell Checker/src/com/power/text/ui/rsyntaxtextarea/spell/event/SpellingParserEvent.java",
"license": "gpl-3.0",
"size": 2420
} | [
"com.power.text.ui.pteditor.RSyntaxTextArea"
] | import com.power.text.ui.pteditor.RSyntaxTextArea; | import com.power.text.ui.pteditor.*; | [
"com.power.text"
] | com.power.text; | 238,841 |
void forEachOrdered(LongConsumer action); | void forEachOrdered(LongConsumer action); | /**
* Performs an action for each element of this stream, guaranteeing that
* each element is processed in encounter order for streams that have a
* defined encounter order.
*
* <p>This is a <a href="package-summary.html#StreamOps">terminal
* operation</a>.
*
* @param action a <a... | Performs an action for each element of this stream, guaranteeing that each element is processed in encounter order for streams that have a defined encounter order. This is a terminal operation | forEachOrdered | {
"repo_name": "flyzsd/java-code-snippets",
"path": "ibm.jdk8/src/java/util/stream/LongStream.java",
"license": "mit",
"size": 37200
} | [
"java.util.function.LongConsumer"
] | import java.util.function.LongConsumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 617,095 |
EClass getExpression(); | EClass getExpression(); | /**
* Returns the meta object for class '{@link fr.lri.schora.expr.Expression <em>Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Expression</em>'.
* @see fr.lri.schora.expr.Expression
* @generated
*/ | Returns the meta object for class '<code>fr.lri.schora.expr.Expression Expression</code>'. | getExpression | {
"repo_name": "nhnghia/schora",
"path": "src/fr/lri/schora/expr/ExprPackage.java",
"license": "gpl-2.0",
"size": 46048
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,463,850 |
public void testSize() {
TreeSet q = populatedSet(SIZE);
for (int i = 0; i < SIZE; ++i) {
assertEquals(SIZE - i, q.size());
q.pollFirst();
}
for (int i = 0; i < SIZE; ++i) {
assertEquals(i, q.size());
q.add(new Integer(i));
}
... | void function() { TreeSet q = populatedSet(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(SIZE - i, q.size()); q.pollFirst(); } for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.size()); q.add(new Integer(i)); } } | /**
* size changes when elements added and removed
*/ | size changes when elements added and removed | testSize | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/concurrent/tck/TreeSetTest.java",
"license": "gpl-2.0",
"size": 30547
} | [
"java.util.TreeSet"
] | import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,848,733 |
private void expandEnvironment(String action, Variables variables,
ImmutableMap.Builder<String, String> envBuilder) {
if (!actions.contains(action)) {
return;
}
for (EnvEntry envEntry : envEntries) {
envEntry.addEnvEntry(variables, envBuilder);
}
}
}
priva... | void function(String action, Variables variables, ImmutableMap.Builder<String, String> envBuilder) { if (!actions.contains(action)) { return; } for (EnvEntry envEntry : envEntries) { envEntry.addEnvEntry(variables, envBuilder); } } } private interface CrosstoolSelectable { | /**
* Adds the environment key/value pairs that apply to the given {@code action} to
* {@code envBuilder}.
*/ | Adds the environment key/value pairs that apply to the given action to envBuilder | expandEnvironment | {
"repo_name": "damienmg/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java",
"license": "apache-2.0",
"size": 85726
} | [
"com.google.common.collect.ImmutableMap"
] | import com.google.common.collect.ImmutableMap; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 793,022 |
@Override
public void handle(ActionEvent arg0) {
String pathValue = configFileField.getText();
if ((pathValue == null) || (pathValue.isEmpty())){
Dialog.show(Type.INFO, "Path to the configuration file hasn't been specified.",
"Fill in the path and try again.");
} else {
Path path = Paths.get(pathVa... | void function(ActionEvent arg0) { String pathValue = configFileField.getText(); if ((pathValue == null) (pathValue.isEmpty())){ Dialog.show(Type.INFO, STR, STR); } else { Path path = Paths.get(pathValue); if (Files.exists(path)){ Charset charset = Charset.forName(configFileCharsets.getSelectionModel().getSelectedItem()... | /**
* Makes sure that the config file exists, is opened and is properly processed.
*/ | Makes sure that the config file exists, is opened and is properly processed | handle | {
"repo_name": "d3scomp/ascens-tutorial-visualiser",
"path": "src/cz/filipekt/jdcv/gui_logic/ConfigFileLoader.java",
"license": "mit",
"size": 9271
} | [
"cz.filipekt.jdcv.util.Dialog",
"java.nio.charset.Charset",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths",
"java.util.List"
] | import cz.filipekt.jdcv.util.Dialog; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; | import cz.filipekt.jdcv.util.*; import java.nio.charset.*; import java.nio.file.*; import java.util.*; | [
"cz.filipekt.jdcv",
"java.nio",
"java.util"
] | cz.filipekt.jdcv; java.nio; java.util; | 439,010 |
private Object writeReplace() throws ObjectStreamException {
return new LinkedHashMap<K, V>(this);
} | Object function() throws ObjectStreamException { return new LinkedHashMap<K, V>(this); } | /**
* If somebody is unlucky enough to have to serialize one of these, serialize
* it as a LinkedHashMap so that they won't need Gson on the other side to
* deserialize it. Using serialization defeats our DoS defence, so most apps
* shouldn't use it.
*/ | If somebody is unlucky enough to have to serialize one of these, serialize it as a LinkedHashMap so that they won't need Gson on the other side to deserialize it. Using serialization defeats our DoS defence, so most apps shouldn't use it | writeReplace | {
"repo_name": "player-03/SDKGenerator",
"path": "targets/java/srcCode/com/google/gson/internal/LinkedTreeMap.java",
"license": "apache-2.0",
"size": 17853
} | [
"java.io.ObjectStreamException",
"java.util.LinkedHashMap"
] | import java.io.ObjectStreamException; import java.util.LinkedHashMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,237,695 |
public Set<PosTag> findPossiblePosTags(String word);
| Set<PosTag> function(String word); | /**
* For a given word, an ordered set of all postags to be considered in tagging (using the natural ordering for postags).
* @param word the word being considered
* @return List<PosTag>
*/ | For a given word, an ordered set of all postags to be considered in tagging (using the natural ordering for postags) | findPossiblePosTags | {
"repo_name": "safety-data/talismane",
"path": "talismane_core/src/main/java/com/joliciel/talismane/lexicon/PosTaggerLexicon.java",
"license": "agpl-3.0",
"size": 2572
} | [
"com.joliciel.talismane.posTagger.PosTag",
"java.util.Set"
] | import com.joliciel.talismane.posTagger.PosTag; import java.util.Set; | import com.joliciel.talismane.*; import java.util.*; | [
"com.joliciel.talismane",
"java.util"
] | com.joliciel.talismane; java.util; | 218,237 |
BridgeContext getBridgeContext(); | BridgeContext getBridgeContext(); | /**
* Returns the current BridgeContext. This object given a deep
* access to the viewer internals.
*/ | Returns the current BridgeContext. This object given a deep access to the viewer internals | getBridgeContext | {
"repo_name": "Uni-Sol/batik",
"path": "sources/org/apache/batik/script/Window.java",
"license": "apache-2.0",
"size": 5884
} | [
"org.apache.batik.bridge.BridgeContext"
] | import org.apache.batik.bridge.BridgeContext; | import org.apache.batik.bridge.*; | [
"org.apache.batik"
] | org.apache.batik; | 702,178 |
public void paint(Graphics2D g2d, double pixelRatio) {
g2d.setColor(Color.BLACK);
for (Line2D l : boundary) {
g2d.draw(ShapeHelper.getLine(l, pixelRatio));
}
for (Obstacle o : obstacles) {
g2d.draw(ShapeHelper.getLine(o.getShape(), pixelRatio));
}
if (goal != null) {
goal.paint(g2d, pixelRa... | void function(Graphics2D g2d, double pixelRatio) { g2d.setColor(Color.BLACK); for (Line2D l : boundary) { g2d.draw(ShapeHelper.getLine(l, pixelRatio)); } for (Obstacle o : obstacles) { g2d.draw(ShapeHelper.getLine(o.getShape(), pixelRatio)); } if (goal != null) { goal.paint(g2d, pixelRatio); } if (agent != null) { agen... | /**
* Used to render this <code>AgentWorld</code> to the <code>Graphics2D</code> instance, using the
* provided aspect ratio.
*
* @param g2d the <code>Graphics2D</code> instance for rendering with,
* @param pixelRatio the aspect ratio to use for rendering.
*/ | Used to render this <code>AgentWorld</code> to the <code>Graphics2D</code> instance, using the provided aspect ratio | paint | {
"repo_name": "mhl787156/MinecraftAI",
"path": "libraries/neat-preview/neat-experiment-robot-0.1/src/edu/uwa/aidan/robot/world/AgentWorld.java",
"license": "lgpl-2.1",
"size": 9490
} | [
"java.awt.Color",
"java.awt.Graphics2D",
"java.awt.geom.Line2D"
] | import java.awt.Color; import java.awt.Graphics2D; import java.awt.geom.Line2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 753,207 |
protected void PredicateExpr() throws javax.xml.transform.TransformerException
{
int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
appendOp(2, OpCodes.OP_PREDICATE);
Expr();
// Terminate for safety.
m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), OpCodes.ENDOP);
m_ops.setOp(OpMap.MAPINDEX_L... | void function() throws javax.xml.transform.TransformerException { int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH); appendOp(2, OpCodes.OP_PREDICATE); Expr(); m_ops.setOp(m_ops.getOp(OpMap.MAPINDEX_LENGTH), OpCodes.ENDOP); m_ops.setOp(OpMap.MAPINDEX_LENGTH, m_ops.getOp(OpMap.MAPINDEX_LENGTH) + 1); m_ops.setOp(opPos + OpM... | /**
*
* PredicateExpr ::= Expr
*
*
* @throws javax.xml.transform.TransformerException
*/ | PredicateExpr ::= Expr | PredicateExpr | {
"repo_name": "JetBrains/jdk8u_jaxp",
"path": "src/com/sun/org/apache/xpath/internal/compiler/XPathParser.java",
"license": "gpl-2.0",
"size": 64411
} | [
"javax.xml.transform.TransformerException"
] | import javax.xml.transform.TransformerException; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 2,237,181 |
@Override
public final int lastIndexOf(final Object obj) {
int i = this.indexOf(obj);
if (i < 0) {
return -1;
}
while (++i < this.size && Root.equals(this.values[i], obj)) {
;
}
return i - 1;
}
/**
* Returns a {@link ListItemizer} for the list, starting at the beginning of the list.
*
... | final int function(final Object obj) { int i = this.indexOf(obj); if (i < 0) { return -1; } while (++i < this.size && Root.equals(this.values[i], obj)) { ; } return i - 1; } /** * Returns a {@link ListItemizer} for the list, starting at the beginning of the list. * * @return a {@link ListItemizer} for the list * @throw... | /**
* Returns the index of the last occurrence of the specified object in the list, or -1 if the list does not contain the object.
*
* @param the
* object to check for its last index in the list
* @return the index of the last occurrence of the specified object in the list, or -1 if the list does n... | Returns the index of the last occurrence of the specified object in the list, or -1 if the list does not contain the object | lastIndexOf | {
"repo_name": "macvelli/RootFramework",
"path": "src/root/adt/ListArraySorted.java",
"license": "apache-2.0",
"size": 24442
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,724,959 |
public synchronized int getResultSetType() throws SQLException {
// fredt - omit checkClosed() in order to be able to handle the result of a
// SHUTDOWN query
checkClosed();
return rsScrollability;
} | synchronized int function() throws SQLException { checkClosed(); return rsScrollability; } | /**
* <!-- start generic documentation -->
* Retrieves the result set type for <code>ResultSet</code> objects
* generated by this <code>Statement</code> object.
* <!-- end generic documentation -->
*
* <!-- start release-specific documentation -->
* <div class="ReleaseSpecificDocument... | Retrieves the result set type for <code>ResultSet</code> objects generated by this <code>Statement</code> object. HSQLDB-Specific Information: HSQLDB 1.7.0 and later versions support <code>TYPE_FORWARD_ONLY</code> and <code>TYPE_SCROLL_INSENSITIVE</code>. | getResultSetType | {
"repo_name": "ifcharming/original2.0",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCPreparedStatement.java",
"license": "gpl-3.0",
"size": 175518
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,961,763 |
IUser getUser();
| IUser getUser(); | /**
* Gets the user of the transition permission.
*
* @return The user.
*/ | Gets the user of the transition permission | getUser | {
"repo_name": "davidfrigola/pfc",
"path": "wfe/wfe-core/src/main/java/org/wfe/core/model/permissions/IUserStatePermission.java",
"license": "apache-2.0",
"size": 1374
} | [
"org.wfe.core.model.users.IUser"
] | import org.wfe.core.model.users.IUser; | import org.wfe.core.model.users.*; | [
"org.wfe.core"
] | org.wfe.core; | 1,014,292 |
public void unwind(GridCacheContext ctx) {
List<CA> q;
synchronized (undeploys) {
q = undeploys.remove(ctx.name());
}
if (q == null)
return;
int cnt = 0;
for (CA c : q) {
c.apply();
cnt++;
}
if (log... | void function(GridCacheContext ctx) { List<CA> q; synchronized (undeploys) { q = undeploys.remove(ctx.name()); } if (q == null) return; int cnt = 0; for (CA c : q) { c.apply(); cnt++; } if (log.isDebugEnabled()) log.debug(STR + cnt); } | /**
* Undeploy all queued up closures.
*
* @param ctx Cache context.
*/ | Undeploy all queued up closures | unwind | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentManager.java",
"license": "apache-2.0",
"size": 35285
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,345,066 |
public List<String> getStyles()
{
return GeoserverProperties.getReader().getStyles().getNames();
} | List<String> function() { return GeoserverProperties.getReader().getStyles().getNames(); } | /**
* Gets all styles declared in Geoserver for the workspace.
*/ | Gets all styles declared in Geoserver for the workspace | getStyles | {
"repo_name": "terraframe/geodashboard",
"path": "geoprism-server/src/main/java/net/geoprism/gis/geoserver/GeoserverRestService.java",
"license": "gpl-3.0",
"size": 31516
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,942,237 |
public void setBinFolder( File binFolder )
{
this.binFolder = binFolder;
} | void function( File binFolder ) { this.binFolder = binFolder; } | /**
* Set the bin folder.
*
* @param binFolder The new bin folder name.
*/ | Set the bin folder | setBinFolder | {
"repo_name": "mojohaus/appassembler",
"path": "appassembler-maven-plugin/src/main/java/org/codehaus/mojo/appassembler/Program.java",
"license": "mit",
"size": 6212
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,522,451 |
public void testLeaderStepsDownAndVotesOnHigherTerm() throws Throwable {
runOnServer(() -> {
serverState.setTerm(1).setLeader(0);
VoteRequest request = VoteRequest.builder()
.withTerm(2)
.withCandidate(members.get(1).hashCode())
.withLogIndex(11)
.withLogTerm(2)... | void function() throws Throwable { runOnServer(() -> { serverState.setTerm(1).setLeader(0); VoteRequest request = VoteRequest.builder() .withTerm(2) .withCandidate(members.get(1).hashCode()) .withLogIndex(11) .withLogTerm(2) .build(); VoteResponse response = state.vote(request).get(); threadAssertEquals(serverState.get... | /**
* Tests that a leader steps down when it receives a higher term.
*/ | Tests that a leader steps down when it receives a higher term | testLeaderStepsDownAndVotesOnHigherTerm | {
"repo_name": "madjam/copycat-1",
"path": "server/src/test/java/io/atomix/copycat/server/state/LeaderStateTest.java",
"license": "apache-2.0",
"size": 3825
} | [
"io.atomix.copycat.server.RaftServer",
"io.atomix.copycat.server.request.VoteRequest",
"io.atomix.copycat.server.response.VoteResponse"
] | import io.atomix.copycat.server.RaftServer; import io.atomix.copycat.server.request.VoteRequest; import io.atomix.copycat.server.response.VoteResponse; | import io.atomix.copycat.server.*; import io.atomix.copycat.server.request.*; import io.atomix.copycat.server.response.*; | [
"io.atomix.copycat"
] | io.atomix.copycat; | 2,666,915 |
@Subscribe
public void notifyHistoryChanged(HistoryChangedEvent<ICommand> event) {
this.model.updateData();
} | void function(HistoryChangedEvent<ICommand> event) { this.model.updateData(); } | /**
* When the history is changed, we must probably refresh the data in the tab
* in order to be up-to-date.
*
* @param event History change event.
*/ | When the history is changed, we must probably refresh the data in the tab in order to be up-to-date | notifyHistoryChanged | {
"repo_name": "zyxist/opentrans",
"path": "opentrans-lightweight/src/main/java/org/invenzzia/opentrans/lightweight/ui/tabs/vehicles/VehicleTabController.java",
"license": "gpl-3.0",
"size": 8082
} | [
"org.invenzzia.helium.events.HistoryChangedEvent",
"org.invenzzia.opentrans.visitons.editing.ICommand"
] | import org.invenzzia.helium.events.HistoryChangedEvent; import org.invenzzia.opentrans.visitons.editing.ICommand; | import org.invenzzia.helium.events.*; import org.invenzzia.opentrans.visitons.editing.*; | [
"org.invenzzia.helium",
"org.invenzzia.opentrans"
] | org.invenzzia.helium; org.invenzzia.opentrans; | 2,717,380 |
@RequestMapping(method = RequestMethod.GET, value = {"getService.html"})
public void getServiceById(@RequestParam(value = "id", required = false) final Long id,
final HttpServletRequest request, final HttpServletResponse response) {
try {
RegisteredServiceEdit... | @RequestMapping(method = RequestMethod.GET, value = {STR}) void function(@RequestParam(value = "id", required = false) final Long id, final HttpServletRequest request, final HttpServletResponse response) { try { RegisteredServiceEditBean bean = null; if (id == -1) { bean = new RegisteredServiceEditBean(); bean.setServi... | /**
* Gets service by id.
*
* @param id the id
* @param request the request
* @param response the response
*/ | Gets service by id | getServiceById | {
"repo_name": "lcssos/cas-server",
"path": "cas-management-webapp/src/main/java/org/jasig/cas/services/web/RegisteredServiceSimpleFormController.java",
"license": "apache-2.0",
"size": 5430
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.jasig.cas.services.RegisteredService",
"org.jasig.cas.services.web.beans.RegisteredServiceEditBean",
"org.jasig.cas.web.view.JsonViewUtils",
"org.... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jasig.cas.services.RegisteredService; import org.jasig.cas.services.web.beans.RegisteredServiceEditBean; import org.jasig.cas.web.view.... | import java.util.*; import javax.servlet.http.*; import org.jasig.cas.services.*; import org.jasig.cas.services.web.beans.*; import org.jasig.cas.web.view.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"javax.servlet",
"org.jasig.cas",
"org.springframework.web"
] | java.util; javax.servlet; org.jasig.cas; org.springframework.web; | 2,233,578 |
@Nullable private SchemaIndexCacheFuture internalIndexRebuildFuture(IgniteEx n, int cacheId) {
IndexesRebuildTask idxRebuild = n.context().indexProcessor().idxRebuild();
Object idxRebuildFuts = getFieldValueHierarchy(idxRebuild, "idxRebuildFuts");
return ((Map<Integer, SchemaIndexCacheFutu... | @Nullable SchemaIndexCacheFuture function(IgniteEx n, int cacheId) { IndexesRebuildTask idxRebuild = n.context().indexProcessor().idxRebuild(); Object idxRebuildFuts = getFieldValueHierarchy(idxRebuild, STR); return ((Map<Integer, SchemaIndexCacheFuture>)idxRebuildFuts).get(cacheId); } | /**
* Getting internal rebuild index future for the cache.
*
* @param n Node.
* @param cacheId Cache id.
* @return Rebuild index future.
*/ | Getting internal rebuild index future for the cache | internalIndexRebuildFuture | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/StopRebuildIndexTest.java",
"license": "apache-2.0",
"size": 9794
} | [
"java.util.Map",
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.internal.managers.indexing.IndexesRebuildTask",
"org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheFuture",
"org.apache.ignite.testframework.GridTestUtils",
"org.jetbrains.annotations.Nullable"
] | import java.util.Map; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.managers.indexing.IndexesRebuildTask; import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheFuture; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.managers.indexing.*; import org.apache.ignite.internal.processors.query.schema.*; import org.apache.ignite.testframework.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.util; org.apache.ignite; org.jetbrains.annotations; | 1,277,181 |
List<String> patterns = getGlobsAfterBraceExpansion(globPattern);
for (String p : patterns) {
if (isNoBraceGlobMatched(p, targetText))
return true;
}
return false;
} | List<String> patterns = getGlobsAfterBraceExpansion(globPattern); for (String p : patterns) { if (isNoBraceGlobMatched(p, targetText)) return true; } return false; } | /** returns true iff the target matches the given pattern,
* under simplified bash rules -- viz permitting * and ? and comma delimited patterns inside curly braces
* @throws InvalidPatternException */ | returns true iff the target matches the given pattern, under simplified bash rules -- viz permitting * and ? and comma delimited patterns inside curly braces | isGlobMatched | {
"repo_name": "azharhashmi/brooklyn",
"path": "utils/common/src/main/java/brooklyn/util/text/WildcardGlobs.java",
"license": "apache-2.0",
"size": 18229
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,036,329 |
public BgpFlowSpecNlri bgpFlowSpecNlri() {
return this.bgpFlowSpecNlri;
} | BgpFlowSpecNlri function() { return this.bgpFlowSpecNlri; } | /**
* Returns BGP flow specification info.
*
* @return BGP flow specification info
*/ | Returns BGP flow specification info | bgpFlowSpecNlri | {
"repo_name": "wuwenbin2/onos_bgp_evpn",
"path": "protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MpReachNlri.java",
"license": "apache-2.0",
"size": 19959
} | [
"org.onosproject.bgpio.protocol.flowspec.BgpFlowSpecNlri"
] | import org.onosproject.bgpio.protocol.flowspec.BgpFlowSpecNlri; | import org.onosproject.bgpio.protocol.flowspec.*; | [
"org.onosproject.bgpio"
] | org.onosproject.bgpio; | 1,755,709 |
public int write(ByteBuffer buf, NioChannel socket, long writeTimeout,MutableInteger lastWrite) throws IOException {
SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector());
if ( key == null ) throw new IOException("Key no longer registered");
KeyReference reference... | int function(ByteBuffer buf, NioChannel socket, long writeTimeout,MutableInteger lastWrite) throws IOException { SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector()); if ( key == null ) throw new IOException(STR); KeyReference reference = new KeyReference(); KeyAttachment att = (KeyAttachme... | /**
* Performs a blocking write using the bytebuffer for data to be written
* If the <code>selector</code> parameter is null, then it will perform a busy write that could
* take up a lot of CPU cycles.
* @param buf ByteBuffer - the buffer containing the data, we will write as long as <code>(buf.hasR... | Performs a blocking write using the bytebuffer for data to be written If the <code>selector</code> parameter is null, then it will perform a busy write that could take up a lot of CPU cycles | write | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/NioBlockingSelector.java",
"license": "mit",
"size": 16755
} | [
"java.io.EOFException",
"java.io.IOException",
"java.net.SocketTimeoutException",
"java.nio.ByteBuffer",
"java.nio.channels.SelectionKey",
"java.util.concurrent.TimeUnit",
"org.apache.tomcat.util.MutableInteger",
"org.apache.tomcat.util.net.NioEndpoint"
] | import java.io.EOFException; import java.io.IOException; import java.net.SocketTimeoutException; import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.util.concurrent.TimeUnit; import org.apache.tomcat.util.MutableInteger; import org.apache.tomcat.util.net.NioEndpoint; | import java.io.*; import java.net.*; import java.nio.*; import java.nio.channels.*; import java.util.concurrent.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.net.*; | [
"java.io",
"java.net",
"java.nio",
"java.util",
"org.apache.tomcat"
] | java.io; java.net; java.nio; java.util; org.apache.tomcat; | 909,942 |
public List<String> asList() {
return new ArrayList<String>(attendees);
} | List<String> function() { return new ArrayList<String>(attendees); } | /**
* Converts this attendees container to a list of attendee URIs.
* @return a list of attendee URIs.
*/ | Converts this attendees container to a list of attendee URIs | asList | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/calendar/CalendarEventAttendees.java",
"license": "agpl-3.0",
"size": 4694
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,336,845 |
public void addModifier(final AbstractBubbleDecorator newmod) {
modifier = newmod.decorate(modifier);
} | void function(final AbstractBubbleDecorator newmod) { modifier = newmod.decorate(modifier); } | /**
* Add a modifier.
*
* @param newmod the modifier to add.
*/ | Add a modifier | addModifier | {
"repo_name": "JoshCode/SEM",
"path": "src/main/java/nl/joshuaslik/tudelft/SEM/control/gameObjects/Bubble.java",
"license": "apache-2.0",
"size": 15154
} | [
"nl.joshuaslik.tudelft.SEM"
] | import nl.joshuaslik.tudelft.SEM; | import nl.joshuaslik.tudelft.*; | [
"nl.joshuaslik.tudelft"
] | nl.joshuaslik.tudelft; | 1,980,952 |
@Test
public void testAccessingOnNullObject() throws Exception {
SpelExpression expr = (SpelExpression)parser.parseExpression("madeup");
EvaluationContext context = new StandardEvaluationContext(null);
try {
expr.getValue(context);
fail("Should have failed - default property resolver cannot resolve on n... | void function() throws Exception { SpelExpression expr = (SpelExpression)parser.parseExpression(STR); EvaluationContext context = new StandardEvaluationContext(null); try { expr.getValue(context); fail(STR); } catch (Exception e) { checkException(e,SpelMessage.PROPERTY_OR_FIELD_NOT_READABLE_ON_NULL); } assertFalse(expr... | /**
* The standard reflection resolver cannot find properties on null objects but some
* supplied resolver might be able to - so null shouldn't crash the reflection resolver.
*/ | The standard reflection resolver cannot find properties on null objects but some supplied resolver might be able to - so null shouldn't crash the reflection resolver | testAccessingOnNullObject | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-expression/src/test/java/org/springframework/expression/spel/PropertyAccessTests.java",
"license": "gpl-2.0",
"size": 7681
} | [
"org.junit.Assert",
"org.springframework.expression.EvaluationContext",
"org.springframework.expression.spel.standard.SpelExpression",
"org.springframework.expression.spel.support.StandardEvaluationContext"
] | import org.junit.Assert; import org.springframework.expression.EvaluationContext; import org.springframework.expression.spel.standard.SpelExpression; import org.springframework.expression.spel.support.StandardEvaluationContext; | import org.junit.*; import org.springframework.expression.*; import org.springframework.expression.spel.standard.*; import org.springframework.expression.spel.support.*; | [
"org.junit",
"org.springframework.expression"
] | org.junit; org.springframework.expression; | 928,989 |
public static void redirectFacesNewTab(String url) {
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
RequestContext context = RequestContext.getCurrentInstance();
context.execute("window.open('" + ec.getRequestContextPath() + url + "', '_newtab');");
} | static void function(String url) { ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); RequestContext context = RequestContext.getCurrentInstance(); context.execute(STR + ec.getRequestContextPath() + url + STR); } | /**
* *
* usar asi: FerFaces.redirectFaces("/faces/admin/acl/usuarioEdit.xhtml?id="
* + usuario.getId() ); dependiendo del uso, reemplazar el
* requestcontextpath con el sisVar del contexto
*
* @param url
*/ | usar asi: FerFaces.redirectFaces("/faces/admin/acl/usuarioEdit.xhtml?id=" + usuario.getId() ); dependiendo del uso, reemplazar el requestcontextpath con el sisVar del contexto | redirectFacesNewTab | {
"repo_name": "jsanga/proyecto_sp",
"path": "arduino_javaee7/src/main/java/com/jscompany/arduino_javaee7/util/JsfUti.java",
"license": "gpl-3.0",
"size": 7892
} | [
"javax.faces.context.ExternalContext",
"javax.faces.context.FacesContext",
"org.primefaces.context.RequestContext"
] | import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import org.primefaces.context.RequestContext; | import javax.faces.context.*; import org.primefaces.context.*; | [
"javax.faces",
"org.primefaces.context"
] | javax.faces; org.primefaces.context; | 161,721 |
public Logger getLogger() {
return logger;
} | Logger function() { return logger; } | /**
* Gets the logger.
*
* @return the logger
*/ | Gets the logger | getLogger | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/controls/OSPLog.java",
"license": "gpl-3.0",
"size": 36229
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,223,302 |
public Report intersect(Report report) {
Report result;
Hashtable<AbstractField,Object> params;
result = newInstance(report);
if (result != null) {
params = new Hashtable<>();
for (AbstractField key: getFields()) {
if (report.hasValue(key))
params.put(key, getValue(key));
}
... | Report function(Report report) { Report result; Hashtable<AbstractField,Object> params; result = newInstance(report); if (result != null) { params = new Hashtable<>(); for (AbstractField key: getFields()) { if (report.hasValue(key)) params.put(key, getValue(key)); } result.setParams(params); } return result; } | /**
* Returns the intersection with this Quantitation Report and the provided
* one. The result contains the values of this quantitation report. No
* merging of values between the two is performed.
*
* @param report the report to get the intersection with
* @return the intersection
*/ | Returns the intersection with this Quantitation Report and the provided one. The result contains the values of this quantitation report. No merging of values between the two is performed | intersect | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/data/report/Report.java",
"license": "gpl-3.0",
"size": 23222
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 2,076,008 |
public static Test suite() {
return new TestSuite(CorrelationMatrixTest.class);
} | static Test function() { return new TestSuite(CorrelationMatrixTest.class); } | /**
* Returns a test suite.
*
* @return the suite
*/ | Returns a test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-weka/src/test/java/weka/filters/unsupervised/attribute/CorrelationMatrixTest.java",
"license": "gpl-3.0",
"size": 5083
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,211,537 |
private ArrayNode getResourcesInfo() {
if (resourcesInfo != null)
return resourcesInfo;
final ArrayNode resources = SpecObjectMapper.getInstance().createArrayNode();
for (Resource res : this.getSpec().getResources())
resources.add(getResourceInfo(res));
res... | ArrayNode function() { if (resourcesInfo != null) return resourcesInfo; final ArrayNode resources = SpecObjectMapper.getInstance().createArrayNode(); for (Resource res : this.getSpec().getResources()) resources.add(getResourceInfo(res)); resourcesInfo = resources; return resources; } | /**
* Shortcut to collect the information about all the resources.
*/ | Shortcut to collect the information about all the resources | getResourcesInfo | {
"repo_name": "inad9300/RESTyle",
"path": "Engine/src/main/java/es/berry/restyle/generators/AngularJs.java",
"license": "agpl-3.0",
"size": 8013
} | [
"com.fasterxml.jackson.databind.node.ArrayNode",
"es.berry.restyle.specification.SpecObjectMapper",
"es.berry.restyle.specification.generated.Resource"
] | import com.fasterxml.jackson.databind.node.ArrayNode; import es.berry.restyle.specification.SpecObjectMapper; import es.berry.restyle.specification.generated.Resource; | import com.fasterxml.jackson.databind.node.*; import es.berry.restyle.specification.*; import es.berry.restyle.specification.generated.*; | [
"com.fasterxml.jackson",
"es.berry.restyle"
] | com.fasterxml.jackson; es.berry.restyle; | 566,640 |
public void onSavedCertificate() {
Fragment fd = getSupportFragmentManager().findFragmentByTag(SAML_DIALOG_TAG);
if (fd == null) {
// if SAML dialog is not shown,
// the SslDialog was shown due to an SSL error in the server check
checkOcServer();
}
... | void function() { Fragment fd = getSupportFragmentManager().findFragmentByTag(SAML_DIALOG_TAG); if (fd == null) { checkOcServer(); } } | /**
* Called from SslValidatorDialog when a new server certificate was correctly saved.
*/ | Called from SslValidatorDialog when a new server certificate was correctly saved | onSavedCertificate | {
"repo_name": "joansmith/android",
"path": "src/com/owncloud/android/authentication/AuthenticatorActivity.java",
"license": "gpl-2.0",
"size": 76569
} | [
"android.support.v4.app.Fragment"
] | import android.support.v4.app.Fragment; | import android.support.v4.app.*; | [
"android.support"
] | android.support; | 1,676,128 |
@Override
public Instances getStructure() throws IOException {
if (m_DataBaseConnection == null) {
throw new IOException("No source database has been specified");
}
connectToDatabase();
pseudo: try {
if (m_pseudoIncremental && m_structure == null) {
if (getRetrieval() == BATCH)... | Instances function() throws IOException { if (m_DataBaseConnection == null) { throw new IOException(STR); } connectToDatabase(); pseudo: try { if (m_pseudoIncremental && m_structure == null) { if (getRetrieval() == BATCH) { throw new IOException( STR); } setRetrieval(NONE); m_datasetPseudoInc = getDataSet(); m_structur... | /**
* Determines and returns (if possible) the structure (internally the header)
* of the data set as an empty set of instances.
*
* @return the structure of the data set as an empty set of Instances
* @throws IOException if an error occurs
*/ | Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances | getStructure | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/core/converters/DatabaseLoader.java",
"license": "gpl-3.0",
"size": 53542
} | [
"java.io.IOException",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.Hashtable"
] | import java.io.IOException; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.ArrayList; import java.util.Hashtable; | import java.io.*; import java.sql.*; import java.util.*; | [
"java.io",
"java.sql",
"java.util"
] | java.io; java.sql; java.util; | 2,211,269 |
@Override
public ClassDescriptor getLeafDescriptor(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session) {
// The base case
// The following special case is where there is a parallel builder
// which has a different reference class as the primary builder.
... | ClassDescriptor function(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session) { Class queryClass = getQueryClass(); if ((queryClass != null) && ((query == null) (queryClass != query.getReferenceClass()))) { return convertToCastDescriptor( session.getDescriptor(queryClass), session); } return co... | /**
* INTERNAL:
* Lookup the descriptor for this item by traversing its expression recursively.
*/ | Lookup the descriptor for this item by traversing its expression recursively | getLeafDescriptor | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/expressions/ExpressionBuilder.java",
"license": "epl-1.0",
"size": 19037
} | [
"org.eclipse.persistence.descriptors.ClassDescriptor",
"org.eclipse.persistence.internal.sessions.AbstractSession",
"org.eclipse.persistence.queries.DatabaseQuery"
] | import org.eclipse.persistence.descriptors.ClassDescriptor; import org.eclipse.persistence.internal.sessions.AbstractSession; import org.eclipse.persistence.queries.DatabaseQuery; | import org.eclipse.persistence.descriptors.*; import org.eclipse.persistence.internal.sessions.*; import org.eclipse.persistence.queries.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 287,605 |
@Test
public final void testThatNumberOfFieldsIsCorrectlyReturnedIfTableIncludesHTML5Tags() {
assertThat(page.referenceTable.getRow(HEADER).getNumberOfFields(), is(3));
assertThat(page.referenceTable.getRow(ROW_ONE).getNumberOfFields(), is(3));
} | final void function() { assertThat(page.referenceTable.getRow(HEADER).getNumberOfFields(), is(3)); assertThat(page.referenceTable.getRow(ROW_ONE).getNumberOfFields(), is(3)); } | /**
* This test verifies that rows of modern tables with the thead, tbody and
* tfoot tags can be accessed and the number of fields is returned.
*/ | This test verifies that rows of modern tables with the thead, tbody and tfoot tags can be accessed and the number of fields is returned | testThatNumberOfFieldsIsCorrectlyReturnedIfTableIncludesHTML5Tags | {
"repo_name": "dbe-it/webtester-core",
"path": "webtester-core/src/test/java/integration/pageobjects/TableIntegrationTest.java",
"license": "apache-2.0",
"size": 7141
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,718,962 |
@GET
@Produces(MediaType.APPLICATION_JSON)
@Path("minisummary")
public Response getIntentSummary() {
final Iterable<Intent> intents = get(IntentService.class).getIntents();
ObjectNode root = mapper().createObjectNode();
IntentMiniSummary intentminisummary = new IntentMiniSummary(... | @Produces(MediaType.APPLICATION_JSON) @Path(STR) Response function() { final Iterable<Intent> intents = get(IntentService.class).getIntents(); ObjectNode root = mapper().createObjectNode(); IntentMiniSummary intentminisummary = new IntentMiniSummary(); Map<String, IntentMiniSummary> map = intentminisummary.summarize(in... | /**
* Gets Summary of all intents.
* Returns Summary of the intents in the system.
*
* @return 200 OK with Summary of all the intents in the system
* @onos.rsModel Minisummary
*/ | Gets Summary of all intents. Returns Summary of the intents in the system | getIntentSummary | {
"repo_name": "opennetworkinglab/onos",
"path": "web/api/src/main/java/org/onosproject/rest/resources/IntentsWebResource.java",
"license": "apache-2.0",
"size": 14277
} | [
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.util.Map",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.onosproject.net.intent.Intent",
"org.onosproject.net.intent.IntentService",
"org.onosproject.net.intent.util.IntentMiniSummar... | import com.fasterxml.jackson.databind.node.ObjectNode; import java.util.Map; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentService; import org.onosproject.net.in... | import com.fasterxml.jackson.databind.node.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.net.intent.*; import org.onosproject.net.intent.util.*; | [
"com.fasterxml.jackson",
"java.util",
"javax.ws",
"org.onosproject.net"
] | com.fasterxml.jackson; java.util; javax.ws; org.onosproject.net; | 2,228,983 |
public Observable<ServiceResponse<Void>> deleteOwnershipIdentifierWithServiceResponseAsync(String resourceGroupName, String domainName, String name) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String domainName, String name) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (domainName == null) { throw new IllegalArgumentException(STR); } if (name == null) { throw new IllegalArgumentException(STR); } if (this.... | /**
* Delete ownership identifier for domain.
* Delete ownership identifier for domain.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param domainName Name of domain.
* @param name Name of identifier.
* @throws IllegalArgumentException throw... | Delete ownership identifier for domain. Delete ownership identifier for domain | deleteOwnershipIdentifierWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DomainsInner.java",
"license": "mit",
"size": 139463
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,340,435 |
List<Node> getNode();
| List<Node> getNode(); | /**
* Returns the value of the '<em><b>Node</b></em>' containment reference list.
* The list contents are of type {@link es.itecban.deployment.model.dependency.graph.Node}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Node</em>' containment reference list isn't clear,
* there really sh... | Returns the value of the 'Node' containment reference list. The list contents are of type <code>es.itecban.deployment.model.dependency.graph.Node</code>. If the meaning of the 'Node' containment reference list isn't clear, there really should be more of a description here... | getNode | {
"repo_name": "iLabrys/iLabrysOSGi",
"path": "es.itecban.deployment.model.software/src/es/itecban/deployment/model/dependency/graph/DependencyGraph.java",
"license": "apache-2.0",
"size": 3710
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 689,631 |
private List<ConstrainedParameter> getParameterMetaData(ExecutableElement executable) {
List<ConstrainedParameter> metaData = newArrayList();
List<String> parameterNames = executable.getParameterNames( parameterNameProvider );
int i = 0;
for ( Annotation[] parameterAnnotations : executable.getParameterAnnot... | List<ConstrainedParameter> function(ExecutableElement executable) { List<ConstrainedParameter> metaData = newArrayList(); List<String> parameterNames = executable.getParameterNames( parameterNameProvider ); int i = 0; for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) { boolean parameterIs... | /**
* Retrieves constraint related meta data for the parameters of the given
* executable.
*
* @param executable The executable of interest.
*
* @return A list with parameter meta data for the given executable.
*/ | Retrieves constraint related meta data for the parameters of the given executable | getParameterMetaData | {
"repo_name": "mxrenkin/hibernate-validator",
"path": "engine/src/main/java/org/hibernate/validator/internal/metadata/provider/AnnotationMetaDataProvider.java",
"license": "apache-2.0",
"size": 26899
} | [
"java.lang.annotation.Annotation",
"java.lang.annotation.ElementType",
"java.util.List",
"java.util.Set",
"javax.validation.Valid",
"javax.validation.groups.ConvertGroup",
"org.hibernate.validator.internal.engine.valuehandling.UnwrapMode",
"org.hibernate.validator.internal.metadata.core.MetaConstraint... | import java.lang.annotation.Annotation; import java.lang.annotation.ElementType; import java.util.List; import java.util.Set; import javax.validation.Valid; import javax.validation.groups.ConvertGroup; import org.hibernate.validator.internal.engine.valuehandling.UnwrapMode; import org.hibernate.validator.internal.metad... | import java.lang.annotation.*; import java.util.*; import javax.validation.*; import javax.validation.groups.*; import org.hibernate.validator.internal.engine.valuehandling.*; import org.hibernate.validator.internal.metadata.core.*; import org.hibernate.validator.internal.metadata.descriptor.*; import org.hibernate.val... | [
"java.lang",
"java.util",
"javax.validation",
"org.hibernate.validator"
] | java.lang; java.util; javax.validation; org.hibernate.validator; | 399,913 |
@Test
public void testNonExistantSpecifiedSheetName() throws Exception {
testRunner.setProperty(ConvertExcelToCSVProcessor.DESIRED_SHEETS, "NopeIDoNotExist");
testRunner.enqueue(new File("src/test/resources/CollegeScorecard.xlsx").toPath());
testRunner.run();
testRunner.assertT... | void function() throws Exception { testRunner.setProperty(ConvertExcelToCSVProcessor.DESIRED_SHEETS, STR); testRunner.enqueue(new File(STR).toPath()); testRunner.run(); testRunner.assertTransferCount(ConvertExcelToCSVProcessor.SUCCESS, 0); testRunner.assertTransferCount(ConvertExcelToCSVProcessor.ORIGINAL, 1); testRunn... | /**
* Tests for a syntactically valid Excel XSSF document with a manually specified Excel sheet that does not exist.
* In this scenario only the Original relationship should be invoked.
*
* @throws Exception
* Any exception thrown during execution.
*/ | Tests for a syntactically valid Excel XSSF document with a manually specified Excel sheet that does not exist. In this scenario only the Original relationship should be invoked | testNonExistantSpecifiedSheetName | {
"repo_name": "tijoparacka/nifi",
"path": "nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/test/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessorTest.java",
"license": "apache-2.0",
"size": 15498
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,618,371 |
int updateByExample(@Param("record") Role record, @Param("example") RoleExample example); | int updateByExample(@Param(STR) Role record, @Param(STR) RoleExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table s_roles
*
* @mbggenerated Thu Jul 16 10:50:11 ICT 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table s_roles | updateByExample | {
"repo_name": "uniteddiversity/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/user/dao/RoleMapper.java",
"license": "agpl-3.0",
"size": 4544
} | [
"com.esofthead.mycollab.module.user.domain.Role",
"com.esofthead.mycollab.module.user.domain.RoleExample",
"org.apache.ibatis.annotations.Param"
] | import com.esofthead.mycollab.module.user.domain.Role; import com.esofthead.mycollab.module.user.domain.RoleExample; import org.apache.ibatis.annotations.Param; | import com.esofthead.mycollab.module.user.domain.*; import org.apache.ibatis.annotations.*; | [
"com.esofthead.mycollab",
"org.apache.ibatis"
] | com.esofthead.mycollab; org.apache.ibatis; | 1,186,898 |
public void load(String X) throws FileNotFoundException
{
HashMap<String, Book> temp;
FileReader file = new FileReader(X);
Scanner text = new Scanner(file);
text.useDelimiter(",");
while(text.hasNext())
{
String callNumber = text.next();
String title = text.next();
newBook = new ... | void function(String X) throws FileNotFoundException { HashMap<String, Book> temp; FileReader file = new FileReader(X); Scanner text = new Scanner(file); text.useDelimiter(","); while(text.hasNext()) { String callNumber = text.next(); String title = text.next(); newBook = new Book(title, callNumber, currentDate); newBo... | /**
* Loads the books into the HashMap from a txt file.
* @param X
* @throws FileNotFoundException
*/ | Loads the books into the HashMap from a txt file | load | {
"repo_name": "katherineobioha/TestLib",
"path": "src/LibrarySystem.java",
"license": "epl-1.0",
"size": 3054
} | [
"java.io.FileNotFoundException",
"java.io.FileReader",
"java.util.HashMap",
"java.util.Scanner"
] | import java.io.FileNotFoundException; import java.io.FileReader; import java.util.HashMap; import java.util.Scanner; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,510,871 |
View getToolbarButton(iWidget context, PushButton cfg);
| View getToolbarButton(iWidget context, PushButton cfg); | /**
* Gets a toolbar button view
*
* @param context the widget context
* @param cfg the configuration
*
* @return the view
*/ | Gets a toolbar button view | getToolbarButton | {
"repo_name": "appnativa/rare",
"path": "source/rare/apple/com/appnativa/rare/ui/iPlatformComponentFactory.java",
"license": "gpl-3.0",
"size": 5280
} | [
"com.appnativa.rare.platform.apple.ui.view.View",
"com.appnativa.rare.spot.PushButton"
] | import com.appnativa.rare.platform.apple.ui.view.View; import com.appnativa.rare.spot.PushButton; | import com.appnativa.rare.platform.apple.ui.view.*; import com.appnativa.rare.spot.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 843,068 |
public Object remove(DatabaseField key) {
return XPathEngine.getInstance().remove(convertToXMLField(key), dom, true);
} | Object function(DatabaseField key) { return XPathEngine.getInstance().remove(convertToXMLField(key), dom, true); } | /**
* INTERNAL:
* Remove the field key from the row.
*/ | Remove the field key from the row | remove | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/record/DOMRecord.java",
"license": "epl-1.0",
"size": 29768
} | [
"org.eclipse.persistence.internal.helper.DatabaseField",
"org.eclipse.persistence.internal.oxm.XPathEngine"
] | import org.eclipse.persistence.internal.helper.DatabaseField; import org.eclipse.persistence.internal.oxm.XPathEngine; | import org.eclipse.persistence.internal.helper.*; import org.eclipse.persistence.internal.oxm.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,560,948 |
public static Level valueOf(final String name) {
Objects.requireNonNull(name, "No level name given.");
final String levelName = name.toUpperCase(Locale.ENGLISH);
final Level level = LEVELS.get(levelName);
if (level != null) {
return level;
}
throw new Ille... | static Level function(final String name) { Objects.requireNonNull(name, STR); final String levelName = name.toUpperCase(Locale.ENGLISH); final Level level = LEVELS.get(levelName); if (level != null) { return level; } throw new IllegalArgumentException(STR + levelName + "]."); } /** * Returns the enum constant of the sp... | /**
* Return the Level associated with the name.
*
* @param name The name of the Level to return.
* @return The Level.
* @throws java.lang.NullPointerException if the Level name is {@code null}.
* @throws java.lang.IllegalArgumentException if the Level name is not registered.
*/ | Return the Level associated with the name | valueOf | {
"repo_name": "MagicWiz/log4j2",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/Level.java",
"license": "apache-2.0",
"size": 11191
} | [
"java.util.Locale",
"java.util.Objects"
] | import java.util.Locale; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,335,792 |
public static File leftShift(File file, byte[] bytes) throws IOException {
append(file, bytes);
return file;
}
/**
* Append binary data to the file. See {@link #append(java.io.File, java.io.InputStream)} | static File function(File file, byte[] bytes) throws IOException { append(file, bytes); return file; } /** * Append binary data to the file. See {@link #append(java.io.File, java.io.InputStream)} | /**
* Write bytes to a File.
*
* @param file a File
* @param bytes the byte array to append to the end of the File
* @return the original file
* @throws IOException if an IOException occurs.
* @since 1.5.0
*/ | Write bytes to a File | leftShift | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"java.io.File",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.File; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,416,111 |
private void sendResponse(HttpServletRequest req, HttpServletResponse resp, String relayState,
String response, String acUrl, String subject, String authenticatedIdPs,
String tenantDomain)
throws ServletException, IOException, IdentityException... | void function(HttpServletRequest req, HttpServletResponse resp, String relayState, String response, String acUrl, String subject, String authenticatedIdPs, String tenantDomain) throws ServletException, IOException, IdentityException { acUrl = getACSUrlWithTenantPartitioning(acUrl, tenantDomain); if (acUrl == null acUrl... | /**
* Sends the Response message back to the Service Provider.
*
* @param req
* @param resp
* @param relayState
* @param response
* @param acUrl
* @param subject
* @throws ServletException
* @throws IOException
*/ | Sends the Response message back to the Service Provider | sendResponse | {
"repo_name": "liurl3/carbon-identity",
"path": "components/sso-saml/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java",
"license": "apache-2.0",
"size": 44629
} | [
"java.io.IOException",
"java.io.PrintWriter",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.owasp.encoder.Encode",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.identity.sso.saml.internal.IdentitySAMLSSOS... | import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.owasp.encoder.Encode; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.sso.saml.in... | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.owasp.encoder.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.sso.saml.internal.*; | [
"java.io",
"javax.servlet",
"org.owasp.encoder",
"org.wso2.carbon"
] | java.io; javax.servlet; org.owasp.encoder; org.wso2.carbon; | 1,499,448 |
@ApiModelProperty(example = "CalculatorAPI", value = "")
public String getContext() {
return context;
} | @ApiModelProperty(example = STR, value = "") String function() { return context; } | /**
* Get context
* @return context
**/ | Get context | getContext | {
"repo_name": "dewmini/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/gen/java/org/wso2/carbon/apimgt/rest/api/publisher/dto/APIInfoDTO.java",
"license": "apache-2.0",
"size": 6752
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 11,054 |
protected ComponentAdapter prepDEF_isAbleToTakeParameters(MutablePicoContainer picoContainer) {
final Class type = getComponentAdapterType();
boolean hasParameters = supportsParameters(type);
if (hasParameters) {
fail("You have to overwrite this method for a useful test");
... | ComponentAdapter function(MutablePicoContainer picoContainer) { final Class type = getComponentAdapterType(); boolean hasParameters = supportsParameters(type); if (hasParameters) { fail(STR); } return null; } | /**
* Prepare the test <em>isAbleToTakeParameters</em>. Overload this function, if the ComponentAdapter to test
* supports {@link Parameter}.
*
* @param picoContainer container, may probably not be used.
* @return a ComponentAdapter of the type to test. Select a component, that has some parame... | Prepare the test isAbleToTakeParameters. Overload this function, if the ComponentAdapter to test supports <code>Parameter</code> | prepDEF_isAbleToTakeParameters | {
"repo_name": "picocontainer/PicoContainer1",
"path": "container/src/test/org/picocontainer/tck/AbstractComponentAdapterTestCase.java",
"license": "bsd-3-clause",
"size": 32438
} | [
"org.picocontainer.ComponentAdapter",
"org.picocontainer.MutablePicoContainer"
] | import org.picocontainer.ComponentAdapter; import org.picocontainer.MutablePicoContainer; | import org.picocontainer.*; | [
"org.picocontainer"
] | org.picocontainer; | 450,379 |
public void valueReceived(String variable, State value); | void function(String variable, State value); | /**
* Invoked when value is received from the TV.
*
* @param variable Name of the variable.
* @param value Value of the variable value.
*/ | Invoked when value is received from the TV | valueReceived | {
"repo_name": "cdjackson/openhab2",
"path": "addons/binding/org.openhab.binding.samsungtv/src/main/java/org/openhab/binding/samsungtv/internal/service/api/ValueReceiver.java",
"license": "epl-1.0",
"size": 812
} | [
"org.eclipse.smarthome.core.types.State"
] | import org.eclipse.smarthome.core.types.State; | import org.eclipse.smarthome.core.types.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 1,517,927 |
public static void main(String[] args)
{
String test = "[[code,name,price],[abc,Apples,$2.50],[xyz,Whiz-Bang \\[you\\, and everyone\\, will love it!\\],$13.99]]";
System.out.println("Reading in table...");
TableData table = InlineTable.parseTable(test);
System.out.println("...fin... | static void function(String[] args) { String test = STR; System.out.println(STR); TableData table = InlineTable.parseTable(test); System.out.println(STR); String[] labels = table.getColumnLabels(); Map<String,Object> record; while (table.hasNext()) { record = table.nextRecord(); for (int i=0; i<labels.length; i++) { if... | /**
* for testing...
*/ | for testing.. | main | {
"repo_name": "hubcarl/android-html-engine",
"path": "src/com/x5/template/InlineTable.java",
"license": "mit",
"size": 4995
} | [
"com.x5.util.TableData",
"java.util.Map"
] | import com.x5.util.TableData; import java.util.Map; | import com.x5.util.*; import java.util.*; | [
"com.x5.util",
"java.util"
] | com.x5.util; java.util; | 995,827 |
public Cancellable getUsersAsync(GetUsersRequest request, RequestOptions options, ActionListener<GetUsersResponse> listener) {
return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverters::getUsers, options,
GetUsersResponse::fromXContent, listener, emptySet())... | Cancellable function(GetUsersRequest request, RequestOptions options, ActionListener<GetUsersResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverters::getUsers, options, GetUsersResponse::fromXContent, listener, emptySet()); } | /**
* Get a user, or list of users, in the native realm asynchronously.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-user.html">
* the docs</a> for more information.
* @param request the request with the user's name
* @param options the request... | Get a user, or list of users, in the native realm asynchronously. See the docs for more information | getUsersAsync | {
"repo_name": "coding0011/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/SecurityClient.java",
"license": "apache-2.0",
"size": 62531
} | [
"java.util.Collections",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.client.security.GetUsersRequest",
"org.elasticsearch.client.security.GetUsersResponse"
] | import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.security.GetUsersRequest; import org.elasticsearch.client.security.GetUsersResponse; | import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.security.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.client"
] | java.util; org.elasticsearch.action; org.elasticsearch.client; | 18,373 |
private DataCallResponse.SetupResult onSetupConnectionCompleted(AsyncResult ar) {
DataCallResponse response = (DataCallResponse) ar.result;
ConnectionParams cp = (ConnectionParams) ar.userObj;
DataCallResponse.SetupResult result;
if (cp.mTag != mTag) {
if (DBG) {
... | DataCallResponse.SetupResult function(AsyncResult ar) { DataCallResponse response = (DataCallResponse) ar.result; ConnectionParams cp = (ConnectionParams) ar.userObj; DataCallResponse.SetupResult result; if (cp.mTag != mTag) { if (DBG) { log(STR + cp.mTag + STR + mTag); } result = DataCallResponse.SetupResult.ERR_Stale... | /**
* Process setup completion.
*
* @param ar is the result
* @return SetupResult.
*/ | Process setup completion | onSetupConnectionCompleted | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java",
"license": "gpl-3.0",
"size": 90991
} | [
"android.os.AsyncResult",
"com.android.internal.telephony.CommandException"
] | import android.os.AsyncResult; import com.android.internal.telephony.CommandException; | import android.os.*; import com.android.internal.telephony.*; | [
"android.os",
"com.android.internal"
] | android.os; com.android.internal; | 1,262,092 |
@SuppressWarnings("unchecked")
@CheckForNull
public static <T, C extends Credentials> T convert(@NonNull Class<T> type, @CheckForNull C credentials) {
if (credentials == null) {
return null;
}
return convert(new AuthenticationTokenContext<T>(type), credentials);
} | @SuppressWarnings(STR) static <T, C extends Credentials> T function(@NonNull Class<T> type, @CheckForNull C credentials) { if (credentials == null) { return null; } return convert(new AuthenticationTokenContext<T>(type), credentials); } | /**
* Converts the supplied credentials into the specified token.
*
* @param type the type of token to convert to.
* @param credentials the credentials instance to convert.
* @param <T> the type of token to convert to.
* @param <C> the type of credentials to convert,... | Converts the supplied credentials into the specified token | convert | {
"repo_name": "jenkinsci/authentication-tokens-plugin",
"path": "src/main/java/jenkins/authentication/tokens/api/AuthenticationTokens.java",
"license": "mit",
"size": 10590
} | [
"com.cloudbees.plugins.credentials.Credentials",
"edu.umd.cs.findbugs.annotations.CheckForNull",
"edu.umd.cs.findbugs.annotations.NonNull"
] | import com.cloudbees.plugins.credentials.Credentials; import edu.umd.cs.findbugs.annotations.CheckForNull; import edu.umd.cs.findbugs.annotations.NonNull; | import com.cloudbees.plugins.credentials.*; import edu.umd.cs.findbugs.annotations.*; | [
"com.cloudbees.plugins",
"edu.umd.cs"
] | com.cloudbees.plugins; edu.umd.cs; | 2,205,001 |
@Test
public void queuedVideosTest() throws ApiException {
String factoryId = null;
Integer page = null;
Integer perPage = null;
PaginatedVideoCollection response = api.queuedVideos(factoryId, page, perPage);
// TODO: test validations
} | void function() throws ApiException { String factoryId = null; Integer page = null; Integer perPage = null; PaginatedVideoCollection response = api.queuedVideos(factoryId, page, perPage); } | /**
* Returns a collection of Video objects queued for encoding.
*
*
*
* @throws ApiException
* if the Api call fails
*/ | Returns a collection of Video objects queued for encoding | queuedVideosTest | {
"repo_name": "Telestream/telestream-cloud-java-sdk",
"path": "telestream-cloud-flip-sdk/src/test/java/net/telestream/cloud/flip/FlipApiTest.java",
"license": "mit",
"size": 19356
} | [
"net.telestream.cloud.flip.ApiException",
"net.telestream.cloud.flip.PaginatedVideoCollection"
] | import net.telestream.cloud.flip.ApiException; import net.telestream.cloud.flip.PaginatedVideoCollection; | import net.telestream.cloud.flip.*; | [
"net.telestream.cloud"
] | net.telestream.cloud; | 2,351,318 |
void setVariablesLocal(String executionId, Map<String, ? extends Object> variables); | void setVariablesLocal(String executionId, Map<String, ? extends Object> variables); | /**
* Update or create given variables for an execution (not considering parent
* scopes). If the variables are not already existing, it will be created in
* the given execution.
*
* @param executionId
* id of the execution, cannot be null.
* @param variables
* map containing ... | Update or create given variables for an execution (not considering parent scopes). If the variables are not already existing, it will be created in the given execution | setVariablesLocal | {
"repo_name": "ahwxl/deep",
"path": "src/main/java/org/activiti/engine/RuntimeService.java",
"license": "apache-2.0",
"size": 40262
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,092,072 |
@Override
public void setAsciiStream(String parameterName,
InputStream x, int length) throws SQLException {
setAsciiStream(getIndexForName(parameterName), x, length);
} | void function(String parameterName, InputStream x, int length) throws SQLException { setAsciiStream(getIndexForName(parameterName), x, length); } | /**
* Sets the value of a parameter as an ASCII stream.
* This method does not close the stream.
* The stream may be closed after executing the statement.
*
* @param parameterName the parameter name
* @param x the value
* @param length the maximum number of bytes
* @throws SQLExc... | Sets the value of a parameter as an ASCII stream. This method does not close the stream. The stream may be closed after executing the statement | setAsciiStream | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/jdbc/JdbcCallableStatement.java",
"license": "apache-2.0",
"size": 53148
} | [
"java.io.InputStream",
"java.sql.SQLException"
] | import java.io.InputStream; import java.sql.SQLException; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 2,447,716 |
RedisFuture<List<String>> configGet(String parameter); | RedisFuture<List<String>> configGet(String parameter); | /**
* Get the value of a configuration parameter.
*
* @param parameter name of the parameter
* @return List<String> bulk-string-reply
*/ | Get the value of a configuration parameter | configGet | {
"repo_name": "mp911de/spinach",
"path": "src/main/java/biz/paluch/spinach/api/async/DisqueServerAsyncCommands.java",
"license": "apache-2.0",
"size": 6567
} | [
"com.lambdaworks.redis.RedisFuture",
"java.util.List"
] | import com.lambdaworks.redis.RedisFuture; import java.util.List; | import com.lambdaworks.redis.*; import java.util.*; | [
"com.lambdaworks.redis",
"java.util"
] | com.lambdaworks.redis; java.util; | 2,010,905 |
public Iterator<Entry<Double, Double>> weightedValuesIterator() {
return valueMap.entrySet().iterator();
}
| Iterator<Entry<Double, Double>> function() { return valueMap.entrySet().iterator(); } | /**
* Returns an iterator over entries each consisting of a value and its weight.
*/ | Returns an iterator over entries each consisting of a value and its weight | weightedValuesIterator | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/tools/container/ValueSet.java",
"license": "agpl-3.0",
"size": 2713
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,394,589 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDeleteMongoDBDatabase(
String resourceGroupName, String accountName, String databaseName); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> beginDeleteMongoDBDatabase( String resourceGroupName, String accountName, String databaseName); | /**
* Deletes an existing Azure Cosmos DB MongoDB database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @throws IllegalArgumentException thr... | Deletes an existing Azure Cosmos DB MongoDB database | beginDeleteMongoDBDatabase | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java",
"license": "mit",
"size": 104176
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 1,805,553 |
public void addExpression(Expression expression) {
this.expression = ExpressionUtilities.getAndExpression(this.expression, expression);
}
| void function(Expression expression) { this.expression = ExpressionUtilities.getAndExpression(this.expression, expression); } | /**
* Adds the given <code>Expression</code> to this <code>Criteria</code>
* using AND logical operator.
*
* @param expression
* The expression to add.
*/ | Adds the given <code>Expression</code> to this <code>Criteria</code> using AND logical operator | addExpression | {
"repo_name": "Esleelkartea/aon-employee",
"path": "aonemployee_v2.3.0_src/paquetes descomprimidos/aon.ql-1.9.15-sources/com/code/aon/ql/Criteria.java",
"license": "gpl-2.0",
"size": 7879
} | [
"com.code.aon.ql.ast.Expression",
"com.code.aon.ql.util.ExpressionUtilities"
] | import com.code.aon.ql.ast.Expression; import com.code.aon.ql.util.ExpressionUtilities; | import com.code.aon.ql.ast.*; import com.code.aon.ql.util.*; | [
"com.code.aon"
] | com.code.aon; | 1,053,398 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.