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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
EClass getAction(); | EClass getAction(); | /**
* Returns the meta object for class '{@link org.etl.sparrow.Action <em>Action</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Action</em>'.
* @see org.etl.sparrow.Action
* @generated
*/ | Returns the meta object for class '<code>org.etl.sparrow.Action Action</code>'. | getAction | {
"repo_name": "jpvelsamy/sparrow",
"path": "org.etl.dsl.etl.Sparrow/src-gen/org/etl/sparrow/SparrowPackage.java",
"license": "apache-2.0",
"size": 104623
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,143,299 |
public static <T> Func1<String, T> stringToPojo(Class<T> targetType) {
return jsonString -> {
try {
return jsonFactory.createParser(jsonString).readValueAs(targetType);
}
catch (IOException ex) {
throw new JsonPipelineInputException(500, "Failed to create entity of " + targetType... | static <T> Func1<String, T> function(Class<T> targetType) { return jsonString -> { try { return jsonFactory.createParser(jsonString).readValueAs(targetType); } catch (IOException ex) { throw new JsonPipelineInputException(500, STR + targetType.getName() + STR, ex); } }; } | /**
* Returns a function that will instantiate a bean of the given class, with values copied from the JSON string
* @param targetType the POJO class that matches the expected JSON structure
* @return a function that takes a JSON string and returns a new instance of the target type
* @throws JsonPipelineInpu... | Returns a function that will instantiate a bean of the given class, with values copied from the JSON string | stringToPojo | {
"repo_name": "wcm-io-caravan/caravan-pipeline",
"path": "impl/src/main/java/io/wcm/caravan/pipeline/impl/JacksonFunctions.java",
"license": "apache-2.0",
"size": 7792
} | [
"io.wcm.caravan.pipeline.JsonPipelineInputException",
"java.io.IOException"
] | import io.wcm.caravan.pipeline.JsonPipelineInputException; import java.io.IOException; | import io.wcm.caravan.pipeline.*; import java.io.*; | [
"io.wcm.caravan",
"java.io"
] | io.wcm.caravan; java.io; | 962,922 |
private void showStatusChanger() {
final StatusChangePopup pop = new StatusChangePopup( asset.getUuid(),
false );
pop.setChangeStatusEvent( new Command() { | void function() { final StatusChangePopup pop = new StatusChangePopup( asset.getUuid(), false ); pop.setChangeStatusEvent( new Command() { | /**
* Show the state change popup.
*/ | Show the state change popup | showStatusChanger | {
"repo_name": "Rikkola/guvnor",
"path": "guvnor-webapp/src/main/java/org/drools/guvnor/client/ruleeditor/RuleViewer.java",
"license": "apache-2.0",
"size": 29272
} | [
"com.google.gwt.user.client.Command",
"org.drools.guvnor.client.common.StatusChangePopup"
] | import com.google.gwt.user.client.Command; import org.drools.guvnor.client.common.StatusChangePopup; | import com.google.gwt.user.client.*; import org.drools.guvnor.client.common.*; | [
"com.google.gwt",
"org.drools.guvnor"
] | com.google.gwt; org.drools.guvnor; | 2,417,269 |
public void stopService() {
Log.d(TAG, "Stopping service..");
notificationManager.cancel(NOTIFICATION_ID);
jobsQueue.removeAll(jobsQueue); // TODO is this safe?
isRunning = false;
// kill service
stopSelf();
} | void function() { Log.d(TAG, STR); notificationManager.cancel(NOTIFICATION_ID); jobsQueue.removeAll(jobsQueue); isRunning = false; stopSelf(); } | /**
* Stop OBD connection and queue processing.
*/ | Stop OBD connection and queue processing | stopService | {
"repo_name": "PhilippGrulich/android-obd-reader",
"path": "src/main/java/com/github/pires/obd/reader/io/MockObdGatewayService.java",
"license": "apache-2.0",
"size": 4371
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,637,623 |
default void checkCanRenameView(SystemSecurityContext context, CatalogSchemaTableName view, CatalogSchemaTableName newView)
{
denyRenameTable(view.toString(), newView.toString());
} | default void checkCanRenameView(SystemSecurityContext context, CatalogSchemaTableName view, CatalogSchemaTableName newView) { denyRenameTable(view.toString(), newView.toString()); } | /**
* Check if identity is allowed to rename the specified view in a catalog.
*
* @throws AccessDeniedException if not allowed
*/ | Check if identity is allowed to rename the specified view in a catalog | checkCanRenameView | {
"repo_name": "hgschmie/presto",
"path": "presto-spi/src/main/java/io/prestosql/spi/security/SystemAccessControl.java",
"license": "apache-2.0",
"size": 21168
} | [
"io.prestosql.spi.connector.CatalogSchemaTableName",
"io.prestosql.spi.security.AccessDeniedException"
] | import io.prestosql.spi.connector.CatalogSchemaTableName; import io.prestosql.spi.security.AccessDeniedException; | import io.prestosql.spi.connector.*; import io.prestosql.spi.security.*; | [
"io.prestosql.spi"
] | io.prestosql.spi; | 2,564,716 |
private String sign(final Long timestamp, String secret) throws NoSuchAlgorithmException, InvalidKeyException {
String stringToSign = timestamp + "\n" + secret;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(stringToSign.getBytes(), "HmacSHA256"));
byte[] signDat... | String function(final Long timestamp, String secret) throws NoSuchAlgorithmException, InvalidKeyException { String stringToSign = timestamp + "\n" + secret; Mac mac = Mac.getInstance(STR); mac.init(new SecretKeySpec(stringToSign.getBytes(), STR)); byte[] signData = mac.doFinal(); return Base64.encodeBase64String(signDa... | /**
* Sign webhook url using HmacSHA256 algorithm
*/ | Sign webhook url using HmacSHA256 algorithm | sign | {
"repo_name": "ascrutae/sky-walking",
"path": "oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/feishu/FeishuHookCallback.java",
"license": "apache-2.0",
"size": 7729
} | [
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"javax.crypto.Mac",
"javax.crypto.spec.SecretKeySpec",
"org.apache.commons.codec.binary.Base64"
] | import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Base64; | import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import org.apache.commons.codec.binary.*; | [
"java.security",
"javax.crypto",
"org.apache.commons"
] | java.security; javax.crypto; org.apache.commons; | 396,533 |
public void createSink(
com.google.logging.v2.CreateSinkRequest request,
io.grpc.stub.StreamObserver<com.google.logging.v2.LogSink> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCreateSinkMethodHelper(), getCallOptions()),
request,
responseObserver);... | void function( com.google.logging.v2.CreateSinkRequest request, io.grpc.stub.StreamObserver<com.google.logging.v2.LogSink> responseObserver) { asyncUnaryCall( getChannel().newCall(getCreateSinkMethodHelper(), getCallOptions()), request, responseObserver); } | /**
*
*
* <pre>
* Creates a sink that exports specified log entries to a destination. The
* export of newly-ingested log entries begins immediately, unless the sink's
* `writer_identity` is not permitted to write to the destination. A sink can
* export log entries only from the reso... | <code> Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's `writer_identity` is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. </code> | createSink | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java",
"license": "apache-2.0",
"size": 57256
} | [
"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; | 852,864 |
//-----------------------------------------------------------------------
public UniqueId getNotionalId() {
return _notionalId;
} | UniqueId function() { return _notionalId; } | /**
* Gets the identifier of the index or security.
* @return the value of the property, not null
*/ | Gets the identifier of the index or security | getNotionalId | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/swap/SecurityNotional.java",
"license": "apache-2.0",
"size": 6690
} | [
"com.opengamma.id.UniqueId"
] | import com.opengamma.id.UniqueId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 2,155,985 |
public void setDirectionEstimator(DirectionEstimator directionEstimator) {
this.directionEstimator = directionEstimator;
if ((directionEstimator == null) != (handlerRegistration == null)) {
if (directionEstimator == null) {
handlerRegistration.removeHandler();
handlerRegistration = null;... | void function(DirectionEstimator directionEstimator) { this.directionEstimator = directionEstimator; if ((directionEstimator == null) != (handlerRegistration == null)) { if (directionEstimator == null) { handlerRegistration.removeHandler(); handlerRegistration = null; } else { handlerRegistration = target.addKeyUpHandl... | /**
* Sets the DirectionEstimator object.
*/ | Sets the DirectionEstimator object | setDirectionEstimator | {
"repo_name": "syntelos/gwtcc",
"path": "src/com/google/gwt/i18n/client/AutoDirectionHandler.java",
"license": "apache-2.0",
"size": 6179
} | [
"com.google.gwt.i18n.shared.DirectionEstimator"
] | import com.google.gwt.i18n.shared.DirectionEstimator; | import com.google.gwt.i18n.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,323,469 |
protected static <K, V> Map<K, V> newSynchronizedMap() {
return newSynchronizedMap(null);
} | static <K, V> Map<K, V> function() { return newSynchronizedMap(null); } | /**
* Creates a new empty synchronized map.
*
* @param <K> the key type
* @param <V> the value type
*
* @return the synchronized map
*/ | Creates a new empty synchronized map | newSynchronizedMap | {
"repo_name": "autermann/SOS",
"path": "core/cache/src/main/java/org/n52/sos/cache/AbstractContentCache.java",
"license": "gpl-2.0",
"size": 6700
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,247,050 |
public static OutlineSection create(View view, AppContext appContext, OutlineModel outlineModel,
OutlineController outlineController) {
// Create the Tree presenter.
OutlineNodeRenderer nodeRenderer = new OutlineNodeRenderer(appContext.getResources());
OutlineNodeDataAdapter nodeDataAdapter = new Ou... | static OutlineSection function(View view, AppContext appContext, OutlineModel outlineModel, OutlineController outlineController) { OutlineNodeRenderer nodeRenderer = new OutlineNodeRenderer(appContext.getResources()); OutlineNodeDataAdapter nodeDataAdapter = new OutlineNodeDataAdapter(); Tree<OutlineNode> tree = Tree.c... | /**
* Static factory method for obtaining an instance of the OutlineSection.
*/ | Static factory method for obtaining an instance of the OutlineSection | create | {
"repo_name": "WeTheInternet/collide",
"path": "client/src/main/java/com/google/collide/client/workspace/outline/OutlineSection.java",
"license": "apache-2.0",
"size": 3310
} | [
"com.google.collide.client.AppContext",
"com.google.collide.client.workspace.outline.OutlineModel"
] | import com.google.collide.client.AppContext; import com.google.collide.client.workspace.outline.OutlineModel; | import com.google.collide.client.*; import com.google.collide.client.workspace.outline.*; | [
"com.google.collide"
] | com.google.collide; | 2,238,740 |
public void addPayload(PaxosValue value) {
values.add(value);
} | void function(PaxosValue value) { values.add(value); } | /**
* Get the value associated with this message.
*/ | Get the value associated with this message | addPayload | {
"repo_name": "jhorey/Paja",
"path": "src/gov/ornl/paja/roles/PaxosMessage.java",
"license": "apache-2.0",
"size": 6852
} | [
"gov.ornl.paja.proto.PaxosValue"
] | import gov.ornl.paja.proto.PaxosValue; | import gov.ornl.paja.proto.*; | [
"gov.ornl.paja"
] | gov.ornl.paja; | 1,832,924 |
public static void addDescription(Model model,
org.ontoware.rdf2go.model.node.Resource instanceResource,
org.ontoware.rdf2go.model.node.Node value) {
Base.add(model, instanceResource, DESCRIPTION, value);
} | static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) { Base.add(model, instanceResource, DESCRIPTION, value); } | /**
* Adds a value to property Description as an RDF2Go node
*
* @param model
* an RDF2Go model
* @param resource
* an RDF2Go resource
* @param value
* the value to be added
*
* [Generated from RDFReactor template rule #add1... | Adds a value to property Description as an RDF2Go node | addDescription | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdf2go.model.Model",
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdf2go",
"org.ontoware.rdfreactor"
] | org.ontoware.rdf2go; org.ontoware.rdfreactor; | 1,083,676 |
public void setProxy(final FileSystemOptions options, final Proxy proxy) {
setParam(options, PROXY, proxy);
} | void function(final FileSystemOptions options, final Proxy proxy) { setParam(options, PROXY, proxy); } | /**
* Sets the Proxy.
* <p>
* You might need to make sure that {@link #setPassiveMode(FileSystemOptions, boolean) passive mode} is activated.
* </p>
*
* @param options the FileSystem options.
* @param proxy the Proxy
* @since 2.1
*/ | Sets the Proxy. You might need to make sure that <code>#setPassiveMode(FileSystemOptions, boolean) passive mode</code> is activated. | setProxy | {
"repo_name": "apache/commons-vfs",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java",
"license": "apache-2.0",
"size": 23512
} | [
"java.net.Proxy",
"org.apache.commons.vfs2.FileSystemOptions"
] | import java.net.Proxy; import org.apache.commons.vfs2.FileSystemOptions; | import java.net.*; import org.apache.commons.vfs2.*; | [
"java.net",
"org.apache.commons"
] | java.net; org.apache.commons; | 2,172,793 |
private static byte[] getNewEmptyColumnFamilyOrNull (PTable table, PColumn columnToDrop) {
if (table.getType() != PTableType.VIEW && !SchemaUtil.isPKColumn(columnToDrop) && table.getColumnFamilies().get(0).getName().equals(columnToDrop.getFamilyName()) && table.getColumnFamilies().get(0).getColumns().size()... | static byte[] function (PTable table, PColumn columnToDrop) { if (table.getType() != PTableType.VIEW && !SchemaUtil.isPKColumn(columnToDrop) && table.getColumnFamilies().get(0).getName().equals(columnToDrop.getFamilyName()) && table.getColumnFamilies().get(0).getColumns().size() == 1) { return SchemaUtil.getEmptyColumn... | /**
* Calculate what the new column family will be after the column is dropped, returning null
* if unchanged.
* @param table table containing column to drop
* @param columnToDrop column being dropped
* @return the new column family or null if unchanged.
*/ | Calculate what the new column family will be after the column is dropped, returning null if unchanged | getNewEmptyColumnFamilyOrNull | {
"repo_name": "ankitsinghal/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java",
"license": "apache-2.0",
"size": 336620
} | [
"org.apache.phoenix.schema.PTable",
"org.apache.phoenix.util.SchemaUtil"
] | import org.apache.phoenix.schema.PTable; import org.apache.phoenix.util.SchemaUtil; | import org.apache.phoenix.schema.*; import org.apache.phoenix.util.*; | [
"org.apache.phoenix"
] | org.apache.phoenix; | 1,927,504 |
public static IntValuedEnum<RTresult> rtBufferGetMipLevelSize2D(RTbuffer buffer, int level, Pointer<Long> width, Pointer<Long> height)
{
return FlagSet.fromValue(rtBufferGetMipLevelSize2D(Pointer.getPeer(buffer), level, Pointer.getPeer(width), Pointer.getPeer(height)), RTresult.class);
} | static IntValuedEnum<RTresult> function(RTbuffer buffer, int level, Pointer<Long> width, Pointer<Long> height) { return FlagSet.fromValue(rtBufferGetMipLevelSize2D(Pointer.getPeer(buffer), level, Pointer.getPeer(width), Pointer.getPeer(height)), RTresult.class); } | /**
* Original signature : <code>RTresult rtBufferGetMipLevelSize2D(RTbuffer, unsigned int, RTsize*, RTsize*)</code><br>
* <i>native declaration : include\optix_host.h:8431</i>
*/ | Original signature : <code>RTresult rtBufferGetMipLevelSize2D(RTbuffer, unsigned int, RTsize*, RTsize*)</code> native declaration : include\optix_host.h:8431 | rtBufferGetMipLevelSize2D | {
"repo_name": "fetox74/optix-wrapper",
"path": "src/main/java/com/fetoxdevelopments/optix/api/RT.java",
"license": "mit",
"size": 162970
} | [
"com.fetoxdevelopments.optix.api.enumeration.RTresult",
"com.fetoxdevelopments.optix.api.struct.RTbuffer",
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import com.fetoxdevelopments.optix.api.enumeration.RTresult; import com.fetoxdevelopments.optix.api.struct.RTbuffer; import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import com.fetoxdevelopments.optix.api.enumeration.*; import com.fetoxdevelopments.optix.api.struct.*; import org.bridj.*; | [
"com.fetoxdevelopments.optix",
"org.bridj"
] | com.fetoxdevelopments.optix; org.bridj; | 861,293 |
public static boolean verifyTokenSignature(String[] splitToken, String alias) throws APISecurityException {
String signatureAlgorithm = null;
// Retrieve signature algorithm from token header
try {
signatureAlgorithm = APIUtil.getSignatureAlgorithm(splitToken);
} catch (... | static boolean function(String[] splitToken, String alias) throws APISecurityException { String signatureAlgorithm = null; try { signatureAlgorithm = APIUtil.getSignatureAlgorithm(splitToken); } catch (APIManagementException e) { if (log.isDebugEnabled()) { log.debug(STR + getMaskedToken(splitToken), e); } log.error(ST... | /**
* Verify the JWT token signature.
*
* @param splitToken The JWT token which is split into [header, payload, signature]
* @param alias public certificate keystore alias
* @return whether the signature is verified or or not
* @throws APISecurityException in case of signature verific... | Verify the JWT token signature | verifyTokenSignature | {
"repo_name": "harsha89/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/utils/GatewayUtils.java",
"license": "apache-2.0",
"size": 38195
} | [
"java.security.cert.Certificate",
"org.apache.commons.lang3.StringUtils",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityConstants",
"org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException",
"org.wso2.carbon.apimgt.impl.util... | import java.security.cert.Certificate; import org.apache.commons.lang3.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityConstants; import org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException; import org.wso2.carbon... | import java.security.cert.*; import org.apache.commons.lang3.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.gateway.handlers.security.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.security",
"org.apache.commons",
"org.wso2.carbon"
] | java.security; org.apache.commons; org.wso2.carbon; | 1,668,649 |
public int show() {
final String baseDir = context.getService(org.scijava.app.AppService.class).getApp().getBaseDirectory().getAbsolutePath();
commandFinderPanel =
new CommandFinderPanel(commandService.getModuleService(), baseDir);
final SwingDialog dialog =
new Swing... | int function() { final String baseDir = context.getService(org.scijava.app.AppService.class).getApp().getBaseDirectory().getAbsolutePath(); commandFinderPanel = new CommandFinderPanel(commandService.getModuleService(), baseDir); final SwingDialog dialog = new SwingDialog(commandFinderPanel, JOptionPane.OK_CANCEL_OPTION... | /**
* Show the command picker dialog.
* @return User response. See: {@link JOptionPane#OK_OPTION JOptionPane} constants
*/ | Show the command picker dialog | show | {
"repo_name": "bnanes/slideset",
"path": "src/main/java/org/nanes/slideset/ui/CommandPicker.java",
"license": "bsd-2-clause",
"size": 2486
} | [
"javax.swing.JOptionPane",
"org.scijava.ui.swing.SwingDialog",
"org.scijava.ui.swing.commands.CommandFinderPanel"
] | import javax.swing.JOptionPane; import org.scijava.ui.swing.SwingDialog; import org.scijava.ui.swing.commands.CommandFinderPanel; | import javax.swing.*; import org.scijava.ui.swing.*; import org.scijava.ui.swing.commands.*; | [
"javax.swing",
"org.scijava.ui"
] | javax.swing; org.scijava.ui; | 429,206 |
public void setTarget(JMeterTreeNode target) {
this.target = target;
} | void function(JMeterTreeNode target) { this.target = target; } | /**
* Sets the target node where the samples generated by the proxy have to be
* stored.
*
* @param target target node to store generated samples
*/ | Sets the target node where the samples generated by the proxy have to be stored | setTarget | {
"repo_name": "DoctorQ/jmeter",
"path": "src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java",
"license": "apache-2.0",
"size": 64808
} | [
"org.apache.jmeter.gui.tree.JMeterTreeNode"
] | import org.apache.jmeter.gui.tree.JMeterTreeNode; | import org.apache.jmeter.gui.tree.*; | [
"org.apache.jmeter"
] | org.apache.jmeter; | 2,328,246 |
protected void createCheckpoint(ActionListener<TransformCheckpoint> listener) {
checkpointProvider.createNextCheckpoint(
getLastCheckpoint(),
ActionListener.wrap(
checkpoint -> transformsConfigManager.putTransformCheckpoint(
checkpoint,
... | void function(ActionListener<TransformCheckpoint> listener) { checkpointProvider.createNextCheckpoint( getLastCheckpoint(), ActionListener.wrap( checkpoint -> transformsConfigManager.putTransformCheckpoint( checkpoint, ActionListener.wrap(putCheckPointResponse -> listener.onResponse(checkpoint), createCheckpointExcepti... | /**
* Request a checkpoint
*/ | Request a checkpoint | createCheckpoint | {
"repo_name": "gingerwizard/elasticsearch",
"path": "x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/TransformIndexer.java",
"license": "apache-2.0",
"size": 39657
} | [
"org.apache.logging.log4j.message.ParameterizedMessage",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.xpack.core.transform.transforms.TransformCheckpoint"
] | import org.apache.logging.log4j.message.ParameterizedMessage; import org.elasticsearch.action.ActionListener; import org.elasticsearch.xpack.core.transform.transforms.TransformCheckpoint; | import org.apache.logging.log4j.message.*; import org.elasticsearch.action.*; import org.elasticsearch.xpack.core.transform.transforms.*; | [
"org.apache.logging",
"org.elasticsearch.action",
"org.elasticsearch.xpack"
] | org.apache.logging; org.elasticsearch.action; org.elasticsearch.xpack; | 1,016,380 |
private boolean hasDatatypeChanged(Concept concept) {
ConceptDatatype oldConceptDatatype = dao.getSavedConceptDatatype(concept);
return !oldConceptDatatype.equals(concept.getDatatype());
}
| boolean function(Concept concept) { ConceptDatatype oldConceptDatatype = dao.getSavedConceptDatatype(concept); return !oldConceptDatatype.equals(concept.getDatatype()); } | /**
* Utility method which loads the previous version of a concept to check if the datatype has
* changed.
*
* @param concept to be modified
* @return boolean indicating change in the datatype
*/ | Utility method which loads the previous version of a concept to check if the datatype has changed | hasDatatypeChanged | {
"repo_name": "sadhanvejella/openmrs",
"path": "api/src/main/java/org/openmrs/api/impl/ConceptServiceImpl.java",
"license": "mpl-2.0",
"size": 65881
} | [
"org.openmrs.Concept",
"org.openmrs.ConceptDatatype"
] | import org.openmrs.Concept; import org.openmrs.ConceptDatatype; | import org.openmrs.*; | [
"org.openmrs"
] | org.openmrs; | 2,491,038 |
public synchronized void connected(BluetoothSocket socket, BluetoothDevice device) {
if (D) Log.d(TAG, "connected");
// Cancel the thread that completed the connection
if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;}
// Cancel any thread currently runni... | synchronized void function(BluetoothSocket socket, BluetoothDevice device) { if (D) Log.d(TAG, STR); if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;} if (mConnectedThread != null) {mConnectedThread.cancel(); mConnectedThread = null;} if (mAcceptThread != null) {mAcceptThread.cancel(); mAcce... | /**
* Start the ConnectedThread to begin managing a Bluetooth connection
* @param socket The BluetoothSocket on which the connection was made
* @param device The BluetoothDevice that has been connected
*/ | Start the ConnectedThread to begin managing a Bluetooth connection | connected | {
"repo_name": "flexwang/HappyRubik",
"path": "src/flex/android/magiccube/bluetooth/BluetoothChatService.java",
"license": "apache-2.0",
"size": 17166
} | [
"android.bluetooth.BluetoothDevice",
"android.bluetooth.BluetoothSocket",
"android.os.Bundle",
"android.os.Message",
"android.util.Log"
] | import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.os.Bundle; import android.os.Message; import android.util.Log; | import android.bluetooth.*; import android.os.*; import android.util.*; | [
"android.bluetooth",
"android.os",
"android.util"
] | android.bluetooth; android.os; android.util; | 345,908 |
public static void mergeRegions(final AdminService.BlockingInterface admin,
final HRegionInfo region_a, final HRegionInfo region_b,
final boolean forcible) throws IOException {
MergeRegionsRequest request = RequestConverter.buildMergeRegionsRequest(
region_a.getRegionName(), region_b.getRegion... | static void function(final AdminService.BlockingInterface admin, final HRegionInfo region_a, final HRegionInfo region_b, final boolean forcible) throws IOException { MergeRegionsRequest request = RequestConverter.buildMergeRegionsRequest( region_a.getRegionName(), region_b.getRegionName(),forcible); try { admin.mergeRe... | /**
* A helper to merge regions using admin protocol. Send request to
* regionserver.
* @param admin
* @param region_a
* @param region_b
* @param forcible true if do a compulsory merge, otherwise we will only merge
* two adjacent regions
* @throws IOException
*/ | A helper to merge regions using admin protocol. Send request to regionserver | mergeRegions | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 107497
} | [
"com.google.protobuf.ServiceException",
"java.io.IOException",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.protobuf.generated.AdminProtos"
] | import com.google.protobuf.ServiceException; import java.io.IOException; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; | import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"com.google.protobuf",
"java.io",
"org.apache.hadoop"
] | com.google.protobuf; java.io; org.apache.hadoop; | 273,391 |
public String getDavUrl(User user) {
StringBuilder buf = new StringBuilder();
buf.append(appMountUrl).append(factory.getDavPrefix()).
append(org.unitedinternet.cosmo.dav.ExtendedDavConstants.
TEMPLATE_HOME.bind(user.getUsername()));
return buf.toString();
... | String function(User user) { StringBuilder buf = new StringBuilder(); buf.append(appMountUrl).append(factory.getDavPrefix()). append(org.unitedinternet.cosmo.dav.ExtendedDavConstants. TEMPLATE_HOME.bind(user.getUsername())); return buf.toString(); } | /**
* Returns the WebDAV URL of the user.
*/ | Returns the WebDAV URL of the user | getDavUrl | {
"repo_name": "1and1/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/server/ServiceLocator.java",
"license": "apache-2.0",
"size": 8921
} | [
"org.unitedinternet.cosmo.model.User"
] | import org.unitedinternet.cosmo.model.User; | import org.unitedinternet.cosmo.model.*; | [
"org.unitedinternet.cosmo"
] | org.unitedinternet.cosmo; | 27,266 |
public Map<Integer, StoredGoodDTO> getGiftedGoodsMap() {
final Map<Integer, StoredGoodDTO> goods = new HashMap<Integer, StoredGoodDTO>();
goods.put(0, new StoredGoodDTO());
for (int goodTPE = GOOD_FIRST; goodTPE < GOOD_AP; goodTPE++) {
final StoredGoodDTO gd = new StoredGoodDTO()... | Map<Integer, StoredGoodDTO> function() { final Map<Integer, StoredGoodDTO> goods = new HashMap<Integer, StoredGoodDTO>(); goods.put(0, new StoredGoodDTO()); for (int goodTPE = GOOD_FIRST; goodTPE < GOOD_AP; goodTPE++) { final StoredGoodDTO gd = new StoredGoodDTO(); gd.setTpe(goodTPE); gd.setQte(getGiftQteThisTurn(goodT... | /**
* Method that returns a map containing all
* the gifted quantities this turn
*
* @return HashMap of the type <GoodId,GoodDTO>
*/ | Method that returns a map containing all the gifted quantities this turn | getGiftedGoodsMap | {
"repo_name": "EaW1805/www",
"path": "src/main/java/com/eaw1805/www/shared/stores/economy/TradeStore.java",
"license": "mit",
"size": 36235
} | [
"com.eaw1805.data.dto.web.economy.StoredGoodDTO",
"java.util.HashMap",
"java.util.Map"
] | import com.eaw1805.data.dto.web.economy.StoredGoodDTO; import java.util.HashMap; import java.util.Map; | import com.eaw1805.data.dto.web.economy.*; import java.util.*; | [
"com.eaw1805.data",
"java.util"
] | com.eaw1805.data; java.util; | 502,140 |
public CyclicInheritanceMatch newMatch(final org.eclipse.uml2.uml.Class pCl) {
return CyclicInheritanceMatch.newMatch(pCl);
}
| CyclicInheritanceMatch function(final org.eclipse.uml2.uml.Class pCl) { return CyclicInheritanceMatch.newMatch(pCl); } | /**
* Returns a new (partial) match.
* This can be used e.g. to call the matcher with a partial match.
* <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
* @param pCl the fixed value of pattern parameter cl, or null if not bound.
* @return the (... | Returns a new (partial) match. This can be used e.g. to call the matcher with a partial match. The returned match will be immutable. Use <code>#newEmptyMatch()</code> to obtain a mutable match object | newMatch | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/CyclicInheritanceMatcher.java",
"license": "epl-1.0",
"size": 10333
} | [
"hu.eltesoft.modelexecution.validation.CyclicInheritanceMatch"
] | import hu.eltesoft.modelexecution.validation.CyclicInheritanceMatch; | import hu.eltesoft.modelexecution.validation.*; | [
"hu.eltesoft.modelexecution"
] | hu.eltesoft.modelexecution; | 1,353,004 |
public void setCodeletsList(List<Codelet> codeletsList) {
this.codeletsList = codeletsList;
} | void function(List<Codelet> codeletsList) { this.codeletsList = codeletsList; } | /**
* Sets the codelets list.
*
* @param codeletsList
* the codeletsList to set
*/ | Sets the codelets list | setCodeletsList | {
"repo_name": "rgudwin/cst",
"path": "src/main/java/br/unicamp/cst/core/entities/Coalition.java",
"license": "lgpl-3.0",
"size": 2779
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 29,460 |
CompletableFuture<WaiterResponse<T>> future = new CompletableFuture<>();
doExecute(asyncPollingFunction, future, 0, System.currentTimeMillis());
return future;
} | CompletableFuture<WaiterResponse<T>> future = new CompletableFuture<>(); doExecute(asyncPollingFunction, future, 0, System.currentTimeMillis()); return future; } | /**
* Execute the provided async polling function
*/ | Execute the provided async polling function | execute | {
"repo_name": "aws/aws-sdk-java-v2",
"path": "core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/waiters/AsyncWaiterExecutor.java",
"license": "apache-2.0",
"size": 5871
} | [
"java.util.concurrent.CompletableFuture",
"software.amazon.awssdk.core.waiters.WaiterResponse"
] | import java.util.concurrent.CompletableFuture; import software.amazon.awssdk.core.waiters.WaiterResponse; | import java.util.concurrent.*; import software.amazon.awssdk.core.waiters.*; | [
"java.util",
"software.amazon.awssdk"
] | java.util; software.amazon.awssdk; | 1,516,363 |
List<MasterAccessControlEntry> getMasterAccessControlEntries(String uid, String domain, String interfaceName); | List<MasterAccessControlEntry> getMasterAccessControlEntries(String uid, String domain, String interfaceName); | /**
* Returns a list of master ACEs that apply to the userId, domain and interface combination.
*
* @param uid The userId you search ACE's for.
* @param domain The domain you search ACE's for.
* @param interfaceName The interface you search ACE's for.
* @return List of master ACEs associat... | Returns a list of master ACEs that apply to the userId, domain and interface combination | getMasterAccessControlEntries | {
"repo_name": "clive-jevons/joynr",
"path": "java/common/infrastructure-common/src/main/java/io/joynr/accesscontrol/DomainAccessControlStore.java",
"license": "apache-2.0",
"size": 13991
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,434,354 |
@Override
public tipy_izvewenij remove(long tipy_izvewenij_id)
throws NoSuchtipy_izvewenijException {
return remove((Serializable)tipy_izvewenij_id);
} | tipy_izvewenij function(long tipy_izvewenij_id) throws NoSuchtipy_izvewenijException { return remove((Serializable)tipy_izvewenij_id); } | /**
* Removes the tipy_izvewenij with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param tipy_izvewenij_id the primary key of the tipy_izvewenij
* @return the tipy_izvewenij that was removed
* @throws NoSuchtipy_izvewenijException if a tipy_izvewenij with the primary ... | Removes the tipy_izvewenij with the primary key from the database. Also notifies the appropriate model listeners | remove | {
"repo_name": "falko0000/moduleEProc",
"path": "tipy.izvewenij/tipy.izvewenij-service/src/main/java/tj/tipy/izvewenij/service/persistence/impl/tipy_izvewenijPersistenceImpl.java",
"license": "lgpl-2.1",
"size": 24203
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 1,659,267 |
public SDVariable extractImagePatches(String name, SDVariable image, int[] kSizes, int[] strides,
int[] rates, boolean sameMode) {
SDValidation.validateNumerical("extractImagePatches", "image", image);
Preconditions.checkArgument(kSizes.length == 2, "kSizes has incorrect size/length. Expected: kSizes.le... | SDVariable function(String name, SDVariable image, int[] kSizes, int[] strides, int[] rates, boolean sameMode) { SDValidation.validateNumerical(STR, "image", image); Preconditions.checkArgument(kSizes.length == 2, STR, kSizes.length); Preconditions.checkArgument(strides.length == 2, STR, strides.length); Preconditions.... | /**
* Given an input image, extract out image patches (of size kSizes - h x w) and place them in the depth dimension. <br>
*
* @param name name May be null. Name for the output variable
* @param image Input image to extract image patches from - shape [batch, height, width, channels] (NUMERIC type)
* @par... | Given an input image, extract out image patches (of size kSizes - h x w) and place them in the depth dimension. | extractImagePatches | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDImage.java",
"license": "apache-2.0",
"size": 29470
} | [
"java.lang.String",
"org.nd4j.autodiff.samediff.SDVariable",
"org.nd4j.common.base.Preconditions"
] | import java.lang.String; import org.nd4j.autodiff.samediff.SDVariable; import org.nd4j.common.base.Preconditions; | import java.lang.*; import org.nd4j.autodiff.samediff.*; import org.nd4j.common.base.*; | [
"java.lang",
"org.nd4j.autodiff",
"org.nd4j.common"
] | java.lang; org.nd4j.autodiff; org.nd4j.common; | 1,699,340 |
@Override
protected void shutdownInput() throws IOException {
shutdownInput = true;
netImpl.shutdownInput(fd);
} | void function() throws IOException { shutdownInput = true; netImpl.shutdownInput(fd); } | /**
* Shutdown the input portion of the socket.
*/ | Shutdown the input portion of the socket | shutdownInput | {
"repo_name": "princeton-sns/serval",
"path": "src/javasock/java/org/servalarch/net/ServalPlainSocketImpl.java",
"license": "gpl-2.0",
"size": 13127
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,022,682 |
@Override
public File getHooksFolder() {
return runtimeManager.getFileOrFolder(Keys.groovy.scriptsFolder, "${baseFolder}/groovy");
} | File function() { return runtimeManager.getFileOrFolder(Keys.groovy.scriptsFolder, STR); } | /**
* Returns the path of the Groovy folder. This method checks to see if
* Gitblit is running on a cloud service and may return an adjusted path.
*
* @return the Groovy scripts folder path
*/ | Returns the path of the Groovy folder. This method checks to see if Gitblit is running on a cloud service and may return an adjusted path | getHooksFolder | {
"repo_name": "paulsputer/gitblit",
"path": "src/main/java/com/gitblit/manager/RepositoryManager.java",
"license": "apache-2.0",
"size": 70313
} | [
"com.gitblit.Keys",
"java.io.File"
] | import com.gitblit.Keys; import java.io.File; | import com.gitblit.*; import java.io.*; | [
"com.gitblit",
"java.io"
] | com.gitblit; java.io; | 699,241 |
@SuppressWarnings({"unchecked"})
@Nullable public Collection<GridCacheVersionedFuture<?>> futuresForVersion(GridCacheVersion ver) {
Collection<GridCacheVersionedFuture<?>> futs = this.verFuts.get(ver);
if (futs != null) {
synchronized (futs) {
return new ArrayList<>(... | @SuppressWarnings({STR}) @Nullable Collection<GridCacheVersionedFuture<?>> function(GridCacheVersion ver) { Collection<GridCacheVersionedFuture<?>> futs = this.verFuts.get(ver); if (futs != null) { synchronized (futs) { return new ArrayList<>(futs); } } return null; } | /**
* Gets futures for given lock ID.
*
* @param ver Lock ID.
* @return Futures.
*/ | Gets futures for given lock ID | futuresForVersion | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java",
"license": "apache-2.0",
"size": 46448
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion",
"org.jetbrains.annotations.Nullable"
] | import java.util.ArrayList; import java.util.Collection; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.apache.ignite.internal.processors.cache.version.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.util; org.apache.ignite; org.jetbrains.annotations; | 2,518,058 |
public byte[] getEncodedPKCS1() {
try {
if (externalDigest != null)
digest = externalDigest;
else
digest = sig.sign();
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
ASN1OutputStream dout = new ASN1Outp... | byte[] function() { try { if (externalDigest != null) digest = externalDigest; else digest = sig.sign(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); ASN1OutputStream dout = new ASN1OutputStream(bOut); dout.writeObject(new DEROctetString(digest)); dout.close(); return bOut.toByteArray(); } catch (Exception... | /**
* Gets the bytes for the PKCS#1 object.
* @return a byte array
*/ | Gets the bytes for the PKCS#1 object | getEncodedPKCS1 | {
"repo_name": "yogthos/itext",
"path": "src/com/lowagie/text/pdf/PdfPKCS7.java",
"license": "lgpl-3.0",
"size": 67830
} | [
"com.lowagie.text.ExceptionConverter",
"java.io.ByteArrayOutputStream",
"org.bouncycastle.asn1.ASN1OutputStream",
"org.bouncycastle.asn1.DEROctetString"
] | import com.lowagie.text.ExceptionConverter; import java.io.ByteArrayOutputStream; import org.bouncycastle.asn1.ASN1OutputStream; import org.bouncycastle.asn1.DEROctetString; | import com.lowagie.text.*; import java.io.*; import org.bouncycastle.asn1.*; | [
"com.lowagie.text",
"java.io",
"org.bouncycastle.asn1"
] | com.lowagie.text; java.io; org.bouncycastle.asn1; | 1,475,123 |
Collection<V> values(int count); | Collection<V> values(int count); | /**
* Returns values collection of this map.
* Values are loaded in batch. Batch size is defined by <code>count</code> param.
*
* @see #readAllValues()
*
* @param count - size of values batch
* @return values collection
*/ | Returns values collection of this map. Values are loaded in batch. Batch size is defined by <code>count</code> param | values | {
"repo_name": "mrniko/redisson",
"path": "redisson/src/main/java/org/redisson/api/RMap.java",
"license": "apache-2.0",
"size": 19225
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,122,032 |
public static void createRemediationAtSubscriptionScopeWithAllProperties(
com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) {
manager
.remediations()
.createOrUpdateAtSubscriptionWithResponse(
"storageRemediation",
ne... | static void function( com.azure.resourcemanager.policyinsights.PolicyInsightsManager manager) { manager .remediations() .createOrUpdateAtSubscriptionWithResponse( STR, new RemediationInner() .withPolicyAssignmentId( STR) .withPolicyDefinitionReferenceId(STR) .withResourceDiscoveryMode(ResourceDiscoveryMode.RE_EVALUATE_... | /**
* Sample code: Create remediation at subscription scope with all properties.
*
* @param manager Entry point to PolicyInsightsManager.
*/ | Sample code: Create remediation at subscription scope with all properties | createRemediationAtSubscriptionScopeWithAllProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/samples/java/com/azure/resourcemanager/policyinsights/generated/RemediationsCreateOrUpdateAtSubscriptionSamples.java",
"license": "mit",
"size": 3027
} | [
"com.azure.core.util.Context",
"com.azure.resourcemanager.policyinsights.fluent.models.RemediationInner",
"com.azure.resourcemanager.policyinsights.models.RemediationFilters",
"com.azure.resourcemanager.policyinsights.models.RemediationPropertiesFailureThreshold",
"com.azure.resourcemanager.policyinsights.m... | import com.azure.core.util.Context; import com.azure.resourcemanager.policyinsights.fluent.models.RemediationInner; import com.azure.resourcemanager.policyinsights.models.RemediationFilters; import com.azure.resourcemanager.policyinsights.models.RemediationPropertiesFailureThreshold; import com.azure.resourcemanager.po... | import com.azure.core.util.*; import com.azure.resourcemanager.policyinsights.fluent.models.*; import com.azure.resourcemanager.policyinsights.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 385,902 |
protected StringBuffer format(StringBuffer toAppendTo, FieldPosition pos,
double ... coordinates) {
pos.setBeginIndex(0);
pos.setEndIndex(0);
// format prefix
toAppendTo.append(prefix);
// format components
for (int i = 0; i < coor... | StringBuffer function(StringBuffer toAppendTo, FieldPosition pos, double ... coordinates) { pos.setBeginIndex(0); pos.setEndIndex(0); toAppendTo.append(prefix); for (int i = 0; i < coordinates.length; ++i) { if (i > 0) { toAppendTo.append(separator); } CompositeFormat.formatDouble(coordinates[i], format, toAppendTo, po... | /**
* Formats the coordinates of a {@link Vector} to produce a string.
* @param toAppendTo where the text is to be appended
* @param pos On input: an alignment field, if desired. On output: the
* offsets of the alignment field
* @param coordinates coordinates of the object to format.... | Formats the coordinates of a <code>Vector</code> to produce a string | format | {
"repo_name": "charles-cooper/idylfin",
"path": "src/org/apache/commons/math3/geometry/VectorFormat.java",
"license": "apache-2.0",
"size": 9733
} | [
"java.text.FieldPosition",
"org.apache.commons.math3.util.CompositeFormat"
] | import java.text.FieldPosition; import org.apache.commons.math3.util.CompositeFormat; | import java.text.*; import org.apache.commons.math3.util.*; | [
"java.text",
"org.apache.commons"
] | java.text; org.apache.commons; | 2,838,744 |
public List<Job> getActiveJobs() {
return Collections.unmodifiableList(activJobs);
} | List<Job> function() { return Collections.unmodifiableList(activJobs); } | /**
* returns a list of active jobs. use this list to control the running jobs.
*
* @return a list of all active jobs
*/ | returns a list of active jobs. use this list to control the running jobs | getActiveJobs | {
"repo_name": "HerbertJordan/JimCat",
"path": "src/org/jimcat/services/jobs/JobManager.java",
"license": "gpl-2.0",
"size": 5533
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,228,287 |
public BufferedImage getAvatar() throws SkypeException {
try {
final File file = Utils.createTempraryFile("get_avator_", "jpg");
final String command = "GET AVATAR 1 " + file.getAbsolutePath();
final String responseHeader = "AVATAR 1 ";
final String response =... | BufferedImage function() throws SkypeException { try { final File file = Utils.createTempraryFile(STR, "jpg"); final String command = STR + file.getAbsolutePath(); final String responseHeader = STR; final String response = Connector.getInstance().execute(command, responseHeader); Utils.checkError(response); final Buffe... | /**
* Gets the avatar of the current user.
* @return the avatar image of the current user.
* @throws SkypeException when the connection has gone bad or an ERROR message is received.
* @since Protocol 7
* @see #setAvatar(BufferedImage)
* @see #setAvatarByFile(File)
*/ | Gets the avatar of the current user | getAvatar | {
"repo_name": "AManuev/Skype4OSGi",
"path": "src/main/java/com/skype/Profile.java",
"license": "apache-2.0",
"size": 36709
} | [
"com.skype.connector.Connector",
"com.skype.connector.ConnectorException",
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException",
"javax.imageio.ImageIO"
] | import com.skype.connector.Connector; import com.skype.connector.ConnectorException; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; | import com.skype.connector.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; | [
"com.skype.connector",
"java.awt",
"java.io",
"javax.imageio"
] | com.skype.connector; java.awt; java.io; javax.imageio; | 1,443,610 |
private static void collectTransitivePythonSourcesFromDeps(
RuleContext ruleContext, NestedSetBuilder<Artifact> builder) {
for (TransitiveInfoCollection dep : ruleContext.getPrerequisites("deps")) {
try {
builder.addTransitive(PyProviderUtils.getTransitiveSources(dep));
} catch (EvalExce... | static void function( RuleContext ruleContext, NestedSetBuilder<Artifact> builder) { for (TransitiveInfoCollection dep : ruleContext.getPrerequisites("deps")) { try { builder.addTransitive(PyProviderUtils.getTransitiveSources(dep)); } catch (EvalException e) { ruleContext.attributeError( "deps", String.format(STR, dep.... | /**
* Gathers transitive .py files from {@code deps} (not including this target's {@code srcs} and
* adds them to {@code builder}.
*/ | Gathers transitive .py files from deps (not including this target's srcs and adds them to builder | collectTransitivePythonSourcesFromDeps | {
"repo_name": "bazelbuild/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java",
"license": "apache-2.0",
"size": 43034
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.analysis.TransitiveInfoCollection",
"com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder",
"net.starlark.java.eval.EvalException"
] | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import net.starlark.java.eval.EvalException; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.collect.nestedset.*; import net.starlark.java.eval.*; | [
"com.google.devtools",
"net.starlark.java"
] | com.google.devtools; net.starlark.java; | 873,381 |
DatagramPacket[] next() throws IOException; | DatagramPacket[] next() throws IOException; | /**
* Performs a single multicast encode operation using the next encoder
* provider of a {@link Discovery} instance, returning the resulting
* datagram packets or throwing the resulting exception.
*
* @return datagram packets resulting from an encode operation
* @throws IOException if the... | Performs a single multicast encode operation using the next encoder provider of a <code>Discovery</code> instance, returning the resulting datagram packets or throwing the resulting exception | next | {
"repo_name": "cdegroot/river",
"path": "src/com/sun/jini/discovery/EncodeIterator.java",
"license": "apache-2.0",
"size": 1986
} | [
"java.io.IOException",
"java.net.DatagramPacket"
] | import java.io.IOException; import java.net.DatagramPacket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,964,044 |
@Override
public void createPageControls(Composite parent) {
this.parent = parent;
this.selectContainer( getFlowControl().getIndex() );
updatePage( getFlowControl().getIndex() );
}
| void function(Composite parent) { this.parent = parent; this.selectContainer( getFlowControl().getIndex() ); updatePage( getFlowControl().getIndex() ); } | /**
* Create the control for this wizard( usually a wizard container)
* @param parent
* @param style
* @return
*/ | Create the control for this wizard( usually a wizard container) | createPageControls | {
"repo_name": "condast/AieonF",
"path": "Workspace/org.aieonf.commons.ui/src/org/aieonf/commons/ui/wizard/AbstractFlowControlWizard.java",
"license": "apache-2.0",
"size": 10929
} | [
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 888,660 |
public List<Object[]> getRows( String sql, int limit ) throws KettleDatabaseException {
return getRows( sql, limit, null );
} | List<Object[]> function( String sql, int limit ) throws KettleDatabaseException { return getRows( sql, limit, null ); } | /**
* Reads the result of an SQL query into an ArrayList
*
* @param sql The SQL to launch
* @param limit <=0 means unlimited, otherwise this specifies the maximum number of rows read.
* @return An ArrayList of rows.
* @throws KettleDatabaseException if something goes wrong.
*/ | Reads the result of an SQL query into an ArrayList | getRows | {
"repo_name": "pedrofvteixeira/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/Database.java",
"license": "apache-2.0",
"size": 180346
} | [
"java.util.List",
"org.pentaho.di.core.exception.KettleDatabaseException"
] | import java.util.List; import org.pentaho.di.core.exception.KettleDatabaseException; | import java.util.*; import org.pentaho.di.core.exception.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 2,648,556 |
protected Resource resolveCURIEOrURI(String curieOrURI, boolean termAllowed) {
if( isCURIE(curieOrURI) ) {
return resolveNamespacedURI(curieOrURI.substring(1, curieOrURI.length() - 1), ResolutionPolicy.NSRequired);
}
if(isAbsoluteURI(curieOrURI)) return resolveURI(curieOrURI);
... | Resource function(String curieOrURI, boolean termAllowed) { if( isCURIE(curieOrURI) ) { return resolveNamespacedURI(curieOrURI.substring(1, curieOrURI.length() - 1), ResolutionPolicy.NSRequired); } if(isAbsoluteURI(curieOrURI)) return resolveURI(curieOrURI); return resolveNamespacedURI( curieOrURI, termAllowed ? Resolu... | /**
* Resolves a <i>CURIE</i> or <i>URI</i> string.
*
* @param curieOrURI
* @param termAllowed if <code>true</code> the resolution can be a term.
* @return the resolved resource.
*/ | Resolves a CURIE or URI string | resolveCURIEOrURI | {
"repo_name": "kidaa/any23",
"path": "core/src/main/java/org/apache/any23/extractor/rdfa/RDFa11Parser.java",
"license": "apache-2.0",
"size": 41153
} | [
"org.openrdf.model.Resource"
] | import org.openrdf.model.Resource; | import org.openrdf.model.*; | [
"org.openrdf.model"
] | org.openrdf.model; | 2,686,297 |
List<TCRCatalogTreeDTO> getTCRCatalogTreeNodes(String type, Long releaseId) throws URISyntaxException, IOException; | List<TCRCatalogTreeDTO> getTCRCatalogTreeNodes(String type, Long releaseId) throws URISyntaxException, IOException; | /**
* Get tree nodes such as phase for given releaseId.
* @param type
* @param releaseId
* @return
* @throws URISyntaxException
*/ | Get tree nodes such as phase for given releaseId | getTCRCatalogTreeNodes | {
"repo_name": "jenkinsci/zephyr-enterprise-test-management-plugin",
"path": "src/main/java/com/thed/service/TCRCatalogTreeService.java",
"license": "apache-2.0",
"size": 1700
} | [
"com.thed.model.TCRCatalogTreeDTO",
"java.io.IOException",
"java.net.URISyntaxException",
"java.util.List"
] | import com.thed.model.TCRCatalogTreeDTO; import java.io.IOException; import java.net.URISyntaxException; import java.util.List; | import com.thed.model.*; import java.io.*; import java.net.*; import java.util.*; | [
"com.thed.model",
"java.io",
"java.net",
"java.util"
] | com.thed.model; java.io; java.net; java.util; | 1,122,000 |
public SubResource sslCertificate() {
return this.sslCertificate;
} | SubResource function() { return this.sslCertificate; } | /**
* Get sSL certificate resource of an application gateway.
*
* @return the sslCertificate value
*/ | Get sSL certificate resource of an application gateway | sslCertificate | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/ApplicationGatewayHttpListener.java",
"license": "mit",
"size": 9123
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,741,726 |
@Schema(description = "")
public OffsetDateTime getUpdatedAt() {
return updatedAt;
} | @Schema(description = "") OffsetDateTime function() { return updatedAt; } | /**
* Get updatedAt
* @return updatedAt
**/ | Get updatedAt | getUpdatedAt | {
"repo_name": "Treehopper/EclipseAugments",
"path": "gister/eu.hohenegger.gister/src/eu/hohenegger/gister/model/Fork.java",
"license": "epl-1.0",
"size": 3785
} | [
"io.swagger.v3.oas.annotations.media.Schema",
"java.time.OffsetDateTime"
] | import io.swagger.v3.oas.annotations.media.Schema; import java.time.OffsetDateTime; | import io.swagger.v3.oas.annotations.media.*; import java.time.*; | [
"io.swagger.v3",
"java.time"
] | io.swagger.v3; java.time; | 350,917 |
public boolean exists(RemoteTenant remoteTenant, String itemId, String itemType); | boolean function(RemoteTenant remoteTenant, String itemId, String itemType); | /**
* This function returns true,
* if an item for the given key exists.
*
* @param remoteTenant
* @param itemId
* @param itemType
*
* @return <code>true</code> if the item exists
*/ | This function returns true, if an item for the given key exists | exists | {
"repo_name": "feesa/easyrec-parent",
"path": "easyrec-core/src/main/java/org/easyrec/store/dao/core/ItemDAO.java",
"license": "apache-2.0",
"size": 12207
} | [
"org.easyrec.model.core.web.RemoteTenant"
] | import org.easyrec.model.core.web.RemoteTenant; | import org.easyrec.model.core.web.*; | [
"org.easyrec.model"
] | org.easyrec.model; | 984,661 |
public void setRanges(Integer executorId, PartnerRange[] ranges) {
eLogger.audit(executorId, partner.getBaseUser().getId(),
Constants.TABLE_PARTNER_RANGE, partner.getId(),
EventLogger.MODULE_USER_MAINTENANCE,
EventLogger.ROW_UPDATED, null, null, null);
... | void function(Integer executorId, PartnerRange[] ranges) { eLogger.audit(executorId, partner.getBaseUser().getId(), Constants.TABLE_PARTNER_RANGE, partner.getId(), EventLogger.MODULE_USER_MAINTENANCE, EventLogger.ROW_UPDATED, null, null, null); for (Iterator it = partner.getRanges().iterator(); it.hasNext();) { partner... | /**
* Remove the existing ranges and create rows with
* the values of the parameter
* @param ranges
*/ | Remove the existing ranges and create rows with the values of the parameter | setRanges | {
"repo_name": "liquidJbilling/LT-Jbilling-MsgQ-3.1",
"path": "src/java/com/sapienter/jbilling/server/user/partner/PartnerBL.java",
"license": "agpl-3.0",
"size": 27628
} | [
"com.sapienter.jbilling.server.user.partner.db.PartnerRange",
"com.sapienter.jbilling.server.user.partner.db.PartnerRangeDAS",
"com.sapienter.jbilling.server.util.Constants",
"com.sapienter.jbilling.server.util.audit.EventLogger",
"java.util.Iterator"
] | import com.sapienter.jbilling.server.user.partner.db.PartnerRange; import com.sapienter.jbilling.server.user.partner.db.PartnerRangeDAS; import com.sapienter.jbilling.server.util.Constants; import com.sapienter.jbilling.server.util.audit.EventLogger; import java.util.Iterator; | import com.sapienter.jbilling.server.user.partner.db.*; import com.sapienter.jbilling.server.util.*; import com.sapienter.jbilling.server.util.audit.*; import java.util.*; | [
"com.sapienter.jbilling",
"java.util"
] | com.sapienter.jbilling; java.util; | 1,544,985 |
public boolean setValueForSelectedRangeInAWorksheet(String cellArea, String value, String type) throws InvalidKeyException, NoSuchAlgorithmException, IOException {
boolean isValueSetSuccessfullyForRangeInAWorksheet = false;
if(fileName == null || fileName.length() == 0) {
throw new IllegalArgumentException... | boolean function(String cellArea, String value, String type) throws InvalidKeyException, NoSuchAlgorithmException, IOException { boolean isValueSetSuccessfullyForRangeInAWorksheet = false; if(fileName == null fileName.length() == 0) { throw new IllegalArgumentException(STR); } if(worksheetName == null worksheetName.len... | /**
* Set value for selected range in a worksheet
* @param cellArea Cell area
* @param value Value for the specified cells area
* @param type Value type for the specified cells area
* @throws java.security.InvalidKeyException If initialization fails because the provided key is null.
* @throws java.security.... | Set value for selected range in a worksheet | setValueForSelectedRangeInAWorksheet | {
"repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android",
"path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/cells/api/Cell.java",
"license": "mit",
"size": 34616
} | [
"android.net.Uri",
"com.aspose.cloud.sdk.common.BaseResponse",
"com.aspose.cloud.sdk.common.Utils",
"com.google.gson.Gson",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException"
] | import android.net.Uri; import com.aspose.cloud.sdk.common.BaseResponse; import com.aspose.cloud.sdk.common.Utils; import com.google.gson.Gson; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; | import android.net.*; import com.aspose.cloud.sdk.common.*; import com.google.gson.*; import java.io.*; import java.security.*; | [
"android.net",
"com.aspose.cloud",
"com.google.gson",
"java.io",
"java.security"
] | android.net; com.aspose.cloud; com.google.gson; java.io; java.security; | 34,792 |
private void postPlugin(final boolean isPing) throws IOException {
// The plugin's description file containg all of the plugin data such as name, version, author, etc
final PluginDescriptionFile description = plugin.getDescription();
// Construct the post data
final StringBuild... | void function(final boolean isPing) throws IOException { final PluginDescriptionFile description = plugin.getDescription(); final StringBuilder data = new StringBuilder(); data.append(encode("guid")).append('=').append(encode(guid)); encodeDataPair(data, STR, description.getVersion()); encodeDataPair(data, STR, Bukkit.... | /**
* Generic method that posts a plugin to the metrics website
*/ | Generic method that posts a plugin to the metrics website | postPlugin | {
"repo_name": "syamn/Likes",
"path": "src/main/java/syam/likes/util/Metrics.java",
"license": "lgpl-3.0",
"size": 21708
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.OutputStreamWriter",
"java.net.Proxy",
"java.net.URLConnection",
"java.util.Iterator",
"org.bukkit.Bukkit",
"org.bukkit.plugin.PluginDescriptionFile"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Proxy; import java.net.URLConnection; import java.util.Iterator; import org.bukkit.Bukkit; import org.bukkit.plugin.PluginDescriptionFile; | import java.io.*; import java.net.*; import java.util.*; import org.bukkit.*; import org.bukkit.plugin.*; | [
"java.io",
"java.net",
"java.util",
"org.bukkit",
"org.bukkit.plugin"
] | java.io; java.net; java.util; org.bukkit; org.bukkit.plugin; | 2,743,944 |
public MetaProperty<Double> quantity() {
return quantity;
} | MetaProperty<Double> function() { return quantity; } | /**
* The meta-property for the {@code quantity} property.
* @return the meta-property, not null
*/ | The meta-property for the quantity property | quantity | {
"repo_name": "OpenGamma/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/bond/ResolvedBondFutureTrade.java",
"license": "apache-2.0",
"size": 18626
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,123,213 |
private void ensureInitializedOrders() {
if (orders == null) {
orders = new ArrayList<Order>(ORDERS_INITIAL_LENGTH);
}
} | void function() { if (orders == null) { orders = new ArrayList<Order>(ORDERS_INITIAL_LENGTH); } } | /**
* Ensures that the {@link #orders} is initialized.
*/ | Ensures that the <code>#orders</code> is initialized | ensureInitializedOrders | {
"repo_name": "psnc-dl/darceo",
"path": "wrdz/wrdz-common/dao/src/main/java/pl/psnc/synat/wrdz/common/dao/GenericQuerySorterBuilderImpl.java",
"license": "gpl-3.0",
"size": 6656
} | [
"java.util.ArrayList",
"javax.persistence.criteria.Order"
] | import java.util.ArrayList; import javax.persistence.criteria.Order; | import java.util.*; import javax.persistence.criteria.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 257,091 |
public void setAvatar(ImageIcon icon) {
avatar.setBorder(BorderFactory.createBevelBorder(0, Color.white, Color.lightGray));
if (icon.getIconHeight() > 128 || icon.getIconWidth() > 128) {
avatar.setIcon(new ImageIcon(icon.getImage().getScaledInstance(-1, 128, Image.SCALE_SMOOTH)));
... | void function(ImageIcon icon) { avatar.setBorder(BorderFactory.createBevelBorder(0, Color.white, Color.lightGray)); if (icon.getIconHeight() > 128 icon.getIconWidth() > 128) { avatar.setIcon(new ImageIcon(icon.getImage().getScaledInstance(-1, 128, Image.SCALE_SMOOTH))); } else { avatar.setIcon(icon); } avatar.setText("... | /**
* Sets the displayable icon with the users avatar.
*
* @param icon the icon.
*/ | Sets the displayable icon with the users avatar | setAvatar | {
"repo_name": "BittyByte/Spark",
"path": "core/src/main/java/org/jivesoftware/sparkimpl/profile/AvatarPanel.java",
"license": "apache-2.0",
"size": 11052
} | [
"java.awt.Color",
"java.awt.Image",
"javax.swing.BorderFactory",
"javax.swing.ImageIcon"
] | import java.awt.Color; import java.awt.Image; import javax.swing.BorderFactory; import javax.swing.ImageIcon; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 817,025 |
private List<ClusterData> checkForErrors(List<? extends Human> agents, GCAChromosome chromosome) {
if (chromosome == null || agents.size() != chromosome.getRepresentation().size())
throw new Error("There is some error in cluster assigning");
return chromosome.getRepresentation();
} | List<ClusterData> function(List<? extends Human> agents, GCAChromosome chromosome) { if (chromosome == null agents.size() != chromosome.getRepresentation().size()) throw new Error(STR); return chromosome.getRepresentation(); } | /**
* only checks errors in the result and returns the input list
*
* @param agents
* @param decision
* @return
*/ | only checks errors in the result and returns the input list | checkForErrors | {
"repo_name": "alim1369/sos",
"path": "src/sos/search_v2/tools/genetic/GeneticClusterAssigner.java",
"license": "apache-2.0",
"size": 5364
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,059,381 |
//-----------------------------------------------------------------------
public static void writeStringToFile(File file, String data, String encoding) throws IOException {
OutputStream out = null;
try {
out = openOutputStream(file);
IOUtils.write(data, out, encoding);
} finally {
IOUtils... | static void function(File file, String data, String encoding) throws IOException { OutputStream out = null; try { out = openOutputStream(file); IOUtils.write(data, out, encoding); } finally { IOUtils.closeQuietly(out); } } | /**
* Writes a String to a file creating the file if it does not exist.
*
* NOTE: As from v1.3, the parent directories of the file will be created
* if they do not exist.
*
* @param file the file to write
* @param data the content to write to the file
* @param encoding the encoding to use, <c... | Writes a String to a file creating the file if it does not exist. if they do not exist | writeStringToFile | {
"repo_name": "copyliu/Spoutcraft_CJKPatch",
"path": "src/minecraft/org/apache/commons/io/FileUtils.java",
"license": "lgpl-3.0",
"size": 83439
} | [
"java.io.File",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.File; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,591,941 |
@SubscribeEvent
public void onSpawn(PlayerEvent.PlayerLoggedOutEvent event)
{
Optional<Player> s = Gunsmith.<net.minecraft.entity.player.EntityPlayer>getPlayerRegistry().getPlayer(event.player.getName());
if (s.isPresent())
{
SniperDestroyEvent sde = new SniperDestroyEven... | void function(PlayerEvent.PlayerLoggedOutEvent event) { Optional<Player> s = Gunsmith.<net.minecraft.entity.player.EntityPlayer>getPlayerRegistry().getPlayer(event.player.getName()); if (s.isPresent()) { SniperDestroyEvent sde = new SniperDestroyEvent(s.get()); Gunsmith.getEventBus().post(sde); } } | /**
* The Player logged out event, proxies to Gunsmith's {@link SniperDestroyEvent}.
*
* @param event the event
*/ | The Player logged out event, proxies to Gunsmith's <code>SniperDestroyEvent</code> | onSpawn | {
"repo_name": "josiahseaman/VoxelSniper",
"path": "src/main/java/com/voxelplugineering/voxelsniper/forge/event/handler/ForgeEventProxy.java",
"license": "mit",
"size": 4734
} | [
"com.google.common.base.Optional",
"com.voxelplugineering.voxelsniper.api.entity.Player",
"com.voxelplugineering.voxelsniper.core.Gunsmith",
"com.voxelplugineering.voxelsniper.core.event.SniperEvent",
"net.minecraftforge.fml.common.gameevent.PlayerEvent"
] | import com.google.common.base.Optional; import com.voxelplugineering.voxelsniper.api.entity.Player; import com.voxelplugineering.voxelsniper.core.Gunsmith; import com.voxelplugineering.voxelsniper.core.event.SniperEvent; import net.minecraftforge.fml.common.gameevent.PlayerEvent; | import com.google.common.base.*; import com.voxelplugineering.voxelsniper.api.entity.*; import com.voxelplugineering.voxelsniper.core.*; import com.voxelplugineering.voxelsniper.core.event.*; import net.minecraftforge.fml.common.gameevent.*; | [
"com.google.common",
"com.voxelplugineering.voxelsniper",
"net.minecraftforge.fml"
] | com.google.common; com.voxelplugineering.voxelsniper; net.minecraftforge.fml; | 2,360,860 |
public String getStringAttribute(final String name, final String def)
{
final Node attr = getAttribute(name);
return (attr != null) ? attr.getNodeValue() : def;
} | String function(final String name, final String def) { final Node attr = getAttribute(name); return (attr != null) ? attr.getNodeValue() : def; } | /**
* Get the String attribute from the name and definition.
*
* @param name the name.
* @param def the definition.
* @return the String.
*/ | Get the String attribute from the name and definition | getStringAttribute | {
"repo_name": "xavierh/minecolonies",
"path": "src/main/java/com/minecolonies/blockout/PaneParams.java",
"license": "gpl-3.0",
"size": 12346
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,894,370 |
public boolean[] getTransStepIsRunningLookup() {
if ( steps == null ) {
return null;
}
boolean[] tResult = new boolean[ steps.size() ];
for ( int i = 0; i < steps.size(); i++ ) {
StepMetaDataCombi sid = steps.get( i );
tResult[ i ] = ( sid.step.isRunning() || sid.step.getStatus() !=... | boolean[] function() { if ( steps == null ) { return null; } boolean[] tResult = new boolean[ steps.size() ]; for ( int i = 0; i < steps.size(); i++ ) { StepMetaDataCombi sid = steps.get( i ); tResult[ i ] = ( sid.step.isRunning() sid.step.getStatus() != StepExecutionStatus.STATUS_FINISHED ); } return tResult; } | /**
* Checks whether the transformation steps are running lookup.
*
* @return a boolean array associated with the step list, indicating whether that step is running a lookup.
*/ | Checks whether the transformation steps are running lookup | getTransStepIsRunningLookup | {
"repo_name": "flbrino/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 198588
} | [
"org.pentaho.di.trans.step.BaseStepData",
"org.pentaho.di.trans.step.StepMetaDataCombi"
] | import org.pentaho.di.trans.step.BaseStepData; import org.pentaho.di.trans.step.StepMetaDataCombi; | import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,439,751 |
private void dumpStdout(List<String> stdout) {
if (log.isLoggable(Level.FINE)) {
for (String line : stdout) {
log.fine(line);
}
}
} | void function(List<String> stdout) { if (log.isLoggable(Level.FINE)) { for (String line : stdout) { log.fine(line); } } } | /**
* dump stdout if log level is FINE.
*
* @param stdout
* stdout
*/ | dump stdout if log level is FINE | dumpStdout | {
"repo_name": "nobrooklyn/serverunit",
"path": "core/src/main/java/serverunit/core/ssh/SshCommandExecutor.java",
"license": "lgpl-3.0",
"size": 5138
} | [
"java.util.List",
"java.util.logging.Level"
] | import java.util.List; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 28,523 |
public static <T1, T2> ObjectIntProcedure<T1> bind(
final ObjectIntProcedure<? super T2> delegate,
final Function<? super T1, T2> function)
{
return new ObjectIntProcedure<T1>()
{
private static final long serialVersionUID = 1L; | static <T1, T2> ObjectIntProcedure<T1> function( final ObjectIntProcedure<? super T2> delegate, final Function<? super T1, T2> function) { return new ObjectIntProcedure<T1>() { private static final long serialVersionUID = 1L; | /**
* Bind the input of a ObjectIntProcedure to the result of an function, returning a new ObjectIntProcedure.
*
* @param delegate The ObjectIntProcedure to delegate the invocation to.
* @param function The Function that will create the input for the delegate
* @return A new ObjectIntProcedure
... | Bind the input of a ObjectIntProcedure to the result of an function, returning a new ObjectIntProcedure | bind | {
"repo_name": "jlz27/gs-collections",
"path": "collections/src/main/java/com/gs/collections/impl/block/factory/Functions.java",
"license": "apache-2.0",
"size": 20678
} | [
"com.gs.collections.api.block.function.Function",
"com.gs.collections.api.block.procedure.ObjectIntProcedure"
] | import com.gs.collections.api.block.function.Function; import com.gs.collections.api.block.procedure.ObjectIntProcedure; | import com.gs.collections.api.block.function.*; import com.gs.collections.api.block.procedure.*; | [
"com.gs.collections"
] | com.gs.collections; | 2,030,694 |
public void testDecoding() throws Exception {
String requestContent = "<soap11:Envelope xmlns:soap11=\"http://schemas.xmlsoap.org/soap/envelope/\">"
+ "<soap11:Body><saml:Request IssueInstant=\"1970-01-01T00:00:00.000Z\" MajorVersion=\"1\" "
+ "MinorVersion=\"1\" RequestID=\"... | void function() throws Exception { String requestContent = STRhttp: + STR1970-01-01T00:00:00.000Z\STR1\" " + STR1\STRfoo\STRurn:oasis:names:tc:SAML:1.0:protocol\"/>" + STR; httpRequest.setContent(requestContent.getBytes()); decoder.decode(messageContext); assertTrue(messageContext.getInboundMessage() instanceof Envelop... | /**
* Tests decoding a SOAP 1.1 message.
*/ | Tests decoding a SOAP 1.1 message | testDecoding | {
"repo_name": "danpal/OpenSAML",
"path": "src/test/java/org/opensaml/saml1/binding/decoding/HTTPSOAP11DecoderTest.java",
"license": "apache-2.0",
"size": 10079
} | [
"org.opensaml.saml1.core.Request",
"org.opensaml.ws.soap.soap11.Envelope"
] | import org.opensaml.saml1.core.Request; import org.opensaml.ws.soap.soap11.Envelope; | import org.opensaml.saml1.core.*; import org.opensaml.ws.soap.soap11.*; | [
"org.opensaml.saml1",
"org.opensaml.ws"
] | org.opensaml.saml1; org.opensaml.ws; | 36,429 |
@Test
public void testDefaultConstructor() {
final JobEntity localJobEntity = new JobEntity();
Assert.assertNull(localJobEntity.getId());
Assert.assertEquals(JobEntity.DEFAULT_VERSION, localJobEntity.getVersion());
} | void function() { final JobEntity localJobEntity = new JobEntity(); Assert.assertNull(localJobEntity.getId()); Assert.assertEquals(JobEntity.DEFAULT_VERSION, localJobEntity.getVersion()); } | /**
* Test the default constructor.
*/ | Test the default constructor | testDefaultConstructor | {
"repo_name": "ajoymajumdar/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/jpa/entities/JobEntityUnitTests.java",
"license": "apache-2.0",
"size": 17568
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,781,351 |
public T json(JsonLibrary library, boolean prettyPrint) {
JsonDataFormat json = new JsonDataFormat(library);
json.setPrettyPrint(prettyPrint);
return dataFormat(json);
} | T function(JsonLibrary library, boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(library); json.setPrettyPrint(prettyPrint); return dataFormat(json); } | /**
* Uses the JSON data format
*
* @param library the json library to use
* @param prettyPrint turn pretty printing on or off
*/ | Uses the JSON data format | json | {
"repo_name": "jarst/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 39484
} | [
"org.apache.camel.model.dataformat.JsonDataFormat",
"org.apache.camel.model.dataformat.JsonLibrary"
] | import org.apache.camel.model.dataformat.JsonDataFormat; import org.apache.camel.model.dataformat.JsonLibrary; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 332,929 |
protected long checkSlice(long offset, long length) {
checkOffset(offset);
if (limit == -1) {
if (offset + length > capacity) {
if (capacity < maxCapacity) {
capacity(calculateCapacity(offset + length));
} else {
throw new BufferUnderflowException();
}
}... | long function(long offset, long length) { checkOffset(offset); if (limit == -1) { if (offset + length > capacity) { if (capacity < maxCapacity) { capacity(calculateCapacity(offset + length)); } else { throw new BufferUnderflowException(); } } } else { if (offset + length > limit) throw new BufferUnderflowException(); }... | /**
* Checks bounds for a slice.
*/ | Checks bounds for a slice | checkSlice | {
"repo_name": "tempbottle/copycat",
"path": "io/src/main/java/net/kuujo/copycat/io/AbstractBuffer.java",
"license": "apache-2.0",
"size": 22800
} | [
"java.nio.BufferUnderflowException"
] | import java.nio.BufferUnderflowException; | import java.nio.*; | [
"java.nio"
] | java.nio; | 197,742 |
public void addBudgetAmount(KualiDecimal budgetAmount) {
this.budgetAmount = this.budgetAmount.add(budgetAmount);
}
}
protected class EntryReportDocumentTypeTotalLine extends EntryReportTotalLine {
private String documentTypeCode;
... | void function(KualiDecimal budgetAmount) { this.budgetAmount = this.budgetAmount.add(budgetAmount); } } protected class EntryReportDocumentTypeTotalLine extends EntryReportTotalLine { private String documentTypeCode; private int entryCount = 0; public EntryReportDocumentTypeTotalLine(String documentTypeCode) { this.doc... | /**
* Adds the given amount to the budget total
* @param budgetAmount the amount to add to the budget total
*/ | Adds the given amount to the budget total | addBudgetAmount | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/gl/batch/service/impl/NightlyOutServiceImpl.java",
"license": "apache-2.0",
"size": 22776
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,595,530 |
public void run() throws Exception {
Permission pm1 = new RuntimePermission("A");
Permission pm2 = new RuntimePermission("B");
Permission pm3 = new RuntimePermission("C");
Permission pm4 = new RuntimePermission("D");
Permission pm5 = new RuntimePermission("E");
Permis... | void function() throws Exception { Permission pm1 = new RuntimePermission("A"); Permission pm2 = new RuntimePermission("B"); Permission pm3 = new RuntimePermission("C"); Permission pm4 = new RuntimePermission("D"); Permission pm5 = new RuntimePermission("E"); Permission pm6 = new RuntimePermission("F"); Permission[] pm... | /**
* Run the test according <b>Test Description</b>
*/ | Run the test according Test Description | run | {
"repo_name": "pfirmstone/river-internet",
"path": "qa/src/org/apache/river/test/spec/policyprovider/dynamicPolicyProvider/GetGrantsNoPrincipal.java",
"license": "apache-2.0",
"size": 8707
} | [
"java.security.Permission",
"java.security.Policy",
"java.util.logging.Level"
] | import java.security.Permission; import java.security.Policy; import java.util.logging.Level; | import java.security.*; import java.util.logging.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,884,195 |
@Test
public void testWriteFiller() throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
DocumentOutputStream dstream = new DocumentOutputStream(stream, 25);
for (int j = 0; j < 25; j++)
{
dstream.write(j);
}
try
... | void function() throws IOException { ByteArrayOutputStream stream = new ByteArrayOutputStream(); DocumentOutputStream dstream = new DocumentOutputStream(stream, 25); for (int j = 0; j < 25; j++) { dstream.write(j); } try { dstream.write(0); fail(STR); } catch (IOException ignored) { } dstream.writeFiller(100, ( byte ) ... | /**
* test writeFiller()
*/ | test writeFiller() | testWriteFiller | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/testcases/org/apache/poi/poifs/filesystem/TestDocumentOutputStream.java",
"license": "apache-2.0",
"size": 4979
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"org.junit.Assert"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 1,659,794 |
protected Object writeReplace() throws ObjectStreamException
{
try
{
return new CertificateRep(getType(), getEncoded());
}
catch (CertificateEncodingException cee)
{
throw new InvalidObjectException(cee.toString());
}
}
// Inner class.
// ----------------------... | Object function() throws ObjectStreamException { try { return new CertificateRep(getType(), getEncoded()); } catch (CertificateEncodingException cee) { throw new InvalidObjectException(cee.toString()); } } protected static class CertificateRep implements java.io.Serializable { private static final long serialVersionUID... | /**
* Returns a replacement for this certificate to be serialized. This
* method returns the equivalent to the following for this class:
*
* <blockquote>
* <pre>new CertificateRep(getType(), getEncoded());</pre>
* </blockquote>
*
* <p>This thusly replaces the certificate with its name and its
... | Returns a replacement for this certificate to be serialized. This method returns the equivalent to the following for this class: <code>new CertificateRep(getType(), getEncoded());</code> This thusly replaces the certificate with its name and its encoded form, which can be deserialized later with the <code>CertificateFa... | writeReplace | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/security/cert/Certificate.java",
"license": "gpl-2.0",
"size": 9721
} | [
"java.io.InvalidObjectException",
"java.io.ObjectStreamException",
"java.io.Serializable"
] | import java.io.InvalidObjectException; import java.io.ObjectStreamException; import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 145,326 |
@Test
@MediumTest
@Feature({"autofill"})
public void testLoggingInitiatedElementFilled() throws TimeoutException {
loadAndFillForm(INITIATING_ELEMENT_FILLED, "o");
final String profileFullName = FIRST_NAME + " " + LAST_NAME;
final int loggedEntries = 4;
Assert.assertEqual... | @Feature({STR}) void function() throws TimeoutException { loadAndFillForm(INITIATING_ELEMENT_FILLED, "o"); final String profileFullName = FIRST_NAME + " " + LAST_NAME; final int loggedEntries = 4; Assert.assertEquals(STR, loggedEntries, mAutofillLoggedEntries.size()); assertLogged(FIRST_NAME, profileFullName); assertLo... | /**
* Tests that bringing up an Autofill and clicking on the partially filled first
* element will still fill the entire form (including the initiating element itself).
*/ | Tests that bringing up an Autofill and clicking on the partially filled first element will still fill the entire form (including the initiating element itself) | testLoggingInitiatedElementFilled | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java",
"license": "bsd-3-clause",
"size": 20461
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.base.test.util.Feature",
"org.junit.Assert"
] | import java.util.concurrent.TimeoutException; import org.chromium.base.test.util.Feature; import org.junit.Assert; | import java.util.concurrent.*; import org.chromium.base.test.util.*; import org.junit.*; | [
"java.util",
"org.chromium.base",
"org.junit"
] | java.util; org.chromium.base; org.junit; | 1,059,409 |
private static Long extractLongValueFrom(final Object reflectedValue) {
if (reflectedValue instanceof Integer) {
return ((Integer) reflectedValue).longValue();
} else if (reflectedValue instanceof Long) {
return (Long) reflectedValue;
} else if (reflectedValue instanc... | static Long function(final Object reflectedValue) { if (reflectedValue instanceof Integer) { return ((Integer) reflectedValue).longValue(); } else if (reflectedValue instanceof Long) { return (Long) reflectedValue; } else if (reflectedValue instanceof BigInteger) { return ((BigInteger) reflectedValue).longValue(); } el... | /**
* Extracts from number-like <code>reflectedValue</code> its {@link Long} representation.
*
* @param reflectedValue
* @return
*/ | Extracts from number-like <code>reflectedValue</code> its <code>Long</code> representation | extractLongValueFrom | {
"repo_name": "fieldenms/tg",
"path": "platform-pojo-bl/src/main/java/ua/com/fielden/platform/web/utils/EntityResourceUtils.java",
"license": "mit",
"size": 54150
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,416,235 |
INDArray activate(INDArray input, boolean training); | INDArray activate(INDArray input, boolean training); | /**
* Initialize the layer with the given input
* and return the activation for this layer
* given this input
* @param input the input to use
* @param training train or test mode
* @return
*/ | Initialize the layer with the given input and return the activation for this layer given this input | activate | {
"repo_name": "shuodata/deeplearning4j",
"path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/api/Layer.java",
"license": "apache-2.0",
"size": 10105
} | [
"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,774,231 |
private void adaptShellPermissionIfRequired() throws Throwable {
if (mContext.getApplicationContext().getApplicationInfo().targetSdkVersion >= 29
&& Build.VERSION.SDK_INT >= 29) {
Log.d("Elevating permission require to enable support for wifi operation in Android Q+");
UiAuto... | void function() throws Throwable { if (mContext.getApplicationContext().getApplicationInfo().targetSdkVersion >= 29 && Build.VERSION.SDK_INT >= 29) { Log.d(STR); UiAutomation uia = InstrumentationRegistry.getInstrumentation().getUiAutomation(); uia.adoptShellPermissionIdentity(); try { Class<?> cls = Class.forName(STR)... | /**
* Elevates permission as require for proper wifi controls.
*
* Starting in Android Q (29), additional restrictions are added for wifi operation. See
* below Android Q privacy changes for additional details.
* https://developer.android.com/preview/privacy/camera-connectivity
*
* @t... | Elevates permission as require for proper wifi controls. Starting in Android Q (29), additional restrictions are added for wifi operation. See below Android Q privacy changes for additional details. HREF | adaptShellPermissionIfRequired | {
"repo_name": "google/mobly-bundled-snippets",
"path": "src/main/java/com/google/android/mobly/snippet/bundled/WifiManagerSnippet.java",
"license": "apache-2.0",
"size": 19467
} | [
"android.app.UiAutomation",
"android.content.BroadcastReceiver",
"android.os.Build",
"androidx.test.platform.app.InstrumentationRegistry",
"com.google.android.mobly.snippet.util.Log",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import android.app.UiAutomation; import android.content.BroadcastReceiver; import android.os.Build; import androidx.test.platform.app.InstrumentationRegistry; import com.google.android.mobly.snippet.util.Log; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import android.app.*; import android.content.*; import android.os.*; import androidx.test.platform.app.*; import com.google.android.mobly.snippet.util.*; import java.lang.reflect.*; | [
"android.app",
"android.content",
"android.os",
"androidx.test",
"com.google.android",
"java.lang"
] | android.app; android.content; android.os; androidx.test; com.google.android; java.lang; | 2,141,356 |
@WebMethod(operationName = "principalHasRoleCheckDelegation")
@WebResult(name = "principalHasRoleCheckDelegation")
boolean principalHasRole( @WebParam(name="principalId") String principalId,
@WebParam(name="roleIds") List<String> roleIds,
@WebParam(name="qualification") @XmlJavaTypeA... | @WebMethod(operationName = STR) @WebResult(name = STR) boolean principalHasRole( @WebParam(name=STR) String principalId, @WebParam(name=STR) List<String> roleIds, @WebParam(name=STR) @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) Map<String, String> qualification, boolean checkDelegations) throws RiceIllegal... | /**
* Returns whether the given principal has any of the passed role IDs with the given qualification.
*
* @param principalId the principal Id to check.
* @param roleIds the list of role ids.
* @param qualification the qualifications for the roleIds.
* @param checkDelegations whether deleg... | Returns whether the given principal has any of the passed role IDs with the given qualification | principalHasRole | {
"repo_name": "ricepanda/rice-git3",
"path": "rice-middleware/kim/kim-api/src/main/java/org/kuali/rice/kim/api/role/RoleService.java",
"license": "apache-2.0",
"size": 48854
} | [
"java.util.List",
"java.util.Map",
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter",
"org.kuali.rice.core.api.exception.RiceIllegalArgumentException",
"org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter"
] | import java.util.List; import java.util.Map; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; import org.kuali.rice.core.api.util.jaxb.MapStringStringAda... | import java.util.*; import javax.jws.*; import javax.xml.bind.annotation.adapters.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.core.api.util.jaxb.*; | [
"java.util",
"javax.jws",
"javax.xml",
"org.kuali.rice"
] | java.util; javax.jws; javax.xml; org.kuali.rice; | 2,794,494 |
public void setDHServerPublic(DHPublicKey newPublicKey); | void function(DHPublicKey newPublicKey); | /**
* Set the OpenID Provider's Diffie-Hellman public key.
*
* @param newPublicKey the DH server key
*/ | Set the OpenID Provider's Diffie-Hellman public key | setDHServerPublic | {
"repo_name": "willnorris/java-openid",
"path": "src/main/java/edu/internet2/middleware/openid/message/AssociationResponse.java",
"license": "apache-2.0",
"size": 3248
} | [
"javax.crypto.interfaces.DHPublicKey"
] | import javax.crypto.interfaces.DHPublicKey; | import javax.crypto.interfaces.*; | [
"javax.crypto"
] | javax.crypto; | 2,002,283 |
public void beforeDir(File dir, PackFile packFile, Pack pack)
{
for (InstallerListener l : fileListeners)
{
l.beforeDir(dir, packFile, pack);
}
} | void function(File dir, PackFile packFile, Pack pack) { for (InstallerListener l : fileListeners) { l.beforeDir(dir, packFile, pack); } } | /**
* Invoked before a directory is created.
*
* @param dir the directory
* @param packFile corresponding pack file
* @param pack the pack that {@code packFile} comes from
* @throws IzPackException if a listener throws an exception
*/ | Invoked before a directory is created | beforeDir | {
"repo_name": "codehaus/izpack",
"path": "izpack-installer/src/main/java/com/izforge/izpack/installer/event/InstallerListeners.java",
"license": "apache-2.0",
"size": 8833
} | [
"com.izforge.izpack.api.data.Pack",
"com.izforge.izpack.api.data.PackFile",
"com.izforge.izpack.api.event.InstallerListener",
"java.io.File"
] | import com.izforge.izpack.api.data.Pack; import com.izforge.izpack.api.data.PackFile; import com.izforge.izpack.api.event.InstallerListener; import java.io.File; | import com.izforge.izpack.api.data.*; import com.izforge.izpack.api.event.*; import java.io.*; | [
"com.izforge.izpack",
"java.io"
] | com.izforge.izpack; java.io; | 723,036 |
private void handleRemoveComponentMessage(WonderlandClientSender sender,
WonderlandClientID clientID, CellServerComponentMessage message) {
// Fetch the server-side component class name and remove the
// component. Upon success, send a general "ok" message.
t... | void function(WonderlandClientSender sender, WonderlandClientID clientID, CellServerComponentMessage message) { try { CellMO cellMO = getCell(); String className = message.getCellComponentServerClassName(); Class clazz = CellComponentUtils.getLookupClass(Class.forName(className)); CellComponentMO component = cellMO.get... | /**
* Handles a "remove" message by removing the component
*/ | Handles a "remove" message by removing the component | handleRemoveComponentMessage | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/core/src/classes/org/jdesktop/wonderland/server/cell/CellMO.java",
"license": "agpl-3.0",
"size": 61615
} | [
"com.sun.sgs.app.AppContext",
"com.sun.sgs.app.ManagedReference",
"java.util.logging.Level",
"org.jdesktop.wonderland.common.cell.messages.CellServerComponentMessage",
"org.jdesktop.wonderland.common.cell.state.CellComponentUtils",
"org.jdesktop.wonderland.common.messages.ErrorMessage",
"org.jdesktop.wo... | import com.sun.sgs.app.AppContext; import com.sun.sgs.app.ManagedReference; import java.util.logging.Level; import org.jdesktop.wonderland.common.cell.messages.CellServerComponentMessage; import org.jdesktop.wonderland.common.cell.state.CellComponentUtils; import org.jdesktop.wonderland.common.messages.ErrorMessage; im... | import com.sun.sgs.app.*; import java.util.logging.*; import org.jdesktop.wonderland.common.cell.messages.*; import org.jdesktop.wonderland.common.cell.state.*; import org.jdesktop.wonderland.common.messages.*; import org.jdesktop.wonderland.server.comms.*; | [
"com.sun.sgs",
"java.util",
"org.jdesktop.wonderland"
] | com.sun.sgs; java.util; org.jdesktop.wonderland; | 1,916,612 |
public DataSink<T> write(FileOutputFormat<T> outputFormat, String filePath) {
Preconditions.checkNotNull(filePath, "File path must not be null.");
Preconditions.checkNotNull(outputFormat, "Output format must not be null.");
outputFormat.setOutputFilePath(new Path(filePath));
return output(outputFormat);
}
... | DataSink<T> function(FileOutputFormat<T> outputFormat, String filePath) { Preconditions.checkNotNull(filePath, STR); Preconditions.checkNotNull(outputFormat, STR); outputFormat.setOutputFilePath(new Path(filePath)); return output(outputFormat); } | /**
* Writes a DataSet using a {@link FileOutputFormat} to a specified location.
* This method adds a data sink to the program.
*
* @param outputFormat The FileOutputFormat to write the DataSet.
* @param filePath The path to the location where the DataSet is written.
* @return The DataSink that writes the ... | Writes a DataSet using a <code>FileOutputFormat</code> to a specified location. This method adds a data sink to the program | write | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java",
"license": "apache-2.0",
"size": 80409
} | [
"org.apache.flink.api.common.io.FileOutputFormat",
"org.apache.flink.api.java.operators.DataSink",
"org.apache.flink.core.fs.Path",
"org.apache.flink.util.Preconditions"
] | import org.apache.flink.api.common.io.FileOutputFormat; import org.apache.flink.api.java.operators.DataSink; import org.apache.flink.core.fs.Path; import org.apache.flink.util.Preconditions; | import org.apache.flink.api.common.io.*; import org.apache.flink.api.java.operators.*; import org.apache.flink.core.fs.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,700,598 |
@OnMessage
public void onMessage(String message, Session session) {
JsonReader jsonReader = Json.createReader(new StringReader(message));
JsonObject msg = jsonReader.readObject();
jsonReader.close();
LOGGER.info("Inc: " + msg.toString());
SessionController.getInstance().r... | void function(String message, Session session) { JsonReader jsonReader = Json.createReader(new StringReader(message)); JsonObject msg = jsonReader.readObject(); jsonReader.close(); LOGGER.info(STR + msg.toString()); SessionController.getInstance().receiveMessage(session, msg); } | /**
* Parses the incoming Message to a JSON Object.
* @param message Json as String.
* @param session Session where the message came from.
*/ | Parses the incoming Message to a JSON Object | onMessage | {
"repo_name": "RandomUUID/NephelinServer",
"path": "src/main/java/de/nephelin/websocket/MessageEndpoint.java",
"license": "agpl-3.0",
"size": 1869
} | [
"de.nephelin.controller.SessionController",
"java.io.StringReader",
"javax.json.Json",
"javax.json.JsonObject",
"javax.json.JsonReader",
"javax.websocket.Session"
] | import de.nephelin.controller.SessionController; import java.io.StringReader; import javax.json.Json; import javax.json.JsonObject; import javax.json.JsonReader; import javax.websocket.Session; | import de.nephelin.controller.*; import java.io.*; import javax.json.*; import javax.websocket.*; | [
"de.nephelin.controller",
"java.io",
"javax.json",
"javax.websocket"
] | de.nephelin.controller; java.io; javax.json; javax.websocket; | 1,682,225 |
@Override
public void execute(String filePath) {
final CurrentProject currentProject = appContext.getCurrentProject();
if (filePath != null && !filePath.startsWith("/")) {
filePath = "/".concat(filePath);
}
if (currentProject != null) {
String fullPath = c... | void function(String filePath) { final CurrentProject currentProject = appContext.getCurrentProject(); if (filePath != null && !filePath.startsWith("/")) { filePath = "/".concat(filePath); } if (currentProject != null) { String fullPath = currentProject.getRootProject().getPath() + filePath; log.debug(STR, fullPath); c... | /**
* Open a file for the current given path.
* @param filePath the file path
*/ | Open a file for the current given path | execute | {
"repo_name": "sunix/che-plugins",
"path": "plugin-tour/che-plugin-tour-ext-client/src/main/java/org/eclipse/che/plugin/tour/client/action/impl/OpenFileExternalAction.java",
"license": "epl-1.0",
"size": 3250
} | [
"org.eclipse.che.ide.api.app.CurrentProject"
] | import org.eclipse.che.ide.api.app.CurrentProject; | import org.eclipse.che.ide.api.app.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 167,540 |
private static Properties loadProperties(File aFile)
{
final Properties properties = new Properties();
FileInputStream fis = null;
try {
fis = new FileInputStream(aFile);
properties.load(fis);
}
catch (final IOException ex) {
System.out... | static Properties function(File aFile) { final Properties properties = new Properties(); FileInputStream fis = null; try { fis = new FileInputStream(aFile); properties.load(fis); } catch (final IOException ex) { System.out.println(STR + aFile.getAbsolutePath()); ex.printStackTrace(System.out); System.exit(1); } finally... | /**
* Loads properties from a File.
* @param aFile the properties file
* @return the properties in aFile
*/ | Loads properties from a File | loadProperties | {
"repo_name": "pbaranchikov/checkstyle",
"path": "src/checkstyle/com/puppycrawl/tools/checkstyle/Main.java",
"license": "lgpl-2.1",
"size": 9781
} | [
"com.puppycrawl.tools.checkstyle.api.Utils",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.util.Properties"
] | import com.puppycrawl.tools.checkstyle.api.Utils; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; | import com.puppycrawl.tools.checkstyle.api.*; import java.io.*; import java.util.*; | [
"com.puppycrawl.tools",
"java.io",
"java.util"
] | com.puppycrawl.tools; java.io; java.util; | 1,942,318 |
User user = getCurrentUserObject();
if (user != null) {
return user.getId();
}
return null;
} | User user = getCurrentUserObject(); if (user != null) { return user.getId(); } return null; } | /**
* Get the login of the current user.
*/ | Get the login of the current user | getCurrentUserId | {
"repo_name": "lsmall/flowable-engine",
"path": "modules/flowable-ui-common/src/main/java/org/flowable/ui/common/security/SecurityUtils.java",
"license": "apache-2.0",
"size": 2682
} | [
"org.flowable.idm.api.User"
] | import org.flowable.idm.api.User; | import org.flowable.idm.api.*; | [
"org.flowable.idm"
] | org.flowable.idm; | 1,448,577 |
EReference getServiceDeliveryPoint_CustomerAgreement(); | EReference getServiceDeliveryPoint_CustomerAgreement(); | /**
* Returns the meta object for the reference '{@link CIM.IEC61968.Metering.ServiceDeliveryPoint#getCustomerAgreement <em>Customer Agreement</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Customer Agreement</em>'.
* @see CIM.IEC61968.Metering.Servi... | Returns the meta object for the reference '<code>CIM.IEC61968.Metering.ServiceDeliveryPoint#getCustomerAgreement Customer Agreement</code>'. | getServiceDeliveryPoint_CustomerAgreement | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Metering/MeteringPackage.java",
"license": "mit",
"size": 264485
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 660,892 |
boolean isRoleAvailableToUser(String userId, Role role) throws RepositoryDataAccessException;
| boolean isRoleAvailableToUser(String userId, Role role) throws RepositoryDataAccessException; | /**
* Check if the role is available to the userId
* @param userId
* @param role
* @return true if role is available to the user, false otherwise
* @throws RepositoryDataAccessException
*/ | Check if the role is available to the userId | isRoleAvailableToUser | {
"repo_name": "setu9760/my-app",
"path": "common/src/main/java/spring/desai/common/repository/RoleRepository.java",
"license": "gpl-2.0",
"size": 1728
} | [
"spring.desai.common.model.Role",
"spring.desai.common.repository.exception.RepositoryDataAccessException"
] | import spring.desai.common.model.Role; import spring.desai.common.repository.exception.RepositoryDataAccessException; | import spring.desai.common.model.*; import spring.desai.common.repository.exception.*; | [
"spring.desai.common"
] | spring.desai.common; | 1,696,045 |
private JPanel getMainPanel() {
if (mainPanel == null) {
GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
gridBagConstraints6.gridx = 0;
gridBagConstraints6.insets = new Insets(2, 2, 2, 2);
gridBagConstraints6.anchor = GridBagConstraints.EAST... | JPanel function() { if (mainPanel == null) { GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); gridBagConstraints6.gridx = 0; gridBagConstraints6.insets = new Insets(2, 2, 2, 2); gridBagConstraints6.anchor = GridBagConstraints.EAST; gridBagConstraints6.gridy = 2; GridBagConstraints gridBagConstraints5 ... | /**
* This method initializes mainPanel
*
* @return javax.swing.JPanel
*/ | This method initializes mainPanel | getMainPanel | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/sdkQuery42/src/java/style/org/cagrid/data/sdkquery42/style/wizard/mapping/MappingCustomizationDialog.java",
"license": "bsd-3-clause",
"size": 20300
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.JPanel"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,832,467 |
return NO_OP_INSTANCE;
}
private static final class NoOpScopedLoggingContext extends ScopedLoggingContext
implements LoggingContextCloseable {
// Since the ContextDataProvider class is loaded during Platform initialization we must be very
// careful to avoid any attempt to obtain a logger instance un... | return NO_OP_INSTANCE; } private static final class NoOpScopedLoggingContext extends ScopedLoggingContext implements LoggingContextCloseable { private static final class LazyLogger { private static final FluentLogger logger = FluentLogger.forEnclosingClass(); } private final AtomicBoolean haveWarned = new AtomicBoolean... | /**
* Returns a singleton "no op" instance of the context data provider API which logs a warning if
* used in code which attempts to set context information or modify scopes. This is intended for
* use by platform implementations in cases where no context is configured.
*/ | Returns a singleton "no op" instance of the context data provider API which logs a warning if used in code which attempts to set context information or modify scopes. This is intended for use by platform implementations in cases where no context is configured | getNoOpInstance | {
"repo_name": "google/flogger",
"path": "api/src/main/java/com/google/common/flogger/context/NoOpContextDataProvider.java",
"license": "apache-2.0",
"size": 4045
} | [
"com.google.common.flogger.FluentLogger",
"com.google.common.flogger.context.ScopedLoggingContext",
"java.util.concurrent.atomic.AtomicBoolean"
] | import com.google.common.flogger.FluentLogger; import com.google.common.flogger.context.ScopedLoggingContext; import java.util.concurrent.atomic.AtomicBoolean; | import com.google.common.flogger.*; import com.google.common.flogger.context.*; import java.util.concurrent.atomic.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,023,652 |
@Test
public void testLastUsedPreparedStatementUse() throws Exception {
ds.setRemoveAbandonedTimeout(1);
ds.setMaxTotal(2);
try (Connection conn1 = ds.getConnection();
Statement st = conn1.createStatement()) {
String querySQL = "SELECT 1 FROM DUAL";
... | void function() throws Exception { ds.setRemoveAbandonedTimeout(1); ds.setMaxTotal(2); try (Connection conn1 = ds.getConnection(); Statement st = conn1.createStatement()) { String querySQL = STR; Thread.sleep(500); Assert.assertNotNull(st.executeQuery(querySQL)); Thread.sleep(800); Connection conn2 = ds.getConnection()... | /**
* DBCP-343 - verify that using a DelegatingStatement updates
* the lastUsed on the parent connection
*/ | DBCP-343 - verify that using a DelegatingStatement updates the lastUsed on the parent connection | testLastUsedPreparedStatementUse | {
"repo_name": "kmiku7/apache-commons-dbcp-annotated",
"path": "src/test/java/org/apache/commons/dbcp2/TestAbandonedBasicDataSource.java",
"license": "apache-2.0",
"size": 11596
} | [
"java.sql.Connection",
"java.sql.Statement",
"org.junit.Assert"
] | import java.sql.Connection; import java.sql.Statement; import org.junit.Assert; | import java.sql.*; import org.junit.*; | [
"java.sql",
"org.junit"
] | java.sql; org.junit; | 1,673,257 |
public void unregisterCache(GridCacheContextInfo cacheInfo, boolean rmvIdx) throws IgniteCheckedException; | void function(GridCacheContextInfo cacheInfo, boolean rmvIdx) throws IgniteCheckedException; | /**
* Unregisters cache.
*
* @param cacheInfo Cache context info.
* @param rmvIdx If {@code true}, will remove index.
* @throws IgniteCheckedException If failed to drop cache schema.
*/ | Unregisters cache | unregisterCache | {
"repo_name": "shroman/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java",
"license": "apache-2.0",
"size": 15927
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.GridCacheContextInfo"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContextInfo; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 848,879 |
public static String toString(Object o, String tagName)
throws JSONException {
StringBuffer b = new StringBuffer();
int i;
JSONArray ja;
JSONObject jo;
String k;
Iterator keys;
int len;
String s;
... | static String function(Object o, String tagName) throws JSONException { StringBuffer b = new StringBuffer(); int i; JSONArray ja; JSONObject jo; String k; Iterator keys; int len; String s; Object v; if (o instanceof JSONObject) { if (tagName != null) { b.append('<'); b.append(tagName); b.append('>'); } jo = (JSONObject... | /**
* Convert a JSONObject into a well-formed, element-normal XML string.
* @param o A JSONObject.
* @param tagName The optional name of the enclosing tag.
* @return A string.
* @throws JSONException
*/ | Convert a JSONObject into a well-formed, element-normal XML string | toString | {
"repo_name": "dasomel/egovframework",
"path": "common-component/v2.3.2/src/main/java/egovframework/com/ext/jfile/org/json/XML.java",
"license": "apache-2.0",
"size": 14136
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 992,455 |
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
public static DoublesPair.Meta meta() {
return DoublesPair.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(DoublesPair.Meta.INSTANCE);
}
private static final long serialVersionUID = 1L;
privat... | static DoublesPair.Meta function() { return DoublesPair.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(DoublesPair.Meta.INSTANCE); } private static final long serialVersionUID = 1L; private DoublesPair( double first, double second) { this.first = first; this.second = second; } | /**
* The meta-bean for {@code DoublesPair}.
* @return the meta-bean, not null
*/ | The meta-bean for DoublesPair | meta | {
"repo_name": "nssales/Strata",
"path": "modules/collect/src/main/java/com/opengamma/strata/collect/tuple/DoublesPair.java",
"license": "apache-2.0",
"size": 12714
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,447,774 |
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
} | Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } | /**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/ | Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods | applyToAllUnaryMethods | {
"repo_name": "googleapis/java-dialogflow-cx",
"path": "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/IntentsStubSettings.java",
"license": "apache-2.0",
"size": 18412
} | [
"com.google.api.core.ApiFunction",
"com.google.api.gax.rpc.UnaryCallSettings"
] | import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings; | import com.google.api.core.*; import com.google.api.gax.rpc.*; | [
"com.google.api"
] | com.google.api; | 1,958,611 |
public Builder setFluoQuery(@Nullable final FluoQuery fluoQuery) {
this.fluoQuery = fluoQuery;
return this;
} | Builder function(@Nullable final FluoQuery fluoQuery) { this.fluoQuery = fluoQuery; return this; } | /**
* Set the metadata about the nodes of the query.
*
* @param fluoQuery - The metadata about the nodes of the query.
* @return This builder so that method invocations may be chained.
*/ | Set the metadata about the nodes of the query | setFluoQuery | {
"repo_name": "pujav65/incubator-rya",
"path": "extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/GetQueryReport.java",
"license": "apache-2.0",
"size": 9772
} | [
"edu.umd.cs.findbugs.annotations.Nullable",
"org.apache.rya.indexing.pcj.fluo.app.query.FluoQuery"
] | import edu.umd.cs.findbugs.annotations.Nullable; import org.apache.rya.indexing.pcj.fluo.app.query.FluoQuery; | import edu.umd.cs.findbugs.annotations.*; import org.apache.rya.indexing.pcj.fluo.app.query.*; | [
"edu.umd.cs",
"org.apache.rya"
] | edu.umd.cs; org.apache.rya; | 1,514,518 |
@Override
public IAST rotateRight(IASTAppendable resultList, final int n) {
if (n <= size()) {
for (int i = size() - n; i < size(); i++) {
resultList.append(get(i));
}
for (int i = 1; i < size() - n; i++) {
resultList.append(get(i));
}
}
return resultList;
} | IAST function(IASTAppendable resultList, final int n) { if (n <= size()) { for (int i = size() - n; i < size(); i++) { resultList.append(get(i)); } for (int i = 1; i < size() - n; i++) { resultList.append(get(i)); } } return resultList; } | /**
* Rotate the ranges elements to the right by n places and append the resulting elements to the
* <code>list</code>
*
* @param resultList
* @param n
* @return the given list
*/ | Rotate the ranges elements to the right by n places and append the resulting elements to the <code>list</code> | rotateRight | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/AbstractAST.java",
"license": "gpl-3.0",
"size": 143779
} | [
"org.matheclipse.core.interfaces.IASTAppendable"
] | import org.matheclipse.core.interfaces.IASTAppendable; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 2,545,667 |
double cc = 0;
double denom = Math.sqrt( LibUtilities.sumOfSquares( ip1 ) * LibUtilities.sumOfSquares( ip2 ) );
double num = LibUtilities.sumOfProduct( ip1, ip2 );
cc = num / denom;
return cc;
}
| double cc = 0; double denom = Math.sqrt( LibUtilities.sumOfSquares( ip1 ) * LibUtilities.sumOfSquares( ip2 ) ); double num = LibUtilities.sumOfProduct( ip1, ip2 ); cc = num / denom; return cc; } | /**
* The crossCorrelation (unnormalized) is defined as
* CC(X,Y) = sum_i(Xi*Yi) / sqrt( sum_i(Xi)^2 * sum_i(Yi)^2 )
*
* @return crossCorrelation (unnormalized)
*/ | The crossCorrelation (unnormalized) is defined as CC(X,Y) = sum_i(Xi*Yi) / sqrt( sum_i(Xi)^2 * sum_i(Yi)^2 ) | CC | {
"repo_name": "mbarbie1/region-selection",
"path": "src/be/ua/mbarbier/rese/error/LibError.java",
"license": "mit",
"size": 6281
} | [
"be.ua.mbarbier.rese.image.LibUtilities"
] | import be.ua.mbarbier.rese.image.LibUtilities; | import be.ua.mbarbier.rese.image.*; | [
"be.ua.mbarbier"
] | be.ua.mbarbier; | 2,817,505 |
public static File getWidgetPreferencesFile(Context context, int id) {
return new File(context.getFilesDir().getParent()
+ "/shared_prefs/"
+ getWidgetPreferencesName(id)
+ ".xml");
} | static File function(Context context, int id) { return new File(context.getFilesDir().getParent() + STR + getWidgetPreferencesName(id) + ".xml"); } | /**
* Gets widget preferences file.
*
* @param context the context
* @param id the id
* @return the widget preferences file
*/ | Gets widget preferences file | getWidgetPreferencesFile | {
"repo_name": "drymarev/rxbsuir",
"path": "app/src/main/java/by/toggi/rxbsuir/PreferenceHelper.java",
"license": "gpl-2.0",
"size": 6221
} | [
"android.content.Context",
"java.io.File"
] | import android.content.Context; import java.io.File; | import android.content.*; import java.io.*; | [
"android.content",
"java.io"
] | android.content; java.io; | 1,933,108 |
public AbstractAudioDeviceConfig getGenericAudioItem(String name) {
for (AbstractAudioDeviceConfig item : items) {
if (item.getPaName().equalsIgnoreCase(name)) {
return item;
}
}
return null;
} | AbstractAudioDeviceConfig function(String name) { for (AbstractAudioDeviceConfig item : items) { if (item.getPaName().equalsIgnoreCase(name)) { return item; } } return null; } | /**
* retrieves a {@link AbstractAudioDeviceConfig} by its name
*
* @return the corresponding {@link AbstractAudioDeviceConfig} to the given <code>name</code>
*/ | retrieves a <code>AbstractAudioDeviceConfig</code> by its name | getGenericAudioItem | {
"repo_name": "lewie/openhab2",
"path": "addons/binding/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseaudioClient.java",
"license": "epl-1.0",
"size": 20506
} | [
"org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig"
] | import org.openhab.binding.pulseaudio.internal.items.AbstractAudioDeviceConfig; | import org.openhab.binding.pulseaudio.internal.items.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,082,448 |
public float readTemperature() throws IOException, IllegalStateException {
if (mTemperatureOversampling == OVERSAMPLING_SKIPPED) {
throw new IllegalStateException("temperature oversampling is skipped");
}
int rawTemp = readSample(BMX280_REG_TEMP);
return compensateTempera... | float function() throws IOException, IllegalStateException { if (mTemperatureOversampling == OVERSAMPLING_SKIPPED) { throw new IllegalStateException(STR); } int rawTemp = readSample(BMX280_REG_TEMP); return compensateTemperature(rawTemp, mTempCalibrationData)[0]; } | /**
* Read the current temperature.
*
* @return the current temperature in degrees Celsius
*/ | Read the current temperature | readTemperature | {
"repo_name": "Ic-ks/contrib-drivers",
"path": "bmx280/src/main/java/com/google/android/things/contrib/driver/bmx280/Bmx280.java",
"license": "apache-2.0",
"size": 21598
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 881,784 |
public static Vector2f getCursorPositionDelta()
{
return new Vector2f(mousePositionDelta);
} | static Vector2f function() { return new Vector2f(mousePositionDelta); } | /**
* <p>
* Get the cursor position delta.
* </p>
*
* @return The cursor position delta.
*/ | Get the cursor position delta. | getCursorPositionDelta | {
"repo_name": "Snakybo/TorchEngine",
"path": "src/main/java/com/snakybo/torch/input/mouse/Mouse.java",
"license": "mit",
"size": 3986
} | [
"org.joml.Vector2f"
] | import org.joml.Vector2f; | import org.joml.*; | [
"org.joml"
] | org.joml; | 1,335,600 |
public void setText(String newText) {
setAttribute(MeasurementAttributes.TEXT, newText);
} | void function(String newText) { setAttribute(MeasurementAttributes.TEXT, newText); } | /**
* Sets the text shown by the text figure.
*/ | Sets the text shown by the text figure | setText | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/figures/MeasureTextArea.java",
"license": "gpl-2.0",
"size": 15934
} | [
"org.openmicroscopy.shoola.util.roi.model.annotation.MeasurementAttributes"
] | import org.openmicroscopy.shoola.util.roi.model.annotation.MeasurementAttributes; | import org.openmicroscopy.shoola.util.roi.model.annotation.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 413,477 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.