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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public SomethingRecord setSomejsonarray(JsonArray value) {
set(8, value);
return this;
} | SomethingRecord function(JsonArray value) { set(8, value); return this; } | /**
* Setter for <code>something.someJsonArray</code>.
*/ | Setter for <code>something.someJsonArray</code> | setSomejsonarray | {
"repo_name": "jklingsporn/vertx-jooq-async",
"path": "vertx-jooq-async-generate/src/test/java/generated/rx/async/vertx/tables/records/SomethingRecord.java",
"license": "mit",
"size": 12350
} | [
"io.vertx.core.json.JsonArray"
] | import io.vertx.core.json.JsonArray; | import io.vertx.core.json.*; | [
"io.vertx.core"
] | io.vertx.core; | 1,683,846 |
public LatLng getCurrentLatLng() {
return new LatLng(current_lat, current_lng);
} | LatLng function() { return new LatLng(current_lat, current_lng); } | /**
* get current coordinate
* @return current latitude and longitude
*/ | get current coordinate | getCurrentLatLng | {
"repo_name": "unlucky/GPSMover",
"path": "app/src/main/java/org/unlucky/gpsmover/service/GPSMoverService.java",
"license": "gpl-2.0",
"size": 9658
} | [
"com.google.android.gms.maps.model.LatLng"
] | import com.google.android.gms.maps.model.LatLng; | import com.google.android.gms.maps.model.*; | [
"com.google.android"
] | com.google.android; | 1,547,058 |
void writeBool(boolean value) throws IOException; | void writeBool(boolean value) throws IOException; | /**
* Write a bool.
*
* @param value the value
*/ | Write a bool | writeBool | {
"repo_name": "jdubrule/bond",
"path": "java/core/src/main/java/org/bondlib/ProtocolWriter.java",
"license": "mit",
"size": 4355
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,665,716 |
@Test
public void testColumnFamilySettings() throws Exception {
Configuration conf = new Configuration(this.util.getConfiguration());
RecordWriter<ImmutableBytesWritable, KeyValue> writer = null;
TaskAttemptContext context = null;
Path dir = util.getDataTestDir("testColumnFamilySettings");
// S... | void function() throws Exception { Configuration conf = new Configuration(this.util.getConfiguration()); RecordWriter<ImmutableBytesWritable, KeyValue> writer = null; TaskAttemptContext context = null; Path dir = util.getDataTestDir(STR); HTable table = Mockito.mock(HTable.class); HTableDescriptor htd = new HTableDescr... | /**
* Test that {@link HFileOutputFormat} RecordWriter uses compression and
* bloom filter settings from the column family descriptor
*/ | Test that <code>HFileOutputFormat</code> RecordWriter uses compression and bloom filter settings from the column family descriptor | testColumnFamilySettings | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java",
"license": "apache-2.0",
"size": 42150
} | [
"java.util.Map",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.... | import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeyValue;... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.io.hfile.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.uti... | [
"java.util",
"org.apache.hadoop",
"org.junit",
"org.mockito"
] | java.util; org.apache.hadoop; org.junit; org.mockito; | 2,187,803 |
interface WithOutputs {
WithCreate withOutputs(List<TransformOutput> outputs);
} | interface WithOutputs { WithCreate withOutputs(List<TransformOutput> outputs); } | /**
* Specifies outputs.
* @param outputs An array of one or more TransformOutputs that the Transform should generate
* @return the next definition stage
*/ | Specifies outputs | withOutputs | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/mediaservices/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_06_01_preview/Transform.java",
"license": "mit",
"size": 4569
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 581,624 |
public DataOutputStream getDataOutputStream() {
return dos;
} | DataOutputStream function() { return dos; } | /**
* Gets data output stream
*
* @return data output stream
*/ | Gets data output stream | getDataOutputStream | {
"repo_name": "InstantCom/Keiko",
"path": "Keiko/src/java/net/instantcom/keiko/bittorrent/protocol/encryption/EncryptedHandshake.java",
"license": "apache-2.0",
"size": 20156
} | [
"java.io.DataOutputStream"
] | import java.io.DataOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,185,400 |
protected void handleLine(String line) {
try {
final GeoJsonPolygon polygon = GeoJsonPolygon.fromGeoJson(line);
final byte[] tupleBytes = polygon.toGeoJson().getBytes();
final Tuple tuple = new Tuple(Long.toString(polygon.getId()), polygon.getBoundingBox(), tupleBytes);
final EmptyResultFuture insertF... | void function(String line) { try { final GeoJsonPolygon polygon = GeoJsonPolygon.fromGeoJson(line); final byte[] tupleBytes = polygon.toGeoJson().getBytes(); final Tuple tuple = new Tuple(Long.toString(polygon.getId()), polygon.getBoundingBox(), tupleBytes); final EmptyResultFuture insertFuture = bboxdbClient.insertTup... | /**
* Handle a line from the input file
* @param line
* @throws BBoxDBException
*/ | Handle a line from the input file | handleLine | {
"repo_name": "jnidzwetzki/scalephant",
"path": "bboxdb-experiments/src/main/java/org/bboxdb/tools/benchmark/BenchmarkFileInsertPerformance.java",
"license": "apache-2.0",
"size": 5714
} | [
"org.bboxdb.commons.math.GeoJsonPolygon",
"org.bboxdb.misc.BBoxDBException",
"org.bboxdb.network.client.future.client.EmptyResultFuture",
"org.bboxdb.storage.entity.Tuple"
] | import org.bboxdb.commons.math.GeoJsonPolygon; import org.bboxdb.misc.BBoxDBException; import org.bboxdb.network.client.future.client.EmptyResultFuture; import org.bboxdb.storage.entity.Tuple; | import org.bboxdb.commons.math.*; import org.bboxdb.misc.*; import org.bboxdb.network.client.future.client.*; import org.bboxdb.storage.entity.*; | [
"org.bboxdb.commons",
"org.bboxdb.misc",
"org.bboxdb.network",
"org.bboxdb.storage"
] | org.bboxdb.commons; org.bboxdb.misc; org.bboxdb.network; org.bboxdb.storage; | 1,174,644 |
public Collection<LocalMUCRole> getRoles() {
return Collections.unmodifiableCollection(roles.values());
} | Collection<LocalMUCRole> function() { return Collections.unmodifiableCollection(roles.values()); } | /**
* Get all roles for this user.
*
* @return Iterator over all roles for this user
*/ | Get all roles for this user | getRoles | {
"repo_name": "qyj415/openfire",
"path": "src/java/org/jivesoftware/openfire/muc/spi/LocalMUCUser.java",
"license": "apache-2.0",
"size": 29459
} | [
"java.util.Collection",
"java.util.Collections"
] | import java.util.Collection; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,279,370 |
@NonNull
public static CameraCaptureSessionCompat toCameraCaptureSessionCompat(
@NonNull CameraCaptureSession captureSession) {
return CameraCaptureSessionCompat.toCameraCaptureSessionCompat(captureSession,
MainThreadAsyncHandler.getInstance());
}
/**
* Provides... | static CameraCaptureSessionCompat function( @NonNull CameraCaptureSession captureSession) { return CameraCaptureSessionCompat.toCameraCaptureSessionCompat(captureSession, MainThreadAsyncHandler.getInstance()); } /** * Provides a backward-compatible wrapper for {@link CameraCaptureSession}. * * <p>All APIs taking {@link... | /**
* Provides a backward-compatible wrapper for {@link CameraCaptureSession}.
*
* <p>All APIs taking {@link Executor} as an argument will use the main thread to dispatch to
* that executor. Callers wanting to avoid using the main thread for dispatching should use
* {@link #toCameraCaptureSessi... | Provides a backward-compatible wrapper for <code>CameraCaptureSession</code>. All APIs taking <code>Executor</code> as an argument will use the main thread to dispatch to that executor. Callers wanting to avoid using the main thread for dispatching should use <code>#toCameraCaptureSessionCompat(CameraCaptureSession, Ha... | toCameraCaptureSessionCompat | {
"repo_name": "AndroidX/androidx",
"path": "camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/compat/CameraCaptureSessionCompat.java",
"license": "apache-2.0",
"size": 20202
} | [
"android.hardware.camera2.CameraCaptureSession",
"android.os.Handler",
"androidx.annotation.NonNull",
"androidx.camera.core.impl.utils.MainThreadAsyncHandler",
"java.util.concurrent.Executor"
] | import android.hardware.camera2.CameraCaptureSession; import android.os.Handler; import androidx.annotation.NonNull; import androidx.camera.core.impl.utils.MainThreadAsyncHandler; import java.util.concurrent.Executor; | import android.hardware.camera2.*; import android.os.*; import androidx.annotation.*; import androidx.camera.core.impl.utils.*; import java.util.concurrent.*; | [
"android.hardware",
"android.os",
"androidx.annotation",
"androidx.camera",
"java.util"
] | android.hardware; android.os; androidx.annotation; androidx.camera; java.util; | 2,578,983 |
protected void fillContext(Document contextDoc) {
final Request req = ContextHelper.getRequest(this.context);
final Element root = contextDoc.getDocumentElement();
// append the ID
final Element id = contextDoc.createElement("ID");
id.appendChild(contextDoc.createTextNode(re... | void function(Document contextDoc) { final Request req = ContextHelper.getRequest(this.context); final Element root = contextDoc.getDocumentElement(); final Element id = contextDoc.createElement("ID"); id.appendChild(contextDoc.createTextNode(req.getRemoteUser())); root.appendChild(id); } | /**
* Fill the authentication context.
* This method can be overwritten to add any application specific data
* to the user.
* (Don't forget to call this implementation via super as well as it
* adds the ID).
*
* @param contextDoc The context. This document has already the authenticati... | Fill the authentication context. This method can be overwritten to add any application specific data to the user. (Don't forget to call this implementation via super as well as it adds the ID) | fillContext | {
"repo_name": "apache/cocoon",
"path": "blocks/cocoon-authentication-fw/cocoon-authentication-fw-impl/src/main/java/org/apache/cocoon/webapps/authentication/components/ServletAuthenticator.java",
"license": "apache-2.0",
"size": 5592
} | [
"org.apache.cocoon.components.ContextHelper",
"org.apache.cocoon.environment.Request",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.apache.cocoon.components.ContextHelper; import org.apache.cocoon.environment.Request; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.apache.cocoon.components.*; import org.apache.cocoon.environment.*; import org.w3c.dom.*; | [
"org.apache.cocoon",
"org.w3c.dom"
] | org.apache.cocoon; org.w3c.dom; | 2,794,074 |
void start (DHTConfiguration config) throws SocketException; | void start (DHTConfiguration config) throws SocketException; | /**
* Start the DHT
*/ | Start the DHT | start | {
"repo_name": "the8472/mldht",
"path": "src/lbms/plugins/mldht/kad/DHTBase.java",
"license": "mpl-2.0",
"size": 2381
} | [
"java.net.SocketException"
] | import java.net.SocketException; | import java.net.*; | [
"java.net"
] | java.net; | 1,895,351 |
public List<Global> getGlobalCollection(
) {
return this._globalList;
} | List<Global> function( ) { return this._globalList; } | /**
* Method getGlobalCollection.Returns a reference to
* '_globalList'. No type checking is performed on any
* modifications to the Vector.
*
* @return a reference to the Vector backing this class
*/ | Method getGlobalCollection.Returns a reference to '_globalList'. No type checking is performed on any modifications to the Vector | getGlobalCollection | {
"repo_name": "tdefilip/opennms",
"path": "opennms-correlation/drools-correlation-engine/src/main/java/org/opennms/netmgt/correlation/drools/config/RuleSet.java",
"license": "agpl-3.0",
"size": 26206
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,420,009 |
public Reflecter<T> setExcludePackagePath(Set<String> excludePackages) {
for (String pkg : checkNotNull(excludePackages)) {
if (!this.excludePackagePath.contains(pkg)) {
this.excludePackagePath.add(pkg);
}
}
return this;
}
| Reflecter<T> function(Set<String> excludePackages) { for (String pkg : checkNotNull(excludePackages)) { if (!this.excludePackagePath.contains(pkg)) { this.excludePackagePath.add(pkg); } } return this; } | /**
* Ignored the given package path to transform field to map
*
* @param excludePackages
* @return
*/ | Ignored the given package path to transform field to map | setExcludePackagePath | {
"repo_name": "jronrun/benayn",
"path": "benayn-ustyle/src/main/java/com/benayn/ustyle/Reflecter.java",
"license": "apache-2.0",
"size": 33506
} | [
"com.google.common.base.Preconditions",
"java.util.Set"
] | import com.google.common.base.Preconditions; import java.util.Set; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 469,634 |
public void initGUI ()
{
super.initGUI ();
try
{
JPanel panel =
(JPanel) new SwingEngine(this).render (
getClass ().getResource ("/swixml/LineChartConfigurator.xml"));
content.add (
panel, createConstraints (0, 0, 1, 1, GridBagConstraints.BOTH, 100, 100, null));
startDate.setFormatter... | void function () { super.initGUI (); try { JPanel panel = (JPanel) new SwingEngine(this).render ( getClass ().getResource (STR)); content.add ( panel, createConstraints (0, 0, 1, 1, GridBagConstraints.BOTH, 100, 100, null)); startDate.setFormatterFactory (Tools.getDateFormatter ()); stopDate.setFormatterFactory (Tools.... | /**
* Initialize the gui. Subclasses should override this method to create a
* custom gui.
*/ | Initialize the gui. Subclasses should override this method to create a custom gui | initGUI | {
"repo_name": "grappendorf/openmetix",
"path": "plugin/metix-linechart/src/java/de/iritgo/openmetix/linechart/gui/LineChartConfigurator.java",
"license": "gpl-2.0",
"size": 27967
} | [
"de.iritgo.openmetix.app.util.Tools",
"java.awt.GridBagConstraints",
"javax.swing.DefaultComboBoxModel",
"javax.swing.DefaultListModel",
"javax.swing.JPanel",
"org.swixml.SwingEngine"
] | import de.iritgo.openmetix.app.util.Tools; import java.awt.GridBagConstraints; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; import javax.swing.JPanel; import org.swixml.SwingEngine; | import de.iritgo.openmetix.app.util.*; import java.awt.*; import javax.swing.*; import org.swixml.*; | [
"de.iritgo.openmetix",
"java.awt",
"javax.swing",
"org.swixml"
] | de.iritgo.openmetix; java.awt; javax.swing; org.swixml; | 2,873,944 |
public int update(Connection conn, String sql, Object[] params, int[] paramTypes)
throws SQLException {
if ((paramTypes != null) && params.length != paramTypes.length) {
throw new IllegalArgumentException("Sizes of params and paramTypes must be equal!");
}
PreparedState... | int function(Connection conn, String sql, Object[] params, int[] paramTypes) throws SQLException { if ((paramTypes != null) && params.length != paramTypes.length) { throw new IllegalArgumentException(STR); } PreparedStatement stmt = null; int rows = 0; try { stmt = this.prepareStatement(conn, sql); this.fillStatement(s... | /**
* Execute an SQL INSERT, UPDATE, or DELETE query.
*
* @param conn The connection to use to run the query.
* @param sql The SQL to execute.
* @param params The query replacement parameters.
* @param paramTypes The query replacement parameter types.
* @return The number of rows upda... | Execute an SQL INSERT, UPDATE, or DELETE query | update | {
"repo_name": "dimone-kun/cuba",
"path": "modules/global/src/com/haulmont/bali/db/QueryRunner.java",
"license": "apache-2.0",
"size": 24467
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 112,524 |
public void setSelection(ISelection selection) {
editorSelection = selection;
for (ISelectionChangedListener listener : selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
}
| void function(ISelection selection) { editorSelection = selection; for (ISelectionChangedListener listener : selectionChangedListeners) { listener.selectionChanged(new SelectionChangedEvent(this, selection)); } setStatusLineManager(selection); } | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
* Calling this result will notify the listeners.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code> to set this editor's overall selection. Calling this result will notify the listeners. | setSelection | {
"repo_name": "Highbrainer/hdp-ingest-catalog",
"path": "releng/com.jeevaneo.hdp.ingest.model.editor/src/com/jeevaneo/hdp/ingest/presentation/IngestEditor.java",
"license": "epl-1.0",
"size": 55887
} | [
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.ISelectionChangedListener",
"org.eclipse.jface.viewers.SelectionChangedEvent"
] | import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 11,683 |
protected boolean condition()
throws JspException {
return (condition(false));
} | boolean function() throws JspException { return (condition(false)); } | /**
* Evaluate the condition that is being tested by this particular tag, and
* return <code>true</code> if the nested body content of this tag should
* be evaluated, or <code>false</code> if it should be skipped. This
* method must be implemented by concrete subclasses.
*
* @throws JspExc... | Evaluate the condition that is being tested by this particular tag, and return <code>true</code> if the nested body content of this tag should be evaluated, or <code>false</code> if it should be skipped. This method must be implemented by concrete subclasses | condition | {
"repo_name": "Builders-SonarSource/sonarqube-bis",
"path": "tests/upgrade/projects/struts-1.3.9-diet/taglib/src/main/java/org/apache/struts/taglib/logic/NotPresentTag.java",
"license": "lgpl-3.0",
"size": 1766
} | [
"javax.servlet.jsp.JspException"
] | import javax.servlet.jsp.JspException; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 1,594,367 |
public List<DateFormat> parseDateFormatString(String string) {
List<DateFormat> formats = new ArrayList<DateFormat>();
if (string != null) {
StringTokenizer tokenizer = new StringTokenizer(string, ",");
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken().trim();
DateFormat form... | List<DateFormat> function(String string) { List<DateFormat> formats = new ArrayList<DateFormat>(); if (string != null) { StringTokenizer tokenizer = new StringTokenizer(string, ","); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken().trim(); DateFormat format = lookupDateFormat(token); if (format ... | /**
* Given a comma separated list of date format names, a list of
* date formats is returned through a lookup call to lookupDateFormat.
* @param string to parse
* @return list of date formats
*/ | Given a comma separated list of date format names, a list of date formats is returned through a lookup call to lookupDateFormat | parseDateFormatString | {
"repo_name": "nasa/OpenSPIFe",
"path": "gov.nasa.ensemble.common/src/gov/nasa/ensemble/common/time/DateFormatRegistry.java",
"license": "apache-2.0",
"size": 9347
} | [
"java.text.DateFormat",
"java.util.ArrayList",
"java.util.List",
"java.util.StringTokenizer",
"org.apache.log4j.Logger"
] | import java.text.DateFormat; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.apache.log4j.Logger; | import java.text.*; import java.util.*; import org.apache.log4j.*; | [
"java.text",
"java.util",
"org.apache.log4j"
] | java.text; java.util; org.apache.log4j; | 1,732,205 |
private void setCurrentEditor(LiClipseEditor part) {
if (this.currentEditor == part) {
return;
}
if (this.currentEditor != null) {
this.currentEditor.removeModelListener(this);
}
this.currentEditor = part;
if (part != null) {
part.a... | void function(LiClipseEditor part) { if (this.currentEditor == part) { return; } if (this.currentEditor != null) { this.currentEditor.removeModelListener(this); } this.currentEditor = part; if (part != null) { part.addModelListener(this); } refresh(); } | /**
* When the editor is set, we start listening its changes.
*/ | When the editor is set, we start listening its changes | setCurrentEditor | {
"repo_name": "ControlSystemStudio/org.csstudio.iter",
"path": "plugins/org.brainwy.liclipsetext.editor/src/org/brainwy/liclipsetext/editor/views/partitioning/LiClipsePartitioningView.java",
"license": "epl-1.0",
"size": 12459
} | [
"org.brainwy.liclipsetext.editor.common.LiClipseEditor"
] | import org.brainwy.liclipsetext.editor.common.LiClipseEditor; | import org.brainwy.liclipsetext.editor.common.*; | [
"org.brainwy.liclipsetext"
] | org.brainwy.liclipsetext; | 60,893 |
public Object createMbeanListener()
throws Exception
{
preInit();
if (_mbeanName != null)
return new MBeanListener();
else
throw new ConfigException(L.l("<listener> needs a <resource> with an mbean-name."));
} | Object function() throws Exception { preInit(); if (_mbeanName != null) return new MBeanListener(); else throw new ConfigException(L.l(STR)); } | /**
* Adds the listener program
*/ | Adds the listener program | createMbeanListener | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/jca/cfg/Resource.java",
"license": "gpl-2.0",
"size": 15119
} | [
"com.caucho.config.ConfigException"
] | import com.caucho.config.ConfigException; | import com.caucho.config.*; | [
"com.caucho.config"
] | com.caucho.config; | 247,776 |
@Override
public void mouseExited(MouseEvent e) {
// this body is intentionally left empty
} | void function(MouseEvent e) { } | /**
* This method cannot be called directly.
*/ | This method cannot be called directly | mouseExited | {
"repo_name": "clbx/CS121",
"path": "STDTest/Draw.java",
"license": "mit",
"size": 46569
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,591,208 |
public static CloudDiskRs mapToObject(Map<String, String> map) throws Exception {
CloudDiskRs cloudDisk = new CloudDiskRs();
if (map.get("account") != null && !map.get("account").isEmpty())
cloudDisk.setAccount(map.get("account"));
if (map.get("bucket") != null && !map.get("bucket").isEmpty())
cloudDi... | static CloudDiskRs function(Map<String, String> map) throws Exception { CloudDiskRs cloudDisk = new CloudDiskRs(); if (map.get(STR) != null && !map.get(STR).isEmpty()) cloudDisk.setAccount(map.get(STR)); if (map.get(STR) != null && !map.get(STR).isEmpty()) cloudDisk.setBucket(map.get(STR)); if (map.get("cld") != null &... | /**
* Convierte un mapa de valores de un a un objeto
* @param map
* @return
*/ | Convierte un mapa de valores de un a un objeto | mapToObject | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "src/com/whitebearsolutions/imagine/wbsairback/rs/model/disk/CloudDiskRs.java",
"license": "apache-2.0",
"size": 5376
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,390,913 |
List<Chain> newChains = new ArrayList<Chain>();
for (Chain chain : chains){
Chain newChain = getCAOnly(chain);
newChains.add(newChain);
}
return newChains;
} | List<Chain> newChains = new ArrayList<Chain>(); for (Chain chain : chains){ Chain newChain = getCAOnly(chain); newChains.add(newChain); } return newChains; } | /** Convert a List of chain objects to another List of chains, containing C-alpha atoms only.
*
* @param chains list of chains
* @return a list of chains
*/ | Convert a List of chain objects to another List of chains, containing C-alpha atoms only | getCAOnly | {
"repo_name": "JolantaWojcik/biojavaOwn",
"path": "biojava3-structure/src/main/java/org/biojava/bio/structure/io/CAConverter.java",
"license": "lgpl-2.1",
"size": 3035
} | [
"java.util.ArrayList",
"java.util.List",
"org.biojava.bio.structure.Chain"
] | import java.util.ArrayList; import java.util.List; import org.biojava.bio.structure.Chain; | import java.util.*; import org.biojava.bio.structure.*; | [
"java.util",
"org.biojava.bio"
] | java.util; org.biojava.bio; | 150,437 |
public static boolean preTiger(JavaClass jclass) {
return jclass.getMajor() < JDK15_MAJOR ||
(jclass.getMajor() == JDK15_MAJOR && jclass.getMinor() < JDK15_MINOR);
}
| static boolean function(JavaClass jclass) { return jclass.getMajor() < JDK15_MAJOR (jclass.getMajor() == JDK15_MAJOR && jclass.getMinor() < JDK15_MINOR); } | /**
* Checks if classfile was compiled for pre 1.5 target
*/ | Checks if classfile was compiled for pre 1.5 target | preTiger | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java/edu/umd/cs/findbugs/bcel/BCELUtil.java",
"license": "lgpl-2.1",
"size": 5544
} | [
"org.apache.bcel.classfile.JavaClass"
] | import org.apache.bcel.classfile.JavaClass; | import org.apache.bcel.classfile.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 2,304,221 |
protected void endNode(Node node) throws org.xml.sax.SAXException {
switch (node.getNodeType()) {
case Node.DOCUMENT_NODE :
break;
case Node.DOCUMENT_TYPE_NODE :
serializeDocType((DocumentType) node, false);
break;
case Nod... | void function(Node node) throws org.xml.sax.SAXException { switch (node.getNodeType()) { case Node.DOCUMENT_NODE : break; case Node.DOCUMENT_TYPE_NODE : serializeDocType((DocumentType) node, false); break; case Node.ELEMENT_NODE : serializeElement((Element) node, false); break; case Node.CDATA_SECTION_NODE : break; cas... | /**
* End processing of given node
*
*
* @param node Node we just finished processing
*
* @throws org.xml.sax.SAXException
*/ | End processing of given node | endNode | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java",
"license": "gpl-2.0",
"size": 82101
} | [
"org.w3c.dom.DocumentType",
"org.w3c.dom.Element",
"org.w3c.dom.EntityReference",
"org.w3c.dom.Node",
"org.xml.sax.SAXException"
] | import org.w3c.dom.DocumentType; import org.w3c.dom.Element; import org.w3c.dom.EntityReference; import org.w3c.dom.Node; import org.xml.sax.SAXException; | import org.w3c.dom.*; import org.xml.sax.*; | [
"org.w3c.dom",
"org.xml.sax"
] | org.w3c.dom; org.xml.sax; | 1,998,084 |
public static By locatorByClass(String tagName)
{
return By.className(tagName);
} | static By function(String tagName) { return By.className(tagName); } | /**
* Return a tag name locator *
*/ | Return a tag name locator | locatorByClass | {
"repo_name": "vkaramov/appium-apiDemos-test",
"path": "apiDemos/src/test/java/waverley/util/Helpers.java",
"license": "mit",
"size": 6478
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 145,701 |
public static boolean applyPatch(byte[] patchData, String filePath)
{
diff_match_patch patch = new diff_match_patch();
try {
String diffs = new String(patchData, "UTF-8");
byte[] fileData = FileSystem.loadFileData(filePath);
String fileDataContent = new String(f... | static boolean function(byte[] patchData, String filePath) { diff_match_patch patch = new diff_match_patch(); try { String diffs = new String(patchData, "UTF-8"); byte[] fileData = FileSystem.loadFileData(filePath); String fileDataContent = new String(fileData, "UTF-8"); List<diff_match_patch.Patch> patches = patch.pat... | /**
* Applies patch data to a file.
*
* @param patchData Contains the patch data as byte array.
* @param filePath Contains the path to the file.
*
* @return Returns a boolean value indicating whether the patch was applied successful or not.
* */ | Applies patch data to a file | applyPatch | {
"repo_name": "Dagers/React-Native-Differential-Updater",
"path": "Libs/Android/ReactUpdaterLib/reactupdater/src/main/java/strebinger/com/reactupdater/DiffPatcher.java",
"license": "mit",
"size": 1617
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 8,645 |
public void makeOptionsObjects(DxContext context) {
cfOptions = new CfOptions();
cfOptions.positionInfo = positionInfo;
cfOptions.localInfo = localInfo;
cfOptions.strictNameCheck = strictNameCheck;
cfOptions.optimize = optimize;
cfOptions.o... | void function(DxContext context) { cfOptions = new CfOptions(); cfOptions.positionInfo = positionInfo; cfOptions.localInfo = localInfo; cfOptions.strictNameCheck = strictNameCheck; cfOptions.optimize = optimize; cfOptions.optimizeListFile = optimizeListFile; cfOptions.dontOptimizeListFile = dontOptimizeListFile; cfOpti... | /**
* Copies relevant arguments over into CfOptions and
* DexOptions instances.
*/ | Copies relevant arguments over into CfOptions and DexOptions instances | makeOptionsObjects | {
"repo_name": "marcinkwiatkowski/buck",
"path": "third-party/java/dx/src/com/android/dx/command/dexer/Main.java",
"license": "apache-2.0",
"size": 71165
} | [
"com.android.dx.cf.direct.ClassPathOpener",
"com.android.dx.dex.DexOptions",
"com.android.dx.dex.cf.CfOptions"
] | import com.android.dx.cf.direct.ClassPathOpener; import com.android.dx.dex.DexOptions; import com.android.dx.dex.cf.CfOptions; | import com.android.dx.cf.direct.*; import com.android.dx.dex.*; import com.android.dx.dex.cf.*; | [
"com.android.dx"
] | com.android.dx; | 684,402 |
@Registered
void registered(ServiceRegistration sr)
{
m_sequencer.step(7);
} | void registered(ServiceRegistration sr) { m_sequencer.step(7); } | /**
* Our provided service has been registered into the OSGi service registry.
*/ | Our provided service has been registered into the OSGi service registry | registered | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/composite/C1.java",
"license": "apache-2.0",
"size": 3648
} | [
"org.osgi.framework.ServiceRegistration"
] | import org.osgi.framework.ServiceRegistration; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 1,379,612 |
public void initializeRQ(int n) {
if (rxryQ == null) {
if (n < 1)
return; // already null
rxryQ = new FloatQueueTwin(new FloatQueue("X: " + toString(), n), new FloatQueue("Y: " + toString(), n));
rxryQ.setInterval(getMovieInterval());
rxryQ.setPointer(0);
rxryQ.setCoordinateQueue(model.getModelT... | void function(int n) { if (rxryQ == null) { if (n < 1) return; rxryQ = new FloatQueueTwin(new FloatQueue(STR + toString(), n), new FloatQueue(STR + toString(), n)); rxryQ.setInterval(getMovieInterval()); rxryQ.setPointer(0); rxryQ.setCoordinateQueue(model.getModelTimeQueue()); model.getMovieQueueGroup().add(rxryQ); } e... | /**
* initialize coordinate queue twin. If the passed integer is less than 1, nullify the queues.
*/ | initialize coordinate queue twin. If the passed integer is less than 1, nullify the queues | initializeRQ | {
"repo_name": "concord-consortium/mw",
"path": "src/org/concord/mw2d/models/RectangularObstacle.java",
"license": "gpl-2.0",
"size": 57041
} | [
"org.concord.modeler.util.FloatQueue",
"org.concord.modeler.util.FloatQueueTwin"
] | import org.concord.modeler.util.FloatQueue; import org.concord.modeler.util.FloatQueueTwin; | import org.concord.modeler.util.*; | [
"org.concord.modeler"
] | org.concord.modeler; | 1,717,273 |
@MediumTest
@Feature({"Browser", "Notifications"})
public void testDefaultNotificationProperties() throws Exception {
setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW);
Notification notification = showAndGetNotification("MyNotification", "{ body: 'Hello' }");
// V... | @Feature({STR, STR}) void function() throws Exception { setNotificationContentSettingForCurrentOrigin(ContentSetting.ALLOW); Notification notification = showAndGetNotification(STR, STR); assertEquals(STR, notification.extras.getString(Notification.EXTRA_TITLE)); assertEquals("Hello", notification.extras.getString(Notif... | /**
* Verifies that the intended default properties of a notification will indeed be set on the
* Notification object that will be send to Android.
*/ | Verifies that the intended default properties of a notification will indeed be set on the Notification object that will be send to Android | testDefaultNotificationProperties | {
"repo_name": "mou4e/zirconium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerTest.java",
"license": "bsd-3-clause",
"size": 18628
} | [
"android.app.Notification",
"android.os.Build",
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.browser.preferences.website.ContentSetting"
] | import android.app.Notification; import android.os.Build; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.preferences.website.ContentSetting; | import android.app.*; import android.os.*; import org.chromium.base.test.util.*; import org.chromium.chrome.browser.preferences.website.*; | [
"android.app",
"android.os",
"org.chromium.base",
"org.chromium.chrome"
] | android.app; android.os; org.chromium.base; org.chromium.chrome; | 162,762 |
public List<Ability> abilitiesOf(Target target) {
for (ActivatedChoice choice : choiceList) {
if (choice.getCard() == target) {
return choice.abilities;
}
}
return null;
}
| List<Ability> function(Target target) { for (ActivatedChoice choice : choiceList) { if (choice.getCard() == target) { return choice.abilities; } } return null; } | /**
* return the list of playable abilities of this card
*
* @param target
* the card shearching it's playable abilities
* @return list of playable abilities of this card, or null if this
* card/player has no playable ability.
*/ | return the list of playable abilities of this card | abilitiesOf | {
"repo_name": "JoeyLeeuwinga/Firemox",
"path": "src/main/java/net/sf/firemox/stack/ActivatedChoiceList.java",
"license": "gpl-2.0",
"size": 5816
} | [
"java.util.List",
"net.sf.firemox.clickable.ability.Ability",
"net.sf.firemox.clickable.target.Target"
] | import java.util.List; import net.sf.firemox.clickable.ability.Ability; import net.sf.firemox.clickable.target.Target; | import java.util.*; import net.sf.firemox.clickable.ability.*; import net.sf.firemox.clickable.target.*; | [
"java.util",
"net.sf.firemox"
] | java.util; net.sf.firemox; | 244,224 |
private AccountDataManager write(File file, Object data) {
new RequestWriter(file, FORMAT_VERSION).write(data);
return this;
} | AccountDataManager function(File file, Object data) { new RequestWriter(file, FORMAT_VERSION).write(data); return this; } | /**
* Write data to file
*
* @param file
* @param data
* @return this manager
*/ | Write data to file | write | {
"repo_name": "Chalmers-SEP-GitHubApp-Group/android",
"path": "app/src/main/java/com/github/mobile/persistence/AccountDataManager.java",
"license": "apache-2.0",
"size": 9003
} | [
"com.github.mobile.RequestWriter",
"java.io.File"
] | import com.github.mobile.RequestWriter; import java.io.File; | import com.github.mobile.*; import java.io.*; | [
"com.github.mobile",
"java.io"
] | com.github.mobile; java.io; | 2,257,544 |
@Override
@Deprecated
public synchronized <T extends CustomResource<?, ?>> SharedIndexInformer<T> sharedIndexInformerForCustomResource(
Class<T> apiTypeClass, long resyncPeriodInMillis) {
return sharedIndexInformerForCustomResource(apiTypeClass, (Class)null, resyncPeriodInMillis);
}
/**
* Construc... | synchronized <T extends CustomResource<?, ?>> SharedIndexInformer<T> function( Class<T> apiTypeClass, long resyncPeriodInMillis) { return sharedIndexInformerForCustomResource(apiTypeClass, (Class)null, resyncPeriodInMillis); } /** * Constructs and returns a shared index informer with resync period specified for custom ... | /**
* Constructs and returns a shared index informer with resync period specified for custom resources.
* POJO
*
* @param apiTypeClass apiType class
* @param resyncPeriodInMillis resync period in milliseconds
* @param <T> the type parameter (should extend {@link io.fabric8.kubernetes.api.model.HasMet... | Constructs and returns a shared index informer with resync period specified for custom resources. POJO | sharedIndexInformerForCustomResource | {
"repo_name": "fabric8io/kubernetes-client",
"path": "kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java",
"license": "apache-2.0",
"size": 15014
} | [
"io.fabric8.kubernetes.api.model.HasMetadata",
"io.fabric8.kubernetes.api.model.KubernetesResourceList",
"io.fabric8.kubernetes.client.CustomResource",
"io.fabric8.kubernetes.client.informers.SharedIndexInformer"
] | import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.api.model.KubernetesResourceList; import io.fabric8.kubernetes.client.CustomResource; import io.fabric8.kubernetes.client.informers.SharedIndexInformer; | import io.fabric8.kubernetes.api.model.*; import io.fabric8.kubernetes.client.*; import io.fabric8.kubernetes.client.informers.*; | [
"io.fabric8.kubernetes"
] | io.fabric8.kubernetes; | 2,832,411 |
public JMenuItem getSearchMenuItem() {
return _searchMenuItem;
}
| JMenuItem function() { return _searchMenuItem; } | /**
* Returns the ACIDE - A Configurable IDE edit menu search menu item.
*
* @return the ACIDE - A Configurable IDE edit menu search menu item.
*/ | Returns the ACIDE - A Configurable IDE edit menu search menu item | getSearchMenuItem | {
"repo_name": "salcedonia/acide-0-8-release-2010-2011",
"path": "acide/src/acide/gui/menuBar/editMenu/AcideEditMenu.java",
"license": "gpl-3.0",
"size": 25378
} | [
"javax.swing.JMenuItem"
] | import javax.swing.JMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,329,658 |
@Override
public List<NodeDetail> getDescendantDetails(NodeDetail node) {
Connection con = getConnection();
try {
return NodeDAO.getDescendantDetails(con, node);
} catch (SQLException re) {
throw new NodeRuntimeException("NodeBmEJB.getDescendantDetails()",
SilverpeasRuntimeExceptio... | List<NodeDetail> function(NodeDetail node) { Connection con = getConnection(); try { return NodeDAO.getDescendantDetails(con, node); } catch (SQLException re) { throw new NodeRuntimeException(STR, SilverpeasRuntimeException.ERROR, STR, STR + node.getNodePK().getId(), re); } finally { DBUtil.close(con); } } | /**
* Get descendant node details of a node
*
* @param node A NodeDetail
* @return A List of NodeDetail
* @since 4.07
*/ | Get descendant node details of a node | getDescendantDetails | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/node/service/DefaultNodeService.java",
"license": "agpl-3.0",
"size": 35612
} | [
"java.sql.Connection",
"java.sql.SQLException",
"java.util.List",
"org.silverpeas.core.exception.SilverpeasRuntimeException",
"org.silverpeas.core.node.dao.NodeDAO",
"org.silverpeas.core.node.model.NodeDetail",
"org.silverpeas.core.node.model.NodeRuntimeException",
"org.silverpeas.core.persistence.jdb... | import java.sql.Connection; import java.sql.SQLException; import java.util.List; import org.silverpeas.core.exception.SilverpeasRuntimeException; import org.silverpeas.core.node.dao.NodeDAO; import org.silverpeas.core.node.model.NodeDetail; import org.silverpeas.core.node.model.NodeRuntimeException; import org.silverpe... | import java.sql.*; import java.util.*; import org.silverpeas.core.exception.*; import org.silverpeas.core.node.dao.*; import org.silverpeas.core.node.model.*; import org.silverpeas.core.persistence.jdbc.*; | [
"java.sql",
"java.util",
"org.silverpeas.core"
] | java.sql; java.util; org.silverpeas.core; | 2,355,369 |
protected void dropFewItems(boolean wasRecentlyHit, int lootingModifier)
{
Item item = this.getDropItem();
if (item != null)
{
int i = this.rand.nextInt(3);
if (lootingModifier > 0)
{
i += this.rand.nextInt(lootingModifier + 1);
... | void function(boolean wasRecentlyHit, int lootingModifier) { Item item = this.getDropItem(); if (item != null) { int i = this.rand.nextInt(3); if (lootingModifier > 0) { i += this.rand.nextInt(lootingModifier + 1); } for (int j = 0; j < i; ++j) { this.dropItem(item, 1); } } } | /**
* Drop 0-2 items of this living's type
*/ | Drop 0-2 items of this living's type | dropFewItems | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityLiving.java",
"license": "gpl-3.0",
"size": 50613
} | [
"net.minecraft.item.Item"
] | import net.minecraft.item.Item; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,299,205 |
protected T prepareErrorFragment(ThrowableFailureEvent event, boolean finishAfterDialog,
Bundle argumentsForErrorDialog) {
if (event.isSuppressErrorUi()) {
// Show nothing by default
return null;
}
Bundle bundle;
if (argumentsForErrorDialog ... | T function(ThrowableFailureEvent event, boolean finishAfterDialog, Bundle argumentsForErrorDialog) { if (event.isSuppressErrorUi()) { return null; } Bundle bundle; if (argumentsForErrorDialog != null) { bundle = (Bundle) argumentsForErrorDialog.clone(); } else { bundle = new Bundle(); } if (!bundle.containsKey(ErrorDia... | /**
* Prepares the fragment's arguments and creates the fragment. May be overridden to provide custom error fragments.
*
* @param argumentsForErrorDialog
* @param finishAfterDialog
*/ | Prepares the fragment's arguments and creates the fragment. May be overridden to provide custom error fragments | prepareErrorFragment | {
"repo_name": "quyixia/BeeFramework_Android",
"path": "src/com/external/eventbus/util/ErrorDialogFragmentFactory.java",
"license": "mit",
"size": 4076
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 15,513 |
private void cleanNerAnnotations(JCas jcas) {
// do not apply filter to chinese or japanese texts
if (jcas.getDocumentLanguage().equals("zho") || jcas.getDocumentLanguage().equals("jpn"))
return;
Collection<Person> persons = JCasUtil.select(jcas, Person.class);
cleanAnnotation(persons);
Collection<Org... | void function(JCas jcas) { if (jcas.getDocumentLanguage().equals("zho") jcas.getDocumentLanguage().equals("jpn")) return; Collection<Person> persons = JCasUtil.select(jcas, Person.class); cleanAnnotation(persons); Collection<Organization> organizations = JCasUtil.select(jcas, Organization.class); cleanAnnotation(organi... | /**
* Remove NE annotation for unlikely PER, ORG and LOC entities.
*
* @param jcas
* the jcas
*/ | Remove NE annotation for unlikely PER, ORG and LOC entities | cleanNerAnnotations | {
"repo_name": "tudarmstadt-lt/newsleak-frontend",
"path": "preprocessing/src/main/java/uhh_lt/newsleak/annotator/NerMicroservice.java",
"license": "agpl-3.0",
"size": 8843
} | [
"java.util.Collection",
"org.apache.uima.fit.util.JCasUtil",
"org.apache.uima.jcas.JCas"
] | import java.util.Collection; import org.apache.uima.fit.util.JCasUtil; import org.apache.uima.jcas.JCas; | import java.util.*; import org.apache.uima.fit.util.*; import org.apache.uima.jcas.*; | [
"java.util",
"org.apache.uima"
] | java.util; org.apache.uima; | 403,160 |
public static ImageIcon getLogoIcon() {
ImageIcon result;
String filename;
result = null;
filename = getString("LogoIcon", "");
if (filename.length() != 0)
result = getIcon(filename);
return result;
} | static ImageIcon function() { ImageIcon result; String filename; result = null; filename = getString(STR, ""); if (filename.length() != 0) result = getIcon(filename); return result; } | /**
* Returns an ImageIcon of the logo (icon sized image).
*
* @return the logo or null if none available
*/ | Returns an ImageIcon of the logo (icon sized image) | getLogoIcon | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/core/GUIHelper.java",
"license": "gpl-3.0",
"size": 88762
} | [
"javax.swing.ImageIcon"
] | import javax.swing.ImageIcon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 245,443 |
private PDFObject popObject() throws PDFParseException {
Object obj = stack.pop();
if (!(obj instanceof PDFObject)) {
throw new PDFParseException("Expected a reference here: " + obj.toString());
}
return (PDFObject) obj;
} | PDFObject function() throws PDFParseException { Object obj = stack.pop(); if (!(obj instanceof PDFObject)) { throw new PDFParseException(STR + obj.toString()); } return (PDFObject) obj; } | /**
* pop a PDFObject off the stack.
* @return the PDFObject from the top of the stack
* @throws PDFParseException if the top of the stack does not contain
* a PDFObject.
*/ | pop a PDFObject off the stack | popObject | {
"repo_name": "Allogy/allogy-legacy-android-app",
"path": "Allogy/src/com/hsl/txtreader/PDFParser.java",
"license": "apache-2.0",
"size": 35953
} | [
"com.sun.pdfview.PDFObject",
"com.sun.pdfview.PDFParseException"
] | import com.sun.pdfview.PDFObject; import com.sun.pdfview.PDFParseException; | import com.sun.pdfview.*; | [
"com.sun.pdfview"
] | com.sun.pdfview; | 370,567 |
public Paint getLabelPaint() {
return this.labelPaint;
}
| Paint function() { return this.labelPaint; } | /**
* Returns the label paint.
*
* @return The label paint (never <code>null</code>).
*
* @see #setLabelPaint
*/ | Returns the label paint | getLabelPaint | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/plot/Crosshair.java",
"license": "lgpl-2.1",
"size": 22934
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,007,553 |
try {
Key key = new SecretKeySpec(Security.key, "AES");
Cipher c = Cipher.getInstance("AES");
c.init(Cipher.ENCRYPT_MODE, key);
byte[] encVal = c.doFinal(stringToEncrypt.getBytes());
String encryptedValue = Base64.encodeToString(encVal, Base64.DEFAULT);
... | try { Key key = new SecretKeySpec(Security.key, "AES"); Cipher c = Cipher.getInstance("AES"); c.init(Cipher.ENCRYPT_MODE, key); byte[] encVal = c.doFinal(stringToEncrypt.getBytes()); String encryptedValue = Base64.encodeToString(encVal, Base64.DEFAULT); return encryptedValue; } catch (Exception e) { Log.e(CLASS_NAME, S... | /**
* Encrypts a string using AES 128 Bit
*
* @param stringToEncrypt the string to encrypt
* @return the encrypted string
* See: http://stackoverflow.com/questions/22607791/aes-encryption-using-java-and-decryption-using-javascript
*/ | Encrypts a string using AES 128 Bit | encrypt | {
"repo_name": "lidox/nccn-distress-thermometer",
"path": "NCCN/app/src/main/java/com/artursworld/nccn/controller/util/Security.java",
"license": "mit",
"size": 2858
} | [
"android.util.Base64",
"android.util.Log",
"java.security.Key",
"javax.crypto.Cipher",
"javax.crypto.spec.SecretKeySpec"
] | import android.util.Base64; import android.util.Log; import java.security.Key; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; | import android.util.*; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"android.util",
"java.security",
"javax.crypto"
] | android.util; java.security; javax.crypto; | 101,536 |
public void applyIndexes(List<MongoDbOutputMeta.MongoIndex> indexes,
LogChannelInterface log, boolean truncate) throws MongoException {
for (MongoDbOutputMeta.MongoIndex index : indexes) {
String[] indexParts = index.m_pathToFields.split(","); //$NON-NLS-1$
BasicDBObject mongoIndex = new BasicD... | void function(List<MongoDbOutputMeta.MongoIndex> indexes, LogChannelInterface log, boolean truncate) throws MongoException { for (MongoDbOutputMeta.MongoIndex index : indexes) { String[] indexParts = index.m_pathToFields.split(","); BasicDBObject mongoIndex = new BasicDBObject(); for (String indexKey : indexParts) { St... | /**
* Apply the supplied index operations to the collection. Indexes can be
* defined on one or more fields in the document. Operation is either create
* or drop.
*
* @param indexes a list of index operations
* @param log the logging object
* @param truncate true if the collection was truncated in... | Apply the supplied index operations to the collection. Indexes can be defined on one or more fields in the document. Operation is either create or drop | applyIndexes | {
"repo_name": "mkambol/pentaho-mongodb-plugin",
"path": "src/org/pentaho/di/trans/steps/mongodboutput/MongoDbOutputData.java",
"license": "apache-2.0",
"size": 40206
} | [
"com.mongodb.BasicDBObject",
"com.mongodb.MongoException",
"java.util.List",
"org.pentaho.di.core.logging.LogChannelInterface",
"org.pentaho.di.i18n.BaseMessages"
] | import com.mongodb.BasicDBObject; import com.mongodb.MongoException; import java.util.List; import org.pentaho.di.core.logging.LogChannelInterface; import org.pentaho.di.i18n.BaseMessages; | import com.mongodb.*; import java.util.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.i18n.*; | [
"com.mongodb",
"java.util",
"org.pentaho.di"
] | com.mongodb; java.util; org.pentaho.di; | 2,718,309 |
public static <T extends BaseBinarySpec> T create(Class<? extends BinarySpec> publicType, Class<T> implementationType,
ComponentSpecIdentifier componentId, MutableModelNode modelNode, @Nullable MutableModelNode componentNode,
... | static <T extends BaseBinarySpec> T function(Class<? extends BinarySpec> publicType, Class<T> implementationType, ComponentSpecIdentifier componentId, MutableModelNode modelNode, @Nullable MutableModelNode componentNode, Instantiator instantiator, NamedEntityInstantiator<Task> taskInstantiator, CollectionCallbackAction... | /**
* Creates a {@link BaseBinarySpec}.
*
* @since 5.6
*/ | Creates a <code>BaseBinarySpec</code> | create | {
"repo_name": "gradle/gradle",
"path": "subprojects/platform-base/src/main/java/org/gradle/platform/base/binary/BaseBinarySpec.java",
"license": "apache-2.0",
"size": 11082
} | [
"javax.annotation.Nullable",
"org.gradle.api.Task",
"org.gradle.api.internal.CollectionCallbackActionDecorator",
"org.gradle.api.internal.collections.DomainObjectCollectionFactory",
"org.gradle.api.reflect.ObjectInstantiationException",
"org.gradle.internal.reflect.Instantiator",
"org.gradle.language.ba... | import javax.annotation.Nullable; import org.gradle.api.Task; import org.gradle.api.internal.CollectionCallbackActionDecorator; import org.gradle.api.internal.collections.DomainObjectCollectionFactory; import org.gradle.api.reflect.ObjectInstantiationException; import org.gradle.internal.reflect.Instantiator; import or... | import javax.annotation.*; import org.gradle.api.*; import org.gradle.api.internal.*; import org.gradle.api.internal.collections.*; import org.gradle.api.reflect.*; import org.gradle.internal.reflect.*; import org.gradle.language.base.*; import org.gradle.model.internal.core.*; import org.gradle.platform.base.*; import... | [
"javax.annotation",
"org.gradle.api",
"org.gradle.internal",
"org.gradle.language",
"org.gradle.model",
"org.gradle.platform"
] | javax.annotation; org.gradle.api; org.gradle.internal; org.gradle.language; org.gradle.model; org.gradle.platform; | 374,131 |
public List<com.mozu.api.contracts.productadmin.AttributeVocabularyValue> getAttributeVocabularyValues(String attributeFQN) throws Exception
{
MozuClient<List<com.mozu.api.contracts.productadmin.AttributeVocabularyValue>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.attributes.Attribut... | List<com.mozu.api.contracts.productadmin.AttributeVocabularyValue> function(String attributeFQN) throws Exception { MozuClient<List<com.mozu.api.contracts.productadmin.AttributeVocabularyValue>> client = com.mozu.api.clients.commerce.catalog.admin.attributedefinition.attributes.AttributeVocabularyValueClient.getAttribu... | /**
* Retrieves a list of vocabulary values defined for the attribute specified in the request.
* <p><pre><code>
* AttributeVocabularyValue attributevocabularyvalue = new AttributeVocabularyValue();
* AttributeVocabularyValue attributeVocabularyValue = attributevocabularyvalue.getAttributeVocabularyValues( attr... | Retrieves a list of vocabulary values defined for the attribute specified in the request. <code><code> AttributeVocabularyValue attributevocabularyvalue = new AttributeVocabularyValue(); AttributeVocabularyValue attributeVocabularyValue = attributevocabularyvalue.getAttributeVocabularyValues( attributeFQN); </code></co... | getAttributeVocabularyValues | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/attributedefinition/attributes/AttributeVocabularyValueResource.java",
"license": "mit",
"size": 50244
} | [
"com.mozu.api.MozuClient",
"java.util.List"
] | import com.mozu.api.MozuClient; import java.util.List; | import com.mozu.api.*; import java.util.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 137,740 |
public static void setupLibertyServer() throws Exception {
Log.info(c, "setUp", "Starting the server... (will wait for userRegistry servlet to start)");
server.copyFileToLibertyInstallRoot("lib/features", "internalfeatures/securitylibertyinternals-1.0.mf");
server.addInstalledAppForValidatio... | static void function() throws Exception { Log.info(c, "setUp", STR); server.copyFileToLibertyInstallRoot(STR, STR); server.addInstalledAppForValidation(STR); ServerConfiguration serverConfig = server.getServerConfiguration(); LdapRegistry ldap = serverConfig.getLdapRegistries().get(0); ldap.setHost(STR); ldap.setPort(S... | /**
* Setup the Liberty server. This server will start with very basic configuration. The tests
* will configure the server dynamically.
*
* @throws Exception If there was an issue setting up the Liberty server.
*/ | Setup the Liberty server. This server will start with very basic configuration. The tests will configure the server dynamically | setupLibertyServer | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.security.wim.registry_fat/fat/src/com/ibm/ws/security/wim/registry/fat/DefaultWIMRealmTest.java",
"license": "epl-1.0",
"size": 31151
} | [
"com.ibm.websphere.simplicity.config.ServerConfiguration",
"com.ibm.websphere.simplicity.config.wim.LdapRegistry",
"com.ibm.websphere.simplicity.log.Log",
"com.ibm.ws.com.unboundid.InMemorySunLDAPServer",
"com.ibm.ws.security.registry.test.UserRegistryServletConnection",
"org.junit.Assert"
] | import com.ibm.websphere.simplicity.config.ServerConfiguration; import com.ibm.websphere.simplicity.config.wim.LdapRegistry; import com.ibm.websphere.simplicity.log.Log; import com.ibm.ws.com.unboundid.InMemorySunLDAPServer; import com.ibm.ws.security.registry.test.UserRegistryServletConnection; import org.junit.Assert... | import com.ibm.websphere.simplicity.config.*; import com.ibm.websphere.simplicity.config.wim.*; import com.ibm.websphere.simplicity.log.*; import com.ibm.ws.com.unboundid.*; import com.ibm.ws.security.registry.test.*; import org.junit.*; | [
"com.ibm.websphere",
"com.ibm.ws",
"org.junit"
] | com.ibm.websphere; com.ibm.ws; org.junit; | 2,222,157 |
public Set<Option> getOptions() {
return Collections.unmodifiableSet(options);
}
/**
* Returns a list containing the exceptions that are ignored by the
* revocation checker when the {@link Option#SOFT_FAIL SOFT_FAIL} option
* is set. The list is cleared each time {@link #init init} i... | Set<Option> function() { return Collections.unmodifiableSet(options); } /** * Returns a list containing the exceptions that are ignored by the * revocation checker when the {@link Option#SOFT_FAIL SOFT_FAIL} option * is set. The list is cleared each time {@link #init init} is called. * The list is ordered in ascending ... | /**
* Gets the revocation options.
*
* @return an unmodifiable set of revocation options. The set is empty if
* no options have been specified.
*/ | Gets the revocation options | getOptions | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/security/cert/PKIXRevocationChecker.java",
"license": "apache-2.0",
"size": 12302
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,893,193 |
return JPatternTemplateRecord.class;
}
public final TableField<JPatternTemplateRecord, Long> ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false).defaultValue(org.jooq.impl.DSL.field("nextval('pattern_template_id_seq'::regclass)", org.jooq.impl.SQLDataType.BIGINT)), this, "");... | return JPatternTemplateRecord.class; } public final TableField<JPatternTemplateRecord, Long> ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.BIGINT.nullable(false).defaultValue(org.jooq.impl.DSL.field(STR, org.jooq.impl.SQLDataType.BIGINT)), this, STRnameSTRSTRvalueSTRSTRtypeSTRSTRenabledSTRSTRproject_idSTRS... | /**
* The class holding records for this type
*/ | The class holding records for this type | getRecordType | {
"repo_name": "reportportal/commons-dao",
"path": "src/main/java/com/epam/ta/reportportal/jooq/tables/JPatternTemplate.java",
"license": "apache-2.0",
"size": 5987
} | [
"com.epam.ta.reportportal.jooq.tables.records.JPatternTemplateRecord",
"org.jooq.ForeignKey",
"org.jooq.Record",
"org.jooq.Table",
"org.jooq.TableField",
"org.jooq.impl.DSL"
] | import com.epam.ta.reportportal.jooq.tables.records.JPatternTemplateRecord; import org.jooq.ForeignKey; import org.jooq.Record; import org.jooq.Table; import org.jooq.TableField; import org.jooq.impl.DSL; | import com.epam.ta.reportportal.jooq.tables.records.*; import org.jooq.*; import org.jooq.impl.*; | [
"com.epam.ta",
"org.jooq",
"org.jooq.impl"
] | com.epam.ta; org.jooq; org.jooq.impl; | 444,174 |
public static Map<String, String> getMap(JSONObject jsonObject, String key) {
return JSONUtils.parseKeyAndValueToMap(JSONUtils.getString(jsonObject, key, null));
} | static Map<String, String> function(JSONObject jsonObject, String key) { return JSONUtils.parseKeyAndValueToMap(JSONUtils.getString(jsonObject, key, null)); } | /**
* get map from jsonObject.
*
* @param jsonObject key-value pairs json
* @param key
* @return <ul>
* <li>if jsonObject is null, return null</li>
* <li>return {@link JSONUtils#parseKeyAndValueToMap(String)}</li>
* </ul>
*/ | get map from jsonObject | getMap | {
"repo_name": "hucaihua/cmssp",
"path": "client/ox/src/main/java/com/ox/utils/JSONUtils.java",
"license": "mit",
"size": 26606
} | [
"java.util.Map",
"org.json.JSONObject"
] | import java.util.Map; import org.json.JSONObject; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,518,216 |
public boolean remove(T node) {
Assert.notNull(node, "node");
boolean removed = nodeList.remove(node);
if (removed) {
notifyRemoved(node);
}
return removed;
} | boolean function(T node) { Assert.notNull(node, "node"); boolean removed = nodeList.remove(node); if (removed) { notifyRemoved(node); } return removed; } | /**
* Removes the given node from this group.
*
* @param node the node to be removed
* @return true, if the node was removed
*/ | Removes the given node from this group | remove | {
"repo_name": "arraydev/snap-engine",
"path": "snap-core/src/main/java/org/esa/snap/framework/datamodel/ProductNodeGroup.java",
"license": "gpl-3.0",
"size": 8806
} | [
"com.bc.ceres.core.Assert"
] | import com.bc.ceres.core.Assert; | import com.bc.ceres.core.*; | [
"com.bc.ceres"
] | com.bc.ceres; | 1,612,360 |
@Input
public @Nullable List<String> getSourceSets() {
return this.sourceSets;
} | @Nullable List<String> function() { return this.sourceSets; } | /**
* Get the source sets to process
*
* @return Source sets to process
*/ | Get the source sets to process | getSourceSets | {
"repo_name": "jochenseeber/gradle-project-config",
"path": "src/main/java/me/seeber/gradle/validation/checkstyle/GenerateEclipseCheckstyle.java",
"license": "bsd-2-clause",
"size": 7851
} | [
"java.util.List",
"org.eclipse.jdt.annotation.Nullable"
] | import java.util.List; import org.eclipse.jdt.annotation.Nullable; | import java.util.*; import org.eclipse.jdt.annotation.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 467,527 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> getOrderItemClient(String orderId, String orderItemId, Boolean draft, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.getOrderItemUrl(draft, orderId, orderItemId, responseFields... | static MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> function(String orderId, String orderItemId, Boolean draft, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.orders.OrderItemUrl.getOrderItemUrl(draft, orderId, orderItemId, responseFields); String verb = "GET";... | /**
* Retrieves the details of a single order item.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.orders.OrderItem> mozuClient=GetOrderItemClient( orderId, orderItemId, draft, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* OrderItem orderItem = client.R... | Retrieves the details of a single order item. <code><code> MozuClient mozuClient=GetOrderItemClient( orderId, orderItemId, draft, responseFields); client.setBaseAddress(url); client.executeRequest(); OrderItem orderItem = client.Result(); </code></code> | getOrderItemClient | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderItemClient.java",
"license": "mit",
"size": 31945
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,889,616 |
protected void setupChild(Configuration childConf)
throws CheckstyleException {
if (childConf != null) {
throw new CheckstyleException(childConf.getName() + " is not allowed as a child in "
+ configuration.getName() + ". Please review 'Parent Module' section "
... | void function(Configuration childConf) throws CheckstyleException { if (childConf != null) { throw new CheckstyleException(childConf.getName() + STR + configuration.getName() + STR + STR); } } private static class PatternConverter implements Converter { | /**
* Called by configure() for every child of this component's Configuration.
* <p>
* The default implementation throws {@link CheckstyleException} if
* {@code childConf} is {@code null} because it doesn't support children. It
* must be overridden to validate and support children that are want... | Called by configure() for every child of this component's Configuration. The default implementation throws <code>CheckstyleException</code> if childConf is null because it doesn't support children. It must be overridden to validate and support children that are wanted. | setupChild | {
"repo_name": "jonmbake/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/api/AutomaticBean.java",
"license": "lgpl-2.1",
"size": 15808
} | [
"org.apache.commons.beanutils.Converter"
] | import org.apache.commons.beanutils.Converter; | import org.apache.commons.beanutils.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,441,537 |
public void putEphemeralData(String zPath, byte[] data)
throws KeeperException, InterruptedException {
retryLoop(zk -> zk.create(zPath, data, ZooUtil.PUBLIC, CreateMode.EPHEMERAL));
} | void function(String zPath, byte[] data) throws KeeperException, InterruptedException { retryLoop(zk -> zk.create(zPath, data, ZooUtil.PUBLIC, CreateMode.EPHEMERAL)); } | /**
* Create an ephemeral node with the default ACL
*/ | Create an ephemeral node with the default ACL | putEphemeralData | {
"repo_name": "phrocker/accumulo-1",
"path": "core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java",
"license": "apache-2.0",
"size": 9140
} | [
"org.apache.zookeeper.CreateMode",
"org.apache.zookeeper.KeeperException"
] | import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; | import org.apache.zookeeper.*; | [
"org.apache.zookeeper"
] | org.apache.zookeeper; | 424,866 |
public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity)
{
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.625F, 1.0F);
super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
... | void function(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity) { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.625F, 1.0F); super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); float f = 0.125F; this.setBlockBounds(0.0F, 0.... | /**
* Add all collision boxes of this Block to the list that intersect with the given mask.
*/ | Add all collision boxes of this Block to the list that intersect with the given mask | addCollisionBoxesToList | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/block/BlockHopper.java",
"license": "gpl-2.0",
"size": 8335
} | [
"java.util.List",
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.Entity",
"net.minecraft.util.AxisAlignedBB",
"net.minecraft.util.BlockPos",
"net.minecraft.world.World"
] | import java.util.List; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.Entity; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 891,829 |
protected boolean useScroll(final Player player) {
player.sendPrivateText("What a strange scroll! You can't make heads or tails of it.");
return false;
} | boolean function(final Player player) { player.sendPrivateText(STR); return false; } | /**
* Use a scroll.
*
* @param player
* The player using scroll.
*
* @return <code>true</code> if successful, <code>false</code>
* otherwise.
*/ | Use a scroll | useScroll | {
"repo_name": "acsid/stendhal",
"path": "src/games/stendhal/server/entity/item/scroll/Scroll.java",
"license": "gpl-2.0",
"size": 3337
} | [
"games.stendhal.server.entity.player.Player"
] | import games.stendhal.server.entity.player.Player; | import games.stendhal.server.entity.player.*; | [
"games.stendhal.server"
] | games.stendhal.server; | 2,210,994 |
public List<JRPrintImageAreaHyperlink> renderWithHyperlinks(Graphics2D grx, Rectangle2D rectangle) throws JRException; | List<JRPrintImageAreaHyperlink> function(Graphics2D grx, Rectangle2D rectangle) throws JRException; | /**
* Returns the list of {@link JRPrintImageAreaHyperlink image map areas}.
*
* @param rectangle the area on which the image would be rendered
* @return a list of {@link JRPrintImageAreaHyperlink JRPrintImageAreaHyperlink} instances.
* @throws JRException
*/ | Returns the list of <code>JRPrintImageAreaHyperlink image map areas</code> | renderWithHyperlinks | {
"repo_name": "juniormesquitadandao/report4all",
"path": "lib/src/net/sf/jasperreports/engine/JRImageMapRenderer.java",
"license": "mit",
"size": 2479
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"java.util.List"
] | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import java.util.List; | import java.awt.*; import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 385,916 |
public List<Rule> getRules();
| List<Rule> function(); | /** Method to obtain the rules in a SADL model in IntermediateForm
* @return-- the Rules of the model
*/ | Method to obtain the rules in a SADL model in IntermediateForm | getRules | {
"repo_name": "crapo/sadlos2",
"path": "sadl3/com.ge.research.sadl.parent/com.ge.research.sadl.jena/src/com/ge/research/sadl/jena/IJenaBasedModelProcessor.java",
"license": "epl-1.0",
"size": 4525
} | [
"com.ge.research.sadl.model.gp.Rule",
"java.util.List"
] | import com.ge.research.sadl.model.gp.Rule; import java.util.List; | import com.ge.research.sadl.model.gp.*; import java.util.*; | [
"com.ge.research",
"java.util"
] | com.ge.research; java.util; | 2,322,969 |
public int getDrugIDByDrugName(String dname)
{
List<MstDrugsNew> drugs = null;
int srNo= 0;
try
{
tx = session.beginTransaction();
//Gets the values from the database and assign it to a List
drugs = session.createQuery("FROM MstDrugsNew as d where d... | int function(String dname) { List<MstDrugsNew> drugs = null; int srNo= 0; try { tx = session.beginTransaction(); drugs = session.createQuery(STR+dname+"'").list(); for(Iterator iterator = drugs.iterator();iterator.hasNext();) { MstDrugsNew drug = (MstDrugsNew) iterator.next(); srNo = drug.getdSrNo(); } tx.commit(); } c... | /**
* Gives the Drug Id for a given Drug Name
* @author Vishwa
* @param dname
* @return
*/ | Gives the Drug Id for a given Drug Name | getDrugIDByDrugName | {
"repo_name": "SLIIT-FacultyOfComputing/Digital-Pulz-for-Hospitals",
"path": "HIS_Latest_Project_29-07-2016/Backend/NewWorkspace_2016/HIS_API/src/main/java/lib/driver/pharmacy/driver_class/DrugDBDriver.java",
"license": "apache-2.0",
"size": 36328
} | [
"java.util.Iterator",
"java.util.List",
"org.hibernate.HibernateException"
] | import java.util.Iterator; import java.util.List; import org.hibernate.HibernateException; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 1,113,408 |
@SuppressWarnings("unchecked")
public static <T> T readObjectFromConfAsBase64(String key, Configuration conf) throws IOException {
String b64 = conf.get(key);
if (b64 == null) {
return null;
}
byte[] bytes = Base64.decodeBase64(b64.getBytes(Charsets.UTF_8));
ByteArrayInputStream bais = n... | @SuppressWarnings(STR) static <T> T function(String key, Configuration conf) throws IOException { String b64 = conf.get(key); if (b64 == null) { return null; } byte[] bytes = Base64.decodeBase64(b64.getBytes(Charsets.UTF_8)); ByteArrayInputStream bais = null; GZIPInputStream gis = null; ObjectInputStream ois = null; tr... | /**
* Reads an object (that was written using
* {@link #writeObjectToConfAsBase64}) from a configuration.
*
* @param key for the configuration
* @param conf to read from
* @return the read object, or null if key is not present in conf
* @throws IOException
*/ | Reads an object (that was written using <code>#writeObjectToConfAsBase64</code>) from a configuration | readObjectFromConfAsBase64 | {
"repo_name": "canojim/elephant-bird",
"path": "core/src/main/java/com/twitter/elephantbird/util/HadoopUtils.java",
"license": "apache-2.0",
"size": 8006
} | [
"com.google.common.base.Charsets",
"com.google.common.io.Closeables",
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.ObjectInputStream",
"java.util.zip.GZIPInputStream",
"org.apache.commons.codec.binary.Base64",
"org.apache.hadoop.conf.Configuration"
] | import com.google.common.base.Charsets; import com.google.common.io.Closeables; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.util.zip.GZIPInputStream; import org.apache.commons.codec.binary.Base64; import org.apache.hadoop.conf.Configuration; | import com.google.common.base.*; import com.google.common.io.*; import java.io.*; import java.util.zip.*; import org.apache.commons.codec.binary.*; import org.apache.hadoop.conf.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.commons",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.commons; org.apache.hadoop; | 57,537 |
public void deletePropValue(PropValue propValue); | void function(PropValue propValue); | /**
* Delete a PropValue
* @param propValue
* @return true if propValue is deleted. False if propValue does not exist
*/ | Delete a PropValue | deletePropValue | {
"repo_name": "fracturedatlas/ATHENA",
"path": "core/apa/src/main/java/org/fracturedatlas/athena/apa/ApaAdapter.java",
"license": "gpl-3.0",
"size": 9386
} | [
"org.fracturedatlas.athena.apa.impl.jpa.PropValue"
] | import org.fracturedatlas.athena.apa.impl.jpa.PropValue; | import org.fracturedatlas.athena.apa.impl.jpa.*; | [
"org.fracturedatlas.athena"
] | org.fracturedatlas.athena; | 937,998 |
public MarcDataField getById(Long id, boolean lock)
{
return marcDataFieldDAO.getById(id, lock);
}
| MarcDataField function(Long id, boolean lock) { return marcDataFieldDAO.getById(id, lock); } | /**
* Get a MARC data field by id.
*
* @param id - id of the MARC data field
* @param lock - upgrade the lock
*
* @return the found MARC data field
*/ | Get a MARC data field by id | getById | {
"repo_name": "nate-rcl/irplus",
"path": "metadata_service/src/edu/ur/metadata/marc/service/DefaultMarcDataFieldService.java",
"license": "apache-2.0",
"size": 2690
} | [
"edu.ur.metadata.marc.MarcDataField"
] | import edu.ur.metadata.marc.MarcDataField; | import edu.ur.metadata.marc.*; | [
"edu.ur.metadata"
] | edu.ur.metadata; | 257,775 |
@Override
public double distance(final Envelope env) {
if (intersects(env)) { return 0; }
double dx = 0.0;
if (getMaxX() < env.getMinX()) {
dx = env.getMinX() - getMaxX();
} else if (getMinX() > env.getMaxX()) {
dx = getMinX() - env.getMaxX();
}
double dy = 0.0;
if (getMaxY() < env.getMinY()) ... | double function(final Envelope env) { if (intersects(env)) { return 0; } double dx = 0.0; if (getMaxX() < env.getMinX()) { dx = env.getMinX() - getMaxX(); } else if (getMinX() > env.getMaxX()) { dx = getMinX() - env.getMaxX(); } double dy = 0.0; if (getMaxY() < env.getMinY()) { dy = env.getMinY() - getMaxY(); } else if... | /**
* Computes the distance between this and another <code>Envelope</code>. The distance between overlapping Envelopes
* is 0. Otherwise, the distance is the Euclidean distance between the closest points.
*/ | Computes the distance between this and another <code>Envelope</code>. The distance between overlapping Envelopes is 0. Otherwise, the distance is the Euclidean distance between the closest points | distance | {
"repo_name": "hqnghi88/gamaClone",
"path": "msi.gama.core/src/msi/gama/common/geometry/Envelope3D.java",
"license": "gpl-3.0",
"size": 20251
} | [
"com.vividsolutions.jts.geom.Envelope"
] | import com.vividsolutions.jts.geom.Envelope; | import com.vividsolutions.jts.geom.*; | [
"com.vividsolutions.jts"
] | com.vividsolutions.jts; | 1,335,684 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ConfluentAgreementResourceInner>> listSinglePageAsync(Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ConfluentAgreementResourceInner>> function(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException... | /**
* List Confluent marketplace agreements in the subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throw... | List Confluent marketplace agreements in the subscription | listSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/confluent/azure-resourcemanager-confluent/src/main/java/com/azure/resourcemanager/confluent/implementation/MarketplaceAgreementsClientImpl.java",
"license": "mit",
"size": 20730
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.confluent.fluent.models.ConfluentAgreementResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.confluent.fluent.models.ConfluentAgreementResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.confluent.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,856,122 |
void handleCompletedMetadataResponse(RequestHeader requestHeader, long now, MetadataResponse metadataResponse); | void handleCompletedMetadataResponse(RequestHeader requestHeader, long now, MetadataResponse metadataResponse); | /**
* If `request` is a metadata request, handles it and returns `true`. Otherwise, returns `false`.
*
* This provides a mechanism for the `MetadataUpdater` implementation to use the NetworkClient instance for its own
* requests with special handling for completed receives of such requests.
*/ | If `request` is a metadata request, handles it and returns `true`. Otherwise, returns `false`. This provides a mechanism for the `MetadataUpdater` implementation to use the NetworkClient instance for its own requests with special handling for completed receives of such requests | handleCompletedMetadataResponse | {
"repo_name": "wangcy6/storm_app",
"path": "frame/kafka-0.11.0/kafka-0.11.0.1-src/clients/src/main/java/org/apache/kafka/clients/MetadataUpdater.java",
"license": "apache-2.0",
"size": 3185
} | [
"org.apache.kafka.common.requests.MetadataResponse",
"org.apache.kafka.common.requests.RequestHeader"
] | import org.apache.kafka.common.requests.MetadataResponse; import org.apache.kafka.common.requests.RequestHeader; | import org.apache.kafka.common.requests.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,951,505 |
public void setPlatformMetadataMap() {
String regexComma = "(?<!\\\\)" + Pattern.quote(",");
String regexColon = "(?<!\\\\)" + Pattern.quote(":");
List <String> pairs = Arrays.asList(platformMetadata.split(regexComma));
Iterator<String> pairsIterator = pairs.iterator();
while... | void function() { String regexComma = STR + Pattern.quote(","); String regexColon = STR + Pattern.quote(":"); List <String> pairs = Arrays.asList(platformMetadata.split(regexComma)); Iterator<String> pairsIterator = pairs.iterator(); while (pairsIterator.hasNext()) { String pairString = pairsIterator.next(); String[] i... | /**
* Creates a Map containing the platform metadata as specified by the user.
*/ | Creates a Map containing the platform metadata as specified by the user | setPlatformMetadataMap | {
"repo_name": "nansencenter/rosetta",
"path": "src/main/java/edu/ucar/unidata/rosetta/domain/AsciiFile.java",
"license": "bsd-3-clause",
"size": 16134
} | [
"java.util.Arrays",
"java.util.Iterator",
"java.util.List",
"java.util.regex.Pattern"
] | import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 875,193 |
public void setTargetType(String typeDesc)
{
targetType=ValueMeta.getType(typeDesc);
}
| void function(String typeDesc) { targetType=ValueMeta.getType(typeDesc); } | /**
* Set the target type
* @param typeDesc the target value type description
*/ | Set the target type | setTargetType | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/steps/denormaliser/DenormaliserTargetField.java",
"license": "gpl-2.0",
"size": 8701
} | [
"com.panet.imeta.core.row.ValueMeta"
] | import com.panet.imeta.core.row.ValueMeta; | import com.panet.imeta.core.row.*; | [
"com.panet.imeta"
] | com.panet.imeta; | 2,584,076 |
public static AnnotatedIntervalHeader createHeaderForWriter(final Path outputConfigFile, final List<String> annotations, final SAMFileHeader samFileHeader) {
Utils.nonNull(annotations);
Utils.nonNull(outputConfigFile);
final Pair<Boolean, Properties> validityAndPropertiesPair = XsvLocatabl... | static AnnotatedIntervalHeader function(final Path outputConfigFile, final List<String> annotations, final SAMFileHeader samFileHeader) { Utils.nonNull(annotations); Utils.nonNull(outputConfigFile); final Pair<Boolean, Properties> validityAndPropertiesPair = XsvLocatableTableCodec.getAndValidateConfigFileContentsOnPath... | /**
* Create an annotated interval header based on a config file (for locatable field names only) and a list of annotations (the rest of the fields).
*
* @param outputConfigFile config path for determining the locatable column headers in the output file. If comma separated lists are present as values, t... | Create an annotated interval header based on a config file (for locatable field names only) and a list of annotations (the rest of the fields) | createHeaderForWriter | {
"repo_name": "broadinstitute/hellbender",
"path": "src/main/java/org/broadinstitute/hellbender/utils/codecs/AnnotatedIntervalCodec.java",
"license": "bsd-3-clause",
"size": 11289
} | [
"java.nio.file.Path",
"java.util.List",
"java.util.Properties",
"java.util.stream.Collectors",
"org.apache.commons.lang3.tuple.Pair",
"org.broadinstitute.hellbender.exceptions.UserException",
"org.broadinstitute.hellbender.tools.copynumber.utils.annotatedinterval.AnnotatedIntervalHeader",
"org.broadin... | import java.nio.file.Path; import java.util.List; import java.util.Properties; import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.Pair; import org.broadinstitute.hellbender.exceptions.UserException; import org.broadinstitute.hellbender.tools.copynumber.utils.annotatedinterval.AnnotatedIntervalHea... | import java.nio.file.*; import java.util.*; import java.util.stream.*; import org.apache.commons.lang3.tuple.*; import org.broadinstitute.hellbender.exceptions.*; import org.broadinstitute.hellbender.tools.copynumber.utils.annotatedinterval.*; import org.broadinstitute.hellbender.tools.funcotator.*; import org.broadins... | [
"java.nio",
"java.util",
"org.apache.commons",
"org.broadinstitute.hellbender"
] | java.nio; java.util; org.apache.commons; org.broadinstitute.hellbender; | 2,649,695 |
public String[] getSymbolIDs(ElementStructure element, String[] requested) {
URI uri = getSymbolURI(element); // The URI for this element
if (uri == null) uri = BASIC_SYMBOLS_URI; // FOr anything odd, treat as basic symbol
Map<String, Element> elements = getSymbolDefinitions... | String[] function(ElementStructure element, String[] requested) { URI uri = getSymbolURI(element); if (uri == null) uri = BASIC_SYMBOLS_URI; Map<String, Element> elements = getSymbolDefinitions(uri); if (requested != null && requested.length > 0) { String prefix = getSymbolPrefix(uri); String[] strings = new String[req... | /**
* Get the IDs matching the requested symbols
*
* @param element element to look for
* @param requested the symbol names we want
* @return matching list of symbols; all unfound ones will get a 'circle' instead
*/ | Get the IDs matching the requested symbols | getSymbolIDs | {
"repo_name": "Brunel-Visualization/Brunel",
"path": "core/src/main/java/org/brunel/build/SymbolHandler.java",
"license": "apache-2.0",
"size": 14070
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.brunel.build.info.ElementStructure",
"org.w3c.dom.Element"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import org.brunel.build.info.ElementStructure; import org.w3c.dom.Element; | import java.util.*; import org.brunel.build.info.*; import org.w3c.dom.*; | [
"java.util",
"org.brunel.build",
"org.w3c.dom"
] | java.util; org.brunel.build; org.w3c.dom; | 188,519 |
@GET
@Path("{key}")
public Response getMBean(@PathParam("key") String key,
@QueryParam("jsonp") @DefaultValue("") String jsonp)
throws Exception {
LOG.info("key: " + key);
JSONObject json = new JSONObject();
ObjectName name = new ObjectName(... | @Path("{key}") Response function(@PathParam("key") String key, @QueryParam("jsonp") @DefaultValue(STRkey: STRdomainSTRpropertySTR*STRattributesSTRmultikeySTRattributesSTRmultikeySTRnameSTRdescriptionSTRreturnTypeSTRimpactSTRnameSTRtypeSTRparamsSTRoperationsSTR(STR);"); } return Response.ok(out.toString()).type(MediaTyp... | /**
* Return all the attributes and operations for a single mbean
*
* @param key
* Exact object name of MBean in String form
* @param jsonp
*/ | Return all the attributes and operations for a single mbean | getMBean | {
"repo_name": "brharrington/karyon",
"path": "karyon2-admin-web/src/main/java/netflix/adminresources/resources/jmx/JMXResource.java",
"license": "apache-2.0",
"size": 13878
} | [
"javax.ws.rs.DefaultValue",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 1,013,145 |
public TDocStateBean getBean(IdentityMap createdBeans)
{
TDocStateBean result = (TDocStateBean) createdBeans.get(this);
if (result != null ) {
// we have already created a bean for this object, return it
return result;
}
// no bean exists for this object; ... | TDocStateBean function(IdentityMap createdBeans) { TDocStateBean result = (TDocStateBean) createdBeans.get(this); if (result != null ) { return result; } result = new TDocStateBean(); createdBeans.put(this, result); result.setObjectID(getObjectID()); result.setLabel(getLabel()); result.setStateFlag(getStateFlag()); res... | /**
* Creates a TDocStateBean with the contents of this object
* intended for internal use only
* @param createdBeans a IdentityMap which maps objects
* to already created beans
* @return a TDocStateBean with the contents of this object
*/ | Creates a TDocStateBean with the contents of this object intended for internal use only | getBean | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTDocState.java",
"license": "gpl-3.0",
"size": 54049
} | [
"com.aurel.track.beans.TAttachmentBean",
"com.aurel.track.beans.TAttachmentVersionBean",
"com.aurel.track.beans.TDocStateBean",
"com.aurel.track.beans.TProjectTypeBean",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apache.commons.collections.map.IdentityMap"
] | import com.aurel.track.beans.TAttachmentBean; import com.aurel.track.beans.TAttachmentVersionBean; import com.aurel.track.beans.TDocStateBean; import com.aurel.track.beans.TProjectTypeBean; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.collections.map.IdentityMa... | import com.aurel.track.beans.*; import java.util.*; import org.apache.commons.collections.map.*; | [
"com.aurel.track",
"java.util",
"org.apache.commons"
] | com.aurel.track; java.util; org.apache.commons; | 981,006 |
@Test
public void testWriteChangesSuccess() throws XBeeException, IOException {
// Do nothing when trying to set the WR parameter.
Mockito.doNothing().when(xbeeDevice).executeParameter(PARAMETER_WR);
// Write changes in the device.
xbeeDevice.writeChanges();
} | void function() throws XBeeException, IOException { Mockito.doNothing().when(xbeeDevice).executeParameter(PARAMETER_WR); xbeeDevice.writeChanges(); } | /**
* Test method for {@link com.digi.xbee.api.XBeeDevice#writeChanges()}.
*
* <p>Verify that changes on an XBee device can be written successfully.</p>
*
* @throws XBeeException
* @throws IOException
*/ | Test method for <code>com.digi.xbee.api.XBeeDevice#writeChanges()</code>. Verify that changes on an XBee device can be written successfully | testWriteChangesSuccess | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/WriteChangesTest.java",
"license": "mpl-2.0",
"size": 4713
} | [
"com.digi.xbee.api.exceptions.XBeeException",
"java.io.IOException",
"org.mockito.Mockito"
] | import com.digi.xbee.api.exceptions.XBeeException; import java.io.IOException; import org.mockito.Mockito; | import com.digi.xbee.api.exceptions.*; import java.io.*; import org.mockito.*; | [
"com.digi.xbee",
"java.io",
"org.mockito"
] | com.digi.xbee; java.io; org.mockito; | 2,064,083 |
public static void setVersion(FileSystem fs, Path rootdir, String version,
int wait, int retries) throws IOException {
Path versionFile = new Path(rootdir, HConstants.VERSION_FILE_NAME);
while (true) {
try {
FSDataOutputStream s = fs.create(versionFile);
s.writeUTF(version);
... | static void function(FileSystem fs, Path rootdir, String version, int wait, int retries) throws IOException { Path versionFile = new Path(rootdir, HConstants.VERSION_FILE_NAME); while (true) { try { FSDataOutputStream s = fs.create(versionFile); s.writeUTF(version); LOG.debug(STR + rootdir.toString() + STR + version); ... | /**
* Sets version of file system
*
* @param fs filesystem object
* @param rootdir hbase root directory
* @param version version to set
* @param wait time to wait for retry
* @param retries number of times to retry before throwing an IOException
* @throws IOException e
*/ | Sets version of file system | setVersion | {
"repo_name": "kijiproject/hbase-maven-plugin",
"path": "src/main/java/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "apache-2.0",
"size": 48438
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HConstants"
] | import java.io.IOException; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,557,485 |
@Override
public HelpCtx getHelpCtx() {
return HelpCtx.DEFAULT_HELP;
} | HelpCtx function() { return HelpCtx.DEFAULT_HELP; } | /**
* Gets help context for this action.
* @return the help context for this action
*/ | Gets help context for this action | getHelpCtx | {
"repo_name": "RtcNbClient/RtcNbClient",
"path": "RtcNbClientWorkItems/RtcNbClientWorkItemsUI/src/main/java/pl/edu/amu/wmi/kino/rtc/client/queries/actions/AddQueryAction.java",
"license": "gpl-3.0",
"size": 5418
} | [
"org.openide.util.HelpCtx"
] | import org.openide.util.HelpCtx; | import org.openide.util.*; | [
"org.openide.util"
] | org.openide.util; | 1,369,581 |
IdentityRoleExpirationTaskExecutor lrt = new IdentityRoleExpirationTaskExecutor();
lrt.init(null);
lrtManager.executeSync(lrt);
// Role
IdmRoleDto role = getHelper().createRole();
// Identity
IdmIdentityDto identity = getHelper().createIdentity();
// Identity contract
IdmIdentityContractDto... | IdentityRoleExpirationTaskExecutor lrt = new IdentityRoleExpirationTaskExecutor(); lrt.init(null); lrtManager.executeSync(lrt); IdmRoleDto role = getHelper().createRole(); IdmIdentityDto identity = getHelper().createIdentity(); IdmIdentityContractDto contract = getHelper().createContract(identity); IdmIdentityRoleDto i... | /**
* This test assigns expired role and checks, whether
* the role is removed by the executor.
*/ | This test assigns expired role and checks, whether the role is removed by the executor | testExpiredRole | {
"repo_name": "bcvsolutions/CzechIdMng",
"path": "Realization/backend/core/core-impl/src/test/java/eu/bcvsolutions/idm/core/scheduler/task/impl/IdentityRoleExpirationTaskExecutorIntegrationTest.java",
"license": "mit",
"size": 5783
} | [
"eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto",
"eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto",
"eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto",
"eu.bcvsolutions.idm.core.api.dto.IdmRoleDto",
"java.time.LocalDate",
"java.util.List",
"org.junit.Assert"
] | import eu.bcvsolutions.idm.core.api.dto.IdmIdentityContractDto; import eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto; import eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto; import eu.bcvsolutions.idm.core.api.dto.IdmRoleDto; import java.time.LocalDate; import java.util.List; import org.junit.Assert; | import eu.bcvsolutions.idm.core.api.dto.*; import java.time.*; import java.util.*; import org.junit.*; | [
"eu.bcvsolutions.idm",
"java.time",
"java.util",
"org.junit"
] | eu.bcvsolutions.idm; java.time; java.util; org.junit; | 2,389,993 |
public byte[] getEncoded() throws SshException {
try {
return cert.getEncoded();
} catch (Throwable ex) {
throw new SshException("Failed to encoded key data",
SshException.INTERNAL_ERROR, ex);
}
} | byte[] function() throws SshException { try { return cert.getEncoded(); } catch (Throwable ex) { throw new SshException(STR, SshException.INTERNAL_ERROR, ex); } } | /**
* Encode the public key into a blob of binary data, the encoded result will
* be passed into init to recreate the key.
*
* @return an encoded byte array
* @throws SshException
* @todo Implement this com.sshtools.ssh.SshPublicKey method
*/ | Encode the public key into a blob of binary data, the encoded result will be passed into init to recreate the key | getEncoded | {
"repo_name": "sshtools/j2ssh-maverick",
"path": "j2ssh-maverick/src/main/java/com/sshtools/ssh/components/jce/SshX509RsaPublicKey.java",
"license": "lgpl-3.0",
"size": 3395
} | [
"com.sshtools.ssh.SshException"
] | import com.sshtools.ssh.SshException; | import com.sshtools.ssh.*; | [
"com.sshtools.ssh"
] | com.sshtools.ssh; | 1,365,648 |
public void putMessage(Message m);
| void function(Message m); | /**
* Send a message to this service
* @param the message
*/ | Send a message to this service | putMessage | {
"repo_name": "kevinperrot/SXP-Trust-No-Fork",
"path": "src/main/java/model/network/communication/service/ServiceInterface.java",
"license": "lgpl-3.0",
"size": 1484
} | [
"net.jxta.endpoint.Message"
] | import net.jxta.endpoint.Message; | import net.jxta.endpoint.*; | [
"net.jxta.endpoint"
] | net.jxta.endpoint; | 1,059,906 |
//-------------------------------------------------------------------------
public ImmutableSet<Index> allIndices() {
ImmutableSet.Builder<Index> builder = ImmutableSet.builder();
legs.stream().forEach(leg -> leg.collectIndices(builder));
return builder.build();
} | ImmutableSet<Index> function() { ImmutableSet.Builder<Index> builder = ImmutableSet.builder(); legs.stream().forEach(leg -> leg.collectIndices(builder)); return builder.build(); } | /**
* Returns the set of indices referred to by the swap.
* <p>
* A swap will typically refer to at least one index, such as 'GBP-LIBOR-3M'.
* Calling this method will return the complete list of indices, including
* any associated with FX reset.
*
* @return the set of indices referred to by this ... | Returns the set of indices referred to by the swap. A swap will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Calling this method will return the complete list of indices, including any associated with FX reset | allIndices | {
"repo_name": "jmptrader/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/swap/Swap.java",
"license": "apache-2.0",
"size": 17891
} | [
"com.google.common.collect.ImmutableSet",
"com.opengamma.strata.basics.index.Index"
] | import com.google.common.collect.ImmutableSet; import com.opengamma.strata.basics.index.Index; | import com.google.common.collect.*; import com.opengamma.strata.basics.index.*; | [
"com.google.common",
"com.opengamma.strata"
] | com.google.common; com.opengamma.strata; | 895,923 |
void enterColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx);
void exitColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); | void enterColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); void exitColumnNameOrder(@NotNull CQLParser.ColumnNameOrderContext ctx); | /**
* Exit a parse tree produced by {@link CQLParser#columnNameOrder}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>CQLParser#columnNameOrder</code> | exitColumnNameOrder | {
"repo_name": "jack6215/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java",
"license": "apache-2.0",
"size": 62500
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,115,577 |
void onSuccess(int total, List<DigestSnapshot> snapshots);
}
public final static class DigestSnapshot implements Digest {
private final String title;
private final String snippet;
private final WaveId waveId;
private final double lastModified;
private final int unreadCount;
private f... | void onSuccess(int total, List<DigestSnapshot> snapshots); } public final static class DigestSnapshot implements Digest { private final String title; private final String snippet; private final WaveId waveId; private final double lastModified; private final int unreadCount; private final int blipCount; private final Pa... | /**
* Notifies this callback of a successful search response.
*
* @param total total number of results in the search (this is greater or
* equal to the size of {@code snapshots}, since not necessarily all
* results are returned)
* @param snapshots some digest snapshots
*... | Notifies this callback of a successful search response | onSuccess | {
"repo_name": "gburd/wave",
"path": "src/org/waveprotocol/box/webclient/search/SearchService.java",
"license": "apache-2.0",
"size": 4748
} | [
"java.util.List",
"org.waveprotocol.wave.model.id.WaveId",
"org.waveprotocol.wave.model.wave.ParticipantId"
] | import java.util.List; import org.waveprotocol.wave.model.id.WaveId; import org.waveprotocol.wave.model.wave.ParticipantId; | import java.util.*; import org.waveprotocol.wave.model.id.*; import org.waveprotocol.wave.model.wave.*; | [
"java.util",
"org.waveprotocol.wave"
] | java.util; org.waveprotocol.wave; | 2,637,450 |
protected static void setParameters(PreparedStatement ps, List<Value<?>> values)
throws SQLException {
for(int i=0; i<values.size(); i++) {
setParameter(ps, i+1, values.get(i));
}
}
| static void function(PreparedStatement ps, List<Value<?>> values) throws SQLException { for(int i=0; i<values.size(); i++) { setParameter(ps, i+1, values.get(i)); } } | /**
* Set PreparedStatement parameters
* @param ps PreparedStatement with parameters
* @param values Value<?> list sorted in the order of the parameters
* @throws SQLException
*/ | Set PreparedStatement parameters | setParameters | {
"repo_name": "sinnlabs/dbvim",
"path": "src/org/sinnlabs/dbvim/db/Database.java",
"license": "lgpl-3.0",
"size": 25271
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.List"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,374,806 |
private int isSuitableFilter(
LoptMultiJoin multiJoin,
RexNode joinFilter,
int factIdx) {
// ignore non-equality filters where the operands are not
// RexInputRefs
switch (joinFilter.getKind()) {
case EQUALS:
break;
default:
return -1;
}
List<RexNode> operands... | int function( LoptMultiJoin multiJoin, RexNode joinFilter, int factIdx) { switch (joinFilter.getKind()) { case EQUALS: break; default: return -1; } List<RexNode> operands = ((RexCall) joinFilter).getOperands(); if (!(operands.get(0) instanceof RexInputRef) !(operands.get(1) instanceof RexInputRef)) { return -1; } Immut... | /**
* Determines if a join filter can be used with a semijoin against a
* specified fact table. A suitable filter is of the form "factable.col1 =
* dimTable.col2".
*
* @param multiJoin join factors being optimized
* @param joinFilter filter to be analyzed
* @param factIdx index corresponding to the... | Determines if a join filter can be used with a semijoin against a specified fact table. A suitable filter is of the form "factable.col1 = dimTable.col2" | isSuitableFilter | {
"repo_name": "vlsi/calcite",
"path": "core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java",
"license": "apache-2.0",
"size": 29860
} | [
"java.util.List",
"org.apache.calcite.rex.RexCall",
"org.apache.calcite.rex.RexInputRef",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.util.ImmutableBitSet"
] | import java.util.List; import org.apache.calcite.rex.RexCall; import org.apache.calcite.rex.RexInputRef; import org.apache.calcite.rex.RexNode; import org.apache.calcite.util.ImmutableBitSet; | import java.util.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,239,571 |
public StateMachine withTransition(State in, Predicate<Token> message, State end) {
if (transitions.get(in) == null) transitions.put(in, new ArrayList<>());
transitions.get(in).add(Transition.from(message, end));
return this;
}
| StateMachine function(State in, Predicate<Token> message, State end) { if (transitions.get(in) == null) transitions.put(in, new ArrayList<>()); transitions.get(in).add(Transition.from(message, end)); return this; } | /** Adds a transition configuration
*
* @param in - the initial state
* @param message - the machine consumes messages in the form of Tokens
* @param end
* @return
*/ | Adds a transition configuration | withTransition | {
"repo_name": "terminological/exotic-datatypes",
"path": "src/main/java/uk/co/terminological/parser/StateMachine.java",
"license": "mit",
"size": 856
} | [
"java.util.ArrayList",
"java.util.function.Predicate"
] | import java.util.ArrayList; import java.util.function.Predicate; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 576,004 |
public Property build() {
Property property = buildUnregistered();
Preconditions.checkState(
Property.register(property),
"Cannot register existing alluxio.table.under.glue.Property \"%s\"", mName);
return property;
} | Property function() { Property property = buildUnregistered(); Preconditions.checkState( Property.register(property), STR%s\"", mName); return property; } | /**
* Register the unregistered udb property.
*
* @return registered udb property
*/ | Register the unregistered udb property | build | {
"repo_name": "wwjiang007/alluxio",
"path": "table/server/underdb/glue/src/main/java/alluxio/table/under/glue/Property.java",
"license": "apache-2.0",
"size": 8391
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,352,931 |
public void deleteSortLocationIfExists() throws CarbonSortKeyAndGroupByException {
CarbonDataProcessorUtil.deleteSortLocationIfExists(parameters.getTempFileLocation());
} | void function() throws CarbonSortKeyAndGroupByException { CarbonDataProcessorUtil.deleteSortLocationIfExists(parameters.getTempFileLocation()); } | /**
* This method will be used to delete sort temp location is it is exites
*
* @throws CarbonSortKeyAndGroupByException
*/ | This method will be used to delete sort temp location is it is exites | deleteSortLocationIfExists | {
"repo_name": "mohammadshahidkhan/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/sortandgroupby/sortdata/SortDataRows.java",
"license": "apache-2.0",
"size": 19213
} | [
"org.apache.carbondata.processing.sortandgroupby.exception.CarbonSortKeyAndGroupByException",
"org.apache.carbondata.processing.util.CarbonDataProcessorUtil"
] | import org.apache.carbondata.processing.sortandgroupby.exception.CarbonSortKeyAndGroupByException; import org.apache.carbondata.processing.util.CarbonDataProcessorUtil; | import org.apache.carbondata.processing.sortandgroupby.exception.*; import org.apache.carbondata.processing.util.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 2,573,423 |
public void diff_cleanupSemanticLossless(LinkedList<Diff> diffs) {
String equality1, edit, equality2;
String commonString;
int commonOffset;
int score, bestScore;
String bestEquality1, bestEdit, bestEquality2;
// Create a new iterator at the start.
ListIterator<Diff> pointer = diffs.listIt... | void function(LinkedList<Diff> diffs) { String equality1, edit, equality2; String commonString; int commonOffset; int score, bestScore; String bestEquality1, bestEdit, bestEquality2; ListIterator<Diff> pointer = diffs.listIterator(); Diff prevDiff = pointer.hasNext() ? pointer.next() : null; Diff thisDiff = pointer.has... | /**
* Look for single edits surrounded on both sides by equalities
* which can be shifted sideways to align the edit to a word boundary.
* e.g: The c<ins>at c</ins>ame. -> The <ins>cat </ins>came.
* @param diffs LinkedList of Diff objects.
*/ | Look for single edits surrounded on both sides by equalities which can be shifted sideways to align the edit to a word boundary. e.g: The cat came. -> The cat came | diff_cleanupSemanticLossless | {
"repo_name": "SeekingFor/jfniki",
"path": "alien/src/name/fraser/neil/plaintext/diff_match_patch.java",
"license": "gpl-2.0",
"size": 88387
} | [
"java.util.LinkedList",
"java.util.ListIterator"
] | import java.util.LinkedList; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 930,046 |
public static MozuClient<String> getDBValueClient(String dbEntryQuery) throws Exception
{
return getDBValueClient( dbEntryQuery, null);
}
| static MozuClient<String> function(String dbEntryQuery) throws Exception { return getDBValueClient( dbEntryQuery, null); } | /**
* Retrieves the value of a record in the Mozu database.
* <p><pre><code>
* MozuClient<String> mozuClient=GetDBValueClient( dbEntryQuery);
* client.setBaseAddress(url);
* client.executeRequest();
* string string = client.Result();
* </code></pre></p>
* @param dbEntryQuery The database entry s... | Retrieves the value of a record in the Mozu database. <code><code> MozuClient mozuClient=GetDBValueClient( dbEntryQuery); client.setBaseAddress(url); client.executeRequest(); string string = client.Result(); </code></code> | getDBValueClient | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/SiteDataClient.java",
"license": "mit",
"size": 4661
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,053,326 |
void createPage1() {
// Automatic transformation
autoTransform();
IEditorInput domainEditorInput = new FileEditorInput(xmlCompositeFile);
try {
smcXMLEditor = new SmcXMLEditor();
int index = addPage(smcXMLEditor, domainEditorInput);
setPageText(index, "Composite XML");
} catch (PartInitExceptio... | void createPage1() { autoTransform(); IEditorInput domainEditorInput = new FileEditorInput(xmlCompositeFile); try { smcXMLEditor = new SmcXMLEditor(); int index = addPage(smcXMLEditor, domainEditorInput); setPageText(index, STR); } catch (PartInitException e) { ErrorDialog.openError(getSite().getShell(), STR, null, e .... | /**
* Creates page 1 of the multipage editor, which shows the Composite XML.
*/ | Creates page 1 of the multipage editor, which shows the Composite XML | createPage1 | {
"repo_name": "road-framework/ROADDesigner",
"path": "au.edu.swin.ict.road.designer.diagram/src/au/edu/swin/ict/road/designer/diagram/editors/MultiPageSmcDiagramEditor.java",
"license": "apache-2.0",
"size": 10128
} | [
"org.eclipse.jface.dialogs.ErrorDialog",
"org.eclipse.ui.IEditorInput",
"org.eclipse.ui.PartInitException",
"org.eclipse.ui.part.FileEditorInput"
] | import org.eclipse.jface.dialogs.ErrorDialog; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.PartInitException; import org.eclipse.ui.part.FileEditorInput; | import org.eclipse.jface.dialogs.*; import org.eclipse.ui.*; import org.eclipse.ui.part.*; | [
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.ui; | 2,476,503 |
public static File getPropertyFile(String moduleName) {
String path = getPropertyPath(moduleName);
if (path == null){
return null;
}
else{
return new File(getPropertyPath(moduleName));
}
} | static File function(String moduleName) { String path = getPropertyPath(moduleName); if (path == null){ return null; } else{ return new File(getPropertyPath(moduleName)); } } | /**
* Gets the property file as specified.
* @param moduleName
* @return A new file handle, returns null if the file does not exist.
*/ | Gets the property file as specified | getPropertyFile | {
"repo_name": "jgarman/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/coreutils/ModuleSettings.java",
"license": "apache-2.0",
"size": 10263
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,146,805 |
@Test
public void testGetNumberMapProperty() {
TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class);
JsonNumberMap testNumberMapProperty = JsonObjectFactory.get().createJsonObject(JsonNumberMap.class);
testJsonObject.setObjectProperty("testNumberMapProperty... | void function() { TestJsonObject testJsonObject = JsonObjectFactory.get().createJsonObject(TestJsonObject.class); JsonNumberMap testNumberMapProperty = JsonObjectFactory.get().createJsonObject(JsonNumberMap.class); testJsonObject.setObjectProperty(STR, testNumberMapProperty); assertEquals(testNumberMapProperty, testJso... | /**
* Test the retrieval of the number map value of a property.
* <p>
* This test asserts that the retrieved number map value of a property
* matches the value of the corresponding property of the underlying JSON
* object.
*/ | Test the retrieval of the number map value of a property. This test asserts that the retrieved number map value of a property matches the value of the corresponding property of the underlying JSON object | testGetNumberMapProperty | {
"repo_name": "kjots/json-toolkit",
"path": "json-object.shared/src/test/java/org/kjots/json/object/shared/JsonObjectGeneratorNumberTestBase.java",
"license": "apache-2.0",
"size": 19094
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,689,413 |
@Test
public void testReturnEmptyBeforeGetAllSamples() throws Exception {
for (int t=1; t<numOfSamples; t++) {
Sample s = new Sample(Integer.valueOf(t));
EnrichedSample vs = new EnrichedSample(s,true);
avgFilter.newSample(vs);
Optional<FilteredValue> value = avgFilter.apply();
assertFalse(value.isP... | void function() throws Exception { for (int t=1; t<numOfSamples; t++) { Sample s = new Sample(Integer.valueOf(t)); EnrichedSample vs = new EnrichedSample(s,true); avgFilter.newSample(vs); Optional<FilteredValue> value = avgFilter.apply(); assertFalse(value.isPresent()); } } | /**
* Test if {@link AverageBySamples#apply()} return empty when there
* are no samples
*
* @throws Exception
*/ | Test if <code>AverageBySamples#apply()</code> return empty when there are no samples | testReturnEmptyBeforeGetAllSamples | {
"repo_name": "IntegratedAlarmSystem-Group/ias",
"path": "plugin/src/test/java/org/eso/ias/plugin/test/filter/AvgBySamplesFilterTest.java",
"license": "lgpl-3.0",
"size": 5517
} | [
"java.util.Optional",
"org.eso.ias.plugin.Sample",
"org.eso.ias.plugin.filter.Filter",
"org.eso.ias.plugin.filter.FilteredValue",
"org.junit.jupiter.api.Assertions"
] | import java.util.Optional; import org.eso.ias.plugin.Sample; import org.eso.ias.plugin.filter.Filter; import org.eso.ias.plugin.filter.FilteredValue; import org.junit.jupiter.api.Assertions; | import java.util.*; import org.eso.ias.plugin.*; import org.eso.ias.plugin.filter.*; import org.junit.jupiter.api.*; | [
"java.util",
"org.eso.ias",
"org.junit.jupiter"
] | java.util; org.eso.ias; org.junit.jupiter; | 1,767,319 |
public synchronized Logger getLogger() {
if (m_Logger == null)
configureLogger();
return m_Logger;
} | synchronized Logger function() { if (m_Logger == null) configureLogger(); return m_Logger; } | /**
* Returns the logger in use.
*
* @return the logger
*/ | Returns the logger in use | getLogger | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/core/logging/LoggingObject.java",
"license": "gpl-3.0",
"size": 2874
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,103,017 |
public Adapter createMMCLEVDOMPackageFileAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link es.uah.aut.srg.micobs.mclev.mclevdom.MMCLEVDOMPackageFile <em>MMCLEVDOM Package File</em>}'.
* @return the new adapter.
* @see es.uah.aut.srg.micobs.mclev.mclevdom.MMCLEVDOMPackageFile
* @generated
*/ | Creates a new adapter for an object of class '<code>es.uah.aut.srg.micobs.mclev.mclevdom.MMCLEVDOMPackageFile MMCLEVDOM Package File</code>' | createMMCLEVDOMPackageFileAdapter | {
"repo_name": "parraman/micobs",
"path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevdom/util/mclevdomAdapterFactory.java",
"license": "epl-1.0",
"size": 27448
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,474,664 |
public ITabAdapter findAdapter(Tab tab){
ITabAdapter adapter=adapters.get(tab);
if(adapter==null){
adapter=buildAdapter(tab);
//The 'Score' tab has no adapter
if(adapter!=null) {
this.adapters.put(tab, adapter);
... | ITabAdapter function(Tab tab){ ITabAdapter adapter=adapters.get(tab); if(adapter==null){ adapter=buildAdapter(tab); if(adapter!=null) { this.adapters.put(tab, adapter); } } return adapter; } | /**
* Finds the right adapter according to the selected tab.
* Tabs are lazy trying to speed up the first load
* @param tab Tab whose adapter is searched.
* @return The right adapter to deal with that Tab
*/ | Finds the right adapter according to the selected tab. Tabs are lazy trying to speed up the first load | findAdapter | {
"repo_name": "RobbiNespu/malariapp",
"path": "app/src/main/java/org/eyeseetea/malariacare/SurveyActivity.java",
"license": "gpl-3.0",
"size": 22782
} | [
"org.eyeseetea.malariacare.database.model.Tab",
"org.eyeseetea.malariacare.layout.adapters.survey.ITabAdapter"
] | import org.eyeseetea.malariacare.database.model.Tab; import org.eyeseetea.malariacare.layout.adapters.survey.ITabAdapter; | import org.eyeseetea.malariacare.database.model.*; import org.eyeseetea.malariacare.layout.adapters.survey.*; | [
"org.eyeseetea.malariacare"
] | org.eyeseetea.malariacare; | 261,848 |
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullType() {
new ResolvableSecurityLink<>(IDS_1, null, LINK_RESOLVER);
} | @Test(expectedExceptions = IllegalArgumentException.class) void function() { new ResolvableSecurityLink<>(IDS_1, null, LINK_RESOLVER); } | /**
* Tests that the type cannot be null.
*/ | Tests that the type cannot be null | testNullType | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/test/java/com/opengamma/core/link/ResolvableSecurityLinkTest.java",
"license": "apache-2.0",
"size": 7679
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 539,730 |
public String[] extract(String text) {
if (text == null)
return null;
Matcher m = pattern.matcher(text);
if (!m.find())
return null;
String[] res = new String[groups.length];
for (int i = 0; i < groups.length; i++)
res[i] = m.group(groups... | String[] function(String text) { if (text == null) return null; Matcher m = pattern.matcher(text); if (!m.find()) return null; String[] res = new String[groups.length]; for (int i = 0; i < groups.length; i++) res[i] = m.group(groups[i]); return res; } | /**
* Extract all specified groups from the first regex match in a string.
*
* @param text The string to search
* @return All specified groups from the first match in a string, or null if none were found.
*/ | Extract all specified groups from the first regex match in a string | extract | {
"repo_name": "Kasekopf/kolandroid",
"path": "kol_base/src/main/java/com/github/kolandroid/kol/util/Regex.java",
"license": "mit",
"size": 4581
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 270,156 |
@SuppressWarnings("unchecked")
public Type to(@AsEndpointUri String uri) {
addOutput(new ToDefinition(uri));
return (Type) this;
} | @SuppressWarnings(STR) Type function(@AsEndpointUri String uri) { addOutput(new ToDefinition(uri)); return (Type) this; } | /**
* Sends the exchange to the given endpoint
*
* @param uri the endpoint to send to
* @return the builder
*/ | Sends the exchange to the given endpoint | to | {
"repo_name": "dmvolod/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 177777
} | [
"org.apache.camel.spi.AsEndpointUri"
] | import org.apache.camel.spi.AsEndpointUri; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,920,168 |
public void onDeletion(final SecurityContext securityContext, final ErrorBuffer errorBuffer, final PropertyMap properties) throws FrameworkException; | void function(final SecurityContext securityContext, final ErrorBuffer errorBuffer, final PropertyMap properties) throws FrameworkException; | /**
* Called when an entity of this type is deleted. This method can cause the underlying
* transaction to be rolled back in case of an error, either by throwing an exception,
* or by returning false.
*
* @param securityContext the context in which the deletion takes place
* @param errorBuffer the error buf... | Called when an entity of this type is deleted. This method can cause the underlying transaction to be rolled back in case of an error, either by throwing an exception, or by returning false | onDeletion | {
"repo_name": "structr/structr",
"path": "structr-core/src/main/java/org/structr/core/GraphObject.java",
"license": "gpl-3.0",
"size": 19791
} | [
"org.structr.common.SecurityContext",
"org.structr.common.error.ErrorBuffer",
"org.structr.common.error.FrameworkException",
"org.structr.core.property.PropertyMap"
] | import org.structr.common.SecurityContext; import org.structr.common.error.ErrorBuffer; import org.structr.common.error.FrameworkException; import org.structr.core.property.PropertyMap; | import org.structr.common.*; import org.structr.common.error.*; import org.structr.core.property.*; | [
"org.structr.common",
"org.structr.core"
] | org.structr.common; org.structr.core; | 1,897,705 |
public EAttribute getIdentifiedObject_MRID() {
return (EAttribute)getIdentifiedObject().getEStructuralFeatures().get(2);
} | EAttribute function() { return (EAttribute)getIdentifiedObject().getEStructuralFeatures().get(2); } | /**
* Returns the meta object for the attribute '{@link CIM15.IEC61970.Core.IdentifiedObject#getMRID <em>MRID</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>MRID</em>'.
* @see CIM15.IEC61970.Core.IdentifiedObject#getMRID()
* @see #getIdentifiedObje... | Returns the meta object for the attribute '<code>CIM15.IEC61970.Core.IdentifiedObject#getMRID MRID</code>'. | getIdentifiedObject_MRID | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/Core/CorePackage.java",
"license": "apache-2.0",
"size": 304427
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 507,349 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.