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
static public void persist(Item item, String serviceName) { PersistenceService service = services.get(serviceName); if (service != null) { service.store(item); } else { logger.warn("There is no persistence service registered with the name '{}'", serviceName); } }
static void function(Item item, String serviceName) { PersistenceService service = services.get(serviceName); if (service != null) { service.store(item); } else { logger.warn(STR, serviceName); } }
/** * Persists the state of a given <code>item</code> through a {@link PersistenceService} identified * by the <code>serviceName</code>. * * @param item the item to store * @param serviceName the name of the {@link PersistenceService} to use */
Persists the state of a given <code>item</code> through a <code>PersistenceService</code> identified by the <code>serviceName</code>
persist
{ "repo_name": "ANierbeck/bcanhome-openhab", "path": "bundles/core/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/extensions/PersistenceExtensions.java", "license": "gpl-3.0", "size": 16034 }
[ "org.openhab.core.items.Item", "org.openhab.core.persistence.PersistenceService" ]
import org.openhab.core.items.Item; import org.openhab.core.persistence.PersistenceService;
import org.openhab.core.items.*; import org.openhab.core.persistence.*;
[ "org.openhab.core" ]
org.openhab.core;
1,054,501
@DELETE @Path("{id}") @Produces(MediaType.APPLICATION_JSON) public Response removeDevice(@PathParam("id") String id) { Device device = nullIsNotFound(get(DeviceService.class).getDevice(deviceId(id)), DEVICE_NOT_FOUND); get(DeviceAdminService.class)....
@Path("{id}") @Produces(MediaType.APPLICATION_JSON) Response function(@PathParam("id") String id) { Device device = nullIsNotFound(get(DeviceService.class).getDevice(deviceId(id)), DEVICE_NOT_FOUND); get(DeviceAdminService.class).removeDevice(deviceId(id)); return ok(codec(Device.class).encode(device, this)).build(); }
/** * Removes infrastructure device. * Administratively deletes the specified device from the inventory of * known devices. * * @param id device identifier * @return 200 OK with the removed device */
Removes infrastructure device. Administratively deletes the specified device from the inventory of known devices
removeDevice
{ "repo_name": "donNewtonAlpha/onos", "path": "web/api/src/main/java/org/onosproject/rest/resources/DevicesWebResource.java", "license": "apache-2.0", "size": 4088 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.onlab.util.Tools", "org.onosproject.net.Device", "org.onosproject.net.device.DeviceAdminService", "org.onosproject.net.device.DeviceService" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onlab.util.Tools; import org.onosproject.net.Device; import org.onosproject.net.device.DeviceAdminService; import org.onosproject.net.device.DeviceService;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onlab.util.*; import org.onosproject.net.*; import org.onosproject.net.device.*;
[ "javax.ws", "org.onlab.util", "org.onosproject.net" ]
javax.ws; org.onlab.util; org.onosproject.net;
1,914,233
public static String getBodyText(File file) throws Exception { HTMLParser parser = HTMLParserFactory.newInstance(file); parser.parse(file); Reader reader = parser.getReader(); Writer writer = new StringWriter(); int c; while ((c = reader.read()) != -1) ...
static String function(File file) throws Exception { HTMLParser parser = HTMLParserFactory.newInstance(file); parser.parse(file); Reader reader = parser.getReader(); Writer writer = new StringWriter(); int c; while ((c = reader.read()) != -1) writer.write(c); String content = writer.toString(); reader.close(); writer.c...
/** * DOCUMENT ME! * * @param file DOCUMENT ME! * * @return DOCUMENT ME! * * @throws Exception DOCUMENT ME! */
DOCUMENT ME
getBodyText
{ "repo_name": "apache/lenya", "path": "src/java/org/apache/lenya/lucene/index/ConfigurableDocumentCreator.java", "license": "apache-2.0", "size": 8367 }
[ "java.io.File", "java.io.Reader", "java.io.StringWriter", "java.io.Writer", "org.apache.lenya.lucene.parser.HTMLParser", "org.apache.lenya.lucene.parser.HTMLParserFactory", "org.apache.lenya.lucene.parser.StringCleaner" ]
import java.io.File; import java.io.Reader; import java.io.StringWriter; import java.io.Writer; import org.apache.lenya.lucene.parser.HTMLParser; import org.apache.lenya.lucene.parser.HTMLParserFactory; import org.apache.lenya.lucene.parser.StringCleaner;
import java.io.*; import org.apache.lenya.lucene.parser.*;
[ "java.io", "org.apache.lenya" ]
java.io; org.apache.lenya;
1,196,501
public static IQ error(IQ iq, String errorMessage) { return XMPPUtils.createErrorResponse(iq, errorMessage, Condition.bad_request, Type.modify); }
static IQ function(IQ iq, String errorMessage) { return XMPPUtils.createErrorResponse(iq, errorMessage, Condition.bad_request, Type.modify); }
/** * Logs the error and returns an IQ error response * * @param iq * @param errorMessage * @param logger * @return */
Logs the error and returns an IQ error response
error
{ "repo_name": "abmargb/jamppa", "path": "src/main/java/org/jamppa/component/utils/XMPPUtils.java", "license": "apache-2.0", "size": 2972 }
[ "org.xmpp.packet.PacketError" ]
import org.xmpp.packet.PacketError;
import org.xmpp.packet.*;
[ "org.xmpp.packet" ]
org.xmpp.packet;
1,692,184
public void triangulate( PolygonSet ps ) { _triangulations.clear(); _triangulations.addAll( ps.getPolygons() ); start(); }
void function( PolygonSet ps ) { _triangulations.clear(); _triangulations.addAll( ps.getPolygons() ); start(); }
/** * Triangulate a PolygonSet * * @param ps */
Triangulate a PolygonSet
triangulate
{ "repo_name": "lyrachord/FX3DAndroid", "path": "src/main/java/org/poly2tri/triangulation/TriangulationProcess.java", "license": "gpl-3.0", "size": 9667 }
[ "org.poly2tri.geometry.polygon.PolygonSet" ]
import org.poly2tri.geometry.polygon.PolygonSet;
import org.poly2tri.geometry.polygon.*;
[ "org.poly2tri.geometry" ]
org.poly2tri.geometry;
753,120
public void setLastAuthor(final String lastAuthor) { set1stProperty(PropertyIDMap.PID_LASTAUTHOR, lastAuthor); }
void function(final String lastAuthor) { set1stProperty(PropertyIDMap.PID_LASTAUTHOR, lastAuthor); }
/** * Sets the last author. * * @param lastAuthor The last author to set. */
Sets the last author
setLastAuthor
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/java/org/apache/poi/hpsf/SummaryInformation.java", "license": "apache-2.0", "size": 15266 }
[ "org.apache.poi.hpsf.wellknown.PropertyIDMap" ]
import org.apache.poi.hpsf.wellknown.PropertyIDMap;
import org.apache.poi.hpsf.wellknown.*;
[ "org.apache.poi" ]
org.apache.poi;
1,365,710
@InterfaceAudience.Public public View getExistingView(String name) { View view = views != null ? views.get(name) : null; if (view != null) return view; try { return registerView(new View(this, name, false)); } catch (CouchbaseLiteException e) { ...
@InterfaceAudience.Public View function(String name) { View view = views != null ? views.get(name) : null; if (view != null) return view; try { return registerView(new View(this, name, false)); } catch (CouchbaseLiteException e) { return null; } }
/** * Returns the existing View with the given name, or nil if none. */
Returns the existing View with the given name, or nil if none
getExistingView
{ "repo_name": "Spotme/couchbase-lite-java-core", "path": "src/main/java/com/couchbase/lite/Database.java", "license": "apache-2.0", "size": 87852 }
[ "com.couchbase.lite.internal.InterfaceAudience" ]
import com.couchbase.lite.internal.InterfaceAudience;
import com.couchbase.lite.internal.*;
[ "com.couchbase.lite" ]
com.couchbase.lite;
2,172,190
void renderProjectList(List<Project> projectList);
void renderProjectList(List<Project> projectList);
/** * Render user's project data in the UI. * * @param projectList * The listof {@link Project} that will be shown. */
Render user's project data in the UI
renderProjectList
{ "repo_name": "DarrenAtherton49/MaterialCV", "path": "app/src/main/java/com/atherton/darren/presentation/project/ProjectListView.java", "license": "apache-2.0", "size": 537 }
[ "com.atherton.darren.data.project.Project", "java.util.List" ]
import com.atherton.darren.data.project.Project; import java.util.List;
import com.atherton.darren.data.project.*; import java.util.*;
[ "com.atherton.darren", "java.util" ]
com.atherton.darren; java.util;
1,854,213
private JsonSchema customizeSchema(Class<?> clazz, JsonSchema jsonSchema) { String customizerClassName = String.format("%s.internal.customizers.%sSchemaCustomizer", getClass().getPackage().getName(), clazz.getName()); try { Class<?> customizerClass = getClass(customizerClassName); ...
JsonSchema function(Class<?> clazz, JsonSchema jsonSchema) { String customizerClassName = String.format(STR, getClass().getPackage().getName(), clazz.getName()); try { Class<?> customizerClass = getClass(customizerClassName); return ((JsonSchemaCustomizer)customizerClass.newInstance()).customize(jsonSchema); } catch (E...
/** * If there's schema customizer, use it to alter generated schema. * Customizer is looked in io.hawt.jsonschema.internal.customizers.&lt;fullClazzName&gt;SchemaCustomizer class * * @param clazz * @param jsonSchema * @return */
If there's schema customizer, use it to alter generated schema. Customizer is looked in io.hawt.jsonschema.internal.customizers.&lt;fullClazzName&gt;SchemaCustomizer class
customizeSchema
{ "repo_name": "oscerd/hawtio", "path": "hawtio-json-schema-mbean/src/main/java/io/hawt/jsonschema/SchemaLookup.java", "license": "apache-2.0", "size": 5167 }
[ "com.fasterxml.jackson.module.jsonSchema.JsonSchema", "io.hawt.jsonschema.internal.customizers.JsonSchemaCustomizer" ]
import com.fasterxml.jackson.module.jsonSchema.JsonSchema; import io.hawt.jsonschema.internal.customizers.JsonSchemaCustomizer;
import com.fasterxml.jackson.module.*; import io.hawt.jsonschema.internal.customizers.*;
[ "com.fasterxml.jackson", "io.hawt.jsonschema" ]
com.fasterxml.jackson; io.hawt.jsonschema;
466,146
public Observable<ServiceResponse<List<PatternRuleInfo>>> listIntentPatternsWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, Integer skip, Integer take) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required a...
Observable<ServiceResponse<List<PatternRuleInfo>>> function(UUID appId, String versionId, UUID intentId, Integer skip, Integer take) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (appId == null) { throw new IllegalArgumentException(STR); } if (versionId == null) { throw new Illeg...
/** * Returns patterns for the specific intent in a version of the application. * * @param appId The application ID. * @param versionId The version ID. * @param intentId The intent classifier ID. * @param skip The number of entries to skip. Default value is 0. * @param take The number...
Returns patterns for the specific intent in a version of the application
listIntentPatternsWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java", "license": "mit", "size": 55384 }
[ "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo", "com.microsoft.rest.ServiceResponse", "java.util.List" ]
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.PatternRuleInfo; import com.microsoft.rest.ServiceResponse; import java.util.List;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.util" ]
com.microsoft.azure; com.microsoft.rest; java.util;
535,892
public String getIntent() { return annot.getString(COSName.IT); }
String function() { return annot.getString(COSName.IT); }
/** * Get the intent of the annotation. * * @return The intent of the annotation. */
Get the intent of the annotation
getIntent
{ "repo_name": "benmccann/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotation.java", "license": "apache-2.0", "size": 27440 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,788,758
public PutCalendarResponse putCalendar(PutCalendarRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::putCalendar, options, PutCalendarResponse::fromXContent, ...
PutCalendarResponse function(PutCalendarRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, MLRequestConverters::putCalendar, options, PutCalendarResponse::fromXContent, Collections.emptySet()); }
/** * Create a new machine learning calendar * <p> * For additional info * see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html"> * ML create calendar documentation</a> * * @param request The request * @param options Additional request...
Create a new machine learning calendar For additional info see ML create calendar documentation
putCalendar
{ "repo_name": "strapdata/elassandra", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java", "license": "apache-2.0", "size": 95880 }
[ "java.io.IOException", "java.util.Collections", "org.elasticsearch.client.ml.PutCalendarRequest", "org.elasticsearch.client.ml.PutCalendarResponse" ]
import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.ml.PutCalendarRequest; import org.elasticsearch.client.ml.PutCalendarResponse;
import java.io.*; import java.util.*; import org.elasticsearch.client.ml.*;
[ "java.io", "java.util", "org.elasticsearch.client" ]
java.io; java.util; org.elasticsearch.client;
1,506,455
public void setMaintenancePolicy(com.google.container.v1.SetMaintenancePolicyRequest request, io.grpc.stub.StreamObserver<com.google.container.v1.Operation> responseObserver) { asyncUnaryCall( getChannel().newCall(getSetMaintenancePolicyMethodHelper(), getCallOptions()), request, responseObs...
void function(com.google.container.v1.SetMaintenancePolicyRequest request, io.grpc.stub.StreamObserver<com.google.container.v1.Operation> responseObserver) { asyncUnaryCall( getChannel().newCall(getSetMaintenancePolicyMethodHelper(), getCallOptions()), request, responseObserver); } } public static final class ClusterMa...
/** * <pre> * Sets the maintenance policy for a cluster. * </pre> */
<code> Sets the maintenance policy for a cluster. </code>
setMaintenancePolicy
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterManagerGrpc.java", "license": "bsd-3-clause", "size": 147597 }
[ "io.grpc.stub.ClientCalls", "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
2,509,925
public void testTimeoutOrCommit() throws Exception { Settings settings = Settings.builder() // short but so we will sometime commit sometime timeout .put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "1ms").build(); MockNode master = createMockNode("master", settings, n...
void function() throws Exception { Settings settings = Settings.builder() .put(DiscoverySettings.COMMIT_TIMEOUT_SETTING.getKey(), "1ms").build(); MockNode master = createMockNode(STR, settings, null); MockNode node = createMockNode("node", settings, null); ClusterState state = ClusterState.builder(master.clusterState) ...
/** * Tests that cluster is committed or times out. It should never be the case that we fail * an update due to a commit timeout, but it ends up being committed anyway */
Tests that cluster is committed or times out. It should never be the case that we fail an update due to a commit timeout, but it ends up being committed anyway
testTimeoutOrCommit
{ "repo_name": "markwalkom/elasticsearch", "path": "core/src/test/java/org/elasticsearch/discovery/zen/PublishClusterStateActionTests.java", "license": "apache-2.0", "size": 41740 }
[ "java.util.concurrent.TimeUnit", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.node.DiscoveryNodes", "org.elasticsearch.common.settings.Settings", "org.elasticsearch.discovery.Discovery", "org.elasticsearch.discovery.DiscoverySettings", "org.hamcrest.Matchers" ]
import java.util.concurrent.TimeUnit; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.discovery.Discovery; import org.elasticsearch.discovery.DiscoverySettings; import org.hamcrest.Matchers;
import java.util.concurrent.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.discovery.*; import org.hamcrest.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.discovery", "org.hamcrest" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.discovery; org.hamcrest;
927,047
public static <T> T withReader(File file, @ClosureParams(value = SimpleType.class, options = "java.io.BufferedReader") Closure<T> closure) throws IOException { return IOGroovyMethods.withReader(newReader(file), closure); }
static <T> T function(File file, @ClosureParams(value = SimpleType.class, options = STR) Closure<T> closure) throws IOException { return IOGroovyMethods.withReader(newReader(file), closure); }
/** * Create a new BufferedReader for this file and then * passes it into the closure, ensuring the reader is closed after the * closure returns. * * @param file a file object * @param closure a closure * @return the value returned by the closure * @throws IOException if an IO...
Create a new BufferedReader for this file and then passes it into the closure, ensuring the reader is closed after the closure returns
withReader
{ "repo_name": "paulk-asert/groovy", "path": "src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java", "license": "apache-2.0", "size": 119457 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.SimpleType", "java.io.File", "java.io.IOException" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.SimpleType; import java.io.File; import java.io.IOException;
import groovy.lang.*; import groovy.transform.stc.*; import java.io.*;
[ "groovy.lang", "groovy.transform.stc", "java.io" ]
groovy.lang; groovy.transform.stc; java.io;
1,598,826
public List<WaveletOperation> flush() { List<WaveletOperation> ret = new ArrayList<WaveletOperation>(); for (WaveAggregateOp op : undoable) { ret.addAll(op.toWaveletOperations()); } undoable.clear(); return ret; }
List<WaveletOperation> function() { List<WaveletOperation> ret = new ArrayList<WaveletOperation>(); for (WaveAggregateOp op : undoable) { ret.addAll(op.toWaveletOperations()); } undoable.clear(); return ret; }
/** * Flushes buffered operation by returning and clearing the buffer. */
Flushes buffered operation by returning and clearing the buffer
flush
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/model/wave/undo/OneStepBuffer.java", "license": "apache-2.0", "size": 3964 }
[ "java.util.ArrayList", "java.util.List", "org.waveprotocol.wave.model.operation.wave.WaveletOperation" ]
import java.util.ArrayList; import java.util.List; import org.waveprotocol.wave.model.operation.wave.WaveletOperation;
import java.util.*; import org.waveprotocol.wave.model.operation.wave.*;
[ "java.util", "org.waveprotocol.wave" ]
java.util; org.waveprotocol.wave;
2,159,337
private Frame prepareTrainingLevelOneFrame(StackedEnsembleModel.StackedEnsembleParameters parms) { // TODO: allow the user to name the level one frame String levelOneKey = "levelone_training_" + _model._key.toString(); List<Model> baseModels = new ArrayList<>(); List<Frame> baseModelPredict...
Frame function(StackedEnsembleModel.StackedEnsembleParameters parms) { String levelOneKey = STR + _model._key.toString(); List<Model> baseModels = new ArrayList<>(); List<Frame> baseModelPredictions = new ArrayList<>(); for (Key<Model> k : parms._base_models) { Model aModel = DKV.getGet(k); if (null == aModel) throw ne...
/** * Prepare the "level one" frame for training the metalearner on a list of cross-validated models * which were trained with _keep_cross_validation_predictions = true. */
Prepare the "level one" frame for training the metalearner on a list of cross-validated models which were trained with _keep_cross_validation_predictions = true
prepareTrainingLevelOneFrame
{ "repo_name": "spennihana/h2o-3", "path": "h2o-algos/src/main/java/hex/ensemble/StackedEnsemble.java", "license": "apache-2.0", "size": 12789 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,318,377
public static String toISOString(Date date, String format, TimeZone tz) { if (format == null) format = FORMAT_DATE_ISO; if (tz == null) tz = TimeZone.getDefault(); DateFormat f = new SimpleDateFormat(format); f.setTimeZone(tz); return f.format(date); }
static String function(Date date, String format, TimeZone tz) { if (format == null) format = FORMAT_DATE_ISO; if (tz == null) tz = TimeZone.getDefault(); DateFormat f = new SimpleDateFormat(format); f.setTimeZone(tz); return f.format(date); }
/** * Render date * * @param date the date obj * @param format - if not specified, will use FORMAT_DATE_ISO * @param tz - tz to set to, if not specified uses local timezone * @return the iso-formatted date string */
Render date
toISOString
{ "repo_name": "TecMunky/xDrip", "path": "wear/src/main/java/com/eveningoutpost/dexdrip/Models/DateUtil.java", "license": "gpl-3.0", "size": 3056 }
[ "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Date", "java.util.TimeZone" ]
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,832,866
@Override public void actionCommit() throws IOException, ServletException { GridModel grid; ThemeConfig themeCfg; int gridMode; themeCfg = getThemeConfig(); grid = themeCfg != null ? themeCfg.getGrid() : null; if((grid != null) && (themeCfg != n...
void function() throws IOException, ServletException { GridModel grid; ThemeConfig themeCfg; int gridMode; themeCfg = getThemeConfig(); grid = themeCfg != null ? themeCfg.getGrid() : null; if((grid != null) && (themeCfg != null)){ try{ themeCfg.setResponsiveCssFile(m_responsiveCssFile); gridMode = grid.getMode(); grid....
/** * Commits the edited object after pressing the "OK" button. * @throws IOException In case of errors forwarding to the required result page. * @throws ServletException In case of errors forwarding to the required result page. */
Commits the edited object after pressing the "OK" button
actionCommit
{ "repo_name": "componio/skinnDriva", "path": "opencms-theme-engine-git/src/java/net/componio/opencms/modules/eight/skinndriva/rd/engine/view/ThemeGridDialog.java", "license": "lgpl-3.0", "size": 41942 }
[ "java.io.IOException", "javax.servlet.ServletException", "net.componio.opencms.modules.eight.skinndriva.rd.engine.ThemeConfigException", "net.componio.opencms.modules.eight.skinndriva.rd.engine.model.GridModel", "net.componio.opencms.modules.eight.skinndriva.rd.engine.model.ThemeConfig" ]
import java.io.IOException; import javax.servlet.ServletException; import net.componio.opencms.modules.eight.skinndriva.rd.engine.ThemeConfigException; import net.componio.opencms.modules.eight.skinndriva.rd.engine.model.GridModel; import net.componio.opencms.modules.eight.skinndriva.rd.engine.model.ThemeConfig;
import java.io.*; import javax.servlet.*; import net.componio.opencms.modules.eight.skinndriva.rd.engine.*; import net.componio.opencms.modules.eight.skinndriva.rd.engine.model.*;
[ "java.io", "javax.servlet", "net.componio.opencms" ]
java.io; javax.servlet; net.componio.opencms;
1,903,803
public void update(IObservable observable, ImportEvent event) { if (event == null) return; cancellable = false; if (event instanceof ImportEvent.IMPORT_DONE) { step = 6; finished = true; pixels = (Set<PixelsData>) PojoMapper.asDataObjects(...
void function(IObservable observable, ImportEvent event) { if (event == null) return; cancellable = false; if (event instanceof ImportEvent.IMPORT_DONE) { step = 6; finished = true; pixels = (Set<PixelsData>) PojoMapper.asDataObjects( ((ImportEvent.IMPORT_DONE) event).pixels); firePropertyChange(IMPORT_DONE_PROPERTY, n...
/** * Displays the status of an on-going import. * @see IObserver#update(IObservable, ImportEvent) */
Displays the status of an on-going import
update
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/blitz/src/omero/gateway/model/ImportCallback.java", "license": "gpl-2.0", "size": 18730 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
132,945
public void getVirtualViews(List<VirtualView> views) { for (int i = mStripTabsToRender.length - 1; i >= 0; i--) { StripLayoutTab tab = mStripTabsToRender[i]; tab.getVirtualViews(views); } if (mNewTabButton.isVisible()) views.add(mNewTabButton); }
void function(List<VirtualView> views) { for (int i = mStripTabsToRender.length - 1; i >= 0; i--) { StripLayoutTab tab = mStripTabsToRender[i]; tab.getVirtualViews(views); } if (mNewTabButton.isVisible()) views.add(mNewTabButton); }
/** * Get a list of virtual views for accessibility. * * @param views A List to populate with virtual views. */
Get a list of virtual views for accessibility
getVirtualViews
{ "repo_name": "Just-D/chromium-1", "path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java", "license": "bsd-3-clause", "size": 62058 }
[ "java.util.List", "org.chromium.chrome.browser.compositor.layouts.components.VirtualView" ]
import java.util.List; import org.chromium.chrome.browser.compositor.layouts.components.VirtualView;
import java.util.*; import org.chromium.chrome.browser.compositor.layouts.components.*;
[ "java.util", "org.chromium.chrome" ]
java.util; org.chromium.chrome;
2,379,409
public Object getObject() throws Exception { if (converterConfigList==null) { throw new FactoryBeanNotInitializedException("converterConfigList has not been set"); } ConverterManagerImpl result = new ConverterManagerImpl(); for (ConverterConfig converterCon...
Object function() throws Exception { if (converterConfigList==null) { throw new FactoryBeanNotInitializedException(STR); } ConverterManagerImpl result = new ConverterManagerImpl(); for (ConverterConfig converterConfig : converterConfigList) { if (converterConfig.fromClasses==null converterConfig.toClasses==null convert...
/** * Creates a ConverterManagerImpl populating it with Converter instances from the converterConfigList property. * * @return The newly created {@link org.springframework.ldap.odm.typeconversion.ConverterManager}. * @throws ClassNotFoundException Thrown if any of the classes to be converted to...
Creates a ConverterManagerImpl populating it with Converter instances from the converterConfigList property
getObject
{ "repo_name": "pbzdyl/spring-ldap", "path": "odm/src/main/java/org/springframework/ldap/odm/typeconversion/impl/ConverterManagerFactoryBean.java", "license": "apache-2.0", "size": 7631 }
[ "org.springframework.beans.factory.FactoryBeanNotInitializedException" ]
import org.springframework.beans.factory.FactoryBeanNotInitializedException;
import org.springframework.beans.factory.*;
[ "org.springframework.beans" ]
org.springframework.beans;
702,363
private static TextGrid.Cell getPossibleAnchorCell( ShapePoint linesEnd, ShapePoint nextPoint, Diagram diagram ){ ShapePoint cellPoint = null; if(nextPoint.isNorthOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x, linesEnd.y + diagram.getCellHeight()); if(nextPoint.isSouthOf(linesEnd...
static TextGrid.Cell function( ShapePoint linesEnd, ShapePoint nextPoint, Diagram diagram ){ ShapePoint cellPoint = null; if(nextPoint.isNorthOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x, linesEnd.y + diagram.getCellHeight()); if(nextPoint.isSouthOf(linesEnd)) cellPoint = new ShapePoint(linesEnd.x, linesEnd.y - ...
/** * Given the end of a line, the next point and a Diagram, it * returns the cell that may contain intersections or arrowheads * to which the line's end should be connected * * @param linesEnd * @param nextPoint * @param diagram * @return */
Given the end of a line, the next point and a Diagram, it returns the cell that may contain intersections or arrowheads to which the line's end should be connected
getPossibleAnchorCell
{ "repo_name": "jensnerche/plantuml", "path": "src/org/stathissideris/ascii2image/graphics/DiagramShape.java", "license": "gpl-2.0", "size": 30508 }
[ "org.stathissideris.ascii2image.text.TextGrid" ]
import org.stathissideris.ascii2image.text.TextGrid;
import org.stathissideris.ascii2image.text.*;
[ "org.stathissideris.ascii2image" ]
org.stathissideris.ascii2image;
1,814,753
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DdosProtectionPlanInner> listByResourceGroup(String resourceGroupName, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<DdosProtectionPlanInner> listByResourceGroup(String resourceGroupName, Context context);
/** * Gets all the DDoS protection plans in a resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.ma...
Gets all the DDoS protection plans in a resource group
listByResourceGroup
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java", "license": "mit", "size": 23252 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.DdosProtectionPlanInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.DdosProtectionPlanInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,857,289
public void onAboutButtonClick(View view) { view.setBackgroundResource(R.drawable.bottom_button_press); Intent myIntent = new Intent(MainMenuActivity.this, AboutActivity.class); startActivity(myIntent); }
void function(View view) { view.setBackgroundResource(R.drawable.bottom_button_press); Intent myIntent = new Intent(MainMenuActivity.this, AboutActivity.class); startActivity(myIntent); }
/** * Starts the about activity. * * @param view The view to be used. */
Starts the about activity
onAboutButtonClick
{ "repo_name": "NicLew/Chordinate", "path": "app/src/main/java/edu/pacificu/chordinate/chordinate/MainMenuActivity.java", "license": "mit", "size": 6680 }
[ "android.content.Intent", "android.view.View" ]
import android.content.Intent; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
733,136
public double toNumber(org.w3c.dom.Node n) { // %REVIEW% You can't get much uglier than this... int nodeHandle = getDTMHandleFromNode(n); DTM dtm = getDTM(nodeHandle); XString xobj = (XString)dtm.getStringValue(nodeHandle); return xobj.num(); }
double function(org.w3c.dom.Node n) { int nodeHandle = getDTMHandleFromNode(n); DTM dtm = getDTM(nodeHandle); XString xobj = (XString)dtm.getStringValue(nodeHandle); return xobj.num(); }
/** * Get the value of a node as a number. * @param n Node to be converted to a number. May be null. * @return value of n as a number. */
Get the value of a node as a number
toNumber
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/com/sun/org/apache/xpath/internal/XPathContext.java", "license": "apache-2.0", "size": 41010 }
[ "com.sun.org.apache.xpath.internal.objects.XString" ]
import com.sun.org.apache.xpath.internal.objects.XString;
import com.sun.org.apache.xpath.internal.objects.*;
[ "com.sun.org" ]
com.sun.org;
2,062,737
@Test public void testRenamePartition() throws Exception { List<List<String>> oldValues = createTable4PartColsParts(client); List<List<String>> newValues = new ArrayList<>(); List<String> newVal = Lists.newArrayList("2018", "01", "16"); newValues.addAll(oldValues.subList(0, 3)); newValues.add(...
void function() throws Exception { List<List<String>> oldValues = createTable4PartColsParts(client); List<List<String>> newValues = new ArrayList<>(); List<String> newVal = Lists.newArrayList("2018", "01", "16"); newValues.addAll(oldValues.subList(0, 3)); newValues.add(newVal); List<Partition> oldParts = client.listPar...
/** * Testing * renamePartition(String,String,List(String),Partition) -> * renamePartition(String,String,List(String),Partition). */
Testing renamePartition(String,String,List(String),Partition) -> renamePartition(String,String,List(String),Partition)
testRenamePartition
{ "repo_name": "vineetgarg02/hive", "path": "standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java", "license": "apache-2.0", "size": 50583 }
[ "com.google.common.collect.Lists", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hive.metastore.api.Partition", "org.junit.Assert" ]
import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.metastore.api.Partition; import org.junit.Assert;
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.junit.*;
[ "com.google.common", "java.util", "org.apache.hadoop", "org.junit" ]
com.google.common; java.util; org.apache.hadoop; org.junit;
2,616,237
EAttribute getPretendExpression_Op();
EAttribute getPretendExpression_Op();
/** * Returns the meta object for the attribute '{@link com.euclideanspace.spad.editor.PretendExpression#getOp <em>Op</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Op</em>'. * @see com.euclideanspace.spad.editor.PretendExpression#getOp() * @...
Returns the meta object for the attribute '<code>com.euclideanspace.spad.editor.PretendExpression#getOp Op</code>'.
getPretendExpression_Op
{ "repo_name": "martinbaker/euclideanspace", "path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java", "license": "agpl-3.0", "size": 593321 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,228,904
public Grammar loadGrammar(XMLInputSource source) throws IOException, XNIException { reset(); // First chance checking strict URI String eid = XMLEntityManager.expandSystemId(source.getSystemId(), source.getBaseSystemId(), fStrictURI); XMLDTDDescription desc = new XMLDTDD...
Grammar function(XMLInputSource source) throws IOException, XNIException { reset(); String eid = XMLEntityManager.expandSystemId(source.getSystemId(), source.getBaseSystemId(), fStrictURI); XMLDTDDescription desc = new XMLDTDDescription(source.getPublicId(), source.getSystemId(), source.getBaseSystemId(), eid, null); i...
/** * Returns a Grammar object by parsing the contents of the * entity pointed to by source. * * @param source the location of the entity which forms * the starting point of the grammar to be constructed. * @throws IOException When a problem is encounte...
Returns a Grammar object by parsing the contents of the entity pointed to by source
loadGrammar
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java", "license": "gpl-2.0", "size": 20495 }
[ "com.sun.org.apache.xerces.internal.impl.XMLEntityManager", "com.sun.org.apache.xerces.internal.xni.XNIException", "com.sun.org.apache.xerces.internal.xni.grammars.Grammar", "com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource", "java.io.EOFException", "java.io.IOException" ]
import com.sun.org.apache.xerces.internal.impl.XMLEntityManager; import com.sun.org.apache.xerces.internal.xni.XNIException; import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; import java.io.EOFException; import java.io.IOException;
import com.sun.org.apache.xerces.internal.impl.*; import com.sun.org.apache.xerces.internal.xni.*; import com.sun.org.apache.xerces.internal.xni.grammars.*; import com.sun.org.apache.xerces.internal.xni.parser.*; import java.io.*;
[ "com.sun.org", "java.io" ]
com.sun.org; java.io;
2,029,938
public static void deleteProfilePublicKeys(Long profileId) { Connection con = null; try { con = DBUtils.getConn(); PreparedStatement stmt = con.prepareStatement("delete from public_keys where profile_id=?"); stmt.setLong(1, profileId); stmt.execute()...
static void function(Long profileId) { Connection con = null; try { con = DBUtils.getConn(); PreparedStatement stmt = con.prepareStatement(STR); stmt.setLong(1, profileId); stmt.execute(); DBUtils.closeStmt(stmt); } catch (Exception e) { log.error(e.toString(), e); } DBUtils.closeConn(con); }
/** * deletes all public keys for a profile * * @param profileId profile id */
deletes all public keys for a profile
deleteProfilePublicKeys
{ "repo_name": "looker/KeyBox", "path": "src/main/java/com/keybox/manage/db/PublicKeyDB.java", "license": "apache-2.0", "size": 20316 }
[ "com.keybox.manage.util.DBUtils", "java.sql.Connection", "java.sql.PreparedStatement" ]
import com.keybox.manage.util.DBUtils; import java.sql.Connection; import java.sql.PreparedStatement;
import com.keybox.manage.util.*; import java.sql.*;
[ "com.keybox.manage", "java.sql" ]
com.keybox.manage; java.sql;
2,666,795
public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException { return xctxt.getCurrentNode(); }
int function(XPathContext xctxt) throws javax.xml.transform.TransformerException { return xctxt.getCurrentNode(); }
/** * Return the first node out of the nodeset, if this expression is * a nodeset expression. This is the default implementation for * nodesets. Derived classes should try and override this and return a * value without having to do a clone operation. * @param xctxt The XPath runtime context. * @retu...
Return the first node out of the nodeset, if this expression is a nodeset expression. This is the default implementation for nodesets. Derived classes should try and override this and return a value without having to do a clone operation
asNode
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xpath/internal/axes/SelfIteratorNoPredicate.java", "license": "apache-2.0", "size": 3812 }
[ "com.sun.org.apache.xpath.internal.XPathContext" ]
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.*;
[ "com.sun.org" ]
com.sun.org;
1,477,542
public static WorkItemContext attachment(Integer workItemID, Integer person, Integer fieldID, Locale locale, String newFileNameDescription, String oldFileNameDescription){ WorkItemContext workItemContext = editOneField(person, workItemID, locale, fieldID); //set to a not null value to avoid unnecessary proces...
static WorkItemContext function(Integer workItemID, Integer person, Integer fieldID, Locale locale, String newFileNameDescription, String oldFileNameDescription){ WorkItemContext workItemContext = editOneField(person, workItemID, locale, fieldID); workItemContext.setFieldChangeID(fieldID); TWorkItemBean workItemBean = ...
/** * Loading of an existing workItem for adding a comment * @param workItemID * @param person * @param locale */
Loading of an existing workItem for adding a comment
attachment
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/fieldType/runtime/base/FieldsManagerRT.java", "license": "gpl-3.0", "size": 125819 }
[ "com.aurel.track.beans.TWorkItemBean", "java.util.Locale" ]
import com.aurel.track.beans.TWorkItemBean; import java.util.Locale;
import com.aurel.track.beans.*; import java.util.*;
[ "com.aurel.track", "java.util" ]
com.aurel.track; java.util;
2,518,878
Set<NodeId> visited() { return visited; }
Set<NodeId> visited() { return visited; }
/** * Returns the set of nodes visited by this request. * * @return the set of nodes visited by this request */
Returns the set of nodes visited by this request
visited
{ "repo_name": "opennetworkinglab/onos", "path": "core/net/src/main/java/org/onosproject/cluster/impl/MastershipProxyManager.java", "license": "apache-2.0", "size": 14868 }
[ "java.util.Set", "org.onosproject.cluster.NodeId" ]
import java.util.Set; import org.onosproject.cluster.NodeId;
import java.util.*; import org.onosproject.cluster.*;
[ "java.util", "org.onosproject.cluster" ]
java.util; org.onosproject.cluster;
260,911
private boolean hasNoResult() { boolean noResults = true; try { // Search for no data message WebElement message = drone.find(By.cssSelector("tbody.yui-dt-message")); noResults = message.isDisplayed(); } catch (NoSuchElementException te...
boolean function() { boolean noResults = true; try { WebElement message = drone.find(By.cssSelector(STR)); noResults = message.isDisplayed(); } catch (NoSuchElementException te) { noResults = false; } return noResults; }
/** * Checks if no result message is displayed. * * @return true if the no result message is found */
Checks if no result message is displayed
hasNoResult
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/share-po/src/main/java/org/alfresco/po/share/PeopleFinderResultPage.java", "license": "lgpl-3.0", "size": 4525 }
[ "org.openqa.selenium.By", "org.openqa.selenium.NoSuchElementException", "org.openqa.selenium.WebElement" ]
import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,684,082
Promise<Void> stepOut(String id, StepOutActionDto action);
Promise<Void> stepOut(String id, StepOutActionDto action);
/** * Does step out. * * @param id debug session id * @param action the step out action parameters */
Does step out
stepOut
{ "repo_name": "sudaraka94/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/debug/DebuggerServiceClient.java", "license": "epl-1.0", "size": 4500 }
[ "org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto", "org.eclipse.che.api.promises.client.Promise" ]
import org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto; import org.eclipse.che.api.promises.client.Promise;
import org.eclipse.che.api.debug.shared.dto.action.*; import org.eclipse.che.api.promises.client.*;
[ "org.eclipse.che" ]
org.eclipse.che;
2,907,184
@Test(expected = IllegalArgumentException.class) public void testGetAllPersistableFields() { TransformationHelper.getAllPersistableFields(input1, input2); }
@Test(expected = IllegalArgumentException.class) void function() { TransformationHelper.getAllPersistableFields(input1, input2); }
/** * Tests if the a class can be correctly identified as a * composite class. */
Tests if the a class can be correctly identified as a composite class
testGetAllPersistableFields
{ "repo_name": "gammalgris/jmul", "path": "Utilities/Transformation-XML-Tests/src/test/jmul/transformation/xml/GetAllPersistableFieldsInvalidParametersTest.java", "license": "gpl-3.0", "size": 3661 }
[ "org.junit.Test" ]
import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,588,084
public boolean releaseAssignment(String vmName) throws NetworkManagerException { if (this.iptable == null) throw new NetworkManagerException("Error: IPTable is not initialized."); boolean ret = this.iptable.releaseAssignment(vmName); try { this.saveIPTable(xmlFile); } catch (IOException e) { logger...
boolean function(String vmName) throws NetworkManagerException { if (this.iptable == null) throw new NetworkManagerException(STR); boolean ret = this.iptable.releaseAssignment(vmName); try { this.saveIPTable(xmlFile); } catch (IOException e) { logger.error(e.toString()); } return ret; }
/** * Release an assignment of IP/MAC and a VM * @param vmName * @return * @throws NetworkManagerException */
Release an assignment of IP/MAC and a VM
releaseAssignment
{ "repo_name": "synchromedia/OpenGSN", "path": "services/src/main/java/com/opengsn/services/networkmanager/NetworkManager.java", "license": "apache-2.0", "size": 8505 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,910,499
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mainapp = (threaded_application) getApplication(); if (mainapp.isForcingFinish()) { // expedite return; } prefs = getSharedPreferences("jmri.enginedriver_prefe...
void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mainapp = (threaded_application) getApplication(); if (mainapp.isForcingFinish()) { return; } prefs = getSharedPreferences(STR, 0); mainapp.applyTheme(this); setTitle(getApplicationContext().getResources().getString(R.string.app_name_Consist...
/** * Called when the activity is first created. */
Called when the activity is first created
onCreate
{ "repo_name": "n3ix/EngineDriver", "path": "EngineDriver/src/main/java/jmri/enginedriver/ConsistEdit.java", "license": "gpl-3.0", "size": 17088 }
[ "android.os.Bundle", "android.util.Log", "android.view.GestureDetector", "android.widget.ArrayAdapter", "android.widget.SimpleAdapter", "java.util.ArrayList" ]
import android.os.Bundle; import android.util.Log; import android.view.GestureDetector; import android.widget.ArrayAdapter; import android.widget.SimpleAdapter; import java.util.ArrayList;
import android.os.*; import android.util.*; import android.view.*; import android.widget.*; import java.util.*;
[ "android.os", "android.util", "android.view", "android.widget", "java.util" ]
android.os; android.util; android.view; android.widget; java.util;
2,129,788
public static void maybeSetFloat(MediaFormat format, String key, float value) { if (value != Format.NO_VALUE) { format.setFloat(key, value); } }
static void function(MediaFormat format, String key, float value) { if (value != Format.NO_VALUE) { format.setFloat(key, value); } }
/** * Sets a {@link MediaFormat} float value. Does nothing if {@code value} is {@link * Format#NO_VALUE}. * * @param format The {@link MediaFormat} being configured. * @param key The key to set. * @param value The value to set. */
Sets a <code>MediaFormat</code> float value. Does nothing if value is <code>Format#NO_VALUE</code>
maybeSetFloat
{ "repo_name": "MaTriXy/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaFormatUtil.java", "license": "apache-2.0", "size": 3864 }
[ "android.media.MediaFormat", "com.google.android.exoplayer2.Format" ]
import android.media.MediaFormat; import com.google.android.exoplayer2.Format;
import android.media.*; import com.google.android.exoplayer2.*;
[ "android.media", "com.google.android" ]
android.media; com.google.android;
2,533,109
this.outputs.addAll(Arrays.asList(outputs)); return this; }
this.outputs.addAll(Arrays.asList(outputs)); return this; }
/** * Add required outputs */
Add required outputs
output
{ "repo_name": "RobAltena/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/config/BatchOutputConfig.java", "license": "apache-2.0", "size": 4805 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
942,745
public void updateRecordMetrics() { for (Optional<Fork> fork : this.forks) { if (fork.isPresent()) { fork.get().updateRecordMetrics(); } } }
void function() { for (Optional<Fork> fork : this.forks) { if (fork.isPresent()) { fork.get().updateRecordMetrics(); } } }
/** * Update record-level metrics. */
Update record-level metrics
updateRecordMetrics
{ "repo_name": "dvenkateshappa/gobblin", "path": "gobblin-runtime/src/main/java/gobblin/runtime/Task.java", "license": "apache-2.0", "size": 18957 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,226,449
MyStreamSchemaOutputResolver outputResolver = new MyStreamSchemaOutputResolver(); generateSchemaWithFileName(new Class[] { Foos.class, ObjectFactory.class }, CONTEXT_PATH, PATH + "eclipselink-oxm.xml", 2, outputResolver); // validate schema String controlSchema = PATH + "schema.xsd"; ...
MyStreamSchemaOutputResolver outputResolver = new MyStreamSchemaOutputResolver(); generateSchemaWithFileName(new Class[] { Foos.class, ObjectFactory.class }, CONTEXT_PATH, PATH + STR, 2, outputResolver); String controlSchema = PATH + STR; compareSchemas(outputResolver.schemaFiles.get(EMPTY_NAMESPACE).toString(), new Fi...
/** * Tests @XmlElementRefs schema generation via eclipselink-oxm.xml. * * Positive test. */
Tests @XmlElementRefs schema generation via eclipselink-oxm.xml. Positive test
testXmlElementRefsSchemaGen
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmlelementrefs/XmlElementRefsTestCases.java", "license": "epl-1.0", "size": 5965 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
933,139
public static void addRegionsToMeta(CatalogTracker catalogTracker, List<HRegionInfo> regionInfos) throws IOException { List<Put> puts = new ArrayList<Put>(); for (HRegionInfo regionInfo : regionInfos) { puts.add(makePutFromRegionInfo(regionInfo)); } putsToMetaTable(catalogTracker, puts);...
static void function(CatalogTracker catalogTracker, List<HRegionInfo> regionInfos) throws IOException { List<Put> puts = new ArrayList<Put>(); for (HRegionInfo regionInfo : regionInfos) { puts.add(makePutFromRegionInfo(regionInfo)); } putsToMetaTable(catalogTracker, puts); LOG.info(STR + puts.size()); }
/** * Adds a hbase:meta row for each of the specified new regions. * @param catalogTracker CatalogTracker * @param regionInfos region information list * @throws IOException if problem connecting or updating meta */
Adds a hbase:meta row for each of the specified new regions
addRegionsToMeta
{ "repo_name": "lilonglai/hbase-0.96.2", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/catalog/MetaEditor.java", "license": "apache-2.0", "size": 21835 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.client.Put" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.client.Put;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
526,273
@Test @Category(NeedsRunner.class) public void testSpecializedButIgnoredGenericInPipeline() throws Exception { pipeline .apply(Create.of("hello", "goodbye")) .apply(new PTransformOutputingMySerializableGeneric()); pipeline.run(); } private static class GenericOutputMySerializedGener...
@Category(NeedsRunner.class) void function() throws Exception { pipeline .apply(Create.of("hello", STR)) .apply(new PTransformOutputingMySerializableGeneric()); pipeline.run(); } private static class GenericOutputMySerializedGeneric<T extends Serializable> extends PTransform<PCollection<String>, PCollection<KV<String, ...
/** * In-context test that assures the functionality tested in {@link * #testDefaultCoderAnnotationGeneric} is invoked in the right ways. */
In-context test that assures the functionality tested in <code>#testDefaultCoderAnnotationGeneric</code> is invoked in the right ways
testSpecializedButIgnoredGenericInPipeline
{ "repo_name": "rangadi/incubator-beam", "path": "sdks/java/core/src/test/java/org/apache/beam/sdk/coders/CoderRegistryTest.java", "license": "apache-2.0", "size": 19041 }
[ "java.io.Serializable", "org.apache.beam.sdk.testing.NeedsRunner", "org.apache.beam.sdk.transforms.Create", "org.apache.beam.sdk.transforms.DoFn", "org.apache.beam.sdk.transforms.PTransform", "org.apache.beam.sdk.values.PCollection", "org.junit.experimental.categories.Category" ]
import java.io.Serializable; import org.apache.beam.sdk.testing.NeedsRunner; import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PCollection; import org.junit.experimental.categories.Category;
import java.io.*; import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; import org.junit.experimental.categories.*;
[ "java.io", "org.apache.beam", "org.junit.experimental" ]
java.io; org.apache.beam; org.junit.experimental;
2,391,735
private JPanel getJPanelStartSettings() { if (jPanelStartSettings == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.CENTER); flowLayout.setVgap(0); flowLayout.setHgap(5); GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConst...
JPanel function() { if (jPanelStartSettings == null) { FlowLayout flowLayout = new FlowLayout(); flowLayout.setAlignment(java.awt.FlowLayout.CENTER); flowLayout.setVgap(0); flowLayout.setHgap(5); GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); gridBagConstraints3.anchor = GridBagConstraints.WEST; gri...
/** * This method initializes jPanelStartSettings * @return javax.swing.JPanel */
This method initializes jPanelStartSettings
getJPanelStartSettings
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/charts/timeseriesChart/gui/TimeFormatImportConfiguration.java", "license": "lgpl-2.1", "size": 36679 }
[ "java.awt.Dimension", "java.awt.FlowLayout", "java.awt.GridBagConstraints", "java.awt.Insets", "javax.swing.JLabel", "javax.swing.JPanel" ]
import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.Insets; import javax.swing.JLabel; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,645,861
log.debug("REST request to save Comment : {}", comment); if (comment.getId() != null) { return ResponseEntity.badRequest().header("Failure", "A new comment cannot already have an ID").build(); } commentRepository.save(comment); return ResponseEntity.created(new URI("/api/comm...
log.debug(STR, comment); if (comment.getId() != null) { return ResponseEntity.badRequest().header(STR, STR).build(); } commentRepository.save(comment); return ResponseEntity.created(new URI(STR + comment.getId())).build(); }
/** * POST /comments -> Create a new comment. */
POST /comments -> Create a new comment
create
{ "repo_name": "mkorobeynikov/jhipster-radriges", "path": "src/main/java/ru/radriges/site/web/rest/CommentResource.java", "license": "gpl-2.0", "size": 3689 }
[ "org.springframework.http.ResponseEntity" ]
import org.springframework.http.ResponseEntity;
import org.springframework.http.*;
[ "org.springframework.http" ]
org.springframework.http;
1,100,518
public String getPoolName(JobInProgress job) { Configuration conf = job.getJobConf(); return conf.get(EXPLICIT_POOL_PROPERTY, conf.get(poolNameProperty, Pool.DEFAULT_POOL_NAME)).trim(); }
String function(JobInProgress job) { Configuration conf = job.getJobConf(); return conf.get(EXPLICIT_POOL_PROPERTY, conf.get(poolNameProperty, Pool.DEFAULT_POOL_NAME)).trim(); }
/** * Get the pool name for a JobInProgress from its configuration. This uses * the value of mapred.fairscheduler.pool if specified, otherwise the value * of the property named in mapred.fairscheduler.poolnameproperty if that is * specified. Otherwise if neither is specified it uses the "user.name" prope...
Get the pool name for a JobInProgress from its configuration. This uses the value of mapred.fairscheduler.pool if specified, otherwise the value of the property named in mapred.fairscheduler.poolnameproperty if that is specified. Otherwise if neither is specified it uses the "user.name" property in the jobconf by defau...
getPoolName
{ "repo_name": "ryanobjc/hadoop-cloudera", "path": "src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/PoolManager.java", "license": "apache-2.0", "size": 20215 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,750,786
private ScanResult scan(ClassLoader classLoader, Path path, URL[] urls) throws IOException { Enumeration<URL> markerFileEnumeration = classLoader.getResources( CommonConstants.DRILL_JAR_MARKER_FILE_RESOURCE_PATHNAME); while (markerFileEnumeration.hasMoreElements()) { URL markerFile = markerFileE...
ScanResult function(ClassLoader classLoader, Path path, URL[] urls) throws IOException { Enumeration<URL> markerFileEnumeration = classLoader.getResources( CommonConstants.DRILL_JAR_MARKER_FILE_RESOURCE_PATHNAME); while (markerFileEnumeration.hasMoreElements()) { URL markerFile = markerFileEnumeration.nextElement(); if...
/** * First finds path to marker file url, otherwise throws {@link JarValidationException}. * Then scans jar classes according to list indicated in marker files. * Additional logic is added to close {@link URL} after {@link ConfigFactory#parseURL(URL)}. * This is extremely important for Windows users where syst...
First finds path to marker file url, otherwise throws <code>JarValidationException</code>. Then scans jar classes according to list indicated in marker files. Additional logic is added to close <code>URL</code> after <code>ConfigFactory#parseURL(URL)</code>. This is extremely important for Windows users where system do...
scan
{ "repo_name": "KulykRoman/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/FunctionImplementationRegistry.java", "license": "apache-2.0", "size": 25757 }
[ "com.google.common.collect.Sets", "com.typesafe.config.ConfigFactory", "java.io.IOException", "java.net.JarURLConnection", "java.net.URLConnection", "java.util.Enumeration", "org.apache.drill.common.config.CommonConstants", "org.apache.drill.common.config.DrillConfig", "org.apache.drill.common.scann...
import com.google.common.collect.Sets; import com.typesafe.config.ConfigFactory; import java.io.IOException; import java.net.JarURLConnection; import java.net.URLConnection; import java.util.Enumeration; import org.apache.drill.common.config.CommonConstants; import org.apache.drill.common.config.DrillConfig; import org...
import com.google.common.collect.*; import com.typesafe.config.*; import java.io.*; import java.net.*; import java.util.*; import org.apache.drill.common.config.*; import org.apache.drill.common.scanner.*; import org.apache.drill.common.scanner.persistence.*; import org.apache.drill.exec.exception.*; import org.apache....
[ "com.google.common", "com.typesafe.config", "java.io", "java.net", "java.util", "org.apache.drill", "org.apache.hadoop" ]
com.google.common; com.typesafe.config; java.io; java.net; java.util; org.apache.drill; org.apache.hadoop;
1,558,746
static <T> List<Callable<T>> makeContextWrappedCollection( Collection<? extends Callable<T>> tasks) { final List<Callable<T>> contexted = Lists.newArrayList(); for (final Callable<T> task : tasks) { contexted.add(makeContextCallable(task)); } return contexted; }
static <T> List<Callable<T>> makeContextWrappedCollection( Collection<? extends Callable<T>> tasks) { final List<Callable<T>> contexted = Lists.newArrayList(); for (final Callable<T> task : tasks) { contexted.add(makeContextCallable(task)); } return contexted; }
/** * Utility function used by the Context*Executor classes * * @param tasks The tasks. * @param <T> The result type. * @return The list of Callable objects. */
Utility function used by the Context*Executor classes
makeContextWrappedCollection
{ "repo_name": "gtonic/helios", "path": "helios-client/src/main/java/com/spotify/helios/common/context/Context.java", "license": "apache-2.0", "size": 8187 }
[ "com.google.common.collect.Lists", "java.util.Collection", "java.util.List", "java.util.concurrent.Callable" ]
import com.google.common.collect.Lists; import java.util.Collection; import java.util.List; import java.util.concurrent.Callable;
import com.google.common.collect.*; import java.util.*; import java.util.concurrent.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,200,509
public final ICompilationUnit getCompilationUnit() { return fCompilationUnit; }
final ICompilationUnit function() { return fCompilationUnit; }
/** * The compilation unit on which the change works. * * @return the compilation unit on which the change works */
The compilation unit on which the change works
getCompilationUnit
{ "repo_name": "eclipse/flux", "path": "org.eclipse.flux.jdt.service/jdt ui/org/eclipse/jdt/ui/text/java/correction/CUCorrectionProposal.java", "license": "bsd-3-clause", "size": 7881 }
[ "org.eclipse.jdt.core.ICompilationUnit" ]
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
1,775,385
public OutboundRuleInner withBackendAddressPool(SubResource backendAddressPool) { this.backendAddressPool = backendAddressPool; return this; }
OutboundRuleInner function(SubResource backendAddressPool) { this.backendAddressPool = backendAddressPool; return this; }
/** * Set a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs. * * @param backendAddressPool the backendAddressPool value to set * @return the OutboundRuleInner object itself. */
Set a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs
withBackendAddressPool
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/OutboundRuleInner.java", "license": "mit", "size": 8253 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
700,049
@ApiModelProperty(value = "") public Pagination getPagination() { return pagination; }
@ApiModelProperty(value = "") Pagination function() { return pagination; }
/** * Get pagination * * @return pagination */
Get pagination
getPagination
{ "repo_name": "SidneyAllen/Xero-Java", "path": "src/main/java/com/xero/models/payrolluk/EmployeeOpeningBalancesObject.java", "license": "mit", "size": 3428 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,694,284
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<RunCommandResultInner>, RunCommandResultInner> beginRunCommand( String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { return beginRunCommandAsync(resourceGroupName, vmName, ...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<RunCommandResultInner>, RunCommandResultInner> function( String resourceGroupName, String vmName, RunCommandInput parameters, Context context) { return beginRunCommandAsync(resourceGroupName, vmName, parameters, context).getSyncPoller(); ...
/** * Run command on the VM. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Run command operation. * @param context The context to associate with this operation. * @throws Ill...
Run command on the VM
beginRunCommand
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachinesClientImpl.java", "license": "mit", "size": 333925 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner", "com.azure.resourcemanager....
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner; import com.az...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
902,766
RoutingPolicy getRoutingPolicy();
RoutingPolicy getRoutingPolicy();
/** * Returns a routing policy. * * @return the routing policy * @since 2.9 */
Returns a routing policy
getRoutingPolicy
{ "repo_name": "jGauravGupta/nbmodeler", "path": "modeler-api/src/main/java/org/netbeans/modeler/widget/edge/IConnectionWidget.java", "license": "apache-2.0", "size": 11669 }
[ "org.netbeans.api.visual.widget.ConnectionWidget" ]
import org.netbeans.api.visual.widget.ConnectionWidget;
import org.netbeans.api.visual.widget.*;
[ "org.netbeans.api" ]
org.netbeans.api;
173,899
void addListenerAsync(ClusterEventListener listener, ClusterEventType... eventTypes);
void addListenerAsync(ClusterEventListener listener, ClusterEventType... eventTypes);
/** * Asynchronously registers the specified cluster event listener without waiting for registration to be completed. * * @param listener Cluster listener. * @param eventTypes Event types to listen for. */
Asynchronously registers the specified cluster event listener without waiting for registration to be completed
addListenerAsync
{ "repo_name": "hekate-io/hekate", "path": "hekate-core/src/main/java/io/hekate/core/service/ClusterContext.java", "license": "apache-2.0", "size": 3851 }
[ "io.hekate.cluster.event.ClusterEventListener", "io.hekate.cluster.event.ClusterEventType" ]
import io.hekate.cluster.event.ClusterEventListener; import io.hekate.cluster.event.ClusterEventType;
import io.hekate.cluster.event.*;
[ "io.hekate.cluster" ]
io.hekate.cluster;
661,603
public ClassLevel getPrereqs() { return prereqs; }
ClassLevel function() { return prereqs; }
/** * Gets the class level prereq. * * @return the prereq class level */
Gets the class level prereq
getPrereqs
{ "repo_name": "cs3250-team6/msubanner", "path": "src/main/java/edu/msudenver/cs3250/group6/msubanner/entities/Course.java", "license": "mit", "size": 7971 }
[ "edu.msudenver.cs3250.group6.msubanner.ClassLevel" ]
import edu.msudenver.cs3250.group6.msubanner.ClassLevel;
import edu.msudenver.cs3250.group6.msubanner.*;
[ "edu.msudenver.cs3250" ]
edu.msudenver.cs3250;
2,359,880
@Override public final void dump( DataOutputStream file ) throws IOException { super.dump(file); file.writeShort(signature_index); }
final void function( DataOutputStream file ) throws IOException { super.dump(file); file.writeShort(signature_index); }
/** * Dump source file attribute to file stream in binary format. * * @param file Output file stream * @throws IOException */
Dump source file attribute to file stream in binary format
dump
{ "repo_name": "Maccimo/commons-bcel", "path": "src/main/java/org/apache/bcel/classfile/Signature.java", "license": "apache-2.0", "size": 8237 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
171,041
public static File createEmbedFile(byte[] data) throws IOException { File f = File.createTempFile("cuke_", ".embed"); { FileOutputStream fos = new FileOutputStream(f); try { fos.write(data); fos.flush(); } finally { fos.close(); } } return f; }
static File function(byte[] data) throws IOException { File f = File.createTempFile("cuke_", STR); { FileOutputStream fos = new FileOutputStream(f); try { fos.write(data); fos.flush(); } finally { fos.close(); } } return f; }
/** * Create a temporary file on the slave to store the embedded content * * @throws IOException if we couldn't create a temporary file */
Create a temporary file on the slave to store the embedded content
createEmbedFile
{ "repo_name": "SierraGolf/cucumber-testresult-plugin", "path": "src/main/java/org/jenkinsci/plugins/cucumber/jsontestsupport/CucumberUtils.java", "license": "mit", "size": 3650 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,326,390
public IPrefixManager getPrefixManager() { return mPrefixManager; }
IPrefixManager function() { return mPrefixManager; }
/** * Gets the prefix manager associated to the recent mapping loading. */
Gets the prefix manager associated to the recent mapping loading
getPrefixManager
{ "repo_name": "obidea/semantika", "path": "src/main/java/com/obidea/semantika/app/MappingLoaderBase.java", "license": "apache-2.0", "size": 2249 }
[ "com.obidea.semantika.knowledgebase.IPrefixManager" ]
import com.obidea.semantika.knowledgebase.IPrefixManager;
import com.obidea.semantika.knowledgebase.*;
[ "com.obidea.semantika" ]
com.obidea.semantika;
1,400,470
void putVector(String word, INDArray vector);
void putVector(String word, INDArray vector);
/** * Inserts a word vector * @param word the word to insert * @param vector the vector to insert */
Inserts a word vector
putVector
{ "repo_name": "RobAltena/deeplearning4j", "path": "deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/WeightLookupTable.java", "license": "apache-2.0", "size": 4266 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,615,245
@Override public Map<String, Flow> getFlowMap() { return this.flowMap; }
Map<String, Flow> function() { return this.flowMap; }
/** * Returns the flow map constructed from the loaded flows. * * @return Map of flow name to Flow. */
Returns the flow map constructed from the loaded flows
getFlowMap
{ "repo_name": "HappyRay/azkaban", "path": "azkaban-common/src/main/java/azkaban/project/DirectoryFlowLoader.java", "license": "apache-2.0", "size": 16290 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
615,864
public Intent discoverableIntent() { if (!isValid()) return null; if (mBtAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); intent.putExtra(Bluet...
Intent function() { if (!isValid()) return null; if (mBtAdapter.getScanMode() != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300); return intent; } return null; }
/** * Make Discoverable */
Make Discoverable
discoverableIntent
{ "repo_name": "NeilSoul/FlowNet", "path": "app/Android/app/src/main/java/edu/tsinghua/medialab/flownet/near/NearAdapter.java", "license": "unlicense", "size": 4244 }
[ "android.bluetooth.BluetoothAdapter", "android.content.Intent" ]
import android.bluetooth.BluetoothAdapter; import android.content.Intent;
import android.bluetooth.*; import android.content.*;
[ "android.bluetooth", "android.content" ]
android.bluetooth; android.content;
1,141,432
protected static ChangeTransFieldNumberCode getChangeTransFieldNumberCode() { ChangeTransFieldNumberCode entity = new ChangeTransFieldNumberCode(); entity.setDescription("description1"); entity.setName("name1"); return entity; }
static ChangeTransFieldNumberCode function() { ChangeTransFieldNumberCode entity = new ChangeTransFieldNumberCode(); entity.setDescription(STR); entity.setName("name1"); return entity; }
/** * Creates an instance of ChangeTransFieldNumberCode. * * @return the ChangeTransFieldNumberCode instance. * * @since 1.1 (OPM - Data Migration - Entities Update Module Assembly 1.0) */
Creates an instance of ChangeTransFieldNumberCode
getChangeTransFieldNumberCode
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/BasePersistenceTests.java", "license": "apache-2.0", "size": 58033 }
[ "gov.opm.scrd.entities.lookup.ChangeTransFieldNumberCode" ]
import gov.opm.scrd.entities.lookup.ChangeTransFieldNumberCode;
import gov.opm.scrd.entities.lookup.*;
[ "gov.opm.scrd" ]
gov.opm.scrd;
801,045
public List<String> getTableFieldNamesList() { return labelList; }
List<String> function() { return labelList; }
/** * Returns a list of non-geometry fields of this table. * * @return list of field names. */
Returns a list of non-geometry fields of this table
getTableFieldNamesList
{ "repo_name": "Huertix/geopaparazzi", "path": "geopaparazzispatialitelibrary/src/eu/geopaparazzi/spatialite/database/spatial/core/tables/SpatialVectorTable.java", "license": "gpl-3.0", "size": 17109 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
167,173
public static CygwinTerminal createCygwinTerminal( InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset) { return new CygwinTerminal(terminalInput, terminalOutput,...
static CygwinTerminal function( InputStream terminalInput, OutputStream terminalOutput, Charset terminalCharset) { return new CygwinTerminal(terminalInput, terminalOutput, terminalCharset); }
/** * <b>Experimental</b> Cygwin support! */
Experimental Cygwin support
createCygwinTerminal
{ "repo_name": "Tusamarco/stresstool", "path": "src/com/googlecode/lanterna/TerminalFacade.java", "license": "gpl-2.0", "size": 10429 }
[ "com.googlecode.lanterna.terminal.text.CygwinTerminal", "java.io.InputStream", "java.io.OutputStream", "java.nio.charset.Charset" ]
import com.googlecode.lanterna.terminal.text.CygwinTerminal; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.Charset;
import com.googlecode.lanterna.terminal.text.*; import java.io.*; import java.nio.charset.*;
[ "com.googlecode.lanterna", "java.io", "java.nio" ]
com.googlecode.lanterna; java.io; java.nio;
479,192
private Map getFormValues( HttpServletRequest request ) throws InvalidFormException { // get list of WebFormField objects that represent form fields; WebFormField[] fields = getFormFields(); // // Iterate through fields and validate each - save // validated web ...
Map function( HttpServletRequest request ) throws InvalidFormException { WebFormField[] fields = getFormFields(); Map errors = new HashMap(); for ( int i = 0; i < fields.length; i++ ) { try { values.put( fields[i].getFieldName(), fields[i] .validate( request ) ); } catch ( InvalidParameterException ipe ) { errors.put( ...
/** * Retrieves all form values from request and validates them. * * @param request * Servlet request * @return Map containing validated form values from request with form field * name as String key referencing strongly typed value for that * field. * ...
Retrieves all form values from request and validates them
getFormValues
{ "repo_name": "tair/tairwebapp", "path": "src/org/tair/abrc/handler/UpdateChargesHandler.java", "license": "gpl-3.0", "size": 26223 }
[ "java.util.HashMap", "java.util.Map", "javax.servlet.http.HttpServletRequest", "org.tair.utilities.InvalidFormException", "org.tair.utilities.InvalidParameterException", "org.tair.utilities.WebFormField" ]
import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.tair.utilities.InvalidFormException; import org.tair.utilities.InvalidParameterException; import org.tair.utilities.WebFormField;
import java.util.*; import javax.servlet.http.*; import org.tair.utilities.*;
[ "java.util", "javax.servlet", "org.tair.utilities" ]
java.util; javax.servlet; org.tair.utilities;
2,120,373
public static void checkProtocolVersion(byte protoVer) { if (GridBinaryMarshaller.PROTO_VER != protoVer) throw new BinaryObjectException("Unsupported protocol version: " + protoVer); }
static void function(byte protoVer) { if (GridBinaryMarshaller.PROTO_VER != protoVer) throw new BinaryObjectException(STR + protoVer); }
/** * Check protocol version. * * @param protoVer Protocol version. */
Check protocol version
checkProtocolVersion
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryUtils.java", "license": "apache-2.0", "size": 83062 }
[ "org.apache.ignite.binary.BinaryObjectException" ]
import org.apache.ignite.binary.BinaryObjectException;
import org.apache.ignite.binary.*;
[ "org.apache.ignite" ]
org.apache.ignite;
497,533
@Test(expectedExceptions = IllegalArgumentException.class) public void testBuilderTDPCFDRACI() { final FXForwardTrade.Builder builder = FXForwardTrade.builder(); builder.tradeDate(NOW); builder.payCurrency(Currency.AUD); builder.forwardDate(FORWARD); builder.receiveAmount(1000000d); builder....
@Test(expectedExceptions = IllegalArgumentException.class) void function() { final FXForwardTrade.Builder builder = FXForwardTrade.builder(); builder.tradeDate(NOW); builder.payCurrency(Currency.AUD); builder.forwardDate(FORWARD); builder.receiveAmount(1000000d); builder.correlationId(ExternalId.of("A", "B")); builder....
/** * Tests that fields must be set. */
Tests that fields must be set
testBuilderTDPCFDRACI
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/test/java/com/mcleodmoores/starling/client/portfolio/FXForwardTradeTest.java", "license": "apache-2.0", "size": 17069 }
[ "com.opengamma.id.ExternalId", "com.opengamma.util.money.Currency", "org.testng.annotations.Test" ]
import com.opengamma.id.ExternalId; import com.opengamma.util.money.Currency; import org.testng.annotations.Test;
import com.opengamma.id.*; import com.opengamma.util.money.*; import org.testng.annotations.*;
[ "com.opengamma.id", "com.opengamma.util", "org.testng.annotations" ]
com.opengamma.id; com.opengamma.util; org.testng.annotations;
2,134,254
private void removePrivilegeFromCatalog(String ownerString, PrincipalType ownerType, TPrivilege filter, TDdlExecResponse response) { Preconditions.checkNotNull(ownerString); Preconditions.checkNotNull(ownerType); Preconditions.checkNotNull(filter); try { PrincipalPrivilege removedPrivilege =...
void function(String ownerString, PrincipalType ownerType, TPrivilege filter, TDdlExecResponse response) { Preconditions.checkNotNull(ownerString); Preconditions.checkNotNull(ownerType); Preconditions.checkNotNull(filter); try { PrincipalPrivilege removedPrivilege = null; switch (ownerType) { case ROLE: removedPrivileg...
/** * This is a helper method to take care of catalog related updates when removing * a privilege. */
This is a helper method to take care of catalog related updates when removing a privilege
removePrivilegeFromCatalog
{ "repo_name": "cloudera/Impala", "path": "fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java", "license": "apache-2.0", "size": 192620 }
[ "com.google.common.base.Preconditions", "org.apache.hadoop.hive.metastore.api.PrincipalType", "org.apache.impala.catalog.CatalogException", "org.apache.impala.catalog.PrincipalPrivilege", "org.apache.impala.thrift.TDdlExecResponse", "org.apache.impala.thrift.TPrivilege" ]
import com.google.common.base.Preconditions; import org.apache.hadoop.hive.metastore.api.PrincipalType; import org.apache.impala.catalog.CatalogException; import org.apache.impala.catalog.PrincipalPrivilege; import org.apache.impala.thrift.TDdlExecResponse; import org.apache.impala.thrift.TPrivilege;
import com.google.common.base.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.impala.catalog.*; import org.apache.impala.thrift.*;
[ "com.google.common", "org.apache.hadoop", "org.apache.impala" ]
com.google.common; org.apache.hadoop; org.apache.impala;
1,395,377
private void setCellStyles(List<JRDesignStyle> styleList){ StandardTable table = getStandardTable(getElement()); List<BaseColumn> columns = TableUtil.getAllColumns(table); for(BaseColumn col : columns){ setColumnStyles(col, styleList); } for(BaseColumn baseCol : table.getColumns()){ if (baseCol in...
void function(List<JRDesignStyle> styleList){ StandardTable table = getStandardTable(getElement()); List<BaseColumn> columns = TableUtil.getAllColumns(table); for(BaseColumn col : columns){ setColumnStyles(col, styleList); } for(BaseColumn baseCol : table.getColumns()){ if (baseCol instanceof StandardColumnGroup){ Stan...
/** * * Apply the list of styles to the cell of the table. The styles are first set to null and then at * the style value, to force a graphical update (the style are not update if the name is the same) * * @param styleList list of styles that will be applied on the table, the order is important * and it s...
Apply the list of styles to the cell of the table. The styles are first set to null and then at the style value, to force a graphical update (the style are not update if the name is the same)
setCellStyles
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio.components/src/com/jaspersoft/studio/components/table/model/dialog/ApplyTableStyleAction.java", "license": "lgpl-3.0", "size": 15027 }
[ "java.util.List", "net.sf.jasperreports.components.table.BaseColumn", "net.sf.jasperreports.components.table.StandardColumnGroup", "net.sf.jasperreports.components.table.StandardTable", "net.sf.jasperreports.components.table.util.TableUtil", "net.sf.jasperreports.engine.design.JRDesignStyle" ]
import java.util.List; import net.sf.jasperreports.components.table.BaseColumn; import net.sf.jasperreports.components.table.StandardColumnGroup; import net.sf.jasperreports.components.table.StandardTable; import net.sf.jasperreports.components.table.util.TableUtil; import net.sf.jasperreports.engine.design.JRDesignSty...
import java.util.*; import net.sf.jasperreports.components.table.*; import net.sf.jasperreports.components.table.util.*; import net.sf.jasperreports.engine.design.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
2,073,997
@Test public void testSGLFutureIsDoneXml() throws Exception { long currentThreadId = 0; int i = 0; ResultsSingletonLocal bean = lookupSGLBean(); assertNotNull("Async Singleton Bean created successfully", bean); // call bean asynchronous method using Future<V> object to ...
void function() throws Exception { long currentThreadId = 0; int i = 0; ResultsSingletonLocal bean = lookupSGLBean(); assertNotNull(STR, bean); Future<String> future = bean.test_fireAndReturnResults(); while (i < 450 && !future.isDone()) { i++; Thread.sleep(waitTime); } assertTrue(STR, future.isDone()); String results ...
/** * Test calling a method, defined in XML to be Asynchronous, on an EJB 3.1 Singleton Session Bean * that returns results in a Future<String> object. Verification will be done via checking the * Future<V>.isDone() method prior to Future<V>.get() method is called to retrieve returned results. */
Test calling a method, defined in XML to be Asynchronous, on an EJB 3.1 Singleton Session Bean that returns results in a Future object. Verification will be done via checking the Future.isDone() method prior to Future.get() method is called to retrieve returned results
testSGLFutureIsDoneXml
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.async_fat/test-applications/AsyncTestWeb.war/src/com/ibm/ws/ejbcontainer/async/fat/web/ResultsXmlServlet.java", "license": "epl-1.0", "size": 19649 }
[ "com.ibm.ws.ejbcontainer.async.fat.xml.ejb.ResultsSingletonLocal", "com.ibm.ws.ejbcontainer.async.fat.xml.ejb.ResultsSingletonLocalFutureBean", "java.util.concurrent.Future", "org.junit.Assert" ]
import com.ibm.ws.ejbcontainer.async.fat.xml.ejb.ResultsSingletonLocal; import com.ibm.ws.ejbcontainer.async.fat.xml.ejb.ResultsSingletonLocalFutureBean; import java.util.concurrent.Future; import org.junit.Assert;
import com.ibm.ws.ejbcontainer.async.fat.xml.ejb.*; import java.util.concurrent.*; import org.junit.*;
[ "com.ibm.ws", "java.util", "org.junit" ]
com.ibm.ws; java.util; org.junit;
2,899,018
public Optional<DiscretePredicates> getDiscretePredicates() { return discretePredicates; }
Optional<DiscretePredicates> function() { return discretePredicates; }
/** * A collection of discrete predicates describing the data in this layout. The union of * these predicates is expected to be equivalent to the overall predicate returned * by {@link #getPredicate()}. They may be used by the engine for further optimizations. */
A collection of discrete predicates describing the data in this layout. The union of these predicates is expected to be equivalent to the overall predicate returned by <code>#getPredicate()</code>. They may be used by the engine for further optimizations
getDiscretePredicates
{ "repo_name": "shixuan-fan/presto", "path": "presto-spi/src/main/java/com/facebook/presto/spi/ConnectorTableLayout.java", "license": "apache-2.0", "size": 6196 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,307,910
JobLink findOne(String id);
JobLink findOne(String id);
/** * Find jobLink by specified id. * * @param id job link id. * * @return job link object. */
Find jobLink by specified id
findOne
{ "repo_name": "SergejMeister/intellijob", "path": "src/main/java/com/intellijob/repository/JobLinkRepository.java", "license": "apache-2.0", "size": 1383 }
[ "com.intellijob.domain.JobLink" ]
import com.intellijob.domain.JobLink;
import com.intellijob.domain.*;
[ "com.intellijob.domain" ]
com.intellijob.domain;
1,828,142
public void setTextDialing(boolean textMode, boolean forceRefresh) { if(!forceRefresh && (isDigit != null && isDigit == !textMode)) { // Nothing to do return; } isDigit = !textMode; if(digits == null) { return; } if(isDigit) { ...
void function(boolean textMode, boolean forceRefresh) { if(!forceRefresh && (isDigit != null && isDigit == !textMode)) { return; } isDigit = !textMode; if(digits == null) { return; } if(isDigit) { digits.getText().clear(); digits.addTextChangedListener(digitFormater); }else { digits.removeTextChangedListener(digitForma...
/** * Set the mode of the text/digit input. * * @param textMode True if text mode. False if digit mode */
Set the mode of the text/digit input
setTextDialing
{ "repo_name": "xiejianying/csipsimple", "path": "src/com/csipsimple/ui/dialpad/DialerFragment.java", "license": "lgpl-3.0", "size": 34540 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,656,997
public static long getFileSize(String filePath) { FileFactory.FileType fileType = FileFactory.getFileType(filePath); CarbonFile carbonFile = FileFactory.getCarbonFile(filePath, fileType); return carbonFile.getSize(); }
static long function(String filePath) { FileFactory.FileType fileType = FileFactory.getFileType(filePath); CarbonFile carbonFile = FileFactory.getCarbonFile(filePath, fileType); return carbonFile.getSize(); }
/** * This method will return the size of a given file */
This method will return the size of a given file
getFileSize
{ "repo_name": "HuaweiBigData/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java", "license": "apache-2.0", "size": 71009 }
[ "org.apache.carbondata.core.datastore.filesystem.CarbonFile", "org.apache.carbondata.core.datastore.impl.FileFactory" ]
import org.apache.carbondata.core.datastore.filesystem.CarbonFile; import org.apache.carbondata.core.datastore.impl.FileFactory;
import org.apache.carbondata.core.datastore.filesystem.*; import org.apache.carbondata.core.datastore.impl.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
673,704
void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException;
void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException;
/** * Marshals the key info to XML. * * @param parent a mechanism-specific structure containing the parent node * that the marshalled key info will be appended to * @param context the <code>XMLCryptoContext</code> containing additional * context (may be null if not applicable) *...
Marshals the key info to XML
marshal
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/javax/xml/crypto/dsig/keyinfo/KeyInfo.java", "license": "mit", "size": 4679 }
[ "javax.xml.crypto.MarshalException", "javax.xml.crypto.XMLCryptoContext", "javax.xml.crypto.XMLStructure" ]
import javax.xml.crypto.MarshalException; import javax.xml.crypto.XMLCryptoContext; import javax.xml.crypto.XMLStructure;
import javax.xml.crypto.*;
[ "javax.xml" ]
javax.xml;
1,387,568
public void getData() { logDebug(BaseMessages.getString(PKG, "AddFilterSequenceDialog.Log.GettingKeyInfo")); if (input.getFieldName() != null) { wFieldName.setText(input.getFieldName()); } wStartAt.setText(Const.NVL(input.getStartAt(), "1")); wIncrBy.setText(Const.NVL(input.getIncrementBy(), "1")); ...
void function() { logDebug(BaseMessages.getString(PKG, STR)); if (input.getFieldName() != null) { wFieldName.setText(input.getFieldName()); } wStartAt.setText(Const.NVL(input.getStartAt(), "1")); wIncrBy.setText(Const.NVL(input.getIncrementBy(), "1")); enableFields(); wStepname.selectAll(); wStepname.setFocus(); }
/** * Copy information from the meta-data input to the dialog fields. */
Copy information from the meta-data input to the dialog fields
getData
{ "repo_name": "haishiro/add-filter-sequence", "path": "src/plugin/step/AddFilterSequenceDialog.java", "license": "apache-2.0", "size": 12418 }
[ "org.pentaho.di.core.Const", "org.pentaho.di.i18n.BaseMessages" ]
import org.pentaho.di.core.Const; import org.pentaho.di.i18n.BaseMessages;
import org.pentaho.di.core.*; import org.pentaho.di.i18n.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,835,070
public SortHLAPI getOutputHLAPI(){ if(item.getOutput() == null) return null; Sort object = item.getOutput(); if(object.getClass().equals(fr.lip6.move.pnml.symmetricnet.integers.impl.NaturalImpl.class)){ return new fr.lip6.move.pnml.symmetricnet.integers.hlapi.NaturalHLAPI((fr.lip6.move.pnml.symmetric...
SortHLAPI function(){ if(item.getOutput() == null) return null; Sort object = item.getOutput(); if(object.getClass().equals(fr.lip6.move.pnml.symmetricnet.integers.impl.NaturalImpl.class)){ return new fr.lip6.move.pnml.symmetricnet.integers.hlapi.NaturalHLAPI((fr.lip6.move.pnml.symmetricnet.integers.Natural)object); } ...
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getOutputHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/integers/hlapi/AdditionHLAPI.java", "license": "epl-1.0", "size": 89787 }
[ "fr.lip6.move.pnml.symmetricnet.terms.Sort", "fr.lip6.move.pnml.symmetricnet.terms.hlapi.SortHLAPI" ]
import fr.lip6.move.pnml.symmetricnet.terms.Sort; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.SortHLAPI;
import fr.lip6.move.pnml.symmetricnet.terms.*; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,691,079
protected PropertyDescriptor property(String name, TypeEditor editor) { PropertyDescriptor property = property(name); if (property != null) { property.setValue(GenericTestBeanCustomizer.GUITYPE, editor); } return property; }
PropertyDescriptor function(String name, TypeEditor editor) { PropertyDescriptor property = property(name); if (property != null) { property.setValue(GenericTestBeanCustomizer.GUITYPE, editor); } return property; }
/** * Get the property descriptor for the property of the given name. * Sets the GUITYPE to the provided editor. * * @param name * property name * @param editor the TypeEditor enum that describes the property editor * * @return descriptor for a property of that name, o...
Get the property descriptor for the property of the given name. Sets the GUITYPE to the provided editor
property
{ "repo_name": "hizhangqi/jmeter-1", "path": "src/core/org/apache/jmeter/testbeans/BeanInfoSupport.java", "license": "apache-2.0", "size": 11826 }
[ "java.beans.PropertyDescriptor", "org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer", "org.apache.jmeter.testbeans.gui.TypeEditor" ]
import java.beans.PropertyDescriptor; import org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer; import org.apache.jmeter.testbeans.gui.TypeEditor;
import java.beans.*; import org.apache.jmeter.testbeans.gui.*;
[ "java.beans", "org.apache.jmeter" ]
java.beans; org.apache.jmeter;
1,989,372
byte[] getRowKey(@Nonnull final GradoopId gradoopId) throws IOException;
byte[] getRowKey(@Nonnull final GradoopId gradoopId) throws IOException;
/** * Creates a globally unique row key based on the given gradoop id. The * created row key is used to persist the entity in the graph store. * * @param gradoopId the gradoop id used to create row key from * @return persistent entity identifier * @throws IOException on failure */
Creates a globally unique row key based on the given gradoop id. The created row key is used to persist the entity in the graph store
getRowKey
{ "repo_name": "galpha/gradoop", "path": "gradoop-store/gradoop-hbase/src/main/java/org/gradoop/storage/hbase/impl/api/ElementHandler.java", "license": "apache-2.0", "size": 5449 }
[ "java.io.IOException", "javax.annotation.Nonnull", "org.gradoop.common.model.impl.id.GradoopId" ]
import java.io.IOException; import javax.annotation.Nonnull; import org.gradoop.common.model.impl.id.GradoopId;
import java.io.*; import javax.annotation.*; import org.gradoop.common.model.impl.id.*;
[ "java.io", "javax.annotation", "org.gradoop.common" ]
java.io; javax.annotation; org.gradoop.common;
1,907,206
jpDepartaments = new javax.swing.JPanel(); setLayout(new java.awt.BorderLayout()); jpDepartaments.setLayout(new java.awt.BorderLayout()); add(jpDepartaments, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents
jpDepartaments = new javax.swing.JPanel(); setLayout(new java.awt.BorderLayout()); jpDepartaments.setLayout(new java.awt.BorderLayout()); add(jpDepartaments, java.awt.BorderLayout.CENTER); }
/** * 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": "swaplicado/siie32", "path": "src/erp/mod/hrs/form/SPanelHrsDepartmentsWithReceipts.java", "license": "mit", "size": 11178 }
[ "java.awt.BorderLayout" ]
import java.awt.BorderLayout;
import java.awt.*;
[ "java.awt" ]
java.awt;
331,056
protected java.sql.PreparedStatement prepareMetaDataSafeStatement(String sql) throws SQLException { // Can't use server-side here as we coerce a lot of types to match // the spec. java.sql.PreparedStatement pStmt = this.conn.clientPrepareStatement(sql); if (pStmt.getMaxRows() != 0) { pStmt.setMaxRows(0);...
java.sql.PreparedStatement function(String sql) throws SQLException { java.sql.PreparedStatement pStmt = this.conn.clientPrepareStatement(sql); if (pStmt.getMaxRows() != 0) { pStmt.setMaxRows(0); } ((com.mysql.jdbc.Statement) pStmt).setHoldResultsOpenOverClose(true); return pStmt; }
/** * Get a prepared statement to query information_schema tables. * * @return PreparedStatement * @throws SQLException */
Get a prepared statement to query information_schema tables
prepareMetaDataSafeStatement
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-database/mysql.src/com/mysql/jdbc/DatabaseMetaData.java", "license": "lgpl-3.0", "size": 275823 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,357,007
public Set<Resource.Type> getViewResourceTypes() { return resourceProviders.keySet(); }
Set<Resource.Type> function() { return resourceProviders.keySet(); }
/** * Get the set of resource types for this view. * * @return the set of resource type */
Get the set of resource types for this view
getViewResourceTypes
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewEntity.java", "license": "apache-2.0", "size": 20984 }
[ "java.util.Set", "org.apache.ambari.server.controller.spi.Resource" ]
import java.util.Set; import org.apache.ambari.server.controller.spi.Resource;
import java.util.*; import org.apache.ambari.server.controller.spi.*;
[ "java.util", "org.apache.ambari" ]
java.util; org.apache.ambari;
2,698,029
private String buildWidgetUrl(MicroPaymentConfig config, MicroPaymentCustomization customization) { long timestamp = System.currentTimeMillis(); String jsonButtonConfig = buildJsonConfig(config, timestamp); QueryString query = new QueryString(); query.add("customization", buildCusto...
String function(MicroPaymentConfig config, MicroPaymentCustomization customization) { long timestamp = System.currentTimeMillis(); String jsonButtonConfig = buildJsonConfig(config, timestamp); QueryString query = new QueryString(); query.add(STR, buildCustomizationJson(customization)); if (this.appID == null this.appSe...
/** * Build the URL based on the configuration and customization options. * * @param config the config to be sent to the server * @param customization button customization options * * @return the URL to send the request data */
Build the URL based on the configuration and customization options
buildWidgetUrl
{ "repo_name": "xapo/java-sdk", "path": "java-api/src/main/java/com/xapo/tools/widgets/MicroPayment.java", "license": "bsd-3-clause", "size": 6373 }
[ "com.xapo.utils.url.QueryString" ]
import com.xapo.utils.url.QueryString;
import com.xapo.utils.url.*;
[ "com.xapo.utils" ]
com.xapo.utils;
1,931,988
public Accessible getAccessibleParent() { return super.getAccessibleParent(); }
Accessible function() { return super.getAccessibleParent(); }
/** * Get the Accessible parent of this object. * * @return the accessible parent if it exists. */
Get the Accessible parent of this object
getAccessibleParent
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/JTree.java", "license": "bsd-3-clause", "size": 80712 }
[ "javax.accessibility.Accessible" ]
import javax.accessibility.Accessible;
import javax.accessibility.*;
[ "javax.accessibility" ]
javax.accessibility;
1,667,646
public Check<T> setLabel(IModel<String> labelModel) { setLabelInternal(labelModel); return this; }
Check<T> function(IModel<String> labelModel) { setLabelInternal(labelModel); return this; }
/** * The value will be made available to the validator property by means of ${label}. It does not * have any specific meaning to Check itself. * * @param labelModel * @return this for chaining */
The value will be made available to the validator property by means of ${label}. It does not have any specific meaning to Check itself
setLabel
{ "repo_name": "astubbs/wicket.get-portals2", "path": "wicket/src/main/java/org/apache/wicket/markup/html/form/Check.java", "license": "apache-2.0", "size": 6083 }
[ "org.apache.wicket.model.IModel" ]
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,861,000
public Future<RowSet<Row>> select(String sql) { return Future.future(promise -> select(sql, promise)); }
Future<RowSet<Row>> function(String sql) { return Future.future(promise -> select(sql, promise)); }
/** * Run a select query. * * <p>To update see {@link #execute(String, Handler)}. * * @param sql - the sql query to run * @return future result */
Run a select query. To update see <code>#execute(String, Handler)</code>
select
{ "repo_name": "folio-org/raml-module-builder", "path": "domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java", "license": "apache-2.0", "size": 164512 }
[ "io.vertx.core.Future", "io.vertx.sqlclient.Row", "io.vertx.sqlclient.RowSet" ]
import io.vertx.core.Future; import io.vertx.sqlclient.Row; import io.vertx.sqlclient.RowSet;
import io.vertx.core.*; import io.vertx.sqlclient.*;
[ "io.vertx.core", "io.vertx.sqlclient" ]
io.vertx.core; io.vertx.sqlclient;
367,333
public static Object[][] getSearchData(String testCase) { try { return xlsWorker.getDataForTest(testCase); } catch (Exception e) { e.printStackTrace(); System.out.println("Can't read the test data"); return null; } } /** * Method to get the driver. WebDriver type is determined in ...
static Object[][] function(String testCase) { try { return xlsWorker.getDataForTest(testCase); } catch (Exception e) { e.printStackTrace(); System.out.println(STR); return null; } } /** * Method to get the driver. WebDriver type is determined in * config.properties. By the default returns an instance of * {@link Firefo...
/** * Method to get the data for dataProvider from the file * ** @param testCase * Test case * * @return array of data */
Method to get the data for dataProvider from the file @param testCase Test case
getSearchData
{ "repo_name": "Natalya11444/GitHub-Test-Framework", "path": "src/com/nat/test/TestData.java", "license": "mit", "size": 7494 }
[ "org.openqa.selenium.WebDriver", "org.openqa.selenium.firefox.FirefoxDriver" ]
import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.*; import org.openqa.selenium.firefox.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,687,781
@Nullable public static Result findRequiredPermissions( @NonNull Operation operation, @NonNull JavaContext context, @NonNull Node parameter) { // To find the permission required by an intent, we proceed in 3 steps: // (1) Locate the parameter in the start cal...
static Result function( @NonNull Operation operation, @NonNull JavaContext context, @NonNull Node parameter) { return new PermissionFinder(context, operation).search(parameter); } private PermissionFinder(@NonNull JavaContext context, @NonNull Operation operation) { mContext = context; mOperation = operation; } @NonNul...
/** * Searches for a permission requirement for the given parameter in the given call * * @param operation the operation to look up * @param context the context to use for lookup * @param parameter the parameter which contains the value which implies the permission * @return the result w...
Searches for a permission requirement for the given parameter in the given call
findRequiredPermissions
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/lint-checks/src/main/java/com/android/tools/lint/checks/PermissionFinder.java", "license": "gpl-3.0", "size": 11126 }
[ "com.android.annotations.NonNull", "com.android.tools.lint.detector.api.JavaContext" ]
import com.android.annotations.NonNull; import com.android.tools.lint.detector.api.JavaContext;
import com.android.annotations.*; import com.android.tools.lint.detector.api.*;
[ "com.android.annotations", "com.android.tools" ]
com.android.annotations; com.android.tools;
1,225,874
public boolean onActivityResult(int requestCode, int resultCode, Intent data) { return false; }
boolean function(int requestCode, int resultCode, Intent data) { return false; }
/** * Responds to the intent result if the intent was created by the native window. * @param requestCode Request code of the requested intent. * @param resultCode Result code of the requested intent. * @param data The data returned by the intent. * @return Boolean value of whether the intent wa...
Responds to the intent result if the intent was created by the native window
onActivityResult
{ "repo_name": "boundarydevices/android_external_chromium_org", "path": "ui/android/java/src/org/chromium/ui/base/WindowAndroid.java", "license": "bsd-3-clause", "size": 11080 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
927,416
protected IAnalysisCache createAnalysisCache() throws IOException { IAnalysisCache analysisCache = ClassFactory.instance().createAnalysisCache(classPath, bugReporter); // Register the "built-in" analysis engines registerBuiltInAnalysisEngines(analysisCache); // Register analysis en...
IAnalysisCache function() throws IOException { IAnalysisCache analysisCache = ClassFactory.instance().createAnalysisCache(classPath, bugReporter); registerBuiltInAnalysisEngines(analysisCache); registerPluginAnalysisEngines(detectorFactoryCollection, analysisCache); analysisCache.eagerlyPutDatabase(DetectorFactoryColle...
/** * Create the analysis cache object and register it for current execution thread. * <p> * This method is protected to allow clients override it and possibly reuse * some previous analysis data (for Eclipse interactive re-build) * * @throws IOException * if error occurs ...
Create the analysis cache object and register it for current execution thread. This method is protected to allow clients override it and possibly reuse some previous analysis data (for Eclipse interactive re-build)
createAnalysisCache
{ "repo_name": "spotbugs/spotbugs", "path": "spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java", "license": "lgpl-2.1", "size": 51119 }
[ "edu.umd.cs.findbugs.classfile.Global", "edu.umd.cs.findbugs.classfile.IAnalysisCache", "edu.umd.cs.findbugs.classfile.impl.ClassFactory", "java.io.IOException" ]
import edu.umd.cs.findbugs.classfile.Global; import edu.umd.cs.findbugs.classfile.IAnalysisCache; import edu.umd.cs.findbugs.classfile.impl.ClassFactory; import java.io.IOException;
import edu.umd.cs.findbugs.classfile.*; import edu.umd.cs.findbugs.classfile.impl.*; import java.io.*;
[ "edu.umd.cs", "java.io" ]
edu.umd.cs; java.io;
2,215,176
protected UnicodeUtil getUnicodeUtil() { return UnicodeUtilImpl.getInstance(); }
UnicodeUtil function() { return UnicodeUtilImpl.getInstance(); }
/** * This method gets the {@link UnicodeUtil} instance to test. * * @return the {@link UnicodeUtil}. */
This method gets the <code>UnicodeUtil</code> instance to test
getUnicodeUtil
{ "repo_name": "m-m-m/util", "path": "text/src/test/java/net/sf/mmm/util/text/base/UnicodeUtilTest.java", "license": "apache-2.0", "size": 1781 }
[ "net.sf.mmm.util.text.api.UnicodeUtil" ]
import net.sf.mmm.util.text.api.UnicodeUtil;
import net.sf.mmm.util.text.api.*;
[ "net.sf.mmm" ]
net.sf.mmm;
1,313,784
public static void buildTag(Writer writer, String tagName, boolean tagValue) throws IOException { XMLUtil.buildTag(writer, tagName, Boolean.toString(tagValue), false); }
static void function(Writer writer, String tagName, boolean tagValue) throws IOException { XMLUtil.buildTag(writer, tagName, Boolean.toString(tagValue), false); }
/** * Utility method for building an XML tag of the form &lt;tagName&gt;value&lt;/tagName&gt;. * * @param writer The writer to write the XML tag output to. * @param tagName The name of the XML tag, such as &lt;tagName&gt;value&lt;/tagName&gt;. * @param tagValue The value of the XML tag, such as &lt;tagName&gt...
Utility method for building an XML tag of the form &lt;tagName&gt;value&lt;/tagName&gt;
buildTag
{ "repo_name": "opendatakraken/openbiwiki", "path": "openbiwiki-core/src/main/java/org/jamwiki/utils/XMLUtil.java", "license": "mit", "size": 14586 }
[ "java.io.IOException", "java.io.Writer" ]
import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
609,442
public Vector toVector() { return new Vector(x, y, z); }
Vector function() { return new Vector(x, y, z); }
/** * Constructs a new {@link Vector} based on this Location * * @return New Vector containing the coordinates represented by this * Location */
Constructs a new <code>Vector</code> based on this Location
toVector
{ "repo_name": "GlowstonePlusPlus/Glowkit", "path": "src/main/java/org/bukkit/Location.java", "license": "gpl-3.0", "size": 17067 }
[ "org.bukkit.util.Vector" ]
import org.bukkit.util.Vector;
import org.bukkit.util.*;
[ "org.bukkit.util" ]
org.bukkit.util;
1,242,014
private void accountAddedInternal() { String jsonString; try (FileInputStream fIn = new FileInputStream(new File(STASH_FILE))) { DataInputStream in = new DataInputStream(fIn); jsonString = in.readUTF(); } catch (FileNotFoundException fnfe) { // This is ex...
void function() { String jsonString; try (FileInputStream fIn = new FileInputStream(new File(STASH_FILE))) { DataInputStream in = new DataInputStream(fIn); jsonString = in.readUTF(); } catch (FileNotFoundException fnfe) { if (DEBUG) Log.d(TAG, STR, fnfe); return; } catch (IOException ioe) { if (DEBUG) Log.d(TAG, STR, i...
/** * Restore SyncSettings for all existing accounts from a stashed backup-set */
Restore SyncSettings for all existing accounts from a stashed backup-set
accountAddedInternal
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/com/android/server/backup/AccountSyncSettingsBackupHelper.java", "license": "apache-2.0", "size": 18046 }
[ "android.util.Log", "java.io.DataInputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.IOException", "org.json.JSONArray", "org.json.JSONException" ]
import android.util.Log; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import org.json.JSONArray; import org.json.JSONException;
import android.util.*; import java.io.*; import org.json.*;
[ "android.util", "java.io", "org.json" ]
android.util; java.io; org.json;
1,347,862
public JSONObject handleResourceRequest(User user, JSONObject object) throws JSONException { LOG.debug("Handling resource request for user " + user); try { // if there is already a request ID, get query belonging to it if (object.has("requestId")) { String requestId = object.getString("requestId")...
JSONObject function(User user, JSONObject object) throws JSONException { LOG.debug(STR + user); try { if (object.has(STR)) { String requestId = object.getString(STR); return waitForFuture(requestId); } ResourceModule module = CloudManagerApp.getInstance().getResourceModule(object.getString(STR)); if (module == null) { ...
/** * Handles the given resource request, which can be a new request or a reference to a previously submitted one. See class * Javadoc for details on the JSON object parameter. * * @param user * User submitting the request. * @param object * Request object. * @return A JSO...
Handles the given resource request, which can be a new request or a reference to a previously submitted one. See class Javadoc for details on the JSON object parameter
handleResourceRequest
{ "repo_name": "AludraTest/cloud-manager-impl", "path": "src/main/java/org/aludratest/cloud/impl/request/ClientRequestHandler.java", "license": "apache-2.0", "size": 18338 }
[ "java.sql.SQLException", "java.util.HashMap", "java.util.Iterator", "java.util.Map", "org.aludratest.cloud.app.CloudManagerApp", "org.aludratest.cloud.impl.app.CloudManagerApplicationHolder", "org.aludratest.cloud.impl.app.DatabaseRequestLogger", "org.aludratest.cloud.module.ResourceModule", "org.al...
import java.sql.SQLException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.aludratest.cloud.app.CloudManagerApp; import org.aludratest.cloud.impl.app.CloudManagerApplicationHolder; import org.aludratest.cloud.impl.app.DatabaseRequestLogger; import org.aludratest.cloud.module.Res...
import java.sql.*; import java.util.*; import org.aludratest.cloud.app.*; import org.aludratest.cloud.impl.app.*; import org.aludratest.cloud.module.*; import org.aludratest.cloud.resource.user.*; import org.aludratest.cloud.user.*; import org.json.*;
[ "java.sql", "java.util", "org.aludratest.cloud", "org.json" ]
java.sql; java.util; org.aludratest.cloud; org.json;
505,037
public void setIncludes(String includes) { if (includes != null) { this.irpm = new RegexpPatternMapper(); this.irpm.setFrom(includes); this.irpm.setTo("."); // mandatory } else { this.irpm = null; } }
void function(String includes) { if (includes != null) { this.irpm = new RegexpPatternMapper(); this.irpm.setFrom(includes); this.irpm.setTo("."); } else { this.irpm = null; } }
/** * Setter for task parameter * * @param includes * A regexp for files to include. It is taken into account only * when producing a classpath, doesn't work on source or output * files. It is a real regexp, not a "*" expression. */
Setter for task parameter
setIncludes
{ "repo_name": "cniweb/ant-contrib", "path": "ant-contrib/src/main/java/net/sf/antcontrib/antclipse/ClassPathTask.java", "license": "apache-2.0", "size": 14832 }
[ "org.apache.tools.ant.util.RegexpPatternMapper" ]
import org.apache.tools.ant.util.RegexpPatternMapper;
import org.apache.tools.ant.util.*;
[ "org.apache.tools" ]
org.apache.tools;
1,708,886
static <T> GraphTraversal<T, Edge> isEdge(GraphTraversal<T, ? extends Element> traversal) { // This cast is safe because we filter only to edges //noinspection unchecked return (GraphTraversal<T, Edge>) traversal.hasNot(Schema.VertexProperty.ID.name()); }
static <T> GraphTraversal<T, Edge> isEdge(GraphTraversal<T, ? extends Element> traversal) { return (GraphTraversal<T, Edge>) traversal.hasNot(Schema.VertexProperty.ID.name()); }
/** * Create a traversal that filters to only edges */
Create a traversal that filters to only edges
isEdge
{ "repo_name": "pluraliseseverythings/grakn", "path": "grakn-graql/src/main/java/ai/grakn/graql/internal/gremlin/fragment/Fragments.java", "license": "gpl-3.0", "size": 9613 }
[ "ai.grakn.util.Schema", "org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal", "org.apache.tinkerpop.gremlin.structure.Edge", "org.apache.tinkerpop.gremlin.structure.Element" ]
import ai.grakn.util.Schema; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.structure.Edge; import org.apache.tinkerpop.gremlin.structure.Element;
import ai.grakn.util.*; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.*; import org.apache.tinkerpop.gremlin.structure.*;
[ "ai.grakn.util", "org.apache.tinkerpop" ]
ai.grakn.util; org.apache.tinkerpop;
1,320,333
public Resource getIcon() { return icon; }
Resource function() { return icon; }
/** * Returns the action's icon. * * @return the action's Icon. */
Returns the action's icon
getIcon
{ "repo_name": "peterl1084/framework", "path": "server/src/main/java/com/vaadin/event/Action.java", "license": "apache-2.0", "size": 6369 }
[ "com.vaadin.server.Resource" ]
import com.vaadin.server.Resource;
import com.vaadin.server.*;
[ "com.vaadin.server" ]
com.vaadin.server;
1,501,791
public void saveImage(InputStream data) throws IOException { SilverpeasFile image = SilverpeasFileProvider.newFile(getImagePath()); image.writeFrom(data); }
void function(InputStream data) throws IOException { SilverpeasFile image = SilverpeasFileProvider.newFile(getImagePath()); image.writeFrom(data); }
/** * In case of unit upload * @param data * @throws IOException */
In case of unit upload
saveImage
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-war/src/main/java/org/silverpeas/web/directory/servlets/ImageProfil.java", "license": "agpl-3.0", "size": 2890 }
[ "java.io.IOException", "java.io.InputStream", "org.silverpeas.core.io.file.SilverpeasFile", "org.silverpeas.core.io.file.SilverpeasFileProvider" ]
import java.io.IOException; import java.io.InputStream; import org.silverpeas.core.io.file.SilverpeasFile; import org.silverpeas.core.io.file.SilverpeasFileProvider;
import java.io.*; import org.silverpeas.core.io.file.*;
[ "java.io", "org.silverpeas.core" ]
java.io; org.silverpeas.core;
530,287