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
public void freezeRotation() { mUiAutomatorBridge.setRotation(UiAutomation.ROTATION_FREEZE_CURRENT); }
void function() { mUiAutomatorBridge.setRotation(UiAutomation.ROTATION_FREEZE_CURRENT); }
/** * Disables the sensors and freezes the device rotation at its * current rotation state. * @throws RemoteException */
Disables the sensors and freezes the device rotation at its current rotation state
freezeRotation
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/uiautomator/core/InteractionController.java", "license": "apache-2.0", "size": 29797 }
[ "android.app.UiAutomation" ]
import android.app.UiAutomation;
import android.app.*;
[ "android.app" ]
android.app;
2,425,244
public String toString() { ToString buf = new ToString(this); buf.add("Count", getCount()); buf.add("Sorted", isSorted()); buf.add("Reversed", isReversed()); buf.add("Dirty", isDirty); buf.add("Modified", isM...
String function() { ToString buf = new ToString(this); buf.add("Count", getCount()); buf.add(STR, isSorted()); buf.add(STR, isReversed()); buf.add("Dirty", isDirty); buf.add(STR, isModified()); buf.add("Data", getValues()); return (buf.toString()); }
/** * Returns a string representation of the object. In general, the * <code>toString</code> method returns a string that 'textually represents' * this object. The result should be a concise but informative * representation that is easy for a person to read. It is recommended tha...
Returns a string representation of the object. In general, the <code>toString</code> method returns a string that 'textually represents' this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method
toString
{ "repo_name": "Jeach/Java-Stats", "path": "src/com/jeach/stats/DataSet.java", "license": "gpl-3.0", "size": 82805 }
[ "com.jeach.tools.ToString" ]
import com.jeach.tools.ToString;
import com.jeach.tools.*;
[ "com.jeach.tools" ]
com.jeach.tools;
847,598
@Test public void isFetchAliasable() { Assert.assertFalse(JpaProviderFactory.getInstance().getImplementation().isFetchAliasable()); }
void function() { Assert.assertFalse(JpaProviderFactory.getInstance().getImplementation().isFetchAliasable()); }
/** * Test isFetchAliasable() method. */
Test isFetchAliasable() method
isFetchAliasable
{ "repo_name": "qjafcunuas/jbromo", "path": "jbromo-dao/jbromo-dao-jpa/jbromo-dao-jpa-container/jbromo-dao-jpa-container-openjpa/src/test/java/org/jbromo/dao/jpa/container/openjpa/JpaOpenJPAProviderTest.java", "license": "apache-2.0", "size": 3269 }
[ "org.jbromo.dao.jpa.container.common.JpaProviderFactory", "org.junit.Assert" ]
import org.jbromo.dao.jpa.container.common.JpaProviderFactory; import org.junit.Assert;
import org.jbromo.dao.jpa.container.common.*; import org.junit.*;
[ "org.jbromo.dao", "org.junit" ]
org.jbromo.dao; org.junit;
2,134,486
public void setInputSource(XMLInputSource inputSource) throws XMLConfigurationException, IOException { // REVISIT: this method used to reset all the components and // construct the pipeline. Now reset() is called // in parse (boolean) just before we parse the docum...
void function(XMLInputSource inputSource) throws XMLConfigurationException, IOException { fInputSource = inputSource; }
/** * Sets the input source for the document to parse. * * @param inputSource The document's input source. * * @exception XMLConfigurationException Thrown if there is a * configuration error when initializing the * parser. * @exceptio...
Sets the input source for the document to parse
setInputSource
{ "repo_name": "openjdk/jdk7u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java", "license": "gpl-2.0", "size": 29887 }
[ "com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException", "com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource", "java.io.IOException" ]
import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException; import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; import java.io.IOException;
import com.sun.org.apache.xerces.internal.xni.parser.*; import java.io.*;
[ "com.sun.org", "java.io" ]
com.sun.org; java.io;
1,573,800
@Override public void stop(BundleContext context) throws Exception { WeatherActivator.context = null; logger.debug("Weather binding has been stopped."); }
void function(BundleContext context) throws Exception { WeatherActivator.context = null; logger.debug(STR); }
/** * Called whenever the OSGi framework stops our bundle */
Called whenever the OSGi framework stops our bundle
stop
{ "repo_name": "lewie/openhab", "path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/bus/WeatherActivator.java", "license": "epl-1.0", "size": 1520 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
754,891
@Test public void testSelectWithLikeClause() { SelectStatement stmt = new SelectStatement() .from(new TableReference(TEST_TABLE)) .where(Criterion.like(new FieldReference(STRING_FIELD), "A%")); String value = varCharCast("'A%'"); String expectedSql = "SELECT * FROM " + tableName(TEST_TAB...
void function() { SelectStatement stmt = new SelectStatement() .from(new TableReference(TEST_TABLE)) .where(Criterion.like(new FieldReference(STRING_FIELD), "A%")); String value = varCharCast("'A%'"); String expectedSql = STR + tableName(TEST_TABLE) + STR + stringLiteralPrefix() + value + likeEscapeSuffix() +")"; asser...
/** * Tests a select with a where like clause. */
Tests a select with a where like clause
testSelectWithLikeClause
{ "repo_name": "badgerwithagun/morf", "path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java", "license": "apache-2.0", "size": 201465 }
[ "org.alfasoftware.morf.sql.SelectStatement", "org.alfasoftware.morf.sql.element.Criterion", "org.alfasoftware.morf.sql.element.FieldReference", "org.alfasoftware.morf.sql.element.TableReference", "org.junit.Assert" ]
import org.alfasoftware.morf.sql.SelectStatement; import org.alfasoftware.morf.sql.element.Criterion; import org.alfasoftware.morf.sql.element.FieldReference; import org.alfasoftware.morf.sql.element.TableReference; import org.junit.Assert;
import org.alfasoftware.morf.sql.*; import org.alfasoftware.morf.sql.element.*; import org.junit.*;
[ "org.alfasoftware.morf", "org.junit" ]
org.alfasoftware.morf; org.junit;
2,713,259
public void close() { try { if (!dbConn.getAutoCommit()) { dbConn.commit(); } //getEntry.close(); updEntry.close(); addEntry.close(); lockUrl.close(); unlockUrl.close(); unlockAll.close(); ...
void function() { try { if (!dbConn.getAutoCommit()) { dbConn.commit(); } updEntry.close(); addEntry.close(); lockUrl.close(); unlockUrl.close(); unlockAll.close(); if (listLocked != null) { listLocked.close(); } if (listBroken != null) { listBroken.close(); } dbConn.close(); } catch (SQLException ex) { Logger.getLogge...
/** * Closes the DB connection and all prepared statements. */
Closes the DB connection and all prepared statements
close
{ "repo_name": "rsmeral/semnet", "path": "SemNet/src/xsmeral/semnet/crawler/URLManager.java", "license": "mit", "size": 21102 }
[ "java.sql.SQLException", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger;
import java.sql.*; import java.util.logging.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,303,568
public void verify(ExceptionCode<T> code) throws Exception { assertNotNull(code); code.run(exception); } }
void function(ExceptionCode<T> code) throws Exception { assertNotNull(code); code.run(exception); } }
/** Run the given check code. * * @throws Exception any exception */
Run the given check code
verify
{ "repo_name": "sarl/sarl", "path": "tests/io.sarl.tests.api/src/main/java/io/sarl/tests/api/tools/TestAssertions.java", "license": "apache-2.0", "size": 39628 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,093,469
public void freeArray(LongArray array) { freePage(array.memoryBlock()); }
void function(LongArray array) { freePage(array.memoryBlock()); }
/** * Frees a LongArray. */
Frees a LongArray
freeArray
{ "repo_name": "ueshin/apache-spark", "path": "core/src/main/java/org/apache/spark/memory/MemoryConsumer.java", "license": "apache-2.0", "size": 4949 }
[ "org.apache.spark.unsafe.array.LongArray" ]
import org.apache.spark.unsafe.array.LongArray;
import org.apache.spark.unsafe.array.*;
[ "org.apache.spark" ]
org.apache.spark;
2,279,581
public Drawable getDrawable(int destWidth, int destHeight) { Drawable drawable = getResourceDrawable(); if (drawable == null) { Bitmap b = getBitmap(destWidth, destHeight); if (b != null) { drawable = new BitmapDrawable(b); } } return drawable; }
Drawable function(int destWidth, int destHeight) { Drawable drawable = getResourceDrawable(); if (drawable == null) { Bitmap b = getBitmap(destWidth, destHeight); if (b != null) { drawable = new BitmapDrawable(b); } } return drawable; }
/** * Gets a resource drawable directly if the reference is to a resource, else * makes a BitmapDrawable with the given attributes. */
Gets a resource drawable directly if the reference is to a resource, else makes a BitmapDrawable with the given attributes
getDrawable
{ "repo_name": "smit1625/titanium_mobile", "path": "android/titanium/src/java/org/appcelerator/titanium/view/TiDrawableReference.java", "license": "apache-2.0", "size": 31660 }
[ "android.graphics.Bitmap", "android.graphics.drawable.BitmapDrawable", "android.graphics.drawable.Drawable" ]
import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable;
import android.graphics.*; import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
955,280
public static synchronized Groups getUserToGroupsMappingService( Configuration conf) { if(GROUPS == null) { if(LOG.isDebugEnabled()) { LOG.debug(" Creating new Groups object"); } GROUPS = new Groups(conf); } return GROUPS; }
static synchronized Groups function( Configuration conf) { if(GROUPS == null) { if(LOG.isDebugEnabled()) { LOG.debug(STR); } GROUPS = new Groups(conf); } return GROUPS; }
/** * Get the groups being used to map user-to-groups. * @param conf * @return the groups being used to map user-to-groups. */
Get the groups being used to map user-to-groups
getUserToGroupsMappingService
{ "repo_name": "dotunolafunmiloye/hadoop-common", "path": "src/java/org/apache/hadoop/security/Groups.java", "license": "apache-2.0", "size": 5441 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,007,261
public NDArray div(@NonNull NDArray other, @NonNull Axis axis) { return mapSparse(other, axis, Math2::divide); }
NDArray function(@NonNull NDArray other, @NonNull Axis axis) { return mapSparse(other, axis, Math2::divide); }
/** * Divides a column or row vector element division dividing the values in the other NDArray to each row or column in * this NDArray as specified by the given axis parameter. * * @param other the other NDArray whose values will be divided * @param axis the axis * @return the new NDArray with ...
Divides a column or row vector element division dividing the values in the other NDArray to each row or column in this NDArray as specified by the given axis parameter
div
{ "repo_name": "dbracewell/apollo", "path": "src/main/java/com/davidbracewell/apollo/linear/NDArray.java", "license": "apache-2.0", "size": 68768 }
[ "com.davidbracewell.Math2" ]
import com.davidbracewell.Math2;
import com.davidbracewell.*;
[ "com.davidbracewell" ]
com.davidbracewell;
926,296
protected LockingPolicy getDefaultLockingPolicy() { return(system_default_locking_policy); }
LockingPolicy function() { return(system_default_locking_policy); }
/** * Return the default locking policy for this access manager. * * @return the default locking policy for this accessmanager. **/
Return the default locking policy for this access manager
getDefaultLockingPolicy
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/store/access/RAMAccessManager.java", "license": "apache-2.0", "size": 50723 }
[ "org.apache.derby.iapi.store.raw.LockingPolicy" ]
import org.apache.derby.iapi.store.raw.LockingPolicy;
import org.apache.derby.iapi.store.raw.*;
[ "org.apache.derby" ]
org.apache.derby;
2,837,275
public GoogleApiClient getApiClient() { if (mGoogleApiClient == null) { throw new IllegalStateException( "No GoogleApiClient. Did you call setup()?"); } return mGoogleApiClient; }
GoogleApiClient function() { if (mGoogleApiClient == null) { throw new IllegalStateException( STR); } return mGoogleApiClient; }
/** * Returns the GoogleApiClient object. In order to call this method, you * must have called @link{setup}. */
Returns the GoogleApiClient object. In order to call this method, you must have called @link{setup}
getApiClient
{ "repo_name": "PorkyPixels/Cocos-Helper", "path": "External Cocos Helper Android Frameworks/Frameworks/GooglePlayServices/GooglePlayServicesGameHelper.java", "license": "mit", "size": 41515 }
[ "com.google.android.gms.common.api.GoogleApiClient" ]
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.*;
[ "com.google.android" ]
com.google.android;
347,528
public int size() { int offset = 0; for (final EncodedDataType t : containedTypeList) { if (t.isVariableLength()) { return Token.VARIABLE_SIZE; } if (t.offsetAttribute() != -1) { offset = t.off...
int function() { int offset = 0; for (final EncodedDataType t : containedTypeList) { if (t.isVariableLength()) { return Token.VARIABLE_SIZE; } if (t.offsetAttribute() != -1) { offset = t.offsetAttribute(); } offset += t.size(); } return offset; } /** * Return the sinceVersion value of the {@link CompositeType} * * @ret...
/** * The size (in octets) of the list of EncodedDataTypes * * @return size of the compositeType */
The size (in octets) of the list of EncodedDataTypes
size
{ "repo_name": "jhawo82882/MDP3Sample", "path": "main/java/uk/co/real_logic/sbe/xml/CompositeType.java", "license": "apache-2.0", "size": 7476 }
[ "uk.co.real_logic.sbe.ir.Token" ]
import uk.co.real_logic.sbe.ir.Token;
import uk.co.real_logic.sbe.ir.*;
[ "uk.co.real_logic" ]
uk.co.real_logic;
1,396,365
public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException, RemoteException;
void function(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException, RemoteException;
/** * Schedule a service to run asynchronously at a specific start time. * @param serviceName Name of the service to invoke. * @param context The name/value pairs composing the context. * @param startTime The time to run this service. * @param frequency The frequency of the recurrence (Recurren...
Schedule a service to run asynchronously at a specific start time
schedule
{ "repo_name": "ilscipio/scipio-erp", "path": "framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java", "license": "apache-2.0", "size": 10488 }
[ "java.rmi.RemoteException", "java.util.Map", "org.ofbiz.service.GenericServiceException" ]
import java.rmi.RemoteException; import java.util.Map; import org.ofbiz.service.GenericServiceException;
import java.rmi.*; import java.util.*; import org.ofbiz.service.*;
[ "java.rmi", "java.util", "org.ofbiz.service" ]
java.rmi; java.util; org.ofbiz.service;
1,210,144
synchronized void copyData(InputStream inStream, long length) throws IOException, StandardException { byte [] data = new byte [bufferSize]; long sz = 0; while (sz < length) { int len = (int) Math.min (length - sz, bufferSize); len = inStream.read(data, 0, ...
synchronized void copyData(InputStream inStream, long length) throws IOException, StandardException { byte [] data = new byte [bufferSize]; long sz = 0; while (sz < length) { int len = (int) Math.min (length - sz, bufferSize); len = inStream.read(data, 0, len); if (len < 0) throw new EOFException(STR + STR + sz); write...
/** * Copies bytes from stream to local storage. * @param inStream * @param length length to be copied * @throws IOException, StandardException */
Copies bytes from stream to local storage
copyData
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/jdbc/LOBStreamControl.java", "license": "apache-2.0", "size": 22128 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "java.io.EOFException", "java.io.IOException", "java.io.InputStream" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import java.io.EOFException; import java.io.IOException; import java.io.InputStream;
import com.pivotal.gemfirexd.internal.iapi.error.*; import java.io.*;
[ "com.pivotal.gemfirexd", "java.io" ]
com.pivotal.gemfirexd; java.io;
2,870,610
public static OfBuilder named(@Nullable String name) { return new Builder(name); } public interface OfBuilder extends Builders.Of {
static OfBuilder function(@Nullable String name) { return new Builder(name); } public interface OfBuilder extends Builders.Of {
/** * Starts building a named {@link Distinct} operator. * * @param name a user provided name of the new operator to build * @return a builder to complete the setup of the new operator */
Starts building a named <code>Distinct</code> operator
named
{ "repo_name": "RyanSkraba/beam", "path": "sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/client/operator/Distinct.java", "license": "apache-2.0", "size": 15666 }
[ "javax.annotation.Nullable", "org.apache.beam.sdk.extensions.euphoria.core.client.operator.base.Builders" ]
import javax.annotation.Nullable; import org.apache.beam.sdk.extensions.euphoria.core.client.operator.base.Builders;
import javax.annotation.*; import org.apache.beam.sdk.extensions.euphoria.core.client.operator.base.*;
[ "javax.annotation", "org.apache.beam" ]
javax.annotation; org.apache.beam;
1,702,929
public static synchronized FastDateFormat getDateInstance(int style, TimeZone timeZone, Locale locale) { Object key = new Integer(style); if (timeZone != null) { key = new Pair(key, timeZone); } if (locale == null) { locale = Locale.getDefault(); } ...
static synchronized FastDateFormat function(int style, TimeZone timeZone, Locale locale) { Object key = new Integer(style); if (timeZone != null) { key = new Pair(key, timeZone); } if (locale == null) { locale = Locale.getDefault(); } key = new Pair(key, locale); FastDateFormat format = (FastDateFormat) cDateInstanceCa...
/** * <p>Gets a date formatter instance using the specified style, time * zone and locale.</p> * * @param style date style: FULL, LONG, MEDIUM, or SHORT * @param timeZone optional time zone, overrides time zone of * formatted date * @param locale optional locale, overrides system...
Gets a date formatter instance using the specified style, time zone and locale
getDateInstance
{ "repo_name": "mtwain/Easychad", "path": "EasychadProj/src/main/java/ml/easychad/lax/android/FastDateFormat.java", "license": "gpl-2.0", "size": 55985 }
[ "java.text.DateFormat", "java.text.SimpleDateFormat", "java.util.Locale", "java.util.TimeZone" ]
import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
2,726,575
List<Descriptor<RepositoryBrowser<?>>> r = new ArrayList<>(); for (Descriptor<RepositoryBrowser<?>> d : RepositoryBrowser.all()) if(d.isSubTypeOf(t)) r.add(d); return r; }
List<Descriptor<RepositoryBrowser<?>>> r = new ArrayList<>(); for (Descriptor<RepositoryBrowser<?>> d : RepositoryBrowser.all()) if(d.isSubTypeOf(t)) r.add(d); return r; }
/** * Only returns those {@link RepositoryBrowser} descriptors that extend from the given type. */
Only returns those <code>RepositoryBrowser</code> descriptors that extend from the given type
filter
{ "repo_name": "ErikVerheul/jenkins", "path": "core/src/main/java/hudson/scm/RepositoryBrowsers.java", "license": "mit", "size": 3832 }
[ "hudson.model.Descriptor", "java.util.ArrayList", "java.util.List" ]
import hudson.model.Descriptor; import java.util.ArrayList; import java.util.List;
import hudson.model.*; import java.util.*;
[ "hudson.model", "java.util" ]
hudson.model; java.util;
359,422
void sendRequestEntity(HttpEntityEnclosingRequest request) throws HttpException, IOException;
void sendRequestEntity(HttpEntityEnclosingRequest request) throws HttpException, IOException;
/** * Sends the request entity over the connection. * @param request the request whose entity to send. * @throws HttpException in case of HTTP protocol violation * @throws IOException in case of an I/O error */
Sends the request entity over the connection
sendRequestEntity
{ "repo_name": "cictourgune/MDP-Airbnb", "path": "httpcomponents-core-4.4/httpcore/src/main/java/org/apache/http/HttpClientConnection.java", "license": "apache-2.0", "size": 3888 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
517,335
@Nullable @NonNls String getName(); /** * Renames the element. * * @param name the new element name. * @return the element corresponding to this element after the rename (either {@code this}
@Nullable @NonNls String getName(); /** * Renames the element. * * @param name the new element name. * @return the element corresponding to this element after the rename (either {@code this}
/** * Returns the name of the element. * * @return the element name. */
Returns the name of the element
getName
{ "repo_name": "youdonghai/intellij-community", "path": "platform/core-api/src/com/intellij/psi/PsiNamedElement.java", "license": "apache-2.0", "size": 1705 }
[ "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,035,553
@javax.annotation.Nullable @ApiModelProperty( value = "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status") public String getStatus() { return status; }
@javax.annotation.Nullable @ApiModelProperty( value = STRSuccess\STRFailure\". More info: https: String function() { return status; }
/** * Status of the operation. One of: \&quot;Success\&quot; or \&quot;Failure\&quot;. More info: * https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status * * @return status */
Status of the operation. One of: \&quot;Success\&quot; or \&quot;Failure\&quot;. More info: HREF
getStatus
{ "repo_name": "kubernetes-client/java", "path": "client-java-contrib/admissionreview/src/main/java/io/kubernetes/client/admissionreview/models/Status.java", "license": "apache-2.0", "size": 8996 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,007,074
File getAssetsJarFile();
File getAssetsJarFile();
/** * The assets jar file produced for this binary. * @return the assets jar file */
The assets jar file produced for this binary
getAssetsJarFile
{ "repo_name": "FinishX/coolweather", "path": "gradle/gradle-2.8/src/platform-play/org/gradle/play/PlayApplicationBinarySpec.java", "license": "apache-2.0", "size": 2390 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,798,122
List<OrganisationUnit> getOrganisationUnitsAtLevel( int level, OrganisationUnit parent );
List<OrganisationUnit> getOrganisationUnitsAtLevel( int level, OrganisationUnit parent );
/** * Returns all OrganisationUnits which are children of the given unit and are * at the given hierarchical level. The root OrganisationUnits are at level 1. * If parent is null, then all OrganisationUnits at the given level are returned. * * @param level the hierarchical level. * ...
Returns all OrganisationUnits which are children of the given unit and are at the given hierarchical level. The root OrganisationUnits are at level 1. If parent is null, then all OrganisationUnits at the given level are returned
getOrganisationUnitsAtLevel
{ "repo_name": "minagri-rwanda/DHIS2-Agriculture", "path": "dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnitService.java", "license": "bsd-3-clause", "size": 18350 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
358,750
@Deprecated public Map<String, Object> templateParams() { return template == null ? null : template.getParams(); }
Map<String, Object> function() { return template == null ? null : template.getParams(); }
/** * Template parameters used for rendering * * @deprecated use {@link #template()} instead. */
Template parameters used for rendering
templateParams
{ "repo_name": "hechunwen/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/search/SearchRequest.java", "license": "apache-2.0", "size": 18994 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
840,193
public static void setMaxHealth(Player player, double value) { try { player.getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).setBaseValue(value); } catch (LinkageError e) { player.setMaxHealth(value); } }
static void function(Player player, double value) { try { player.getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).setBaseValue(value); } catch (LinkageError e) { player.setMaxHealth(value); } }
/** * Sets a player's max health. Implementations targeting newer versions of * Minecraft should use Attributes. * * @param player Player to set max health of * @param value New max health */
Sets a player's max health. Implementations targeting newer versions of Minecraft should use Attributes
setMaxHealth
{ "repo_name": "dmulloy2/SwornAPI", "path": "src/main/java/net/dmulloy2/util/CompatUtil.java", "license": "gpl-3.0", "size": 4266 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
1,053,514
Ip4Address routerIp();
Ip4Address routerIp();
/** * Gets IP address of the router. * * @return IP address of the router */
Gets IP address of the router
routerIp
{ "repo_name": "kuujo/onos", "path": "protocols/ospf/api/src/main/java/org/onosproject/ospf/controller/OspfRouter.java", "license": "apache-2.0", "size": 2982 }
[ "org.onlab.packet.Ip4Address" ]
import org.onlab.packet.Ip4Address;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
1,352,516
public List<String> format(final Book book);
List<String> function(final Book book);
/** * Return the book as a List of Strings. * @param book * @return */
Return the book as a List of Strings
format
{ "repo_name": "robertzak/goodreads-parser", "path": "src/main/java/noorg/bookparsing/report/format/BookFormatter.java", "license": "apache-2.0", "size": 1267 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,014,492
@ApiModelProperty(required = true, value = "Unique ID for the item") public Long getRecordId() { return recordId; }
@ApiModelProperty(required = true, value = STR) Long function() { return recordId; }
/** * Unique ID for the item * * @return recordId **/
Unique ID for the item
getRecordId
{ "repo_name": "burberius/eve-esi", "path": "src/main/java/net/troja/eve/esi/model/CharacterContractsItemsResponse.java", "license": "apache-2.0", "size": 7111 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,573,070
public Future<Collection<Reply>> addAll(final Collection<Duty> duty) { return crudExec.executeWithResponse(duty, EntityEvent.CREATE, null); }
Future<Collection<Reply>> function(final Collection<Duty> duty) { return crudExec.executeWithResponse(duty, EntityEvent.CREATE, null); }
/** * Enter a new duty to Minka so it can distribute it to proper shards. * This causes the duty to be attached at Minka's Follower context. * So expect a call at PartitionDelegate.capture * @param duty a duty sharded or to be sharded in the cluster * @return whether or not the operation succeed */
Enter a new duty to Minka so it can distribute it to proper shards. This causes the duty to be attached at Minka's Follower context. So expect a call at PartitionDelegate.capture
addAll
{ "repo_name": "gcristian/minka", "path": "server/src/main/java/io/tilt/minka/api/crud/Client.java", "license": "apache-2.0", "size": 10530 }
[ "io.tilt.minka.domain.EntityEvent", "io.tilt.minka.model.Duty", "java.util.Collection", "java.util.concurrent.Future" ]
import io.tilt.minka.domain.EntityEvent; import io.tilt.minka.model.Duty; import java.util.Collection; import java.util.concurrent.Future;
import io.tilt.minka.domain.*; import io.tilt.minka.model.*; import java.util.*; import java.util.concurrent.*;
[ "io.tilt.minka", "java.util" ]
io.tilt.minka; java.util;
2,410,061
Set<Command> getCommandsForApplication( final String id) throws GenieException;
Set<Command> getCommandsForApplication( final String id) throws GenieException;
/** * Get all the commands the application with given id is associated with. * * @param id The id of the application to get the commands for. * @return The commands the application is a part of. * @throws GenieException if there is an error */
Get all the commands the application with given id is associated with
getCommandsForApplication
{ "repo_name": "gorcz/genie", "path": "genie-server/src/main/java/com/netflix/genie/server/services/ApplicationConfigService.java", "license": "apache-2.0", "size": 11071 }
[ "com.netflix.genie.common.exceptions.GenieException", "com.netflix.genie.common.model.Command", "java.util.Set" ]
import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.model.Command; import java.util.Set;
import com.netflix.genie.common.exceptions.*; import com.netflix.genie.common.model.*; import java.util.*;
[ "com.netflix.genie", "java.util" ]
com.netflix.genie; java.util;
329,520
private void sendRegistrationToServer(String token) { // Add custom implementation, as needed. pref.edit().pushRegId().put(token).apply(); if(DlApplication.currentSession != null && DlApplication.currentSession.getSsid() != null) { NewUser newUser = new NewUser(); ...
void function(String token) { pref.edit().pushRegId().put(token).apply(); if(DlApplication.currentSession != null && DlApplication.currentSession.getSsid() != null) { NewUser newUser = new NewUser(); newUser.setPushRegId(token);
/** * Persist registration to third-party servers. * * Modify this method to associate the user's GCM registration token with any server-side account * maintained by your application. * * @param token The new token. */
Persist registration to third-party servers. Modify this method to associate the user's GCM registration token with any server-side account maintained by your application
sendRegistrationToServer
{ "repo_name": "SnowdogApps/Dzialaj-Lokalnie-w-Poznaniu", "path": "app/src/main/java/pl/snowdog/dzialajlokalnie/gcm/RegistrationIntentService.java", "license": "apache-2.0", "size": 5323 }
[ "pl.snowdog.dzialajlokalnie.DlApplication", "pl.snowdog.dzialajlokalnie.model.NewUser" ]
import pl.snowdog.dzialajlokalnie.DlApplication; import pl.snowdog.dzialajlokalnie.model.NewUser;
import pl.snowdog.dzialajlokalnie.*; import pl.snowdog.dzialajlokalnie.model.*;
[ "pl.snowdog.dzialajlokalnie" ]
pl.snowdog.dzialajlokalnie;
2,539,122
@Test public void whenDeleteItemThenItemWasDeletedFromDB() { TrackerHbm trackerHbm = new TrackerHbm(); Item first = new Item("first task", "desc", 1L, "sergey"); Item second = new Item("second task", "desc2", 2L, "oleg"); trackerHbm.add(first); trackerHbm.add(second); ...
void function() { TrackerHbm trackerHbm = new TrackerHbm(); Item first = new Item(STR, "desc", 1L, STR); Item second = new Item(STR, "desc2", 2L, "oleg"); trackerHbm.add(first); trackerHbm.add(second); trackerHbm.delete(first.getId()); List<Item> allItems = trackerHbm.findAll(); assertEquals(1, allItems.size()); assert...
/** * Test for delete() method. */
Test for delete() method
whenDeleteItemThenItemWasDeletedFromDB
{ "repo_name": "IvanBelyaev/ibelyaev", "path": "chapter_010/src/test/java/ru/job4j/tracker/TrackerHbmTest.java", "license": "apache-2.0", "size": 3724 }
[ "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,311,759
@VisibleForTesting static boolean matchesCriteria(ResourceRecordSet recordSet, String name, String type) { if (type != null && !recordSet.getType().equals(type)) { return false; } return name == null || recordSet.getName().equals(name); }
static boolean matchesCriteria(ResourceRecordSet recordSet, String name, String type) { if (type != null && !recordSet.getType().equals(type)) { return false; } return name == null recordSet.getName().equals(name); }
/** * Tests if a record set matches name and type (if provided). Used for filtering. */
Tests if a record set matches name and type (if provided). Used for filtering
matchesCriteria
{ "repo_name": "aozarov/gcloud-java", "path": "gcloud-java-dns/src/main/java/com/google/cloud/dns/testing/LocalDnsHelper.java", "license": "apache-2.0", "size": 50076 }
[ "com.google.api.services.dns.model.ResourceRecordSet" ]
import com.google.api.services.dns.model.ResourceRecordSet;
import com.google.api.services.dns.model.*;
[ "com.google.api" ]
com.google.api;
1,792,762
void deleteOne(Bson filter, DeleteOptions options, SingleResultCallback<DeleteResult> callback);
void deleteOne(Bson filter, DeleteOptions options, SingleResultCallback<DeleteResult> callback);
/** * Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not * modified. * * @param filter the query filter to apply the the delete operation * @param options the options to apply to the delete operation * @param cal...
Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified
deleteOne
{ "repo_name": "jsonking/mongo-java-driver", "path": "driver-async/src/main/com/mongodb/async/client/MongoCollection.java", "license": "apache-2.0", "size": 31868 }
[ "com.mongodb.async.SingleResultCallback", "com.mongodb.client.model.DeleteOptions", "com.mongodb.client.result.DeleteResult", "org.bson.conversions.Bson" ]
import com.mongodb.async.SingleResultCallback; import com.mongodb.client.model.DeleteOptions; import com.mongodb.client.result.DeleteResult; import org.bson.conversions.Bson;
import com.mongodb.async.*; import com.mongodb.client.model.*; import com.mongodb.client.result.*; import org.bson.conversions.*;
[ "com.mongodb.async", "com.mongodb.client", "org.bson.conversions" ]
com.mongodb.async; com.mongodb.client; org.bson.conversions;
1,756,398
HistoricTaskInstanceQuery taskCompletedAfter(Date endDate); // ORDERING
HistoricTaskInstanceQuery taskCompletedAfter(Date endDate);
/** * Only select select historic task instances which are completed after the given date */
Only select select historic task instances which are completed after the given date
taskCompletedAfter
{ "repo_name": "motorina0/flowable-engine", "path": "modules/flowable-engine/src/main/java/org/flowable/engine/history/HistoricTaskInstanceQuery.java", "license": "apache-2.0", "size": 3373 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
694,345
public void onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) throws JSONException { if(permissionResultCallback != null) { permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResul...
void function(int requestCode, String[] permissions, int[] grantResults) throws JSONException { if(permissionResultCallback != null) { permissionResultCallback.onRequestPermissionResult(requestCode, permissions, grantResults); permissionResultCallback = null; } }
/** * Called by the system when the user grants permissions * * @param requestCode * @param permissions * @param grantResults */
Called by the system when the user grants permissions
onRequestPermissionResult
{ "repo_name": "shyampurk/tto-bluemix", "path": "ttoApp/platforms/android/CordovaLib/src/org/apache/cordova/CordovaInterfaceImpl.java", "license": "mit", "size": 8823 }
[ "org.json.JSONException" ]
import org.json.JSONException;
import org.json.*;
[ "org.json" ]
org.json;
1,341,263
public static boolean parseTo(Session session, Task[] tasks) { AzeiPlugin.logger.entering("EmailParser", "parseTo"); messages = new Vector<Message>(); String from = Config.getStringParameter(Config.EMAIL_FROM); for (Task t: tasks) { Message m = new MimeMessage(session); if (t.getResul...
static boolean function(Session session, Task[] tasks) { AzeiPlugin.logger.entering(STR, STR); messages = new Vector<Message>(); String from = Config.getStringParameter(Config.EMAIL_FROM); for (Task t: tasks) { Message m = new MimeMessage(session); if (t.getResult() != null) { try { m.setFrom(new InternetAddress(from))...
/** * Parse tasks to emails * * @param session an open session to an email server * @param tasks the tasks to parse * @return */
Parse tasks to emails
parseTo
{ "repo_name": "sonata82/azei", "path": "src/de/remk0/azei/core/EmailParser.java", "license": "gpl-3.0", "size": 5151 }
[ "de.remk0.azei.AzeiPlugin", "de.remk0.azei.config.Config", "java.util.Date", "java.util.Vector", "javax.mail.Message", "javax.mail.MessagingException", "javax.mail.Session", "javax.mail.internet.AddressException", "javax.mail.internet.InternetAddress", "javax.mail.internet.MimeMessage" ]
import de.remk0.azei.AzeiPlugin; import de.remk0.azei.config.Config; import java.util.Date; import java.util.Vector; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.inte...
import de.remk0.azei.*; import de.remk0.azei.config.*; import java.util.*; import javax.mail.*; import javax.mail.internet.*;
[ "de.remk0.azei", "java.util", "javax.mail" ]
de.remk0.azei; java.util; javax.mail;
2,068,895
public static IAST Quantile(final IExpr list, final IExpr q) { return new AST2(Quantile, list, q); } /** * Returns the <code>q</code>-Quantile of <code>list</code> with the given quantile <code> * definition</code>. The default parameters for the quantile definition are <code>{{0,0},{1,0}}
static IAST function(final IExpr list, final IExpr q) { return new AST2(Quantile, list, q); } /** * Returns the <code>q</code>-Quantile of <code>list</code> with the given quantile <code> * definition</code>. The default parameters for the quantile definition are <code>{{0,0},{1,0}}
/** * Returns the <code>q</code>-Quantile of <code>list</code>. * * <p> * See: <a href= * "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/Quantile.md">Quantile</a> * * @param list * @param q * @return */
Returns the <code>q</code>-Quantile of <code>list</code>. See: Quantile
Quantile
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java", "license": "gpl-3.0", "size": 283472 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
140,888
static void install(String arg, Instrumentation inst) { appendInterceptorToBootstrap(arg, inst); AgentBuilder agentBuilder = createAgentBuilder(inst); agentBuilder.installOn(inst); }
static void install(String arg, Instrumentation inst) { appendInterceptorToBootstrap(arg, inst); AgentBuilder agentBuilder = createAgentBuilder(inst); agentBuilder.installOn(inst); }
/** * Installs the agent builder to the instrumentation API. * * @param arg the path to the interceptor JAR file. * @param inst instrumentation instance. */
Installs the agent builder to the instrumentation API
install
{ "repo_name": "excelsiorsoft/java-agents-experiments", "path": "agent/src/main/java/com/excelsiorsoft/securityfixer/agent/SecurityFixerAgent.java", "license": "apache-2.0", "size": 4008 }
[ "java.lang.instrument.Instrumentation", "net.bytebuddy.agent.builder.AgentBuilder" ]
import java.lang.instrument.Instrumentation; import net.bytebuddy.agent.builder.AgentBuilder;
import java.lang.instrument.*; import net.bytebuddy.agent.builder.*;
[ "java.lang", "net.bytebuddy.agent" ]
java.lang; net.bytebuddy.agent;
469,130
INDArray preOutput(INDArray x);
INDArray preOutput(INDArray x);
/** * Raw activations * @param x the input to transform * @return the raw activation * for this layer */
Raw activations
preOutput
{ "repo_name": "shuodata/deeplearning4j", "path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/api/Layer.java", "license": "apache-2.0", "size": 10105 }
[ "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,774,225
// If we've already created it... if (DEFAULT_ENV!=null) { return DEFAULT_ENV; } // In Java 5+, we can just get the environment directly try { DEFAULT_ENV = System.getenv(); } catch (SecurityException e) { // In an applet perhaps? DEFAULT_ENV = Collections.emptyMap(); } return D...
if (DEFAULT_ENV!=null) { return DEFAULT_ENV; } try { DEFAULT_ENV = System.getenv(); } catch (SecurityException e) { DEFAULT_ENV = Collections.emptyMap(); } return DEFAULT_ENV; }
/** * Gets the environment of the current process. Works with Java 1.4 as * well as 1.5+. * * @return A mapping of environment variable names to values. */
Gets the environment of the current process. Works with Java 1.4 as well as 1.5+
getDefaultEnvMap
{ "repo_name": "ZenHarbinger/RSTALanguageSupport", "path": "src/main/java/org/fife/rsta/ac/IOUtil.java", "license": "bsd-3-clause", "size": 4512 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
822,983
public static <B extends BaseTransientBottomBar<B>> void dismissTransientBottomBarAndWaitUntilFullyDismissed(@NonNull final B transientBottomBar) throws Throwable { performActionAndWaitUntilFullyDismissed(transientBottomBar, transientBottomBar::dismiss); }
static <B extends BaseTransientBottomBar<B>> void function(@NonNull final B transientBottomBar) throws Throwable { performActionAndWaitUntilFullyDismissed(transientBottomBar, transientBottomBar::dismiss); }
/** * Helper method that dismissed that specified {@link Snackbar} and waits until it has been fully * dismissed. */
Helper method that dismissed that specified <code>Snackbar</code> and waits until it has been fully dismissed
dismissTransientBottomBarAndWaitUntilFullyDismissed
{ "repo_name": "material-components/material-components-android", "path": "tests/javatests/com/google/android/material/testutils/SnackbarUtils.java", "license": "apache-2.0", "size": 4636 }
[ "androidx.annotation.NonNull", "com.google.android.material.snackbar.BaseTransientBottomBar" ]
import androidx.annotation.NonNull; import com.google.android.material.snackbar.BaseTransientBottomBar;
import androidx.annotation.*; import com.google.android.material.snackbar.*;
[ "androidx.annotation", "com.google.android" ]
androidx.annotation; com.google.android;
1,212,208
public void put(int index, Scriptable start, Object value) { if ((index < 0) && (index > 15)) return; Number num = (Number)value; matrix[index] = num.doubleValue(); }
void function(int index, Scriptable start, Object value) { if ((index < 0) && (index > 15)) return; Number num = (Number)value; matrix[index] = num.doubleValue(); }
/** * Set an indexed property. Only accept the first 16 values. * * @param index The index of the property to look up * @param start Theobject where the lookup began * @param value The value of the object to use */
Set an indexed property. Only accept the first 16 values
put
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/vrml/scripting/ecmascript/builtin/Matrix4.java", "license": "gpl-2.0", "size": 31680 }
[ "org.mozilla.javascript.Scriptable" ]
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
364,071
public void setXml(String content) throws SAXException, Exception { CDocumentBuilder builder = new CDocumentBuilder(); setXml(builder.parse(new ByteArrayInputStream(content.getBytes())).getDocumentElement()); }
void function(String content) throws SAXException, Exception { CDocumentBuilder builder = new CDocumentBuilder(); setXml(builder.parse(new ByteArrayInputStream(content.getBytes())).getDocumentElement()); }
/** * This must be a parseable xml document * @param content * @throws Exception * @throws SAXException */
This must be a parseable xml document
setXml
{ "repo_name": "jahnje/delcyon-capo", "path": "java/com/delcyon/capo/webapp/widgets/WXMLEditor.java", "license": "gpl-3.0", "size": 3001 }
[ "com.delcyon.capo.xml.cdom.CDocumentBuilder", "java.io.ByteArrayInputStream", "org.xml.sax.SAXException" ]
import com.delcyon.capo.xml.cdom.CDocumentBuilder; import java.io.ByteArrayInputStream; import org.xml.sax.SAXException;
import com.delcyon.capo.xml.cdom.*; import java.io.*; import org.xml.sax.*;
[ "com.delcyon.capo", "java.io", "org.xml.sax" ]
com.delcyon.capo; java.io; org.xml.sax;
1,928,944
public com.squareup.okhttp.Call getSectionsAsync(Integer limit, String startingAfter, String endingBefore, String count, final ApiCallback<SectionsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener pro...
com.squareup.okhttp.Call function(Integer limit, String startingAfter, String endingBefore, String count, final ApiCallback<SectionsResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
/** * (asynchronously) * Returns a list of sections * @param limit (optional) * @param startingAfter (optional) * @param endingBefore (optional) * @param count (optional) * @param callback The callback to be executed when the API call finishes * @return The request call ...
(asynchronously) Returns a list of sections
getSectionsAsync
{ "repo_name": "bclemenzi/clever-java", "path": "src/main/java/io/swagger/client/api/SectionsApi.java", "license": "gpl-3.0", "size": 57148 }
[ "io.swagger.client.ApiCallback", "io.swagger.client.ApiException", "io.swagger.client.ProgressRequestBody", "io.swagger.client.ProgressResponseBody", "io.swagger.client.model.SectionsResponse" ]
import io.swagger.client.ApiCallback; import io.swagger.client.ApiException; import io.swagger.client.ProgressRequestBody; import io.swagger.client.ProgressResponseBody; import io.swagger.client.model.SectionsResponse;
import io.swagger.client.*; import io.swagger.client.model.*;
[ "io.swagger.client" ]
io.swagger.client;
133,199
protected void setFixture(Allocated fixture) { this.fixture = fixture; }
void function(Allocated fixture) { this.fixture = fixture; }
/** * Sets the fixture for this Allocated test case. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */
Sets the fixture for this Allocated test case.
setFixture
{ "repo_name": "bmaggi/Papyrus-SysML11", "path": "tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/allocations/tests/AllocatedTest.java", "license": "epl-1.0", "size": 6622 }
[ "org.eclipse.papyrus.sysml.allocations.Allocated" ]
import org.eclipse.papyrus.sysml.allocations.Allocated;
import org.eclipse.papyrus.sysml.allocations.*;
[ "org.eclipse.papyrus" ]
org.eclipse.papyrus;
2,426,765
public static String nextExtra(Random random, int currentSize, int desiredAverageSize) { if (currentSize > desiredAverageSize) { return ""; } desiredAverageSize -= currentSize; int delta = (int) Math.round(desiredAverageSize * 0.2); int minSize = desiredAverageSize - delta; int desiredSi...
static String function(Random random, int currentSize, int desiredAverageSize) { if (currentSize > desiredAverageSize) { return ""; } desiredAverageSize -= currentSize; int delta = (int) Math.round(desiredAverageSize * 0.2); int minSize = desiredAverageSize - delta; int desiredSize = minSize + (delta == 0 ? 0 : random....
/** * Return a random {@code string} such that {@code currentSize + string.length()} is on average * {@code averageSize}. */
Return a random string such that currentSize + string.length() is on average averageSize
nextExtra
{ "repo_name": "tgroh/incubator-beam", "path": "sdks/java/nexmark/src/main/java/org/apache/beam/sdk/nexmark/sources/generator/model/StringsGenerator.java", "license": "apache-2.0", "size": 2607 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,578,732
public void setCacheManager(CacheManager cacheManager) { this._cacheManager = cacheManager; }
void function(CacheManager cacheManager) { this._cacheManager = cacheManager; }
/** * Sets the cache manager. * @param cacheManager the new value of the property */
Sets the cache manager
setCacheManager
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/master/DbSecurityMasterComponentFactory.java", "license": "apache-2.0", "size": 10981 }
[ "net.sf.ehcache.CacheManager" ]
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.*;
[ "net.sf.ehcache" ]
net.sf.ehcache;
994,666
@Override public void enterJavaLiteral(@NotNull BindingExpressionParser.JavaLiteralContext ctx) { }
@Override public void enterJavaLiteral(@NotNull BindingExpressionParser.JavaLiteralContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitIdentifier
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/databinding/parser/BindingExpressionBaseListener.java", "license": "gpl-3.0", "size": 14237 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
486,112
public Collection<HadoopInputSplit> input();
Collection<HadoopInputSplit> function();
/** * Gets collection of input splits for this job. * * @return Input splits. */
Gets collection of input splits for this job
input
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/hadoop/HadoopJob.java", "license": "apache-2.0", "size": 1960 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
531,911
public void doReturn_preview_grade_submission(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } grade_submission_option(data, "return"); } // doReturn_grade_preview_submission
void function(RunData data) { if (!"POST".equals(data.getRequest().getMethod())) { return; } grade_submission_option(data, STR); }
/** * Action is to return submission with or without grade from preview */
Action is to return submission with or without grade from preview
doReturn_preview_grade_submission
{ "repo_name": "rodriguezdevera/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 685575 }
[ "org.sakaiproject.cheftool.RunData" ]
import org.sakaiproject.cheftool.RunData;
import org.sakaiproject.cheftool.*;
[ "org.sakaiproject.cheftool" ]
org.sakaiproject.cheftool;
1,051,798
public MenuItemDef setMobileMenu(final Class<? extends Page> mobilePageClass, final int mobileMenuOrderNumber) { this.mobileMenuSupport = true; this.mobilePageClass = mobilePageClass; this.mobileMenuOrderNumber = mobileMenuOrderNumber; return this; }
MenuItemDef function(final Class<? extends Page> mobilePageClass, final int mobileMenuOrderNumber) { this.mobileMenuSupport = true; this.mobilePageClass = mobilePageClass; this.mobileMenuOrderNumber = mobileMenuOrderNumber; return this; }
/** * Adds the given menu entry as root menu entry. * * @param mobileParentEntry * @param mobileMenuOrderNumber * @return this for chaining. */
Adds the given menu entry as root menu entry
setMobileMenu
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-wicket/src/main/java/org/projectforge/web/MenuItemDef.java", "license": "gpl-3.0", "size": 19361 }
[ "org.apache.wicket.Page" ]
import org.apache.wicket.Page;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
932,607
public TimePeriod readTimePeriod(XMLStreamReader reader) throws XMLStreamException { boolean found = checkElementName(reader, "TimePeriod"); if (!found) throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); return this.read...
TimePeriod function(XMLStreamReader reader) throws XMLStreamException { boolean found = checkElementName(reader, STR); if (!found) throw new XMLStreamException(ERROR_INVALID_ELT + reader.getName() + errorLocationString(reader)); return this.readTimePeriodType(reader); }
/** * Read method for TimePeriod elements */
Read method for TimePeriod elements
readTimePeriod
{ "repo_name": "sensiasoft/lib-swe-common", "path": "swe-common-om/src/main/java/net/opengis/gml/v32/bind/XMLStreamBindings.java", "license": "mpl-2.0", "size": 77403 }
[ "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "net.opengis.gml.v32.TimePeriod" ]
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import net.opengis.gml.v32.TimePeriod;
import javax.xml.stream.*; import net.opengis.gml.v32.*;
[ "javax.xml", "net.opengis.gml" ]
javax.xml; net.opengis.gml;
563,974
protected IFigure setupContentPane(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { nodeShape.setLayoutManager(new FreeformLayout() {
IFigure function(IFigure nodeShape) { if (nodeShape.getLayoutManager() == null) { nodeShape.setLayoutManager(new FreeformLayout() {
/** * Default implementation treats passed figure as content pane. * Respects layout one may have set for generated figure. * @param nodeShape instance of generated figure class * @generated */
Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure
setupContentPane
{ "repo_name": "mikesligo/visGrid", "path": "ie.tcd.gmf.visGrid.diagram/src/visGrid/diagram/edit/parts/Regulator_configurationEditPart.java", "license": "gpl-3.0", "size": 61715 }
[ "org.eclipse.draw2d.FreeformLayout", "org.eclipse.draw2d.IFigure" ]
import org.eclipse.draw2d.FreeformLayout; import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
446,267
private void deleteRecordRows(Connection con, IdentifiedRecordTemplate template) throws SQLException { PreparedStatement delete = null; try { int internalId = template.getInternalId(); delete = con.prepareStatement(DELETE_TEMPLATE_RECORDS); delete.setInt(1, internalId); delete....
void function(Connection con, IdentifiedRecordTemplate template) throws SQLException { PreparedStatement delete = null; try { int internalId = template.getInternalId(); delete = con.prepareStatement(DELETE_TEMPLATE_RECORDS); delete.setInt(1, internalId); delete.execute(); } finally { DBUtil.close(delete); } }
/** * Deletes all the records built on this template. */
Deletes all the records built on this template
deleteRecordRows
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/record/GenericRecordSetManager.java", "license": "agpl-3.0", "size": 41104 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.silverpeas.core.persistence.jdbc.DBUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.silverpeas.core.persistence.jdbc.DBUtil;
import java.sql.*; import org.silverpeas.core.persistence.jdbc.*;
[ "java.sql", "org.silverpeas.core" ]
java.sql; org.silverpeas.core;
1,137,918
void forceDeleteTask(String taskId) throws TaskNotFoundException, InvalidStateException, NotAuthorizedException;
void forceDeleteTask(String taskId) throws TaskNotFoundException, InvalidStateException, NotAuthorizedException;
/** * Deletes the task with the given Id even if it is not completed. * * @param taskId The Id of the task to delete. * @throws TaskNotFoundException If the given Id does not refer to an existing task. * @throws InvalidStateException If the state of the referenced task is not Completed and * force...
Deletes the task with the given Id even if it is not completed
forceDeleteTask
{ "repo_name": "BVier/Taskana", "path": "lib/taskana-core/src/main/java/pro/taskana/TaskService.java", "license": "apache-2.0", "size": 17066 }
[ "pro.taskana.exceptions.InvalidStateException", "pro.taskana.exceptions.NotAuthorizedException", "pro.taskana.exceptions.TaskNotFoundException" ]
import pro.taskana.exceptions.InvalidStateException; import pro.taskana.exceptions.NotAuthorizedException; import pro.taskana.exceptions.TaskNotFoundException;
import pro.taskana.exceptions.*;
[ "pro.taskana.exceptions" ]
pro.taskana.exceptions;
2,278,566
public NetworkInterfaceDnsSettings withAppliedDnsServers(List<String> appliedDnsServers) { this.appliedDnsServers = appliedDnsServers; return this; }
NetworkInterfaceDnsSettings function(List<String> appliedDnsServers) { this.appliedDnsServers = appliedDnsServers; return this; }
/** * Set if the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs. * * @param appliedDnsServers the appliedDnsServers value to set ...
Set if the VM that uses this NIC is part of an Availability Set, then this list will have the union of all DNS servers from all NICs that are part of the Availability Set. This property is what is configured on each of those VMs
withAppliedDnsServers
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/NetworkInterfaceDnsSettings.java", "license": "mit", "size": 6124 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
438,128
VersionHistoryInfo getVersionHistory(Session session, NodeState vNode, NodeId copiedFrom) throws RepositoryException;
VersionHistoryInfo getVersionHistory(Session session, NodeState vNode, NodeId copiedFrom) throws RepositoryException;
/** * Returns information about the version history of the specified node. * If the given node does not already have an associated version history, * then an empty history is automatically created. This method should * only be called by code that already knows that the specified node * is versi...
Returns information about the version history of the specified node. If the given node does not already have an associated version history, then an empty history is automatically created. This method should only be called by code that already knows that the specified node is versionable
getVersionHistory
{ "repo_name": "Overseas-Student-Living/jackrabbit", "path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManager.java", "license": "apache-2.0", "size": 8107 }
[ "javax.jcr.RepositoryException", "javax.jcr.Session", "org.apache.jackrabbit.core.id.NodeId", "org.apache.jackrabbit.core.state.NodeState" ]
import javax.jcr.RepositoryException; import javax.jcr.Session; import org.apache.jackrabbit.core.id.NodeId; import org.apache.jackrabbit.core.state.NodeState;
import javax.jcr.*; import org.apache.jackrabbit.core.id.*; import org.apache.jackrabbit.core.state.*;
[ "javax.jcr", "org.apache.jackrabbit" ]
javax.jcr; org.apache.jackrabbit;
1,421,600
List<KeyType> findKeyTypes(Operator operator);
List<KeyType> findKeyTypes(Operator operator);
/** * Find <code>KeyType</code>(s). * * @param operator */
Find <code>KeyType</code>(s)
findKeyTypes
{ "repo_name": "eldevanjr/helianto", "path": "helianto-core/src/main/java/org/helianto/core/ContextMgr.java", "license": "apache-2.0", "size": 4089 }
[ "java.util.List", "org.helianto.core.domain.KeyType", "org.helianto.core.domain.Operator" ]
import java.util.List; import org.helianto.core.domain.KeyType; import org.helianto.core.domain.Operator;
import java.util.*; import org.helianto.core.domain.*;
[ "java.util", "org.helianto.core" ]
java.util; org.helianto.core;
1,588,873
Serializer<V> getValueSerializer();
Serializer<V> getValueSerializer();
/** * The serializer for value instances */
The serializer for value instances
getValueSerializer
{ "repo_name": "alexsnaps/ehcache3", "path": "core/src/main/java/org/ehcache/core/spi/store/Store.java", "license": "apache-2.0", "size": 29156 }
[ "org.ehcache.spi.serialization.Serializer" ]
import org.ehcache.spi.serialization.Serializer;
import org.ehcache.spi.serialization.*;
[ "org.ehcache.spi" ]
org.ehcache.spi;
671,472
public CassandraTableGetPropertiesOptions options() { return this.options; }
CassandraTableGetPropertiesOptions function() { return this.options; }
/** * Get the options value. * * @return the options value */
Get the options value
options
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_03_01/implementation/CassandraTableGetResultsInner.java", "license": "mit", "size": 2147 }
[ "com.microsoft.azure.management.cosmosdb.v2020_03_01.CassandraTableGetPropertiesOptions" ]
import com.microsoft.azure.management.cosmosdb.v2020_03_01.CassandraTableGetPropertiesOptions;
import com.microsoft.azure.management.cosmosdb.v2020_03_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,301,559
private Long getAclIDImpl(Pair<Long, NodeRef> nodePair) throws InvalidNodeRefException { Long nodeId = nodePair.getFirst(); Long aclID = nodeDAO.getNodeAclId(nodeId); // done return aclID; }
Long function(Pair<Long, NodeRef> nodePair) throws InvalidNodeRefException { Long nodeId = nodePair.getFirst(); Long aclID = nodeDAO.getNodeAclId(nodeId); return aclID; }
/** * Gets, converts and adds the intrinsic properties to the current node's properties */
Gets, converts and adds the intrinsic properties to the current node's properties
getAclIDImpl
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java", "license": "lgpl-3.0", "size": 141832 }
[ "org.alfresco.service.cmr.repository.InvalidNodeRefException", "org.alfresco.service.cmr.repository.NodeRef", "org.alfresco.util.Pair" ]
import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.util.Pair;
import org.alfresco.service.cmr.repository.*; import org.alfresco.util.*;
[ "org.alfresco.service", "org.alfresco.util" ]
org.alfresco.service; org.alfresco.util;
869,680
@ApiModelProperty(value = "The Docker client config for the service") public String getDockerClientConfig() { return dockerClientConfig; }
@ApiModelProperty(value = STR) String function() { return dockerClientConfig; }
/** * The Docker client config for the service. * @return dockerClientConfig */
The Docker client config for the service
getDockerClientConfig
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/api/records/Service.java", "license": "apache-2.0", "size": 14917 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,618,894
public static String getClientHost() throws ServerNotActiveException { Thread currThread = Thread.currentThread(); if (currThread instanceof RMIIncomingThread) { RMIIncomingThread incomingThread = (RMIIncomingThread) currThread; return incomingThread.getClientHost(); } else ...
static String function() throws ServerNotActiveException { Thread currThread = Thread.currentThread(); if (currThread instanceof RMIIncomingThread) { RMIIncomingThread incomingThread = (RMIIncomingThread) currThread; return incomingThread.getClientHost(); } else { throw new ServerNotActiveException( STR); } }
/** * Get the host of the calling client. The current thread must be an instance * of the {@link RMIIncomingThread}. * * @return the client host address * * @throws ServerNotActiveException if the current thread is not an instance * of the RMIIncomingThread. */
Get the host of the calling client. The current thread must be an instance of the <code>RMIIncomingThread</code>
getClientHost
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/rmi/server/RemoteServer.java", "license": "bsd-3-clause", "size": 3499 }
[ "gnu.java.rmi.server.RMIIncomingThread" ]
import gnu.java.rmi.server.RMIIncomingThread;
import gnu.java.rmi.server.*;
[ "gnu.java.rmi" ]
gnu.java.rmi;
1,485,189
public void calculateDigest(int digestPos, byte[] handshakeMessage, int handshakeOffset, byte[] key, int keyLen, byte[] digest, int digestOffset) { if (log.isTraceEnabled()) { log.trace("calculateDigest - digestPos: {} handshakeOffset: {} keyLen: {} digestOffset: {}", digestPos, handshakeOffse...
void function(int digestPos, byte[] handshakeMessage, int handshakeOffset, byte[] key, int keyLen, byte[] digest, int digestOffset) { if (log.isTraceEnabled()) { log.trace(STR, digestPos, handshakeOffset, keyLen, digestOffset); } int messageLen = Constants.HANDSHAKE_SIZE - DIGEST_LENGTH; byte[] message = new byte[messa...
/** * Calculates the digest given the its offset in the handshake data. * * @param digestPos digest position * @param handshakeMessage handshake message * @param handshakeOffset handshake message offset * @param key contains the key * @param keyLen the length of the key ...
Calculates the digest given the its offset in the handshake data
calculateDigest
{ "repo_name": "maritelle/red5-server-common", "path": "src/main/java/org/red5/server/net/rtmp/RTMPHandshake.java", "license": "apache-2.0", "size": 34812 }
[ "org.red5.server.net.rtmp.message.Constants" ]
import org.red5.server.net.rtmp.message.Constants;
import org.red5.server.net.rtmp.message.*;
[ "org.red5.server" ]
org.red5.server;
896,834
//----------------------------------------------------------------------- public final MetaProperty<DayCount> dayCount() { return _dayCount; }
final MetaProperty<DayCount> function() { return _dayCount; }
/** * The meta-property for the {@code dayCount} property. * @return the meta-property, not null */
The meta-property for the dayCount property
dayCount
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial-types/src/main/java/com/opengamma/financial/security/swap/SwapLeg.java", "license": "apache-2.0", "size": 16494 }
[ "com.opengamma.financial.convention.daycount.DayCount", "org.joda.beans.MetaProperty" ]
import com.opengamma.financial.convention.daycount.DayCount; import org.joda.beans.MetaProperty;
import com.opengamma.financial.convention.daycount.*; import org.joda.beans.*;
[ "com.opengamma.financial", "org.joda.beans" ]
com.opengamma.financial; org.joda.beans;
1,406,904
@Override public Adapter createDefaultEndPointOutputConnectorAdapter() { if (defaultEndPointOutputConnectorItemProvider == null) { defaultEndPointOutputConnectorItemProvider = new DefaultEndPointOutputConnectorItemProvider(this); } return defaultEndPointOutputConnectorItemPr...
Adapter function() { if (defaultEndPointOutputConnectorItemProvider == null) { defaultEndPointOutputConnectorItemProvider = new DefaultEndPointOutputConnectorItemProvider(this); } return defaultEndPointOutputConnectorItemProvider; } protected DropMediatorItemProvider dropMediatorItemProvider;
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.DefaultEndPointOutputConnector}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.DefaultEndPointOutputConnector</code>.
createDefaultEndPointOutputConnectorAdapter
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 339597 }
[ "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,300,263
public void add(int x) { if (arr == null) arr = new int[4]; else if (arr.length == idx) arr = Arrays.copyOf(arr, arr.length << 1); arr[idx++] = x; }
void function(int x) { if (arr == null) arr = new int[4]; else if (arr.length == idx) arr = Arrays.copyOf(arr, arr.length << 1); arr[idx++] = x; }
/** * Add element to this array. * @param x Value. */
Add element to this array
add
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/GridIntList.java", "license": "apache-2.0", "size": 13980 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,411,079
public List<Point2D> calculateLineSegments(Node node1, Node node2) { NodeDirection direction = getNodeDirection(node1, node2); switch (direction) { case WEST_EAST: return createHorizontalLineSegment(node1, node2, true); case EAST_WEST: return c...
List<Point2D> function(Node node1, Node node2) { NodeDirection direction = getNodeDirection(node1, node2); switch (direction) { case WEST_EAST: return createHorizontalLineSegment(node1, node2, true); case EAST_WEST: return createHorizontalLineSegment(node1, node2, false); case NORTH_SOUTH: return createVerticalLineSegm...
/** * Returns the line segments between two nodes. The orientations in relation * to each other and for each node, a side is chosen heuristically. * * @param node1 the first Node * @param node2 the second Node * @return the line segments */
Returns the line segments between two nodes. The orientations in relation to each other and for each node, a side is chosen heuristically
calculateLineSegments
{ "repo_name": "proyectos-fiuba-romera/nilledom", "path": "src/main/java/com/nilledom/draw/RectilinearLineBuilder.java", "license": "gpl-2.0", "size": 13131 }
[ "com.nilledom.draw.GeometryUtil", "java.awt.geom.Point2D", "java.util.List" ]
import com.nilledom.draw.GeometryUtil; import java.awt.geom.Point2D; import java.util.List;
import com.nilledom.draw.*; import java.awt.geom.*; import java.util.*;
[ "com.nilledom.draw", "java.awt", "java.util" ]
com.nilledom.draw; java.awt; java.util;
2,189,523
public static String[] generateSmap( JspCompilationContext ctxt, Node.Nodes pageNodes) throws IOException { // Scan the nodes for presence of Jasper generated inner classes PreScanVisitor psVisitor = new PreScanVisitor(); try { pageNodes.visit(psVisitor);...
static String[] function( JspCompilationContext ctxt, Node.Nodes pageNodes) throws IOException { PreScanVisitor psVisitor = new PreScanVisitor(); try { pageNodes.visit(psVisitor); } catch (JasperException ex) { } HashMap<String, SmapStratum> map = psVisitor.getMap(); SmapGenerator g = new SmapGenerator(); SmapStratum s...
/** * Generates an appropriate SMAP representing the current compilation * context. (JSR-045.) * * @param ctxt Current compilation context * @param pageNodes The current JSP page * @return a SMAP for the page */
Generates an appropriate SMAP representing the current compilation context. (JSR-045.)
generateSmap
{ "repo_name": "plumer/codana", "path": "tomcat_files/8.0.22/SmapUtil.java", "license": "mit", "size": 23849 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStreamWriter", "java.io.PrintWriter", "java.util.HashMap", "java.util.Iterator", "java.util.Map", "org.apache.jasper.JasperException", "org.apache.jasper.JspCompilationContext" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext;
import java.io.*; import java.util.*; import org.apache.jasper.*;
[ "java.io", "java.util", "org.apache.jasper" ]
java.io; java.util; org.apache.jasper;
1,928,294
public synchronized WSFile getProjectSegment(int index, int major, int minor) throws IhcExecption { final String soapQuery = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"h...
synchronized WSFile function(int index, int major, int minor) throws IhcExecption { final String soapQuery = STR1.0\STRUTF-8\"?>" + STRhttp: + STR + STRutcs\STRxsd:int\STR + STRutcs\STRxsd:int\STR + STRutcs\STRxsd:int\STR + STR + STR; String query = String.format(soapQuery, index, major, minor); openConnection(url); se...
/** * Query project segment data. * * @param index * segments index. * @param major * project major revision number. * @param minor * project minor revision number. * @return segments data. */
Query project segment data
getProjectSegment
{ "repo_name": "cschneider/openhab", "path": "bundles/binding/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/ws/IhcControllerService.java", "license": "epl-1.0", "size": 6102 }
[ "org.openhab.binding.ihc.ws.datatypes.WSFile" ]
import org.openhab.binding.ihc.ws.datatypes.WSFile;
import org.openhab.binding.ihc.ws.datatypes.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,237,770
private Entry readEntry(long offset, byte[] digestedRoutingKey, byte[] routingKey, boolean withData) throws IOException { if(offset >= Integer.MAX_VALUE) throw new IllegalArgumentException(); int cache = 0; boolean validCache = false; boolean likelyMatch = false; if(digestedRoutingKey != null && !slotFilte...
Entry function(long offset, byte[] digestedRoutingKey, byte[] routingKey, boolean withData) throws IOException { if(offset >= Integer.MAX_VALUE) throw new IllegalArgumentException(); int cache = 0; boolean validCache = false; boolean likelyMatch = false; if(digestedRoutingKey != null && !slotFilterDisabled) { cache = s...
/** * Read entry from disk. Before calling this function, you should acquire all required locks. * * @return <code>null</code> if and only if <code>routingKey</code> is not <code>null</code> and * the key does not match the entry. */
Read entry from disk. Before calling this function, you should acquire all required locks
readEntry
{ "repo_name": "NiteshBharadwaj/android-staging", "path": "src/freenet/store/saltedhash/SaltedHashFreenetStore.java", "license": "gpl-2.0", "size": 69331 }
[ "java.io.EOFException", "java.io.IOException", "java.nio.ByteBuffer", "java.util.Arrays" ]
import java.io.EOFException; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays;
import java.io.*; import java.nio.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
2,086,944
private RequestInterceptorChainWrapper authorizeAndGetInterceptorChain() throws YarnException { AMRMTokenIdentifier tokenIdentifier = YarnServerSecurityUtils.authorizeRequest(); return getInterceptorChain(tokenIdentifier); }
RequestInterceptorChainWrapper function() throws YarnException { AMRMTokenIdentifier tokenIdentifier = YarnServerSecurityUtils.authorizeRequest(); return getInterceptorChain(tokenIdentifier); }
/** * Authorizes the request and returns the application specific request * processing pipeline. * * @return the the intercepter wrapper instance * @throws YarnException if fails */
Authorizes the request and returns the application specific request processing pipeline
authorizeAndGetInterceptorChain
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/amrmproxy/AMRMProxyService.java", "license": "apache-2.0", "size": 32082 }
[ "org.apache.hadoop.yarn.exceptions.YarnException", "org.apache.hadoop.yarn.security.AMRMTokenIdentifier", "org.apache.hadoop.yarn.server.utils.YarnServerSecurityUtils" ]
import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.security.AMRMTokenIdentifier; import org.apache.hadoop.yarn.server.utils.YarnServerSecurityUtils;
import org.apache.hadoop.yarn.exceptions.*; import org.apache.hadoop.yarn.security.*; import org.apache.hadoop.yarn.server.utils.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,496,051
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String tapName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String tapName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, tapName), serviceCallback); }
/** * Deletes the specified virtual network tap. * * @param resourceGroupName The name of the resource group. * @param tapName The name of the virtual network tap. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentExcepti...
Deletes the specified virtual network tap
beginDeleteAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkTapsInner.java", "license": "mit", "size": 72534 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
373,389
@ApiOperation(value = "Search for audit trace", notes = "Returns a search result with that contains auti traces matching the request. Audit search is only accessible to user with role [ ADMIN ]") @RequestMapping(value = "/search", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produce...
@ApiOperation(value = STR, notes = STR) @RequestMapping(value = STR, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @PreAuthorize(STR) RestResponse<FacetedSearchResult> function(@RequestBody FilteredSearchRequest searchRequest) { FacetedSearchResul...
/** * Search for audit trace * * @param searchRequest The element that contains criterias for search operation. * @return A rest response that contains a {@link FacetedSearchResult} containing audit trace. */
Search for audit trace
search
{ "repo_name": "san-tak/alien4cloud", "path": "alien4cloud-security/src/main/java/alien4cloud/audit/rest/AuditController.java", "license": "apache-2.0", "size": 11531 }
[ "io.swagger.annotations.ApiOperation", "org.springframework.http.MediaType", "org.springframework.security.access.prepost.PreAuthorize", "org.springframework.web.bind.annotation.RequestBody", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ...
import io.swagger.annotations.ApiOperation; import org.springframework.http.MediaType; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotatio...
import io.swagger.annotations.*; import org.springframework.http.*; import org.springframework.security.access.prepost.*; import org.springframework.web.bind.annotation.*;
[ "io.swagger.annotations", "org.springframework.http", "org.springframework.security", "org.springframework.web" ]
io.swagger.annotations; org.springframework.http; org.springframework.security; org.springframework.web;
2,816,280
public void cargarListaReproduccion(String path){ try { listaReproduccion.cargarXML(path); } catch (FileNotFoundException e) { e.printStackTrace(); } }
void function(String path){ try { listaReproduccion.cargarXML(path); } catch (FileNotFoundException e) { e.printStackTrace(); } }
/** * Llama a la lista de repoduccion para que cargue el contenido de una * lista guardada * @param path */
Llama a la lista de repoduccion para que cargue el contenido de una lista guardada
cargarListaReproduccion
{ "repo_name": "viccuad/ISplayer", "path": "src/is2011/reproductor/controlador/ControladorReproductor.java", "license": "mit", "size": 13093 }
[ "java.io.FileNotFoundException" ]
import java.io.FileNotFoundException;
import java.io.*;
[ "java.io" ]
java.io;
1,140,781
public void alterPartition(String dbName, String tblName, Partition newPart) throws InvalidOperationException, HiveException { try { // Remove the DDL time so that it gets refreshed if (newPart.getParameters() != null) { newPart.getParameters().remove(hive_metastoreConstants.DDL_TIME); ...
void function(String dbName, String tblName, Partition newPart) throws InvalidOperationException, HiveException { try { if (newPart.getParameters() != null) { newPart.getParameters().remove(hive_metastoreConstants.DDL_TIME); } newPart.checkValidity(); getMSC().alter_partition(dbName, tblName, newPart.getTPartition()); ...
/** * Updates the existing partition metadata with the new metadata. * * @param dbName * name of the exiting table's database * @param tblName * name of the existing table * @param newPart * new partition * @throws InvalidOperationException * if the cha...
Updates the existing partition metadata with the new metadata
alterPartition
{ "repo_name": "wangbin83-gmail-com/hive-1.1.0-cdh5.4.8", "path": "ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java", "license": "apache-2.0", "size": 117422 }
[ "org.apache.hadoop.hive.metastore.api.InvalidOperationException", "org.apache.hadoop.hive.metastore.api.MetaException", "org.apache.thrift.TException" ]
import org.apache.hadoop.hive.metastore.api.InvalidOperationException; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.thrift.TException;
import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*;
[ "org.apache.hadoop", "org.apache.thrift" ]
org.apache.hadoop; org.apache.thrift;
1,549,326
List<JID> getNodesConnected();
List<JID> getNodesConnected();
/** * The method returns all cluster nodes currently connected to the cluster node. * * @return List of all cluster nodes currently connected to the cluster node. */
The method returns all cluster nodes currently connected to the cluster node
getNodesConnected
{ "repo_name": "caiyingyuan/tigase71", "path": "src/main/java/tigase/cluster/strategy/ClusteringStrategyIfc.java", "license": "agpl-3.0", "size": 7410 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,002,310
private boolean incompleteAuthSettings(final String username, final String password, final String email) { return (!isNullOrEmpty(username) || !isNullOrEmpty(password) || !isNullOrEmpty(email)) && (isNullOrEmpty(username) || isNullOrEmpty(password) || isNullOrEm...
boolean function(final String username, final String password, final String email) { return (!isNullOrEmpty(username) !isNullOrEmpty(password) !isNullOrEmpty(email)) && (isNullOrEmpty(username) isNullOrEmpty(password) isNullOrEmpty(email)); }
/** * Checks for incomplete private Docker registry authorization settings. * @param username Auth username. * @param password Auth password. * @param email Auth email. * @return boolean true if any of the three credentials are present but not all. False otherwise. */
Checks for incomplete private Docker registry authorization settings
incompleteAuthSettings
{ "repo_name": "davidkarlsen/docker-maven-plugin", "path": "src/main/java/com/spotify/docker/AbstractDockerMojo.java", "license": "apache-2.0", "size": 5911 }
[ "com.google.common.base.Strings" ]
import com.google.common.base.Strings;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,685,692
public Builder addAllBindings(List<Binding> bindings) { if (this.bindings == null) { this.bindings = new LinkedList<>(); } this.bindings.addAll(bindings); return this; }
Builder function(List<Binding> bindings) { if (this.bindings == null) { this.bindings = new LinkedList<>(); } this.bindings.addAll(bindings); return this; }
/** * Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to * specify bindings. */
Flatten Policy to create a backwacd compatible wire-format. Deprecated. Use 'policy' to specify bindings
addAllBindings
{ "repo_name": "vam-google/google-cloud-java", "path": "google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java", "license": "apache-2.0", "size": 7177 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
446,545
// Does not appear to be used externally; called by #loadProjectFile() public static boolean insertLoadedTree(final int id, final HashTree tree, final boolean merging) throws IllegalUserActionException { if (tree == null) { throw new IllegalUserActionException("Empty TestPlan or error readin...
static boolean function(final int id, final HashTree tree, final boolean merging) throws IllegalUserActionException { if (tree == null) { throw new IllegalUserActionException(STR); } final boolean isTestPlan = tree.getArray()[0] instanceof TestPlan; final GuiPackage guiInstance = GuiPackage.getInstance(); if(isTestPlan...
/** * Inserts (or merges) the tree into the GUI. * Does not check if the previous tree has been saved. * Clears the existing GUI test plan if we are inserting a complete plan. * @param id the id for the ActionEvent that is created * @param tree the tree to load * @param merging true if the...
Inserts (or merges) the tree into the GUI. Does not check if the previous tree has been saved. Clears the existing GUI test plan if we are inserting a complete plan
insertLoadedTree
{ "repo_name": "max3163/jmeter", "path": "src/core/org/apache/jmeter/gui/action/Load.java", "license": "apache-2.0", "size": 10602 }
[ "java.awt.event.ActionEvent", "javax.swing.JTree", "javax.swing.tree.TreePath", "org.apache.jmeter.exceptions.IllegalUserActionException", "org.apache.jmeter.gui.GuiPackage", "org.apache.jmeter.gui.tree.JMeterTreeNode", "org.apache.jmeter.gui.util.FocusRequester", "org.apache.jmeter.gui.util.MenuFacto...
import java.awt.event.ActionEvent; import javax.swing.JTree; import javax.swing.tree.TreePath; import org.apache.jmeter.exceptions.IllegalUserActionException; import org.apache.jmeter.gui.GuiPackage; import org.apache.jmeter.gui.tree.JMeterTreeNode; import org.apache.jmeter.gui.util.FocusRequester; import org.apache.jm...
import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*; import org.apache.jmeter.exceptions.*; import org.apache.jmeter.gui.*; import org.apache.jmeter.gui.tree.*; import org.apache.jmeter.gui.util.*; import org.apache.jmeter.testelement.*; import org.apache.jorphan.collections.*;
[ "java.awt", "javax.swing", "org.apache.jmeter", "org.apache.jorphan" ]
java.awt; javax.swing; org.apache.jmeter; org.apache.jorphan;
2,132,598
void quoteDateLiteral( StringBuilder buf, Date value);
void quoteDateLiteral( StringBuilder buf, Date value);
/** * Appends to a buffer a date literal. * * <p>For example, in the default dialect, * <code>quoteStringLiteral(buf, "1969-03-17")</code> * appends <code>DATE '1969-03-17'</code>. * * @param buf Buffer to append to * @param value Literal */
Appends to a buffer a date literal. For example, in the default dialect, <code>quoteStringLiteral(buf, "1969-03-17")</code> appends <code>DATE '1969-03-17'</code>
quoteDateLiteral
{ "repo_name": "citycloud-bigdata/mondrian", "path": "src/main/mondrian/spi/Dialect.java", "license": "epl-1.0", "size": 40288 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,223,174
public void post(WatchEvent<?> event) { if (!events.offer(event)) { overflow.incrementAndGet(); } }
void function(WatchEvent<?> event) { if (!events.offer(event)) { overflow.incrementAndGet(); } }
/** * Posts the given event to this key. After posting one or more events, {@link #signal()} must * be called to cause the key to be enqueued with the watch service. */
Posts the given event to this key. After posting one or more events, <code>#signal()</code> must be called to cause the key to be enqueued with the watch service
post
{ "repo_name": "thejavamonk/jimfs", "path": "jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java", "license": "apache-2.0", "size": 9224 }
[ "java.nio.file.WatchEvent" ]
import java.nio.file.WatchEvent;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,386,617
public void remove(final boolean removeFromSession) { if (removeFromSession) { this.context.setSessionAttribute(Pac4jConstants.USER_PROFILE, null); } this.context.setRequestAttribute(Pac4jConstants.USER_PROFILE, null); }
void function(final boolean removeFromSession) { if (removeFromSession) { this.context.setSessionAttribute(Pac4jConstants.USER_PROFILE, null); } this.context.setRequestAttribute(Pac4jConstants.USER_PROFILE, null); }
/** * Remove the current user profile. * * @param removeFromSession if the user profile must be removed from session */
Remove the current user profile
remove
{ "repo_name": "ganquan0910/pac4j", "path": "pac4j-core/src/main/java/org/pac4j/core/profile/ProfileManager.java", "license": "apache-2.0", "size": 3053 }
[ "org.pac4j.core.context.Pac4jConstants" ]
import org.pac4j.core.context.Pac4jConstants;
import org.pac4j.core.context.*;
[ "org.pac4j.core" ]
org.pac4j.core;
999,554
public static void initSampleVariables() { String vars = JMeterUtils.getProperty(SAMPLE_VARIABLES); variableNames=vars != null ? vars.split(",") : new String[0]; if (log.isInfoEnabled()) { log.info("List of sample_variables: {}", Arrays.toString(variableNames)); } } ...
static void function() { String vars = JMeterUtils.getProperty(SAMPLE_VARIABLES); variableNames=vars != null ? vars.split(",") : new String[0]; if (log.isInfoEnabled()) { log.info(STR, Arrays.toString(variableNames)); } } private final SampleResult result; private final String threadGroup; private final String hostname...
/** * Set up the additional variable names to be saved * from the value in the {@link #SAMPLE_VARIABLES} property */
Set up the additional variable names to be saved from the value in the <code>#SAMPLE_VARIABLES</code> property
initSampleVariables
{ "repo_name": "ufctester/apache-jmeter", "path": "src/core/org/apache/jmeter/samplers/SampleEvent.java", "license": "apache-2.0", "size": 7679 }
[ "java.util.Arrays", "org.apache.jmeter.threads.JMeterVariables", "org.apache.jmeter.util.JMeterUtils" ]
import java.util.Arrays; import org.apache.jmeter.threads.JMeterVariables; import org.apache.jmeter.util.JMeterUtils;
import java.util.*; import org.apache.jmeter.threads.*; import org.apache.jmeter.util.*;
[ "java.util", "org.apache.jmeter" ]
java.util; org.apache.jmeter;
2,835,339
public static byte[] toArray(ByteBuffer buffer, int offset, int size) { byte[] dest = new byte[size]; if (buffer.hasArray()) { System.arraycopy(buffer.array(), buffer.position() + buffer.arrayOffset() + offset, dest, 0, size); } else { int pos = buffer.position(); ...
static byte[] function(ByteBuffer buffer, int offset, int size) { byte[] dest = new byte[size]; if (buffer.hasArray()) { System.arraycopy(buffer.array(), buffer.position() + buffer.arrayOffset() + offset, dest, 0, size); } else { int pos = buffer.position(); buffer.position(pos + offset); buffer.get(dest); buffer.posit...
/** * Read a byte array from the given offset and size in the buffer * @param buffer The buffer to read from * @param offset The offset relative to the current position of the buffer * @param size The number of bytes to read into the array */
Read a byte array from the given offset and size in the buffer
toArray
{ "repo_name": "ErikKringen/kafka", "path": "clients/src/main/java/org/apache/kafka/common/utils/Utils.java", "license": "apache-2.0", "size": 29946 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,229,212
private Map<String, String>readParamValues(String param) { Map<String, String> defVals = new HashMap<String, String>(); String vals = Val.chkStr(defaultParamValues); String kvp[] = vals.split(DELIMETER_KVP); for (int i = 0; kvp != null && i < kvp.length; i++) { String kv[] = (kvp[i]).split(DELIMETER_KV); ...
private Map<String, String>readParamValues(String param) { Map<String, String> defVals = new HashMap<String, String>(); String vals = Val.chkStr(defaultParamValues); String kvp[] = vals.split(DELIMETER_KVP); for (int i = 0; kvp != null && i < kvp.length; i++) { String kv[] = (kvp[i]).split(DELIMETER_KV); if(kv == null)...
/** * Read param values as maps. * * @param param the param * @return the map */
Read param values as maps
readParamValues
{ "repo_name": "treejames/GeoprocessingAppstore", "path": "src/com/esri/gpt/catalog/search/SearchEngineRest.java", "license": "apache-2.0", "size": 22038 }
[ "com.esri.gpt.framework.util.Val", "java.util.HashMap", "java.util.Map" ]
import com.esri.gpt.framework.util.Val; import java.util.HashMap; import java.util.Map;
import com.esri.gpt.framework.util.*; import java.util.*;
[ "com.esri.gpt", "java.util" ]
com.esri.gpt; java.util;
1,497,218
@Override public void addChild(Container child) { if (!(child instanceof Context)) { throw new IllegalArgumentException (sm.getString("standardHost.notContext")); } child.addLifecycleListener(new MemoryLeakTrackingListener()); // Avoid NPE for case ...
void function(Container child) { if (!(child instanceof Context)) { throw new IllegalArgumentException (sm.getString(STR)); } child.addLifecycleListener(new MemoryLeakTrackingListener()); Context context = (Context) child; if (context.getPath() == null) { ContextName cn = new ContextName(context.getDocBase(), true); co...
/** * Add a child Container, only if the proposed child is an implementation * of Context. * * @param child Child container to be added */
Add a child Container, only if the proposed child is an implementation of Context
addChild
{ "repo_name": "apache/tomcat", "path": "java/org/apache/catalina/core/StandardHost.java", "license": "apache-2.0", "size": 25379 }
[ "org.apache.catalina.Container", "org.apache.catalina.Context", "org.apache.catalina.util.ContextName" ]
import org.apache.catalina.Container; import org.apache.catalina.Context; import org.apache.catalina.util.ContextName;
import org.apache.catalina.*; import org.apache.catalina.util.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,362,574
public synchronized void start() { if (isRunning()) { return; } try { if (getLocalSocks5ProxyPort() < 0) { int port = Math.abs(getLocalSocks5ProxyPort()); for (int i = 0; i < 65535 - port; i++) { try { ...
synchronized void function() { if (isRunning()) { return; } try { if (getLocalSocks5ProxyPort() < 0) { int port = Math.abs(getLocalSocks5ProxyPort()); for (int i = 0; i < 65535 - port; i++) { try { this.serverSocket = new ServerSocket(port + i); break; } catch (IOException e) { } } } else { this.serverSocket = new Serv...
/** * Starts the local SOCKS5 proxy server. If it is already running, this method does nothing. */
Starts the local SOCKS5 proxy server. If it is already running, this method does nothing
start
{ "repo_name": "esl/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java", "license": "apache-2.0", "size": 18110 }
[ "java.io.IOException", "java.net.ServerSocket", "java.util.logging.Level" ]
import java.io.IOException; import java.net.ServerSocket; import java.util.logging.Level;
import java.io.*; import java.net.*; import java.util.logging.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
1,149,332
public long getDebouncePeriod() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_DEBOUNCE_PERIOD, this); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - 8); bb.order(ByteOrder.LITTLE_ENDIAN); l...
long function() throws TimeoutException, NotConnectedException { ByteBuffer bb = ipcon.createRequestPacket((byte)8, FUNCTION_GET_DEBOUNCE_PERIOD, this); byte[] response = sendRequest(bb.array()); bb = ByteBuffer.wrap(response, 8, response.length - 8); bb.order(ByteOrder.LITTLE_ENDIAN); long debounce = IPConnection.unsi...
/** * Returns the debounce period as set by {@link BrickletRotaryEncoder#setDebouncePeriod(long)}. */
Returns the debounce period as set by <code>BrickletRotaryEncoder#setDebouncePeriod(long)</code>
getDebouncePeriod
{ "repo_name": "jaggr2/ch.bfh.fbi.mobiComp.17herz", "path": "com.tinkerforge/src/com/tinkerforge/BrickletRotaryEncoder.java", "license": "apache-2.0", "size": 13852 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,542,173
public Response newResponse(final String id, final ZonedDateTime issueInstant, final String recipient, final WebApplicationService service) { final Response samlResponse = newSamlObject(Response.class); samlResponse.setID(id); samlResponse.setIssueInstant(Dat...
Response function(final String id, final ZonedDateTime issueInstant, final String recipient, final WebApplicationService service) { final Response samlResponse = newSamlObject(Response.class); samlResponse.setID(id); samlResponse.setIssueInstant(DateTimeUtils.dateTimeOf(issueInstant)); samlResponse.setVersion(SAMLVersi...
/** * Create a new SAML response object. * * @param id the id * @param issueInstant the issue instant * @param recipient the recipient * @param service the service * @return the response */
Create a new SAML response object
newResponse
{ "repo_name": "pmarasse/cas", "path": "support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/util/Saml10ObjectBuilder.java", "license": "apache-2.0", "size": 12023 }
[ "java.time.ZonedDateTime", "org.apereo.cas.authentication.principal.WebApplicationService", "org.apereo.cas.util.DateTimeUtils", "org.opensaml.saml.common.SAMLVersion", "org.opensaml.saml.saml1.core.Response" ]
import java.time.ZonedDateTime; import org.apereo.cas.authentication.principal.WebApplicationService; import org.apereo.cas.util.DateTimeUtils; import org.opensaml.saml.common.SAMLVersion; import org.opensaml.saml.saml1.core.Response;
import java.time.*; import org.apereo.cas.authentication.principal.*; import org.apereo.cas.util.*; import org.opensaml.saml.common.*; import org.opensaml.saml.saml1.core.*;
[ "java.time", "org.apereo.cas", "org.opensaml.saml" ]
java.time; org.apereo.cas; org.opensaml.saml;
1,603,006
public void generateCardFile(SecureRandom random);
void function(SecureRandom random);
/** * Generate a card file for the match. * Does nothing if card file already exists. * @param random A source of randomness. */
Generate a card file for the match. Does nothing if card file already exists
generateCardFile
{ "repo_name": "secondfoundation/Second-Foundation-Src", "path": "src/turk/src/interface/poker_pro/src/ca/ualberta/cs/poker/free/tournament/MatchInterface.java", "license": "lgpl-2.1", "size": 1845 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
2,749,087
public static Time convertStringToTime(String str, boolean am) { if(StringUtils.trimToNull(str) == null) { return null; } // Set the am/pm flag to ensure that the time is parsed properly if(am) { str = str + " " + new DateFormatSymbols(new ResourceLoader().getLocale()).getAmPmStrings()[0]; } else { ...
static Time function(String str, boolean am) { if(StringUtils.trimToNull(str) == null) { return null; } if(am) { str = str + " " + new DateFormatSymbols(new ResourceLoader().getLocale()).getAmPmStrings()[0]; } else { str = str + " " + new DateFormatSymbols(new ResourceLoader().getLocale()).getAmPmStrings()[1]; } String...
/** * Converts a string and a boolean (am) into a java.sql.Time object. * * @param str * @param am * @return */
Converts a string and a boolean (am) into a java.sql.Time object
convertStringToTime
{ "repo_name": "rodriguezdevera/sakai", "path": "sections/sections-app-util/src/java/org/sakaiproject/tool/section/jsf/JsfUtil.java", "license": "apache-2.0", "size": 8421 }
[ "java.sql.Time", "java.text.DateFormatSymbols", "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date", "org.apache.commons.lang.StringUtils", "org.sakaiproject.jsf.util.ConversionUtil", "org.sakaiproject.time.cover.TimeService", "org.sakaiproject.util.ResourceLoader" ]
import java.sql.Time; import java.text.DateFormatSymbols; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.commons.lang.StringUtils; import org.sakaiproject.jsf.util.ConversionUtil; import org.sakaiproject.time.cover.TimeService; import org.sakaiproject.util.R...
import java.sql.*; import java.text.*; import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.jsf.util.*; import org.sakaiproject.time.cover.*; import org.sakaiproject.util.*;
[ "java.sql", "java.text", "java.util", "org.apache.commons", "org.sakaiproject.jsf", "org.sakaiproject.time", "org.sakaiproject.util" ]
java.sql; java.text; java.util; org.apache.commons; org.sakaiproject.jsf; org.sakaiproject.time; org.sakaiproject.util;
2,579,296
public Builder maxConnectionIdleTime(final long maxConnectionIdleTime, final TimeUnit timeUnit) { this.maxConnectionIdleTimeMS = MILLISECONDS.convert(maxConnectionIdleTime, timeUnit); return this; }
Builder function(final long maxConnectionIdleTime, final TimeUnit timeUnit) { this.maxConnectionIdleTimeMS = MILLISECONDS.convert(maxConnectionIdleTime, timeUnit); return this; }
/** * The maximum idle time of a pooled connection. A zero value indicates no limit to the idle time. A pooled connection that has * exceeded its idle time will be closed and replaced when necessary by a new connection. * * @param maxConnectionIdleTime the maximum time a connection...
The maximum idle time of a pooled connection. A zero value indicates no limit to the idle time. A pooled connection that has exceeded its idle time will be closed and replaced when necessary by a new connection
maxConnectionIdleTime
{ "repo_name": "rozza/mongo-java-driver", "path": "driver-core/src/main/com/mongodb/connection/ConnectionPoolSettings.java", "license": "apache-2.0", "size": 19715 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,697,985
public int[] getReadComicsLegacy() { String r = getSharedPrefs().getString(COMIC_READ, ""); if (r.equals("")) return new int[0]; String[] re = r.split(","); int[] read = new int[re.length]; for (int i = 0; i < re.length; i++) read[i] = Integer.parseInt...
int[] function() { String r = getSharedPrefs().getString(COMIC_READ, STRSTR,"); int[] read = new int[re.length]; for (int i = 0; i < re.length; i++) read[i] = Integer.parseInt(re[i]); Arrays.sort(read); return read; }
/** * Gets an array of read comics * @return an int array containing the numbers of all read comics */
Gets an array of read comics
getReadComicsLegacy
{ "repo_name": "T-Rex96/Easy_xkcd", "path": "app/src/main/java/de/tap/easy_xkcd/database/DatabaseManager.java", "license": "apache-2.0", "size": 19033 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,475,558
public RVFDatum<L, F> scaleDatum(RVFDatum<L, F> datum) { // scale this dataset before scaling the datum if (minValues == null || maxValues == null) scaleFeatures(); Counter<F> scaledFeatures = new ClassicCounter<F>(); for (F feature : datum.asFeatures()) { int fID = this.featureIndex.index...
RVFDatum<L, F> function(RVFDatum<L, F> datum) { if (minValues == null maxValues == null) scaleFeatures(); Counter<F> scaledFeatures = new ClassicCounter<F>(); for (F feature : datum.asFeatures()) { int fID = this.featureIndex.indexOf(feature); if (fID >= 0) { double oldVal = datum.asFeaturesCounter().getCount(feature);...
/** * Scales the values of each feature linearly using the min and max values * found in the training set. NOTE1: Not guaranteed to be between 0 and 1 for * a test datum. NOTE2: Also filters out features from the datum that are not * seen at training time. * * @param datum * @return a new datum ...
Scales the values of each feature linearly using the min and max values found in the training set. NOTE1: Not guaranteed to be between 0 and 1 for a test datum. NOTE2: Also filters out features from the datum that are not seen at training time
scaleDatum
{ "repo_name": "sanjithuom/Stanford-corenlp", "path": "src/edu/stanford/nlp/classify/RVFDataset.java", "license": "gpl-2.0", "size": 33431 }
[ "edu.stanford.nlp.ling.RVFDatum", "edu.stanford.nlp.stats.ClassicCounter", "edu.stanford.nlp.stats.Counter" ]
import edu.stanford.nlp.ling.RVFDatum; import edu.stanford.nlp.stats.ClassicCounter; import edu.stanford.nlp.stats.Counter;
import edu.stanford.nlp.ling.*; import edu.stanford.nlp.stats.*;
[ "edu.stanford.nlp" ]
edu.stanford.nlp;
1,735,194
private void compareResult(String f1, String f2) throws InterruptedException { int[] drawableBands = {0, 1, 2}; RasterDataset d1 = null; RasterDataset d2 = null; try { d1 = RasterDataset.open(null, f1); d2 = RasterDataset.open(null, f2); } catch (NotSupportedExtensionException e) { e.printStackTra...
void function(String f1, String f2) throws InterruptedException { int[] drawableBands = {0, 1, 2}; RasterDataset d1 = null; RasterDataset d2 = null; try { d1 = RasterDataset.open(null, f1); d2 = RasterDataset.open(null, f2); } catch (NotSupportedExtensionException e) { e.printStackTrace(); return; } catch (RasterDriver...
/** * Compara dos ficheros raster * @param f1 * @param f2 * @throws InterruptedException */
Compara dos ficheros raster
compareResult
{ "repo_name": "iCarto/siga", "path": "libRaster/src-test/org/gvsig/raster/buffer/TestBufferInterpolation.java", "license": "gpl-3.0", "size": 8717 }
[ "org.gvsig.raster.dataset.IBuffer", "org.gvsig.raster.dataset.InvalidSetViewException", "org.gvsig.raster.dataset.NotSupportedExtensionException", "org.gvsig.raster.dataset.RasterDataset", "org.gvsig.raster.dataset.io.RasterDriverException" ]
import org.gvsig.raster.dataset.IBuffer; import org.gvsig.raster.dataset.InvalidSetViewException; import org.gvsig.raster.dataset.NotSupportedExtensionException; import org.gvsig.raster.dataset.RasterDataset; import org.gvsig.raster.dataset.io.RasterDriverException;
import org.gvsig.raster.dataset.*; import org.gvsig.raster.dataset.io.*;
[ "org.gvsig.raster" ]
org.gvsig.raster;
1,065,612
public static String[] getNames(Object object) { if (object == null) { return null; } Class<? extends Object> klass = object.getClass(); Field[] fields = klass.getFields(); int length = fields.length; if (length == 0) { return null; } ...
static String[] function(Object object) { if (object == null) { return null; } Class<? extends Object> klass = object.getClass(); Field[] fields = klass.getFields(); int length = fields.length; if (length == 0) { return null; } String[] names = new String[length]; for (int i = 0; i < length; i += 1) { names[i] = fields...
/** * Get an array of field names from an Object. * * @return An array of field names, or null if there are no names. */
Get an array of field names from an Object
getNames
{ "repo_name": "316181444/GameServerFramework", "path": "src/main/java/org/json/JSONObject.java", "license": "apache-2.0", "size": 57653 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
56,052