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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
EReference getChangeProperty_Value(); | EReference getChangeProperty_Value(); | /**
* Returns the meta object for the reference '{@link fr.obeo.dsl.game.ChangeProperty#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Value</em>'.
* @see fr.obeo.dsl.game.ChangeProperty#getValue()
* @see #getChangeProperty()
*... | Returns the meta object for the reference '<code>fr.obeo.dsl.game.ChangeProperty#getValue Value</code>'. | getChangeProperty_Value | {
"repo_name": "Obeo/Game-Designer",
"path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java",
"license": "epl-1.0",
"size": 149639
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,371,700 |
private long addLocation(String locationSetting, String cityName, double lat, double lon) {
long locationId;
Log.v(LOG_TAG, "inserting " + cityName + ", with coord: " + lat + ", " + lon);
// First, check if the location with this city name exists in the db
Cursor locationCursor = g... | long function(String locationSetting, String cityName, double lat, double lon) { long locationId; Log.v(LOG_TAG, STR + cityName + STR + lat + STR + lon); Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_URI, new String[]{LocationEntry._ID}, LocationEntry.COLUMN_LOCA... | /**
* Helper method to handle insertion of a new location in the weather database.
*
* @param locationSetting The location string used to request updates from the server.
* @param cityName A human-readable city name, e.g "Mountain View"
* @param lat the latitude of the city
* @param lon th... | Helper method to handle insertion of a new location in the weather database | addLocation | {
"repo_name": "alffore/Sunshine",
"path": "Sunshine/app/src/main/java/com/aafr/alfonso/sunshine/app/sync/SunshineSyncAdapter.java",
"license": "apache-2.0",
"size": 14812
} | [
"android.content.ContentUris",
"android.content.ContentValues",
"android.database.Cursor",
"android.net.Uri",
"android.util.Log",
"com.aafr.alfonso.sunshine.app.data.WeatherContract"
] | import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.util.Log; import com.aafr.alfonso.sunshine.app.data.WeatherContract; | import android.content.*; import android.database.*; import android.net.*; import android.util.*; import com.aafr.alfonso.sunshine.app.data.*; | [
"android.content",
"android.database",
"android.net",
"android.util",
"com.aafr.alfonso"
] | android.content; android.database; android.net; android.util; com.aafr.alfonso; | 2,489,904 |
private void doLoadFile() throws Exception {
loadFile(
this.getClass().getResource("sample-data.ttl")
.getFile(),
RDFFormat.TURTLE);
}
| void function() throws Exception { loadFile( this.getClass().getResource(STR) .getFile(), RDFFormat.TURTLE); } | /**
* Load the test data set.
*
* @throws Exception
*/ | Load the test data set | doLoadFile | {
"repo_name": "blazegraph/database",
"path": "bigdata-sails-test/src/test/java/com/bigdata/rdf/sail/webapp/TestBackupServlet.java",
"license": "gpl-2.0",
"size": 3708
} | [
"org.openrdf.rio.RDFFormat"
] | import org.openrdf.rio.RDFFormat; | import org.openrdf.rio.*; | [
"org.openrdf.rio"
] | org.openrdf.rio; | 1,028,450 |
//------------------------------------------------------------
public Set<Endpoint> getRelevantSources() {
Set<Endpoint> endpoints = new HashSet<Endpoint>();
for (List<StatementSource> sourceList : stmtToSources.values())
for (StatementSource source : sourceList)
endpoints.add( EndpointManager.getEndpoin... | Set<Endpoint> function() { Set<Endpoint> endpoints = new HashSet<Endpoint>(); for (List<StatementSource> sourceList : stmtToSources.values()) for (StatementSource source : sourceList) endpoints.add( EndpointManager.getEndpointManager().getEndpoint(source.getEndpointID())); return endpoints; } | /**
* Retrieve a set of relevant sources for this query.
* @return endpoints set of relevant sources
*/ | Retrieve a set of relevant sources for this query | getRelevantSources | {
"repo_name": "apotocki/fex",
"path": "src/main/java/org/aksw/simba/quetsal/core/HibiscusSourceSelection.java",
"license": "agpl-3.0",
"size": 43860
} | [
"com.fluidops.fedx.EndpointManager",
"com.fluidops.fedx.algebra.StatementSource",
"com.fluidops.fedx.structures.Endpoint",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import com.fluidops.fedx.EndpointManager; import com.fluidops.fedx.algebra.StatementSource; import com.fluidops.fedx.structures.Endpoint; import java.util.HashSet; import java.util.List; import java.util.Set; | import com.fluidops.fedx.*; import com.fluidops.fedx.algebra.*; import com.fluidops.fedx.structures.*; import java.util.*; | [
"com.fluidops.fedx",
"java.util"
] | com.fluidops.fedx; java.util; | 1,924,568 |
public void setSource(InputStream in) throws IOException {
m_File = (new File(System.getProperty("user.dir"))).getAbsolutePath();
m_sourceReader = new BufferedReader(new InputStreamReader(in));
} | void function(InputStream in) throws IOException { m_File = (new File(System.getProperty(STR))).getAbsolutePath(); m_sourceReader = new BufferedReader(new InputStreamReader(in)); } | /**
* Resets the Loader object and sets the source of the data set to be
* the supplied InputStream.
*
* @param in the source InputStream.
* @throws IOException always thrown.
*/ | Resets the Loader object and sets the source of the data set to be the supplied InputStream | setSource | {
"repo_name": "saikatgomes/CS784-Data_Integration",
"path": "EMS/Matching/src/main/java/com/walmart/productgenome/matching/models/loaders/TableLoaderTemp.java",
"license": "apache-2.0",
"size": 11322
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 2,062,359 |
void login(String events) throws IllegalStateException, IOException, AuthenticationFailedException, TimeoutException; | void login(String events) throws IllegalStateException, IOException, AuthenticationFailedException, TimeoutException; | /**
* Logs in to the Asterisk server with the username and password specified
* when this connection was created and a given event mask.
*
* @param events the event mask. Set to "on" if all events should be send,
* "off" if not events should be sent or a combination of
* ... | Logs in to the Asterisk server with the username and password specified when this connection was created and a given event mask | login | {
"repo_name": "pk1057/asterisk-java",
"path": "src/main/java/org/asteriskjava/manager/ManagerConnection.java",
"license": "apache-2.0",
"size": 18583
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,135,384 |
@OpMethod(op = net.imagej.ops.transform.permuteCoordinatesView.DefaultPermuteCoordinatesView.class)
public <T extends Type<T>> IntervalView<T> permuteCoordinates(
final RandomAccessibleInterval<T> input, final int... permutation)
{
return (IntervalView<T>) ops().run(DefaultPermuteCoordinatesView.class, input,
... | @OpMethod(op = net.imagej.ops.transform.permuteCoordinatesView.DefaultPermuteCoordinatesView.class) <T extends Type<T>> IntervalView<T> function( final RandomAccessibleInterval<T> input, final int... permutation) { return (IntervalView<T>) ops().run(DefaultPermuteCoordinatesView.class, input, permutation); } | /**
* Bijective permutation of the integer coordinates in each dimension of a
* {@link RandomAccessibleInterval}.
*
* @param source must be an <em>n</em>-dimensional hypercube with each
* dimension being of the same size as the permutation array
* @param permutation must be a bijective permutation ... | Bijective permutation of the integer coordinates in each dimension of a <code>RandomAccessibleInterval</code> | permuteCoordinates | {
"repo_name": "stelfrich/imagej-ops",
"path": "src/main/java/net/imagej/ops/transform/TransformNamespace.java",
"license": "bsd-2-clause",
"size": 40764
} | [
"net.imagej.ops.OpMethod",
"net.imagej.ops.transform.permuteCoordinatesView.DefaultPermuteCoordinatesView",
"net.imglib2.RandomAccessibleInterval",
"net.imglib2.type.Type",
"net.imglib2.view.IntervalView"
] | import net.imagej.ops.OpMethod; import net.imagej.ops.transform.permuteCoordinatesView.DefaultPermuteCoordinatesView; import net.imglib2.RandomAccessibleInterval; import net.imglib2.type.Type; import net.imglib2.view.IntervalView; | import net.imagej.ops.*; import net.imagej.ops.transform.*; import net.imglib2.*; import net.imglib2.type.*; import net.imglib2.view.*; | [
"net.imagej.ops",
"net.imglib2",
"net.imglib2.type",
"net.imglib2.view"
] | net.imagej.ops; net.imglib2; net.imglib2.type; net.imglib2.view; | 975,368 |
public int stat(int articleNumber) throws IOException
{
return sendCommand(NNTPCommand.STAT, Integer.toString(articleNumber));
} | int function(int articleNumber) throws IOException { return sendCommand(NNTPCommand.STAT, Integer.toString(articleNumber)); } | /***
* A convenience method to send the NNTP STAT command to the server,
* receive the initial reply, and return the reply code.
* <p>
* @param articleNumber The number of the article to request from the
* currently selected newsgroup.
* @return The reply code received... | A convenience method to send the NNTP STAT command to the server, receive the initial reply, and return the reply code. | stat | {
"repo_name": "ductt-neo/commons-net-ssh",
"path": "src/main/java/org/apache/commons/net/nntp/NNTP.java",
"license": "apache-2.0",
"size": 43219
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,476,236 |
public static Label getH2Label(Composite parentComposite, String textForLabel) {
return getLabel(parentComposite, textForLabel, FONT_SIZE_OF_H2_LABEL);
} | static Label function(Composite parentComposite, String textForLabel) { return getLabel(parentComposite, textForLabel, FONT_SIZE_OF_H2_LABEL); } | /** Returns a H2 label similar to the HTML H2 tag
* @param parentComposite the parent of the label
* @param textForLabel the text for the label
* @return a new label */ | Returns a H2 label similar to the HTML H2 tag | getH2Label | {
"repo_name": "jeromewagener/Sammelbox",
"path": "Sammelbox-Desktop/src/org/sammelbox/view/various/ComponentFactory.java",
"license": "gpl-3.0",
"size": 13347
} | [
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,046,928 |
public JdbcDialect getDialect() {
return dialect;
} | JdbcDialect function() { return dialect; } | /**
* Get database dialect.
*
* @return Database dialect.
*/ | Get database dialect | getDialect | {
"repo_name": "f7753/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreFactory.java",
"license": "apache-2.0",
"size": 14244
} | [
"org.apache.ignite.cache.store.jdbc.dialect.JdbcDialect"
] | import org.apache.ignite.cache.store.jdbc.dialect.JdbcDialect; | import org.apache.ignite.cache.store.jdbc.dialect.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 757,242 |
@Test
public final void testToBigIbanIsWrong() {
for (final IbanTestBean testBean : IbanTestCases.getToBigTestBeans()) {
super.validationTest(testBean, false,
"de.knightsoftnet.validators.shared.impl.SizeWithoutSeparatorsValidator");
}
} | final void function() { for (final IbanTestBean testBean : IbanTestCases.getToBigTestBeans()) { super.validationTest(testBean, false, STR); } } | /**
* iban with country which is not part of SEPA country list.
*/ | iban with country which is not part of SEPA country list | testToBigIbanIsWrong | {
"repo_name": "ManfredTremmel/mt-bean-validators",
"path": "src/test/java/de/knightsoftnet/validators/server/IbanTest.java",
"license": "apache-2.0",
"size": 2879
} | [
"de.knightsoftnet.validators.shared.beans.IbanTestBean",
"de.knightsoftnet.validators.shared.testcases.IbanTestCases"
] | import de.knightsoftnet.validators.shared.beans.IbanTestBean; import de.knightsoftnet.validators.shared.testcases.IbanTestCases; | import de.knightsoftnet.validators.shared.beans.*; import de.knightsoftnet.validators.shared.testcases.*; | [
"de.knightsoftnet.validators"
] | de.knightsoftnet.validators; | 521,783 |
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
// IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=utf-8");
... | void function(ConfigurableEmbeddedServletContainer container) { MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); mappings.add("html", MediaType.TEXT_HTML_VALUE + STR); mappings.add("json", MediaType.TEXT_HTML_VALUE + STR); container.setMimeMappings(mappings); setLocationForStaticAssets(container); if (jH... | /**
* Customize the Servlet engine: Mime types, the document root, the cache.
*/ | Customize the Servlet engine: Mime types, the document root, the cache | customize | {
"repo_name": "claudiu-stanciu/kylo",
"path": "install/install-inspector/src/main/java/com/thinkbiganalytics/install/inspector/config/WebConfigurer.java",
"license": "apache-2.0",
"size": 6789
} | [
"io.github.jhipster.config.JHipsterProperties",
"io.undertow.UndertowOptions",
"org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer",
"org.springframework.boot.context.embedded.MimeMappings",
"org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFacto... | import io.github.jhipster.config.JHipsterProperties; import io.undertow.UndertowOptions; import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; import org.springframework.boot.context.embedded.MimeMappings; import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServlet... | import io.github.jhipster.config.*; import io.undertow.*; import org.springframework.boot.context.embedded.*; import org.springframework.boot.context.embedded.undertow.*; import org.springframework.http.*; | [
"io.github.jhipster",
"io.undertow",
"org.springframework.boot",
"org.springframework.http"
] | io.github.jhipster; io.undertow; org.springframework.boot; org.springframework.http; | 2,254,984 |
void validateCacheSettings(Settings settings) {
boolean useContext = SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTING.get(settings).equals(USE_CONTEXT_RATE_VALUE);
List<Setting.AffixSetting<?>> affixes = List.of(SCRIPT_MAX_COMPILATIONS_RATE_SETTING, SCRIPT_CACHE_EXPIRE_SETTING,
... | void validateCacheSettings(Settings settings) { boolean useContext = SCRIPT_GENERAL_MAX_COMPILATIONS_RATE_SETTING.get(settings).equals(USE_CONTEXT_RATE_VALUE); List<Setting.AffixSetting<?>> affixes = List.of(SCRIPT_MAX_COMPILATIONS_RATE_SETTING, SCRIPT_CACHE_EXPIRE_SETTING, SCRIPT_CACHE_SIZE_SETTING); List<String> keys... | /**
* Throw an IllegalArgumentException if any per-context setting does not match a context or if per-context settings are configured
* when using the general cache.
*/ | Throw an IllegalArgumentException if any per-context setting does not match a context or if per-context settings are configured when using the general cache | validateCacheSettings | {
"repo_name": "HonzaKral/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/script/ScriptService.java",
"license": "apache-2.0",
"size": 33905
} | [
"java.util.ArrayList",
"java.util.List",
"org.elasticsearch.common.settings.Setting",
"org.elasticsearch.common.settings.Settings"
] | import java.util.ArrayList; import java.util.List; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Settings; | import java.util.*; import org.elasticsearch.common.settings.*; | [
"java.util",
"org.elasticsearch.common"
] | java.util; org.elasticsearch.common; | 78,003 |
public JsonWriter value(double value) throws IOException {
if (Double.isNaN(value) || Double.isInfinite(value)) {
throw new IllegalArgumentException("Numeric values must be finite, but was " + value);
}
writeDeferredName();
beforeValue(false);
sink.writeUtf8(Double.toString(value));
retu... | JsonWriter function(double value) throws IOException { if (Double.isNaN(value) Double.isInfinite(value)) { throw new IllegalArgumentException(STR + value); } writeDeferredName(); beforeValue(false); sink.writeUtf8(Double.toString(value)); return this; } | /**
* Encodes {@code value}.
*
* @param value a finite value. May not be {@link Double#isNaN() NaNs} or
* {@link Double#isInfinite() infinities}.
* @return this writer.
*/ | Encodes value | value | {
"repo_name": "maarcooliveira/498dm",
"path": "moshi/src/main/java/com/squareup/moshi/JsonWriter.java",
"license": "apache-2.0",
"size": 17402
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,898,775 |
@Override
protected void onPreExecute() {
super.onPreExecute();
pDialog = new ProgressDialog(VyberIcoActivitySD.this);
pDialog.setMessage(getString(R.string.prognewodbm));
pDialog.setIndeterminate(false);
pDialog.setCancelable(false);
... | void function() { super.onPreExecute(); pDialog = new ProgressDialog(VyberIcoActivitySD.this); pDialog.setMessage(getString(R.string.prognewodbm)); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); } | /**
* Before starting background thread Show Progress Dialog
* */ | Before starting background thread Show Progress Dialog | onPreExecute | {
"repo_name": "eurosecom/samfantozzi",
"path": "app/src/main/java/com/eusecom/samfantozzi/VyberIcoActivitySD.java",
"license": "apache-2.0",
"size": 28138
} | [
"android.app.ProgressDialog"
] | import android.app.ProgressDialog; | import android.app.*; | [
"android.app"
] | android.app; | 12,721 |
@Test
public void testUnitMultiplicationConversion(){
InstanceFactory factory = new CoreInstanceFactory();
try {
factory.addUnitAndScaleSet(CoreUnitAndScaleSet.class);
} catch (UnitOrScaleCreationException e) {
e.printStackTrace();
Assert.fail("Could n... | void function(){ InstanceFactory factory = new CoreInstanceFactory(); try { factory.addUnitAndScaleSet(CoreUnitAndScaleSet.class); } catch (UnitOrScaleCreationException e) { e.printStackTrace(); Assert.fail(STR + e); } try { Unit joule = CoreUnitAndScaleSet.JOULE; Unit kcal = CoreUnitAndScaleSet.KILOCALORIE; Measure m1... | /**
* Test for unit division conversion.
*/ | Test for unit division conversion | testUnitMultiplicationConversion | {
"repo_name": "dieudonne-willems/om-java-libs",
"path": "OM-java-conversion/src/test/java/nl/wur/fbr/om/conversion/UnitOrScaleConversionTest.java",
"license": "lgpl-3.0",
"size": 15236
} | [
"nl.wur.fbr.om.core.set.CoreUnitAndScaleSet",
"nl.wur.fbr.om.exceptions.ConversionException",
"nl.wur.fbr.om.exceptions.UnitOrScaleCreationException",
"nl.wur.fbr.om.factory.InstanceFactory",
"nl.wur.fbr.om.model.measures.Measure",
"nl.wur.fbr.om.model.units.Unit",
"org.junit.Assert"
] | import nl.wur.fbr.om.core.set.CoreUnitAndScaleSet; import nl.wur.fbr.om.exceptions.ConversionException; import nl.wur.fbr.om.exceptions.UnitOrScaleCreationException; import nl.wur.fbr.om.factory.InstanceFactory; import nl.wur.fbr.om.model.measures.Measure; import nl.wur.fbr.om.model.units.Unit; import org.junit.Assert; | import nl.wur.fbr.om.core.set.*; import nl.wur.fbr.om.exceptions.*; import nl.wur.fbr.om.factory.*; import nl.wur.fbr.om.model.measures.*; import nl.wur.fbr.om.model.units.*; import org.junit.*; | [
"nl.wur.fbr",
"org.junit"
] | nl.wur.fbr; org.junit; | 281,924 |
void saveImage( String parentPrefix,
FSDirectory.INode root,
DataOutputStream out ) throws IOException {
String fullName = "";
if( root.getParent() != null) {
fullName = parentPrefix + "/" + root.getLocalName();
new UTF8(fullName).write(out);
out.writeSh... | void saveImage( String parentPrefix, FSDirectory.INode root, DataOutputStream out ) throws IOException { String fullName = STR/" + root.getLocalName(); new UTF8(fullName).write(out); out.writeShort( root.getReplication() ); if( root.isDir() ) { out.writeInt(0); } else { int nrBlocks = root.getBlocks().length; out.write... | /**
* Save file tree image starting from the given root.
*/ | Save file tree image starting from the given root | saveImage | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.11.2/src/java/org/apache/hadoop/dfs/FSImage.java",
"license": "apache-2.0",
"size": 18598
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"java.util.Iterator",
"org.apache.hadoop.dfs.FSDirectory"
] | import java.io.DataOutputStream; import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.dfs.FSDirectory; | import java.io.*; import java.util.*; import org.apache.hadoop.dfs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 191,663 |
@Nullable
public ScopedRoleMembership delete() throws ClientException {
return send(HttpMethod.DELETE, null);
} | ScopedRoleMembership function() throws ClientException { return send(HttpMethod.DELETE, null); } | /**
* Delete this item from the service
* @return the resulting response if the service returns anything on deletion
*
* @throws ClientException if there was an exception during the delete operation
*/ | Delete this item from the service | delete | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/ScopedRoleMembershipRequest.java",
"license": "mit",
"size": 6213
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.ScopedRoleMembership"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.ScopedRoleMembership; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,759,209 |
protected void addSizePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CommunicationBuffer_size_feature"),
getString("_UI_PropertyDescriptor_... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), Allocation_modelPackage.Literals.COMMUNICATION_BUFFER__SIZE, true, false, false, ItemPropertyDesc... | /**
* This adds a property descriptor for the Size feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Size feature. | addSizePropertyDescriptor | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.edit/src/org/obeonetwork/dsl/east_adl/structure/allocation_model/provider/CommunicationBufferItemProvider.java",
"license": "epl-1.0",
"size": 7529
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,416,748 |
@Override
protected void onRestoreInstanceState(Parcelable parcel) {
final Bundle bundle = (Bundle) parcel;
super.onRestoreInstanceState(bundle.getParcelable("SUPER"));
normalizedMinValue = bundle.getDouble("MIN");
normalizedMaxValue = bundle.getDouble("MAX");
} | void function(Parcelable parcel) { final Bundle bundle = (Bundle) parcel; super.onRestoreInstanceState(bundle.getParcelable("SUPER")); normalizedMinValue = bundle.getDouble("MIN"); normalizedMaxValue = bundle.getDouble("MAX"); } | /**
* Overridden to restore instance state when device orientation changes. This method is called automatically if you assign an id to the RangeSeekBar widget using the {@link #setId(int)} method.
*/ | Overridden to restore instance state when device orientation changes. This method is called automatically if you assign an id to the RangeSeekBar widget using the <code>#setId(int)</code> method | onRestoreInstanceState | {
"repo_name": "tamselvan89/android-range-seek-bar",
"path": "rangeseekbar/src/main/java/org/florescu/android/rangeseekbar/RangeSeekBar.java",
"license": "apache-2.0",
"size": 31559
} | [
"android.os.Bundle",
"android.os.Parcelable"
] | import android.os.Bundle; import android.os.Parcelable; | import android.os.*; | [
"android.os"
] | android.os; | 972,540 |
public static java.util.List extractPatientComplaintList(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.PatientComplaintVoCollection voCollection)
{
return extractPatientComplaintList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.PatientComplaintVoCollection voCollection) { return extractPatientComplaintList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.clinical.domain.objects.PatientComplaint list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.clinical.domain.objects.PatientComplaint list from the value object collection | extractPatientComplaintList | {
"repo_name": "IMS-MAXIMS/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/PatientComplaintVoAssembler.java",
"license": "agpl-3.0",
"size": 16663
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 634,313 |
public static boolean isFieldValid(Spinner spinner){
String str = spinner.getSelectedItem().toString();
if (!str.equals(null)){
str = str.trim();
if(!str.equalsIgnoreCase("")){
return true;
}
}
return false;
} | static boolean function(Spinner spinner){ String str = spinner.getSelectedItem().toString(); if (!str.equals(null)){ str = str.trim(); if(!str.equalsIgnoreCase("")){ return true; } } return false; } | /**
* Gets text from a spinner, checks if it is valid, trims it, and if it is not = null,
* returns a boolean of true/ false
* @param spinner
* @return
*/ | Gets text from a spinner, checks if it is valid, trims it, and if it is not = null, returns a boolean of true/ false | isFieldValid | {
"repo_name": "PGMacDesign/PGMacUtilities",
"path": "library/src/main/java/com/pgmacdesign/pgmactips/utilities/TextFieldUtilities.java",
"license": "apache-2.0",
"size": 12966
} | [
"android.widget.Spinner"
] | import android.widget.Spinner; | import android.widget.*; | [
"android.widget"
] | android.widget; | 444,447 |
void rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P);
void rotmg(IComplexNDArray d1, IComplexNDArray d2, IComplexNDArray b1, IComplexNumber b2, IComplexNDArray P); | void rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P); void rotmg(IComplexNDArray d1, IComplexNDArray d2, IComplexNDArray b1, IComplexNumber b2, IComplexNDArray P); | /**
* computes the modified parameters for a Givens rotation.
* @param d1
* @param d2
* @param b1
* @param b2
* @param P
*/ | computes the modified parameters for a Givens rotation | rotmg | {
"repo_name": "GeorgeMe/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level1.java",
"license": "apache-2.0",
"size": 6438
} | [
"org.nd4j.linalg.api.complex.IComplexNDArray",
"org.nd4j.linalg.api.complex.IComplexNumber",
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.complex.IComplexNDArray; import org.nd4j.linalg.api.complex.IComplexNumber; import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.complex.*; import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,388,775 |
void create(final Events event, final String domain, final String username)
throws MessageQException; | void create(final Events event, final String domain, final String username) throws MessageQException; | /**
* Create a message for the provided username (<b>not</b> for the principal) in the specified white label domain
* <p/>
* A user is uniquely identified by the combination of domain and username.
*
* @param event The event to create a message for
* @param domain The white label doma... | Create a message for the provided username (not for the principal) in the specified white label domain A user is uniquely identified by the combination of domain and username | create | {
"repo_name": "mbeiter/jaas",
"path": "common/src/main/java/org/beiter/michael/authn/jaas/common/messageq/MessageQ.java",
"license": "bsd-3-clause",
"size": 4027
} | [
"org.beiter.michael.authn.jaas.common.Events"
] | import org.beiter.michael.authn.jaas.common.Events; | import org.beiter.michael.authn.jaas.common.*; | [
"org.beiter.michael"
] | org.beiter.michael; | 54,137 |
@Override
public Adapter createTransitionAdapter() {
if (transitionItemProvider == null) {
transitionItemProvider = new TransitionItemProvider(this);
}
return transitionItemProvider;
}
protected CommandItemProvider commandItemProvider; | Adapter function() { if (transitionItemProvider == null) { transitionItemProvider = new TransitionItemProvider(this); } return transitionItemProvider; } protected CommandItemProvider commandItemProvider; | /**
* This creates an adapter for a {@link org.xtext.example.statemachine.statemachine.Transition}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.xtext.example.statemachine.statemachine.Transition</code>. | createTransitionAdapter | {
"repo_name": "spoenemann/xtext-gef",
"path": "org.xtext.example.statemachine.edit/src/org/xtext/example/statemachine/statemachine/provider/StatemachineItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 12567
} | [
"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; | 2,177,717 |
@Override
public boolean isInPlotAbs(PlotWorld plotworld, Location loc, PlotId plotid) {
PlotId result = getPlotIdAbs(plotworld, loc);
if (result == null) {
return false;
}
return result == plotid;
} | boolean function(PlotWorld plotworld, Location loc, PlotId plotid) { PlotId result = getPlotIdAbs(plotworld, loc); if (result == null) { return false; } return result == plotid; } | /**
* Check if a location is inside a specific plot(non-Javadoc) - For this
* implementation, we don't need to do anything fancier than referring to
* getPlotIdAbs(...)
*/ | Check if a location is inside a specific plot(non-Javadoc) - For this implementation, we don't need to do anything fancier than referring to getPlotIdAbs(...) | isInPlotAbs | {
"repo_name": "boy0001/PlotSquared",
"path": "PlotSquared/src/com/intellectualcrafters/plot/generator/DefaultPlotManager.java",
"license": "gpl-3.0",
"size": 27434
} | [
"com.intellectualcrafters.plot.PlotId",
"com.intellectualcrafters.plot.PlotWorld",
"org.bukkit.Location"
] | import com.intellectualcrafters.plot.PlotId; import com.intellectualcrafters.plot.PlotWorld; import org.bukkit.Location; | import com.intellectualcrafters.plot.*; import org.bukkit.*; | [
"com.intellectualcrafters.plot",
"org.bukkit"
] | com.intellectualcrafters.plot; org.bukkit; | 1,042,336 |
public ExecutionPhase getPhase() {
return phase;
} | ExecutionPhase function() { return phase; } | /**
* Returns the phase kind for target job.
* @return the phase kind
*/ | Returns the phase kind for target job | getPhase | {
"repo_name": "akirakw/asakusafw",
"path": "yaess-project/asakusa-yaess-jobqueue/src/main/java/com/asakusafw/yaess/jobqueue/client/JobScript.java",
"license": "apache-2.0",
"size": 5359
} | [
"com.asakusafw.yaess.core.ExecutionPhase"
] | import com.asakusafw.yaess.core.ExecutionPhase; | import com.asakusafw.yaess.core.*; | [
"com.asakusafw.yaess"
] | com.asakusafw.yaess; | 2,281,388 |
private void broadcastAccountDelete(long accountId) {
Intent publishIntent = new Intent(SipManager.ACTION_SIP_ACCOUNT_DELETED);
publishIntent.putExtra(SipProfile.FIELD_ID, accountId);
getContext().sendBroadcast(publishIntent);
BackupWrapper.getInstance(getContext()).dataChanged();
... | void function(long accountId) { Intent publishIntent = new Intent(SipManager.ACTION_SIP_ACCOUNT_DELETED); publishIntent.putExtra(SipProfile.FIELD_ID, accountId); getContext().sendBroadcast(publishIntent); BackupWrapper.getInstance(getContext()).dataChanged(); } | /**
* Broadcast the fact that account config has been deleted
* @param accountId
*/ | Broadcast the fact that account config has been deleted | broadcastAccountDelete | {
"repo_name": "skadyrov/CSipSimple",
"path": "sipHome/src/main/java/com/csipsimple/db/DBProvider.java",
"license": "lgpl-3.0",
"size": 33964
} | [
"android.content.Intent",
"com.csipsimple.api.SipManager",
"com.csipsimple.api.SipProfile",
"com.csipsimple.utils.backup.BackupWrapper"
] | import android.content.Intent; import com.csipsimple.api.SipManager; import com.csipsimple.api.SipProfile; import com.csipsimple.utils.backup.BackupWrapper; | import android.content.*; import com.csipsimple.api.*; import com.csipsimple.utils.backup.*; | [
"android.content",
"com.csipsimple.api",
"com.csipsimple.utils"
] | android.content; com.csipsimple.api; com.csipsimple.utils; | 121,559 |
public Class<?> loadClass(ClassLoader cl, String className)
throws IOException; | Class<?> function(ClassLoader cl, String className) throws IOException; | /**
* loads a Class from a specified Classloader with given classname
*
* @param className
* @param cl
* @return matching Class
* @throws IOException
*/ | loads a Class from a specified Classloader with given classname | loadClass | {
"repo_name": "gpickin/Lucee",
"path": "loader/src/main/java/lucee/runtime/util/ClassUtil.java",
"license": "lgpl-2.1",
"size": 13006
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 494,866 |
@Test
public void testGetResultsFiles()
{
try
{
String wdBase = System.getProperty("user.dir") + "/test/resources/BatchRunner";
String wd = wdBase + "/ResultsFiles";
Field wdBaseField = AbstractBatchRunner.class.getDeclaredField("work... | void function() { try { String wdBase = System.getProperty(STR) + STR; String wd = wdBase + STR; Field wdBaseField = AbstractBatchRunner.class.getDeclaredField(STR); wdBaseField.setAccessible(true); wdBaseField.set(this.runner, wdBase); Field wdField = AbstractBatchRunner.class.getDeclaredField(STR); wdField.setAccessi... | /**
* Test method for {@link au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner#getResultsFiles()}.
*/ | Test method for <code>au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner#getResultsFiles()</code> | testGetResultsFiles | {
"repo_name": "jeking3/rig-client",
"path": "src/au/edu/uts/eng/remotelabs/rigclient/rig/control/tests/AbstractBatchRunnerTester.java",
"license": "bsd-3-clause",
"size": 31460
} | [
"au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner",
"java.lang.reflect.Field",
"java.lang.reflect.Method",
"java.util.List"
] | import au.edu.uts.eng.remotelabs.rigclient.rig.control.AbstractBatchRunner; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.List; | import au.edu.uts.eng.remotelabs.rigclient.rig.control.*; import java.lang.reflect.*; import java.util.*; | [
"au.edu.uts",
"java.lang",
"java.util"
] | au.edu.uts; java.lang; java.util; | 2,593,003 |
public DataType getDataType() {
String selected = this.dataType.getItemText(this.dataType.getSelectedIndex());
DataType[] allDataTypes = DataType.values();
DataType tempDataType = allDataTypes[0];
for (DataType dataType2 : allDataTypes) {
if (dataType2.name().equals(selected)) {
tempDataType = dataTyp... | DataType function() { String selected = this.dataType.getItemText(this.dataType.getSelectedIndex()); DataType[] allDataTypes = DataType.values(); DataType tempDataType = allDataTypes[0]; for (DataType dataType2 : allDataTypes) { if (dataType2.name().equals(selected)) { tempDataType = dataType2; break; } } return tempDa... | /**
* To get Data Type.
*
* @return DataType
*/ | To get Data Type | getDataType | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/view/fieldtype/EditFieldTypeView.java",
"license": "agpl-3.0",
"size": 20768
} | [
"com.ephesoft.dcma.core.common.DataType"
] | import com.ephesoft.dcma.core.common.DataType; | import com.ephesoft.dcma.core.common.*; | [
"com.ephesoft.dcma"
] | com.ephesoft.dcma; | 1,105,540 |
public void uninstallChooserPanel(JColorChooser chooser)
{
recentPalette = null;
mainPalette = null;
removeAll();
super.uninstallChooserPanel(chooser);
} | void function(JColorChooser chooser) { recentPalette = null; mainPalette = null; removeAll(); super.uninstallChooserPanel(chooser); } | /**
* This method removes the chooser panel from the JColorChooser.
*
* @param chooser The JColorChooser this panel is being removed from.
*/ | This method removes the chooser panel from the JColorChooser | uninstallChooserPanel | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java",
"license": "bsd-3-clause",
"size": 29539
} | [
"javax.swing.JColorChooser"
] | import javax.swing.JColorChooser; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,705,431 |
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected void fillFolderView(final File folder) {
final File file = new File(FileUtils.getCanonizePath(folder));
if (!file.exists()) {
Crouton.makeText(this, R.string.toast_folder_doesnt_exist,
Style.ALERT).show();
} else if (!file.isDirectory()) {
... | @TargetApi(Build.VERSION_CODES.HONEYCOMB) void function(final File folder) { final File file = new File(FileUtils.getCanonizePath(folder)); if (!file.exists()) { Crouton.makeText(this, R.string.toast_folder_doesnt_exist, Style.ALERT).show(); } else if (!file.isDirectory()) { Crouton.makeText(this, R.string.toast_folder... | /**
* Fills the files list with the specified folder
*
* @param file
* the file of the folder to display
*/ | Fills the files list with the specified folder | fillFolderView | {
"repo_name": "Moderbord/Droidforce-UserInterface",
"path": "androidLib/src/main/java/fr/xgouchet/androidlib/ui/activity/AbstractBrowsingActivity.java",
"license": "lgpl-2.1",
"size": 6668
} | [
"android.annotation.TargetApi",
"android.os.Build",
"de.neofonie.mobile.app.android.widget.crouton.Crouton",
"de.neofonie.mobile.app.android.widget.crouton.Style",
"fr.xgouchet.androidlib.data.FileUtils",
"java.io.File"
] | import android.annotation.TargetApi; import android.os.Build; import de.neofonie.mobile.app.android.widget.crouton.Crouton; import de.neofonie.mobile.app.android.widget.crouton.Style; import fr.xgouchet.androidlib.data.FileUtils; import java.io.File; | import android.annotation.*; import android.os.*; import de.neofonie.mobile.app.android.widget.crouton.*; import fr.xgouchet.androidlib.data.*; import java.io.*; | [
"android.annotation",
"android.os",
"de.neofonie.mobile",
"fr.xgouchet.androidlib",
"java.io"
] | android.annotation; android.os; de.neofonie.mobile; fr.xgouchet.androidlib; java.io; | 677,995 |
public SimpleTriggerBuilder withMisfireHandlingInstructionNowWithExistingCount() {
misfireInstruction = SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT;
return this;
} | SimpleTriggerBuilder function() { misfireInstruction = SimpleTrigger.MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT; return this; } | /**
* If the Trigger misfires, use the {@link SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT} instruction.
*
* @return the updated SimpleScheduleBuilder
* @see SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT
*/ | If the Trigger misfires, use the <code>SimpleTrigger#MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT</code> instruction | withMisfireHandlingInstructionNowWithExistingCount | {
"repo_name": "jkandasa/Sundial",
"path": "src/main/java/org/quartz/builders/SimpleTriggerBuilder.java",
"license": "apache-2.0",
"size": 7606
} | [
"org.quartz.triggers.SimpleTrigger"
] | import org.quartz.triggers.SimpleTrigger; | import org.quartz.triggers.*; | [
"org.quartz.triggers"
] | org.quartz.triggers; | 292,165 |
public List<InjectionTargetType<MessageDestinationRefType<T>>> getAllInjectionTarget()
{
List<InjectionTargetType<MessageDestinationRefType<T>>> list = new ArrayList<InjectionTargetType<MessageDestinationRefType<T>>>();
List<Node> nodeList = childNode.get("injection-target");
for(Node node: node... | List<InjectionTargetType<MessageDestinationRefType<T>>> function() { List<InjectionTargetType<MessageDestinationRefType<T>>> list = new ArrayList<InjectionTargetType<MessageDestinationRefType<T>>>(); List<Node> nodeList = childNode.get(STR); for(Node node: nodeList) { InjectionTargetType<MessageDestinationRefType<T>> t... | /**
* Returns all <code>injection-target</code> elements
* @return list of <code>injection-target</code>
*/ | Returns all <code>injection-target</code> elements | getAllInjectionTarget | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee5/MessageDestinationRefTypeImpl.java",
"license": "epl-1.0",
"size": 15255
} | [
"java.util.ArrayList",
"java.util.List",
"org.jboss.shrinkwrap.descriptor.api.javaee5.InjectionTargetType",
"org.jboss.shrinkwrap.descriptor.api.javaee5.MessageDestinationRefType",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import java.util.ArrayList; import java.util.List; import org.jboss.shrinkwrap.descriptor.api.javaee5.InjectionTargetType; import org.jboss.shrinkwrap.descriptor.api.javaee5.MessageDestinationRefType; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import java.util.*; import org.jboss.shrinkwrap.descriptor.api.javaee5.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"java.util",
"org.jboss.shrinkwrap"
] | java.util; org.jboss.shrinkwrap; | 1,681,908 |
public EmailAlias addEmailAlias(String email) {
URL url = EMAIL_ALIASES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST");
JsonObject requestJSON = new JsonObject()
.add("email", email);
... | EmailAlias function(String email) { URL url = EMAIL_ALIASES_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID()); BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "POST"); JsonObject requestJSON = new JsonObject() .add("email", email); request.setBody(requestJSON.toString()); BoxJSONResponse resp... | /**
* Adds a new email alias to this user's account.
* @param email the email address to add as an alias.
* @return the newly created email alias.
*/ | Adds a new email alias to this user's account | addEmailAlias | {
"repo_name": "gcurtis/box-java-sdk",
"path": "src/main/java/com/box/sdk/BoxUser.java",
"license": "apache-2.0",
"size": 36093
} | [
"com.eclipsesource.json.JsonObject"
] | import com.eclipsesource.json.JsonObject; | import com.eclipsesource.json.*; | [
"com.eclipsesource.json"
] | com.eclipsesource.json; | 439,916 |
protected void callGetPermissionsNPE(CodeSource cs, String msg)
throws TestException {
try {
policy.getPermissions(cs);
throw new TestException(Util.fail(msg, NOException, NPE));
} catch (NullPointerException npe) {
logger.log(Level.FINE, Util.pass(msg... | void function(CodeSource cs, String msg) throws TestException { try { policy.getPermissions(cs); throw new TestException(Util.fail(msg, NOException, NPE)); } catch (NullPointerException npe) { logger.log(Level.FINE, Util.pass(msg, npe)); } catch (TestException qae) { throw qae; } catch (Exception e) { throw new TestExc... | /**
* Call getPermissions() on PolicyFileProvider and verify that
* NullPointerException is thrown.
*
* @param cs the CodeSource or null.
* @param msg string to format log message.
*
* @throws TestException if failed
*
*/ | Call getPermissions() on PolicyFileProvider and verify that NullPointerException is thrown | callGetPermissionsNPE | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/test/spec/policyprovider/policyFileProvider/PolicyFileProviderTestBase.java",
"license": "apache-2.0",
"size": 28508
} | [
"com.sun.jini.qa.harness.TestException",
"com.sun.jini.test.spec.policyprovider.util.Util",
"java.security.CodeSource",
"java.util.logging.Level"
] | import com.sun.jini.qa.harness.TestException; import com.sun.jini.test.spec.policyprovider.util.Util; import java.security.CodeSource; import java.util.logging.Level; | import com.sun.jini.qa.harness.*; import com.sun.jini.test.spec.policyprovider.util.*; import java.security.*; import java.util.logging.*; | [
"com.sun.jini",
"java.security",
"java.util"
] | com.sun.jini; java.security; java.util; | 29,595 |
public Artifact getDeployedArtifact(ArtifactType type, Object artifactKey) {
Artifact artifact = null;
if (deployedArtifacts.get(type) != null) {
artifact = deployedArtifacts.get(type).get(artifactKey);
}
return artifact;
} | Artifact function(ArtifactType type, Object artifactKey) { Artifact artifact = null; if (deployedArtifacts.get(type) != null) { artifact = deployedArtifacts.get(type).get(artifactKey); } return artifact; } | /**
* This will return an artifact for given artifactkey and directory from
* currently deployed artifacts.
*
* @param type type of the artifact
* @param artifactKey key of an artifact is used to uniquely identify it self within a runtime
* @return the deployed artifact for given ke... | This will return an artifact for given artifactkey and directory from currently deployed artifacts | getDeployedArtifact | {
"repo_name": "Shakila/carbon-deployment",
"path": "components/org.wso2.carbon.deployment.engine/src/main/java/org/wso2/carbon/deployment/engine/internal/DeploymentEngine.java",
"license": "apache-2.0",
"size": 18276
} | [
"org.wso2.carbon.deployment.engine.Artifact",
"org.wso2.carbon.deployment.engine.ArtifactType"
] | import org.wso2.carbon.deployment.engine.Artifact; import org.wso2.carbon.deployment.engine.ArtifactType; | import org.wso2.carbon.deployment.engine.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 32,221 |
final Response response = PipelineResourceNerTest.RESOURCES.getJerseyTest().target(
"/v4/ner").queryParam("setting", "test").request("text/turtle;charset=utf-8").post(
Entity.entity("{\"content\":\"My favorite actress is: Natalie Portman. She is very "
+ "stunning.\"}", MediaType... | final Response response = PipelineResourceNerTest.RESOURCES.getJerseyTest().target( STR).queryParam(STR, "test").request(STR).post( Entity.entity("{\"content\":\"My favorite actress is: Natalie Portman. She is very STRstunning.\"}", MediaType.APPLICATION_JSON_TYPE)); final Model fileModel = ModelFactory.createDefaultMo... | /**
* Test the response returned by the
* {@link PipelineResource#ner(HttpServletRequest, String, String)} method with content.
*/ | Test the response returned by the <code>PipelineResource#ner(HttpServletRequest, String, String)</code> method with content | testNerResponseWithContent | {
"repo_name": "jplu/stanfordNLPRESTAPI",
"path": "src/test/java/fr/eurecom/stanfordnlprestapi/resources/PipelineResourceNerTest.java",
"license": "gpl-3.0",
"size": 8192
} | [
"java.nio.charset.Charset",
"java.nio.file.FileSystems",
"javax.ws.rs.client.Entity",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.apache.commons.io.IOUtils",
"org.apache.jena.rdf.model.Model",
"org.apache.jena.rdf.model.ModelFactory",
"org.apache.jena.riot.Lang",
"org.apache.je... | import java.nio.charset.Charset; import java.nio.file.FileSystems; import javax.ws.rs.client.Entity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.commons.io.IOUtils; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import org.apache.jena.ri... | import java.nio.charset.*; import java.nio.file.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.apache.commons.io.*; import org.apache.jena.rdf.model.*; import org.apache.jena.riot.*; import org.junit.*; | [
"java.nio",
"javax.ws",
"org.apache.commons",
"org.apache.jena",
"org.junit"
] | java.nio; javax.ws; org.apache.commons; org.apache.jena; org.junit; | 1,067,906 |
WithCreate withMetadata(String name, String value);
}
interface WithCreate extends WithMetadata, Creatable<BlobContainer> {
}
}
interface Update extends Appliable<BlobContainer>, UpdateStages.WithPublicAccess, UpdateStages.WithMetadata {
} | WithCreate withMetadata(String name, String value); } interface WithCreate extends WithMetadata, Creatable<BlobContainer> { } } interface Update extends Appliable<BlobContainer>, UpdateStages.WithPublicAccess, UpdateStages.WithMetadata { } | /**
* Specifies a singluar instance of metadata.
*
* @param name A name to associate with the container as metadata
* @param value A value to associate with the container as metadata
* @return the next definition stage
*/ | Specifies a singluar instance of metadata | withMetadata | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/models/BlobContainer.java",
"license": "mit",
"size": 7712
} | [
"com.azure.resourcemanager.resources.fluentcore.model.Appliable",
"com.azure.resourcemanager.resources.fluentcore.model.Creatable"
] | import com.azure.resourcemanager.resources.fluentcore.model.Appliable; import com.azure.resourcemanager.resources.fluentcore.model.Creatable; | import com.azure.resourcemanager.resources.fluentcore.model.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 639,437 |
PacManSprites sprites = new PacManSprites();
parser = new MapParser(new LevelFactory(sprites, new GhostFactory(
sprites)), new BoardFactory(sprites));
}
| PacManSprites sprites = new PacManSprites(); parser = new MapParser(new LevelFactory(sprites, new GhostFactory( sprites)), new BoardFactory(sprites)); } | /**
* Set up the map parser.
*/ | Set up the map parser | setUp | {
"repo_name": "francois03/jpacman-framework",
"path": "src/test/java/nl/tudelft/jpacman/npc/ghost/NavigationTest.java",
"license": "apache-2.0",
"size": 4669
} | [
"nl.tudelft.jpacman.board.BoardFactory",
"nl.tudelft.jpacman.level.LevelFactory",
"nl.tudelft.jpacman.level.MapParser",
"nl.tudelft.jpacman.sprite.PacManSprites"
] | import nl.tudelft.jpacman.board.BoardFactory; import nl.tudelft.jpacman.level.LevelFactory; import nl.tudelft.jpacman.level.MapParser; import nl.tudelft.jpacman.sprite.PacManSprites; | import nl.tudelft.jpacman.board.*; import nl.tudelft.jpacman.level.*; import nl.tudelft.jpacman.sprite.*; | [
"nl.tudelft.jpacman"
] | nl.tudelft.jpacman; | 1,992,752 |
public void setMaximumDate(Date maximumDate) {
if (maximumDate == null) {
throw new IllegalArgumentException("Null 'maximumDate' argument.");
}
// check the new maximum date relative to the current minimum date
Date minDate = getMinimumDate();
long minMillis... | void function(Date maximumDate) { if (maximumDate == null) { throw new IllegalArgumentException(STR); } Date minDate = getMinimumDate(); long minMillis = minDate.getTime(); long newMaxMillis = maximumDate.getTime(); if (minMillis >= newMaxMillis) { Date oldMax = getMaximumDate(); long length = oldMax.getTime() - minMil... | /**
* Sets the maximum date visible on the axis and sends an
* {@link AxisChangeEvent} to all registered listeners. If
* <code>maximumDate</code> is on or before the current minimum date for
* the axis, the minimum date will be shifted to preserve the current
* length of the axis.
*... | Sets the maximum date visible on the axis and sends an <code>AxisChangeEvent</code> to all registered listeners. If <code>maximumDate</code> is on or before the current minimum date for the axis, the minimum date will be shifted to preserve the current length of the axis | setMaximumDate | {
"repo_name": "integrated/jfreechart",
"path": "source/org/jfree/chart/axis/DateAxis.java",
"license": "lgpl-2.1",
"size": 74495
} | [
"java.util.Date",
"org.jfree.chart.event.AxisChangeEvent",
"org.jfree.data.time.DateRange"
] | import java.util.Date; import org.jfree.chart.event.AxisChangeEvent; import org.jfree.data.time.DateRange; | import java.util.*; import org.jfree.chart.event.*; import org.jfree.data.time.*; | [
"java.util",
"org.jfree.chart",
"org.jfree.data"
] | java.util; org.jfree.chart; org.jfree.data; | 1,184,363 |
protected void addTextEventListeners(BridgeContext ctx, NodeEventTarget e) {
if (childNodeRemovedEventListener == null) {
childNodeRemovedEventListener =
new DOMChildNodeRemovedEventListener();
}
if (subtreeModifiedEventListener == null) {
subtreeModif... | void function(BridgeContext ctx, NodeEventTarget e) { if (childNodeRemovedEventListener == null) { childNodeRemovedEventListener = new DOMChildNodeRemovedEventListener(); } if (subtreeModifiedEventListener == null) { subtreeModifiedEventListener = new DOMSubtreeModifiedEventListener(); } SVG12BridgeContext ctx12 = (SVG... | /**
* Adds the DOM listeners for this text bridge.
*/ | Adds the DOM listeners for this text bridge | addTextEventListeners | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/bridge/svg12/SVG12TextElementBridge.java",
"license": "apache-2.0",
"size": 7076
} | [
"org.apache.flex.forks.batik.bridge.BridgeContext",
"org.apache.flex.forks.batik.dom.AbstractNode",
"org.apache.flex.forks.batik.dom.events.NodeEventTarget",
"org.apache.flex.forks.batik.dom.svg12.XBLEventSupport",
"org.apache.flex.forks.batik.util.XMLConstants"
] | import org.apache.flex.forks.batik.bridge.BridgeContext; import org.apache.flex.forks.batik.dom.AbstractNode; import org.apache.flex.forks.batik.dom.events.NodeEventTarget; import org.apache.flex.forks.batik.dom.svg12.XBLEventSupport; import org.apache.flex.forks.batik.util.XMLConstants; | import org.apache.flex.forks.batik.bridge.*; import org.apache.flex.forks.batik.dom.*; import org.apache.flex.forks.batik.dom.events.*; import org.apache.flex.forks.batik.dom.svg12.*; import org.apache.flex.forks.batik.util.*; | [
"org.apache.flex"
] | org.apache.flex; | 1,740,342 |
public DcmElement putFD(int tag) {
return put(ValueElement.createFD(tag));
} | DcmElement function(int tag) { return put(ValueElement.createFD(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putFD | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/trunk/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86569
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 2,405,943 |
public void setMessageHandlerMethodFactory(MessageHandlerMethodFactory messageHandlerMethodFactory) {
this.messageHandlerMethodFactory.setMessageHandlerMethodFactory(messageHandlerMethodFactory);
} | void function(MessageHandlerMethodFactory messageHandlerMethodFactory) { this.messageHandlerMethodFactory.setMessageHandlerMethodFactory(messageHandlerMethodFactory); } | /**
* Set the {@link MessageHandlerMethodFactory} to use to configure the message
* listener responsible to serve an endpoint detected by this processor.
* <p>By default, {@link DefaultMessageHandlerMethodFactory} is used and it
* can be configured further to support additional method arguments
* or to custom... | Set the <code>MessageHandlerMethodFactory</code> to use to configure the message listener responsible to serve an endpoint detected by this processor. By default, <code>DefaultMessageHandlerMethodFactory</code> is used and it can be configured further to support additional method arguments or to customize conversion an... | setMessageHandlerMethodFactory | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/spring-jdk9/src/spring.jms/org/springframework/jms/annotation/JmsListenerAnnotationBeanPostProcessor.java",
"license": "mit",
"size": 13953
} | [
"org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory"
] | import org.springframework.messaging.handler.annotation.support.MessageHandlerMethodFactory; | import org.springframework.messaging.handler.annotation.support.*; | [
"org.springframework.messaging"
] | org.springframework.messaging; | 2,397,324 |
boolean shouldFlush() {
// This is a rough measure.
if (this.lastFlushSeqId > 0
&& (this.lastFlushSeqId + this.flushPerChanges < this.sequenceId.get())) {
return true;
}
if (flushCheckInterval <= 0) { //disabled
return false;
}
long now = EnvironmentEdgeManager.currentTim... | boolean shouldFlush() { if (this.lastFlushSeqId > 0 && (this.lastFlushSeqId + this.flushPerChanges < this.sequenceId.get())) { return true; } if (flushCheckInterval <= 0) { return false; } long now = EnvironmentEdgeManager.currentTime(); if ((now - getLastFlushTime() < flushCheckInterval)) { return false; } for (Store ... | /**
* Should the memstore be flushed now
*/ | Should the memstore be flushed now | shouldFlush | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 259731
} | [
"org.apache.hadoop.hbase.util.EnvironmentEdgeManager"
] | import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 469,417 |
private boolean getLoginStatus(@Nullable final String data) {
if (StringUtils.isBlank(data) || StringUtils.equals(data, "[]")) {
Log.e("ECLogin.getLoginStatus: No or empty data given");
return false;
}
final Application application = CgeoApplication.getInstance();
... | boolean function(@Nullable final String data) { if (StringUtils.isBlank(data) StringUtils.equals(data, "[]")) { Log.e(STR); return false; } final Application application = CgeoApplication.getInstance(); setActualStatus(application.getString(R.string.init_login_popup_ok)); try { final JsonNode json = JsonUtils.reader.re... | /**
* Check if the user has been logged in when he retrieved the data.
*
* @return {@code true} if user is logged in, {@code false} otherwise
*/ | Check if the user has been logged in when he retrieved the data | getLoginStatus | {
"repo_name": "tobiasge/cgeo",
"path": "main/src/cgeo/geocaching/connector/ec/ECLogin.java",
"license": "apache-2.0",
"size": 4422
} | [
"android.app.Application",
"androidx.annotation.Nullable",
"com.fasterxml.jackson.databind.JsonNode",
"java.io.IOException",
"org.apache.commons.lang3.StringUtils"
] | import android.app.Application; import androidx.annotation.Nullable; import com.fasterxml.jackson.databind.JsonNode; import java.io.IOException; import org.apache.commons.lang3.StringUtils; | import android.app.*; import androidx.annotation.*; import com.fasterxml.jackson.databind.*; import java.io.*; import org.apache.commons.lang3.*; | [
"android.app",
"androidx.annotation",
"com.fasterxml.jackson",
"java.io",
"org.apache.commons"
] | android.app; androidx.annotation; com.fasterxml.jackson; java.io; org.apache.commons; | 2,337,343 |
public Point2D forward(double lat, double lon, Point2D p, boolean isRadian) {
if (p == null) {
p = new Point2D.Double();
}
_forward(lat, lon, p, isRadian);
return p;
} | Point2D function(double lat, double lon, Point2D p, boolean isRadian) { if (p == null) { p = new Point2D.Double(); } _forward(lat, lon, p, isRadian); return p; } | /**
* Forward projects lat,lon into XY space and sets the results in the p
* provided.
* <p>
*
* @return Point2D p
* @param lat latitude
* @param lon longitude
* @param p Resulting XY Point2D
* @param isRadian indicates that lat,lon arguments are in radians
*/ | Forward projects lat,lon into XY space and sets the results in the p provided. | forward | {
"repo_name": "d2fn/passage",
"path": "src/main/java/com/bbn/openmap/proj/LambertConformal.java",
"license": "mit",
"size": 32594
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,733,639 |
super.initBinder(request, binder);
binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true));
}
| super.initBinder(request, binder); binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); } | /**
* Allows for Integers to be used as values in input tags. Normally, only strings and lists are
* expected
*
* @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest,
* org.springframework.web.bind.ServletRequestDataBinder)
*/ | Allows for Integers to be used as values in input tags. Normally, only strings and lists are expected | initBinder | {
"repo_name": "sintjuri/openmrs-core",
"path": "web/src/main/java/org/openmrs/web/controller/user/PrivilegeListController.java",
"license": "mpl-2.0",
"size": 5756
} | [
"org.springframework.beans.propertyeditors.CustomNumberEditor"
] | import org.springframework.beans.propertyeditors.CustomNumberEditor; | import org.springframework.beans.propertyeditors.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 1,784,760 |
protected void assertModelNotEmpty() throws RepositoryException {
Assert.assertFalse(
"The model is expected to be empty." + getFailedExtractionMessage(),
conn.isEmpty()
);
} | void function() throws RepositoryException { Assert.assertFalse( STR + getFailedExtractionMessage(), conn.isEmpty() ); } | /**
* Asserts that the model contains at least a statement.
*
* @throws RepositoryException
*/ | Asserts that the model contains at least a statement | assertModelNotEmpty | {
"repo_name": "venukb/any23",
"path": "any23-core/src/test/java/org/deri/any23/extractor/html/AbstractExtractorTestCase.java",
"license": "apache-2.0",
"size": 22853
} | [
"org.junit.Assert",
"org.openrdf.repository.RepositoryException"
] | import org.junit.Assert; import org.openrdf.repository.RepositoryException; | import org.junit.*; import org.openrdf.repository.*; | [
"org.junit",
"org.openrdf.repository"
] | org.junit; org.openrdf.repository; | 274,392 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ScheduleInner> listByAutomationAccount(
String resourceGroupName, String automationAccountName, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ScheduleInner> listByAutomationAccount( String resourceGroupName, String automationAccountName, Context context); | /**
* Retrieve a list of schedules.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail t... | Retrieve a list of schedules | listByAutomationAccount | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/fluent/SchedulesClient.java",
"license": "mit",
"size": 9401
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.automation.fluent.models.ScheduleInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.automation.fluent.models.ScheduleInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.automation.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 468,487 |
@Test
public void testGetAllForEntityWithInvalidId() {
List<permissions> result = dao.getAllForEntity(Guid.NewGuid());
assertInvalidGetPermissionList(result);
} | void function() { List<permissions> result = dao.getAllForEntity(Guid.NewGuid()); assertInvalidGetPermissionList(result); } | /**
* Ensures that an empty collection is returned.
*/ | Ensures that an empty collection is returned | testGetAllForEntityWithInvalidId | {
"repo_name": "derekhiggins/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/PermissionDAOTest.java",
"license": "apache-2.0",
"size": 18921
} | [
"java.util.List",
"org.ovirt.engine.core.compat.Guid"
] | import java.util.List; import org.ovirt.engine.core.compat.Guid; | import java.util.*; import org.ovirt.engine.core.compat.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 1,014,045 |
public void setKillFlag() {
noKillFlag = false;
parentPanel.setBackground(Color.red);
} // end setKillFlag | void function() { noKillFlag = false; parentPanel.setBackground(Color.red); } | /**
* Set the Kill flag and panel color appropriately
*/ | Set the Kill flag and panel color appropriately | setKillFlag | {
"repo_name": "glorydkim/ShippingProject",
"path": "Java Files/job.java",
"license": "apache-2.0",
"size": 18681
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 845,575 |
private String extractSlcsResponse(HttpServletRequest request)
throws GeneralSecurityException, IOException {
String responseXML = null;
String certReqDataHex = request.getParameter("CertificateRequestData");
String sessionKeyHex = request.getParameter("SessionKey");
if (... | String function(HttpServletRequest request) throws GeneralSecurityException, IOException { String responseXML = null; String certReqDataHex = request.getParameter(STR); String sessionKeyHex = request.getParameter(STR); if (certReqDataHex == null sessionKeyHex == null) { logger.error(STR); } else { FileInputStream in = ... | /**
* Extracts and decrypts the XML response received from the SLCS server
*/ | Extracts and decrypts the XML response received from the SLCS server | extractSlcsResponse | {
"repo_name": "AuScope/CMAR-Portal",
"path": "src/main/java/org/auscope/portal/server/web/controllers/GridLoginController.java",
"license": "gpl-3.0",
"size": 13726
} | [
"java.io.ByteArrayInputStream",
"java.io.FileInputStream",
"java.io.IOException",
"java.security.GeneralSecurityException",
"java.security.Key",
"javax.crypto.Cipher",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.ssl.PKCS8Key"
] | import java.io.ByteArrayInputStream; import java.io.FileInputStream; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.Key; import javax.crypto.Cipher; import javax.servlet.http.HttpServletRequest; import org.apache.commons.ssl.PKCS8Key; | import java.io.*; import java.security.*; import javax.crypto.*; import javax.servlet.http.*; import org.apache.commons.ssl.*; | [
"java.io",
"java.security",
"javax.crypto",
"javax.servlet",
"org.apache.commons"
] | java.io; java.security; javax.crypto; javax.servlet; org.apache.commons; | 1,855,466 |
void setSk(SelectionKey to); | void setSk(SelectionKey to); | /**
* Set the selection key for this node.
*/ | Set the selection key for this node | setSk | {
"repo_name": "wskplho/arcus-java-client",
"path": "src/main/java/net/spy/memcached/MemcachedNode.java",
"license": "apache-2.0",
"size": 5315
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 1,932,281 |
Map<String, Boolean> add(String namespace, Collection<CacheStore<byte []>> stores, @Nullable CacheStatistics cacheStatistics); | Map<String, Boolean> add(String namespace, Collection<CacheStore<byte []>> stores, @Nullable CacheStatistics cacheStatistics); | /**
* Try to add a collection of keys and corresponding values. Returns a map of boolean, true means that the operation was successful.
*
* This is an optional operation.
*/ | Try to add a collection of keys and corresponding values. Returns a map of boolean, true means that the operation was successful. This is an optional operation | add | {
"repo_name": "NessComputing/components-ness-cache",
"path": "src/main/java/com/nesscomputing/cache/InternalCacheProvider.java",
"license": "apache-2.0",
"size": 1707
} | [
"java.util.Collection",
"java.util.Map",
"javax.annotation.Nullable"
] | import java.util.Collection; import java.util.Map; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 2,078,831 |
public File putImage( BufferedImage image, String studyUID, String seriesUID, String instanceUID, String suffix) throws IOException {
File file = this._getImageFile( defaultSubdir, studyUID, seriesUID, instanceUID, suffix, null );
_writeImageFile( image, file);
return file;
} | File function( BufferedImage image, String studyUID, String seriesUID, String instanceUID, String suffix) throws IOException { File file = this._getImageFile( defaultSubdir, studyUID, seriesUID, instanceUID, suffix, null ); _writeImageFile( image, file); return file; } | /**
* Put an image as BufferedImage to the cache.
* <p>
* Stores the image on the default path of this cache.
*
* @param image The image as BufferedImage.
* @param studyUID Unique identifier of the study.
* @param seriesUID Unique identifier of the series.
* @param instanceUID Unique identifier of ... | Put an image as BufferedImage to the cache. Stores the image on the default path of this cache | putImage | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_10_9/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/WADOCacheImpl.java",
"license": "apache-2.0",
"size": 25588
} | [
"java.awt.image.BufferedImage",
"java.io.File",
"java.io.IOException"
] | import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; | import java.awt.image.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 1,719,188 |
public static void decodeBase64ToStream(final String inString, final OutputStream out) throws IOException {
Base64InputStream in = null;
try {
in = new Base64InputStream(new ByteArrayInputStream(inString.getBytes(StandardCharsets.US_ASCII)), Base64.DEFAULT);
IOUtils.copy(in, ... | static void function(final String inString, final OutputStream out) throws IOException { Base64InputStream in = null; try { in = new Base64InputStream(new ByteArrayInputStream(inString.getBytes(StandardCharsets.US_ASCII)), Base64.DEFAULT); IOUtils.copy(in, out); } finally { IOUtils.closeQuietly(in); } } | /**
* Decode a base64-encoded string and save the result into a stream.
*
* @param inString
* the encoded string
* @param out
* the stream to save the decoded result into
*/ | Decode a base64-encoded string and save the result into a stream | decodeBase64ToStream | {
"repo_name": "auricgoldfinger/cgeo",
"path": "main/src/cgeo/geocaching/utils/ImageUtils.java",
"license": "apache-2.0",
"size": 25663
} | [
"android.util.Base64",
"android.util.Base64InputStream",
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.OutputStream",
"java.nio.charset.StandardCharsets",
"org.apache.commons.io.IOUtils"
] | import android.util.Base64; import android.util.Base64InputStream; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import org.apache.commons.io.IOUtils; | import android.util.*; import java.io.*; import java.nio.charset.*; import org.apache.commons.io.*; | [
"android.util",
"java.io",
"java.nio",
"org.apache.commons"
] | android.util; java.io; java.nio; org.apache.commons; | 2,252,466 |
private void setGlobalThreshold() {
try {
String sGlobalThreshold = PropertyAccessor.getInstance().getProperty(GATEWAY_PROPERTY_FILE,
DEFERRED_QUEUE_GLOBAL_THRESHOLD);
if ((sGlobalThreshold != null) && (sGlobalThreshold.length() > 0)) {
iGlobalThr... | void function() { try { String sGlobalThreshold = PropertyAccessor.getInstance().getProperty(GATEWAY_PROPERTY_FILE, DEFERRED_QUEUE_GLOBAL_THRESHOLD); if ((sGlobalThreshold != null) && (sGlobalThreshold.length() > 0)) { iGlobalThreshold = Integer.parseInt(sGlobalThreshold); } } catch (PropertyAccessException e) { String... | /**
* Set the global threshold gateway property
*/ | Set the global threshold gateway property | setGlobalThreshold | {
"repo_name": "beiyuxinke/CONNECT",
"path": "Product/Production/Adapters/General/CONNECTAdapterWeb/src/main/java/gov/hhs/fha/nhinc/adapter/deferred/queue/DeferredQueueManagerHelper.java",
"license": "bsd-3-clause",
"size": 21694
} | [
"gov.hhs.fha.nhinc.properties.PropertyAccessException",
"gov.hhs.fha.nhinc.properties.PropertyAccessor"
] | import gov.hhs.fha.nhinc.properties.PropertyAccessException; import gov.hhs.fha.nhinc.properties.PropertyAccessor; | import gov.hhs.fha.nhinc.properties.*; | [
"gov.hhs.fha"
] | gov.hhs.fha; | 568,138 |
@Override
public Calendar getValue()
{
return dateValue;
} | Calendar function() { return dateValue; } | /**
* return the property value
*
* @return boolean
*/ | return the property value | getValue | {
"repo_name": "ZhenyaM/veraPDF-pdfbox",
"path": "xmpbox/src/main/java/org/apache/xmpbox/type/DateType.java",
"license": "apache-2.0",
"size": 4303
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,548,189 |
byte[] sign( Key key, byte[] signature ) throws JwtSignatureException;
| byte[] sign( Key key, byte[] signature ) throws JwtSignatureException; | /**
* Signs the given signature bytes and returns the encoded digest.
* <p>
* See {@link #validate(Key, byte[], byte[])} as for why this method uses Key as type for the key parameter.
*
* @param key The key to be used to sign the signature
* @param signature The signature to be verified
*
* @retur... | Signs the given signature bytes and returns the encoded digest. See <code>#validate(Key, byte[], byte[])</code> as for why this method uses Key as type for the key parameter | sign | {
"repo_name": "GoMint/Proxy",
"path": "src/main/java/io/gomint/proxy/jwt/JwtSignature.java",
"license": "bsd-3-clause",
"size": 1749
} | [
"java.security.Key"
] | import java.security.Key; | import java.security.*; | [
"java.security"
] | java.security; | 1,581,621 |
public void mouseReleased(MouseEvent e)
{
launchOptions((Component) e.getSource(), e.getPoint(),
MetadataViewer.PUBLISHING_OPTION);
}
});
analysisButton = new JButton(icons.getIcon(IconManager.ANALYSIS));
analysisButton.setToolTipText("Display the analysis options.");
analysisButton.setE... | void function(MouseEvent e) { launchOptions((Component) e.getSource(), e.getPoint(), MetadataViewer.PUBLISHING_OPTION); } }); analysisButton = new JButton(icons.getIcon(IconManager.ANALYSIS)); analysisButton.setToolTipText(STR); analysisButton.setEnabled(false); analysisButton.setBackground(UIUtilities.BACKGROUND_COLOR... | /**
* Launches the dialog when the user releases the mouse.
* MouseAdapter#mouseReleased(MouseEvent)
*/ | Launches the dialog when the user releases the mouse. MouseAdapter#mouseReleased(MouseEvent) | mouseReleased | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/ToolBar.java",
"license": "gpl-2.0",
"size": 29272
} | [
"java.awt.Component",
"java.awt.event.MouseAdapter",
"java.awt.event.MouseEvent",
"javax.swing.JButton",
"org.openmicroscopy.shoola.agents.metadata.IconManager",
"org.openmicroscopy.shoola.agents.metadata.view.MetadataViewer",
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import java.awt.Component; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JButton; import org.openmicroscopy.shoola.agents.metadata.IconManager; import org.openmicroscopy.shoola.agents.metadata.view.MetadataViewer; import org.openmicroscopy.shoola.util.ui.UIUtilities; | import java.awt.*; import java.awt.event.*; import javax.swing.*; import org.openmicroscopy.shoola.agents.metadata.*; import org.openmicroscopy.shoola.agents.metadata.view.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.awt",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.awt; javax.swing; org.openmicroscopy.shoola; | 1,816,187 |
public void testGetType_movieVideos() {
String type = mContext.getContentResolver().getType(
CachedMovieEntry.buildMovieVideosUri(1));
Assert.assertEquals(
"The content type for the URI of a movie's videos must be of type directory"
, CachedMovieVideoE... | void function() { String type = mContext.getContentResolver().getType( CachedMovieEntry.buildMovieVideosUri(1)); Assert.assertEquals( STR , CachedMovieVideoEntry.CONTENT_TYPE, type); } | /**
* Verifies that {@link MovieProvider#getType(Uri)} works properly.
* Case for the URI that identifies the videos related to a particular movie.
*/ | Verifies that <code>MovieProvider#getType(Uri)</code> works properly. Case for the URI that identifies the videos related to a particular movie | testGetType_movieVideos | {
"repo_name": "adolfogp/PopularMovies",
"path": "app/src/androidTest/java/mx/com/adolfogarcia/popularmovies/data/MovieProviderTest.java",
"license": "apache-2.0",
"size": 33598
} | [
"junit.framework.Assert",
"mx.com.adolfogarcia.popularmovies.data.MovieContract"
] | import junit.framework.Assert; import mx.com.adolfogarcia.popularmovies.data.MovieContract; | import junit.framework.*; import mx.com.adolfogarcia.popularmovies.data.*; | [
"junit.framework",
"mx.com.adolfogarcia"
] | junit.framework; mx.com.adolfogarcia; | 1,106,406 |
List<BatchEntity> getAllBatches(); | List<BatchEntity> getAllBatches(); | /**
* Loads all batches from DB.
*
*/ | Loads all batches from DB | getAllBatches | {
"repo_name": "vjuranek/scias-server",
"path": "malaria/malaria-server/src/main/java/eu/imagecode/scias/service/BatchService.java",
"license": "gpl-3.0",
"size": 1544
} | [
"eu.imagecode.scias.model.jpa.BatchEntity",
"java.util.List"
] | import eu.imagecode.scias.model.jpa.BatchEntity; import java.util.List; | import eu.imagecode.scias.model.jpa.*; import java.util.*; | [
"eu.imagecode.scias",
"java.util"
] | eu.imagecode.scias; java.util; | 2,826,904 |
public void show() {
JLabel label = new JLabel(new ImageIcon(this.image));
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(label);
f.pack();
f.setVisible(true);
}
private static final byte IHDR[] = {7... | void function() { JLabel label = new JLabel(new ImageIcon(this.image)); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(label); f.pack(); f.setVisible(true); } private static final byte IHDR[] = {73, 72, 68, 82}; private static final byte IDAT[] = {73, 68, 65, 84}; priv... | /**
* show the image as JFrame on desktop
*/ | show the image as JFrame on desktop | show | {
"repo_name": "fazeem84/susi_server",
"path": "src/ai/susi/graphics/RasterPlotter.java",
"license": "lgpl-2.1",
"size": 46600
} | [
"javax.swing.ImageIcon",
"javax.swing.JFrame",
"javax.swing.JLabel"
] | import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 68,508 |
public File getFsImageName() throws IOException {
return getFSImage().getFsImageName();
} | File function() throws IOException { return getFSImage().getFsImageName(); } | /**
* Returns the name of the fsImage file
*/ | Returns the name of the fsImage file | getFsImageName | {
"repo_name": "cumulusyebl/cumulus",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 59987
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 207,158 |
public static void main(String args[])
{
JFrame frame = new JFrame("Color JList");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ColorJListPanel());
frame.setPreferredSize(new Dimension(500, 400));
frame.pack();
frame.setVisible(true);
} | static void function(String args[]) { JFrame frame = new JFrame(STR); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new ColorJListPanel()); frame.setPreferredSize(new Dimension(500, 400)); frame.pack(); frame.setVisible(true); } | /**
* Creates a JFrame and adds the main JPanel to the JFrame.
* @param args (unused)
*/ | Creates a JFrame and adds the main JPanel to the JFrame | main | {
"repo_name": "BoiseState/CS121-resources",
"path": "examples/chap06/ColorJList.java",
"license": "mit",
"size": 554
} | [
"java.awt.Dimension",
"javax.swing.JFrame"
] | import java.awt.Dimension; import javax.swing.JFrame; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 858,707 |
EClass getSubpkg2Class1(); | EClass getSubpkg2Class1(); | /**
* Returns the meta object for class '{@link toppkg.subpkg2.Subpkg2Class1 <em>Class1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Class1</em>'.
* @see toppkg.subpkg2.Subpkg2Class1
* @generated
*/ | Returns the meta object for class '<code>toppkg.subpkg2.Subpkg2Class1 Class1</code>'. | getSubpkg2Class1 | {
"repo_name": "diverse-project/melange",
"path": "tests/samples/fr.inria.diverse.melange.tests.multipkgs.model/src/toppkg/subpkg2/Subpkg2Package.java",
"license": "epl-1.0",
"size": 6573
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,830,128 |
private void visitAssign(NodeTraversal t, Node assign) {
JSDocInfo info = assign.getJSDocInfo();
Node lvalue = assign.getFirstChild();
Node rvalue = assign.getLastChild();
// Check property sets to 'object.property' when 'object' is known.
if (lvalue.isGetProp()) {
Node object = lvalue.getF... | void function(NodeTraversal t, Node assign) { JSDocInfo info = assign.getJSDocInfo(); Node lvalue = assign.getFirstChild(); Node rvalue = assign.getLastChild(); if (lvalue.isGetProp()) { Node object = lvalue.getFirstChild(); JSType objectJsType = getJSType(object); Node property = lvalue.getLastChild(); String pname = ... | /**
* Visits an assignment <code>lvalue = rvalue</code>. If the
* <code>lvalue</code> is a prototype modification, we change the schema
* of the object type it is referring to.
* @param t the traversal
* @param assign the assign node
* (<code>assign.isAssign()</code> is an implicit invariant)
*/ | Visits an assignment <code>lvalue = rvalue</code>. If the <code>lvalue</code> is a prototype modification, we change the schema of the object type it is referring to | visitAssign | {
"repo_name": "Medium/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypeCheck.java",
"license": "apache-2.0",
"size": 79716
} | [
"com.google.javascript.rhino.JSDocInfo",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.JSType",
"com.google.javascript.rhino.jstype.ObjectType"
] | import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.ObjectType; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,271,887 |
EList<ScheduledEvent> getScheduledEvents(); | EList<ScheduledEvent> getScheduledEvents(); | /**
* Returns the value of the '<em><b>Scheduled Events</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61970.Informative.InfCommon.ScheduledEvent}.
* It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.InfCommon.ScheduledEvent#getAssets <em>Assets</em>}'.
* <!-- beg... | Returns the value of the 'Scheduled Events' reference list. The list contents are of type <code>CIM.IEC61970.Informative.InfCommon.ScheduledEvent</code>. It is bidirectional and its opposite is '<code>CIM.IEC61970.Informative.InfCommon.ScheduledEvent#getAssets Assets</code>'. If the meaning of the 'Scheduled Events' re... | getScheduledEvents | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Assets/Asset.java",
"license": "mit",
"size": 47966
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,846,440 |
public String getResponseString(ClientResponse response) throws Exception {
if (debug)
LOGGER.log(Level.INFO, "status: " + response.getStatus());
String responseText = response.getEntity(String.class);
if (response.getStatus() != 200) {
String msg="status " + response.getStatus() + ":'" + resp... | String function(ClientResponse response) throws Exception { if (debug) LOGGER.log(Level.INFO, STR + response.getStatus()); String responseText = response.getEntity(String.class); if (response.getStatus() != 200) { String msg=STR + response.getStatus() + ":'" + responseText + "'"; handleError(msg); responseText=msg+resp... | /**
* get the Response string
*
* @param response
* @return the String representation of a response
* @throws Exception
*/ | get the Response string | getResponseString | {
"repo_name": "WolfgangFahl/Mediawiki-Japi",
"path": "src/main/java/com/bitplan/mediawiki/japi/Mediawiki.java",
"license": "apache-2.0",
"size": 47270
} | [
"com.sun.jersey.api.client.ClientResponse",
"java.util.logging.Level"
] | import com.sun.jersey.api.client.ClientResponse; import java.util.logging.Level; | import com.sun.jersey.api.client.*; import java.util.logging.*; | [
"com.sun.jersey",
"java.util"
] | com.sun.jersey; java.util; | 1,143,807 |
@Test
public void testXmlSchema() throws Exception {
boolean allValid = true;
List<String> ruleSetFileNames = getRuleSetFileNames();
for (String fileName : ruleSetFileNames) {
boolean valid = validateAgainstSchema(fileName);
allValid = allValid && valid;
}... | void function() throws Exception { boolean allValid = true; List<String> ruleSetFileNames = getRuleSetFileNames(); for (String fileName : ruleSetFileNames) { boolean valid = validateAgainstSchema(fileName); allValid = allValid && valid; } assertTrue(STR, allValid); } | /**
* Verifies that all rulesets are valid XML according to the xsd schema.
* @throws Exception any error
*/ | Verifies that all rulesets are valid XML according to the xsd schema | testXmlSchema | {
"repo_name": "byronka/xenos",
"path": "utils/pmd-bin-5.2.2/src/pmd-test/src/main/java/net/sourceforge/pmd/AbstractRuleSetFactoryTest.java",
"license": "mit",
"size": 25555
} | [
"java.util.List",
"org.junit.Assert"
] | import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,246,831 |
@Test public void testSetCopyrightURL() {
final ContentBranding chunk = createChunk(0, BigInteger.ZERO);
Assert.assertTrue(chunk.isEmpty());
Assert.assertEquals("", chunk.getCopyRightURL());
chunk.setCopyRightURL("copyright url");
Assert.assertEquals("copyright url", chunk.ge... | @Test void function() { final ContentBranding chunk = createChunk(0, BigInteger.ZERO); Assert.assertTrue(chunk.isEmpty()); Assert.assertEquals(STRcopyright urlSTRcopyright url", chunk.getCopyRightURL()); Assert.assertFalse(chunk.isEmpty()); } | /**
* Test method for {@link ContentBranding#setCopyRightURL(String)}.
*/ | Test method for <code>ContentBranding#setCopyRightURL(String)</code> | testSetCopyrightURL | {
"repo_name": "pandasys/ealvatag",
"path": "ealvatag/src/test/java/ealvatag/audio/asf/data/ContentBrandingTest.java",
"license": "lgpl-3.0",
"size": 3399
} | [
"java.math.BigInteger",
"org.junit.Assert",
"org.junit.Test"
] | import java.math.BigInteger; import org.junit.Assert; import org.junit.Test; | import java.math.*; import org.junit.*; | [
"java.math",
"org.junit"
] | java.math; org.junit; | 223,305 |
@Test
public void testCheckThrows() {
final HashFunctionIdentityImpl impl1 = new HashFunctionIdentityImpl("Testing Suite", "impl1", Signedness.SIGNED,
ProcessType.CYCLIC, 300L);
final HashFunctionIdentityImpl impl2 = new HashFunctionIdentityImpl("Testing Suite", "impl1", Signedness.U... | void function() { final HashFunctionIdentityImpl impl1 = new HashFunctionIdentityImpl(STR, "impl1", Signedness.SIGNED, ProcessType.CYCLIC, 300L); final HashFunctionIdentityImpl impl2 = new HashFunctionIdentityImpl(STR, "impl1", Signedness.UNSIGNED, ProcessType.CYCLIC, 300L); assertThrows(IllegalArgumentException.class,... | /**
* Test the check method throws when the two hash functions are not equal.
*/ | Test the check method throws when the two hash functions are not equal | testCheckThrows | {
"repo_name": "apache/commons-collections",
"path": "src/test/java/org/apache/commons/collections4/bloomfilter/hasher/HashFunctionValidatorTest.java",
"license": "apache-2.0",
"size": 5353
} | [
"org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity",
"org.junit.jupiter.api.Assertions"
] | import org.apache.commons.collections4.bloomfilter.hasher.HashFunctionIdentity; import org.junit.jupiter.api.Assertions; | import org.apache.commons.collections4.bloomfilter.hasher.*; import org.junit.jupiter.api.*; | [
"org.apache.commons",
"org.junit.jupiter"
] | org.apache.commons; org.junit.jupiter; | 710,147 |
protected Size2D arrangeRN(BlockContainer container, Graphics2D g2,
RectangleConstraint constraint) {
// first arrange without constraints, then see if the width fits
// within the required range...if not, call arrangeFN() at max width
Size2D s1 = arrangeNN(con... | Size2D function(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { Size2D s1 = arrangeNN(container, g2); if (constraint.getWidthRange().contains(s1.width)) { return s1; } else { RectangleConstraint c = constraint.toFixedWidth( constraint.getWidthRange().getUpperBound() ); return arrangeFN(contai... | /**
* Arranges the block with a range constraint on the width, and no
* constraint on the height.
*
* @param container the container.
* @param constraint the constraint.
* @param g2 the graphics device.
*
* @return The size following the arrangement.
*/ | Arranges the block with a range constraint on the width, and no constraint on the height | arrangeRN | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/chart/block/FlowArrangement.java",
"license": "gpl-3.0",
"size": 15733
} | [
"java.awt.Graphics2D",
"org.jfree.chart.ui.Size2D"
] | import java.awt.Graphics2D; import org.jfree.chart.ui.Size2D; | import java.awt.*; import org.jfree.chart.ui.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 418,968 |
public static SimpleResponse makeResponse(SimpleRequest request) {
if (request.getResponseSize() > 0) {
if (!Messages.PayloadType.COMPRESSABLE.equals(request.getResponseType())) {
throw Status.INTERNAL.augmentDescription("Error creating payload.").asRuntimeException();
}
ByteString body... | static SimpleResponse function(SimpleRequest request) { if (request.getResponseSize() > 0) { if (!Messages.PayloadType.COMPRESSABLE.equals(request.getResponseType())) { throw Status.INTERNAL.augmentDescription(STR).asRuntimeException(); } ByteString body = ByteString.copyFrom(new byte[request.getResponseSize()]); Messa... | /**
* Construct a {@link SimpleResponse} for the given request.
*/ | Construct a <code>SimpleResponse</code> for the given request | makeResponse | {
"repo_name": "xzy256/grpc-java-mips64",
"path": "benchmarks/src/main/java/io/grpc/benchmarks/Utils.java",
"license": "bsd-3-clause",
"size": 12207
} | [
"com.google.protobuf.ByteString",
"io.grpc.Status",
"io.grpc.benchmarks.proto.Messages"
] | import com.google.protobuf.ByteString; import io.grpc.Status; import io.grpc.benchmarks.proto.Messages; | import com.google.protobuf.*; import io.grpc.*; import io.grpc.benchmarks.proto.*; | [
"com.google.protobuf",
"io.grpc",
"io.grpc.benchmarks"
] | com.google.protobuf; io.grpc; io.grpc.benchmarks; | 2,639,175 |
boolean hasMoreInput() throws JasperException {
if (current.cursor >= current.stream.length) {
if (singleFile) return false;
while (popFile()) {
if (current.cursor < current.stream.length) return true;
}
return false;
}
return ... | boolean hasMoreInput() throws JasperException { if (current.cursor >= current.stream.length) { if (singleFile) return false; while (popFile()) { if (current.cursor < current.stream.length) return true; } return false; } return true; } | /**
* Checks if the current file has more input.
*
* @return True if more reading is possible
* @throws JasperException if an error occurs
*/ | Checks if the current file has more input | hasMoreInput | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/jasper/compiler/JspReader.java",
"license": "apache-2.0",
"size": 18864
} | [
"org.apache.jasper.JasperException"
] | import org.apache.jasper.JasperException; | import org.apache.jasper.*; | [
"org.apache.jasper"
] | org.apache.jasper; | 2,689,497 |
public PagingToolBar getToolBar()
{
return toolBar;
} | PagingToolBar function() { return toolBar; } | /**
* Gets the tool bar.
*
* @return the tool bar
*/ | Gets the tool bar | getToolBar | {
"repo_name": "geosolutions-it/geofence",
"path": "src/gui/core/plugin/userui/src/main/java/it/geosolutions/geofence/gui/client/widget/InstanceGridWidget.java",
"license": "gpl-3.0",
"size": 34274
} | [
"com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar"
] | import com.extjs.gxt.ui.client.widget.toolbar.PagingToolBar; | import com.extjs.gxt.ui.client.widget.toolbar.*; | [
"com.extjs.gxt"
] | com.extjs.gxt; | 2,366,667 |
public synchronized void setRunning() {
this.setState(ReefServiceProtos.State.RUNNING);
} | synchronized void function() { this.setState(ReefServiceProtos.State.RUNNING); } | /**
* Change the state of the Resource Manager to be RUNNING.
*/ | Change the state of the Resource Manager to be RUNNING | setRunning | {
"repo_name": "taegeonum/incubator-reef",
"path": "lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/resourcemanager/ResourceManagerStatus.java",
"license": "apache-2.0",
"size": 5859
} | [
"org.apache.reef.proto.ReefServiceProtos"
] | import org.apache.reef.proto.ReefServiceProtos; | import org.apache.reef.proto.*; | [
"org.apache.reef"
] | org.apache.reef; | 704,768 |
public String getPosterUrl() {
Image poster = getComponentModel().poster;
if (poster == null) {
return null;
}
// this variable needs to be set in the portlet environment.
String url = getEnvironment().getWServletPath();
Map<String, String> parameters = getBaseParameterMap();
parameters.... | String function() { Image poster = getComponentModel().poster; if (poster == null) { return null; } String url = getEnvironment().getWServletPath(); Map<String, String> parameters = getBaseParameterMap(); parameters.put(POSTER_REQUEST_PARAM_KEY, "x"); return WebUtilities.getPath(url, parameters, true); } | /**
* Creates a dynamic URL that the poster can be loaded from. In fact the URL points to the main application servlet,
* but includes a non-null for the parameter associated with this WComponent (ie, its label). The handleRequest
* method below detects this when the browser requests a file.
*
* @return ... | Creates a dynamic URL that the poster can be loaded from. In fact the URL points to the main application servlet, but includes a non-null for the parameter associated with this WComponent (ie, its label). The handleRequest method below detects this when the browser requests a file | getPosterUrl | {
"repo_name": "Joshua-Barclay/wcomponents",
"path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WVideo.java",
"license": "gpl-3.0",
"size": 21133
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,286,402 |
public float getFloat(int columnIndex) throws SQLException {
if (!this.isBinaryEncoded) {
String val = null;
val = getString(columnIndex);
return getFloatFromString(val, columnIndex);
}
return getNativeFloat(columnIndex);
} | float function(int columnIndex) throws SQLException { if (!this.isBinaryEncoded) { String val = null; val = getString(columnIndex); return getFloatFromString(val, columnIndex); } return getNativeFloat(columnIndex); } | /**
* Get the value of a column in the current row as a Java float.
*
* @param columnIndex
* the first column is 1, the second is 2,...
*
* @return the column value; 0 if SQL NULL
*
* @exception SQLException
* if a database access error occurs
*/ | Get the value of a column in the current row as a Java float | getFloat | {
"repo_name": "shubhanshu-gupta/Apache-Solr",
"path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "apache-2.0",
"size": 247329
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 545,711 |
void commitCreateTable(OutputTableHandle tableHandle, Collection<String> fragments); | void commitCreateTable(OutputTableHandle tableHandle, Collection<String> fragments); | /**
* Commit a table creation with data after the data is written.
*/ | Commit a table creation with data after the data is written | commitCreateTable | {
"repo_name": "FlxRobin/presto",
"path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java",
"license": "apache-2.0",
"size": 4863
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,956,741 |
public QueryOptionsHandle withAdditionalQuery(QueryAdditionalQuery additionalQuery) {
setAdditionalQuery(additionalQuery.getValue());
return this;
} | QueryOptionsHandle function(QueryAdditionalQuery additionalQuery) { setAdditionalQuery(additionalQuery.getValue()); return this; } | /**
* Sets the ctsQuery element in the query options.
* @param additionalQuery An object representation of the cts:query. Build with QueryOptionsBuilder.additionalQuery
* @return this QueryOptionsHandle, for fluent setting.
*/ | Sets the ctsQuery element in the query options | withAdditionalQuery | {
"repo_name": "omkarudipi/java-client-api",
"path": "src/main/java/com/marklogic/client/io/QueryOptionsHandle.java",
"license": "apache-2.0",
"size": 37180
} | [
"com.marklogic.client.admin.config.QueryOptions"
] | import com.marklogic.client.admin.config.QueryOptions; | import com.marklogic.client.admin.config.*; | [
"com.marklogic.client"
] | com.marklogic.client; | 1,621,928 |
@FIXVersion(introduced = "4.4")
public UnderlyingInstrument deleteUnderlyingInstrument(int index) {
throw new UnsupportedOperationException(getUnsupportedTagMessage());
} | @FIXVersion(introduced = "4.4") UnderlyingInstrument function(int index) { throw new UnsupportedOperationException(getUnsupportedTagMessage()); } | /**
* This method deletes a {@link UnderlyingInstrument} object from the existing array of <code>underlyingInstruments</code>
* and shrink the static array with 1 place.<br/>
* If the array does not have the index position then a null object will be returned.)<br/>
* This method will also update <co... | This method deletes a <code>UnderlyingInstrument</code> object from the existing array of <code>underlyingInstruments</code> and shrink the static array with 1 place. If the array does not have the index position then a null object will be returned.) This method will also update <code>noUnderlyings</code> field to the ... | deleteUnderlyingInstrument | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/ConfirmationMsg.java",
"license": "gpl-3.0",
"size": 94557
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.comp.UnderlyingInstrument"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.comp.UnderlyingInstrument; | import net.hades.fix.message.anno.*; import net.hades.fix.message.comp.*; | [
"net.hades.fix"
] | net.hades.fix; | 502,504 |
@Test
public void testIdleToIdleQuestinStatereward() {
for (final String playerSays : ConversationPhrases.GREETING_MESSAGES) {
final Player bob = PlayerTestHelper.createPlayer("bob");
bob.setQuest(QUEST_SLOT, "reward");
npcEngine.setCurrentState(ConversationStates.IDLE);
npcEngine.step(bob, playerSa... | void function() { for (final String playerSays : ConversationPhrases.GREETING_MESSAGES) { final Player bob = PlayerTestHelper.createPlayer("bob"); bob.setQuest(QUEST_SLOT, STR); npcEngine.setCurrentState(ConversationStates.IDLE); npcEngine.step(bob, playerSays); assertThat(npcEngine.getCurrentState(), is(ConversationSt... | /**
* Tests for idleToIdleQuestinStatereward.
*/ | Tests for idleToIdleQuestinStatereward | testIdleToIdleQuestinStatereward | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/maps/quests/CrownForTheWannaBeKingTest.java",
"license": "gpl-2.0",
"size": 15386
} | [
"games.stendhal.server.entity.npc.ConversationPhrases",
"games.stendhal.server.entity.npc.ConversationStates",
"games.stendhal.server.entity.player.Player",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.player.Player; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import games.stendhal.server.entity.npc.*; import games.stendhal.server.entity.player.*; import org.hamcrest.*; import org.junit.*; | [
"games.stendhal.server",
"org.hamcrest",
"org.junit"
] | games.stendhal.server; org.hamcrest; org.junit; | 2,246,393 |
public List<FeedbackSessionAttributes> getFeedbackSessionsPossiblyNeedingOpenEmail() {
return makeAttributes(getFeedbackSessionEntitiesPossiblyNeedingOpenEmail());
} | List<FeedbackSessionAttributes> function() { return makeAttributes(getFeedbackSessionEntitiesPossiblyNeedingOpenEmail()); } | /**
* Returns An empty list if no sessions are found that have unsent open emails.
*/ | Returns An empty list if no sessions are found that have unsent open emails | getFeedbackSessionsPossiblyNeedingOpenEmail | {
"repo_name": "shubham49/teammates",
"path": "src/main/java/teammates/storage/api/FeedbackSessionsDb.java",
"license": "gpl-2.0",
"size": 19333
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,479,283 |
public static <K, V> Map<K, V> configuredMap(Map<K, V> storedMap,
CursorConfig config) {
return (Map) ((StoredContainer) storedMap).configuredClone(config);
} | static <K, V> Map<K, V> function(Map<K, V> storedMap, CursorConfig config) { return (Map) ((StoredContainer) storedMap).configuredClone(config); } | /**
* Creates a configured map from a given stored map.
*
* @param storedMap the base map.
*
* @param config is the cursor configuration to be used for all operations
* performed via the new map instance; null may be specified to use the
* default configuration.
*
* @return ... | Creates a configured map from a given stored map | configuredMap | {
"repo_name": "zheguang/BerkeleyDB",
"path": "lang/java/src/com/sleepycat/collections/StoredCollections.java",
"license": "agpl-3.0",
"size": 6723
} | [
"com.sleepycat.db.CursorConfig",
"java.util.Map"
] | import com.sleepycat.db.CursorConfig; import java.util.Map; | import com.sleepycat.db.*; import java.util.*; | [
"com.sleepycat.db",
"java.util"
] | com.sleepycat.db; java.util; | 1,043,716 |
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
} | void function(BeanFactory beanFactory) { this.beanFactory = beanFactory; } | /**
* Set the {@code BeanFactory} to be used when looking up executors by qualifier.
*/ | Set the BeanFactory to be used when looking up executors by qualifier | setBeanFactory | {
"repo_name": "marcingrzejszczak/spring-cloud-sleuth",
"path": "spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SleuthAdvisorConfig.java",
"license": "apache-2.0",
"size": 9761
} | [
"org.springframework.beans.factory.BeanFactory"
] | import org.springframework.beans.factory.BeanFactory; | import org.springframework.beans.factory.*; | [
"org.springframework.beans"
] | org.springframework.beans; | 1,420,420 |
public boolean isIndirectReference() {
return object.type() == PdfObject.INDIRECT;
}
| boolean function() { return object.type() == PdfObject.INDIRECT; } | /**
* Tells you if the node contains an indirect reference.
* @return true if the object is an indirect reference
*/ | Tells you if the node contains an indirect reference | isIndirectReference | {
"repo_name": "yogthos/itext",
"path": "src/com/lowagie/rups/view/itext/treenodes/PdfObjectTreeNode.java",
"license": "lgpl-3.0",
"size": 8852
} | [
"com.lowagie.text.pdf.PdfObject"
] | import com.lowagie.text.pdf.PdfObject; | import com.lowagie.text.pdf.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 516,549 |
public static void streamSetPeriodically(Session session) {
final UpdateStream<Long> updateStream = session
.feature(TopicUpdate.class)
.createUpdateStream("random/long", Long.class);
final CompletableFuture<TopicCreationResult> validation = updateStream.validate();
... | static void function(Session session) { final UpdateStream<Long> updateStream = session .feature(TopicUpdate.class) .createUpdateStream(STR, Long.class); final CompletableFuture<TopicCreationResult> validation = updateStream.validate(); validation .whenComplete((result, ex) -> { if (ex != null) { LOG.warn(STR, ex); } }... | /**
* Set "random/long" with a random long every 5 seconds while the update stream is active.
*/ | Set "random/long" with a random long every 5 seconds while the update stream is active | streamSetPeriodically | {
"repo_name": "pushtechnology/diffusion-examples",
"path": "java/src/main/java/com/pushtechnology/diffusion/examples/TopicUpdateExample.java",
"license": "apache-2.0",
"size": 12746
} | [
"com.pushtechnology.diffusion.client.features.TopicCreationResult",
"com.pushtechnology.diffusion.client.features.TopicUpdate",
"com.pushtechnology.diffusion.client.features.UpdateStream",
"com.pushtechnology.diffusion.client.session.Session",
"java.util.Random",
"java.util.concurrent.CompletableFuture",
... | import com.pushtechnology.diffusion.client.features.TopicCreationResult; import com.pushtechnology.diffusion.client.features.TopicUpdate; import com.pushtechnology.diffusion.client.features.UpdateStream; import com.pushtechnology.diffusion.client.session.Session; import java.util.Random; import java.util.concurrent.Com... | import com.pushtechnology.diffusion.client.features.*; import com.pushtechnology.diffusion.client.session.*; import java.util.*; import java.util.concurrent.*; | [
"com.pushtechnology.diffusion",
"java.util"
] | com.pushtechnology.diffusion; java.util; | 571,688 |
void registerChannel(SocketChannel ch, SelectionKey selectionKey); | void registerChannel(SocketChannel ch, SelectionKey selectionKey); | /**
* Register a channel with this node.
*/ | Register a channel with this node | registerChannel | {
"repo_name": "wildnez/memcached-java-client",
"path": "src/main/java/net/spy/memcached/MemcachedNode.java",
"license": "mit",
"size": 6193
} | [
"java.nio.channels.SelectionKey",
"java.nio.channels.SocketChannel"
] | import java.nio.channels.SelectionKey; import java.nio.channels.SocketChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 366,508 |
private void handleRefresh(String id) {
if (getThing().getStatus() != ThingStatus.ONLINE) {
return;
}
if (id.equals(PrgConstants.CHANNEL_SCENE)) {
getProtocolHandler().refreshScene();
} else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) {
ge... | void function(String id) { if (getThing().getStatus() != ThingStatus.ONLINE) { return; } if (id.equals(PrgConstants.CHANNEL_SCENE)) { getProtocolHandler().refreshScene(); } else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) { getProtocolHandler().refreshZoneIntensity(_config.getControlUnit()); } else if (id.equals... | /**
* Method that handles the {@link RefreshType} command specifically. Calls the {@link PrgProtocolHandler} to
* handle the actual refresh based on the channel id.
*
* @param id a non-null, possibly empty channel id to refresh
*/ | Method that handles the <code>RefreshType</code> command specifically. Calls the <code>PrgProtocolHandler</code> to handle the actual refresh based on the channel id | handleRefresh | {
"repo_name": "actong/openhab2",
"path": "addons/binding/org.openhab.binding.lutron/src/main/java/org/openhab/binding/lutron/internal/grxprg/GrafikEyeHandler.java",
"license": "epl-1.0",
"size": 14896
} | [
"org.eclipse.smarthome.core.library.types.DecimalType",
"org.eclipse.smarthome.core.thing.ThingStatus"
] | import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.thing.ThingStatus; | import org.eclipse.smarthome.core.library.types.*; import org.eclipse.smarthome.core.thing.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 650,280 |
public static Map<Long, Long> complementRowCountForCuboids(final Map<Long, Long> statistics, Set<Long> cuboids) {
Map<Long, Long> result = Maps.newHashMapWithExpectedSize(cuboids.size()); | static Map<Long, Long> function(final Map<Long, Long> statistics, Set<Long> cuboids) { Map<Long, Long> result = Maps.newHashMapWithExpectedSize(cuboids.size()); | /**
* Complement row count for mandatory cuboids
* with its best parent's row count
* */ | Complement row count for mandatory cuboids with its best parent's row count | complementRowCountForCuboids | {
"repo_name": "apache/kylin",
"path": "core-cube/src/main/java/org/apache/kylin/cube/cuboid/algorithm/CuboidStatsUtil.java",
"license": "apache-2.0",
"size": 15408
} | [
"java.util.Map",
"java.util.Set",
"org.apache.kylin.shaded.com.google.common.collect.Maps"
] | import java.util.Map; import java.util.Set; import org.apache.kylin.shaded.com.google.common.collect.Maps; | import java.util.*; import org.apache.kylin.shaded.com.google.common.collect.*; | [
"java.util",
"org.apache.kylin"
] | java.util; org.apache.kylin; | 13,017 |
@Test public void testAggregateAndScalarSubQueryInHaving() {
sql("select deptno\n"
+ "from emp\n"
+ "group by deptno\n"
+ "having max(emp.empno) > (SELECT min(emp.empno) FROM emp)\n")
.convertsTo("${plan}");
} | @Test void function() { sql(STR + STR + STR + STR) .convertsTo(STR); } | /**
* Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-716">[CALCITE-716]
* Scalar sub-query and aggregate function in SELECT or HAVING clause gives
* AssertionError</a>; variant involving HAVING clause.
*/ | Test case for [CALCITE-716] Scalar sub-query and aggregate function in SELECT or HAVING clause gives AssertionError; variant involving HAVING clause | testAggregateAndScalarSubQueryInHaving | {
"repo_name": "glimpseio/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java",
"license": "apache-2.0",
"size": 45050
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,278,364 |
public By getElementIdentifier(String webElementIdentifier) {
logger.debug("searching web element from identifier: '" + webElementIdentifier + "'");
By result = null;
if(webElementIdentifier.contains("(")) {
TestObject obj = TestObject.getFromRepo(webElementIdentifier);
if(obj != null) {
result = get... | By function(String webElementIdentifier) { logger.debug(STR + webElementIdentifier + "'"); By result = null; if(webElementIdentifier.contains("(")) { TestObject obj = TestObject.getFromRepo(webElementIdentifier); if(obj != null) { result = getElementIdentifier(obj); } else { testCase.addTestResult(false, STR + webEleme... | /**
* Computes the By identifier (see the official Selenium documentation) from the TestObject found in the object repositories.
*
* @param webElementIdentifier The identifier from object repositories
* @return The By object supported by the Selenium 2 WebDriver
*/ | Computes the By identifier (see the official Selenium documentation) from the TestObject found in the object repositories | getElementIdentifier | {
"repo_name": "mbordas/qualify",
"path": "src/main/java/qualify/tools/TestToolSelenium.java",
"license": "bsd-3-clause",
"size": 25061
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,157,536 |
private @NonNull Pair<WritableArray, WritableArray> removeTouchesAtIndices(
@NonNull WritableArray touches, @NonNull WritableArray indices) {
WritableArray rippedOut = new WritableNativeArray();
// use an unsafe downcast to alias to nullable elements,
// so we can delete and then compact.
Writab... | @NonNull Pair<WritableArray, WritableArray> function( @NonNull WritableArray touches, @NonNull WritableArray indices) { WritableArray rippedOut = new WritableNativeArray(); WritableArray tempTouches = new WritableNativeArray(); Set<Integer> rippedOutIndices = new HashSet<>(); for (int i = 0; i < indices.size(); i++) { ... | /**
* Destroys `touches` by removing touch objects at indices `indices`. This is to maintain
* compatibility with W3C touch "end" events, where the active touches don't include the set that
* has just been "ended".
*
* <p>This method was originally in ReactNativeRenderer.js
*
* <p>TODO: this method... | Destroys `touches` by removing touch objects at indices `indices`. This is to maintain compatibility with W3C touch "end" events, where the active touches don't include the set that has just been "ended". This method was originally in ReactNativeRenderer.js be rewritten in a more efficient way | removeTouchesAtIndices | {
"repo_name": "exponent/exponent",
"path": "android/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.java",
"license": "bsd-3-clause",
"size": 6172
} | [
"android.util.Pair",
"androidx.annotation.NonNull",
"com.facebook.react.bridge.WritableArray",
"com.facebook.react.bridge.WritableNativeArray",
"java.util.HashSet",
"java.util.Set"
] | import android.util.Pair; import androidx.annotation.NonNull; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableNativeArray; import java.util.HashSet; import java.util.Set; | import android.util.*; import androidx.annotation.*; import com.facebook.react.bridge.*; import java.util.*; | [
"android.util",
"androidx.annotation",
"com.facebook.react",
"java.util"
] | android.util; androidx.annotation; com.facebook.react; java.util; | 1,171,632 |
public void angularBindGlobal(String name, Object o, AngularObjectWatcher watcher) {
angularBind(name, o, null, watcher);
} | void function(String name, Object o, AngularObjectWatcher watcher) { angularBind(name, o, null, watcher); } | /**
* Create angular variable in global scope and bind with front end Angular display system.
* If variable exists, value will be overwritten and watcher will be added.
* @param name name of variable
* @param o value
* @param watcher watcher of the variable
*/ | Create angular variable in global scope and bind with front end Angular display system. If variable exists, value will be overwritten and watcher will be added | angularBindGlobal | {
"repo_name": "cris83/incubator-zeppelin",
"path": "spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java",
"license": "apache-2.0",
"size": 21426
} | [
"org.apache.zeppelin.display.AngularObjectWatcher"
] | import org.apache.zeppelin.display.AngularObjectWatcher; | import org.apache.zeppelin.display.*; | [
"org.apache.zeppelin"
] | org.apache.zeppelin; | 1,630,646 |
public String saberSeleccionCJ () {
return jComboBox1.getSelectedItem().toString();
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton boton_atras;
private javax.swing.JButton boton_continuar;
private javax.swing.JComboBox<String> jComboBox1;... | String function () { return jComboBox1.getSelectedItem().toString(); } private javax.swing.JButton boton_atras; private javax.swing.JButton boton_continuar; private javax.swing.JComboBox<String> jComboBox1; private javax.swing.JLabel jLabel1; | /**
* Retorna nombre del tour seleccionado
* @return Nombre del tour seleccionado
*/ | Retorna nombre del tour seleccionado | saberSeleccionCJ | {
"repo_name": "AlexisCSP/ProyectoIngenieria",
"path": "ProyectoIngenieria/src/Vista/ISeleccionarTour.java",
"license": "mit",
"size": 7494
} | [
"javax.swing.JComboBox"
] | import javax.swing.JComboBox; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 556,518 |
private static void verifyQuota(INode[] inodes, int pos, long nsDelta,
long dsDelta, INode commonAncestor) throws QuotaExceededException {
if (nsDelta <= 0 && dsDelta <= 0) {
// if quota is being freed or not being consumed
return;
}
// check existing components in the path
for(int ... | static void function(INode[] inodes, int pos, long nsDelta, long dsDelta, INode commonAncestor) throws QuotaExceededException { if (nsDelta <= 0 && dsDelta <= 0) { return; } for(int i = (pos > inodes.length? inodes.length: pos) - 1; i >= 0; i--) { if (commonAncestor == inodes[i]) { return; } final DirectoryWithQuotaFea... | /**
* Verify quota for adding or moving a new INode with required
* namespace and diskspace to a given position.
*
* @param inodes INodes corresponding to a path
* @param pos position where a new INode will be added
* @param nsDelta needed namespace
* @param dsDelta needed diskspace
* @param ... | Verify quota for adding or moving a new INode with required namespace and diskspace to a given position | verifyQuota | {
"repo_name": "yncxcw/Yarn-SBlock",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 120183
} | [
"org.apache.hadoop.hdfs.protocol.QuotaExceededException"
] | import org.apache.hadoop.hdfs.protocol.QuotaExceededException; | import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 136,565 |
private DataContextPropertiesImpl generateDataContextProperties(
HiveStoreParameters hiveStoreParameters) {
final DataContextPropertiesImpl properties = new DataContextPropertiesImpl();
properties.put(DataContextPropertiesImpl.PROPERTY_DATA_CONTEXT_TYPE,
HiveStoreParameters.HIVE_DATA_CONTEXT_TYP... | DataContextPropertiesImpl function( HiveStoreParameters hiveStoreParameters) { final DataContextPropertiesImpl properties = new DataContextPropertiesImpl(); properties.put(DataContextPropertiesImpl.PROPERTY_DATA_CONTEXT_TYPE, HiveStoreParameters.HIVE_DATA_CONTEXT_TYPE); properties.put(DataContextPropertiesImpl.PROPERTY... | /**
* Generate DataContextPropertiesImpl using basic properties to establish a connection to Hive
* backend service
*
* @param hiveStoreParameters hive store parameters including at least server url
* @return DataContextPropertiesImpl connection properties
*/ | Generate DataContextPropertiesImpl using basic properties to establish a connection to Hive backend service | generateDataContextProperties | {
"repo_name": "alfonsonishikawa/gora",
"path": "gora-hive/src/main/java/org/apache/gora/hive/store/HiveDataContext.java",
"license": "apache-2.0",
"size": 8675
} | [
"org.apache.metamodel.factory.DataContextPropertiesImpl"
] | import org.apache.metamodel.factory.DataContextPropertiesImpl; | import org.apache.metamodel.factory.*; | [
"org.apache.metamodel"
] | org.apache.metamodel; | 328,158 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.