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 createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NULL);
setControl(container);
| void function(Composite parent) { Composite container = new Composite(parent, SWT.NULL); setControl(container); | /**
* Create contents of the wizard.
*
* @param parent
*/ | Create contents of the wizard | createControl | {
"repo_name": "asposewords/Aspose_Words_Java",
"path": "Plugins/Aspose_Words_Java_for_Eclipse_Maven/AsposeWordsEclipsePlugin/src/com/aspose/words/maven/examples/AsposeExampleWizardPage.java",
"license": "mit",
"size": 11128
} | [
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.swt.widgets.Composite; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,606,241 |
public void setSwitchId(String switchId) {
if (switchId == null) {
throw new IllegalArgumentException("need to set a switch_id");
} else if (!Utils.validateSwitchId(switchId)) {
throw new IllegalArgumentException("need to set valid value for switch_id");
}
thi... | void function(String switchId) { if (switchId == null) { throw new IllegalArgumentException(STR); } else if (!Utils.validateSwitchId(switchId)) { throw new IllegalArgumentException(STR); } this.switchId = switchId; } | /**
* Sets id of the switch.
*
* @param switchId of the switch
*/ | Sets id of the switch | setSwitchId | {
"repo_name": "nikitamarchenko/open-kilda",
"path": "services/src/messaging/src/main/java/org/openkilda/messaging/command/flow/BaseFlow.java",
"license": "apache-2.0",
"size": 4243
} | [
"org.openkilda.messaging.Utils"
] | import org.openkilda.messaging.Utils; | import org.openkilda.messaging.*; | [
"org.openkilda.messaging"
] | org.openkilda.messaging; | 373,589 |
protected long createRootNode(Txn transaction) throws IOException {
BTreeNode root = createBTreeNode(transaction, LEAF, null, true);
setRootNode(root);
return root.page.getPageNum();
} | long function(Txn transaction) throws IOException { BTreeNode root = createBTreeNode(transaction, LEAF, null, true); setRootNode(root); return root.page.getPageNum(); } | /**
* Create the root node.
*
* @param transaction
* @return The root node
* @throws IOException
*/ | Create the root node | createRootNode | {
"repo_name": "kingargyle/exist-1.4.x",
"path": "src/org/exist/storage/btree/BTree.java",
"license": "lgpl-2.1",
"size": 95097
} | [
"java.io.IOException",
"org.exist.storage.txn.Txn"
] | import java.io.IOException; import org.exist.storage.txn.Txn; | import java.io.*; import org.exist.storage.txn.*; | [
"java.io",
"org.exist.storage"
] | java.io; org.exist.storage; | 2,486,150 |
return new ClientBuilderImpl();
} | return new ClientBuilderImpl(); } | /**
* Get a new builder instance that can used to configure and build a {@link PulsarClient} instance.
*
* @return the {@link ClientBuilder}
*
* @since 2.0.0
*/ | Get a new builder instance that can used to configure and build a <code>PulsarClient</code> instance | builder | {
"repo_name": "sschepens/pulsar",
"path": "pulsar-client/src/main/java/org/apache/pulsar/client/api/PulsarClient.java",
"license": "apache-2.0",
"size": 14497
} | [
"org.apache.pulsar.client.impl.ClientBuilderImpl"
] | import org.apache.pulsar.client.impl.ClientBuilderImpl; | import org.apache.pulsar.client.impl.*; | [
"org.apache.pulsar"
] | org.apache.pulsar; | 318,501 |
@Test(timeout = 30000, expected=IllegalStateException.class)
public void testCreateBrowserOnTopicSession() throws JMSException {
topicSession.createBrowser(queue);
} | @Test(timeout = 30000, expected=IllegalStateException.class) void function() throws JMSException { topicSession.createBrowser(queue); } | /**
* Test that a call to <code>createBrowser()</code> method
* on a <code>TopicSession</code> throws a
* <code>javax.jms.IllegalStateException</code>.
* (see JMS 1.1 specs, table 4-1).
*
* @since JMS 1.1
*/ | Test that a call to <code>createBrowser()</code> method on a <code>TopicSession</code> throws a <code>javax.jms.IllegalStateException</code>. (see JMS 1.1 specs, table 4-1) | testCreateBrowserOnTopicSession | {
"repo_name": "avranju/qpid-jms",
"path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/session/JmsTopicSessionTest.java",
"license": "apache-2.0",
"size": 5476
} | [
"javax.jms.IllegalStateException",
"javax.jms.JMSException",
"org.junit.Test"
] | import javax.jms.IllegalStateException; import javax.jms.JMSException; import org.junit.Test; | import javax.jms.*; import org.junit.*; | [
"javax.jms",
"org.junit"
] | javax.jms; org.junit; | 1,203,777 |
public void stop(final BundleContext context) throws Exception {
super.stop(context);
plugin = null;
}
| void function(final BundleContext context) throws Exception { super.stop(context); plugin = null; } | /**
* This method is called when the plug-in is stopped
*/ | This method is called when the plug-in is stopped | stop | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.debrief.track_shift/src/org/mwc/debrief/track_shift/TrackShiftActivator.java",
"license": "epl-1.0",
"size": 1927
} | [
"org.osgi.framework.BundleContext"
] | import org.osgi.framework.BundleContext; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 1,991,929 |
public static Animation inFromRightAnimation(long duration, Interpolator interpolator) {
Animation inFromRight = new TranslateAnimation(
Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f,
Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f
);
inFromRight.s... | static Animation function(long duration, Interpolator interpolator) { Animation inFromRight = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f ); inFromRight.setDuration(duration); inFromRight.setInter... | /**
* Slide animations to enter a view from right.
*
* @param duration the animation duration in milliseconds
* @param interpolator the interpolator to use (pass {@code null} to use the {@link AccelerateInterpolator} interpolator)
* @return a slide transition animation
*/ | Slide animations to enter a view from right | inFromRightAnimation | {
"repo_name": "adiguzel/wordwise",
"path": "src/com/tekle/oss/android/animation/AnimationFactory.java",
"license": "apache-2.0",
"size": 15184
} | [
"android.view.animation.AccelerateInterpolator",
"android.view.animation.Animation",
"android.view.animation.Interpolator",
"android.view.animation.TranslateAnimation"
] | import android.view.animation.AccelerateInterpolator; import android.view.animation.Animation; import android.view.animation.Interpolator; import android.view.animation.TranslateAnimation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 1,620,906 |
public static Set<ThreadGroup> getGroups()
{
return getGroups(currentGroup(), null);
}
/**
* Returns a possibly empty set of thread groups that are immediate descendants of
* the specified thread group.
*
* @param parent The group to obtain descendant groups from
* @throws NullPoi... | static Set<ThreadGroup> function() { return getGroups(currentGroup(), null); } /** * Returns a possibly empty set of thread groups that are immediate descendants of * the specified thread group. * * @param parent The group to obtain descendant groups from * @throws NullPointerException If the thread group is {@code nul... | /**
* Returns a possibly empty set of thread groups that are immediate descendants
* of the current thread's thread group.
*/ | Returns a possibly empty set of thread groups that are immediate descendants of the current thread's thread group | getGroups | {
"repo_name": "cfloersch/Stdlib",
"path": "src/main/java/xpertss/threads/Threads.java",
"license": "gpl-2.0",
"size": 20495
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,688,813 |
public interface DragScrollProfile {
float getSpeed(float w, long t);
}
private class DragScroller implements Runnable, AbsListView.OnScrollListener {
private boolean mAbort;
private long mPrevTime;
private int dy;
private float dt;
private long... | interface DragScrollProfile { float function(float w, long t); } private class DragScroller implements Runnable, AbsListView.OnScrollListener { private boolean mAbort; private long mPrevTime; private int dy; private float dt; private long tStart; private int scrollDir; public final static int STOP = -1; public final st... | /**
* Return a scroll speed in pixels/millisecond. Always return a positive
* number.
*
* @param w Normalized position in scroll region (i.e. w \in [0,1]).
* Small w typically means slow scrolling.
* @param t Time (in milliseconds) since start of scroll ... | Return a scroll speed in pixels/millisecond. Always return a positive number | getSpeed | {
"repo_name": "Chonlakant/frostwire-android",
"path": "apollo/src/com/andrew/apollo/dragdrop/DragSortListView.java",
"license": "gpl-3.0",
"size": 68906
} | [
"android.widget.AbsListView"
] | import android.widget.AbsListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 511,047 |
public static boolean checkIfDiffIsLegal(SolrDocumentList a,
SolrDocumentList b, String aName, String bName, Set<String> bAddFails,
Set<String> bDeleteFails) {
boolean legal = true;
Set<Map> setA = new HashSet<>();
for (SolrDocument sdoc : a) {
setA.add(new HashMap(sdoc));
}
... | static boolean function(SolrDocumentList a, SolrDocumentList b, String aName, String bName, Set<String> bAddFails, Set<String> bDeleteFails) { boolean legal = true; Set<Map> setA = new HashSet<>(); for (SolrDocument sdoc : a) { setA.add(new HashMap(sdoc)); } Set<Map> setB = new HashSet<>(); for (SolrDocument sdoc : b) ... | /**
* When a and b are known to be different, this method tells if the difference
* is legal given the adds and deletes that failed from b.
*
* @param a first list of docs
* @param b second list of docs
* @param aName label for first list of docs
* @param bName label for second list of docs
* ... | When a and b are known to be different, this method tells if the difference is legal given the adds and deletes that failed from b | checkIfDiffIsLegal | {
"repo_name": "williamchengit/TestRepo",
"path": "solr/test-framework/src/java/org/apache/solr/cloud/CloudInspectUtil.java",
"license": "apache-2.0",
"size": 8346
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.apache.solr.common.SolrDocument",
"org.apache.solr.common.SolrDocumentList"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.solr.common.SolrDocument; import org.apache.solr.common.SolrDocumentList; | import java.util.*; import org.apache.solr.common.*; | [
"java.util",
"org.apache.solr"
] | java.util; org.apache.solr; | 2,682,834 |
@Override
public void onAudioFocusChange(final int focusChange) {
if (DEBUG) {
Log.d(TAG, "StreamHandler.onAudioFocusChange() with " + focusChange);
}
if (mMediaPlayer != null) {
final float duckVolume = 0.2f;
switch (focusChange) {
c... | void function(final int focusChange) { if (DEBUG) { Log.d(TAG, STR + focusChange); } if (mMediaPlayer != null) { final float duckVolume = 0.2f; switch (focusChange) { case AudioManager.AUDIOFOCUS_GAIN: if (mMediaPlayer.isPlaying()) { if (DEBUG) { Log.d(TAG, STR); } mMediaPlayer.setVolume(1.0f, 1.0f); } else if (!mPrepa... | /**
* Handle the change of volume if a notification, or any other kind of
* interrupting audio event.
*
* @param focusChange The type of focus change.
*/ | Handle the change of volume if a notification, or any other kind of interrupting audio event | onAudioFocusChange | {
"repo_name": "jcnoir/dmix",
"path": "MPDroid/src/main/java/com/namelessdev/mpdroid/service/StreamHandler.java",
"license": "apache-2.0",
"size": 25147
} | [
"android.media.AudioManager",
"android.util.Log",
"com.namelessdev.mpdroid.helpers.MPDControl"
] | import android.media.AudioManager; import android.util.Log; import com.namelessdev.mpdroid.helpers.MPDControl; | import android.media.*; import android.util.*; import com.namelessdev.mpdroid.helpers.*; | [
"android.media",
"android.util",
"com.namelessdev.mpdroid"
] | android.media; android.util; com.namelessdev.mpdroid; | 2,850,982 |
void access(final Path path, final Set<AccessMode> mode) throws AccessControlException, FileNotFoundException, IOException; | void access(final Path path, final Set<AccessMode> mode) throws AccessControlException, FileNotFoundException, IOException; | /**
* Checks if the path designated by {@code path} is accessible for the
* given {@code mode}.
*
* @param path the path to check access
* @param mode the access mode
* @throws AccessControlException if the current user is not allowed to access the patg.
* @throws FileNotFoundException the the path... | Checks if the path designated by path is accessible for the given mode | access | {
"repo_name": "dremio/dremio-oss",
"path": "common/src/main/java/com/dremio/io/file/FileSystem.java",
"license": "apache-2.0",
"size": 12923
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.nio.file.AccessMode",
"java.security.AccessControlException",
"java.util.Set"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.AccessMode; import java.security.AccessControlException; import java.util.Set; | import java.io.*; import java.nio.file.*; import java.security.*; import java.util.*; | [
"java.io",
"java.nio",
"java.security",
"java.util"
] | java.io; java.nio; java.security; java.util; | 744,959 |
public void setNonARRenderer(OpenGLRenderer customRenderer) {
renderer.setNonARRenderer(customRenderer);
}
| void function(OpenGLRenderer customRenderer) { renderer.setNonARRenderer(customRenderer); } | /**
* Set a renderer that draws non AR stuff. Optional, may be set to null or omited.
* and setups lighting stuff.
* @param customRenderer
*/ | Set a renderer that draws non AR stuff. Optional, may be set to null or omited. and setups lighting stuff | setNonARRenderer | {
"repo_name": "Turupawn/LuxxorAR",
"path": "src/edu/dhbw/andar/AndARActivity.java",
"license": "gpl-3.0",
"size": 10295
} | [
"edu.dhbw.andar.interfaces.OpenGLRenderer"
] | import edu.dhbw.andar.interfaces.OpenGLRenderer; | import edu.dhbw.andar.interfaces.*; | [
"edu.dhbw.andar"
] | edu.dhbw.andar; | 1,026,169 |
protected boolean isCppCheckEnabled( boolean quiet )
{
if ( cppCheck.getSkip() )
{
if ( ! quiet )
{
getLog().info( CppCheckConfiguration.SKIP_MESSAGE
+ ", 'skip' set to true in the " + CppCheckConfiguration.TOOL_NAME + " configura... | boolean function( boolean quiet ) { if ( cppCheck.getSkip() ) { if ( ! quiet ) { getLog().info( CppCheckConfiguration.SKIP_MESSAGE + STR + CppCheckConfiguration.TOOL_NAME + STR ); } return false; } if ( cppCheck.getCppCheckPath() == null ) { if ( ! quiet ) { getLog().info( CppCheckConfiguration.SKIP_MESSAGE + STR + Cpp... | /**
* Determine whether CppCheck is enabled by the configuration
* @param quiet set to true to suppress logging
* @return true if CppCheck is enabled, false otherwise
*/ | Determine whether CppCheck is enabled by the configuration | isCppCheckEnabled | {
"repo_name": "andi12/msbuild-maven-plugin",
"path": "msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java",
"license": "apache-2.0",
"size": 28963
} | [
"uk.org.raje.maven.plugin.msbuild.configuration.CppCheckConfiguration"
] | import uk.org.raje.maven.plugin.msbuild.configuration.CppCheckConfiguration; | import uk.org.raje.maven.plugin.msbuild.configuration.*; | [
"uk.org.raje"
] | uk.org.raje; | 72,783 |
if(StringUtils.isNotEmpty(dateComparison)) {
for (DateComparison d : DateComparison.values()) {
if (dateComparison.equalsIgnoreCase(d.getDateComparison())) {
return d;
}
}
}
throw new IllegalArgumentException("No date comparison found with value: " + dateComparison);
} | if(StringUtils.isNotEmpty(dateComparison)) { for (DateComparison d : DateComparison.values()) { if (dateComparison.equalsIgnoreCase(d.getDateComparison())) { return d; } } } throw new IllegalArgumentException(STR + dateComparison); } | /**
* Gets the enumeration from a string value.
* @param dateComparison The value to look up.
* @return A {@link DateComparison comparison}.
*/ | Gets the enumeration from a string value | fromValue | {
"repo_name": "mtnfog/entity-query-language",
"path": "eql-filters/src/main/java/ai/idylnlp/eql/filters/comparisons/DateComparison.java",
"license": "apache-2.0",
"size": 2327
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,616,656 |
protected void executeQueryPlan(Date date, Timestamp timestamp, double discount, int quantity) throws SQLException {
Log.getLogWriter().info("Getting query plan for " + queryName + " with date=" + date + ", timestamp=" + timestamp + ", discount=" + discount + ", quantity=" + quantity);
if (preparedQueryPlanSt... | void function(Date date, Timestamp timestamp, double discount, int quantity) throws SQLException { Log.getLogWriter().info(STR + queryName + STR + date + STR + timestamp + STR + discount + STR + quantity); if (preparedQueryPlanStmt == null) { preparedQueryPlanStmt = this.connection.prepareStatement(STR + query); } prep... | /** Execute a query to obtain a query plan with the given query argument
*
* @param date Date parameter for this query.
* @param timestamp The timestamp that is equivalent to date.
* @param discount Discount parameter for this query.
* @param quantity Quantity parameter for this query.
* @throws SQLE... | Execute a query to obtain a query plan with the given query argument | executeQueryPlan | {
"repo_name": "papicella/snappy-store",
"path": "tests/sql/src/main/java/gfxdperf/tpch/AbstractQ6.java",
"license": "apache-2.0",
"size": 6940
} | [
"java.math.BigDecimal",
"java.sql.Date",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Timestamp"
] | import java.math.BigDecimal; import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; | import java.math.*; import java.sql.*; | [
"java.math",
"java.sql"
] | java.math; java.sql; | 788,195 |
private void getSpecs(Path directory, Collection<Spec> specs) throws Exception {
FileStatus[] fileStatuses = fs.listStatus(directory);
for (FileStatus fileStatus : fileStatuses) {
if (fileStatus.isDirectory()) {
getSpecs(fileStatus.getPath(), specs);
} else {
try {
specs.... | void function(Path directory, Collection<Spec> specs) throws Exception { FileStatus[] fileStatuses = fs.listStatus(directory); for (FileStatus fileStatus : fileStatuses) { if (fileStatus.isDirectory()) { getSpecs(fileStatus.getPath(), specs); } else { try { specs.add(readSpecFromFile(fileStatus.getPath())); } catch (Ex... | /**
* For multiple {@link FlowSpec}s to be loaded, catch Exceptions when one of them failed to be loaded and
* continue with the rest.
*
* The {@link IOException} thrown from standard FileSystem call will be propagated, while the file-specific
* exception will be caught to ensure other files being able t... | For multiple <code>FlowSpec</code>s to be loaded, catch Exceptions when one of them failed to be loaded and continue with the rest. The <code>IOException</code> thrown from standard FileSystem call will be propagated, while the file-specific exception will be caught to ensure other files being able to deserialized | getSpecs | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_store/FSSpecStore.java",
"license": "apache-2.0",
"size": 12885
} | [
"java.util.Collection",
"org.apache.gobblin.runtime.api.Spec",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path"
] | import java.util.Collection; import org.apache.gobblin.runtime.api.Spec; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; | import java.util.*; import org.apache.gobblin.runtime.api.*; import org.apache.hadoop.fs.*; | [
"java.util",
"org.apache.gobblin",
"org.apache.hadoop"
] | java.util; org.apache.gobblin; org.apache.hadoop; | 2,224,873 |
public static String collectCodePoint(String string, CodePointFunction function)
{
int size = string.length();
StringBuilder builder = new StringBuilder(size);
for (int i = 0; i < size; )
{
int codePoint = string.codePointAt(i);
builder.appendCodePoint(fun... | static String function(String string, CodePointFunction function) { int size = string.length(); StringBuilder builder = new StringBuilder(size); for (int i = 0; i < size; ) { int codePoint = string.codePointAt(i); builder.appendCodePoint(function.valueOf(codePoint)); i += Character.charCount(codePoint); } return builde... | /**
* Transform the int code point elements to a new string using the specified function {@code function}.
*
* @since 7.0
*/ | Transform the int code point elements to a new string using the specified function function | collectCodePoint | {
"repo_name": "bhav0904/eclipse-collections",
"path": "eclipse-collections/src/main/java/org/eclipse/collections/impl/utility/StringIterate.java",
"license": "bsd-3-clause",
"size": 43992
} | [
"org.eclipse.collections.impl.block.function.primitive.CodePointFunction"
] | import org.eclipse.collections.impl.block.function.primitive.CodePointFunction; | import org.eclipse.collections.impl.block.function.primitive.*; | [
"org.eclipse.collections"
] | org.eclipse.collections; | 2,227,512 |
void reverseForEachWithIndex(ObjectIntProcedure<? super T> procedure); | void reverseForEachWithIndex(ObjectIntProcedure<? super T> procedure); | /**
* Evaluates the procedure for each element and it's index in reverse order.
* <pre>e.g.
* people.reverseForEachWithIndex((person, index) ->
* LOGGER.info("Index: " + index + " person: " + person.getName()));
* </pre>
*
* @since 9.0.0
*/ | Evaluates the procedure for each element and it's index in reverse order. <code>e.g. people.reverseForEachWithIndex((person, index) -> LOGGER.info("Index: " + index + " person: " + person.getName())); </code> | reverseForEachWithIndex | {
"repo_name": "bhav0904/eclipse-collections",
"path": "eclipse-collections-api/src/main/java/org/eclipse/collections/api/ordered/ReversibleIterable.java",
"license": "bsd-3-clause",
"size": 7851
} | [
"org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure"
] | import org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure; | import org.eclipse.collections.api.block.procedure.primitive.*; | [
"org.eclipse.collections"
] | org.eclipse.collections; | 2,481,530 |
boolean createCollection(String name)
throws EXistException, PermissionDeniedException; | boolean createCollection(String name) throws EXistException, PermissionDeniedException; | /**
* Create a new collection on the database.
*
* @param name the path to the new collection.
* @return
* @throws EXistException
* @throws PermissionDeniedException
*/ | Create a new collection on the database | createCollection | {
"repo_name": "olvidalo/exist",
"path": "exist-core/src/main/java/org/exist/xmlrpc/RpcAPI.java",
"license": "lgpl-2.1",
"size": 39990
} | [
"org.exist.EXistException",
"org.exist.security.PermissionDeniedException"
] | import org.exist.EXistException; import org.exist.security.PermissionDeniedException; | import org.exist.*; import org.exist.security.*; | [
"org.exist",
"org.exist.security"
] | org.exist; org.exist.security; | 1,965,570 |
static Predicate<RoleMapperExpression> predicate(ExpressionModel map) {
return expr -> expr.match(map);
} | static Predicate<RoleMapperExpression> predicate(ExpressionModel map) { return expr -> expr.match(map); } | /**
* Creates an <em>inverted</em> predicate that can test whether an expression matches
* a fixed object. Its purpose is for cases where there is a {@link java.util.stream.Stream} of
* expressions, that need to be filtered against a single map.
*/ | Creates an inverted predicate that can test whether an expression matches a fixed object. Its purpose is for cases where there is a <code>java.util.stream.Stream</code> of expressions, that need to be filtered against a single map | predicate | {
"repo_name": "jmluy/elasticsearch",
"path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/expressiondsl/RoleMapperExpression.java",
"license": "apache-2.0",
"size": 1507
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 607,870 |
protected void scanAttribute(XMLAttributesImpl attributes)
throws IOException, XNIException {
if (DEBUG_START_END_ELEMENT)
System.out.println(">>> scanAttribute()");
// name
fEntityScanner.scanQName(fAttributeQName);
// equals
fEntityScanner.skipSpaces()... | void function(XMLAttributesImpl attributes) throws IOException, XNIException { if (DEBUG_START_END_ELEMENT) System.out.println(STR); fEntityScanner.scanQName(fAttributeQName); fEntityScanner.skipSpaces(); if (!fEntityScanner.skipChar('=')) { reportFatalError( STR, new Object[] { fCurrentElement.rawname, fAttributeQName... | /**
* Scans an attribute.
* <p>
* <pre>
* [41] Attribute ::= Name Eq AttValue
* </pre>
* <p>
* <strong>Note:</strong> This method assumes that the next
* character on the stream is the first character of the attribute
* name.
* <p>
* <strong>Note:</strong> This met... | Scans an attribute. <code> [41] Attribute ::= Name Eq AttValue </code> Note: This method assumes that the next character on the stream is the first character of the attribute name. Note: This method uses the fAttributeQName and fQName variables. The contents of these variables will be destroyed | scanAttribute | {
"repo_name": "lostdj/Jaklin-OpenJDK-JAXP",
"path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java",
"license": "gpl-2.0",
"size": 36428
} | [
"com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter",
"com.sun.org.apache.xerces.internal.util.XMLAttributesImpl",
"com.sun.org.apache.xerces.internal.util.XMLSymbols",
"com.sun.org.apache.xerces.internal.xni.NamespaceContext",
"com.sun.org.apache.xerces.internal.xni.XNIException",
"java.io.I... | import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter; import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl; import com.sun.org.apache.xerces.internal.util.XMLSymbols; import com.sun.org.apache.xerces.internal.xni.NamespaceContext; import com.sun.org.apache.xerces.internal.xni.XNIException;... | import com.sun.org.apache.xerces.internal.impl.msg.*; import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.*; import java.io.*; | [
"com.sun.org",
"java.io"
] | com.sun.org; java.io; | 2,855,691 |
@Override
public void write(DataOutput out) throws IOException {
} | void function(DataOutput out) throws IOException { } | /**
* Serialize the fields of this object to <code>out</code>.
*
* @param out <code>DataOuput</code> to serialize this object into.
* @throws IOException
*/ | Serialize the fields of this object to <code>out</code> | write | {
"repo_name": "huitseeker/DataVec",
"path": "datavec-api/src/main/java/org/datavec/api/split/ListStringSplit.java",
"license": "apache-2.0",
"size": 3594
} | [
"java.io.DataOutput",
"java.io.IOException"
] | import java.io.DataOutput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 457,241 |
public HTableDescriptor setDurability(Durability durability) {
this.durability = durability;
setValue(DURABILITY_KEY, durability.name());
return this;
} | HTableDescriptor function(Durability durability) { this.durability = durability; setValue(DURABILITY_KEY, durability.name()); return this; } | /**
* Sets the {@link Durability} setting for the table. This defaults to Durability.USE_DEFAULT.
* @param durability enum value
*/ | Sets the <code>Durability</code> setting for the table. This defaults to Durability.USE_DEFAULT | setDurability | {
"repo_name": "ibmsoe/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java",
"license": "apache-2.0",
"size": 57499
} | [
"org.apache.hadoop.hbase.client.Durability"
] | import org.apache.hadoop.hbase.client.Durability; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,731,864 |
return new TestSuite(FlowArrangementTests.class);
}
public FlowArrangementTests(String name) {
super(name);
} | return new TestSuite(FlowArrangementTests.class); } public FlowArrangementTests(String name) { super(name); } | /**
* Returns the tests as a test suite.
*
* @return The test suite.
*/ | Returns the tests as a test suite | suite | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/block/junit/FlowArrangementTests.java",
"license": "lgpl-2.1",
"size": 5320
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,148,158 |
ChaincodeEvent getEvent(); | ChaincodeEvent getEvent(); | /**
* Returns the CHAINCODE type event that will be posted to interested
* clients when the chaincode's result is committed to the ledger.
*
* @return the chaincode event or null
*/ | Returns the CHAINCODE type event that will be posted to interested clients when the chaincode's result is committed to the ledger | getEvent | {
"repo_name": "lukehuangch/fabric",
"path": "core/chaincode/shim/java/src/main/java/org/hyperledger/fabric/shim/ChaincodeStub.java",
"license": "apache-2.0",
"size": 8834
} | [
"org.hyperledger.fabric.protos.peer.ChaincodeEventPackage"
] | import org.hyperledger.fabric.protos.peer.ChaincodeEventPackage; | import org.hyperledger.fabric.protos.peer.*; | [
"org.hyperledger.fabric"
] | org.hyperledger.fabric; | 1,879,623 |
@Test
public void triangulateSuccessTridol3() {
Vector2[] vertices = this.load(EarClippingTest.class.getResourceAsStream("/org/dyn4j/data/tridol3.dat"));
// decompose the poly
List<? extends Convex> result = this.algo.triangulate(vertices);
// the result should have n - 2 triangles shapes
Te... | void function() { Vector2[] vertices = this.load(EarClippingTest.class.getResourceAsStream(STR)); List<? extends Convex> result = this.algo.triangulate(vertices); TestCase.assertEquals(vertices.length - 2, result.size()); } | /**
* Tests the triangulation implementation against the tridol2 data file.
* @since 3.1.10
*/ | Tests the triangulation implementation against the tridol2 data file | triangulateSuccessTridol3 | {
"repo_name": "satishbabusee/dyn4j",
"path": "junit/org/dyn4j/geometry/EarClippingTest.java",
"license": "bsd-3-clause",
"size": 21967
} | [
"java.util.List",
"junit.framework.TestCase",
"org.dyn4j.geometry.Convex",
"org.dyn4j.geometry.Vector2"
] | import java.util.List; import junit.framework.TestCase; import org.dyn4j.geometry.Convex; import org.dyn4j.geometry.Vector2; | import java.util.*; import junit.framework.*; import org.dyn4j.geometry.*; | [
"java.util",
"junit.framework",
"org.dyn4j.geometry"
] | java.util; junit.framework; org.dyn4j.geometry; | 2,606,512 |
public NFNotaConsultaRetorno consultaNota(final String chaveDeAcesso) throws Exception {
return this.wsNotaConsulta.consultaNota(chaveDeAcesso);
} | NFNotaConsultaRetorno function(final String chaveDeAcesso) throws Exception { return this.wsNotaConsulta.consultaNota(chaveDeAcesso); } | /**
* Faz a consulta da nota
* @param chaveDeAcesso chave de acesso da nota
* @return dados da consulta da nota retornado pelo webservice
* @throws Exception caso nao consiga gerar o xml ou problema de conexao com o sefaz
*/ | Faz a consulta da nota | consultaNota | {
"repo_name": "jefperito/nfe",
"path": "src/main/java/com/fincatto/documentofiscal/nfe310/webservices/WSFacade.java",
"license": "apache-2.0",
"size": 14488
} | [
"com.fincatto.documentofiscal.nfe310.classes.nota.consulta.NFNotaConsultaRetorno"
] | import com.fincatto.documentofiscal.nfe310.classes.nota.consulta.NFNotaConsultaRetorno; | import com.fincatto.documentofiscal.nfe310.classes.nota.consulta.*; | [
"com.fincatto.documentofiscal"
] | com.fincatto.documentofiscal; | 1,221,246 |
public UserDetail[] getAllUsersOfGroups(List<String> groupIds) throws AdminException {
if (groupIds == null || groupIds.isEmpty()) {
return ArrayUtil.EMPTY_USER_DETAIL_ARRAY;
}
Connection con = null;
try {
con = DBUtil.openConnection();
List<UserDetail> users = userDAO.getUsersOfGrou... | UserDetail[] function(List<String> groupIds) throws AdminException { if (groupIds == null groupIds.isEmpty()) { return ArrayUtil.EMPTY_USER_DETAIL_ARRAY; } Connection con = null; try { con = DBUtil.openConnection(); List<UserDetail> users = userDAO.getUsersOfGroups(con, groupIds); return users.toArray(new UserDetail[us... | /**
* Get the users that are in the group or one of his sub-groups
*
* @param groupIds
* @return
* @throws AdminException
*/ | Get the users that are in the group or one of his sub-groups | getAllUsersOfGroups | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/admin/user/UserManager.java",
"license": "agpl-3.0",
"size": 32426
} | [
"java.sql.Connection",
"java.util.List",
"org.silverpeas.core.admin.service.AdminException",
"org.silverpeas.core.admin.user.model.UserDetail",
"org.silverpeas.core.exception.SilverpeasException",
"org.silverpeas.core.persistence.jdbc.DBUtil",
"org.silverpeas.core.util.ArrayUtil"
] | import java.sql.Connection; import java.util.List; import org.silverpeas.core.admin.service.AdminException; import org.silverpeas.core.admin.user.model.UserDetail; import org.silverpeas.core.exception.SilverpeasException; import org.silverpeas.core.persistence.jdbc.DBUtil; import org.silverpeas.core.util.ArrayUtil; | import java.sql.*; import java.util.*; import org.silverpeas.core.admin.service.*; import org.silverpeas.core.admin.user.model.*; import org.silverpeas.core.exception.*; import org.silverpeas.core.persistence.jdbc.*; import org.silverpeas.core.util.*; | [
"java.sql",
"java.util",
"org.silverpeas.core"
] | java.sql; java.util; org.silverpeas.core; | 304,540 |
public String getSelectedUri() {
if(this.getSelectedConnectionOption().
equals(OptionConnect.useOtherConnection.name())){
return Val.chkStr(this.selectedUri);
} else {
return getDefaultSearchUri();
}
} | String function() { if(this.getSelectedConnectionOption(). equals(OptionConnect.useOtherConnection.name())){ return Val.chkStr(this.selectedUri); } else { return getDefaultSearchUri(); } } | /**
* Gets the selected uri.
*
* @return the selected uri
*/ | Gets the selected uri | getSelectedUri | {
"repo_name": "treejames/GeoprocessingAppstore",
"path": "src/com/esri/gpt/catalog/search/SearchFilterConnection.java",
"license": "apache-2.0",
"size": 6265
} | [
"com.esri.gpt.framework.util.Val"
] | import com.esri.gpt.framework.util.Val; | import com.esri.gpt.framework.util.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 2,866,488 |
public void setActivateOnItemClick(boolean activateOnItemClick) {
// When setting CHOICE_MODE_SINGLE, ListView will automatically
// give items the 'activated' state when touched.
getListView().setChoiceMode(activateOnItemClick
? ListView.CHOICE_MODE_SINGLE
: ... | void function(boolean activateOnItemClick) { getListView().setChoiceMode(activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); } | /**
* Turns on activate-on-click mode. When this mode is on, list items will be
* given the 'activated' state when touched.
*/ | Turns on activate-on-click mode. When this mode is on, list items will be given the 'activated' state when touched | setActivateOnItemClick | {
"repo_name": "Arcus92/PlayMusicExporter",
"path": "playmusicexporter/src/main/java/de/arcus/playmusicexporter2/fragments/MusicContainerListFragment.java",
"license": "mit",
"size": 6975
} | [
"android.widget.ListView"
] | import android.widget.ListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,114,890 |
protected String stripEmptyValues(String value) {
for (String string : EMPTY_VALUES) {
if (StringUtils.equalsIgnoreCase(value, string)) {
return null;
}
}
return value;
}
/**
* {@inheritDoc} | String function(String value) { for (String string : EMPTY_VALUES) { if (StringUtils.equalsIgnoreCase(value, string)) { return null; } } return value; } /** * {@inheritDoc} | /**
* Removes empty value markers.
*/ | Removes empty value markers | stripEmptyValues | {
"repo_name": "cschneider/openhab",
"path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/parser/AbstractWeatherParser.java",
"license": "epl-1.0",
"size": 6140
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 905,004 |
@Test
@Category(RunnableOnService.class)
public void testOutputTimeFnLatest() {
p.apply(
Create.timestamped(
TimestampedValue.of(KV.of(0, "hello"), new Instant(0)),
TimestampedValue.of(KV.of(0, "goodbye"), new Instant(10))))
.apply(Window.<KV<Integer, String>>into(Fixed... | @Category(RunnableOnService.class) void function() { p.apply( Create.timestamped( TimestampedValue.of(KV.of(0, "hello"), new Instant(0)), TimestampedValue.of(KV.of(0, STR), new Instant(10)))) .apply(Window.<KV<Integer, String>>into(FixedWindows.of(Duration.standardMinutes(10))) .withOutputTimeFn(OutputTimeFns.outputAtL... | /**
* Tests that when two elements are combined via a GroupByKey their output timestamp agrees
* with the windowing function customized to use the latest value.
*/ | Tests that when two elements are combined via a GroupByKey their output timestamp agrees with the windowing function customized to use the latest value | testOutputTimeFnLatest | {
"repo_name": "chamikaramj/incubator-beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/GroupByKeyTest.java",
"license": "apache-2.0",
"size": 19993
} | [
"org.apache.beam.sdk.testing.RunnableOnService",
"org.apache.beam.sdk.transforms.windowing.FixedWindows",
"org.apache.beam.sdk.transforms.windowing.OutputTimeFns",
"org.apache.beam.sdk.transforms.windowing.Window",
"org.apache.beam.sdk.values.KV",
"org.apache.beam.sdk.values.TimestampedValue",
"org.joda... | import org.apache.beam.sdk.testing.RunnableOnService; import org.apache.beam.sdk.transforms.windowing.FixedWindows; import org.apache.beam.sdk.transforms.windowing.OutputTimeFns; import org.apache.beam.sdk.transforms.windowing.Window; import org.apache.beam.sdk.values.KV; import org.apache.beam.sdk.values.TimestampedVa... | import org.apache.beam.sdk.testing.*; import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.sdk.values.*; import org.joda.time.*; import org.junit.experimental.categories.*; | [
"org.apache.beam",
"org.joda.time",
"org.junit.experimental"
] | org.apache.beam; org.joda.time; org.junit.experimental; | 1,375,651 |
public void setMappedWriteMethod(final Method mappedSetter)
throws IntrospectionException {
mappedWriteMethodRef = new MappedMethodReference(mappedSetter);
findMappedPropertyType();
}
| void function(final Method mappedSetter) throws IntrospectionException { mappedWriteMethodRef = new MappedMethodReference(mappedSetter); findMappedPropertyType(); } | /**
* Sets the method that should be used to write the property value.
*
* @param mappedSetter The mapped setter method.
* @throws IntrospectionException If an error occurs finding the
* mapped property
*/ | Sets the method that should be used to write the property value | setMappedWriteMethod | {
"repo_name": "apache/commons-beanutils",
"path": "src/main/java/org/apache/commons/beanutils2/MappedPropertyDescriptor.java",
"license": "apache-2.0",
"size": 20761
} | [
"java.beans.IntrospectionException",
"java.lang.reflect.Method"
] | import java.beans.IntrospectionException; import java.lang.reflect.Method; | import java.beans.*; import java.lang.reflect.*; | [
"java.beans",
"java.lang"
] | java.beans; java.lang; | 1,797,638 |
void deleteDistributor( DistributorTO distributor ); | void deleteDistributor( DistributorTO distributor ); | /**
* Metodo que se encarga de eliminar al distribuidor
*
* @param distributor
*/ | Metodo que se encarga de eliminar al distribuidor | deleteDistributor | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-integration-api/src/main/java/mx/com/cinepolis/digital/booking/integration/distributor/ServiceAdminDistributorIntegratorEJB.java",
"license": "epl-1.0",
"size": 1697
} | [
"mx.com.cinepolis.digital.booking.commons.to.DistributorTO"
] | import mx.com.cinepolis.digital.booking.commons.to.DistributorTO; | import mx.com.cinepolis.digital.booking.commons.to.*; | [
"mx.com.cinepolis"
] | mx.com.cinepolis; | 225,082 |
void deleteEmptyDir(String namespacedLogBaseDir, Location dir) throws IOException {
LOG.debug("Got path {}", dir);
Location namespacedLogBaseLocation = rootDir.append(namespacesDir).append(namespacedLogBaseDir);
deleteEmptyDirsInNamespace(namespacedLogBaseLocation, dir);
} | void deleteEmptyDir(String namespacedLogBaseDir, Location dir) throws IOException { LOG.debug(STR, dir); Location namespacedLogBaseLocation = rootDir.append(namespacesDir).append(namespacedLogBaseDir); deleteEmptyDirsInNamespace(namespacedLogBaseLocation, dir); } | /**
* For the specified directory to be deleted, finds its namespaced log location, then deletes
* @param namespacedLogBaseDir namespaced log base dir without the root dir prefixed
* @param dir dir to delete
* @throws IOException
*/ | For the specified directory to be deleted, finds its namespaced log location, then deletes | deleteEmptyDir | {
"repo_name": "hsaputra/cdap",
"path": "cdap-watchdog/src/main/java/co/cask/cdap/logging/write/LogCleanup.java",
"license": "apache-2.0",
"size": 5639
} | [
"java.io.IOException",
"org.apache.twill.filesystem.Location"
] | import java.io.IOException; import org.apache.twill.filesystem.Location; | import java.io.*; import org.apache.twill.filesystem.*; | [
"java.io",
"org.apache.twill"
] | java.io; org.apache.twill; | 462,603 |
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
if (!world.isRemote) {
if (!World.doesBlockHaveSolidTopSurface(world, x, y-1, z)) {
breakBlock(world, x, y, z, this, world.getBlockMetadata(x, y, z));
world.setBloc... | void function(World world, int x, int y, int z, Block neighbor) { if (!world.isRemote) { if (!World.doesBlockHaveSolidTopSurface(world, x, y-1, z)) { breakBlock(world, x, y, z, this, world.getBlockMetadata(x, y, z)); world.setBlockToAir(x, y, z); } } } | /**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
*/ | Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z | onNeighborBlockChange | {
"repo_name": "shuttler67/ForgeMod",
"path": "src/main/java/com/shuttler67/demonomancy/block/BlockPentacle.java",
"license": "gpl-3.0",
"size": 5150
} | [
"net.minecraft.block.Block",
"net.minecraft.world.World"
] | import net.minecraft.block.Block; import net.minecraft.world.World; | import net.minecraft.block.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.world; | 2,717,375 |
public void submitTarGzipAndUpdate(
Map<String, LocalResource> providerResources) throws IOException,
BadClusterStateException {
Path dependencyLibTarGzip = getDependencyTarGzip();
LocalResource lc = createAmResource(dependencyLibTarGzip,
LocalResourceType.ARCHIVE, LocalResourceVisibility.... | void function( Map<String, LocalResource> providerResources) throws IOException, BadClusterStateException { Path dependencyLibTarGzip = getDependencyTarGzip(); LocalResource lc = createAmResource(dependencyLibTarGzip, LocalResourceType.ARCHIVE, LocalResourceVisibility.APPLICATION); providerResources.put(YarnServiceCons... | /**
* Submit the AM tar.gz resource referenced by the instance's cluster
* filesystem. Also, update the providerResources object with the new
* resource.
*
* @param providerResources
* the provider resource map to be updated
* @throws IOException
* trouble copying to HDFS
... | Submit the AM tar.gz resource referenced by the instance's cluster filesystem. Also, update the providerResources object with the new resource | submitTarGzipAndUpdate | {
"repo_name": "nandakumar131/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-services/hadoop-yarn-services-core/src/main/java/org/apache/hadoop/yarn/service/utils/CoreFileSystem.java",
"license": "apache-2.0",
"size": 19834
} | [
"java.io.IOException",
"java.util.Map",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.yarn.api.records.LocalResource",
"org.apache.hadoop.yarn.api.records.LocalResourceType",
"org.apache.hadoop.yarn.api.records.LocalResourceVisibility",
"org.apache.hadoop.yarn.service.conf.YarnServiceConstants",
"or... | import java.io.IOException; import java.util.Map; import org.apache.hadoop.fs.Path; import org.apache.hadoop.yarn.api.records.LocalResource; import org.apache.hadoop.yarn.api.records.LocalResourceType; import org.apache.hadoop.yarn.api.records.LocalResourceVisibility; import org.apache.hadoop.yarn.service.conf.YarnServ... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.service.conf.*; import org.apache.hadoop.yarn.service.exceptions.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 510,482 |
@Override
public Map<String, TableDescriptor> getByNamespace(String name)
throws IOException {
Map<String, TableDescriptor> htds = new TreeMap<>();
List<Path> tableDirs =
FSUtils.getLocalTableDirs(fs, FSUtils.getNamespaceDir(rootdir, name));
for (Path d: tableDirs) {
TableDescriptor htd ... | Map<String, TableDescriptor> function(String name) throws IOException { Map<String, TableDescriptor> htds = new TreeMap<>(); List<Path> tableDirs = FSUtils.getLocalTableDirs(fs, FSUtils.getNamespaceDir(rootdir, name)); for (Path d: tableDirs) { TableDescriptor htd = null; try { htd = get(FSUtils.getTableName(d)); } cat... | /**
* Find descriptors by namespace.
* @see #get(org.apache.hadoop.hbase.TableName)
*/ | Find descriptors by namespace | getByNamespace | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSTableDescriptors.java",
"license": "apache-2.0",
"size": 33068
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.client.TableDescriptor"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.client.TableDescriptor; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,386,879 |
public Vector getViews() {
return views;
}
| Vector function() { return views; } | /**
* Returns a vector containing all the views those are contained by this <code>MDIFrame</code>.
* @return Returns the views.
*/ | Returns a vector containing all the views those are contained by this <code>MDIFrame</code> | getViews | {
"repo_name": "google-code/aeliamdi",
"path": "src/org/aeliamdi/MDIFrame.java",
"license": "lgpl-2.1",
"size": 43557
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,061,969 |
@Override
public ArrayList<T> parseRows(Document doc,
HocElement adHocHeader, boolean returnRawHtml,
Class<T> hocElementClass, int targetSectionIndex) throws Exception {
try {
ArrayList<T> rowElements = new ArrayList<T>();
// Use the counter to make every item unique, this is important for... | ArrayList<T> function(Document doc, HocElement adHocHeader, boolean returnRawHtml, Class<T> hocElementClass, int targetSectionIndex) throws Exception { try { ArrayList<T> rowElements = new ArrayList<T>(); Integer counter = 0; Elements allReportSections = doc .select(SELECTOR_RAW_ROWS_REPORTTABLE); if (!nonConforming) {... | /**
* Parse report section table rows from the Protex report, returning the
* data in a list of HocElements. nonConforming = report sections of the
* form: Label: value. Normal (conforming) = report sections that contain
* columns of data, each with a header (label) at the top (first row).
*
... | Parse report section table rows from the Protex report, returning the data in a list of HocElements. nonConforming = report sections of the form: Label: value. Normal (conforming) = report sections that contain columns of data, each with a header (label) at the top (first row) | parseRows | {
"repo_name": "blackducksoftware/cf-6x-connector",
"path": "src/main/java/com/blackducksoftware/tools/commonframework/connector/protex/report/AdHocParserProtex6.java",
"license": "gpl-2.0",
"size": 13562
} | [
"com.blackducksoftware.tools.commonframework.standard.protex.report.HocElement",
"java.util.ArrayList",
"org.jsoup.nodes.Document",
"org.jsoup.select.Elements"
] | import com.blackducksoftware.tools.commonframework.standard.protex.report.HocElement; import java.util.ArrayList; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; | import com.blackducksoftware.tools.commonframework.standard.protex.report.*; import java.util.*; import org.jsoup.nodes.*; import org.jsoup.select.*; | [
"com.blackducksoftware.tools",
"java.util",
"org.jsoup.nodes",
"org.jsoup.select"
] | com.blackducksoftware.tools; java.util; org.jsoup.nodes; org.jsoup.select; | 2,771,099 |
@Override
protected SessionFactory getSessionFactory() {
return _sessionFactory;
} | SessionFactory function() { return _sessionFactory; } | /**
* Gets the session factory object
* @return Session factory
*/ | Gets the session factory object | getSessionFactory | {
"repo_name": "UOC/PeLP",
"path": "src/test/java/edu/uoc/pelp/test/model/dao/LocalLoggingDAO.java",
"license": "gpl-3.0",
"size": 4512
} | [
"org.hibernate.SessionFactory"
] | import org.hibernate.SessionFactory; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 492,898 |
@Issue("JENKINS-7494")
@Test public void defaultUserAvatarCanBeFetched() throws Exception {
User user = User.get("avatar-user", true);
HtmlPage page = j.createWebClient().goTo("user/" + user.getDisplayName());
j.assertAllImageLoadSuccessfully(page);
} | @Issue(STR) @Test void function() throws Exception { User user = User.get(STR, true); HtmlPage page = j.createWebClient().goTo("user/" + user.getDisplayName()); j.assertAllImageLoadSuccessfully(page); } | /**
* Asserts that the default user avatar can be fetched (ie no 404)
*/ | Asserts that the default user avatar can be fetched (ie no 404) | defaultUserAvatarCanBeFetched | {
"repo_name": "rsandell/jenkins",
"path": "test/src/test/java/hudson/model/UserTest.java",
"license": "mit",
"size": 34438
} | [
"com.gargoylesoftware.htmlunit.html.HtmlPage",
"org.junit.Test",
"org.jvnet.hudson.test.Issue"
] | import com.gargoylesoftware.htmlunit.html.HtmlPage; import org.junit.Test; import org.jvnet.hudson.test.Issue; | import com.gargoylesoftware.htmlunit.html.*; import org.junit.*; import org.jvnet.hudson.test.*; | [
"com.gargoylesoftware.htmlunit",
"org.junit",
"org.jvnet.hudson"
] | com.gargoylesoftware.htmlunit; org.junit; org.jvnet.hudson; | 444,682 |
@Test
public void test1(){
Field field = FieldUtils.getDeclaredField(DangaMemCachedConfig.class, "serverList", true);
Alias alias = field.getAnnotation(Alias.class);
assertEquals(
"@com.feilong.core.bean.Alias(name=memcached.serverlist, sampleValue=172.20.31.23:1... | void function(){ Field field = FieldUtils.getDeclaredField(DangaMemCachedConfig.class, STR, true); Alias alias = field.getAnnotation(Alias.class); assertEquals( STR, annotationToStringBuilder.build(alias)); } | /**
* Test 1.
*/ | Test 1 | test1 | {
"repo_name": "venusdrogon/feilong-core",
"path": "src/test/java/com/feilong/core/lang/annotation/DefaultAnnotationToStringBuilderTest.java",
"license": "apache-2.0",
"size": 1894
} | [
"com.feilong.core.bean.Alias",
"com.feilong.core.entity.DangaMemCachedConfig",
"java.lang.reflect.Field",
"org.apache.commons.lang3.reflect.FieldUtils",
"org.junit.Assert"
] | import com.feilong.core.bean.Alias; import com.feilong.core.entity.DangaMemCachedConfig; import java.lang.reflect.Field; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.Assert; | import com.feilong.core.bean.*; import com.feilong.core.entity.*; import java.lang.reflect.*; import org.apache.commons.lang3.reflect.*; import org.junit.*; | [
"com.feilong.core",
"java.lang",
"org.apache.commons",
"org.junit"
] | com.feilong.core; java.lang; org.apache.commons; org.junit; | 1,958,789 |
public WizardModel getModel()
{
return this.model;
} | WizardModel function() { return this.model; } | /**
* Gets the model for this instance.
*
* @return The model.
*/ | Gets the model for this instance | getModel | {
"repo_name": "ervandew/formic",
"path": "src/java/org/formic/wizard/impl/console/ConsoleWizard.java",
"license": "lgpl-2.1",
"size": 12491
} | [
"org.pietschy.wizard.WizardModel"
] | import org.pietschy.wizard.WizardModel; | import org.pietschy.wizard.*; | [
"org.pietschy.wizard"
] | org.pietschy.wizard; | 2,593,921 |
public void stopDatabaseLogging() {
isDatabaseLogging = false;
Utilities.toast(context, R.string.gpsloggingoff, Toast.LENGTH_SHORT);
} | void function() { isDatabaseLogging = false; Utilities.toast(context, R.string.gpsloggingoff, Toast.LENGTH_SHORT); } | /**
* Stop logging.
*/ | Stop logging | stopDatabaseLogging | {
"repo_name": "GitHubDroid/geodroid_master_update",
"path": "geodroidlibrary/src/eu/geopaparazzi/library/gps/GpsDatabaseLogger.java",
"license": "gpl-3.0",
"size": 14928
} | [
"android.widget.Toast",
"eu.geopaparazzi.library.util.Utilities"
] | import android.widget.Toast; import eu.geopaparazzi.library.util.Utilities; | import android.widget.*; import eu.geopaparazzi.library.util.*; | [
"android.widget",
"eu.geopaparazzi.library"
] | android.widget; eu.geopaparazzi.library; | 2,105,826 |
@Test
public void testSetComponentClass () {
nullParameter.setComponentClass("ComboBox");
parameterFromName.setComponentClass("IntSpinner");
noComponentParameter.setComponentClass("DoubleSpinner");
fullParameter.setComponentClass("TimeSpinner");
assertEquals("ComboBox", nullParameter.getComponentClass(... | void function () { nullParameter.setComponentClass(STR); parameterFromName.setComponentClass(STR); noComponentParameter.setComponentClass(STR); fullParameter.setComponentClass(STR); assertEquals(STR, nullParameter.getComponentClass()); assertEquals(STR, parameterFromName.getComponentClass()); assertEquals(STR, noCompon... | /**
* Test method for {@link org.clubrockisen.entities.Parameter#setComponentClass(java.lang.String)}.
*/ | Test method for <code>org.clubrockisen.entities.Parameter#setComponentClass(java.lang.String)</code> | testSetComponentClass | {
"repo_name": "Club-Rock-ISEN/EntryManager",
"path": "src/test/java/org/clubrockisen/entities/ParameterTest.java",
"license": "bsd-3-clause",
"size": 9144
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 100,099 |
@JsonProperty("file")
public Handle getFile() {
return file;
} | @JsonProperty("file") Handle function() { return file; } | /**
* <p>Original spec-file type: Handle</p>
* <pre>
* @optional hid file_name type url remote_md5 remote_sha1
* </pre>
*
*/ | Original spec-file type: Handle <code> | getFile | {
"repo_name": "arfathpasha/kb_cufflinks",
"path": "lib/src/us/kbase/kbcufflinks/RNASeqDifferentialExpression.java",
"license": "mit",
"size": 7539
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 2,200,326 |
@Test
public void testBaseContainer() {
RPObject coin = obj.getSlot("lhand").getFirst().getSlot("container").getFirst();
assertEquals(obj, coin.getBaseContainer());
} | void function() { RPObject coin = obj.getSlot("lhand").getFirst().getSlot(STR).getFirst(); assertEquals(obj, coin.getBaseContainer()); } | /**
* Test the base container method that should return the base container of
* any contained object. The base container is the container of a object
* that is not contained by anyone.
*
*/ | Test the base container method that should return the base container of any contained object. The base container is the container of a object that is not contained by anyone | testBaseContainer | {
"repo_name": "nhnb/marauroa",
"path": "tests/marauroa/common/game/RPObjectTest.java",
"license": "gpl-2.0",
"size": 12773
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 114,434 |
public DemandSet getDemands() {
return demands;
}
| DemandSet function() { return demands; } | /**
* Gets the set of additional EVA demands.
*
* @return the set of additional EVA demands
*/ | Gets the set of additional EVA demands | getDemands | {
"repo_name": "ptgrogan/spacenet",
"path": "src/main/java/edu/mit/spacenet/simulator/event/ExplorationProcess.java",
"license": "apache-2.0",
"size": 6179
} | [
"edu.mit.spacenet.domain.resource.DemandSet"
] | import edu.mit.spacenet.domain.resource.DemandSet; | import edu.mit.spacenet.domain.resource.*; | [
"edu.mit.spacenet"
] | edu.mit.spacenet; | 2,208,372 |
public static boolean createGroup(String name, ChatColor color, int permission) {
return createGroup(name, permission, color, false);
} | static boolean function(String name, ChatColor color, int permission) { return createGroup(name, permission, color, false); } | /**
* Creates a new group
*
* @param name
* The name of the group
* @param permission
* The permission level of the group
* @return if successful
*/ | Creates a new group | createGroup | {
"repo_name": "hypereddie/GGS-Plugin-Pack",
"path": "src/com/ep/ggs/groupmanager/API/GroupManagerAPI.java",
"license": "gpl-3.0",
"size": 4527
} | [
"com.ep.ggs.chat.ChatColor"
] | import com.ep.ggs.chat.ChatColor; | import com.ep.ggs.chat.*; | [
"com.ep.ggs"
] | com.ep.ggs; | 215,357 |
public static void debugLsr(Configuration conf,
Path p) throws IOException {
debugLsr(conf, p, new PrintingErrorReporter());
} | static void function(Configuration conf, Path p) throws IOException { debugLsr(conf, p, new PrintingErrorReporter()); } | /**
* ls -r for debugging purposes
*/ | ls -r for debugging purposes | debugLsr | {
"repo_name": "StackVista/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java",
"license": "apache-2.0",
"size": 172348
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,482,085 |
public static void writeSmartExternalScripts(ResponseWriter writer, String gateKey,
String gateValue, String contextBasePath, String[] scriptPaths) throws IOException
{
writer.write("<script>");
writer.write(" if (typeof window['" + gateKey + "'] == '" + gateValue + "')");
w... | static void function(ResponseWriter writer, String gateKey, String gateValue, String contextBasePath, String[] scriptPaths) throws IOException { writer.write(STR); writer.write(STR + gateKey + STR + gateValue + "')"); writer.write(STR); for (int i = 0; i < scriptPaths.length; i++) { writer.write(STR); writer.write(STR<... | /**
* Renders a script that includes an external JavaScript that gets added to
* the document through a document.write() if a gatekeeper value is NOT set.
* This effectively makes the script inclusion a per request JavaScript
* singleton.
*
* @param writer
* the ResponseWr... | Renders a script that includes an external JavaScript that gets added to the document through a document.write() if a gatekeeper value is NOT set. This effectively makes the script inclusion a per request JavaScript singleton | writeSmartExternalScripts | {
"repo_name": "OpenCollabZA/sakai",
"path": "jsf2/jsf2-widgets/src/java/org/sakaiproject/jsf2/util/RendererUtil.java",
"license": "apache-2.0",
"size": 17712
} | [
"java.io.IOException",
"javax.faces.context.ResponseWriter"
] | import java.io.IOException; import javax.faces.context.ResponseWriter; | import java.io.*; import javax.faces.context.*; | [
"java.io",
"javax.faces"
] | java.io; javax.faces; | 1,932,674 |
private MessageConsumerResources createConsumer() throws Exception {
MessageConsumerResources answer;
ConnectionResource connectionResource = getOrCreateConnectionResource();
Connection conn = connectionResource.borrowConnection();
try {
Session session = conn.createSessi... | MessageConsumerResources function() throws Exception { MessageConsumerResources answer; ConnectionResource connectionResource = getOrCreateConnectionResource(); Connection conn = connectionResource.borrowConnection(); try { Session session = conn.createSession(isTransacted(), isTransacted() ? Session.SESSION_TRANSACTED... | /**
* Creates a {@link MessageConsumerResources} with a dedicated
* {@link Session} required for transacted and InOut consumers.
*/ | Creates a <code>MessageConsumerResources</code> with a dedicated <code>Session</code> required for transacted and InOut consumers | createConsumer | {
"repo_name": "curso007/camel",
"path": "components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java",
"license": "apache-2.0",
"size": 13373
} | [
"javax.jms.Connection",
"javax.jms.MessageConsumer",
"javax.jms.MessageListener",
"javax.jms.Session",
"org.apache.camel.component.sjms.jms.ConnectionResource"
] | import javax.jms.Connection; import javax.jms.MessageConsumer; import javax.jms.MessageListener; import javax.jms.Session; import org.apache.camel.component.sjms.jms.ConnectionResource; | import javax.jms.*; import org.apache.camel.component.sjms.jms.*; | [
"javax.jms",
"org.apache.camel"
] | javax.jms; org.apache.camel; | 187,481 |
Configuration getRuntimeConf() {
return YarnClientConfiguration.CONF.build();
} | Configuration getRuntimeConf() { return YarnClientConfiguration.CONF.build(); } | /**
* Specifies YARN as the runtime for REEF cluster. Override this method to use a different
* runtime.
*/ | Specifies YARN as the runtime for REEF cluster. Override this method to use a different runtime | getRuntimeConf | {
"repo_name": "cs564/heron",
"path": "heron/schedulers/src/java/com/twitter/heron/scheduler/yarn/YarnLauncher.java",
"license": "apache-2.0",
"size": 8126
} | [
"org.apache.reef.runtime.yarn.client.YarnClientConfiguration",
"org.apache.reef.tang.Configuration"
] | import org.apache.reef.runtime.yarn.client.YarnClientConfiguration; import org.apache.reef.tang.Configuration; | import org.apache.reef.runtime.yarn.client.*; import org.apache.reef.tang.*; | [
"org.apache.reef"
] | org.apache.reef; | 2,587,698 |
public static @NotNull String posixQuote(@NotNull String argument) {
return shouldWrapWithQuotes(argument) ? "'" + StringUtil.replace(argument, "'", "'\"'\"'") + "'" : argument;
} | static @NotNull String function(@NotNull String argument) { return shouldWrapWithQuotes(argument) ? "'" + StringUtil.replace(argument, "'", "'\"'\"'") + "'" : argument; } | /**
* When necessary, quotes the specified argument with single quotes, according to the POSIX shell rules,
* replacing single quotes with hardly readable but recursion-safe {@code '"'"'}.
*/ | When necessary, quotes the specified argument with single quotes, according to the POSIX shell rules, replacing single quotes with hardly readable but recursion-safe '"'"' | posixQuote | {
"repo_name": "siosio/intellij-community",
"path": "platform/util/src/com/intellij/execution/CommandLineUtil.java",
"license": "apache-2.0",
"size": 22943
} | [
"com.intellij.openapi.util.text.StringUtil",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.util.text.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 363,730 |
public static FunctionScoreQueryBuilder functionScoreQuery(QueryBuilder queryBuilder, FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders) {
return new FunctionScoreQueryBuilder(queryBuilder, filterFunctionBuilders);
} | static FunctionScoreQueryBuilder function(QueryBuilder queryBuilder, FunctionScoreQueryBuilder.FilterFunctionBuilder[] filterFunctionBuilders) { return new FunctionScoreQueryBuilder(queryBuilder, filterFunctionBuilders); } | /**
* A query that allows to define a custom scoring function
*
* @param queryBuilder The query to custom score
* @param filterFunctionBuilders the filters and functions to execute
* @return the function score query
*/ | A query that allows to define a custom scoring function | functionScoreQuery | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/index/query/QueryBuilders.java",
"license": "apache-2.0",
"size": 28890
} | [
"org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder"
] | import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; | import org.elasticsearch.index.query.functionscore.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 54,061 |
public void setTags(Collection<TagAnnotationData> tags)
{
this.tags = tags;
}
public Collection<TermAnnotationData> getTerms() { return terms; } | void function(Collection<TagAnnotationData> tags) { this.tags = tags; } public Collection<TermAnnotationData> getTerms() { return terms; } | /**
* Sets the collections of tags.
*
* @param tags The value to set.
*/ | Sets the collections of tags | setTags | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/util/StructuredDataResults.java",
"license": "gpl-2.0",
"size": 8198
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,073,128 |
@Test
public void testIntersectsRegionNegativeAdjacentXNonAdjacentY() {
final SpatialRegion r = new SpatialRegion(3, 5, 0, 2);
Assert.assertFalse(r.intersects(new SpatialRegion(1, 2, 5, 6)));
} | void function() { final SpatialRegion r = new SpatialRegion(3, 5, 0, 2); Assert.assertFalse(r.intersects(new SpatialRegion(1, 2, 5, 6))); } | /**
* Test method for
* {@link se.kth.speech.SpatialRegion#intersects(se.kth.speech.SpatialMap.SpatialRegion)}.
*/ | Test method for <code>se.kth.speech.SpatialRegion#intersects(se.kth.speech.SpatialMap.SpatialRegion)</code> | testIntersectsRegionNegativeAdjacentXNonAdjacentY | {
"repo_name": "errantlinguist/tangrams-restricted",
"path": "game/src/test/java/se/kth/speech/SpatialRegionTest.java",
"license": "gpl-3.0",
"size": 12937
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,485,671 |
EClass getDefinitionParseResult();
| EClass getDefinitionParseResult(); | /**
* Returns the meta object for class '{@link org.asup.db.syntax.QDefinitionParseResult <em>Definition Parse Result</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Definition Parse Result</em>'.
* @see org.asup.db.syntax.QDefinitionParseResult
* @ge... | Returns the meta object for class '<code>org.asup.db.syntax.QDefinitionParseResult Definition Parse Result</code>'. | getDefinitionParseResult | {
"repo_name": "asupdev/asup",
"path": "org.asup.db.syntax/src/org/asup/db/syntax/QDatabaseSyntaxPackage.java",
"license": "epl-1.0",
"size": 54597
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,059,219 |
private ArrayWritable createStruct(Object obj, CarbonColumn carbonColumn) throws IOException {
if (obj instanceof GenericInternalRow) {
Object[] objArray = ((GenericInternalRow) obj).values();
List<CarbonDimension> childCarbonDimensions = null;
if (carbonColumn.isDimension() && carbonColumn.getC... | ArrayWritable function(Object obj, CarbonColumn carbonColumn) throws IOException { if (obj instanceof GenericInternalRow) { Object[] objArray = ((GenericInternalRow) obj).values(); List<CarbonDimension> childCarbonDimensions = null; if (carbonColumn.isDimension() && carbonColumn.getColumnSchema().getNumberOfChild() > 0... | /**
* Create the Struct data for the Struct Datatype
*
* @param obj
* @param carbonColumn
* @return
* @throws IOException
*/ | Create the Struct data for the Struct Datatype | createStruct | {
"repo_name": "ravipesala/incubator-carbondata",
"path": "integration/hive/src/main/java/org/apache/carbondata/hive/CarbonDictionaryDecodeReadSupport.java",
"license": "apache-2.0",
"size": 9598
} | [
"java.io.IOException",
"java.util.List",
"org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn",
"org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension",
"org.apache.hadoop.io.ArrayWritable",
"org.apache.hadoop.io.Writable",
"org.apache.spark.sql.catalyst.expressions.Ge... | import java.io.IOException; import java.util.List; import org.apache.carbondata.core.metadata.schema.table.column.CarbonColumn; import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension; import org.apache.hadoop.io.ArrayWritable; import org.apache.hadoop.io.Writable; import org.apache.spark.sql.cat... | import java.io.*; import java.util.*; import org.apache.carbondata.core.metadata.schema.table.column.*; import org.apache.hadoop.io.*; import org.apache.spark.sql.catalyst.expressions.*; | [
"java.io",
"java.util",
"org.apache.carbondata",
"org.apache.hadoop",
"org.apache.spark"
] | java.io; java.util; org.apache.carbondata; org.apache.hadoop; org.apache.spark; | 2,442,200 |
public PhraseSuggestionBuilder addCandidateGenerator(CandidateGenerator generator) {
List<CandidateGenerator> list = this.generators.get(generator.getType());
if (list == null) {
list = new ArrayList<>();
this.generators.put(generator.getType(), list);
}
list.... | PhraseSuggestionBuilder function(CandidateGenerator generator) { List<CandidateGenerator> list = this.generators.get(generator.getType()); if (list == null) { list = new ArrayList<>(); this.generators.put(generator.getType(), list); } list.add(generator); return this; } | /**
* Adds a {@link CandidateGenerator} to this suggester. The
* {@link CandidateGenerator} is used to draw candidates for each individual
* phrase term before the candidates are scored.
*/ | Adds a <code>CandidateGenerator</code> to this suggester. The <code>CandidateGenerator</code> is used to draw candidates for each individual phrase term before the candidates are scored | addCandidateGenerator | {
"repo_name": "xuzha/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/suggest/phrase/PhraseSuggestionBuilder.java",
"license": "apache-2.0",
"size": 32412
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 335,321 |
public void setHttpAuthUsernamePassword(String host, String realm, String username,
String password) {
if (host == null || realm == null || !waitForInit()) {
return;
}
final ContentValues c = new ContentValues();
c.put(HTTPAUTH_HOST_COL, host);
c.put(... | void function(String host, String realm, String username, String password) { if (host == null realm == null !waitForInit()) { return; } final ContentValues c = new ContentValues(); c.put(HTTPAUTH_HOST_COL, host); c.put(HTTPAUTH_REALM_COL, realm); c.put(HTTPAUTH_USERNAME_COL, username); c.put(HTTPAUTH_PASSWORD_COL, pass... | /**
* Sets the HTTP authentication password. Tuple (HTTPAUTH_HOST_COL, HTTPAUTH_REALM_COL,
* HTTPAUTH_USERNAME_COL) is unique.
*
* @param host the host for the password
* @param realm the realm for the password
* @param username the username for the password.
* @param password the pas... | Sets the HTTP authentication password. Tuple (HTTPAUTH_HOST_COL, HTTPAUTH_REALM_COL, HTTPAUTH_USERNAME_COL) is unique | setHttpAuthUsernamePassword | {
"repo_name": "qtekfun/htcDesire820Kernel",
"path": "external/chromium_org/android_webview/java/src/org/chromium/android_webview/HttpAuthDatabase.java",
"license": "gpl-2.0",
"size": 8949
} | [
"android.content.ContentValues"
] | import android.content.ContentValues; | import android.content.*; | [
"android.content"
] | android.content; | 432,248 |
public int compare(RecordKey secondKey, DataRecord record1, DataRecord record2) {
int compResult;
int[] record2KeyFields = secondKey.getKeyFields();
if (keyFields.length != record2KeyFields.length) {
throw new RuntimeException("Can't compare. keys have different number of DataFields");
}
... | int function(RecordKey secondKey, DataRecord record1, DataRecord record2) { int compResult; int[] record2KeyFields = secondKey.getKeyFields(); if (keyFields.length != record2KeyFields.length) { throw new RuntimeException(STR); } if (useCollator) { for (int i = 0; i < keyFields.length; i++) { final DataField field1 = re... | /**
* Compares two records (can have different layout) based on defined
* key-fields and returns (-1;0;1) if (< ; = ; >).<br>
* The particular fields to be compared have to be of the same type !
*
* @param secondKey
* RecordKey defined for the second record
* @param record... | Compares two records (can have different layout) based on defined key-fields and returns (-1;0;1) if (). The particular fields to be compared have to be of the same type | compare | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/src/org/jetel/data/RecordComparator.java",
"license": "lgpl-2.1",
"size": 15400
} | [
"org.jetel.metadata.DataFieldType"
] | import org.jetel.metadata.DataFieldType; | import org.jetel.metadata.*; | [
"org.jetel.metadata"
] | org.jetel.metadata; | 590,001 |
@Override
public Class<MetaFeedRecord> getRecordType() {
return MetaFeedRecord.class;
}
public final TableField<MetaFeedRecord, Integer> ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.INTEGER.nullable(false).identity(true), this, "");
public final TableField<MetaFeedR... | Class<MetaFeedRecord> function() { return MetaFeedRecord.class; } public final TableField<MetaFeedRecord, Integer> ID = createField(DSL.name("id"), org.jooq.impl.SQLDataType.INTEGER.nullable(false).identity(true), this, STRnameSTRSTRmeta_feedSTR")); } public <O extends Record> MetaFeed(Table<O> child, ForeignKey<O, Met... | /**
* The class holding records for this type
*/ | The class holding records for this type | getRecordType | {
"repo_name": "gchq/stroom",
"path": "stroom-meta/stroom-meta-impl-db-jooq/src/main/java/stroom/meta/impl/db/jooq/tables/MetaFeed.java",
"license": "apache-2.0",
"size": 3996
} | [
"org.jooq.ForeignKey",
"org.jooq.Record",
"org.jooq.Table",
"org.jooq.TableField",
"org.jooq.impl.DSL"
] | import org.jooq.ForeignKey; import org.jooq.Record; import org.jooq.Table; import org.jooq.TableField; import org.jooq.impl.DSL; | import org.jooq.*; import org.jooq.impl.*; | [
"org.jooq",
"org.jooq.impl"
] | org.jooq; org.jooq.impl; | 2,101,437 |
protected void onClickAddWidgetButton(View view) {
if (LOGD) Log.d(TAG, "onClickAddWidgetButton");
if (mIsSafeModeEnabled) {
Toast.makeText(this, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show();
} else {
showWidgetsView(true , true );
if (mLaunc... | void function(View view) { if (LOGD) Log.d(TAG, STR); if (mIsSafeModeEnabled) { Toast.makeText(this, R.string.safemode_widget_error, Toast.LENGTH_SHORT).show(); } else { showWidgetsView(true , true ); if (mLauncherCallbacks != null) { mLauncherCallbacks.onClickAddWidgetButton(view); } } } | /**
* Event handler for the (Add) Widgets button that appears after a long press
* on the home screen.
*/ | Event handler for the (Add) Widgets button that appears after a long press on the home screen | onClickAddWidgetButton | {
"repo_name": "bojanvu23/android_packages_apps_Trebuchet_Gradle",
"path": "Trebuchet/src/main/java/com/lite/android/launcher3/Launcher.java",
"license": "apache-2.0",
"size": 211390
} | [
"android.util.Log",
"android.view.View",
"android.widget.Toast"
] | import android.util.Log; import android.view.View; import android.widget.Toast; | import android.util.*; import android.view.*; import android.widget.*; | [
"android.util",
"android.view",
"android.widget"
] | android.util; android.view; android.widget; | 2,658,464 |
public Object[] toArray() {
int j = -1;
Object[] array = new Object[size];
// Iterates over the values, adding them to the array.
for (Iterator<V> iterator = iterator(); iterator.hasNext();) {
array[++j] = iterator.next();
}
return array;
} | Object[] function() { int j = -1; Object[] array = new Object[size]; for (Iterator<V> iterator = iterator(); iterator.hasNext();) { array[++j] = iterator.next(); } return array; } | /**
* Translates the mapped pairs' values into an array of Objects
*
* @return an object array of all the values currently in the map.
*/ | Translates the mapped pairs' values into an array of Objects | toArray | {
"repo_name": "fnp/pylucene",
"path": "lucene-java-3.5.0/lucene/contrib/facet/src/java/org/apache/lucene/util/collections/ArrayHashMap.java",
"license": "apache-2.0",
"size": 15306
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 300,980 |
@FlakyTest(tolerance = 3)
public void testPerformAutoCleanupShouldNotDeleteBecauseInQueue_withFeedsWithNoMedia() throws IOException {
// add feed with no enclosures so that item ID != media ID
saveFeedlist(context, 1, 10, false);
// add candidate for performAutoCleanup
List<Feed... | @FlakyTest(tolerance = 3) void function() throws IOException { saveFeedlist(context, 1, 10, false); List<Feed> feeds = saveFeedlist(context, 1, 1, true); FeedMedia m = feeds.get(0).getItems().get(0).getMedia(); m.setDownloaded(true); m.setFile_url("file"); PodDBAdapter adapter = new PodDBAdapter(context); adapter.open(... | /**
* Reproduces a bug where DBTasks.performAutoCleanup(android.content.Context) would use the ID of the FeedItem in the
* call to DBWriter.deleteFeedMediaOfItem instead of the ID of the FeedMedia. This would cause the wrong item to be deleted.
* @throws IOException
*/ | Reproduces a bug where DBTasks.performAutoCleanup(android.content.Context) would use the ID of the FeedItem in the call to DBWriter.deleteFeedMediaOfItem instead of the ID of the FeedMedia. This would cause the wrong item to be deleted | testPerformAutoCleanupShouldNotDeleteBecauseInQueue_withFeedsWithNoMedia | {
"repo_name": "wangjun/AntennaPod",
"path": "app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java",
"license": "mit",
"size": 11400
} | [
"android.test.FlakyTest",
"de.danoeh.antennapod.core.feed.Feed",
"de.danoeh.antennapod.core.feed.FeedMedia",
"de.danoeh.antennapod.core.storage.PodDBAdapter",
"de.test.antennapod.storage.DBTestUtils",
"java.io.IOException",
"java.util.List"
] | import android.test.FlakyTest; import de.danoeh.antennapod.core.feed.Feed; import de.danoeh.antennapod.core.feed.FeedMedia; import de.danoeh.antennapod.core.storage.PodDBAdapter; import de.test.antennapod.storage.DBTestUtils; import java.io.IOException; import java.util.List; | import android.test.*; import de.danoeh.antennapod.core.feed.*; import de.danoeh.antennapod.core.storage.*; import de.test.antennapod.storage.*; import java.io.*; import java.util.*; | [
"android.test",
"de.danoeh.antennapod",
"de.test.antennapod",
"java.io",
"java.util"
] | android.test; de.danoeh.antennapod; de.test.antennapod; java.io; java.util; | 2,172,956 |
private boolean isValidDomain( String domain )
{
return !StringUtils.endsWithAny( domain, invalidDomains.toArray( new String[invalidDomains.size()] ) );
} | boolean function( String domain ) { return !StringUtils.endsWithAny( domain, invalidDomains.toArray( new String[invalidDomains.size()] ) ); } | /**
* Checks if the given domain ends with any of the invalid domains listed in sakai.properties
* @param domain the domain suffix to be checked
* @return true if the domain is valid; false otherwise
*/ | Checks if the given domain ends with any of the invalid domains listed in sakai.properties | isValidDomain | {
"repo_name": "OpenCollabZA/sakai",
"path": "site-manage/site-manage-participant-helper/src/java/org/sakaiproject/site/tool/helper/participant/impl/SiteAddParticipantHandler.java",
"license": "apache-2.0",
"size": 43398
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 427,624 |
private int _getItems(
FacesContext context,
RenderingContext arc,
UIComponent component,
List<SelectItem> items,
long minValue, long maxValue, long value,
int blockSize,
UIComponent rangeLabel)
{
int selectedIndex = -1;
b... | int function( FacesContext context, RenderingContext arc, UIComponent component, List<SelectItem> items, long minValue, long maxValue, long value, int blockSize, UIComponent rangeLabel) { int selectedIndex = -1; boolean maxUnknown = (maxValue == XhtmlConstants.MAX_VALUE_UNKNOWN); long blockIndex = (value - minValue + b... | /**
* create each of the choice options and add them onto the List.
* @return the number of options added
*/ | create each of the choice options and add them onto the List | _getItems | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java",
"license": "apache-2.0",
"size": 46657
} | [
"java.util.List",
"javax.faces.component.UIComponent",
"javax.faces.context.FacesContext",
"javax.faces.model.SelectItem",
"org.apache.myfaces.trinidad.context.RenderingContext"
] | import java.util.List; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.model.SelectItem; import org.apache.myfaces.trinidad.context.RenderingContext; | import java.util.*; import javax.faces.component.*; import javax.faces.context.*; import javax.faces.model.*; import org.apache.myfaces.trinidad.context.*; | [
"java.util",
"javax.faces",
"org.apache.myfaces"
] | java.util; javax.faces; org.apache.myfaces; | 2,798,374 |
public void sendMessages(ServiceBusMessageBatch batch) {
Objects.requireNonNull(batch, "'batch' cannot be null.");
asyncClient.sendMessages(batch).block(tryTimeout);
} | void function(ServiceBusMessageBatch batch) { Objects.requireNonNull(batch, STR); asyncClient.sendMessages(batch).block(tryTimeout); } | /**
* Sends a message batch to the Azure Service Bus entity this sender is connected to.
*
* @param batch of messages which allows client to send maximum allowed size for a batch of messages.
*
* @throws NullPointerException if {@code batch} is {@code null}.
*/ | Sends a message batch to the Azure Service Bus entity this sender is connected to | sendMessages | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderClient.java",
"license": "mit",
"size": 13613
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,411,320 |
private void getVBytesForOffset(int kvoff, InMemValBytes vbytes) {
final int nextindex = (kvoff / ACCTSIZE == (kvend - 1 + kvoffsets.length) % kvoffsets.length) ? bufend
: kvindices[(kvoff + ACCTSIZE + KEYSTART) % kvindices.length];
int vallen = (nextindex >= kvindices[kvoff + VALSTART]) ? nextindex - kv... | void function(int kvoff, InMemValBytes vbytes) { final int nextindex = (kvoff / ACCTSIZE == (kvend - 1 + kvoffsets.length) % kvoffsets.length) ? bufend : kvindices[(kvoff + ACCTSIZE + KEYSTART) % kvindices.length]; int vallen = (nextindex >= kvindices[kvoff + VALSTART]) ? nextindex - kvindices[kvoff + VALSTART] : (bufv... | /**
* Given an offset, populate vbytes with the associated set of
* deserialized value bytes. Should only be called during a spill.
*/ | Given an offset, populate vbytes with the associated set of deserialized value bytes. Should only be called during a spill | getVBytesForOffset | {
"repo_name": "wzhuo918/release-1.1.2-MDP",
"path": "src/mapred/org/apache/hadoop/mapred/MapTask.java",
"license": "apache-2.0",
"size": 59540
} | [
"org.apache.hadoop.io.DataInputBuffer"
] | import org.apache.hadoop.io.DataInputBuffer; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,512,224 |
public void normalConnect( String partitionId ) throws KettleDatabaseException {
if ( databaseMeta == null ) {
throw new KettleDatabaseException( "No valid database connection defined!" );
}
try {
DataSourceProviderInterface dsp = DataSourceProviderFactory.getDataSourceProviderInterface();
... | void function( String partitionId ) throws KettleDatabaseException { if ( databaseMeta == null ) { throw new KettleDatabaseException( STR ); } try { DataSourceProviderInterface dsp = DataSourceProviderFactory.getDataSourceProviderInterface(); if ( dsp == null ) { dsp = new DatabaseUtil(); } if ( databaseMeta.getAccessT... | /**
* Open the database connection. The algorithm is:
* <ol>
* <li>If <code>databaseMeta.getAccessType()</code> returns
* <code>DatabaseMeta.TYPE_ACCESS_JNDI</code>, then the connection's datasource is looked up in JNDI </li>
* <li>If <code>databaseMeta.isUsingConnectionPool()</code>, then the connection... | Open the database connection. The algorithm is: If <code>databaseMeta.getAccessType()</code> returns <code>DatabaseMeta.TYPE_ACCESS_JNDI</code>, then the connection's datasource is looked up in JNDI If <code>databaseMeta.isUsingConnectionPool()</code>, then the connection's datasource is looked up in the pool otherwise... | normalConnect | {
"repo_name": "tmcsantos/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/Database.java",
"license": "apache-2.0",
"size": 181888
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.database.DataSourceProviderInterface",
"org.pentaho.di.core.database.util.DatabaseUtil",
"org.pentaho.di.core.exception.KettleDatabaseException",
"org.pentaho.di.core.util.Utils"
] | import org.pentaho.di.core.Const; import org.pentaho.di.core.database.DataSourceProviderInterface; import org.pentaho.di.core.database.util.DatabaseUtil; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.util.Utils; | import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.core.database.util.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.util.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 153,181 |
@SuppressWarnings({"unchecked"})
protected Object readColumnValue(int colNdx, Class destinationType, Class<? extends SqlType> sqlTypeClass, int columnDbSqlType) {
if (colNdx != cachedColumnNdx) {
try {
SqlType sqlType;
if (sqlTypeClass != null) {
sqlType = SqlTypeManager.lookupSqlType(sqlTypeClass... | @SuppressWarnings({STR}) Object function(int colNdx, Class destinationType, Class<? extends SqlType> sqlTypeClass, int columnDbSqlType) { if (colNdx != cachedColumnNdx) { try { SqlType sqlType; if (sqlTypeClass != null) { sqlType = SqlTypeManager.lookupSqlType(sqlTypeClass); } else { sqlType = SqlTypeManager.lookup(des... | /**
* Reads column value from result set. Since this method may be called more then once for
* the same column, it caches column values.
*/ | Reads column value from result set. Since this method may be called more then once for the same column, it caches column values | readColumnValue | {
"repo_name": "007slm/jodd",
"path": "jodd-db/src/main/java/jodd/db/oom/mapper/DefaultResultSetMapper.java",
"license": "bsd-3-clause",
"size": 16247
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 782,276 |
@Test
public void testMapSerialization() throws Exception {
final long key = 0L;
final KeyGroupRange keyGroupRange = new KeyGroupRange(0, 0);
// objects for heap state list serialisation
final HeapKeyedStateBackend<Long> longHeapKeyedStateBackend =
new HeapKeyedStateBackend<>(
mock(TaskKvStateRegistr... | void function() throws Exception { final long key = 0L; final KeyGroupRange keyGroupRange = new KeyGroupRange(0, 0); final HeapKeyedStateBackend<Long> longHeapKeyedStateBackend = new HeapKeyedStateBackend<>( mock(TaskKvStateRegistry.class), LongSerializer.INSTANCE, ClassLoader.getSystemClassLoader(), keyGroupRange.getN... | /**
* Tests map serialization utils.
*/ | Tests map serialization utils | testMapSerialization | {
"repo_name": "mylog00/flink",
"path": "flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/network/KvStateRequestSerializerTest.java",
"license": "apache-2.0",
"size": 15323
} | [
"org.apache.flink.api.common.ExecutionConfig",
"org.apache.flink.api.common.state.MapStateDescriptor",
"org.apache.flink.api.common.typeutils.base.LongSerializer",
"org.apache.flink.api.common.typeutils.base.StringSerializer",
"org.apache.flink.queryablestate.client.VoidNamespace",
"org.apache.flink.query... | import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.state.MapStateDescriptor; import org.apache.flink.api.common.typeutils.base.LongSerializer; import org.apache.flink.api.common.typeutils.base.StringSerializer; import org.apache.flink.queryablestate.client.VoidNamespace; import org.a... | import org.apache.flink.api.common.*; import org.apache.flink.api.common.state.*; import org.apache.flink.api.common.typeutils.base.*; import org.apache.flink.queryablestate.client.*; import org.apache.flink.runtime.query.*; import org.apache.flink.runtime.state.*; import org.apache.flink.runtime.state.heap.*; import o... | [
"org.apache.flink",
"org.mockito"
] | org.apache.flink; org.mockito; | 2,890,604 |
Preconditions.checkArgument(workUnit.contains(ConfigurationKeys.CONVERTER_FILTER_FIELD_NAME),
"Missing required property converter.filter.field for the AvroFilterConverter class.");
Preconditions.checkArgument(workUnit.contains(ConfigurationKeys.CONVERTER_FILTER_FIELD_VALUE),
"Missing required prope... | Preconditions.checkArgument(workUnit.contains(ConfigurationKeys.CONVERTER_FILTER_FIELD_NAME), STR); Preconditions.checkArgument(workUnit.contains(ConfigurationKeys.CONVERTER_FILTER_FIELD_VALUE), STR); this.fieldName = workUnit.getProp(ConfigurationKeys.CONVERTER_FILTER_FIELD_NAME); this.fieldValue = workUnit.getProp(Co... | /**
* The config must specify {@link ConfigurationKeys#CONVERTER_FILTER_FIELD_NAME} to indicate which field to retrieve
* from the Avro record and {@link ConfigurationKeys#CONVERTER_FILTER_FIELD_VALUE} to indicate the expected value of
* the field.
* {@inheritDoc}
* @see gobblin.converter.Converter#init(... | The config must specify <code>ConfigurationKeys#CONVERTER_FILTER_FIELD_NAME</code> to indicate which field to retrieve from the Avro record and <code>ConfigurationKeys#CONVERTER_FILTER_FIELD_VALUE</code> to indicate the expected value of the field. | init | {
"repo_name": "chavdar/gobblin",
"path": "gobblin-core/src/main/java/gobblin/converter/filter/AvroFilterConverter.java",
"license": "apache-2.0",
"size": 3889
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 495,193 |
private static void enableXInclude(final DocumentBuilderFactory factory) {
try {
// Alternative: We set if a system property on the command line is set, for example:
// -DLog4j.XInclude=true
factory.setXIncludeAware(true);
} catch (final UnsupportedOperationExcept... | static void function(final DocumentBuilderFactory factory) { try { factory.setXIncludeAware(true); } catch (final UnsupportedOperationException e) { LOGGER.warn(STR, factory, e); } catch (@SuppressWarnings(STR) final AbstractMethodError NoSuchMethodError err) { LOGGER.warn(STR, factory, err); } try { factory.setFeature... | /**
* Enables XInclude for the given DocumentBuilderFactory
*
* @param factory a DocumentBuilderFactory
*/ | Enables XInclude for the given DocumentBuilderFactory | enableXInclude | {
"repo_name": "lburgazzoli/apache-logging-log4j2",
"path": "log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java",
"license": "apache-2.0",
"size": 15995
} | [
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException"
] | import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; | import javax.xml.parsers.*; | [
"javax.xml"
] | javax.xml; | 2,435,862 |
@Test
public void testSetSelected() {
List<NodeInterface> nodeTypeList = new ArrayList<NodeInterface>();
List<SLDDataInterface> sldDataList = new ArrayList<SLDDataInterface>();
try {
FileTreeNode sldTreeNode = new FileTreeNode(new File("/test"), "test.sld");
sld... | void function() { List<NodeInterface> nodeTypeList = new ArrayList<NodeInterface>(); List<SLDDataInterface> sldDataList = new ArrayList<SLDDataInterface>(); try { FileTreeNode sldTreeNode = new FileTreeNode(new File("/test"), STR); sldTreeNode.setFileCategory(FileTreeNodeTypeEnum.SLD); nodeTypeList.add(sldTreeNode); sl... | /**
* Test method for {@link
* com.sldeditor.tool.connectionlist.GeoServerConnectionListTool#setSelectedItems(java.util.List,
* java.util.List)}.
*/ | Test method for <code>com.sldeditor.tool.connectionlist.GeoServerConnectionListTool#setSelectedItems(java.util.List, java.util.List)</code> | testSetSelected | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/test/java/com/sldeditor/test/unit/tool/layerstyle/GeoServerLayerUpdateToolTest.java",
"license": "gpl-3.0",
"size": 17731
} | [
"com.sldeditor.common.NodeInterface",
"com.sldeditor.common.SLDDataInterface",
"com.sldeditor.common.data.SLDData",
"com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNode",
"com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNodeTypeEnum",
"java.io.File",
"java.io.FileNotFoun... | import com.sldeditor.common.NodeInterface; import com.sldeditor.common.SLDDataInterface; import com.sldeditor.common.data.SLDData; import com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNode; import com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNodeTypeEnum; import java.io.File; import... | import com.sldeditor.common.*; import com.sldeditor.common.data.*; import com.sldeditor.datasource.extension.filesystem.node.file.*; import java.io.*; import java.util.*; import org.junit.jupiter.api.*; | [
"com.sldeditor.common",
"com.sldeditor.datasource",
"java.io",
"java.util",
"org.junit.jupiter"
] | com.sldeditor.common; com.sldeditor.datasource; java.io; java.util; org.junit.jupiter; | 1,356,092 |
ActuateType getActuate(); | ActuateType getActuate(); | /**
* Returns the value of the '<em><b>Actuate</b></em>' attribute.
* The literals are from the enumeration {@link org.w3.xlink.ActuateType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Actuate</em>' attribute isn't clear,
* there really should be more of a description her... | Returns the value of the 'Actuate' attribute. The literals are from the enumeration <code>org.w3.xlink.ActuateType</code>. If the meaning of the 'Actuate' attribute isn't clear, there really should be more of a description here... | getActuate | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/net/opengis/gml311/OperationRefType.java",
"license": "lgpl-2.1",
"size": 15043
} | [
"org.w3.xlink.ActuateType"
] | import org.w3.xlink.ActuateType; | import org.w3.xlink.*; | [
"org.w3.xlink"
] | org.w3.xlink; | 62,293 |
@Override
public CompletableFuture<LogRecordWithDLSN> getLastLogRecordAsync() {
return getLastLogRecordAsyncInternal(false, false);
} | CompletableFuture<LogRecordWithDLSN> function() { return getLastLogRecordAsyncInternal(false, false); } | /**
* Get Latest log record in the log.
*
* @return latest log record
*/ | Get Latest log record in the log | getLastLogRecordAsync | {
"repo_name": "sijie/bookkeeper",
"path": "stream/distributedlog/core/src/main/java/org/apache/distributedlog/BKDistributedLogManager.java",
"license": "apache-2.0",
"size": 42167
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,491,029 |
private int nodeJavaMajorVersion(ClusterNode node) throws IgniteCheckedException {
try {
// The format is identical for Oracle JDK, OpenJDK and IBM JDK.
return Integer.parseInt(node.<String>attribute("java.version").split("\\.")[1]);
}
catch (Exception e) {
... | int function(ClusterNode node) throws IgniteCheckedException { try { return Integer.parseInt(node.<String>attribute(STR).split("\\.")[1]); } catch (Exception e) { U.error(log, STR + node.<String>attribute(STR) + "]", e); return 0; } } | /**
* Gets Java major version running on the node.
*
* @param node Cluster node.
* @return Java major version.
* @throws IgniteCheckedException If failed to get the version.
*/ | Gets Java major version running on the node | nodeJavaMajorVersion | {
"repo_name": "ntikhonov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 113733
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,783,872 |
HttpServletRequest httpRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String ipAddress = httpRequest.getHeader("X-FORWARDED-FOR");
if (ipAddress == null) {
ipAddress = httpRequest.getRemoteAddr();
}
return ipAddress;
}
| HttpServletRequest httpRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); String ipAddress = httpRequest.getHeader(STR); if (ipAddress == null) { ipAddress = httpRequest.getRemoteAddr(); } return ipAddress; } | /**
* returns the Ip Address of the current logged in user using HTTP request
* @return Ip Address
*/ | returns the Ip Address of the current logged in user using HTTP request | getIpAddress | {
"repo_name": "alaa-ayyad/Sample-Spring-MVC",
"path": "src/main/java/utils/AppUtils.java",
"license": "mit",
"size": 1015
} | [
"javax.servlet.http.HttpServletRequest",
"org.springframework.web.context.request.RequestContextHolder",
"org.springframework.web.context.request.ServletRequestAttributes"
] | import javax.servlet.http.HttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; | import javax.servlet.http.*; import org.springframework.web.context.request.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 1,771,182 |
private synchronized void handleWatchdog() {
final int exitCode;
if (watchdog == null)
return;
if (watchdogTimeout == 0)
return;
if (!isRunning()) {
exitCode = OnCommandResultListener.SHELL_DIED;
De... | synchronized void function() { final int exitCode; if (watchdog == null) return; if (watchdogTimeout == 0) return; if (!isRunning()) { exitCode = OnCommandResultListener.SHELL_DIED; Debug.log(String.format(STR, shell.toUpperCase(Locale.ENGLISH))); } else if (watchdogCount++ < watchdogTimeout) { return; } else { exitCod... | /**
* Called from a ScheduledThreadPoolExecutor timer thread every second
* when there is an outstanding command
*/ | Called from a ScheduledThreadPoolExecutor timer thread every second when there is an outstanding command | handleWatchdog | {
"repo_name": "54dxs/mobilesafe",
"path": "ms/src/eu/chainfire/libsuperuser/Shell.java",
"license": "apache-2.0",
"size": 68561
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 33,866 |
public static <T> T open(File file, Class<T> clazz, DriverRegistry registry) throws IOException {
return open(file.toURI(), clazz, registry);
} | static <T> T function(File file, Class<T> clazz, DriverRegistry registry) throws IOException { return open(file.toURI(), clazz, registry); } | /**
* Opens a connection to data specified by a file.
* <p>
* The optional <tt>class</tt> parameter is used to filter the candidate driver set. For
* example to constrain to workspace drivers.
* <pre><code>
* Workspace ws = Drivers.open(..., Workspace.class);
* </code></pre>
* <... | Opens a connection to data specified by a file. The optional class parameter is used to filter the candidate driver set. For example to constrain to workspace drivers. <code><code> Workspace ws = Drivers.open(..., Workspace.class); </code></code> | open | {
"repo_name": "geosolutions-it/jeo",
"path": "core/src/main/java/org/jeo/data/Drivers.java",
"license": "apache-2.0",
"size": 13091
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,163,428 |
public static <A> BoundNullaryPredicate bind(Predicate<? super A> predicate, A arg) {
return null == predicate ? null : new BoundNullaryPredicate(predicate, arg);
} | static <A> BoundNullaryPredicate function(Predicate<? super A> predicate, A arg) { return null == predicate ? null : new BoundNullaryPredicate(predicate, arg); } | /**
* Adapt the given, possibly-<code>null</code>,
* {@link Predicate Predicate} to the
* {@link NullaryPredicate NullaryPredicate} interface by binding
* the specified <code>Object</code> as a constant
* argument.
* When the given <code>Predicate</code> is <code>null</code>,
* return... | Adapt the given, possibly-<code>null</code>, <code>Predicate Predicate</code> to the <code>NullaryPredicate NullaryPredicate</code> interface by binding the specified <code>Object</code> as a constant argument. When the given <code>Predicate</code> is <code>null</code>, returns <code>null</code> | bind | {
"repo_name": "apache/commons-functor",
"path": "core/src/main/java/org/apache/commons/functor/adapter/BoundNullaryPredicate.java",
"license": "apache-2.0",
"size": 3953
} | [
"org.apache.commons.functor.Predicate"
] | import org.apache.commons.functor.Predicate; | import org.apache.commons.functor.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,959,419 |
public void setActivateOnItemClick(boolean activateOnItemClick) {
// When setting CHOICE_MODE_SINGLE, ListView will automatically
// give items the 'activated' state when touched.
getListView().setChoiceMode(
activateOnItemClick ? ListView.CHOICE_MODE_SINGLE
: ListView.CHOICE_MODE_NONE);
} | void function(boolean activateOnItemClick) { getListView().setChoiceMode( activateOnItemClick ? ListView.CHOICE_MODE_SINGLE : ListView.CHOICE_MODE_NONE); } | /**
* Turns on activate-on-click mode. When this mode is on, list items will be
* given the 'activated' state when touched.
*/ | Turns on activate-on-click mode. When this mode is on, list items will be given the 'activated' state when touched | setActivateOnItemClick | {
"repo_name": "dansun/Gameofkrowns",
"path": "gameofkrowns-client/gameofkrowns-androidclient/src/nu/danielsundberg/droid/gameofkrowns/list/activity/GameofkrownsListFragment.java",
"license": "apache-2.0",
"size": 4678
} | [
"android.widget.ListView"
] | import android.widget.ListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,543,745 |
protected void initDataBindings() {
JTableBinding<TvShowChooserModel, List<TvShowChooserModel>, JTable> jTableBinding = SwingBindings.createJTableBinding(UpdateStrategy.READ,
tvShowsFound, table);
//
BeanProperty<TvShowChooserModel, String> tvShowChooserModelBeanProperty = BeanProperty.create("com... | void function() { JTableBinding<TvShowChooserModel, List<TvShowChooserModel>, JTable> jTableBinding = SwingBindings.createJTableBinding(UpdateStrategy.READ, tvShowsFound, table); jTableBinding.addColumnBinding(tvShowChooserModelBeanProperty).setEditable(false); BeanProperty<JTextPane, String> jTextPaneBeanProperty = Be... | /**
* Inits the data bindings.
*/ | Inits the data bindings | initDataBindings | {
"repo_name": "mlaggner/tinyMediaManager",
"path": "src/org/tinymediamanager/ui/tvshows/dialogs/TvShowChooserDialog.java",
"license": "apache-2.0",
"size": 24583
} | [
"java.util.List",
"javax.swing.JTable",
"javax.swing.JTextArea",
"javax.swing.JTextPane",
"org.jdesktop.beansbinding.AutoBinding",
"org.jdesktop.beansbinding.BeanProperty",
"org.jdesktop.beansbinding.Bindings",
"org.jdesktop.swingbinding.JTableBinding",
"org.jdesktop.swingbinding.SwingBindings",
"... | import java.util.List; import javax.swing.JTable; import javax.swing.JTextArea; import javax.swing.JTextPane; import org.jdesktop.beansbinding.AutoBinding; import org.jdesktop.beansbinding.BeanProperty; import org.jdesktop.beansbinding.Bindings; import org.jdesktop.swingbinding.JTableBinding; import org.jdesktop.swingb... | import java.util.*; import javax.swing.*; import org.jdesktop.beansbinding.*; import org.jdesktop.swingbinding.*; import org.tinymediamanager.ui.components.*; import org.tinymediamanager.ui.tvshows.*; | [
"java.util",
"javax.swing",
"org.jdesktop.beansbinding",
"org.jdesktop.swingbinding",
"org.tinymediamanager.ui"
] | java.util; javax.swing; org.jdesktop.beansbinding; org.jdesktop.swingbinding; org.tinymediamanager.ui; | 2,207,998 |
public void cancel() {
ScheduledFuture<?> future = this.future;
if (future != null) {
future.cancel(true);
}
} | void function() { ScheduledFuture<?> future = this.future; if (future != null) { future.cancel(true); } } | /**
* Trigger cancellation of this scheduled task.
*/ | Trigger cancellation of this scheduled task | cancel | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTask.java",
"license": "apache-2.0",
"size": 1726
} | [
"java.util.concurrent.ScheduledFuture"
] | import java.util.concurrent.ScheduledFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,384,385 |
public static void storeDate(Date date, byte[] dest, int offset) {
Calendar cal = new GregorianCalendar();
cal.setTime(date);
LittleEndian.putShort(dest, offset + 0, (short) cal.get(Calendar.YEAR));
LittleEndian.putShort(dest, offset + 2, (short)(cal.get(Calendar.MONTH) + 1));
... | static void function(Date date, byte[] dest, int offset) { Calendar cal = new GregorianCalendar(); cal.setTime(date); LittleEndian.putShort(dest, offset + 0, (short) cal.get(Calendar.YEAR)); LittleEndian.putShort(dest, offset + 2, (short)(cal.get(Calendar.MONTH) + 1)); LittleEndian.putShort(dest, offset + 4, (short)(ca... | /**
* Convert the supplied java Date into a SystemTime struct, and write it
* into the supplied byte array.
*/ | Convert the supplied java Date into a SystemTime struct, and write it into the supplied byte array | storeDate | {
"repo_name": "benjaminy/STuneLite",
"path": "OldJavaImplementation/poi-3.2-FINAL/src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java",
"license": "gpl-2.0",
"size": 3908
} | [
"java.util.Calendar",
"java.util.Date",
"java.util.GregorianCalendar",
"org.apache.poi.util.LittleEndian"
] | import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import org.apache.poi.util.LittleEndian; | import java.util.*; import org.apache.poi.util.*; | [
"java.util",
"org.apache.poi"
] | java.util; org.apache.poi; | 1,018,185 |
public void removeSafeChannel(Channel channel)
{
if (channel == null)
throw new IllegalArgumentException("invalid channel");
m_mSafeChannels.remove(channel.getSafeName().toLowerCase());
m_logger.log(Level.INFO, "safe channel removed from server '"
+ m_strName + "': " + channel.getName());
} | void function(Channel channel) { if (channel == null) throw new IllegalArgumentException(STR); m_mSafeChannels.remove(channel.getSafeName().toLowerCase()); m_logger.log(Level.INFO, STR + m_strName + STR + channel.getName()); } | /**
* Removes a safe channel from this server.
*
* @param channel
* the channel to remove.
*/ | Removes a safe channel from this server | removeSafeChannel | {
"repo_name": "bhuisgen/hbircs",
"path": "src/fr/hbis/ircs/Server.java",
"license": "gpl-2.0",
"size": 16161
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,529,059 |
public CdataMatcher cdataMatcher() throws TagValidationException {
return this.back().getCdataMatcher();
} | CdataMatcher function() throws TagValidationException { return this.back().getCdataMatcher(); } | /**
* Returns the cdata matcher for the tag currently on the stack. If there
* is no cdata matcher, returns null.
*
* @return returns the CdataMatcher for the tag currently on the stack.
* @throws TagValidationException the TagValidationException.
*/ | Returns the cdata matcher for the tag currently on the stack. If there is no cdata matcher, returns null | cdataMatcher | {
"repo_name": "taboola/amphtml",
"path": "validator/java/src/main/java/dev/amp/validator/TagStack.java",
"license": "apache-2.0",
"size": 21478
} | [
"dev.amp.validator.exception.TagValidationException"
] | import dev.amp.validator.exception.TagValidationException; | import dev.amp.validator.exception.*; | [
"dev.amp.validator"
] | dev.amp.validator; | 1,538,433 |
@Test(timeout = 100000)
public void testRestartBetweenWrites() throws Exception {
// Create a non-replicated table for this test, so that
// we're sure when we reconnect to the leader after restarting
// the tablet servers, it's definitely the same leader we wrote
// to before.
KuduTable nonRepl... | @Test(timeout = 100000) void function() throws Exception { KuduTable nonReplicatedTable = harness.getClient().createTable( STR, schema, getBasicCreateTableOptions().setNumReplicas(1)); try { AsyncKuduSession session = client.newSession(); session.setTimeoutMillis(30000); session.setFlushMode(SessionConfiguration.FlushM... | /**
* Regression test for a bug in which, when a tablet client is disconnected
* and we reconnect, we were previously leaking the old RpcProxy
* object in the client2tablets map.
*/ | Regression test for a bug in which, when a tablet client is disconnected and we reconnect, we were previously leaking the old RpcProxy object in the client2tablets map | testRestartBetweenWrites | {
"repo_name": "InspurUSA/kudu",
"path": "java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduSession.java",
"license": "apache-2.0",
"size": 21805
} | [
"org.apache.kudu.test.ClientTestUtil",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.kudu.test.ClientTestUtil; import org.junit.Assert; import org.junit.Test; | import org.apache.kudu.test.*; import org.junit.*; | [
"org.apache.kudu",
"org.junit"
] | org.apache.kudu; org.junit; | 1,216,330 |
public Map<String, Collection<String>> getInstalledAssetNames() {
if (installAssets == null)
return null;
Map<String, Collection<String>> installed = new HashMap<String, Collection<String>>();
Collection<String> installedAddons = new ArrayList<String>();
Collection<String... | Map<String, Collection<String>> function() { if (installAssets == null) return null; Map<String, Collection<String>> installed = new HashMap<String, Collection<String>>(); Collection<String> installedAddons = new ArrayList<String>(); Collection<String> installedFeatures = new ArrayList<String>(); Collection<String> ins... | /**
* Gets the names of assets inside installAssets
*
* @return Map of asset types and collections of asset names
*/ | Gets the names of assets inside installAssets | getInstalledAssetNames | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.install/src/com/ibm/ws/install/internal/Director.java",
"license": "epl-1.0",
"size": 93799
} | [
"com.ibm.ws.install.InstallConstants",
"com.ibm.ws.install.internal.asset.ESAAsset",
"com.ibm.ws.install.internal.asset.InstallAsset",
"java.util.ArrayList",
"java.util.Collection",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.ibm.ws.install.InstallConstants; import com.ibm.ws.install.internal.asset.ESAAsset; import com.ibm.ws.install.internal.asset.InstallAsset; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.ibm.ws.install.*; import com.ibm.ws.install.internal.asset.*; import java.util.*; | [
"com.ibm.ws",
"java.util"
] | com.ibm.ws; java.util; | 2,721,857 |
private static Collection<HalfEdge> createPHalfEdges(SpqrNode node) {
Iterator<MultiVertex> vertexIterator = node.skeleton.vertices.iterator();
Vertex vertex1 = node.skeletonVertexToVertex.get(vertexIterator.next());
Vertex vertex2 = node.skeletonVertexToVertex.get(vertexIterator.next());
... | static Collection<HalfEdge> function(SpqrNode node) { Iterator<MultiVertex> vertexIterator = node.skeleton.vertices.iterator(); Vertex vertex1 = node.skeletonVertexToVertex.get(vertexIterator.next()); Vertex vertex2 = node.skeletonVertexToVertex.get(vertexIterator.next()); int edgeCount = node.skeleton.vertices.iterato... | /**
* Returns the HalfEdges for the skeleton of the specified node of type SpqrNode.Type.P. This does not set the
* virtualMatch fields.
*/ | Returns the HalfEdges for the skeleton of the specified node of type SpqrNode.Type.P. This does not set the virtualMatch fields | createPHalfEdges | {
"repo_name": "btrekkie/reductions",
"path": "src/com/github/btrekkie/graph/ec/EcPlanarEmbedding.java",
"license": "mit",
"size": 61994
} | [
"com.github.btrekkie.graph.MultiVertex",
"com.github.btrekkie.graph.Vertex",
"com.github.btrekkie.graph.spqr.SpqrNode",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List"
] | import com.github.btrekkie.graph.MultiVertex; import com.github.btrekkie.graph.Vertex; import com.github.btrekkie.graph.spqr.SpqrNode; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; | import com.github.btrekkie.graph.*; import com.github.btrekkie.graph.spqr.*; import java.util.*; | [
"com.github.btrekkie",
"java.util"
] | com.github.btrekkie; java.util; | 1,951,738 |
private boolean isVarArgsParameter(
Node param, @Nullable JSDocInfo info) {
if (codingConvention.isVarArgsParameter(param)) {
return true;
}
String paramName = param.getString();
return info != null && info.hasParameterType(paramName) &&
info.getParameterType(paramName).isVarArgs(... | boolean function( Node param, @Nullable JSDocInfo info) { if (codingConvention.isVarArgsParameter(param)) { return true; } String paramName = param.getString(); return info != null && info.hasParameterType(paramName) && info.getParameterType(paramName).isVarArgs(); } | /**
* Determine whether this is a var args parameter.
* @return Whether the given param is a var args param.
*/ | Determine whether this is a var args parameter | isVarArgsParameter | {
"repo_name": "zombiezen/cardcpx",
"path": "third_party/closure-compiler/src/com/google/javascript/jscomp/FunctionTypeBuilder.java",
"license": "apache-2.0",
"size": 33864
} | [
"com.google.javascript.rhino.JSDocInfo",
"com.google.javascript.rhino.Node",
"javax.annotation.Nullable"
] | import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import javax.annotation.Nullable; | import com.google.javascript.rhino.*; import javax.annotation.*; | [
"com.google.javascript",
"javax.annotation"
] | com.google.javascript; javax.annotation; | 977,890 |
public void setOriginalDocument(JsonDoc doc) {
originalDoc = doc;
} | void function(JsonDoc doc) { originalDoc = doc; } | /**
* Sets the copy of the document before any modifications
*/ | Sets the copy of the document before any modifications | setOriginalDocument | {
"repo_name": "dcrissman/lightblue-core",
"path": "crud/src/main/java/com/redhat/lightblue/crud/DocCtx.java",
"license": "gpl-3.0",
"size": 4670
} | [
"com.redhat.lightblue.util.JsonDoc"
] | import com.redhat.lightblue.util.JsonDoc; | import com.redhat.lightblue.util.*; | [
"com.redhat.lightblue"
] | com.redhat.lightblue; | 291,911 |
public List<T> pollAll() {
List<T> retList = new ArrayList<>(size);
for (LinkedElement<T> entry : entries) {
LinkedElement<T> current = entry;
while (current != null) {
retList.add(current.element);
current = current.next;
}
}
this.clear();
return retList;
} | List<T> function() { List<T> retList = new ArrayList<>(size); for (LinkedElement<T> entry : entries) { LinkedElement<T> current = entry; while (current != null) { retList.add(current.element); current = current.next; } } this.clear(); return retList; } | /**
* Remove all elements from the set and return them. Clear the entries.
*/ | Remove all elements from the set and return them. Clear the entries | pollAll | {
"repo_name": "robzor92/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightHashSet.java",
"license": "apache-2.0",
"size": 17531
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,708,349 |
public Integer doCommitX(final byte[] regionName,
final long transactionId,
final long commitId,
final int participantNum,
final boolean ignoreUnknownTransaction) throws CommitUnsuccessfulException, IOException {
boolean retry... | Integer function(final byte[] regionName, final long transactionId, final long commitId, final int participantNum, final boolean ignoreUnknownTransaction) throws CommitUnsuccessfulException, IOException { boolean retry = false; boolean refresh = false; int retryCount = 0; int retrySleep = TM_SLEEP; if( TRANSACTION_ALGO... | /**
* Method : doCommitX
* Params : regionName - name of Region
* transactionId - transaction identifier
* Return : Always 0, can ignore
* Purpose : Call commit for a given regionserver
*/ | Method : doCommitX Params : regionName - name of Region transactionId - transaction identifier Return : Always 0, can ignore Purpose : Call commit for a given regionserver | doCommitX | {
"repo_name": "mashengchen/incubator-trafodion",
"path": "core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java",
"license": "apache-2.0",
"size": 162039
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.coprocessor.Batch",
"org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos",
"org.apache.hadoop.hbase.ipc.BlockingRpcCallback",
"org.apache.hadoop.hbase.ipc.ServerRpcController"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.coprocessor.Batch; import org.apache.hadoop.hbase.coprocessor.transactional.generated.TrxRegionProtos; import org.apache.hadoop.hbase.ipc.BlockingRpcCallback; import org.apache.hadoop.hbase.ipc.ServerRpcController; | import java.io.*; import org.apache.hadoop.hbase.client.coprocessor.*; import org.apache.hadoop.hbase.coprocessor.transactional.generated.*; import org.apache.hadoop.hbase.ipc.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 315,778 |
public static LabeledVectorSet loadDatasetFromTxt(String rsrcPath, boolean isFallOnBadData) {
try {
Path path = Paths.get(LabeledDatasetHelper.class.getClassLoader().getResource(rsrcPath).toURI());
try {
return LabeledDatasetLoader.loadFromTxtFile(path, SEPARATOR, isF... | static LabeledVectorSet function(String rsrcPath, boolean isFallOnBadData) { try { Path path = Paths.get(LabeledDatasetHelper.class.getClassLoader().getResource(rsrcPath).toURI()); try { return LabeledDatasetLoader.loadFromTxtFile(path, SEPARATOR, isFallOnBadData); } catch (IOException e) { e.printStackTrace(); } } cat... | /**
* Loads labeled dataset from file with .txt extension.
*
* @param rsrcPath path to dataset.
* @return Null if path is incorrect.
*/ | Loads labeled dataset from file with .txt extension | loadDatasetFromTxt | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/ml/src/test/java/org/apache/ignite/ml/knn/LabeledDatasetHelper.java",
"license": "apache-2.0",
"size": 1995
} | [
"java.io.IOException",
"java.net.URISyntaxException",
"java.nio.file.Path",
"java.nio.file.Paths",
"org.apache.ignite.ml.structures.LabeledVectorSet",
"org.apache.ignite.ml.structures.preprocessing.LabeledDatasetLoader"
] | import java.io.IOException; import java.net.URISyntaxException; import java.nio.file.Path; import java.nio.file.Paths; import org.apache.ignite.ml.structures.LabeledVectorSet; import org.apache.ignite.ml.structures.preprocessing.LabeledDatasetLoader; | import java.io.*; import java.net.*; import java.nio.file.*; import org.apache.ignite.ml.structures.*; import org.apache.ignite.ml.structures.preprocessing.*; | [
"java.io",
"java.net",
"java.nio",
"org.apache.ignite"
] | java.io; java.net; java.nio; org.apache.ignite; | 1,030,495 |
public BufferedImage retrieveFromImageCache(String imagePath, ColorRule colorRule, double zoom) throws IOException
{ return imageCache.retrieveImage(imagePath,colorRule,zoom);
}
| BufferedImage function(String imagePath, ColorRule colorRule, double zoom) throws IOException { return imageCache.retrieveImage(imagePath,colorRule,zoom); } | /**
* retrieve an image for the cache, loading it if necessary,
* or processing it by resizing/coloring an existing neutral image.
* Note: the color parameter only indicates the use of a colormap,
* it should be null if no colormap is used (even in the case of a colored sprite).
*/ | retrieve an image for the cache, loading it if necessary, or processing it by resizing/coloring an existing neutral image. Note: the color parameter only indicates the use of a colormap, it should be null if no colormap is used (even in the case of a colored sprite) | retrieveFromImageCache | {
"repo_name": "vlabatut/totalboumboum",
"path": "src/org/totalboumboum/configuration/engine/EngineConfiguration.java",
"license": "gpl-2.0",
"size": 8349
} | [
"java.awt.image.BufferedImage",
"java.io.IOException",
"org.totalboumboum.engine.content.feature.gesture.anime.color.ColorRule"
] | import java.awt.image.BufferedImage; import java.io.IOException; import org.totalboumboum.engine.content.feature.gesture.anime.color.ColorRule; | import java.awt.image.*; import java.io.*; import org.totalboumboum.engine.content.feature.gesture.anime.color.*; | [
"java.awt",
"java.io",
"org.totalboumboum.engine"
] | java.awt; java.io; org.totalboumboum.engine; | 301,659 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.