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 static String readStreamContents(InputStream is, String encoding) {
try {
return readReaderContents(new InputStreamReader(is, encoding));
} catch (UnsupportedEncodingException e) {
return null;
}
} | static String function(InputStream is, String encoding) { try { return readReaderContents(new InputStreamReader(is, encoding)); } catch (UnsupportedEncodingException e) { return null; } } | /**
* Reads the contents of the given input stream into a string using the given encoding.
* Returns null if an error occurred.
*/ | Reads the contents of the given input stream into a string using the given encoding. Returns null if an error occurred | readStreamContents | {
"repo_name": "rohitmohan96/ceylon-ide-eclipse",
"path": "plugins/com.redhat.ceylon.eclipse.ui/src/com/redhat/ceylon/eclipse/code/editor/StreamUtils.java",
"license": "epl-1.0",
"size": 2942
} | [
"java.io.InputStream",
"java.io.InputStreamReader",
"java.io.UnsupportedEncodingException"
] | import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 491,522 |
private int rebuildIndex(XWikiContext context)
{
// only clear index if it is asked
if (this.clearIndex)
this.indexUpdater.cleanIndex();
int retval = 0;
Collection<String> wikiServers;
XWiki xwiki = context.getWiki();
if (xwiki.isVirtualMode()) {
... | int function(XWikiContext context) { if (this.clearIndex) this.indexUpdater.cleanIndex(); int retval = 0; Collection<String> wikiServers; XWiki xwiki = context.getWiki(); if (xwiki.isVirtualMode()) { wikiServers = findWikiServers(context); if (LOG.isDebugEnabled()) { LOG.debug(STR + wikiServers.size() + STR); for (Stri... | /**
* First empties the index, then fetches all Documents, their translations and their attachments
* for re-addition to the index.
*
* @param context
* @return total number of documents and attachments successfully added to the indexer queue, -1
* when errors occured.
*/ | First empties the index, then fetches all Documents, their translations and their attachments for re-addition to the index | rebuildIndex | {
"repo_name": "i2geo/i2gCurrikiFork",
"path": "plugins/lucene/src/main/java/com/xpn/xwiki/plugin/lucene/IndexRebuilder.java",
"license": "lgpl-2.1",
"size": 15546
} | [
"com.xpn.xwiki.XWiki",
"com.xpn.xwiki.XWikiContext",
"java.util.ArrayList",
"java.util.Collection"
] | import com.xpn.xwiki.XWiki; import com.xpn.xwiki.XWikiContext; import java.util.ArrayList; import java.util.Collection; | import com.xpn.xwiki.*; import java.util.*; | [
"com.xpn.xwiki",
"java.util"
] | com.xpn.xwiki; java.util; | 1,904,890 |
private static double getLength(BoundingBox boundingBox) {
double width = boundingBox.getMaxLongitude()
- boundingBox.getMinLongitude();
double height = boundingBox.getMaxLatitude()
- boundingBox.getMinLatitude();
double length = Math.min(width, height);
return length;
} | static double function(BoundingBox boundingBox) { double width = boundingBox.getMaxLongitude() - boundingBox.getMinLongitude(); double height = boundingBox.getMaxLatitude() - boundingBox.getMinLatitude(); double length = Math.min(width, height); return length; } | /**
* Get the length of the bounding box
*
* @param boundingBox
* @return length
*/ | Get the length of the bounding box | getLength | {
"repo_name": "restjohn/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/io/TileWriter.java",
"license": "mit",
"size": 21529
} | [
"mil.nga.geopackage.BoundingBox"
] | import mil.nga.geopackage.BoundingBox; | import mil.nga.geopackage.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 2,689,942 |
public static String GetResource(HttpSession session, String key) throws MissingResourceException {
if (key == null) {
throw new IllegalArgumentException("key");
}
String locale = "en";
if (session != null) {
... | static String function(HttpSession session, String key) throws MissingResourceException { if (key == null) { throw new IllegalArgumentException("key"); } String locale = "en"; if (session != null) { locale = (String) session.getAttribute(STR); } if (locale==null) locale = "en"; return GetResource(locale, key); } | /**
* returns a localized string in the locale defined within
* session.getAttribute("locale") or in the default locale, en
*
* @param session
* @param key
* @return a localized string
* @throws IllegalArgumentException if the key is null
* @throws... | returns a localized string in the locale defined within session.getAttribute("locale") or in the default locale, en | GetResource | {
"repo_name": "apache/juddi",
"path": "juddi-gui/src/main/java/org/apache/juddi/webconsole/resources/ResourceLoader.java",
"license": "apache-2.0",
"size": 3247
} | [
"java.util.MissingResourceException",
"javax.servlet.http.HttpSession"
] | import java.util.MissingResourceException; import javax.servlet.http.HttpSession; | import java.util.*; import javax.servlet.http.*; | [
"java.util",
"javax.servlet"
] | java.util; javax.servlet; | 2,053,446 |
@WeelRawMethod(args = 1, returnsValue = true)
public final static void mapLastv(WeelRuntime runtime)
{
final ValueMap map = runtime.popMap();
if(map.size == 0)
runtime.load();
else
runtime.load(map.data.get(map.size - 1));
} | @WeelRawMethod(args = 1, returnsValue = true) final static void function(WeelRuntime runtime) { final ValueMap map = runtime.popMap(); if(map.size == 0) runtime.load(); else runtime.load(map.data.get(map.size - 1)); } | /**
* <code>mapLastV(m)</code>
* <p>
* Returns the last value from 'm'.
* </p>
*
* @param runtime
* The runtime.
*/ | <code>mapLastV(m)</code> Returns the last value from 'm'. | mapLastv | {
"repo_name": "rjeschke/weel",
"path": "src/main/java/com/github/rjeschke/weel/WeelLibMap.java",
"license": "apache-2.0",
"size": 4565
} | [
"com.github.rjeschke.weel.annotations.WeelRawMethod"
] | import com.github.rjeschke.weel.annotations.WeelRawMethod; | import com.github.rjeschke.weel.annotations.*; | [
"com.github.rjeschke"
] | com.github.rjeschke; | 57,783 |
public static void onCreate(SQLiteDatabase database) {
database.execSQL(DATABASE_CREATE);
} | static void function(SQLiteDatabase database) { database.execSQL(DATABASE_CREATE); } | /**
* Creates the riddle table.
* @param database The database which the table is created in.
*/ | Creates the riddle table | onCreate | {
"repo_name": "DanDits/WhatsThat",
"path": "app/src/main/java/dan/dit/whatsthat/storage/RiddleTable.java",
"license": "apache-2.0",
"size": 4393
} | [
"android.database.sqlite.SQLiteDatabase"
] | import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.*; | [
"android.database"
] | android.database; | 567,066 |
public List<Integer> getIndicesMatchingTaxon(String name); | List<Integer> function(String name); | /**
* Return a list of all matching taxa indices for a given name. Matches will
* depend on the Tassel Preference ID Join Strict.
*
* @param name name
*
* @return Indices for matching taxa (Empty if no match).
*/ | Return a list of all matching taxa indices for a given name. Matches will depend on the Tassel Preference ID Join Strict | getIndicesMatchingTaxon | {
"repo_name": "guilherme-pereira/tassel4-poly",
"path": "src/net/maizegenetics/pal/taxa/TaxaList.java",
"license": "gpl-3.0",
"size": 1322
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 518,363 |
static PortSide calcPortSide(final LPort port, final Direction direction) {
LNode node = port.getNode();
// if the node has zero size, we cannot decide anything
double nodeWidth = node.getSize().x;
double nodeHeight = node.getSize().y;
if (nodeWidth <= 0 && nodeHeight <= 0) {... | static PortSide calcPortSide(final LPort port, final Direction direction) { LNode node = port.getNode(); double nodeWidth = node.getSize().x; double nodeHeight = node.getSize().y; if (nodeWidth <= 0 && nodeHeight <= 0) { return PortSide.UNDEFINED; } double xpos = port.getPosition().x; double ypos = port.getPosition().y... | /**
* Determine the port side for the given port from its relative position at
* its corresponding node.
*
* @param port port to analyze
* @param direction the overall layout direction
* @return the port side relative to its containing node
*/ | Determine the port side for the given port from its relative position at its corresponding node | calcPortSide | {
"repo_name": "ExplorViz/ExplorViz",
"path": "src-external/de/cau/cs/kieler/klay/layered/graph/LGraphUtil.java",
"license": "apache-2.0",
"size": 38342
} | [
"de.cau.cs.kieler.kiml.options.Direction",
"de.cau.cs.kieler.kiml.options.PortSide"
] | import de.cau.cs.kieler.kiml.options.Direction; import de.cau.cs.kieler.kiml.options.PortSide; | import de.cau.cs.kieler.kiml.options.*; | [
"de.cau.cs"
] | de.cau.cs; | 35,871 |
public void startListening(final Handler handler)
{
synchronized (handleLock)
{
this.handler = handler;
} | void function(final Handler handler) { synchronized (handleLock) { this.handler = handler; } | /**
*
* This method should be called when you want to start activily using your
* adapter. It grabs a new sessionlist and clears the checked list if
* applicable.
*
* @param handler
* - handler to post the Sessionlist updates to the ui thread with.
*/ | This method should be called when you want to start activily using your adapter. It grabs a new sessionlist and clears the checked list if applicable | startListening | {
"repo_name": "mllobet/pokerCCF",
"path": "external/inproc_lib/src/com/intel/ux/StcSessionListAdapter.java",
"license": "bsd-3-clause",
"size": 33379
} | [
"android.os.Handler"
] | import android.os.Handler; | import android.os.*; | [
"android.os"
] | android.os; | 1,508,317 |
private static XContentBuilder buildBucketResource(final String name) throws IOException {
return jsonBuilder().startObject()
.field("kind", "storage#bucket")
.field("name", name)
.field("id", name)
... | static XContentBuilder function(final String name) throws IOException { return jsonBuilder().startObject() .field("kind", STR) .field("name", name) .field("id", name) .endObject(); } | /**
* Storage Bucket JSON representation as defined in
* https://cloud.google.com/storage/docs/json_api/v1/bucket#resource
*/ | Storage Bucket JSON representation as defined in HREF | buildBucketResource | {
"repo_name": "gfyoung/elasticsearch",
"path": "plugins/repository-gcs/qa/google-cloud-storage/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageFixture.java",
"license": "apache-2.0",
"size": 29678
} | [
"java.io.IOException",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory"
] | import java.io.IOException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; | import java.io.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"org.elasticsearch.common"
] | java.io; org.elasticsearch.common; | 2,848,916 |
public static <T> Constructor<T> getDefaultConstructor(final Class<T> clazz) {
Objects.requireNonNull(clazz, "No class provided");
try {
final Constructor<T> constructor = clazz.getDeclaredConstructor();
makeAccessible(constructor);
return constructor;
} c... | static <T> Constructor<T> function(final Class<T> clazz) { Objects.requireNonNull(clazz, STR); try { final Constructor<T> constructor = clazz.getDeclaredConstructor(); makeAccessible(constructor); return constructor; } catch (final NoSuchMethodException ignored) { try { final Constructor<T> constructor = clazz.getConst... | /**
* Gets the default (no-arg) constructor for a given class.
*
* @param clazz the class to find a constructor for
* @param <T> the type made by the constructor
* @return the default constructor for the given class
* @throws IllegalStateException if no default constructor can be found
... | Gets the default (no-arg) constructor for a given class | getDefaultConstructor | {
"repo_name": "xnslong/logging-log4j2",
"path": "log4j-core/src/main/java/org/apache/logging/log4j/core/util/ReflectionUtil.java",
"license": "apache-2.0",
"size": 8913
} | [
"java.lang.reflect.Constructor",
"java.util.Objects"
] | import java.lang.reflect.Constructor; import java.util.Objects; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,758,723 |
public static long UtcToLong(String utc) {
long longDate = 0;
Date date = UtcToDate(utc);
if(date!=null) {
longDate = date.getTime();
}
return longDate;
}
| static long function(String utc) { long longDate = 0; Date date = UtcToDate(utc); if(date!=null) { longDate = date.getTime(); } return longDate; } | /**
* Converts the UTC string in a long value
*
* @param utc the string containing the utc time.
*
* @return long is the result value for the conversion of the string, 0 if any
* error occurs.
*/ | Converts the UTC string in a long value | UtcToLong | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/util/Utility.java",
"license": "agpl-3.0",
"size": 53607
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,496,445 |
public static String getMessageUrl( HttpServletRequest request, String strMessageKey, List<? extends ErrorMessage> errors )
{
return getMessageUrl( request, strMessageKey, formatValidationErrors( request, errors ), null, JSP_BACK, TARGET_SELF, AdminMessage.TYPE_ERROR );
} | static String function( HttpServletRequest request, String strMessageKey, List<? extends ErrorMessage> errors ) { return getMessageUrl( request, strMessageKey, formatValidationErrors( request, errors ), null, JSP_BACK, TARGET_SELF, AdminMessage.TYPE_ERROR ); } | /**
* Returns the Url that display the given message
*
* @param request
* The HTTP request
* @param strMessageKey
* The message key
* @param errors
* The set of violations
* @return The Url of the JSP that display the message
*/ | Returns the Url that display the given message | getMessageUrl | {
"repo_name": "lutece-platform/lutece-core",
"path": "src/java/fr/paris/lutece/portal/service/message/AdminMessageService.java",
"license": "bsd-3-clause",
"size": 18463
} | [
"fr.paris.lutece.util.ErrorMessage",
"java.util.List",
"javax.servlet.http.HttpServletRequest"
] | import fr.paris.lutece.util.ErrorMessage; import java.util.List; import javax.servlet.http.HttpServletRequest; | import fr.paris.lutece.util.*; import java.util.*; import javax.servlet.http.*; | [
"fr.paris.lutece",
"java.util",
"javax.servlet"
] | fr.paris.lutece; java.util; javax.servlet; | 1,966,402 |
public void setYLabel(String yLabel) {
JodaBeanUtils.notNull(yLabel, "yLabel");
this._yLabel = yLabel;
} | void function(String yLabel) { JodaBeanUtils.notNull(yLabel, STR); this._yLabel = yLabel; } | /**
* Sets the y axis label.
* @param yLabel the new value of the property, not null
*/ | Sets the y axis label | setYLabel | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/marketdatasnapshot/VolatilityCubeData.java",
"license": "apache-2.0",
"size": 29657
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,493,603 |
public Observable<ServiceResponse<GeoBackupPolicyInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyState state) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.su... | Observable<ServiceResponse<GeoBackupPolicyInner>> function(String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyState state) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if... | /**
* Updates a database geo backup policy.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param databaseName The name of the data... | Updates a database geo backup policy | createOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesInner.java",
"license": "mit",
"size": 22417
} | [
"com.microsoft.azure.management.sql.v2014_04_01.GeoBackupPolicyState",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.management.sql.v2014_04_01.GeoBackupPolicyState; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.management.sql.v2014_04_01.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 662,243 |
public static ArrayList<VideoStream> getSortedStreamVideosList(Context context, List<VideoStream> videoStreams, List<VideoStream> videoOnlyStreams, boolean ascendingOrder) {
boolean showHigherResolutions = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.show_high... | static ArrayList<VideoStream> function(Context context, List<VideoStream> videoStreams, List<VideoStream> videoOnlyStreams, boolean ascendingOrder) { boolean showHigherResolutions = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.show_higher_resolutions_key), false); String ... | /**
* Join the two lists of video streams (video_only and normal videos), and sort them according with preferred format
* chosen by the user
*
* @param context context to search for the format to give preference
* @param videoStreams normal videos list
* @param videoOnlyStream... | Join the two lists of video streams (video_only and normal videos), and sort them according with preferred format chosen by the user | getSortedStreamVideosList | {
"repo_name": "SpajicM/NewPipe",
"path": "app/src/main/java/org/schabi/newpipe/util/Utils.java",
"license": "gpl-3.0",
"size": 11882
} | [
"android.content.Context",
"android.preference.PreferenceManager",
"java.util.ArrayList",
"java.util.List",
"org.schabi.newpipe.extractor.MediaFormat",
"org.schabi.newpipe.extractor.stream_info.VideoStream"
] | import android.content.Context; import android.preference.PreferenceManager; import java.util.ArrayList; import java.util.List; import org.schabi.newpipe.extractor.MediaFormat; import org.schabi.newpipe.extractor.stream_info.VideoStream; | import android.content.*; import android.preference.*; import java.util.*; import org.schabi.newpipe.extractor.*; import org.schabi.newpipe.extractor.stream_info.*; | [
"android.content",
"android.preference",
"java.util",
"org.schabi.newpipe"
] | android.content; android.preference; java.util; org.schabi.newpipe; | 932,631 |
TypeDescription getType(); | TypeDescription getType(); | /**
* Returns the property type.
* This typically a sub-type of {@code ValueOption} class.
* @return the property type
*/ | Returns the property type. This typically a sub-type of ValueOption class | getType | {
"repo_name": "akirakw/asakusafw-compiler",
"path": "compiler-project/api/src/main/java/com/asakusafw/lang/compiler/api/reference/PropertyReference.java",
"license": "apache-2.0",
"size": 1595
} | [
"com.asakusafw.lang.compiler.model.description.TypeDescription"
] | import com.asakusafw.lang.compiler.model.description.TypeDescription; | import com.asakusafw.lang.compiler.model.description.*; | [
"com.asakusafw.lang"
] | com.asakusafw.lang; | 2,010,381 |
void acquireWriteLock() throws DeadlockDetectedException
{
acquireWriteLock( null );
} | void acquireWriteLock() throws DeadlockDetectedException { acquireWriteLock( null ); } | /**
* Calls {@link #acquireWriteLock(Transaction)} with the
* transaction associated with the current thread.
* @throws DeadlockDetectedException
*/ | Calls <code>#acquireWriteLock(Transaction)</code> with the transaction associated with the current thread | acquireWriteLock | {
"repo_name": "dksaputra/community",
"path": "kernel/src/main/java/org/neo4j/kernel/impl/transaction/RWLock.java",
"license": "gpl-3.0",
"size": 20464
} | [
"org.neo4j.kernel.DeadlockDetectedException"
] | import org.neo4j.kernel.DeadlockDetectedException; | import org.neo4j.kernel.*; | [
"org.neo4j.kernel"
] | org.neo4j.kernel; | 2,792,940 |
public static String timeStrMsec(Date epochTime) {
return timeFormat24Msec.format(epochTime.getTime());
}
| static String function(Date epochTime) { return timeFormat24Msec.format(epochTime.getTime()); } | /**
* Returns just the time string. Includes msec.
*
* @param epochTime
* @return
*/ | Returns just the time string. Includes msec | timeStrMsec | {
"repo_name": "sheldonabrown/core",
"path": "transitime/src/main/java/org/transitime/utils/Time.java",
"license": "gpl-3.0",
"size": 28522
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,412,125 |
@ApiModelProperty(
value = "Indicates the node where the process will execute."
)
public String getExecutionNode() {
return executionNode;
} | @ApiModelProperty( value = STR ) String function() { return executionNode; } | /**
* Indicates which node the process should run on
*
* @return execution node
*/ | Indicates which node the process should run on | getExecutionNode | {
"repo_name": "ShellyLC/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorConfigDTO.java",
"license": "apache-2.0",
"size": 10358
} | [
"com.wordnik.swagger.annotations.ApiModelProperty"
] | import com.wordnik.swagger.annotations.ApiModelProperty; | import com.wordnik.swagger.annotations.*; | [
"com.wordnik.swagger"
] | com.wordnik.swagger; | 1,034,317 |
public static File unzip(File zipFile) throws PreflightingToolException
{
File tempExtractionDir = null;
ZipInputStream apkInputStream = null;
FileOutputStream apkOutputStream = null;
try
{
//crate MOTODEV temp folder
if (!tmpAppValidator... | static File function(File zipFile) throws PreflightingToolException { File tempExtractionDir = null; ZipInputStream apkInputStream = null; FileOutputStream apkOutputStream = null; try { if (!tmpAppValidatorFolder.exists()) { tmpAppValidatorFolder.mkdir(); } tempExtractionDir = File.createTempFile(zipFile.getName(), nul... | /**
* Unzip zipFile and returns the directory created with its contents
* @param zipFile
* @return
* @throws PreflightingToolException
*/ | Unzip zipFile and returns the directory created with its contents | unzip | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/preflighting.core/src/com/motorolamobility/preflighting/core/internal/utils/ApkUtils.java",
"license": "gpl-2.0",
"size": 11299
} | [
"com.motorolamobility.preflighting.core.exception.PreflightingToolException",
"com.motorolamobility.preflighting.core.i18n.PreflightingCoreNLS",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.zip.ZipEntry",
"java.util.zip.ZipInputStream",
"or... | import com.motorolamobility.preflighting.core.exception.PreflightingToolException; import com.motorolamobility.preflighting.core.i18n.PreflightingCoreNLS; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip... | import com.motorolamobility.preflighting.core.exception.*; import com.motorolamobility.preflighting.core.i18n.*; import java.io.*; import java.util.zip.*; import org.eclipse.core.runtime.*; | [
"com.motorolamobility.preflighting",
"java.io",
"java.util",
"org.eclipse.core"
] | com.motorolamobility.preflighting; java.io; java.util; org.eclipse.core; | 1,619,347 |
Entry<Long, Future<?>> restartJobInstance(long instanceID, IJobXMLSource jobXML, Properties overrideJobParameters,
long executionId) throws JobRestartException, JobExecutionAlreadyCompleteException, JobExecutionNotMostRecentException, NoSuchJobExecutionException; | Entry<Long, Future<?>> restartJobInstance(long instanceID, IJobXMLSource jobXML, Properties overrideJobParameters, long executionId) throws JobRestartException, JobExecutionAlreadyCompleteException, JobExecutionNotMostRecentException, NoSuchJobExecutionException; | /**
* Restarts the job instance record
*
* @param the instanceId of the job to be restarted
* @param jobXML of the job to be restarted
* @param Properties supplied by submitter on restart
* @param last executionId of the job to restarted
* @return A Map.Entry with executionId of the n... | Restarts the job instance record | restartJobInstance | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/services/IBatchKernelService.java",
"license": "epl-1.0",
"size": 6299
} | [
"java.util.Map",
"java.util.Properties",
"java.util.concurrent.Future",
"javax.batch.operations.JobExecutionAlreadyCompleteException",
"javax.batch.operations.JobExecutionNotMostRecentException",
"javax.batch.operations.JobRestartException",
"javax.batch.operations.NoSuchJobExecutionException"
] | import java.util.Map; import java.util.Properties; import java.util.concurrent.Future; import javax.batch.operations.JobExecutionAlreadyCompleteException; import javax.batch.operations.JobExecutionNotMostRecentException; import javax.batch.operations.JobRestartException; import javax.batch.operations.NoSuchJobExecution... | import java.util.*; import java.util.concurrent.*; import javax.batch.operations.*; | [
"java.util",
"javax.batch"
] | java.util; javax.batch; | 1,699,838 |
public InputStream forcedGlossary() {
return forcedGlossary;
} | InputStream function() { return forcedGlossary; } | /**
* Gets the forcedGlossary.
*
* A TMX file with your customizations. The customizations in the file completely overwrite the domain data
* translation, including high frequency or high confidence phrase translations. You can upload only one glossary with
* a file size less than 10 MB per call.
*
... | Gets the forcedGlossary. A TMX file with your customizations. The customizations in the file completely overwrite the domain data translation, including high frequency or high confidence phrase translations. You can upload only one glossary with a file size less than 10 MB per call | forcedGlossary | {
"repo_name": "supunucsc/java-sdk",
"path": "language-translator/src/main/java/com/ibm/watson/developer_cloud/language_translator/v2/model/CreateModelOptions.java",
"license": "apache-2.0",
"size": 5379
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,412,678 |
default void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily)
throws IOException {
get(modifyColumnFamilyAsync(tableName, columnFamily), getSyncWaitTimeout(),
TimeUnit.MILLISECONDS);
} | default void modifyColumnFamily(TableName tableName, ColumnFamilyDescriptor columnFamily) throws IOException { get(modifyColumnFamilyAsync(tableName, columnFamily), getSyncWaitTimeout(), TimeUnit.MILLISECONDS); } | /**
* Modify an existing column family on a table. Synchronous operation. Use
* {@link #modifyColumnFamilyAsync(TableName, ColumnFamilyDescriptor)} instead because it returns
* a {@link Future} from which you can learn whether success or failure.
* @param tableName name of table
* @param columnFamily new... | Modify an existing column family on a table. Synchronous operation. Use <code>#modifyColumnFamilyAsync(TableName, ColumnFamilyDescriptor)</code> instead because it returns a <code>Future</code> from which you can learn whether success or failure | modifyColumnFamily | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 101053
} | [
"java.io.IOException",
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.FutureUtils"
] | import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.FutureUtils; | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,553,291 |
@SuppressWarnings({"rawtypes",
"serial"}) // Not statically typed as Serializable
protected Collection children; | @SuppressWarnings({STR, STR}) protected Collection children; | /**
* Gets the array of children affected by this event.
* @return the array of children effected
*/ | Gets the array of children affected by this event | iterator | {
"repo_name": "md-5/jdk10",
"path": "src/java.desktop/share/classes/java/beans/beancontext/BeanContextMembershipEvent.java",
"license": "gpl-2.0",
"size": 4679
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,283,861 |
// TODO update
@SuppressWarnings("unchecked")
@Put
public String putOCCIRequest(Representation representation)
throws Exception {
try {
// set occi version info
getServerInfo().setAgent(
OcciConfig.getInstance().config.getString("occi.version"));
OcciCheck.isUUID(getReference().getLast... | @SuppressWarnings(STR) String function(Representation representation) throws Exception { try { getServerInfo().setAgent( OcciConfig.getInstance().config.getString(STR)); OcciCheck.isUUID(getReference().getLastSegment()); Environment environment = Environment.getEnvironmentList().get( UUID.fromString(getReference().getL... | /**
* Edit the parameters of a given resource instance.
*
* @param representation
* @return data of altered instance
* @throws Exception
*/ | Edit the parameters of a given resource instance | putOCCIRequest | {
"repo_name": "midoblgsm/occi4java",
"path": "http/src/main/java/occi/http/application/OcciRestEnvironment.java",
"license": "lgpl-3.0",
"size": 22604
} | [
"java.util.HashMap",
"java.util.StringTokenizer",
"java.util.UUID",
"org.restlet.Response",
"org.restlet.data.Form",
"org.restlet.data.Status",
"org.restlet.representation.Representation"
] | import java.util.HashMap; import java.util.StringTokenizer; import java.util.UUID; import org.restlet.Response; import org.restlet.data.Form; import org.restlet.data.Status; import org.restlet.representation.Representation; | import java.util.*; import org.restlet.*; import org.restlet.data.*; import org.restlet.representation.*; | [
"java.util",
"org.restlet",
"org.restlet.data",
"org.restlet.representation"
] | java.util; org.restlet; org.restlet.data; org.restlet.representation; | 51,442 |
@SuppressWarnings("rawtypes")
public Collection<LocationComponent> getSelectedLocations()
{
Set<LocationComponent> locs = new HashSet<LocationComponent>();
if (!isSelectable(JLocationComponentVisualiser.class)) {return locs;}
for (JTopologyComponentVisualiser visual : getSelection())
{
JLocationCompone... | @SuppressWarnings(STR) Collection<LocationComponent> function() { Set<LocationComponent> locs = new HashSet<LocationComponent>(); if (!isSelectable(JLocationComponentVisualiser.class)) {return locs;} for (JTopologyComponentVisualiser visual : getSelection()) { JLocationComponentVisualiser tcl = (JLocationComponentVisua... | /**
* Retrieve selected locations and
* empty selection
* @return selected locations
*/ | Retrieve selected locations and empty selection | getSelectedLocations | {
"repo_name": "anton23/gpanalyser",
"path": "src-masspa/uk/ac/imperial/doc/masspa/gui/components/topologies/canvas/JTopologyViewerCanvas.java",
"license": "mit",
"size": 16067
} | [
"java.util.Collection",
"java.util.HashSet",
"java.util.Set",
"uk.ac.imperial.doc.masspa.gui.models.topologies.LocationComponent"
] | import java.util.Collection; import java.util.HashSet; import java.util.Set; import uk.ac.imperial.doc.masspa.gui.models.topologies.LocationComponent; | import java.util.*; import uk.ac.imperial.doc.masspa.gui.models.topologies.*; | [
"java.util",
"uk.ac.imperial"
] | java.util; uk.ac.imperial; | 2,237,889 |
List<DomainEvent> events(); | List<DomainEvent> events(); | /**
* DomainEvents in this sequence as an immutable List.
*/ | DomainEvents in this sequence as an immutable List | events | {
"repo_name": "QiBud/org.qibud.project",
"path": "qibud-eventstore/src/main/java/org/qibud/eventstore/DomainEventsSequence.java",
"license": "apache-2.0",
"size": 1843
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,765,372 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<FunctionInner> listByStreamingJobAsync(
String resourceGroupName, String jobName, String select, Context context) {
return new PagedFlux<>(
() -> listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select, co... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<FunctionInner> function( String resourceGroupName, String jobName, String select, Context context) { return new PagedFlux<>( () -> listByStreamingJobSinglePageAsync(resourceGroupName, jobName, select, context), nextLink -> listByStreamingJobNextSinglePageAsync(n... | /**
* Lists all of the functions under the specified streaming job.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the streaming job.
* @param select The $select OData query parameter. This is a comma-separated list of str... | Lists all of the functions under the specified streaming job | listByStreamingJobAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/implementation/FunctionsClientImpl.java",
"license": "mit",
"size": 103184
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.core.util.Context",
"com.azure.resourcemanager.streamanalytics.fluent.models.FunctionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.streamanalytics.fluent.models.FunctionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.streamanalytics.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,017,990 |
private Boolean filterNode(Node node) {
// Check on noindex robots value
Boolean containsNoIndex = StringUtils.containsIgnoreCase(PropertyUtil.getString(node, "robots", "index"), "noindex");
return containsNoIndex;
} | Boolean function(Node node) { Boolean containsNoIndex = StringUtils.containsIgnoreCase(PropertyUtil.getString(node, STR, "index"), STR); return containsNoIndex; } | /**
* Check if node is valid to return as a result.
*
* @param node
* @return True when node needs to be filtered out of the result set
*/ | Check if node is valid to return as a result | filterNode | {
"repo_name": "gtenham/magnolia-templating",
"path": "magnolia-templating-foundation/src/main/java/nl/gertontenham/magnolia/templating/search/JcrSearchService.java",
"license": "gpl-3.0",
"size": 4020
} | [
"info.magnolia.jcr.util.PropertyUtil",
"javax.jcr.Node",
"org.apache.commons.lang3.StringUtils"
] | import info.magnolia.jcr.util.PropertyUtil; import javax.jcr.Node; import org.apache.commons.lang3.StringUtils; | import info.magnolia.jcr.util.*; import javax.jcr.*; import org.apache.commons.lang3.*; | [
"info.magnolia.jcr",
"javax.jcr",
"org.apache.commons"
] | info.magnolia.jcr; javax.jcr; org.apache.commons; | 613,066 |
public T photos_get(Integer subjId, Long albumId)
throws FacebookException, IOException; | T function(Integer subjId, Long albumId) throws FacebookException, IOException; | /**
* Used to retrieve photo objects using the search parameters (one or more of the
* parameters must be provided).
*
* @param subjId retrieve from photos associated with this user (optional).
* @param albumId retrieve from photos from this album (optional)
* @return an T of photo objects.
* @see ... | Used to retrieve photo objects using the search parameters (one or more of the parameters must be provided) | photos_get | {
"repo_name": "jkinner/ringside",
"path": "api/clients/java/com/facebook/api/IFacebookRestClient.java",
"license": "lgpl-2.1",
"size": 46105
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 141,102 |
public void setDirectoryEventLogs(Path path)
{
mDirectoryEventLogs = path;
mPreferences.put(PREFERENCE_KEY_DIRECTORY_EVENT_LOGS, path.toString());
notifyPreferenceUpdated();
} | void function(Path path) { mDirectoryEventLogs = path; mPreferences.put(PREFERENCE_KEY_DIRECTORY_EVENT_LOGS, path.toString()); notifyPreferenceUpdated(); } | /**
* Sets the path to the event logs folder
*/ | Sets the path to the event logs folder | setDirectoryEventLogs | {
"repo_name": "ImagoTrigger/sdrtrunk",
"path": "src/main/java/io/github/dsheirer/preference/directory/DirectoryPreference.java",
"license": "gpl-3.0",
"size": 13916
} | [
"java.nio.file.Path"
] | import java.nio.file.Path; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 340,698 |
protected double calculateSeriesWidth(double space, CategoryAxis axis,
int categories, int series) {
double factor = 1.0 - getItemMargin() - axis.getLowerMargin()
- axis.getUpperMargin();
if (categories > 1) {
factor = f... | double function(double space, CategoryAxis axis, int categories, int series) { double factor = 1.0 - getItemMargin() - axis.getLowerMargin() - axis.getUpperMargin(); if (categories > 1) { factor = factor - axis.getCategoryMargin(); } return (space * factor) / (categories * series); } | /**
* Calculates the available space for each series.
*
* @param space the space along the entire axis (in Java2D units).
* @param axis the category axis.
* @param categories the number of categories.
* @param series the number of series.
*
* @return The width of one series... | Calculates the available space for each series | calculateSeriesWidth | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/category/LevelRenderer.java",
"license": "lgpl-2.1",
"size": 15594
} | [
"org.jfree.chart.axis.CategoryAxis"
] | import org.jfree.chart.axis.CategoryAxis; | import org.jfree.chart.axis.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,435,530 |
// Create the actions
createActions();
// Make a TreeViewer and add a content provider to it
treeViewer = new TreeViewer(parent);
ShapeTreeContentProvider contentProvider = new ShapeTreeContentProvider();
treeViewer.setContentProvider(contentProvider);
// Add label provider to TreeViewer
ShapeTree... | createActions(); treeViewer = new TreeViewer(parent); ShapeTreeContentProvider contentProvider = new ShapeTreeContentProvider(); treeViewer.setContentProvider(contentProvider); ShapeTreeLabelProvider labelProvider = new ShapeTreeLabelProvider(); treeViewer.setLabelProvider(labelProvider); treeViewer.addSelectionChanged... | /**
* <p>
* Creates the SWT controls for this ShapeTreeView
* </p>
*
* @param parent
* <p>
* The parent Composite
* </p>
*/ | Creates the SWT controls for this ShapeTreeView | createPartControl | {
"repo_name": "gorindn/ice",
"path": "src/org.eclipse.ice.viz.service.geometry/src/org/eclipse/ice/viz/service/geometry/widgets/ShapeTreeView.java",
"license": "epl-1.0",
"size": 8360
} | [
"org.eclipse.jface.viewers.TreeViewer"
] | import org.eclipse.jface.viewers.TreeViewer; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 653,252 |
public Time getFridayTill() {
return this.fridayTill;
}
| Time function() { return this.fridayTill; } | /**
* Missing description at method getFridayTill.
*
* @return the Time.
*/ | Missing description at method getFridayTill | getFridayTill | {
"repo_name": "NABUCCO/org.nabucco.business.organization",
"path": "org.nabucco.business.organization.facade.datatype/src/main/gen/org/nabucco/business/organization/facade/datatype/WorkingTime.java",
"license": "epl-1.0",
"size": 32593
} | [
"org.nabucco.framework.base.facade.datatype.date.Time"
] | import org.nabucco.framework.base.facade.datatype.date.Time; | import org.nabucco.framework.base.facade.datatype.date.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,854,030 |
private void wipe() {
File outputFile;
if(mCurrentTask==null||mCurrentTask.outputDir==null||mCurrentTask.outputDir.isEmpty()||
!(outputFile = new File(mCurrentTask.outputDir)).exists())
return;
try {
System.getTools().raw.run("rm -rf '" + mCurrentTask.outputDir + "'");
retur... | void function() { File outputFile; if(mCurrentTask==null mCurrentTask.outputDir==null mCurrentTask.outputDir.isEmpty() !(outputFile = new File(mCurrentTask.outputDir)).exists()) return; try { System.getTools().raw.run(STR + mCurrentTask.outputDir + "'"); return; } catch (Exception e) { System.errorLogging(e); } try { d... | /**
* wipe the destination dir ( rm -rf )
*/ | wipe the destination dir ( rm -rf ) | wipe | {
"repo_name": "xaitax/android",
"path": "cSploit/src/org/csploit/android/core/UpdateService.java",
"license": "gpl-3.0",
"size": 47165
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,855,491 |
public void setAmtAcctCr (BigDecimal AmtAcctCr); | void function (BigDecimal AmtAcctCr); | /** Set Accounted Credit.
* Accounted Credit Amount
*/ | Set Accounted Credit. Accounted Credit Amount | setAmtAcctCr | {
"repo_name": "itzamnamx/AdempiereFS",
"path": "base/src/org/compiere/model/I_GL_JournalLine.java",
"license": "gpl-2.0",
"size": 16503
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,903,079 |
private Cache<IdentityCacheKey, IdentityCacheEntry> getCommonCache() {
// TODO Should verify the cache creation done per tenant or as below
// We create a single cache for all tenants. It is not a good choice to create per-tenant
// caches in this case. We qualify tenants by adding the tenant identifier in... | Cache<IdentityCacheKey, IdentityCacheEntry> function() { CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(ProxyConstants.PEP_AGENT_MANAGER); Cache<IdentityCacheKey, IdentityCacheEntry> cache = manager.getCache(ProxyConstants.DECISION_CACHE); return cache; } | /**
* Return an instance of a named cache that is common to all tenants.
*
* @param name the name of the cache.
* @return the named cache instance.
*/ | Return an instance of a named cache that is common to all tenants | getCommonCache | {
"repo_name": "maheshika/carbon-identity",
"path": "components/identity/org.wso2.carbon.identity.entitlement.pep.agent/src/main/org/wso2/carbon/identity/entitlement/pep/agent/PEPAgentCache.java",
"license": "apache-2.0",
"size": 6723
} | [
"javax.cache.Cache",
"javax.cache.CacheManager",
"javax.cache.Caching"
] | import javax.cache.Cache; import javax.cache.CacheManager; import javax.cache.Caching; | import javax.cache.*; | [
"javax.cache"
] | javax.cache; | 513,498 |
private Map<String, Plugin> getLifecyclePlugins( MavenProject project )
throws MojoExecutionException
{
Map<String, Plugin> lifecyclePlugins = new HashMap<String, Plugin>();
try
{
Set<Plugin> plugins = getBoundPlugins( project, "clean,deploy,site" );
for (... | Map<String, Plugin> function( MavenProject project ) throws MojoExecutionException { Map<String, Plugin> lifecyclePlugins = new HashMap<String, Plugin>(); try { Set<Plugin> plugins = getBoundPlugins( project, STR ); for ( Plugin plugin : plugins ) { lifecyclePlugins.put( getPluginCoords( plugin ), plugin ); } } catch (... | /**
* Returns the lifecycle plugins of a specific project.
*
* @param project the project to get the lifecycle plugins from.
* @return The map of effective plugin versions keyed by coordinates.
* @throws org.apache.maven.plugin.MojoExecutionException
* if things go wrong.
* @... | Returns the lifecycle plugins of a specific project | getLifecyclePlugins | {
"repo_name": "RabbitStewDio/versions-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/versions/DisplayPluginUpdatesMojo.java",
"license": "apache-2.0",
"size": 80397
} | [
"java.util.HashMap",
"java.util.Map",
"java.util.Set",
"org.apache.maven.lifecycle.LifecycleExecutionException",
"org.apache.maven.model.Plugin",
"org.apache.maven.plugin.MojoExecutionException",
"org.apache.maven.plugin.PluginNotFoundException",
"org.apache.maven.project.MavenProject"
] | import java.util.HashMap; import java.util.Map; import java.util.Set; import org.apache.maven.lifecycle.LifecycleExecutionException; import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.PluginNotFoundException; import org.apache.maven.project.MavenP... | import java.util.*; import org.apache.maven.lifecycle.*; import org.apache.maven.model.*; import org.apache.maven.plugin.*; import org.apache.maven.project.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 2,657,871 |
private IgniteInternalFuture<V> getAsync0(KeyCacheObject key,
boolean forcePrimary,
UUID subjId,
String taskName,
boolean deserializeBinary,
@Nullable ExpiryPolicy expiryPlc,
boolean skipVals,
boolean skipStore,
boolean canRemap,
boolean needVe... | IgniteInternalFuture<V> function(KeyCacheObject key, boolean forcePrimary, UUID subjId, String taskName, boolean deserializeBinary, @Nullable ExpiryPolicy expiryPlc, boolean skipVals, boolean skipStore, boolean canRemap, boolean needVer ) { AffinityTopologyVersion topVer = canRemap ? ctx.affinity().affinityTopologyVers... | /**
* Entry point to all public API single get methods.
*
* @param key Key.
* @param forcePrimary Force primary flag.
* @param subjId Subject ID.
* @param taskName Task name.
* @param deserializeBinary Deserialize binary flag.
* @param expiryPlc Expiry policy.
* @param skipV... | Entry point to all public API single get methods | getAsync0 | {
"repo_name": "tkpanther/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java",
"license": "apache-2.0",
"size": 129179
} | [
"javax.cache.expiry.ExpiryPolicy",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy",
"org.apache.ignite.internal.processors.cache.KeyCacheObject",
"org.apache.i... | import javax.cache.expiry.ExpiryPolicy; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy; import org.apache.ignite.internal.processors.cache.KeyCacheObject; im... | import javax.cache.expiry.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.jetbrains.annotations.*; | [
"javax.cache",
"org.apache.ignite",
"org.jetbrains.annotations"
] | javax.cache; org.apache.ignite; org.jetbrains.annotations; | 2,188,107 |
private static @Nullable byte[] getExtraData(String mimeType, List<byte[]> initializationData) {
switch (mimeType) {
case MimeTypes.AUDIO_AAC:
case MimeTypes.AUDIO_OPUS:
return initializationData.get(0);
case MimeTypes.AUDIO_ALAC:
return getAlacExtraData(initializationData);
... | static @Nullable byte[] function(String mimeType, List<byte[]> initializationData) { switch (mimeType) { case MimeTypes.AUDIO_AAC: case MimeTypes.AUDIO_OPUS: return initializationData.get(0); case MimeTypes.AUDIO_ALAC: return getAlacExtraData(initializationData); case MimeTypes.AUDIO_VORBIS: return getVorbisExtraData(i... | /**
* Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or {@code null} if
* not required.
*/ | Returns FFmpeg-compatible codec-specific initialization data ("extra data"), or null if not required | getExtraData | {
"repo_name": "stari4ek/ExoPlayer",
"path": "extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegAudioDecoder.java",
"license": "apache-2.0",
"size": 9020
} | [
"androidx.annotation.Nullable",
"com.google.android.exoplayer2.util.MimeTypes",
"java.util.List"
] | import androidx.annotation.Nullable; import com.google.android.exoplayer2.util.MimeTypes; import java.util.List; | import androidx.annotation.*; import com.google.android.exoplayer2.util.*; import java.util.*; | [
"androidx.annotation",
"com.google.android",
"java.util"
] | androidx.annotation; com.google.android; java.util; | 792,006 |
public void setMaxLength(int maxLength)
{
if (maxLength < this.minLength)
{
throw new DictionaryException(ERR_INVALID_MAX_LENGTH, maxLength);
}
this.maxLength = maxLength;
}
| void function(int maxLength) { if (maxLength < this.minLength) { throw new DictionaryException(ERR_INVALID_MAX_LENGTH, maxLength); } this.maxLength = maxLength; } | /**
* Set the maximum number of characters allowed. Valid values are in
* the range [0, {@link Integer#MAX_VALUE}].
*
* @param maxLength the minimum numbers of characters allowed
*/ | Set the maximum number of characters allowed. Valid values are in the range [0, <code>Integer#MAX_VALUE</code>] | setMaxLength | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/data-model/source/java/org/alfresco/repo/dictionary/constraint/StringLengthConstraint.java",
"license": "lgpl-3.0",
"size": 4753
} | [
"org.alfresco.service.cmr.dictionary.DictionaryException"
] | import org.alfresco.service.cmr.dictionary.DictionaryException; | import org.alfresco.service.cmr.dictionary.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 1,991,480 |
public void setJSONForAddons(String json) throws Exception {
addons = new JSONObject(json);
needsWrite = true;
} | void function(String json) throws Exception { addons = new JSONObject(json); needsWrite = true; } | /**
* Update the cached set of add-ons. Throws on invalid input.
*
* @param json a valid add-ons JSON string.
*/ | Update the cached set of add-ons. Throws on invalid input | setJSONForAddons | {
"repo_name": "mkodekar/Fennece-Browser",
"path": "base/background/healthreport/ProfileInformationCache.java",
"license": "mpl-2.0",
"size": 11592
} | [
"org.json.JSONObject"
] | import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 1,597,370 |
private static String getFullName(GenericContainer record) {
return record.getSchema().getFullName();
} | static String function(GenericContainer record) { return record.getSchema().getFullName(); } | /**
* Gets the full name.
*
* @param record the record
* @return the full name
*/ | Gets the full name | getFullName | {
"repo_name": "abohomol/kaa",
"path": "common/core/src/main/java/org/kaaproject/kaa/server/common/core/algorithms/delta/DefaultDeltaCalculationAlgorithm.java",
"license": "apache-2.0",
"size": 37626
} | [
"org.apache.avro.generic.GenericContainer"
] | import org.apache.avro.generic.GenericContainer; | import org.apache.avro.generic.*; | [
"org.apache.avro"
] | org.apache.avro; | 457,766 |
String decodeUTF8(ProtonBuffer utf8bytes); | String decodeUTF8(ProtonBuffer utf8bytes); | /**
* Decodes a String from the given UTF8 Bytes.
*
* @param utf8bytes
* A ProtonBuffer containing the UTF-8 encoded bytes.
*
* @return a new String that represents the decoded value.
*/ | Decodes a String from the given UTF8 Bytes | decodeUTF8 | {
"repo_name": "tabish121/proton4j",
"path": "protonj2/src/main/java/org/apache/qpid/protonj2/codec/decoders/UTF8Decoder.java",
"license": "apache-2.0",
"size": 1395
} | [
"org.apache.qpid.protonj2.buffer.ProtonBuffer"
] | import org.apache.qpid.protonj2.buffer.ProtonBuffer; | import org.apache.qpid.protonj2.buffer.*; | [
"org.apache.qpid"
] | org.apache.qpid; | 818,285 |
public ORID getIdentity(final Object iPojo) {
checkOpeness();
final ODocument record = getRecordByUserObject(iPojo, false);
if (record == null)
throw new OObjectNotManagedException("The object " + iPojo + " is not managed by the current database");
return record.getIdentity();
}
| ORID function(final Object iPojo) { checkOpeness(); final ODocument record = getRecordByUserObject(iPojo, false); if (record == null) throw new OObjectNotManagedException(STR + iPojo + STR); return record.getIdentity(); } | /**
* Returns the object unique identity.
*
* @param iPojo
* User object
*/ | Returns the object unique identity | getIdentity | {
"repo_name": "Spaceghost/OrientDB",
"path": "core/src/main/java/com/orientechnologies/orient/core/db/ODatabasePojoAbstract.java",
"license": "apache-2.0",
"size": 12848
} | [
"com.orientechnologies.orient.core.db.object.OObjectNotManagedException",
"com.orientechnologies.orient.core.record.impl.ODocument"
] | import com.orientechnologies.orient.core.db.object.OObjectNotManagedException; import com.orientechnologies.orient.core.record.impl.ODocument; | import com.orientechnologies.orient.core.db.object.*; import com.orientechnologies.orient.core.record.impl.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 2,172,005 |
private boolean matchFor(final ActionModel candidateActionModel) {
// check if target object of the action is the same (the oid str)
final String candidateOidStr = oidStrFrom(candidateActionModel);
if(!Objects.equal(this.oidNoVerStr, candidateOidStr)) {
return false;
}
// check if args same
... | boolean function(final ActionModel candidateActionModel) { final String candidateOidStr = oidStrFrom(candidateActionModel); if(!Objects.equal(this.oidNoVerStr, candidateOidStr)) { return false; } List<String> thisArgs = PageParameterNames.ACTION_ARGS.getListFrom(pageParameters); PageParameters candidatePageParameters =... | /**
* Whether or not the provided {@link ActionModel} matches that contained
* within this node (taking into account the action's arguments).
*
* If it does match, then the matched node's title is updated to that of the provided
* {@link ActionModel}.
* <p>
*
* @return - whethe... | Whether or not the provided <code>ActionModel</code> matches that contained within this node (taking into account the action's arguments). If it does match, then the matched node's title is updated to that of the provided <code>ActionModel</code>. | matchFor | {
"repo_name": "incodehq/isis",
"path": "core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/BookmarkTreeNode.java",
"license": "apache-2.0",
"size": 9700
} | [
"com.google.common.base.Objects",
"java.util.List",
"org.apache.isis.viewer.wicket.model.mementos.PageParameterNames",
"org.apache.wicket.request.mapper.parameter.PageParameters"
] | import com.google.common.base.Objects; import java.util.List; import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames; import org.apache.wicket.request.mapper.parameter.PageParameters; | import com.google.common.base.*; import java.util.*; import org.apache.isis.viewer.wicket.model.mementos.*; import org.apache.wicket.request.mapper.parameter.*; | [
"com.google.common",
"java.util",
"org.apache.isis",
"org.apache.wicket"
] | com.google.common; java.util; org.apache.isis; org.apache.wicket; | 1,784,434 |
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
super.readExternal(in);
defVal=in.readFloat();
if(head>0) {
int headlen=(int) (head>>>blockshift)+1;
bits=new byte[headlen][];
list=new float[headlen][];
for(... | void function(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); defVal=in.readFloat(); if(head>0) { int headlen=(int) (head>>>blockshift)+1; bits=new byte[headlen][]; list=new float[headlen][]; for(int i=0;i<headlen;i++) { final byte[] mask=bits[i]=new byte[blockhead]; in.readFully(ma... | /**
* Read a SparseIndexedList from a stream.
*
* @param in the stream to read the object from
*
* @throws IOException if I/O errors occur
*/ | Read a SparseIndexedList from a stream | readExternal | {
"repo_name": "varkhan/VCom4j",
"path": "Base/Containers/src/net/varkhan/base/containers/list/SparseIndexedFloatList.java",
"license": "lgpl-2.1",
"size": 31411
} | [
"java.io.IOException",
"java.io.ObjectInput"
] | import java.io.IOException; import java.io.ObjectInput; | import java.io.*; | [
"java.io"
] | java.io; | 2,120,560 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } | /**
* Deletes the specified Data Lake Store account.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Store account.
* @param name The name of the Data Lake Store account to delete.
* @param serviceCallback the async ServiceCallback to handle success... | Deletes the specified Data Lake Store account | deleteAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-store/src/main/java/com/microsoft/azure/management/datalake/store/implementation/AccountsImpl.java",
"license": "mit",
"size": 98773
} | [
"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; | 457,390 |
@Timed @ExceptionMetered
@DELETE
public Response evictClientFromGroup(
@Auth AutomationClient automationClient,
@PathParam("clientId") long clientId,
@PathParam("groupId") long groupId) {
try {
Map<String, String> extraInfo = new HashMap<>();
extraInfo.put("deprecated", "true");... | @Timed Response function( @Auth AutomationClient automationClient, @PathParam(STR) long clientId, @PathParam(STR) long groupId) { try { Map<String, String> extraInfo = new HashMap<>(); extraInfo.put(STR, "true"); aclDAO.findAndEvictClient(clientId, groupId, auditLog, automationClient.getName(), extraInfo); } catch (Ill... | /**
* Remove Client from Group
*
* @param clientId the ID of the Client to unassign
* @param groupId the ID of the Group to be removed from
* @excludeParams automationClient
* @description Unassigns the Client specified by the clientID from the Group specified by the
* groupID
* @responseMessage... | Remove Client from Group | evictClientFromGroup | {
"repo_name": "madtrax/keywhiz",
"path": "server/src/main/java/keywhiz/service/resources/automation/AutomationEnrollClientGroupResource.java",
"license": "apache-2.0",
"size": 3967
} | [
"com.codahale.metrics.annotation.Timed",
"io.dropwizard.auth.Auth",
"java.util.HashMap",
"java.util.Map",
"javax.ws.rs.NotFoundException",
"javax.ws.rs.PathParam",
"javax.ws.rs.core.Response"
] | import com.codahale.metrics.annotation.Timed; import io.dropwizard.auth.Auth; import java.util.HashMap; import java.util.Map; import javax.ws.rs.NotFoundException; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; | import com.codahale.metrics.annotation.*; import io.dropwizard.auth.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.codahale.metrics",
"io.dropwizard.auth",
"java.util",
"javax.ws"
] | com.codahale.metrics; io.dropwizard.auth; java.util; javax.ws; | 1,122,517 |
public SSDate getEndDate() {
return this.endTimePicker.getDateTime();
} | SSDate function() { return this.endTimePicker.getDateTime(); } | /**
* Get the end date selected
*
* @author Alec Erasmus <alec.erasmus@a24group.com>
* @since 16 May 2013
*
* @return the selected end date
*/ | Get the end date selected | getEndDate | {
"repo_name": "A24Group/ssGWT-lib",
"path": "src/org/ssgwt/client/ui/datecomponents/DateTimeComponent.java",
"license": "apache-2.0",
"size": 33594
} | [
"org.ssgwt.client.i18n.SSDate"
] | import org.ssgwt.client.i18n.SSDate; | import org.ssgwt.client.i18n.*; | [
"org.ssgwt.client"
] | org.ssgwt.client; | 597,130 |
public void removeAttribute(String name) {
HttpSession session = getHttpSession();
if (session != null) {
session.removeAttribute(name);
}
}
// ----- helper methods ---------------------------------------------------- | void function(String name) { HttpSession session = getHttpSession(); if (session != null) { session.removeAttribute(name); } } | /**
* Remove the attribute identified by the given name from the current session.
*
* @param name the attribute name
*/ | Remove the attribute identified by the given name from the current session | removeAttribute | {
"repo_name": "radicalbit/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariSessionManager.java",
"license": "apache-2.0",
"size": 3541
} | [
"javax.servlet.http.HttpSession"
] | import javax.servlet.http.HttpSession; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,488,021 |
private void closeContext(DirContext ctx) {
if (ctx != null) {
try {
ctx.close();
}
catch (Exception e) {
}
}
} | void function(DirContext ctx) { if (ctx != null) { try { ctx.close(); } catch (Exception e) { } } } | /**
* Close the context and swallow any exceptions.
*
* @param ctx the DirContext to close.
*/ | Close the context and swallow any exceptions | closeContext | {
"repo_name": "spasam/spring-ldap",
"path": "core/src/main/java/org/springframework/ldap/core/support/AbstractContextSource.java",
"license": "apache-2.0",
"size": 18335
} | [
"javax.naming.directory.DirContext"
] | import javax.naming.directory.DirContext; | import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 1,872,807 |
public ClusterUpdate withVirtualNetworkConfiguration(VirtualNetworkConfiguration virtualNetworkConfiguration) {
if (this.innerProperties() == null) {
this.innerProperties = new ClusterProperties();
}
this.innerProperties().withVirtualNetworkConfiguration(virtualNetworkConfigurati... | ClusterUpdate function(VirtualNetworkConfiguration virtualNetworkConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new ClusterProperties(); } this.innerProperties().withVirtualNetworkConfiguration(virtualNetworkConfiguration); return this; } | /**
* Set the virtualNetworkConfiguration property: Virtual network definition.
*
* @param virtualNetworkConfiguration the virtualNetworkConfiguration value to set.
* @return the ClusterUpdate object itself.
*/ | Set the virtualNetworkConfiguration property: Virtual network definition | withVirtualNetworkConfiguration | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/models/ClusterUpdate.java",
"license": "mit",
"size": 21531
} | [
"com.azure.resourcemanager.kusto.fluent.models.ClusterProperties"
] | import com.azure.resourcemanager.kusto.fluent.models.ClusterProperties; | import com.azure.resourcemanager.kusto.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 372,019 |
void onProjectChange(AngeronaProject project);
public static class DefaultUserObjectFactory implements UserObjectFactory { | void onProjectChange(AngeronaProject project); public static class DefaultUserObjectFactory implements UserObjectFactory { | /**
* Is called if a new project is loaded for example.
* @param project
*/ | Is called if a new project is loaded for example | onProjectChange | {
"repo_name": "Angerona/angerona-framework",
"path": "gui/src/main/java/com/github/angerona/fw/gui/project/ProjectView.java",
"license": "gpl-3.0",
"size": 1546
} | [
"com.github.angerona.fw.AngeronaProject"
] | import com.github.angerona.fw.AngeronaProject; | import com.github.angerona.fw.*; | [
"com.github.angerona"
] | com.github.angerona; | 468,915 |
public List<Driver> getDrivers(); | List<Driver> function(); | /**
* Get the list of drivers
*
* @return the list of drivers.
*/ | Get the list of drivers | getDrivers | {
"repo_name": "darranl/ironjacamar",
"path": "common/src/main/java/org/ironjacamar/common/api/metadata/ds/DataSources.java",
"license": "epl-1.0",
"size": 1847
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 809,053 |
private void processSinksAddedInternal(Set<ConnectPoint> sources, IpAddress mcastIp,
Map<HostId, Set<ConnectPoint>> newSinks,
Set<ConnectPoint> allPrevSinks) {
lastMcastChange.set(Instant.now());
log.info("Processi... | void function(Set<ConnectPoint> sources, IpAddress mcastIp, Map<HostId, Set<ConnectPoint>> newSinks, Set<ConnectPoint> allPrevSinks) { lastMcastChange.set(Instant.now()); log.info(STR, mcastIp, sources); if (!mcastUtils.isLeader(mcastIp)) { log.debug(STR, mcastIp); return; } sources.forEach(source -> { Set<ConnectPoint... | /**
* Process sinks to be added.
*
* @param sources the source connect points
* @param mcastIp the group IP
* @param newSinks the new sinks to be processed
* @param allPrevSinks all previous sinks
*/ | Process sinks to be added | processSinksAddedInternal | {
"repo_name": "oplinkoms/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/mcast/McastHandler.java",
"license": "apache-2.0",
"size": 103773
} | [
"com.google.common.collect.Sets",
"java.time.Instant",
"java.util.Map",
"java.util.Set",
"org.onlab.packet.IpAddress",
"org.onosproject.net.ConnectPoint",
"org.onosproject.net.HostId"
] | import com.google.common.collect.Sets; import java.time.Instant; import java.util.Map; import java.util.Set; import org.onlab.packet.IpAddress; import org.onosproject.net.ConnectPoint; import org.onosproject.net.HostId; | import com.google.common.collect.*; import java.time.*; import java.util.*; import org.onlab.packet.*; import org.onosproject.net.*; | [
"com.google.common",
"java.time",
"java.util",
"org.onlab.packet",
"org.onosproject.net"
] | com.google.common; java.time; java.util; org.onlab.packet; org.onosproject.net; | 1,684,947 |
public String getPrimefacesVersion() {
return RequestContext.getCurrentInstance().getApplicationContext().getConfig().getBuildVersion();
} | String function() { return RequestContext.getCurrentInstance().getApplicationContext().getConfig().getBuildVersion(); } | /**
* TIP from <a href="http://forum.primefaces.org/viewtopic.php?f=3&t=47078">Primefaces forum</a>.
*
* @return The build version of the current Primefaces.
*/ | TIP from Primefaces forum | getPrimefacesVersion | {
"repo_name": "webelcomau/Webel_PrimeFaces_test_template_NetBeans_Ant",
"path": "src/java/com/webel/test/primefaces/PrimefacesUtil.java",
"license": "gpl-3.0",
"size": 763
} | [
"org.primefaces.context.RequestContext"
] | import org.primefaces.context.RequestContext; | import org.primefaces.context.*; | [
"org.primefaces.context"
] | org.primefaces.context; | 2,612,529 |
public final MetaProperty<String> propertyTwo() {
return _propertyTwo;
} | final MetaProperty<String> function() { return _propertyTwo; } | /**
* The meta-property for the {@code propertyTwo} property.
* @return the meta-property, not null
*/ | The meta-property for the propertyTwo property | propertyTwo | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-MasterDB/src/test/java/com/opengamma/masterdb/position/MockDeal.java",
"license": "apache-2.0",
"size": 7571
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,513,177 |
List<VKontakteProfile> getUsers(List<String> userIds, String fields); | List<VKontakteProfile> getUsers(List<String> userIds, String fields); | /**
* Retrieves profiles for specified user unique identifiers.
*
* @param userIds VKontakte user profile unique identifiers, for which to gt data.
* @param fields VKontakte fields to retrieve, comma-delimited.
* If {@code null} is passed user profile or the current user will be... | Retrieves profiles for specified user unique identifiers | getUsers | {
"repo_name": "Klaxon77/spring-social-vkontakte",
"path": "spring-social-vkontakte/src/main/java/org/springframework/social/vkontakte/api/IUsersOperations.java",
"license": "apache-2.0",
"size": 4691
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,595,398 |
protected static boolean setResourceConfig(HelixDataAccessor accessor, String resource,
ResourceConfig resourceConfig) {
PropertyKey.Builder keyBuilder = accessor.keyBuilder();
return accessor.setProperty(keyBuilder.resourceConfig(resource), resourceConfig);
}
/**
* Get a Helix configuration sco... | static boolean function(HelixDataAccessor accessor, String resource, ResourceConfig resourceConfig) { PropertyKey.Builder keyBuilder = accessor.keyBuilder(); return accessor.setProperty(keyBuilder.resourceConfig(resource), resourceConfig); } /** * Get a Helix configuration scope at a resource (i.e. job and workflow) le... | /**
* Set the resource config
* @param accessor Accessor to Helix configs
* @param resource The resource name
* @param resourceConfig The resource config to be set
* @return True if set successfully, otherwise false
*/ | Set the resource config | setResourceConfig | {
"repo_name": "kongweihan/helix",
"path": "helix-core/src/main/java/org/apache/helix/task/TaskUtil.java",
"license": "apache-2.0",
"size": 18739
} | [
"org.apache.helix.HelixDataAccessor",
"org.apache.helix.PropertyKey",
"org.apache.helix.model.HelixConfigScope",
"org.apache.helix.model.ResourceConfig"
] | import org.apache.helix.HelixDataAccessor; import org.apache.helix.PropertyKey; import org.apache.helix.model.HelixConfigScope; import org.apache.helix.model.ResourceConfig; | import org.apache.helix.*; import org.apache.helix.model.*; | [
"org.apache.helix"
] | org.apache.helix; | 2,774,322 |
public Set<HttpMethod> optionsForAllow(String url, Map<String, ?> urlVariables) {
return this.restTemplate.optionsForAllow(url, urlVariables);
} | Set<HttpMethod> function(String url, Map<String, ?> urlVariables) { return this.restTemplate.optionsForAllow(url, urlVariables); } | /**
* Return the value of the Allow header for the given URI.
* <p>
* URI Template variables are expanded using the given map.
* @param url the URL
* @param urlVariables the variables to expand in the template
* @return the value of the allow header
* @see RestTemplate#optionsForAllow(java.lang.String, ja... | Return the value of the Allow header for the given URI. URI Template variables are expanded using the given map | optionsForAllow | {
"repo_name": "mdeinum/spring-boot",
"path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java",
"license": "apache-2.0",
"size": 44465
} | [
"java.util.Map",
"java.util.Set",
"org.springframework.http.HttpMethod"
] | import java.util.Map; import java.util.Set; import org.springframework.http.HttpMethod; | import java.util.*; import org.springframework.http.*; | [
"java.util",
"org.springframework.http"
] | java.util; org.springframework.http; | 1,985,005 |
public static boolean executeModifyOperation(final String currentDn, final ConnectionFactory connectionFactory, final LdapEntry entry) {
final Map<String, Set<String>> attributes = entry.getAttributes().stream()
.collect(Collectors.toMap(LdapAttribute::getName, ldapAttribute -> new HashSet<>(lda... | static boolean function(final String currentDn, final ConnectionFactory connectionFactory, final LdapEntry entry) { final Map<String, Set<String>> attributes = entry.getAttributes().stream() .collect(Collectors.toMap(LdapAttribute::getName, ldapAttribute -> new HashSet<>(ldapAttribute.getStringValues()))); return execu... | /**
* Execute modify operation boolean.
*
* @param currentDn the current dn
* @param connectionFactory the connection factory
* @param entry the entry
* @return true/false
*/ | Execute modify operation boolean | executeModifyOperation | {
"repo_name": "frett/cas",
"path": "support/cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java",
"license": "apache-2.0",
"size": 45179
} | [
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"java.util.stream.Collectors",
"org.ldaptive.ConnectionFactory",
"org.ldaptive.LdapAttribute",
"org.ldaptive.LdapEntry"
] | import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import org.ldaptive.ConnectionFactory; import org.ldaptive.LdapAttribute; import org.ldaptive.LdapEntry; | import java.util.*; import java.util.stream.*; import org.ldaptive.*; | [
"java.util",
"org.ldaptive"
] | java.util; org.ldaptive; | 2,575,926 |
public void transform(IDataProviderAnnotation annotation, Method method);
| void function(IDataProviderAnnotation annotation, Method method); | /**
* Transform an IDataProvider annotation.
*
* @param method
* The method annotated with the IDataProvider annotation.
*/ | Transform an IDataProvider annotation | transform | {
"repo_name": "qmetry/qaf",
"path": "src/org/testng/IAnnotationTransformer2.java",
"license": "mit",
"size": 1994
} | [
"java.lang.reflect.Method",
"org.testng.annotations.IDataProviderAnnotation"
] | import java.lang.reflect.Method; import org.testng.annotations.IDataProviderAnnotation; | import java.lang.reflect.*; import org.testng.annotations.*; | [
"java.lang",
"org.testng.annotations"
] | java.lang; org.testng.annotations; | 2,535,957 |
public String getTimeStamp() {
return formatDate(new Date());
} | String function() { return formatDate(new Date()); } | /**
* Gets a String representation of the current time.
* @return a String representation of the current time.
*/ | Gets a String representation of the current time | getTimeStamp | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/LogWriterImpl.java",
"license": "apache-2.0",
"size": 43096
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 70,252 |
@Override
public String toString() {
Color src = UIManager.getColor(uiDefaultParentName);
String s = "DerivedColor(color=" + getRed() + "," + getGreen() + "," + getBlue() +
" parent=" + uiDefaultParentName +
" offsets=" + getHueOffset() + "," + getSaturationOffset... | String function() { Color src = UIManager.getColor(uiDefaultParentName); String s = STR + getRed() + "," + getGreen() + "," + getBlue() + STR + uiDefaultParentName + STR + getHueOffset() + "," + getSaturationOffset() + "," + getBrightnessOffset() + "," + getAlphaOffset(); return src == null ? s : s + STR + src.getRed()... | /**
* Returns a string representation of this <code>Color</code>. This method
* is intended to be used only for debugging purposes. The content and
* format of the returned string might vary between implementations. The
* returned string might be empty but cannot be <code>null</code>.
*
* ... | Returns a string representation of this <code>Color</code>. This method is intended to be used only for debugging purposes. The content and format of the returned string might vary between implementations. The returned string might be empty but cannot be <code>null</code> | toString | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/javax/swing/plaf/nimbus/DerivedColor.java",
"license": "gpl-2.0",
"size": 6941
} | [
"java.awt.Color",
"javax.swing.UIManager"
] | import java.awt.Color; import javax.swing.UIManager; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,916,303 |
public BusinessObjectDataNotificationRegistrationEntity getBusinessObjectDataNotificationRegistrationEntity(
NotificationRegistrationKey key) throws ObjectNotFoundException
{
BusinessObjectDataNotificationRegistrationEntity businessObjectDataNotificationRegistrationEntity = businessObjectDataNot... | BusinessObjectDataNotificationRegistrationEntity function( NotificationRegistrationKey key) throws ObjectNotFoundException { BusinessObjectDataNotificationRegistrationEntity businessObjectDataNotificationRegistrationEntity = businessObjectDataNotificationRegistrationDao .getBusinessObjectDataNotificationRegistrationByA... | /**
* Gets a business object data notification registration entity based on the key and makes sure that it exists.
*
* @param key the business object data notification registration key
*
* @return the business object data notification registration entity
* @throws ObjectNotFoundException i... | Gets a business object data notification registration entity based on the key and makes sure that it exists | getBusinessObjectDataNotificationRegistrationEntity | {
"repo_name": "seoj/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataNotificationRegistrationDaoHelper.java",
"license": "apache-2.0",
"size": 2406
} | [
"org.finra.herd.model.ObjectNotFoundException",
"org.finra.herd.model.api.xml.NotificationRegistrationKey",
"org.finra.herd.model.jpa.BusinessObjectDataNotificationRegistrationEntity"
] | import org.finra.herd.model.ObjectNotFoundException; import org.finra.herd.model.api.xml.NotificationRegistrationKey; import org.finra.herd.model.jpa.BusinessObjectDataNotificationRegistrationEntity; | import org.finra.herd.model.*; import org.finra.herd.model.api.xml.*; import org.finra.herd.model.jpa.*; | [
"org.finra.herd"
] | org.finra.herd; | 622,021 |
OutputStream getOutputStream(String name) throws IOException {
if(name == null){
throw new IllegalArgumentException("Input to function was null");
}
File f = getFileForWriting(name);
return new FileOutputStream(f);
}
| OutputStream getOutputStream(String name) throws IOException { if(name == null){ throw new IllegalArgumentException(STR); } File f = getFileForWriting(name); return new FileOutputStream(f); } | /**Sets up an output stream to which a resource file can be written; this
* resource file will be in a subdirectory of the resources directory in
* the working directory.
*
* @param name The name of the file to write.
* @return The output stream.
* @throws IOException
*/ | Sets up an output stream to which a resource file can be written; this resource file will be in a subdirectory of the resources directory in the working directory | getOutputStream | {
"repo_name": "metamolecular/opsin",
"path": "opsin-core/src/main/java/uk/ac/cam/ch/wwmm/opsin/ResourceGetter.java",
"license": "artistic-2.0",
"size": 5795
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 692,421 |
public NameParser getNameParser(String name)
throws NamingException {
return new NameParserImpl();
} | NameParser function(String name) throws NamingException { return new NameParserImpl(); } | /**
* Retrieves the parser associated with the named context.
*
* @param name the name of the context from which to get the parser
* @return a name parser that can parse compound names into their atomic
* components
* @exception NamingException if a naming exception is encountered
*... | Retrieves the parser associated with the named context | getNameParser | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/naming/resources/BaseDirContext.java",
"license": "apache-2.0",
"size": 48650
} | [
"javax.naming.NameParser",
"javax.naming.NamingException",
"org.apache.naming.NameParserImpl"
] | import javax.naming.NameParser; import javax.naming.NamingException; import org.apache.naming.NameParserImpl; | import javax.naming.*; import org.apache.naming.*; | [
"javax.naming",
"org.apache.naming"
] | javax.naming; org.apache.naming; | 650,608 |
public AsyncMethodType<SessionBeanType<T>> createAsyncMethod()
{
return new AsyncMethodTypeImpl<SessionBeanType<T>>(this, "async-method", childNode);
} | AsyncMethodType<SessionBeanType<T>> function() { return new AsyncMethodTypeImpl<SessionBeanType<T>>(this, STR, childNode); } | /**
* Creates a new <code>async-method</code> element
* @return the new created instance of <code>AsyncMethodType<SessionBeanType<T>></code>
*/ | Creates a new <code>async-method</code> element | createAsyncMethod | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar32/SessionBeanTypeImpl.java",
"license": "epl-1.0",
"size": 107840
} | [
"org.jboss.shrinkwrap.descriptor.api.ejbjar32.AsyncMethodType",
"org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType"
] | import org.jboss.shrinkwrap.descriptor.api.ejbjar32.AsyncMethodType; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType; | import org.jboss.shrinkwrap.descriptor.api.ejbjar32.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,761,766 |
public boolean hasChanges(final ResourceResolver resolver) {
for(final ModifyingResourceProvider provider : this.modifyingProviders) {
if ( provider.hasChanges(resolver) ) {
return true;
}
}
return false;
} | boolean function(final ResourceResolver resolver) { for(final ModifyingResourceProvider provider : this.modifyingProviders) { if ( provider.hasChanges(resolver) ) { return true; } } return false; } | /**
* Do we have changes?
*/ | Do we have changes | hasChanges | {
"repo_name": "MRivas-XumaK/slingBuild",
"path": "bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverContext.java",
"license": "apache-2.0",
"size": 11055
} | [
"org.apache.sling.api.resource.ModifyingResourceProvider",
"org.apache.sling.api.resource.ResourceResolver"
] | import org.apache.sling.api.resource.ModifyingResourceProvider; import org.apache.sling.api.resource.ResourceResolver; | import org.apache.sling.api.resource.*; | [
"org.apache.sling"
] | org.apache.sling; | 1,175,067 |
public static Vector breakAt(String s, char sep, int maxItems) {
return breakAt(s, sep, maxItems, false);
} | static Vector function(String s, char sep, int maxItems) { return breakAt(s, sep, maxItems, false); } | /**
* Break a string at a separator char, returning a vector of at most
* maxItems strings. Include any empty strings in the result.
*/ | Break a string at a separator char, returning a vector of at most maxItems strings. Include any empty strings in the result | breakAt | {
"repo_name": "ravis411/SimCity201",
"path": "src/agent/StringUtil.java",
"license": "mit",
"size": 22150
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,505,876 |
@Transient
public Date getDate() {
return this.issueDate;
}
| Date function() { return this.issueDate; } | /**
* Gets the date. Necessary to implement <code>ICalculableContainer</code>
*
* @return the date
*/ | Gets the date. Necessary to implement <code>ICalculableContainer</code> | getDate | {
"repo_name": "Esleelkartea/aonGTA",
"path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-finance/src/com/code/aon/finance/Invoice.java",
"license": "gpl-2.0",
"size": 9860
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 826,885 |
public void check(final CompilationTimeStamp timestamp) {
if (lastCompilationTimeStamp != null && !lastCompilationTimeStamp.isLess(timestamp)) {
return;
}
T3Doc.check(this.getCommentLocation(), "group");
NamingConventionHelper.checkConvention(PreferenceConstants.REPORTNAMINGCONVENTION_GROUP, identifier,... | void function(final CompilationTimeStamp timestamp) { if (lastCompilationTimeStamp != null && !lastCompilationTimeStamp.isLess(timestamp)) { return; } T3Doc.check(this.getCommentLocation(), "group"); NamingConventionHelper.checkConvention(PreferenceConstants.REPORTNAMINGCONVENTION_GROUP, identifier, "group"); NamingCon... | /**
* Checks the whole group for semantic errors.
*
* @param timestamp
* The timestamp of the actual semantic check cycle.
*/ | Checks the whole group for semantic errors | check | {
"repo_name": "alovassy/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/definitions/Group.java",
"license": "epl-1.0",
"size": 29890
} | [
"org.eclipse.titan.designer.AST",
"org.eclipse.titan.designer.editors.T3Doc",
"org.eclipse.titan.designer.parsers.CompilationTimeStamp",
"org.eclipse.titan.designer.preferences.PreferenceConstants"
] | import org.eclipse.titan.designer.AST; import org.eclipse.titan.designer.editors.T3Doc; import org.eclipse.titan.designer.parsers.CompilationTimeStamp; import org.eclipse.titan.designer.preferences.PreferenceConstants; | import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.editors.*; import org.eclipse.titan.designer.parsers.*; import org.eclipse.titan.designer.preferences.*; | [
"org.eclipse.titan"
] | org.eclipse.titan; | 1,230,715 |
@Transient
public Dimension getExtentSize() {
return getSize();
} | Dimension function() { return getSize(); } | /**
* Returns the size of the visible part of the view in view coordinates.
*
* @return a <code>Dimension</code> object giving the size of the view
*/ | Returns the size of the visible part of the view in view coordinates | getExtentSize | {
"repo_name": "javalovercn/j2se_for_android",
"path": "src/javax/swing/JViewport.java",
"license": "gpl-2.0",
"size": 11352
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,218,611 |
public void setIncompletePaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.incompletePaint = paint;
notifyListeners(new RendererChangeEvent(this));
}
| void function(Paint paint) { if (paint == null) { throw new IllegalArgumentException(STR); } this.incompletePaint = paint; notifyListeners(new RendererChangeEvent(this)); } | /**
* Sets the paint used to show the percentage incomplete and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getIncompletePaint()
*/ | Sets the paint used to show the percentage incomplete and sends a <code>RendererChangeEvent</code> to all registered listeners | setIncompletePaint | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/category/GanttRenderer.java",
"license": "gpl-2.0",
"size": 23046
} | [
"java.awt.Paint",
"org.jfree.chart.event.RendererChangeEvent"
] | import java.awt.Paint; import org.jfree.chart.event.RendererChangeEvent; | import java.awt.*; import org.jfree.chart.event.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 468,699 |
@Test
public void testCompareServerLocalDifferent() throws IOException {
final String fileName = "File7.txt";
final String fileNameD = "File7D.txt";
// Setup
keyFile.addClientFile(new ClientFile(fileName, "", null, fileNameD));
assertTrue(new File(testDir, fileName).createNewFile());
FileCompareResult... | void function() throws IOException { final String fileName = STR; final String fileNameD = STR; keyFile.addClientFile(new ClientFile(fileName, "", null, fileNameD)); assertTrue(new File(testDir, fileName).createNewFile()); FileCompareResult expected = new FileCompareResult(fileName, CompareResultType.CONFLICTED); Colle... | /**
* Test the check for a file existing local and on the server but not in hashes, the files are different
*
* @throws IOException
*/ | Test the check for a file existing local and on the server but not in hashes, the files are different | testCompareServerLocalDifferent | {
"repo_name": "Fides-Storage/Client",
"path": "src/test/java/org/fides/client/files/FileManagerCompareTest.java",
"license": "gpl-2.0",
"size": 10740
} | [
"java.io.File",
"java.io.IOException",
"java.util.Collection",
"org.fides.client.files.data.ClientFile",
"org.fides.client.files.data.CompareResultType",
"org.fides.client.files.data.FileCompareResult",
"org.junit.Assert"
] | import java.io.File; import java.io.IOException; import java.util.Collection; import org.fides.client.files.data.ClientFile; import org.fides.client.files.data.CompareResultType; import org.fides.client.files.data.FileCompareResult; import org.junit.Assert; | import java.io.*; import java.util.*; import org.fides.client.files.data.*; import org.junit.*; | [
"java.io",
"java.util",
"org.fides.client",
"org.junit"
] | java.io; java.util; org.fides.client; org.junit; | 338,337 |
public void parseBatchResult(ClientResponse response) throws IOException,
ServiceException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
InputStream inputStream = response.getEntityInputStream();
ReaderWriter.writeTo(inputStream, byteArrayOutputStre... | void function(ClientResponse response) throws IOException, ServiceException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); InputStream inputStream = response.getEntityInputStream(); ReaderWriter.writeTo(inputStream, byteArrayOutputStream); response.setEntityInputStream(new ByteArrayInputSt... | /**
* Parses the batch result.
*
* @param response
* the response
* @param mediaBatchOperations
* the media batch operations
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws ServiceException
* t... | Parses the batch result | parseBatchResult | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/mediaservices/microsoft-azure-media/src/main/java/com/microsoft/windowsazure/services/media/implementation/MediaBatchOperations.java",
"license": "mit",
"size": 20550
} | [
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation",
"com.microsoft.windowsazure.services.media.models.Job",
"com.microsoft.windowsazure.services.media.models.JobInfo",
"com.microsoft.windowsazure.services.media.models.Ta... | import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.services.media.entityoperations.EntityBatchOperation; import com.microsoft.windowsazure.services.media.models.Job; import com.microsoft.windowsazure.services.media.models.JobInfo; import com.microsoft.windowsazure.services.m... | import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.services.media.entityoperations.*; import com.microsoft.windowsazure.services.media.models.*; import com.sun.jersey.api.client.*; import com.sun.jersey.core.header.*; import com.sun.jersey.core.util.*; import java.io.*; import java.util.*;... | [
"com.microsoft.windowsazure",
"com.sun.jersey",
"java.io",
"java.util",
"javax.activation",
"javax.mail",
"javax.xml"
] | com.microsoft.windowsazure; com.sun.jersey; java.io; java.util; javax.activation; javax.mail; javax.xml; | 2,426,923 |
public static double startSimulation() throws NullPointerException {
Log.printConcatLine("Starting CloudSim version ", CLOUDSIM_VERSION_STRING);
try {
double clock = run();
// reset all static variables
cisId = -1;
shutdownId = -1;
cis = null;
calendar = null;
traceFlag = false;
return ... | static double function() throws NullPointerException { Log.printConcatLine(STR, CLOUDSIM_VERSION_STRING); try { double clock = run(); cisId = -1; shutdownId = -1; cis = null; calendar = null; traceFlag = false; return clock; } catch (IllegalArgumentException e) { e.printStackTrace(); throw new NullPointerException(STR ... | /**
* Starts the execution of CloudSim simulation. It waits for complete execution of all entities,
* i.e. until all entities threads reach non-RUNNABLE state or there are no more events in the
* future event queue.
* <p>
* <b>Note</b>: This method should be called after all the entities have been setup and a... | Starts the execution of CloudSim simulation. It waits for complete execution of all entities, i.e. until all entities threads reach non-RUNNABLE state or there are no more events in the future event queue. Note: This method should be called after all the entities have been setup and added | startSimulation | {
"repo_name": "mhe504/MigSim",
"path": "src/org/cloudbus/cloudsim/core/CloudSim.java",
"license": "mit",
"size": 26491
} | [
"org.cloudbus.cloudsim.Log"
] | import org.cloudbus.cloudsim.Log; | import org.cloudbus.cloudsim.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 741,885 |
public void setTestCompileSourceRoots( List testCompileSourceRoots )
{
this.testCompileSourceRoots = testCompileSourceRoots;
} | void function( List testCompileSourceRoots ) { this.testCompileSourceRoots = testCompileSourceRoots; } | /**
* Sets the test compile source roots.
*
* @param testCompileSourceRoots the new test compile source roots
*/ | Sets the test compile source roots | setTestCompileSourceRoots | {
"repo_name": "apache/maven-enforcer",
"path": "enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/MockProject.java",
"license": "apache-2.0",
"size": 41927
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,837,307 |
private int getUserId(DeviceAdminInfo adminInfo) {
return UserHandle.getUserId(adminInfo.getActivityInfo().applicationInfo.uid);
} | int function(DeviceAdminInfo adminInfo) { return UserHandle.getUserId(adminInfo.getActivityInfo().applicationInfo.uid); } | /**
* Extracts the user id from a device admin info object.
* @param adminInfo the device administrator info.
* @return identifier of the user associated with the device admin.
*/ | Extracts the user id from a device admin info object | getUserId | {
"repo_name": "xorware/android_packages_apps_Settings",
"path": "src/com/android/settings/DeviceAdminSettings.java",
"license": "lgpl-3.0",
"size": 17052
} | [
"android.app.admin.DeviceAdminInfo",
"android.os.UserHandle"
] | import android.app.admin.DeviceAdminInfo; import android.os.UserHandle; | import android.app.admin.*; import android.os.*; | [
"android.app",
"android.os"
] | android.app; android.os; | 33,349 |
void enterVariableDeclarators(@NotNull JavaParser.VariableDeclaratorsContext ctx);
void exitVariableDeclarators(@NotNull JavaParser.VariableDeclaratorsContext ctx); | void enterVariableDeclarators(@NotNull JavaParser.VariableDeclaratorsContext ctx); void exitVariableDeclarators(@NotNull JavaParser.VariableDeclaratorsContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#variableDeclarators}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#variableDeclarators</code> | exitVariableDeclarators | {
"repo_name": "code4craft/daogen",
"path": "daogen-core/src/main/java/com/dianping/daogen/antlr/JavaListener.java",
"license": "mit",
"size": 38983
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,470,254 |
public void setSecurityTokenReference(SecurityTokenReference secRef) {
useCustomSecRef = true;
this.secRef = secRef;
} | void function(SecurityTokenReference secRef) { useCustomSecRef = true; this.secRef = secRef; } | /**
* Set the SecurityTokenReference to be used in the KeyInfo element. If this
* method is not called, a SecurityTokenRefence will be generated.
*/ | Set the SecurityTokenReference to be used in the KeyInfo element. If this method is not called, a SecurityTokenRefence will be generated | setSecurityTokenReference | {
"repo_name": "fatfredyy/wss4j-ecc",
"path": "src/main/java/org/apache/ws/security/message/WSSecSignature.java",
"license": "apache-2.0",
"size": 31511
} | [
"org.apache.ws.security.message.token.SecurityTokenReference"
] | import org.apache.ws.security.message.token.SecurityTokenReference; | import org.apache.ws.security.message.token.*; | [
"org.apache.ws"
] | org.apache.ws; | 2,573,252 |
public void remove() {
throw new UnsupportedOperationException();
}
}
private static class SingletonIterator implements Iterator<int[]> {
private final int[] singleton;
private boolean more = true;
SingletonIterator(final int[]... | void function() { throw new UnsupportedOperationException(); } } private static class SingletonIterator implements Iterator<int[]> { private final int[] singleton; private boolean more = true; SingletonIterator(final int[] singleton) { this.singleton = singleton; } | /**
* Not supported.
*/ | Not supported | remove | {
"repo_name": "najibghadri/NeuralNetworkSimulator",
"path": "src/org/apache/commons/math3/util/Combinations.java",
"license": "mit",
"size": 13849
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,166,185 |
public void readMapEnd()
throws IOException
{
int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();
if (code != 'Z')
throw error("expected end of map ('Z') at '" + codeName(code) + "'");
} | void function() throws IOException { int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read(); if (code != 'Z') throw error(STR + codeName(code) + "'"); } | /**
* Reads the end byte.
*/ | Reads the end byte | readMapEnd | {
"repo_name": "roidelapluie/yajsw",
"path": "src/hessian/src/main/java/com/caucho/hessian4/io/Hessian2Input.java",
"license": "lgpl-2.1",
"size": 66457
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 760,474 |
private Option newOptionWithArg(String name, String arg, String description) {
return Option.builder().longOpt(name).argName(arg).hasArg().desc(description).build();
} | Option function(String name, String arg, String description) { return Option.builder().longOpt(name).argName(arg).hasArg().desc(description).build(); } | /**
* Builds a new option.
*
* @param name the long name
* @param arg the argument name
* @param description the description
* @return a new option
*/ | Builds a new option | newOptionWithArg | {
"repo_name": "stefanneuhaus/DependencyCheck",
"path": "cli/src/main/java/org/owasp/dependencycheck/CliParser.java",
"license": "apache-2.0",
"size": 57394
} | [
"org.apache.commons.cli.Option"
] | import org.apache.commons.cli.Option; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 507,629 |
public Object convertToBinaryStringStorageType(Object object) throws KettleValueException
{
if (object==null) return null;
switch(storageType)
{
case STORAGE_TYPE_NORMAL:
return convertNormalStorageTypeToBinaryString(object);
case STORAGE_TYPE_BINARY_STRING :
return ... | Object function(Object object) throws KettleValueException { if (object==null) return null; switch(storageType) { case STORAGE_TYPE_NORMAL: return convertNormalStorageTypeToBinaryString(object); case STORAGE_TYPE_BINARY_STRING : return object; case STORAGE_TYPE_INDEXED : return convertNormalStorageTypeToBinaryString( i... | /**
* Converts the specified data object to the binary string storage type.
* @param object the data object to convert
* @return the data in a binary string storage type
* @throws KettleValueException In case there is a data conversion error.
*/ | Converts the specified data object to the binary string storage type | convertToBinaryStringStorageType | {
"repo_name": "soluvas/pdi-ce",
"path": "src-core/org/pentaho/di/core/row/ValueMeta.java",
"license": "apache-2.0",
"size": 137855
} | [
"org.pentaho.di.core.exception.KettleValueException"
] | import org.pentaho.di.core.exception.KettleValueException; | import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,403,345 |
public static void copyFromBufferToBuffer(ByteBuffer out,
ByteBuffer in, int sourceOffset, int length) {
if (in.hasArray() && out.hasArray()) {
System.arraycopy(in.array(), sourceOffset + in.arrayOffset(),
out.array(), out.position() +
out.arrayOffset(), length);
skip(out, le... | static void function(ByteBuffer out, ByteBuffer in, int sourceOffset, int length) { if (in.hasArray() && out.hasArray()) { System.arraycopy(in.array(), sourceOffset + in.arrayOffset(), out.array(), out.position() + out.arrayOffset(), length); skip(out, length); } else { for (int i = 0; i < length; ++i) { out.put(in.get... | /**
* Copy from one buffer to another from given offset
* @param out destination buffer
* @param in source buffer
* @param sourceOffset offset in the source buffer
* @param length how many bytes to copy
*/ | Copy from one buffer to another from given offset | copyFromBufferToBuffer | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java",
"license": "apache-2.0",
"size": 13495
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 75,232 |
requireNonNull(to, "Unable to merge relevant outline items to a null outline.");
if (!pagesLookup.isEmpty()) {
ofNullable(document.getDocumentCatalog().getDocumentOutline()).ifPresent(outline -> {
for (PDOutlineItem child : outline.children()) {
cloneNode(child, p... | requireNonNull(to, STR); if (!pagesLookup.isEmpty()) { ofNullable(document.getDocumentCatalog().getDocumentOutline()).ifPresent(outline -> { for (PDOutlineItem child : outline.children()) { cloneNode(child, pagesLookup).ifPresent(c -> to.addLast(c)); } LOG.debug(STR); }); } } | /**
* Appends to the given outline, all the outline items whose page destination is relevant
*
* @param to
* @param pagesLookup
*/ | Appends to the given outline, all the outline items whose page destination is relevant | appendRelevantOutlineTo | {
"repo_name": "torakiki/sejda",
"path": "sejda-sambox/src/main/java/org/sejda/impl/sambox/component/OutlineDistiller.java",
"license": "agpl-3.0",
"size": 5292
} | [
"java.util.Optional",
"org.sejda.sambox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem"
] | import java.util.Optional; import org.sejda.sambox.pdmodel.interactive.documentnavigation.outline.PDOutlineItem; | import java.util.*; import org.sejda.sambox.pdmodel.interactive.documentnavigation.outline.*; | [
"java.util",
"org.sejda.sambox"
] | java.util; org.sejda.sambox; | 390,631 |
private boolean allocateLandUse(final Projection projection,
final AllocationLU allocationLU,
final AllocationScenario allocationScenario,
final SimpleFeatureCollection sortedUazCollection,
final SimpleFeatureStore featureStore, final ALURule rule,
final Transaction transaction, final St... | boolean function(final Projection projection, final AllocationLU allocationLU, final AllocationScenario allocationScenario, final SimpleFeatureCollection sortedUazCollection, final SimpleFeatureStore featureStore, final ALURule rule, final Transaction transaction, final String scoreLabel, final Set<AreaRequirement> out... | /**
* Allocate land use.
*
* @param projection
* the projection
* @param allocationLU
* the future lu
* @param allocationScenario
* the allocation scenario
* @param sortedUazCollection
* @param featureStore
* @param transaction
* @param rule
* @param sco... | Allocate land use | allocateLandUse | {
"repo_name": "AURIN/online-whatif",
"path": "src/main/java/au/org/aurin/wif/impl/allocation/AllocationAnalyzer.java",
"license": "mit",
"size": 56475
} | [
"au.org.aurin.wif.exception.config.WifInvalidConfigException",
"au.org.aurin.wif.exception.validate.WifInvalidInputException",
"au.org.aurin.wif.model.Projection",
"au.org.aurin.wif.model.WifProject",
"au.org.aurin.wif.model.allocation.AllocationConfigs",
"au.org.aurin.wif.model.allocation.AllocationLU",
... | import au.org.aurin.wif.exception.config.WifInvalidConfigException; import au.org.aurin.wif.exception.validate.WifInvalidInputException; import au.org.aurin.wif.model.Projection; import au.org.aurin.wif.model.WifProject; import au.org.aurin.wif.model.allocation.AllocationConfigs; import au.org.aurin.wif.model.allocatio... | import au.org.aurin.wif.exception.config.*; import au.org.aurin.wif.exception.validate.*; import au.org.aurin.wif.model.*; import au.org.aurin.wif.model.allocation.*; import au.org.aurin.wif.model.allocation.control.*; import au.org.aurin.wif.model.demand.*; import au.org.aurin.wif.repo.allocation.*; import au.org.auri... | [
"au.org.aurin",
"java.io",
"java.util",
"org.geotools.data",
"org.geotools.filter",
"org.opengis.feature"
] | au.org.aurin; java.io; java.util; org.geotools.data; org.geotools.filter; org.opengis.feature; | 724,181 |
public void download(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) {
downloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).toBlocking().last().body();
} | void function(String resourceGroupName, String virtualWANName, GetVpnSitesConfigurationRequest request) { downloadWithServiceResponseAsync(resourceGroupName, virtualWANName, request).toBlocking().last().body(); } | /**
* Gives the sas-url to download the configurations for vpn-sites in a resource group.
*
* @param resourceGroupName The resource group name.
* @param virtualWANName The name of the VirtualWAN for which configuration of all vpn-sites is needed.
* @param request Parameters supplied to download... | Gives the sas-url to download the configurations for vpn-sites in a resource group | download | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_12_01/src/main/java/com/microsoft/azure/management/network/v2018_12_01/implementation/VpnSitesConfigurationsInner.java",
"license": "mit",
"size": 13291
} | [
"com.microsoft.azure.management.network.v2018_12_01.GetVpnSitesConfigurationRequest"
] | import com.microsoft.azure.management.network.v2018_12_01.GetVpnSitesConfigurationRequest; | import com.microsoft.azure.management.network.v2018_12_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,337,756 |
public TreeTableModel getTreeTableModel() {
return model;
} | TreeTableModel function() { return model; } | /**
* Returns the real TreeTableModel that is wrapped by this TreeTableModelAdapter.
*
* @return the real TreeTableModel that is wrapped by this TreeTableModelAdapter
*/ | Returns the real TreeTableModel that is wrapped by this TreeTableModelAdapter | getTreeTableModel | {
"repo_name": "charlycoste/TreeD",
"path": "src/org/jdesktop/swingx/JXTreeTable.java",
"license": "gpl-2.0",
"size": 64036
} | [
"org.jdesktop.swingx.treetable.TreeTableModel"
] | import org.jdesktop.swingx.treetable.TreeTableModel; | import org.jdesktop.swingx.treetable.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 1,403,274 |
private double [] get_dv2 (int opcode, int par1, int par2)
{
RequestOutputStream o = display.out;
double [] ret;
synchronized (o) {
o.begin_request (glx.major_opcode, opcode, 4);
o.write_int32 (tag);
o.write_int32 (par1);
o.write_int32 (par2);
ResponseInputStream in = displ... | double [] function (int opcode, int par1, int par2) { RequestOutputStream o = display.out; double [] ret; synchronized (o) { o.begin_request (glx.major_opcode, opcode, 4); o.write_int32 (tag); o.write_int32 (par1); o.write_int32 (par2); ResponseInputStream in = display.in; synchronized (in) { in.skip (12); int n = in.r... | /**
* A generic function for a common request pattern in GLX. This sends
* a request that takes two int-like parameters (a 4 bytes) and returns
* a FLOAT64 array.
*
* @param opcode the opcode
* @param par1 the first parameter
* @param par2 the second parameter
*
* @return the returned FLOAT64... | A generic function for a common request pattern in GLX. This sends a request that takes two int-like parameters (a 4 bytes) and returns a FLOAT64 array | get_dv2 | {
"repo_name": "chriskmanx/qmole",
"path": "QMOLEDEV/escher-0.3/src/gnu/x11/extension/glx/GL.java",
"license": "gpl-3.0",
"size": 151785
} | [
"gnu.x11.RequestOutputStream",
"gnu.x11.ResponseInputStream"
] | import gnu.x11.RequestOutputStream; import gnu.x11.ResponseInputStream; | import gnu.x11.*; | [
"gnu.x11"
] | gnu.x11; | 748,914 |
public void serviceChanged(ServiceEvent event) {
} | void function(ServiceEvent event) { } | /**
* Implementation of ServiceListener interface
*/ | Implementation of ServiceListener interface | serviceChanged | {
"repo_name": "moliva/proactive",
"path": "src/Examples/org/objectweb/proactive/examples/jmx/remote/management/mbean/ServiceInfo.java",
"license": "agpl-3.0",
"size": 7083
} | [
"org.osgi.framework.ServiceEvent"
] | import org.osgi.framework.ServiceEvent; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 2,833,243 |
private File expectedDirtyFile(JobResultEntry entry) {
return new File(
temporaryFolder.toURI().getPath(), entry.getJobId().toString() + "_DIRTY.json");
} | File function(JobResultEntry entry) { return new File( temporaryFolder.toURI().getPath(), entry.getJobId().toString() + STR); } | /**
* Generates the expected path for a dirty entry given a job entry.
*
* @param entry The job ID to construct the expected dirty path from.
* @return The expected dirty file.
*/ | Generates the expected path for a dirty entry given a job entry | expectedDirtyFile | {
"repo_name": "zentol/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/highavailability/FileSystemJobResultStoreTestInternal.java",
"license": "apache-2.0",
"size": 8726
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,106,650 |
@SuppressWarnings("ForLoopReplaceableByForEach")
private List<GridDhtCacheEntry> lockEntries(List<KeyCacheObject> keys, AffinityTopologyVersion topVer)
throws GridDhtInvalidPartitionException {
if (keys.size() == 1) {
KeyCacheObject key = keys.get(0);
while (true) {
... | @SuppressWarnings(STR) List<GridDhtCacheEntry> function(List<KeyCacheObject> keys, AffinityTopologyVersion topVer) throws GridDhtInvalidPartitionException { if (keys.size() == 1) { KeyCacheObject key = keys.get(0); while (true) { try { GridDhtCacheEntry entry = entryExx(key, topVer); UNSAFE.monitorEnter(entry); if (ent... | /**
* Acquires java-level locks on cache entries. Returns collection of locked entries.
*
* @param keys Keys to lock.
* @param topVer Topology version to lock on.
* @return Collection of locked entries.
* @throws GridDhtInvalidPartitionException If entry does not belong to local node. If e... | Acquires java-level locks on cache entries. Returns collection of locked entries | lockEntries | {
"repo_name": "vsisko/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java",
"license": "apache-2.0",
"size": 109223
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion",
"org.apache.ignite.internal.processors.cache.GridCacheMapEntry",
"org.apache.ignite.internal.processors.cache.KeyCacheObject",
"org.apache.ignite.internal.processor... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.GridCacheMapEntry; import org.apache.ignite.internal.processors.cache.KeyCacheObject; import org.apache.ignit... | import java.util.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 850,017 |
public static boolean containsStringCollection(Iterable<String> c, @Nullable String val, boolean ignoreCase) {
assert c != null;
for (String s : c) {
// If both are nulls, then they are equal.
if (s == null && val == null)
return true;
// Only on... | static boolean function(Iterable<String> c, @Nullable String val, boolean ignoreCase) { assert c != null; for (String s : c) { if (s == null && val == null) return true; if (s == null val == null) continue; if (ignoreCase) { if (s.equalsIgnoreCase(val)) return true; } else if (s.equals(val)) return true; } return false... | /**
* Checks for containment of given string value in the specified collection.
* Collection elements and string value can be {@code null}. Tow {@code null}s are considered equal.
*
* @param c Array of strings.
* @param val Value to check for containment inside of array.
* @param ignoreCas... | Checks for containment of given string value in the specified collection. Collection elements and string value can be null. Tow nulls are considered equal | containsStringCollection | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 325083
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,202,631 |
public static void touchLdpMembershipResource(final Node node) {
touchLdpMembershipResource(node, null, null);
} | static void function(final Node node) { touchLdpMembershipResource(node, null, null); } | /**
* Update the fedora:lastModified date and fedora:lastModifiedBy of the parent's ldp:membershipResource if that
* node is a direct or indirect container, provided the LDP constraints are valid.
*
* @param node The JCR node
*/ | Update the fedora:lastModified date and fedora:lastModifiedBy of the parent's ldp:membershipResource if that node is a direct or indirect container, provided the LDP constraints are valid | touchLdpMembershipResource | {
"repo_name": "yinlinchen/fcrepo4",
"path": "fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/utils/FedoraTypesUtils.java",
"license": "apache-2.0",
"size": 23208
} | [
"javax.jcr.Node"
] | import javax.jcr.Node; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 1,957,134 |
public IBlock getIgnitingBlock() {
return ignitingBlock;
}
public enum IgniteCause {
LAVA,
FLINT_AND_STEEL,
SPREAD,
LIGHTNING,
FIREBALL,
ENDER_CRYSTAL,
EXPLOSION,
} | IBlock function() { return ignitingBlock; } public enum IgniteCause { LAVA, FLINT_AND_STEEL, SPREAD, LIGHTNING, FIREBALL, ENDER_CRYSTAL, EXPLOSION, } | /**
* Gets the block who ignited this block
*
* @return The Block that placed/ignited the fire block, or null if not ignited by a Block.
*/ | Gets the block who ignited this block | getIgnitingBlock | {
"repo_name": "DirectCodeGraveyard/Minetweak",
"path": "src/main/java/org/minetweak/event/block/BlockIgniteEvent.java",
"license": "lgpl-3.0",
"size": 2887
} | [
"org.minetweak.block.IBlock"
] | import org.minetweak.block.IBlock; | import org.minetweak.block.*; | [
"org.minetweak.block"
] | org.minetweak.block; | 1,124,122 |
public void setElement(final DefaultTelephone value) {
metadata = value;
} | void function(final DefaultTelephone value) { metadata = value; } | /**
* Invoked by JAXB at unmarshalling time for storing the result temporarily.
*
* @param value the unmarshalled metadata.
*/ | Invoked by JAXB at unmarshalling time for storing the result temporarily | setElement | {
"repo_name": "apache/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/CI_Telephone.java",
"license": "apache-2.0",
"size": 3129
} | [
"org.apache.sis.metadata.iso.citation.DefaultTelephone"
] | import org.apache.sis.metadata.iso.citation.DefaultTelephone; | import org.apache.sis.metadata.iso.citation.*; | [
"org.apache.sis"
] | org.apache.sis; | 134,484 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.