method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void testTransientBlobCleanup(@Nullable final JobID jobId)
throws IOException, InterruptedException, ExecutionException {
// 1s should be a safe-enough buffer to still check for existence after a BLOB's last access
long cleanupInterval = 1L; // in seconds
final int numbe... | void function(@Nullable final JobID jobId) throws IOException, InterruptedException, ExecutionException { long cleanupInterval = 1L; final int numberConcurrentGetOperations = 3; final List<CompletableFuture<Void>> getOperations = new ArrayList<>(numberConcurrentGetOperations); byte[] data = createRandomData(); byte[] d... | /**
* Tests that {@link TransientBlobCache} cleans up after a default TTL and keeps files which are
* constantly accessed.
*/ | Tests that <code>TransientBlobCache</code> cleans up after a default TTL and keeps files which are constantly accessed | testTransientBlobCleanup | {
"repo_name": "apache/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobServerCleanupTest.java",
"license": "apache-2.0",
"size": 21479
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.CompletionException",
"java.util.concurrent.ConcurrentMap",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.ExecutorService",
"ja... | import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ExecutionException; import java.util.concurre... | import java.io.*; import java.util.*; import java.util.concurrent.*; import javax.annotation.*; import org.apache.flink.api.common.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.runtime.blob.*; import org.apache.flink.util.*; import org.apache.flink.util.concurrent.*; import org.assertj.core.api.*... | [
"java.io",
"java.util",
"javax.annotation",
"org.apache.flink",
"org.assertj.core"
] | java.io; java.util; javax.annotation; org.apache.flink; org.assertj.core; | 1,258,916 |
public void actionPerformed(ActionEvent e) {
String cmd = e.getActionCommand();
if (cmd.equals("eval")) {
// Clear the text area...
this.textarea.setText("");
// If user clicked "validate" button
if(checkNewForm())
this.validateFile();
}else if(cmd.equals("test")) {
// Clear the text ar... | void function(ActionEvent e) { String cmd = e.getActionCommand(); if (cmd.equals("eval")) { this.textarea.setText(STRtestSTRSTRERROR: Please fix parameters on the settings screen!STR\n\nERROR: cannot launch emulator until file validates!STRsummarySTRSTR\n\nERROR: cannot launch emulator until file validates!STRdeploySTR... | /**
* Handle button clicks
*/ | Handle button clicks | actionPerformed | {
"repo_name": "wpride/javarosa",
"path": "util/validator/org.javarosa.xform.validator/src/org/javarosa/xform/validator/gui/XFormValidatorGUI.java",
"license": "apache-2.0",
"size": 41545
} | [
"java.awt.FileDialog",
"java.awt.event.ActionEvent"
] | import java.awt.FileDialog; import java.awt.event.ActionEvent; | import java.awt.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,810,784 |
public static Class type(Field field) {
return field.getType();
} | static Class function(Field field) { return field.getType(); } | /**
* Returns the type of the Field object.
*
* @param field Field for which type is returned
* @return type of the given field
*/ | Returns the type of the Field object | type | {
"repo_name": "haitaoyao/btrace",
"path": "src/share/classes/com/sun/btrace/BTraceUtils.java",
"license": "gpl-2.0",
"size": 234341
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,734,001 |
public ApplicationGatewayRewriteRule withConditions(List<ApplicationGatewayRewriteRuleCondition> conditions) {
this.conditions = conditions;
return this;
} | ApplicationGatewayRewriteRule function(List<ApplicationGatewayRewriteRuleCondition> conditions) { this.conditions = conditions; return this; } | /**
* Set conditions based on which the action set execution will be evaluated.
*
* @param conditions the conditions value to set
* @return the ApplicationGatewayRewriteRule object itself.
*/ | Set conditions based on which the action set execution will be evaluated | withConditions | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/ApplicationGatewayRewriteRule.java",
"license": "mit",
"size": 3691
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,485,394 |
Ignition.start("examples/config/filesystem/example-igfs.xml");
} | Ignition.start(STR); } | /**
* Start up an empty node with specified cache configuration.
*
* @param args Command line arguments, none required.
* @throws IgniteException If example execution failed.
*/ | Start up an empty node with specified cache configuration | main | {
"repo_name": "irudyak/ignite",
"path": "examples/src/main/java/org/apache/ignite/examples/igfs/IgfsNodeStartup.java",
"license": "apache-2.0",
"size": 1720
} | [
"org.apache.ignite.Ignition"
] | import org.apache.ignite.Ignition; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,331,590 |
void processPubRec(String clientID, int messageID) {
//once received a PUBREC reply with a PUBREL(messageID)
if (log.isDebugEnabled()) {
log.debug("ProcessPubRec invoked for " + clientID + " ad messageID " + messageID);
}
//The broker will respond to the client to releas... | void processPubRec(String clientID, int messageID) { if (log.isDebugEnabled()) { log.debug(STR + clientID + STR + messageID); } PubRelMessage pubRelMessage = new PubRelMessage(); pubRelMessage.setMessageID(messageID); pubRelMessage.setQos(AbstractMessage.QOSType.LEAST_ONE); disruptorPublish(new OutputMessagingEvent(m_c... | /**
* Sent by the subscriber to the broker, on receiving of a QoS 2 message
* @param clientID the id of the client
* @param messageID the id of the message
*/ | Sent by the subscriber to the broker, on receiving of a QoS 2 message | processPubRec | {
"repo_name": "hastef88/andes",
"path": "modules/andes-core/broker/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/ProtocolProcessor.java",
"license": "apache-2.0",
"size": 44212
} | [
"org.dna.mqtt.moquette.messaging.spi.impl.events.OutputMessagingEvent",
"org.dna.mqtt.moquette.proto.messages.AbstractMessage",
"org.dna.mqtt.moquette.proto.messages.PubRelMessage"
] | import org.dna.mqtt.moquette.messaging.spi.impl.events.OutputMessagingEvent; import org.dna.mqtt.moquette.proto.messages.AbstractMessage; import org.dna.mqtt.moquette.proto.messages.PubRelMessage; | import org.dna.mqtt.moquette.messaging.spi.impl.events.*; import org.dna.mqtt.moquette.proto.messages.*; | [
"org.dna.mqtt"
] | org.dna.mqtt; | 2,655,004 |
@Override
public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
// check if we need to collect chart entities from the container
EntityBlockParams ebp;
StandardEntityCollection sec = null;
if (params instanceof EntityBlockParams) {
ebp = (EntityBlockPar... | Object function(Graphics2D g2, Rectangle2D area, Object params) { EntityBlockParams ebp; StandardEntityCollection sec = null; if (params instanceof EntityBlockParams) { ebp = (EntityBlockParams) params; if (ebp.getGenerateEntities()) { sec = new StandardEntityCollection(); } } Rectangle2D contentArea = (Rectangle2D) ar... | /**
* Draws the block within the specified area.
*
* @param g2 the graphics device.
* @param area the area.
* @param params passed on to blocks within the container
* ({@code null} permitted).
*
* @return An instance of {@link EntityBlockResult}, or {@code null}... | Draws the block within the specified area | draw | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/block/BlockContainer.java",
"license": "lgpl-2.1",
"size": 8517
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.entity.EntityCollection",
"org.jfree.chart.entity.StandardEntityCollection"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.entity.EntityCollection; import org.jfree.chart.entity.StandardEntityCollection; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.entity.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,366,813 |
@JsonProperty("server")
public void setServerFactory(ServerFactory factory) {
this.server = factory;
} | @JsonProperty(STR) void function(ServerFactory factory) { this.server = factory; } | /**
* Sets the HTTP-specific section of the configuration file.
*/ | Sets the HTTP-specific section of the configuration file | setServerFactory | {
"repo_name": "flipsterkeshav/dropwizard",
"path": "dropwizard-core/src/main/java/io/dropwizard/Configuration.java",
"license": "apache-2.0",
"size": 3339
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"io.dropwizard.server.ServerFactory"
] | import com.fasterxml.jackson.annotation.JsonProperty; import io.dropwizard.server.ServerFactory; | import com.fasterxml.jackson.annotation.*; import io.dropwizard.server.*; | [
"com.fasterxml.jackson",
"io.dropwizard.server"
] | com.fasterxml.jackson; io.dropwizard.server; | 156,649 |
public void testURIInfoFieldMemberInjection() throws HttpException, IOException {
ClientResponse response = client.resource(getBaseURI() + "/context/uriinfo/field").get();
assertEquals(204, response.getStatusCode());
} | void function() throws HttpException, IOException { ClientResponse response = client.resource(getBaseURI() + STR).get(); assertEquals(204, response.getStatusCode()); } | /**
* Tests that a URIInfo object is injected via a field member.
*
* @throws IOException
* @throws HttpException
*/ | Tests that a URIInfo object is injected via a field member | testURIInfoFieldMemberInjection | {
"repo_name": "os890/wink_patches",
"path": "wink-itests/wink-itest/wink-itest-context/src/test/java/org/apache/wink/itest/uriinfo/WinkURIInfoInjectionTest.java",
"license": "apache-2.0",
"size": 3515
} | [
"java.io.IOException",
"org.apache.commons.httpclient.HttpException",
"org.apache.wink.client.ClientResponse"
] | import java.io.IOException; import org.apache.commons.httpclient.HttpException; import org.apache.wink.client.ClientResponse; | import java.io.*; import org.apache.commons.httpclient.*; import org.apache.wink.client.*; | [
"java.io",
"org.apache.commons",
"org.apache.wink"
] | java.io; org.apache.commons; org.apache.wink; | 2,603,999 |
@Bean
@Conditional(InsightsSAMLBeanInitializationCondition.class)
public SAMLLogoutFilter samlLogoutFilter() {
LOG.debug(" Inside samlLogoutFilter ==== ");
return new SAMLLogoutFilter(successLogoutHandler(), new LogoutHandler[] { logoutHandler() },
new LogoutHandler[] { logoutHandler() });
} | @Conditional(InsightsSAMLBeanInitializationCondition.class) SAMLLogoutFilter function() { LOG.debug(STR); return new SAMLLogoutFilter(successLogoutHandler(), new LogoutHandler[] { logoutHandler() }, new LogoutHandler[] { logoutHandler() }); } | /**
* used to initialize logout Handler
*
* @return
*/ | used to initialize logout Handler | samlLogoutFilter | {
"repo_name": "CognizantOneDevOps/Insights",
"path": "PlatformService/src/main/java/com/cognizant/devops/platformservice/security/config/saml/InsightsSecurityConfigurationAdapterSAML.java",
"license": "apache-2.0",
"size": 26210
} | [
"org.springframework.context.annotation.Conditional",
"org.springframework.security.saml.SAMLLogoutFilter",
"org.springframework.security.web.authentication.logout.LogoutHandler"
] | import org.springframework.context.annotation.Conditional; import org.springframework.security.saml.SAMLLogoutFilter; import org.springframework.security.web.authentication.logout.LogoutHandler; | import org.springframework.context.annotation.*; import org.springframework.security.saml.*; import org.springframework.security.web.authentication.logout.*; | [
"org.springframework.context",
"org.springframework.security"
] | org.springframework.context; org.springframework.security; | 2,607,882 |
public final Element getElement() {
return this.constructionElement;
}
| final Element function() { return this.constructionElement; } | /**
* Returns the Element which was constructed by the Object.
*
* @return the Element which was constructed by the Object.
*/ | Returns the Element which was constructed by the Object | getElement | {
"repo_name": "mbshopM/openconcerto",
"path": "Modules/Module EBICS/src/org/apache/xml/security/utils/ElementProxy.java",
"license": "gpl-3.0",
"size": 16627
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 954,729 |
public Project getProject(String name) {
try {
return projects().withName(name).get();
} catch (KubernetesClientException e) {
return null;
}
} | Project function(String name) { try { return projects().withName(name).get(); } catch (KubernetesClientException e) { return null; } } | /**
* Tries to retrieve project with name 'name'. Swallows KubernetesClientException
* if project doesn't exist or isn't accessible for user.
*
* @param name name of requested project.
* @return Project instance if accessible otherwise null.
*/ | Tries to retrieve project with name 'name'. Swallows KubernetesClientException if project doesn't exist or isn't accessible for user | getProject | {
"repo_name": "xtf-cz/xtf",
"path": "core/src/main/java/cz/xtf/core/openshift/OpenShift.java",
"license": "mit",
"size": 50678
} | [
"io.fabric8.kubernetes.client.KubernetesClientException",
"io.fabric8.openshift.api.model.Project"
] | import io.fabric8.kubernetes.client.KubernetesClientException; import io.fabric8.openshift.api.model.Project; | import io.fabric8.kubernetes.client.*; import io.fabric8.openshift.api.model.*; | [
"io.fabric8.kubernetes",
"io.fabric8.openshift"
] | io.fabric8.kubernetes; io.fabric8.openshift; | 1,848,545 |
//-------------------------------------------------------------------------
public static SabrParametersIborCapletFloorletVolatilities of(
IborCapletFloorletVolatilitiesName name,
IborIndex index,
ZonedDateTime valuationDateTime,
SabrParameters parameters) {
return new SabrParametersIb... | static SabrParametersIborCapletFloorletVolatilities function( IborCapletFloorletVolatilitiesName name, IborIndex index, ZonedDateTime valuationDateTime, SabrParameters parameters) { return new SabrParametersIborCapletFloorletVolatilities(name, index, valuationDateTime, parameters, null, null, null, null); } | /**
* Obtains an instance from the SABR model parameters and the date-time for which it is valid.
*
* @param name the name
* @param index the Ibor index for which the data is valid
* @param valuationDateTime the valuation date-time
* @param parameters the SABR model parameters
* @return the vo... | Obtains an instance from the SABR model parameters and the date-time for which it is valid | of | {
"repo_name": "OpenGamma/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/capfloor/SabrParametersIborCapletFloorletVolatilities.java",
"license": "apache-2.0",
"size": 38416
} | [
"com.opengamma.strata.basics.index.IborIndex",
"com.opengamma.strata.pricer.model.SabrParameters",
"java.time.ZonedDateTime"
] | import com.opengamma.strata.basics.index.IborIndex; import com.opengamma.strata.pricer.model.SabrParameters; import java.time.ZonedDateTime; | import com.opengamma.strata.basics.index.*; import com.opengamma.strata.pricer.model.*; import java.time.*; | [
"com.opengamma.strata",
"java.time"
] | com.opengamma.strata; java.time; | 2,808,165 |
protected void addExtraButton(String property, String source, String altText) {
ExtraButton newButton = new ExtraButton();
newButton.setExtraButtonProperty(property);
newButton.setExtraButtonSource(source);
newButton.setExtraButtonAltText(altText);
extraButtons.add(newButt... | void function(String property, String source, String altText) { ExtraButton newButton = new ExtraButton(); newButton.setExtraButtonProperty(property); newButton.setExtraButtonSource(source); newButton.setExtraButtonAltText(altText); extraButtons.add(newButton); } | /**
* Adds a new button to the extra buttons collection.
*
* @param property - property for button
* @param source - location of image
* @param altText - alternate text for button if images don't appear
*
* KRAD Conversion: Performs customization of an extra button.
*
*/ | Adds a new button to the extra buttons collection | addExtraButton | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/web/struts/ElectronicInvoiceRejectForm.java",
"license": "agpl-3.0",
"size": 6096
} | [
"org.kuali.rice.kns.web.ui.ExtraButton"
] | import org.kuali.rice.kns.web.ui.ExtraButton; | import org.kuali.rice.kns.web.ui.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,932,575 |
@Override
protected void doSetValue(final Object value)
{
this.value = (FontData) value;
} | void function(final Object value) { this.value = (FontData) value; } | /** Called by the framework to initialize the RGB value.
* @param value Should be an RGB.
*/ | Called by the framework to initialize the RGB value | doSetValue | {
"repo_name": "kasemir/org.csstudio.display.builder",
"path": "databrowser3/databrowser-plugins/org.csstudio.trends.databrowser3/src/org/csstudio/trends/databrowser3/propsheet/FontCellEditor.java",
"license": "epl-1.0",
"size": 2201
} | [
"org.eclipse.swt.graphics.FontData"
] | import org.eclipse.swt.graphics.FontData; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 700,672 |
public void addOp(String par1Str)
{
this.ops.add(par1Str.toLowerCase());
// CraftBukkit start
Player player = mcServer.server.getPlayer(par1Str);
if (player != null)
{
player.recalculatePermissions();
}
// CraftBukkit end
} | void function(String par1Str) { this.ops.add(par1Str.toLowerCase()); Player player = mcServer.server.getPlayer(par1Str); if (player != null) { player.recalculatePermissions(); } } | /**
* This adds a username to the ops list, then saves the op list
*/ | This adds a username to the ops list, then saves the op list | addOp | {
"repo_name": "wildex999/stjerncraft_mcpc",
"path": "src/minecraft/net/minecraft/server/management/ServerConfigurationManager.java",
"license": "gpl-3.0",
"size": 65878
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 463,701 |
public static byte[] gzip(String input) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
GZIPOutputStream gzos = null;
try {
gzos = new GZIPOutputStream(baos);
gzos.write(input.getBytes("UTF-8"));
} catch (IOException e) {
e.pri... | static byte[] function(String input) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); GZIPOutputStream gzos = null; try { gzos = new GZIPOutputStream(baos); gzos.write(input.getBytes("UTF-8")); } catch (IOException e) { e.printStackTrace(); } finally { if (gzos != null) try { gzos.close(); } catch (IOExcepti... | /**
* GZip compress a string of bytes
*
* @param input
* @return
*/ | GZip compress a string of bytes | gzip | {
"repo_name": "tastybento/bluebook",
"path": "BlueBook/src/com/wasteofplastic/bluebook/MetricsLite.java",
"license": "gpl-3.0",
"size": 17969
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.util.zip.GZIPOutputStream"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPOutputStream; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,853,301 |
protected Shape parseIfSupported(String str, WKTReader reader) throws ParseException {
try {
Geometry geom = reader.read(str);
//Normalizes & verifies coordinates
checkCoordinates(geom);
if (geom instanceof com.vividsolutions.jts.geom.Point) {
com.vividsolutions.jts.geom.Point pt... | Shape function(String str, WKTReader reader) throws ParseException { try { Geometry geom = reader.read(str); checkCoordinates(geom); if (geom instanceof com.vividsolutions.jts.geom.Point) { com.vividsolutions.jts.geom.Point ptGeom = (com.vividsolutions.jts.geom.Point) geom; if (ctx.useJtsPoint()) return new JtsPoint(pt... | /**
* Reads WKT from the {@code str} via JTS's {@link com.vividsolutions.jts.io.WKTReader}.
* @param str
* @param reader <pre>new WKTReader(ctx.getGeometryFactory()))</pre>
* @return Non-Null
*/ | Reads WKT from the str via JTS's <code>com.vividsolutions.jts.io.WKTReader</code> | parseIfSupported | {
"repo_name": "SKPCandy/spatial4j",
"path": "src/main/java/com/spatial4j/core/io/jts/JtsWKTReaderShapeParser.java",
"license": "apache-2.0",
"size": 4623
} | [
"com.spatial4j.core.exception.InvalidShapeException",
"com.spatial4j.core.shape.Shape",
"com.spatial4j.core.shape.jts.JtsPoint",
"com.vividsolutions.jts.geom.Geometry",
"com.vividsolutions.jts.io.WKTReader",
"java.text.ParseException"
] | import com.spatial4j.core.exception.InvalidShapeException; import com.spatial4j.core.shape.Shape; import com.spatial4j.core.shape.jts.JtsPoint; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.io.WKTReader; import java.text.ParseException; | import com.spatial4j.core.exception.*; import com.spatial4j.core.shape.*; import com.spatial4j.core.shape.jts.*; import com.vividsolutions.jts.geom.*; import com.vividsolutions.jts.io.*; import java.text.*; | [
"com.spatial4j.core",
"com.vividsolutions.jts",
"java.text"
] | com.spatial4j.core; com.vividsolutions.jts; java.text; | 2,779,910 |
public int getElementDeclIndex(QName elementDeclQName) {
return getElementDeclIndex(elementDeclQName.rawname);
} // getElementDeclIndex(QName):int | int function(QName elementDeclQName) { return getElementDeclIndex(elementDeclQName.rawname); } | /** Returns the element decl index.
* @param elementDeclQName qualilfied name of the element
*/ | Returns the element decl index | getElementDeclIndex | {
"repo_name": "JetBrains/jdk8u_jaxp",
"path": "src/com/sun/xml/internal/stream/dtd/nonvalidating/DTDGrammar.java",
"license": "gpl-2.0",
"size": 32798
} | [
"com.sun.org.apache.xerces.internal.xni.QName"
] | import com.sun.org.apache.xerces.internal.xni.QName; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 1,909,831 |
public void setIconSize(int size) {
if (size > Math.min(width, height)) size = Math.min(width, height);
iconRect.set(0, 0, size, size);
Gravity.apply(gravity, iconRect.width(), iconRect.height(), getBounds(), iconRect);
float ratio = size / BASE_ICON_SIZE;
barWidth = BASE_B... | void function(int size) { if (size > Math.min(width, height)) size = Math.min(width, height); iconRect.set(0, 0, size, size); Gravity.apply(gravity, iconRect.width(), iconRect.height(), getBounds(), iconRect); float ratio = size / BASE_ICON_SIZE; barWidth = BASE_BAR_WIDTH * ratio; barHeight = BASE_BAR_HEIGHT * ratio; b... | /**
* set the size of the icon; this size should be smaller than the size of this drawable itself to fully show the transformation!
*
* @param size the size of the icon in pixel
*/ | set the size of the icon; this size should be smaller than the size of this drawable itself to fully show the transformation | setIconSize | {
"repo_name": "kibotu/common.android.utils",
"path": "common-android-utils/src/main/java/com/common/android/utils/ui/DrawerIconDrawable.java",
"license": "apache-2.0",
"size": 12216
} | [
"android.view.Gravity"
] | import android.view.Gravity; | import android.view.*; | [
"android.view"
] | android.view; | 2,226,370 |
public ExecutableQuery<E> includeDeleted() {
return this.where().includeDeleted();
} | ExecutableQuery<E> function() { return this.where().includeDeleted(); } | /**
* Include a the soft deleted items on records returned.
*
* @return ExecutableQuery
*/ | Include a the soft deleted items on records returned | includeDeleted | {
"repo_name": "Azure/azure-mobile-apps-android-client",
"path": "sdk/src/sdk/src/main/java/com/microsoft/windowsazure/mobileservices/table/MobileServiceTable.java",
"license": "apache-2.0",
"size": 32228
} | [
"com.microsoft.windowsazure.mobileservices.table.query.ExecutableQuery"
] | import com.microsoft.windowsazure.mobileservices.table.query.ExecutableQuery; | import com.microsoft.windowsazure.mobileservices.table.query.*; | [
"com.microsoft.windowsazure"
] | com.microsoft.windowsazure; | 1,174,707 |
public DatasetData isDatasetCreated(long projectID, DatasetData dataset)
{
List<DatasetData> datasets = projectDatasetMap.get(projectID);
if (CollectionUtils.isEmpty(datasets)) return null;
Iterator<DatasetData> i = datasets.iterator();
DatasetData data;
String name = dat... | DatasetData function(long projectID, DatasetData dataset) { List<DatasetData> datasets = projectDatasetMap.get(projectID); if (CollectionUtils.isEmpty(datasets)) return null; Iterator<DatasetData> i = datasets.iterator(); DatasetData data; String name = dataset.getName(); while (i.hasNext()) { data = i.next(); if (data... | /**
* Returns the dataset if already created.
*
* @param projectID The id of the project.
* @param dataset The dataset to register.
* @return See above.s
*/ | Returns the dataset if already created | isDatasetCreated | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/blitz/src/omero/gateway/model/ImportableObject.java",
"license": "gpl-2.0",
"size": 18859
} | [
"java.util.Iterator",
"java.util.List",
"org.apache.commons.collections.CollectionUtils"
] | import java.util.Iterator; import java.util.List; import org.apache.commons.collections.CollectionUtils; | import java.util.*; import org.apache.commons.collections.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 902,921 |
private JPanel getImagePanel() {
JPanel imagePanel = new JPanel(new BorderLayout());
// JLabel imageLabel = new JLabel(new ImageIcon(getClass().getResource("/org/apache/tools/ant/gui/resources/About.gif")));
JLabel imageLabel = new JLabel(new ImageIcon(getClass().getResource("/org/apache/tool... | JPanel function() { JPanel imagePanel = new JPanel(new BorderLayout()); JLabel imageLabel = new JLabel(new ImageIcon(getClass().getResource(STR))); imagePanel.add(imageLabel, BorderLayout.CENTER); if (_context != null) { JLabel messageLabel = new JLabel(_context.getResources().getMessage(getClass(), STR, new Object[] {... | /**
* Builds the nice About panel.
*
* @return the About panel
*/ | Builds the nice About panel | getImagePanel | {
"repo_name": "deepakalur/acre",
"path": "external/ant-antidote/src/java/org/apache/tools/ant/gui/About.java",
"license": "apache-2.0",
"size": 11695
} | [
"java.awt.BorderLayout",
"javax.swing.BorderFactory",
"javax.swing.ImageIcon",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,893,850 |
@Override
public INDArray create(int rows, int columns, int[] stride, int offset) {
if (dtype == DataBuffer.Type.DOUBLE)
return create(new double[rows * columns], new int[]{rows, columns}, stride, offset);
if (dtype == DataBuffer.Type.FLOAT)
return create(new float[rows *... | INDArray function(int rows, int columns, int[] stride, int offset) { if (dtype == DataBuffer.Type.DOUBLE) return create(new double[rows * columns], new int[]{rows, columns}, stride, offset); if (dtype == DataBuffer.Type.FLOAT) return create(new float[rows * columns], new int[]{rows, columns}, stride, offset); if (dtype... | /**
* Creates an ndarray with the specified shape
*
* @param rows the rows of the ndarray
* @param columns the columns of the ndarray
* @param stride the stride for the ndarray
* @param offset the offset of the ndarray
* @return the instance
*/ | Creates an ndarray with the specified shape | create | {
"repo_name": "rahulpalamuttam/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/factory/BaseNDArrayFactory.java",
"license": "apache-2.0",
"size": 59439
} | [
"org.nd4j.linalg.api.buffer.DataBuffer",
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.buffer.DataBuffer; import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.buffer.*; import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 841,531 |
public static IAST Greater(final IExpr x, final IExpr y) {
return new B2.Greater(x, y);
} | static IAST function(final IExpr x, final IExpr y) { return new B2.Greater(x, y); } | /**
* Yields {@link S#True} if <code>x</code> is known to be greater than <code>y</code>.
*
* <p>
* See: <a href=
* "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/Greater.md">Greater</a>
*
* @param x
* @param y
* @return
*/ | Yields <code>S#True</code> if <code>x</code> is known to be greater than <code>y</code>. See: Greater | Greater | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
} | [
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 140,793 |
boolean isDir(@NonNull final T path); | boolean isDir(@NonNull final T path); | /**
* Return true if the path is a directory and not a file.
*
* @param path
*/ | Return true if the path is a directory and not a file | isDir | {
"repo_name": "stari4ek/NoNonsense-FilePicker",
"path": "library/src/main/java/com/nononsenseapps/filepicker/LogicHandler.java",
"license": "mpl-2.0",
"size": 2849
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,920,762 |
EReference getClassifierMap_Function();
| EReference getClassifierMap_Function(); | /**
* Returns the meta object for the containment reference '{@link orgomg.cwm.analysis.transformation.ClassifierMap#getFunction <em>Function</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Function</em>'.
* @see orgomg.cwm.analysis.t... | Returns the meta object for the containment reference '<code>orgomg.cwm.analysis.transformation.ClassifierMap#getFunction Function</code>'. | getClassifierMap_Function | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.tools.CWM/src/orgomg/cwm/analysis/transformation/TransformationPackage.java",
"license": "lgpl-3.0",
"size": 142768
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,496,509 |
AliasedField.withImmutableBuildersDisabled(() -> {
Criterion criterion = and(isNull(literal(1)), isNull(literal(2)));
criterion.getCriteria().add(isNull(literal(3)));
assertThat(criterion.getCriteria(), hasSize(3));
Criterion deepCopy = criterion.deepCopy();
deepCopy.getCriteria().a... | AliasedField.withImmutableBuildersDisabled(() -> { Criterion criterion = and(isNull(literal(1)), isNull(literal(2))); criterion.getCriteria().add(isNull(literal(3))); assertThat(criterion.getCriteria(), hasSize(3)); Criterion deepCopy = criterion.deepCopy(); deepCopy.getCriteria().add(mock(Criterion.class)); assertThat... | /**
* We should be able to add criteria if mutability is enabled.
*/ | We should be able to add criteria if mutability is enabled | testCanMutateCriteriaWhenMutable | {
"repo_name": "badgerwithagun/morf",
"path": "morf-core/src/test/java/org/alfasoftware/morf/sql/element/TestCriterionDetail.java",
"license": "apache-2.0",
"size": 2129
} | [
"org.alfasoftware.morf.sql.element.Criterion",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import org.alfasoftware.morf.sql.element.Criterion; import org.hamcrest.Matchers; import org.junit.Assert; | import org.alfasoftware.morf.sql.element.*; import org.hamcrest.*; import org.junit.*; | [
"org.alfasoftware.morf",
"org.hamcrest",
"org.junit"
] | org.alfasoftware.morf; org.hamcrest; org.junit; | 2,148,873 |
protected void writeSubHeader(PdfPTable table, String subHeading, String reportOption) {
table.addCell("\t\t".concat(subHeading));
if (reportOption.equalsIgnoreCase(EndowConstants.EndowmentReport.DETAIL)) {
table.addCell("");
table.addCell("");
}
table.addCell... | void function(PdfPTable table, String subHeading, String reportOption) { table.addCell("\t\t".concat(subHeading)); if (reportOption.equalsIgnoreCase(EndowConstants.EndowmentReport.DETAIL)) { table.addCell(STRSTR"); } | /**
* helper method to write out a sub-heading into the report.
*/ | helper method to write out a sub-heading into the report | writeSubHeader | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/report/util/TransactionSummaryReportPrint.java",
"license": "apache-2.0",
"size": 46430
} | [
"com.lowagie.text.pdf.PdfPTable",
"org.kuali.kfs.module.endow.EndowConstants"
] | import com.lowagie.text.pdf.PdfPTable; import org.kuali.kfs.module.endow.EndowConstants; | import com.lowagie.text.pdf.*; import org.kuali.kfs.module.endow.*; | [
"com.lowagie.text",
"org.kuali.kfs"
] | com.lowagie.text; org.kuali.kfs; | 124,959 |
while (injector != null) {
for (Key<?> key : injector.getBindings().keySet()) {
Type type = key.getTypeLiteral().getType();
if (type instanceof Class) {
Class<?> c = (Class) type;
if (isProviderClass(c)) {
logger.info("Registering {} as a provider class", c.getName(... | while (injector != null) { for (Key<?> key : injector.getBindings().keySet()) { Type type = key.getTypeLiteral().getType(); if (type instanceof Class) { Class<?> c = (Class) type; if (isProviderClass(c)) { logger.info(STR, c.getName()); environment.register(c); } else if (isRootResourceClass(c)) { if(Resource.isAccepta... | /**
* Registers any Guice-bound providers or root resources.
*/ | Registers any Guice-bound providers or root resources | registerGuiceBound | {
"repo_name": "mwei1us/dropwizard-guice",
"path": "src/main/java/com/hubspot/dropwizard/guice/JerseyUtil.java",
"license": "apache-2.0",
"size": 2464
} | [
"com.google.inject.Key",
"java.lang.reflect.Type",
"org.glassfish.jersey.server.model.Resource"
] | import com.google.inject.Key; import java.lang.reflect.Type; import org.glassfish.jersey.server.model.Resource; | import com.google.inject.*; import java.lang.reflect.*; import org.glassfish.jersey.server.model.*; | [
"com.google.inject",
"java.lang",
"org.glassfish.jersey"
] | com.google.inject; java.lang; org.glassfish.jersey; | 826,113 |
public boolean validate(Message query, Object context); | boolean function(Message query, Object context); | /**
* Validates the state of the given deserialized message.
* @param query The deserialized message.
* @param context Any contextual information required to properly validate the given message.
* @return True if the state of the deserialized message is valid.
*/ | Validates the state of the given deserialized message | validate | {
"repo_name": "chinmaykolhatkar/incubator-apex-malhar",
"path": "library/src/main/java/com/datatorrent/lib/appdata/query/serde/CustomMessageValidator.java",
"license": "apache-2.0",
"size": 1489
} | [
"com.datatorrent.lib.appdata.schemas.Message"
] | import com.datatorrent.lib.appdata.schemas.Message; | import com.datatorrent.lib.appdata.schemas.*; | [
"com.datatorrent.lib"
] | com.datatorrent.lib; | 1,848,491 |
public Cursor fetchAllGenres(String bookshelf) {
// Null 'order' to suppress ordering
String baseSql = fetchAllBooksInnerSql(null, bookshelf, "", "", "", "", "");
String sql = "SELECT DISTINCT "
+ " Case When (b." + KEY_GENRE + " = '' or b." + KEY_GENRE + " is NULL) Then '" + META_EMPTY_GENRE + "'"
... | Cursor function(String bookshelf) { String baseSql = fetchAllBooksInnerSql(null, bookshelf, STR", STRSTRSTRSELECT DISTINCT STR Case When (b.STR = '' or b.STR is NULL) Then 'STR'STR Else b.STR End as STR ORDER BY Upper(b.STR) " + COLLATION; return mDb.rawQuery(sql, new String[]{}); } | /**
* This will return a list of all genres within the given bookshelf
*
* @param bookshelf The bookshelf to search within. Can be the string "All Books"
* @return Cursor over all series
*/ | This will return a list of all genres within the given bookshelf | fetchAllGenres | {
"repo_name": "gvmelle/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/CatalogueDBAdapter.java",
"license": "gpl-3.0",
"size": 238306
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 2,429,873 |
@Test
public void test_findUri() {
final String uri = StyleManager.findUri("plain");
assertTrue(uri.startsWith("file:/"));
assertTrue(uri.endsWith("css/slide/plain.css"));
} | void function() { final String uri = StyleManager.findUri("plain"); assertTrue(uri.startsWith(STR)); assertTrue(uri.endsWith(STR)); } | /**
* Test of {@link StyleManager#findUri(String)}.
*/ | Test of <code>StyleManager#findUri(String)</code> | test_findUri | {
"repo_name": "toastkidjp/slide_show",
"path": "src/test/java/jp/toastkid/slideshow/style/StyleManagerTest.java",
"license": "epl-1.0",
"size": 1024
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,831,504 |
if (slice == null) {
final RandomAccessReader randomAccessReader = parentLogicalZipFile.slice.randomAccessReader();
// Check header magic
if (randomAccessReader.readInt(locHeaderPos) != 0x04034b50) {
throw new IOException("Zip entry has bad LOC header: " + entryName)... | if (slice == null) { final RandomAccessReader randomAccessReader = parentLogicalZipFile.slice.randomAccessReader(); if (randomAccessReader.readInt(locHeaderPos) != 0x04034b50) { throw new IOException(STR + entryName); } final long dataStartPos = locHeaderPos + 30 + randomAccessReader.readShort(locHeaderPos + 26) + rand... | /**
* Lazily get zip entry slice -- this is deferred until zip entry data needs to be read, in order to avoid
* randomly seeking within zipfile for every entry as the central directory is read.
*
* @return the offset within the physical zip file of the entry's start offset.
* @throws IOExceptio... | Lazily get zip entry slice -- this is deferred until zip entry data needs to be read, in order to avoid randomly seeking within zipfile for every entry as the central directory is read | getSlice | {
"repo_name": "lukehutch/fast-classpath-scanner",
"path": "src/main/java/nonapi/io/github/classgraph/fastzipfilereader/FastZipEntry.java",
"license": "mit",
"size": 13768
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,294,480 |
ClassPathResource resource = new ClassPathResource("starbucks.csv");
Scanner scanner = new Scanner(resource.getInputStream());
String line = scanner.nextLine();
scanner.close();
FlatFileItemReader<Store> itemReader = new FlatFileItemReader<Store>();
itemReader.setResource(resource);
// DelimitedLineToke... | ClassPathResource resource = new ClassPathResource(STR); Scanner scanner = new Scanner(resource.getInputStream()); String line = scanner.nextLine(); scanner.close(); FlatFileItemReader<Store> itemReader = new FlatFileItemReader<Store>(); itemReader.setResource(resource); DelimitedLineTokenizer tokenizer = new Delimited... | /**
* Reads a file {@code starbucks.csv} from the class path and parses it into {@link Store} instances about to
* persisted.
*
* @return
* @throws Exception
*/ | Reads a file starbucks.csv from the class path and parses it into <code>Store</code> instances about to persisted | readStores | {
"repo_name": "sis-direct/spring-data-examples",
"path": "rest/starbucks/src/main/java/example/springdata/rest/stores/StoreInitializer.java",
"license": "apache-2.0",
"size": 3601
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Scanner",
"org.springframework.batch.item.ExecutionContext",
"org.springframework.batch.item.file.FlatFileItemReader",
"org.springframework.batch.item.file.mapping.DefaultLineMapper",
"org.springframework.batch.item.file.separator.DefaultRecordSeparato... | import java.util.ArrayList; import java.util.List; import java.util.Scanner; import org.springframework.batch.item.ExecutionContext; import org.springframework.batch.item.file.FlatFileItemReader; import org.springframework.batch.item.file.mapping.DefaultLineMapper; import org.springframework.batch.item.file.separator.D... | import java.util.*; import org.springframework.batch.item.*; import org.springframework.batch.item.file.*; import org.springframework.batch.item.file.mapping.*; import org.springframework.batch.item.file.separator.*; import org.springframework.batch.item.file.transform.*; import org.springframework.core.io.*; import or... | [
"java.util",
"org.springframework.batch",
"org.springframework.core",
"org.springframework.data"
] | java.util; org.springframework.batch; org.springframework.core; org.springframework.data; | 1,049,037 |
public Color[] getFillColors() {
return null;
} | Color[] function() { return null; } | /**
* Fill colors for columns are not specified. Client should assign colors.
* Implementation of Data interface.
*/ | Fill colors for columns are not specified. Client should assign colors. Implementation of Data interface | getFillColors | {
"repo_name": "OpenSourcePhysics/osp",
"path": "src/org/opensourcephysics/display/DataAdapter.java",
"license": "gpl-3.0",
"size": 3527
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,760,540 |
@Override
public void run() {
try {
process();
} catch (Exception e) {
Log.e(getClass().getName(), "process: ", e);
} finally {
leaveQueue();
recycle();
}
} | void function() { try { process(); } catch (Exception e) { Log.e(getClass().getName(), STR, e); } finally { leaveQueue(); recycle(); } } | /**
* Handle the event and recycle it.
*/ | Handle the event and recycle it | run | {
"repo_name": "nikita36078/J2ME-Loader",
"path": "app/src/main/java/javax/microedition/lcdui/event/Event.java",
"license": "apache-2.0",
"size": 1866
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 926,049 |
@Test
public void testParseVersion4SegmentsUpdate5() {
VersionIdentifier version = parseVersion("1.2.3.4u5");
assertNotNull(version);
assertEquals(4, version.getVersionSegmentCount());
assertEquals(1, version.getVersionMajorSegment());
assertEquals(2, version.getVersionMinorSegment());
asse... | void function() { VersionIdentifier version = parseVersion(STR); assertNotNull(version); assertEquals(4, version.getVersionSegmentCount()); assertEquals(1, version.getVersionMajorSegment()); assertEquals(2, version.getVersionMinorSegment()); assertEquals(3, version.getVersionMilliSegment()); assertEquals(4, version.get... | /**
* This method tests the {@link VersionUtil#createVersionIdentifier(String) parsing} of {@link VersionIdentifier} with
* 4 version segments and phase update number 5.
*/ | This method tests the <code>VersionUtil#createVersionIdentifier(String) parsing</code> of <code>VersionIdentifier</code> with 4 version segments and phase update number 5 | testParseVersion4SegmentsUpdate5 | {
"repo_name": "m-m-m/util",
"path": "version/src/test/java/net/sf/mmm/util/version/impl/VersionUtilTest.java",
"license": "apache-2.0",
"size": 8510
} | [
"net.sf.mmm.util.version.api.DevelopmentPhase",
"net.sf.mmm.util.version.api.VersionIdentifier"
] | import net.sf.mmm.util.version.api.DevelopmentPhase; import net.sf.mmm.util.version.api.VersionIdentifier; | import net.sf.mmm.util.version.api.*; | [
"net.sf.mmm"
] | net.sf.mmm; | 1,737,056 |
private JComboBox getNamespaceReplacementPolicyComboBox() {
if (namespaceReplacementPolicyComboBox == null) {
namespaceReplacementPolicyComboBox = new JComboBox();
namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration().getNamespaceReplacementPolicy().ERROR);
... | JComboBox function() { if (namespaceReplacementPolicyComboBox == null) { namespaceReplacementPolicyComboBox = new JComboBox(); namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration().getNamespaceReplacementPolicy().ERROR); namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration()... | /**
* This method initializes namespaceReplacementPolicyComboBox
*
* @return javax.swing.JComboBox
*/ | This method initializes namespaceReplacementPolicyComboBox | getNamespaceReplacementPolicyComboBox | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/introduce/src/java/Portal/gov/nih/nci/cagrid/introduce/portal/configuration/IntroducePortalConfigurationPanel.java",
"license": "bsd-3-clause",
"size": 11686
} | [
"java.awt.event.ActionListener",
"javax.swing.JComboBox"
] | import java.awt.event.ActionListener; import javax.swing.JComboBox; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 70,441 |
public static RepositoryName create(String name) throws TargetParsingException {
try {
return repositoryNameCache.get(name);
} catch (ExecutionException e) {
Throwables.propagateIfInstanceOf(e.getCause(), TargetParsingException.class);
throw new IllegalStateException("Failed to c... | static RepositoryName function(String name) throws TargetParsingException { try { return repositoryNameCache.get(name); } catch (ExecutionException e) { Throwables.propagateIfInstanceOf(e.getCause(), TargetParsingException.class); throw new IllegalStateException(STR + name, e); } } private final String name; private Re... | /**
* Makes sure that name is a valid repository name and creates a new RepositoryName using it.
* @throws TargetParsingException if the name is invalid.
*/ | Makes sure that name is a valid repository name and creates a new RepositoryName using it | create | {
"repo_name": "wakashige/bazel",
"path": "src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java",
"license": "apache-2.0",
"size": 11400
} | [
"com.google.common.base.Throwables",
"java.util.concurrent.ExecutionException"
] | import com.google.common.base.Throwables; import java.util.concurrent.ExecutionException; | import com.google.common.base.*; import java.util.concurrent.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,075,445 |
public void setStep( int i, StepMeta stepMeta ) {
StepMetaInterface iface = stepMeta.getStepMetaInterface();
if ( iface instanceof StepMetaChangeListenerInterface ) {
addStepChangeListener( i, (StepMetaChangeListenerInterface) stepMeta.getStepMetaInterface() );
}
steps.set( i, stepMeta );
st... | void function( int i, StepMeta stepMeta ) { StepMetaInterface iface = stepMeta.getStepMetaInterface(); if ( iface instanceof StepMetaChangeListenerInterface ) { addStepChangeListener( i, (StepMetaChangeListenerInterface) stepMeta.getStepMetaInterface() ); } steps.set( i, stepMeta ); stepMeta.setParentTransMeta( this );... | /**
* Changes the content of a step on a certain position. This is accomplished by setting the step's metadata at the
* specified index to the specified meta-data object. The new step's parent transformation is updated to be this
* transformation.
*
* @param i
* The index into the steps list
... | Changes the content of a step on a certain position. This is accomplished by setting the step's metadata at the specified index to the specified meta-data object. The new step's parent transformation is updated to be this transformation | setStep | {
"repo_name": "Advent51/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 225587
} | [
"org.pentaho.di.trans.step.StepMeta",
"org.pentaho.di.trans.step.StepMetaChangeListenerInterface",
"org.pentaho.di.trans.step.StepMetaInterface"
] | import org.pentaho.di.trans.step.StepMeta; import org.pentaho.di.trans.step.StepMetaChangeListenerInterface; import org.pentaho.di.trans.step.StepMetaInterface; | import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,712,946 |
@Transient
public List<MatrixElement> getElementsReadOnly() {
return Collections.unmodifiableList(getElements());
}
| List<MatrixElement> function() { return Collections.unmodifiableList(getElements()); } | /**
* Return a read only set of matrix elements.
*
* @return
*/ | Return a read only set of matrix elements | getElementsReadOnly | {
"repo_name": "TreeBASE/treebasetest",
"path": "treebase-core/src/main/java/org/cipres/treebase/domain/matrix/MatrixRow.java",
"license": "bsd-3-clause",
"size": 11378
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,241,867 |
public static MetadataColumn metadata(
String name, DataType type, @Nullable String metadataAlias, boolean isVirtual) {
Preconditions.checkNotNull(name, "Column name can not be null.");
Preconditions.checkNotNull(type, "Column type can not be null.");
return new MetadataColumn(na... | static MetadataColumn function( String name, DataType type, @Nullable String metadataAlias, boolean isVirtual) { Preconditions.checkNotNull(name, STR); Preconditions.checkNotNull(type, STR); return new MetadataColumn(name, type, metadataAlias, isVirtual); } | /**
* Creates a metadata column from metadata of the given column name or from metadata of the
* given alias (if not null).
*
* <p>Allows to specify whether the column is virtual or not.
*/ | Creates a metadata column from metadata of the given column name or from metadata of the given alias (if not null). Allows to specify whether the column is virtual or not | metadata | {
"repo_name": "tillrohrmann/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/api/TableColumn.java",
"license": "apache-2.0",
"size": 10196
} | [
"javax.annotation.Nullable",
"org.apache.flink.table.types.DataType",
"org.apache.flink.util.Preconditions"
] | import javax.annotation.Nullable; import org.apache.flink.table.types.DataType; import org.apache.flink.util.Preconditions; | import javax.annotation.*; import org.apache.flink.table.types.*; import org.apache.flink.util.*; | [
"javax.annotation",
"org.apache.flink"
] | javax.annotation; org.apache.flink; | 13,242 |
@Override
protected Void visit(Expression node, ExpressionVisitor mv) {
assert result != null : "array-comprehension generator not initialised";
expressionBoxedValue(node, mv);
mv.load(result);
mv.swap();
mv.invoke(Methods.ArrayList_add);
mv.pop();
retur... | Void function(Expression node, ExpressionVisitor mv) { assert result != null : STR; expressionBoxedValue(node, mv); mv.load(result); mv.swap(); mv.invoke(Methods.ArrayList_add); mv.pop(); return null; } | /**
* 12.1.4.2.3 Runtime Semantics: ComprehensionEvaluation
* <p>
* ComprehensionTail : AssignmentExpression
*/ | 12.1.4.2.3 Runtime Semantics: ComprehensionEvaluation ComprehensionTail : AssignmentExpression | visit | {
"repo_name": "rwaldron/es6draft",
"path": "src/main/java/com/github/anba/es6draft/compiler/ArrayComprehensionGenerator.java",
"license": "mit",
"size": 2930
} | [
"com.github.anba.es6draft.ast.Expression",
"java.util.ArrayList"
] | import com.github.anba.es6draft.ast.Expression; import java.util.ArrayList; | import com.github.anba.es6draft.ast.*; import java.util.*; | [
"com.github.anba",
"java.util"
] | com.github.anba; java.util; | 1,599,091 |
public synchronized boolean compareLeftAndSet(L expectLeft, L newLeft, R newRight) {
if ((null == expectLeft) != (null == this.left)) {
return false;
}
// Current and expected values are either both null, or both non-null
if ((null == this.left) || Objects.equals(this.left, expectLeft)) {
this.left = n... | synchronized boolean function(L expectLeft, L newLeft, R newRight) { if ((null == expectLeft) != (null == this.left)) { return false; } if ((null == this.left) Objects.equals(this.left, expectLeft)) { this.left = newLeft; this.right = newRight; return true; } return false; } | /**
* Compare left and set.
*
* @param expectLeft the expect left
* @param newLeft the new left
* @param newRight the new right
* @return the boolean
*/ | Compare left and set | compareLeftAndSet | {
"repo_name": "bbobcik/auderis-tools",
"path": "core/src/main/java/cz/auderis/tools/collection/tuple/AtomicPair.java",
"license": "apache-2.0",
"size": 6737
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 829,782 |
public void testSumThenReset() {
DoubleAdder ai = new DoubleAdder();
ai.add(2.0);
assertEquals(2.0, ai.sum());
assertEquals(2.0, ai.sumThenReset());
assertEquals(0.0, ai.sum());
} | void function() { DoubleAdder ai = new DoubleAdder(); ai.add(2.0); assertEquals(2.0, ai.sum()); assertEquals(2.0, ai.sumThenReset()); assertEquals(0.0, ai.sum()); } | /**
* sumThenReset() returns sum; subsequent sum() returns zero
*/ | sumThenReset() returns sum; subsequent sum() returns zero | testSumThenReset | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/DoubleAdderTest.java",
"license": "gpl-2.0",
"size": 4934
} | [
"java.util.concurrent.atomic.DoubleAdder"
] | import java.util.concurrent.atomic.DoubleAdder; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 2,218,133 |
public void release(@Nullable ReleaseCallback callback) {
if (currentTask != null) {
currentTask.cancel(true);
}
if (callback != null) {
downloadExecutorService.execute(new ReleaseTask(callback));
}
downloadExecutorService.shutdown();
}
// LoaderErrorThrower implementation. | void function(@Nullable ReleaseCallback callback) { if (currentTask != null) { currentTask.cancel(true); } if (callback != null) { downloadExecutorService.execute(new ReleaseTask(callback)); } downloadExecutorService.shutdown(); } | /**
* Releases the {@link Loader}. This method should be called when the {@link Loader} is no longer
* required.
*
* @param callback An optional callback to be called on the loading thread once the loader has
* been released.
*/ | Releases the <code>Loader</code>. This method should be called when the <code>Loader</code> is no longer required | release | {
"repo_name": "MaTriXy/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/upstream/Loader.java",
"license": "apache-2.0",
"size": 14358
} | [
"android.support.annotation.Nullable"
] | import android.support.annotation.Nullable; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,676,385 |
public void authorize(final String acsUrl, final String creq, final String md, final String paReq, final String threeDSSessionData, final String postbackUrl) {
postbackHandled.set(false);
if (authorizationListener != null) {
authorizationListener.onAuthorizationStarted(this);
}
... | void function(final String acsUrl, final String creq, final String md, final String paReq, final String threeDSSessionData, final String postbackUrl) { postbackHandled.set(false); if (authorizationListener != null) { authorizationListener.onAuthorizationStarted(this); } if (!TextUtils.isEmpty(postbackUrl)) { this.postb... | /**
* Starts 3DS authorization
*
* @param acsUrl ACS server url, returned by the credit card processing gateway
* @param creq CReq parameter (replaces MD and PaReq).
* @param md MD parameter, returned by the credit card processing gateway
* @param paReq PaReq par... | Starts 3DS authorization | authorize | {
"repo_name": "LivotovLabs/3DSView",
"path": "3DSView/src/main/java/eu/livotov/labs/android/d3s/D3SView.java",
"license": "apache-2.0",
"size": 11134
} | [
"android.text.TextUtils",
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder",
"java.util.Locale"
] | import android.text.TextUtils; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Locale; | import android.text.*; import java.io.*; import java.net.*; import java.util.*; | [
"android.text",
"java.io",
"java.net",
"java.util"
] | android.text; java.io; java.net; java.util; | 586,113 |
public static String getNextASiCEManifestName(final String expectedManifestName, final List<DSSDocument> existingManifests) {
List<String> manifestNames = getDSSDocumentNames(existingManifests);
String manifestName = null;
for (int i = 0; i < existingManifests.size() + 1; i++) {
String suffix = i == 0 ? ... | static String function(final String expectedManifestName, final List<DSSDocument> existingManifests) { List<String> manifestNames = getDSSDocumentNames(existingManifests); String manifestName = null; for (int i = 0; i < existingManifests.size() + 1; i++) { String suffix = i == 0 ? Utils.EMPTY_STRING : String.valueOf(i)... | /**
* Generates an unique name for a new ASiC-E Manifest file, avoiding any name collision
* @param expectedManifestName {@link String} defines the expected name of the file without extension (e.g. "ASiCmanifest")
* @param existingManifests list of existing {@link DSSDocument} manifests of the type present in the... | Generates an unique name for a new ASiC-E Manifest file, avoiding any name collision | getNextASiCEManifestName | {
"repo_name": "openlimit-signcubes/dss",
"path": "dss-asic-common/src/main/java/eu/europa/esig/dss/asic/common/ASiCUtils.java",
"license": "lgpl-2.1",
"size": 17035
} | [
"eu.europa.esig.dss.model.DSSDocument",
"eu.europa.esig.dss.utils.Utils",
"java.util.List"
] | import eu.europa.esig.dss.model.DSSDocument; import eu.europa.esig.dss.utils.Utils; import java.util.List; | import eu.europa.esig.dss.model.*; import eu.europa.esig.dss.utils.*; import java.util.*; | [
"eu.europa.esig",
"java.util"
] | eu.europa.esig; java.util; | 2,740,589 |
@Override
public void onReceive(Object message) throws IOException {
if (message instanceof String && ((String)message).equals(AppMsgFeeder.MSG_FEED_NOW)) {
Map<String, Object> newFeed = super.getMsgFeeder().apply();
if (super.getClient().getClientID()!=null)
newF... | void function(Object message) throws IOException { if (message instanceof String && ((String)message).equals(AppMsgFeeder.MSG_FEED_NOW)) { Map<String, Object> newFeed = super.getMsgFeeder().apply(); if (super.getClient().getClientID()!=null) newFeed.put(MsgTranslator.MSG_APPLICATION_ID, super.getClient().getClientID())... | /**
* {@link akka.actor.UntypedActor#onReceive(Object)} implementation.
* if message is {@link net.echinopsii.ariane.community.messaging.api.AppMsgFeeder#MSG_FEED_NOW} then request new message from feeder
* and publish it on this MsgFeederActor subject.
* else unhandled
*
* @param message ... | <code>akka.actor.UntypedActor#onReceive(Object)</code> implementation. if message is <code>net.echinopsii.ariane.community.messaging.api.AppMsgFeeder#MSG_FEED_NOW</code> then request new message from feeder and publish it on this MsgFeederActor subject. else unhandled | onReceive | {
"repo_name": "echinopsii/net.echinopsii.ariane.community.messaging",
"path": "nats/src/main/java/net/echinopsii/ariane/community/messaging/nats/MsgFeederActor.java",
"license": "agpl-3.0",
"size": 4608
} | [
"io.nats.client.Message",
"java.io.IOException",
"java.util.Map",
"net.echinopsii.ariane.community.messaging.api.AppMsgFeeder"
] | import io.nats.client.Message; import java.io.IOException; import java.util.Map; import net.echinopsii.ariane.community.messaging.api.AppMsgFeeder; | import io.nats.client.*; import java.io.*; import java.util.*; import net.echinopsii.ariane.community.messaging.api.*; | [
"io.nats.client",
"java.io",
"java.util",
"net.echinopsii.ariane"
] | io.nats.client; java.io; java.util; net.echinopsii.ariane; | 190,568 |
@Override
public void parseChain(String basePath) {
InputStream is;
File file = null;
String simpleName = include;
try {
// first look on the classpath.
is = ClassLoader.getSystemResourceAsStream(include);
if (is != null) {
PPG.... | void function(String basePath) { InputStream is; File file = null; String simpleName = include; try { is = ClassLoader.getSystemResourceAsStream(include); if (is != null) { PPG.DEBUG(STR + include + STR); } else { String fullPath = ((basePath == STRSTRfile.separatorSTRlooking for STR as a fileSTRparsing STR not found.S... | /**
* Parse the chain of inheritance via include files
*/ | Parse the chain of inheritance via include files | parseChain | {
"repo_name": "liujed/polyglot-eclipse",
"path": "tools/ppg/src/ppg/spec/PPGSpec.java",
"license": "lgpl-2.1",
"size": 16352
} | [
"java.io.File",
"java.io.InputStream"
] | import java.io.File; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 662,653 |
EAttribute getSketch_DoubleVar5(); | EAttribute getSketch_DoubleVar5(); | /**
* Returns the meta object for the attribute '{@link com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getDoubleVar5 <em>Double Var5</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Double Var5</em>'.
* @see com.specmate.migration.test.... | Returns the meta object for the attribute '<code>com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getDoubleVar5 Double Var5</code>'. | getSketch_DoubleVar5 | {
"repo_name": "junkerm/specmate",
"path": "bundles/specmate-migration-test/src/com/specmate/migration/test/baseline/testmodel/artefact/ArtefactPackage.java",
"license": "apache-2.0",
"size": 47870
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,603,221 |
static void writeHBaseBool(final ChannelBuffer buf, final boolean b) {
buf.writeByte(1); // Code for Boolean.class in HbaseObjectWritable
buf.writeByte(b ? 0x01 : 0x00);
} | static void writeHBaseBool(final ChannelBuffer buf, final boolean b) { buf.writeByte(1); buf.writeByte(b ? 0x01 : 0x00); } | /**
* Writes a {@link Boolean boolean} as an HBase RPC parameter.
* @param buf The buffer to serialize the string to.
* @param b The boolean value to serialize.
*/ | Writes a <code>Boolean boolean</code> as an HBase RPC parameter | writeHBaseBool | {
"repo_name": "SteamShon/asynchbase",
"path": "src/HBaseRpc.java",
"license": "bsd-3-clause",
"size": 52440
} | [
"org.jboss.netty.buffer.ChannelBuffer"
] | import org.jboss.netty.buffer.ChannelBuffer; | import org.jboss.netty.buffer.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 1,595,966 |
public int getCreationTime(ImageType image) {
List<Object> objList = image.getAdaptorsOrOperatingSystemOrSoftware();
if (objList != null) {
// Loop for adaptors tag
for (Object obj : objList) {
if (obj instanceof Integer) { // Creation time
... | int function(ImageType image) { List<Object> objList = image.getAdaptorsOrOperatingSystemOrSoftware(); if (objList != null) { for (Object obj : objList) { if (obj instanceof Integer) { return ((Integer) obj); } } } return -1; } | /**
* Returns the image creation time associated to a given image.
*
* @param image Image description
* @return
*/ | Returns the image creation time associated to a given image | getCreationTime | {
"repo_name": "mF2C/COMPSs",
"path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java",
"license": "apache-2.0",
"size": 130588
} | [
"es.bsc.compss.types.resources.jaxb.ImageType",
"java.util.List"
] | import es.bsc.compss.types.resources.jaxb.ImageType; import java.util.List; | import es.bsc.compss.types.resources.jaxb.*; import java.util.*; | [
"es.bsc.compss",
"java.util"
] | es.bsc.compss; java.util; | 56,442 |
public static Thread startDaemon(Thread self, String name, Closure closure) {
return createThread(name, true, closure);
} | static Thread function(Thread self, String name, Closure closure) { return createThread(name, true, closure); } | /**
* Start a daemon Thread with a given name and the given closure as
* a Runnable instance.
*
* @param self placeholder variable used by Groovy categories; ignored for default static methods
* @param name the name to give the thread
* @param closure the Runnable closure
* @ret... | Start a daemon Thread with a given name and the given closure as a Runnable instance | startDaemon | {
"repo_name": "paulk-asert/groovy",
"path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyStaticMethods.java",
"license": "apache-2.0",
"size": 11197
} | [
"groovy.lang.Closure"
] | import groovy.lang.Closure; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,690,660 |
LifetimeButtonLink link = new LifetimeButtonLink(caption, null, FontAwesome.ARROW_LEFT);
addComponent(link);
} | LifetimeButtonLink link = new LifetimeButtonLink(caption, null, FontAwesome.ARROW_LEFT); addComponent(link); } | /**
* Adds a new link
* @param caption The visible link
* @param target The view we should travel to
*/ | Adds a new link | addLink | {
"repo_name": "zuacaldeira/lifetime",
"path": "lifetime-ui/src/main/java/lifetime/component/VerticalLinksLayout.java",
"license": "unlicense",
"size": 1376
} | [
"com.vaadin.server.FontAwesome"
] | import com.vaadin.server.FontAwesome; | import com.vaadin.server.*; | [
"com.vaadin.server"
] | com.vaadin.server; | 2,916,581 |
public void addParam(String labelName, Token token, String type) {
type = StringUtils.defaultIfBlank(type, "param");
if (type.equals("exception")) {
// if defined in the current function
String previouslyDefinedLabelType = funct.labeltype(labelName, false, false, false);
if (StringUtils.isNotEmpty(prev... | void function(String labelName, Token token, String type) { type = StringUtils.defaultIfBlank(type, "param"); if (type.equals(STR)) { String previouslyDefinedLabelType = funct.labeltype(labelName, false, false, false); if (StringUtils.isNotEmpty(previouslyDefinedLabelType) && !previouslyDefinedLabelType.equals(STR)) { ... | /**
* Add a function parameter to the current scope.
*
* @param labelName - the value of the identifier
* @param token - indetifier token
* @param type - JSHint label type; defaults to "param"
*/ | Add a function parameter to the current scope | addParam | {
"repo_name": "jshaptic/jshint-javaport",
"path": "src/main/java/org/jshint/ScopeManager.java",
"license": "mit",
"size": 41018
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 203,679 |
public void testUpvoteQuestion() {
Question q = new Question(title, body, author, null);
int oldVotes = q.getUpvotes();
q.addUpvote();
int newVotes = q.getUpvotes();
assertEquals(oldVotes + 1, newVotes);
}
| void function() { Question q = new Question(title, body, author, null); int oldVotes = q.getUpvotes(); q.addUpvote(); int newVotes = q.getUpvotes(); assertEquals(oldVotes + 1, newVotes); } | /**
* UC9 TC9.1- Upvote a Question
*/ | UC9 TC9.1- Upvote a Question | testUpvoteQuestion | {
"repo_name": "CMPUT301F14T14/android-question-answer-app",
"path": "QuestionAppTests/src/ca/ualberta/cs/cmput301f14t14/questionapp/test/QuestionTest.java",
"license": "apache-2.0",
"size": 4264
} | [
"ca.ualberta.cs.cmput301f14t14.questionapp.model.Question"
] | import ca.ualberta.cs.cmput301f14t14.questionapp.model.Question; | import ca.ualberta.cs.cmput301f14t14.questionapp.model.*; | [
"ca.ualberta.cs"
] | ca.ualberta.cs; | 1,236,735 |
List<Object> getCountList(); | List<Object> getCountList(); | /**
* Returns the value of the '<em><b>Count List</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A space-separated list of integers or nulls.
* <!-- end-model-doc -->
* @return the value of the '<em>Count List</em>' attribute.
... | Returns the value of the 'Count List' attribute. A space-separated list of integers or nulls. | getCountList | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/net/opengis/gml311/DocumentRoot.java",
"license": "lgpl-2.1",
"size": 620429
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 960,261 |
static public Automaton concatenate(List<Automaton> l) {
if (l.isEmpty()) return BasicAutomata.makeEmptyString();
boolean all_singleton = true;
for (Automaton a : l)
if (!a.isSingleton()) {
all_singleton = false;
break;
}
if (all_singleton) {
StringBuilder b ... | static Automaton function(List<Automaton> l) { if (l.isEmpty()) return BasicAutomata.makeEmptyString(); boolean all_singleton = true; for (Automaton a : l) if (!a.isSingleton()) { all_singleton = false; break; } if (all_singleton) { StringBuilder b = new StringBuilder(); for (Automaton a : l) b.append(a.singleton); ret... | /**
* Returns an automaton that accepts the concatenation of the languages of the
* given automata.
* <p>
* Complexity: linear in total number of states.
*/ | Returns an automaton that accepts the concatenation of the languages of the given automata. Complexity: linear in total number of states | concatenate | {
"repo_name": "terrancesnyder/solr-analytics",
"path": "lucene/core/src/java/org/apache/lucene/util/automaton/BasicOperations.java",
"license": "apache-2.0",
"size": 28444
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 771,432 |
public static OffsetDateTime toLogical(Schema schema, byte[] value) {
return OffsetDateTime.parse(new String(value, CHARSET), FORMATTER);
} | static OffsetDateTime function(Schema schema, byte[] value) { return OffsetDateTime.parse(new String(value, CHARSET), FORMATTER); } | /**
* Convert a value from its encoded format into its logical format ({@link OffsetDateTime}).
*
* @param schema the schema
* @param value the encoded value
* @return the logical value
*/ | Convert a value from its encoded format into its logical format (<code>OffsetDateTime</code>) | toLogical | {
"repo_name": "rhauch/debezium",
"path": "debezium-core/src/main/java/io/debezium/data/IsoTimestamp.java",
"license": "apache-2.0",
"size": 3019
} | [
"java.time.OffsetDateTime",
"org.apache.kafka.connect.data.Schema"
] | import java.time.OffsetDateTime; import org.apache.kafka.connect.data.Schema; | import java.time.*; import org.apache.kafka.connect.data.*; | [
"java.time",
"org.apache.kafka"
] | java.time; org.apache.kafka; | 455,039 |
public XmlPathConfig jaxbObjectMapperFactory(JAXBObjectMapperFactory jaxbObjectMapperFactory) {
return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, features, declaredNamespaces,
properties, validating, namespaceAware, allowDocTypeDeclaration);
... | XmlPathConfig function(JAXBObjectMapperFactory jaxbObjectMapperFactory) { return new XmlPathConfig(jaxbObjectMapperFactory, defaultParserType, defaultDeserializer, charset, features, declaredNamespaces, properties, validating, namespaceAware, allowDocTypeDeclaration); } | /**
* Specify a custom Gson object mapper factory.
*
* @param jaxbObjectMapperFactory The object mapper factory
*/ | Specify a custom Gson object mapper factory | jaxbObjectMapperFactory | {
"repo_name": "BenSeverson/rest-assured",
"path": "xml-path/src/main/java/io/restassured/path/xml/config/XmlPathConfig.java",
"license": "apache-2.0",
"size": 17126
} | [
"io.restassured.mapper.factory.JAXBObjectMapperFactory"
] | import io.restassured.mapper.factory.JAXBObjectMapperFactory; | import io.restassured.mapper.factory.*; | [
"io.restassured.mapper"
] | io.restassured.mapper; | 1,464,273 |
List<ISessionHandlingAction> getSessionHandlingActions(); | List<ISessionHandlingAction> getSessionHandlingActions(); | /**
* This method is used to retrieve the session handling actions that are
* registered by the extension.
*
* @return A list of session handling actions that are currently registered
* by this extension.
*/ | This method is used to retrieve the session handling actions that are registered by the extension | getSessionHandlingActions | {
"repo_name": "tomsteele/burpbuddy",
"path": "src/main/java/burp/IBurpExtenderCallbacks.java",
"license": "mit",
"size": 41643
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 869,452 |
final void replaceWith(Node parent, Node node, List<Node> replacements) {
Preconditions.checkNotNull(replacements, "\"replacements\" is null.");
int size = replacements.size();
if ((size == 1) && node.isEquivalentTo(replacements.get(0))) {
// trees are equal... don't replace
return;
}
... | final void replaceWith(Node parent, Node node, List<Node> replacements) { Preconditions.checkNotNull(replacements, "\"replacements\STR); int size = replacements.size(); if ((size == 1) && node.isEquivalentTo(replacements.get(0))) { return; } int parentType = parent.getType(); Preconditions.checkState(size == 1 parentTy... | /**
* Replaces a node with the provided list.
*/ | Replaces a node with the provided list | replaceWith | {
"repo_name": "mbrukman/closure-compiler",
"path": "src/com/google/javascript/jscomp/AstChangeProxy.java",
"license": "apache-2.0",
"size": 3324
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token",
"java.util.List"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import java.util.List; | import com.google.common.base.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.common",
"com.google.javascript",
"java.util"
] | com.google.common; com.google.javascript; java.util; | 1,855,039 |
Set<Characteristic> findSubCharacteristicsByRootKey(String rootCharacteristicKey); | Set<Characteristic> findSubCharacteristicsByRootKey(String rootCharacteristicKey); | /**
* Return the collection of sub characteristics from a root characteristic key
*
* @throws IllegalStateException if the holder is empty
*/ | Return the collection of sub characteristics from a root characteristic key | findSubCharacteristicsByRootKey | {
"repo_name": "jblievremont/sonarqube",
"path": "server/sonar-server/src/main/java/org/sonar/server/computation/debt/DebtModelHolder.java",
"license": "lgpl-3.0",
"size": 1620
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,306,505 |
public JCheckBox getOpacityCheck() {
if (cbOpacidad == null) {
cbOpacidad = new JCheckBox();
cbOpacidad.setText(PluginServices.getText(this, "activar"));
cbOpacidad.addActionListener(this);
cbOpacidad.addFocusListener(this);
}
return cbOpacidad;
} | JCheckBox function() { if (cbOpacidad == null) { cbOpacidad = new JCheckBox(); cbOpacidad.setText(PluginServices.getText(this, STR)); cbOpacidad.addActionListener(this); cbOpacidad.addFocusListener(this); } return cbOpacidad; } | /**
* This method initializes jCheckBox1
* @return javax.swing.JCheckBox
*/ | This method initializes jCheckBox1 | getOpacityCheck | {
"repo_name": "iCarto/siga",
"path": "extRasterTools-SE/src/org/gvsig/rastertools/properties/panels/TranspOpacitySliderPanel.java",
"license": "gpl-3.0",
"size": 6871
} | [
"com.iver.andami.PluginServices",
"javax.swing.JCheckBox"
] | import com.iver.andami.PluginServices; import javax.swing.JCheckBox; | import com.iver.andami.*; import javax.swing.*; | [
"com.iver.andami",
"javax.swing"
] | com.iver.andami; javax.swing; | 1,153,143 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<PrivateEndpointConnectionDescriptionInner>> getWithResponseAsync(
String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PrivateEndpointConnectionDescriptionInner>> function( String resourceGroupName, String resourceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSu... | /**
* Gets the specified private endpoint connection associated with the service.
*
* @param resourceGroupName The name of the resource group that contains the service instance.
* @param resourceName The name of the service instance.
* @param privateEndpointConnectionName The name of the privat... | Gets the specified private endpoint connection associated with the service | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsClientImpl.java",
"license": "mit",
"size": 56737
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.healthcareapis.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 653,677 |
@Override
public boolean isSplitable (JobContext job, Path file) {
return true;
}
}
static class ReconstructionMapper
extends Mapper<LongWritable, Text, Text, Text> {
protected static final Log LOG =
LogFactory.getLog(ReconstructionMapper.class);
public static final String... | boolean function (JobContext job, Path file) { return true; } } static class ReconstructionMapper extends Mapper<LongWritable, Text, Text, Text> { protected static final Log LOG = LogFactory.getLog(ReconstructionMapper.class); public static final String RECONSTRUCTOR_CLASS_TAG = STR; private BlockReconstructor reconstr... | /**
* indicates that input file can be split
*/ | indicates that input file can be split | isSplitable | {
"repo_name": "shakamunyi/hadoop-20",
"path": "src/contrib/raid/src/java/org/apache/hadoop/raid/DistBlockIntegrityMonitor.java",
"license": "apache-2.0",
"size": 82474
} | [
"org.apache.commons.logging.Log",
"org.apache.commons.logging.LogFactory",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.LongWritable",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.mapreduce.JobContext",
"org.apache.hadoop.mapreduce.Mapper",
"org.apache.hadoop.raid.protocol.RaidProtocol",
"o... | import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.JobContext; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.raid.proto... | import org.apache.commons.logging.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.raid.protocol.*; import org.apache.hadoop.security.*; | [
"org.apache.commons",
"org.apache.hadoop"
] | org.apache.commons; org.apache.hadoop; | 1,635,177 |
private JSONObject moveFile(File srcFile, File destFile) throws IOException, JSONException, InvalidModificationException {
// Renaming a file to an existing directory should fail
if (destFile.exists() && destFile.isDirectory()) {
throw new InvalidModificationException("Can't rename a fil... | JSONObject function(File srcFile, File destFile) throws IOException, JSONException, InvalidModificationException { if (destFile.exists() && destFile.isDirectory()) { throw new InvalidModificationException(STR); } if (!srcFile.renameTo(destFile)) { copyAction(srcFile, destFile); if (destFile.exists()) { srcFile.delete()... | /**
* Move a file
*
* @param srcFile file to be copied
* @param destFile destination to be copied to
* @return a FileEntry object
* @throws IOException
* @throws InvalidModificationException
* @throws JSONException
*/ | Move a file | moveFile | {
"repo_name": "frangucc/gamify",
"path": "www/sandbox/pals/plugins/org.apache.cordova.file/src/android/LocalFilesystem.java",
"license": "mit",
"size": 22360
} | [
"java.io.File",
"java.io.IOException",
"org.json.JSONException",
"org.json.JSONObject"
] | import java.io.File; import java.io.IOException; import org.json.JSONException; import org.json.JSONObject; | import java.io.*; import org.json.*; | [
"java.io",
"org.json"
] | java.io; org.json; | 997,697 |
public static void writeLines(final Collection<?> lines, final String lineEnding,
final OutputStream output, final String encoding) throws IOException {
writeLines(lines, lineEnding, output, Charsets.toCharset(encoding));
} | static void function(final Collection<?> lines, final String lineEnding, final OutputStream output, final String encoding) throws IOException { writeLines(lines, lineEnding, output, Charsets.toCharset(encoding)); } | /**
* Writes the <code>toString()</code> value of each item in a collection to
* an <code>OutputStream</code> line by line, using the specified character
* encoding and the specified line ending.
* <p/>
* Character encoding names can be found at
* <a href="http://www.iana.org/assignments/c... | Writes the <code>toString()</code> value of each item in a collection to an <code>OutputStream</code> line by line, using the specified character encoding and the specified line ending. Character encoding names can be found at IANA | writeLines | {
"repo_name": "8enet/apkeditor",
"path": "src/main/java/com/zzzmode/apkeditor/utils/IOUtils.java",
"license": "gpl-3.0",
"size": 110244
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.util.Collection"
] | import java.io.IOException; import java.io.OutputStream; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 23,688 |
private ArrayList<Integer> getListOfCols(ArrayList<GridPos> list) {
ArrayList<Integer> result = new ArrayList<Integer>();
for (GridPos pos : list) {
result.add(pos.getCol());
}
return result;
}
| ArrayList<Integer> function(ArrayList<GridPos> list) { ArrayList<Integer> result = new ArrayList<Integer>(); for (GridPos pos : list) { result.add(pos.getCol()); } return result; } | /**
* Gets a list of every column index for every GridPos in a list
* @param list the list to extract the row indices from
* @return an ArrayList of Integers with every column index in the original list
*/ | Gets a list of every column index for every GridPos in a list | getListOfCols | {
"repo_name": "stutonk/shinro",
"path": "shinro/ShinroSolver.java",
"license": "mit",
"size": 29837
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,173,791 |
@Test
public void reportMessageTest9() throws PcepParseException, PcepOutOfBoundMessageException {
byte[] reportMsg = new byte[]{0x20, 0x0a, 0x00, (byte) 0x44,
0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, //LSP Object //LSP Object
0x00, 0x12, 0x00, 0x10, //StatefulIPv... | void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] reportMsg = new byte[]{0x20, 0x0a, 0x00, (byte) 0x44, 0x20, 0x10, 0x00, 0x2c, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x00, 0x01, (byte) 0x80, 0x01, (byte) 0xb6, 0x02, 0x4e, 0x1f, (byte) 0xb6, 0x02,... | /**
* This test case checks for LSP Object(Symbolic path tlv, StatefulIPv4LspIdentidiersTlv,
* StatefulLspErrorCodeTlv ),ERO Object
* in PcRpt message.
*/ | This test case checks for LSP Object(Symbolic path tlv, StatefulIPv4LspIdentidiersTlv, StatefulLspErrorCodeTlv ),ERO Object in PcRpt message | reportMessageTest9 | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepReportMsgTest.java",
"license": "apache-2.0",
"size": 76875
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.hamcrest.core.Is",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException; | import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"org.hamcrest",
"org.hamcrest.core",
"org.jboss.netty",
"org.onosproject.pcepio"
] | org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio; | 506,276 |
public void freeRemoteSession() throws RemoteException
{
try {
if (m_database.getTableCount() == 0)
m_database.free(); // Free if this is my private database, or there are no tables left
} catch (Exception ex) {
ex.printStackTrace();
}
... | void function() throws RemoteException { try { if (m_database.getTableCount() == 0) m_database.free(); } catch (Exception ex) { ex.printStackTrace(); } super.freeRemoteSession(); } | /**
* Free the objects.
* This method is called from the remote client, and frees this session.
*/ | Free the objects. This method is called from the remote client, and frees this session | freeRemoteSession | {
"repo_name": "jbundle/jbundle",
"path": "base/remote/src/main/java/org/jbundle/base/remote/db/DatabaseSession.java",
"license": "gpl-3.0",
"size": 4718
} | [
"org.jbundle.model.RemoteException"
] | import org.jbundle.model.RemoteException; | import org.jbundle.model.*; | [
"org.jbundle.model"
] | org.jbundle.model; | 1,174,240 |
private void addLangSection(Composite parent) {
Label descr = new Label(parent, SWT.LEFT | SWT.WRAP);
descr.setLayoutData(new GridData());
descr.setText(TexlipsePlugin.getResourceString("propertiesLanguageDescription"));
Composite composite = createDefaultComposite(... | void function(Composite parent) { Label descr = new Label(parent, SWT.LEFT SWT.WRAP); descr.setLayoutData(new GridData()); descr.setText(TexlipsePlugin.getResourceString(STR)); Composite composite = createDefaultComposite(parent, 2); Label label = new Label(composite, SWT.LEFT); label.setLayoutData(new GridData()); lab... | /**
* Create a text field for language setting.
* @param parent parent component
*/ | Create a text field for language setting | addLangSection | {
"repo_name": "rondiplomatico/texlipse",
"path": "source/net/sourceforge/texlipse/properties/TexlipseProjectPropertyPage.java",
"license": "epl-1.0",
"size": 24533
} | [
"java.util.Locale",
"net.sourceforge.texlipse.TexlipsePlugin",
"org.eclipse.jface.fieldassist.AutoCompleteField",
"org.eclipse.jface.fieldassist.TextContentAdapter",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label",
"org.eclipse.swt.widgets.Text"
... | import java.util.Locale; import net.sourceforge.texlipse.TexlipsePlugin; import org.eclipse.jface.fieldassist.AutoCompleteField; import org.eclipse.jface.fieldassist.TextContentAdapter; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.ecl... | import java.util.*; import net.sourceforge.texlipse.*; import org.eclipse.jface.fieldassist.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"java.util",
"net.sourceforge.texlipse",
"org.eclipse.jface",
"org.eclipse.swt"
] | java.util; net.sourceforge.texlipse; org.eclipse.jface; org.eclipse.swt; | 1,729,237 |
public synchronized void setImage(java.awt.image.BufferedImage image) {
this.panel_image = image;
//force image repainting
if (user_defined_scale) {
image_needs_repaint = true;
} //Reset the scale to force repaint, only if the sacle is not user defined
else {
... | synchronized void function(java.awt.image.BufferedImage image) { this.panel_image = image; if (user_defined_scale) { image_needs_repaint = true; } else { resize_factor = -1; } if (image != null) { this.setPreferredSize(new java.awt.Dimension((int) (panel_image.getWidth() * resize_factor), (int) (panel_image.getHeight()... | /**Sets the panel picture to be displayed. Note that after this for display the panel needs repaiting.
*@param image panel to display in the panel.
*/ | Sets the panel picture to be displayed. Note that after this for display the panel needs repaiting | setImage | {
"repo_name": "rti-capture/rti-chi",
"path": "components/RTIbuilder/GUIcomponents/src/guicomponents/PreviewPanel.java",
"license": "gpl-3.0",
"size": 5896
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 628,656 |
public void testGetRaSpan()
{
assertNull(this.getFixture().getRaSpan());
RAText raText= relANNISFactory.eINSTANCE.createRAText();
raText.setRaText("This is a sample text");
RADocumentGraph raDocGraph= relANNISFactory.eINSTANCE.createRADocumentGraph();
raDocGraph.addSNode(raText);
this.getFixture... | void function() { assertNull(this.getFixture().getRaSpan()); RAText raText= relANNISFactory.eINSTANCE.createRAText(); raText.setRaText(STR); RADocumentGraph raDocGraph= relANNISFactory.eINSTANCE.createRADocumentGraph(); raDocGraph.addSNode(raText); this.getFixture().setRaText(raText); this.getFixture().setRaLeft(0l); t... | /**
* Tests the '{@link de.hub.corpling.relANNIS.RANode#getRaSpan() <em>Ra Span</em>}' feature getter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see de.hub.corpling.relANNIS.RANode#getRaSpan()
*/ | Tests the '<code>de.hub.corpling.relANNIS.RANode#getRaSpan() Ra Span</code>' feature getter. | testGetRaSpan | {
"repo_name": "korpling/pepperModules-RelANNISModules",
"path": "src/test/java/de/hu_berlin/german/korpling/saltnpepper/misc/relANNIS/tests/RANodeTest.java",
"license": "apache-2.0",
"size": 15474
} | [
"de.hu_berlin.german.korpling.saltnpepper.misc.relANNIS.RADocumentGraph",
"de.hu_berlin.german.korpling.saltnpepper.misc.relANNIS.RAText"
] | import de.hu_berlin.german.korpling.saltnpepper.misc.relANNIS.RADocumentGraph; import de.hu_berlin.german.korpling.saltnpepper.misc.relANNIS.RAText; | import de.hu_berlin.german.korpling.saltnpepper.misc.*; | [
"de.hu_berlin.german"
] | de.hu_berlin.german; | 1,696,604 |
public static IVariableBinding findFieldInType(ITypeBinding type, String fieldName) {
if (type.isPrimitive())
return null;
IVariableBinding[] fields= type.getDeclaredFields();
for (int i= 0; i < fields.length; i++) {
IVariableBinding field= fields[i];
if (field.getName().equals(fieldName))
... | static IVariableBinding function(ITypeBinding type, String fieldName) { if (type.isPrimitive()) return null; IVariableBinding[] fields= type.getDeclaredFields(); for (int i= 0; i < fields.length; i++) { IVariableBinding field= fields[i]; if (field.getName().equals(fieldName)) return field; } return null; } | /**
* Finds the field specified by <code>fieldName</code> in
* the given <code>type</code>. Returns <code>null</code> if no such field exits.
* @param type the type to search the field in
* @param fieldName the field name
* @return the binding representing the field or <code>null</code>
*/ | Finds the field specified by <code>fieldName</code> in the given <code>type</code>. Returns <code>null</code> if no such field exits | findFieldInType | {
"repo_name": "eclipse/flux",
"path": "org.eclipse.flux.jdt.service/jdt ui/org/eclipse/jdt/internal/corext/dom/Bindings.java",
"license": "bsd-3-clause",
"size": 58046
} | [
"org.eclipse.jdt.core.dom.ITypeBinding",
"org.eclipse.jdt.core.dom.IVariableBinding"
] | import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.IVariableBinding; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,880,166 |
MapBuilder<K, V> keyMapper( UnaryOperator<K> keyMapper ); | MapBuilder<K, V> keyMapper( UnaryOperator<K> keyMapper ); | /**
* Make the map apply a mapping function on it's keys when performing lookup's, puts etc
*
* @param keyMapper key mapper
*
* @return
*/ | Make the map apply a mapping function on it's keys when performing lookup's, puts etc | keyMapper | {
"repo_name": "peter-mount/opendata-common",
"path": "core/src/main/java/uk/trainwatch/util/MapBuilder.java",
"license": "apache-2.0",
"size": 25469
} | [
"java.util.function.UnaryOperator"
] | import java.util.function.UnaryOperator; | import java.util.function.*; | [
"java.util"
] | java.util; | 599,837 |
private MXSession logAccountAndSync(final Context context,
final String userName,
final String password,
final SessionTestParams sessionTestParams) throws InterruptedException {
final Home... | MXSession function(final Context context, final String userName, final String password, final SessionTestParams sessionTestParams) throws InterruptedException { final HomeServerConnectionConfig hs = createHomeServerConfig(null); LoginRestClient loginRestClient = new LoginRestClient(hs); final Map<String, Object> params... | /**
* Start an account login
*
* @param context the context
* @param userName the account username
* @param password the password
* @param sessionTestParams session test params
*/ | Start an account login | logAccountAndSync | {
"repo_name": "matrix-org/matrix-android-sdk",
"path": "matrix-sdk/src/androidTest/java/org/matrix/androidsdk/common/CommonTestHelper.java",
"license": "apache-2.0",
"size": 16448
} | [
"android.content.Context",
"java.util.HashMap",
"java.util.Map",
"java.util.concurrent.CountDownLatch",
"org.matrix.androidsdk.HomeServerConnectionConfig",
"org.matrix.androidsdk.MXSession",
"org.matrix.androidsdk.rest.client.LoginRestClient"
] | import android.content.Context; import java.util.HashMap; import java.util.Map; import java.util.concurrent.CountDownLatch; import org.matrix.androidsdk.HomeServerConnectionConfig; import org.matrix.androidsdk.MXSession; import org.matrix.androidsdk.rest.client.LoginRestClient; | import android.content.*; import java.util.*; import java.util.concurrent.*; import org.matrix.androidsdk.*; import org.matrix.androidsdk.rest.client.*; | [
"android.content",
"java.util",
"org.matrix.androidsdk"
] | android.content; java.util; org.matrix.androidsdk; | 2,402,820 |
public void unloadCore(String coreName) throws RollbackedException {
solrAdminRequest("UNLOAD", coreName, produceHttpClient());
} | void function(String coreName) throws RollbackedException { solrAdminRequest(STR, coreName, produceHttpClient()); } | /**
* Unload the solr core.
*
* @param coreName
* name of the core
* @throws RollbackedException
* when producing the http client
*/ | Unload the solr core | unloadCore | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/tenant/tenant-audit-integration/src/main/java/com/sirma/itt/seip/tenant/audit/AuditSolrProvisioning.java",
"license": "lgpl-3.0",
"size": 15946
} | [
"com.sirma.itt.seip.exception.RollbackedException"
] | import com.sirma.itt.seip.exception.RollbackedException; | import com.sirma.itt.seip.exception.*; | [
"com.sirma.itt"
] | com.sirma.itt; | 1,978,655 |
public void taskFinished(BuildEvent event) {
// Not significant for the class loader.
} | void function(BuildEvent event) { } | /**
* Empty implementation to satisfy the BuildListener interface.
*
* @param event the taskFinished event
*/ | Empty implementation to satisfy the BuildListener interface | taskFinished | {
"repo_name": "bkmeneguello/jenkins",
"path": "core/src/main/java/jenkins/util/AntClassLoader.java",
"license": "mit",
"size": 58552
} | [
"org.apache.tools.ant.BuildEvent"
] | import org.apache.tools.ant.BuildEvent; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 2,658,730 |
public void createItems() {
mDrawerAdapter.clearDrawerItems();
if (mAccountHeader != null) {
IProfile profile = mAccountHeader.getActiveProfile();
if (profile instanceof ProfileDrawerItem) {
mDrawerAdapter.addDrawerItem(new MiniProfileDrawerItem((ProfileDrawe... | void function() { mDrawerAdapter.clearDrawerItems(); if (mAccountHeader != null) { IProfile profile = mAccountHeader.getActiveProfile(); if (profile instanceof ProfileDrawerItem) { mDrawerAdapter.addDrawerItem(new MiniProfileDrawerItem((ProfileDrawerItem) profile)); } } if (mDrawer != null) { if (mDrawer.getDrawerItems... | /**
* creates the items for the MiniDrawer
*/ | creates the items for the MiniDrawer | createItems | {
"repo_name": "hanhailong/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/MiniDrawer.java",
"license": "apache-2.0",
"size": 8855
} | [
"com.mikepenz.materialdrawer.model.MiniDrawerItem",
"com.mikepenz.materialdrawer.model.MiniProfileDrawerItem",
"com.mikepenz.materialdrawer.model.PrimaryDrawerItem",
"com.mikepenz.materialdrawer.model.ProfileDrawerItem",
"com.mikepenz.materialdrawer.model.interfaces.IDrawerItem",
"com.mikepenz.materialdra... | import com.mikepenz.materialdrawer.model.MiniDrawerItem; import com.mikepenz.materialdrawer.model.MiniProfileDrawerItem; import com.mikepenz.materialdrawer.model.PrimaryDrawerItem; import com.mikepenz.materialdrawer.model.ProfileDrawerItem; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import com.mik... | import com.mikepenz.materialdrawer.model.*; import com.mikepenz.materialdrawer.model.interfaces.*; import java.util.*; | [
"com.mikepenz.materialdrawer",
"java.util"
] | com.mikepenz.materialdrawer; java.util; | 2,375,621 |
@Test
public void testMigrationStrategyForDifferentRegistrationOrder() throws Exception {
ExecutionConfig executionConfig = new ExecutionConfig();
executionConfig.registerKryoType(TestClassA.class);
executionConfig.registerKryoType(TestClassB.class);
KryoSerializer<TestClass> kryoSerializer = new KryoSeri... | void function() throws Exception { ExecutionConfig executionConfig = new ExecutionConfig(); executionConfig.registerKryoType(TestClassA.class); executionConfig.registerKryoType(TestClassB.class); KryoSerializer<TestClass> kryoSerializer = new KryoSerializer<>(TestClass.class, executionConfig); int testClassId = kryoSer... | /**
* Tests that after reconfiguration, registration ids are reconfigured to
* remain the same as the preceding KryoSerializer.
*/ | Tests that after reconfiguration, registration ids are reconfigured to remain the same as the preceding KryoSerializer | testMigrationStrategyForDifferentRegistrationOrder | {
"repo_name": "zimmermatt/flink",
"path": "flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerCompatibilityTest.java",
"license": "apache-2.0",
"size": 11182
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"org.apache.flink.api.common.ExecutionConfig",
"org.apache.flink.api.common.typeutils.CompatibilityResult",
"org.apache.flink.api.common.typeutils.TypeSerializerConfigSnapshot",
"org.apache.flink.api.common.typeutils.TypeSerializerSerializat... | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.typeutils.CompatibilityResult; import org.apache.flink.api.common.typeutils.TypeSerializerConfigSnapshot; import org.apache.flink.api.common.typeutils.TypeSer... | import java.io.*; import org.apache.flink.api.common.*; import org.apache.flink.api.common.typeutils.*; import org.apache.flink.core.memory.*; import org.junit.*; | [
"java.io",
"org.apache.flink",
"org.junit"
] | java.io; org.apache.flink; org.junit; | 40,811 |
private void compileConstructor(ClassGenerator classGen) {
MethodGenerator cons;
final InstructionList il = new InstructionList();
final ConstantPoolGen cpg = classGen.getConstantPool();
cons = new MethodGenerator(ACC_PUBLIC,
org.apache.bcel.generic.Type.VOID,
new org.apache.bcel.generic.... | void function(ClassGenerator classGen) { MethodGenerator cons; final InstructionList il = new InstructionList(); final ConstantPoolGen cpg = classGen.getConstantPool(); cons = new MethodGenerator(ACC_PUBLIC, org.apache.bcel.generic.Type.VOID, new org.apache.bcel.generic.Type[] { Util.getJCRefType(TRANSLET_INTF_SIG), Ut... | /**
* Compiles a constructor for the class <tt>_className</tt> that
* inherits from {Any,Single,Multiple}NodeCounter. This constructor
* simply calls the same constructor in the super class.
*/ | Compiles a constructor for the class _className that inherits from {Any,Single,Multiple}NodeCounter. This constructor simply calls the same constructor in the super class | compileConstructor | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/xsltc/compiler/Number.java",
"license": "gpl-3.0",
"size": 18371
} | [
"org.apache.bcel.generic.ConstantPoolGen",
"org.apache.bcel.generic.InstructionList",
"org.apache.xalan.xsltc.compiler.util.ClassGenerator",
"org.apache.xalan.xsltc.compiler.util.MethodGenerator",
"org.apache.xalan.xsltc.compiler.util.Type",
"org.apache.xalan.xsltc.compiler.util.Util"
] | import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.InstructionList; import org.apache.xalan.xsltc.compiler.util.ClassGenerator; import org.apache.xalan.xsltc.compiler.util.MethodGenerator; import org.apache.xalan.xsltc.compiler.util.Type; import org.apache.xalan.xsltc.compiler.util.Util; | import org.apache.bcel.generic.*; import org.apache.xalan.xsltc.compiler.util.*; | [
"org.apache.bcel",
"org.apache.xalan"
] | org.apache.bcel; org.apache.xalan; | 616,558 |
public BigDecimal getBidPrice() {
return bidPrice;
} | BigDecimal function() { return bidPrice; } | /**
* Returns the bid price
* @return bid price
*/ | Returns the bid price | getBidPrice | {
"repo_name": "rcuprak/actionbazaar",
"path": "chapter14/src/main/java/com/actionbazaar/model/Bid.java",
"license": "apache-2.0",
"size": 3684
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,206,943 |
@Nonnull
public java.util.concurrent.CompletableFuture<TargetedManagedAppConfiguration> deleteAsync() {
return sendAsync(HttpMethod.DELETE, null);
} | java.util.concurrent.CompletableFuture<TargetedManagedAppConfiguration> function() { return sendAsync(HttpMethod.DELETE, null); } | /**
* Delete this item from the service
*
* @return a future with the deletion result
*/ | Delete this item from the service | deleteAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TargetedManagedAppConfigurationRequest.java",
"license": "mit",
"size": 7417
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.TargetedManagedAppConfiguration"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.TargetedManagedAppConfiguration; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 946,386 |
public static MozuClient<com.mozu.api.contracts.reference.AddressSchemaCollection> getAddressSchemasClient() throws Exception
{
return getAddressSchemasClient( null);
} | static MozuClient<com.mozu.api.contracts.reference.AddressSchemaCollection> function() throws Exception { return getAddressSchemasClient( null); } | /**
* Retrieves the entire list of address schemas that the system supports.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.reference.AddressSchemaCollection> mozuClient=GetAddressSchemasClient();
* client.setBaseAddress(url);
* client.executeRequest();
* AddressSchemaCollection addressSchemaCollectio... | Retrieves the entire list of address schemas that the system supports. <code><code> MozuClient mozuClient=GetAddressSchemasClient(); client.setBaseAddress(url); client.executeRequest(); AddressSchemaCollection addressSchemaCollection = client.Result(); </code></code> | getAddressSchemasClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/platform/ReferenceDataClient.java",
"license": "mit",
"size": 27111
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,805,638 |
public List<LtSubject> findSubjectByName(String lastName, String firstName, String lsid) throws BusinessException; | List<LtSubject> function(String lastName, String firstName, String lsid) throws BusinessException; | /**
* Find Subject by last name and first name
*
* @param lastName
* @param firstName
* @throws BusinessException
*/ | Find Subject by last name and first name | findSubjectByName | {
"repo_name": "mikheladun/mvn-ejb3-jpa",
"path": "business/src/main/java/co/adun/mvnejb3jpa/business/service/SubjectService.java",
"license": "apache-2.0",
"size": 1857
} | [
"co.adun.mvnejb3jpa.business.exception.BusinessException",
"co.adun.mvnejb3jpa.persistence.entity.LtSubject",
"java.util.List"
] | import co.adun.mvnejb3jpa.business.exception.BusinessException; import co.adun.mvnejb3jpa.persistence.entity.LtSubject; import java.util.List; | import co.adun.mvnejb3jpa.business.exception.*; import co.adun.mvnejb3jpa.persistence.entity.*; import java.util.*; | [
"co.adun.mvnejb3jpa",
"java.util"
] | co.adun.mvnejb3jpa; java.util; | 1,236,526 |
public void endFakeDrag() {
if (!mFakeDragging) {
throw new IllegalStateException("No fake drag in progress. Call beginFakeDrag first.");
}
final VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
i... | void function() { if (!mFakeDragging) { throw new IllegalStateException(STR); } final VelocityTracker velocityTracker = mVelocityTracker; velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity); int initialVelocity = (int) VelocityTrackerCompat.getXVelocity( velocityTracker, mActivePointerId); mPopulatePending =... | /**
* End a fake drag of the pager.
*
* @see #beginFakeDrag()
* @see #fakeDragBy(float)
*/ | End a fake drag of the pager | endFakeDrag | {
"repo_name": "mrprona92/BrawlStarsNew",
"path": "appbase/src/main/java/com/mrprona/brawlassistant/base/view/TransformableViewPager.java",
"license": "apache-2.0",
"size": 113862
} | [
"android.support.v4.view.VelocityTrackerCompat",
"android.view.VelocityTracker"
] | import android.support.v4.view.VelocityTrackerCompat; import android.view.VelocityTracker; | import android.support.v4.view.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 1,002,659 |
@ServiceMethod(returns = ReturnType.SINGLE)
void restoreFiles(
String resourceGroupName,
String accountName,
String poolName,
String volumeName,
String snapshotName,
SnapshotRestoreFiles body,
Context context); | @ServiceMethod(returns = ReturnType.SINGLE) void restoreFiles( String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName, SnapshotRestoreFiles body, Context context); | /**
* Restore the specified files from the specified snapshot to the active filesystem.
*
* @param resourceGroupName The name of the resource group.
* @param accountName The name of the NetApp account.
* @param poolName The name of the capacity pool.
* @param volumeName The name of the vol... | Restore the specified files from the specified snapshot to the active filesystem | restoreFiles | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/fluent/SnapshotsClient.java",
"license": "mit",
"size": 21515
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.netapp.models.SnapshotRestoreFiles; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.netapp.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,073,390 |
Map<String, ?> getRecordFields(RecordTypeT record); | Map<String, ?> getRecordFields(RecordTypeT record); | /**
* Convert a record type into a map.
*
* @param record The record.
*
* @return The map of fields destined for Elasticsearch.
*/ | Convert a record type into a map | getRecordFields | {
"repo_name": "Miovision/awsbillingtools",
"path": "elasticsearch/src/main/java/com/miovision/oss/awsbillingtools/elasticsearch/ElasticsearchBillingRecordConverter.java",
"license": "mit",
"size": 2062
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,249,203 |
private void isOverlapping(DateTime start, DateTime stop, String chargeBoxId) {
try {
int count = DSL.using(config)
.selectOne()
.from(RESERVATION)
.where(RESERVATION.EXPIRYDATETIME.greaterOrEqual(start))
... | void function(DateTime start, DateTime stop, String chargeBoxId) { try { int count = DSL.using(config) .selectOne() .from(RESERVATION) .where(RESERVATION.EXPIRYDATETIME.greaterOrEqual(start)) .and(RESERVATION.STARTDATETIME.lessOrEqual(stop)) .and(RESERVATION.CHARGEBOXID.equal(chargeBoxId)) .execute(); if (count != 1) {... | /**
* Throws exception, if there are rows whose date/time ranges overlap with the input
*/ | Throws exception, if there are rows whose date/time ranges overlap with the input | isOverlapping | {
"repo_name": "dtag-dev-sec/emobility",
"path": "dist/src/centralsystem/src/main/java/de/rwth/idsg/steve/repository/ReservationRepositoryImpl.java",
"license": "gpl-3.0",
"size": 7648
} | [
"de.rwth.idsg.steve.SteveException",
"org.joda.time.DateTime",
"org.jooq.exception.DataAccessException",
"org.jooq.impl.DSL"
] | import de.rwth.idsg.steve.SteveException; import org.joda.time.DateTime; import org.jooq.exception.DataAccessException; import org.jooq.impl.DSL; | import de.rwth.idsg.steve.*; import org.joda.time.*; import org.jooq.exception.*; import org.jooq.impl.*; | [
"de.rwth.idsg",
"org.joda.time",
"org.jooq.exception",
"org.jooq.impl"
] | de.rwth.idsg; org.joda.time; org.jooq.exception; org.jooq.impl; | 1,844,426 |
public boolean hasDataElement( DataElement dataElement )
{
for ( DataSet dataSet : dataSets )
{
if ( dataSet.getDataElements().contains( dataElement ) )
{
return true;
}
}
return false;
} | boolean function( DataElement dataElement ) { for ( DataSet dataSet : dataSets ) { if ( dataSet.getDataElements().contains( dataElement ) ) { return true; } } return false; } | /**
* Indicates whether this organisation unit is associated with the given
* data element through its data set associations.
*/ | Indicates whether this organisation unit is associated with the given data element through its data set associations | hasDataElement | {
"repo_name": "hispindia/dhis2-Core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java",
"license": "bsd-3-clause",
"size": 34645
} | [
"org.hisp.dhis.dataelement.DataElement",
"org.hisp.dhis.dataset.DataSet"
] | import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataset.DataSet; | import org.hisp.dhis.dataelement.*; import org.hisp.dhis.dataset.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 875,700 |
//details container
WebMarkupContainer messageDetailsContainer = new WebMarkupContainer("messageDetailsContainer");
messageDetailsContainer.setOutputMarkupId(true);
//thread subject
Label threadSubjectLabel = new Label("threadSubject", new Model<String>(threadSubject));
messageDetailsContainer.add(t... | WebMarkupContainer messageDetailsContainer = new WebMarkupContainer(STR); messageDetailsContainer.setOutputMarkupId(true); Label threadSubjectLabel = new Label(STR, new Model<String>(threadSubject)); messageDetailsContainer.add(threadSubjectLabel); add(messageDetailsContainer); messageListContainer = new WebMarkupConta... | /**
* Does the actual rendering of the page
* @param currentUserUuid
* @param threadId
* @param threadSubject
*/ | Does the actual rendering of the page | renderMyMessagesView | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "profile2/tool/src/java/org/sakaiproject/profile2/tool/pages/panels/MessageView.java",
"license": "apache-2.0",
"size": 13431
} | [
"org.apache.wicket.markup.html.WebMarkupContainer",
"org.apache.wicket.markup.html.basic.Label",
"org.apache.wicket.markup.repeater.data.DataView",
"org.apache.wicket.model.Model",
"org.sakaiproject.profile2.model.Message",
"org.sakaiproject.profile2.tool.dataproviders.MessagesDataProvider"
] | import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.repeater.data.DataView; import org.apache.wicket.model.Model; import org.sakaiproject.profile2.model.Message; import org.sakaiproject.profile2.tool.dataproviders.MessagesDataProvide... | import org.apache.wicket.markup.html.*; import org.apache.wicket.markup.html.basic.*; import org.apache.wicket.markup.repeater.data.*; import org.apache.wicket.model.*; import org.sakaiproject.profile2.model.*; import org.sakaiproject.profile2.tool.dataproviders.*; | [
"org.apache.wicket",
"org.sakaiproject.profile2"
] | org.apache.wicket; org.sakaiproject.profile2; | 346,640 |
public void setTaskExecutor(TaskExecutor taskExecutor) {
this.taskExecutor = taskExecutor;
} | void function(TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; } | /**
* Allows you to specify a custom task executor for consuming messages.
*/ | Allows you to specify a custom task executor for consuming messages | setTaskExecutor | {
"repo_name": "curso007/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java",
"license": "apache-2.0",
"size": 111332
} | [
"org.springframework.core.task.TaskExecutor"
] | import org.springframework.core.task.TaskExecutor; | import org.springframework.core.task.*; | [
"org.springframework.core"
] | org.springframework.core; | 2,425,172 |
private static void validatePortNumbers(Set<String> errors, GenericKafkaListener listener) {
int port = listener.getPort();
if (FORBIDDEN_PORTS.contains(port)
|| port < LOWEST_ALLOWED_PORT_NUMBER) {
errors.add("port " + port + " is forbidden and cannot be used");
... | static void function(Set<String> errors, GenericKafkaListener listener) { int port = listener.getPort(); if (FORBIDDEN_PORTS.contains(port) port < LOWEST_ALLOWED_PORT_NUMBER) { errors.add(STR + port + STR); } } | /**
* Validates that the listener has an allowed port number
*
* @param errors List where any found errors will be added
* @param listener Listener which needs to be validated
*/ | Validates that the listener has an allowed port number | validatePortNumbers | {
"repo_name": "ppatierno/kaas",
"path": "cluster-operator/src/main/java/io/strimzi/operator/cluster/model/ListenersValidator.java",
"license": "apache-2.0",
"size": 29986
} | [
"io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener",
"java.util.Set"
] | import io.strimzi.api.kafka.model.listener.arraylistener.GenericKafkaListener; import java.util.Set; | import io.strimzi.api.kafka.model.listener.arraylistener.*; import java.util.*; | [
"io.strimzi.api",
"java.util"
] | io.strimzi.api; java.util; | 820,984 |
protected void addSessionInfo(CmsSessionInfo sessionInfo) {
if (getUserSessionMode() == UserSessionMode.standard) {
m_sessionStorageProvider.put(sessionInfo);
} else if (getUserSessionMode() == UserSessionMode.single) {
CmsUUID userId = sessionInfo.getUserId();
L... | void function(CmsSessionInfo sessionInfo) { if (getUserSessionMode() == UserSessionMode.standard) { m_sessionStorageProvider.put(sessionInfo); } else if (getUserSessionMode() == UserSessionMode.single) { CmsUUID userId = sessionInfo.getUserId(); List<CmsSessionInfo> infos = getSessionInfos(userId); if (infos.isEmpty() ... | /**
* Adds a new session info into the session storage.<p>
*
* @param sessionInfo the session info to store for the id
*/ | Adds a new session info into the session storage | addSessionInfo | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/main/CmsSessionManager.java",
"license": "lgpl-2.1",
"size": 30199
} | [
"java.util.List",
"org.opencms.configuration.CmsSystemConfiguration",
"org.opencms.util.CmsUUID"
] | import java.util.List; import org.opencms.configuration.CmsSystemConfiguration; import org.opencms.util.CmsUUID; | import java.util.*; import org.opencms.configuration.*; import org.opencms.util.*; | [
"java.util",
"org.opencms.configuration",
"org.opencms.util"
] | java.util; org.opencms.configuration; org.opencms.util; | 973,105 |
protected ArrayList<HashMap<String, String>> getMessageResults(final String indexName) {
ArrayList<HashMap<String, String>> results = new ArrayList<HashMap<String, String>>();
HashMap<String, String> notification = new HashMap<String, String>();
notification.put(IConstants.CONTENTS, "No index defined for name ... | ArrayList<HashMap<String, String>> function(final String indexName) { ArrayList<HashMap<String, String>> results = new ArrayList<HashMap<String, String>>(); HashMap<String, String> notification = new HashMap<String, String>(); notification.put(IConstants.CONTENTS, STR + indexName); notification.put(IConstants.FRAGMENT,... | /**
* This method returns the default message if there is no searcher defined for the index context, or the index is not generated or
* opened.
*
* @param indexName the name of the index
* @return the message/map that will be sent to the client
*/ | This method returns the default message if there is no searcher defined for the index context, or the index is not generated or opened | getMessageResults | {
"repo_name": "michaelcouck/ikube",
"path": "code/site/src/main/resources/discarded/SearcherWebService.java",
"license": "apache-2.0",
"size": 13835
} | [
"java.util.ArrayList",
"java.util.HashMap"
] | import java.util.ArrayList; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,318,906 |
Call<ResponseBody> getNullAsync(final ServiceCallback<Integer> serviceCallback); | Call<ResponseBody> getNullAsync(final ServiceCallback<Integer> serviceCallback); | /**
* Get null Int value.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link Call} object
*/ | Get null Int value | getNullAsync | {
"repo_name": "vulcansteel/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyinteger/IntOperations.java",
"license": "mit",
"size": 9148
} | [
"com.microsoft.rest.ServiceCallback",
"com.squareup.okhttp.ResponseBody"
] | import com.microsoft.rest.ServiceCallback; import com.squareup.okhttp.ResponseBody; | import com.microsoft.rest.*; import com.squareup.okhttp.*; | [
"com.microsoft.rest",
"com.squareup.okhttp"
] | com.microsoft.rest; com.squareup.okhttp; | 1,737,994 |
private void agentRemove() {
for (int i = 0; i < jListStartList.getSelectedValuesList().size(); i++) {
AgentClassElement4SimStart ac4s = jListStartList.getSelectedValuesList().get(i);
jListModelAgents2Start.removeElement(ac4s);
}
this.agentRenumberList();
this.save();
agentSelected = null;... | void function() { for (int i = 0; i < jListStartList.getSelectedValuesList().size(); i++) { AgentClassElement4SimStart ac4s = jListStartList.getSelectedValuesList().get(i); jListModelAgents2Start.removeElement(ac4s); } this.agentRenumberList(); this.save(); agentSelected = null; agentSelectedLast = null; jTextFieldStar... | /**
* This method removes all selected Agents from the StarterList
*/ | This method removes all selected Agents from the StarterList | agentRemove | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/gui/projectwindow/simsetup/StartSetup.java",
"license": "lgpl-2.1",
"size": 31693
} | [
"de.enflexit.common.ontology.gui.OntologyInstanceViewer"
] | import de.enflexit.common.ontology.gui.OntologyInstanceViewer; | import de.enflexit.common.ontology.gui.*; | [
"de.enflexit.common"
] | de.enflexit.common; | 1,334,800 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.