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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void addComponents() {
// Sets the layout
setLayout(new GridBagLayout());
// Adds the components to the window with the layout
GridBagConstraints constraints = new GridBagConstraints();
constraints.fill = GridBagConstraints.BOTH;
constraints.insets = new Insets(5, 5, 5, 5);
constrain... | void function() { setLayout(new GridBagLayout()); GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.BOTH; constraints.insets = new Insets(5, 5, 5, 5); constraints.gridx = 0; constraints.gridy = 0; _configurationPanel.add(_compilerPathLabel, constraints); constraints.gridx ... | /**
* Adds the components to the ACIDE - A Configurable IDE compiler
* configuration window with the layout.
*/ | Adds the components to the ACIDE - A Configurable IDE compiler configuration window with the layout | addComponents | {
"repo_name": "salcedonia/acide-0-8-release-2010-2011",
"path": "acide/src/acide/gui/menuBar/projectMenu/gui/compilerWindow/AcideCompilerConfigurationWindow.java",
"license": "gpl-3.0",
"size": 22193
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,582,962 |
@Test
public void testDeviceFilterNoDevices() throws CmdLineException {
IDevice[] devices = new IDevice[] { };
assertNull(basicAdbHelper.filterDevices(devices));
} | void function() throws CmdLineException { IDevice[] devices = new IDevice[] { }; assertNull(basicAdbHelper.filterDevices(devices)); } | /**
* Verify that null is returned when no devices are present.
*/ | Verify that null is returned when no devices are present | testDeviceFilterNoDevices | {
"repo_name": "bocon13/buck",
"path": "test/com/facebook/buck/android/AdbHelperTest.java",
"license": "apache-2.0",
"size": 19408
} | [
"com.android.ddmlib.IDevice",
"org.junit.Assert",
"org.kohsuke.args4j.CmdLineException"
] | import com.android.ddmlib.IDevice; import org.junit.Assert; import org.kohsuke.args4j.CmdLineException; | import com.android.ddmlib.*; import org.junit.*; import org.kohsuke.args4j.*; | [
"com.android.ddmlib",
"org.junit",
"org.kohsuke.args4j"
] | com.android.ddmlib; org.junit; org.kohsuke.args4j; | 763,069 |
if (o instanceof Text) {
Text to = (Text) o;
out.write(to.getBytes(), 0, to.getLength());
} else {
out.write(o.toString().getBytes(utf8));
}
} | if (o instanceof Text) { Text to = (Text) o; out.write(to.getBytes(), 0, to.getLength()); } else { out.write(o.toString().getBytes(utf8)); } } | /**
* Write the object to the byte stream, handling Text as a special case.
*
* @param o
* the object to print
* @throws IOException
* if the write throws, we pass it on
*/ | Write the object to the byte stream, handling Text as a special case | writeObject | {
"repo_name": "85977328/logcenter",
"path": "src/main/java/com/panguso/lc/analysis/format/mapreduce/TextOutputFormat.java",
"license": "apache-2.0",
"size": 4681
} | [
"org.apache.hadoop.io.Text"
] | import org.apache.hadoop.io.Text; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,176,242 |
private void readOutputFiles(StringTokenizer line){
String new_line = line.nextToken(); //We read the input data line
StringTokenizer data = new StringTokenizer(new_line, " = \" ");
data.nextToken(); //inputFile
outputTrFile = data.nextToken();
outputTstFile = data.nextToken(... | void function(StringTokenizer line){ String new_line = line.nextToken(); StringTokenizer data = new StringTokenizer(new_line, STR "); data.nextToken(); outputTrFile = data.nextToken(); outputTstFile = data.nextToken(); while(data.hasMoreTokens()){ outputFiles.add(data.nextToken()); } } | /**
* We read the output files for training and test and all the possible remaining output files
* @param line StringTokenizer It is the line containing the output files.
*/ | We read the output files for training and test and all the possible remaining output files | readOutputFiles | {
"repo_name": "adofsauron/KEEL",
"path": "src/keel/Algorithms/Fuzzy_Rule_Learning/Genetic/Fuzzy_Ish_Hybrid/parseParameters.java",
"license": "gpl-3.0",
"size": 6680
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,575,869 |
EList<DEdge> getEdgesFromMapping(EdgeMapping mapping); | EList<DEdge> getEdgesFromMapping(EdgeMapping mapping); | /**
* <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc -->
* Returns all edges owned (directly or not) by this viewpoint that have
* been created from the specified mapping.
*
* @param mapping
* The mapping that has created the returned ViewEdges <!--
* ... | Returns all edges owned (directly or not) by this viewpoint that have been created from the specified mapping | getEdgesFromMapping | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/DDiagram.java",
"license": "epl-1.0",
"size": 19353
} | [
"org.eclipse.emf.common.util.EList",
"org.eclipse.sirius.diagram.description.EdgeMapping"
] | import org.eclipse.emf.common.util.EList; import org.eclipse.sirius.diagram.description.EdgeMapping; | import org.eclipse.emf.common.util.*; import org.eclipse.sirius.diagram.description.*; | [
"org.eclipse.emf",
"org.eclipse.sirius"
] | org.eclipse.emf; org.eclipse.sirius; | 1,978,228 |
@Test
public void testClientToAccessor() {
Host host = Host.getHost(0);
VM vm1 = host.getVM(1);
VM vm3 = host.getVM(3);
doTest(vm3, vm1);
} | void function() { Host host = Host.getHost(0); VM vm1 = host.getVM(1); VM vm3 = host.getVM(3); doTest(vm3, vm1); } | /**
* Test to make sure we don't deserialize objects on a server that is an accessor.
*/ | Test to make sure we don't deserialize objects on a server that is an accessor | testClientToAccessor | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/pdx/PdxDeserializationDUnitTest.java",
"license": "apache-2.0",
"size": 13447
} | [
"org.apache.geode.test.dunit.Host"
] | import org.apache.geode.test.dunit.Host; | import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,019,843 |
public static List<Hierarchy> allContainedHierarchies(ParentChild panel) {
List<Hierarchy> allContainedHierarchies = new ArrayList<Hierarchy>();
for (VisibleElement visibleElement : panel.getVisibleElementList()) {
if (visibleElement instanceof Hierarchy) {
allContainedHierarchies.add((Hierarchy) visi... | static List<Hierarchy> function(ParentChild panel) { List<Hierarchy> allContainedHierarchies = new ArrayList<Hierarchy>(); for (VisibleElement visibleElement : panel.getVisibleElementList()) { if (visibleElement instanceof Hierarchy) { allContainedHierarchies.add((Hierarchy) visibleElement); } } return allContainedHier... | /**
* Return all hierarchies contained by the panel
* @param panel Parent-child panel
* @return All contained hierarchies
*/ | Return all hierarchies contained by the panel | allContainedHierarchies | {
"repo_name": "farkas-arpad/KROKI-mockup-tool",
"path": "Kroki-UIProfil/src/kroki/profil/utils/ParentChildUtil.java",
"license": "mit",
"size": 15997
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,581,052 |
public RoleResult getAllRoles(String relationId)
throws IllegalArgumentException,
RelationNotFoundException,
RelationServiceNotRegisteredException {
if (relationId == null) {
String excMsg = "Invalid parameter.";
throw new IllegalArgumentExcepti... | RoleResult function(String relationId) throws IllegalArgumentException, RelationNotFoundException, RelationServiceNotRegisteredException { if (relationId == null) { String excMsg = STR; throw new IllegalArgumentException(excMsg); } RELATION_LOGGER.entering(RelationService.class.getName(), STR, relationId); Object relOb... | /**
* Returns all roles present in the relation.
*
* @param relationId relation id
*
* @return a RoleResult object, including a RoleList (for roles
* successfully retrieved) and a RoleUnresolvedList (for roles not
* readable).
*
* @exception IllegalArgumentException if nul... | Returns all roles present in the relation | getAllRoles | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/javax/management/relation/RelationService.java",
"license": "gpl-2.0",
"size": 151190
} | [
"javax.management.ObjectName"
] | import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 355,353 |
int getCurrentCampus() {
Location loc = getCurrentLocation();
if (loc == null)
return -1;
return getCampusFromLocation(loc);
} | int getCurrentCampus() { Location loc = getCurrentLocation(); if (loc == null) return -1; return getCampusFromLocation(loc); } | /**
* Returns the "id" of the current campus
*
* @return Campus id
*/ | Returns the "id" of the current campus | getCurrentCampus | {
"repo_name": "brdvlps/TumCampusApp",
"path": "app/src/main/java/de/tum/in/tumcampusapp/models/managers/LocationManager.java",
"license": "gpl-2.0",
"size": 11770
} | [
"android.location.Location"
] | import android.location.Location; | import android.location.*; | [
"android.location"
] | android.location; | 2,103,376 |
List<Resource<?>> listResources(); | List<Resource<?>> listResources(); | /**
* Return a list of child resources of the current resource. (Never null.)
*/ | Return a list of child resources of the current resource. (Never null.) | listResources | {
"repo_name": "stalep/forge-core",
"path": "resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java",
"license": "epl-1.0",
"size": 5068
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 326,369 |
@Override
public void writeMapEnd() throws IOException {
throw new IOException("MemcmpEncoder does not support writing Map types.");
} | void function() throws IOException { throw new IOException(STR); } | /**
* Memcmp encoding for maps not supported, since ordering of Map in Avro is
* undefined.
*/ | Memcmp encoding for maps not supported, since ordering of Map in Avro is undefined | writeMapEnd | {
"repo_name": "dlanza1/kite",
"path": "kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/io/MemcmpEncoder.java",
"license": "apache-2.0",
"size": 6873
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 128,034 |
public static void startTenantFlow(String tenantDomain) {
String tenantDomainParam = tenantDomain;
int tenantId = MultitenantConstants.SUPER_TENANT_ID;
if (tenantDomainParam != null && !tenantDomainParam.trim().isEmpty()) {
try {
tenantId = FrameworkServiceCompon... | static void function(String tenantDomain) { String tenantDomainParam = tenantDomain; int tenantId = MultitenantConstants.SUPER_TENANT_ID; if (tenantDomainParam != null && !tenantDomainParam.trim().isEmpty()) { try { tenantId = FrameworkServiceComponent.getRealmService().getTenantManager() .getTenantId(tenantDomain); } ... | /**
* Starts the tenant flow for the given tenant domain
*
* @param tenantDomain tenant domain
*/ | Starts the tenant flow for the given tenant domain | startTenantFlow | {
"repo_name": "damithsenanayake/carbon-identity",
"path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/util/FrameworkUtils.java",
"license": "apache-2.0",
"size": 44386
} | [
"org.wso2.carbon.context.PrivilegedCarbonContext",
"org.wso2.carbon.identity.application.authentication.framework.internal.FrameworkServiceComponent",
"org.wso2.carbon.user.api.UserStoreException",
"org.wso2.carbon.utils.multitenancy.MultitenantConstants"
] | import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.application.authentication.framework.internal.FrameworkServiceComponent; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; | import org.wso2.carbon.context.*; import org.wso2.carbon.identity.application.authentication.framework.internal.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.utils.multitenancy.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 327,892 |
public Object set(Object member, Object newValue) throws IllegalArgumentException, IllegalAccessException {
if (!isWritable())
throw new IllegalStateException("Property " + propertyName + " of " + memberClass
+ " not writable");
try {
return setter.invoke... | Object function(Object member, Object newValue) throws IllegalArgumentException, IllegalAccessException { if (!isWritable()) throw new IllegalStateException(STR + propertyName + STR + memberClass + STR); try { return setter.invoke(member, new Object[] { newValue }); } catch (InvocationTargetException e) { throw new Und... | /**
* Sets the value of this property for the specified Object.
* @throws IllegalAccessException
* @throws IllegalArgumentException
*/ | Sets the value of this property for the specified Object | set | {
"repo_name": "bherrmann7/jbum",
"path": "fixed-src/com/thoughtworks/xstream/converters/javabean/BeanProperty.java",
"license": "apache-2.0",
"size": 3216
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.UndeclaredThrowableException"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.UndeclaredThrowableException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,150,878 |
Socket createSocket(
String host,
int port
) throws IOException, UnknownHostException; | Socket createSocket( String host, int port ) throws IOException, UnknownHostException; | /**
* Gets a new socket connection to the given host.
*
* @param host the host name/IP
*
* @param port the port on the host
*
* @return Socket a new socket
*
* @throws IOException if an I/O error occurs while creating the socket
* @throws UnknownHostException if the IP ... | Gets a new socket connection to the given host | createSocket | {
"repo_name": "kingaragorn/joy-httpclient-3.1",
"path": "httpclient/src/main/java/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.java",
"license": "gpl-3.0",
"size": 2778
} | [
"java.io.IOException",
"java.net.Socket",
"java.net.UnknownHostException"
] | import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 942,342 |
public void backupConfiguration(String filename, String originalFilename) {
// ensure backup folder exists
File backupFolder = new File(m_configRfsPath + FOLDER_BACKUP);
if (!backupFolder.exists()) {
backupFolder.mkdirs();
}
// copy file to (or from) backup fold... | void function(String filename, String originalFilename) { File backupFolder = new File(m_configRfsPath + FOLDER_BACKUP); if (!backupFolder.exists()) { backupFolder.mkdirs(); } originalFilename = FOLDER_BACKUP + originalFilename; File file = new File(m_configRfsPath + originalFilename); if (file.exists()) { copyFile(ori... | /**
* Restores the opencms.xml either to or from a backup file, depending
* whether the setup wizard is executed the first time (the backup
* does not exist) or not (the backup exists).
*
* @param filename something like e.g. "opencms.xml"
* @param originalFilename the configurations real ... | Restores the opencms.xml either to or from a backup file, depending whether the setup wizard is executed the first time (the backup does not exist) or not (the backup exists) | backupConfiguration | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-setup/org/opencms/setup/CmsSetupBean.java",
"license": "lgpl-2.1",
"size": 116372
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,544,412 |
ManagedConnection getManagedConnection() throws ResourceException; | ManagedConnection getManagedConnection() throws ResourceException; | /**
* Retrieve the ManagedConnection this Connection handle is currently associated with.
*
* @param key a special key that must be provided to invoke this method.
*
* @return the ManagedConnection, or null if not associated.
*
* @throws ResourceException if an incorrect key is suppli... | Retrieve the ManagedConnection this Connection handle is currently associated with | getManagedConnection | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jca.1.7_fat/test-resourceadapters/adapter/src/com/ibm/adapter/Reassociateable.java",
"license": "epl-1.0",
"size": 6060
} | [
"javax.resource.ResourceException",
"javax.resource.spi.ManagedConnection"
] | import javax.resource.ResourceException; import javax.resource.spi.ManagedConnection; | import javax.resource.*; import javax.resource.spi.*; | [
"javax.resource"
] | javax.resource; | 20,094 |
private List<Task> testShardMergePhaseTwo(List<Task> phaseOneTasks) throws Exception
{
EasyMock.reset(indexerMetadataStorageCoordinator);
EasyMock.reset(taskStorage);
EasyMock.reset(taskQueue);
EasyMock.reset(taskClient);
EasyMock.reset(taskMaster);
EasyMock.reset(taskRunner);
EasyMock.r... | List<Task> function(List<Task> phaseOneTasks) throws Exception { EasyMock.reset(indexerMetadataStorageCoordinator); EasyMock.reset(taskStorage); EasyMock.reset(taskQueue); EasyMock.reset(taskClient); EasyMock.reset(taskMaster); EasyMock.reset(taskRunner); EasyMock.reset(supervisorRecordSupplier); EasyMock.expect(indexe... | /**
* Test task creation after a shard split with a closed shard
*
* @param phaseOneTasks List of tasks from the initial phase where only one shard was present
*/ | Test task creation after a shard split with a closed shard | testShardMergePhaseTwo | {
"repo_name": "deltaprojects/druid",
"path": "extensions-core/kinesis-indexing-service/src/test/java/org/apache/druid/indexing/kinesis/supervisor/KinesisSupervisorTest.java",
"license": "apache-2.0",
"size": 218427
} | [
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"com.google.common.util.concurrent.Futures",
"java.util.Collections",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"org.apach... | import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.Futures; import java.util.Collections; import java.util.List; import java.util.Map; import java.u... | import com.google.common.base.*; import com.google.common.collect.*; import com.google.common.util.concurrent.*; import java.util.*; import org.apache.druid.indexer.*; import org.apache.druid.indexing.common.task.*; import org.apache.druid.indexing.kinesis.*; import org.apache.druid.indexing.seekablestream.*; import or... | [
"com.google.common",
"java.util",
"org.apache.druid",
"org.easymock",
"org.junit"
] | com.google.common; java.util; org.apache.druid; org.easymock; org.junit; | 1,318,458 |
@Override
public String toString() {
Integer port = initializer.getPort();
String host = initializer.getHost();
String databaseName = initializer.getDatabaseName();
StringBuilder builder = new StringBuilder(getClass().getSimpleName());
builder.append("{ port=");
... | String function() { Integer port = initializer.getPort(); String host = initializer.getHost(); String databaseName = initializer.getDatabaseName(); StringBuilder builder = new StringBuilder(getClass().getSimpleName()); builder.append(STR); builder.append(port == null ? "null" : port); builder.append(STR); builder.appen... | /**
* Brief description of object's state.
* <p/>
* E.g.
* <code> MySQLDatabaseAdapter{ port=3306, host=192.168.3.1, databasename=myname} </code>
* <p/>
* Result of this method could be changed in future so one should not rely on it.
* <p/>
*
* @return String description of ... | Brief description of object's state. E.g. <code> MySQLDatabaseAdapter{ port=3306, host=192.168.3.1, databasename=myname} </code> Result of this method could be changed in future so one should not rely on it. | toString | {
"repo_name": "consistec/doubleganger",
"path": "implementation/db_adapters/src/main/java/de/consistec/doubleganger/impl/adapter/MySqlDatabaseAdapter.java",
"license": "gpl-3.0",
"size": 7382
} | [
"de.consistec.doubleganger.common.util.StringUtil"
] | import de.consistec.doubleganger.common.util.StringUtil; | import de.consistec.doubleganger.common.util.*; | [
"de.consistec.doubleganger"
] | de.consistec.doubleganger; | 2,525,371 |
public static int getOrientation(ExifInterface exif) {
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
return 90;
case ExifInterface.ORIEN... | static int function(ExifInterface exif) { int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_90: return 90; case ExifInterface.ORIENTATION_ROTATE_180: return 180; case ExifInterface.ORIENTATION_ROTATE_270:... | /**
* Convert metadata to degrees
*/ | Convert metadata to degrees | getOrientation | {
"repo_name": "LeBlaaanc/react-native-pixel-color",
"path": "android/src/main/java/fr/bamlab/rnimageresizer/ImageResizer.java",
"license": "mit",
"size": 10688
} | [
"android.media.ExifInterface"
] | import android.media.ExifInterface; | import android.media.*; | [
"android.media"
] | android.media; | 2,731,133 |
public boolean setPosition(long position) throws IOException, GBrowserException {
//Check that position is ok
if (position < 0 || position > length() - 1) {
position = -1;
return false;
}
if (buffer != null && position >= this.position && position < this.position + buffer.length()) {
//T... | boolean function(long position) throws IOException, GBrowserException { if (position < 0 position > length() - 1) { position = -1; return false; } if (buffer != null && position >= this.position && position < this.position + buffer.length()) { buffer = buffer.substring((int) (position - this.position)); } else { buffer... | /**
* Set file position (in bytes) where to start reading. Return value is false, if the
* requested position is outside of this file.
*
* @param position File position in bytes.
* @return False if this file doesn't contain requested location.
* @throws IOException
* @throws GBrowserException
*/ | Set file position (in bytes) where to start reading. Return value is false, if the requested position is outside of this file | setPosition | {
"repo_name": "chipster/chipster-web-server",
"path": "src/main/java/fi/csc/chipster/tools/parsers/RandomAccessLineReader.java",
"license": "mit",
"size": 5029
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 220,227 |
@Override
public void onLocalPrivilegesUpdated() {
Log.d(TAG, "Local privileges updated.");
validateLocalPrivileges();
authorizeNode();
sortThroughLocalServices();
sortThroughRemoteServices();
} | void function() { Log.d(TAG, STR); validateLocalPrivileges(); authorizeNode(); sortThroughLocalServices(); sortThroughRemoteServices(); } | /**
* When local privileges are updated in the @RVILocalNode class, we have to do a bunch of things over again.
*/ | When local privileges are updated in the @RVILocalNode class, we have to do a bunch of things over again | onLocalPrivilegesUpdated | {
"repo_name": "PDXostc/rvi_core_android",
"path": "src/main/java/org/genivi/rvi/RVIRemoteNode.java",
"license": "mpl-2.0",
"size": 29334
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,863,714 |
public void setMessageFactory(WebServiceMessageFactory messageFactory) {
this.messageFactory = messageFactory;
} | void function(WebServiceMessageFactory messageFactory) { this.messageFactory = messageFactory; } | /**
* Option to provide a custom WebServiceMessageFactory. For example when you want Apache Axiom to handle web service
* messages instead of SAAJ.
*/ | Option to provide a custom WebServiceMessageFactory. For example when you want Apache Axiom to handle web service messages instead of SAAJ | setMessageFactory | {
"repo_name": "nikhilvibhav/camel",
"path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceConfiguration.java",
"license": "apache-2.0",
"size": 16846
} | [
"org.springframework.ws.WebServiceMessageFactory"
] | import org.springframework.ws.WebServiceMessageFactory; | import org.springframework.ws.*; | [
"org.springframework.ws"
] | org.springframework.ws; | 593,962 |
void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); | void exitTypeBound(@NotNull Java8Parser.TypeBoundContext ctx); | /**
* Exit a parse tree produced by {@link Java8Parser#typeBound}.
*
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>Java8Parser#typeBound</code> | exitTypeBound | {
"repo_name": "BigDaddy-Germany/WHOAMI",
"path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java",
"license": "mit",
"size": 97945
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 100,207 |
public Annotation getPOS(int language_id) throws UnsupportedEncodingException, OmegaWikiException
{
Set<Annotation> annos = this.getAnnotations(language_id);
for (Annotation anno :annos) {
if (anno.getName().equals("part of speech")) {
return anno;
}
}
return null;
}
| Annotation function(int language_id) throws UnsupportedEncodingException, OmegaWikiException { Set<Annotation> annos = this.getAnnotations(language_id); for (Annotation anno :annos) { if (anno.getName().equals(STR)) { return anno; } } return null; } | /**
* Returns the POS for this SynTrans, depending on language_id
* @param language_id
* @return the POS
*/ | Returns the POS for this SynTrans, depending on language_id | getPOS | {
"repo_name": "dkpro/dkpro-jowkl",
"path": "src/main/java/org/dkpro/jowkl/api/SynTrans.java",
"license": "apache-2.0",
"size": 8386
} | [
"java.io.UnsupportedEncodingException",
"java.util.Set",
"org.dkpro.jowkl.exception.OmegaWikiException"
] | import java.io.UnsupportedEncodingException; import java.util.Set; import org.dkpro.jowkl.exception.OmegaWikiException; | import java.io.*; import java.util.*; import org.dkpro.jowkl.exception.*; | [
"java.io",
"java.util",
"org.dkpro.jowkl"
] | java.io; java.util; org.dkpro.jowkl; | 540,377 |
@Deprecated
String[] sqlCreateStrings(Dialect dialect) throws HibernateException; | String[] sqlCreateStrings(Dialect dialect) throws HibernateException; | /**
* The SQL required to create the underlying database objects.
*
* @param dialect The dialect against which to generate the create command(s)
*
* @return The create command(s)
*
* @throws HibernateException problem creating the create command(s)
* @deprecated Utilize the ExportableProducer contract i... | The SQL required to create the underlying database objects | sqlCreateStrings | {
"repo_name": "1fechner/FeatureExtractor",
"path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/id/PersistentIdentifierGenerator.java",
"license": "lgpl-2.1",
"size": 2692
} | [
"org.hibernate.HibernateException",
"org.hibernate.dialect.Dialect"
] | import org.hibernate.HibernateException; import org.hibernate.dialect.Dialect; | import org.hibernate.*; import org.hibernate.dialect.*; | [
"org.hibernate",
"org.hibernate.dialect"
] | org.hibernate; org.hibernate.dialect; | 975,622 |
protected void emit_nFlpstfMult_SL_COMMENTTerminalRuleCall_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Syntax:
* SL_COMMENT?
*/ | Syntax: SL_COMMENT | emit_nFlpstfMult_SL_COMMENTTerminalRuleCall_5_q | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.editor.bmodes.bmi/src-gen/sc/ndt/editor/bmodes/serializer/BmodesbmiSyntacticSequencer.java",
"license": "gpl-3.0",
"size": 75631
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 2,356,587 |
public static String writeStreamToFile(InputStream in, String outputFileName) throws IOException {
File file = new File(outputFileName);
// Create the parent directory.
file.getParentFile().mkdirs();
OutputStream out = new FileOutputStream(file);
try {
copy(in, out);
// Return the U... | static String function(InputStream in, String outputFileName) throws IOException { File file = new File(outputFileName); file.getParentFile().mkdirs(); OutputStream out = new FileOutputStream(file); try { copy(in, out); return file.toURI().toString(); } finally { out.flush(); out.close(); } } | /**
* Writes the contents from the given input stream to the given file.
*
* @param in the InputStream to read from
* @param outputFileName the name of the file to write to
* @return the URL for the local file
*/ | Writes the contents from the given input stream to the given file | writeStreamToFile | {
"repo_name": "jisqyv/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/util/FileUtil.java",
"license": "apache-2.0",
"size": 54685
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 209,742 |
public PublicationItem[] getAdditionalFacades() {
return secondaryFacades;
} | PublicationItem[] function() { return secondaryFacades; } | /**
* Get the additional facades
*
* @return the additional facades
*/ | Get the additional facades | getAdditionalFacades | {
"repo_name": "paul-hammant/JRemoting",
"path": "tools/src/java/org/codehaus/jremoting/tools/generator/AbstractStubGenerator.java",
"license": "bsd-3-clause",
"size": 5489
} | [
"org.codehaus.jremoting.server.PublicationItem"
] | import org.codehaus.jremoting.server.PublicationItem; | import org.codehaus.jremoting.server.*; | [
"org.codehaus.jremoting"
] | org.codehaus.jremoting; | 1,893,074 |
@Test
public void throwsExceptionForNonexistentBucket() throws Exception {
final AmazonS3 aws = Mockito.mock(AmazonS3.class);
final AmazonServiceException exp =
new AmazonServiceException("No such bucket");
exp.setErrorCode("NoSuchBucket");
Mockito.doThrow(exp)
... | void function() throws Exception { final AmazonS3 aws = Mockito.mock(AmazonS3.class); final AmazonServiceException exp = new AmazonServiceException(STR); exp.setErrorCode(STR); Mockito.doThrow(exp) .when(aws).getObject(Mockito.any(GetObjectRequest.class)); Mockito.doReturn(new BucketWebsiteConfiguration()) .when(aws).g... | /**
* DefaultHost can throw a specific exception for a non existent bucket.
*
* @throws Exception If there is some problem inside
* @see <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html">S3 Error Responses</a>
*/ | DefaultHost can throw a specific exception for a non existent bucket | throwsExceptionForNonexistentBucket | {
"repo_name": "jpetazzo/s3auth",
"path": "s3auth-hosts/src/test/java/com/s3auth/hosts/DefaultHostTest.java",
"license": "bsd-3-clause",
"size": 16418
} | [
"com.amazonaws.AmazonServiceException",
"com.amazonaws.services.s3.AmazonS3",
"com.amazonaws.services.s3.model.BucketWebsiteConfiguration",
"com.amazonaws.services.s3.model.GetObjectRequest",
"java.io.IOException",
"java.net.URI",
"org.hamcrest.Matchers",
"org.mockito.Mockito"
] | import com.amazonaws.AmazonServiceException; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.BucketWebsiteConfiguration; import com.amazonaws.services.s3.model.GetObjectRequest; import java.io.IOException; import java.net.URI; import org.hamcrest.Matchers; import org.mockito.Mockito; | import com.amazonaws.*; import com.amazonaws.services.s3.*; import com.amazonaws.services.s3.model.*; import java.io.*; import java.net.*; import org.hamcrest.*; import org.mockito.*; | [
"com.amazonaws",
"com.amazonaws.services",
"java.io",
"java.net",
"org.hamcrest",
"org.mockito"
] | com.amazonaws; com.amazonaws.services; java.io; java.net; org.hamcrest; org.mockito; | 1,035,964 |
private void processActionDefinitionChanges(NodeRef dispositionActionDef, List<QName> changedProps, NodeRef recordOrFolder)
{
// check that the step being edited is the current step for the folder,
// if not, the change has no effect on the current step so ignore
DispositionAction ne... | void function(NodeRef dispositionActionDef, List<QName> changedProps, NodeRef recordOrFolder) { DispositionAction nextAction = getDispositionService().getNextDispositionAction(recordOrFolder); if (doesChangedStepAffectNextAction(dispositionActionDef, nextAction)) { if (changedProps.contains(PROP_DISPOSITION_PERIOD)) { ... | /**
* Processes all the changes applied to the given disposition
* action definition node for the given record or folder node.
*
* @param dispositionActionDef The disposition action definition node
* @param changedProps The set of properties changed on the action definition
* @param ... | Processes all the changes applied to the given disposition action definition node for the given record or folder node | processActionDefinitionChanges | {
"repo_name": "dnacreative/records-management",
"path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/action/impl/BroadcastDispositionActionDefinitionUpdateAction.java",
"license": "lgpl-3.0",
"size": 11382
} | [
"java.util.List",
"org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName"
] | import java.util.List; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionAction; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; | import java.util.*; import org.alfresco.module.org_alfresco_module_rm.disposition.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; | [
"java.util",
"org.alfresco.module",
"org.alfresco.service"
] | java.util; org.alfresco.module; org.alfresco.service; | 1,249,889 |
@SmallTest
@Feature({"ProcessManagement"})
public void testNewConnectionDropsPreviousOnLowEnd() {
// This test applies only to the low-end manager.
BindingManagerImpl manager = mLowEndManager;
// Add a connection to the manager.
MockChildProcessConnection firstConnection = n... | @Feature({STR}) void function() { BindingManagerImpl manager = mLowEndManager; MockChildProcessConnection firstConnection = new MockChildProcessConnection(1); manager.addNewConnection(firstConnection.getPid(), firstConnection); manager.setInForeground(firstConnection.getPid(), true); assertTrue(firstConnection.isStrong... | /**
* Verifies that when running on low-end, the binding manager drops the oom bindings for the
* previously bound connection when a new connection is added.
*/ | Verifies that when running on low-end, the binding manager drops the oom bindings for the previously bound connection when a new connection is added | testNewConnectionDropsPreviousOnLowEnd | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/chromium_org/content/public/android/javatests/src/org/chromium/content/browser/BindingManagerImplTest.java",
"license": "gpl-3.0",
"size": 15363
} | [
"org.chromium.base.test.util.Feature"
] | import org.chromium.base.test.util.Feature; | import org.chromium.base.test.util.*; | [
"org.chromium.base"
] | org.chromium.base; | 2,056,400 |
protected void encryptAndEncodeAndPutIntoAttributesMap(final Map<String, Object> attributes,
final Map<String, String> cachedAttributesToEncode,
final String cachedAttributeName,
... | void function(final Map<String, Object> attributes, final Map<String, String> cachedAttributesToEncode, final String cachedAttributeName, final RegisteredServiceCipherExecutor cipher, final RegisteredService registeredService) { final String cachedAttribute = cachedAttributesToEncode.remove(cachedAttributeName); if (St... | /**
* Encrypt, encode and put the attribute into attributes map.
*
* @param attributes the attributes
* @param cachedAttributesToEncode the cached attributes to encode
* @param cachedAttributeName the cached attribute name
* @param cipher the cipher
... | Encrypt, encode and put the attribute into attributes map | encryptAndEncodeAndPutIntoAttributesMap | {
"repo_name": "creamer/cas",
"path": "core/cas-server-core-services/src/main/java/org/apereo/cas/authentication/support/DefaultCasProtocolAttributeEncoder.java",
"license": "apache-2.0",
"size": 8378
} | [
"java.util.Map",
"org.apache.commons.lang3.StringUtils",
"org.apereo.cas.services.RegisteredService",
"org.apereo.cas.services.RegisteredServiceCipherExecutor"
] | import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apereo.cas.services.RegisteredService; import org.apereo.cas.services.RegisteredServiceCipherExecutor; | import java.util.*; import org.apache.commons.lang3.*; import org.apereo.cas.services.*; | [
"java.util",
"org.apache.commons",
"org.apereo.cas"
] | java.util; org.apache.commons; org.apereo.cas; | 2,298,058 |
public boolean sendAdminMail(UserId toUserId,
String subject, String content, Reward gift) {
if ( toUserId == null ) {
logger.debug("#sendMail: null toUserId");
return false;
}
if ( StringUtil.checkNotEmpty(content) ) {
String fromUserName = Text.text("system");
String today = DateUtil.getT... | boolean function(UserId toUserId, String subject, String content, Reward gift) { if ( toUserId == null ) { logger.debug(STR); return false; } if ( StringUtil.checkNotEmpty(content) ) { String fromUserName = Text.text(STR); String today = DateUtil.getToday(System.currentTimeMillis()); BasicUser toUser = null; String mai... | /**
* Send a mail to given user. If the isAdmin is true,
* the mail is treated as a game admin's mail.
* 'subject' and 'gift' are optional and can be set to
* null safely. The 'content' is mandatory or this mail
* will not be sent.
*
* @param fromUserId
* @param toUserId
* @param subject
* @param ... | Send a mail to given user. If the isAdmin is true, the mail is treated as a game admin's mail. 'subject' and 'gift' are optional and can be set to null safely. The 'content' is mandatory or this mail will not be sent | sendAdminMail | {
"repo_name": "wangqi/gameserver",
"path": "server/src/main/java/com/xinqihd/sns/gameserver/db/mongo/MailMessageManager.java",
"license": "apache-2.0",
"size": 25062
} | [
"com.xinqihd.sns.gameserver.GameContext",
"com.xinqihd.sns.gameserver.config.Constant",
"com.xinqihd.sns.gameserver.config.GameDataKey",
"com.xinqihd.sns.gameserver.db.UserManager",
"com.xinqihd.sns.gameserver.entity.user.BasicUser",
"com.xinqihd.sns.gameserver.entity.user.UserId",
"com.xinqihd.sns.game... | import com.xinqihd.sns.gameserver.GameContext; import com.xinqihd.sns.gameserver.config.Constant; import com.xinqihd.sns.gameserver.config.GameDataKey; import com.xinqihd.sns.gameserver.db.UserManager; import com.xinqihd.sns.gameserver.entity.user.BasicUser; import com.xinqihd.sns.gameserver.entity.user.UserId; import ... | import com.xinqihd.sns.gameserver.*; import com.xinqihd.sns.gameserver.config.*; import com.xinqihd.sns.gameserver.db.*; import com.xinqihd.sns.gameserver.entity.user.*; import com.xinqihd.sns.gameserver.proto.*; import com.xinqihd.sns.gameserver.reward.*; import com.xinqihd.sns.gameserver.session.*; import com.xinqihd... | [
"com.xinqihd.sns"
] | com.xinqihd.sns; | 736,751 |
private void saveLearningStyleUpdates(View v, LearningStyle learningStyle) {
// save learningStyle in database
LearningStylesDataSource lsds = new LearningStylesDataSource(this);
lsds.updateLearningStyle(learningStyle);
lsds.close();
Context context = getApplicationContext(... | void function(View v, LearningStyle learningStyle) { LearningStylesDataSource lsds = new LearningStylesDataSource(this); lsds.updateLearningStyle(learningStyle); lsds.close(); Context context = getApplicationContext(); int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, context.getResources().getSt... | /**
* Save learningStyle data.
*
* @param v Incoming view.
* @param data Incoming string of data to be saved.
*/ | Save learningStyle data | saveLearningStyleUpdates | {
"repo_name": "datanets/kanjoto",
"path": "kanjoto-android/src/summea/kanjoto/activity/EditLearningStyleActivity.java",
"license": "mit",
"size": 4196
} | [
"android.content.Context",
"android.view.View",
"android.widget.Toast"
] | import android.content.Context; import android.view.View; import android.widget.Toast; | import android.content.*; import android.view.*; import android.widget.*; | [
"android.content",
"android.view",
"android.widget"
] | android.content; android.view; android.widget; | 1,163,534 |
public static void addToGridBag(final Component comp, final JPanel panel, final int gridx, final int gridy) {
addToGridBag(comp, panel, gridx, gridy, 1, 1);
} | static void function(final Component comp, final JPanel panel, final int gridx, final int gridy) { addToGridBag(comp, panel, gridx, gridy, 1, 1); } | /**
* Adds a component to a panel with a grid bag layout
*
* @param comp
* @param panel
* @param gridx
* @param gridy
*/ | Adds a component to a panel with a grid bag layout | addToGridBag | {
"repo_name": "datacleaner/DataCleaner",
"path": "desktop/api/src/main/java/org/datacleaner/util/WidgetUtils.java",
"license": "lgpl-3.0",
"size": 27707
} | [
"java.awt.Component",
"javax.swing.JPanel"
] | import java.awt.Component; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,514,065 |
public static native void focus(Element el)
;
/**
* Helper method to find first instance of any Widget found by traversing
* DOM upwards from given element.
* <p>
* <strong>Note:</strong> If {@code element} is inside some widget {@code W} | static native void function(Element el) ; /** * Helper method to find first instance of any Widget found by traversing * DOM upwards from given element. * <p> * <strong>Note:</strong> If {@code element} is inside some widget {@code W} | /**
* Will (attempt) to focus the given DOM Element.
*
* @param el
* the element to focus
*/ | Will (attempt) to focus the given DOM Element | focus | {
"repo_name": "mstahv/framework",
"path": "client/src/main/java/com/vaadin/client/WidgetUtil.java",
"license": "apache-2.0",
"size": 65738
} | [
"com.google.gwt.dom.client.Element",
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,968,994 |
@ResponseStatus(HttpStatus.NO_CONTENT)
@RequestMapping(value = UrlHelpers.SUBMISSION_WITH_ID, method = RequestMethod.DELETE)
public @ResponseBody
void deleteSubmission(
@PathVariable String subId,
@RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId,
@RequestHeader HttpHeaders header,
... | @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = UrlHelpers.SUBMISSION_WITH_ID, method = RequestMethod.DELETE) void function( @PathVariable String subId, @RequestParam(value = AuthorizationConstants.USER_ID_PARAM) Long userId, @RequestHeader HttpHeaders header, HttpServletRequest request) throws Datastore... | /**
* Deletes a Submission and its accompanying SubmissionStatus.
* <b>This service is intended to only be used by ChallengesInfrastructure service account.</b>
*
* <p>
* <b>Note:</b> The caller must be granted the <a
* href="${org.sagebionetworks.repo.model.ACCESS_TYPE}"
* >ACCESS_TYPE.DELETE_SUBMISSIO... | Deletes a Submission and its accompanying SubmissionStatus. This service is intended to only be used by ChallengesInfrastructure service account. Note: The caller must be granted the ACCESS_TYPE.DELETE_SUBMISSION on the specified Evaluation. | deleteSubmission | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository/src/main/java/org/sagebionetworks/repo/web/controller/EvaluationController.java",
"license": "apache-2.0",
"size": 50728
} | [
"javax.servlet.http.HttpServletRequest",
"org.sagebionetworks.repo.model.AuthorizationConstants",
"org.sagebionetworks.repo.model.DatastoreException",
"org.sagebionetworks.repo.model.UnauthorizedException",
"org.sagebionetworks.repo.web.NotFoundException",
"org.sagebionetworks.repo.web.UrlHelpers",
"org... | import javax.servlet.http.HttpServletRequest; import org.sagebionetworks.repo.model.AuthorizationConstants; import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.UnauthorizedException; import org.sagebionetworks.repo.web.NotFoundException; import org.sagebionetworks.repo.web.Ur... | import javax.servlet.http.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"javax.servlet",
"org.sagebionetworks.repo",
"org.springframework.http",
"org.springframework.web"
] | javax.servlet; org.sagebionetworks.repo; org.springframework.http; org.springframework.web; | 1,302,413 |
@ReactProp(name = "strokeWidth", defaultFloat = 0)
public void setStrokeWidth(MKSpinner view, float strokeWidthDp) {
view.setStrokeWidthInDip(strokeWidthDp);
} | @ReactProp(name = STR, defaultFloat = 0) void function(MKSpinner view, float strokeWidthDp) { view.setStrokeWidthInDip(strokeWidthDp); } | /**
* Width of the progress stroke
*/ | Width of the progress stroke | setStrokeWidth | {
"repo_name": "princesadie/SnapDrop-react",
"path": "node_modules/react-native-material-kit/android/src/main/java/com/github/xinthink/rnmk/MKSpinnerManager.java",
"license": "mit",
"size": 1711
} | [
"com.facebook.react.uimanager.annotations.ReactProp",
"com.github.xinthink.rnmk.widget.MKSpinner"
] | import com.facebook.react.uimanager.annotations.ReactProp; import com.github.xinthink.rnmk.widget.MKSpinner; | import com.facebook.react.uimanager.annotations.*; import com.github.xinthink.rnmk.widget.*; | [
"com.facebook.react",
"com.github.xinthink"
] | com.facebook.react; com.github.xinthink; | 1,122,980 |
private boolean isEmptyMap(Object value) {
try {
return value instanceof Map && ((Map) value).isEmpty();
} catch (Exception e) {
return true;
}
}
| boolean function(Object value) { try { return value instanceof Map && ((Map) value).isEmpty(); } catch (Exception e) { return true; } } | /**
* Some maps, like AttributeMap will throw an exception when isEmpty() is called
*/ | Some maps, like AttributeMap will throw an exception when isEmpty() is called | isEmptyMap | {
"repo_name": "xiaguangme/struts2-src-study",
"path": "src/org/apache/struts2/interceptor/debugging/ObjectToHTMLWriter.java",
"license": "apache-2.0",
"size": 6556
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,545,241 |
public List< SourceState< ? > > getSources()
{
return unmodifiableSources;
} | List< SourceState< ? > > function() { return unmodifiableSources; } | /**
* Returns a list of all sources.
*
* @return list of all sources.
*/ | Returns a list of all sources | getSources | {
"repo_name": "mheyde/bigdataviewer-core",
"path": "src/main/java/bdv/viewer/state/ViewerState.java",
"license": "gpl-3.0",
"size": 11477
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,118,285 |
public final BooleanFilterBuilder mustNot(final Filter filter) {
if (filter != null) {
this.result.add(filter, BooleanClause.Occur.MUST_NOT);
}
return this;
} | final BooleanFilterBuilder function(final Filter filter) { if (filter != null) { this.result.add(filter, BooleanClause.Occur.MUST_NOT); } return this; } | /**
* Adds a must not clause to the filter.
* @param filter the filter that must not match
* @return this object
*/ | Adds a must not clause to the filter | mustNot | {
"repo_name": "Cue/greplin-lucene-utils",
"path": "src/main/java/com/greplin/lucene/filter/BooleanFilterBuilder.java",
"license": "apache-2.0",
"size": 2357
} | [
"org.apache.lucene.search.BooleanClause",
"org.apache.lucene.search.Filter"
] | import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.Filter; | import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,204,841 |
public static java.util.List extractElectiveListHospitalConfigurationList(ims.domain.ILightweightDomainFactory domainFactory, ims.admin.vo.ElectiveListHospitalConfigurationVoCollection voCollection)
{
return extractElectiveListHospitalConfigurationList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.admin.vo.ElectiveListHospitalConfigurationVoCollection voCollection) { return extractElectiveListHospitalConfigurationList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.configuration.domain.objects.ElectiveListHospitalConfiguration list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.configuration.domain.objects.ElectiveListHospitalConfiguration list from the value object collection | extractElectiveListHospitalConfigurationList | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/admin/vo/domain/ElectiveListHospitalConfigurationVoAssembler.java",
"license": "agpl-3.0",
"size": 17983
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 582,318 |
public static Class<?> className2ClassOrThrow(String className) {
Class<?> c = null;
try {
c = className2Class(className);
} catch (ClassNotFoundException e) {
throw new Cl4pgReflectionException(e);
}
return c;
} | static Class<?> function(String className) { Class<?> c = null; try { c = className2Class(className); } catch (ClassNotFoundException e) { throw new Cl4pgReflectionException(e); } return c; } | /**
* Converts the string name of a class into a class object, or, on failure,
* throws a Cl4pgReflectionException.
*
* @param className
* @return
*/ | Converts the string name of a class into a class object, or, on failure, throws a Cl4pgReflectionException | className2ClassOrThrow | {
"repo_name": "manniwood/cl4pg",
"path": "src/main/java/com/manniwood/cl4pg/v1/typeconverters/TypeConverterStore.java",
"license": "mit",
"size": 31277
} | [
"com.manniwood.cl4pg.v1.exceptions.Cl4pgReflectionException"
] | import com.manniwood.cl4pg.v1.exceptions.Cl4pgReflectionException; | import com.manniwood.cl4pg.v1.exceptions.*; | [
"com.manniwood.cl4pg"
] | com.manniwood.cl4pg; | 2,080,463 |
public List query(Class<? extends PhysicalLocation> targetClass,
AbsoluteRangeQuery rangeQuery) throws ApplicationException {
Long lstart = rangeQuery.getStart();
Long lend = rangeQuery.getEnd();
// We prefer a chromosome object, but we'll take an id (int... | List function(Class<? extends PhysicalLocation> targetClass, AbsoluteRangeQuery rangeQuery) throws ApplicationException { Long lstart = rangeQuery.getStart(); Long lend = rangeQuery.getEnd(); Long chromosomeId = rangeQuery.getChromosomeId(); if (rangeQuery.getChromosome() != null) { chromosomeId = rangeQuery.getChromos... | /**
* AbsoluteRangeQuery method.
* @param targetClass type of physical locations to return
* @param rangeQuery the query
* @return list of physical locations
* @throws ApplicationException
*/ | AbsoluteRangeQuery method | query | {
"repo_name": "NCIP/cabio",
"path": "software/cabio-api/src/gov/nih/nci/system/dao/impl/gridid/GridIdDAO.java",
"license": "bsd-3-clause",
"size": 15051
} | [
"gov.nih.nci.cabio.domain.PhysicalLocation",
"gov.nih.nci.search.AbsoluteRangeQuery",
"gov.nih.nci.system.applicationservice.ApplicationException",
"gov.nih.nci.system.query.hibernate.HQLCriteria",
"java.util.ArrayList",
"java.util.List"
] | import gov.nih.nci.cabio.domain.PhysicalLocation; import gov.nih.nci.search.AbsoluteRangeQuery; import gov.nih.nci.system.applicationservice.ApplicationException; import gov.nih.nci.system.query.hibernate.HQLCriteria; import java.util.ArrayList; import java.util.List; | import gov.nih.nci.cabio.domain.*; import gov.nih.nci.search.*; import gov.nih.nci.system.applicationservice.*; import gov.nih.nci.system.query.hibernate.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 1,809,257 |
public String encodeList(ArrayList<T> sa, char delim) {
Iterator<T> si = sa.iterator();
return encodeList(si, delim);
}
| String function(ArrayList<T> sa, char delim) { Iterator<T> si = sa.iterator(); return encodeList(si, delim); } | /**
* Encode a list of strings by 'escaping' all instances of: delim, '\', \r, \n. The
* escape char is '\'.
*
* This is used to build text lists separated by 'delim'.
*
* @param sa String array to convert
* @return Converted string
*/ | Encode a list of strings by 'escaping' all instances of: delim, '\', \r, \n. The escape char is '\'. This is used to build text lists separated by 'delim' | encodeList | {
"repo_name": "Grunthos/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/utils/Utils.java",
"license": "gpl-3.0",
"size": 70195
} | [
"java.util.ArrayList",
"java.util.Iterator"
] | import java.util.ArrayList; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,883,133 |
@Test
public void checkXMLPersistence()
throws NullPointerException, JAXBException, IOException {
// Local declarations
VizResource vizResource = null, loadedResource = null;
VizResource childRes1 = new VizResource(new File("1")),
childRes2 = new VizResource(new File("2"));
childRes2.setId(2);
chi... | void function() throws NullPointerException, JAXBException, IOException { VizResource vizResource = null, loadedResource = null; VizResource childRes1 = new VizResource(new File("1")), childRes2 = new VizResource(new File("2")); childRes2.setId(2); childRes2.setName("2"); ArrayList<VizResource> childResources = new Arr... | /**
* This operation makes sure that the VizResource can be written to and read
* from XML properly.
*
* @throws IOException
* @throws JAXBException
* @throws NullPointerException
*/ | This operation makes sure that the VizResource can be written to and read from XML properly | checkXMLPersistence | {
"repo_name": "SmithRWORNL/january",
"path": "org.eclipse.january.form.test/src/org/eclipse/ice/datastructures/test/VizResourceTester.java",
"license": "epl-1.0",
"size": 7302
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"javax.xml.bind.JAXBException",
"org.eclipse.january.form.ICEJAXBHandler",
"org.eclipse.january.form.VizResource",
"org.junit.Assert"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import javax.xml.bind.JAXBException; import org.eclipse.january.form.ICEJAXBHandler; import org.eclipse.january.form.VizResource; import org.junit.Assert; | import java.io.*; import java.util.*; import javax.xml.bind.*; import org.eclipse.january.form.*; import org.junit.*; | [
"java.io",
"java.util",
"javax.xml",
"org.eclipse.january",
"org.junit"
] | java.io; java.util; javax.xml; org.eclipse.january; org.junit; | 1,738,443 |
@GET
@Produces( MediaType.APPLICATION_JSON )
List<Application> listApplications( @QueryParam("name") String exactName ); | @Produces( MediaType.APPLICATION_JSON ) List<Application> listApplications( @QueryParam("name") String exactName ); | /**
* Lists applications.
* @param exactName if specified, only the application with this name will be returned in the list (null to match all)
* <p>
* We only consider the application name, not the display name.
* It means that the parameter should not contain special characters.
* </p>
*
* @return a n... | Lists applications | listApplications | {
"repo_name": "gibello/roboconf",
"path": "core/roboconf-dm-rest-services/src/main/java/net/roboconf/dm/rest/services/internal/resources/IManagementResource.java",
"license": "apache-2.0",
"size": 10208
} | [
"java.util.List",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.MediaType",
"net.roboconf.core.model.beans.Application"
] | import java.util.List; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import net.roboconf.core.model.beans.Application; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import net.roboconf.core.model.beans.*; | [
"java.util",
"javax.ws",
"net.roboconf.core"
] | java.util; javax.ws; net.roboconf.core; | 1,317,136 |
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
TransactionInfo info = (TransactionInfo) o;
info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn));
... | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); TransactionInfo info = (TransactionInfo) o; info.setConnectionId((ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setTransactionId((TransactionId) looseUnmarsalCached... | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | looseUnmarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v5/TransactionInfoMarshaller.java",
"license": "apache-2.0",
"size": 4969
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.OpenWireFormat",
"org.apache.activemq.openwire.commands.ConnectionId",
"org.apache.activemq.openwire.commands.TransactionId",
"org.apache.activemq.openwire.commands.TransactionInfo"
] | import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.ConnectionId; import org.apache.activemq.openwire.commands.TransactionId; import org.apache.activemq.openwire.commands.TransactionInfo; | import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 2,444,915 |
private int tryReserveEventSizeAndLock(long state, int size)
{
Preconditions.checkArgument(size > 0);
int bufferWatermark = bufferWatermark(state);
while (true) {
if (compareAndSetState(state, state + size + PARTY)) {
return bufferWatermark;
}
state = getState();
if (isSe... | int function(long state, int size) { Preconditions.checkArgument(size > 0); int bufferWatermark = bufferWatermark(state); while (true) { if (compareAndSetState(state, state + size + PARTY)) { return bufferWatermark; } state = getState(); if (isSealed(state)) { return -1; } bufferWatermark = bufferWatermark(state); int ... | /**
* Returns the buffer offset at which the caller has reserved the ability to write `size` bytes exclusively,
* or negative number, if the reservation attempt failed.
*/ | Returns the buffer offset at which the caller has reserved the ability to write `size` bytes exclusively, or negative number, if the reservation attempt failed | tryReserveEventSizeAndLock | {
"repo_name": "dkhwangbo/druid",
"path": "java-util/src/main/java/org/apache/druid/java/util/emitter/core/Batch.java",
"license": "apache-2.0",
"size": 10773
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,197,130 |
public void unloadWorld(Multiworld world)
{
world.worldLoaded = false;
world.removeAllPlayersFromWorld();
DimensionManager.unloadWorld(world.getDimensionId());
worldsToRemove.add(DimensionManager.getWorld(world.getDimensionId()));
worldsByDim.remove(world.getDimensionId()... | void function(Multiworld world) { world.worldLoaded = false; world.removeAllPlayersFromWorld(); DimensionManager.unloadWorld(world.getDimensionId()); worldsToRemove.add(DimensionManager.getWorld(world.getDimensionId())); worldsByDim.remove(world.getDimensionId()); worlds.remove(world.getName()); } | /**
* Unload world
*
* @param world
*/ | Unload world | unloadWorld | {
"repo_name": "planetguy32/ForgeEssentials",
"path": "src/main/java/com/forgeessentials/multiworld/MultiworldManager.java",
"license": "epl-1.0",
"size": 18513
} | [
"net.minecraftforge.common.DimensionManager"
] | import net.minecraftforge.common.DimensionManager; | import net.minecraftforge.common.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 2,094,713 |
public static String normalizeDestinationName(String destination, boolean includePrefix) {
if (ObjectHelper.isEmpty(destination)) {
return destination;
}
if (destination.startsWith(QUEUE_PREFIX)) {
String s = removeStartingCharacters(destination.substring(QUEUE_PREFIX... | static String function(String destination, boolean includePrefix) { if (ObjectHelper.isEmpty(destination)) { return destination; } if (destination.startsWith(QUEUE_PREFIX)) { String s = removeStartingCharacters(destination.substring(QUEUE_PREFIX.length()), '/'); if (includePrefix) { s = QUEUE_PREFIX + STR } return s; }... | /**
* Normalizes the destination name.
* <p/>
* This ensures the destination name is correct, and we do not create queues as <tt>queue://queue:foo</tt>, which
* was intended as <tt>queue://foo</tt>.
*
* @param destination the destination
* @param includePrefix whether to include <tt>q... | Normalizes the destination name. This ensures the destination name is correct, and we do not create queues as queue://queue:foo, which was intended as queue://foo | normalizeDestinationName | {
"repo_name": "onders86/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessageHelper.java",
"license": "apache-2.0",
"size": 16011
} | [
"org.apache.camel.util.ObjectHelper",
"org.apache.camel.util.StringHelper"
] | import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.StringHelper; | import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,993,553 |
public void callSkill(L2Skill skill, L2Object[] targets)
{
try
{
// Do initial checkings for skills and set pvp flag/draw aggro when needed
for (L2Object target : targets)
{
if (target instanceof L2Character)
{
// Set some values inside target's instance for later use
L... | void function(L2Skill skill, L2Object[] targets) { try { for (L2Object target : targets) { if (target instanceof L2Character) { L2Character player = (L2Character) target; L2Weapon activeWeapon = getActiveWeaponItem(); if ((activeWeapon != null) && !((L2Character) target).isDead()) { if ((activeWeapon.getSkillEffects(th... | /**
* Launch the magic skill and calculate its effects on each target contained in the targets table.<BR>
* <BR>
* @param skill The L2Skill to use
* @param targets The table of L2Object targets
*/ | Launch the magic skill and calculate its effects on each target contained in the targets table. | callSkill | {
"repo_name": "oonym/l2InterludeServer",
"path": "L2J_Server/java/net/sf/l2j/gameserver/model/L2Character.java",
"license": "gpl-2.0",
"size": 231634
} | [
"java.util.logging.Level",
"net.sf.l2j.gameserver.ai.CtrlEvent",
"net.sf.l2j.gameserver.datatables.SkillTable",
"net.sf.l2j.gameserver.handler.ISkillHandler",
"net.sf.l2j.gameserver.handler.SkillHandler",
"net.sf.l2j.gameserver.model.L2Skill",
"net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance",
... | import java.util.logging.Level; import net.sf.l2j.gameserver.ai.CtrlEvent; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.handler.ISkillHandler; import net.sf.l2j.gameserver.handler.SkillHandler; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.insta... | import java.util.logging.*; import net.sf.l2j.gameserver.ai.*; import net.sf.l2j.gameserver.datatables.*; import net.sf.l2j.gameserver.handler.*; import net.sf.l2j.gameserver.model.*; import net.sf.l2j.gameserver.model.actor.instance.*; import net.sf.l2j.gameserver.model.quest.*; import net.sf.l2j.gameserver.serverpack... | [
"java.util",
"net.sf.l2j"
] | java.util; net.sf.l2j; | 1,958,127 |
//-------------------------------------------------------------------------
public ObjectId getObjectId() {
return getUniqueId() != null ? getUniqueId().getObjectId() : null;
} | ObjectId function() { return getUniqueId() != null ? getUniqueId().getObjectId() : null; } | /**
* Gets the object identifier.
*
* @return the object identifier, null if not set
*/ | Gets the object identifier | getObjectId | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master/src/main/java/com/opengamma/master/user/ManageableUser.java",
"license": "apache-2.0",
"size": 25391
} | [
"com.opengamma.id.ObjectId"
] | import com.opengamma.id.ObjectId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 1,130,730 |
@Override
public IBinder onBind(Intent arg) {
return mBinder;
}
| IBinder function(Intent arg) { return mBinder; } | /**
* Provides a binder object that clients can use to perform operations on the MediaPlayer managed by the MediaService.
*/ | Provides a binder object that clients can use to perform operations on the MediaPlayer managed by the MediaService | onBind | {
"repo_name": "CEREMA/com.cerema.cloud",
"path": "src/com/cerema/cloud/media/MediaService.java",
"license": "gpl-2.0",
"size": 26280
} | [
"android.content.Intent",
"android.os.IBinder"
] | import android.content.Intent; import android.os.IBinder; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,065,537 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
| void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "KAMP-Research/KAMP4APS",
"path": "edu.kit.ipd.sdq.kamp4aps.model.modificationmarks.edit/src/edu/kit/ipd/sdq/kamp4aps/model/KAMP4aPSModificationmarks/provider/ModifyEntityItemProvider.java",
"license": "apache-2.0",
"size": 2972
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 53,635 |
public static String jarResourceFileToString(String resource)
{
StringWriter stringWriter = new StringWriter();
try {
InputStream is = SchemaUtils.class.getClassLoader().getResourceAsStream(resource);
Preconditions.checkArgument(is != null, resource + " could not be found in the resources.");
... | static String function(String resource) { StringWriter stringWriter = new StringWriter(); try { InputStream is = SchemaUtils.class.getClassLoader().getResourceAsStream(resource); Preconditions.checkArgument(is != null, resource + STR); IOUtils.copy(is, stringWriter); } catch(IOException ex) { throw new RuntimeException... | /**
* This is a utility method which loads the contents of a resource file into a string.
* @param resource The resource file whose contents need to be loaded.
* @return The contents of the specified resource file.
*/ | This is a utility method which loads the contents of a resource file into a string | jarResourceFileToString | {
"repo_name": "skekre98/apex-mlhr",
"path": "library/src/main/java/com/datatorrent/lib/appdata/schemas/SchemaUtils.java",
"license": "apache-2.0",
"size": 13087
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.io.InputStream",
"java.io.StringWriter",
"org.apache.commons.io.IOUtils"
] | import com.google.common.base.Preconditions; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import org.apache.commons.io.IOUtils; | import com.google.common.base.*; import java.io.*; import org.apache.commons.io.*; | [
"com.google.common",
"java.io",
"org.apache.commons"
] | com.google.common; java.io; org.apache.commons; | 1,694,585 |
@Override
public Item remove(Item item) {
return itemStorage.removeItem(item.getObjectId());
}
| Item function(Item item) { return itemStorage.removeItem(item.getObjectId()); } | /**
* Remove item from storage without changing its state
*/ | Remove item from storage without changing its state | remove | {
"repo_name": "Estada1401/anuwhscript",
"path": "GameServer/src/com/aionemu/gameserver/model/items/storage/Storage.java",
"license": "gpl-3.0",
"size": 9686
} | [
"com.aionemu.gameserver.model.gameobjects.Item"
] | import com.aionemu.gameserver.model.gameobjects.Item; | import com.aionemu.gameserver.model.gameobjects.*; | [
"com.aionemu.gameserver"
] | com.aionemu.gameserver; | 1,822,458 |
public synchronized void firePeerTableRowRemoved(PeerInfo info) {
Object obj;
Object[] target = info.toObjectArray();
boolean found = false;
int row = peerTableModel.getRowCount();
int col = peerTableModel.getColumnCount();
int i;
for (i = row - 1; i >= 0; i--) {
found = true;
for (int j = 0; j ... | synchronized void function(PeerInfo info) { Object obj; Object[] target = info.toObjectArray(); boolean found = false; int row = peerTableModel.getRowCount(); int col = peerTableModel.getColumnCount(); int i; for (i = row - 1; i >= 0; i--) { found = true; for (int j = 0; j < col; j++) { obj = peerTableModel.getValueAt(... | /**
* Remove a row from the table with specified data value.
*
* @param info the information of the peer
*/ | Remove a row from the table with specified data value | firePeerTableRowRemoved | {
"repo_name": "halayudha/bearded-octo-bugfixes",
"path": "BestPeerDevelop/sg/edu/nus/gui/bootstrap/Pane.java",
"license": "gpl-3.0",
"size": 20656
} | [
"sg.edu.nus.peer.info.PeerInfo"
] | import sg.edu.nus.peer.info.PeerInfo; | import sg.edu.nus.peer.info.*; | [
"sg.edu.nus"
] | sg.edu.nus; | 1,144,488 |
public ServiceFuture<Void> putResourceCollectionAsync(ResourceCollectionInner resourceComplexObject, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(putResourceCollectionWithServiceResponseAsync(resourceComplexObject), serviceCallback);
} | ServiceFuture<Void> function(ResourceCollectionInner resourceComplexObject, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(putResourceCollectionWithServiceResponseAsync(resourceComplexObject), serviceCallback); } | /**
* Put External Resource as a ResourceCollection.
*
* @param resourceComplexObject External Resource as a ResourceCollection to put
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
*/ | Put External Resource as a ResourceCollection | putResourceCollectionAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/azureresource/implementation/AutoRestResourceFlatteningTestServiceImpl.java",
"license": "mit",
"size": 31934
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,497,435 |
private void handleSignInResult(GoogleSignInResult result) {
if (result.isSuccess()) {
// Signed in successfully, show authenticated UI.
GoogleSignInAccount acct = result.getSignInAccount();
if (acct != null) {
mPreferences.setGmailAccount(acct.getEmail())... | void function(GoogleSignInResult result) { if (result.isSuccess()) { GoogleSignInAccount acct = result.getSignInAccount(); if (acct != null) { mPreferences.setGmailAccount(acct.getEmail()); mPreferences.setUserId(acct.getId()); txtGoogleAccountName.setText(acct.getEmail()); hideSignInShowSignOutButton(); String[] names... | /**
* This is where we handle the result from Google
*
* @param result the result from the sign in
*/ | This is where we handle the result from Google | handleSignInResult | {
"repo_name": "klinster/School-Work",
"path": "490/smartmirror/app/src/main/java/org/main/smartmirror/smartmirror/AccountActivity.java",
"license": "mit",
"size": 14684
} | [
"android.widget.Toast",
"com.google.android.gms.auth.api.signin.GoogleSignInAccount",
"com.google.android.gms.auth.api.signin.GoogleSignInResult"
] | import android.widget.Toast; import com.google.android.gms.auth.api.signin.GoogleSignInAccount; import com.google.android.gms.auth.api.signin.GoogleSignInResult; | import android.widget.*; import com.google.android.gms.auth.api.signin.*; | [
"android.widget",
"com.google.android"
] | android.widget; com.google.android; | 333,640 |
public static final boolean isDebuggable(Context c) {
String packageName = c.getPackageName();
int flags = c.getPackageManager().getLaunchIntentForPackage(packageName).getFlags();
return ((flags & ApplicationInfo.FLAG_DEBUGGABLE) > 0) ? true : false;
} | static final boolean function(Context c) { String packageName = c.getPackageName(); int flags = c.getPackageManager().getLaunchIntentForPackage(packageName).getFlags(); return ((flags & ApplicationInfo.FLAG_DEBUGGABLE) > 0) ? true : false; } | /**
* Checks whether the application is running in debug mode.
*
* @return <code>true</code> if the application is run in debug mode.
*/ | Checks whether the application is running in debug mode | isDebuggable | {
"repo_name": "SanaMobile/sana.mobile",
"path": "api-android/src/main/java/org/sana/android/util/Logf.java",
"license": "bsd-3-clause",
"size": 7835
} | [
"android.content.Context",
"android.content.pm.ApplicationInfo"
] | import android.content.Context; import android.content.pm.ApplicationInfo; | import android.content.*; import android.content.pm.*; | [
"android.content"
] | android.content; | 2,033,798 |
public void upload(final InputStream input, final OutputStream output,
final OutputStream messages) throws IOException {
try {
rawIn = input;
rawOut = output;
if (messages != null)
msgOut = messages;
if (timeout > 0) {
final Thread caller = Thread.currentThread();
timer = new InterruptT... | void function(final InputStream input, final OutputStream output, final OutputStream messages) throws IOException { try { rawIn = input; rawOut = output; if (messages != null) msgOut = messages; if (timeout > 0) { final Thread caller = Thread.currentThread(); timer = new InterruptTimer(caller.getName() + STR); TimeoutI... | /**
* Execute the upload task on the socket.
*
* @param input
* raw input to read client commands from. Caller must ensure the
* input is buffered, otherwise read performance may suffer.
* @param output
* response back to the Git network client, to write the pack
* ... | Execute the upload task on the socket | upload | {
"repo_name": "DanielliUrbieta/ProjetoHidraWS",
"path": "src/org/eclipse/jgit/transport/UploadPack.java",
"license": "gpl-2.0",
"size": 43750
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"org.eclipse.jgit.util.io.InterruptTimer",
"org.eclipse.jgit.util.io.NullOutputStream",
"org.eclipse.jgit.util.io.TimeoutInputStream",
"org.eclipse.jgit.util.io.TimeoutOutputStream"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.eclipse.jgit.util.io.InterruptTimer; import org.eclipse.jgit.util.io.NullOutputStream; import org.eclipse.jgit.util.io.TimeoutInputStream; import org.eclipse.jgit.util.io.TimeoutOutputStream; | import java.io.*; import org.eclipse.jgit.util.io.*; | [
"java.io",
"org.eclipse.jgit"
] | java.io; org.eclipse.jgit; | 1,677,351 |
public Intent putExtra(String name, short[] value) {
if (mExtras == null) {
mExtras = new Bundle();
}
mExtras.putShortArray(name, value);
return this;
} | Intent function(String name, short[] value) { if (mExtras == null) { mExtras = new Bundle(); } mExtras.putShortArray(name, value); return this; } | /**
* Add extended data to the intent. The name must include a package
* prefix, for example the app com.android.contacts would use names
* like "com.android.contacts.ShowAll".
*
* @param name The name of the extra data, with package prefix.
* @param value The short array data value.
... | Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll" | putExtra | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/base/core/java/android/content/Intent.java",
"license": "apache-2.0",
"size": 299722
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 981,349 |
public PollStatus poll(MonitoredService svc, Map<String, Object> parameters) {
final String domain = parameters.containsKey("domain") ? (String) parameters.get("domain") : "";
final String username = parameters.containsKey("username") ? (String) parameters.get("username") : "";
final String... | PollStatus function(MonitoredService svc, Map<String, Object> parameters) { final String domain = parameters.containsKey(STR) ? (String) parameters.get(STR) : STRusernameSTRusernameSTRSTRpasswordSTRpasswordSTRSTRmodeSTRmodeSTRPATH_EXISTSTRpathSTRpathSTRSTRsmbHostSTRsmbHostSTRSTRfolderIgnoreFilesSTRfolderIgnoreFilesSTRS... | /**
* This method queries the CIFS share.
*
* @param svc the monitored service
* @param parameters the parameter map
* @return the poll status for this system
*/ | This method queries the CIFS share | poll | {
"repo_name": "qoswork/opennmszh",
"path": "protocols/cifs/src/main/java/org/opennms/netmgt/poller/monitors/JCifsMonitor.java",
"license": "gpl-2.0",
"size": 9245
} | [
"java.util.Map",
"org.opennms.netmgt.model.PollStatus",
"org.opennms.netmgt.poller.MonitoredService"
] | import java.util.Map; import org.opennms.netmgt.model.PollStatus; import org.opennms.netmgt.poller.MonitoredService; | import java.util.*; import org.opennms.netmgt.model.*; import org.opennms.netmgt.poller.*; | [
"java.util",
"org.opennms.netmgt"
] | java.util; org.opennms.netmgt; | 2,700,582 |
public void insert(IsWidget child, IsWidget tab, int beforeIndex) {
insert(asWidgetOrNull(child), asWidgetOrNull(tab), beforeIndex);
} | void function(IsWidget child, IsWidget tab, int beforeIndex) { insert(asWidgetOrNull(child), asWidgetOrNull(tab), beforeIndex); } | /**
* Convenience overload to allow {@link IsWidget} to be used directly.
*/ | Convenience overload to allow <code>IsWidget</code> to be used directly | insert | {
"repo_name": "spinque/LuceneByStrategy",
"path": "StrategyEditor/src/main/java/com/spinque/gwt/utils/client/widgets/VerticalTabLayoutPanel.java",
"license": "apache-2.0",
"size": 23350
} | [
"com.google.gwt.user.client.ui.IsWidget"
] | import com.google.gwt.user.client.ui.IsWidget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,449,921 |
public Object createMemory(final RuleBaseConfiguration config) {
CollectMemory memory = new CollectMemory();
memory.betaMemory = this.constraints.createBetaMemory( config );
memory.resultsContext = this.resultsBinder.createContext();
memory.alphaContexts = new ContextEntry[this.resul... | Object function(final RuleBaseConfiguration config) { CollectMemory memory = new CollectMemory(); memory.betaMemory = this.constraints.createBetaMemory( config ); memory.resultsContext = this.resultsBinder.createContext(); memory.alphaContexts = new ContextEntry[this.resultConstraints.length]; for ( int i = 0; i < this... | /**
* Creates a BetaMemory for the BetaNode's memory.
*/ | Creates a BetaMemory for the BetaNode's memory | createMemory | {
"repo_name": "bobmcwhirter/drools",
"path": "drools-core/src/main/java/org/drools/reteoo/CollectNode.java",
"license": "apache-2.0",
"size": 23331
} | [
"org.drools.RuleBaseConfiguration",
"org.drools.rule.ContextEntry"
] | import org.drools.RuleBaseConfiguration; import org.drools.rule.ContextEntry; | import org.drools.*; import org.drools.rule.*; | [
"org.drools",
"org.drools.rule"
] | org.drools; org.drools.rule; | 1,414,737 |
private Object handleRestReturnType(final Mono<HttpDecodedResponse> asyncHttpDecodedResponse,
final SwaggerMethodParser methodParser,
final Type returnType,
final Context context,
final RequestOptions options) {
final Mono<HttpDecodedResponse> asyncExpectedResponse =
... | Object function(final Mono<HttpDecodedResponse> asyncHttpDecodedResponse, final SwaggerMethodParser methodParser, final Type returnType, final Context context, final RequestOptions options) { final Mono<HttpDecodedResponse> asyncExpectedResponse = ensureExpectedStatus(asyncHttpDecodedResponse, methodParser, options) .d... | /**
* Handle the provided asynchronous HTTP response and return the deserialized value.
*
* @param asyncHttpDecodedResponse the asynchronous HTTP response to the original HTTP request
* @param methodParser the SwaggerMethodParser that the request originates from
* @param returnType the type of ... | Handle the provided asynchronous HTTP response and return the deserialized value | handleRestReturnType | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java",
"license": "mit",
"size": 35485
} | [
"com.azure.core.implementation.TypeUtil",
"com.azure.core.implementation.serializer.HttpResponseDecoder",
"com.azure.core.util.Context",
"com.azure.core.util.FluxUtil",
"java.lang.reflect.Type"
] | import com.azure.core.implementation.TypeUtil; import com.azure.core.implementation.serializer.HttpResponseDecoder; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import java.lang.reflect.Type; | import com.azure.core.implementation.*; import com.azure.core.implementation.serializer.*; import com.azure.core.util.*; import java.lang.reflect.*; | [
"com.azure.core",
"java.lang"
] | com.azure.core; java.lang; | 2,156,224 |
public void setCreatorTool(String creatorTool)
{
AgentNameType tt = (AgentNameType) instanciateSimple(CREATORTOOL, creatorTool);
setCreatorToolProperty(tt);
} | void function(String creatorTool) { AgentNameType tt = (AgentNameType) instanciateSimple(CREATORTOOL, creatorTool); setCreatorToolProperty(tt); } | /**
* set the name of the first known tool used to create this resource
*
* @param creatorTool
* the creator tool value to set
*/ | set the name of the first known tool used to create this resource | setCreatorTool | {
"repo_name": "kalaspuffar/pdfbox",
"path": "xmpbox/src/main/java/org/apache/xmpbox/schema/XMPBasicSchema.java",
"license": "apache-2.0",
"size": 16299
} | [
"org.apache.xmpbox.type.AgentNameType"
] | import org.apache.xmpbox.type.AgentNameType; | import org.apache.xmpbox.type.*; | [
"org.apache.xmpbox"
] | org.apache.xmpbox; | 2,799,364 |
public void testequals(){
LinkedList<Rdn> test=new LinkedList<Rdn>();
LinkedList<Rdn> test1=new LinkedList<Rdn>();
try {
test.add(new Rdn("t=test"));
test1.add(new Rdn("t=test"));
test1.add(new Rdn("t=test"));
LdapName x=new LdapName(test);
LdapName y=new LdapName(test1);
assertFalse... | void function(){ LinkedList<Rdn> test=new LinkedList<Rdn>(); LinkedList<Rdn> test1=new LinkedList<Rdn>(); try { test.add(new Rdn(STR)); test1.add(new Rdn(STR)); test1.add(new Rdn(STR)); LdapName x=new LdapName(test); LdapName y=new LdapName(test1); assertFalse(x.equals(y)); } catch (InvalidNameException e) { fail(STR+e... | /**
* <p>Test method for 'javax.naming.ldap.LdapName.equals(Object)'</p>
* <p>Here we are testing if this method determines whether the specified object is equal to the originaly one.</p>
* <p>The expected result is false.</p>
*/ | Test method for 'javax.naming.ldap.LdapName.equals(Object)' Here we are testing if this method determines whether the specified object is equal to the originaly one. The expected result is false | testequals | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/whitebox/TestLdapNameWhiteBoxDevelopment.java",
"license": "gpl-2.0",
"size": 8842
} | [
"java.util.LinkedList",
"javax.naming.InvalidNameException",
"javax.naming.ldap.LdapName",
"javax.naming.ldap.Rdn"
] | import java.util.LinkedList; import javax.naming.InvalidNameException; import javax.naming.ldap.LdapName; import javax.naming.ldap.Rdn; | import java.util.*; import javax.naming.*; import javax.naming.ldap.*; | [
"java.util",
"javax.naming"
] | java.util; javax.naming; | 2,823,194 |
public static void openNetworkSetting(Context _context) {
_context.startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS));
} | static void function(Context _context) { _context.startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS)); } | /**
* Open setting for network.
* @param _context A context object.
*/ | Open setting for network | openNetworkSetting | {
"repo_name": "XinyueZ/NavigatorDemo",
"path": "app/src/main/java/com/demo/navigator/utils/NetworkUtils.java",
"license": "mit",
"size": 5587
} | [
"android.content.Context",
"android.content.Intent",
"android.provider.Settings"
] | import android.content.Context; import android.content.Intent; import android.provider.Settings; | import android.content.*; import android.provider.*; | [
"android.content",
"android.provider"
] | android.content; android.provider; | 1,004,129 |
public final void checkPending(@NotNull final Instruction instruction) {
final PsiElement element = instruction.getElement();
if (element == null) {
// if element is null (fake element, we just process all pending)
for (Pair<PsiElement, Instruction> pair : pending) {
addEdge(pair.getSecond... | final void function(@NotNull final Instruction instruction) { final PsiElement element = instruction.getElement(); if (element == null) { for (Pair<PsiElement, Instruction> pair : pending) { addEdge(pair.getSecond(), instruction); } pending.clear(); } else { for (int i = pending.size() - 1; i >= 0; i--) { final Pair<Ps... | /**
* Creates edges from the pending list to the specified instruction.
*
* @param instruction target instruction for pending edges
*/ | Creates edges from the pending list to the specified instruction | checkPending | {
"repo_name": "goodwinnk/intellij-community",
"path": "platform/core-impl/src/com/intellij/codeInsight/controlflow/ControlFlowBuilder.java",
"license": "apache-2.0",
"size": 11000
} | [
"com.intellij.openapi.util.Pair",
"com.intellij.psi.PsiElement",
"com.intellij.psi.util.PsiTreeUtil",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.util.Pair; import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.util.*; import com.intellij.psi.*; import com.intellij.psi.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"com.intellij.psi",
"org.jetbrains.annotations"
] | com.intellij.openapi; com.intellij.psi; org.jetbrains.annotations; | 2,689,606 |
@Override
public Result execute( Result result, int nr ) throws KettleException {
result.setEntryNr( nr );
LogChannelFileWriter logChannelFileWriter = null;
LogLevel transLogLevel = parentJob.getLogLevel();
String realLogFilename = "";
if ( setLogfile ) {
transLogLevel = logFileLevel;
... | Result function( Result result, int nr ) throws KettleException { result.setEntryNr( nr ); LogChannelFileWriter logChannelFileWriter = null; LogLevel transLogLevel = parentJob.getLogLevel(); String realLogFilename = STRJobTrans.Exception.LogFilenameMissingSTRJobTrans.Error.UnableOpenAppenderSTRJobTrans.Log.OpeningTrans... | /**
* Execute this job entry and return the result. In this case it means, just set the result boolean in the Result
* class.
*
* @param result The result of the previous execution
* @param nr the job entry number
* @return The Result of the execution.
*/ | Execute this job entry and return the result. In this case it means, just set the result boolean in the Result class | execute | {
"repo_name": "AliaksandrShuhayeu/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/job/entries/trans/JobEntryTrans.java",
"license": "apache-2.0",
"size": 66587
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.core.Result",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.core.logging.LogChannelFileWriter",
"org.pentaho.di.core.logging.LogLevel",
"org.pentaho.di.core.variables.VariableSpace",
"org.pentaho.di.repository.Repository",
"org.pentaho.me... | import org.pentaho.di.core.Const; import org.pentaho.di.core.Result; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.logging.LogChannelFileWriter; import org.pentaho.di.core.logging.LogLevel; import org.pentaho.di.core.variables.VariableSpace; import org.pentaho.di.repository.Repository... | import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.logging.*; import org.pentaho.di.core.variables.*; import org.pentaho.di.repository.*; import org.pentaho.metastore.api.*; | [
"org.pentaho.di",
"org.pentaho.metastore"
] | org.pentaho.di; org.pentaho.metastore; | 1,435,455 |
@Test
public void testUpdateGarbage() throws IOException, URISyntaxException {
WebResource webResource = client.resource(RestUtils.getServerURI() + DEFAULT_PU + "/entity/" + "StaticUser");
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] b = "Garbage".getBytes();
... | void function() throws IOException, URISyntaxException { WebResource webResource = client.resource(RestUtils.getServerURI() + DEFAULT_PU + STR + STR); ByteArrayOutputStream os = new ByteArrayOutputStream(); byte[] b = STR.getBytes(); os.write(b); ClientResponse response = webResource.type(MediaType.APPLICATION_JSON_TYP... | /**
* Test update garbage.
*
* @throws IOException Signals that an I/O exception has occurred.
* @throws URISyntaxException the uRI syntax exception
*/ | Test update garbage | testUpdateGarbage | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "jpa/eclipselink.jpars.test/src/org/eclipse/persistence/jpars/test/server/ServerCrudTest.java",
"license": "epl-1.0",
"size": 59374
} | [
"com.sun.jersey.api.client.ClientResponse",
"com.sun.jersey.api.client.WebResource",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.net.URISyntaxException",
"javax.ws.rs.core.MediaType",
"org.eclipse.persistence.jpars.test.util.RestUtils",
"org.junit.Assert"
] | import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URISyntaxException; import javax.ws.rs.core.MediaType; import org.eclipse.persistence.jpars.test.util.RestUtils; import org.junit.Assert; | import com.sun.jersey.api.client.*; import java.io.*; import java.net.*; import javax.ws.rs.core.*; import org.eclipse.persistence.jpars.test.util.*; import org.junit.*; | [
"com.sun.jersey",
"java.io",
"java.net",
"javax.ws",
"org.eclipse.persistence",
"org.junit"
] | com.sun.jersey; java.io; java.net; javax.ws; org.eclipse.persistence; org.junit; | 372,105 |
public void setTemporaryKeyField()
{
FieldDataScratchHandler fieldDataScratchHandler = (FieldDataScratchHandler)m_field.getListener(FieldDataScratchHandler.class);
Record record = this.getOwner();
KeyArea keyArea = record.getKeyArea(0);
if (keyArea.getKeyFields(false, true) == 1)... | void function() { FieldDataScratchHandler fieldDataScratchHandler = (FieldDataScratchHandler)m_field.getListener(FieldDataScratchHandler.class); Record record = this.getOwner(); KeyArea keyArea = record.getKeyArea(0); if (keyArea.getKeyFields(false, true) == 1) { if (m_fakeKeyField == null) { m_fakeKeyField = new KeyFi... | /**
* Set up/do the remote criteria.
* @return True if you should not skip this record (does a check on the local data).
*/ | Set up/do the remote criteria | setTemporaryKeyField | {
"repo_name": "jbundle/jbundle",
"path": "base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java",
"license": "gpl-3.0",
"size": 12384
} | [
"org.jbundle.base.db.KeyArea",
"org.jbundle.base.db.KeyField",
"org.jbundle.base.db.Record",
"org.jbundle.base.field.BaseField",
"org.jbundle.base.field.event.FieldDataScratchHandler",
"org.jbundle.base.model.DBConstants",
"org.jbundle.base.model.Utility"
] | import org.jbundle.base.db.KeyArea; import org.jbundle.base.db.KeyField; import org.jbundle.base.db.Record; import org.jbundle.base.field.BaseField; import org.jbundle.base.field.event.FieldDataScratchHandler; import org.jbundle.base.model.DBConstants; import org.jbundle.base.model.Utility; | import org.jbundle.base.db.*; import org.jbundle.base.field.*; import org.jbundle.base.field.event.*; import org.jbundle.base.model.*; | [
"org.jbundle.base"
] | org.jbundle.base; | 2,448,514 |
public Variation getDefault() {
if (variations[index]==null) {
variations[index]=json.fromJson(Variation.class,Gdx.files.internal(rules[index]));
}
return variations[index];
} | Variation function() { if (variations[index]==null) { variations[index]=json.fromJson(Variation.class,Gdx.files.internal(rules[index])); } return variations[index]; } | /**
* Returns the default <code>Variation</code>
* @return either the configured <code>Variation</code> or the first one we can find.
*/ | Returns the default <code>Variation</code> | getDefault | {
"repo_name": "onyxbits/pocketbandit",
"path": "src/de/onyxbits/pocketbandit/Loader.java",
"license": "apache-2.0",
"size": 3170
} | [
"com.badlogic.gdx.Gdx"
] | import com.badlogic.gdx.Gdx; | import com.badlogic.gdx.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,840,517 |
public IDataSource newExternalDataSource(@SuppressWarnings("hiding") String questionnaire, String question, String category, String openAnswer) {
return ConditionBuilder.createQuestionCondition(this, questionnaire, question, category, openAnswer).getElement();
} | IDataSource function(@SuppressWarnings(STR) String questionnaire, String question, String category, String openAnswer) { return ConditionBuilder.createQuestionCondition(this, questionnaire, question, category, openAnswer).getElement(); } | /**
* Build a data source that gives the open answer in another questionnaire.
* @param questionnaire
* @param question
* @param category
* @param openAnswer
* @return
*/ | Build a data source that gives the open answer in another questionnaire | newExternalDataSource | {
"repo_name": "apruden/onyx",
"path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/engine/questionnaire/util/QuestionnaireBuilder.java",
"license": "gpl-3.0",
"size": 10984
} | [
"org.obiba.onyx.core.data.IDataSource",
"org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.ConditionBuilder"
] | import org.obiba.onyx.core.data.IDataSource; import org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.ConditionBuilder; | import org.obiba.onyx.core.data.*; import org.obiba.onyx.quartz.core.engine.questionnaire.util.builder.*; | [
"org.obiba.onyx"
] | org.obiba.onyx; | 2,848,510 |
try {
FileOutputStream fs = new FileOutputStream(file);
OutputStreamWriter writer = new OutputStreamWriter
(new BufferedOutputStream(fs), "UTF-8");
writeMap(writer, map, bb);
} catch (FileNotFoundException fnfe) {
LOG.warning("File does not exist "+file);
} catch (UnsupportedEncodingException fnfe... | try { FileOutputStream fs = new FileOutputStream(file); OutputStreamWriter writer = new OutputStreamWriter (new BufferedOutputStream(fs), "UTF-8"); writeMap(writer, map, bb); } catch (FileNotFoundException fnfe) { LOG.warning(STR+file); } catch (UnsupportedEncodingException fnfe) { LOG.warning(STR); } } | /**
* Writes all data from <code>mapData</code> to file.
*/ | Writes all data from <code>mapData</code> to file | writeMap | {
"repo_name": "marcosruiz/aima-java-AIMA3e",
"path": "aimax-osm/src/main/java/aimax/osm/writer/OsmWriter.java",
"license": "mit",
"size": 5135
} | [
"java.io.BufferedOutputStream",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.OutputStreamWriter",
"java.io.UnsupportedEncodingException"
] | import java.io.BufferedOutputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 255,802 |
public FontProperty[] getFontProperties(String fpName){
Vector<FontProperty> props = fProperties.get(fpName);
if (props == null){
return null;
}
int size = props.size();
if (size == 0){
return null;
}
F... | FontProperty[] function(String fpName){ Vector<FontProperty> props = fProperties.get(fpName); if (props == null){ return null; } int size = props.size(); if (size == 0){ return null; } FontProperty[] fps = new FontProperty[size]; for (int i=0; i < fps.length; i++){ fps[i] = props.elementAt(i); } return fps; } | /**
* Returns an array of FontProperties from the properties file
* with the specified property name "logical face.style". E.g.
* "dialog.2" corresponds to the font family Dialog with bold style.
*
* @param fpName key of the font properties in the properties set
*/ | Returns an array of FontProperties from the properties file with the specified property name "logical face.style". E.g. "dialog.2" corresponds to the font family Dialog with bold style | getFontProperties | {
"repo_name": "mike10004/appengine-imaging",
"path": "gaecompat-awt-imaging/src/awt/org/apache/harmony/awt/gl/font/FontManager.java",
"license": "apache-2.0",
"size": 31415
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 634,070 |
private UUID createCUIConceptUUID(String cui, boolean assignNid)
{
UUID temp = converterUUID.createNamespaceUUIDFromString("CUI:" + cui, true);
if (assignNid)
{
Get.identifierService().assignNid(temp);
}
return temp;
} | UUID function(String cui, boolean assignNid) { UUID temp = converterUUID.createNamespaceUUIDFromString("CUI:" + cui, true); if (assignNid) { Get.identifierService().assignNid(temp); } return temp; } | /**
* Creates the CUI concept UUID.
*
* @param cui the cui
* @return the uuid
*/ | Creates the CUI concept UUID | createCUIConceptUUID | {
"repo_name": "OSEHRA/ISAAC",
"path": "misc/importers/src/main/java/sh/isaac/convert/mojo/rxnorm/RxNormImportHK2Direct.java",
"license": "apache-2.0",
"size": 84371
} | [
"sh.isaac.api.Get"
] | import sh.isaac.api.Get; | import sh.isaac.api.*; | [
"sh.isaac.api"
] | sh.isaac.api; | 1,212,032 |
public I18n getI18n() {
return i18n;
} | I18n function() { return i18n; } | /**
* Returns the internationalization manager.
*
* @return
*/ | Returns the internationalization manager | getI18n | {
"repo_name": "kyriog/UHPlugin",
"path": "src/main/java/me/azenet/UHPlugin/UHPlugin.java",
"license": "gpl-3.0",
"size": 8437
} | [
"me.azenet.UHPlugin"
] | import me.azenet.UHPlugin; | import me.azenet.*; | [
"me.azenet"
] | me.azenet; | 1,113,022 |
@Test public void testPushAggregateThroughOuterJoin14() {
final HepProgram preProgram = new HepProgramBuilder()
.addRuleInstance(AggregateProjectMergeRule.INSTANCE)
.build();
final String sql = "select e.mgr, d.mgr\n"
+ "from sales.emp as e\n"
+ "full outer join sales.emp as d ... | @Test void function() { final HepProgram preProgram = new HepProgramBuilder() .addRuleInstance(AggregateProjectMergeRule.INSTANCE) .build(); final String sql = STR + STR + STR + STR; sql(sql).withPre(preProgram) .withRule(AggregateJoinTransposeRule.EXTENDED) .check(); } | /** Test case for
* full outer join, group by on key same as join key, group by on both side */ | Test case for | testPushAggregateThroughOuterJoin14 | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java",
"license": "apache-2.0",
"size": 255036
} | [
"org.apache.calcite.plan.hep.HepProgram",
"org.apache.calcite.plan.hep.HepProgramBuilder",
"org.apache.calcite.rel.rules.AggregateJoinTransposeRule",
"org.apache.calcite.rel.rules.AggregateProjectMergeRule",
"org.junit.Test"
] | import org.apache.calcite.plan.hep.HepProgram; import org.apache.calcite.plan.hep.HepProgramBuilder; import org.apache.calcite.rel.rules.AggregateJoinTransposeRule; import org.apache.calcite.rel.rules.AggregateProjectMergeRule; import org.junit.Test; | import org.apache.calcite.plan.hep.*; import org.apache.calcite.rel.rules.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 2,617,447 |
public void setDefaultCameraOrientation(Vector3f direction, Vector3f up) {
// Check for nulls first.
if (direction == null || up == null) {
throw new IllegalArgumentException("FlightCamera error: "
+ "Null arguments not accepted for orienting the camera.");
}
// Make sure the direction and up v... | void function(Vector3f direction, Vector3f up) { if (direction == null up == null) { throw new IllegalArgumentException(STR + STR); } else if (FastMath.abs(direction.dot(up)) > 1e-5f direction.equals(up)) { throw new IllegalArgumentException(STR + STR); } defaultDirection.set(direction); defaultUp.set(up); return; } | /**
* Sets the default orientation of the view's camera.
*
* @param direction
* The new default direction in which the camera will point. If
* null, an exception is thrown.
* @param up
* The new default up direction. If null or if it is not
* orthogon... | Sets the default orientation of the view's camera | setDefaultCameraOrientation | {
"repo_name": "SmithRWORNL/ice",
"path": "src/org.eclipse.ice.client.widgets.rcp/src/org/eclipse/ice/client/widgets/reactoreditor/plant/PlantAppState.java",
"license": "epl-1.0",
"size": 15653
} | [
"com.jme3.math.FastMath",
"com.jme3.math.Vector3f"
] | import com.jme3.math.FastMath; import com.jme3.math.Vector3f; | import com.jme3.math.*; | [
"com.jme3.math"
] | com.jme3.math; | 726,569 |
public XmlReader getRoot()
{
return root;
}
| XmlReader function() { return root; } | /**
* Get root node.
*
* @return The node.
*/ | Get root node | getRoot | {
"repo_name": "b3dgs/lionheart-remake",
"path": "lionheart-game/src/main/java/com/b3dgs/lionheart/EntityConfig.java",
"license": "gpl-3.0",
"size": 3965
} | [
"com.b3dgs.lionengine.XmlReader"
] | import com.b3dgs.lionengine.XmlReader; | import com.b3dgs.lionengine.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 1,077,153 |
private void generateJspFragment(Node n, String tagHandlerVar)
throws JasperException {
// XXX - A possible optimization here would be to check to see
// if the only child of the parent node is TemplateText. If so,
// we know there won't be any parameters, etc... | void function(Node n, String tagHandlerVar) throws JasperException { FragmentHelperClass.Fragment fragment = fragmentHelperClass .openFragment(n, methodNesting); ServletWriter outSave = out; out = fragment.getGenBuffer().getOut(); String tmpParent = parent; parent = STR; boolean isSimpleTagParentSave = isSimpleTagParen... | /**
* Generates anonymous JspFragment inner class which is passed as an
* argument to SimpleTag.setJspBody().
*/ | Generates anonymous JspFragment inner class which is passed as an argument to SimpleTag.setJspBody() | generateJspFragment | {
"repo_name": "barreiro/jastow",
"path": "src/main/java/org/apache/jasper/compiler/Generator.java",
"license": "apache-2.0",
"size": 173664
} | [
"org.apache.jasper.JasperException"
] | import org.apache.jasper.JasperException; | import org.apache.jasper.*; | [
"org.apache.jasper"
] | org.apache.jasper; | 2,718,209 |
public File resolve(final Extension extension,
final Project project) throws BuildException {
validate();
final Ant ant = new Ant();
ant.setProject(project);
ant.setInheritAll(false);
ant.setAntfile(antfile.getName());
try {
fina... | File function(final Extension extension, final Project project) throws BuildException { validate(); final Ant ant = new Ant(); ant.setProject(project); ant.setInheritAll(false); ant.setAntfile(antfile.getName()); try { final File dir = antfile.getParentFile().getCanonicalFile(); ant.setDir(dir); } catch (final IOExcept... | /**
* Returns the resolved file
* @param extension the extension
* @param project the project
* @return the file resolved
* @throws BuildException if the file cannot be resolved
*/ | Returns the resolved file | resolve | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java",
"license": "mit",
"size": 3370
} | [
"java.io.File",
"java.io.IOException",
"org.apache.tools.ant.BuildException",
"org.apache.tools.ant.Project",
"org.apache.tools.ant.taskdefs.Ant",
"org.apache.tools.ant.taskdefs.optional.extension.Extension"
] | import java.io.File; import java.io.IOException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Ant; import org.apache.tools.ant.taskdefs.optional.extension.Extension; | import java.io.*; import org.apache.tools.ant.*; import org.apache.tools.ant.taskdefs.*; import org.apache.tools.ant.taskdefs.optional.extension.*; | [
"java.io",
"org.apache.tools"
] | java.io; org.apache.tools; | 1,185,171 |
public void setExtendedaccesskey(String v)
{
if (!ObjectUtils.equals(this.extendedaccesskey, v))
{
this.extendedaccesskey = v;
setModified(true);
}
} | void function(String v) { if (!ObjectUtils.equals(this.extendedaccesskey, v)) { this.extendedaccesskey = v; setModified(true); } } | /**
* Set the value of Extendedaccesskey
*
* @param v new value
*/ | Set the value of Extendedaccesskey | setExtendedaccesskey | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTRole.java",
"license": "gpl-3.0",
"size": 116851
} | [
"org.apache.commons.lang.ObjectUtils"
] | import org.apache.commons.lang.ObjectUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,970,753 |
public Builder setPropertiesFile(String location)
throws MalformedURLException, IOException {
if (location != null) {
this.properties = createProperties(PropUtils.getResourceOrFileOrURL(location));
}
return this;
} | Builder function(String location) throws MalformedURLException, IOException { if (location != null) { this.properties = createProperties(PropUtils.getResourceOrFileOrURL(location)); } return this; } | /**
* Have the builder look for a resource, file or URL at the location.
*
* @param location of the properties file
* @return this Builder, so settings can be stacked.
* @throws MalformedURLException
* @throws IOException
*/ | Have the builder look for a resource, file or URL at the location | setPropertiesFile | {
"repo_name": "d2fn/passage",
"path": "src/main/java/com/bbn/openmap/PropertyHandler.java",
"license": "mit",
"size": 65414
} | [
"com.bbn.openmap.util.PropUtils",
"java.io.IOException",
"java.net.MalformedURLException"
] | import com.bbn.openmap.util.PropUtils; import java.io.IOException; import java.net.MalformedURLException; | import com.bbn.openmap.util.*; import java.io.*; import java.net.*; | [
"com.bbn.openmap",
"java.io",
"java.net"
] | com.bbn.openmap; java.io; java.net; | 66,465 |
void addAdditionalFilter(IQueryFilter<I_C_OrderLine> filter); | void addAdditionalFilter(IQueryFilter<I_C_OrderLine> filter); | /**
* Add additional filters to allow other modules restricting the set of order lines for which the system automatically creates invoice candidates.
*/ | Add additional filters to allow other modules restricting the set of order lines for which the system automatically creates invoice candidates | addAdditionalFilter | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.swat/de.metas.swat.base/src/main/java/de/metas/invoicecandidate/spi/IC_OrderLine_HandlerDAO.java",
"license": "gpl-2.0",
"size": 1862
} | [
"org.adempiere.ad.dao.IQueryFilter"
] | import org.adempiere.ad.dao.IQueryFilter; | import org.adempiere.ad.dao.*; | [
"org.adempiere.ad"
] | org.adempiere.ad; | 998,058 |
@Override
public int getMaxItemUseDuration(ItemStack stack)
{
if (!canUseMagic()) return 0;
FairyMagic fairyMagic = getFairy(stack).fairyMagic;
if (fairyMagic == null) return 0;
return fairyMagic.getMaxItemUseDuration(stack);
} | int function(ItemStack stack) { if (!canUseMagic()) return 0; FairyMagic fairyMagic = getFairy(stack).fairyMagic; if (fairyMagic == null) return 0; return fairyMagic.getMaxItemUseDuration(stack); } | /**
* How long it takes to use or consume an item
*/ | How long it takes to use or consume an item | getMaxItemUseDuration | {
"repo_name": "MirrgieRiana/MirageFairy",
"path": "src/main/java/mirrg/minecraft/mod/miragefairy/modules/fairy/ItemFairyBase.java",
"license": "lgpl-2.1",
"size": 8366
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 516,481 |
public boolean resume() {
TimerStatus timerStatus = getLocalData().getTimerStatus();
//Check if we can resume currently.
if (timerStatus.getState() == TimerStatus.State.POMODORO_FINISHED ||
timerStatus.getState() == TimerStatus.State.BREAK_FINISHED ||
timerSt... | boolean function() { TimerStatus timerStatus = getLocalData().getTimerStatus(); if (timerStatus.getState() == TimerStatus.State.POMODORO_FINISHED timerStatus.getState() == TimerStatus.State.BREAK_FINISHED timerStatus.getState() == TimerStatus.State.DONE) { return false; } timerStatus.setPaused(false); refreshTimerStatu... | /**
* Resumes the timer. Returns <code>true</code> if timer
* was currently paused and was successfully resumed, <code>false</code>
* otherwise.
*
* @return true if timer was resumed successfully
*/ | Resumes the timer. Returns <code>true</code> if timer was currently paused and was successfully resumed, <code>false</code> otherwise | resume | {
"repo_name": "ikust/pomodoro-timer",
"path": "app/src/main/java/co/ikust/pomodorotimer/TimerService.java",
"license": "apache-2.0",
"size": 8923
} | [
"co.ikust.pomodorotimer.PomodoroTimerApplication",
"co.ikust.pomodorotimer.storage.models.TimerStatus",
"co.ikust.pomodorotimer.utils.Constants",
"java.util.concurrent.TimeUnit"
] | import co.ikust.pomodorotimer.PomodoroTimerApplication; import co.ikust.pomodorotimer.storage.models.TimerStatus; import co.ikust.pomodorotimer.utils.Constants; import java.util.concurrent.TimeUnit; | import co.ikust.pomodorotimer.*; import co.ikust.pomodorotimer.storage.models.*; import co.ikust.pomodorotimer.utils.*; import java.util.concurrent.*; | [
"co.ikust.pomodorotimer",
"java.util"
] | co.ikust.pomodorotimer; java.util; | 2,651,138 |
public void fromPNML(OMElement subRoot,IdRefLinker idr) throws InnerBuildException, InvalidIDException, VoidRepositoryException{
item.fromPNML(subRoot,idr);
}
| void function(OMElement subRoot,IdRefLinker idr) throws InnerBuildException, InvalidIDException, VoidRepositoryException{ item.fromPNML(subRoot,idr); } | /**
* creates an object from the xml nodes.(symetric work of toPNML)
*/ | creates an object from the xml nodes.(symetric work of toPNML) | fromPNML | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PTNet/src/fr/lip6/move/pnml/ptnet/hlapi/TransitionHLAPI.java",
"license": "epl-1.0",
"size": 11212
} | [
"fr.lip6.move.pnml.framework.utils.IdRefLinker",
"fr.lip6.move.pnml.framework.utils.exception.InnerBuildException",
"fr.lip6.move.pnml.framework.utils.exception.InvalidIDException",
"fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException",
"org.apache.axiom.om.OMElement"
] | import fr.lip6.move.pnml.framework.utils.IdRefLinker; import fr.lip6.move.pnml.framework.utils.exception.InnerBuildException; import fr.lip6.move.pnml.framework.utils.exception.InvalidIDException; import fr.lip6.move.pnml.framework.utils.exception.VoidRepositoryException; import org.apache.axiom.om.OMElement; | import fr.lip6.move.pnml.framework.utils.*; import fr.lip6.move.pnml.framework.utils.exception.*; import org.apache.axiom.om.*; | [
"fr.lip6.move",
"org.apache.axiom"
] | fr.lip6.move; org.apache.axiom; | 1,284,237 |
public static long toPeriod(String value)
throws ConfigException
{
return toPeriod(value, 1000);
} | static long function(String value) throws ConfigException { return toPeriod(value, 1000); } | /**
* Converts a period string to a time.
*
* <table>
* <tr><td>ms<td>milliseconds
* <tr><td>s<td>seconds
* <tr><td>m<td>minutes
* <tr><td>h<td>hours
* <tr><td>D<td>days
* <tr><td>W<td>weeks
* <tr><td>M<td>months
* <tr><td>Y<td>years
* </table>
*/ | Converts a period string to a time. msmilliseconds sseconds mminutes hhours Ddays Wweeks Mmonths Yyears | toPeriod | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/config/types/Period.java",
"license": "gpl-2.0",
"size": 6671
} | [
"com.caucho.config.ConfigException"
] | import com.caucho.config.ConfigException; | import com.caucho.config.*; | [
"com.caucho.config"
] | com.caucho.config; | 978,604 |
public static Maze readMazeFile(String mazefile)
throws IOException, ClassNotFoundException {
assert(mazefile != null);
FileInputStream in = new FileInputStream(mazefile);
ObjectInputStream s = new ObjectInputStream(in);
... | static Maze function(String mazefile) throws IOException, ClassNotFoundException { assert(mazefile != null); FileInputStream in = new FileInputStream(mazefile); ObjectInputStream s = new ObjectInputStream(in); Maze maze = (Maze) s.readObject(); return maze; } | /**
* Create a maze from a serialized {@link MazeImpl} object written to a file.
* @param mazefile The filename to load the serialized object from.
* @return A reconstituted {@link MazeImpl}.
*/ | Create a maze from a serialized <code>MazeImpl</code> object written to a file | readMazeFile | {
"repo_name": "phoenixz1/Lab2",
"path": "MazeImpl.java",
"license": "mit",
"size": 37576
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,263,324 |
public Set<Segment> getAllValuesOfS1(final ConnectedToNotSymmetric.Match partialMatch) {
return rawStreamAllValuesOfS1(partialMatch.toArray()).collect(Collectors.toSet());
} | Set<Segment> function(final ConnectedToNotSymmetric.Match partialMatch) { return rawStreamAllValuesOfS1(partialMatch.toArray()).collect(Collectors.toSet()); } | /**
* Retrieve the set of values that occur in matches for S1.
* @return the Set of all values or empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for S1 | getAllValuesOfS1 | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/ConnectedToNotSymmetric.java",
"license": "epl-1.0",
"size": 29235
} | [
"java.util.Set",
"java.util.stream.Collectors"
] | import java.util.Set; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 21,056 |
@Override
protected void initialize() {
super.initialize();
m_CurrentToken = null;
m_ToCleanUp = new ArrayList<>();
m_Actors = new Sequence();
m_Actors.setAllowStandalones(true);
m_Actors.setAllowSource(true);
} | void function() { super.initialize(); m_CurrentToken = null; m_ToCleanUp = new ArrayList<>(); m_Actors = new Sequence(); m_Actors.setAllowStandalones(true); m_Actors.setAllowSource(true); } | /**
* Initializes the members.
*/ | Initializes the members | initialize | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/control/LoadBalancer.java",
"license": "gpl-3.0",
"size": 21050
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,798,842 |
ResultScanner<Row> readRows(ReadRowsRequest request); | ResultScanner<Row> readRows(ReadRowsRequest request); | /**
* Perform a scan over rows.
*/ | Perform a scan over rows | readRows | {
"repo_name": "derjust/cloud-bigtable-client",
"path": "bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableDataClient.java",
"license": "apache-2.0",
"size": 3211
} | [
"com.google.bigtable.v1.ReadRowsRequest",
"com.google.bigtable.v1.Row",
"com.google.cloud.bigtable.grpc.scanner.ResultScanner"
] | import com.google.bigtable.v1.ReadRowsRequest; import com.google.bigtable.v1.Row; import com.google.cloud.bigtable.grpc.scanner.ResultScanner; | import com.google.bigtable.v1.*; import com.google.cloud.bigtable.grpc.scanner.*; | [
"com.google.bigtable",
"com.google.cloud"
] | com.google.bigtable; com.google.cloud; | 1,199,279 |
static CircuitBreakerRuleBuilder builder(Iterable<HttpMethod> methods) {
requireNonNull(methods, "methods");
checkArgument(!Iterables.isEmpty(methods), "method can't be empty.");
final ImmutableSet<HttpMethod> httpMethods = Sets.immutableEnumSet(methods);
return builder((unused, head... | static CircuitBreakerRuleBuilder builder(Iterable<HttpMethod> methods) { requireNonNull(methods, STR); checkArgument(!Iterables.isEmpty(methods), STR); final ImmutableSet<HttpMethod> httpMethods = Sets.immutableEnumSet(methods); return builder((unused, headers) -> httpMethods.contains(headers.method())); } | /**
* Returns a newly created {@link CircuitBreakerRuleBuilder} with the specified {@link HttpMethod}s.
*/ | Returns a newly created <code>CircuitBreakerRuleBuilder</code> with the specified <code>HttpMethod</code>s | builder | {
"repo_name": "minwoox/armeria",
"path": "core/src/main/java/com/linecorp/armeria/client/circuitbreaker/CircuitBreakerRule.java",
"license": "apache-2.0",
"size": 11827
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.Iterables",
"com.google.common.collect.Sets",
"com.linecorp.armeria.common.HttpMethod",
"java.util.Objects"
] | import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import com.linecorp.armeria.common.HttpMethod; import java.util.Objects; | import com.google.common.base.*; import com.google.common.collect.*; import com.linecorp.armeria.common.*; import java.util.*; | [
"com.google.common",
"com.linecorp.armeria",
"java.util"
] | com.google.common; com.linecorp.armeria; java.util; | 483,613 |
@Test
public final void testXMax() {
Assert.assertTrue(this.m.xMax() == 4);
} | final void function() { Assert.assertTrue(this.m.xMax() == 4); } | /**
* Test method for {@link fr.nantes1900.models.basis.Mesh#xMax()}.
*/ | Test method for <code>fr.nantes1900.models.basis.Mesh#xMax()</code> | testXMax | {
"repo_name": "DanielLefevre/Nantes-1900-Maven",
"path": "src/test/java/fr/nantes1900/models/MeshTest.java",
"license": "gpl-3.0",
"size": 18620
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 603,627 |
EClass getPhaseVariationCurve(); | EClass getPhaseVariationCurve(); | /**
* Returns the meta object for class '{@link gluemodel.CIM.IEC61970.Wires.PhaseVariationCurve <em>Phase Variation Curve</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Phase Variation Curve</em>'.
* @see gluemodel.CIM.IEC61970.Wires.PhaseVariationCurve
*... | Returns the meta object for class '<code>gluemodel.CIM.IEC61970.Wires.PhaseVariationCurve Phase Variation Curve</code>'. | getPhaseVariationCurve | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java",
"license": "mit",
"size": 669840
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 533,584 |
public RestoreSnapshotRequestBuilder setIndexSettings(Map<String, Object> source) {
request.indexSettings(source);
return this;
} | RestoreSnapshotRequestBuilder function(Map<String, Object> source) { request.indexSettings(source); return this; } | /**
* Sets index settings that should be added or replaced during restore
*
* @param source index settings
* @return this builder
*/ | Sets index settings that should be added or replaced during restore | setIndexSettings | {
"repo_name": "strahanjen/strahanjen.github.io",
"path": "elasticsearch-master/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java",
"license": "bsd-3-clause",
"size": 9552
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,112,583 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.