method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static Class<?> getGenericCollectionTypeOfFieldWithSecondOrderForList(Field next) { if (!List.class.isAssignableFrom(next.getType())) { return getGenericCollectionTypeOfField(next); } Class<?> type; ParameterizedType collectionType = (ParameterizedType) next.getGenericType(); Type firstArg = col...
static Class<?> function(Field next) { if (!List.class.isAssignableFrom(next.getType())) { return getGenericCollectionTypeOfField(next); } Class<?> type; ParameterizedType collectionType = (ParameterizedType) next.getGenericType(); Type firstArg = collectionType.getActualTypeArguments()[0]; if (ParameterizedType.class....
/** * For a field of type List<Enumeration<Foo>>, returns Foo */
For a field of type List>, returns Foo
getGenericCollectionTypeOfFieldWithSecondOrderForList
{ "repo_name": "aemay2/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java", "license": "apache-2.0", "size": 9978 }
[ "java.lang.reflect.Field", "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "java.util.List" ]
import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,686,990
public List<EForm> findByStatus(boolean status) { return findByStatus(status, null); }
List<EForm> function(boolean status) { return findByStatus(status, null); }
/** * Finds all eforms based on the status. * * @param status * Status to be used when looking up forms. * @return * Returns the list of all forms with the specified status. */
Finds all eforms based on the status
findByStatus
{ "repo_name": "scoophealth/oscar", "path": "src/main/java/org/oscarehr/common/dao/EFormDao.java", "license": "gpl-2.0", "size": 7418 }
[ "java.util.List", "org.oscarehr.common.model.EForm" ]
import java.util.List; import org.oscarehr.common.model.EForm;
import java.util.*; import org.oscarehr.common.model.*;
[ "java.util", "org.oscarehr.common" ]
java.util; org.oscarehr.common;
1,261,825
try { return (AnlageklasseCustomBean)CidsBean.createNewCidsBeanFromTableName( LagisConstants.DOMAIN_LAGIS, LagisMetaclassConstants.ANLAGEKLASSE); } catch (Exception ex) { LOG.error("error creating " + LagisMetaclassConstants.ANLAGEKLASSE + " bean",...
try { return (AnlageklasseCustomBean)CidsBean.createNewCidsBeanFromTableName( LagisConstants.DOMAIN_LAGIS, LagisMetaclassConstants.ANLAGEKLASSE); } catch (Exception ex) { LOG.error(STR + LagisMetaclassConstants.ANLAGEKLASSE + STR, ex); return null; } }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
createNew
{ "repo_name": "cismet/lagis-client", "path": "src/main/java/de/cismet/cids/custom/beans/lagis/AnlageklasseCustomBean.java", "license": "gpl-3.0", "size": 3348 }
[ "de.cismet.cids.dynamics.CidsBean", "de.cismet.lagis.commons.LagisConstants", "de.cismet.lagis.commons.LagisMetaclassConstants" ]
import de.cismet.cids.dynamics.CidsBean; import de.cismet.lagis.commons.LagisConstants; import de.cismet.lagis.commons.LagisMetaclassConstants;
import de.cismet.cids.dynamics.*; import de.cismet.lagis.commons.*;
[ "de.cismet.cids", "de.cismet.lagis" ]
de.cismet.cids; de.cismet.lagis;
1,497,644
@Test public void testConcurrency() { final int numThreads = 5; final int numTimestamps = 10000; final long bucketMs = 1000; final String[] topics = {"topic0", "topic1", "topic2"}; final AuditType[] auditTypes = {AuditType.SUCCESS, AuditType.FAILURE, AuditType.ATTEMPT}; Recorder[] recorders ...
void function() { final int numThreads = 5; final int numTimestamps = 10000; final long bucketMs = 1000; final String[] topics = {STR, STR, STR}; final AuditType[] auditTypes = {AuditType.SUCCESS, AuditType.FAILURE, AuditType.ATTEMPT}; Recorder[] recorders = new Recorder[5]; Time time = new MockTime(); TestingAuditor a...
/** * The test runs 5 recorder threads. The main thread keeps ticking manually to see if there would be race condition * that causes the counts mismatch. */
The test runs 5 recorder threads. The main thread keeps ticking manually to see if there would be race condition that causes the counts mismatch
testConcurrency
{ "repo_name": "smccauliff/likafka-clients", "path": "src/test/java/com/linkedin/kafka/clients/auditing/abstractimpl/AbstractAuditorTest.java", "license": "bsd-2-clause", "size": 10633 }
[ "com.linkedin.kafka.clients.auditing.AuditType", "com.linkedin.kafka.clients.auditing.Auditor", "java.util.HashMap", "java.util.Map", "java.util.concurrent.atomic.AtomicLong", "org.apache.kafka.common.utils.Time", "org.testng.Assert" ]
import com.linkedin.kafka.clients.auditing.AuditType; import com.linkedin.kafka.clients.auditing.Auditor; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import org.apache.kafka.common.utils.Time; import org.testng.Assert;
import com.linkedin.kafka.clients.auditing.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.kafka.common.utils.*; import org.testng.*;
[ "com.linkedin.kafka", "java.util", "org.apache.kafka", "org.testng" ]
com.linkedin.kafka; java.util; org.apache.kafka; org.testng;
2,132,755
private void mouseReleasedAction(MouseEvent arg0){ if(resizing){//if we were in rezise of the grid, stop resizing resizing=false; }else if(select_mode==1 || select_mode==2){//we were in start mode or uncertain mode, now we know that we should go in click mode select_mode=3;//...
void function(MouseEvent arg0){ if(resizing){ resizing=false; }else if(select_mode==1 select_mode==2){ select_mode=3; }else if(select_mode==3 select_mode==4){ select_mode=0; Main.mainFrame.roomPane.wordEntryPane.sendWord(true); resetDicesStatus(); } repaint(); }
/** * Action when mouse boutton is released on the grid * @param arg0 */
Action when mouse boutton is released on the grid
mouseReleasedAction
{ "repo_name": "inouire/baggle", "path": "baggle-client/src/inouire/baggle/client/gui/modules/BoardPanel.java", "license": "gpl-3.0", "size": 28393 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,880,548
@Test public void isEmpty() { World w = new World(); TestCase.assertTrue(w.isEmpty()); Body b1 = new Body(); Body b2 = new Body(); Joint j = new DistanceJoint(b1, b2, new Vector2(), new Vector2()); w.addBody(b1); TestCase.assertFalse(w.isEmpty()); w.removeAllBodiesAndJoints(...
void function() { World w = new World(); TestCase.assertTrue(w.isEmpty()); Body b1 = new Body(); Body b2 = new Body(); Joint j = new DistanceJoint(b1, b2, new Vector2(), new Vector2()); w.addBody(b1); TestCase.assertFalse(w.isEmpty()); w.removeAllBodiesAndJoints(); TestCase.assertTrue(w.isEmpty()); w.addJoint(j); TestC...
/** * Tests the isEmpty method. * @since 3.0.2 */
Tests the isEmpty method
isEmpty
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/dynamics/WorldTest.java", "license": "bsd-3-clause", "size": 27828 }
[ "junit.framework.TestCase", "org.dyn4j.dynamics.joint.DistanceJoint", "org.dyn4j.dynamics.joint.Joint", "org.dyn4j.geometry.Vector2" ]
import junit.framework.TestCase; import org.dyn4j.dynamics.joint.DistanceJoint; import org.dyn4j.dynamics.joint.Joint; import org.dyn4j.geometry.Vector2;
import junit.framework.*; import org.dyn4j.dynamics.joint.*; import org.dyn4j.geometry.*;
[ "junit.framework", "org.dyn4j.dynamics", "org.dyn4j.geometry" ]
junit.framework; org.dyn4j.dynamics; org.dyn4j.geometry;
690,703
public static boolean useLatest(final String json, final int modifyTime) { try { final AtomicFile file = new AtomicFile(getUpdatedFile()); final FileOutputStream fos = file.startWrite(); fos.write(json.getBytes("utf-8")); file.finishWrite(fos); } catch (IOException e) { AppLog.d(TAG, "Failed to wr...
static boolean function(final String json, final int modifyTime) { try { final AtomicFile file = new AtomicFile(getUpdatedFile()); final FileOutputStream fos = file.startWrite(); fos.write(json.getBytes("utf-8")); file.finishWrite(fos); } catch (IOException e) { AppLog.d(TAG, STR, e); return false; } Preferences.setInt...
/** * Must be assumed that the given json is valid. * Pass the json to the {@link #isValid(String)} first. * * @return true when success */
Must be assumed that the given json is valid. Pass the json to the <code>#isValid(String)</code> first
useLatest
{ "repo_name": "infojulio/androidbible", "path": "Alkitab/src/main/java/yuku/alkitab/base/config/VersionConfig.java", "license": "apache-2.0", "size": 5122 }
[ "android.support.v4.util.AtomicFile", "java.io.FileOutputStream", "java.io.IOException" ]
import android.support.v4.util.AtomicFile; import java.io.FileOutputStream; import java.io.IOException;
import android.support.v4.util.*; import java.io.*;
[ "android.support", "java.io" ]
android.support; java.io;
1,441,101
public DatabaseConfig eventListener(EventListener listener) { mLauncher.eventListener(listener); return this; }
DatabaseConfig function(EventListener listener) { mLauncher.eventListener(listener); return this; }
/** * Set a listener which receives notifications of actions being performed by the * database. Listener implementation must be thread-safe. */
Set a listener which receives notifications of actions being performed by the database. Listener implementation must be thread-safe
eventListener
{ "repo_name": "cojen/Tupl", "path": "src/main/java/org/cojen/tupl/DatabaseConfig.java", "license": "agpl-3.0", "size": 16275 }
[ "org.cojen.tupl.diag.EventListener" ]
import org.cojen.tupl.diag.EventListener;
import org.cojen.tupl.diag.*;
[ "org.cojen.tupl" ]
org.cojen.tupl;
135,771
private void archive(EntityType type, String name) throws IOException { if (!shouldPersist) { return; } Path archivePath = new Path(storePath, "archive" + Path.SEPARATOR + type); HadoopClientFactory.mkdirs(fs, archivePath, STORE_PERMISSION); fs.rename(new Path(sto...
void function(EntityType type, String name) throws IOException { if (!shouldPersist) { return; } Path archivePath = new Path(storePath, STR + Path.SEPARATOR + type); HadoopClientFactory.mkdirs(fs, archivePath, STORE_PERMISSION); fs.rename(new Path(storePath, type + Path.SEPARATOR + URLEncoder.encode(name, UTF_8) + ".xm...
/** * Archive removed configuration in the persistent store. * * @param type - Entity type to archive * @param name - name * @throws IOException If any error in accessing the storage */
Archive removed configuration in the persistent store
archive
{ "repo_name": "PraveenAdlakha/falcon", "path": "common/src/main/java/org/apache/falcon/entity/store/ConfigurationStore.java", "license": "apache-2.0", "size": 20908 }
[ "java.io.IOException", "java.net.URLEncoder", "org.apache.falcon.entity.v0.EntityType", "org.apache.falcon.hadoop.HadoopClientFactory", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import java.net.URLEncoder; import org.apache.falcon.entity.v0.EntityType; import org.apache.falcon.hadoop.HadoopClientFactory; import org.apache.hadoop.fs.Path;
import java.io.*; import java.net.*; import org.apache.falcon.entity.v0.*; import org.apache.falcon.hadoop.*; import org.apache.hadoop.fs.*;
[ "java.io", "java.net", "org.apache.falcon", "org.apache.hadoop" ]
java.io; java.net; org.apache.falcon; org.apache.hadoop;
875,871
@Override public void maybeTransitToNarrowMode(Command command, KeyEventInterface keyEventInterface) { Preconditions.checkNotNull(command); // Surely we don't anything when on narrow mode already. if (isNarrowMode()) { return; } // Do nothing for the input from software keyboard. if (k...
void function(Command command, KeyEventInterface keyEventInterface) { Preconditions.checkNotNull(command); if (isNarrowMode()) { return; } if (keyEventInterface == null !keyEventInterface.getNativeEvent().isPresent()) { return; } if (!command.getInput().hasKey()) { return; } hideSubInputView(); setNarrowMode(true); }
/** * Returns true if we should transit to narrow mode, * based on returned {@code Command} and {@code KeyEventInterface} from the server. * * <p>If all of the following conditions are satisfied, narrow mode is shown. * <ul> * <li>The key event is from h/w keyboard. * <li>The key event has printab...
Returns true if we should transit to narrow mode, based on returned Command and KeyEventInterface from the server. If all of the following conditions are satisfied, narrow mode is shown. The key event is from h/w keyboard. The key event has printable character without modifier.
maybeTransitToNarrowMode
{ "repo_name": "kbc-developers/Mozc", "path": "src/android/src/com/google/android/inputmethod/japanese/ViewManager.java", "license": "bsd-3-clause", "size": 41515 }
[ "com.google.common.base.Preconditions", "org.mozc.android.inputmethod.japanese.KeycodeConverter", "org.mozc.android.inputmethod.japanese.protobuf.ProtoCommands" ]
import com.google.common.base.Preconditions; import org.mozc.android.inputmethod.japanese.KeycodeConverter; import org.mozc.android.inputmethod.japanese.protobuf.ProtoCommands;
import com.google.common.base.*; import org.mozc.android.inputmethod.japanese.*; import org.mozc.android.inputmethod.japanese.protobuf.*;
[ "com.google.common", "org.mozc.android" ]
com.google.common; org.mozc.android;
1,655,171
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; }
ItemStack function(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; }
/** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */
Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
onItemRightClick
{ "repo_name": "MinecraftModArchive/Runes-And-Silver", "path": "src/main/java/Runes/Items/SilverBowlMilk.java", "license": "lgpl-3.0", "size": 2753 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.item.ItemStack", "net.minecraft.world.World" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World;
import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.world;
2,005,999
public BillingProfileStatus billingProfileStatus() { return this.innerProperties() == null ? null : this.innerProperties().billingProfileStatus(); }
BillingProfileStatus function() { return this.innerProperties() == null ? null : this.innerProperties().billingProfileStatus(); }
/** * Get the billingProfileStatus property: The status of the billing profile. * * @return the billingProfileStatus value. */
Get the billingProfileStatus property: The status of the billing profile
billingProfileStatus
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyInner.java", "license": "mit", "size": 7465 }
[ "com.azure.resourcemanager.billing.models.BillingProfileStatus" ]
import com.azure.resourcemanager.billing.models.BillingProfileStatus;
import com.azure.resourcemanager.billing.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
187,938
public void testOfferNull() { ArrayDeque q = new ArrayDeque(); try { q.offer(null); shouldThrow(); } catch (NullPointerException success) {} }
void function() { ArrayDeque q = new ArrayDeque(); try { q.offer(null); shouldThrow(); } catch (NullPointerException success) {} }
/** * offer(null) throws NPE */
offer(null) throws NPE
testOfferNull
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ArrayDequeTest.java", "license": "gpl-2.0", "size": 29764 }
[ "java.util.ArrayDeque" ]
import java.util.ArrayDeque;
import java.util.*;
[ "java.util" ]
java.util;
660,467
public void testGetAttribute() throws Exception { writeConfigRules(); scratch.file("a/BUILD", "genrule(", " name = 'gen',", " srcs = [],", " outs = ['out'],", " cmd = select({", " '//conditions:a': 'a command',", " '//conditions...
void function() throws Exception { writeConfigRules(); scratch.file(STR, STR, STR, STR, STR, STR, STR ' STR + Type.Selector.DEFAULT_CONDITION_KEY + STR, STR); useConfiguration("-cSTRopt"); assertEquals(STR, getMapper(STR-cSTRdbgSTRb command", getMapper(STR-cSTRfastbuildSTRdefault commandSTR }
/** * Tests that {@link ConfiguredAttributeMapper#get} only gets the configuration-appropriate * value. */
Tests that <code>ConfiguredAttributeMapper#get</code> only gets the configuration-appropriate value
testGetAttribute
{ "repo_name": "dhootha/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/ConfiguredAttributeMapperTest.java", "license": "apache-2.0", "size": 7540 }
[ "com.google.devtools.build.lib.packages.Type" ]
import com.google.devtools.build.lib.packages.Type;
import com.google.devtools.build.lib.packages.*;
[ "com.google.devtools" ]
com.google.devtools;
1,100,070
protected boolean check(String value, String regex) { Pattern pattern = Pattern.compile(regex); return pattern.matcher(value).matches(); }
boolean function(String value, String regex) { Pattern pattern = Pattern.compile(regex); return pattern.matcher(value).matches(); }
/** * Check whether the value is matched by a regular expression. * * @param value value * @param regex regular expression * @return true when value is matched */
Check whether the value is matched by a regular expression
check
{ "repo_name": "geomajas/geomajas-project-server", "path": "plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/configuration/LayerAuthorization.java", "license": "agpl-3.0", "size": 3474 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,366,766
public void addGroupMember(Obs member) { if (member == null) { return; } if (getGroupMembers() == null) { groupMembers = new HashSet<Obs>(); } // a quick sanity check to make sure someone isn't adding // itself to the group if (member.equals(this)) { throw new APIException("Obs.error.gro...
void function(Obs member) { if (member == null) { return; } if (getGroupMembers() == null) { groupMembers = new HashSet<Obs>(); } if (member.equals(this)) { throw new APIException(STR, new Object[] { this, member }); } member.setObsGroup(this); if (groupMembers.add(member)) { dirty = true; } }
/** * Convenience method to add the given <code>obs</code> to this grouping. Will implicitly make * this obs an ObsGroup. * * @param member Obs to add to this group * @see #setGroupMembers(Set) * @see #getGroupMembers() * @should return true when a new obs is added as a member * @should return false wh...
Convenience method to add the given <code>obs</code> to this grouping. Will implicitly make this obs an ObsGroup
addGroupMember
{ "repo_name": "ssmusoke/openmrs-core", "path": "api/src/main/java/org/openmrs/Obs.java", "license": "mpl-2.0", "size": 39910 }
[ "java.util.HashSet", "org.openmrs.api.APIException" ]
import java.util.HashSet; import org.openmrs.api.APIException;
import java.util.*; import org.openmrs.api.*;
[ "java.util", "org.openmrs.api" ]
java.util; org.openmrs.api;
543,433
@Override public Statistics getStatistics() throws CMException{ Statistics s = null; if(freed){ throw new CMException("Supplied entity is not available (anymore)."); } try { s = getCommunicator().entityGetStatistics(this); } catch(CommunicationExc...
Statistics function() throws CMException{ Statistics s = null; if(freed){ throw new CMException(STR); } try { s = getCommunicator().entityGetStatistics(this); } catch(CommunicationException ce){ throw new CMException(ce.getMessage()); } return s; }
/** * Provides access to the statistics of this entity. * * @return The statistics of this entity or null if the entity has no * statistics. * @throws CMException * Thrown when the statistics could not be resolved. */
Provides access to the statistics of this entity
getStatistics
{ "repo_name": "PrismTech/opensplice", "path": "src/api/cm/java/code/org/opensplice/cm/impl/EntityImpl.java", "license": "gpl-3.0", "size": 17078 }
[ "org.opensplice.cm.CMException", "org.opensplice.cm.com.CommunicationException", "org.opensplice.cm.statistics.Statistics" ]
import org.opensplice.cm.CMException; import org.opensplice.cm.com.CommunicationException; import org.opensplice.cm.statistics.Statistics;
import org.opensplice.cm.*; import org.opensplice.cm.com.*; import org.opensplice.cm.statistics.*;
[ "org.opensplice.cm" ]
org.opensplice.cm;
1,448,382
Set<ConfigItem> getItemsForComponent(String compName); //~--- methods --------------------------------------------------------------
Set<ConfigItem> getItemsForComponent(String compName);
/** * Method description * * * @param compName * * */
Method description
getItemsForComponent
{ "repo_name": "pivotal-nathan-sentjens/tigase-xmpp-java", "path": "src/main/java/tigase/conf/ConfigRepositoryIfc.java", "license": "agpl-3.0", "size": 4629 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
41,045
private void fixMethodComment( final StringWriter stringWriter, final String originalContent, final JavaMethod javaMethod, final String indent ) throws MojoExecutionException, IOException { if ( !fixMethodComment ) { return; } ...
void function( final StringWriter stringWriter, final String originalContent, final JavaMethod javaMethod, final String indent ) throws MojoExecutionException, IOException { if ( !fixMethodComment ) { return; } if ( !javaMethod.getParentClass().isInterface() && !isInLevel( javaMethod.getModifiers() ) ) { return; } if (...
/** * Add/update Javadoc method comment. * * @param stringWriter not null * @param originalContent not null * @param javaMethod not null * @param indent not null * @throws MojoExecutionException if any * @throws IOException if any */
Add/update Javadoc method comment
fixMethodComment
{ "repo_name": "lennartj/maven-plugins", "path": "maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java", "license": "apache-2.0", "size": 129817 }
[ "com.thoughtworks.qdox.model.JavaMethod", "java.io.IOException", "java.io.StringWriter", "org.apache.maven.plugin.MojoExecutionException" ]
import com.thoughtworks.qdox.model.JavaMethod; import java.io.IOException; import java.io.StringWriter; import org.apache.maven.plugin.MojoExecutionException;
import com.thoughtworks.qdox.model.*; import java.io.*; import org.apache.maven.plugin.*;
[ "com.thoughtworks.qdox", "java.io", "org.apache.maven" ]
com.thoughtworks.qdox; java.io; org.apache.maven;
647,750
public void init(SecureRandom random) throws IllegalArgumentException { // nothing to do. }
void function(SecureRandom random) throws IllegalArgumentException { }
/** * Initialise the padder. * * @param random - a SecureRandom if available. */
Initialise the padder
init
{ "repo_name": "Skywalker-11/spongycastle", "path": "core/src/main/java/org/spongycastle/crypto/paddings/PKCS7Padding.java", "license": "mit", "size": 1699 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
269,836
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") @SimpleProperty public void ExtraKey(String extraKey) { this.extraKey = extraKey.trim(); }
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") void function(String extraKey) { this.extraKey = extraKey.trim(); }
/** * Specifies the extra key that will be passed to the activity. * Obsolete. Should use Extras instead */
Specifies the extra key that will be passed to the activity. Obsolete. Should use Extras instead
ExtraKey
{ "repo_name": "egiurleo/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/ActivityStarter.java", "license": "apache-2.0", "size": 19378 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
2,447,854
EList<SimpleVersion> getVersionConstraints();
EList<SimpleVersion> getVersionConstraints();
/** * Returns the value of the '<em><b>Version Constraints</b></em>' containment reference list. * The list contents are of type {@link org.eclipse.n4js.semver.Semver.SimpleVersion}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Version Constraints</em>' containment reference list isn't clear, ...
Returns the value of the 'Version Constraints' containment reference list. The list contents are of type <code>org.eclipse.n4js.semver.Semver.SimpleVersion</code>. If the meaning of the 'Version Constraints' containment reference list isn't clear, there really should be more of a description here...
getVersionConstraints
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.semver.model/emf-gen/org/eclipse/n4js/semver/Semver/VersionRangeConstraint.java", "license": "epl-1.0", "size": 1694 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,563,806
private static String[] getSubjectAlts( final X509Certificate cert, final String hostname) { int subjectType; if (isIPAddress(hostname)) { subjectType = 7; } else { subjectType = 2; } LinkedList<String> subjectAltList = new LinkedList<Stri...
static String[] function( final X509Certificate cert, final String hostname) { int subjectType; if (isIPAddress(hostname)) { subjectType = 7; } else { subjectType = 2; } LinkedList<String> subjectAltList = new LinkedList<String>(); Collection<List<?>> c = null; try { c = cert.getSubjectAlternativeNames(); } catch(Certi...
/** * Extracts the array of SubjectAlt DNS or IP names from an X509Certificate. * Returns null if there aren't any. * * @param cert X509Certificate * @param hostname * @return Array of SubjectALT DNS or IP names stored in the certificate. */
Extracts the array of SubjectAlt DNS or IP names from an X509Certificate. Returns null if there aren't any
getSubjectAlts
{ "repo_name": "sshortman/HttpClientMeasure", "path": "http_4_1_3/src/com/santaba/agent/http/AbstractVerifier.java", "license": "apache-2.0", "size": 12664 }
[ "java.security.cert.CertificateParsingException", "java.security.cert.X509Certificate", "java.util.Collection", "java.util.LinkedList", "java.util.List", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.security.cert.CertificateParsingException; import java.security.cert.X509Certificate; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger;
import java.security.cert.*; import java.util.*; import java.util.logging.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,229,941
private void disconnectFromMochadX10Server() { logger.trace("disconnectFromMochadX10Server called"); try { logger.trace("Closing socket"); client.close(); logger.trace("Closing BufferedReader"); in.close(); logger.trace("Closing DataOutputS...
void function() { logger.trace(STR); try { logger.trace(STR); client.close(); logger.trace(STR); in.close(); logger.trace(STR); out.close(); logger.debug(STR); } catch (IOException e) { logger.error(STR + e.getMessage() + STR + hostIp + ":" + hostPort); } }
/** * Disconnect from the Mochad X10 host. This method is required to clean up the connection * after the binding was disconnected from the host. */
Disconnect from the Mochad X10 host. This method is required to clean up the connection after the binding was disconnected from the host
disconnectFromMochadX10Server
{ "repo_name": "vgoldman/openhab", "path": "bundles/binding/org.openhab.binding.mochadx10/src/main/java/org/openhab/binding/mochadx10/internal/MochadX10Binding.java", "license": "epl-1.0", "size": 19889 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
964,096
public void printOut(ExtractionResult er, Map<String, String> variableAssignment) { final Resource s = subject.getValue(variableAssignment); final IRI p = predicate.getValue(variableAssignment); @SuppressWarnings("unchecked") final Value o = object.getValue(variableAssignment); ...
void function(ExtractionResult er, Map<String, String> variableAssignment) { final Resource s = subject.getValue(variableAssignment); final IRI p = predicate.getValue(variableAssignment); @SuppressWarnings(STR) final Value o = object.getValue(variableAssignment); if (graph != null) { final IRI g = graph.getValue(variab...
/** * Prints out this quad template in the given {@link org.apache.any23.extractor.ExtractionResult}, using the passed * <i>variableAssignment</i> to expand variables. * * @param er * extraction result instance on which write the quad produced by this template. * @param variable...
Prints out this quad template in the given <code>org.apache.any23.extractor.ExtractionResult</code>, using the passed variableAssignment to expand variables
printOut
{ "repo_name": "apache/any23", "path": "core/src/main/java/org/apache/any23/extractor/xpath/QuadTemplate.java", "license": "apache-2.0", "size": 4565 }
[ "java.util.Map", "org.apache.any23.extractor.ExtractionResult", "org.eclipse.rdf4j.model.Resource", "org.eclipse.rdf4j.model.Value" ]
import java.util.Map; import org.apache.any23.extractor.ExtractionResult; import org.eclipse.rdf4j.model.Resource; import org.eclipse.rdf4j.model.Value;
import java.util.*; import org.apache.any23.extractor.*; import org.eclipse.rdf4j.model.*;
[ "java.util", "org.apache.any23", "org.eclipse.rdf4j" ]
java.util; org.apache.any23; org.eclipse.rdf4j;
413,063
public void setService(Service service) { this.service = service; }
void function(Service service) { this.service = service; }
/** * Set the <code>Service</code> with which we are associated (if any). * * @param service The service that owns this Engine */
Set the <code>Service</code> with which we are associated (if any)
setService
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/connector/http/HttpConnector.java", "license": "apache-2.0", "size": 33582 }
[ "org.apache.catalina.Service" ]
import org.apache.catalina.Service;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,027,094
void messageConsumed(ConnectionContext context, MessageReference messageReference);
void messageConsumed(ConnectionContext context, MessageReference messageReference);
/** * called when message is consumed * @param context * @param messageReference */
called when message is consumed
messageConsumed
{ "repo_name": "chirino/activemq", "path": "activemq-broker/src/main/java/org/apache/activemq/broker/Broker.java", "license": "apache-2.0", "size": 11639 }
[ "org.apache.activemq.broker.region.MessageReference" ]
import org.apache.activemq.broker.region.MessageReference;
import org.apache.activemq.broker.region.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,192,248
void selectImporter(ProjectImporterDescriptor importer);
void selectImporter(ProjectImporterDescriptor importer);
/** * Select importer in the list. * * @param importer importer to select */
Select importer in the list
selectImporter
{ "repo_name": "TypeFox/che", "path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/projectimport/wizard/mainpage/MainPageView.java", "license": "epl-1.0", "size": 1696 }
[ "org.eclipse.che.api.project.shared.dto.ProjectImporterDescriptor" ]
import org.eclipse.che.api.project.shared.dto.ProjectImporterDescriptor;
import org.eclipse.che.api.project.shared.dto.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,090,421
public void appendToCpuUsageFile(String dataToAppend) { String logsfileStoragePath = SharedData.SD_PATH + File.separator + SharedData.SD_FOLDER_PATH_LOGS; File sdLogsStorageDir = new File(logsfileStoragePath); File file = new File(sdLogsStorageDir.toString() + File.separator + SharedData...
void function(String dataToAppend) { String logsfileStoragePath = SharedData.SD_PATH + File.separator + SharedData.SD_FOLDER_PATH_LOGS; File sdLogsStorageDir = new File(logsfileStoragePath); File file = new File(sdLogsStorageDir.toString() + File.separator + SharedData.cpuRealFileName); if (sdLogsStorageDir.exists()) {...
/** * To add real-time cpu usage values * * @param dataToAppend */
To add real-time cpu usage values
appendToCpuUsageFile
{ "repo_name": "wahibhaq/android-speaker-audioanalysis", "path": "Android/VoiceRecognizerSP/src/com/example/voicerecognizersp/FileOperations.java", "license": "mit", "size": 12837 }
[ "android.util.Log", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.PrintWriter" ]
import android.util.Log; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
715,241
public Map<String,FieldsPerson> queryEntityPerson(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(qry); args.add(fields); TypeReference<List<Map<String,FieldsPerson>>> retTy...
Map<String,FieldsPerson> function(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(qry); args.add(fields); TypeReference<List<Map<String,FieldsPerson>>> retType = new TypeReference<List<Map<String,FieldsPerson>...
/** * <p>Original spec-file function name: query_entity_Person</p> * <pre> * </pre> * @param qry instance of list of tuple of size 3: String, String, String * @param fields instance of list of String * @return instance of mapping from String to type {@link us.kbase.cdmientityapi....
Original spec-file function name: query_entity_Person <code> </code>
queryEntityPerson
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,452
WorkloadGroupInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithParentResource { }
WorkloadGroupInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithParentResource { }
/** * Gets the inner com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupInner object. * * @return the inner object. */
Gets the inner com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupInner object
innerModel
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java", "license": "mit", "size": 12066 }
[ "com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupInner" ]
import com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupInner;
import com.azure.resourcemanager.synapse.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,494,843
public Builder setName(String name) { Preconditions.checkState(this.name == null, "Name may not be specified more than once"); Preconditions.checkNotNull(name, "Name must be specified"); Preconditions.checkArgument(name.length() > 0, "Name must be non-empty"); thi...
Builder function(String name) { Preconditions.checkState(this.name == null, STR); Preconditions.checkNotNull(name, STR); Preconditions.checkArgument(name.length() > 0, STR); this.name = name; return this; }
/** * Sets the name of the new project. * * @param name String containing the new name of the project * * @return the same {@code Builder} object */
Sets the name of the new project
setName
{ "repo_name": "andyshinn/dx-toolkit", "path": "src/java/src/main/java/com/dnanexus/DXProject.java", "license": "apache-2.0", "size": 7451 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,450,676
void drop(JdbcIndex<?> index) throws NoSuchTableException;
void drop(JdbcIndex<?> index) throws NoSuchTableException;
/** * Drops the table mapped to the given index. * * @param index the index to drop the table for * @throws NoSuchTableException if no table for the index exists */
Drops the table mapped to the given index
drop
{ "repo_name": "openengsb/openengsb", "path": "components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/api/TableEngine.java", "license": "apache-2.0", "size": 2351 }
[ "org.openengsb.core.edbi.jdbc.JdbcIndex" ]
import org.openengsb.core.edbi.jdbc.JdbcIndex;
import org.openengsb.core.edbi.jdbc.*;
[ "org.openengsb.core" ]
org.openengsb.core;
1,106,251
@Nonnull Document getDocument(EntityReference userOrGroup); /** * Gets the string property value given the xwiki {@code doc}, the {@code classReference}, and the * {@code propertyName}. * * @param doc the {@link XWikiDocument}
Document getDocument(EntityReference userOrGroup); /** * Gets the string property value given the xwiki {@code doc}, the {@code classReference}, and the * {@code propertyName}. * * @param doc the {@link XWikiDocument}
/** * Retrieves the entity document of {@code userOrGroup}. * * @param userOrGroup an {@link EntityReference} object representing a user or a group * @return the {@link Document} of entity */
Retrieves the entity document of userOrGroup
getDocument
{ "repo_name": "teyden/phenotips", "path": "components/entity-access-rules/api/src/main/java/org/phenotips/data/permissions/internal/EntityAccessHelper.java", "license": "agpl-3.0", "size": 3083 }
[ "com.xpn.xwiki.api.Document", "com.xpn.xwiki.doc.XWikiDocument", "org.xwiki.model.reference.EntityReference" ]
import com.xpn.xwiki.api.Document; import com.xpn.xwiki.doc.XWikiDocument; import org.xwiki.model.reference.EntityReference;
import com.xpn.xwiki.api.*; import com.xpn.xwiki.doc.*; import org.xwiki.model.reference.*;
[ "com.xpn.xwiki", "org.xwiki.model" ]
com.xpn.xwiki; org.xwiki.model;
1,502,699
public no.mesan.ark.persistering.generated.tables.pojos.Film fetchOneByFilmId(Integer value) { return fetchOne(Film.FILM.FILM_ID, value); }
no.mesan.ark.persistering.generated.tables.pojos.Film function(Integer value) { return fetchOne(Film.FILM.FILM_ID, value); }
/** * Fetch a unique record that has <code>film_id = value</code> */
Fetch a unique record that has <code>film_id = value</code>
fetchOneByFilmId
{ "repo_name": "mesan/fag-ark-persistering-test-jooq", "path": "fag-ark-persistering-test-jooq-spring/src/main/java/no/mesan/ark/persistering/generated/tables/daos/FilmDao.java", "license": "unlicense", "size": 4844 }
[ "no.mesan.ark.persistering.generated.tables.Film" ]
import no.mesan.ark.persistering.generated.tables.Film;
import no.mesan.ark.persistering.generated.tables.*;
[ "no.mesan.ark" ]
no.mesan.ark;
1,910,561
public long getFileSize(SFTPv3Client sftpClient, String filename) throws Exception { return sftpClient.stat(filename).size.longValue(); }
long function(SFTPv3Client sftpClient, String filename) throws Exception { return sftpClient.stat(filename).size.longValue(); }
/** * Returns the file size of a file * * @param sftpClient * @param filename * @return the size of the file * @throws Exception */
Returns the file size of a file
getFileSize
{ "repo_name": "dianhu/Kettle-Research", "path": "src/org/pentaho/di/job/entries/ssh2get/JobEntrySSH2GET.java", "license": "lgpl-2.1", "size": 42606 }
[ "com.trilead.ssh2.SFTPv3Client" ]
import com.trilead.ssh2.SFTPv3Client;
import com.trilead.ssh2.*;
[ "com.trilead.ssh2" ]
com.trilead.ssh2;
2,566,067
public PixelControllerEffect getPixelControllerEffect() { return pixelControllerEffect; }
PixelControllerEffect function() { return pixelControllerEffect; }
/** * Gets the pixel controller effect. * * @return the pixel controller effect */
Gets the pixel controller effect
getPixelControllerEffect
{ "repo_name": "0x00f/PixelController", "path": "src/main/java/com/neophob/sematrix/glue/Collector.java", "license": "gpl-3.0", "size": 18666 }
[ "com.neophob.sematrix.effect.PixelControllerEffect" ]
import com.neophob.sematrix.effect.PixelControllerEffect;
import com.neophob.sematrix.effect.*;
[ "com.neophob.sematrix" ]
com.neophob.sematrix;
1,547,084
public boolean isOpen(final INaviView view) { Preconditions.checkNotNull(view, "IE01297: View argument can not be null"); for (final IGraphContainerWindow graphContainer : getOpenWindows()) { for (final IGraphPanel window : graphContainer) { if (window.getModel().getGraph().getRawView() == view...
boolean function(final INaviView view) { Preconditions.checkNotNull(view, STR); for (final IGraphContainerWindow graphContainer : getOpenWindows()) { for (final IGraphPanel window : graphContainer) { if (window.getModel().getGraph().getRawView() == view) { return true; } } } return false; }
/** * Determines whether a graph view is open in some window. * * @param view The view to test. * * @return True, if the view is open. False, otherwise. */
Determines whether a graph view is open in some window
isOpen
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/WindowManager/CWindowManager.java", "license": "apache-2.0", "size": 6420 }
[ "com.google.common.base.Preconditions", "com.google.security.zynamics.binnavi.Gui", "com.google.security.zynamics.binnavi.disassembly.views.INaviView" ]
import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.Gui; import com.google.security.zynamics.binnavi.disassembly.views.INaviView;
import com.google.common.base.*; import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.views.*;
[ "com.google.common", "com.google.security" ]
com.google.common; com.google.security;
1,494,044
List<Range> getRangesForEndPoint(EndPoint ep) { List<Range> ranges = new ArrayList<Range>(); ranges.add(getPrimaryRangeForEndPoint(ep)); EndPoint predecessor = ep; int count = DatabaseDescriptor.getReplicationFactor() - 1; for (int i = 0; i < count; ++i) { predecessor = getPredecesso...
List<Range> getRangesForEndPoint(EndPoint ep) { List<Range> ranges = new ArrayList<Range>(); ranges.add(getPrimaryRangeForEndPoint(ep)); EndPoint predecessor = ep; int count = DatabaseDescriptor.getReplicationFactor() - 1; for (int i = 0; i < count; ++i) { predecessor = getPredecessor(predecessor); ranges.add(getPrimar...
/** * Get all ranges an endpoint is responsible for. * * @param ep * endpoint we are interested in. * @return ranges for the specified endpoint. */
Get all ranges an endpoint is responsible for
getRangesForEndPoint
{ "repo_name": "toddlipcon/helenus", "path": "src/java/com/facebook/infrastructure/service/StorageService.java", "license": "apache-2.0", "size": 53781 }
[ "com.facebook.infrastructure.config.DatabaseDescriptor", "com.facebook.infrastructure.dht.Range", "com.facebook.infrastructure.net.EndPoint", "java.util.ArrayList", "java.util.List" ]
import com.facebook.infrastructure.config.DatabaseDescriptor; import com.facebook.infrastructure.dht.Range; import com.facebook.infrastructure.net.EndPoint; import java.util.ArrayList; import java.util.List;
import com.facebook.infrastructure.config.*; import com.facebook.infrastructure.dht.*; import com.facebook.infrastructure.net.*; import java.util.*;
[ "com.facebook.infrastructure", "java.util" ]
com.facebook.infrastructure; java.util;
2,026,641
public String getCSVData(IProjectAggregated projectAgg, List<HLAMeasure> hlaMeasures, boolean surroundFields);
String function(IProjectAggregated projectAgg, List<HLAMeasure> hlaMeasures, boolean surroundFields);
/** * Create CSV data based on the given aggregated project. * * @param projectAgg The aggregated project. * @param hlaMeasures The measures to be used for output. * @param surroundFields If true, every single field of data will be surrounded with quotation marks. * @return The string con...
Create CSV data based on the given aggregated project
getCSVData
{ "repo_name": "badamowicz/sonar-hla", "path": "sonar-hla/src/main/java/com/github/badamowicz/sonar/hla/api/ISonarConverter.java", "license": "gpl-3.0", "size": 7120 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
804,767
private void copyBootstrapMethods(final ClassWriter classWriter, final Item[] items, final char[] c) { // finds the "BootstrapMethods" attribute int u = getAttributes(); boolean found = false; for (int i = readUnsignedShort(u); i > 0; --i) { String attrName = ...
void function(final ClassWriter classWriter, final Item[] items, final char[] c) { int u = getAttributes(); boolean found = false; for (int i = readUnsignedShort(u); i > 0; --i) { String attrName = readUTF8(u + 2, c); if (STR.equals(attrName)) { found = true; break; } u += 6 + readInt(u + 4); } if (!found) { return; } ...
/** * Copies the bootstrap method data into the given {@link ClassWriter}. * Should be called before the {@link #accept(ClassVisitor,int)} method. * * @param classWriter * the {@link ClassWriter} to copy bootstrap methods into. */
Copies the bootstrap method data into the given <code>ClassWriter</code>. Should be called before the <code>#accept(ClassVisitor,int)</code> method
copyBootstrapMethods
{ "repo_name": "qeist/scouter", "path": "scouter.agent/src/scouter/org/objectweb/asm/ClassReader.java", "license": "apache-2.0", "size": 98171 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,100,591
private boolean isEmpty() { return TextUtils.getTrimmedLength(getText()) == 0; }
boolean function() { return TextUtils.getTrimmedLength(getText()) == 0; }
/** * Returns true if the text field is empty, or contains only whitespace. */
Returns true if the text field is empty, or contains only whitespace
isEmpty
{ "repo_name": "Myanmar-Hub/collabra-devcon", "path": "Sherlock/src/com/actionbarsherlock/widget/SearchView.java", "license": "apache-2.0", "size": 71352 }
[ "android.text.TextUtils" ]
import android.text.TextUtils;
import android.text.*;
[ "android.text" ]
android.text;
2,236,137
public void testGoodButOddVersionSpecJavaxPersistence() throws LayoutException { String groupId = "javax.persistence"; String artifactId = "ejb"; String version = "3.0-public_review"; String type = "jar"; String path = "javax.persistence/jars/ejb-3.0-public_review...
void function() throws LayoutException { String groupId = STR; String artifactId = "ejb"; String version = STR; String type = "jar"; String path = STR; assertLayout( path, groupId, artifactId, version, null, type ); }
/** * [MRM-432] Oddball version spec. * Example of an oddball / unusual version spec. * @throws LayoutException */
[MRM-432] Oddball version spec. Example of an oddball / unusual version spec
testGoodButOddVersionSpecJavaxPersistence
{ "repo_name": "hiredman/archiva", "path": "archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/maven/archiva/repository/content/AbstractLegacyRepositoryContentTestCase.java", "license": "apache-2.0", "size": 14139 }
[ "org.apache.maven.archiva.repository.layout.LayoutException" ]
import org.apache.maven.archiva.repository.layout.LayoutException;
import org.apache.maven.archiva.repository.layout.*;
[ "org.apache.maven" ]
org.apache.maven;
1,933,731
ByteBuf process(Object contextObj, ByteBuf inputPayload);
ByteBuf process(Object contextObj, ByteBuf inputPayload);
/** * Process the input payload and return a new payload. * NOTE: If this processor returns a different ByteBuf instance than the passed one * DO THE FOLLOWING to avoid memory leaks * 1. Call inputPayload.release() to release a reference * 2. Call retain() ...
Process the input payload and return a new payload. DO THE FOLLOWING to avoid memory leaks 1. Call inputPayload.release() to release a reference 2. Call retain() on the ByteBuf that is being returned
process
{ "repo_name": "massakam/pulsar", "path": "pulsar-common/src/main/java/org/apache/pulsar/common/intercept/ManagedLedgerPayloadProcessor.java", "license": "apache-2.0", "size": 2468 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
2,601,594
public void addFaultSubCode(QName code) { initFaultSubCodes(); faultSubCode.add(code); }
void function(QName code) { initFaultSubCodes(); faultSubCode.add(code); }
/** * Add a fault sub-code. * This is new in SOAP 1.2, ignored in SOAP 1.1. * * @param code the <code>QName</code> of the fault sub-code to add * @since axis1.1 */
Add a fault sub-code. This is new in SOAP 1.2, ignored in SOAP 1.1
addFaultSubCode
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/AxisFault.java", "license": "apache-2.0", "size": 27940 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
2,431,269
public void enterQuery_primary(SQLParser.Query_primaryContext ctx) { }
public void enterQuery_primary(SQLParser.Query_primaryContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitNon_join_query_term
{ "repo_name": "HEIG-GAPS/slasher", "path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java", "license": "mit", "size": 73849 }
[ "ch.gaps.slasher.corrector.SQLParser" ]
import ch.gaps.slasher.corrector.SQLParser;
import ch.gaps.slasher.corrector.*;
[ "ch.gaps.slasher" ]
ch.gaps.slasher;
761,296
public String getName() { return this.getCOSObject().getNameAsString(COSName.NAME); }
String function() { return this.getCOSObject().getNameAsString(COSName.NAME); }
/** * This will retrieve the name of the viewport. * * @return the name of the viewport */
This will retrieve the name of the viewport
getName
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/measurement/PDViewportDictionary.java", "license": "apache-2.0", "size": 3583 }
[ "org.apache.pdfbox.cos.COSName" ]
import org.apache.pdfbox.cos.COSName;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
1,572,164
@Generated @Selector("predicateForEnablingContact") public native NSPredicate predicateForEnablingContact();
@Selector(STR) native NSPredicate function();
/** * e.g. emailAddresses.@count > 0 */
e.g. emailAddresses.@count > 0
predicateForEnablingContact
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/contactsui/CNContactPickerViewController.java", "license": "apache-2.0", "size": 8924 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,488,154
private void sendChunkTo(ByteBuffer in, SocketChannel sc, ByteBuffer out) throws IOException { int bytesSent = in.remaining(); if (in.isDirect()) { flushBuffer(sc, out); while (in.remaining() > 0) { sc.write(in); } } else { // copy in to out. If out fills flush it int...
void function(ByteBuffer in, SocketChannel sc, ByteBuffer out) throws IOException { int bytesSent = in.remaining(); if (in.isDirect()) { flushBuffer(sc, out); while (in.remaining() > 0) { sc.write(in); } } else { int OUT_MAX = out.remaining(); if (bytesSent <= OUT_MAX) { out.put(in); } else { final byte[] bytes = in.ar...
/** * sends the data from "in" by writing it to "sc" through "out" (out is used to chunk to data and * is probably a direct memory buffer). */
sends the data from "in" by writing it to "sc" through "out" (out is used to chunk to data and is probably a direct memory buffer)
sendChunkTo
{ "repo_name": "pivotal-amurmann/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/HeapDataOutputStream.java", "license": "apache-2.0", "size": 42853 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.nio.channels.SocketChannel" ]
import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.SocketChannel;
import java.io.*; import java.nio.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,378,163
T getCost( Node node, Node goal );
T getCost( Node node, Node goal );
/** * Estimate the weight of the remaining path from one node to another. * * @param node the node to estimate the weight from. * @param goal the node to estimate the weight to. * @return an estimation of the weight of the path from the first node to * the second. */
Estimate the weight of the remaining path from one node to another
getCost
{ "repo_name": "eldersantos/community", "path": "graph-algo/src/main/java/org/neo4j/graphalgo/EstimateEvaluator.java", "license": "gpl-3.0", "size": 1438 }
[ "org.neo4j.graphdb.Node" ]
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.*;
[ "org.neo4j.graphdb" ]
org.neo4j.graphdb;
2,699,254
public EReference getProtectionEquipment_ProtectedSwitches() { return (EReference)getProtectionEquipment().getEStructuralFeatures().get(5); }
EReference function() { return (EReference)getProtectionEquipment().getEStructuralFeatures().get(5); }
/** * Returns the meta object for the reference list '{@link CIM15.IEC61970.Protection.ProtectionEquipment#getProtectedSwitches <em>Protected Switches</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Protected Switches</em>'. * @see CIM15.IEC61970...
Returns the meta object for the reference list '<code>CIM15.IEC61970.Protection.ProtectionEquipment#getProtectedSwitches Protected Switches</code>'.
getProtectionEquipment_ProtectedSwitches
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61970/Protection/ProtectionPackage.java", "license": "apache-2.0", "size": 79619 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
962,799
public RedisTransaction strlen(String key, Handler<AsyncResult<String>> handler) { delegate.strlen(key, handler); return this; }
RedisTransaction function(String key, Handler<AsyncResult<String>> handler) { delegate.strlen(key, handler); return this; }
/** * Get the length of the value stored in a key * @param key Key string * @param handler Handler for the result of this call. * @return */
Get the length of the value stored in a key
strlen
{ "repo_name": "brianjcj/vertx-redis-client", "path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java", "license": "apache-2.0", "size": 184983 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Handler" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Handler;
import io.vertx.core.*;
[ "io.vertx.core" ]
io.vertx.core;
638,689
public void testDerby2041DropDependencies() throws SQLException { Statement s = createStatement(); s.execute("create table t1(x int, y int, z int)"); s.execute("create table t2(x int, y int, z int)"); s.execute("create table syn_table(x int, y int, z int)"); s.execute("create...
void function() throws SQLException { Statement s = createStatement(); s.execute(STR); s.execute(STR); s.execute(STR); s.execute(STR); s.execute(STR + STR); s.execute(STR + STR + getClass().getName() + STR); s.execute(STR + STR + STR + getClass().getName() + STR); s.execute(STR + ModeAggregate.class.getName() + "'"); s...
/** * Test that DROP operations detect if there are triggers depending on * the object being dropped, and either fail (if RESTRICT semantics) or * drop the trigger (if CASCADE semantics). */
Test that DROP operations detect if there are triggers depending on the object being dropped, and either fail (if RESTRICT semantics) or drop the trigger (if CASCADE semantics)
testDerby2041DropDependencies
{ "repo_name": "scnakandala/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java", "license": "apache-2.0", "size": 109229 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
2,849,800
@Impure public static void fatal(@Nonnull CharSequence message, @NonCaptured @Unmodified @Nonnull @NullableElements Object... arguments) { Logger.log(Level.FATAL, message, null, arguments); }
static void function(@Nonnull CharSequence message, @NonCaptured @Unmodified @Nonnull @NullableElements Object... arguments) { Logger.log(Level.FATAL, message, null, arguments); }
/** * Logs the given message as a fatal error that prevents the thread or process from continuing. * Each dollar sign in the message is replaced with the corresponding argument. */
Logs the given message as a fatal error that prevents the thread or process from continuing. Each dollar sign in the message is replaced with the corresponding argument
fatal
{ "repo_name": "synacts/digitalid-utility", "path": "logging/src/main/java/net/digitalid/utility/logging/Log.java", "license": "apache-2.0", "size": 7290 }
[ "javax.annotation.Nonnull", "net.digitalid.utility.annotations.ownership.NonCaptured", "net.digitalid.utility.annotations.parameter.Unmodified", "net.digitalid.utility.logging.logger.Logger", "net.digitalid.utility.validation.annotations.elements.NullableElements" ]
import javax.annotation.Nonnull; import net.digitalid.utility.annotations.ownership.NonCaptured; import net.digitalid.utility.annotations.parameter.Unmodified; import net.digitalid.utility.logging.logger.Logger; import net.digitalid.utility.validation.annotations.elements.NullableElements;
import javax.annotation.*; import net.digitalid.utility.annotations.ownership.*; import net.digitalid.utility.annotations.parameter.*; import net.digitalid.utility.logging.logger.*; import net.digitalid.utility.validation.annotations.elements.*;
[ "javax.annotation", "net.digitalid.utility" ]
javax.annotation; net.digitalid.utility;
325,202
synchronized void saveAll() { Iterator it = new BaseHashIterator(); int savecount = 0; for (; it.hasNext(); ) { if (savecount == rowTable.length) { saveRows(savecount); savecount = 0; } CachedObject r = (Cach...
synchronized void saveAll() { Iterator it = new BaseHashIterator(); int savecount = 0; for (; it.hasNext(); ) { if (savecount == rowTable.length) { saveRows(savecount); savecount = 0; } CachedObject r = (CachedObject) it.next(); if (r.hasChanged()) { rowTable[savecount] = r; savecount++; } } saveRows(savecount); }
/** * Writes out all modified cached Rows. */
Writes out all modified cached Rows
saveAll
{ "repo_name": "RabadanLab/Pegasus", "path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/persist/Cache.java", "license": "mit", "size": 11156 }
[ "org.hsqldb.lib.Iterator" ]
import org.hsqldb.lib.Iterator;
import org.hsqldb.lib.*;
[ "org.hsqldb.lib" ]
org.hsqldb.lib;
1,164,413
private void createCrawlDB(ArrayList<URLCrawlDatum> list) throws IOException, Exception { dbDir = new Path(testdir, "crawldb"); segmentsDir = new Path(testdir, "segments"); fs.mkdirs(dbDir); fs.mkdirs(segmentsDir); // create crawldb CrawlDBTestUtil.createCrawlDb(conf, fs, dbDir, list); ...
void function(ArrayList<URLCrawlDatum> list) throws IOException, Exception { dbDir = new Path(testdir, STR); segmentsDir = new Path(testdir, STR); fs.mkdirs(dbDir); fs.mkdirs(segmentsDir); CrawlDBTestUtil.createCrawlDb(conf, fs, dbDir, list); } /** * Constructs new {@link URLCrawlDatum} from submitted parameters. * * @...
/** * Creates CrawlDB. * * @param list * database contents * @throws IOException * @throws Exception */
Creates CrawlDB
createCrawlDB
{ "repo_name": "commoncrawl/nutch", "path": "src/test/org/apache/nutch/crawl/TestGenerator.java", "license": "apache-2.0", "size": 12403 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.hadoop.fs.Path", "org.apache.nutch.crawl.CrawlDBTestUtil" ]
import java.io.IOException; import java.util.ArrayList; import org.apache.hadoop.fs.Path; import org.apache.nutch.crawl.CrawlDBTestUtil;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.nutch.crawl.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.nutch" ]
java.io; java.util; org.apache.hadoop; org.apache.nutch;
1,617,156
@Test public void testWriteSetTracking5() throws Exception { dropTable(new String[] {"TAB_PART"}); Assert.assertEquals(0, TxnDbUtil.countQueryAgent("select count(*) from WRITE_SET")); CommandProcessorResponse cpr = driver.run("create table if not exists TAB_PART (a int, b int) " + "partitioned by ...
void function() throws Exception { dropTable(new String[] {STR}); Assert.assertEquals(0, TxnDbUtil.countQueryAgent(STR)); CommandProcessorResponse cpr = driver.run(STR + STR); checkCmdOnDriver(cpr); checkCmdOnDriver(driver.run(STR)); HiveTxnManager txnMgr2 = TxnManagerFactory.getTxnManagerFactory().getTxnManager(conf);...
/** * overlapping txns updating the same resource but 1st one rolls back; 2nd commits * @throws Exception */
overlapping txns updating the same resource but 1st one rolls back; 2nd commits
testWriteSetTracking5
{ "repo_name": "vergilchiu/hive", "path": "ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java", "license": "apache-2.0", "size": 121935 }
[ "java.util.Arrays", "java.util.List", "org.apache.hadoop.hive.metastore.api.AddDynamicPartitions", "org.apache.hadoop.hive.metastore.api.DataOperationType", "org.apache.hadoop.hive.metastore.api.LockState", "org.apache.hadoop.hive.metastore.api.LockType", "org.apache.hadoop.hive.metastore.api.ShowLocksR...
import java.util.Arrays; import java.util.List; import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions; import org.apache.hadoop.hive.metastore.api.DataOperationType; import org.apache.hadoop.hive.metastore.api.LockState; import org.apache.hadoop.hive.metastore.api.LockType; import org.apache.hadoop.hive.meta...
import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.txn.*; import org.apache.hadoop.hive.ql.processors.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
2,664,427
private void addDevice(String deviceType, String deviceId) throws IoTFCReSTException { System.out.println("<-- Checking if device " + deviceType + " already created in Watson IoT Platform"); boolean deviceTypeExist = apiClient.isDeviceTypeExist(deviceType); boolean deviceExist = apiClient.isDeviceExist(devi...
void function(String deviceType, String deviceId) throws IoTFCReSTException { System.out.println(STR + deviceType + STR); boolean deviceTypeExist = apiClient.isDeviceTypeExist(deviceType); boolean deviceExist = apiClient.isDeviceExist(deviceType, deviceId); try { if (!deviceTypeExist) { System.out.println(STR + deviceT...
/** * This sample adds a device type using the Java Client Library. * @throws IoTFCReSTException */
This sample adds a device type using the Java Client Library
addDevice
{ "repo_name": "amitmangalvedkar/iot-java", "path": "src/test/java/com/ibm/iotf/client/application/api/IMOperationsTests.java", "license": "epl-1.0", "size": 47103 }
[ "com.ibm.iotf.client.IoTFCReSTException" ]
import com.ibm.iotf.client.IoTFCReSTException;
import com.ibm.iotf.client.*;
[ "com.ibm.iotf" ]
com.ibm.iotf;
1,476,927
public void setFont(Font font) { this.font = font; }
void function(Font font) { this.font = font; }
/** * The {@link Font} used by {@link CLabel} in the default implementation * * @param font * the {@link Font} or <code>null</code> if the default font * should be used */
The <code>Font</code> used by <code>CLabel</code> in the default implementation
setFont
{ "repo_name": "css-iter/org.csstudio.iter", "path": "plugins/org.eclipse.jface/src/org/eclipse/jface/window/DefaultToolTip.java", "license": "epl-1.0", "size": 8091 }
[ "org.eclipse.swt.graphics.Font" ]
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,927,840
@Override public List<User> getAllActiveUsersWithRole(String role) { String sql = "SELECT * FROM users WHERE role=? AND enabled=1"; List<User> users = getJdbcTemplate().query(sql, new Object[]{role}, new UserMapper()); return users; }
List<User> function(String role) { String sql = STR; List<User> users = getJdbcTemplate().query(sql, new Object[]{role}, new UserMapper()); return users; }
/** * Lists all the active users in the database with the specified role * @param role The role to search for ("ROLE_USER" or "ROLE_ADMIN") * @return An ArrayList of User objects, or null if the request fails */
Lists all the active users in the database with the specified role
getAllActiveUsersWithRole
{ "repo_name": "raiedsiddiqui/tapcm", "path": "src/main/java/org/tapestry/dao/UserDAOImpl.java", "license": "agpl-3.0", "size": 8857 }
[ "java.util.List", "org.tapestry.objects.User" ]
import java.util.List; import org.tapestry.objects.User;
import java.util.*; import org.tapestry.objects.*;
[ "java.util", "org.tapestry.objects" ]
java.util; org.tapestry.objects;
2,088,177
public static List<Integer> getReadColumnIDs(Configuration conf) { String skips = conf.get(READ_COLUMN_IDS_CONF_STR, READ_COLUMN_IDS_CONF_STR_DEFAULT); String[] list = StringUtils.split(skips); List<Integer> result = new ArrayList<Integer>(list.length); for (String element : list) { // it may co...
static List<Integer> function(Configuration conf) { String skips = conf.get(READ_COLUMN_IDS_CONF_STR, READ_COLUMN_IDS_CONF_STR_DEFAULT); String[] list = StringUtils.split(skips); List<Integer> result = new ArrayList<Integer>(list.length); for (String element : list) { Integer toAdd = Integer.parseInt(element); if (!res...
/** * Returns an array of column ids(start from zero) which is set in the given * parameter <tt>conf</tt>. */
Returns an array of column ids(start from zero) which is set in the given parameter conf
getReadColumnIDs
{ "repo_name": "vergilchiu/hive", "path": "serde/src/java/org/apache/hadoop/hive/serde2/ColumnProjectionUtils.java", "license": "apache-2.0", "size": 9377 }
[ "java.util.ArrayList", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.util.StringUtils" ]
import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.StringUtils;
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
162,367
@Override public ServletContext getServletContext() { return this.servletContext; }
ServletContext function() { return this.servletContext; }
/** * Return the ServletContext that this request is associated with. (Not * available in the standard HttpServletRequest interface for some reason.) */
Return the ServletContext that this request is associated with. (Not available in the standard HttpServletRequest interface for some reason.)
getServletContext
{ "repo_name": "qobel/esoguproject", "path": "spring-framework/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletRequest.java", "license": "apache-2.0", "size": 29136 }
[ "javax.servlet.ServletContext" ]
import javax.servlet.ServletContext;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,650,539
HandlerRegistration addLayerOrderChangedHandler(LayerOrderChangedHandler handler);
HandlerRegistration addLayerOrderChangedHandler(LayerOrderChangedHandler handler);
/** * Add a layer order handler. * * @param handler the handler * @return the handler registration */
Add a layer order handler
addLayerOrderChangedHandler
{ "repo_name": "geomajas/geomajas-project-client-gwt2", "path": "api/src/main/java/org/geomajas/gwt2/client/map/MapEventBus.java", "license": "agpl-3.0", "size": 6517 }
[ "com.google.web.bindery.event.shared.HandlerRegistration", "org.geomajas.gwt2.client.event.LayerOrderChangedHandler" ]
import com.google.web.bindery.event.shared.HandlerRegistration; import org.geomajas.gwt2.client.event.LayerOrderChangedHandler;
import com.google.web.bindery.event.shared.*; import org.geomajas.gwt2.client.event.*;
[ "com.google.web", "org.geomajas.gwt2" ]
com.google.web; org.geomajas.gwt2;
2,577,535
public float azimuth(LatLonPoint toPoint) { return GreatCircle.spherical_azimuth(radlat_, radlon_, toPoint.radlat_, toPoint.radlon_); } public transient float radlat_ = 0.0f; public transient float radlon_ = 0.0f;
float function(LatLonPoint toPoint) { return GreatCircle.spherical_azimuth(radlat_, radlon_, toPoint.radlat_, toPoint.radlon_); } public transient float radlat_ = 0.0f; public transient float radlon_ = 0.0f;
/** * Find the azimuth to another point, based on the sphercal earth * model. * * @param toPoint LatLonPoint * @return the azimuth `Az' east of north from this point bearing * toward the one provided as an argument.(-PI &lt;= Az * &lt;= PI). * */
Find the azimuth to another point, based on the sphercal earth model
azimuth
{ "repo_name": "ta-apps/GpsPrune", "path": "src/com/bbn/openmap/LatLonPoint.java", "license": "gpl-2.0", "size": 12446 }
[ "com.bbn.openmap.proj.GreatCircle" ]
import com.bbn.openmap.proj.GreatCircle;
import com.bbn.openmap.proj.*;
[ "com.bbn.openmap" ]
com.bbn.openmap;
932,475
private Query createInternalNativeQuery(String sql, SqlResultSetMappingConfig map) { Query query = createInternalNativeQuery(sql); QueryImpl queryImpl = (QueryImpl) query; queryImpl.setSqlResultSetMapping(map); return query; }
Query function(String sql, SqlResultSetMappingConfig map) { Query query = createInternalNativeQuery(sql); QueryImpl queryImpl = (QueryImpl) query; queryImpl.setSqlResultSetMapping(map); return query; }
/** * Creates an instance of the native query. */
Creates an instance of the native query
createInternalNativeQuery
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/amber/manager/AmberConnection.java", "license": "gpl-2.0", "size": 89822 }
[ "com.caucho.amber.cfg.SqlResultSetMappingConfig", "javax.persistence.Query" ]
import com.caucho.amber.cfg.SqlResultSetMappingConfig; import javax.persistence.Query;
import com.caucho.amber.cfg.*; import javax.persistence.*;
[ "com.caucho.amber", "javax.persistence" ]
com.caucho.amber; javax.persistence;
2,569,577
@Override @XmlElement(name = "temporalDatum", required = true) public TemporalDatum getDatum() { return datum; }
@XmlElement(name = STR, required = true) TemporalDatum function() { return datum; }
/** * Returns the datum. * * @return the datum. */
Returns the datum
getDatum
{ "repo_name": "Geomatys/sis", "path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultTemporalCRS.java", "license": "apache-2.0", "size": 14764 }
[ "javax.xml.bind.annotation.XmlElement", "org.opengis.referencing.datum.TemporalDatum" ]
import javax.xml.bind.annotation.XmlElement; import org.opengis.referencing.datum.TemporalDatum;
import javax.xml.bind.annotation.*; import org.opengis.referencing.datum.*;
[ "javax.xml", "org.opengis.referencing" ]
javax.xml; org.opengis.referencing;
661,681
public UiElementPropertiesContainer getProperties() { return propertiesContainer; }
UiElementPropertiesContainer function() { return propertiesContainer; }
/** * Returns the current UI element's attributes properties container. * * @return a {@link UiElementPropertiesContainer} instance, containing all properties of this UiElement */
Returns the current UI element's attributes properties container
getProperties
{ "repo_name": "MusalaSoft/atmosphere-client", "path": "src/main/java/com/musala/atmosphere/client/UiElement.java", "license": "gpl-3.0", "size": 30341 }
[ "com.musala.atmosphere.commons.ui.UiElementPropertiesContainer" ]
import com.musala.atmosphere.commons.ui.UiElementPropertiesContainer;
import com.musala.atmosphere.commons.ui.*;
[ "com.musala.atmosphere" ]
com.musala.atmosphere;
2,421,227
public static JEditorPane updateInfoPath(){ JEditorPane loadedFileText = new JEditorPane("text/html", "<html>"); String text = "<table border=0><tr><td><b>" + GUIMessages.getString("GeneratorInfoPanel.label1.text") + "</b></td>"; text += "<td>" + GUIMessages.getString("GeneratorInfoPanel.label2.text") + "</...
static JEditorPane function(){ JEditorPane loadedFileText = new JEditorPane(STR, STR); String text = STR + GUIMessages.getString(STR) + STR; text += "<td>" + GUIMessages.getString(STR) + "</td>STR<td>" + grammar_path + STR; text += STR + GUIMessages.getString(STR) + STR; text += "<td>" + GUIMessages.getString(STR) + "<...
/** * Update the string inside task bar * @return String */
Update the string inside task bar
updateInfoPath
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/src/synalp/generation/ui/gui/GeneratorParamPanel.java", "license": "epl-1.0", "size": 21287 }
[ "javax.swing.JEditorPane" ]
import javax.swing.JEditorPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,395,235
private boolean checkForKeystoresAvailability(String keyStore, String keyAlias, String trustStore, long timeout) { boolean found = false; for (int i = 0; i < timeout / 1000; ++i) { KeystoreInstance keyInstance = getKeystore(keyStore); if (keyInstance == null || (keyInstance !...
boolean function(String keyStore, String keyAlias, String trustStore, long timeout) { boolean found = false; for (int i = 0; i < timeout / 1000; ++i) { KeystoreInstance keyInstance = getKeystore(keyStore); if (keyInstance == null (keyInstance != null && keyInstance.isKeystoreLocked())) { sleep(1000); logger.info(STR, k...
/** * Purely check for the availability of provided key stores and key * * @param keyStore * @param keyAlias * @param trustStore * @param timeout */
Purely check for the availability of provided key stores and key
checkForKeystoresAvailability
{ "repo_name": "soluvas/karaf", "path": "jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/OsgiKeystoreManager.java", "license": "apache-2.0", "size": 6960 }
[ "org.apache.karaf.jaas.config.KeystoreInstance" ]
import org.apache.karaf.jaas.config.KeystoreInstance;
import org.apache.karaf.jaas.config.*;
[ "org.apache.karaf" ]
org.apache.karaf;
250,388
protected void config( final Column col ) { sDisplayCol = col.getDddbDisplayCol( ); sDataCol = col.getName( ); setDisplayField( sDisplayCol ); setValueField( sDataCol ); Store store = createStore( sDisplayCol, sDataCol, col.getValues( ) ); setStore( store ); setTypeAhead( true ); setMode( ComboBox.LO...
void function( final Column col ) { sDisplayCol = col.getDddbDisplayCol( ); sDataCol = col.getName( ); setDisplayField( sDisplayCol ); setValueField( sDataCol ); Store store = createStore( sDisplayCol, sDataCol, col.getValues( ) ); setStore( store ); setTypeAhead( true ); setMode( ComboBox.LOCAL ); setTriggerAction( Co...
/** * Configures list box for specified column * * @param col the source column */
Configures list box for specified column
config
{ "repo_name": "khomisha/ui", "path": "src/main/java/org/homedns/mkh/ui/client/form/ListBox.java", "license": "apache-2.0", "size": 3964 }
[ "com.gwtext.client.data.Store", "com.gwtext.client.widgets.form.ComboBox", "org.homedns.mkh.dataservice.client.Column" ]
import com.gwtext.client.data.Store; import com.gwtext.client.widgets.form.ComboBox; import org.homedns.mkh.dataservice.client.Column;
import com.gwtext.client.data.*; import com.gwtext.client.widgets.form.*; import org.homedns.mkh.dataservice.client.*;
[ "com.gwtext.client", "org.homedns.mkh" ]
com.gwtext.client; org.homedns.mkh;
406,329
public static void removeAllServerEntitlements(Long sid) { Map<String, Object> in = new HashMap<String, Object>(); in.put("sid", sid); CallableMode m = ModeFactory.getCallableMode( "System_queries", "unentitle_server"); m.execute(in, new HashMap<String, Integer>()); ...
static void function(Long sid) { Map<String, Object> in = new HashMap<String, Object>(); in.put("sid", sid); CallableMode m = ModeFactory.getCallableMode( STR, STR); m.execute(in, new HashMap<String, Integer>()); }
/** * Removes all the entitlements related to a server.. * @param sid server id to be unentitled. */
Removes all the entitlements related to a server.
removeAllServerEntitlements
{ "repo_name": "renner/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java", "license": "gpl-2.0", "size": 132498 }
[ "com.redhat.rhn.common.db.datasource.CallableMode", "com.redhat.rhn.common.db.datasource.ModeFactory", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.CallableMode; import com.redhat.rhn.common.db.datasource.ModeFactory; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,058,411
protected BloomFilter readBloomFilter() throws IOException { final long addr = checkpoint.addrBloom; if(addr == 0L) { return null; } if (storeCache != null) { // Try the cache first. final BloomFilter b...
BloomFilter function() throws IOException { final long addr = checkpoint.addrBloom; if(addr == 0L) { return null; } if (storeCache != null) { final BloomFilter bloomFilter = (BloomFilter) storeCache.get(addr); if (bloomFilter != null) { return bloomFilter; } } if (log.isInfoEnabled()) log.info(STR+addressManager.toStri...
/** * Reads the bloom filter directly from the file. * * @return The bloom filter -or- <code>null</code> if the bloom filter was * not constructed when the {@link IndexSegment} was built. */
Reads the bloom filter directly from the file
readBloomFilter
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata/src/java/com/bigdata/btree/IndexSegmentStore.java", "license": "gpl-2.0", "size": 50456 }
[ "com.bigdata.io.FileChannelUtility", "com.bigdata.io.SerializerUtil", "java.io.IOException", "java.nio.ByteBuffer" ]
import com.bigdata.io.FileChannelUtility; import com.bigdata.io.SerializerUtil; import java.io.IOException; import java.nio.ByteBuffer;
import com.bigdata.io.*; import java.io.*; import java.nio.*;
[ "com.bigdata.io", "java.io", "java.nio" ]
com.bigdata.io; java.io; java.nio;
2,808,709
public static HTTPResponse generateAuthenticationResponse(HTTPRequest request) throws ParseException, ExecutionException, JOSEException, SerializeException { try { Map<String, String> params = request.getQueryParameters(); // ClientID - used as the username - may be loca...
static HTTPResponse function(HTTPRequest request) throws ParseException, ExecutionException, JOSEException, SerializeException { try { Map<String, String> params = request.getQueryParameters(); client_id = STRclient_idSTRClient IDSTRcodeSTRCodeSTRCode was not issued to the specified clientSTRCode was not issued to the ...
/** * Generates an OpenID Connect authentication response. A code is expected * in the request and an ID token, an access token, and a refresh token are * provided in the response * * @param request an OpenID Connect authentication request * @return an OpenID Connect authentication respons...
Generates an OpenID Connect authentication response. A code is expected in the request and an ID token, an access token, and a refresh token are provided in the response
generateAuthenticationResponse
{ "repo_name": "mladevbb/skidentity_oidc_op", "path": "oidc_op/src/main/java/rub/nds/oidc/oidc_op/OIDCManager.java", "license": "lgpl-3.0", "size": 17510 }
[ "com.google.common.util.concurrent.UncheckedExecutionException", "com.nimbusds.jose.JOSEException", "com.nimbusds.jose.JWSAlgorithm", "com.nimbusds.jose.JWSHeader", "com.nimbusds.jose.JWSObject", "com.nimbusds.jose.Payload", "com.nimbusds.jose.crypto.MACSigner", "com.nimbusds.oauth2.sdk.OAuth2Error", ...
import com.google.common.util.concurrent.UncheckedExecutionException; import com.nimbusds.jose.JOSEException; import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jose.JWSHeader; import com.nimbusds.jose.JWSObject; import com.nimbusds.jose.Payload; import com.nimbusds.jose.crypto.MACSigner; import com.nimbusds.oa...
import com.google.common.util.concurrent.*; import com.nimbusds.jose.*; import com.nimbusds.jose.crypto.*; import com.nimbusds.oauth2.sdk.*; import com.nimbusds.oauth2.sdk.http.*; import com.nimbusds.openid.connect.sdk.*; import java.util.*; import java.util.concurrent.*;
[ "com.google.common", "com.nimbusds.jose", "com.nimbusds.oauth2", "com.nimbusds.openid", "java.util" ]
com.google.common; com.nimbusds.jose; com.nimbusds.oauth2; com.nimbusds.openid; java.util;
1,602,011
public ApplicationGatewayInner withFrontendPorts(List<ApplicationGatewayFrontendPortInner> frontendPorts) { this.frontendPorts = frontendPorts; return this; }
ApplicationGatewayInner function(List<ApplicationGatewayFrontendPortInner> frontendPorts) { this.frontendPorts = frontendPorts; return this; }
/** * Set the frontendPorts value. * * @param frontendPorts the frontendPorts value to set * @return the ApplicationGatewayInner object itself. */
Set the frontendPorts value
withFrontendPorts
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java", "license": "mit", "size": 13782 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
105,638
private Image makePCAImage(PCAProj proj, int width, int height) { int dimensions; if(proj.getGraph().z==-1){ dimensions=2; }else{ dimensions=3; } PCAGraphMethods gm=new PCAGraphMethods(proj.getGraph(),proj.getDrawInfo(),proj.getDrawInfo3D(),UI.mainWindow); gm.setDrawInfo(new Rectangl...
Image function(PCAProj proj, int width, int height) { int dimensions; if(proj.getGraph().z==-1){ dimensions=2; }else{ dimensions=3; } PCAGraphMethods gm=new PCAGraphMethods(proj.getGraph(),proj.getDrawInfo(),proj.getDrawInfo3D(),UI.mainWindow); gm.setDrawInfo(new Rectangle(0,0,width, height) ); Image img= new Image(UI....
/** * This method draws the given PCA project onto an image with the given * dimensions and returns the image * @param proj the given PCA Project * @param width the width of the image * @param height the height of the image * @return the SWT Image object */
This method draws the given PCA project onto an image with the given dimensions and returns the image
makePCAImage
{ "repo_name": "shaze/genesis", "path": "src/shared/ExportListener.java", "license": "agpl-3.0", "size": 12007 }
[ "org.eclipse.swt.graphics.Image", "org.eclipse.swt.graphics.Point", "org.eclipse.swt.graphics.Rectangle" ]
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
917,283
void log(String logFlag, Throwable t) { if (loggable(logFlag)) { if (bufferLog) { PrintStream origStream = System.err; ByteArrayOutputStream s = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(s); System.setErr(ps); t.printStackTrace(); ps.flush(); buffer.append(s.toString()); Sy...
void log(String logFlag, Throwable t) { if (loggable(logFlag)) { if (bufferLog) { PrintStream origStream = System.err; ByteArrayOutputStream s = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(s); System.setErr(ps); t.printStackTrace(); ps.flush(); buffer.append(s.toString()); System.setErr(origStream); }...
/** * Append an exception stack trace to the log buffer * * @param logFlag flag identifying the type of this message * @param t the throwable whose trace is to be added to the buffer */
Append an exception stack trace to the log buffer
log
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/test/impl/end2end/e2etest/Logger.java", "license": "apache-2.0", "size": 8486 }
[ "java.io.ByteArrayOutputStream", "java.io.PrintStream" ]
import java.io.ByteArrayOutputStream; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
2,415,413
public void setUseFriendlyName(boolean useFriendlyName) { this.useFriendlyName = useFriendlyName; } class JMXCollectionAttributeType implements CollectionAttributeType { JMXDataSource m_dataSource; AttributeGroupType m_groupType; String m_name; protected JMXColl...
void function(boolean useFriendlyName) { this.useFriendlyName = useFriendlyName; } class JMXCollectionAttributeType implements CollectionAttributeType { JMXDataSource m_dataSource; AttributeGroupType m_groupType; String m_name; protected JMXCollectionAttributeType(JMXDataSource dataSource, String key, String substituti...
/** * <p>Setter for the field <code>useFriendlyName</code>.</p> * * @param useFriendlyName a boolean. */
Setter for the field <code>useFriendlyName</code>
setUseFriendlyName
{ "repo_name": "rfdrake/opennms", "path": "opennms-services/src/main/java/org/opennms/netmgt/collectd/JMXCollector.java", "license": "gpl-2.0", "size": 38451 }
[ "org.opennms.netmgt.config.collector.AttributeGroupType", "org.opennms.netmgt.config.collector.CollectionAttributeType" ]
import org.opennms.netmgt.config.collector.AttributeGroupType; import org.opennms.netmgt.config.collector.CollectionAttributeType;
import org.opennms.netmgt.config.collector.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
2,860,566
public void setLeft(Expression newLeft) { if (newLeft != left) { NotificationChain msgs = null; if (left != null) msgs = ((InternalEObject) left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AstPackage.BINARY_EXPRESSION__LEFT, null, msgs); if (newLeft != null) msgs = ((Interna...
void function(Expression newLeft) { if (newLeft != left) { NotificationChain msgs = null; if (left != null) msgs = ((InternalEObject) left).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AstPackage.BINARY_EXPRESSION__LEFT, null, msgs); if (newLeft != null) msgs = ((InternalEObject) newLeft).eInverseAdd(this, EOPPOSITE_F...
/** * Sets the value of the '{@link edu.kit.iti.formal.pse.worthwhile.model.ast.BinaryExpression#getLeft <em>Left</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Left</em>' containment reference. * @see #getLeft() * @generated */
Sets the value of the '<code>edu.kit.iti.formal.pse.worthwhile.model.ast.BinaryExpression#getLeft Left</code>' containment reference.
setLeft
{ "repo_name": "team-worthwhile/worthwhile", "path": "implementierung/src/worthwhile.model/target/generated/java/edu/kit/iti/formal/pse/worthwhile/model/ast/BinaryExpression.java", "license": "bsd-3-clause", "size": 8420 }
[ "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.common.notify.NotificationChain", "org.eclipse.emf.ecore.InternalEObject", "org.eclipse.emf.ecore.impl.ENotificationImpl" ]
import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.impl.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
641,637
Assert.assertEquals("fizz", FizzBuzz.getResult(3)); Assert.assertEquals("fizz", FizzBuzz.getResult(6)); Assert.assertEquals("fizz", FizzBuzz.getResult(9)); }
Assert.assertEquals("fizz", FizzBuzz.getResult(3)); Assert.assertEquals("fizz", FizzBuzz.getResult(6)); Assert.assertEquals("fizz", FizzBuzz.getResult(9)); }
/** * Tests that 'fizz' is returned if only divisible by 3 */
Tests that 'fizz' is returned if only divisible by 3
getResultShouldReturnFizzIfOnlyDivisableBy3
{ "repo_name": "marcus-j/katas", "path": "fizzbuzz/src/test/java/de/marcusjanke/katas/fizzbuzz/FizzBuzzTest.java", "license": "apache-2.0", "size": 1405 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,983,668
private void setCreatedDate(Date createdDate) { String dateNow = GMDateUtils.dateToString(createdDate, GMGlobal.DATE_TIME_FORMATTER); setValue(CREATED_DATE, dateNow); }
void function(Date createdDate) { String dateNow = GMDateUtils.dateToString(createdDate, GMGlobal.DATE_TIME_FORMATTER); setValue(CREATED_DATE, dateNow); }
/** * Set created date * * @param createdDate date when image is created */
Set created date
setCreatedDate
{ "repo_name": "graphicsminer/image-captions-acquisition", "path": "frontend-android/app/src/main/java/the/miner/engine/database/model/GMImage.java", "license": "mit", "size": 19072 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
316,877
private Map<Integer, List<Throwable>> checkParts(Map<String, TreeTraversalInfo> aTreesInfo) { System.out.println(); // Map partId -> errors. Map<Integer, List<Throwable>> res = new HashMap<>(); Map<String, TreeTraversalInfo> treesInfo = new HashMap<>(aTreesInfo); treesInfo...
Map<Integer, List<Throwable>> function(Map<String, TreeTraversalInfo> aTreesInfo) { System.out.println(); Map<Integer, List<Throwable>> res = new HashMap<>(); Map<String, TreeTraversalInfo> treesInfo = new HashMap<>(aTreesInfo); treesInfo.remove(META_TREE_NAME); ProgressPrinter progressPrinter = new ProgressPrinter(Sys...
/** * Checks partitions, comparing partition indexes (cache data tree) to indexes given in {@code aTreesInfo}. * * @param aTreesInfo Index trees info to compare cache data tree with. * @return Map of errors, bound to partition id. */
Checks partitions, comparing partition indexes (cache data tree) to indexes given in aTreesInfo
checkParts
{ "repo_name": "NSAmelchev/ignite", "path": "modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/indexreader/IgniteIndexReader.java", "license": "apache-2.0", "size": 60130 }
[ "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Map", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.IgniteException", "org.apache.ignite.internal.commandline.ProgressPrinter", "org.apache.ignite.internal.processors.cache.persistence.file.FilePageStore", "or...
import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.commandline.ProgressPrinter; import org.apache.ignite.internal.processors.cache.persistence.fil...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.commandline.*; import org.apache.ignite.internal.processors.cache.persistence.file.*; import org.apache.ignite.internal.processors.cache.persistence.tree.io.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,200,034
public void testSetMatchAllSubjectAltNames() { try { GeneralName san1 = new GeneralName(1, "rfc@822.Name"); GeneralName san2 = new GeneralName(2, "dNSName"); GeneralNames sans_1 = new GeneralNames(); sans_1.addName(san1); GeneralNames sans_2 = new...
void function() { try { GeneralName san1 = new GeneralName(1, STR); GeneralName san2 = new GeneralName(2, STR); GeneralNames sans_1 = new GeneralNames(); sans_1.addName(san1); GeneralNames sans_2 = new GeneralNames(); sans_2.addName(san1); sans_2.addName(san2); TestCert cert = new TestCert(sans_1); X509CertSelector sel...
/** * setMatchAllSubjectAltNames(boolean matchAllNames) method testing. */
setMatchAllSubjectAltNames(boolean matchAllNames) method testing
testSetMatchAllSubjectAltNames
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/security/src/test/impl/java.injected/java/security/cert/X509CertSelectorTest.java", "license": "apache-2.0", "size": 133766 }
[ "java.io.IOException", "org.apache.harmony.security.x509.GeneralName", "org.apache.harmony.security.x509.GeneralNames" ]
import java.io.IOException; import org.apache.harmony.security.x509.GeneralName; import org.apache.harmony.security.x509.GeneralNames;
import java.io.*; import org.apache.harmony.security.x509.*;
[ "java.io", "org.apache.harmony" ]
java.io; org.apache.harmony;
2,637,241
public void setCenterOfMassAtIndex(int colIdx, PointND centOfMass){ assert(colIdx < this.cols) : new IllegalArgumentException("Column index for this mesh-matrix is out of bounds."); this.centers.set(colIdx, centOfMass); }
void function(int colIdx, PointND centOfMass){ assert(colIdx < this.cols) : new IllegalArgumentException(STR); this.centers.set(colIdx, centOfMass); }
/** * Sets the center of mass of a mesh object at a certain index position. Needed to restore original mesh positions after * a shift to zero-mean. * @param colIdx List-index to be written. * @param centOfMass Value to be written at list-index. */
Sets the center of mass of a mesh object at a certain index position. Needed to restore original mesh positions after a shift to zero-mean
setCenterOfMassAtIndex
{ "repo_name": "Darkgoppi/CONRAD", "path": "src/edu/stanford/rsl/conrad/geometry/shapes/mesh/DataMatrix.java", "license": "gpl-3.0", "size": 13138 }
[ "edu.stanford.rsl.conrad.geometry.shapes.simple.PointND" ]
import edu.stanford.rsl.conrad.geometry.shapes.simple.PointND;
import edu.stanford.rsl.conrad.geometry.shapes.simple.*;
[ "edu.stanford.rsl" ]
edu.stanford.rsl;
2,065,368
@Disabled @Test void testSatisfiable() { // TRUE may be satisfiable checkSatisfiable(rexBuilder.makeLiteral(true), "true"); // FALSE is not satisfiable checkNotSatisfiable(rexBuilder.makeLiteral(false)); // The expression "$0 = 1". final RexNode i0_eq_0 = rexBuilder.makeCall( ...
@Test void testSatisfiable() { checkSatisfiable(rexBuilder.makeLiteral(true), "true"); checkNotSatisfiable(rexBuilder.makeLiteral(false)); final RexNode i0_eq_0 = rexBuilder.makeCall( SqlStdOperatorTable.EQUALS, rexBuilder.makeInputRef( typeFactory.createType(int.class), 0), rexBuilder.makeExactLiteral(BigDecimal.ZERO)...
/** Unit test for logic functions * {@link org.apache.calcite.plan.SubstitutionVisitor#mayBeSatisfiable} and * {@link RexUtil#simplify}. */
Unit test for logic functions <code>org.apache.calcite.plan.SubstitutionVisitor#mayBeSatisfiable</code> and
testSatisfiable
{ "repo_name": "datametica/calcite", "path": "core/src/test/java/org/apache/calcite/test/MaterializedViewSubstitutionVisitorTest.java", "license": "apache-2.0", "size": 61771 }
[ "java.math.BigDecimal", "org.apache.calcite.rex.RexInputRef", "org.apache.calcite.rex.RexNode", "org.apache.calcite.sql.fun.SqlStdOperatorTable", "org.junit.jupiter.api.Test" ]
import java.math.BigDecimal; import org.apache.calcite.rex.RexInputRef; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.junit.jupiter.api.Test;
import java.math.*; import org.apache.calcite.rex.*; import org.apache.calcite.sql.fun.*; import org.junit.jupiter.api.*;
[ "java.math", "org.apache.calcite", "org.junit.jupiter" ]
java.math; org.apache.calcite; org.junit.jupiter;
1,572,032
public static FileFilter getAudioFilter() { return file -> { if (!file.isHidden() && file.canRead()) { if (file.isDirectory()) { return true; } else { String ext = getExtension(file.getName()); for (Strin...
static FileFilter function() { return file -> { if (!file.isHidden() && file.canRead()) { if (file.isDirectory()) { return true; } else { String ext = getExtension(file.getName()); for (String allowedExtension : sExtensions) { if (!TextUtils.isEmpty(ext)) { if (allowedExtension.equalsIgnoreCase(ext)) { return true; } }...
/** * An {@link FileFilter} which only accepts directories & supported audio filetypes, based on extension */
An <code>FileFilter</code> which only accepts directories & supported audio filetypes, based on extension
getAudioFilter
{ "repo_name": "willcoughlin/Shuttle", "path": "app/src/main/java/com/simplecity/amp_library/utils/FileHelper.java", "license": "gpl-3.0", "size": 12391 }
[ "android.text.TextUtils", "java.io.FileFilter" ]
import android.text.TextUtils; import java.io.FileFilter;
import android.text.*; import java.io.*;
[ "android.text", "java.io" ]
android.text; java.io;
109,794
EClass getPatternSpecification();
EClass getPatternSpecification();
/** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternSpecification <em>Pattern Specification</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Pattern Specification</em>'. * @see hu.bme...
Returns the meta object for class '<code>hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternSpecification Pattern Specification</code>'.
getPatternSpecification
{ "repo_name": "viatra/VIATRA-Generator", "path": "Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/ApplicationConfigurationPackage.java", "license": "epl-1.0", "size": 236178 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,261,688
@Override public String getFirst(String headerName) { List<String> headerValues = headers.get(headerName); return headerValues != null ? headerValues.get(0) : null; }
String function(String headerName) { List<String> headerValues = headers.get(headerName); return headerValues != null ? headerValues.get(0) : null; }
/** * Return the first header value for the given header name, if any. * @param headerName the header name * @return the first header value, or {@code null} if none */
Return the first header value for the given header name, if any
getFirst
{ "repo_name": "leogoing/spring_jeesite", "path": "spring-web-4.0/org/springframework/http/HttpHeaders.java", "license": "apache-2.0", "size": 20561 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,167,937
public WikiPage getPage() { return m_page; }
WikiPage function() { return m_page; }
/** * Returns Wikipage for this result. * @return WikiPage */
Returns Wikipage for this result
getPage
{ "repo_name": "tateshitah/jspwiki", "path": "jspwiki-war/src/main/java/org/apache/wiki/search/SearchMatcher.java", "license": "apache-2.0", "size": 5276 }
[ "org.apache.wiki.WikiPage" ]
import org.apache.wiki.WikiPage;
import org.apache.wiki.*;
[ "org.apache.wiki" ]
org.apache.wiki;
716,090
default boolean append(String value) { return append(F.stringx(value)); }
default boolean append(String value) { return append(F.stringx(value)); }
/** * Adds the specified string value at the end of this {@code List}. * * @param value the string value which should be appended. * @return always true. * @throws UnsupportedOperationException if adding to this {@code List} is not supported. * @throws ClassCastException if the class of the object is ...
Adds the specified string value at the end of this List
append
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IASTAppendable.java", "license": "gpl-3.0", "size": 16302 }
[ "org.matheclipse.core.expression.F" ]
import org.matheclipse.core.expression.F;
import org.matheclipse.core.expression.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
2,822,266
void createJob(String namespace, JobConfig jobConfig) throws SaturnJobConsoleException;
void createJob(String namespace, JobConfig jobConfig) throws SaturnJobConsoleException;
/** * Create a new job. * * @param jobConfig construct from the request. * @throws SaturnJobConsoleException for below scenarios: <ul> <li>namespace or jobName is not found (statusCode = * 404)</li> <li>Job with the same name is already created. (statusCode = 400)</li> <li>Other exceptions (statusCode * = 5...
Create a new job
createJob
{ "repo_name": "vipshop/Saturn", "path": "saturn-console-api/src/main/java/com/vip/saturn/job/console/service/RestApiService.java", "license": "apache-2.0", "size": 4900 }
[ "com.vip.saturn.job.console.domain.JobConfig", "com.vip.saturn.job.console.exception.SaturnJobConsoleException" ]
import com.vip.saturn.job.console.domain.JobConfig; import com.vip.saturn.job.console.exception.SaturnJobConsoleException;
import com.vip.saturn.job.console.domain.*; import com.vip.saturn.job.console.exception.*;
[ "com.vip.saturn" ]
com.vip.saturn;
2,183,109
private void copyOrMove(List<LocalMessage> messages, final String destination, final FolderOperation operation) { Map<String, List<LocalMessage>> folderMap = new HashMap<String, List<LocalMessage>>(); for (LocalMessage message : messages) { if ((operation == FolderOperation...
void function(List<LocalMessage> messages, final String destination, final FolderOperation operation) { Map<String, List<LocalMessage>> folderMap = new HashMap<String, List<LocalMessage>>(); for (LocalMessage message : messages) { if ((operation == FolderOperation.MOVE && !mController.isMoveCapable(message)) (operation...
/** * The underlying implementation for {@link #copy(List, String)} and * {@link #move(List, String)}. This method was added mainly because those 2 * methods share common behavior. * * @param messages * The list of messages to copy or move. Never {@code null}. * @param destina...
The underlying implementation for <code>#copy(List, String)</code> and <code>#move(List, String)</code>. This method was added mainly because those 2 methods share common behavior
copyOrMove
{ "repo_name": "cliniome/pki", "path": "secureClient/src/main/java/sa/com/is/fragment/MessageListFragment.java", "license": "bsd-3-clause", "size": 126979 }
[ "android.view.ActionMode", "android.view.MenuItem", "android.widget.Toast", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "sa.com.is.Account", "sa.com.is.mailstore.LocalMessage" ]
import android.view.ActionMode; import android.view.MenuItem; import android.widget.Toast; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import sa.com.is.Account; import sa.com.is.mailstore.LocalMessage;
import android.view.*; import android.widget.*; import java.util.*; import sa.com.is.*; import sa.com.is.mailstore.*;
[ "android.view", "android.widget", "java.util", "sa.com.is" ]
android.view; android.widget; java.util; sa.com.is;
767,254
void traverseWithScope(Node root, Scope s) { Preconditions.checkState(s.isGlobal()); try { inputId = null; sourceName = ""; curNode = root; pushScope(s); traverseBranch(root, null); popScope(); } catch (Exception unexpectedException) { throwUnexpectedException(une...
void traverseWithScope(Node root, Scope s) { Preconditions.checkState(s.isGlobal()); try { inputId = null; sourceName = ""; curNode = root; pushScope(s); traverseBranch(root, null); popScope(); } catch (Exception unexpectedException) { throwUnexpectedException(unexpectedException); } }
/** * Traverses a parse tree recursively with a scope, starting with the given * root. This should only be used in the global scope. Otherwise, use * {@link #traverseAtScope}. */
Traverses a parse tree recursively with a scope, starting with the given root. This should only be used in the global scope. Otherwise, use <code>#traverseAtScope</code>
traverseWithScope
{ "repo_name": "pr4v33n/closure-compiler", "path": "src/com/google/javascript/jscomp/NodeTraversal.java", "license": "apache-2.0", "size": 25324 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
466,395
public boolean isInternal() { for (Action action : actions()) { if (!action.isInternal()) { return false; } } return true; } } class NewAction { private final String key; private String deprecatedKey; private String description; private String sin...
boolean function() { for (Action action : actions()) { if (!action.isInternal()) { return false; } } return true; } } class NewAction { final String key; private String deprecatedKey; private String description; private String since; private String deprecatedSince; private boolean post = false; private boolean function...
/** * Returns true if all the actions are for internal use * * @see org.sonar.api.server.ws.WebService.Action#isInternal() * @since 4.3 */
Returns true if all the actions are for internal use
isInternal
{ "repo_name": "lbndev/sonarqube", "path": "sonar-plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java", "license": "lgpl-3.0", "size": 27081 }
[ "com.google.common.collect.Maps", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import com.google.common.collect.Maps; import java.util.ArrayList; import java.util.List; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,502,823
private void unregisterPhoneStateManager() { mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); }
void function() { mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); }
/** * Unregisters PhoneStateListener */
Unregisters PhoneStateListener
unregisterPhoneStateManager
{ "repo_name": "wish7code/openbmap", "path": "android/app/src/main/java/org/openbmap/services/wireless/WirelessLoggerService.java", "license": "agpl-3.0", "size": 64805 }
[ "android.telephony.PhoneStateListener" ]
import android.telephony.PhoneStateListener;
import android.telephony.*;
[ "android.telephony" ]
android.telephony;
2,418,287
void createAcroForm(PDDocument template);
void createAcroForm(PDDocument template);
/** * Creates Acro forms in the template. * * @param template the template document */
Creates Acro forms in the template
createAcroForm
{ "repo_name": "TomRoush/PdfBox-Android", "path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/interactive/digitalsignature/visible/PDFTemplateBuilder.java", "license": "apache-2.0", "size": 10197 }
[ "com.tom_roush.pdfbox.pdmodel.PDDocument" ]
import com.tom_roush.pdfbox.pdmodel.PDDocument;
import com.tom_roush.pdfbox.pdmodel.*;
[ "com.tom_roush.pdfbox" ]
com.tom_roush.pdfbox;
1,417,981
void setContext(Context context) { mContext = context; }
void setContext(Context context) { mContext = context; }
/** * For testing only: Inject context into already-created instance */
For testing only: Inject context into already-created instance
setContext
{ "repo_name": "craigacgomez/android_email_policy_patch", "path": "packages/apps/Email/src/com/android/email/SecurityPolicy.java", "license": "apache-2.0", "size": 39754 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,516,741
public void testMultipleConcurrentEndsInsideEmbeddedSubProcess() { PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder() .createActivity("start") .initial() .behavior(new Automatic()) .transition("embeddedsubprocess") .endActivity() .createActivity("embe...
void function() { PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder() .createActivity("start") .initial() .behavior(new Automatic()) .transition(STR) .endActivity() .createActivity(STR) .scope() .behavior(new EmbeddedSubProcess()) .createActivity(STR) .behavior(new Automatic()) .transition("fork") ....
/** * +----------------------------------------+ * | embeddedsubprocess +----------+ | * | +---->|endInside1| | * | | +----------+ | * | | | * +-----+ | +-------...
+----------------------------------------+ | embeddedsubprocess +----------+ | | +---->|endInside1| | | | +----------+ | | | | +-----+ | +-----------+ +----+ +----------+ | +---+ |start|-->| |startInside|-->|fork|-->|endInside2| |-->|end| +-----+ | +-----------+ +----+ +----------+ | +---+ | | | | | +----------+ | | +-...
testMultipleConcurrentEndsInsideEmbeddedSubProcess
{ "repo_name": "falko/camunda-bpm-platform", "path": "engine/src/test/java/org/camunda/bpm/engine/test/standalone/pvm/PvmEmbeddedSubProcessTest.java", "license": "apache-2.0", "size": 15325 }
[ "org.camunda.bpm.engine.impl.pvm.ProcessDefinitionBuilder", "org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition", "org.camunda.bpm.engine.impl.pvm.PvmProcessInstance", "org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic", "org.camunda.bpm.engine.test.standalone.pvm.activities.EmbeddedSubProce...
import org.camunda.bpm.engine.impl.pvm.ProcessDefinitionBuilder; import org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition; import org.camunda.bpm.engine.impl.pvm.PvmProcessInstance; import org.camunda.bpm.engine.test.standalone.pvm.activities.Automatic; import org.camunda.bpm.engine.test.standalone.pvm.activities.Em...
import org.camunda.bpm.engine.impl.pvm.*; import org.camunda.bpm.engine.test.standalone.pvm.activities.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
535,619
public Shape makeBufferedLineString(List<Point> points, double buf) { return new BufferedLineString(points, buf, isGeo(), this); }
Shape function(List<Point> points, double buf) { return new BufferedLineString(points, buf, isGeo(), this); }
/** Constructs a buffered line string. It's an ordered sequence of connected vertexes, * with a buffer distance along the line in all directions. There * is no official shape/interface for it so we just return Shape. */
Constructs a buffered line string. It's an ordered sequence of connected vertexes, with a buffer distance along the line in all directions. There
makeBufferedLineString
{ "repo_name": "jdeolive/spatial4j", "path": "src/main/java/com/spatial4j/core/context/SpatialContext.java", "license": "apache-2.0", "size": 13690 }
[ "com.spatial4j.core.shape.Point", "com.spatial4j.core.shape.Shape", "com.spatial4j.core.shape.impl.BufferedLineString", "java.util.List" ]
import com.spatial4j.core.shape.Point; import com.spatial4j.core.shape.Shape; import com.spatial4j.core.shape.impl.BufferedLineString; import java.util.List;
import com.spatial4j.core.shape.*; import com.spatial4j.core.shape.impl.*; import java.util.*;
[ "com.spatial4j.core", "java.util" ]
com.spatial4j.core; java.util;
2,028,901
interface WithClientAuthenticationMethod { Update withClientAuthenticationMethod(List<ClientAuthenticationMethod> clientAuthenticationMethod); }
interface WithClientAuthenticationMethod { Update withClientAuthenticationMethod(List<ClientAuthenticationMethod> clientAuthenticationMethod); }
/** * Specifies clientAuthenticationMethod. * @param clientAuthenticationMethod Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the re...
Specifies clientAuthenticationMethod
withClientAuthenticationMethod
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/AuthorizationServerContract.java", "license": "mit", "size": 21959 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,045,197
EReference getTProvide_Service();
EReference getTProvide_Service();
/** * Returns the meta object for the containment reference '{@link org.eclipse.bpel.apache.ode.deploy.model.dd.TProvide#getService <em>Service</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Service</em>'. * @see org.eclipse.bpel.apache.o...
Returns the meta object for the containment reference '<code>org.eclipse.bpel.apache.ode.deploy.model.dd.TProvide#getService Service</code>'.
getTProvide_Service
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.apache.ode.deploy.model/src/org/eclipse/bpel/apache/ode/deploy/model/dd/ddPackage.java", "license": "apache-2.0", "size": 68076 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,518,232