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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void join() {
if (this.regionThreads != null) {
for(Thread t: this.regionThreads) {
if (t.isAlive()) {
try {
Threads.threadDumpingIsAlive(t);
} catch (InterruptedException e) {
LOG.debug("Interrupted", e);
}
}
}
}
if ... | void function() { if (this.regionThreads != null) { for(Thread t: this.regionThreads) { if (t.isAlive()) { try { Threads.threadDumpingIsAlive(t); } catch (InterruptedException e) { LOG.debug(STR, e); } } } } if (this.masterThreads != null) { for (Thread t : this.masterThreads) { if (t.isAlive()) { try { Threads.threadD... | /**
* Wait for Mini HBase Cluster to shut down.
* Presumes you've already called {@link #shutdown()}.
*/ | Wait for Mini HBase Cluster to shut down. Presumes you've already called <code>#shutdown()</code> | join | {
"repo_name": "francisliu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java",
"license": "apache-2.0",
"size": 17104
} | [
"org.apache.hadoop.hbase.util.Threads"
] | import org.apache.hadoop.hbase.util.Threads; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 967,772 |
public Executor getTopologyExecutor() {
return topologyExecutor;
} | Executor function() { return topologyExecutor; } | /**
* Return the executor that updates topology information.
*
* @return An {@link Executor} instance.
*/ | Return the executor that updates topology information | getTopologyExecutor | {
"repo_name": "opendaylight/vtn",
"path": "manager/it/ofmock/src/main/java/org/opendaylight/vtn/manager/it/ofmock/impl/OfMockProvider.java",
"license": "epl-1.0",
"size": 42469
} | [
"java.util.concurrent.Executor"
] | import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 653,889 |
public JPopupMenu makeMethodMenu(T occupant, Location loc)
{
this.occupant = occupant;
this.currentLocation = loc;
JPopupMenu menu = new JPopupMenu();
Method[] methods = getMethods();
Class oldDcl = null;
for (int i = 0; i < methods.length; i++)
{
... | JPopupMenu function(T occupant, Location loc) { this.occupant = occupant; this.currentLocation = loc; JPopupMenu menu = new JPopupMenu(); Method[] methods = getMethods(); Class oldDcl = null; for (int i = 0; i < methods.length; i++) { Class dcl = methods[i].getDeclaringClass(); if (dcl != Object.class) { if (i > 0 && d... | /**
* Makes a menu that displays all public methods of an object
* @param occupant the object whose methods should be displayed
* @param loc the location of the occupant
* @return the menu to pop up
*/ | Makes a menu that displays all public methods of an object | makeMethodMenu | {
"repo_name": "jflory7/SFHSAPCompSci2015",
"path": "src/main/java/com/justinwflory/labs/gridworld/framework/info/gridworld/gui/MenuMaker.java",
"license": "apache-2.0",
"size": 18201
} | [
"info.gridworld.grid.Location",
"java.lang.reflect.Method",
"javax.swing.JPopupMenu"
] | import info.gridworld.grid.Location; import java.lang.reflect.Method; import javax.swing.JPopupMenu; | import info.gridworld.grid.*; import java.lang.reflect.*; import javax.swing.*; | [
"info.gridworld.grid",
"java.lang",
"javax.swing"
] | info.gridworld.grid; java.lang; javax.swing; | 1,647,148 |
public void addParameter(
final Parameter parameter) {
parameters.add(parameter);
}
| void function( final Parameter parameter) { parameters.add(parameter); } | /**
* Adds the parameter.
*
* @param parameter the parameter
*/ | Adds the parameter | addParameter | {
"repo_name": "smallAreaHealthStatisticsUnit/rapidInquiryFacility",
"path": "rifServices/src/main/java/org/sahsu/rif/services/concepts/CalculationMethod.java",
"license": "lgpl-3.0",
"size": 14068
} | [
"org.sahsu.rif.generic.concepts.Parameter"
] | import org.sahsu.rif.generic.concepts.Parameter; | import org.sahsu.rif.generic.concepts.*; | [
"org.sahsu.rif"
] | org.sahsu.rif; | 218,311 |
public void setElement(final DefaultApplicationSchemaInformation metadata) {
this.metadata = metadata;
} | void function(final DefaultApplicationSchemaInformation metadata) { this.metadata = metadata; } | /**
* Invoked by JAXB at unmarshalling time for storing the result temporarily.
*
* @param metadata The unmarshalled metadata.
*/ | Invoked by JAXB at unmarshalling time for storing the result temporarily | setElement | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/MD_ApplicationSchemaInformation.java",
"license": "apache-2.0",
"size": 3507
} | [
"org.apache.sis.metadata.iso.DefaultApplicationSchemaInformation"
] | import org.apache.sis.metadata.iso.DefaultApplicationSchemaInformation; | import org.apache.sis.metadata.iso.*; | [
"org.apache.sis"
] | org.apache.sis; | 49,396 |
boolean shouldFilterUpdate(PostUpdateEvent postUpdateEvent); | boolean shouldFilterUpdate(PostUpdateEvent postUpdateEvent); | /**
* Should the post update hibernate event be filtered or not
*
* @param postUpdateEvent The Hibernate post update event
* @return <code>true</code> if the event should be filtered, <code>false</code> otherwise
*/ | Should the post update hibernate event be filtered or not | shouldFilterUpdate | {
"repo_name": "baboune/compass",
"path": "src/main/src/org/compass/gps/device/hibernate/lifecycle/HibernateMirrorFilter.java",
"license": "apache-2.0",
"size": 2304
} | [
"org.hibernate.event.spi.PostUpdateEvent"
] | import org.hibernate.event.spi.PostUpdateEvent; | import org.hibernate.event.spi.*; | [
"org.hibernate.event"
] | org.hibernate.event; | 1,158,006 |
public Task rebootAsync(Connection c) throws
Types.BadServerResponse,
XmlRpcException {
String method_call = "Async.host.reboot";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map resp... | Task function(Connection c) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); if(response.get(STR).equals(S... | /**
* Reboot the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.)
*
* @return Task
*/ | Reboot the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.) | rebootAsync | {
"repo_name": "cc14514/hq6",
"path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/Host.java",
"license": "unlicense",
"size": 71202
} | [
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.util.*; import org.apache.xmlrpc.*; | [
"java.util",
"org.apache.xmlrpc"
] | java.util; org.apache.xmlrpc; | 1,299,850 |
protected int getDropItemId()
{
return Item.snowball.itemID;
}
| int function() { return Item.snowball.itemID; } | /**
* Returns the item ID for the item the mob drops on death.
*/ | Returns the item ID for the item the mob drops on death | getDropItemId | {
"repo_name": "kkaylium/RandomUtilities",
"path": "RandomUtilities/mobs/EntitySnowSlime.java",
"license": "lgpl-3.0",
"size": 12199
} | [
"net.minecraft.item.Item"
] | import net.minecraft.item.Item; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,025,171 |
protected void updateCrosshairValues(CrosshairState crosshairState,
double x, double y, double transX, double transY,
PlotOrientation orientation) {
updateCrosshairValues(crosshairState, x, y, 0, 0, transX, transY,
orientation);
} | void function(CrosshairState crosshairState, double x, double y, double transX, double transY, PlotOrientation orientation) { updateCrosshairValues(crosshairState, x, y, 0, 0, transX, transY, orientation); } | /**
* Considers the current (x, y) coordinate and updates the crosshair point
* if it meets the criteria (usually means the (x, y) coordinate is the
* closest to the anchor point so far).
*
* @param crosshairState the crosshair state (<code>null</code> permitted,
* ... | Considers the current (x, y) coordinate and updates the crosshair point if it meets the criteria (usually means the (x, y) coordinate is the closest to the anchor point so far) | updateCrosshairValues | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java",
"license": "lgpl-2.1",
"size": 73289
} | [
"org.jfree.chart.plot.CrosshairState",
"org.jfree.chart.plot.PlotOrientation"
] | import org.jfree.chart.plot.CrosshairState; import org.jfree.chart.plot.PlotOrientation; | import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,284,004 |
return ShutdownInfo.DATA_STRUCTURE_TYPE;
} | return ShutdownInfo.DATA_STRUCTURE_TYPE; } | /**
* Return the type of Data Structure we marshal
*
* @return short representation of the type data structure
*/ | Return the type of Data Structure we marshal | getDataStructureType | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v8/ShutdownInfoMarshaller.java",
"license": "apache-2.0",
"size": 3533
} | [
"org.apache.activemq.openwire.commands.ShutdownInfo"
] | import org.apache.activemq.openwire.commands.ShutdownInfo; | import org.apache.activemq.openwire.commands.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,698,132 |
public static CompletableFuture<Object> futureResult(ScheduledExecutorService executor, Object result) {
CompletableFuture<Object> future = new CompletableFuture<>();
executor.schedule(() -> future.complete(result), 0, TimeUnit.MILLISECONDS);
return future;
} | static CompletableFuture<Object> function(ScheduledExecutorService executor, Object result) { CompletableFuture<Object> future = new CompletableFuture<>(); executor.schedule(() -> future.complete(result), 0, TimeUnit.MILLISECONDS); return future; } | /**
* Returns a future that is completed with the {@code result} on the {@code executor}.
*/ | Returns a future that is completed with the result on the executor | futureResult | {
"repo_name": "jhalterman/recurrent",
"path": "src/test/java/net/jodah/failsafe/Testing.java",
"license": "apache-2.0",
"size": 5335
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.ScheduledExecutorService",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.CompletableFuture; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,963,664 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> failOverWithResponseAsync(
String resourceGroupName, String namespaceName, String alias) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentExcep... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function( String resourceGroupName, String namespaceName, String alias) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(... | /**
* Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name.
* @param alias The Disaster Recovery configuration name.
* @throws ... | Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace | failOverWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/DisasterRecoveryConfigsClientImpl.java",
"license": "mit",
"size": 101562
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil"
] | 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.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,091,052 |
public void ret(final int local) {
this.mv.visitVarInsn( Opcodes.RET,
local );
}
| void function(final int local) { this.mv.visitVarInsn( Opcodes.RET, local ); } | /**
* Generates a RET instruction.
*
* @param local a local variable identifier, as returned by {@link #newLocal
* newLocal}.
*/ | Generates a RET instruction | ret | {
"repo_name": "bobmcwhirter/drools",
"path": "drools-core/src/main/java/org/drools/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 52159
} | [
"org.drools.asm.Opcodes"
] | import org.drools.asm.Opcodes; | import org.drools.asm.*; | [
"org.drools.asm"
] | org.drools.asm; | 2,781,154 |
public Enumeration getAttributeNames() {
return (new AttributeNamesEnumerator());
} | Enumeration function() { return (new AttributeNamesEnumerator()); } | /**
* Override the <code>getAttributeNames()</code> method of the wrapped
* request.
*/ | Override the <code>getAttributeNames()</code> method of the wrapped request | getAttributeNames | {
"repo_name": "kabir/jbw-play",
"path": "src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java",
"license": "apache-2.0",
"size": 26334
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,321,689 |
public Document deleteAllElementAll(Document document) {
NodeList nodes = document.getElementsByTagName(XMLConstruct.ChildElementContainer);
for (int i = 0; i < nodes.getLength(); i++) {
nodes.item(i).getParentNode().removeChild(nodes.item(i));
}
return document;
}
| Document function(Document document) { NodeList nodes = document.getElementsByTagName(XMLConstruct.ChildElementContainer); for (int i = 0; i < nodes.getLength(); i++) { nodes.item(i).getParentNode().removeChild(nodes.item(i)); } return document; } | /**
* Delete All child elements
* @param document
*/ | Delete All child elements | deleteAllElementAll | {
"repo_name": "dev131/DropTillLate_Application",
"path": "ch.droptilllate.application/src/ch/droptilllate/database/query/ContainerQuery.java",
"license": "epl-1.0",
"size": 5247
} | [
"ch.droptilllate.application.properties.XMLConstruct",
"org.w3c.dom.Document",
"org.w3c.dom.NodeList"
] | import ch.droptilllate.application.properties.XMLConstruct; import org.w3c.dom.Document; import org.w3c.dom.NodeList; | import ch.droptilllate.application.properties.*; import org.w3c.dom.*; | [
"ch.droptilllate.application",
"org.w3c.dom"
] | ch.droptilllate.application; org.w3c.dom; | 1,548,884 |
private void calculateMaxMin(Object[] max, Object[] min, int[] decimal, int[] msrIndex,
Object[] row) {
// Update row level min max
for (int i = 0; i < msrIndex.length; i++) {
int count = msrIndex[i];
if (row[count] != null) {
if (type[count] == CarbonCommonConstants.SUM_COUNT_VALUE_... | void function(Object[] max, Object[] min, int[] decimal, int[] msrIndex, Object[] row) { for (int i = 0; i < msrIndex.length; i++) { int count = msrIndex[i]; if (row[count] != null) { if (type[count] == CarbonCommonConstants.SUM_COUNT_VALUE_MEASURE) { double value = (double) row[count]; double maxVal = (double) max[cou... | /**
* This method will be used to update the max value for each measure
*/ | This method will be used to update the max value for each measure | calculateMaxMin | {
"repo_name": "JihongMA/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/store/CarbonFactDataHandlerColumnar.java",
"license": "apache-2.0",
"size": 65163
} | [
"java.math.BigDecimal",
"org.apache.carbondata.core.constants.CarbonCommonConstants",
"org.apache.carbondata.core.util.DataTypeUtil",
"org.apache.spark.sql.types.Decimal"
] | import java.math.BigDecimal; import org.apache.carbondata.core.constants.CarbonCommonConstants; import org.apache.carbondata.core.util.DataTypeUtil; import org.apache.spark.sql.types.Decimal; | import java.math.*; import org.apache.carbondata.core.constants.*; import org.apache.carbondata.core.util.*; import org.apache.spark.sql.types.*; | [
"java.math",
"org.apache.carbondata",
"org.apache.spark"
] | java.math; org.apache.carbondata; org.apache.spark; | 1,545,455 |
void show(Window window, PivotGriffonApplication application); | void show(Window window, PivotGriffonApplication application); | /**
* Callback for displaying a window.
*
* @param window the window to be displayed
* @param application the current application
*/ | Callback for displaying a window | show | {
"repo_name": "griffon/griffon-pivot-plugin",
"path": "src/main/griffon/pivot/WindowDisplayHandler.java",
"license": "apache-2.0",
"size": 1271
} | [
"org.apache.pivot.wtk.Window"
] | import org.apache.pivot.wtk.Window; | import org.apache.pivot.wtk.*; | [
"org.apache.pivot"
] | org.apache.pivot; | 2,223,759 |
public ServiceFuture<Void> getBooleanNullAsync(Boolean boolQuery, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(getBooleanNullWithServiceResponseAsync(boolQuery), serviceCallback);
} | ServiceFuture<Void> function(Boolean boolQuery, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(getBooleanNullWithServiceResponseAsync(boolQuery), serviceCallback); } | /**
* Get null Boolean value on query (query string should be absent).
*
* @param boolQuery null boolean value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
*/ | Get null Boolean value on query (query string should be absent) | getBooleanNullAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/implementation/QueriesImpl.java",
"license": "mit",
"size": 139749
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,862,276 |
public static boolean isAtMost(Logger logger, Level levelMax) {
return isAtMost(logger.getLevel(), levelMax);
} | static boolean function(Logger logger, Level levelMax) { return isAtMost(logger.getLevel(), levelMax); } | /**
* Checks whether the logger has at most the specified level set.
*
* @param logger the logger to check
* @param levelMax the maximum level to meet
* @return if maximum logging level met
*/ | Checks whether the logger has at most the specified level set | isAtMost | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/core/logging/LoggingHelper.java",
"license": "gpl-3.0",
"size": 11644
} | [
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.util.logging.Level; import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,275,774 |
private static Set<ObservableId> nodeRequirements(MarketDataFeed feed, InterpolatedCurveConfig curveConfig) {
return curveConfig.getNodes().stream()
.flatMap(node -> node.requirements().stream())
.map(key -> key.toObservableId(feed))
.collect(toImmutableSet());
} | static Set<ObservableId> function(MarketDataFeed feed, InterpolatedCurveConfig curveConfig) { return curveConfig.getNodes().stream() .flatMap(node -> node.requirements().stream()) .map(key -> key.toObservableId(feed)) .collect(toImmutableSet()); } | /**
* Returns requirements for the market data needed by the curve nodes to build trades.
*
* @param feed the market data feed which provides quotes used to build the curve
* @param curveConfig the curve configuration containing the nodes
* @return requirements for the market data needed by the nodes t... | Returns requirements for the market data needed by the curve nodes to build trades | nodeRequirements | {
"repo_name": "nssales/Strata",
"path": "modules/function/src/main/java/com/opengamma/strata/function/marketdata/curve/ParRatesMarketDataFunction.java",
"license": "apache-2.0",
"size": 5258
} | [
"com.opengamma.strata.basics.market.MarketDataFeed",
"com.opengamma.strata.basics.market.ObservableId",
"com.opengamma.strata.market.curve.config.InterpolatedCurveConfig",
"java.util.Set"
] | import com.opengamma.strata.basics.market.MarketDataFeed; import com.opengamma.strata.basics.market.ObservableId; import com.opengamma.strata.market.curve.config.InterpolatedCurveConfig; import java.util.Set; | import com.opengamma.strata.basics.market.*; import com.opengamma.strata.market.curve.config.*; import java.util.*; | [
"com.opengamma.strata",
"java.util"
] | com.opengamma.strata; java.util; | 2,732,226 |
public void failShard(String reason, @Nullable Exception e) {
// fail the engine. This will cause this shard to also be removed from the node's index service.
getEngine().failEngine(reason, e);
} | void function(String reason, @Nullable Exception e) { getEngine().failEngine(reason, e); } | /**
* Fails the shard and marks the shard store as corrupted if
* <code>e</code> is caused by index corruption
*/ | Fails the shard and marks the shard store as corrupted if <code>e</code> is caused by index corruption | failShard | {
"repo_name": "HonzaKral/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 171709
} | [
"org.elasticsearch.common.Nullable"
] | import org.elasticsearch.common.Nullable; | import org.elasticsearch.common.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 982,324 |
public static XPath2FilterContainer newInstanceIntersect(
Document doc, String xpath2filter
) {
return new XPath2FilterContainer(
doc, xpath2filter, XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT);
} | static XPath2FilterContainer function( Document doc, String xpath2filter ) { return new XPath2FilterContainer( doc, xpath2filter, XPath2FilterContainer._ATT_FILTER_VALUE_INTERSECT); } | /**
* Creates a new XPath2FilterContainer with the filter type "intersect".
*
* @param doc
* @param xpath2filter
* @return the filter.
*/ | Creates a new XPath2FilterContainer with the filter type "intersect" | newInstanceIntersect | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/transforms/params/XPath2FilterContainer.java",
"license": "gpl-2.0",
"size": 9308
} | [
"org.w3c.dom.Document"
] | import org.w3c.dom.Document; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,459,072 |
public static void assertFileExists(String filename) {
File file = new File(filename);
assertTrue("File " + filename + " should exist", file.exists());
} | static void function(String filename) { File file = new File(filename); assertTrue(STR + filename + STR, file.exists()); } | /**
* To be used to check is a file is found in the file system
*/ | To be used to check is a file is found in the file system | assertFileExists | {
"repo_name": "kevinearls/camel",
"path": "components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java",
"license": "apache-2.0",
"size": 18742
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,067,128 |
public static Minus createMinus(Model model, ElementList elements) {
Minus minus = model.createResource(SP.Minus).as(Minus.class);
minus.addProperty(SP.elements, elements);
return minus;
}
| static Minus function(Model model, ElementList elements) { Minus minus = model.createResource(SP.Minus).as(Minus.class); minus.addProperty(SP.elements, elements); return minus; } | /**
* Creates a new Minus as a blank node in a given Model.
* @param model the Model to create the MINUS in
* @param elements the elements of the MINUS
* @return a new Minus
*/ | Creates a new Minus as a blank node in a given Model | createMinus | {
"repo_name": "vital-ai/sparql-spin",
"path": "src/org/topbraid/spin/model/SPINFactory.java",
"license": "apache-2.0",
"size": 26596
} | [
"com.hp.hpl.jena.rdf.model.Model"
] | import com.hp.hpl.jena.rdf.model.Model; | import com.hp.hpl.jena.rdf.model.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 2,671,401 |
private void recordVisibleContent(long durationMs) {
if (mVisibleContentRecorded) return;
mVisibleContentRecorded = true;
RecordHistogram.recordMediumTimesHistogram(
"Startup.Android.Cold.TimeToVisibleContent", durationMs);
} | void function(long durationMs) { if (mVisibleContentRecorded) return; mVisibleContentRecorded = true; RecordHistogram.recordMediumTimesHistogram( STR, durationMs); } | /**
* Record the first Visible Content time.
* This metric reports the minimum value of
* Startup.Android.Cold.TimeToFirstContentfulPaint.Tabbed and
* Browser.PaintPreview.TabbedPlayer.TimeToFirstBitmap.
*
* @param durationMs duration in millis.
*/ | Record the first Visible Content time. This metric reports the minimum value of Startup.Android.Cold.TimeToFirstContentfulPaint.Tabbed and Browser.PaintPreview.TabbedPlayer.TimeToFirstBitmap | recordVisibleContent | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/metrics/ActivityTabStartupMetricsTracker.java",
"license": "bsd-3-clause",
"size": 16400
} | [
"org.chromium.base.metrics.RecordHistogram"
] | import org.chromium.base.metrics.RecordHistogram; | import org.chromium.base.metrics.*; | [
"org.chromium.base"
] | org.chromium.base; | 2,410,211 |
EAttribute getTranslation_Message(); | EAttribute getTranslation_Message(); | /**
* Returns the meta object for the attribute '{@link com.odcgroup.process.model.Translation#getMessage <em>Message</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Message</em>'.
* @see com.odcgroup.process.model.Translation#getMessage()
* @see #g... | Returns the meta object for the attribute '<code>com.odcgroup.process.model.Translation#getMessage Message</code>'. | getTranslation_Message | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/process/core/com.odcgroup.process.model/src/generated/java/com/odcgroup/process/model/ProcessPackage.java",
"license": "epl-1.0",
"size": 83413
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,759,426 |
public void initialize(String filename) throws SchedulerException {
// short-circuit if already initialized
if (cfg != null) {
return;
}
if (initException != null) {
throw initException;
}
InputStream is = null;
Properties props = new... | void function(String filename) throws SchedulerException { if (cfg != null) { return; } if (initException != null) { throw initException; } InputStream is = null; Properties props = new Properties(); is = Thread.currentThread().getContextClassLoader().getResourceAsStream(filename); try { if(is != null) { is = new Buffe... | /**
* <p>
* Initialize the <code>{@link org.quartz.SchedulerFactory}</code> with
* the contents of the <code>Properties</code> file with the given
* name.
* </p>
*/ | Initialize the <code><code>org.quartz.SchedulerFactory</code></code> with the contents of the <code>Properties</code> file with the given name. | initialize | {
"repo_name": "zhongfuhua/tsp-quartz",
"path": "tsp-quartz-parent/tsp-quartz-core/src/main/java/org/quartz/impl/StdSchedulerFactory.java",
"license": "apache-2.0",
"size": 65309
} | [
"java.io.BufferedInputStream",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Properties",
"org.quartz.SchedulerException"
] | import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import org.quartz.SchedulerException; | import java.io.*; import java.util.*; import org.quartz.*; | [
"java.io",
"java.util",
"org.quartz"
] | java.io; java.util; org.quartz; | 1,618,975 |
@Override
public synchronized void onWebError(String msg) {
Log.e(TAG, msg);
}
// ******************************************************************** //
// Class Data.
// ******************************************************************** //
// Debugging tag.
@SuppressWarnings("unused")
pr... | synchronized void function(String msg) { Log.e(TAG, msg); } @SuppressWarnings(STR) private static final String TAG = STR; private static final long MIN_CHECK_INTERVAL = 60 * 60 * 1000; private static final long REFRESH_INTERVAL = 240 * 60 * 1000; private static final long FETCH_TIMEOUT = 15 * 60 * 1000; private final S... | /**
* Handle an error while fetching web data.
*
* @param msg The error message.
*/ | Handle an error while fetching web data | onWebError | {
"repo_name": "lnanek/MyMonitorForGlass",
"path": "HermitAndroidRefactor/src/org/hermit/android/net/CachedFile.java",
"license": "gpl-2.0",
"size": 12192
} | [
"android.database.sqlite.SQLiteDatabase",
"android.util.Log",
"java.util.HashMap"
] | import android.database.sqlite.SQLiteDatabase; import android.util.Log; import java.util.HashMap; | import android.database.sqlite.*; import android.util.*; import java.util.*; | [
"android.database",
"android.util",
"java.util"
] | android.database; android.util; java.util; | 2,279,223 |
private static ImportedGradeWrapper parseCsv(final InputStream is, final Map<String, String> userMap) throws GbImportExportInvalidColumnException, IOException {
// manually parse method so we can support arbitrary columns
final CSVReader reader = new CSVReader(new InputStreamReader(is));
String[] nextLine;
... | static ImportedGradeWrapper function(final InputStream is, final Map<String, String> userMap) throws GbImportExportInvalidColumnException, IOException { final CSVReader reader = new CSVReader(new InputStreamReader(is)); String[] nextLine; int lineCount = 0; final List<ImportedGrade> list = new ArrayList<ImportedGrade>(... | /**
* Parse a CSV into a list of ImportedGrade objects. Returns list if ok, or null if error
*
* @param is InputStream of the data to parse
* @return
* @throws IOException
* @throws GbImportExportInvalidColumnException
*/ | Parse a CSV into a list of ImportedGrade objects. Returns list if ok, or null if error | parseCsv | {
"repo_name": "Fudan-University/sakai",
"path": "gradebookng/tool/src/java/org/sakaiproject/gradebookng/business/util/ImportGradesHelper.java",
"license": "apache-2.0",
"size": 21483
} | [
"au.com.bytecode.opencsv.CSVReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.sakaiproject.gradebookng.business.exception.GbImportExportInvalidColumnException",
"org.sakaiproject.gradebookng.business.mod... | import au.com.bytecode.opencsv.CSVReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.sakaiproject.gradebookng.business.exception.GbImportExportInvalidColumnException; import org.sakaiprojec... | import au.com.bytecode.opencsv.*; import java.io.*; import java.util.*; import org.sakaiproject.gradebookng.business.exception.*; import org.sakaiproject.gradebookng.business.model.*; | [
"au.com.bytecode",
"java.io",
"java.util",
"org.sakaiproject.gradebookng"
] | au.com.bytecode; java.io; java.util; org.sakaiproject.gradebookng; | 581,086 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<CopyAuthorization> authorizeCopyDocumentModelAsync(
AuthorizeCopyRequest authorizeCopyRequest, Context context) {
return authorizeCopyDocumentModelWithResponseAsync(authorizeCopyRequest, context)
.flatMap(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<CopyAuthorization> function( AuthorizeCopyRequest authorizeCopyRequest, Context context) { return authorizeCopyDocumentModelWithResponseAsync(authorizeCopyRequest, context) .flatMap( (Response<CopyAuthorization> res) -> { if (res.getValue() != null) { return Mono.just(re... | /**
* Generates authorization to copy a model to this location with specified modelId and optional description.
*
* @param authorizeCopyRequest Authorize copy request parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if paramete... | Generates authorization to copy a model to this location with specified modelId and optional description | authorizeCopyDocumentModelAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormRecognizerClientImpl.java",
"license": "mit",
"size": 91373
} | [
"com.azure.ai.formrecognizer.implementation.models.AuthorizeCopyRequest",
"com.azure.ai.formrecognizer.implementation.models.CopyAuthorization",
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.ai.formrecognizer.implementation.models.AuthorizeCopyRequest; import com.azure.ai.formrecognizer.implementation.models.CopyAuthorization; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Con... | import com.azure.ai.formrecognizer.implementation.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.ai",
"com.azure.core"
] | com.azure.ai; com.azure.core; | 1,537,481 |
public void startCDATA (Augmentations augs) throws XNIException {
fInCDATASection = true;
if (!fDeferNodeExpansion) {
if (fFilterReject) {
return;
}
if (fCreateCDATANodes) {
setCharacterData (false);
}
... | void function (Augmentations augs) throws XNIException { fInCDATASection = true; if (!fDeferNodeExpansion) { if (fFilterReject) { return; } if (fCreateCDATANodes) { setCharacterData (false); } } } | /**
* The start of a CDATA section.
* @param augs Additional information that may include infoset augmentations
*
* @throws XNIException Thrown by handler to signal an error.
*/ | The start of a CDATA section | startCDATA | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/parsers/AbstractDOMParser.java",
"license": "gpl-2.0",
"size": 108450
} | [
"org.apache.xerces.xni.Augmentations",
"org.apache.xerces.xni.XNIException"
] | import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XNIException; | import org.apache.xerces.xni.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 118,513 |
public static boolean symlinkLocalRepositoryContents(
Path repositoryDirectory, Path targetDirectory, String userDefinedPath)
throws RepositoryFunctionException {
try {
FileSystemUtils.createDirectoryAndParents(repositoryDirectory);
for (Path target : targetDirectory.getDirectoryEntries())... | static boolean function( Path repositoryDirectory, Path targetDirectory, String userDefinedPath) throws RepositoryFunctionException { try { FileSystemUtils.createDirectoryAndParents(repositoryDirectory); for (Path target : targetDirectory.getDirectoryEntries()) { Path symlinkPath = repositoryDirectory.getRelative(targe... | /**
* Given a targetDirectory /some/path/to/y that contains files z, w, and v, create the following
* directory structure:
*
* <pre>
* .external-repository/
* x/
* WORKSPACE
* BUILD -> <build_root>/x.BUILD
* z -> /some/path/to/y/z
* w -> /some/path/to/y/w
* v... | Given a targetDirectory /some/path/to/y that contains files z, w, and v, create the following directory structure: <code> .external-repository x WORKSPACE BUILD -> <build_root>/x.BUILD z -> /some/path/to/y/z w -> /some/path/to/y/w v -> /some/path/to/y/v </code> | symlinkLocalRepositoryContents | {
"repo_name": "meteorcloudy/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java",
"license": "apache-2.0",
"size": 24609
} | [
"com.google.devtools.build.lib.vfs.FileSystemUtils",
"com.google.devtools.build.lib.vfs.Path",
"com.google.devtools.build.skyframe.SkyFunctionException",
"java.io.IOException"
] | import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.skyframe.SkyFunctionException; import java.io.IOException; | import com.google.devtools.build.lib.vfs.*; import com.google.devtools.build.skyframe.*; import java.io.*; | [
"com.google.devtools",
"java.io"
] | com.google.devtools; java.io; | 525,804 |
protected boolean isDone(Exchange exchange) {
boolean answer = isCancelledOrInterrupted(exchange);
// only done if the exchange hasn't failed
// and it has not been handled by the failure processor
// or we are exhausted
if (!answer) {
answer = exchange.getExcept... | boolean function(Exchange exchange) { boolean answer = isCancelledOrInterrupted(exchange); if (!answer) { answer = exchange.getException() == null ExchangeHelper.isFailureHandled(exchange) ExchangeHelper.isRedeliveryExhausted(exchange); } log.trace(STR, exchange.getExchangeId(), answer); return answer; } | /**
* Strategy to determine if the exchange is done so we can continue
*/ | Strategy to determine if the exchange is done so we can continue | isDone | {
"repo_name": "Thopap/camel",
"path": "camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java",
"license": "apache-2.0",
"size": 68933
} | [
"org.apache.camel.Exchange",
"org.apache.camel.util.ExchangeHelper"
] | import org.apache.camel.Exchange; import org.apache.camel.util.ExchangeHelper; | import org.apache.camel.*; import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,246,597 |
protected void insert(Visit visit) {
super.update(new Object[] { null, visit.getPet().getId(), new java.sql.Date(visit.getDate().getTime()),
visit.getDescription(), new Timestamp(new java.util.Date().getTime()) });
retrieveIdentity(visit);
}
} | void function(Visit visit) { super.update(new Object[] { null, visit.getPet().getId(), new java.sql.Date(visit.getDate().getTime()), visit.getDescription(), new Timestamp(new java.util.Date().getTime()) }); retrieveIdentity(visit); } } | /**
* Method to insert a new <code>Visit</code>.
*
* @param visit
* to insert
*/ | Method to insert a new <code>Visit</code> | insert | {
"repo_name": "baboune/compass",
"path": "samples/petclinic/src/java/org/compass/sample/petclinic/jdbc/AbstractJdbcClinic.java",
"license": "apache-2.0",
"size": 24301
} | [
"java.sql.Timestamp",
"java.util.Date",
"org.compass.sample.petclinic.Visit"
] | import java.sql.Timestamp; import java.util.Date; import org.compass.sample.petclinic.Visit; | import java.sql.*; import java.util.*; import org.compass.sample.petclinic.*; | [
"java.sql",
"java.util",
"org.compass.sample"
] | java.sql; java.util; org.compass.sample; | 1,770,850 |
public Email getEmailContent(String response)throws Exception
{
Email email = new Email();
JSONObject jsonObject = new JSONObject(response.trim());
JSONObject data = jsonObject.getJSONObject("data"); //No I18N
email.setSubject(data.getString("subject"));
email.setBody(data.getString("body"));
... | Email function(String response)throws Exception { Email email = new Email(); JSONObject jsonObject = new JSONObject(response.trim()); JSONObject data = jsonObject.getJSONObject("data"); email.setSubject(data.getString(STR)); email.setBody(data.getString("body")); email.setFileName(data.getString(STR)); email.setCustome... | /**
* Parse the JSON response into Email object.
*
* @param response JSON response contains the details of the email content.
*
* @return Returns the Email object.
*
* @throws Exception
*/ | Parse the JSON response into Email object | getEmailContent | {
"repo_name": "zoho/books-java-wrappers",
"path": "source/com/zoho/books/parser/SalesOrderParser.java",
"license": "mit",
"size": 21967
} | [
"com.zoho.books.model.Email",
"com.zoho.books.model.Emailtemplate",
"com.zoho.books.model.FromEmail",
"com.zoho.books.model.ToContact",
"java.util.ArrayList",
"java.util.List",
"org.json.JSONArray",
"org.json.JSONObject"
] | import com.zoho.books.model.Email; import com.zoho.books.model.Emailtemplate; import com.zoho.books.model.FromEmail; import com.zoho.books.model.ToContact; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONObject; | import com.zoho.books.model.*; import java.util.*; import org.json.*; | [
"com.zoho.books",
"java.util",
"org.json"
] | com.zoho.books; java.util; org.json; | 2,036,954 |
public void generate(ActivationClassBuilder acb,
MethodBuilder mb)
throws StandardException
{
RemapCRsVisitor rcrv = new RemapCRsVisitor(true);
methodCall.accept(rcrv);
assignResultSetNumber();
acb.pushGetResultSetFactoryExpression(mb);
int nargs = getScanArgume... | void function(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException { RemapCRsVisitor rcrv = new RemapCRsVisitor(true); methodCall.accept(rcrv); assignResultSetNumber(); acb.pushGetResultSetFactoryExpression(mb); int nargs = getScanArguments(acb, mb); mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) nu... | /**
* Generation on a FromVTI creates a wrapper around
* the user's java.sql.ResultSet
*
* @param acb The ActivationClassBuilder for the class being built
* @param mb The MethodBuilder for the execute() method to be built
*
* @exception StandardException Thrown on error
*/ | Generation on a FromVTI creates a wrapper around the user's java.sql.ResultSet | generate | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/compile/FromVTI.java",
"license": "apache-2.0",
"size": 61970
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"com.pivotal.gemfirexd.internal.iapi.reference.ClassName",
"com.pivotal.gemfirexd.internal.iapi.services.classfile.VMOpcode",
"com.pivotal.gemfirexd.internal.iapi.services.compiler.MethodBuilder",
"com.pivotal.gemfirexd.internal.impl.sql.compile... | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.reference.ClassName; import com.pivotal.gemfirexd.internal.iapi.services.classfile.VMOpcode; import com.pivotal.gemfirexd.internal.iapi.services.compiler.MethodBuilder; import com.pivotal.gemfirexd.internal.im... | import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.reference.*; import com.pivotal.gemfirexd.internal.iapi.services.classfile.*; import com.pivotal.gemfirexd.internal.iapi.services.compiler.*; import com.pivotal.gemfirexd.internal.impl.sql.compile.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 1,217,372 |
private VM createVM(String vmName, String networkName, boolean pluggedInterface) {
VM vm = new VM();
vm.setId(Guid.newGuid());
vm.setName(vmName);
VmNetworkInterface vmIface = createNewViewableInterface(pluggedInterface);
vmIface.setVmId(vm.getId());
vmIface.setNetwor... | VM function(String vmName, String networkName, boolean pluggedInterface) { VM vm = new VM(); vm.setId(Guid.newGuid()); vm.setName(vmName); VmNetworkInterface vmIface = createNewViewableInterface(pluggedInterface); vmIface.setVmId(vm.getId()); vmIface.setNetworkName(networkName); vm.getInterfaces().add(vmIface); return ... | /**
* Creates a VM instance with a given name, having an interface which uses a given network.
*
* @param vmName
* The VM name to be set
* @param networkName
* The network name to be set for the VM interface
* @param pluggedInterface
* whether the... | Creates a VM instance with a given name, having an interface which uses a given network | createVM | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java",
"license": "gpl-3.0",
"size": 8862
} | [
"org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface",
"org.ovirt.engine.core.compat.Guid"
] | import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; import org.ovirt.engine.core.compat.Guid; | import org.ovirt.engine.core.common.businessentities.network.*; import org.ovirt.engine.core.compat.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 916,540 |
private Element toElement(final Document document) {
return document.createElement(this.name);
}
| Element function(final Document document) { return document.createElement(this.name); } | /**
* Creates this element in XML document.
* @param document XML document
* @return creates a element in document
*/ | Creates this element in XML document | toElement | {
"repo_name": "ahwxl/cms",
"path": "icms/src/main/java/com/ckfinder/connector/data/XmlElementData.java",
"license": "apache-2.0",
"size": 3009
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,412,408 |
public static AsciiString randomString() {
return new AsciiString(randomBytes());
}
private Http2TestUtil() {
}
static class FrameAdapter extends ByteToMessageDecoder {
private final Http2Connection connection;
private final Http2FrameListener listener;
private fina... | static AsciiString function() { return new AsciiString(randomBytes()); } private Http2TestUtil() { } static class FrameAdapter extends ByteToMessageDecoder { private final Http2Connection connection; private final Http2FrameListener listener; private final DefaultHttp2FrameReader reader; private final CountDownLatch la... | /**
* Returns an {@link AsciiString} that wraps a randomly-filled byte array.
*/ | Returns an <code>AsciiString</code> that wraps a randomly-filled byte array | randomString | {
"repo_name": "hgl888/netty",
"path": "codec-http2/src/test/java/io/netty/handler/codec/http2/Http2TestUtil.java",
"license": "apache-2.0",
"size": 15810
} | [
"io.netty.handler.codec.ByteToMessageDecoder",
"io.netty.util.AsciiString",
"java.util.concurrent.CountDownLatch"
] | import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.util.AsciiString; import java.util.concurrent.CountDownLatch; | import io.netty.handler.codec.*; import io.netty.util.*; import java.util.concurrent.*; | [
"io.netty.handler",
"io.netty.util",
"java.util"
] | io.netty.handler; io.netty.util; java.util; | 2,835,570 |
public Font getFont() {
return font;
} | Font function() { return font; } | /**
* Gets the font.
*
* @return the font
*/ | Gets the font | getFont | {
"repo_name": "maltieri/docusign-restclient",
"path": "docusign-restclient-dto/src/main/java/uk/co/techblue/docusign/client/dto/tabs/DateSignedTab.java",
"license": "apache-2.0",
"size": 8157
} | [
"uk.co.techblue.docusign.client.envelope.attributes.Font"
] | import uk.co.techblue.docusign.client.envelope.attributes.Font; | import uk.co.techblue.docusign.client.envelope.attributes.*; | [
"uk.co.techblue"
] | uk.co.techblue; | 1,940,245 |
public void setSigningPrivateKey(PrivateKey signingPrivateKey) {
this.signingPrivateKey = signingPrivateKey;
} | void function(PrivateKey signingPrivateKey) { this.signingPrivateKey = signingPrivateKey; } | /**
* The key used to sign the EDI message.
*/ | The key used to sign the EDI message | setSigningPrivateKey | {
"repo_name": "sverkera/camel",
"path": "components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java",
"license": "apache-2.0",
"size": 11999
} | [
"java.security.PrivateKey"
] | import java.security.PrivateKey; | import java.security.*; | [
"java.security"
] | java.security; | 1,296,253 |
public void testLazyLoadIssue() throws Exception
{
Map<QName, ChildAssociationRef> assocRefs = buildNodeGraph();
// commit results
TestTransaction.flagForCommit();
TestTransaction.end();
UserTransaction userTransaction = txnService.getUserTransaction();
... | void function() throws Exception { Map<QName, ChildAssociationRef> assocRefs = buildNodeGraph(); TestTransaction.flagForCommit(); TestTransaction.end(); UserTransaction userTransaction = txnService.getUserTransaction(); try { userTransaction.begin(); ChildAssociationRef n6pn8Ref = assocRefs.get(QName.createQName(BaseNo... | /**
* Deletes a child node and then iterates over the children of the parent node,
* getting the QName. This caused some issues after we did some optimization
* using lazy loading of the associations.
*/ | Deletes a child node and then iterates over the children of the parent node, getting the QName. This caused some issues after we did some optimization using lazy loading of the associations | testLazyLoadIssue | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/test/java/org/alfresco/repo/node/db/DbNodeServiceImplTest.java",
"license": "lgpl-3.0",
"size": 38086
} | [
"java.util.List",
"java.util.Map",
"javax.transaction.UserTransaction",
"org.alfresco.repo.node.BaseNodeServiceTest",
"org.alfresco.service.cmr.repository.ChildAssociationRef",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName",
"org.springframework.test.context.tran... | import java.util.List; import java.util.Map; import javax.transaction.UserTransaction; import org.alfresco.repo.node.BaseNodeServiceTest; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; import org.springfram... | import java.util.*; import javax.transaction.*; import org.alfresco.repo.node.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; import org.springframework.test.context.transaction.*; | [
"java.util",
"javax.transaction",
"org.alfresco.repo",
"org.alfresco.service",
"org.springframework.test"
] | java.util; javax.transaction; org.alfresco.repo; org.alfresco.service; org.springframework.test; | 2,308,838 |
public static AbstractPersistenceAlgorithm<Cell> getRationalCellularAlgorithm(int maxDimension) {
return new ObjectAbsoluteHomology<Fraction, Cell>(RationalField.getInstance(), CellComparator.getInstance(), 0, maxDimension);
}
| static AbstractPersistenceAlgorithm<Cell> function(int maxDimension) { return new ObjectAbsoluteHomology<Fraction, Cell>(RationalField.getInstance(), CellComparator.getInstance(), 0, maxDimension); } | /**
* This function returns a cellular persistence algorithm over the the rational numbers.
*
* @param maxDimension the maximum dimension the algorithm should compute homology for
* @return a cellular homology algorithm over the rational numbers
*/ | This function returns a cellular persistence algorithm over the the rational numbers | getRationalCellularAlgorithm | {
"repo_name": "queenBNE/javaplex",
"path": "src/java/edu/stanford/math/plex4/api/Plex4.java",
"license": "bsd-3-clause",
"size": 21310
} | [
"edu.stanford.math.plex4.autogen.homology.ObjectAbsoluteHomology",
"edu.stanford.math.plex4.homology.chain_basis.Cell",
"edu.stanford.math.plex4.homology.chain_basis.CellComparator",
"edu.stanford.math.plex4.homology.interfaces.AbstractPersistenceAlgorithm",
"edu.stanford.math.primitivelib.algebraic.impl.Ra... | import edu.stanford.math.plex4.autogen.homology.ObjectAbsoluteHomology; import edu.stanford.math.plex4.homology.chain_basis.Cell; import edu.stanford.math.plex4.homology.chain_basis.CellComparator; import edu.stanford.math.plex4.homology.interfaces.AbstractPersistenceAlgorithm; import edu.stanford.math.primitivelib.alg... | import edu.stanford.math.plex4.autogen.homology.*; import edu.stanford.math.plex4.homology.chain_basis.*; import edu.stanford.math.plex4.homology.interfaces.*; import edu.stanford.math.primitivelib.algebraic.impl.*; import org.apache.commons.math.fraction.*; | [
"edu.stanford.math",
"org.apache.commons"
] | edu.stanford.math; org.apache.commons; | 1,255,911 |
@Test
public void whenMultipleTwoAndThreeThenSix() {
Calculator calc = new Calculator();
calc.multiple(2D, 3D);
double result = calc.getResult();
double expected = 6D;
assertThat(result, is(expected));
} | void function() { Calculator calc = new Calculator(); calc.multiple(2D, 3D); double result = calc.getResult(); double expected = 6D; assertThat(result, is(expected)); } | /**
* Test multiple.
*/ | Test multiple | whenMultipleTwoAndThreeThenSix | {
"repo_name": "stosabon/ssobolevsky",
"path": "chapter_001/src/test/java/ru/job4j/calculator/CalculatorTest.java",
"license": "apache-2.0",
"size": 1364
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 921,993 |
public OAuth2TokenIntrospectionAuthorizerBuilder clientAuthorization(
Supplier<String> authorizationSupplier, String authorizationType) {
clientAuthorization = ClientAuthorization.ofAuthorization(authorizationSupplier, authorizationType);
return this;
} | OAuth2TokenIntrospectionAuthorizerBuilder function( Supplier<String> authorizationSupplier, String authorizationType) { clientAuthorization = ClientAuthorization.ofAuthorization(authorizationSupplier, authorizationType); return this; } | /**
* Provides client authorization for the OAuth 2.0 Introspection requests based on encoded authorization
* token and authorization type,
* as per <a href="https://datatracker.ietf.org/doc/html/rfc6749#section-2.3">[RFC6749], Section 2.3</a>.
*
* @param authorizationSupplier A supplier of enc... | Provides client authorization for the OAuth 2.0 Introspection requests based on encoded authorization token and authorization type, as per [RFC6749], Section 2.3 | clientAuthorization | {
"repo_name": "trustin/armeria",
"path": "oauth2/src/main/java/com/linecorp/armeria/server/auth/oauth2/OAuth2TokenIntrospectionAuthorizerBuilder.java",
"license": "apache-2.0",
"size": 9280
} | [
"com.linecorp.armeria.common.auth.oauth2.ClientAuthorization",
"java.util.function.Supplier"
] | import com.linecorp.armeria.common.auth.oauth2.ClientAuthorization; import java.util.function.Supplier; | import com.linecorp.armeria.common.auth.oauth2.*; import java.util.function.*; | [
"com.linecorp.armeria",
"java.util"
] | com.linecorp.armeria; java.util; | 499,587 |
protected void selectSREFromConfig(ILaunchConfiguration config) {
String sreId = null;
try {
sreId = config.getAttribute(
SARLEclipseConfig.ATTR_SARL_RUNTIME_ENVIRONMENT,
(String) null);
} catch (CoreException ce) {
SARLEclipsePlugin.getDefault().log(ce);
}
final ISREInstall sre = SARLRunti... | void function(ILaunchConfiguration config) { String sreId = null; try { sreId = config.getAttribute( SARLEclipseConfig.ATTR_SARL_RUNTIME_ENVIRONMENT, (String) null); } catch (CoreException ce) { SARLEclipsePlugin.getDefault().log(ce); } final ISREInstall sre = SARLRuntime.getSREFromId(Strings.nullToEmpty(sreId)); final... | /**
* Loads the SARL runtime environment from the launch configuration's preference store.
*
* @param config - the config to load the runtime environment from
*/ | Loads the SARL runtime environment from the launch configuration's preference store | selectSREFromConfig | {
"repo_name": "gallandarakhneorg/sarl",
"path": "eclipse-sarl/plugins/io.sarl.eclipse/src/io/sarl/eclipse/launching/dialog/SARLRuntimeEnvironmentTab.java",
"license": "apache-2.0",
"size": 12546
} | [
"com.google.common.base.Strings",
"io.sarl.eclipse.SARLEclipseConfig",
"io.sarl.eclipse.SARLEclipsePlugin",
"io.sarl.eclipse.runtime.ISREInstall",
"io.sarl.eclipse.runtime.SARLRuntime",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.debug.core.ILaunchConfiguration"
] | import com.google.common.base.Strings; import io.sarl.eclipse.SARLEclipseConfig; import io.sarl.eclipse.SARLEclipsePlugin; import io.sarl.eclipse.runtime.ISREInstall; import io.sarl.eclipse.runtime.SARLRuntime; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.ILaunchConfiguration; | import com.google.common.base.*; import io.sarl.eclipse.*; import io.sarl.eclipse.runtime.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.core.*; | [
"com.google.common",
"io.sarl.eclipse",
"org.eclipse.core",
"org.eclipse.debug"
] | com.google.common; io.sarl.eclipse; org.eclipse.core; org.eclipse.debug; | 1,349,465 |
@Deprecated
public void setCurves(CurveInterface[] curves) {
for(CurveInterface curve : curves) setCurve(curve);
}
| void function(CurveInterface[] curves) { for(CurveInterface curve : curves) setCurve(curve); } | /**
* Set some curves.
*
* @param curves Array of curves to set.
* @deprecated This class will become immutable. Use addCurve instead.
*/ | Set some curves | setCurves | {
"repo_name": "BBreiden/finmath-lib",
"path": "src/main/java/net/finmath/analytic/model/AnalyticModel.java",
"license": "apache-2.0",
"size": 7805
} | [
"net.finmath.analytic.model.curves.CurveInterface"
] | import net.finmath.analytic.model.curves.CurveInterface; | import net.finmath.analytic.model.curves.*; | [
"net.finmath.analytic"
] | net.finmath.analytic; | 494,257 |
private static void assertConnOK(Connection conn) throws SQLException{
Statement s = conn.createStatement();
ResultSet rs = s.executeQuery("VALUES(1)");
JDBC.assertSingleValueResultSet(rs, "1");
}
| static void function(Connection conn) throws SQLException{ Statement s = conn.createStatement(); ResultSet rs = s.executeQuery(STR); JDBC.assertSingleValueResultSet(rs, "1"); } | /**
* Excecute a simple SQL statement to assert that the connection is valid
* @param conn Connection to check
* @throws SQLException on error
*/ | Excecute a simple SQL statement to assert that the connection is valid | assertConnOK | {
"repo_name": "kavin256/Derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATest.java",
"license": "apache-2.0",
"size": 54819
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"org.apache.derbyTesting.junit.JDBC"
] | import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC; | import java.sql.*; import org.apache.*; | [
"java.sql",
"org.apache"
] | java.sql; org.apache; | 790,437 |
@Test
public void testSimpleReverseGeocode() throws Exception {
GeocodingResult[] results = GeocodingApi.newRequest(context)
.latlng(new LatLng(40.714224, -73.961452)).await();
assertNotNull(results);
assertEquals("277 Bedford Avenue, Brooklyn, NY 11211, USA", results[0].formattedAddress);
... | void function() throws Exception { GeocodingResult[] results = GeocodingApi.newRequest(context) .latlng(new LatLng(40.714224, -73.961452)).await(); assertNotNull(results); assertEquals(STR, results[0].formattedAddress); assertEquals("277", results[0].addressComponents[0].longName); assertEquals("277", results[0].addres... | /**
* Simple reverse geocoding.
* <a href="https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452">
* Reverse geocode (40.714224,-73.961452)</a>.
*/ | Simple reverse geocoding. Reverse geocode (40.714224,-73.961452) | testSimpleReverseGeocode | {
"repo_name": "brokencranium/google-maps-services-java",
"path": "src/test/java/com/google/maps/GeocodingApiTest.java",
"license": "apache-2.0",
"size": 9614
} | [
"com.google.maps.model.AddressComponentType",
"com.google.maps.model.AddressType",
"com.google.maps.model.GeocodingResult",
"com.google.maps.model.LatLng",
"org.junit.Assert"
] | import com.google.maps.model.AddressComponentType; import com.google.maps.model.AddressType; import com.google.maps.model.GeocodingResult; import com.google.maps.model.LatLng; import org.junit.Assert; | import com.google.maps.model.*; import org.junit.*; | [
"com.google.maps",
"org.junit"
] | com.google.maps; org.junit; | 1,696,597 |
EList<CS> getRealmCodes();
| EList<CS> getRealmCodes(); | /**
* Returns the value of the '<em><b>Realm Code</b></em>' containment reference list.
* The list contents are of type {@link org.openhealthtools.mdht.uml.hl7.datatypes.CS}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Realm Code</em>' containment reference list isn't clear,
* there r... | Returns the value of the 'Realm Code' containment reference list. The list contents are of type <code>org.openhealthtools.mdht.uml.hl7.datatypes.CS</code>. If the meaning of the 'Realm Code' containment reference list isn't clear, there really should be more of a description here... | getRealmCodes | {
"repo_name": "drbgfc/mdht",
"path": "cda/plugins/org.openhealthtools.mdht.uml.cda/src/org/openhealthtools/mdht/uml/cda/ExternalObservation.java",
"license": "epl-1.0",
"size": 14462
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 899,455 |
@ClientOnly
public void setGlobalWeather(SpoutWeather weather);
| void function(SpoutWeather weather); | /**
* Sets the whole servers weather to render as the specified SpoutWeather
*
* @param weather to set the world to
*/ | Sets the whole servers weather to render as the specified SpoutWeather | setGlobalWeather | {
"repo_name": "Sleaker/SpoutPluginAPI",
"path": "src/org/getspout/spoutapi/player/BiomeManager.java",
"license": "lgpl-3.0",
"size": 2604
} | [
"org.getspout.spoutapi.block.SpoutWeather"
] | import org.getspout.spoutapi.block.SpoutWeather; | import org.getspout.spoutapi.block.*; | [
"org.getspout.spoutapi"
] | org.getspout.spoutapi; | 2,165,360 |
protected void sequence_AlternativeMultiplicities(ISerializationContext context, AlternativeMultiplicities semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, AlternativeMultiplicities semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* AlternativeMultiplicities returns AlternativeMultiplicities
*
* Constraint:
* ((val2=ID | val3=ID)? (val4+=ID | val5+=ID)+ val6+=ID? (val7+=ID? val6+=ID?)*)
*/ | Contexts: AlternativeMultiplicities returns AlternativeMultiplicities Constraint: ((val2=ID | val3=ID)? (val4+=ID | val5+=ID)+ val6+=ID? (val7+=ID? val6+=ID?)*) | sequence_AlternativeMultiplicities | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/serializer/serializer/SequencerTestLanguageSemanticSequencer.java",
"license": "epl-1.0",
"size": 39304
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.eclipse.xtext.serializer.sequencertest.AlternativeMultiplicities"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.sequencertest.AlternativeMultiplicities; | import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.sequencertest.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 1,688,668 |
protected void processFormLayout(FormInstance topLevelForm,
FormInstance form,
Map<String, Object> inputs,
Map<String, Object> outputs,
String layoutTemplate,
StringBuilder jsonTemplate,
boolean wrapJson,
List<String> scriptDa... | void function(FormInstance topLevelForm, FormInstance form, Map<String, Object> inputs, Map<String, Object> outputs, String layoutTemplate, StringBuilder jsonTemplate, boolean wrapJson, List<String> scriptDataList) { FormLayout layout = form.getLayout(); if (form.getModel().getClassName() != null && wrapJson) { Optiona... | /**
* Renders the entire form (including any subforms if found as nested forms)
* @param topLevelForm - the top level form to be rendered, if needed it should include all nested forms inside or lookup mechanism
* @param form - form being currently processed - could be top level (on first iteration) or ne... | Renders the entire form (including any subforms if found as nested forms) | processFormLayout | {
"repo_name": "droolsjbpm/droolsjbpm-integration",
"path": "kie-server-parent/kie-server-services/kie-server-services-jbpm-ui/src/main/java/org/kie/server/services/jbpm/ui/form/render/AbstractFormRenderer.java",
"license": "apache-2.0",
"size": 36296
} | [
"java.io.ByteArrayInputStream",
"java.nio.charset.Charset",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.Optional",
"java.util.UUID",
"org.kie.server.services.jbpm.ui.form.render.model.FormField",
"org.kie.server.services.jbpm.ui.form.render.model.FormInstance",
"org.kie.serv... | import java.io.ByteArrayInputStream; import java.nio.charset.Charset; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.UUID; import org.kie.server.services.jbpm.ui.form.render.model.FormField; import org.kie.server.services.jbpm.ui.form.render.model.Form... | import java.io.*; import java.nio.charset.*; import java.util.*; import org.kie.server.services.jbpm.ui.form.render.model.*; | [
"java.io",
"java.nio",
"java.util",
"org.kie.server"
] | java.io; java.nio; java.util; org.kie.server; | 579,000 |
public void testTraceWithException() {
VectorAppender appender = new VectorAppender();
appender.activateOptions();
Logger root = Logger.getRootLogger();
root.addAppender(appender);
root.setLevel(Level.INFO);
Logger tracer = Logger.getLogger("com.example.Tracer");
... | void function() { VectorAppender appender = new VectorAppender(); appender.activateOptions(); Logger root = Logger.getRootLogger(); root.addAppender(appender); root.setLevel(Level.INFO); Logger tracer = Logger.getLogger(STR); tracer.setLevel(Level.TRACE); NullPointerException ex = new NullPointerException(); tracer.tra... | /**
* Tests logger.trace(Object, Exception).
* @since 1.2.12
*/ | Tests logger.trace(Object, Exception) | testTraceWithException | {
"repo_name": "alipayhuber/hack-log4j",
"path": "tests/src/java/org/apache/log4j/LoggerTestCase.java",
"license": "apache-2.0",
"size": 12028
} | [
"java.util.Vector",
"org.apache.log4j.spi.LoggingEvent"
] | import java.util.Vector; import org.apache.log4j.spi.LoggingEvent; | import java.util.*; import org.apache.log4j.spi.*; | [
"java.util",
"org.apache.log4j"
] | java.util; org.apache.log4j; | 2,460,370 |
private int readToBuf(int toRead) throws IOException {
if (toRead < 0) {
toRead = (maxPacketReadLen > 0 ? maxPacketReadLen : buf.capacity())
- buf.limit();
}
int nRead = in.read(buf.array(), buf.limit(), toRead);
if (nRead < 0) {
throw new EOFException("while trying to read " + toRead + " bytes"... | int function(int toRead) throws IOException { if (toRead < 0) { toRead = (maxPacketReadLen > 0 ? maxPacketReadLen : buf.capacity()) - buf.limit(); } int nRead = in.read(buf.array(), buf.limit(), toRead); if (nRead < 0) { throw new EOFException(STR + toRead + STR); } bufRead = buf.limit() + nRead; buf.limit(bufRead); re... | /**
* reads upto toRead byte to buf at buf.limit() and increments the limit.
* throws an IOException if read does not succeed.
*/ | reads upto toRead byte to buf at buf.limit() and increments the limit. throws an IOException if read does not succeed | readToBuf | {
"repo_name": "shot/hadoop-source-reading",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java",
"license": "apache-2.0",
"size": 31805
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 53,813 |
//-------------------------------------------------------------------------
public Set<String> getGroups() {
return Collections.unmodifiableSet(_config.keySet());
} | Set<String> function() { return Collections.unmodifiableSet(_config.keySet()); } | /**
* Gets the group names.
*
* @return the group names, not null
*/ | Gets the group names | getGroups | {
"repo_name": "McLeodMoores/starling",
"path": "projects/component/src/main/java/com/opengamma/component/ComponentConfig.java",
"license": "apache-2.0",
"size": 2627
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,136,466 |
protected SecretKey engineGenerateKey() {
if (this.random == null) {
this.random = SunJCE.getRandom();
}
byte[] keyBytes = new byte[this.keysize];
this.random.nextBytes(keyBytes);
try {
return new SecretKeySpec(keyBytes, "HmacMD5");
} finally... | SecretKey function() { if (this.random == null) { this.random = SunJCE.getRandom(); } byte[] keyBytes = new byte[this.keysize]; this.random.nextBytes(keyBytes); try { return new SecretKeySpec(keyBytes, STR); } finally { Arrays.fill(keyBytes, (byte)0); } } | /**
* Generates an HMAC-MD5 key.
*
* @return the new HMAC-MD5 key
*/ | Generates an HMAC-MD5 key | engineGenerateKey | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/com/sun/crypto/provider/HmacMD5KeyGenerator.java",
"license": "apache-2.0",
"size": 3780
} | [
"java.util.Arrays",
"javax.crypto.SecretKey",
"javax.crypto.spec.SecretKeySpec"
] | import java.util.Arrays; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; | import java.util.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.util",
"javax.crypto"
] | java.util; javax.crypto; | 337,785 |
public void batchResult(APIClient client, JSONArray actions, JSONObject result); | void function(APIClient client, JSONArray actions, JSONObject result); | /**
* Asynchronously receive result of APIClient.updateUserKeyASync methods.
*/ | Asynchronously receive result of APIClient.updateUserKeyASync methods | batchResult | {
"repo_name": "Acidburn0zzz/algoliasearch-client-android",
"path": "src/main/java/com/algolia/search/saas/APIClientListener.java",
"license": "mit",
"size": 6022
} | [
"org.json.JSONArray",
"org.json.JSONObject"
] | import org.json.JSONArray; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 2,309,575 |
public void checkConnection(ConnectionCheckJob job, String connectionCheckUrl) throws IOException {
testConnection(new URL(connectionCheckUrl));
} | void function(ConnectionCheckJob job, String connectionCheckUrl) throws IOException { testConnection(new URL(connectionCheckUrl)); } | /**
* Check network connectivity by trying to establish a connection to
* the host in connectionCheckUrl.
*
* @param job The connection checker that is invoking this strategy.
* @param connectionCheckUrl A string containing the URL of a domain
* that is ass... | Check network connectivity by trying to establish a connection to the host in connectionCheckUrl | checkConnection | {
"repo_name": "gusreiber/jenkins",
"path": "core/src/main/java/hudson/model/UpdateCenter.java",
"license": "mit",
"size": 68612
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,608,502 |
public JsonObject prepare() {
if (channel != null) {
slackMessage.addProperty("channel", channel);
}
if (username != null) {
slackMessage.addProperty("username", username);
}
if (icon != null) {
if (icon.contains("http")) {
... | JsonObject function() { if (channel != null) { slackMessage.addProperty(STR, channel); } if (username != null) { slackMessage.addProperty(STR, username); } if (icon != null) { if (icon.contains("http")) { slackMessage.addProperty(STR, icon); } else { slackMessage.addProperty(STR, icon); } } slackMessage.addProperty(STR... | /**
* Convert SlackMessage to JSON
*
* @return JsonObject
*/ | Convert SlackMessage to JSON | prepare | {
"repo_name": "devicemagic/spoon-slack-plugin",
"path": "src/main/java/net/gpedro/integrations/slack/SlackMessage.java",
"license": "mit",
"size": 3929
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,199,211 |
ArrayList<String> staticResources = find(staticFolder);
if (staticResources.size() == 0) {
return false;
}
for (String staticFile : staticResources) {
try (InputStream is = JarUtil.class.getResourceAsStream("/" + staticFile)) {
Path newStaticFile = Serve... | ArrayList<String> staticResources = find(staticFolder); if (staticResources.size() == 0) { return false; } for (String staticFile : staticResources) { try (InputStream is = JarUtil.class.getResourceAsStream("/" + staticFile)) { Path newStaticFile = ServerProperties.getFileInCurrentDir(staticFile); Files.deleteIfExists(... | /**
* Unpacks all files from staticFolder of jar and puts them to current folder within staticFolder path.
*
* @param staticFolder - path to resources
* @throws Exception
*/ | Unpacks all files from staticFolder of jar and puts them to current folder within staticFolder path | unpackStaticFiles | {
"repo_name": "igaidai4uk/blynk-server",
"path": "server/launcher/src/main/java/cc/blynk/utils/JarUtil.java",
"license": "gpl-3.0",
"size": 3485
} | [
"java.io.InputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.StandardCopyOption",
"java.util.ArrayList"
] | import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import java.util.ArrayList; | import java.io.*; import java.nio.file.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 2,525,297 |
static void requestPermissions(Context context, BaseHelper baseHelper) {
// Register the calling BaseHelper with the global lock to notify
// it when PermissionsRequestActivity has finished.
PermissionsRequestLock.getInstance().addListener(baseHelper);
if (!permissionsRequestInprog... | static void requestPermissions(Context context, BaseHelper baseHelper) { PermissionsRequestLock.getInstance().addListener(baseHelper); if (!permissionsRequestInprogress.get()) { Intent intent = new Intent(context, PermissionsActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent);... | /**
* ALWAYS START THIS ACTIVITY USING THIS HELPER METHOD.
*/ | ALWAYS START THIS ACTIVITY USING THIS HELPER METHOD | requestPermissions | {
"repo_name": "julioromano/RxLocation",
"path": "rxlocation/src/main/java/net/kjulio/rxlocation/PermissionsActivity.java",
"license": "apache-2.0",
"size": 3134
} | [
"android.content.Context",
"android.content.Intent"
] | import android.content.Context; import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,432,476 |
@Override
public FObj make(FObj parent, PropertyList propertyList,
String systemId, int line, int column)
throws FOPException {
return new BarcodeElement(parent, propertyList,
systemId, line, column);
... | FObj function(FObj parent, PropertyList propertyList, String systemId, int line, int column) throws FOPException { return new BarcodeElement(parent, propertyList, systemId, line, column); } } | /**
* make an SVG object.
*
* @param parent the parent formatting object
* @param propertyList the explicit properties of this object
* @param systemId
* @param line
* @param column
*
* @return the SVG object
* @throws org.apache.... | make an SVG object | make | {
"repo_name": "mbhk/barcode4j",
"path": "barcode4j-fop-ext-0.20.5/src/main/java/org/krysalis/barcode4j/fop0205/BarcodeElement.java",
"license": "apache-2.0",
"size": 8851
} | [
"org.apache.fop.apps.FOPException",
"org.apache.fop.fo.FObj",
"org.apache.fop.fo.PropertyList"
] | import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; | import org.apache.fop.apps.*; import org.apache.fop.fo.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,155,914 |
public static org.w3c.dom.NodeList convert(List<Node> l) {
Element dummyRoot = new Element("DummyRoot");
for (Node n : l) {
dummyRoot.appendChild(n);
}
Document dummyDoc = new Document(dummyRoot);
DocumentBuilder db = null;
try {
db = Doc... | static org.w3c.dom.NodeList function(List<Node> l) { Element dummyRoot = new Element(STR); for (Node n : l) { dummyRoot.appendChild(n); } Document dummyDoc = new Document(dummyRoot); DocumentBuilder db = null; try { db = DocumentBuilderFactory.newInstance().newDocumentBuilder(); final org.w3c.dom.Document doc = DOMConv... | /**
* Converts a list of XOM nodes to an equivalent DOM NodeList
*
* @param l the list of XOM nodes
* @return a DOM NodeList equivalent to l
*/ | Converts a list of XOM nodes to an equivalent DOM NodeList | convert | {
"repo_name": "diogo-andrade/DataHubSystem",
"path": "petascope/src/main/java/petascope/util/XMLUtil.java",
"license": "agpl-3.0",
"size": 35634
} | [
"java.util.List",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"nu.xom.Document",
"nu.xom.Element",
"nu.xom.Node",
"nu.xom.converters.DOMConverter"
] | import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import nu.xom.Document; import nu.xom.Element; import nu.xom.Node; import nu.xom.converters.DOMConverter; | import java.util.*; import javax.xml.parsers.*; import nu.xom.*; import nu.xom.converters.*; | [
"java.util",
"javax.xml",
"nu.xom",
"nu.xom.converters"
] | java.util; javax.xml; nu.xom; nu.xom.converters; | 1,576,069 |
public IoBuffer encodeHeader(final RTMP rtmp, final Header header, final Header lastHeader) {
final IoBuffer result = IoBuffer.allocate(calculateHeaderSize(rtmp, header, lastHeader));
encodeHeader(rtmp, header, lastHeader, result);
return result;
}
| IoBuffer function(final RTMP rtmp, final Header header, final Header lastHeader) { final IoBuffer result = IoBuffer.allocate(calculateHeaderSize(rtmp, header, lastHeader)); encodeHeader(rtmp, header, lastHeader, result); return result; } | /**
* Encode RTMP header.
* @param rtmp The protocol state
* @param header RTMP message header
* @param lastHeader Previous header
* @return Encoded header data
*/ | Encode RTMP header | encodeHeader | {
"repo_name": "cwpenhale/red5-mobileconsole",
"path": "red5_server/src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolEncoder.java",
"license": "apache-2.0",
"size": 34442
} | [
"org.apache.mina.core.buffer.IoBuffer",
"org.red5.server.net.rtmp.message.Header"
] | import org.apache.mina.core.buffer.IoBuffer; import org.red5.server.net.rtmp.message.Header; | import org.apache.mina.core.buffer.*; import org.red5.server.net.rtmp.message.*; | [
"org.apache.mina",
"org.red5.server"
] | org.apache.mina; org.red5.server; | 40,150 |
@Override
public void setErrorManager(ErrorManager errorManager) {
this.errorManager = errorManager;
} | void function(ErrorManager errorManager) { this.errorManager = errorManager; } | /**
* DealsWithErrors Interface implementation.
*/ | DealsWithErrors Interface implementation | setErrorManager | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "PIP/addon/platform_service/fermat-pip-addon-platform-service-platform-info-bitdubai/src/main/java/com/bitdubai/fermat_pip_addon/layer/platform_service/platform_info/developer/bitdubai/version_1/PlatformInfoPlatformServicePluginRoot.java",
"license": "mit",
... | [
"com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.ErrorManager"
] | import com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.ErrorManager; | import com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.*; | [
"com.bitdubai.fermat_pip_api"
] | com.bitdubai.fermat_pip_api; | 1,807,996 |
public void setBackupFlag(boolean backupValue)
{
BackupRecord backupRecord = workbook.getBackupRecord();
backupRecord.setBackup(backupValue ? (short) 1
: (short) 0);
} | void function(boolean backupValue) { BackupRecord backupRecord = workbook.getBackupRecord(); backupRecord.setBackup(backupValue ? (short) 1 : (short) 0); } | /**
* determine whether the Excel GUI will backup the workbook when saving.
*
* @param backupValue true to indicate a backup will be performed.
*/ | determine whether the Excel GUI will backup the workbook when saving | setBackupFlag | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/poi-3.2-FINAL/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java",
"license": "gpl-3.0",
"size": 58791
} | [
"org.apache.poi.hssf.record.BackupRecord"
] | import org.apache.poi.hssf.record.BackupRecord; | import org.apache.poi.hssf.record.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,819,267 |
@ServiceMethod(returns = ReturnType.SINGLE)
ApiReleasesCreateOrUpdateResponse createOrUpdateWithResponse(
String resourceGroupName,
String serviceName,
String apiId,
String releaseId,
ApiReleaseContractInner parameters,
String ifMatch,
Context context); | @ServiceMethod(returns = ReturnType.SINGLE) ApiReleasesCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String serviceName, String apiId, String releaseId, ApiReleaseContractInner parameters, String ifMatch, Context context); | /**
* Creates a new Release for the API.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API identifier. Must be unique in the current API Management service instance.
* @param releaseId Release identi... | Creates a new Release for the API | createOrUpdateWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ApiReleasesClient.java",
"license": "mit",
"size": 14749
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.apimanagement.fluent.models.ApiReleaseContractInner",
"com.azure.resourcemanager.apimanagement.models.ApiReleasesCreateOrUpdateResponse"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.ApiReleaseContractInner; import com.azure.resourcemanager.apimanagement.models.ApiReleasesCreateOrUpdateResponse; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; import com.azure.resourcemanager.apimanagement.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,587,596 |
@Test
public void volumeTest_value() throws InterruptedException {
final StatisticType statisticType = StatisticType.VALUE;
final int eventsPerIteration = GenerateSampleStatisticsData.COLOURS.size() *
GenerateSampleStatisticsData.USERS.length *
GenerateSampleSt... | void function() throws InterruptedException { final StatisticType statisticType = StatisticType.VALUE; final int eventsPerIteration = GenerateSampleStatisticsData.COLOURS.size() * GenerateSampleStatisticsData.USERS.length * GenerateSampleStatisticsData.STATES.size(); int expectedTotalEvents = ITERATION_COUNT * eventsPe... | /**
* Loads a large number of value stats at finest precision, then keeps querying over all stores
* until it has found all the expected results, both un-rolled up and fully rolled up.
*/ | Loads a large number of value stats at finest precision, then keeps querying over all stores until it has found all the expected results, both un-rolled up and fully rolled up | volumeTest_value | {
"repo_name": "gchq/stroom-stats",
"path": "stroom-stats-service/src/integration-test/java/stroom/stats/streams/EndToEndVolumeIT.java",
"license": "lgpl-3.0",
"size": 21618
} | [
"java.util.Arrays",
"java.util.Map",
"org.assertj.core.api.Assertions"
] | import java.util.Arrays; import java.util.Map; import org.assertj.core.api.Assertions; | import java.util.*; import org.assertj.core.api.*; | [
"java.util",
"org.assertj.core"
] | java.util; org.assertj.core; | 311,435 |
public static String getRenamedCUName(ICompilationUnit cu, String newMainName) {
String oldName = cu.getElementName();
int i = oldName.lastIndexOf('.');
if (i != -1) {
return newMainName + oldName.substring(i);
} else {
return newMainName;
}
} | static String function(ICompilationUnit cu, String newMainName) { String oldName = cu.getElementName(); int i = oldName.lastIndexOf('.'); if (i != -1) { return newMainName + oldName.substring(i); } else { return newMainName; } } | /**
* Compute a new name for a compilation unit, given the name of the new main type. This query
* tries to maintain the existing extension (e.g. ".java").
*
* @param cu a compilation unit
* @param newMainName the new name of the cu's main type (without extension)
* @return the new name for the compil... | Compute a new name for a compilation unit, given the name of the new main type. This query tries to maintain the existing extension (e.g. ".java") | getRenamedCUName | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/che/jdt/util/JavaModelUtil.java",
"license": "epl-1.0",
"size": 26387
} | [
"org.eclipse.jdt.core.ICompilationUnit"
] | import org.eclipse.jdt.core.ICompilationUnit; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 755,170 |
protected Map<String, String> buildAuthorizationBearerHeader() {
final Map<String, String> headers = Maps.newHashMap();
headers.put("Authorization", String.format("bearer:%s", requestAccessToken().getAccessToken()));
return headers;
} | Map<String, String> function() { final Map<String, String> headers = Maps.newHashMap(); headers.put(STR, String.format(STR, requestAccessToken().getAccessToken())); return headers; } | /**
* Builds a map containing the Authorization header with a valid bearer token.
*
* @return Map containing the Authorization header and value.
*/ | Builds a map containing the Authorization header with a valid bearer token | buildAuthorizationBearerHeader | {
"repo_name": "tlisonbee/cerberus-management-service",
"path": "src/main/java/com/nike/cerberus/auth/connector/onelogin/OneLoginClient.java",
"license": "apache-2.0",
"size": 4309
} | [
"com.google.common.collect.Maps",
"java.util.Map"
] | import com.google.common.collect.Maps; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 181,739 |
private void setValidityTimestamp(String validityTimestamp) {
Long lValidityTimestamp;
try {
lValidityTimestamp = Long.parseLong(validityTimestamp);
} catch (NumberFormatException e) {
// No response or not parsable, expire in one minute.
Log.w(TAG, "Licen... | void function(String validityTimestamp) { Long lValidityTimestamp; try { lValidityTimestamp = Long.parseLong(validityTimestamp); } catch (NumberFormatException e) { Log.w(TAG, STR); lValidityTimestamp = System.currentTimeMillis() + MILLIS_PER_MINUTE; validityTimestamp = Long.toString(lValidityTimestamp); } mValidityTim... | /**
* Set the last validity timestamp (VT) received from the server and add to preferences. You
* must manually call PreferenceObfuscator.commit() to commit these changes to disk.
*
* @param validityTimestamp
* the VT string received
*/ | Set the last validity timestamp (VT) received from the server and add to preferences. You must manually call PreferenceObfuscator.commit() to commit these changes to disk | setValidityTimestamp | {
"repo_name": "javiersantos/PiracyChecker",
"path": "library/src/main/java/com/github/javiersantos/licensing/ServerManagedPolicy.java",
"license": "apache-2.0",
"size": 10367
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 398,564 |
public synchronized void setProgress(float value) {
if (Math.abs(this.value - value)<FastMath.FLT_EPSILON)
return;
if (value> 1f)
value = 1f;
else if (value < 0)
value = 0;
//restrict the value to fall between 0 and 1, inclusive.
this.value = v... | synchronized void function(float value) { if (Math.abs(this.value - value)<FastMath.FLT_EPSILON) return; if (value> 1f) value = 1f; else if (value < 0) value = 0; this.value = value; if (isLoaded &! isWorking()) { barTexture.getTranslation().x = 1-value ; } } | /**
* Set the value of the progress bar.
* @param value between 0 and 1, inclusive.
*/ | Set the value of the progress bar | setProgress | {
"repo_name": "sambayless/golems",
"path": "src/com/golemgame/states/ProgressBarState.java",
"license": "gpl-3.0",
"size": 10037
} | [
"com.jme.math.FastMath"
] | import com.jme.math.FastMath; | import com.jme.math.*; | [
"com.jme.math"
] | com.jme.math; | 2,076,051 |
int encode(ByteBuffer bufferRead) throws ActiveMQException; | int encode(ByteBuffer bufferRead) throws ActiveMQException; | /**
* This method must not be called directly by ActiveMQ Artemis clients.
*/ | This method must not be called directly by ActiveMQ Artemis clients | encode | {
"repo_name": "lburgazzoli/apache-activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/BodyEncoder.java",
"license": "apache-2.0",
"size": 1848
} | [
"java.nio.ByteBuffer",
"org.apache.activemq.artemis.api.core.ActiveMQException"
] | import java.nio.ByteBuffer; import org.apache.activemq.artemis.api.core.ActiveMQException; | import java.nio.*; import org.apache.activemq.artemis.api.core.*; | [
"java.nio",
"org.apache.activemq"
] | java.nio; org.apache.activemq; | 2,705,341 |
@ApiModelProperty(required = true, value = "If username is not given user invoking the API will be taken as the username. ")
public String getUsername() {
return username;
} | @ApiModelProperty(required = true, value = STR) String function() { return username; } | /**
* If username is not given user invoking the API will be taken as the username.
* @return username
**/ | If username is not given user invoking the API will be taken as the username | getUsername | {
"repo_name": "rswijesena/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/gen/java/org/wso2/carbon/apimgt/rest/api/store/dto/CommentDTO.java",
"license": "apache-2.0",
"size": 5987
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,164,260 |
public void setFileExtensions(final String fileExtensions) {
this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split("\\s*,\\s*"))));
} | void function(final String fileExtensions) { this.fileExtensions = IterableExtensions.<String>toList(((Iterable<String>)Conversions.doWrapArray(fileExtensions.trim().split(STR)))); } | /**
* Either a single file extension or a comma-separated list of extensions for which the language
* shall be registered.
*/ | Either a single file extension or a comma-separated list of extensions for which the language shall be registered | setFileExtensions | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.xtext.generator/xtend-gen/org/eclipse/xtext/xtext/generator/XtextGeneratorLanguage.java",
"license": "epl-1.0",
"size": 16794
} | [
"org.eclipse.xtext.xbase.lib.Conversions",
"org.eclipse.xtext.xbase.lib.IterableExtensions"
] | import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.IterableExtensions; | import org.eclipse.xtext.xbase.lib.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 2,429,740 |
EReference getDocumentRoot_TaskInitiator(); | EReference getDocumentRoot_TaskInitiator(); | /**
* Returns the meta object for the containment reference '{@link org.wso2.developerstudio.eclipse.humantask.model.ht.DocumentRoot#getTaskInitiator <em>Task Initiator</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Task Initiator</em>'.
... | Returns the meta object for the containment reference '<code>org.wso2.developerstudio.eclipse.humantask.model.ht.DocumentRoot#getTaskInitiator Task Initiator</code>'. | getDocumentRoot_TaskInitiator | {
"repo_name": "chanakaudaya/developer-studio",
"path": "humantask/org.wso2.tools.humantask.model/src/org/wso2/carbonstudio/eclipse/humantask/model/ht/HTPackage.java",
"license": "apache-2.0",
"size": 247810
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,563,361 |
public void testConstants() throws Exception {
Statement st = createStatement();
ResultSet rs = null;
String[][] expRS;
String[] expColNames;
// positive tests constants on left side of subquery
rs = st.executeQuery(
"select * from s where 1 in (select s... | void function() throws Exception { Statement st = createStatement(); ResultSet rs = null; String[][] expRS; String[] expColNames; rs = st.executeQuery( STR); expColNames = new String [] {"I", "S", "C", "VC", "B"}; JDBC.assertColumnNames(rs, expColNames); expRS = new String [][] { {null, null, null, null, null}, {"0", "... | /**
* Test constants in left, right and both sides of the subquery
* @throws Exception
*/ | Test constants in left, right and both sides of the subquery | testConstants | {
"repo_name": "kavin256/Derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/SubqueryTest.java",
"license": "apache-2.0",
"size": 86764
} | [
"java.sql.ResultSet",
"java.sql.Statement",
"org.apache.derbyTesting.junit.JDBC"
] | import java.sql.ResultSet; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC; | import java.sql.*; import org.apache.*; | [
"java.sql",
"org.apache"
] | java.sql; org.apache; | 2,328,187 |
public SimEvent cancelEvent(Predicate p) {
if (!CloudSim.running()) {
return null;
}
return CloudSim.cancel(id, p);
}
| SimEvent function(Predicate p) { if (!CloudSim.running()) { return null; } return CloudSim.cancel(id, p); } | /**
* Cancel the first event matching a predicate waiting in the entity's future queue.
*
* @param p The event selection predicate
* @return The number of events cancelled (0 or 1)
*/ | Cancel the first event matching a predicate waiting in the entity's future queue | cancelEvent | {
"repo_name": "heypnus/cloudsim",
"path": "modules/cloudsim/src/main/java/org/cloudbus/cloudsim/core/SimEntity.java",
"license": "lgpl-3.0",
"size": 22138
} | [
"org.cloudbus.cloudsim.core.predicates.Predicate"
] | import org.cloudbus.cloudsim.core.predicates.Predicate; | import org.cloudbus.cloudsim.core.predicates.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 2,600,681 |
public void addURLPattern(String pattern)
{
String regexpPattern = UrlMap.urlPatternToRegexpPattern(pattern);
int flags = (CauchoSystem.isCaseInsensitive() ?
Pattern.CASE_INSENSITIVE :
0);
try {
_regexp = Pattern.compile(regexpPattern, flags);
} catch (Patter... | void function(String pattern) { String regexpPattern = UrlMap.urlPatternToRegexpPattern(pattern); int flags = (CauchoSystem.isCaseInsensitive() ? Pattern.CASE_INSENSITIVE : 0); try { _regexp = Pattern.compile(regexpPattern, flags); } catch (PatternSyntaxException e) { log.log(Level.WARNING, e.toString(), e); } } | /**
* Sets the url-pattern
*/ | Sets the url-pattern | addURLPattern | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/server/security/SecurityConstraint.java",
"license": "gpl-2.0",
"size": 6457
} | [
"com.caucho.server.dispatch.UrlMap",
"com.caucho.server.util.CauchoSystem",
"java.util.logging.Level",
"java.util.regex.Pattern",
"java.util.regex.PatternSyntaxException"
] | import com.caucho.server.dispatch.UrlMap; import com.caucho.server.util.CauchoSystem; import java.util.logging.Level; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; | import com.caucho.server.dispatch.*; import com.caucho.server.util.*; import java.util.logging.*; import java.util.regex.*; | [
"com.caucho.server",
"java.util"
] | com.caucho.server; java.util; | 2,869,204 |
@Override
public void visit(LOCogroup cg) throws FrontendException {
try {
cg.resetSchema();
cg.getSchema();
} catch (FrontendException fe) {
int errCode = 1060;
String msg = "Cannot resolve COGroup output schema" ;
msgCollector.collect... | void function(LOCogroup cg) throws FrontendException { try { cg.resetSchema(); cg.getSchema(); } catch (FrontendException fe) { int errCode = 1060; String msg = STR ; msgCollector.collect(msg, MessageType.Error) ; throwTypeCheckerException(cg, msg, errCode, PigException.INPUT, fe) ; } MultiMap<Integer, LogicalExpressio... | /**
* COGroup
* All group by cols from all inputs have to be of the
* same type
* @throws FrontendException
*/ | COGroup All group by cols from all inputs have to be of the same type | visit | {
"repo_name": "hxquangnhat/PIG-ROLLUP-MRCUBE",
"path": "src/org/apache/pig/newplan/logical/visitor/TypeCheckingRelVisitor.java",
"license": "apache-2.0",
"size": 43323
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.pig.PigException",
"org.apache.pig.data.DataType",
"org.apache.pig.impl.logicalLayer.FrontendException",
"org.apache.pig.impl.plan.CompilationMessageCollector",
"org.apache.pig.impl.util.MultiMap",
"org.apache.pig.newplan.Operator",
"org.apache.pi... | import java.util.ArrayList; import java.util.List; import org.apache.pig.PigException; import org.apache.pig.data.DataType; import org.apache.pig.impl.logicalLayer.FrontendException; import org.apache.pig.impl.plan.CompilationMessageCollector; import org.apache.pig.impl.util.MultiMap; import org.apache.pig.newplan.Oper... | import java.util.*; import org.apache.pig.*; import org.apache.pig.data.*; import org.apache.pig.impl.*; import org.apache.pig.impl.plan.*; import org.apache.pig.impl.util.*; import org.apache.pig.newplan.*; import org.apache.pig.newplan.logical.expression.*; import org.apache.pig.newplan.logical.relational.*; | [
"java.util",
"org.apache.pig"
] | java.util; org.apache.pig; | 73,539 |
private int getNearestCluster(final Collection<CentroidCluster<T>> clusters, final T point) {
double minDistance = Double.MAX_VALUE;
int clusterIndex = 0;
int minCluster = 0;
for (final CentroidCluster<T> c : clusters) {
final double distance = distance(point, c.getCenter... | int function(final Collection<CentroidCluster<T>> clusters, final T point) { double minDistance = Double.MAX_VALUE; int clusterIndex = 0; int minCluster = 0; for (final CentroidCluster<T> c : clusters) { final double distance = distance(point, c.getCenter()); if (distance < minDistance) { minDistance = distance; minClu... | /**
* Returns the nearest {@link Cluster} to the given point
*
* @param clusters the {@link Cluster}s to search
* @param point the point to find the nearest {@link Cluster} for
* @return the index of the nearest {@link Cluster} to the given point
*/ | Returns the nearest <code>Cluster</code> to the given point | getNearestCluster | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/ml/clustering/KMeansPlusPlusClusterer.java",
"license": "mit",
"size": 21644
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,229,324 |
@SuppressWarnings("fallthrough")
private void beforeValue(boolean root) throws IOException {
switch (peek()) {
case NONEMPTY_DOCUMENT:
if (!lenient) {
throw new IllegalStateException(
"JSON must have only one top-level value.");
}
// fall-through
case EMPTY_DOCUMENT... | @SuppressWarnings(STR) void function(boolean root) throws IOException { switch (peek()) { case NONEMPTY_DOCUMENT: if (!lenient) { throw new IllegalStateException( STR); } case EMPTY_DOCUMENT: if (!lenient && !root) { throw new IllegalStateException( STR); } replaceTop(NONEMPTY_DOCUMENT); break; case EMPTY_ARRAY: replac... | /**
* Inserts any necessary separators and whitespace before a literal value,
* inline array, or inline object. Also adjusts the stack to expect either a
* closing bracket or another element.
*
* @param root true if the value is a new array or object, the two values
* permitted as top-level elemen... | Inserts any necessary separators and whitespace before a literal value, inline array, or inline object. Also adjusts the stack to expect either a closing bracket or another element | beforeValue | {
"repo_name": "MarkehMe/FactionsAlias",
"path": "src/com/markehme/factionsalias/libs/gson/stream/JsonWriter.java",
"license": "agpl-3.0",
"size": 18695
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 489,737 |
return new ExternalIdSearch(ExternalIdSearchType.ANY, ImmutableSet.<ExternalId>of());
} | return new ExternalIdSearch(ExternalIdSearchType.ANY, ImmutableSet.<ExternalId>of()); } | /**
* Creates an empty search, with the search type set to any.
* <p>
* This uses {@link ExternalIdSearchType#ANY}.
* <p>
* This search will not match anything.
*
* @return the external identifier search, not null
*/ | Creates an empty search, with the search type set to any. This uses <code>ExternalIdSearchType#ANY</code>. This search will not match anything | of | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-Util/src/main/java/com/opengamma/id/ExternalIdSearch.java",
"license": "apache-2.0",
"size": 20990
} | [
"com.google.common.collect.ImmutableSet"
] | import com.google.common.collect.ImmutableSet; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,972,665 |
public static Clob generateProxy(Reader reader, long length) {
return ( Clob ) Proxy.newProxyInstance(
getProxyClassLoader(),
PROXY_INTERFACES,
new ClobProxy( reader, length )
);
} | static Clob function(Reader reader, long length) { return ( Clob ) Proxy.newProxyInstance( getProxyClassLoader(), PROXY_INTERFACES, new ClobProxy( reader, length ) ); } | /**
* Generates a {@link Clob} proxy using a character reader of given length.
*
* @param reader The character reader
* @param length The length of the character reader
*
* @return The generated proxy.
*/ | Generates a <code>Clob</code> proxy using a character reader of given length | generateProxy | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/engine/jdbc/ClobProxy.java",
"license": "mit",
"size": 7545
} | [
"java.io.Reader",
"java.lang.reflect.Proxy",
"java.sql.Clob"
] | import java.io.Reader; import java.lang.reflect.Proxy; import java.sql.Clob; | import java.io.*; import java.lang.reflect.*; import java.sql.*; | [
"java.io",
"java.lang",
"java.sql"
] | java.io; java.lang; java.sql; | 2,378,049 |
protected OutputStream filenameToOutputStream(String fileName)
throws IOException {
if (fileName == null){
return null;
}
return new FileOutputStream(fileName);
} | OutputStream function(String fileName) throws IOException { if (fileName == null){ return null; } return new FileOutputStream(fileName); } | /**
* Converts a file name into a Outputstream.
* Returns null if the file name is null.
*/ | Converts a file name into a Outputstream. Returns null if the file name is null | filenameToOutputStream | {
"repo_name": "ksheedlo/closure-compiler",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 64695
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,758,267 |
public void testGetPosts2() throws Exception {
List posts = persistence.getPosts(thread3.getId(), 10, 10);
assertEquals("the size is wrong", 0, posts.size());
}
| void function() throws Exception { List posts = persistence.getPosts(thread3.getId(), 10, 10); assertEquals(STR, 0, posts.size()); } | /**
* Tests getPosts method
* @throws Exception to JUnit
*/ | Tests getPosts method | testGetPosts2 | {
"repo_name": "ghitza94/zoj",
"path": "na/judge_server/src/tests/cn/edu/zju/acm/onlinejudge/persistence/sql/ForumPersistenceImplTest.java",
"license": "gpl-3.0",
"size": 18395
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,889,413 |
@Override
public GatewayOperationResponse beginConnectDisconnectOrTesting(String networkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException {
// Validate
if ... | GatewayOperationResponse function(String networkName, String localNetworkSiteName, GatewayConnectDisconnectOrTestParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException { if (networkName == null) { throw new NullPointerException(STR); } if (localNetw... | /**
* To connect to, disconnect from, or test your connection to a local
* network site, access the connection resource representing the local
* network and specify Connect, Disconnect or Test to perform the desired
* operation. (see
* http://msdn.microsoft.com/en-us/library/windowsazure/jj154107.a... | To connect to, disconnect from, or test your connection to a local network site, access the connection resource representing the local network and specify Connect, Disconnect or Test to perform the desired operation. (see HREF for more information) | beginConnectDisconnectOrTesting | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-network/src/main/java/com/microsoft/windowsazure/management/network/GatewayOperationsImpl.java",
"license": "apache-2.0",
"size": 573643
} | [
"com.microsoft.windowsazure.core.utils.BOMInputStream",
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.network.models.GatewayConnectDisconnectOrTestParameters",
"com.microsoft.windowsazure.management.network... | import com.microsoft.windowsazure.core.utils.BOMInputStream; import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.network.models.GatewayConnectDisconnectOrTestParameters; import com.microsoft.windowsazure.mana... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.network.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.tran... | [
"com.microsoft.windowsazure",
"java.io",
"java.util",
"javax.xml",
"org.apache.http",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.util; javax.xml; org.apache.http; org.w3c.dom; org.xml.sax; | 1,499,555 |
public String getDisplayText(EObject source); | String function(EObject source); | /**
* Returns the text a label for the given source object should display.
*/ | Returns the text a label for the given source object should display | getDisplayText | {
"repo_name": "mikesligo/visGrid",
"path": "ie.tcd.gmf.visGrid.plugin/src/org/eclipse/gmf/runtime/lite/edit/parts/labels/ILabelTextDisplayer.java",
"license": "gpl-3.0",
"size": 1815
} | [
"org.eclipse.emf.ecore.EObject"
] | import org.eclipse.emf.ecore.EObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 570,590 |
public ClusterHealthStatus ensureGreen(String... indices) {
return ensureGreen(TimeValue.timeValueSeconds(30), indices);
}
/**
* Ensures the cluster has a green state via the cluster health API. This method will also wait for relocations.
* It is useful to ensure that all action on the c... | ClusterHealthStatus function(String... indices) { return ensureGreen(TimeValue.timeValueSeconds(30), indices); } /** * Ensures the cluster has a green state via the cluster health API. This method will also wait for relocations. * It is useful to ensure that all action on the cluster have finished and all shards that w... | /**
* Ensures the cluster has a green state via the cluster health API. This method will also wait for relocations.
* It is useful to ensure that all action on the cluster have finished and all shards that were currently relocating
* are now allocated and started.
*/ | Ensures the cluster has a green state via the cluster health API. This method will also wait for relocations. It is useful to ensure that all action on the cluster have finished and all shards that were currently relocating are now allocated and started | ensureGreen | {
"repo_name": "zeroctu/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java",
"license": "apache-2.0",
"size": 10894
} | [
"org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus",
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.action.admin.cluster.health.*; import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.action",
"org.elasticsearch.common"
] | org.elasticsearch.action; org.elasticsearch.common; | 1,120,735 |
@Test
public void testInsufficientContainersWithMultipleAdjustments() throws Exception {
int numContainers = 1;
// Set up the topology and its config
topologyConfig.put(com.twitter.heron.api.Config.TOPOLOGY_STMGRS, numContainers);
// Explicit set resources for container
long containerRam = 3L ... | void function() throws Exception { int numContainers = 1; topologyConfig.put(com.twitter.heron.api.Config.TOPOLOGY_STMGRS, numContainers); long containerRam = 3L * Constants.GB; long boltRam = 1L * Constants.GB; long spoutRam = 2L * Constants.GB; topologyConfig.setContainerRamRequested(containerRam); topologyConfig.set... | /**
* Test the scenario where the user defined number of containers is not sufficient.
*/ | Test the scenario where the user defined number of containers is not sufficient | testInsufficientContainersWithMultipleAdjustments | {
"repo_name": "zhangzhonglai/heron",
"path": "heron/packing/tests/java/com/twitter/heron/packing/roundrobin/ResourceCompliantRRPackingTest.java",
"license": "apache-2.0",
"size": 32800
} | [
"com.twitter.heron.api.generated.TopologyAPI",
"com.twitter.heron.spi.common.Config",
"com.twitter.heron.spi.common.Constants",
"com.twitter.heron.spi.packing.PackingPlan",
"org.junit.Assert"
] | import com.twitter.heron.api.generated.TopologyAPI; import com.twitter.heron.spi.common.Config; import com.twitter.heron.spi.common.Constants; import com.twitter.heron.spi.packing.PackingPlan; import org.junit.Assert; | import com.twitter.heron.api.generated.*; import com.twitter.heron.spi.common.*; import com.twitter.heron.spi.packing.*; import org.junit.*; | [
"com.twitter.heron",
"org.junit"
] | com.twitter.heron; org.junit; | 1,006,978 |
public Packet decodePacket(RTMP rtmp, IoBuffer in) {
log.debug("decodePacket - rtmp: {} buffer: {}", rtmp, in);
final int remaining = in.remaining();
// We need at least one byte
if (remaining < 1) {
rtmp.bufferDecoding(1);
return null;
}
final int position = in.position();
byte headerBy... | Packet function(RTMP rtmp, IoBuffer in) { log.debug(STR, rtmp, in); final int remaining = in.remaining(); if (remaining < 1) { rtmp.bufferDecoding(1); return null; } final int position = in.position(); byte headerByte = in.get(); int headerValue; int byteCount; if ((headerByte & 0x3f) == 0) { if (remaining < 2) { in.po... | /**
* Decodes packet.
*
* @param rtmp RTMP protocol state
* @param in IoBuffer
* @return IoBuffer
*/ | Decodes packet | decodePacket | {
"repo_name": "cwpenhale/red5-mobileconsole",
"path": "red5_server/src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java",
"license": "apache-2.0",
"size": 37801
} | [
"org.apache.mina.core.buffer.IoBuffer",
"org.red5.io.utils.BufferUtils",
"org.red5.server.net.protocol.ProtocolException",
"org.red5.server.net.rtmp.RTMPUtils",
"org.red5.server.net.rtmp.event.Abort",
"org.red5.server.net.rtmp.event.AudioData",
"org.red5.server.net.rtmp.event.ChunkSize",
"org.red5.ser... | import org.apache.mina.core.buffer.IoBuffer; import org.red5.io.utils.BufferUtils; import org.red5.server.net.protocol.ProtocolException; import org.red5.server.net.rtmp.RTMPUtils; import org.red5.server.net.rtmp.event.Abort; import org.red5.server.net.rtmp.event.AudioData; import org.red5.server.net.rtmp.event.ChunkSi... | import org.apache.mina.core.buffer.*; import org.red5.io.utils.*; import org.red5.server.net.protocol.*; import org.red5.server.net.rtmp.*; import org.red5.server.net.rtmp.event.*; import org.red5.server.net.rtmp.message.*; | [
"org.apache.mina",
"org.red5.io",
"org.red5.server"
] | org.apache.mina; org.red5.io; org.red5.server; | 2,097,204 |
public ConnectionPoolDataSource getConnectionPoolDataSource() {
return cpds;
}
| ConnectionPoolDataSource function() { return cpds; } | /**
* Get the value of connectionPoolDataSource. This method will return
* null, if the backing datasource is being accessed via jndi.
*
* @return value of connectionPoolDataSource.
*/ | Get the value of connectionPoolDataSource. This method will return null, if the backing datasource is being accessed via jndi | getConnectionPoolDataSource | {
"repo_name": "optivo-org/commons-dbcp",
"path": "src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java",
"license": "apache-2.0",
"size": 29845
} | [
"javax.sql.ConnectionPoolDataSource"
] | import javax.sql.ConnectionPoolDataSource; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 1,306,712 |
private void notifyGlobalPropertyChange(GlobalProperty gp) {
for (GlobalPropertyListener listener : eventListeners.getGlobalPropertyListeners()) {
if (listener.supportsPropertyName(gp.getProperty())) {
listener.globalPropertyChanged(gp);
}
}
}
| void function(GlobalProperty gp) { for (GlobalPropertyListener listener : eventListeners.getGlobalPropertyListeners()) { if (listener.supportsPropertyName(gp.getProperty())) { listener.globalPropertyChanged(gp); } } } | /**
* Calls global property listeners registered for this create/change
*
* @param gp
*/ | Calls global property listeners registered for this create/change | notifyGlobalPropertyChange | {
"repo_name": "pselle/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/impl/AdministrationServiceImpl.java",
"license": "mpl-2.0",
"size": 41262
} | [
"org.openmrs.GlobalProperty",
"org.openmrs.api.GlobalPropertyListener"
] | import org.openmrs.GlobalProperty; import org.openmrs.api.GlobalPropertyListener; | import org.openmrs.*; import org.openmrs.api.*; | [
"org.openmrs",
"org.openmrs.api"
] | org.openmrs; org.openmrs.api; | 350,754 |
private ValueListener listenerForSchema(ColumnMetadata providedCol) {
switch (providedCol.structureType()) {
case PRIMITIVE: {
ColumnMetadata colSchema = providedCol.copy();
if (providedCol.isArray()) {
return scalarArrayListenerFor(colSchema);
} else {
return sc... | ValueListener function(ColumnMetadata providedCol) { switch (providedCol.structureType()) { case PRIMITIVE: { ColumnMetadata colSchema = providedCol.copy(); if (providedCol.isArray()) { return scalarArrayListenerFor(colSchema); } else { return scalarListenerFor(colSchema); } } case TUPLE: { ColumnMetadata colSchema = p... | /**
* Build a column and its listener based a provided schema.
* The user is responsible to ensure that the provided schema
* accurately reflects the structure of the JSON being parsed.
*/ | Build a column and its listener based a provided schema. The user is responsible to ensure that the provided schema accurately reflects the structure of the JSON being parsed | listenerForSchema | {
"repo_name": "arina-ielchiieva/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/loader/TupleListener.java",
"license": "apache-2.0",
"size": 20206
} | [
"org.apache.drill.exec.record.metadata.ColumnMetadata",
"org.apache.drill.exec.record.metadata.TupleMetadata",
"org.apache.drill.exec.store.easy.json.parser.ValueListener"
] | import org.apache.drill.exec.record.metadata.ColumnMetadata; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.apache.drill.exec.store.easy.json.parser.ValueListener; | import org.apache.drill.exec.record.metadata.*; import org.apache.drill.exec.store.easy.json.parser.*; | [
"org.apache.drill"
] | org.apache.drill; | 1,144,287 |
public List getAllCheckResources() {
return m_allCheckResources;
} | List function() { return m_allCheckResources; } | /**
* Gets a list of all CmsContentCheckResource that colleced an error or a warning during the content check.<p>
* @return List of CmsContentCheckResource which collected an error or a warning.
*/ | Gets a list of all CmsContentCheckResource that colleced an error or a warning during the content check | getAllCheckResources | {
"repo_name": "PatidarWeb/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/content/check/CmsContentCheckResult.java",
"license": "lgpl-2.1",
"size": 6972
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 20,611 |
public List<Expression> getExpressions() {
return expressions;
} | List<Expression> function() { return expressions; } | /**
* Gets the list of expressions.
*
* @return the list of expressions.
*/ | Gets the list of expressions | getExpressions | {
"repo_name": "feedzai/pdb",
"path": "src/main/java/com/feedzai/commons/sql/abstraction/dml/Values.java",
"license": "apache-2.0",
"size": 3070
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,285,641 |
private Range<Date> getCurrentRange() {
DateTime currentDate = new DateTime(Calendar.getInstance().getTime());
DateTime dateTime = new DateTime(currentDate);
DateTime effectiveFrom = new DateTime(dateTime);
if (dateTime.getDayOfMonth() < 15) {
effectiveFrom = new DateTime(dateTime).plusMonths(-1);
}
e... | Range<Date> function() { DateTime currentDate = new DateTime(Calendar.getInstance().getTime()); DateTime dateTime = new DateTime(currentDate); DateTime effectiveFrom = new DateTime(dateTime); if (dateTime.getDayOfMonth() < 15) { effectiveFrom = new DateTime(dateTime).plusMonths(-1); } effectiveFrom = effectiveFrom.dayO... | /**
* En la primera quincena hacemos la facturacion del mes anterior. En la segunda
* quincena lanzamos la facturacion del mes en curso
*
* @return
*/ | En la primera quincena hacemos la facturacion del mes anterior. En la segunda quincena lanzamos la facturacion del mes en curso | getCurrentRange | {
"repo_name": "labcabrera/biller",
"path": "biller-core/src/main/java/com/luckia/biller/core/scheduler/BillingJob.java",
"license": "gpl-3.0",
"size": 4876
} | [
"java.util.Calendar",
"java.util.Date",
"org.apache.commons.lang3.Range",
"org.joda.time.DateTime"
] | import java.util.Calendar; import java.util.Date; import org.apache.commons.lang3.Range; import org.joda.time.DateTime; | import java.util.*; import org.apache.commons.lang3.*; import org.joda.time.*; | [
"java.util",
"org.apache.commons",
"org.joda.time"
] | java.util; org.apache.commons; org.joda.time; | 1,903,600 |
private List<Application> getInstalledApplications(Device device) {
List<Application> applications = new ArrayList<>();
try {
DeviceManagementDAOFactory.openConnection();
applications = applicationDAO.getInstalledApplications(device.getId());
device.setApplication... | List<Application> function(Device device) { List<Application> applications = new ArrayList<>(); try { DeviceManagementDAOFactory.openConnection(); applications = applicationDAO.getInstalledApplications(device.getId()); device.setApplications(applications); } catch (DeviceManagementDAOException e) { log.error(STR + devi... | /**
* Returns all the installed apps of the given device.
*/ | Returns all the installed apps of the given device | getInstalledApplications | {
"repo_name": "Supun94/carbon-device-mgt",
"path": "components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementProviderServiceImpl.java",
"license": "apache-2.0",
"size": 81189
} | [
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.device.mgt.common.Device",
"org.wso2.carbon.device.mgt.common.app.mgt.Application",
"org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException",
"org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory"
] | import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.app.mgt.Application; import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException; import org.wso2.carbon.device.mgt.core.dao.DeviceManage... | import java.sql.*; import java.util.*; import org.wso2.carbon.device.mgt.common.*; import org.wso2.carbon.device.mgt.common.app.mgt.*; import org.wso2.carbon.device.mgt.core.dao.*; | [
"java.sql",
"java.util",
"org.wso2.carbon"
] | java.sql; java.util; org.wso2.carbon; | 1,203,057 |
public Device write(int c) throws IOException {
++byteCount;
deligee.write(c);
return this;
} | Device function(int c) throws IOException { ++byteCount; deligee.write(c); return this; } | /**
* Writes the specified byte to this data output stream.
*/ | Writes the specified byte to this data output stream | write | {
"repo_name": "exxcellent/wings3",
"path": "wings/src/java/org/wings/io/CountingDeviceDelegator.java",
"license": "lgpl-2.1",
"size": 3362
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,965,604 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.