method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void testSoftFailingCustomSyncUpWithLocallyCreatedRecords() throws Exception { // Create a few entries locally String[] names = new String[]{createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT)}; ...
void function() throws Exception { String[] names = new String[]{createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT), createRecordName(Constants.ACCOUNT)}; createAccountsLocally(names); TestSyncUpTarget.ActionCollector collector = new TestSyncUpTarget.ActionCollector(); TestSyncUpTarget target = ne...
/** * Create accounts locally, sync up using soft failing TestSyncUpTarget, check smartstore */
Create accounts locally, sync up using soft failing TestSyncUpTarget, check smartstore
testSoftFailingCustomSyncUpWithLocallyCreatedRecords
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java", "license": "apache-2.0", "size": 57743 }
[ "com.salesforce.androidsdk.smartsync.util.Constants", "com.salesforce.androidsdk.smartsync.util.SyncState", "java.util.List", "java.util.Map" ]
import com.salesforce.androidsdk.smartsync.util.Constants; import com.salesforce.androidsdk.smartsync.util.SyncState; import java.util.List; import java.util.Map;
import com.salesforce.androidsdk.smartsync.util.*; import java.util.*;
[ "com.salesforce.androidsdk", "java.util" ]
com.salesforce.androidsdk; java.util;
2,502,187
public void testValidateMissingEndDate() { timeEditorForm.setRowcount(2); timeEditorForm.setEndTime(0, null); ActionErrors errors = timeEditorForm.validate(support.mapping, support.request); assertOneError(TimeEditorForm.MISSING_TIME_ERROR_KEY, errors); }
void function() { timeEditorForm.setRowcount(2); timeEditorForm.setEndTime(0, null); ActionErrors errors = timeEditorForm.validate(support.mapping, support.request); assertOneError(TimeEditorForm.MISSING_TIME_ERROR_KEY, errors); }
/** Test validate missing end date. */
Test validate missing end date
testValidateMissingEndDate
{ "repo_name": "alarulrajan/CodeFest", "path": "test/com/technoetic/xplanner/forms/TestTimeEditorForm.java", "license": "gpl-2.0", "size": 11335 }
[ "org.apache.struts.action.ActionErrors" ]
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.*;
[ "org.apache.struts" ]
org.apache.struts;
1,183,966
public static int[] findModified( final StandardProperty[] properties, final Object[] x, final Object[] y, final boolean[][] includeColumns, final boolean anyUninitializedProperties, final SessionImplementor session) throws HibernateException { int[] results = null; int count = 0; int ...
static int[] function( final StandardProperty[] properties, final Object[] x, final Object[] y, final boolean[][] includeColumns, final boolean anyUninitializedProperties, final SessionImplementor session) throws HibernateException { int[] results = null; int count = 0; int span = properties.length; for ( int i = 0; i ...
/** * Determine if any of the given field values are modified, returning an array containing * indexes of the dirty fields or <tt>null</tt> if no fields are dirty. * @param x the current state of the entity * @param y the snapshot state just retrieved from the database */
Determine if any of the given field values are modified, returning an array containing indexes of the dirty fields or null if no fields are dirty
findModified
{ "repo_name": "raedle/univis", "path": "lib/hibernate-3.1.3/src/org/hibernate/type/TypeFactory.java", "license": "lgpl-2.1", "size": 18643 }
[ "org.hibernate.HibernateException", "org.hibernate.engine.SessionImplementor", "org.hibernate.intercept.LazyPropertyInitializer", "org.hibernate.tuple.StandardProperty" ]
import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor; import org.hibernate.intercept.LazyPropertyInitializer; import org.hibernate.tuple.StandardProperty;
import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.intercept.*; import org.hibernate.tuple.*;
[ "org.hibernate", "org.hibernate.engine", "org.hibernate.intercept", "org.hibernate.tuple" ]
org.hibernate; org.hibernate.engine; org.hibernate.intercept; org.hibernate.tuple;
2,881,212
public boolean assignReservedContainer(FSSchedulerNode node) { RMContainer rmContainer = node.getReservedContainer(); Priority reservedPriority = rmContainer.getReservedPriority(); if (!isValidReservation(node)) { // Don't hold the reservation if app can no longer use it LOG.info("Releasing r...
boolean function(FSSchedulerNode node) { RMContainer rmContainer = node.getReservedContainer(); Priority reservedPriority = rmContainer.getReservedPriority(); if (!isValidReservation(node)) { LOG.info(STR + STR + getApplicationAttemptId() + STR + node); unreserve(reservedPriority, node); return false; } if (LOG.isDebug...
/** * Called when this application already has an existing reservation on the * given node. Sees whether we can turn the reservation into an allocation. * Also checks whether the application needs the reservation anymore, and * releases it if not. * * @param node * Node that the application ha...
Called when this application already has an existing reservation on the given node. Sees whether we can turn the reservation into an allocation. Also checks whether the application needs the reservation anymore, and releases it if not
assignReservedContainer
{ "repo_name": "aliyun-beta/aliyun-oss-hadoop-fs", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java", "license": "apache-2.0", "size": 34957 }
[ "org.apache.hadoop.yarn.api.records.Priority", "org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer", "org.apache.hadoop.yarn.util.resource.Resources" ]
import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer; import org.apache.hadoop.yarn.util.resource.Resources;
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.*; import org.apache.hadoop.yarn.util.resource.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,205,335
public boolean populate(ExtractorInput input) throws IOException, InterruptedException { Assertions.checkState(input != null); if (populated) { populated = false; packetArray.reset(); } while (!populated) { if (currentSegmentIndex < 0) { // We're at the start of a page. ...
boolean function(ExtractorInput input) throws IOException, InterruptedException { Assertions.checkState(input != null); if (populated) { populated = false; packetArray.reset(); } while (!populated) { if (currentSegmentIndex < 0) { if (!pageHeader.populate(input, true)) { return false; } int segmentIndex = 0; int bytesT...
/** * Reads the next packet of the ogg stream. In case of an {@code IOException} the caller must make * sure to pass the same instance of {@code ParsableByteArray} to this method again so this reader * can resume properly from an error while reading a continued packet spanned across multiple * pages. * ...
Reads the next packet of the ogg stream. In case of an IOException the caller must make sure to pass the same instance of ParsableByteArray to this method again so this reader can resume properly from an error while reading a continued packet spanned across multiple pages
populate
{ "repo_name": "superbderrick/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/ogg/OggPacket.java", "license": "apache-2.0", "size": 5360 }
[ "com.google.android.exoplayer2.extractor.ExtractorInput", "com.google.android.exoplayer2.util.Assertions", "java.io.IOException", "java.util.Arrays" ]
import com.google.android.exoplayer2.extractor.ExtractorInput; import com.google.android.exoplayer2.util.Assertions; import java.io.IOException; import java.util.Arrays;
import com.google.android.exoplayer2.extractor.*; import com.google.android.exoplayer2.util.*; import java.io.*; import java.util.*;
[ "com.google.android", "java.io", "java.util" ]
com.google.android; java.io; java.util;
2,728,652
@Override public final CoordinateReferenceSystem getCoordinateReferenceSystem() { return crs; }
final CoordinateReferenceSystem function() { return crs; }
/** * Returns the coordinate reference system in which the coordinate is given. * May be {@code null} if this particular {@code DirectPosition} is included * in a larger object with such a reference to a CRS. * * @return the coordinate reference system, or {@code null}. */
Returns the coordinate reference system in which the coordinate is given. May be null if this particular DirectPosition is included in a larger object with such a reference to a CRS
getCoordinateReferenceSystem
{ "repo_name": "apache/sis", "path": "core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java", "license": "apache-2.0", "size": 14265 }
[ "org.opengis.referencing.crs.CoordinateReferenceSystem" ]
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.crs.*;
[ "org.opengis.referencing" ]
org.opengis.referencing;
158,507
protected void initParameters(Map<String, String> parameters) { if (!parameters.containsKey("MaxPasswordAttempts")) { parameters.put("MaxPasswordAttempts", "5"); } if (!parameters.containsKey("PasswordExpiryMonths")) { parameters.put("PasswordExpiryMonths", "12"); } if (!pa...
void function(Map<String, String> parameters) { if (!parameters.containsKey(STR)) { parameters.put(STR, "5"); } if (!parameters.containsKey(STR)) { parameters.put(STR, "12"); } if (!parameters.containsKey(STR)) { parameters.put(STR, "24"); } if (!parameters.containsKey(STR)) { parameters.put(STR, "100"); } }
/** * Initialise the user directory parameters. * * @param parameters the user directory parameters */
Initialise the user directory parameters
initParameters
{ "repo_name": "marcusportmann/mmp-java", "path": "src/mmp-application-wicket/src/main/java/guru/mmp/application/web/template/components/InternalUserDirectoryAdministrationPanel.java", "license": "apache-2.0", "size": 4133 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,395,565
private static int keywordToVisibility(final ModifierKeyword keyword) { int visibility= 0; if (keyword == ModifierKeyword.PUBLIC_KEYWORD) visibility= Flags.AccPublic; else if (keyword == ModifierKeyword.PRIVATE_KEYWORD) visibility= Flags.AccPrivate; else if (keyword == ModifierKeyword.PROTECTED_KEYWORD...
static int function(final ModifierKeyword keyword) { int visibility= 0; if (keyword == ModifierKeyword.PUBLIC_KEYWORD) visibility= Flags.AccPublic; else if (keyword == ModifierKeyword.PRIVATE_KEYWORD) visibility= Flags.AccPrivate; else if (keyword == ModifierKeyword.PROTECTED_KEYWORD) visibility= Flags.AccProtected; re...
/** * Converts a given modifier keyword into a visibility flag. * * @param keyword the keyword to convert * @return the visibility flag */
Converts a given modifier keyword into a visibility flag
keywordToVisibility
{ "repo_name": "alexVengrovsk/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/corext/refactoring/structure/MemberVisibilityAdjustor.java", "license": "epl-1.0", "size": 57915 }
[ "org.eclipse.jdt.core.Flags", "org.eclipse.jdt.core.dom.Modifier" ]
import org.eclipse.jdt.core.Flags; import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
955,369
public void free() { if (m_handle == 0) { return; } setDisabled(); PWMJNI.freePWMPort(m_handle); m_handle = 0; }
void function() { if (m_handle == 0) { return; } setDisabled(); PWMJNI.freePWMPort(m_handle); m_handle = 0; }
/** * Free the PWM channel. * * <p>Free the resource associated with the PWM channel and set the value to 0. */
Free the PWM channel. Free the resource associated with the PWM channel and set the value to 0
free
{ "repo_name": "pjreiniger/TempAllWpi", "path": "wpilibj/src/main/java/edu/wpi/first/wpilibj/PWM.java", "license": "bsd-3-clause", "size": 8598 }
[ "edu.wpi.first.wpilibj.hal.PWMJNI" ]
import edu.wpi.first.wpilibj.hal.PWMJNI;
import edu.wpi.first.wpilibj.hal.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,825,923
public List<Path> listTraceFilesByLastModified() throws IOException { final List<Path> allTraces = new ArrayList<>();
List<Path> function() throws IOException { final List<Path> allTraces = new ArrayList<>();
/** * The most recent trace (the one with the greatest last-modified time) will be listed first. */
The most recent trace (the one with the greatest last-modified time) will be listed first
listTraceFilesByLastModified
{ "repo_name": "daedric/buck", "path": "src/com/facebook/buck/util/trace/BuildTraces.java", "license": "apache-2.0", "size": 7245 }
[ "java.io.IOException", "java.nio.file.Path", "java.util.ArrayList", "java.util.List" ]
import java.io.IOException; import java.nio.file.Path; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.nio.file.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
2,498,384
public static void startActivityForResult(@NonNull final Bundle extras, @NonNull final Fragment fragment, @NonNull final String pkg, @NonNull final String cls, ...
static void function(@NonNull final Bundle extras, @NonNull final Fragment fragment, @NonNull final String pkg, @NonNull final String cls, final int requestCode, @Nullable final Bundle options) { startActivityForResult(fragment, extras, pkg, cls, requestCode, options); }
/** * Start the activity for result. * * @param extras The Bundle of extras to add to this intent. * @param fragment The fragment. * @param pkg The name of the package. * @param cls The name of the class. * @param requestCode if &gt;= 0, this code will be retur...
Start the activity for result
startActivityForResult
{ "repo_name": "didi/DoraemonKit", "path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/ActivityUtils.java", "license": "apache-2.0", "size": 90700 }
[ "android.app.Fragment", "android.os.Bundle", "androidx.annotation.NonNull", "androidx.annotation.Nullable", "androidx.fragment.app.Fragment" ]
import android.app.Fragment; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment;
import android.app.*; import android.os.*; import androidx.annotation.*; import androidx.fragment.app.*;
[ "android.app", "android.os", "androidx.annotation", "androidx.fragment" ]
android.app; android.os; androidx.annotation; androidx.fragment;
2,638,890
protected void finishHim(Exception failure, List<Failure> indexingFailures, List<SearchFailure> searchFailures, boolean timedOut) { logger.debug("[{}]: finishing without any catastrophic failures", task.getId()); scrollSource.close(() -> { if (failure == null) { ...
void function(Exception failure, List<Failure> indexingFailures, List<SearchFailure> searchFailures, boolean timedOut) { logger.debug(STR, task.getId()); scrollSource.close(() -> { if (failure == null) { BulkByScrollResponse response = buildResponse( timeValueNanos(System.nanoTime() - startTime.get()), indexingFailures...
/** * Finish the request. * @param failure if non null then the request failed catastrophically with this exception * @param indexingFailures any indexing failures accumulated during the request * @param searchFailures any search failures accumulated during the request * @param timedOut have an...
Finish the request
finishHim
{ "repo_name": "gingerwizard/elasticsearch", "path": "modules/reindex/src/main/java/org/elasticsearch/index/reindex/AbstractAsyncBulkByScrollAction.java", "license": "apache-2.0", "size": 33031 }
[ "java.util.List", "org.elasticsearch.action.bulk.BulkItemResponse", "org.elasticsearch.common.unit.TimeValue", "org.elasticsearch.index.reindex.ScrollableHitSource" ]
import java.util.List; import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.reindex.ScrollableHitSource;
import java.util.*; import org.elasticsearch.action.bulk.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.reindex.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.common", "org.elasticsearch.index" ]
java.util; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index;
2,168,735
public static void openImdbForPerson(Context context, String name) { if (context == null || TextUtils.isEmpty(name)) { return; } Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format(IMDB_APP_PERSON_SEARCH_URI, name))); intent.addFlags(In...
static void function(Context context, String name) { if (context == null TextUtils.isEmpty(name)) { return; } Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(String.format(IMDB_APP_PERSON_SEARCH_URI, name))); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); if (!Utils.tryStartActivity(context, inte...
/** * Open the IMDb app or web page for the given person name. */
Open the IMDb app or web page for the given person name
openImdbForPerson
{ "repo_name": "xbmc/Kore", "path": "app/src/main/java/org/xbmc/kore/utils/Utils.java", "license": "apache-2.0", "size": 10960 }
[ "android.content.Context", "android.content.Intent", "android.net.Uri", "android.text.TextUtils" ]
import android.content.Context; import android.content.Intent; import android.net.Uri; import android.text.TextUtils;
import android.content.*; import android.net.*; import android.text.*;
[ "android.content", "android.net", "android.text" ]
android.content; android.net; android.text;
2,326,449
@Provides public List<AuthenticationProvider> getAuthenticationProviders() { return Collections.unmodifiableList(boundAuthenticationProviders); }
List<AuthenticationProvider> function() { return Collections.unmodifiableList(boundAuthenticationProviders); }
/** * Returns a list of all currently-bound AuthenticationProvider instances. * * @return * A List of all currently-bound AuthenticationProvider. The List is * not modifiable. */
Returns a list of all currently-bound AuthenticationProvider instances
getAuthenticationProviders
{ "repo_name": "Calvin-CS/Agora", "path": "guacamole-client/guacamole/src/main/java/org/glyptodon/guacamole/net/basic/extension/ExtensionModule.java", "license": "gpl-3.0", "size": 18008 }
[ "java.util.Collections", "java.util.List", "org.glyptodon.guacamole.net.auth.AuthenticationProvider" ]
import java.util.Collections; import java.util.List; import org.glyptodon.guacamole.net.auth.AuthenticationProvider;
import java.util.*; import org.glyptodon.guacamole.net.auth.*;
[ "java.util", "org.glyptodon.guacamole" ]
java.util; org.glyptodon.guacamole;
701,919
public boolean retainAll( Collection<?> c ) { throw new UnsupportedOperationException(); }
boolean function( Collection<?> c ) { throw new UnsupportedOperationException(); }
/** * The operation is not supported. * @throws UnsupportedOperationException */
The operation is not supported
retainAll
{ "repo_name": "wesen/nmedit", "path": "libs/jnmprotocol/src/net/sf/nmedit/jnmprotocol/utils/QueueBuffer.java", "license": "gpl-2.0", "size": 22537 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,466,766
public synchronized void unregisterDataSource( String name ) { final XaDataSource dataSource = dataSources.get( name ); if ( dataSource == null ) { return; }
synchronized void function( String name ) { final XaDataSource dataSource = dataSources.get( name ); if ( dataSource == null ) { return; }
/** * Public for testing purpose. Do not use. */
Public for testing purpose. Do not use
unregisterDataSource
{ "repo_name": "dksaputra/community", "path": "kernel/src/main/java/org/neo4j/kernel/impl/transaction/XaDataSourceManager.java", "license": "gpl-3.0", "size": 22344 }
[ "org.neo4j.kernel.impl.transaction.xaframework.XaDataSource" ]
import org.neo4j.kernel.impl.transaction.xaframework.XaDataSource;
import org.neo4j.kernel.impl.transaction.xaframework.*;
[ "org.neo4j.kernel" ]
org.neo4j.kernel;
1,759,944
protected int estimateScrollY() { if (mListView == null || mListView.getChildAt(0) == null) return 0; View topChild = mListView.getChildAt(0); return mListView.getFirstVisiblePosition() * topChild.getHeight() - topChild.getTop(); }
int function() { if (mListView == null mListView.getChildAt(0) == null) return 0; View topChild = mListView.getChildAt(0); return mListView.getFirstVisiblePosition() * topChild.getHeight() - topChild.getTop(); }
/** * Will be incorrect if rows has changed and if list has rows of different heights * <p/> * So when measuring scroll direction, it's necessary to ignore this value * if first visible row is different than previously calculated. * * @deprecated because it should b...
Will be incorrect if rows has changed and if list has rows of different heights So when measuring scroll direction, it's necessary to ignore this value if first visible row is different than previously calculated
estimateScrollY
{ "repo_name": "denley/DenleyBihari", "path": "app/src/main/java/me/denley/fab/FloatingActionsMenu.java", "license": "apache-2.0", "size": 35606 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
223,343
private void tellListenersAboutPreLogRoll(final Path oldPath, final Path newPath) throws IOException { if (!this.listeners.isEmpty()) { for (WALActionsListener i : this.listeners) { i.preLogRoll(oldPath, newPath); } } }
void function(final Path oldPath, final Path newPath) throws IOException { if (!this.listeners.isEmpty()) { for (WALActionsListener i : this.listeners) { i.preLogRoll(oldPath, newPath); } } }
/** * Tell listeners about pre log roll. * @throws IOException */
Tell listeners about pre log roll
tellListenersAboutPreLogRoll
{ "repo_name": "SeekerResource/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java", "license": "apache-2.0", "size": 82012 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
72,576
private void assertContent(String expected, URLConnection connection, int limit) throws IOException { connection.connect(); assertEquals(expected, readAscii(connection.getInputStream(), limit)); ((HttpURLConnection) connection).disconnect(); }
void function(String expected, URLConnection connection, int limit) throws IOException { connection.connect(); assertEquals(expected, readAscii(connection.getInputStream(), limit)); ((HttpURLConnection) connection).disconnect(); }
/** * Reads at most {@code limit} characters from {@code in} and asserts that * content equals {@code expected}. */
Reads at most limit characters from in and asserts that content equals expected
assertContent
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/luni/src/test/java/libcore/java/net/URLConnectionTest.java", "license": "gpl-2.0", "size": 173039 }
[ "java.io.IOException", "java.net.HttpURLConnection", "java.net.URLConnection", "org.junit.Assert" ]
import java.io.IOException; import java.net.HttpURLConnection; import java.net.URLConnection; import org.junit.Assert;
import java.io.*; import java.net.*; import org.junit.*;
[ "java.io", "java.net", "org.junit" ]
java.io; java.net; org.junit;
600,180
public boolean shouldExecute() { EntityLivingBase entitylivingbase = EntityUtil.getNearestTeamPlayer(this.thePet, this.minDist*2, theNearestTargetSorter); if (entitylivingbase == null) return false; else if (isSitting()) return false; else if (this.thePet...
boolean function() { EntityLivingBase entitylivingbase = EntityUtil.getNearestTeamPlayer(this.thePet, this.minDist*2, theNearestTargetSorter); if (entitylivingbase == null) return false; else if (isSitting()) return false; else if (this.thePet.getDistanceSqToEntity(entitylivingbase) < (double)(this.maxDist * this.maxDi...
/** * Returns whether the EntityAIBase should begin execution. */
Returns whether the EntityAIBase should begin execution
shouldExecute
{ "repo_name": "Damian3395/Contained", "path": "src/main/java/com/contained/game/entity/EntityAIFollowTeam.java", "license": "mit", "size": 4971 }
[ "com.contained.game.util.EntityUtil", "net.minecraft.entity.EntityLivingBase" ]
import com.contained.game.util.EntityUtil; import net.minecraft.entity.EntityLivingBase;
import com.contained.game.util.*; import net.minecraft.entity.*;
[ "com.contained.game", "net.minecraft.entity" ]
com.contained.game; net.minecraft.entity;
1,817,037
private List<AdaptorConfiguration> getConfiguration(String propertiesFile ) throws LLRPRuntimeException { props = new Properties(); // try to load the properties file try { props.load(new FileInputStream(new File(propertiesFile))); } catch (IOException e) { log.error("There has been an IO Excepti...
List<AdaptorConfiguration> function(String propertiesFile ) throws LLRPRuntimeException { props = new Properties(); try { props.load(new FileInputStream(new File(propertiesFile))); } catch (IOException e) { log.error(STR + propertiesFile, e); throw new LLRPRuntimeException(e.getMessage(), e); } adaptorConfigurations = ...
/** * reads a configuration file and delivers the content in a prototype-form. * @param propertiesFile the properties file to read. * @return the prototypes holding the configuration. * @throws LLRPRuntimeException whenever the configuration file could not be read. */
reads a configuration file and delivers the content in a prototype-form
getConfiguration
{ "repo_name": "Auto-ID-Lab-Japan/fosstrak-llrp", "path": "llrp-adaptor/src/main/java/org/fosstrak/llrp/adaptor/config/FileStoreConfiguration.java", "license": "gpl-3.0", "size": 11820 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.LinkedList", "java.util.List", "java.util.Properties", "org.fosstrak.llrp.adaptor.config.type.AdaptorConfiguration", "org.fosstrak.llrp.adaptor.exception.LLRPRuntimeException" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.LinkedList; import java.util.List; import java.util.Properties; import org.fosstrak.llrp.adaptor.config.type.AdaptorConfiguration; import org.fosstrak.llrp.adaptor.exception.LLRPRuntimeException;
import java.io.*; import java.util.*; import org.fosstrak.llrp.adaptor.config.type.*; import org.fosstrak.llrp.adaptor.exception.*;
[ "java.io", "java.util", "org.fosstrak.llrp" ]
java.io; java.util; org.fosstrak.llrp;
2,062,643
public String createCommandLine(IngresVectorwiseLoaderMeta meta) throws KettleException { StringBuffer sb = new StringBuffer(300); if (!Const.isEmpty(meta.getSqlPath())) { try { FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta()); St...
String function(IngresVectorwiseLoaderMeta meta) throws KettleException { StringBuffer sb = new StringBuffer(300); if (!Const.isEmpty(meta.getSqlPath())) { try { FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta()); String sqlexec = Const.optionallyQuoteStringByOS(Ke...
/** * Create the command line for a sql process depending on the meta information * supplied. * * @param meta * The meta data to create the command line from * * @return The string to execute. * * @throws KettleException * Upon any exception */
Create the command line for a sql process depending on the meta information supplied
createCommandLine
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src/org/pentaho/di/trans/steps/ivwloader/IngresVectorwiseLoader.java", "license": "apache-2.0", "size": 25317 }
[ "org.apache.commons.vfs.FileObject", "org.pentaho.di.core.Const", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.exception.KettleFileException", "org.pentaho.di.core.vfs.KettleVFS" ]
import org.apache.commons.vfs.FileObject; import org.pentaho.di.core.Const; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.exception.KettleFileException; import org.pentaho.di.core.vfs.KettleVFS;
import org.apache.commons.vfs.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.vfs.*;
[ "org.apache.commons", "org.pentaho.di" ]
org.apache.commons; org.pentaho.di;
2,753,867
public static void waitForKafkaStatusUpdate(String namespaceName, String clusterName) { LOGGER.info("Waiting for Kafka status to be updated"); TestUtils.waitFor("KafkaStatus update", Constants.GLOBAL_POLL_INTERVAL, Constants.GLOBAL_STATUS_TIMEOUT, () -> { Kafka k = KafkaResource.kafkaCli...
static void function(String namespaceName, String clusterName) { LOGGER.info(STR); TestUtils.waitFor(STR, Constants.GLOBAL_POLL_INTERVAL, Constants.GLOBAL_STATUS_TIMEOUT, () -> { Kafka k = KafkaResource.kafkaClient().inNamespace(namespaceName).withName(clusterName).get(); return k.getMetadata().getGeneration() == k.get...
/** * Waits for the Kafka Status to be updated after changed. It checks the generation and observed generation to * ensure the status is up to date. * * @param namespaceName Namespace name * @param clusterName Name of the Kafka cluster which should be checked */
Waits for the Kafka Status to be updated after changed. It checks the generation and observed generation to ensure the status is up to date
waitForKafkaStatusUpdate
{ "repo_name": "ppatierno/kaas", "path": "systemtest/src/main/java/io/strimzi/systemtest/utils/kafkaUtils/KafkaUtils.java", "license": "apache-2.0", "size": 23704 }
[ "io.strimzi.api.kafka.model.Kafka", "io.strimzi.systemtest.Constants", "io.strimzi.systemtest.resources.crd.KafkaResource", "io.strimzi.test.TestUtils" ]
import io.strimzi.api.kafka.model.Kafka; import io.strimzi.systemtest.Constants; import io.strimzi.systemtest.resources.crd.KafkaResource; import io.strimzi.test.TestUtils;
import io.strimzi.api.kafka.model.*; import io.strimzi.systemtest.*; import io.strimzi.systemtest.resources.crd.*; import io.strimzi.test.*;
[ "io.strimzi.api", "io.strimzi.systemtest", "io.strimzi.test" ]
io.strimzi.api; io.strimzi.systemtest; io.strimzi.test;
1,958,796
ServiceResponseWithHeaders<ApplicationSummary, ApplicationGetHeaders> get(String applicationId) throws BatchErrorException, IOException, IllegalArgumentException;
ServiceResponseWithHeaders<ApplicationSummary, ApplicationGetHeaders> get(String applicationId) throws BatchErrorException, IOException, IllegalArgumentException;
/** * Gets information about the specified application. * * @param applicationId The id of the application. * @throws BatchErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception t...
Gets information about the specified application
get
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-batch/src/main/java/com/microsoft/azure/batch/protocol/Applications.java", "license": "mit", "size": 9105 }
[ "com.microsoft.azure.batch.protocol.models.ApplicationGetHeaders", "com.microsoft.azure.batch.protocol.models.ApplicationSummary", "com.microsoft.azure.batch.protocol.models.BatchErrorException", "com.microsoft.rest.ServiceResponseWithHeaders", "java.io.IOException" ]
import com.microsoft.azure.batch.protocol.models.ApplicationGetHeaders; import com.microsoft.azure.batch.protocol.models.ApplicationSummary; import com.microsoft.azure.batch.protocol.models.BatchErrorException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException;
import com.microsoft.azure.batch.protocol.models.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
853,761
private boolean isActive(TEBase TE) { return data.getState(TE) == data.STATE_ON; }
boolean function(TEBase TE) { return data.getState(TE) == data.STATE_ON; }
/** * Returns whether lever is in active state */
Returns whether lever is in active state
isActive
{ "repo_name": "Nuchaz/carpentersblocks", "path": "src/main/java/com/carpentersblocks/block/BlockCarpentersLever.java", "license": "lgpl-2.1", "size": 7104 }
[ "com.carpentersblocks.tileentity.TEBase" ]
import com.carpentersblocks.tileentity.TEBase;
import com.carpentersblocks.tileentity.*;
[ "com.carpentersblocks.tileentity" ]
com.carpentersblocks.tileentity;
693,940
private Set<String> getEmailCatalogue() { Set<String> catalogue = Sets.newLinkedHashSet(); catalogue.add("email"); catalogue.add("e-mail"); catalogue.add("e_mail"); return catalogue; }
Set<String> function() { Set<String> catalogue = Sets.newLinkedHashSet(); catalogue.add("email"); catalogue.add(STR); catalogue.add(STR); return catalogue; }
/** * Code catalogue for email. Order in the catalogue is use in search. */
Code catalogue for email. Order in the catalogue is use in search
getEmailCatalogue
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/acc/src/main/java/eu/bcvsolutions/idm/acc/event/processor/SystemMappingIdentityAutoAttributesProcessor.java", "license": "mit", "size": 6420 }
[ "com.google.common.collect.Sets", "java.util.Set" ]
import com.google.common.collect.Sets; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,331,660
@FIXVersion(introduced = "5.0SP1") @TagNumRef(tagNum = TagNum.ApplID) public String getApplID() { return applID; }
@FIXVersion(introduced = STR) @TagNumRef(tagNum = TagNum.ApplID) String function() { return applID; }
/** * Message field getter. * @return field value */
Message field getter
getApplID
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/ApplicationSequenceControl.java", "license": "gpl-3.0", "size": 10380 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
1,374,482
private void hideDashboards(){ try { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); IWorkbenchPage page = window.getActivePage(); List<IEditorReference> openEditors = new ArrayList<IEditorReference>(); IEditorReference[] editorReferences = PlatformUI.getWorkbench...
void function(){ try { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); IWorkbenchPage page = window.getActivePage(); List<IEditorReference> openEditors = new ArrayList<IEditorReference>(); IEditorReference[] editorReferences = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActi...
/** * hide open dashboards */
hide open dashboards
hideDashboards
{ "repo_name": "kaviththiranga/developer-studio", "path": "core/org.wso2.developerstudio.eclipse.platform.ui/src/org/wso2/developerstudio/eclipse/platform/ui/handlers/OpenDashboardHandler.java", "license": "apache-2.0", "size": 4011 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.ui.IEditorInput", "org.eclipse.ui.IEditorReference", "org.eclipse.ui.IWorkbenchPage", "org.eclipse.ui.IWorkbenchWindow", "org.eclipse.ui.PlatformUI" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorReference; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI;
import java.util.*; import org.eclipse.ui.*;
[ "java.util", "org.eclipse.ui" ]
java.util; org.eclipse.ui;
178,495
@Override public ResourceLocator getResourceLocator() { return CityGMLEditPlugin.INSTANCE; }
ResourceLocator function() { return CityGMLEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/org/oasis/xAL/provider/DependentLocalityTypeItemProvider.java", "license": "apache-2.0", "size": 235215 }
[ "net.opengis.citygml.building.provider.CityGMLEditPlugin", "org.eclipse.emf.common.util.ResourceLocator" ]
import net.opengis.citygml.building.provider.CityGMLEditPlugin; import org.eclipse.emf.common.util.ResourceLocator;
import net.opengis.citygml.building.provider.*; import org.eclipse.emf.common.util.*;
[ "net.opengis.citygml", "org.eclipse.emf" ]
net.opengis.citygml; org.eclipse.emf;
2,562,477
public ArrayList _getUsersWithValidShellsExistingHomesAndDesktops() { ArrayList result = new ArrayList(); ArrayList usersWithValidShellsAndExistingHomes = getUsersWithValidShellsAndExistingHomes(); for (int idx = 0; idx < usersWithValidShellsAndExistingHomes.size(); idx++) { ...
ArrayList function() { ArrayList result = new ArrayList(); ArrayList usersWithValidShellsAndExistingHomes = getUsersWithValidShellsAndExistingHomes(); for (int idx = 0; idx < usersWithValidShellsAndExistingHomes.size(); idx++) { UnixUser user = (UnixUser) usersWithValidShellsAndExistingHomes.get(idx); if ((user.getHome...
/** * Gets all known users with valid shells and really existing (not dummy) Home And! * freedesktop.org/RFC-based "Desktop" folders. * * @return an UnixUsers Arraylist of these users */
Gets all known users with valid shells and really existing (not dummy) Home And! freedesktop.org/RFC-based "Desktop" folders
_getUsersWithValidShellsExistingHomesAndDesktops
{ "repo_name": "RomRaider/original.mirror", "path": "installer/IzPack/src/lib/com/izforge/izpack/util/os/unix/UnixUsers.java", "license": "gpl-2.0", "size": 7653 }
[ "java.io.File", "java.util.ArrayList" ]
import java.io.File; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,306,198
public void sendBinary(final ByteBuffer payload) { getRemote().sendBinary(payload); }
void function(final ByteBuffer payload) { getRemote().sendBinary(payload); }
/** * Sends binary payload * @param payload the binary payload */
Sends binary payload
sendBinary
{ "repo_name": "matzew/simple-websocket-client", "path": "src/main/java/net/wessendorf/websocket/SimpleWebSocketClient.java", "license": "apache-2.0", "size": 5619 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,198,611
@RestrictTo(LIBRARY_GROUP) public SessionToken2 getMediaSessionToken() { //return mProvider.getMediaSessionToken_impl(); return null; }
@RestrictTo(LIBRARY_GROUP) SessionToken2 function() { return null; }
/** * Returns {@link SessionToken2} so that developers create their own * {@link androidx.media.MediaController2} instance. This method should be called when * VideoView2 is attached to window, or it throws IllegalStateException. * * @throws IllegalStateException if interal MediaSession is not ...
Returns <code>SessionToken2</code> so that developers create their own <code>androidx.media.MediaController2</code> instance. This method should be called when VideoView2 is attached to window, or it throws IllegalStateException
getMediaSessionToken
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "media-widget/src/main/java/androidx/media/widget/VideoView2.java", "license": "apache-2.0", "size": 72400 }
[ "androidx.annotation.RestrictTo", "androidx.media.SessionToken2" ]
import androidx.annotation.RestrictTo; import androidx.media.SessionToken2;
import androidx.annotation.*; import androidx.media.*;
[ "androidx.annotation", "androidx.media" ]
androidx.annotation; androidx.media;
1,093
@Override public List<URI> getTopObjects(final InferredOWLOntologyID ontologyID, final RepositoryConnection repositoryConnection) throws OpenRDFException { final StringBuilder sb = new StringBuilder(1024); sb.append("SELECT DISTINCT ?topObjectUri "); sb....
List<URI> function(final InferredOWLOntologyID ontologyID, final RepositoryConnection repositoryConnection) throws OpenRDFException { final StringBuilder sb = new StringBuilder(1024); sb.append(STR); sb.append(STR); sb.append(STR + PODD.PODD_BASE_HAS_TOP_OBJECT.stringValue() + STR); sb.append(STR); final TupleQuery que...
/** * Retrieve a list of Top Objects that are contained in the given ontology. * * @param repositoryConnection * @param contexts * @return * @throws OpenRDFException */
Retrieve a list of Top Objects that are contained in the given ontology
getTopObjects
{ "repo_name": "podd/podd-redesign", "path": "webapp/lib/src/main/java/com/github/podd/impl/PoddSesameManagerImpl.java", "license": "agpl-3.0", "size": 114196 }
[ "com.github.podd.utils.InferredOWLOntologyID", "com.github.podd.utils.RdfUtility", "java.util.ArrayList", "java.util.List", "org.openrdf.OpenRDFException", "org.openrdf.query.BindingSet", "org.openrdf.query.QueryLanguage", "org.openrdf.query.TupleQuery", "org.openrdf.query.resultio.helpers.QueryResu...
import com.github.podd.utils.InferredOWLOntologyID; import com.github.podd.utils.RdfUtility; import java.util.ArrayList; import java.util.List; import org.openrdf.OpenRDFException; import org.openrdf.query.BindingSet; import org.openrdf.query.QueryLanguage; import org.openrdf.query.TupleQuery; import org.openrdf.query....
import com.github.podd.utils.*; import java.util.*; import org.openrdf.*; import org.openrdf.query.*; import org.openrdf.query.resultio.helpers.*; import org.openrdf.repository.*;
[ "com.github.podd", "java.util", "org.openrdf", "org.openrdf.query", "org.openrdf.repository" ]
com.github.podd; java.util; org.openrdf; org.openrdf.query; org.openrdf.repository;
1,479,380
protected Vector<ExtensionFileFilter> filterNonCoreLoaderFileFilters(Vector<ExtensionFileFilter> list) { Vector<ExtensionFileFilter> result; int i; ExtensionFileFilter filter; AbstractLoader loader; if (!getCoreConvertersOnly()) { result = list; } else { result = new ...
Vector<ExtensionFileFilter> function(Vector<ExtensionFileFilter> list) { Vector<ExtensionFileFilter> result; int i; ExtensionFileFilter filter; AbstractLoader loader; if (!getCoreConvertersOnly()) { result = list; } else { result = new Vector<ExtensionFileFilter>(); for (i = 0; i < list.size(); i++) { filter = list.get...
/** * filters out all non-core loaders if only those should be displayed * * @param list the list of filters to check * @return the filtered list of filters * @see #m_CoreConvertersOnly */
filters out all non-core loaders if only those should be displayed
filterNonCoreLoaderFileFilters
{ "repo_name": "williamClanton/jbossBA", "path": "weka/src/main/java/weka/gui/ConverterFileChooser.java", "license": "gpl-2.0", "size": 20723 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
65,704
@Override public void pushNewData(Ref ref) throws SynchronizationException { pushNewData(ref, ref.getName()); }
void function(Ref ref) throws SynchronizationException { pushNewData(ref, ref.getName()); }
/** * Push all new objects from the specified {@link Ref} to the remote. * * @param ref the local ref that points to new commit data */
Push all new objects from the specified <code>Ref</code> to the remote
pushNewData
{ "repo_name": "state-hiu/GeoGit", "path": "src/core/src/main/java/org/geogit/remote/AbstractMappedRemoteRepo.java", "license": "bsd-3-clause", "size": 16956 }
[ "org.geogit.api.Ref", "org.geogit.api.porcelain.SynchronizationException" ]
import org.geogit.api.Ref; import org.geogit.api.porcelain.SynchronizationException;
import org.geogit.api.*; import org.geogit.api.porcelain.*;
[ "org.geogit.api" ]
org.geogit.api;
1,632,315
private void addQueryParameterCondition(QueryParameterCondition queryParameterCondition, int pipelineId, Connection conn) throws SQLException { PreparedStatement psQueryParameterCondition = null; try { String sqlQuery = SQLConstants.ThrottleS...
void function(QueryParameterCondition queryParameterCondition, int pipelineId, Connection conn) throws SQLException { PreparedStatement psQueryParameterCondition = null; try { String sqlQuery = SQLConstants.ThrottleSQLConstants.INSERT_QUERY_PARAMETER_CONDITION_SQL; psQueryParameterCondition = conn.prepareStatement(sqlQ...
/** * Add QUERY throttling condition to AM_QUERY_PARAMETER_CONDITION table * * @param queryParameterCondition {@link QueryParameterCondition} with parameter name and value * @param pipelineId id of the pipeline which this condition belongs to * @param conn databa...
Add QUERY throttling condition to AM_QUERY_PARAMETER_CONDITION table
addQueryParameterCondition
{ "repo_name": "fazlan-nazeem/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 821235 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "org.wso2.carbon.apimgt.api.model.policy.QueryParameterCondition", "org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants", "org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.model.policy.QueryParameterCondition; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil;
import java.sql.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "org.wso2.carbon" ]
java.sql; org.wso2.carbon;
1,115,875
private void processARPPacket(PacketContext context, Ethernet packet) { ARP arpPacket = (ARP) packet.getPayload(); ARP arpReply = (ARP) arpPacket.clone(); arpReply.setOpCode(ARP.OP_REPLY); arpReply.setTargetProtocolAddress(arpPacket.getSenderProtocolAddress());...
void function(PacketContext context, Ethernet packet) { ARP arpPacket = (ARP) packet.getPayload(); ARP arpReply = (ARP) arpPacket.clone(); arpReply.setOpCode(ARP.OP_REPLY); arpReply.setTargetProtocolAddress(arpPacket.getSenderProtocolAddress()); arpReply.setTargetHardwareAddress(arpPacket.getSenderHardwareAddress()); a...
/** * Processes the ARP Payload and initiates a reply to the client. * * @param context context of the incoming message * @param packet the ethernet payload */
Processes the ARP Payload and initiates a reply to the client
processARPPacket
{ "repo_name": "kkkane/ONOS", "path": "apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DhcpManager.java", "license": "apache-2.0", "size": 28079 }
[ "org.onlab.packet.Ethernet", "org.onosproject.net.packet.PacketContext" ]
import org.onlab.packet.Ethernet; import org.onosproject.net.packet.PacketContext;
import org.onlab.packet.*; import org.onosproject.net.packet.*;
[ "org.onlab.packet", "org.onosproject.net" ]
org.onlab.packet; org.onosproject.net;
772,591
@ApiModelProperty(example = "null", value = "Set of possible classes for segments identified by this detector") public java.util.List<VbClass> getClasses() { return classes; }
@ApiModelProperty(example = "null", value = STR) java.util.List<VbClass> function() { return classes; }
/** * Set of possible classes for segments identified by this detector * @return classes **/
Set of possible classes for segments identified by this detector
getClasses
{ "repo_name": "jbocharov/voicebase-java-samples", "path": "v3-upload-transcribe/src/main/java/com/voicebase/sample/v3client/model/VbDetectorModel.java", "license": "mit", "size": 7686 }
[ "com.voicebase.sample.v3client.model.VbClass", "io.swagger.annotations.ApiModelProperty" ]
import com.voicebase.sample.v3client.model.VbClass; import io.swagger.annotations.ApiModelProperty;
import com.voicebase.sample.v3client.model.*; import io.swagger.annotations.*;
[ "com.voicebase.sample", "io.swagger.annotations" ]
com.voicebase.sample; io.swagger.annotations;
2,059,123
public void setMainImage(Drawable drawable) { setMainImage(drawable, true); }
void function(Drawable drawable) { setMainImage(drawable, true); }
/** * Sets the image drawable with fade-in animation. */
Sets the image drawable with fade-in animation
setMainImage
{ "repo_name": "AndroidX/androidx", "path": "leanback/leanback/src/main/java/androidx/leanback/widget/ImageCardView.java", "license": "apache-2.0", "size": 17757 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
75,836
public IndexRequest source(BytesReference source) { this.source = source; return this; }
IndexRequest function(BytesReference source) { this.source = source; return this; }
/** * Sets the document to index in bytes form. */
Sets the document to index in bytes form
source
{ "repo_name": "MaineC/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/index/IndexRequest.java", "license": "apache-2.0", "size": 19215 }
[ "org.elasticsearch.common.bytes.BytesReference" ]
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.bytes.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
519,632
public void search(RefactoringRequest request) throws SearchException, OperationCanceledException { for (IRefactorRenameProcess p : requestToProcesses.get(request)) { request.checkCancelled(); p.clear(); // Clear references found from a previous invocation Ref...
void function(RefactoringRequest request) throws SearchException, OperationCanceledException { for (IRefactorRenameProcess p : requestToProcesses.get(request)) { request.checkCancelled(); p.clear(); RefactoringStatus status = new RefactoringStatus(); request.pushMonitor(new SubProgressMonitor(request.getMonitor(), 1));...
/** * Searches for references to the identifier in the request. * * <p>{@link #prepareSearch(RefactoringRequest)} must be called before * {@link #search(RefactoringRequest)} or else results are undefined. * * @param request the search request * @throws SearchException if an exception ...
Searches for references to the identifier in the request. <code>#prepareSearch(RefactoringRequest)</code> must be called before <code>#search(RefactoringRequest)</code> or else results are undefined
search
{ "repo_name": "rgom/Pydev", "path": "plugins/com.python.pydev.refactoring/src/com/python/pydev/refactoring/wizards/rename/PyReferenceSearcher.java", "license": "epl-1.0", "size": 9840 }
[ "com.python.pydev.refactoring.wizards.IRefactorRenameProcess", "org.eclipse.core.runtime.OperationCanceledException", "org.eclipse.core.runtime.SubProgressMonitor", "org.eclipse.ltk.core.refactoring.RefactoringStatus", "org.python.pydev.editor.refactoring.RefactoringRequest" ]
import com.python.pydev.refactoring.wizards.IRefactorRenameProcess; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.ltk.core.refactoring.RefactoringStatus; import org.python.pydev.editor.refactoring.RefactoringRequest;
import com.python.pydev.refactoring.wizards.*; import org.eclipse.core.runtime.*; import org.eclipse.ltk.core.refactoring.*; import org.python.pydev.editor.refactoring.*;
[ "com.python.pydev", "org.eclipse.core", "org.eclipse.ltk", "org.python.pydev" ]
com.python.pydev; org.eclipse.core; org.eclipse.ltk; org.python.pydev;
1,628,266
public static float dot(Vector4f left, Vector4f right) { return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; }
static float function(Vector4f left, Vector4f right) { return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; }
/** * The dot product of two vectors is calculated as * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w * @param left The LHS vector * @param right The RHS vector * @return left dot right */
The dot product of two vectors is calculated as v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w
dot
{ "repo_name": "andrewmcvearry/mille-bean", "path": "lwjgl/src/java/org/lwjgl/util/vector/Vector4f.java", "license": "mit", "size": 8277 }
[ "org.lwjgl.util.vector.Vector4f" ]
import org.lwjgl.util.vector.Vector4f;
import org.lwjgl.util.vector.*;
[ "org.lwjgl.util" ]
org.lwjgl.util;
1,032,100
public List<Worker> findByNif(String nif) throws SystemException { return findByNif(nif, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
List<Worker> function(String nif) throws SystemException { return findByNif(nif, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
/** * Returns all the workers where nif = &#63;. * * @param nif the nif * @return the matching workers * @throws SystemException if a system exception occurred */
Returns all the workers where nif = &#63;
findByNif
{ "repo_name": "rsicart/mpwc", "path": "docroot/WEB-INF/src/com/mpwc/service/persistence/WorkerPersistenceImpl.java", "license": "bsd-3-clause", "size": 189688 }
[ "com.liferay.portal.kernel.dao.orm.QueryUtil", "com.liferay.portal.kernel.exception.SystemException", "com.mpwc.model.Worker", "java.util.List" ]
import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.exception.SystemException; import com.mpwc.model.Worker; import java.util.List;
import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.mpwc.model.*; import java.util.*;
[ "com.liferay.portal", "com.mpwc.model", "java.util" ]
com.liferay.portal; com.mpwc.model; java.util;
403,956
public boolean userInGroup(CmsRequestContext context, String username, String groupname) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result = false; try { result = m_driverManager.userInGroup( dbc, Cm...
boolean function(CmsRequestContext context, String username, String groupname) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); boolean result = false; try { result = m_driverManager.userInGroup( dbc, CmsOrganizationalUnit.removeLeadingSeparator(username), CmsOrganizationalUnit.removeL...
/** * Tests if a user is member of the given group.<p> * * @param context the current request context * @param username the name of the user to check * @param groupname the name of the group to check * * @return <code>true</code>, if the user is in the group; or <code>false</code> oth...
Tests if a user is member of the given group
userInGroup
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/db/CmsSecurityManager.java", "license": "lgpl-2.1", "size": 287876 }
[ "org.opencms.file.CmsRequestContext", "org.opencms.main.CmsException", "org.opencms.security.CmsOrganizationalUnit" ]
import org.opencms.file.CmsRequestContext; import org.opencms.main.CmsException; import org.opencms.security.CmsOrganizationalUnit;
import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*;
[ "org.opencms.file", "org.opencms.main", "org.opencms.security" ]
org.opencms.file; org.opencms.main; org.opencms.security;
2,580,175
public Builder discontinued(LocalDate date) { computer.setDiscontinued(date); return this; } }
Builder function(LocalDate date) { computer.setDiscontinued(date); return this; } }
/** * Adds a date of the last apparition to the computer. * * @param date date of the last apparition * @return builder current instance */
Adds a date of the last apparition to the computer
discontinued
{ "repo_name": "gpuget/training-java", "path": "computer-database/core/src/main/java/com/excilys/cdb/model/Computer.java", "license": "apache-2.0", "size": 4637 }
[ "java.time.LocalDate" ]
import java.time.LocalDate;
import java.time.*;
[ "java.time" ]
java.time;
2,894,062
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName),...
ServiceFuture<Void> function(String resourceGroupName, String networkInterfaceName, String tapConfigurationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tapConfigurationName), serviceCallback); }
/** * Deletes the specified tap configuration from the NetworkInterface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param tapConfigurationName The name of the tap configuration. * @param serviceCallback t...
Deletes the specified tap configuration from the NetworkInterface
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkInterfaceTapConfigurationsInner.java", "license": "mit", "size": 49754 }
[ "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;
1,144,405
public Identity findIdentityByName(String identityName);
Identity function(String identityName);
/** * Find an identity by its name. This is an exact match. Use the getIdentititesByPowerSearch() method if you also want to find substrings. * <p> * Be aware that this method does <b>not</b> check the identities status! This method returns identities with any state, also deleted identities! * * @param ident...
Find an identity by its name. This is an exact match. Use the getIdentititesByPowerSearch() method if you also want to find substrings. Be aware that this method does not check the identities status! This method returns identities with any state, also deleted identities
findIdentityByName
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/basesecurity/BaseSecurity.java", "license": "apache-2.0", "size": 15856 }
[ "org.olat.core.id.Identity" ]
import org.olat.core.id.Identity;
import org.olat.core.id.*;
[ "org.olat.core" ]
org.olat.core;
1,289,609
public static void drawContinuousTexturedBox(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.enableBl...
static void function(int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder, float zLevel) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA...
/** * Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders * and filler. It is assumed that the desired texture ResourceLocation object has been bound using * Minecraft.getMinecraft().getTextureManager().bindTexture(resourceL...
Draws a textured box of any size (smallest size is borderSize * 2 square) based on a fixed size textured box with continuous borders and filler. It is assumed that the desired texture ResourceLocation object has been bound using Minecraft.getMinecraft().getTextureManager().bindTexture(resourceLocation)
drawContinuousTexturedBox
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraftforge/fml/client/config/GuiUtils.java", "license": "gpl-3.0", "size": 19354 }
[ "net.minecraft.client.renderer.GlStateManager" ]
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.*;
[ "net.minecraft.client" ]
net.minecraft.client;
748,291
public static ims.generalmedical.vo.RangeOfMovementVo insert(DomainObjectMap map, ims.generalmedical.vo.RangeOfMovementVo valueObject, ims.medical.domain.objects.MskExamJointBones domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainOb...
static ims.generalmedical.vo.RangeOfMovementVo function(DomainObjectMap map, ims.generalmedical.vo.RangeOfMovementVo valueObject, ims.medical.domain.objects.MskExamJointBones domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_MskExamJoin...
/** * Update the ValueObject with the Domain Object. * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.medical.domain.objects.MskExamJointBones */
Update the ValueObject with the Domain Object
insert
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/generalmedical/vo/domain/RangeOfMovementVoAssembler.java", "license": "agpl-3.0", "size": 20841 }
[ "org.hibernate.proxy.HibernateProxy" ]
import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.*;
[ "org.hibernate.proxy" ]
org.hibernate.proxy;
1,974,701
public static Properties toProperties(JSONObject jo) throws JSONException { Properties properties = new Properties(); if (jo != null) { for (final Entry<String, ?> entry : jo.entrySet()) { Object value = entry.getValue(); if (!JSONObject.NULL.equals(valu...
static Properties function(JSONObject jo) throws JSONException { Properties properties = new Properties(); if (jo != null) { for (final Entry<String, ?> entry : jo.entrySet()) { Object value = entry.getValue(); if (!JSONObject.NULL.equals(value)) { properties.put(entry.getKey(), value.toString()); } } } return properti...
/** * Converts the JSONObject into a property file object. * @param jo JSONObject * @return java.util.Properties * @throws JSONException */
Converts the JSONObject into a property file object
toProperties
{ "repo_name": "IgorSamer/RENDI", "path": "model/bean/Property.java", "license": "mit", "size": 2766 }
[ "java.util.Map", "java.util.Properties" ]
import java.util.Map; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
1,365,146
@Test public void testCommits() throws Exception { try (LocalLogManagerTestEnv env = LocalLogManagerTestEnv.createWithMockListeners(3)) { MetaLogLeader leaderInfo = env.waitForLeader(); LocalLogManager activeLogManager = env.logManagers().get(leaderInfo.nodeId())...
void function() throws Exception { try (LocalLogManagerTestEnv env = LocalLogManagerTestEnv.createWithMockListeners(3)) { MetaLogLeader leaderInfo = env.waitForLeader(); LocalLogManager activeLogManager = env.logManagers().get(leaderInfo.nodeId()); long epoch = activeLogManager.leader().epoch(); List<ApiMessageAndVersi...
/** * Test that all the log managers see all the commits. */
Test that all the log managers see all the commits
testCommits
{ "repo_name": "Chasego/kafka", "path": "metadata/src/test/java/org/apache/kafka/metalog/LocalLogManagerTest.java", "license": "apache-2.0", "size": 6583 }
[ "java.util.Arrays", "java.util.List", "java.util.stream.Collectors", "org.apache.kafka.common.metadata.RegisterBrokerRecord", "org.apache.kafka.metadata.ApiMessageAndVersion", "org.apache.kafka.metalog.MockMetaLogManagerListener", "org.junit.jupiter.api.Assertions" ]
import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import org.apache.kafka.common.metadata.RegisterBrokerRecord; import org.apache.kafka.metadata.ApiMessageAndVersion; import org.apache.kafka.metalog.MockMetaLogManagerListener; import org.junit.jupiter.api.Assertions;
import java.util.*; import java.util.stream.*; import org.apache.kafka.common.metadata.*; import org.apache.kafka.metadata.*; import org.apache.kafka.metalog.*; import org.junit.jupiter.api.*;
[ "java.util", "org.apache.kafka", "org.junit.jupiter" ]
java.util; org.apache.kafka; org.junit.jupiter;
507,757
public static Check read(final InputStream stream) throws IOException { int b; Check check; check = new Check(); b = stream.read(); if (b == 255) return null; check.type = b >> 5; check.difficulty = b & 31; check.value = stream.read(); r...
static Check function(final InputStream stream) throws IOException { int b; Check check; check = new Check(); b = stream.read(); if (b == 255) return null; check.type = b >> 5; check.difficulty = b & 31; check.value = stream.read(); return check; }
/** * Creates and returns a new check by reading its data from the specified * stream. If no more checks are on the stream then null is returned. * * @param stream * The input stream * @return The check * @throws IOException * When file operation fails. ...
Creates and returns a new check by reading its data from the specified stream. If no more checks are on the stream then null is returned
read
{ "repo_name": "delMar43/wlandsuite", "path": "src/main/java/de/ailis/wlandsuite/game/parts/Check.java", "license": "mit", "size": 8867 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,442,523
default void afterMergeIntoCollection(Collection<Entity> entities, Object... hints) { // intentionally left blank }
default void afterMergeIntoCollection(Collection<Entity> entities, Object... hints) { }
/** * Called after a collection mapping. * * @param entities the mapped entities * @param hints optional hints */
Called after a collection mapping
afterMergeIntoCollection
{ "repo_name": "porscheinformatik/anti-mapper", "path": "src/main/java/at/porscheinformatik/antimapper/Merger.java", "license": "mit", "size": 14315 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,147,626
StringBuilder builder = new StringBuilder(); for (Map.Entry<Integer, SequenceData> entry : sequenceDataMap.entrySet()) { SequenceData sequenceData = entry.getValue(); for (int i = 0; i < sequenceData.getNumberOfTimes(); i++) { int n = sequenceData.getCharacters().length(); int randomInt = RANDOM.nextI...
StringBuilder builder = new StringBuilder(); for (Map.Entry<Integer, SequenceData> entry : sequenceDataMap.entrySet()) { SequenceData sequenceData = entry.getValue(); for (int i = 0; i < sequenceData.getNumberOfTimes(); i++) { int n = sequenceData.getCharacters().length(); int randomInt = RANDOM.nextInt(n); builder.app...
/** * Generate a string * @return a String */
Generate a string
generate
{ "repo_name": "jonasmkarlsson/generate-data", "path": "src/main/java/org/jonasmkarlsson/generatedata/column/Sequence.java", "license": "gpl-3.0", "size": 4878 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
294,918
static <T> Supplier<Either<Exception, T>> decorateEitherSupplier(RateLimiter rateLimiter, Supplier<Either<? extends Exception, T>> supplier) { return decorateEitherSupplier(rateLimiter, 1, supplier); }
static <T> Supplier<Either<Exception, T>> decorateEitherSupplier(RateLimiter rateLimiter, Supplier<Either<? extends Exception, T>> supplier) { return decorateEitherSupplier(rateLimiter, 1, supplier); }
/** * Creates a supplier which is restricted by a RateLimiter. * * @param rateLimiter the RateLimiter * @param supplier the original supplier * @param <T> the type of results supplied supplier * @return a supplier which is restricted by a RateLimiter. */
Creates a supplier which is restricted by a RateLimiter
decorateEitherSupplier
{ "repo_name": "drmaas/resilience4j", "path": "resilience4j-ratelimiter/src/main/java/io/github/resilience4j/ratelimiter/RateLimiter.java", "license": "apache-2.0", "size": 33535 }
[ "io.vavr.control.Either", "java.util.function.Supplier" ]
import io.vavr.control.Either; import java.util.function.Supplier;
import io.vavr.control.*; import java.util.function.*;
[ "io.vavr.control", "java.util" ]
io.vavr.control; java.util;
2,770,052
protected Quercus getQuercus() { synchronized (this) { if (php == null){ php = new Quercus(); } } return php; }
Quercus function() { synchronized (this) { if (php == null){ php = new Quercus(); } } return php; }
/** * Returns the Quercus instance. */
Returns the Quercus instance
getQuercus
{ "repo_name": "ggonzales/ksl", "path": "src/com/dotmarketing/scripting/servlet/PHPServlet.java", "license": "gpl-3.0", "size": 11943 }
[ "com.caucho.quercus.Quercus" ]
import com.caucho.quercus.Quercus;
import com.caucho.quercus.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
572,744
@ApiModelProperty(example = "null", value = "") public String getUpdatedDate() { return updatedDate; }
@ApiModelProperty(example = "null", value = "") String function() { return updatedDate; }
/** * Get updatedDate * @return updatedDate **/
Get updatedDate
getUpdatedDate
{ "repo_name": "amardeshbd/android-daily-headlines", "path": "api-lib/src/main/java/io/swagger/client/model/Article.java", "license": "mit", "size": 14860 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
15,895
public static <T> TrieNode<T> findNode(String prefix, TrieNode<T> searchRoot) { Preconditions.checkNotNull(prefix); if (prefix.equals(searchRoot.getPrefix())) { return searchRoot; } TrieNode<T> closestAncestor = findClosestAncestor(prefix, searchRoot); return (closestAncestor.getPrefix().equ...
static <T> TrieNode<T> function(String prefix, TrieNode<T> searchRoot) { Preconditions.checkNotNull(prefix); if (prefix.equals(searchRoot.getPrefix())) { return searchRoot; } TrieNode<T> closestAncestor = findClosestAncestor(prefix, searchRoot); return (closestAncestor.getPrefix().equals(prefix)) ? closestAncestor : nu...
/** * Searches the subtree rooted at {@code searchRoot} for a node * corresponding to the prefix. * * There can only ever be one such node, or zero. If no node is found, returns * null. * * Note that the {@code prefix} is relative to the whole trie root, not * to the {@code searchRoot}. * ...
Searches the subtree rooted at searchRoot for a node corresponding to the prefix. There can only ever be one such node, or zero. If no node is found, returns null. Note that the prefix is relative to the whole trie root, not to the searchRoot
findNode
{ "repo_name": "PP888/collide", "path": "java/com/google/collide/client/code/autocomplete/AbstractTrie.java", "license": "apache-2.0", "size": 6058 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,886,783
public Player swapPlayer() { switch (this) { case BLUE: return RED; case RED: return BLUE; default: throw new IllegalArgumentException(); } } private static final Random gen = new Random();
Player function() { switch (this) { case BLUE: return RED; case RED: return BLUE; default: throw new IllegalArgumentException(); } } private static final Random gen = new Random();
/** * This method swaps SELF->OPPONENT or vice versa. This method will throw an * exception if this object is Player.NONE * * @return The other player. */
This method swaps SELF->OPPONENT or vice versa. This method will throw an exception if this object is Player.NONE
swapPlayer
{ "repo_name": "slaymaker1907/triple-triad-ai", "path": "TRIPLE_TRIAD_ENGINE/src/com/dyllongagnier/triad/card/Player.java", "license": "gpl-2.0", "size": 795 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,251,913
public Map<QName, Serializable> applyProperties(Map<QName, Serializable> extractedProperties, Map<QName, Serializable> targetProperties) { throw new UnsupportedOperationException("Override this method"); } }; /** * Get an estimate of the extracter's reliabili...
Map<QName, Serializable> function(Map<QName, Serializable> extractedProperties, Map<QName, Serializable> targetProperties) { throw new UnsupportedOperationException(STR); } }; /** * Get an estimate of the extracter's reliability on a scale from 0.0 to 1.0. * * @param mimetype the mimetype to check * @return Returns a r...
/** * Apply the overwrite policy for the extracted properties. * * @return * Returns a map of all properties that were applied to the target map * as well as any null values that weren't applied but were present. */
Apply the overwrite policy for the extracted properties
applyProperties
{ "repo_name": "Alfresco/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/content/metadata/MetadataExtracter.java", "license": "lgpl-3.0", "size": 19494 }
[ "java.io.Serializable", "java.util.Map", "org.alfresco.service.namespace.QName" ]
import java.io.Serializable; import java.util.Map; import org.alfresco.service.namespace.QName;
import java.io.*; import java.util.*; import org.alfresco.service.namespace.*;
[ "java.io", "java.util", "org.alfresco.service" ]
java.io; java.util; org.alfresco.service;
2,077,467
public static Calendar toCalendar(DateTime dateTime, Locale locale) { return dateTimesHelper.toCalendar(dateTime, locale); } /** * Returns string representation of this date. * * @param date the date to stringify * @return a string representation of the {@code Date} in {@code yyyy-MM-dd}
static Calendar function(DateTime dateTime, Locale locale) { return dateTimesHelper.toCalendar(dateTime, locale); } /** * Returns string representation of this date. * * @param date the date to stringify * @return a string representation of the {@code Date} in {@code yyyy-MM-dd}
/** * Gets a calendar for a {@code DateTime} in the supplied locale. */
Gets a calendar for a DateTime in the supplied locale
toCalendar
{ "repo_name": "nafae/developer", "path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/utils/v201306/DateTimes.java", "license": "apache-2.0", "size": 5996 }
[ "com.google.api.ads.dfp.jaxws.v201306.Date", "com.google.api.ads.dfp.jaxws.v201306.DateTime", "java.util.Calendar", "java.util.Locale" ]
import com.google.api.ads.dfp.jaxws.v201306.Date; import com.google.api.ads.dfp.jaxws.v201306.DateTime; import java.util.Calendar; import java.util.Locale;
import com.google.api.ads.dfp.jaxws.v201306.*; import java.util.*;
[ "com.google.api", "java.util" ]
com.google.api; java.util;
1,567,863
public void addChangeListener(RendererChangeListener listener) { if (listener == null) { throw new IllegalArgumentException("Null 'listener' argument."); } this.listenerList.add(RendererChangeListener.class, listener); }
void function(RendererChangeListener listener) { if (listener == null) { throw new IllegalArgumentException(STR); } this.listenerList.add(RendererChangeListener.class, listener); }
/** * Registers an object to receive notification of changes to the renderer. * * @param listener the listener (<code>null</code> not permitted). * * @see #removeChangeListener(RendererChangeListener) */
Registers an object to receive notification of changes to the renderer
addChangeListener
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/main/java/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 108424 }
[ "org.jfree.chart.event.RendererChangeListener" ]
import org.jfree.chart.event.RendererChangeListener;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,973,809
private boolean isCompaction(AdminUtil.TransactionStatus tx) { if (tx == null) { log.trace("Fate tx is null"); return false; } log.trace("Fate id: {}, status: {}", tx.getTxid(), tx.getStatus()); String top = tx.getTop(); String debug = tx.getDebug(); return top != null && debug...
boolean function(AdminUtil.TransactionStatus tx) { if (tx == null) { log.trace(STR); return false; } log.trace(STR, tx.getTxid(), tx.getStatus()); String top = tx.getTop(); String debug = tx.getDebug(); return top != null && debug != null && top.contains(STR) && tx.getDebug().contains(STR); }
/** * Test that the transaction top contains "CompactionDriver" and the debug message contains * "CompactRange" * * @param tx * transaction status * @return true if tx top and debug have compaction messages. */
Test that the transaction top contains "CompactionDriver" and the debug message contains "CompactRange"
isCompaction
{ "repo_name": "lstav/accumulo", "path": "test/src/main/java/org/apache/accumulo/test/functional/FateConcurrencyIT.java", "license": "apache-2.0", "size": 16838 }
[ "org.apache.accumulo.fate.AdminUtil" ]
import org.apache.accumulo.fate.AdminUtil;
import org.apache.accumulo.fate.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
1,770,774
public void setConfigurationSets(final ArrayList<ConfigurationSet> configurationSetsValue) { this.configurationSets = configurationSetsValue; } private ArrayList<DataVirtualHardDisk> dataVirtualHardDisks;
void function(final ArrayList<ConfigurationSet> configurationSetsValue) { this.configurationSets = configurationSetsValue; } private ArrayList<DataVirtualHardDisk> dataVirtualHardDisks;
/** * Optional. Contains the collection of configuration sets that contain * system and application configuration settings. * @param configurationSetsValue The ConfigurationSets value. */
Optional. Contains the collection of configuration sets that contain system and application configuration settings
setConfigurationSets
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "service-management/azure-svc-mgmt-compute/src/main/java/com/microsoft/windowsazure/management/compute/models/VirtualMachineCreateParameters.java", "license": "apache-2.0", "size": 10732 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,096,294
public String getMarkedContent() { Position startPosition = new Position(currentMarkedPosition.getIndexInContent(), currentMarkedPosition.getLine(), currentMarkedPosition.getColumn()); mark(); return getContentBetween(startPosition, currentMark...
String function() { Position startPosition = new Position(currentMarkedPosition.getIndexInContent(), currentMarkedPosition.getLine(), currentMarkedPosition.getColumn()); mark(); return getContentBetween(startPosition, currentMarkedPosition); }
/** * Returns the string content for characters bounded by the previous marked position and the position of the currentToken * (inclusive). Method also marks() the new position the the currentToken. * * @return the string content for characters bounded by the previous marked position and the positi...
Returns the string content for characters bounded by the previous marked position and the position of the currentToken (inclusive). Method also marks() the new position the the currentToken
getMarkedContent
{ "repo_name": "flownclouds/modeshape", "path": "sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlTokenStream.java", "license": "apache-2.0", "size": 21050 }
[ "org.modeshape.common.text.Position" ]
import org.modeshape.common.text.Position;
import org.modeshape.common.text.*;
[ "org.modeshape.common" ]
org.modeshape.common;
2,055,980
Map getParameters();
Map getParameters();
/** * Get the parameters this context was created with. */
Get the parameters this context was created with
getParameters
{ "repo_name": "nile/beankeeper", "path": "src/main/java/hu/netmind/beankeeper/service/StoreContext.java", "license": "lgpl-3.0", "size": 1881 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
866,378
public Enumeration listOptions() { Vector newVector = new Vector(7); newVector.addElement(new Option("\tPopulation size", "L", 1, "-L <integer>")); newVector.addElement(new Option("\tDescendant population size", "A", 1, "-A <integer>")); newVector.addElement(new Option("\tNumber of runs", "U", 1, "-U <integ...
Enumeration function() { Vector newVector = new Vector(7); newVector.addElement(new Option(STR, "L", 1, STR)); newVector.addElement(new Option(STR, "A", 1, STR)); newVector.addElement(new Option(STR, "U", 1, STR)); newVector.addElement(new Option(STR, "M", 0, "-M")); newVector.addElement(new Option(STR, "C", 0, "-C"));...
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */
Returns an enumeration describing the available options
listOptions
{ "repo_name": "tdelev/MULLAN", "path": "MULLANWrappers/src/weka/classifiers/bayes/net/search/local/GeneticSearch.java", "license": "mit", "size": 21727 }
[ "java.util.Enumeration", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,392,054
int updateByPrimaryKey(RolePermission record);
int updateByPrimaryKey(RolePermission record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table s_role_permission * * @mbggenerated Mon Sep 21 13:52:02 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table s_role_permission
updateByPrimaryKey
{ "repo_name": "maduhu/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/user/dao/RolePermissionMapper.java", "license": "agpl-3.0", "size": 5729 }
[ "com.esofthead.mycollab.module.user.domain.RolePermission" ]
import com.esofthead.mycollab.module.user.domain.RolePermission;
import com.esofthead.mycollab.module.user.domain.*;
[ "com.esofthead.mycollab" ]
com.esofthead.mycollab;
1,547,238
public StaticReplicationDataBundle withShiftedForwardCurve(final ForwardCurve forwardCurve) { ArgumentChecker.notNull(forwardCurve, "ForwardCurve"); return new StaticReplicationDataBundle(getVolatilitySurface(), getDiscountCurve(), forwardCurve); }
StaticReplicationDataBundle function(final ForwardCurve forwardCurve) { ArgumentChecker.notNull(forwardCurve, STR); return new StaticReplicationDataBundle(getVolatilitySurface(), getDiscountCurve(), forwardCurve); }
/** * Create a data bundle based upon a new forward curve. * @param forwardCurve the forward curve * @return StaticReplicationDataBundle */
Create a data bundle based upon a new forward curve
withShiftedForwardCurve
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/equity/StaticReplicationDataBundle.java", "license": "apache-2.0", "size": 4285 }
[ "com.opengamma.analytics.financial.model.interestrate.curve.ForwardCurve", "com.opengamma.util.ArgumentChecker" ]
import com.opengamma.analytics.financial.model.interestrate.curve.ForwardCurve; import com.opengamma.util.ArgumentChecker;
import com.opengamma.analytics.financial.model.interestrate.curve.*; import com.opengamma.util.*;
[ "com.opengamma.analytics", "com.opengamma.util" ]
com.opengamma.analytics; com.opengamma.util;
1,778,842
@SuppressWarnings({ "serial", "unchecked" }) @Test public void testNotYetReplicatedErrors() throws IOException { final String exceptionMsg = "Nope, not replicated yet..."; final int maxRetries = 1; // Allow one retry (total of two calls) conf.setInt(DFSConfigKeys.DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOW...
@SuppressWarnings({ STR, STR }) void function() throws IOException { final String exceptionMsg = STR; final int maxRetries = 1; conf.setInt(DFSConfigKeys.DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_RETRIES_KEY, maxRetries); NamenodeProtocols mockNN = mock(NamenodeProtocols.class); Answer<Object> answer = new ThrowsExce...
/** * Verify that client will correctly give up after the specified number * of times trying to add a block */
Verify that client will correctly give up after the specified number of times trying to add a block
testNotYetReplicatedErrors
{ "repo_name": "messi49/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java", "license": "apache-2.0", "size": 42432 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols", "org.mockito.Mockito", "org.mockito.internal.stubbing.answers.ThrowsException", "org.mockito.stubbing.Answer" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols; import org.mockito.Mockito; import org.mockito.internal.stubbing.answers.ThrowsException; import org.mockito.stubbing.Answer;
import java.io.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.mockito.*; import org.mockito.internal.stubbing.answers.*; import org.mockito.stubbing.*;
[ "java.io", "org.apache.hadoop", "org.mockito", "org.mockito.internal", "org.mockito.stubbing" ]
java.io; org.apache.hadoop; org.mockito; org.mockito.internal; org.mockito.stubbing;
1,823,260
public static void configureFromSystemDwrXml(Container container) throws IOException, ParserConfigurationException, SAXException { DwrXmlConfigurator system = new DwrXmlConfigurator(); system.setClassResourceName(DwrConstants.FILE_DWR_XML); system.configure(container); }
static void function(Container container) throws IOException, ParserConfigurationException, SAXException { DwrXmlConfigurator system = new DwrXmlConfigurator(); system.setClassResourceName(DwrConstants.FILE_DWR_XML); system.configure(container); }
/** * Configure using the system dwr.xml from within the JAR file. * @param container The container to configure * @throws ParserConfigurationException If the config file parse fails * @throws IOException If the config file read fails * @throws SAXException If the config file parse fails *...
Configure using the system dwr.xml from within the JAR file
configureFromSystemDwrXml
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/dwr-2.0.1/src/java/org/directwebremoting/impl/ContainerUtil.java", "license": "lgpl-3.0", "size": 26162 }
[ "java.io.IOException", "javax.xml.parsers.ParserConfigurationException", "org.directwebremoting.Container", "org.directwebremoting.extend.DwrConstants", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import org.directwebremoting.Container; import org.directwebremoting.extend.DwrConstants; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.directwebremoting.*; import org.directwebremoting.extend.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.directwebremoting", "org.directwebremoting.extend", "org.xml.sax" ]
java.io; javax.xml; org.directwebremoting; org.directwebremoting.extend; org.xml.sax;
2,332,944
AuthResult permissionGranted(String request, User user, Action permRequest, RegionCoprocessorEnvironment e, Map<byte [], ? extends Collection<?>> families) { HRegionInfo hri = e.getRegion().getRegionInfo(); TableName tableName = hri.getTable(); // 1. All users need read access to hbase:meta t...
AuthResult permissionGranted(String request, User user, Action permRequest, RegionCoprocessorEnvironment e, Map<byte [], ? extends Collection<?>> families) { HRegionInfo hri = e.getRegion().getRegionInfo(); TableName tableName = hri.getTable(); if (hri.isMetaRegion()) { if (permRequest == Action.READ) { return AuthResu...
/** * Check the current user for authorization to perform a specific action * against the given set of row data. * * <p>Note: Ordering of the authorization checks * has been carefully optimized to short-circuit the most common requests * and minimize the amount of processing required.</p> * * @p...
Check the current user for authorization to perform a specific action against the given set of row data. Note: Ordering of the authorization checks has been carefully optimized to short-circuit the most common requests and minimize the amount of processing required
permissionGranted
{ "repo_name": "narendragoyal/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java", "license": "apache-2.0", "size": 106296 }
[ "java.util.Collection", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment", "org.apache.hadoop.hbase.security.User", "...
import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment; import org.apache.hadoop...
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.hbase.security.access.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
322,525
public int doMfglibGetTxPower() { EzspMfglibGetPowerRequest channelRequest = new EzspMfglibGetPowerRequest(); EzspSingleResponseTransaction transaction = new EzspSingleResponseTransaction(channelRequest, EzspMfglibGetPowerResponse.class); protocolHandler.sendEzspTransaction(t...
int function() { EzspMfglibGetPowerRequest channelRequest = new EzspMfglibGetPowerRequest(); EzspSingleResponseTransaction transaction = new EzspSingleResponseTransaction(channelRequest, EzspMfglibGetPowerResponse.class); protocolHandler.sendEzspTransaction(transaction); EzspMfglibGetPowerResponse response = (EzspMfgli...
/** * Power in units of dBm. Refer to radio data sheet for valid range. * * return the current transmit power in dBm */
Power in units of dBm. Refer to radio data sheet for valid range. return the current transmit power in dBm
doMfglibGetTxPower
{ "repo_name": "zsmartsystems/com.zsmartsystems.zigbee", "path": "com.zsmartsystems.zigbee.dongle.ember/src/main/java/com/zsmartsystems/zigbee/dongle/ember/EmberMfglib.java", "license": "epl-1.0", "size": 14496 }
[ "com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspMfglibGetPowerRequest", "com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspMfglibGetPowerResponse", "com.zsmartsystems.zigbee.dongle.ember.internal.transaction.EzspSingleResponseTransaction" ]
import com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspMfglibGetPowerRequest; import com.zsmartsystems.zigbee.dongle.ember.ezsp.command.EzspMfglibGetPowerResponse; import com.zsmartsystems.zigbee.dongle.ember.internal.transaction.EzspSingleResponseTransaction;
import com.zsmartsystems.zigbee.dongle.ember.ezsp.command.*; import com.zsmartsystems.zigbee.dongle.ember.internal.transaction.*;
[ "com.zsmartsystems.zigbee" ]
com.zsmartsystems.zigbee;
932,155
@Test public void testMultiKeyValue() { SelectStatement left = select(field("stringKey"), field("intKey"), field("nullableStringCol"), field("nullableIntCol")).from(tableRef("MultiKeyLeft")); SelectStatement right = select(field("stringKey"), field("intKey"), field("nullableStringCol"), field("nullableI...
void function() { SelectStatement left = select(field(STR), field(STR), field(STR), field(STR)).from(tableRef(STR)); SelectStatement right = select(field(STR), field(STR), field(STR), field(STR)).from(tableRef(STR)); CompareCallback callBackMock = mock(CompareCallback.class); ArgumentCaptor<ResultSetMismatch> resultSet...
/** * Test compare value on data sets with composite key. * */
Test compare value on data sets with composite key
testMultiKeyValue
{ "repo_name": "alfasoftware/morf", "path": "morf-integration-test/src/test/java/org/alfasoftware/morf/integration/TestResultSetComparer.java", "license": "apache-2.0", "size": 34921 }
[ "org.alfasoftware.morf.jdbc.ResultSetComparer", "org.alfasoftware.morf.jdbc.ResultSetMismatch", "org.alfasoftware.morf.sql.SelectStatement", "org.alfasoftware.morf.sql.SqlUtils", "org.junit.Assert", "org.mockito.ArgumentCaptor", "org.mockito.Mockito" ]
import org.alfasoftware.morf.jdbc.ResultSetComparer; import org.alfasoftware.morf.jdbc.ResultSetMismatch; import org.alfasoftware.morf.sql.SelectStatement; import org.alfasoftware.morf.sql.SqlUtils; import org.junit.Assert; import org.mockito.ArgumentCaptor; import org.mockito.Mockito;
import org.alfasoftware.morf.jdbc.*; import org.alfasoftware.morf.sql.*; import org.junit.*; import org.mockito.*;
[ "org.alfasoftware.morf", "org.junit", "org.mockito" ]
org.alfasoftware.morf; org.junit; org.mockito;
1,960,791
public static void setAttribute(final MetadataElement dest, final String tag, final int value) { if (dest == null) return; final MetadataAttribute attrib = dest.getAttribute(tag); if (attrib == null) System.out.println(tag + " not found in metadata"); else ...
static void function(final MetadataElement dest, final String tag, final int value) { if (dest == null) return; final MetadataAttribute attrib = dest.getAttribute(tag); if (attrib == null) System.out.println(tag + STR); else attrib.getData().setElemInt(value); }
/** * Sets an attribute as an int * * @param dest the destination element * @param tag the name of the attribute * @param value the string value */
Sets an attribute as an int
setAttribute
{ "repo_name": "valgur/snap-engine", "path": "snap-engine-utilities/src/main/java/org/esa/snap/datamodel/AbstractMetadata.java", "license": "gpl-3.0", "size": 45621 }
[ "org.esa.snap.framework.datamodel.MetadataAttribute", "org.esa.snap.framework.datamodel.MetadataElement" ]
import org.esa.snap.framework.datamodel.MetadataAttribute; import org.esa.snap.framework.datamodel.MetadataElement;
import org.esa.snap.framework.datamodel.*;
[ "org.esa.snap" ]
org.esa.snap;
1,141,188
@Override public void putAll(Map<? extends K, ? extends V> m) { for (Entry<? extends K, ? extends V> e : m.entrySet()) { put(e.getKey(), e.getValue()); } } /** * Removes the key (and its corresponding value) from this map. This method * does nothing if the key is not in the ma...
@Override void function(Map<? extends K, ? extends V> m) { for (Entry<? extends K, ? extends V> e : m.entrySet()) { put(e.getKey(), e.getValue()); } } /** * Removes the key (and its corresponding value) from this map. This method * does nothing if the key is not in the map. * * @param key the key that needs to be remov...
/** * Copies all of the mappings from the specified map to this one. These * mappings replace any mappings that this map had for any of the keys * currently in the specified map. * * @param m mappings to be stored in this map */
Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified map
putAll
{ "repo_name": "olabini/ioke", "path": "src/ikj/main/com/google/common/collect/CustomConcurrentHashMap.java", "license": "mit", "size": 72117 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
782,318
@Auditable(parameters = {"pattern", "filterProps", "sortProps", "pagingRequest"}) public PagingResults<PersonInfo> getPeople(String pattern, List<QName> filterProps, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest);
@Auditable(parameters = {STR, STR, STR, STR}) PagingResults<PersonInfo> function(String pattern, List<QName> filterProps, List<Pair<QName, Boolean>> sortProps, PagingRequest pagingRequest);
/** * Get paged list of people optionally filtered and/or sorted * * Note: the pattern is applied to filter props (0 to 3) as startsWithIgnoreCase, which are OR'ed together, for example: cm:userName or cm:firstName or cm:lastName * * @param pattern pattern to apply to filter prop...
Get paged list of people optionally filtered and/or sorted Note: the pattern is applied to filter props (0 to 3) as startsWithIgnoreCase, which are OR'ed together, for example: cm:userName or cm:firstName or cm:lastName
getPeople
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/service/cmr/security/PersonService.java", "license": "lgpl-3.0", "size": 16306 }
[ "java.util.List", "org.alfresco.query.PagingRequest", "org.alfresco.query.PagingResults", "org.alfresco.service.Auditable", "org.alfresco.service.namespace.QName", "org.alfresco.util.Pair" ]
import java.util.List; import org.alfresco.query.PagingRequest; import org.alfresco.query.PagingResults; import org.alfresco.service.Auditable; import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair;
import java.util.*; import org.alfresco.query.*; import org.alfresco.service.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*;
[ "java.util", "org.alfresco.query", "org.alfresco.service", "org.alfresco.util" ]
java.util; org.alfresco.query; org.alfresco.service; org.alfresco.util;
1,214,116
public DisbursementPayee getPayeeFromVendor(VendorDetail vendorDetail);
DisbursementPayee function(VendorDetail vendorDetail);
/** * build a payee object from the given vendor object * * @param vendorDetail the given vendor object * @return a payee object built from the given vendor object */
build a payee object from the given vendor object
getPayeeFromVendor
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/service/DisbursementVoucherPayeeService.java", "license": "apache-2.0", "size": 4472 }
[ "org.kuali.kfs.fp.businessobject.DisbursementPayee", "org.kuali.kfs.vnd.businessobject.VendorDetail" ]
import org.kuali.kfs.fp.businessobject.DisbursementPayee; import org.kuali.kfs.vnd.businessobject.VendorDetail;
import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.vnd.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,539,378
static EventPosition fromEnqueuedTime(Instant dateTime) { return EventPositionImpl.fromEnqueuedTime(dateTime); }
static EventPosition fromEnqueuedTime(Instant dateTime) { return EventPositionImpl.fromEnqueuedTime(dateTime); }
/** * Creates a position at the given {@link Instant}. * * @param dateTime is the enqueued time of the event. * @return An {@link EventPosition} object. */
Creates a position at the given <code>Instant</code>
fromEnqueuedTime
{ "repo_name": "SreeramGarlapati/azure-event-hubs-java", "path": "azure-eventhubs/src/main/java/com/microsoft/azure/eventhubs/EventPosition.java", "license": "mit", "size": 3450 }
[ "com.microsoft.azure.eventhubs.impl.EventPositionImpl", "java.time.Instant" ]
import com.microsoft.azure.eventhubs.impl.EventPositionImpl; import java.time.Instant;
import com.microsoft.azure.eventhubs.impl.*; import java.time.*;
[ "com.microsoft.azure", "java.time" ]
com.microsoft.azure; java.time;
1,127,862
public synchronized Client client(final Predicate<Settings> filterPredicate) { ensureOpen(); final NodeAndClient randomNodeAndClient = getRandomNodeAndClient(nodeAndClient -> filterPredicate.test(nodeAndClient.node.settings())); if (randomNodeAndClient != null) { return randomNod...
synchronized Client function(final Predicate<Settings> filterPredicate) { ensureOpen(); final NodeAndClient randomNodeAndClient = getRandomNodeAndClient(nodeAndClient -> filterPredicate.test(nodeAndClient.node.settings())); if (randomNodeAndClient != null) { return randomNodeAndClient.client(random); } return null; }
/** * Returns a random node that applies to the given predicate. * The predicate can filter nodes based on the nodes settings. * If all nodes are filtered out this method will return <code>null</code> */
Returns a random node that applies to the given predicate. The predicate can filter nodes based on the nodes settings. If all nodes are filtered out this method will return <code>null</code>
client
{ "repo_name": "mapr/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java", "license": "apache-2.0", "size": 81328 }
[ "java.util.function.Predicate", "org.elasticsearch.client.Client", "org.elasticsearch.common.settings.Settings" ]
import java.util.function.Predicate; import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.Settings;
import java.util.function.*; import org.elasticsearch.client.*; import org.elasticsearch.common.settings.*;
[ "java.util", "org.elasticsearch.client", "org.elasticsearch.common" ]
java.util; org.elasticsearch.client; org.elasticsearch.common;
673,851
private boolean checkShowParameterPage( HttpServletRequest request ) { if ( !ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase( this.requestType ) && !IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase( request.getServletPath( ) ) ) { String showParameterPage = ParameterAccessor.getShowParam...
boolean function( HttpServletRequest request ) { if ( !ParameterAccessor.HEADER_REQUEST_TYPE_SOAP.equalsIgnoreCase( this.requestType ) && !IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase( request.getServletPath( ) ) ) { String showParameterPage = ParameterAccessor.getShowParameterPage( request ); if ( "false".equ...
/** * Check whether show parameter page or not * * @param request * @return */
Check whether show parameter page or not
checkShowParameterPage
{ "repo_name": "Charling-Huang/birt", "path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/context/ViewerAttributeBean.java", "license": "epl-1.0", "size": 33571 }
[ "javax.servlet.http.HttpServletRequest", "org.eclipse.birt.report.IBirtConstants", "org.eclipse.birt.report.utility.ParameterAccessor" ]
import javax.servlet.http.HttpServletRequest; import org.eclipse.birt.report.IBirtConstants; import org.eclipse.birt.report.utility.ParameterAccessor;
import javax.servlet.http.*; import org.eclipse.birt.report.*; import org.eclipse.birt.report.utility.*;
[ "javax.servlet", "org.eclipse.birt" ]
javax.servlet; org.eclipse.birt;
2,298,941
public ContentStream getContentStream(CMISNodeInfo info, String streamId, BigInteger offset, BigInteger length) { // get the type and check if the object can have content TypeDefinitionWrapper type = info.getType(); checkDocumentTypeForContent(type); // looks like a docume...
ContentStream function(CMISNodeInfo info, String streamId, BigInteger offset, BigInteger length) { TypeDefinitionWrapper type = info.getType(); checkDocumentTypeForContent(type); ContentStreamImpl result = new ContentStreamImpl(); result.setFileName(info.getName()); NodeRef streamNodeRef = info.getNodeRef(); if ((strea...
/** * Gets the content from the repository. */
Gets the content from the repository
getContentStream
{ "repo_name": "loftuxab/alfresco-community-loftux", "path": "projects/repository/source/java/org/alfresco/opencmis/CMISConnector.java", "license": "lgpl-3.0", "size": 153672 }
[ "java.math.BigInteger", "org.alfresco.model.ContentModel", "org.alfresco.opencmis.dictionary.CMISNodeInfo", "org.alfresco.opencmis.dictionary.CMISObjectVariant", "org.alfresco.opencmis.dictionary.TypeDefinitionWrapper", "org.alfresco.service.cmr.repository.ContentReader", "org.alfresco.service.cmr.repos...
import java.math.BigInteger; import org.alfresco.model.ContentModel; import org.alfresco.opencmis.dictionary.CMISNodeInfo; import org.alfresco.opencmis.dictionary.CMISObjectVariant; import org.alfresco.opencmis.dictionary.TypeDefinitionWrapper; import org.alfresco.service.cmr.repository.ContentReader; import org.alfres...
import java.math.*; import org.alfresco.model.*; import org.alfresco.opencmis.dictionary.*; import org.alfresco.service.cmr.repository.*; import org.apache.chemistry.opencmis.commons.data.*; import org.apache.chemistry.opencmis.commons.exceptions.*; import org.apache.chemistry.opencmis.commons.impl.dataobjects.*;
[ "java.math", "org.alfresco.model", "org.alfresco.opencmis", "org.alfresco.service", "org.apache.chemistry" ]
java.math; org.alfresco.model; org.alfresco.opencmis; org.alfresco.service; org.apache.chemistry;
599,258
public Object clone() { try { X509CRLSelector copy = (X509CRLSelector)super.clone(); if (issuerNames != null) { copy.issuerNames = new HashSet(); Iterator iter = issuerNames.iterator(); Object obj; ...
Object function() { try { X509CRLSelector copy = (X509CRLSelector)super.clone(); if (issuerNames != null) { copy.issuerNames = new HashSet(); Iterator iter = issuerNames.iterator(); Object obj; while (iter.hasNext()) { obj = iter.next(); if (obj instanceof byte[]) { copy.issuerNames.add(((byte[])obj).clone()); } else {...
/** * Returns a copy of this object. * * @return the copy */
Returns a copy of this object
clone
{ "repo_name": "sergeypayu/bc-java", "path": "core/src/main/jdk1.1/java/security/cert/X509CRLSelector.java", "license": "mit", "size": 23626 }
[ "java.util.HashSet", "java.util.Iterator" ]
import java.util.HashSet; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,752,026
public final boolean isIdle() { final TXStateInterface tx = getTXState(this.txState); if (tx != null) { return !tx.getProxy().hasOps(); } return this.state != ACTIVE; }
final boolean function() { final TXStateInterface tx = getTXState(this.txState); if (tx != null) { return !tx.getProxy().hasOps(); } return this.state != ACTIVE; }
/** * See if this transaction is in the idle state, called by other thread to * test the state of this transaction. * * @return true if it is idle, otherwise false */
See if this transaction is in the idle state, called by other thread to test the state of this transaction
isIdle
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/access/GemFireTransaction.java", "license": "apache-2.0", "size": 148971 }
[ "com.gemstone.gemfire.internal.cache.TXStateInterface" ]
import com.gemstone.gemfire.internal.cache.TXStateInterface;
import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
472,018
public void updateBinaryStream(String columnName, java.io.InputStream x, long length) throws SQLException { checkIfClosed("updateBinaryStream"); updateBinaryStream(findColumnName(columnName),x,length); }
void function(String columnName, java.io.InputStream x, long length) throws SQLException { checkIfClosed(STR); updateBinaryStream(findColumnName(columnName),x,length); }
/** * * JDBC 4.0 * * Update a column with a binary stream value. * * The updateXXX() methods are used to update column values in the current * row, or the insert row. The updateXXX() methods do not update the * underlying database, instead the updateRow() or insertRow() m...
JDBC 4.0 Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database
updateBinaryStream
{ "repo_name": "viaper/DBPlus", "path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java", "license": "apache-2.0", "size": 178663 }
[ "java.io.InputStream", "java.sql.SQLException" ]
import java.io.InputStream; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
348,591
public void serialize() throws IOException, FalconException { serialize(getContextFile()); }
void function() throws IOException, FalconException { serialize(getContextFile()); }
/** * this method is invoked from with in the workflow. * * @throws java.io.IOException * @throws org.apache.falcon.FalconException */
this method is invoked from with in the workflow
serialize
{ "repo_name": "pragya-mittal/falcon", "path": "common/src/main/java/org/apache/falcon/workflow/WorkflowExecutionContext.java", "license": "apache-2.0", "size": 18300 }
[ "java.io.IOException", "org.apache.falcon.FalconException" ]
import java.io.IOException; import org.apache.falcon.FalconException;
import java.io.*; import org.apache.falcon.*;
[ "java.io", "org.apache.falcon" ]
java.io; org.apache.falcon;
271,251
public Date getEffectiveEndDate() { if (conflict != null) { return conflict.getEnd() != null ? conflict.getEnd() : new Date(); } else { return getEndDate(); } }
Date function() { if (conflict != null) { return conflict.getEnd() != null ? conflict.getEnd() : new Date(); } else { return getEndDate(); } }
/** * This method returns the effective end date to be used which is: if the hypothesis uses a conflict either the end date of it doesn't have one today, if is * not based on a conflict then is end date defined * * @return The end date of the conflict (or today if none defined) or the end date if no...
This method returns the effective end date to be used which is: if the hypothesis uses a conflict either the end date of it doesn't have one today, if is not based on a conflict then is end date defined
getEffectiveEndDate
{ "repo_name": "pcasais/sid", "path": "src/main/java/com/damosais/sid/database/beans/CorrelationHypothesis.java", "license": "gpl-3.0", "size": 9162 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,869,252
public void testCertPathValidator10() throws NoSuchAlgorithmException, NoSuchProviderException { if (!PKIXSupport) { fail(NotSupportMsg); return; } CertPathValidator certPV; for (int i = 0; i < invalidValues.length; i++) { certPV = Cert...
void function() throws NoSuchAlgorithmException, NoSuchProviderException { if (!PKIXSupport) { fail(NotSupportMsg); return; } CertPathValidator certPV; for (int i = 0; i < invalidValues.length; i++) { certPV = CertPathValidator.getInstance(validValues[i], defaultProvider); assertEquals(STR, certPV.getAlgorithm(), valid...
/** * Test for <code>getInstance(String algorithm, String provider)</code> method * Assertion: returns CertPathValidator object */
Test for <code>getInstance(String algorithm, String provider)</code> method Assertion: returns CertPathValidator object
testCertPathValidator10
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "luni/src/test/java/tests/security/cert/CertPathValidator1Test.java", "license": "gpl-2.0", "size": 16828 }
[ "java.security.NoSuchAlgorithmException", "java.security.NoSuchProviderException", "java.security.cert.CertPathValidator" ]
import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.cert.CertPathValidator;
import java.security.*; import java.security.cert.*;
[ "java.security" ]
java.security;
2,320,168
@Test public void testException() { runTest(EXCEPTION, false, false, ProposalState.DOCUMENT_ERROR, ProposalState.DOCUMENT_ERROR); runTest(EXCEPTION, true, false, ProposalState.DOCUMENT_ERROR, ProposalState.DOCUMENT_ERROR ); }
void function() { runTest(EXCEPTION, false, false, ProposalState.DOCUMENT_ERROR, ProposalState.DOCUMENT_ERROR); runTest(EXCEPTION, true, false, ProposalState.DOCUMENT_ERROR, ProposalState.DOCUMENT_ERROR ); }
/** * If the proposal encounters an exception, it remains in the document error state under all conditions. */
If the proposal encounters an exception, it remains in the document error state under all conditions
testException
{ "repo_name": "jwillia/kc-old1", "path": "coeus-it/src/test/java/org/kuali/kra/proposaldevelopment/service/ProposalStateServiceTest.java", "license": "agpl-3.0", "size": 11256 }
[ "org.kuali.coeus.propdev.impl.state.ProposalState" ]
import org.kuali.coeus.propdev.impl.state.ProposalState;
import org.kuali.coeus.propdev.impl.state.*;
[ "org.kuali.coeus" ]
org.kuali.coeus;
208,717
public static String getValue(PioNodeParent context, PropertyDescriptor pd) { return getValue(context, pd.getName()); }
static String function(PioNodeParent context, PropertyDescriptor pd) { return getValue(context, pd.getName()); }
/** * Gets the first (or only) value of the first (or only) Param identified * by <code>pd</code> (rooted at <code>context</code>). If there is no * such node, or if the <code>pd</code> identifies a node that is not a * <code>Param</code>, then <code>null</code> is returned. * * @param co...
Gets the first (or only) value of the first (or only) Param identified by <code>pd</code> (rooted at <code>context</code>). If there is no such node, or if the <code>pd</code> identifies a node that is not a <code>Param</code>, then <code>null</code> is returned
getValue
{ "repo_name": "arturog8m/ocs", "path": "bundle/edu.gemini.spModel.pio/src/main/java/edu/gemini/spModel/pio/Pio.java", "license": "bsd-3-clause", "size": 22329 }
[ "java.beans.PropertyDescriptor" ]
import java.beans.PropertyDescriptor;
import java.beans.*;
[ "java.beans" ]
java.beans;
754,734
public static long toLongUnsafe(byte[] bytes, int offset) { if (UnsafeComparer.littleEndian) { return Long.reverseBytes(UnsafeComparer.theUnsafe.getLong(bytes, (long) offset + UnsafeComparer.BYTE_ARRAY_BASE_OFFSET)); } else { return UnsafeComparer.theUnsafe.getLong(bytes, (long) of...
static long function(byte[] bytes, int offset) { if (UnsafeComparer.littleEndian) { return Long.reverseBytes(UnsafeComparer.theUnsafe.getLong(bytes, (long) offset + UnsafeComparer.BYTE_ARRAY_BASE_OFFSET)); } else { return UnsafeComparer.theUnsafe.getLong(bytes, (long) offset + UnsafeComparer.BYTE_ARRAY_BASE_OFFSET); } ...
/** * Converts a byte array to an long value (Unsafe version) * @param bytes byte array * @param offset offset into array * @return the long value */
Converts a byte array to an long value (Unsafe version)
toLongUnsafe
{ "repo_name": "narendragoyal/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java", "license": "apache-2.0", "size": 83731 }
[ "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,744,233
public ActionForward viewAwardCommentHistory(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { AwardForm awardForm = (AwardForm) form; String awardCommentTypeCode = request.getParameter("awardCommentTypeCode"); St...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { AwardForm awardForm = (AwardForm) form; String awardCommentTypeCode = request.getParameter(STR); String awardId = request.getParameter(STR); awardForm.setAwardCommentHistoryByType(...
/** * * This method is for the 'view history' button. It will be forwarded AwardCommentHistory.jsp * * @param mapping * @param form * @param request * @param response * @return * @throws Exception */
This method is for the 'view history' button. It will be forwarded AwardCommentHistory.jsp
viewAwardCommentHistory
{ "repo_name": "kuali/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/award/web/struts/action/AwardNotesAndAttachmentsAction.java", "license": "agpl-3.0", "size": 17076 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kra.award.AwardForm" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kra.award.AwardForm;
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kra.award.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.kra" ]
javax.servlet; org.apache.struts; org.kuali.kra;
2,014,006
PushResponse push(PushRequest request) throws GitException, UnauthorizedException;
PushResponse push(PushRequest request) throws GitException, UnauthorizedException;
/** * Send changes from local repository to remote one. * * @param request * push request * @throws GitException * if any error occurs * @throws IllegalArgumentException * if remote configuration is invalid * @see PushRequest */
Send changes from local repository to remote one
push
{ "repo_name": "kaloyan-raev/che", "path": "wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java", "license": "epl-1.0", "size": 15936 }
[ "org.eclipse.che.api.core.UnauthorizedException", "org.eclipse.che.api.git.exception.GitException", "org.eclipse.che.api.git.shared.PushRequest", "org.eclipse.che.api.git.shared.PushResponse" ]
import org.eclipse.che.api.core.UnauthorizedException; import org.eclipse.che.api.git.exception.GitException; import org.eclipse.che.api.git.shared.PushRequest; import org.eclipse.che.api.git.shared.PushResponse;
import org.eclipse.che.api.core.*; import org.eclipse.che.api.git.exception.*; import org.eclipse.che.api.git.shared.*;
[ "org.eclipse.che" ]
org.eclipse.che;
901,491
public Path getDataTestDirOnTestFS() throws IOException { if (dataTestDirOnTestFS == null) { setupDataTestDirOnTestFS(); } return dataTestDirOnTestFS; }
Path function() throws IOException { if (dataTestDirOnTestFS == null) { setupDataTestDirOnTestFS(); } return dataTestDirOnTestFS; }
/** * Returns a Path in the test filesystem, obtained from {@link #getTestFileSystem()} to write * temporary test data. Call this method after setting up the mini dfs cluster if the test relies * on it. * @return a unique path in the test filesystem */
Returns a Path in the test filesystem, obtained from <code>#getTestFileSystem()</code> to write temporary test data. Call this method after setting up the mini dfs cluster if the test relies on it
getDataTestDirOnTestFS
{ "repo_name": "ndimiduk/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java", "license": "apache-2.0", "size": 151074 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
756,801
public void pad(int width) throws IOException { int gap = (int)this.nrBits % width; if (gap < 0) { gap += width; } if (gap != 0) { int padding = width - gap; while (padding > 0) { this.zero(); padding -= 1; ...
void function(int width) throws IOException { int gap = (int)this.nrBits % width; if (gap < 0) { gap += width; } if (gap != 0) { int padding = width - gap; while (padding > 0) { this.zero(); padding -= 1; } } this.out.flush(); }
/** * Pad the rest of the block with zeros and flush. pad(8) flushes the last * unfinished byte. The underlying OutputStream will be flushed. * * @param width * The size of the block to pad in bits. * This will typically be 8, 16, 32, 64, 128, 256, etc. * @throws...
Pad the rest of the block with zeros and flush. pad(8) flushes the last unfinished byte. The underlying OutputStream will be flushed
pad
{ "repo_name": "ferranti/planetcrypto_bitcoin", "path": "src/org/json/zip/BitOutputStream.java", "license": "mit", "size": 5480 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,336,330
private Markup loadMarkupAndWatchForChanges(final MarkupContainer container, final MarkupResourceStream markupResourceStream, final boolean enforceReload) { // @TODO the following code sequence looks very much like in loadMarkup. Can it be // optimized? final String cacheKey = markupResourceStream.getCacheK...
Markup function(final MarkupContainer container, final MarkupResourceStream markupResourceStream, final boolean enforceReload) { final String cacheKey = markupResourceStream.getCacheKey(); if (cacheKey != null) { if (enforceReload == false) { String locationString = markupResourceStream.locationAsString(); if (location...
/** * Load markup from an IResourceStream and add an {@link IChangeListener}to the * {@link ModificationWatcher} so that if the resource changes, we can remove it from the cache * automatically and subsequently reload when needed. * * @param container * The original requesting markup container ...
Load markup from an IResourceStream and add an <code>IChangeListener</code>to the <code>ModificationWatcher</code> so that if the resource changes, we can remove it from the cache automatically and subsequently reload when needed
loadMarkupAndWatchForChanges
{ "repo_name": "mosoft521/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/markup/MarkupCache.java", "license": "apache-2.0", "size": 19935 }
[ "org.apache.wicket.MarkupContainer" ]
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,246,264
@Test public void copyProfileTest() throws ApiException { String id = null; String factoryId = null; CopyProfileBody copyProfileBody = null; Boolean expand = null; Profile response = api.copyProfile(id, factoryId, copyProfileBody, expand); // TODO: test validatio...
void function() throws ApiException { String id = null; String factoryId = null; CopyProfileBody copyProfileBody = null; Boolean expand = null; Profile response = api.copyProfile(id, factoryId, copyProfileBody, expand); }
/** * Copies a given Profile * * * * @throws ApiException * if the Api call fails */
Copies a given Profile
copyProfileTest
{ "repo_name": "Telestream/telestream-cloud-java-sdk", "path": "telestream-cloud-flip-sdk/src/test/java/net/telestream/cloud/flip/FlipApiTest.java", "license": "mit", "size": 19356 }
[ "net.telestream.cloud.flip.ApiException", "net.telestream.cloud.flip.CopyProfileBody", "net.telestream.cloud.flip.Profile" ]
import net.telestream.cloud.flip.ApiException; import net.telestream.cloud.flip.CopyProfileBody; import net.telestream.cloud.flip.Profile;
import net.telestream.cloud.flip.*;
[ "net.telestream.cloud" ]
net.telestream.cloud;
2,351,299
@Nullable() Double getQueueTimeMillis();
@Nullable() Double getQueueTimeMillis();
/** * Retrieves the length of time in milliseconds the operation was required to * wait on the work queue. * * @return The length of time in milliseconds the operation was required to * wait on the work queue, or {@code null} if it is not included in * the log message. */
Retrieves the length of time in milliseconds the operation was required to wait on the work queue
getQueueTimeMillis
{ "repo_name": "UnboundID/ldapsdk", "path": "src/com/unboundid/ldap/sdk/unboundidds/logs/MinimalOperationResultAccessLogMessage.java", "license": "gpl-2.0", "size": 4509 }
[ "com.unboundid.util.Nullable" ]
import com.unboundid.util.Nullable;
import com.unboundid.util.*;
[ "com.unboundid.util" ]
com.unboundid.util;
776,103
@Override public void exitGreaterThanExpression(@NotNull BramsprParser.GreaterThanExpressionContext ctx) { }
@Override public void exitGreaterThanExpression(@NotNull BramsprParser.GreaterThanExpressionContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
enterGreaterThanExpression
{ "repo_name": "bcleenders/Bramspr", "path": "src/bramspr/BramsprBaseListener.java", "license": "mit", "size": 21948 }
[ "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,277,617
private void init() throws IOException { projectBuildFileParseEventStarted = new ProjectBuildFileParseEvents.Started(); buckEventBus.post(projectBuildFileParseEventStarted); try (SimplePerfEvent.Scope scope = SimplePerfEvent.scope( buckEventBus, PerfEventId.of("ParserInit"))) { Proc...
void function() throws IOException { projectBuildFileParseEventStarted = new ProjectBuildFileParseEvents.Started(); buckEventBus.post(projectBuildFileParseEventStarted); try (SimplePerfEvent.Scope scope = SimplePerfEvent.scope( buckEventBus, PerfEventId.of(STR))) { ProcessExecutorParams params = ProcessExecutorParams.b...
/** * Initialize the parser, starting buck.py. */
Initialize the parser, starting buck.py
init
{ "repo_name": "OkBuilds/buck", "path": "src/com/facebook/buck/json/ProjectBuildFileParser.java", "license": "apache-2.0", "size": 22644 }
[ "com.facebook.buck.event.PerfEventId", "com.facebook.buck.event.SimplePerfEvent", "com.facebook.buck.util.ProcessExecutorParams", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import com.facebook.buck.event.PerfEventId; import com.facebook.buck.event.SimplePerfEvent; import com.facebook.buck.util.ProcessExecutorParams; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import com.facebook.buck.event.*; import com.facebook.buck.util.*; import java.io.*;
[ "com.facebook.buck", "java.io" ]
com.facebook.buck; java.io;
2,120,760