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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Handler
public void handle(Exchange exchange) throws Exception {
onExchange(exchange);
} | void function(Exchange exchange) throws Exception { onExchange(exchange); } | /**
* Handles the incoming exchange.
* <p/>
* This method turns this mock endpoint into a bean which you can use
* in the Camel routes, which allows you to inject MockEndpoint as beans
* in your routes and use the features of the mock to control the bean.
*
* @param exchange the exch... | Handles the incoming exchange. This method turns this mock endpoint into a bean which you can use in the Camel routes, which allows you to inject MockEndpoint as beans in your routes and use the features of the mock to control the bean | handle | {
"repo_name": "engagepoint/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java",
"license": "apache-2.0",
"size": 52988
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,963,514 |
public String getClazzName(Properties saoData) {
return saoData.getProperty(ApplicationFinder.CLASS_NAME_PROPNAME);
} | String function(Properties saoData) { return saoData.getProperty(ApplicationFinder.CLASS_NAME_PROPNAME); } | /**
* Return the name of the class to use for this name or null if the name
* is not in the <code>Properties</code> object.
*
*
* @param saoData
* A <code>Properties</code> object which may or may not
* contain the class name
... | Return the name of the class to use for this name or null if the name is not in the <code>Properties</code> object | getClazzName | {
"repo_name": "janekdb/ntropa",
"path": "presentation/wps/src/tests/org/ntropa/build/html/ServerActiveHtmlTest.java",
"license": "apache-2.0",
"size": 13381
} | [
"java.util.Properties",
"org.ntropa.build.jsp.ApplicationFinder"
] | import java.util.Properties; import org.ntropa.build.jsp.ApplicationFinder; | import java.util.*; import org.ntropa.build.jsp.*; | [
"java.util",
"org.ntropa.build"
] | java.util; org.ntropa.build; | 360,174 |
@SuppressWarnings("unchecked")
public <S, D> Type<? extends D> getConcreteClass(Type<S> sourceType, Type<D> destinationType) {
if (isNew) {
return null;
}
final Type<?> type = mapping.get(sourceType);
if (type != null && destinationType.isAssignableFrom(type)) {
... | @SuppressWarnings(STR) <S, D> Type<? extends D> function(Type<S> sourceType, Type<D> destinationType) { if (isNew) { return null; } final Type<?> type = mapping.get(sourceType); if (type != null && destinationType.isAssignableFrom(type)) { return (Type<? extends D>) type; } return null; } | /**
* Searches for a concrete class that has been registered for the given
* abstract class or interface within this mapping session.
*
* @param sourceType
* @param destinationType
* @return a concrete class that has been registered for the given abstract
* class or interface... | Searches for a concrete class that has been registered for the given abstract class or interface within this mapping session | getConcreteClass | {
"repo_name": "andreabertagnolli/orika",
"path": "core/src/main/java/ma/glasnost/orika/MappingContext.java",
"license": "apache-2.0",
"size": 18820
} | [
"ma.glasnost.orika.metadata.Type"
] | import ma.glasnost.orika.metadata.Type; | import ma.glasnost.orika.metadata.*; | [
"ma.glasnost.orika"
] | ma.glasnost.orika; | 1,829,881 |
public static void print(LoadBalancer resource) {
StringBuilder info = new StringBuilder();
info.append("Load balancer: ").append(resource.id())
.append("Name: ").append(resource.name())
.append("\n\tResource group: ").append(resource.resourceGroupName())
.append(... | static void function(LoadBalancer resource) { StringBuilder info = new StringBuilder(); info.append(STR).append(resource.id()) .append(STR).append(resource.name()) .append(STR).append(resource.resourceGroupName()) .append(STR).append(resource.region()) .append(STR).append(resource.tags()) .append(STR).append(resource.b... | /**
* Print load balancer.
*
* @param resource a load balancer
*/ | Print load balancer | print | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-samples/src/main/java/com/microsoft/azure/management/samples/Utils.java",
"license": "mit",
"size": 124123
} | [
"com.microsoft.azure.management.network.LoadBalancer",
"com.microsoft.azure.management.network.LoadBalancerBackend",
"com.microsoft.azure.management.network.LoadBalancerFrontend",
"com.microsoft.azure.management.network.LoadBalancerHttpProbe",
"com.microsoft.azure.management.network.LoadBalancerInboundNatPo... | import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancerBackend; import com.microsoft.azure.management.network.LoadBalancerFrontend; import com.microsoft.azure.management.network.LoadBalancerHttpProbe; import com.microsoft.azure.management.network.LoadBalanc... | import com.microsoft.azure.management.network.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,270,153 |
@Override
public void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex,
Paint paint)
{
canvas.drawLine(x, y, x + SHAPE_WIDTH, y, paint);
if (isRenderPoints(renderer))
{
pointsChart.drawLegendShape(canvas, renderer... | void function(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint) { canvas.drawLine(x, y, x + SHAPE_WIDTH, y, paint); if (isRenderPoints(renderer)) { pointsChart.drawLegendShape(canvas, renderer, x + 5, y, seriesIndex, paint); } } | /**
* The graphical representation of the legend shape.
*
* @param canvas the canvas to paint to
* @param renderer the series renderer
* @param x the x value of the point the shape should be drawn at
* @param y the y value of the point the shape should be drawn at
* @param seriesInde... | The graphical representation of the legend shape | drawLegendShape | {
"repo_name": "panthole/AndroidChart",
"path": "src/com/panthole/androidchart/chart/LineChart.java",
"license": "mit",
"size": 10785
} | [
"android.graphics.Canvas",
"android.graphics.Paint",
"com.panthole.androidchart.renderer.SimpleSeriesRenderer"
] | import android.graphics.Canvas; import android.graphics.Paint; import com.panthole.androidchart.renderer.SimpleSeriesRenderer; | import android.graphics.*; import com.panthole.androidchart.renderer.*; | [
"android.graphics",
"com.panthole.androidchart"
] | android.graphics; com.panthole.androidchart; | 1,438,029 |
public List<GridH2Table> tablesForDml() throws IgniteSQLException {
Collection<?> parserObjects = h2ObjToGridObj.values();
List<GridH2Table> tbls = new ArrayList<>(parserObjects.size());
// check all involved caches
for (Object o : parserObjects) {
if (o instanceof Grid... | List<GridH2Table> function() throws IgniteSQLException { Collection<?> parserObjects = h2ObjToGridObj.values(); List<GridH2Table> tbls = new ArrayList<>(parserObjects.size()); for (Object o : parserObjects) { if (o instanceof GridSqlMerge) o = ((GridSqlMerge)o).into(); else if (o instanceof GridSqlInsert) o = ((GridSql... | /**
* Extract all tables participating in DML statement.
*
* @return List of tables participate at query.
* @throws IgniteSQLException in case query contains virtual tables.
*/ | Extract all tables participating in DML statement | tablesForDml | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sql/GridSqlQueryParser.java",
"license": "apache-2.0",
"size": 89869
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode",
"org.apache.ignite.internal.processors.query.IgniteSQLException",
"org.apache.ignite.internal.processors.query.h2.opt.GridH2Table"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.internal.processors.query.h2.opt.GridH2Table; | import java.util.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.processors.query.h2.opt.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 44,576 |
EReference getDocumentRoot_OtherSource(); | EReference getDocumentRoot_OtherSource(); | /**
* Returns the meta object for the containment reference '{@link net.opengis.ows20.DocumentRoot#getOtherSource <em>Other Source</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Other Source</em>'.
* @see net.opengis.ows20.Document... | Returns the meta object for the containment reference '<code>net.opengis.ows20.DocumentRoot#getOtherSource Other Source</code>'. | getDocumentRoot_OtherSource | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java",
"license": "lgpl-2.1",
"size": 356067
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,706,308 |
public void sendBinaryMessage(long senderId, long receiverId, String content, int type)
{
EntityDao<MessageEntity> dao = PersistContext.CTX.getEntityDao(MessageEntity.class);
MessageEntity me = new MessageEntity();
me.setContent(content);
me.setReceiverId(receiverId);
me.setSenderId(senderId);
me.setSe... | void function(long senderId, long receiverId, String content, int type) { EntityDao<MessageEntity> dao = PersistContext.CTX.getEntityDao(MessageEntity.class); MessageEntity me = new MessageEntity(); me.setContent(content); me.setReceiverId(receiverId); me.setSenderId(senderId); me.setSendTime(TimeUtil.getYYYYMMDDHHMMSS... | /**
* send binary message to client
* @param senderId
* @param receiverId
* @param content
* @param type
*/ | send binary message to client | sendBinaryMessage | {
"repo_name": "seanzwx/tmp",
"path": "seatalk/im/im-friend/im-friend-impl/src/main/java/com/sean/im/friend/service/MessageServiceImpl.java",
"license": "apache-2.0",
"size": 5236
} | [
"com.alibaba.fastjson.JSON",
"com.sean.commom.util.TimeUtil",
"com.sean.im.commom.constant.Actions",
"com.sean.im.commom.core.Protocol",
"com.sean.im.friend.entity.MessageEntity",
"com.sean.im.server.push.IMServer",
"com.sean.persist.core.EntityDao",
"com.sean.persist.core.PersistContext"
] | import com.alibaba.fastjson.JSON; import com.sean.commom.util.TimeUtil; import com.sean.im.commom.constant.Actions; import com.sean.im.commom.core.Protocol; import com.sean.im.friend.entity.MessageEntity; import com.sean.im.server.push.IMServer; import com.sean.persist.core.EntityDao; import com.sean.persist.core.Persi... | import com.alibaba.fastjson.*; import com.sean.commom.util.*; import com.sean.im.commom.constant.*; import com.sean.im.commom.core.*; import com.sean.im.friend.entity.*; import com.sean.im.server.push.*; import com.sean.persist.core.*; | [
"com.alibaba.fastjson",
"com.sean.commom",
"com.sean.im",
"com.sean.persist"
] | com.alibaba.fastjson; com.sean.commom; com.sean.im; com.sean.persist; | 1,847,956 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(OutPort.class)) {
case SimulinkPackage.OUT_PORT__CONNECTION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier()... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(OutPort.class)) { case SimulinkPackage.OUT_PORT__CONNECTION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "FTSRG/massif",
"path": "plugins/hu.bme.mit.massif.simulink.edit/src/hu/bme/mit/massif/simulink/provider/OutPortItemProvider.java",
"license": "epl-1.0",
"size": 5306
} | [
"hu.bme.mit.massif.simulink.OutPort",
"hu.bme.mit.massif.simulink.SimulinkPackage",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import hu.bme.mit.massif.simulink.OutPort; import hu.bme.mit.massif.simulink.SimulinkPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import hu.bme.mit.massif.simulink.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"hu.bme.mit",
"org.eclipse.emf"
] | hu.bme.mit; org.eclipse.emf; | 980,680 |
ServiceResponse<Void> updatePetWithForm(String petId) throws ServiceException, IOException, IllegalArgumentException; | ServiceResponse<Void> updatePetWithForm(String petId) throws ServiceException, IOException, IllegalArgumentException; | /**
* Updates a pet in the store with form data.
*
* @param petId ID of pet that needs to be updated
* @throws ServiceException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from... | Updates a pet in the store with form data | updatePetWithForm | {
"repo_name": "tbombach/autorest",
"path": "Samples/petstore/Java/SwaggerPetstore.java",
"license": "mit",
"size": 38331
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,685,351 |
@Override
public void afterPropertiesSet() throws Exception {
loadAutonomiccsSystemVmServiceOffering();
if (autonomiccsSystemVmServiceOffering == null) {
throw new CloudRuntimeException("Could not register the Autonomiccs system VMs service offering.");
}
} | void function() throws Exception { loadAutonomiccsSystemVmServiceOffering(); if (autonomiccsSystemVmServiceOffering == null) { throw new CloudRuntimeException(STR); } } | /**
* This method is used to load the default service offering for the Autonomiccs system VM.
*/ | This method is used to load the default service offering for the Autonomiccs system VM | afterPropertiesSet | {
"repo_name": "Autonomiccs/autonomiccs-platform",
"path": "autonomic-plugin-common/src/main/java/br/com/autonomiccs/autonomic/plugin/common/services/AutonomiccsSystemVmDeploymentService.java",
"license": "apache-2.0",
"size": 32250
} | [
"com.cloud.utils.exception.CloudRuntimeException"
] | import com.cloud.utils.exception.CloudRuntimeException; | import com.cloud.utils.exception.*; | [
"com.cloud.utils"
] | com.cloud.utils; | 1,267,320 |
@GET
@Path("/containers/json")
List<Container> containers(@QueryParam("all") Integer all, @QueryParam("limit") Integer limit, @QueryParam("since") String since, @QueryParam("before") String before, @QueryParam("size") Integer size); | @Path(STR) List<Container> containers(@QueryParam("all") Integer all, @QueryParam("limit") Integer limit, @QueryParam("since") String since, @QueryParam(STR) String before, @QueryParam("size") Integer size); | /**
* Get the list of {@link Container} instances.
*
* @param all 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default.
* @param limit Show limit last created containers, include non-running ones.
* @param since Show only containers created since ... | Get the list of <code>Container</code> instances | containers | {
"repo_name": "hekonsek/fabric8",
"path": "components/docker-api/src/main/java/io/fabric8/docker/api/Docker.java",
"license": "apache-2.0",
"size": 9552
} | [
"java.util.List",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam"
] | import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; | import java.util.*; import javax.ws.rs.*; | [
"java.util",
"javax.ws"
] | java.util; javax.ws; | 2,685,351 |
Observable<ServiceResponse<Boolean>> head404WithServiceResponseAsync(); | Observable<ServiceResponse<Boolean>> head404WithServiceResponseAsync(); | /**
* Return 404 status code if successful.
*
* @return the observable to the boolean object
*/ | Return 404 status code if successful | head404WithServiceResponseAsync | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/head/HttpSuccess.java",
"license": "mit",
"size": 3626
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,370,669 |
@PUT
@Path("kill")
@Produces("application/json")
boolean killScheduler(@HeaderParam("sessionid")
final String sessionId) throws NotConnectedRestException, PermissionRestException; | @Path("kill") @Produces(STR) boolean killScheduler(@HeaderParam(STR) final String sessionId) throws NotConnectedRestException, PermissionRestException; | /**
* kills and shutdowns the scheduler
*
* @param sessionId
* a valid session id
* @return true if success, false if not
* @throws NotConnectedRestException
* @throws PermissionRestException
*/ | kills and shutdowns the scheduler | killScheduler | {
"repo_name": "zeineb/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 79398
} | [
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException"
] | import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.PermissionRestException; | import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | javax.ws; org.ow2.proactive_grid_cloud_portal; | 1,736,545 |
public static List<double[]> coordSplit(List<Double> vector) {
if (vector == null) return null;
List<double[]> ret = new ArrayList<double[]>();
double[] xVals = new double[vector.size() / 2];
double[] yVals = new double[vector.size() / 2];
int xTracker = 0;
... | static List<double[]> function(List<Double> vector) { if (vector == null) return null; List<double[]> ret = new ArrayList<double[]>(); double[] xVals = new double[vector.size() / 2]; double[] yVals = new double[vector.size() / 2]; int xTracker = 0; int yTracker = 0; for (int i = 0; i < vector.size(); i++) { if (i % 2 =... | /**
* This returns the coordinate split in a list of coordinates
* such that the values for ret[0] are the x values
* and ret[1] are the y values
*
* @param vector the vector to split with x and y values
* Note that the list will be more stable due to the size operator.
... | This returns the coordinate split in a list of coordinates such that the values for ret[0] are the x values and ret[1] are the y values | coordSplit | {
"repo_name": "drlebedev/nd4j",
"path": "nd4j-common/src/main/java/org/nd4j/linalg/util/MathUtils.java",
"license": "apache-2.0",
"size": 40239
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 73,754 |
private void defaultSettings(View quantityLayout, View
descriptionLayout, View descriptionDivider) {
category = Category.MISCELLANEOUS;
subCategory = SubCategory.OTHERS;
quantityLayout.setVisibility(View.VISIBLE);
descriptionLayout.setVisibility(View.VISIBLE);
de... | void function(View quantityLayout, View descriptionLayout, View descriptionDivider) { category = Category.MISCELLANEOUS; subCategory = SubCategory.OTHERS; quantityLayout.setVisibility(View.VISIBLE); descriptionLayout.setVisibility(View.VISIBLE); descriptionDivider.setVisibility(View.VISIBLE); } | /**
* set up the default setting for the options
*/ | set up the default setting for the options | defaultSettings | {
"repo_name": "SnehankurChakraborty/Roomies",
"path": "app/src/main/java/com/phaseii/rxm/roomies/ui/dialogs/AddExpenseDialog.java",
"license": "apache-2.0",
"size": 32717
} | [
"android.view.View",
"com.phaseii.rxm.roomies.utils.Category",
"com.phaseii.rxm.roomies.utils.SubCategory"
] | import android.view.View; import com.phaseii.rxm.roomies.utils.Category; import com.phaseii.rxm.roomies.utils.SubCategory; | import android.view.*; import com.phaseii.rxm.roomies.utils.*; | [
"android.view",
"com.phaseii.rxm"
] | android.view; com.phaseii.rxm; | 2,123,294 |
protected static ResultSet getEncountersUth(String table, Date beginDate, Date endDate, Connection conn, boolean groupBy) throws ServletException {
ResultSet rs = null;
try {
// Retrieve all Encounter records for this form
String sql = "SELECT * FROM " + table + " " +
... | static ResultSet function(String table, Date beginDate, Date endDate, Connection conn, boolean groupBy) throws ServletException { ResultSet rs = null; try { String sql = STR + table + " " + STR + table + STR + STR + STR + STR; if (groupBy) { sql = sql + STR; } PreparedStatement ps = conn.prepareStatement(sql); ps.setDa... | /**
* This search all UTH sites
* @param table The table that stores the form's submissions
* @param beginDate The first date of the report's time frame
* @param endDate The last date of the report's time frame
* @param groupBy Use groupby to fetch only one record per patient?
* @p... | This search all UTH sites | getEncountersUth | {
"repo_name": "chrisekelley/zeprs",
"path": "src/zeprs/org/cidrz/project/zeprs/report/ZEPRSUtils.java",
"license": "apache-2.0",
"size": 79024
} | [
"java.sql.Connection",
"java.sql.Date",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"javax.servlet.ServletException"
] | import java.sql.Connection; import java.sql.Date; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.servlet.ServletException; | import java.sql.*; import javax.servlet.*; | [
"java.sql",
"javax.servlet"
] | java.sql; javax.servlet; | 2,582,686 |
public void increment(View view) {
if (quantity == 100) {
// Show an error message as a toast
Toast.makeText(this, getString(R.string.more_than_100), Toast.LENGTH_SHORT).show();
// Exit this method early because there's nothing left to do
return;
}
... | void function(View view) { if (quantity == 100) { Toast.makeText(this, getString(R.string.more_than_100), Toast.LENGTH_SHORT).show(); return; } quantity = quantity + 1; displayQuantity(quantity); } | /**
* This method is called when the plus button is clicked.
*/ | This method is called when the plus button is clicked | increment | {
"repo_name": "zuaq/Udacity",
"path": "Android Development for Beginners/JustJava/app/src/main/java/com/example/android/justjava/MainActivity.java",
"license": "apache-2.0",
"size": 5652
} | [
"android.view.View",
"android.widget.Toast"
] | import android.view.View; import android.widget.Toast; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 861,917 |
public Player getPlayer() {
return player;
} | Player function() { return player; } | /**
* Gets the found player.
*
* @return the found player.
*/ | Gets the found player | getPlayer | {
"repo_name": "pdinklag/SpigotMCPlugins",
"path": "Common/src/com/dvgaming/spigotmc/common/check/TargetPlayerOnlineCheck.java",
"license": "mit",
"size": 972
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,336,472 |
@Nonnull
public WorkbookChartDataLabelFormatRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | WorkbookChartDataLabelFormatRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookChartDataLabelFormatRequest.java",
"license": "mit",
"size": 6793
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,154,027 |
@Override
public void destroy()
{
super.destroy();
ArrayList<StatefulProxy> values = new ArrayList<StatefulProxy>();
if (_sessionMap != null) {
Iterator<StatefulProxy> iter = _sessionMap.values().iterator();
while (iter.hasNext()) {
values.add(iter.next());
}
... | void function() { super.destroy(); ArrayList<StatefulProxy> values = new ArrayList<StatefulProxy>(); if (_sessionMap != null) { Iterator<StatefulProxy> iter = _sessionMap.values().iterator(); while (iter.hasNext()) { values.add(iter.next()); } } _sessionMap = null; for (StatefulProxy obj : values) { try { } catch (Thro... | /**
* Cleans up the entity server nicely.
*/ | Cleans up the entity server nicely | destroy | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/ejb/session/StatefulManager.java",
"license": "gpl-2.0",
"size": 11593
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.logging.Level"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 1,848,800 |
public int getLocalPort() {
TcpDiscoveryNode locNode0 = locNode;
return locNode0 != null ? locNode0.discoveryPort() : 0;
} | int function() { TcpDiscoveryNode locNode0 = locNode; return locNode0 != null ? locNode0.discoveryPort() : 0; } | /**
* Gets local TCP port SPI listens to.
*
* @return Local port range.
*/ | Gets local TCP port SPI listens to | getLocalPort | {
"repo_name": "vadopolski/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java",
"license": "apache-2.0",
"size": 76666
} | [
"org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode"
] | import org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode; | import org.apache.ignite.spi.discovery.tcp.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,260,283 |
public boolean skipPast(String to) throws JSONException {
boolean b;
char c;
int i;
int j;
int offset = 0;
int length = to.length();
char[] circle = new char[length];
for (i = 0; i < length; i += 1) {
c = next();
if (c... | boolean function(String to) throws JSONException { boolean b; char c; int i; int j; int offset = 0; int length = to.length(); char[] circle = new char[length]; for (i = 0; i < length; i += 1) { c = next(); if (c == 0) { return false; } circle[i] = c; } for (;;) { j = offset; b = true; for (i = 0; i < length; i += 1) { ... | /**
* Skip characters until past the requested string.
* If it is not found, we are left at the end of the source with a result of false.
* @param to A string to skip past.
* @throws JSONException
*/ | Skip characters until past the requested string. If it is not found, we are left at the end of the source with a result of false | skipPast | {
"repo_name": "mojo1643/margarita",
"path": "app/src/main/java/com/example/root/margarita/util/XMLTokener.java",
"license": "mit",
"size": 9975
} | [
"org.json.JSONException"
] | import org.json.JSONException; | import org.json.*; | [
"org.json"
] | org.json; | 2,191,254 |
@Nullable
protected java.util.List<KeyValuePair> templateParameters;
@Nonnull
public ChatSendActivityNotificationParameterSetBuilder withTemplateParameters(@Nullable final java.util.List<KeyValuePair> val) {
this.templateParameters = val;
return this;
... | java.util.List<KeyValuePair> templateParameters; public ChatSendActivityNotificationParameterSetBuilder function(@Nullable final java.util.List<KeyValuePair> val) { this.templateParameters = val; return this; } | /**
* Sets the TemplateParameters
* @param val the value to set it to
* @return the current builder object
*/ | Sets the TemplateParameters | withTemplateParameters | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/models/ChatSendActivityNotificationParameterSet.java",
"license": "mit",
"size": 8000
} | [
"com.microsoft.graph.models.KeyValuePair",
"javax.annotation.Nullable"
] | import com.microsoft.graph.models.KeyValuePair; import javax.annotation.Nullable; | import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,310,537 |
@WebMethod
CheckSubstanceResult checkSubstanceById(@WebParam(name = "auId") String auId)
throws LockssWebServicesFault; | CheckSubstanceResult checkSubstanceById(@WebParam(name = "auId") String auId) throws LockssWebServicesFault; | /**
* Provides an indication of whether an archival unit has substance.
*
* @param auId
* A String with the identifier (auid) of the archival unit.
* @return a CheckSubstanceResult with the result of the operation.
* @throws LockssWebServicesFault
*/ | Provides an indication of whether an archival unit has substance | checkSubstanceById | {
"repo_name": "lockss/lockss-daemon",
"path": "src/org/lockss/ws/control/AuControlService.java",
"license": "bsd-3-clause",
"size": 10376
} | [
"javax.jws.WebParam",
"org.lockss.ws.entities.CheckSubstanceResult",
"org.lockss.ws.entities.LockssWebServicesFault"
] | import javax.jws.WebParam; import org.lockss.ws.entities.CheckSubstanceResult; import org.lockss.ws.entities.LockssWebServicesFault; | import javax.jws.*; import org.lockss.ws.entities.*; | [
"javax.jws",
"org.lockss.ws"
] | javax.jws; org.lockss.ws; | 2,192,354 |
public void setSASL(String mechanism, String authorizationId,
CallbackHandler cbh)
{
this.saslMechanism = mechanism;
this.saslAuthorizationId = authorizationId;
this.callbackHandler = cbh;
clearUpDesires();
this.saslDesired = true;
}
| void function(String mechanism, String authorizationId, CallbackHandler cbh) { this.saslMechanism = mechanism; this.saslAuthorizationId = authorizationId; this.callbackHandler = cbh; clearUpDesires(); this.saslDesired = true; } | /**
* Set the mechanism and other parameters for SASL Client
* @param mechanism
* @param authorizationId
* @param cbh
*/ | Set the mechanism and other parameters for SASL Client | setSASL | {
"repo_name": "picketbox/picketbox",
"path": "security-spi/spi/src/main/java/org/jboss/security/client/SecurityClient.java",
"license": "lgpl-2.1",
"size": 5069
} | [
"javax.security.auth.callback.CallbackHandler"
] | import javax.security.auth.callback.CallbackHandler; | import javax.security.auth.callback.*; | [
"javax.security"
] | javax.security; | 2,743,854 |
public native void release();
private HIDManager() throws IOException
{
init();
} | native void function(); private HIDManager() throws IOException { init(); } | /**
* Release underlying HID layer. This method must be called when
* <code>HIDManager<code> object is no longer needed. Failure to
* do so could cause memory leaks or unterminated threads. It is
* safe to call this method multiple times.
*
*/ | Release underlying HID layer. This method must be called when <code>HIDManager<code> object is no longer needed. Failure to do so could cause memory leaks or unterminated threads. It is safe to call this method multiple times | release | {
"repo_name": "rohitdubey12/kura",
"path": "target-platform/com.codeminders.hidapi/src/main/java/com/codeminders/hidapi/HIDManager.java",
"license": "epl-1.0",
"size": 3621
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,186,081 |
String processPid = Integer.toString(mPid);
String cpuStatPath = "/proc/" + processPid + "/stat";
try {
// monitor cpu stat of certain process
RandomAccessFile processCpuInfo = new RandomAccessFile(cpuStatPath, "r");
String line = "";
StringBuffer st... | String processPid = Integer.toString(mPid); String cpuStatPath = STR + processPid + "/stat"; try { RandomAccessFile processCpuInfo = new RandomAccessFile(cpuStatPath, "r"); String line = STR\nSTR STRrSTR "); mIdleCpu = Long.parseLong(toks[5]); mTotalCpu = Long.parseLong(toks[2]) + Long.parseLong(toks[3]) + Long.parseLo... | /**
* read the status of CPU
*
* @throws FileNotFoundException
*/ | read the status of CPU | readCpuStat | {
"repo_name": "seker/monitor",
"path": "src/seker/monitor/status/CpuInfo.java",
"license": "apache-2.0",
"size": 10888
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.RandomAccessFile"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; | import java.io.*; | [
"java.io"
] | java.io; | 2,865,356 |
public void buildObservableScenarioValues() {
MarketDataFactory factory = MarketDataFactory.of(
new TestObservableDataProvider(),
new TestTimeSeriesProvider(ImmutableMap.of()));
BuiltScenarioMarketData suppliedData = BuiltScenarioMarketData.builder(date(2011, 3, 8)).build();
TestObservabl... | void function() { MarketDataFactory factory = MarketDataFactory.of( new TestObservableDataProvider(), new TestTimeSeriesProvider(ImmutableMap.of())); BuiltScenarioMarketData suppliedData = BuiltScenarioMarketData.builder(date(2011, 3, 8)).build(); TestObservableId id1 = TestObservableId.of(StandardId.of("reqs", "a")); ... | /**
* Tests building multiple observable values for scenarios where the values aren't perturbed.
*/ | Tests building multiple observable values for scenarios where the values aren't perturbed | buildObservableScenarioValues | {
"repo_name": "jmptrader/Strata",
"path": "modules/calc/src/test/java/com/opengamma/strata/calc/marketdata/DefaultMarketDataFactoryTest.java",
"license": "apache-2.0",
"size": 50250
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.opengamma.strata.basics.StandardId",
"com.opengamma.strata.data.scenario.MarketDataBox",
"org.assertj.core.api.Assertions"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.opengamma.strata.basics.StandardId; import com.opengamma.strata.data.scenario.MarketDataBox; import org.assertj.core.api.Assertions; | import com.google.common.collect.*; import com.opengamma.strata.basics.*; import com.opengamma.strata.data.scenario.*; import org.assertj.core.api.*; | [
"com.google.common",
"com.opengamma.strata",
"org.assertj.core"
] | com.google.common; com.opengamma.strata; org.assertj.core; | 1,819,011 |
@Override
public SemanticBuilder<? extends SemanticChronology> getDynamicBuilder(
int referencedComponentNid,
int assemblageConceptNid) {
return new SemanticBuilderImpl(referencedComponentNid, assemblageConceptNid, VersionType.DYNAMIC);
} | SemanticBuilder<? extends SemanticChronology> function( int referencedComponentNid, int assemblageConceptNid) { return new SemanticBuilderImpl(referencedComponentNid, assemblageConceptNid, VersionType.DYNAMIC); } | /**
* Gets the dynamic builder.
*
* @param referencedComponentNid the referenced component nid
* @param assemblageConceptNid the assemblage concept nid
* @return the dynamic builder
*/ | Gets the dynamic builder | getDynamicBuilder | {
"repo_name": "OSEHRA/ISAAC",
"path": "core/model/src/main/java/sh/isaac/model/builder/SemanticBuilderProvider.java",
"license": "apache-2.0",
"size": 15583
} | [
"sh.isaac.api.chronicle.VersionType",
"sh.isaac.api.component.semantic.SemanticBuilder",
"sh.isaac.api.component.semantic.SemanticChronology"
] | import sh.isaac.api.chronicle.VersionType; import sh.isaac.api.component.semantic.SemanticBuilder; import sh.isaac.api.component.semantic.SemanticChronology; | import sh.isaac.api.chronicle.*; import sh.isaac.api.component.semantic.*; | [
"sh.isaac.api"
] | sh.isaac.api; | 1,938,175 |
List<TimerData> getAggregatedTimerData(TimerData timerData); | List<TimerData> getAggregatedTimerData(TimerData timerData); | /**
* Returns a list of the aggregated timer data for a given template. In this template, only the
* platform id is extracted.
*
* @param timerData
* The template containing the platform id.
* @return The list of the aggregated timer data object.
*/ | Returns a list of the aggregated timer data for a given template. In this template, only the platform id is extracted | getAggregatedTimerData | {
"repo_name": "ivansenic/inspectIT",
"path": "inspectit.server/src/main/java/rocks/inspectit/server/dao/TimerDataDao.java",
"license": "agpl-3.0",
"size": 1075
} | [
"java.util.List",
"rocks.inspectit.shared.all.communication.data.TimerData"
] | import java.util.List; import rocks.inspectit.shared.all.communication.data.TimerData; | import java.util.*; import rocks.inspectit.shared.all.communication.data.*; | [
"java.util",
"rocks.inspectit.shared"
] | java.util; rocks.inspectit.shared; | 1,617,223 |
public List<IFileSpec> taskEditSubmitTestFiles(IServer server, String[] filePaths, int returnType, String fileType) throws Exception {
List<IFileSpec> editFSpecs = FileSpecBuilder.makeFileSpecList(filePaths);
return taskEditSubmitTestFiles(server, editFSpecs, false, returnType, fileType);
} | List<IFileSpec> function(IServer server, String[] filePaths, int returnType, String fileType) throws Exception { List<IFileSpec> editFSpecs = FileSpecBuilder.makeFileSpecList(filePaths); return taskEditSubmitTestFiles(server, editFSpecs, false, returnType, fileType); } | /**
* Opens files for Edit and Submits the passed in fileSpecs and returns the list of submitted fileSpecs.
* No actual modification of the file takes place before submitting.
*/ | Opens files for Edit and Submits the passed in fileSpecs and returns the list of submitted fileSpecs. No actual modification of the file takes place before submitting | taskEditSubmitTestFiles | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/endtoend/ClientEditSubmitE2ETest.java",
"license": "apache-2.0",
"size": 52979
} | [
"com.perforce.p4java.core.file.FileSpecBuilder",
"com.perforce.p4java.core.file.IFileSpec",
"com.perforce.p4java.server.IServer",
"java.util.List"
] | import com.perforce.p4java.core.file.FileSpecBuilder; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.server.IServer; import java.util.List; | import com.perforce.p4java.core.file.*; import com.perforce.p4java.server.*; import java.util.*; | [
"com.perforce.p4java",
"java.util"
] | com.perforce.p4java; java.util; | 731,697 |
Resource getSource(); | Resource getSource(); | /**
* Get the resource that holds the index source (setting / mapping)
*
* @return the resource
*/ | Get the resource that holds the index source (setting / mapping) | getSource | {
"repo_name": "mgargadennec/blossom",
"path": "blossom-core/blossom-core-common/src/main/java/com/blossomproject/core/common/search/IndexationEngineConfiguration.java",
"license": "apache-2.0",
"size": 1191
} | [
"org.springframework.core.io.Resource"
] | import org.springframework.core.io.Resource; | import org.springframework.core.io.*; | [
"org.springframework.core"
] | org.springframework.core; | 516,790 |
public static OfflinePageItem getOfflinePage(Tab tab) {
WebContents webContents = tab.getWebContents();
if (webContents == null) return null;
OfflinePageBridge offlinePageBridge = getInstance().getOfflinePageBridge(tab.getProfile());
if (offlinePageBridge == null) return null;
... | static OfflinePageItem function(Tab tab) { WebContents webContents = tab.getWebContents(); if (webContents == null) return null; OfflinePageBridge offlinePageBridge = getInstance().getOfflinePageBridge(tab.getProfile()); if (offlinePageBridge == null) return null; return offlinePageBridge.getOfflinePage(webContents); } | /**
* Retrieves the offline page that is shown for the tab.
* @param tab The tab to be reloaded.
* @return The offline page if tab currently displays it, null otherwise.
*/ | Retrieves the offline page that is shown for the tab | getOfflinePage | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java",
"license": "apache-2.0",
"size": 38527
} | [
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.content_public.browser.WebContents"
] | import org.chromium.chrome.browser.tab.Tab; import org.chromium.content_public.browser.WebContents; | import org.chromium.chrome.browser.tab.*; import org.chromium.content_public.browser.*; | [
"org.chromium.chrome",
"org.chromium.content_public"
] | org.chromium.chrome; org.chromium.content_public; | 1,625,169 |
public void setBuffer (ByteBuffer buffer) {
setBuffer(buffer, buffer.capacity());
}
| void function (ByteBuffer buffer) { setBuffer(buffer, buffer.capacity()); } | /** Sets the buffer that will be written to. maxCapacity is set to the specified buffer's capacity.
* @see #setBuffer(ByteBuffer, int) */ | Sets the buffer that will be written to. maxCapacity is set to the specified buffer's capacity | setBuffer | {
"repo_name": "romix/kryo",
"path": "src/com/esotericsoftware/kryo/io/ByteBufferOutput.java",
"license": "bsd-3-clause",
"size": 28843
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,295,151 |
public String text() {
return
"("+CodeGenFct.getName(returnType,testeeType)+")null";
}
| String function() { return "("+CodeGenFct.getName(returnType,testeeType)+")null"; } | /**
* How to reproduce this value=object? (Type) null
*/ | How to reproduce this value=object? (Type) null | text | {
"repo_name": "happylyy/jcrasher",
"path": "jcrasher-core/edu/gatech/cc/jcrasher/plans/expr/literals/NullLiteral.java",
"license": "mit",
"size": 1412
} | [
"edu.gatech.cc.jcrasher.writer.CodeGenFct"
] | import edu.gatech.cc.jcrasher.writer.CodeGenFct; | import edu.gatech.cc.jcrasher.writer.*; | [
"edu.gatech.cc"
] | edu.gatech.cc; | 827,906 |
Properties properties = new Properties();
properties.put("agent1.channels", "ch0");
properties.put("agent1.channels.ch0.type", "memory");
properties.put("agent1.sources", "src0");
properties.put("agent1.sources.src0.type", "multiport_syslogtcp");
properties.put("agent1.sources.src0.channels", "ch0"... | Properties properties = new Properties(); properties.put(STR, "ch0"); properties.put(STR, STR); properties.put(STR, "src0"); properties.put(STR, STR); properties.put(STR, "ch0"); properties.put(STR, STR); properties.put(STR, STR); properties.put(STR, "port"); properties.put(STR, "sink0"); properties.put(STR, "null"); p... | /**
* Test fails without FLUME-1743
*/ | Test fails without FLUME-1743 | testFLUME1743 | {
"repo_name": "wangcy6/storm_app",
"path": "frame/apache-flume-1.7.0-src/flume-ng-configuration/src/test/java/org/apache/flume/conf/TestFlumeConfiguration.java",
"license": "apache-2.0",
"size": 2565
} | [
"java.util.Properties",
"junit.framework.Assert",
"org.apache.flume.conf.FlumeConfiguration"
] | import java.util.Properties; import junit.framework.Assert; import org.apache.flume.conf.FlumeConfiguration; | import java.util.*; import junit.framework.*; import org.apache.flume.conf.*; | [
"java.util",
"junit.framework",
"org.apache.flume"
] | java.util; junit.framework; org.apache.flume; | 1,057,633 |
public String transmitIccLogicalChannelGemini(int cla, int command, int channel,
int p1, int p2, int p3, String data, int simId) throws android.os.RemoteException {
if (EncapsulationConstant.USE_MTK_PLATFORM) {
return sTelephony.transmitIccLogicalChannelGemini(cla, command, channel, ... | String function(int cla, int command, int channel, int p1, int p2, int p3, String data, int simId) throws android.os.RemoteException { if (EncapsulationConstant.USE_MTK_PLATFORM) { return sTelephony.transmitIccLogicalChannelGemini(cla, command, channel, p1, p2, p3, data, simId); } else { return null; } } | /**
* Returns the response APDU for a command APDU sent to a logical channel for Gemini-Card
*/ | Returns the response APDU for a command APDU sent to a logical channel for Gemini-Card | transmitIccLogicalChannelGemini | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Mms/src/com/mediatek/encapsulation/com/android/internal/telephony/EncapsulatedTelephonyService.java",
"license": "gpl-2.0",
"size": 46897
} | [
"com.mediatek.encapsulation.EncapsulationConstant"
] | import com.mediatek.encapsulation.EncapsulationConstant; | import com.mediatek.encapsulation.*; | [
"com.mediatek.encapsulation"
] | com.mediatek.encapsulation; | 1,383,661 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<UsageInner>> listByLocationNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if (this.c... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<UsageInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; return Fl... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked excepti... | Get the next page of items | listByLocationNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/implementation/UsagesClientImpl.java",
"license": "mit",
"size": 15955
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.labservices.fluent.models.UsageInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.labservices.fluent.models.UsageInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.labservices.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,156,275 |
@Override
public RemoteGroup join(long groupId, long userId, MessageReceiver messageReceiver) throws RemoteException {
synchronized (this) {
LocalGroup group;
if (shutDown) throw new ServiceException("Service has shutdown");
RemoteUserImpl user = userStore.getUserById(userId);
if (user =... | RemoteGroup function(long groupId, long userId, MessageReceiver messageReceiver) throws RemoteException { synchronized (this) { LocalGroup group; if (shutDown) throw new ServiceException(STR); RemoteUserImpl user = userStore.getUserById(userId); if (user == null) throw new ServiceException(STR); if ((group = groups.get... | /**
* Socket opcode -- 0x3
*
* @param groupId Group id to join
* @param userId user id
* @param messageReceiver Controller to receive events from the server
* @return
* @throws RemoteException
*/ | Socket opcode -- 0x3 | join | {
"repo_name": "kkroboth/GroupChats",
"path": "src/main/java/group_chats/server/ChatService.java",
"license": "mit",
"size": 9838
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 1,800,578 |
private javax.swing.JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new javax.swing.JScrollPane();
jScrollPane.setSize(new Dimension(600,600));
jScrollPane.setPreferredSize( new Dimension(600,600));
jScrollPane.setViewportView(getLayerL... | javax.swing.JScrollPane function() { if (jScrollPane == null) { jScrollPane = new javax.swing.JScrollPane(); jScrollPane.setSize(new Dimension(600,600)); jScrollPane.setPreferredSize( new Dimension(600,600)); jScrollPane.setViewportView(getLayerListPanel()); } return jScrollPane; } | /**
* This method initializes jScrollPane
*
* @return javax.swing.JScrollPane
*/ | This method initializes jScrollPane | getJScrollPane | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/project/documents/view/info/gui/InfoToolViewer.java",
"license": "gpl-3.0",
"size": 9233
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,315,476 |
public void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
{
this.proxy.mouseClicked(mouseX, mouseY, mouseButton);
super.mouseClicked(mouseX, mouseY, mouseButton);
} | void function(int mouseX, int mouseY, int mouseButton) throws IOException { this.proxy.mouseClicked(mouseX, mouseY, mouseButton); super.mouseClicked(mouseX, mouseY, mouseButton); } | /**
* Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
*/ | Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton | mouseClicked | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiScreenRealmsProxy.java",
"license": "gpl-3.0",
"size": 7475
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,616,909 |
private static final void processCellCartesianProduct(final CnfGrammar grammar, final Chart chart, final int start,
final int end, final ChartCell cell, final Scorer scorer) {
// Apply binary rules.
for (int mid = start + 1; mid <= end - 1; mid++) {
ChartCell leftCell = chart... | static final void function(final CnfGrammar grammar, final Chart chart, final int start, final int end, final ChartCell cell, final Scorer scorer) { for (int mid = start + 1; mid <= end - 1; mid++) { ChartCell leftCell = chart.getCell(start, mid); ChartCell rightCell = chart.getCell(mid, end); for (final int leftChildN... | /**
* Process a cell (binary rules only) using the Cartesian product of the children's rules.
*
* This follows the description in (Dunlop et al., 2010).
*/ | Process a cell (binary rules only) using the Cartesian product of the children's rules. This follows the description in (Dunlop et al., 2010) | processCellCartesianProduct | {
"repo_name": "mgormley/pacaya",
"path": "src/main/java/edu/jhu/pacaya/parse/cky/CkyPcfgParser.java",
"license": "apache-2.0",
"size": 10670
} | [
"edu.jhu.pacaya.parse.cky.chart.Chart",
"edu.jhu.pacaya.parse.cky.chart.ChartCell"
] | import edu.jhu.pacaya.parse.cky.chart.Chart; import edu.jhu.pacaya.parse.cky.chart.ChartCell; | import edu.jhu.pacaya.parse.cky.chart.*; | [
"edu.jhu.pacaya"
] | edu.jhu.pacaya; | 641,305 |
public static String timeToString(Timestamp ts, String format)
{
if(format == null || format.length() == 0)
format = "yyyyMMdd";
// Se a data for nula retorna a qtd de zeros respectivos
// a quantidade de digitos do formato.
if(ts == null)
return lPad("", '0', format.length());
SimpleDat... | static String function(Timestamp ts, String format) { if(format == null format.length() == 0) format = STR; if(ts == null) return lPad("", '0', format.length()); SimpleDateFormat f = new SimpleDateFormat(format); return f.format(ts); } | /**
* Retorna a data formatada de acordo com o formato
* <BR>Dia: dd, Mes: mm, Ano: yyyy
*
* @param Timestamp Data
* @param String Formato da data
* @return String Data Formatada
* */ | Retorna a data formatada de acordo com o formato Dia: dd, Mes: mm, Ano: yyyy | timeToString | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempierelbr/base/src/org/adempierelbr/util/TextUtil.java",
"license": "gpl-2.0",
"size": 24715
} | [
"java.sql.Timestamp",
"java.text.SimpleDateFormat"
] | import java.sql.Timestamp; import java.text.SimpleDateFormat; | import java.sql.*; import java.text.*; | [
"java.sql",
"java.text"
] | java.sql; java.text; | 1,424,764 |
public static void recursivelyDeleteDir(File customProfileDir) {
FileHandler.delete(customProfileDir);
}
| static void function(File customProfileDir) { FileHandler.delete(customProfileDir); } | /**
* Delete a directory and all subdirectories
*/ | Delete a directory and all subdirectories | recursivelyDeleteDir | {
"repo_name": "virajs/selenium-1",
"path": "java/client/src/org/openqa/selenium/browserlaunchers/LauncherUtils.java",
"license": "apache-2.0",
"size": 14217
} | [
"java.io.File",
"org.openqa.selenium.io.FileHandler"
] | import java.io.File; import org.openqa.selenium.io.FileHandler; | import java.io.*; import org.openqa.selenium.io.*; | [
"java.io",
"org.openqa.selenium"
] | java.io; org.openqa.selenium; | 271,538 |
return (Action[]) actions.toArray(new Action[actions.size()]);
} | return (Action[]) actions.toArray(new Action[actions.size()]); } | /**
* Returns the actions which are assigned tothis transition.
* @return An array of actions.
*/ | Returns the actions which are assigned tothis transition | getActions | {
"repo_name": "apache/lenya",
"path": "src/java/org/apache/lenya/workflow/impl/TransitionImpl.java",
"license": "apache-2.0",
"size": 5493
} | [
"org.apache.lenya.workflow.Action"
] | import org.apache.lenya.workflow.Action; | import org.apache.lenya.workflow.*; | [
"org.apache.lenya"
] | org.apache.lenya; | 545,162 |
public LogRegressionMultiClassTrainer withUpdatesStgy(UpdatesStrategy updatesStgy) {
this.updatesStgy = updatesStgy;
return this;
} | LogRegressionMultiClassTrainer function(UpdatesStrategy updatesStgy) { this.updatesStgy = updatesStgy; return this; } | /**
* Set up the regularization parameter.
*
* @param updatesStgy Update strategy.
* @return Trainer with new update strategy parameter value.
*/ | Set up the regularization parameter | withUpdatesStgy | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/ml/src/main/java/org/apache/ignite/ml/regressions/logistic/multiclass/LogRegressionMultiClassTrainer.java",
"license": "apache-2.0",
"size": 7563
} | [
"org.apache.ignite.ml.nn.UpdatesStrategy"
] | import org.apache.ignite.ml.nn.UpdatesStrategy; | import org.apache.ignite.ml.nn.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,324,278 |
private boolean sameFile(final FileStatus inputStat, final FileStatus outputStat) {
// Not matching length
if (inputStat.getLen() != outputStat.getLen()) return false;
// Mark files as equals, since user asked for no checksum verification
if (!verifyChecksum) return true;
// If check... | boolean function(final FileStatus inputStat, final FileStatus outputStat) { if (inputStat.getLen() != outputStat.getLen()) return false; if (!verifyChecksum) return true; FileChecksum inChecksum = getFileChecksum(inputFs, inputStat.getPath()); if (inChecksum == null) return false; FileChecksum outChecksum = getFileChec... | /**
* Check if the two files are equal by looking at the file length,
* and at the checksum (if user has specified the verifyChecksum flag).
*/ | Check if the two files are equal by looking at the file length, and at the checksum (if user has specified the verifyChecksum flag) | sameFile | {
"repo_name": "francisliu/hbase_namespace",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java",
"license": "apache-2.0",
"size": 27393
} | [
"org.apache.hadoop.fs.FileChecksum",
"org.apache.hadoop.fs.FileStatus"
] | import org.apache.hadoop.fs.FileChecksum; import org.apache.hadoop.fs.FileStatus; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 97,306 |
public static SortedSet<Integer> findAvailableUdpPorts(int numRequested) {
return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX);
} | static SortedSet<Integer> function(int numRequested) { return findAvailableUdpPorts(numRequested, PORT_RANGE_MIN, PORT_RANGE_MAX); } | /**
* Find the requested number of available UDP ports, each randomly selected
* from the range [{@value #PORT_RANGE_MIN}, {@value #PORT_RANGE_MAX}].
*
* @param numRequested
* the number of available ports to find
*
* @return a sorted set of... | Find the requested number of available UDP ports, each randomly selected from the range [#PORT_RANGE_MIN, #PORT_RANGE_MAX] | findAvailableUdpPorts | {
"repo_name": "Kixeye/kixmpp",
"path": "kixmpp-server/src/test/java/com/kixeye/kixmpp/server/utils/SocketUtils.java",
"license": "apache-2.0",
"size": 15961
} | [
"java.util.SortedSet"
] | import java.util.SortedSet; | import java.util.*; | [
"java.util"
] | java.util; | 675,981 |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpSession session = httpRequest.getSession();
//System.out.println("Doing stuff...");
// if this request is e... | void function(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; HttpSession session = httpRequest.getSession(); if (!isFilteredRequest(httpRequest)) { chain.doFilter(request, response); return; } syn... | /**
* Synchronize the request and then either process it or skip it, depending on
* what other requests current exist for this session. See the description of
* this class for more details.
*/ | Synchronize the request and then either process it or skip it, depending on what other requests current exist for this session. See the description of this class for more details | doFilter | {
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/servlet/filter/RequestControlFilter.java",
"license": "gpl-3.0",
"size": 11996
} | [
"java.io.IOException",
"javax.servlet.FilterChain",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession"
] | import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 24,670 |
public String getLocalizedTextFromDatabase(String localeString,
long objectKey, LocalizedObjectTypes objectType); | String function(String localeString, long objectKey, LocalizedObjectTypes objectType); | /**
* Returns the localized resource from the database.
*
* @param localeString
* The locale to be used.
* @param objectKey
* The object key for the requested information.
* @param objectType
* The type of the resource.
* @return - the local... | Returns the localized resource from the database | getLocalizedTextFromDatabase | {
"repo_name": "opetrovski/development",
"path": "oscm-i18n-intsvc/javasrc/org/oscm/i18nservice/local/LocalizerServiceLocal.java",
"license": "apache-2.0",
"size": 10550
} | [
"org.oscm.domobjects.enums.LocalizedObjectTypes"
] | import org.oscm.domobjects.enums.LocalizedObjectTypes; | import org.oscm.domobjects.enums.*; | [
"org.oscm.domobjects"
] | org.oscm.domobjects; | 1,645,685 |
private static JsonArray retrieveDeploymentLabelsFromArchive(String pathToArchive, boolean dependentAPIFromProduct)
throws APIManagementException {
try {
//If the artifact is a dependent API from a API Product, instead of the artifact's deployment environments,
//product... | static JsonArray function(String pathToArchive, boolean dependentAPIFromProduct) throws APIManagementException { try { String jsonContent = (dependentAPIFromProduct) ? getFileContentAsJson(new File(pathToArchive).getParentFile().getParent() + File.separator + ImportExportConstants.DEPLOYMENT_INFO_LOCATION) : getFileCon... | /**
* Retrieve the deployment information from the file
*
* @param pathToArchive Path to API/API Product archive
* @return a JsonArray of the deployed gateway environments
* @throws APIManagementException If an error occurs while reading the file
*/ | Retrieve the deployment information from the file | retrieveDeploymentLabelsFromArchive | {
"repo_name": "chamindias/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/ImportUtils.java",
"license": "apache-2.0",
"size": 122878
} | [
"com.google.gson.Gson",
"com.google.gson.JsonArray",
"java.io.File",
"java.io.IOException",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.ExceptionCodes",
"org.wso2.carbon.apimgt.impl.importexport.ImportExportConstants"
] | import com.google.gson.Gson; import com.google.gson.JsonArray; import java.io.File; import java.io.IOException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.ExceptionCodes; import org.wso2.carbon.apimgt.impl.importexport.ImportExportConstants; | import com.google.gson.*; import java.io.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.importexport.*; | [
"com.google.gson",
"java.io",
"org.wso2.carbon"
] | com.google.gson; java.io; org.wso2.carbon; | 2,684,268 |
public static IAST QuantityMagnitude(final IExpr quantity, final IExpr unit) {
return new AST2(QuantityMagnitude, quantity, unit);
} | static IAST function(final IExpr quantity, final IExpr unit) { return new AST2(QuantityMagnitude, quantity, unit); } | /**
* Returns the value of the <code>quantity</code> for the given <code>unit</code>
*
* <p>
* See: <a href=
* "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/QuantityMagnitude.md">QuantityMagnitude</a>
*
* @param quantity
* @param unit
... | Returns the value of the <code>quantity</code> for the given <code>unit</code> See: QuantityMagnitude | QuantityMagnitude | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
} | [
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 140,891 |
Date getEndDate();
| Date getEndDate(); | /**
* Return the value associated with the column: endDate.
* @return A Date object (this.endDate)
*/ | Return the value associated with the column: endDate | getEndDate | {
"repo_name": "rpgm/mi15",
"path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/iface/IStaffHasRole.java",
"license": "apache-2.0",
"size": 5383
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,332,760 |
private Map collectUsage() {
Map<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>> _usedClassToPackagesMap =
new HashMap<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>>();
ClassDoc[] classes = rootDoc.classes();
for (int i = 0, ilim = classes.length; i < ilim; ++ i) {
ClassDoc ... | Map function() { Map<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>> _usedClassToPackagesMap = new HashMap<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>>(); ClassDoc[] classes = rootDoc.classes(); for (int i = 0, ilim = classes.length; i < ilim; ++ i) { ClassDoc clazz = classes[i]; if (clazz.isInterface()) { Inter... | /**
* Create the cross reference database.
*/ | Create the cross reference database | collectUsage | {
"repo_name": "cfriedt/classpath",
"path": "tools/gnu/classpath/tools/doclets/AbstractDoclet.java",
"license": "gpl-2.0",
"size": 42203
} | [
"com.sun.javadoc.ClassDoc",
"com.sun.javadoc.ConstructorDoc",
"com.sun.javadoc.Doc",
"com.sun.javadoc.FieldDoc",
"com.sun.javadoc.MethodDoc",
"com.sun.javadoc.PackageDoc",
"com.sun.javadoc.Parameter",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"java.util.Set"
] | import com.sun.javadoc.ClassDoc; import com.sun.javadoc.ConstructorDoc; import com.sun.javadoc.Doc; import com.sun.javadoc.FieldDoc; import com.sun.javadoc.MethodDoc; import com.sun.javadoc.PackageDoc; import com.sun.javadoc.Parameter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import ja... | import com.sun.javadoc.*; import java.util.*; | [
"com.sun.javadoc",
"java.util"
] | com.sun.javadoc; java.util; | 376,638 |
public static PaginatedResult<Artist> getRecommendedArtists(int page, Session session) {
Result result = Caller.getInstance().call("user.getRecommendedArtists", session, "page", String.valueOf(page));
if (!result.isSuccessful())
return new PaginatedResult<Artist>(0, 0, Collections.<Artist>emptyList());
... | static PaginatedResult<Artist> function(int page, Session session) { Result result = Caller.getInstance().call(STR, session, "page", String.valueOf(page)); if (!result.isSuccessful()) return new PaginatedResult<Artist>(0, 0, Collections.<Artist>emptyList()); DomElement element = result.getContentElement(); Collection<D... | /**
* Get Last.fm artist recommendations for a user.
*
* @param page The page to fetch
* @param session A Session instance
* @return a list of {@link Artist}s
*/ | Get Last.fm artist recommendations for a user | getRecommendedArtists | {
"repo_name": "iolsen/harmonium",
"path": "net/roarsoftware/lastfm/User.java",
"license": "agpl-3.0",
"size": 17302
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.List",
"net.roarsoftware.xml.DomElement"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import net.roarsoftware.xml.DomElement; | import java.util.*; import net.roarsoftware.xml.*; | [
"java.util",
"net.roarsoftware.xml"
] | java.util; net.roarsoftware.xml; | 871,484 |
public RouteDefinition errorHandler(ErrorHandlerFactory errorHandlerBuilder) {
setErrorHandlerBuilder(errorHandlerBuilder);
// we are now using a route scoped error handler
contextScopedErrorHandler = false;
return this;
} | RouteDefinition function(ErrorHandlerFactory errorHandlerBuilder) { setErrorHandlerBuilder(errorHandlerBuilder); contextScopedErrorHandler = false; return this; } | /**
* Installs the given <a href="http://camel.apache.org/error-handler.html">error handler</a> builder.
*
* @param errorHandlerBuilder the error handler to be used by default for all child routes
* @return the current builder with the error handler configured
*/ | Installs the given error handler builder | errorHandler | {
"repo_name": "jonmcewen/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java",
"license": "apache-2.0",
"size": 44503
} | [
"org.apache.camel.ErrorHandlerFactory"
] | import org.apache.camel.ErrorHandlerFactory; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,538,185 |
protected final void write(Element element)
throws IOException {
// treat empty elements differently to avoid an
// instanceof test
if (element.getChildCount() == 0) {
writeStartTag(element, false);
writeEndTag(element); ... | final void function(Element element) throws IOException { if (element.getChildCount() == 0) { writeStartTag(element, false); writeEndTag(element); } else { Node current = element; boolean end = false; int index = -1; int[] indexes = new int[10]; int top = 0; indexes[0] = -1; while (true) { if (!end && current.getChildC... | /**
* <p>
* Serializes an element onto the output stream using the canonical
* XML algorithm. The result is guaranteed to be well-formed.
* If <code>element</code> does not have a parent element, it will
* also be namespace well-formed.
* </p>
*
... | Serializes an element onto the output stream using the canonical XML algorithm. The result is guaranteed to be well-formed. If <code>element</code> does not have a parent element, it will also be namespace well-formed. | write | {
"repo_name": "mmohan01/ReFactory",
"path": "data/xom/xom-1.2b2/nu/xom/canonical/Canonicalizer.java",
"license": "mit",
"size": 38844
} | [
"java.io.IOException",
"nu.xom.Element",
"nu.xom.Node",
"nu.xom.ParentNode"
] | import java.io.IOException; import nu.xom.Element; import nu.xom.Node; import nu.xom.ParentNode; | import java.io.*; import nu.xom.*; | [
"java.io",
"nu.xom"
] | java.io; nu.xom; | 1,473,601 |
public void mergeOptionsFromJs(JSONObject jsOptions) throws JSONException {
if (jsOptions.has(XmlTags.CONFIG_FILE_TAG)) {
String configUrl = jsOptions.getString(XmlTags.CONFIG_FILE_TAG);
if (!TextUtils.isEmpty(configUrl)) {
setConfigUrl(configUrl);
}
... | void function(JSONObject jsOptions) throws JSONException { if (jsOptions.has(XmlTags.CONFIG_FILE_TAG)) { String configUrl = jsOptions.getString(XmlTags.CONFIG_FILE_TAG); if (!TextUtils.isEmpty(configUrl)) { setConfigUrl(configUrl); } } if (jsOptions.has(XmlTags.AUTO_INSTALLATION_TAG)) { allowUpdatesAutoInstall(jsOption... | /**
* Apply and save options that has been send from web page.
* Using this we can change plugin config from JavaScript.
*
* @param jsOptions options from web
* @throws JSONException
*/ | Apply and save options that has been send from web page. Using this we can change plugin config from JavaScript | mergeOptionsFromJs | {
"repo_name": "mnewmedia/cordova-hot-code-push",
"path": "src/android/src/com/nordnetab/chcp/main/config/ChcpXmlConfig.java",
"license": "mit",
"size": 4169
} | [
"android.text.TextUtils",
"org.json.JSONException",
"org.json.JSONObject"
] | import android.text.TextUtils; import org.json.JSONException; import org.json.JSONObject; | import android.text.*; import org.json.*; | [
"android.text",
"org.json"
] | android.text; org.json; | 741,737 |
private static String xaState(int xaState)
{
switch (xaState) {
case Status.STATUS_ACTIVE:
return "ACTIVE";
case Status.STATUS_MARKED_ROLLBACK:
return "MARKED-ROLLBACK";
case Status.STATUS_PREPARED:
return "PREPARED";
case Status.STATUS_COMMITTED:
return "COMITTED";
c... | static String function(int xaState) { switch (xaState) { case Status.STATUS_ACTIVE: return STR; case Status.STATUS_MARKED_ROLLBACK: return STR; case Status.STATUS_PREPARED: return STR; case Status.STATUS_COMMITTED: return STR; case Status.STATUS_ROLLEDBACK: return STR; case Status.STATUS_PREPARING: return STR; case Sta... | /**
* Converts XA state code to string.
*/ | Converts XA state code to string | xaState | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/transaction/TransactionImpl.java",
"license": "gpl-2.0",
"size": 39106
} | [
"javax.transaction.Status"
] | import javax.transaction.Status; | import javax.transaction.*; | [
"javax.transaction"
] | javax.transaction; | 1,743,813 |
private Map<String, List<Object>> parseWhereValuesByExample(final Class<?> type, final Object... beans)
{
final Map<String, List<Object>> result = new Hashtable<String, List<Object>>();
final StorableInfo sinfo = EntityUtils.info(type);
for (final Object bean : beans)
{
... | Map<String, List<Object>> function(final Class<?> type, final Object... beans) { final Map<String, List<Object>> result = new Hashtable<String, List<Object>>(); final StorableInfo sinfo = EntityUtils.info(type); for (final Object bean : beans) { for (final ElementInfo einfo : sinfo.nonVirtualElements()) { final String ... | /**
* Parses the values for the where clause.
*
* @param type
* the bean type
* @param beans
* sample beans to use as example
*
* @return the where values
*/ | Parses the values for the where clause | parseWhereValuesByExample | {
"repo_name": "perbone/udao",
"path": "udao-provider-jdbc/src/main/java/io/perbone/udao/provider/jdbc/JdbcDataSourceImpl.java",
"license": "apache-2.0",
"size": 106396
} | [
"io.perbone.udao.util.ElementInfo",
"io.perbone.udao.util.EntityUtils",
"io.perbone.udao.util.StorableInfo",
"java.util.ArrayList",
"java.util.Hashtable",
"java.util.List",
"java.util.Map"
] | import io.perbone.udao.util.ElementInfo; import io.perbone.udao.util.EntityUtils; import io.perbone.udao.util.StorableInfo; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import java.util.Map; | import io.perbone.udao.util.*; import java.util.*; | [
"io.perbone.udao",
"java.util"
] | io.perbone.udao; java.util; | 2,690,831 |
EOperation getPowerSystemResource__IsApplicable_solveCsp_FWD__IsApplicableMatch_PowerSystemResource_Location_MeterAsset_Location_LocationToLocation_MeterAssetMMXUPair(); | EOperation getPowerSystemResource__IsApplicable_solveCsp_FWD__IsApplicableMatch_PowerSystemResource_Location_MeterAsset_Location_LocationToLocation_MeterAssetMMXUPair(); | /**
* Returns the meta object for the '{@link rgse.ttc17.emoflon.tgg.task2.Rules.PowerSystemResource#isApplicable_solveCsp_FWD(org.moflon.tgg.runtime.IsApplicableMatch, gluemodel.CIM.IEC61970.Core.PowerSystemResource, outagePreventionJointarget.Location, gluemodel.CIM.IEC61968.Metering.MeterAsset, gluemodel.CIM.IEC61... | Returns the meta object for the '<code>rgse.ttc17.emoflon.tgg.task2.Rules.PowerSystemResource#isApplicable_solveCsp_FWD(org.moflon.tgg.runtime.IsApplicableMatch, gluemodel.CIM.IEC61970.Core.PowerSystemResource, outagePreventionJointarget.Location, gluemodel.CIM.IEC61968.Metering.MeterAsset, gluemodel.CIM.IEC61968.Commo... | getPowerSystemResource__IsApplicable_solveCsp_FWD__IsApplicableMatch_PowerSystemResource_Location_MeterAsset_Location_LocationToLocation_MeterAssetMMXUPair | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.emoflon.tgg.task2/gen/rgse/ttc17/emoflon/tgg/task2/Rules/RulesPackage.java",
"license": "mit",
"size": 437406
} | [
"org.eclipse.emf.ecore.EOperation"
] | import org.eclipse.emf.ecore.EOperation; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,727,890 |
public static List<FieldDescriptor> getKeyFields(Map<String, List<FieldDescriptor>> classKeys,
String clsName) {
String className = TypeUtil.unqualifiedName(clsName);
return classKeys.get(className);
} | static List<FieldDescriptor> function(Map<String, List<FieldDescriptor>> classKeys, String clsName) { String className = TypeUtil.unqualifiedName(clsName); return classKeys.get(className); } | /**
* Return the key fields of a given class.
* @param classKeys map of classname to set of keys
* @param clsName the class name to look up
* @return the fields that are class keys for the class
*/ | Return the key fields of a given class | getKeyFields | {
"repo_name": "drhee/toxoMine",
"path": "intermine/api/main/src/org/intermine/api/config/ClassKeyHelper.java",
"license": "lgpl-2.1",
"size": 9384
} | [
"java.util.List",
"java.util.Map",
"org.intermine.metadata.FieldDescriptor",
"org.intermine.util.TypeUtil"
] | import java.util.List; import java.util.Map; import org.intermine.metadata.FieldDescriptor; import org.intermine.util.TypeUtil; | import java.util.*; import org.intermine.metadata.*; import org.intermine.util.*; | [
"java.util",
"org.intermine.metadata",
"org.intermine.util"
] | java.util; org.intermine.metadata; org.intermine.util; | 1,894,516 |
public static List<Worker> getAllWorkers() {
return getList("FROM Worker ORDER BY LASTNAME ASC", Worker.class, false);
}
| static List<Worker> function() { return getList(STR, Worker.class, false); } | /**
* Get all of the workers
* @return a List of type Worker
*/ | Get all of the workers | getAllWorkers | {
"repo_name": "rorrell/workermanagement",
"path": "src/workermanagement/model/WorkHelper.java",
"license": "bsd-3-clause",
"size": 16073
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,292,976 |
protected void executionComplete(ExecutionContextImpl executionContext, Throwable t) {
executionContext.onFullExecutionComplete(t);
} | void function(ExecutionContextImpl executionContext, Throwable t) { executionContext.onFullExecutionComplete(t); } | /**
* Run after execution is complete (including all fault tolerance processing)
* <p>
* Subclasses can override this if they require different end of execution behaviour
*
* @param executionContext the execution context
* @param t the exception thrown, or {@code null} if no... | Run after execution is complete (including all fault tolerance processing) Subclasses can override this if they require different end of execution behaviour | executionComplete | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.microprofile.faulttolerance.1.0/src/com/ibm/ws/microprofile/faulttolerance/executor/impl/sync/SynchronousExecutorImpl.java",
"license": "epl-1.0",
"size": 8882
} | [
"com.ibm.ws.microprofile.faulttolerance.executor.impl.ExecutionContextImpl"
] | import com.ibm.ws.microprofile.faulttolerance.executor.impl.ExecutionContextImpl; | import com.ibm.ws.microprofile.faulttolerance.executor.impl.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,095,800 |
public Set<Keyword> flatten() {
return Stream.concat(
Stream.of(this),
OptionalUtil.toStream(getChild()).flatMap(child -> child.flatten().stream()))
.collect(Collectors.toSet());
} | Set<Keyword> function() { return Stream.concat( Stream.of(this), OptionalUtil.toStream(getChild()).flatMap(child -> child.flatten().stream())) .collect(Collectors.toSet()); } | /**
* Returns all nodes in this chain as separate keywords.
* E.g, for "A > B > C" we get {"A", "B", "C"}.
*/ | Returns all nodes in this chain as separate keywords. E.g, for "A > B > C" we get {"A", "B", "C"} | flatten | {
"repo_name": "sauliusg/jabref",
"path": "src/main/java/org/jabref/model/entry/Keyword.java",
"license": "mit",
"size": 4094
} | [
"java.util.Set",
"java.util.stream.Collectors",
"java.util.stream.Stream",
"org.jabref.model.util.OptionalUtil"
] | import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; import org.jabref.model.util.OptionalUtil; | import java.util.*; import java.util.stream.*; import org.jabref.model.util.*; | [
"java.util",
"org.jabref.model"
] | java.util; org.jabref.model; | 947,847 |
@Override
public void saveRootMap(File f, HashMap<UUID, String> rootmap) throws FileNotFoundException{
RootMap.saveRootMap(f, rootmap,1,max);
}
| void function(File f, HashMap<UUID, String> rootmap) throws FileNotFoundException{ RootMap.saveRootMap(f, rootmap,1,max); } | /**
* Exact Safe Command for RootMap
* @param f File of RootMap
* @param rootmap RootMap
* @throws FileNotFoundException
*/ | Exact Safe Command for RootMap | saveRootMap | {
"repo_name": "Jack5496/TreeSpirit",
"path": "src/main/java/com/jack/treespirit/filemanager/FileManager.java",
"license": "gpl-3.0",
"size": 3605
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.util.HashMap"
] | import java.io.File; import java.io.FileNotFoundException; import java.util.HashMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,347,450 |
EList<Relation> getRelationname(); | EList<Relation> getRelationname(); | /**
* Returns the value of the '<em><b>Relationname</b></em>' reference list.
* The list contents are of type {@link org.xtext.nv.dsl.mMDSL.Relation}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Relationname</em>' reference list isn't clear,
* there really should be more of a descript... | Returns the value of the 'Relationname' reference list. The list contents are of type <code>org.xtext.nv.dsl.mMDSL.Relation</code>. If the meaning of the 'Relationname' reference list isn't clear, there really should be more of a description here... | getRelationname | {
"repo_name": "niksavis/mm-dsl",
"path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/mMDSL/ModelType.java",
"license": "epl-1.0",
"size": 3386
} | [
"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; | 2,536,061 |
private void readObject(ObjectInputStream stream) throws InvalidObjectException {
throw new InvalidObjectException("Proxy required.");
}
private static class SerializationProxy implements Serializable {
private static final long serialVersionUID = -6056026042294082359L;
// array lists are serializable
p... | void function(ObjectInputStream stream) throws InvalidObjectException { throw new InvalidObjectException(STR); } private static class SerializationProxy implements Serializable { private static final long serialVersionUID = -6056026042294082359L; private final ArrayList<Serializable> serializableInstances; public Seria... | /**
* Ensure that no instance of {@link InstanceCache} is created because it was present in the stream. A correct
* stream should only contain instances of the proxy.
*/ | Ensure that no instance of <code>InstanceCache</code> is created because it was present in the stream. A correct stream should only contain instances of the proxy | readObject | {
"repo_name": "CodeFX-org/demo-serialization-proxy-pattern",
"path": "src/org/codefx/lab/serialization/proxypattern/InstanceCache.java",
"license": "unlicense",
"size": 5283
} | [
"java.io.InvalidObjectException",
"java.io.ObjectInputStream",
"java.io.Serializable",
"java.util.ArrayList"
] | import java.io.InvalidObjectException; import java.io.ObjectInputStream; import java.io.Serializable; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,209,540 |
public List<Cheese> getCopyOfCheeseList() {
if(cheesesInStock.isEmpty()) {
return Collections.emptyList();
}
else {
return new ArrayList<Cheese>(cheesesInStock);
}
} | List<Cheese> function() { if(cheesesInStock.isEmpty()) { return Collections.emptyList(); } else { return new ArrayList<Cheese>(cheesesInStock); } } | /**
* CORRECT WAY to return a copy of a collection
*
* - Collections.emptyList() returns an empty list
* there is also emptySet() and emptyMap()
* - new ArrayList(cheesesInStock) makes a copy
*/ | CORRECT WAY to return a copy of a collection - Collections.emptyList() returns an empty list there is also emptySet() and emptyMap() - new ArrayList(cheesesInStock) makes a copy | getCopyOfCheeseList | {
"repo_name": "briandang714/effective-java",
"path": "src/main/java/methods/ReturnEmptyCollectionsNotNull/ExampleEmptyCollections.java",
"license": "apache-2.0",
"size": 2666
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,096,667 |
@POST
@Path(ExportResourceApi.DESA_PATH)
@Produces({MediaType.APPLICATION_JSON})
public SmartGwtResponse<ExportResult> newDesaExport(
@FormParam(ExportResourceApi.DESA_PID_PARAM) List<String> pids,
@FormParam(ExportResourceApi.DESA_HIERARCHY_PARAM) @DefaultValue("false") boolean ... | @Path(ExportResourceApi.DESA_PATH) @Produces({MediaType.APPLICATION_JSON}) SmartGwtResponse<ExportResult> function( @FormParam(ExportResourceApi.DESA_PID_PARAM) List<String> pids, @FormParam(ExportResourceApi.DESA_HIERARCHY_PARAM) @DefaultValue("false") boolean hierarchy, @FormParam(ExportResourceApi.DESA_FORDOWNLOAD_P... | /**
* Starts a new export to DESA repository.
*
* @param pids PIDs to export
* @param hierarchy export also children hierarchy of requested PIDs. Default is {@code false}.
* @param forDownload export to file system for later client download. If {@code true} dryRun is ignored.
* ... | Starts a new export to DESA repository | newDesaExport | {
"repo_name": "proarc/proarc",
"path": "proarc-webapp/src/main/java/cz/cas/lib/proarc/webapp/server/rest/ExportResource.java",
"license": "gpl-3.0",
"size": 40175
} | [
"cz.cas.lib.proarc.common.export.DesaExport",
"cz.cas.lib.proarc.common.export.ExportException",
"cz.cas.lib.proarc.common.export.mets.MetsExportException",
"cz.cas.lib.proarc.common.fedora.RemoteStorage",
"cz.cas.lib.proarc.common.object.model.MetaModelRepository",
"cz.cas.lib.proarc.webapp.shared.rest.E... | import cz.cas.lib.proarc.common.export.DesaExport; import cz.cas.lib.proarc.common.export.ExportException; import cz.cas.lib.proarc.common.export.mets.MetsExportException; import cz.cas.lib.proarc.common.fedora.RemoteStorage; import cz.cas.lib.proarc.common.object.model.MetaModelRepository; import cz.cas.lib.proarc.web... | import cz.cas.lib.proarc.common.export.*; import cz.cas.lib.proarc.common.export.mets.*; import cz.cas.lib.proarc.common.fedora.*; import cz.cas.lib.proarc.common.object.model.*; import cz.cas.lib.proarc.webapp.shared.rest.*; import java.io.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"cz.cas.lib",
"java.io",
"java.util",
"javax.ws"
] | cz.cas.lib; java.io; java.util; javax.ws; | 2,115,115 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
root = new javax.swing.JPanel();
panelTitolo = new javax.swing.JPanel();
containerTitle = new javax.swing.JPanel();
titolo... | @SuppressWarnings(STR) void function() { root = new javax.swing.JPanel(); panelTitolo = new javax.swing.JPanel(); containerTitle = new javax.swing.JPanel(); titolo = new javax.swing.JLabel(); panelUser = new javax.swing.JPanel(); sectionUsername = new javax.swing.JPanel(); sectionRequest = new javax.swing.JPanel(); set... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "mattia98tr/indixis",
"path": "src/server/AddFriend.java",
"license": "gpl-3.0",
"size": 13513
} | [
"java.awt.Dimension",
"java.awt.FlowLayout",
"java.awt.Font",
"java.util.ArrayList",
"javax.swing.JLabel",
"javax.swing.JScrollPane"
] | import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.util.ArrayList; import javax.swing.JLabel; import javax.swing.JScrollPane; | import java.awt.*; import java.util.*; import javax.swing.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 2,790,553 |
public static BugAnnotation fromMethodDescriptor(MethodDescriptor methodDescriptor) {
return fromForeignMethod(
methodDescriptor.getSlashedClassName(),
methodDescriptor.getName(),
methodDescriptor.getSignature(),
methodDescriptor.isStatic());
}
| static BugAnnotation function(MethodDescriptor methodDescriptor) { return fromForeignMethod( methodDescriptor.getSlashedClassName(), methodDescriptor.getName(), methodDescriptor.getSignature(), methodDescriptor.isStatic()); } | /**
* Create a MethodAnnotation from a MethodDescriptor.
*
* @param methodDescriptor the MethodDescriptor
* @return the MethodAnnotation
*/ | Create a MethodAnnotation from a MethodDescriptor | fromMethodDescriptor | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java/edu/umd/cs/findbugs/MethodAnnotation.java",
"license": "lgpl-2.1",
"size": 16781
} | [
"edu.umd.cs.findbugs.classfile.MethodDescriptor"
] | import edu.umd.cs.findbugs.classfile.MethodDescriptor; | import edu.umd.cs.findbugs.classfile.*; | [
"edu.umd.cs"
] | edu.umd.cs; | 2,127,423 |
public void setReleaseTagsAfterEnd(String configValue) {
OpenCms.getSystemInfo().getServletContainerSettings().setReleaseTagsAfterEnd(
Boolean.valueOf(configValue).booleanValue());
} | void function(String configValue) { OpenCms.getSystemInfo().getServletContainerSettings().setReleaseTagsAfterEnd( Boolean.valueOf(configValue).booleanValue()); } | /**
* Sets the servlet container specific setting.<p>
*
* @param configValue the configuration value
*/ | Sets the servlet container specific setting | setReleaseTagsAfterEnd | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/configuration/CmsSystemConfiguration.java",
"license": "lgpl-2.1",
"size": 113574
} | [
"org.opencms.main.OpenCms"
] | import org.opencms.main.OpenCms; | import org.opencms.main.*; | [
"org.opencms.main"
] | org.opencms.main; | 2,045,803 |
public void setIconFromPixbuf(EntryIconPosition position, Pixbuf pixbuf) {
GtkEntry.setIconFromPixbuf(this, position, pixbuf);
}
/**
* Set the icon to a given <code>position</code> using a {@link Stock} | void function(EntryIconPosition position, Pixbuf pixbuf) { GtkEntry.setIconFromPixbuf(this, position, pixbuf); } /** * Set the icon to a given <code>position</code> using a {@link Stock} | /**
* Set the icon to a given <code>position</code> using a {@link Pixbuf}.
* If <code>pixbuf</code> is <code>null</code>, no icon will be shown.
*
* @since 4.0.13
*/ | Set the icon to a given <code>position</code> using a <code>Pixbuf</code>. If <code>pixbuf</code> is <code>null</code>, no icon will be shown | setIconFromPixbuf | {
"repo_name": "severinh/java-gnome",
"path": "src/bindings/org/gnome/gtk/Entry.java",
"license": "gpl-2.0",
"size": 21241
} | [
"org.gnome.gdk.Pixbuf"
] | import org.gnome.gdk.Pixbuf; | import org.gnome.gdk.*; | [
"org.gnome.gdk"
] | org.gnome.gdk; | 1,841,108 |
@Test
public void testDecommissionStatus() throws IOException, InterruptedException {
InetSocketAddress addr = new InetSocketAddress("localhost", cluster
.getNameNodePort());
DFSClient client = new DFSClient(addr, conf);
DatanodeInfo[] info = client.datanodeReport(DatanodeReportType.LIVE);
a... | void function() throws IOException, InterruptedException { InetSocketAddress addr = new InetSocketAddress(STR, cluster .getNameNodePort()); DFSClient client = new DFSClient(addr, conf); DatanodeInfo[] info = client.datanodeReport(DatanodeReportType.LIVE); assertEquals(STR, 2, info.length); FileSystem fileSys = cluster.... | /**
* Tests Decommissioning Status in DFS.
*/ | Tests Decommissioning Status in DFS | testDecommissionStatus | {
"repo_name": "nvoron23/hadoop-20",
"path": "src/test/org/apache/hadoop/hdfs/server/namenode/TestDecommissioningStatus.java",
"license": "apache-2.0",
"size": 8423
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.util.ArrayList",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSClient",
"org.apache.hadoop.hdfs.protocol.DatanodeInfo",
"org.apache.hadoop.hdfs.protocol.... | import java.io.IOException; import java.net.InetSocketAddress; import java.util.ArrayList; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSClient; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.ap... | import java.io.*; import java.net.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.net; java.util; org.apache.hadoop; org.junit; | 2,549,574 |
@Override
public void operationSetLowerBound(QueryExecutionContext context,
IndexScanOperation op, boolean lastColumn) {
property.operationSetBounds(lower.getParameterValue(context),
IndexScanOperation.BoundType.BoundLE, op);
} | void function(QueryExecutionContext context, IndexScanOperation op, boolean lastColumn) { property.operationSetBounds(lower.getParameterValue(context), IndexScanOperation.BoundType.BoundLE, op); } | /** Set the lower bound for the operation.
* Delegate to the property to actually call the setBounds
* for the lower bound.
* @param context the query context that contains the parameter values
* @param op the index scan operation on which to set bounds
*/ | Set the lower bound for the operation. Delegate to the property to actually call the setBounds for the lower bound | operationSetLowerBound | {
"repo_name": "pdutta777/mysql56",
"path": "storage/ndb/clusterj/clusterj-core/src/main/java/com/mysql/clusterj/core/query/BetweenPredicateImpl.java",
"license": "gpl-2.0",
"size": 5417
} | [
"com.mysql.clusterj.core.spi.QueryExecutionContext",
"com.mysql.clusterj.core.store.IndexScanOperation"
] | import com.mysql.clusterj.core.spi.QueryExecutionContext; import com.mysql.clusterj.core.store.IndexScanOperation; | import com.mysql.clusterj.core.spi.*; import com.mysql.clusterj.core.store.*; | [
"com.mysql.clusterj"
] | com.mysql.clusterj; | 338,107 |
public synchronized void start(Xid xid, int flag) throws XAException {
if (flag == XAResource.TMNOFLAGS) {
// first time in this transaction
// make sure we aren't already in another tx
if (this.xid != null) {
throw new XAExc... | synchronized void function(Xid xid, int flag) throws XAException { if (flag == XAResource.TMNOFLAGS) { if (this.xid != null) { throw new XAException(STR + xid); } try { originalAutoCommit = connection.getAutoCommit(); } catch (SQLException ignored) { originalAutoCommit = true; } try { connection.setAutoCommit(false); }... | /**
* Signals that a the connection has been enrolled in a transaction. This method saves off the
* current auto commit flag, and then disables auto commit. The original auto commit setting is
* restored when the transaction completes.
*
* @param xid the id of the tr... | Signals that a the connection has been enrolled in a transaction. This method saves off the current auto commit flag, and then disables auto commit. The original auto commit setting is restored when the transaction completes | start | {
"repo_name": "optivo-org/commons-dbcp",
"path": "src/java/org/apache/commons/dbcp/managed/LocalXAConnectionFactory.java",
"license": "apache-2.0",
"size": 12986
} | [
"java.sql.SQLException",
"javax.transaction.xa.XAException",
"javax.transaction.xa.XAResource",
"javax.transaction.xa.Xid"
] | import java.sql.SQLException; import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; | import java.sql.*; import javax.transaction.xa.*; | [
"java.sql",
"javax.transaction"
] | java.sql; javax.transaction; | 1,988,152 |
public Object singleLineText(FormObject formObject); | Object function(FormObject formObject); | /**
* setup and return a single line Text component, from the specified formObject
* @see FormObject
*/ | setup and return a single line Text component, from the specified formObject | singleLineText | {
"repo_name": "srnsw/xena",
"path": "plugins/pdf/ext/src/jpedal_lgpl-3.83b38/src/org/jpedal/objects/acroforms/creation/FormFactory.java",
"license": "gpl-3.0",
"size": 4576
} | [
"org.jpedal.objects.raw.FormObject"
] | import org.jpedal.objects.raw.FormObject; | import org.jpedal.objects.raw.*; | [
"org.jpedal.objects"
] | org.jpedal.objects; | 2,752,577 |
public com.mozu.api.contracts.mzdb.EntityList getEntityList(String entityListFullName, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.mzdb.EntityList> client = com.mozu.api.clients.platform.EntityListClient.getEntityListClient( entityListFullName, responseFields);
client.setContext... | com.mozu.api.contracts.mzdb.EntityList function(String entityListFullName, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.mzdb.EntityList> client = com.mozu.api.clients.platform.EntityListClient.getEntityListClient( entityListFullName, responseFields); client.setContext(_apiContext); client... | /**
* Get an existing EntityList definition for a specific tenant
* <p><pre><code>
* EntityList entitylist = new EntityList();
* EntityList entityList = entitylist.getEntityList( entityListFullName, responseFields);
* </code></pre></p>
* @param entityListFullName The full name of the EntityList including n... | Get an existing EntityList definition for a specific tenant <code><code> EntityList entitylist = new EntityList(); EntityList entityList = entitylist.getEntityList( entityListFullName, responseFields); </code></code> | getEntityList | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/EntityListResource.java",
"license": "mit",
"size": 20283
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,265,639 |
public void initWorkerNum(WorkerAgentProtocol workerAgent) {
this.workerMangerNum = workerAgent.getNumberWorkers(this.getJobId(),
this.getSid());
displayFirstRoute();
} | void function(WorkerAgentProtocol workerAgent) { this.workerMangerNum = workerAgent.getNumberWorkers(this.getJobId(), this.getSid()); displayFirstRoute(); } | /**
* Initialize the number of workers of the same job.
*
* @param hostName
*/ | Initialize the number of workers of the same job | initWorkerNum | {
"repo_name": "LiuJianan/Graduate-Graph",
"path": "src/java/com/chinamobile/bcbsp/bspstaff/BSPStaff.java",
"license": "apache-2.0",
"size": 138171
} | [
"com.chinamobile.bcbsp.workermanager.WorkerAgentProtocol"
] | import com.chinamobile.bcbsp.workermanager.WorkerAgentProtocol; | import com.chinamobile.bcbsp.workermanager.*; | [
"com.chinamobile.bcbsp"
] | com.chinamobile.bcbsp; | 1,144,006 |
public static QDataSet unbundle( QDataSet ds, int i ) {
return DataSetOps.unbundle(ds, i);
} | static QDataSet function( QDataSet ds, int i ) { return DataSetOps.unbundle(ds, i); } | /**
* Extract a bundled dataset from a bundle of datasets. The input should
* be a rank 2 dataset with the property BUNDLE_1 set to a bundle descriptor
* dataset. See BundleDataSet for more semantics. Note we support the case
* where DEPEND_1 has EnumerationUnits, and this is the same as slice1.
... | Extract a bundled dataset from a bundle of datasets. The input should be a rank 2 dataset with the property BUNDLE_1 set to a bundle descriptor dataset. See BundleDataSet for more semantics. Note we support the case where DEPEND_1 has EnumerationUnits, and this is the same as slice1 | unbundle | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.DataSetOps",
"org.das2.qds.QDataSet"
] | import org.das2.qds.DataSetOps; import org.das2.qds.QDataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 525,087 |
final void convertAndProcess(
Package.Builder pkgBuilder, Location location, Object value)
throws EvalException {
T typedValue = type.convert(value, "'package' argument", pkgBuilder.getBuildFileLabel());
process(pkgBuilder, location, typedValue);
}
/**
* Processes an argument.
*
* @p... | final void convertAndProcess( Package.Builder pkgBuilder, Location location, Object value) throws EvalException { T typedValue = type.convert(value, STR, pkgBuilder.getBuildFileLabel()); process(pkgBuilder, location, typedValue); } /** * Processes an argument. * * @param pkgBuilder the package builder to be mutated * @... | /**
* Converts an untyped argument to a typed one, then calls the user-provided {@link #process}.
*
* Note that the location is used not just for exceptions (for which null would do), but also for
* reporting events.
*/ | Converts an untyped argument to a typed one, then calls the user-provided <code>#process</code>. Note that the location is used not just for exceptions (for which null would do), but also for reporting events | convertAndProcess | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/PackageArgument.java",
"license": "apache-2.0",
"size": 1979
} | [
"net.starlark.java.eval.EvalException",
"net.starlark.java.syntax.Location"
] | import net.starlark.java.eval.EvalException; import net.starlark.java.syntax.Location; | import net.starlark.java.eval.*; import net.starlark.java.syntax.*; | [
"net.starlark.java"
] | net.starlark.java; | 1,132,020 |
public IDataBinding createDataBinding( )
{
ComputedColumn c = new ComputedColumn( );
IDataBinding binding = new DataBindingImpl( c );
return binding;
} | IDataBinding function( ) { ComputedColumn c = new ComputedColumn( ); IDataBinding binding = new DataBindingImpl( c ); return binding; } | /**
* Create <code>IDataBinding</code>
*
* @return instance
*/ | Create <code>IDataBinding</code> | createDataBinding | {
"repo_name": "Charling-Huang/birt",
"path": "engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/element/ScriptAPIBaseFactory.java",
"license": "epl-1.0",
"size": 2723
} | [
"org.eclipse.birt.report.engine.api.script.element.IDataBinding",
"org.eclipse.birt.report.model.api.elements.structures.ComputedColumn"
] | import org.eclipse.birt.report.engine.api.script.element.IDataBinding; import org.eclipse.birt.report.model.api.elements.structures.ComputedColumn; | import org.eclipse.birt.report.engine.api.script.element.*; import org.eclipse.birt.report.model.api.elements.structures.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,147,065 |
@Override
public ObjectSpecification valueSpec() {
final Class<?> valueType = value();
return valueType != null ? getSpecificationLoader().loadSpecification(valueType) : null;
} | ObjectSpecification function() { final Class<?> valueType = value(); return valueType != null ? getSpecificationLoader().loadSpecification(valueType) : null; } | /**
* The {@link ObjectSpecification} of the {@link #value()}.
*/ | The <code>ObjectSpecification</code> of the <code>#value()</code> | valueSpec | {
"repo_name": "niv0/isis",
"path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/SingleClassValueFacetAbstract.java",
"license": "apache-2.0",
"size": 2230
} | [
"org.apache.isis.core.metamodel.spec.ObjectSpecification"
] | import org.apache.isis.core.metamodel.spec.ObjectSpecification; | import org.apache.isis.core.metamodel.spec.*; | [
"org.apache.isis"
] | org.apache.isis; | 2,041,566 |
@CheckForNull
MetricsAccessKey getAccessKey(String accessKey);
}
@Extension
public static class DescriptorImpl extends Descriptor<MetricsAccessKey> {
private static final SecureRandom entropy = new SecureRandom();
private static final char[] keyChars =
"ABCE... | MetricsAccessKey getAccessKey(String accessKey); } public static class DescriptorImpl extends Descriptor<MetricsAccessKey> { private static final SecureRandom entropy = new SecureRandom(); private static final char[] keyChars = STR.toCharArray(); private static boolean keyConverted = false; @GuardedBy("this") private L... | /**
* Returns the definition of the specific access key. Note that all entries in {@link #getAccessKeys()} must
* be returned by this method, but it may also return additional entries.
*
* @param accessKey the access key to retrieve.
* @return the access key.
*/ | Returns the definition of the specific access key. Note that all entries in <code>#getAccessKeys()</code> must be returned by this method, but it may also return additional entries | getAccessKey | {
"repo_name": "jenkinsci/metrics-plugin",
"path": "src/main/java/jenkins/metrics/api/MetricsAccessKey.java",
"license": "mit",
"size": 25130
} | [
"hudson.model.Descriptor",
"java.security.SecureRandom",
"java.util.List",
"java.util.Set",
"java.util.logging.Logger",
"net.jcip.annotations.GuardedBy"
] | import hudson.model.Descriptor; import java.security.SecureRandom; import java.util.List; import java.util.Set; import java.util.logging.Logger; import net.jcip.annotations.GuardedBy; | import hudson.model.*; import java.security.*; import java.util.*; import java.util.logging.*; import net.jcip.annotations.*; | [
"hudson.model",
"java.security",
"java.util",
"net.jcip.annotations"
] | hudson.model; java.security; java.util; net.jcip.annotations; | 2,846,682 |
public String getConfirmMessage()
{
String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(),
getConfirmMessageId());
Node node = this.browseBean.getActionSpace();
if (node != null)
{
return MessageFormat.format(fileConfirmMsg, new Ob... | String function() { String fileConfirmMsg = Application.getMessage(FacesContext.getCurrentInstance(), getConfirmMessageId()); Node node = this.browseBean.getActionSpace(); if (node != null) { return MessageFormat.format(fileConfirmMsg, new Object[] {node.getName()}); } else { return Application.getMessage(FacesContext.... | /**
* Returns the confirmation to display to the user before deleting the content.
*
* @return The formatted message to display
*/ | Returns the confirmation to display to the user before deleting the content | getConfirmMessage | {
"repo_name": "Tybion/community-edition",
"path": "projects/web-client/source/java/org/alfresco/web/bean/spaces/DeleteSpaceDialog.java",
"license": "lgpl-3.0",
"size": 11191
} | [
"java.text.MessageFormat",
"javax.faces.context.FacesContext",
"org.alfresco.web.app.Application",
"org.alfresco.web.bean.repository.Node"
] | import java.text.MessageFormat; import javax.faces.context.FacesContext; import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; | import java.text.*; import javax.faces.context.*; import org.alfresco.web.app.*; import org.alfresco.web.bean.repository.*; | [
"java.text",
"javax.faces",
"org.alfresco.web"
] | java.text; javax.faces; org.alfresco.web; | 263,359 |
public List<FrdParameterRule19> findByFrdParameterRule19Like(FrdParameterRule19 frdParameterRule19,
JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults);
| List<FrdParameterRule19> function(FrdParameterRule19 frdParameterRule19, JPQLAdvancedQueryCriteria criteria, int firstResult, int maxResults); | /**
* findByFrdParameterRule19Like - finds a list of FrdParameterRule19 Like
*
* @param frdParameterRule19
* @return the list of FrdParameterRule19 found
*/ | findByFrdParameterRule19Like - finds a list of FrdParameterRule19 Like | findByFrdParameterRule19Like | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdParameterRule19SessionEJBRemote.java",
"license": "apache-2.0",
"size": 2780
} | [
"com.djarum.raf.utilities.JPQLAdvancedQueryCriteria",
"com.gdn.venice.persistence.FrdParameterRule19",
"java.util.List"
] | import com.djarum.raf.utilities.JPQLAdvancedQueryCriteria; import com.gdn.venice.persistence.FrdParameterRule19; import java.util.List; | import com.djarum.raf.utilities.*; import com.gdn.venice.persistence.*; import java.util.*; | [
"com.djarum.raf",
"com.gdn.venice",
"java.util"
] | com.djarum.raf; com.gdn.venice; java.util; | 1,984,138 |
public List<FilterColumn> getColumns() {
return columns;
} | List<FilterColumn> function() { return columns; } | /**
* Get the list of {@link FilterColumn} displayed by this {@link Filter}.
*
* @return this columns
*/ | Get the list of <code>FilterColumn</code> displayed by this <code>Filter</code> | getColumns | {
"repo_name": "jblievremont/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/web/Filter.java",
"license": "lgpl-3.0",
"size": 4514
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,055,170 |
public void waitTheNth(int n) {
PAFuture.waitFor(this.memberList.get(n));
} | void function(int n) { PAFuture.waitFor(this.memberList.get(n)); } | /**
* Waits for the member at the specified rank is arrived.
*
* @param n
* - the rank of the awaited member.
*/ | Waits for the member at the specified rank is arrived | waitTheNth | {
"repo_name": "lpellegr/programming",
"path": "programming-core/src/main/java/org/objectweb/proactive/core/group/ProxyForGroup.java",
"license": "agpl-3.0",
"size": 55367
} | [
"org.objectweb.proactive.api.PAFuture"
] | import org.objectweb.proactive.api.PAFuture; | import org.objectweb.proactive.api.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 2,622,703 |
@Nullable
public ValidationResult getValidationResult() {
return ValidationResultImpl.create(this);
} | ValidationResult function() { return ValidationResultImpl.create(this); } | /**
* Tries to validate file.
*
* @return file validation info or null if file is junk or list of commands is unknown (see {@link #setCommands(List)})
*/ | Tries to validate file | getValidationResult | {
"repo_name": "allotria/intellij-community",
"path": "python/src/com/jetbrains/commandInterface/commandLine/psi/CommandLineFile.java",
"license": "apache-2.0",
"size": 3942
} | [
"com.jetbrains.commandInterface.commandLine.ValidationResult"
] | import com.jetbrains.commandInterface.commandLine.ValidationResult; | import com.jetbrains.*; | [
"com.jetbrains"
] | com.jetbrains; | 2,195,686 |
public void link(Map<String, Object> model) throws Exception {
// Iterate class by class
for (String link : annotatedLinkFields.keySet()) {
List<Field> linkFields = annotatedLinkFields.get(link);
// Iterate through Link fields list
for (Field field : linkFields)... | void function(Map<String, Object> model) throws Exception { for (String link : annotatedLinkFields.keySet()) { List<Field> linkFields = annotatedLinkFields.get(link); for (Field field : linkFields) { field.setAccessible(true); String toClassName = field.getType().getName(); Object to = model.get(toClassName); org.apach... | /**
* Link objects together
*/ | Link objects together | link | {
"repo_name": "Fabryprog/camel",
"path": "components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java",
"license": "apache-2.0",
"size": 9242
} | [
"java.lang.reflect.Field",
"java.util.List",
"java.util.Map",
"org.apache.camel.support.ObjectHelper"
] | import java.lang.reflect.Field; import java.util.List; import java.util.Map; import org.apache.camel.support.ObjectHelper; | import java.lang.reflect.*; import java.util.*; import org.apache.camel.support.*; | [
"java.lang",
"java.util",
"org.apache.camel"
] | java.lang; java.util; org.apache.camel; | 986,909 |
public static long getNextGenerationId() {
return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(),
m_generationId.incrementAndGet(),
MpInitiator.MP_INIT_PID);
} | static long function() { return UniqueIdGenerator.makeIdFromComponents(System.currentTimeMillis(), m_generationId.incrementAndGet(), MpInitiator.MP_INIT_PID); } | /**
* Get a unique id for the next generation for export.
* @return next generation id (a unique long value)
*/ | Get a unique id for the next generation for export | getNextGenerationId | {
"repo_name": "deerwalk/voltdb",
"path": "src/frontend/org/voltdb/sysprocs/UpdateApplicationBase.java",
"license": "agpl-3.0",
"size": 27437
} | [
"org.voltdb.iv2.MpInitiator",
"org.voltdb.iv2.UniqueIdGenerator"
] | import org.voltdb.iv2.MpInitiator; import org.voltdb.iv2.UniqueIdGenerator; | import org.voltdb.iv2.*; | [
"org.voltdb.iv2"
] | org.voltdb.iv2; | 1,999,064 |
private long getTimeout(final Ticket t) {
if (t instanceof TicketGrantingTicket) {
return this.ticketGrantingTicketTimeoutInSeconds;
}
if (t instanceof ServiceTicket) {
return this.serviceTicketTimeoutInSeconds;
}
throw new IllegalArgumentException(
... | long function(final Ticket t) { if (t instanceof TicketGrantingTicket) { return this.ticketGrantingTicketTimeoutInSeconds; } if (t instanceof ServiceTicket) { return this.serviceTicketTimeoutInSeconds; } throw new IllegalArgumentException( String.format(STR, t.getClass().getName())); } | /**
* A method to get the starting TTL for a ticket based upon type.
*
* @param t Ticket to get starting TTL for
* @return Initial TTL for ticket
*/ | A method to get the starting TTL for a ticket based upon type | getTimeout | {
"repo_name": "moghaddam/cas",
"path": "cas-server-integration-hazelcast/src/main/java/org/jasig/cas/ticket/registry/HazelcastTicketRegistry.java",
"license": "apache-2.0",
"size": 6439
} | [
"org.jasig.cas.ticket.ServiceTicket",
"org.jasig.cas.ticket.Ticket",
"org.jasig.cas.ticket.TicketGrantingTicket"
] | import org.jasig.cas.ticket.ServiceTicket; import org.jasig.cas.ticket.Ticket; import org.jasig.cas.ticket.TicketGrantingTicket; | import org.jasig.cas.ticket.*; | [
"org.jasig.cas"
] | org.jasig.cas; | 1,976,604 |
public Bound from(String tableSpec) {
return from(StaticValueProvider.of(tableSpec));
} | Bound function(String tableSpec) { return from(StaticValueProvider.of(tableSpec)); } | /**
* Returns a copy of this transform that reads from the specified table. Refer to
* {@link #parseTableSpec(String)} for the specification format.
*
* <p>Does not modify this object.
*/ | Returns a copy of this transform that reads from the specified table. Refer to <code>#parseTableSpec(String)</code> for the specification format. Does not modify this object | from | {
"repo_name": "sammcveety/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/io/BigQueryIO.java",
"license": "apache-2.0",
"size": 118912
} | [
"com.google.cloud.dataflow.sdk.options.ValueProvider"
] | import com.google.cloud.dataflow.sdk.options.ValueProvider; | import com.google.cloud.dataflow.sdk.options.*; | [
"com.google.cloud"
] | com.google.cloud; | 908,883 |
Optional<JobKey> getJobKey(long id); | Optional<JobKey> getJobKey(long id); | /**
* Gets the job key for a job id
*/ | Gets the job key for a job id | getJobKey | {
"repo_name": "flesire/ontrack",
"path": "ontrack-job/src/main/java/net/nemerosa/ontrack/job/JobScheduler.java",
"license": "mit",
"size": 3280
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,310,441 |
private static ModulePatcher initModulePatcher() {
Map<String, List<String>> map = decode("jdk.module.patch.",
File.pathSeparator,
false);
return new ModulePatcher(map);
} | static ModulePatcher function() { Map<String, List<String>> map = decode(STR, File.pathSeparator, false); return new ModulePatcher(map); } | /**
* Initialize the module patcher for the initial configuration passed on the
* value of the --patch-module options.
*/ | Initialize the module patcher for the initial configuration passed on the value of the --patch-module options | initModulePatcher | {
"repo_name": "md-5/jdk10",
"path": "src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java",
"license": "gpl-2.0",
"size": 41334
} | [
"java.io.File",
"java.util.List",
"java.util.Map"
] | import java.io.File; import java.util.List; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,689,994 |
protected void notifyLoggingOut() {
// copy listeners to array to avoid ConcurrentModificationException
List<SessionListener> copy =
new ArrayList<SessionListener>(listeners.values());
for (SessionListener listener : copy) {
if (listener != null) {
lis... | void function() { List<SessionListener> copy = new ArrayList<SessionListener>(listeners.values()); for (SessionListener listener : copy) { if (listener != null) { listener.loggingOut(this); } } } | /**
* Notify the listeners that this session is about to be closed.
*/ | Notify the listeners that this session is about to be closed | notifyLoggingOut | {
"repo_name": "Kast0rTr0y/jackrabbit",
"path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java",
"license": "apache-2.0",
"size": 47987
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 241,608 |
@Nullable public static SchemaOperationException wrapIfNeeded(@Nullable Exception e) {
if (e == null)
return null;
if (e instanceof SchemaOperationException)
return (SchemaOperationException)e;
return new SchemaOperationException("Unexpected exception.", e);
} | @Nullable static SchemaOperationException function(@Nullable Exception e) { if (e == null) return null; if (e instanceof SchemaOperationException) return (SchemaOperationException)e; return new SchemaOperationException(STR, e); } | /**
* Wrap schema exception if needed.
*
* @param e Original exception.
* @return Schema exception.
*/ | Wrap schema exception if needed | wrapIfNeeded | {
"repo_name": "mcherkasov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java",
"license": "apache-2.0",
"size": 33066
} | [
"org.apache.ignite.internal.processors.query.schema.SchemaOperationException",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.internal.processors.query.schema.SchemaOperationException; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.internal.processors.query.schema.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 1,995,052 |
@DataProvider (name = DATA_SET_FOR_DEFAULT_CONFIG)
public Object[][] dataSetForDefaultConfiguration() throws IOException {
return new Object[][] {
{ "/mock/get", defaultGetResponse("get-3-for-ConfigurationManagerTest.json") },
{ "/mock/*/get", defaultGetResponse("get-3-fo... | @DataProvider (name = DATA_SET_FOR_DEFAULT_CONFIG) Object[][] function() throws IOException { return new Object[][] { { STR, defaultGetResponse(STR) }, { STR, defaultGetResponse(STR) }, { STR, defaultGetResponse(STR) }, { STR, defaultGetResponse(STR) }, { STR, defaultGetResponse(STR) }, { STR, defaultGetResponse(STR) }... | /**
* Auxiliary method to declare a data set to support testing of a configuration. An entry is specified
* with two elements, each meaning:
*
* [0] : The HTTP uri
* [1] : The expected message
*
* @return
* The data set.
*/ | Auxiliary method to declare a data set to support testing of a configuration. An entry is specified with two elements, each meaning: [0] : The HTTP uri [1] : The expected message | dataSetForDefaultConfiguration | {
"repo_name": "Technolords/microservice-mock",
"path": "src/test/java/net/technolords/micro/config/ConfigurationManagerTest.java",
"license": "mit",
"size": 10052
} | [
"java.io.IOException",
"org.testng.annotations.DataProvider"
] | import java.io.IOException; import org.testng.annotations.DataProvider; | import java.io.*; import org.testng.annotations.*; | [
"java.io",
"org.testng.annotations"
] | java.io; org.testng.annotations; | 2,747,869 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.