method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static final String getHostSchemePort(boolean isHttps) {
int port;
String protocol;
if (isHttps) {
protocol = "https";
port = HTTPS_PORT;
} else {
protocol = "http";
port = HTTP_PORT;
}
URL url = null;
tr... | static final String function(boolean isHttps) { int port; String protocol; if (isHttps) { protocol = "https"; port = HTTPS_PORT; } else { protocol = "http"; port = HTTP_PORT; } URL url = null; try { url = new URL(protocol, HOST_IP, port, "/"); } catch (MalformedURLException e) { assert false : STR + isHttps; } return u... | /**
* Returns the main part of the URL with the trailing slash
*
* @param isHttps
* @return
*/ | Returns the main part of the URL with the trailing slash | getHostSchemePort | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/tests/DumpRenderTree2/src/com/android/dumprendertree2/forwarder/ForwarderManager.java",
"license": "gpl-2.0",
"size": 3464
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 1,114,022 |
public static String[][] getWebsiteImages(String path, String componentId)
throws WysiwygException {
return getManager().getWebsiteImages(path, componentId);
} | static String[][] function(String path, String componentId) throws WysiwygException { return getManager().getWebsiteImages(path, componentId); } | /**
* Get images of the website.
* @param path type String: for example of the directory
* @param componentId
* @return imagesList a table of string[N] with in logical index [N][0] = path name [N][1] =
* logical name of the file.
* @throws WysiwygException
*/ | Get images of the website | getWebsiteImages | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/contribution/content/wysiwyg/service/WysiwygController.java",
"license": "agpl-3.0",
"size": 14760
} | [
"org.silverpeas.core.contribution.content.wysiwyg.WysiwygException"
] | import org.silverpeas.core.contribution.content.wysiwyg.WysiwygException; | import org.silverpeas.core.contribution.content.wysiwyg.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 592,340 |
public List<SyndEntry> filterExclude(@Nonnull List<SyndEntry> feedEntries); | List<SyndEntry> function(@Nonnull List<SyndEntry> feedEntries); | /**
* Filter those feed entries away which did not match to the given regular expression. If the
* filter expression is not defined (null or empty) the given <code>feedEntries</code> will be
* returned.
*
* @param feedEntries The feed entries which should be filtered.
* @return The filtered feed entries.
... | Filter those feed entries away which did not match to the given regular expression. If the filter expression is not defined (null or empty) the given <code>feedEntries</code> will be returned | filterExclude | {
"repo_name": "meerkatzenwildschein/FeedExpander",
"path": "src/main/java/org/rr/expander/feed/FeedContentFilter.java",
"license": "gpl-2.0",
"size": 1087
} | [
"com.sun.syndication.feed.synd.SyndEntry",
"java.util.List",
"javax.annotation.Nonnull"
] | import com.sun.syndication.feed.synd.SyndEntry; import java.util.List; import javax.annotation.Nonnull; | import com.sun.syndication.feed.synd.*; import java.util.*; import javax.annotation.*; | [
"com.sun.syndication",
"java.util",
"javax.annotation"
] | com.sun.syndication; java.util; javax.annotation; | 1,220,609 |
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@NonNull
public Bundle getBundle() {
return mBundle;
} | @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) Bundle function() { return mBundle; } | /**
* Returns the {@link Bundle} populated by this builder.
*
* @hide
*/ | Returns the <code>Bundle</code> populated by this builder | getBundle | {
"repo_name": "AndroidX/androidx",
"path": "appsearch/appsearch/src/main/java/androidx/appsearch/app/SearchSpec.java",
"license": "apache-2.0",
"size": 29551
} | [
"android.os.Bundle",
"androidx.annotation.RestrictTo"
] | import android.os.Bundle; import androidx.annotation.RestrictTo; | import android.os.*; import androidx.annotation.*; | [
"android.os",
"androidx.annotation"
] | android.os; androidx.annotation; | 1,260,843 |
public MetaProperty<Double> initialPrice() {
return initialPrice;
} | MetaProperty<Double> function() { return initialPrice; } | /**
* The meta-property for the {@code initialPrice} property.
* @return the meta-property, not null
*/ | The meta-property for the initialPrice property | initialPrice | {
"repo_name": "nssales/Strata",
"path": "modules/finance-beta/src/main/java/com/opengamma/strata/finance/equity/EquityFutureTrade.java",
"license": "apache-2.0",
"size": 17177
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,171,833 |
private synchronized void restoreSnapshot(final SnapshotDescription snapshot,
final HTableDescriptor hTableDescriptor) throws HBaseSnapshotException {
TableName tableName = hTableDescriptor.getTableName();
// make sure we aren't running a snapshot on the same table
if (isTakingSnapshot(tableName)) ... | synchronized void function(final SnapshotDescription snapshot, final HTableDescriptor hTableDescriptor) throws HBaseSnapshotException { TableName tableName = hTableDescriptor.getTableName(); if (isTakingSnapshot(tableName)) { throw new RestoreSnapshotException(STR + tableName); } if (isRestoringTable(tableName)) { thro... | /**
* Restore the specified snapshot.
* The restore will fail if the destination table has a snapshot or restore in progress.
*
* @param snapshot Snapshot Descriptor
* @param hTableDescriptor Table Descriptor
*/ | Restore the specified snapshot. The restore will fail if the destination table has a snapshot or restore in progress | restoreSnapshot | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java",
"license": "apache-2.0",
"size": 44056
} | [
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos",
"org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils",
"org.apache.hadoop.hbase.snapshot.HBaseSnapshotException",
"org.apache.hadoop.hbase.snapshot.Restore... | import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; import org.apache.hadoop.hbase.snapshot.ClientSnapshotDescriptionUtils; import org.apache.hadoop.hbase.snapshot.HBaseSnapshotException; import org.apache.hadoop.hbase... | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.snapshot.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,415,576 |
ScheduledExecutorService newDefaultScheduledThreadPool(Object source, String name); | ScheduledExecutorService newDefaultScheduledThreadPool(Object source, String name); | /**
* Creates a new scheduled thread pool using the default thread pool profile.
*
* @param source the source object, usually it should be <tt>this</tt> passed in as parameter
* @param name name which is appended to the thread name
* @return the created thread pool
*/ | Creates a new scheduled thread pool using the default thread pool profile | newDefaultScheduledThreadPool | {
"repo_name": "pax95/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java",
"license": "apache-2.0",
"size": 15363
} | [
"java.util.concurrent.ScheduledExecutorService"
] | import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,725,894 |
@NotNull
private Iterable<String> getValuesAsStrings(String name, Type<?> type) {
checkArgument(type.isArray());
Template template = getTemplate();
if (JCR_MIXINTYPES.equals(name)) {
PropertyState mixin = template.getMixinTypes();
if (type == NAMES && mixin != nu... | Iterable<String> function(String name, Type<?> type) { checkArgument(type.isArray()); Template template = getTemplate(); if (JCR_MIXINTYPES.equals(name)) { PropertyState mixin = template.getMixinTypes(); if (type == NAMES && mixin != null) { return mixin.getValue(NAMES); } else if (type == NAMES mixin != null) { return... | /**
* Optimized value access method. Returns the string values of a property
* of a given array type. Returns an empty iterable if the named property
* does not exist, or is of a different type than given.
*
* @param name property name
* @param type property type
* @return string valu... | Optimized value access method. Returns the string values of a property of a given array type. Returns an empty iterable if the named property does not exist, or is of a different type than given | getValuesAsStrings | {
"repo_name": "alexkli/jackrabbit-oak",
"path": "oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/SegmentNodeState.java",
"license": "apache-2.0",
"size": 25527
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.Lists",
"java.util.Collections",
"java.util.List",
"org.apache.jackrabbit.oak.api.PropertyState",
"org.apache.jackrabbit.oak.api.Type"
] | import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Type; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.jackrabbit.oak.api.*; | [
"com.google.common",
"java.util",
"org.apache.jackrabbit"
] | com.google.common; java.util; org.apache.jackrabbit; | 702,330 |
@Override
public FileObject openFileObject( String fileName, String mode ) throws IOException {
return new FileObjectGae( get( fileName ), mode, withBlockSize( BLOCK_SIZE ) );
}
| FileObject function( String fileName, String mode ) throws IOException { return new FileObjectGae( get( fileName ), mode, withBlockSize( BLOCK_SIZE ) ); } | /**
* Open a random access file object.
*
* @param fileName the file name
* @param mode the access mode. Supported are r, rw, rws, rwd
* @return the file object
*/ | Open a random access file object | openFileObject | {
"repo_name": "phanindra1212/gaevfs",
"path": "src/com/newatlanta/appengine/h2/store/fs/FileSystemGae.java",
"license": "apache-2.0",
"size": 11443
} | [
"com.newatlanta.appengine.nio.file.attribute.GaeFileAttributes",
"com.newatlanta.repackaged.java.nio.file.Paths",
"java.io.IOException",
"org.h2.store.fs.FileObject"
] | import com.newatlanta.appengine.nio.file.attribute.GaeFileAttributes; import com.newatlanta.repackaged.java.nio.file.Paths; import java.io.IOException; import org.h2.store.fs.FileObject; | import com.newatlanta.appengine.nio.file.attribute.*; import com.newatlanta.repackaged.java.nio.file.*; import java.io.*; import org.h2.store.fs.*; | [
"com.newatlanta.appengine",
"com.newatlanta.repackaged",
"java.io",
"org.h2.store"
] | com.newatlanta.appengine; com.newatlanta.repackaged; java.io; org.h2.store; | 2,093,901 |
public APIPolicy updateAPIPolicy(APIPolicy policy) throws APIManagementException {
String updateQuery;
int policyId = 0;
String selectQuery;
if (policy != null) {
if (!StringUtils.isBlank(policy.getPolicyName()) && policy.getTenantId() != -1) {
selectQuer... | APIPolicy function(APIPolicy policy) throws APIManagementException { String updateQuery; int policyId = 0; String selectQuery; if (policy != null) { if (!StringUtils.isBlank(policy.getPolicyName()) && policy.getTenantId() != -1) { selectQuery = SQLConstants.ThrottleSQLConstants.GET_API_POLICY_ID_SQL; updateQuery = SQLC... | /**
* Update a API level throttling policy to database.
* <p>
* If condition group already exists for the policy, that condition Group will be deleted and condition Group will
* be inserted to the database with old POLICY_ID.
* </p>
*
* @param policy policy object defining the throttl... | Update a API level throttling policy to database. If condition group already exists for the policy, that condition Group will be deleted and condition Group will be inserted to the database with old POLICY_ID. | updateAPIPolicy | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 821235
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.policy.APIPolicy",
"org.wso2.carbon.apimgt.api.model.po... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.policy.APIPolicy; import org.wso2.... | import java.sql.*; import java.util.*; import org.apache.commons.lang3.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.policy.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"java.util",
"org.apache.commons",
"org.wso2.carbon"
] | java.sql; java.util; org.apache.commons; org.wso2.carbon; | 1,115,872 |
void addVariable(int index, Node variable); | void addVariable(int index, Node variable); | /**
* Adds the given variable at the given index.
*/ | Adds the given variable at the given index | addVariable | {
"repo_name": "ps7z/tetrad",
"path": "tetrad-lib/src/main/java/edu/cmu/tetrad/data/DataSet.java",
"license": "gpl-2.0",
"size": 10498
} | [
"edu.cmu.tetrad.graph.Node"
] | import edu.cmu.tetrad.graph.Node; | import edu.cmu.tetrad.graph.*; | [
"edu.cmu.tetrad"
] | edu.cmu.tetrad; | 540,981 |
protected static Double calculateNumericValueScore(ServiceQuantitativeAttribute source, ServiceQuantitativeAttribute target,
HashMap<String, ServiceAttributeTypeStatistics> statisticsMap) {
if (!AttributeUnitFactorResolver.unitsComparable(source.getUnit(), target.getUnit()))
return null;
Double sourceNorm... | static Double function(ServiceQuantitativeAttribute source, ServiceQuantitativeAttribute target, HashMap<String, ServiceAttributeTypeStatistics> statisticsMap) { if (!AttributeUnitFactorResolver.unitsComparable(source.getUnit(), target.getUnit())) return null; Double sourceNormalizationFactor = AttributeUnitFactorResol... | /**
* Calculates similarity value of two quantitative attributes
*
* @param source
* @param target
* @param statisticsMap
* @return
*/ | Calculates similarity value of two quantitative attributes | calculateNumericValueScore | {
"repo_name": "service-business-framework/Marketplace-RI",
"path": "src/main/java/org/fiware/apps/marketplace/helpers/ServiceManifestationComparator.java",
"license": "bsd-3-clause",
"size": 23743
} | [
"java.util.HashMap",
"org.fiware.apps.marketplace.model.ServiceAttributeTypeStatistics",
"org.fiware.apps.marketplace.model.ServiceQuantitativeAttribute"
] | import java.util.HashMap; import org.fiware.apps.marketplace.model.ServiceAttributeTypeStatistics; import org.fiware.apps.marketplace.model.ServiceQuantitativeAttribute; | import java.util.*; import org.fiware.apps.marketplace.model.*; | [
"java.util",
"org.fiware.apps"
] | java.util; org.fiware.apps; | 1,922,902 |
public static PathResult moveLivingToXYZ(@NotNull final EntityCitizen citizen, @NotNull final BlockPos destination)
{
return citizen.getNavigator().moveToXYZ(destination.getX(), destination.getY(), destination.getZ(), 1.0);
} | static PathResult function(@NotNull final EntityCitizen citizen, @NotNull final BlockPos destination) { return citizen.getNavigator().moveToXYZ(destination.getX(), destination.getY(), destination.getZ(), 1.0); } | /**
* Attempt to move to XYZ.
* True when found and destination is set.
*
* @param citizen Citizen to move to XYZ.
* @param destination Chunk coordinate of the distance.
* @return True when found, and destination is set, otherwise false.
*/ | Attempt to move to XYZ. True when found and destination is set | moveLivingToXYZ | {
"repo_name": "xavierh/minecolonies",
"path": "src/main/java/com/minecolonies/coremod/util/BlockPosUtil.java",
"license": "gpl-3.0",
"size": 14311
} | [
"com.minecolonies.coremod.entity.EntityCitizen",
"com.minecolonies.coremod.entity.pathfinding.PathResult",
"net.minecraft.util.math.BlockPos",
"org.jetbrains.annotations.NotNull"
] | import com.minecolonies.coremod.entity.EntityCitizen; import com.minecolonies.coremod.entity.pathfinding.PathResult; import net.minecraft.util.math.BlockPos; import org.jetbrains.annotations.NotNull; | import com.minecolonies.coremod.entity.*; import com.minecolonies.coremod.entity.pathfinding.*; import net.minecraft.util.math.*; import org.jetbrains.annotations.*; | [
"com.minecolonies.coremod",
"net.minecraft.util",
"org.jetbrains.annotations"
] | com.minecolonies.coremod; net.minecraft.util; org.jetbrains.annotations; | 988,091 |
void setDataFormatResolver(DataFormatResolver dataFormatResolver); | void setDataFormatResolver(DataFormatResolver dataFormatResolver); | /**
* Sets a custom data format resolver
*
* @param dataFormatResolver the resolver
*/ | Sets a custom data format resolver | setDataFormatResolver | {
"repo_name": "christophd/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java",
"license": "apache-2.0",
"size": 29137
} | [
"org.apache.camel.spi.DataFormatResolver"
] | import org.apache.camel.spi.DataFormatResolver; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,479,375 |
public boolean revokeAllResourcePermissions(String subjectid) {
if (!StringUtils.isBlank(subjectid) && getResourcePermissions().containsKey(subjectid)) {
getResourcePermissions().remove(subjectid);
return true;
}
return false;
} | boolean function(String subjectid) { if (!StringUtils.isBlank(subjectid) && getResourcePermissions().containsKey(subjectid)) { getResourcePermissions().remove(subjectid); return true; } return false; } | /**
* Revokes all permissions for a subject id.
* @param subjectid subject id
* @return true if successful
*/ | Revokes all permissions for a subject id | revokeAllResourcePermissions | {
"repo_name": "Erudika/para",
"path": "para-core/src/main/java/com/erudika/para/core/App.java",
"license": "apache-2.0",
"size": 42818
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 234,849 |
public AbstractExpression replaceWithTVE(
Map <AbstractExpression, Integer> aggTableIndexMap,
Map <Integer, ParsedColInfo> indexToColumnMap)
{
Integer ii = aggTableIndexMap.get(this);
if (ii != null) {
ParsedColInfo col = indexToColumnMap.get(ii);
... | AbstractExpression function( Map <AbstractExpression, Integer> aggTableIndexMap, Map <Integer, ParsedColInfo> indexToColumnMap) { Integer ii = aggTableIndexMap.get(this); if (ii != null) { ParsedColInfo col = indexToColumnMap.get(ii); TupleValueExpression tve = new TupleValueExpression( col.tableName, col.tableAlias, c... | /**
* This function recursively replace any Expression that in the aggTableIndexMap to a TVEs. Its column index and alias are also built up here.
* @param aggTableIndexMap
* @param indexToColumnMap
* @return
*/ | This function recursively replace any Expression that in the aggTableIndexMap to a TVEs. Its column index and alias are also built up here | replaceWithTVE | {
"repo_name": "wolffcm/voltdb",
"path": "src/frontend/org/voltdb/expressions/AbstractExpression.java",
"license": "agpl-3.0",
"size": 37638
} | [
"java.util.ArrayList",
"java.util.Map",
"org.voltdb.planner.ParsedColInfo"
] | import java.util.ArrayList; import java.util.Map; import org.voltdb.planner.ParsedColInfo; | import java.util.*; import org.voltdb.planner.*; | [
"java.util",
"org.voltdb.planner"
] | java.util; org.voltdb.planner; | 398,199 |
Location getBaseLocation() throws IOException; | Location getBaseLocation() throws IOException; | /**
* Returns the base {@link Location} for all CDAP data.
*/ | Returns the base <code>Location</code> for all CDAP data | getBaseLocation | {
"repo_name": "caskdata/cdap",
"path": "cdap-common/src/main/java/co/cask/cdap/common/namespace/NamespacedLocationFactory.java",
"license": "apache-2.0",
"size": 2155
} | [
"java.io.IOException",
"org.apache.twill.filesystem.Location"
] | import java.io.IOException; import org.apache.twill.filesystem.Location; | import java.io.*; import org.apache.twill.filesystem.*; | [
"java.io",
"org.apache.twill"
] | java.io; org.apache.twill; | 1,557,729 |
Set<DeviceId> getNetconfDevices(); | Set<DeviceId> getNetconfDevices(); | /**
* Gets all Netconf Devices.
*
* @return List of all the NetconfDevices Ids
*/ | Gets all Netconf Devices | getNetconfDevices | {
"repo_name": "opennetworkinglab/onos",
"path": "protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfController.java",
"license": "apache-2.0",
"size": 5290
} | [
"java.util.Set",
"org.onosproject.net.DeviceId"
] | import java.util.Set; import org.onosproject.net.DeviceId; | import java.util.*; import org.onosproject.net.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 1,109,689 |
public JMenu getHelpMenu()
{
JMenu menu = createHelpMenu();
Component[] comps = menus[HELP_MENU].getPopupMenu().getComponents();
for (int i = 0; i < comps.length; i++) {
if (comps[i] instanceof JMenu)
menu.add(copyItemsFromMenu((JMenu) comps[i]));
... | JMenu function() { JMenu menu = createHelpMenu(); Component[] comps = menus[HELP_MENU].getPopupMenu().getComponents(); for (int i = 0; i < comps.length; i++) { if (comps[i] instanceof JMenu) menu.add(copyItemsFromMenu((JMenu) comps[i])); else if (comps[i] instanceof JMenuItem) menu.add(copyItem((JMenuItem) comps[i])); ... | /**
* Implemented as specified by {@link TaskBar}.
* @see TaskBar#getHelpMenu()
*/ | Implemented as specified by <code>TaskBar</code> | getHelpMenu | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/TaskBarView.java",
"license": "gpl-2.0",
"size": 20703
} | [
"java.awt.Component",
"javax.swing.JMenu",
"javax.swing.JMenuItem"
] | import java.awt.Component; import javax.swing.JMenu; import javax.swing.JMenuItem; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,883,071 |
@Test
public void testReverseXmlWrongLayoutVersion() throws Throwable {
File imageWrongVersion = new File(tempDir, "imageWrongVersion.xml");
PrintWriter writer = new PrintWriter(imageWrongVersion, "UTF-8");
try {
writer.println("<?xml version=\"1.0\"?>");
writer.println("<fsimage>");
w... | void function() throws Throwable { File imageWrongVersion = new File(tempDir, STR); PrintWriter writer = new PrintWriter(imageWrongVersion, "UTF-8"); try { writer.println(STR1.0\"?>"); writer.println(STR); writer.println(STR); writer.println(String.format(STR, NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION + 1)); writer.... | /**
* Tests that the ReverseXML processor doesn't accept XML files with the wrong
* layoutVersion.
*/ | Tests that the ReverseXML processor doesn't accept XML files with the wrong layoutVersion | testReverseXmlWrongLayoutVersion | {
"repo_name": "ChetnaChaudhari/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/TestOfflineImageViewer.java",
"license": "apache-2.0",
"size": 37083
} | [
"java.io.File",
"java.io.PrintWriter",
"org.apache.hadoop.hdfs.server.namenode.NameNodeLayoutVersion",
"org.apache.hadoop.test.GenericTestUtils",
"org.junit.Assert"
] | import java.io.File; import java.io.PrintWriter; import org.apache.hadoop.hdfs.server.namenode.NameNodeLayoutVersion; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.test.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 85,865 |
public AbstractMatcher instantiateMatcher(SimpleBatchModeType batchMode) {
Logger log = Logger.getLogger(this.getClass());
log.setLevel(Level.INFO);
// create the matching algorithm
AbstractMatcher matcher = new OAEI2011Matcher();
// create the matching algorithm parameters
OAEI2011Mat... | AbstractMatcher function(SimpleBatchModeType batchMode) { Logger log = Logger.getLogger(this.getClass()); log.setLevel(Level.INFO); AbstractMatcher matcher = new OAEI2011Matcher(); OAEI2011MatcherParameters params = new OAEI2011MatcherParameters(); params.maxSourceAlign = 1; params.maxTargetAlign = 1; params.threshold ... | /**
* Instantiate a matching algorithm.
*
* TODO: Make the algorithm instantiate the matcher that the user specifies in the XML file.
*
* @param batchMode
* @return
*/ | Instantiate a matching algorithm | instantiateMatcher | {
"repo_name": "sabarish14/agreementmaker",
"path": "AgreementMaker-OSGi/AgreementMaker-BatchMode/src/main/java/am/extension/batchmode/simpleBatchMode/SimpleBatchModeRunner.java",
"license": "agpl-3.0",
"size": 9671
} | [
"am.app.mappingEngine.AbstractMatcher",
"am.matcher.oaei.oaei2011.OAEI2011Matcher",
"am.matcher.oaei.oaei2011.OAEI2011MatcherParameters",
"am.output.console.ConsoleProgressDisplay",
"org.apache.log4j.Level",
"org.apache.log4j.Logger"
] | import am.app.mappingEngine.AbstractMatcher; import am.matcher.oaei.oaei2011.OAEI2011Matcher; import am.matcher.oaei.oaei2011.OAEI2011MatcherParameters; import am.output.console.ConsoleProgressDisplay; import org.apache.log4j.Level; import org.apache.log4j.Logger; | import am.app.*; import am.matcher.oaei.oaei2011.*; import am.output.console.*; import org.apache.log4j.*; | [
"am.app",
"am.matcher.oaei",
"am.output.console",
"org.apache.log4j"
] | am.app; am.matcher.oaei; am.output.console; org.apache.log4j; | 2,845,059 |
private VersionHistory findPendingVersion(SubAward subaward) {
List<VersionHistory> histories = getVersionHistoryService().loadVersionHistory(SubAward.class, subaward.getSubAwardCode());
VersionHistory foundPending = null;
for (VersionHistory history: histories) {
if (history.get... | VersionHistory function(SubAward subaward) { List<VersionHistory> histories = getVersionHistoryService().loadVersionHistory(SubAward.class, subaward.getSubAwardCode()); VersionHistory foundPending = null; for (VersionHistory history: histories) { if (history.getStatus() == VersionStatus.PENDING && subaward.getSequenceN... | /**
* This method find pending subaward versions.
* @param subaward
* @return VersionHistory
*/ | This method find pending subaward versions | findPendingVersion | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/subaward/web/struts/action/SubAwardHomeAction.java",
"license": "apache-2.0",
"size": 20533
} | [
"java.util.List",
"org.kuali.coeus.common.framework.version.VersionStatus",
"org.kuali.coeus.common.framework.version.history.VersionHistory",
"org.kuali.kra.subaward.bo.SubAward"
] | import java.util.List; import org.kuali.coeus.common.framework.version.VersionStatus; import org.kuali.coeus.common.framework.version.history.VersionHistory; import org.kuali.kra.subaward.bo.SubAward; | import java.util.*; import org.kuali.coeus.common.framework.version.*; import org.kuali.coeus.common.framework.version.history.*; import org.kuali.kra.subaward.bo.*; | [
"java.util",
"org.kuali.coeus",
"org.kuali.kra"
] | java.util; org.kuali.coeus; org.kuali.kra; | 1,252,930 |
public BaseWindowedBolt withLag(Duration duration) {
windowConfiguration.put(Config.TOPOLOGY_BOLTS_TUPLE_TIMESTAMP_MAX_LAG_MS, duration.value);
return this;
} | BaseWindowedBolt function(Duration duration) { windowConfiguration.put(Config.TOPOLOGY_BOLTS_TUPLE_TIMESTAMP_MAX_LAG_MS, duration.value); return this; } | /**
* Specify the maximum time lag of the tuple timestamp in milliseconds. It means that the tuple timestamps
* cannot be out of order by more than this amount.
*
* @param duration the max lag duration
*/ | Specify the maximum time lag of the tuple timestamp in milliseconds. It means that the tuple timestamps cannot be out of order by more than this amount | withLag | {
"repo_name": "roshannaik/storm",
"path": "storm-client/src/jvm/org/apache/storm/topology/base/BaseWindowedBolt.java",
"license": "apache-2.0",
"size": 12389
} | [
"org.apache.storm.Config"
] | import org.apache.storm.Config; | import org.apache.storm.*; | [
"org.apache.storm"
] | org.apache.storm; | 1,360,124 |
public Enumeration<java.net.URL> findResources(String name) throws IOException {
if (log.isDebugEnabled())
log.debug(" findResources(" + name + ")");
Vector<java.net.URL> result = new Vector<java.net.URL>();
int jarFilesLength = jarFiles.length;
int reposito... | Enumeration<java.net.URL> function(String name) throws IOException { if (log.isDebugEnabled()) log.debug(STR + name + ")"); Vector<java.net.URL> result = new Vector<java.net.URL>(); int jarFilesLength = jarFiles.length; int repositoriesLength = repositories.length; int i; for (i = 0; i < repositoriesLength; i++) { try ... | /**
* Return an enumeration of <code>URLs</code> representing all of the
* resources with the given name. If no resources with this name are
* found, return an empty enumeration.
*
* @param name Name of the resources to be found
*
* @exception IOException if an input/output er... | Return an enumeration of <code>URLs</code> representing all of the resources with the given name. If no resources with this name are found, return an empty enumeration | findResources | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/catalina-virtual/source/java/org/alfresco/catalina/loader/AVMWebappClassLoader.java",
"license": "lgpl-3.0",
"size": 79175
} | [
"java.io.File",
"java.io.IOException",
"java.net.MalformedURLException",
"java.util.Enumeration",
"java.util.Vector",
"java.util.jar.JarEntry",
"javax.naming.NamingException"
] | import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.util.Enumeration; import java.util.Vector; import java.util.jar.JarEntry; import javax.naming.NamingException; | import java.io.*; import java.net.*; import java.util.*; import java.util.jar.*; import javax.naming.*; | [
"java.io",
"java.net",
"java.util",
"javax.naming"
] | java.io; java.net; java.util; javax.naming; | 1,169,948 |
public static Runnable autoSetLinks(final BibEntry entry, final FileListTableModel singleTableModel,
final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) {
return autoSetLinks(Collections.singletonList(entry), null, null, singleTableModel, databaseContext,... | static Runnable function(final BibEntry entry, final FileListTableModel singleTableModel, final BibDatabaseContext databaseContext, final ActionListener callback, final JDialog diag) { return autoSetLinks(Collections.singletonList(entry), null, null, singleTableModel, databaseContext, callback, diag); } | /**
* Automatically add links for this entry to the table model given as an argument, based on the globally stored list
* of external file types. The entry itself is not modified. The entry's bibtex key must have been set.
*
* @param entry The BibEntry to find links for.
* @param sin... | Automatically add links for this entry to the table model given as an argument, based on the globally stored list of external file types. The entry itself is not modified. The entry's bibtex key must have been set | autoSetLinks | {
"repo_name": "motokito/jabref",
"path": "src/main/java/net/sf/jabref/external/AutoSetLinks.java",
"license": "mit",
"size": 11961
} | [
"java.awt.event.ActionListener",
"java.util.Collections",
"javax.swing.JDialog",
"net.sf.jabref.BibDatabaseContext",
"net.sf.jabref.gui.FileListTableModel",
"net.sf.jabref.model.entry.BibEntry"
] | import java.awt.event.ActionListener; import java.util.Collections; import javax.swing.JDialog; import net.sf.jabref.BibDatabaseContext; import net.sf.jabref.gui.FileListTableModel; import net.sf.jabref.model.entry.BibEntry; | import java.awt.event.*; import java.util.*; import javax.swing.*; import net.sf.jabref.*; import net.sf.jabref.gui.*; import net.sf.jabref.model.entry.*; | [
"java.awt",
"java.util",
"javax.swing",
"net.sf.jabref"
] | java.awt; java.util; javax.swing; net.sf.jabref; | 2,519,876 |
@Override
public boolean mkdirs(Path f) throws IOException {
return mkdirsWithOptionalPermission(f, null);
} | boolean function(Path f) throws IOException { return mkdirsWithOptionalPermission(f, null); } | /**
* Creates the specified directory hierarchy. Does not
* treat existence as an error.
*/ | Creates the specified directory hierarchy. Does not treat existence as an error | mkdirs | {
"repo_name": "leechoongyon/HadoopSourceAnalyze",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java",
"license": "apache-2.0",
"size": 29986
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,802,114 |
@Test
public void testExecutor_Sync_Route1_TestByTestCaseName_Happy() throws JniExecutorException {
Log.fi();
final JniExecutorSync je = JniExecutorSync.getInstance();
je.init();
final HostController hc1 = new HostController(null, TestConstants.WORKINGDIR, TestConstants.EXECUTABLE);
je.addHostController(h... | void function() throws JniExecutorException { Log.fi(); final JniExecutorSync je = JniExecutorSync.getInstance(); je.init(); final HostController hc1 = new HostController(null, TestConstants.WORKINGDIR, TestConstants.EXECUTABLE); je.addHostController(hc1); je.setConfigFileName(TestConstants.CFG_FILE); TestUtil.assertSt... | /**
* sync
* route 1
* testcase by name
* happy day
* @throws JniExecutorException
*/ | sync route 1 testcase by name happy day | testExecutor_Sync_Route1_TestByTestCaseName_Happy | {
"repo_name": "BotondBaranyi/titan.core",
"path": "titan_executor_api/TITAN_Executor_API_test/src/org/eclipse/titan/executorapi/test/JniExecutorSyncTest.java",
"license": "epl-1.0",
"size": 6535
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.titan.executor.jni.McStateEnum",
"org.eclipse.titan.executorapi.HostController",
"org.eclipse.titan.executorapi.exception.JniExecutorException",
"org.eclipse.titan.executorapi.util.Log"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.titan.executor.jni.McStateEnum; import org.eclipse.titan.executorapi.HostController; import org.eclipse.titan.executorapi.exception.JniExecutorException; import org.eclipse.titan.executorapi.util.Log; | import java.util.*; import org.eclipse.titan.executor.jni.*; import org.eclipse.titan.executorapi.*; import org.eclipse.titan.executorapi.exception.*; import org.eclipse.titan.executorapi.util.*; | [
"java.util",
"org.eclipse.titan"
] | java.util; org.eclipse.titan; | 1,754,583 |
public void shutdown() throws ReplicationException {
try {
// stop all replica threads
for (Map.Entry<String, List<ReplicaThread>> replicaThreads : replicaThreadPools.entrySet()) {
for (ReplicaThread replicaThread : replicaThreads.getValue()) {
replicaThread.shutdown();
}
... | void function() throws ReplicationException { try { for (Map.Entry<String, List<ReplicaThread>> replicaThreads : replicaThreadPools.entrySet()) { for (ReplicaThread replicaThread : replicaThreads.getValue()) { replicaThread.shutdown(); } } if (persistor != null) { persistor.write(true); } } catch (Exception e) { logger... | /**
* Shutsdown the replication manager. Shutsdown the individual replica threads and
* then persists all the replica tokens
* @throws ReplicationException
*/ | Shutsdown the replication manager. Shutsdown the individual replica threads and then persists all the replica tokens | shutdown | {
"repo_name": "pnarayanan/ambry",
"path": "ambry-replication/src/main/java/com.github.ambry.replication/ReplicationEngine.java",
"license": "apache-2.0",
"size": 24411
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 898,863 |
public static List<Index> getIndices(
final Connector connector,
final String namespace ) {
final List<Index> indices = new ArrayList<Index>();
final IndexStore indexStore = new AccumuloIndexStore(
new BasicAccumuloOperations(
connector,
namespace));
final Iterator<Index> itr = indexSto... | static List<Index> function( final Connector connector, final String namespace ) { final List<Index> indices = new ArrayList<Index>(); final IndexStore indexStore = new AccumuloIndexStore( new BasicAccumuloOperations( connector, namespace)); final Iterator<Index> itr = indexStore.getIndices(); while (itr.hasNext()) { i... | /**
* Get list of indices associated with the given namespace
*
* @param connector
* @param namespace
*/ | Get list of indices associated with the given namespace | getIndices | {
"repo_name": "ruks/geowave",
"path": "extensions/datastores/accumulo/src/main/java/mil/nga/giat/geowave/datastore/accumulo/util/AccumuloUtils.java",
"license": "apache-2.0",
"size": 37115
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"mil.nga.giat.geowave.core.store.index.Index",
"mil.nga.giat.geowave.core.store.index.IndexStore",
"mil.nga.giat.geowave.datastore.accumulo.BasicAccumuloOperations",
"mil.nga.giat.geowave.datastore.accumulo.metadata.AccumuloIndexStore",
"o... | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import mil.nga.giat.geowave.core.store.index.Index; import mil.nga.giat.geowave.core.store.index.IndexStore; import mil.nga.giat.geowave.datastore.accumulo.BasicAccumuloOperations; import mil.nga.giat.geowave.datastore.accumulo.metadata.Accum... | import java.util.*; import mil.nga.giat.geowave.core.store.index.*; import mil.nga.giat.geowave.datastore.accumulo.*; import mil.nga.giat.geowave.datastore.accumulo.metadata.*; import org.apache.accumulo.core.client.*; | [
"java.util",
"mil.nga.giat",
"org.apache.accumulo"
] | java.util; mil.nga.giat; org.apache.accumulo; | 203,257 |
public static SwitchCommandLineOption of(Option option) {
return new SwitchCommandLineOption(option);
} | static SwitchCommandLineOption function(Option option) { return new SwitchCommandLineOption(option); } | /**
* Creates a new {@link SwitchCommandLineOption} from the given option.
*
* @param option
* the option
* @return a new {@link SwitchCommandLineOption} from the given option
*/ | Creates a new <code>SwitchCommandLineOption</code> from the given option | of | {
"repo_name": "f-cramer/checkspec",
"path": "checkspec.cli/src/main/java/checkspec/cli/option/SwitchCommandLineOption.java",
"license": "apache-2.0",
"size": 2329
} | [
"org.apache.commons.cli.Option"
] | import org.apache.commons.cli.Option; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,963,715 |
public void doGoto_unjoincancel(RunData data)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
state.removeAttribute(STATE_CONFIRM_VIEW_MODE);
} | void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.removeAttribute(STATE_CONFIRM_VIEW_MODE); } | /**
* cancel unjoin of site
*
* @param data
*/ | cancel unjoin of site | doGoto_unjoincancel | {
"repo_name": "whumph/sakai",
"path": "site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/MembershipAction.java",
"license": "apache-2.0",
"size": 19183
} | [
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 2,777,540 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> manualFailoverAsync(
String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) {
return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput, context)
.last()
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String iotHubName, String resourceGroupName, FailoverInput failoverInput, Context context) { return beginManualFailoverAsync(iotHubName, resourceGroupName, failoverInput, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see
* https://aka.ms/manualfailover.
*
* @param iotHubName Name of the IoT hub to failover.
* @param resourceGroupName Name of the resource group containing the IoT hub resource.
* @param failoverInp... | Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see HREF | manualFailoverAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/implementation/IotHubsClientImpl.java",
"license": "mit",
"size": 19154
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.iothub.models.FailoverInput"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.models.FailoverInput; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.iothub.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,362,553 |
public boolean isExcluded(String fileName) {
return isExcluded(new File(fileName));
} | boolean function(String fileName) { return isExcluded(new File(fileName)); } | /**
* Returns true if the specified file is in the exclusion list.
*
* @param fileName Name of file to check.
* @return True if the file is to be excluded.
*/ | Returns true if the specified file is in the exclusion list | isExcluded | {
"repo_name": "carewebframework/carewebframework-core",
"path": "org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.core/src/main/java/org/carewebframework/maven/plugin/core/BaseMojo.java",
"license": "apache-2.0",
"size": 11144
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,437,186 |
public List<SeriesObservation> getSeriesObservationsFor(GetObservationRequest request,
Collection<String> features, Criterion filterCriterion, Session session) throws OwsExceptionReport {
return getSeriesObservationsFor(request, features, filterCriterion, null, session);
} | List<SeriesObservation> function(GetObservationRequest request, Collection<String> features, Criterion filterCriterion, Session session) throws OwsExceptionReport { return getSeriesObservationsFor(request, features, filterCriterion, null, session); } | /**
* Query series observations for GetObservation request, features, and a
* filter criterion (typically a temporal filter)
*
* @param request
* GetObservation request
* @param features
* Collection of feature identifiers resolved from the request
* @param... | Query series observations for GetObservation request, features, and a filter criterion (typically a temporal filter) | getSeriesObservationsFor | {
"repo_name": "impulze/newSOS",
"path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/series/SeriesObservationDAO.java",
"license": "gpl-2.0",
"size": 20459
} | [
"java.util.Collection",
"java.util.List",
"org.hibernate.Session",
"org.hibernate.criterion.Criterion",
"org.n52.sos.ds.hibernate.entities.series.SeriesObservation",
"org.n52.sos.ogc.ows.OwsExceptionReport",
"org.n52.sos.request.GetObservationRequest"
] | import java.util.Collection; import java.util.List; import org.hibernate.Session; import org.hibernate.criterion.Criterion; import org.n52.sos.ds.hibernate.entities.series.SeriesObservation; import org.n52.sos.ogc.ows.OwsExceptionReport; import org.n52.sos.request.GetObservationRequest; | import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*; import org.n52.sos.ds.hibernate.entities.series.*; import org.n52.sos.ogc.ows.*; import org.n52.sos.request.*; | [
"java.util",
"org.hibernate",
"org.hibernate.criterion",
"org.n52.sos"
] | java.util; org.hibernate; org.hibernate.criterion; org.n52.sos; | 91,088 |
public static SortSpec create(String property, SortMode mode) {
return new SortSpec(Arrays.asList(new SortEntry(property, mode)));
}
public SortSpec() {
this(Collections.<SortEntry>emptyList());
}
private SortSpec(List<SortEntry> entries) {
if (entries == null... | static SortSpec function(String property, SortMode mode) { return new SortSpec(Arrays.asList(new SortEntry(property, mode))); } public SortSpec() { this(Collections.<SortEntry>emptyList()); } private SortSpec(List<SortEntry> entries) { if (entries == null) { throw new IllegalArgumentException(STR); } this.entries = new... | /**
* Factory method for quick sort clause creation.
*
* @param property String sort property name
* @param mode SortMode to use for specified property
* @return SortClause for specified property
*/ | Factory method for quick sort clause creation | create | {
"repo_name": "apechinsky/srplib",
"path": "srp-criteria/src/main/java/org/srplib/criteria/SortSpec.java",
"license": "apache-2.0",
"size": 2454
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,550,734 |
public BoundAction getBoundAction(Object id) {
Action a = getAction(id);
if (a instanceof BoundAction) {
return (BoundAction)a;
}
return null;
} | BoundAction function(Object id) { Action a = getAction(id); if (a instanceof BoundAction) { return (BoundAction)a; } return null; } | /**
* Convenience method for returning the BoundAction
*
* @param id value of the action id
* @return the TargetableAction referenced by the named id or null
*/ | Convenience method for returning the BoundAction | getBoundAction | {
"repo_name": "charlycoste/TreeD",
"path": "src/org/jdesktop/swingx/action/ActionManager.java",
"license": "gpl-2.0",
"size": 13384
} | [
"javax.swing.Action"
] | import javax.swing.Action; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 968,076 |
public FOCALGRADIENT readFOCALGRADIENT(int shapeNum, String name) throws IOException {
FOCALGRADIENT ret = new FOCALGRADIENT();
newDumpLevel(name, "FOCALGRADIENT");
ret.spreadMode = (int) readUB(2, "spreadMode");
ret.interpolationMode = (int) readUB(2, "interpolationMode");
i... | FOCALGRADIENT function(int shapeNum, String name) throws IOException { FOCALGRADIENT ret = new FOCALGRADIENT(); newDumpLevel(name, STR); ret.spreadMode = (int) readUB(2, STR); ret.interpolationMode = (int) readUB(2, STR); int numGradients = (int) readUB(4, STR); ret.gradientRecords = new GRADRECORD[numGradients]; for (... | /**
* Reads one FOCALGRADIENT value from the stream
*
* @param shapeNum 1 in DefineShape, 2 in DefineShape2...
* @param name
* @return FOCALGRADIENT value
* @throws IOException
*/ | Reads one FOCALGRADIENT value from the stream | readFOCALGRADIENT | {
"repo_name": "jindrapetrik/jpexs-decompiler",
"path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java",
"license": "gpl-3.0",
"size": 130581
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,056,995 |
Command c = null;
try{
c = Command.getCommandInit("createModelBasisData", initTime);
c.addParameter("ModelName", "Arztpraxis");
c.addParameter("ModelAuthor", "Chr.Mueller");
c.addParameter("ModelRemark", "Vers 0");
c.addParameter("ModelRemark", "15.7.2009");
c.setRemark("in init");
this.che... | Command c = null; try{ c = Command.getCommandInit(STR, initTime); c.addParameter(STR, STR); c.addParameter(STR, STR); c.addParameter(STR, STR); c.addParameter(STR, STR); c.setRemark(STR); this.checkAndLog(c); this.getCommandSequence().write(c); c = Command.getCommandInit(STR, initTime); c.addParameter("Begin", "0"); c.... | /**
* Erzeugen der Cmd's fuer die Init-Phase
*/ | Erzeugen der Cmd's fuer die Init-Phase | bsp_init | {
"repo_name": "muhd7rosli/desmoj",
"path": "src/desmoj/extensions/visualization2d/engine/WriteBspArztPraxis0.java",
"license": "apache-2.0",
"size": 9319
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,376,619 |
Queue<String> argQueue = new LinkedList<String>(Arrays.asList(args));
if (argQueue.isEmpty()) {
printUsage("source is required");
return;
}
String source = argQueue.remove();
if (argQueue.isEmpty()) {
printUsage("destination is required");
... | Queue<String> argQueue = new LinkedList<String>(Arrays.asList(args)); if (argQueue.isEmpty()) { printUsage(STR); return; } String source = argQueue.remove(); if (argQueue.isEmpty()) { printUsage(STR); return; } String dest = argQueue.remove(); while (argQueue.size() > 1) { { printUsage(STR + argQueue.peek() + "'"); ret... | /**
* main entry point.
* @param args the command line arguments.
* @throws Exception
*/ | main entry point | main | {
"repo_name": "asn007/nSquashFS",
"path": "src/main/java/com/fernsroth/squashfs/Squashfs.java",
"license": "apache-2.0",
"size": 2110
} | [
"com.fernsroth.easyio.EasyIORandomAccessFile",
"com.fernsroth.squashfs.model.Manifest",
"java.io.File",
"java.io.FileInputStream",
"java.util.Arrays",
"java.util.LinkedList",
"java.util.Queue"
] | import com.fernsroth.easyio.EasyIORandomAccessFile; import com.fernsroth.squashfs.model.Manifest; import java.io.File; import java.io.FileInputStream; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; | import com.fernsroth.easyio.*; import com.fernsroth.squashfs.model.*; import java.io.*; import java.util.*; | [
"com.fernsroth.easyio",
"com.fernsroth.squashfs",
"java.io",
"java.util"
] | com.fernsroth.easyio; com.fernsroth.squashfs; java.io; java.util; | 260,086 |
public static Object renderOverlays(Registry context, long pixelsID,
PlaneDef pd, long tableID, Map<Long, Integer> overlays)
throws RenderingServiceException, DSOutOfServiceException
{
if (!(context.equals(registry)))
throw new IllegalArgumentException("Not allow to access method.");
RenderingControlPr... | static Object function(Registry context, long pixelsID, PlaneDef pd, long tableID, Map<Long, Integer> overlays) throws RenderingServiceException, DSOutOfServiceException { if (!(context.equals(registry))) throw new IllegalArgumentException(STR); RenderingControlProxy proxy = (RenderingControlProxy) singleton.rndSvcProx... | /**
* Renders the specified {@link PlaneDef 2D-plane}.
*
* @param context Reference to the registry. To ensure that agents cannot
* call the method. It must be a reference to the
* container's registry.
* @param pixelsID The id of the pixels set.
* @param pd The ... | Renders the specified <code>PlaneDef 2D-plane</code> | renderOverlays | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/rnd/PixelsServicesFactory.java",
"license": "gpl-2.0",
"size": 25213
} | [
"java.util.Map",
"org.openmicroscopy.shoola.env.config.Registry"
] | import java.util.Map; import org.openmicroscopy.shoola.env.config.Registry; | import java.util.*; import org.openmicroscopy.shoola.env.config.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 1,782,843 |
@Override
public Adapter createTemplateEndpointAdapter() {
if (templateEndpointItemProvider == null) {
templateEndpointItemProvider = new TemplateEndpointItemProvider(this);
}
return templateEndpointItemProvider;
}
protected TemplateEndpointInputConnectorItemPr... | Adapter function() { if (templateEndpointItemProvider == null) { templateEndpointItemProvider = new TemplateEndpointItemProvider(this); } return templateEndpointItemProvider; } protected TemplateEndpointInputConnectorItemProvider templateEndpointInputConnectorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.TemplateEndpoint}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.TemplateEndpoint</code>. | createTemplateEndpointAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,300,299 |
public Point toProjectedPixels(final int latituteE6, final int longitudeE6, final Point reuse) {
return TileSystem.LatLongToPixelXY(latituteE6 * 1E-6, longitudeE6 * 1E-6,
microsoft.mappoint.TileSystem.getMaximumZoomLevel(), reuse);
}
/**
* Performs the second computationally light part of the projection.
... | Point function(final int latituteE6, final int longitudeE6, final Point reuse) { return TileSystem.LatLongToPixelXY(latituteE6 * 1E-6, longitudeE6 * 1E-6, microsoft.mappoint.TileSystem.getMaximumZoomLevel(), reuse); } /** * Performs the second computationally light part of the projection. * * @param in * the Point calc... | /**
* Performs only the first computationally heavy part of the projection. Call
* {@link #toPixelsFromProjected(Point, Point)} to get the final position.
*
* @param latituteE6
* the latitute of the point
* @param longitudeE6
* the longitude of the point
* @param reuse
* ... | Performs only the first computationally heavy part of the projection. Call <code>#toPixelsFromProjected(Point, Point)</code> to get the final position | toProjectedPixels | {
"repo_name": "prembasumatary/osmdroid",
"path": "osmdroid-android/src/main/java/org/osmdroid/views/Projection.java",
"license": "apache-2.0",
"size": 8641
} | [
"android.graphics.Point",
"org.osmdroid.util.TileSystem"
] | import android.graphics.Point; import org.osmdroid.util.TileSystem; | import android.graphics.*; import org.osmdroid.util.*; | [
"android.graphics",
"org.osmdroid.util"
] | android.graphics; org.osmdroid.util; | 2,452,353 |
@Nullable
public static String getMatch(@Nullable final String data, final Pattern pattern, final boolean trim, @Nullable final String defaultValue) {
return getMatch(data, pattern, trim, 1, defaultValue, false);
} | static String function(@Nullable final String data, final Pattern pattern, final boolean trim, @Nullable final String defaultValue) { return getMatch(data, pattern, trim, 1, defaultValue, false); } | /**
* Searches for the pattern pattern in the data. If the pattern is not found defaultValue is returned
*
* @param data
* Data to search in
* @param pattern
* Pattern to search for
* @param trim
* Set to true if the group found should be trim'ed
... | Searches for the pattern pattern in the data. If the pattern is not found defaultValue is returned | getMatch | {
"repo_name": "rsudev/c-geo-opensource",
"path": "main/src/cgeo/geocaching/utils/TextUtils.java",
"license": "apache-2.0",
"size": 22213
} | [
"androidx.annotation.Nullable",
"java.util.regex.Pattern"
] | import androidx.annotation.Nullable; import java.util.regex.Pattern; | import androidx.annotation.*; import java.util.regex.*; | [
"androidx.annotation",
"java.util"
] | androidx.annotation; java.util; | 1,311,559 |
public void testPKChunkingParentObject(boolean specifyParent) throws Throwable {
Schema caseHistorySchema = SchemaBuilder.builder().record("Schema").fields() //
.name("Id").type().stringType().noDefault() //
.name("CaseId").type().stringType().noDefault() //
.... | void function(boolean specifyParent) throws Throwable { Schema caseHistorySchema = SchemaBuilder.builder().record(STR).fields() .name(STR).type().stringType().noDefault() .endRecord(); TSalesforceInputProperties props = createTSalesforceInputProperties(true, true); props.manualQuery.setValue(true); props.query.setValue... | /**
* Test aggregate query field not case sensitive
*/ | Test aggregate query field not case sensitive | testPKChunkingParentObject | {
"repo_name": "Talend/components",
"path": "components/components-salesforce/components-salesforce-integration/src/test/java/org/talend/components/salesforce/runtime/SalesforceInputReaderTestIT.java",
"license": "apache-2.0",
"size": 40645
} | [
"org.apache.avro.Schema",
"org.apache.avro.SchemaBuilder",
"org.talend.components.salesforce.tsalesforceinput.TSalesforceInputProperties"
] | import org.apache.avro.Schema; import org.apache.avro.SchemaBuilder; import org.talend.components.salesforce.tsalesforceinput.TSalesforceInputProperties; | import org.apache.avro.*; import org.talend.components.salesforce.tsalesforceinput.*; | [
"org.apache.avro",
"org.talend.components"
] | org.apache.avro; org.talend.components; | 2,555,476 |
public void testReplicateCleanFromODF() throws IOException
{
try
{
PersistenceManager pm = pmf2.getPersistenceManager();
Transaction tx = pm.currentTransaction();
Object office1Id;
try
{
tx.begin();
Offic... | void function() throws IOException { try { PersistenceManager pm = pmf2.getPersistenceManager(); Transaction tx = pm.currentTransaction(); Object office1Id; try { tx.begin(); Office office1 = new Office(STR); LaptopComputer laptop1 = new LaptopComputer(STR, "Linux", 4, 0); office1.addComputer(laptop1); DesktopComputer ... | /**
* Test that creates an Office+Computer(x2) in PMF2, replicates this to PMF1.
*/ | Test that creates an Office+Computer(x2) in PMF2, replicates this to PMF1 | testReplicateCleanFromODF | {
"repo_name": "datanucleus/tests",
"path": "jdo/replication/src/test/org/datanucleus/tests/ReplicationTest.java",
"license": "apache-2.0",
"size": 12272
} | [
"java.io.IOException",
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction",
"org.datanucleus.api.jdo.JDOReplicationManager",
"org.datanucleus.samples.one_many.unidir.DesktopComputer",
"org.datanucleus.samples.one_many.unidir.LaptopComputer",
"org.datanucleus.samples.one_many.unidir.Office"
] | import java.io.IOException; import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.datanucleus.api.jdo.JDOReplicationManager; import org.datanucleus.samples.one_many.unidir.DesktopComputer; import org.datanucleus.samples.one_many.unidir.LaptopComputer; import org.datanucleus.samples.one_many.unid... | import java.io.*; import javax.jdo.*; import org.datanucleus.api.jdo.*; import org.datanucleus.samples.one_many.unidir.*; | [
"java.io",
"javax.jdo",
"org.datanucleus.api",
"org.datanucleus.samples"
] | java.io; javax.jdo; org.datanucleus.api; org.datanucleus.samples; | 2,914,912 |
@SuppressWarnings("WeakerAccess")
protected void doClose(Injector injector) {
} | @SuppressWarnings(STR) void function(Injector injector) { } | /**
* Actually perform closing of any instances this module is responsible for. Called by
* {@link #close(Injector)}.
*
* @param injector the Injector originally initialized with this module
*/ | Actually perform closing of any instances this module is responsible for. Called by <code>#close(Injector)</code> | doClose | {
"repo_name": "metabit/bitsquare",
"path": "common/src/main/java/io/bitsquare/app/AppModule.java",
"license": "agpl-3.0",
"size": 2319
} | [
"com.google.inject.Injector"
] | import com.google.inject.Injector; | import com.google.inject.*; | [
"com.google.inject"
] | com.google.inject; | 2,279,066 |
@GetMapping(value = "/rest/admin/batch-parts/{batchPartId}/batch-part-document", produces = "text/plain")
public String getBatchPartDocument(@PathVariable String batchPartId, HttpServletRequest request) throws BadRequestException {
ServerConfig serverConfig = retrieveServerConfig(EndpointType.PROCESS);
... | @GetMapping(value = STR, produces = STR) String function(@PathVariable String batchPartId, HttpServletRequest request) throws BadRequestException { ServerConfig serverConfig = retrieveServerConfig(EndpointType.PROCESS); try { return clientService.getBatchPartDocument(serverConfig, batchPartId); } catch (FlowableService... | /**
* GET /rest/admin/batch-parts/{batchPartId}/batch-part-document
*/ | GET /rest/admin/batch-parts/{batchPartId}/batch-part-document | getBatchPartDocument | {
"repo_name": "flowable/flowable-engine",
"path": "modules/flowable-ui/flowable-ui-admin-rest/src/main/java/org/flowable/ui/admin/rest/client/BatchPartClientResource.java",
"license": "apache-2.0",
"size": 2988
} | [
"javax.servlet.http.HttpServletRequest",
"org.flowable.ui.admin.domain.EndpointType",
"org.flowable.ui.admin.domain.ServerConfig",
"org.flowable.ui.admin.service.engine.exception.FlowableServiceException",
"org.flowable.ui.common.service.exception.BadRequestException",
"org.springframework.web.bind.annota... | import javax.servlet.http.HttpServletRequest; import org.flowable.ui.admin.domain.EndpointType; import org.flowable.ui.admin.domain.ServerConfig; import org.flowable.ui.admin.service.engine.exception.FlowableServiceException; import org.flowable.ui.common.service.exception.BadRequestException; import org.springframewor... | import javax.servlet.http.*; import org.flowable.ui.admin.domain.*; import org.flowable.ui.admin.service.engine.exception.*; import org.flowable.ui.common.service.exception.*; import org.springframework.web.bind.annotation.*; | [
"javax.servlet",
"org.flowable.ui",
"org.springframework.web"
] | javax.servlet; org.flowable.ui; org.springframework.web; | 595,986 |
public static CoordinateAxis getCoordinateVariable(Dimension dim, NetcdfDataset ds) throws MotuException {
Variable variable = null;
try {
variable = NetCdfReader.getVariable(dim.getFullName(), ds);
} catch (NetCdfVariableNotFoundException e) {
throw new MotuException... | static CoordinateAxis function(Dimension dim, NetcdfDataset ds) throws MotuException { Variable variable = null; try { variable = NetCdfReader.getVariable(dim.getFullName(), ds); } catch (NetCdfVariableNotFoundException e) { throw new MotuException( ErrorType.NETCDF_LOADING, String.format(STR, dim.getFullName()), e); }... | /**
* Gets the coordinate variable.
*
* @param dim the dim
* @param ds the ds
*
* @return the coordinate variable
* @throws MotuException
*
*/ | Gets the coordinate variable | getCoordinateVariable | {
"repo_name": "clstoulouse/motu",
"path": "motu-web/src/main/java/fr/cls/atoll/motu/web/dal/request/netcdf/NetCdfReader.java",
"license": "lgpl-3.0",
"size": 74367
} | [
"fr.cls.atoll.motu.api.message.xml.ErrorType",
"fr.cls.atoll.motu.web.bll.exception.MotuException",
"fr.cls.atoll.motu.web.bll.exception.NetCdfVariableNotFoundException"
] | import fr.cls.atoll.motu.api.message.xml.ErrorType; import fr.cls.atoll.motu.web.bll.exception.MotuException; import fr.cls.atoll.motu.web.bll.exception.NetCdfVariableNotFoundException; | import fr.cls.atoll.motu.api.message.xml.*; import fr.cls.atoll.motu.web.bll.exception.*; | [
"fr.cls.atoll"
] | fr.cls.atoll; | 1,242,905 |
@ApiModelProperty(example = "null", value = "")
public MatchedAddress getMatchedAddress() {
return matchedAddress;
} | @ApiModelProperty(example = "null", value = "") MatchedAddress function() { return matchedAddress; } | /**
* Get matchedAddress
* @return matchedAddress
**/ | Get matchedAddress | getMatchedAddress | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/TaxRateResponse.java",
"license": "apache-2.0",
"size": 6740
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,783,353 |
public EList<RegularTimePoint> getTimePoints() {
if (timePoints == null) {
timePoints = new BasicInternalEList<RegularTimePoint>(RegularTimePoint.class);
}
return timePoints;
} | EList<RegularTimePoint> function() { if (timePoints == null) { timePoints = new BasicInternalEList<RegularTimePoint>(RegularTimePoint.class); } return timePoints; } | /**
* Returns the value of the '<em><b>Time Points</b></em>' reference list.
* The list contents are of type {@link CIM15.IEC61970.Core.RegularTimePoint}.
* It is bidirectional and its opposite is '{@link CIM15.IEC61970.Core.RegularTimePoint#getIntervalSchedule <em>Interval Schedule</em>}'.
* <!-- begin-user-do... | Returns the value of the 'Time Points' reference list. The list contents are of type <code>CIM15.IEC61970.Core.RegularTimePoint</code>. It is bidirectional and its opposite is '<code>CIM15.IEC61970.Core.RegularTimePoint#getIntervalSchedule Interval Schedule</code>'. If the meaning of the 'Time Points' reference list is... | getTimePoints | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/Core/RegularIntervalSchedule.java",
"license": "apache-2.0",
"size": 10701
} | [
"org.eclipse.emf.common.util.EList",
"org.eclipse.emf.ecore.util.BasicInternalEList"
] | import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.util.BasicInternalEList; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 615,873 |
private void testDynamicLogLevel(final String bindProtocol,
final String connectProtocol, final boolean isSpnego,
final String newLevel) throws Exception {
if (!LogLevel.isValidProtocol(bindProtocol)) {
throw new Exception("Invalid server protocol " + bindProtocol);
}
if (!LogLevel.isVal... | void function(final String bindProtocol, final String connectProtocol, final boolean isSpnego, final String newLevel) throws Exception { if (!LogLevel.isValidProtocol(bindProtocol)) { throw new Exception(STR + bindProtocol); } if (!LogLevel.isValidProtocol(connectProtocol)) { throw new Exception(STR + connectProtocol);... | /**
* Run both client and server using the given protocol.
*
* @param bindProtocol specify either http or https for server
* @param connectProtocol specify either http or https for client
* @param isSpnego true if SPNEGO is enabled
* @throws Exception
*/ | Run both client and server using the given protocol | testDynamicLogLevel | {
"repo_name": "legend-hua/hadoop",
"path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/log/TestLogLevel.java",
"license": "apache-2.0",
"size": 15011
} | [
"org.apache.hadoop.fs.CommonConfigurationKeys",
"org.apache.hadoop.fs.CommonConfigurationKeysPublic",
"org.apache.hadoop.http.HttpServer2",
"org.apache.hadoop.net.NetUtils",
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.security.authentication.KerberosTestUtils",
"org.apache.log4... | import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.http.HttpServer2; import org.apache.hadoop.net.NetUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authentication.KerberosTestUtils; im... | import org.apache.hadoop.fs.*; import org.apache.hadoop.http.*; import org.apache.hadoop.net.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.authentication.*; import org.apache.log4j.*; import org.junit.*; | [
"org.apache.hadoop",
"org.apache.log4j",
"org.junit"
] | org.apache.hadoop; org.apache.log4j; org.junit; | 931,901 |
Input input = new StubInput(new String[]{"2", "4", "+", "4", "=", "y"});
Calculator calculator = new Calculator();
InterfaceMenu mc = new MenuCalculator(input, calculator);
mc.fillActions();
InteractCalc ic = new InteractCalc(input, mc);
ic.init();
double result = 8.0;
... | Input input = new StubInput(new String[]{"2", "4", "+", "4", "=", "y"}); Calculator calculator = new Calculator(); InterfaceMenu mc = new MenuCalculator(input, calculator); mc.fillActions(); InteractCalc ic = new InteractCalc(input, mc); ic.init(); double result = 8.0; assertThat(calculator.getResult(), is(result)); } | /**
* Calculator test.
* @throws IOException exception.
*/ | Calculator test | calculatorTest | {
"repo_name": "Apeksi1990/asemenov",
"path": "chapter_004/src/test/java/ru/asemenov/Calculator/CalculatorTest.java",
"license": "apache-2.0",
"size": 1770
} | [
"org.hamcrest.core.Is",
"org.junit.Assert",
"ru.asemenov.Calculator"
] | import org.hamcrest.core.Is; import org.junit.Assert; import ru.asemenov.Calculator; | import org.hamcrest.core.*; import org.junit.*; import ru.asemenov.*; | [
"org.hamcrest.core",
"org.junit",
"ru.asemenov"
] | org.hamcrest.core; org.junit; ru.asemenov; | 2,892,146 |
@SuppressWarnings("unchecked")
final Class<? extends Throwable>[] getRegisteredTypes() {
Set<Class<? extends Throwable>> typeList = this.extractorMap.keySet();
return typeList.toArray(new Class[0]);
} | @SuppressWarnings(STR) final Class<? extends Throwable>[] getRegisteredTypes() { Set<Class<? extends Throwable>> typeList = this.extractorMap.keySet(); return typeList.toArray(new Class[0]); } | /**
* Returns an array containing the classes for which extractors are registered. The
* order of the classes is the order in which comparisons will occur for resolving a
* matching extractor.
*
* @return the types for which extractors are registered
*/ | Returns an array containing the classes for which extractors are registered. The order of the classes is the order in which comparisons will occur for resolving a matching extractor | getRegisteredTypes | {
"repo_name": "eddumelendez/spring-security",
"path": "web/src/main/java/org/springframework/security/web/util/ThrowableAnalyzer.java",
"license": "apache-2.0",
"size": 8910
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 375,601 |
//-----------------------------------------------------------------------
public final MetaProperty<double[]> parameters() {
return _parameters;
} | final MetaProperty<double[]> function() { return _parameters; } | /**
* The meta-property for the {@code parameters} property.
* @return the meta-property, not null
*/ | The meta-property for the parameters property | parameters | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/math/curve/DoublesCurveNelsonSiegel.java",
"license": "apache-2.0",
"size": 10690
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,463,728 |
public static PreConfiguredCharFilter luceneVersion(
String name,
boolean useFilterForMultitermQueries,
BiFunction<Reader, org.apache.lucene.util.Version, Reader> create
) {
return new PreConfiguredCharFilter(
name,
CachingStrategy.LUCENE,
useF... | static PreConfiguredCharFilter function( String name, boolean useFilterForMultitermQueries, BiFunction<Reader, org.apache.lucene.util.Version, Reader> create ) { return new PreConfiguredCharFilter( name, CachingStrategy.LUCENE, useFilterForMultitermQueries, (reader, version) -> create.apply(reader, version.luceneVersio... | /**
* Create a pre-configured token filter that may vary based on the Lucene version.
*/ | Create a pre-configured token filter that may vary based on the Lucene version | luceneVersion | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/analysis/PreConfiguredCharFilter.java",
"license": "apache-2.0",
"size": 4287
} | [
"java.io.Reader",
"java.util.function.BiFunction",
"org.elasticsearch.Version",
"org.elasticsearch.indices.analysis.PreBuiltCacheFactory"
] | import java.io.Reader; import java.util.function.BiFunction; import org.elasticsearch.Version; import org.elasticsearch.indices.analysis.PreBuiltCacheFactory; | import java.io.*; import java.util.function.*; import org.elasticsearch.*; import org.elasticsearch.indices.analysis.*; | [
"java.io",
"java.util",
"org.elasticsearch",
"org.elasticsearch.indices"
] | java.io; java.util; org.elasticsearch; org.elasticsearch.indices; | 1,768,783 |
void add(AbstractEpollChannel ch) throws IOException {
assert inEventLoop();
int fd = ch.fd().intValue();
Native.epollCtlAdd(epollFd, fd, ch.flags);
channels.put(fd, ch);
} | void add(AbstractEpollChannel ch) throws IOException { assert inEventLoop(); int fd = ch.fd().intValue(); Native.epollCtlAdd(epollFd, fd, ch.flags); channels.put(fd, ch); } | /**
* Register the given epoll with this {@link io.netty.channel.EventLoop}.
*/ | Register the given epoll with this <code>io.netty.channel.EventLoop</code> | add | {
"repo_name": "nayato/netty",
"path": "transport-native-epoll/src/main/java/io/netty/channel/epoll/EpollEventLoop.java",
"license": "apache-2.0",
"size": 15298
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,305,823 |
Date getLastVerified(); | Date getLastVerified(); | /**
* Returns the date when the last object was verified.
*
* @return the date when the last object was verified
*/ | Returns the date when the last object was verified | getLastVerified | {
"repo_name": "psnc-dl/darceo",
"path": "wrdz/wrdz-mdz/dao/src/main/java/pl/psnc/synat/wrdz/mdz/dao/integrity/DigitalObjectDao.java",
"license": "gpl-3.0",
"size": 1937
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,211,582 |
@SuppressForbidden(reason = "proper use of URL, hack around a JDK bug")
static FileSystem getFileSystem() throws IOException {
// REST suite handling is currently complicated, with lots of filtering and so on
// For now, to work embedded in a jar, return a ZipFileSystem over the jar contents.
... | @SuppressForbidden(reason = STR) static FileSystem getFileSystem() throws IOException { URL codeLocation = FileUtils.class.getProtectionDomain().getCodeSource().getLocation(); boolean loadPackaged = RandomizedTest.systemPropertyAsBoolean(REST_LOAD_PACKAGED_TESTS, true); if (codeLocation.getFile().endsWith(".jar") && lo... | /**
* Returns a new FileSystem to read REST resources, or null if they
* are available from classpath.
*/ | Returns a new FileSystem to read REST resources, or null if they are available from classpath | getFileSystem | {
"repo_name": "dpursehouse/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ESClientYamlSuiteTestCase.java",
"license": "apache-2.0",
"size": 15332
} | [
"com.carrotsearch.randomizedtesting.RandomizedTest",
"java.io.IOException",
"java.io.InputStream",
"java.net.URISyntaxException",
"java.nio.file.FileSystem",
"java.nio.file.FileSystems",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.StandardCopyOption",
"java.util.Collections",
"or... | import com.carrotsearch.randomizedtesting.RandomizedTest; import java.io.IOException; import java.io.InputStream; import java.net.URISyntaxException; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import ... | import com.carrotsearch.randomizedtesting.*; import java.io.*; import java.net.*; import java.nio.file.*; import java.util.*; import org.elasticsearch.common.*; | [
"com.carrotsearch.randomizedtesting",
"java.io",
"java.net",
"java.nio",
"java.util",
"org.elasticsearch.common"
] | com.carrotsearch.randomizedtesting; java.io; java.net; java.nio; java.util; org.elasticsearch.common; | 1,269,587 |
public static Long unsignedLong(long value) {
if (value < 0) {
// Pull off the most-significant bit so that BigInteger doesn't think
// the number is negative, then set it again using setBit().
return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63).longValue();... | static Long function(long value) { if (value < 0) { return BigInteger.valueOf(value & 0x7FFFFFFFFFFFFFFFL).setBit(63).longValue(); } return value; } | /**
* Convert an unsigned 64-bit integer to a string.
*/ | Convert an unsigned 64-bit integer to a string | unsignedLong | {
"repo_name": "carlomedas/protobuf-java-format",
"path": "src/main/java/com/googlecode/protobuf/format/util/TextUtils.java",
"license": "bsd-3-clause",
"size": 16233
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 43,512 |
public void doSaveAs() {
SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
saveAsDialog.open();
IPath path = saveAsDialog.getResult();
if (path != null) {
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (file != null) ... | void function() { SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); saveAsDialog.open(); IPath path = saveAsDialog.getResult(); if (path != null) { IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); if (file != null) { doSaveAs(URI.createPlatformResourceURI( file.getFullPath().toStri... | /**
* This also changes the editor's input.
*/ | This also changes the editor's input | doSaveAs | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/domain/ui/com.odcgroup.mdf.editor/source/com/odcgroup/mdf/editor/ui/editors/DomainModelEditor.java",
"license": "epl-1.0",
"size": 71268
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.core.runtime.IPath",
"org.eclipse.emf.common.util.URI",
"org.eclipse.ui.dialogs.SaveAsDialog",
"org.eclipse.ui.part.FileEditorInput"
] | import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.emf.common.util.URI; import org.eclipse.ui.dialogs.SaveAsDialog; import org.eclipse.ui.part.FileEditorInput; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.emf.common.util.*; import org.eclipse.ui.dialogs.*; import org.eclipse.ui.part.*; | [
"org.eclipse.core",
"org.eclipse.emf",
"org.eclipse.ui"
] | org.eclipse.core; org.eclipse.emf; org.eclipse.ui; | 1,551,409 |
@NonNull
public Single<StudyParticipant> getParticipantRecord() {
return toBodySingle(authStateHolderAtomicReference.get().forConsentedUsersApi
.getUsersParticipantRecord())
.doOnSuccess(accountDAO::setStudyParticipant)
.doOnError(throwable -> logger.error... | Single<StudyParticipant> function() { return toBodySingle(authStateHolderAtomicReference.get().forConsentedUsersApi .getUsersParticipantRecord()) .doOnSuccess(accountDAO::setStudyParticipant) .doOnError(throwable -> logger.error(throwable.getLocalizedMessage())); } | /**
* Calls Bridge for participant information. Updates local cache of participant.
*
* @return Current user's participant record
*/ | Calls Bridge for participant information. Updates local cache of participant | getParticipantRecord | {
"repo_name": "liujoshua/BridgeAndroidSDK",
"path": "android-sdk/src/main/java/org/sagebionetworks/bridge/android/manager/ParticipantRecordManager.java",
"license": "apache-2.0",
"size": 9103
} | [
"org.sagebionetworks.bridge.android.util.retrofit.RxUtils",
"org.sagebionetworks.bridge.rest.model.StudyParticipant"
] | import org.sagebionetworks.bridge.android.util.retrofit.RxUtils; import org.sagebionetworks.bridge.rest.model.StudyParticipant; | import org.sagebionetworks.bridge.android.util.retrofit.*; import org.sagebionetworks.bridge.rest.model.*; | [
"org.sagebionetworks.bridge"
] | org.sagebionetworks.bridge; | 1,119,789 |
private void modelGroup(XSModelGroup group, String extraAtts) {
SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
"{0}{1}", new Object[]{group.getCompositor(), extraAtts}),
group.getLocator());
this.currNode.add(newNode);
this.currNode = newNod... | void function(XSModelGroup group, String extraAtts) { SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format( STR, new Object[]{group.getCompositor(), extraAtts}), group.getLocator()); this.currNode.add(newNode); this.currNode = newNode; final int len = group.getSize(); for (int i = 0; i < len; i++) { particl... | /**
* Creates node for model group with additional attributes.
*
* @param group Model group.
* @param extraAtts Additional attributes.
*/ | Creates node for model group with additional attributes | modelGroup | {
"repo_name": "universsky/openjdk",
"path": "jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/util/SchemaTreeTraverser.java",
"license": "gpl-2.0",
"size": 35056
} | [
"com.sun.xml.internal.xsom.XSModelGroup",
"java.text.MessageFormat"
] | import com.sun.xml.internal.xsom.XSModelGroup; import java.text.MessageFormat; | import com.sun.xml.internal.xsom.*; import java.text.*; | [
"com.sun.xml",
"java.text"
] | com.sun.xml; java.text; | 1,296,161 |
public AnalysisData withDetectorDefinition(DetectorDefinitionInner detectorDefinition) {
this.detectorDefinition = detectorDefinition;
return this;
} | AnalysisData function(DetectorDefinitionInner detectorDefinition) { this.detectorDefinition = detectorDefinition; return this; } | /**
* Set detector Definition.
*
* @param detectorDefinition the detectorDefinition value to set
* @return the AnalysisData object itself.
*/ | Set detector Definition | withDetectorDefinition | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/AnalysisData.java",
"license": "mit",
"size": 3572
} | [
"com.microsoft.azure.management.appservice.v2018_02_01.implementation.DetectorDefinitionInner"
] | import com.microsoft.azure.management.appservice.v2018_02_01.implementation.DetectorDefinitionInner; | import com.microsoft.azure.management.appservice.v2018_02_01.implementation.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,647,168 |
@Deprecated
public int getPartition() {
return partition;
}
/**
* Get the active Kafka Streams instance for given key.
*
* @return active instance's {@link HostInfo} | int function() { return partition; } /** * Get the active Kafka Streams instance for given key. * * @return active instance's {@link HostInfo} | /**
* Get the store partition corresponding to the key.
*
* @return store partition number
* @deprecated Use {@link #partition()} instead.
*/ | Get the store partition corresponding to the key | getPartition | {
"repo_name": "guozhangwang/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/KeyQueryMetadata.java",
"license": "apache-2.0",
"size": 4472
} | [
"org.apache.kafka.streams.state.HostInfo"
] | import org.apache.kafka.streams.state.HostInfo; | import org.apache.kafka.streams.state.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,289,798 |
public final List<Contact> getRemovedContacts() {
return removedContacts;
}
| final List<Contact> function() { return removedContacts; } | /**
* Gets the removed contacts, i.e. contacts which were on the roster, but now are no longer on the roster.
*
* @return The removed contacts.
*/ | Gets the removed contacts, i.e. contacts which were on the roster, but now are no longer on the roster | getRemovedContacts | {
"repo_name": "jeozey/XmppServerTester",
"path": "xmpp-core-client/src/main/java/rocks/xmpp/im/roster/RosterEvent.java",
"license": "mit",
"size": 3542
} | [
"java.util.List",
"rocks.xmpp.im.roster.model.Contact"
] | import java.util.List; import rocks.xmpp.im.roster.model.Contact; | import java.util.*; import rocks.xmpp.im.roster.model.*; | [
"java.util",
"rocks.xmpp.im"
] | java.util; rocks.xmpp.im; | 1,069,829 |
private Hive getSessionHive() throws HiveSQLException {
try {
return Hive.get();
} catch (HiveException e) {
throw new HiveSQLException("Failed to get ThreadLocal Hive object", e);
}
} | Hive function() throws HiveSQLException { try { return Hive.get(); } catch (HiveException e) { throw new HiveSQLException(STR, e); } } | /**
* Returns the ThreadLocal Hive for the current thread
* @return Hive
* @throws HiveSQLException
*/ | Returns the ThreadLocal Hive for the current thread | getSessionHive | {
"repo_name": "pgandhi999/spark",
"path": "sql/hive-thriftserver/v2.3.5/src/main/java/org/apache/hive/service/cli/operation/SQLOperation.java",
"license": "apache-2.0",
"size": 17077
} | [
"org.apache.hadoop.hive.ql.metadata.Hive",
"org.apache.hadoop.hive.ql.metadata.HiveException",
"org.apache.hive.service.cli.HiveSQLException"
] | import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hive.service.cli.HiveSQLException; | import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hive.service.cli.*; | [
"org.apache.hadoop",
"org.apache.hive"
] | org.apache.hadoop; org.apache.hive; | 797,429 |
@Test
public void testUnion7()
{
List<Integer> expected = Lists.newArrayList();
ConciseSet set1 = new ConciseSet();
for (int i = 64; i < 1005; i++) {
set1.add(i);
}
ConciseSet set2 = new ConciseSet();
for (int i = 63; i < 99; i++) {
set2.add(i);
}
List<ImmutableConciseS... | void function() { List<Integer> expected = Lists.newArrayList(); ConciseSet set1 = new ConciseSet(); for (int i = 64; i < 1005; i++) { set1.add(i); } ConciseSet set2 = new ConciseSet(); for (int i = 63; i < 99; i++) { set2.add(i); } List<ImmutableConciseSet> sets = Arrays.asList( ImmutableConciseSet.newImmutableFromMut... | /**
* Set 1: zero literal, literal, one fill with flipped bit
* Set 2: zero literal, one fill with flipped bit
* <p/>
* Testing merge
*/ | Set 1: zero literal, literal, one fill with flipped bit Set 2: zero literal, one fill with flipped bit Testing merge | testUnion7 | {
"repo_name": "metamx/extendedset",
"path": "src/test/java/it.uniroma3.mat.extendedset/intset/ImmutableConciseSetTest.java",
"license": "apache-2.0",
"size": 50817
} | [
"com.google.common.collect.Lists",
"java.util.Arrays",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.Arrays; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,734,298 |
public static void writeClassArray(ObjectOutputStream out,
Class<?>[] classes) throws IOException {
if (classes == null) {
out.writeObject(null);
} else {
String[] classNames = new String[classes.length];
for (int i = 0; i < classes.length; i++) {
... | static void function(ObjectOutputStream out, Class<?>[] classes) throws IOException { if (classes == null) { out.writeObject(null); } else { String[] classNames = new String[classes.length]; for (int i = 0; i < classes.length; i++) { classNames[i] = classes[i].getName(); } out.writeObject(classNames); } } | /**
* Serializes the class references so
* {@link #readClassArray(ObjectInputStream)} can deserialize it. Supports
* null class arrays.
*
* @param out
* The {@link ObjectOutputStream} to serialize to.
* @param classes
* An array containing class references o... | Serializes the class references so <code>#readClassArray(ObjectInputStream)</code> can deserialize it. Supports null class arrays | writeClassArray | {
"repo_name": "Darsstar/framework",
"path": "compatibility-server/src/main/java/com/vaadin/v7/util/SerializerHelper.java",
"license": "apache-2.0",
"size": 5310
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,134,069 |
JDBCType getType(int index) {
return columns.get(index).type();
} | JDBCType getType(int index) { return columns.get(index).type(); } | /**
* Get column type.
* @param index index of column, starting at 0.
* @return Column type.
*/ | Get column type | getType | {
"repo_name": "edrdo/jdbdt",
"path": "src/main/java/org/jdbdt/MetaData.java",
"license": "mit",
"size": 3600
} | [
"java.sql.JDBCType"
] | import java.sql.JDBCType; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,658,495 |
@Test
public void testSetOption() {
ZMQ.Context context = ZMQ.context(1);
ZMQ.Socket sock = context.socket(ZMQ.REQ);
if (ZMQ.getFullVersion() >= ZMQ.makeVersion(3, 2, 0)) {
sock.setIPv4Only(false);
assertEquals(false, sock.getIPv4Only());
sock.setIP... | void function() { ZMQ.Context context = ZMQ.context(1); ZMQ.Socket sock = context.socket(ZMQ.REQ); if (ZMQ.getFullVersion() >= ZMQ.makeVersion(3, 2, 0)) { sock.setIPv4Only(false); assertEquals(false, sock.getIPv4Only()); sock.setIPv4Only(true); assertEquals(true, sock.getIPv4Only()); } sock.close(); context.term(); } s... | /**
* Test method for various set/get options.
*/ | Test method for various set/get options | testSetOption | {
"repo_name": "Shopify/jzmq",
"path": "test/src/org/zeromq/ZMQTest.java",
"license": "gpl-3.0",
"size": 16943
} | [
"org.junit.Assert",
"org.zeromq.ZMQ"
] | import org.junit.Assert; import org.zeromq.ZMQ; | import org.junit.*; import org.zeromq.*; | [
"org.junit",
"org.zeromq"
] | org.junit; org.zeromq; | 2,521,149 |
public int handleTreeNode(TreeNode<Exp> node) {
int nodeIndex = node.getLevel() - 1;
if (nodeIndex < dimIndex) {
// we are below iDim, don't care
return TreeNodeCallback.CONTINUE;
}
// iDimNode == iDim
// node Exp must contain children of member[iDim]
Exp oExp = node.getReferen... | int function(TreeNode<Exp> node) { int nodeIndex = node.getLevel() - 1; if (nodeIndex < dimIndex) { return TreeNodeCallback.CONTINUE; } Exp oExp = node.getReference(); if (quaxUtil.isMember(oExp)) { if (quaxUtil.isDescendant(target, oExp)) { nodesForMember.add(node); } } else { if (isDescendantOfMemberInFunCall(oExp, t... | /**
* callback find node matching member Path exactly
*/ | callback find node matching member Path exactly | handleTreeNode | {
"repo_name": "seddikouiss/pivo4j",
"path": "pivot4j-core/src/main/java/org/pivot4j/impl/Quax.java",
"license": "epl-1.0",
"size": 77352
} | [
"org.pivot4j.mdx.Exp",
"org.pivot4j.util.TreeNode",
"org.pivot4j.util.TreeNodeCallback"
] | import org.pivot4j.mdx.Exp; import org.pivot4j.util.TreeNode; import org.pivot4j.util.TreeNodeCallback; | import org.pivot4j.mdx.*; import org.pivot4j.util.*; | [
"org.pivot4j.mdx",
"org.pivot4j.util"
] | org.pivot4j.mdx; org.pivot4j.util; | 2,105,158 |
EAttribute getDocumentRoot_Mixed(); | EAttribute getDocumentRoot_Mixed(); | /**
* Returns the meta object for the attribute list '{@link org.eclipse.bpel.apache.ode.deploy.model.dd.DocumentRoot#getMixed <em>Mixed</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Mixed</em>'.
* @see org.eclipse.bpel.apache.ode.deploy.model.... | Returns the meta object for the attribute list '<code>org.eclipse.bpel.apache.ode.deploy.model.dd.DocumentRoot#getMixed Mixed</code>'. | getDocumentRoot_Mixed | {
"repo_name": "chanakaudaya/developer-studio",
"path": "bps/org.eclipse.bpel.apache.ode.deploy.model/src/org/eclipse/bpel/apache/ode/deploy/model/dd/ddPackage.java",
"license": "apache-2.0",
"size": 55505
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,658,214 |
public VCardManager getVCardManager() {
return VCardManager.getInstance();
}
| VCardManager function() { return VCardManager.getInstance(); } | /**
* Returns the <code>VCardManager</code> registered with this server. The
* <code>VCardManager</code> was registered with the server as a module while starting up
* the server.
* @return the <code>VCardManager</code> registered with this server.
*/ | Returns the <code>VCardManager</code> registered with this server. The <code>VCardManager</code> was registered with the server as a module while starting up the server | getVCardManager | {
"repo_name": "surevine/openfire-bespoke",
"path": "src/java/org/jivesoftware/openfire/XMPPServer.java",
"license": "gpl-2.0",
"size": 58285
} | [
"org.jivesoftware.openfire.vcard.VCardManager"
] | import org.jivesoftware.openfire.vcard.VCardManager; | import org.jivesoftware.openfire.vcard.*; | [
"org.jivesoftware.openfire"
] | org.jivesoftware.openfire; | 630,931 |
protected ResultObject postProcessBusinessRules(ResultObject results1, DataTransferAssembler command1) throws SpineException {
return results1;
}
| ResultObject function(ResultObject results1, DataTransferAssembler command1) throws SpineException { return results1; } | /**
* Run all business rules associated with this delegate after processing in the data tier.
*
* @param results1 The ResultObject obtained from the {@link AbstractBusinessDelegate#run()} method
* @param command1 The CommandComponent used by this AbstractBusinessDelegate
* @return The res... | Run all business rules associated with this delegate after processing in the data tier | postProcessBusinessRules | {
"repo_name": "davidlad123/spine",
"path": "spine/src/com/zphinx/spine/core/AbstractBusinessDelegate.java",
"license": "gpl-3.0",
"size": 12835
} | [
"com.zphinx.spine.exceptions.SpineException",
"com.zphinx.spine.vo.DataTransferAssembler",
"com.zphinx.spine.vo.ResultObject"
] | import com.zphinx.spine.exceptions.SpineException; import com.zphinx.spine.vo.DataTransferAssembler; import com.zphinx.spine.vo.ResultObject; | import com.zphinx.spine.exceptions.*; import com.zphinx.spine.vo.*; | [
"com.zphinx.spine"
] | com.zphinx.spine; | 2,424,314 |
public void setDataHandler(DataHandler dh) throws MessagingException
{
this.dh = dh;
cachedContent = null;
MimeBodyPart.invalidateContentHeaders(this);
} | void function(DataHandler dh) throws MessagingException { this.dh = dh; cachedContent = null; MimeBodyPart.invalidateContentHeaders(this); } | /**
* This method provides the mechanism to set this body part's content. The
* given DataHandler object should wrap the actual content.
*
* @param dh
* The DataHandler for the content
* @exception IllegalWriteException
* if the underlying implementation does not support
* ... | This method provides the mechanism to set this body part's content. The given DataHandler object should wrap the actual content | setDataHandler | {
"repo_name": "arthurzaczek/kolab-android",
"path": "javamail/javax/mail/internet/MimeBodyPart.java",
"license": "gpl-3.0",
"size": 48246
} | [
"javax.activation.DataHandler",
"javax.mail.MessagingException"
] | import javax.activation.DataHandler; import javax.mail.MessagingException; | import javax.activation.*; import javax.mail.*; | [
"javax.activation",
"javax.mail"
] | javax.activation; javax.mail; | 1,054,992 |
public void setRefEntityTypeValue(String refEntityTypeValue)
throws JNCException {
setRefEntityTypeValue(new YangString(refEntityTypeValue));
} | void function(String refEntityTypeValue) throws JNCException { setRefEntityTypeValue(new YangString(refEntityTypeValue)); } | /**
* Sets the value for child leaf "ref-entity-type",
* using a String value.
* @param refEntityTypeValue used during instantiation.
*/ | Sets the value for child leaf "ref-entity-type", using a String value | setRefEntityTypeValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/statistics/gprsMm/IrauFail.java",
"license": "apache-2.0",
"size": 11353
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 8,324 |
private Class<?>[] internalGetClasses() {
ArrayList<Class> list = new ArrayList<Class>();
list.addAll(Arrays.asList(getDeclaredClasses(true)));
Class superClass = getSuperclass();
if (superClass != null)
list.addAll(Arrays.asList(superClass.internalGetClasses()));
return list.toArray(new Class<?>[list.s... | Class<?>[] function() { ArrayList<Class> list = new ArrayList<Class>(); list.addAll(Arrays.asList(getDeclaredClasses(true))); Class superClass = getSuperclass(); if (superClass != null) list.addAll(Arrays.asList(superClass.internalGetClasses())); return list.toArray(new Class<?>[list.size()]); } | /**
* Like <code>getClasses()</code> but without the security checks.
*/ | Like <code>getClasses()</code> but without the security checks | internalGetClasses | {
"repo_name": "webos21/xi",
"path": "java/jcl/src/java/java/lang/Class.java",
"license": "apache-2.0",
"size": 59769
} | [
"java.util.ArrayList",
"java.util.Arrays"
] | import java.util.ArrayList; import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 675,797 |
@Test
public void testAddBinaryCreatedWithBuilder() throws Exception {
try {
binaries = true;
startGrids(2);
awaitPartitionMapExchange();
Ignite g0 = grid(0);
IgniteDataStreamer<Integer, BinaryObject> dataLdr = g0.dataStreamer(DEFAULT_CACHE... | void function() throws Exception { try { binaries = true; startGrids(2); awaitPartitionMapExchange(); Ignite g0 = grid(0); IgniteDataStreamer<Integer, BinaryObject> dataLdr = g0.dataStreamer(DEFAULT_CACHE_NAME); for (int i = 0; i < 500; i++) { BinaryObjectBuilder obj = g0.binary().builder(STR); obj.setField("id", i); o... | /**
* Tries to propagate cache with binary objects created using the builder.
*
* @throws Exception If failed.
*/ | Tries to propagate cache with binary objects created using the builder | testAddBinaryCreatedWithBuilder | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java",
"license": "apache-2.0",
"size": 10844
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteDataStreamer",
"org.apache.ignite.binary.BinaryObject",
"org.apache.ignite.binary.BinaryObjectBuilder",
"org.apache.ignite.cache.CachePeekMode",
"org.apache.ignite.internal.util.typedef.G"
] | import org.apache.ignite.Ignite; import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectBuilder; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.internal.util.typedef.G; | import org.apache.ignite.*; import org.apache.ignite.binary.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.util.typedef.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 602,990 |
@Override
protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) {
boolean success = true;
LOG.debug("Entering processCustomRouteDocumentBusinessRules()");
success &= checkClearingAccountIsActive();
// success &= checkWireAccountIsActive();
... | boolean function(MaintenanceDocument document) { boolean success = true; LOG.debug(STR); success &= checkClearingAccountIsActive(); success &= checkLockboxNumberIsUnique(); return success; } | /**
* This performs the following checks on document route:
* <ul>
* <ul>
* <li>{@link SystemInformationRule#checkClearingAccountIsActive()}</li>
* </ul>
* </ul>
* This rule fails on rule failure
* @see org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase#processCusto... | This performs the following checks on document route: <code>SystemInformationRule#checkClearingAccountIsActive()</code> This rule fails on rule failure | processCustomRouteDocumentBusinessRules | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/ar/document/validation/impl/SystemInformationRule.java",
"license": "apache-2.0",
"size": 7070
} | [
"org.kuali.rice.kns.document.MaintenanceDocument"
] | import org.kuali.rice.kns.document.MaintenanceDocument; | import org.kuali.rice.kns.document.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,297,017 |
@Override
public synchronized boolean isChunkLoaded() {
Location location = _recent.getLocation(_entityLocation);
Coords2Di chunk = ChunkUtils.getChunkCoords(location, _currentChunk);
return _world.isChunkLoaded(chunk.getX(), chunk.getZ());
} | synchronized boolean function() { Location location = _recent.getLocation(_entityLocation); Coords2Di chunk = ChunkUtils.getChunkCoords(location, _currentChunk); return _world.isChunkLoaded(chunk.getX(), chunk.getZ()); } | /**
* Determine if the chunk the entity is in
* is loaded.
*/ | Determine if the chunk the entity is in is loaded | isChunkLoaded | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/internal/managed/entity/TrackedEntity.java",
"license": "mit",
"size": 6053
} | [
"com.jcwhatever.nucleus.utils.coords.ChunkUtils",
"com.jcwhatever.nucleus.utils.coords.Coords2Di",
"org.bukkit.Location"
] | import com.jcwhatever.nucleus.utils.coords.ChunkUtils; import com.jcwhatever.nucleus.utils.coords.Coords2Di; import org.bukkit.Location; | import com.jcwhatever.nucleus.utils.coords.*; import org.bukkit.*; | [
"com.jcwhatever.nucleus",
"org.bukkit"
] | com.jcwhatever.nucleus; org.bukkit; | 2,347,038 |
public Builder text(String text) {
this.text = text;
return this;
}
}
private DeleteCounterexampleOptions(Builder builder) {
Validator.notEmpty(builder.workspaceId, "workspaceId cannot be empty");
Validator.notEmpty(builder.text, "text cannot be empty");
workspaceId = builder.worksp... | Builder function(String text) { this.text = text; return this; } } DeleteCounterexampleOptions(Builder builder) { Validator.notEmpty(builder.workspaceId, STR); Validator.notEmpty(builder.text, STR); workspaceId = builder.workspaceId; function = builder.text; } | /**
* Set the text.
*
* @param text the text
* @return the DeleteCounterexampleOptions builder
*/ | Set the text | text | {
"repo_name": "supunucsc/java-sdk",
"path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/DeleteCounterexampleOptions.java",
"license": "apache-2.0",
"size": 3100
} | [
"com.ibm.watson.developer_cloud.util.Validator"
] | import com.ibm.watson.developer_cloud.util.Validator; | import com.ibm.watson.developer_cloud.util.*; | [
"com.ibm.watson"
] | com.ibm.watson; | 2,771,635 |
@Override
public Element findElement(By by) {
try {
return new ElementImpl(driver.findElement(by), this);
} catch (NoSuchElementException nse) {
TestReporter.logFailure("No such Element with context: " + by.toString());
throw new NoSuchElementException(nse.getMessage());
}
} | Element function(By by) { try { return new ElementImpl(driver.findElement(by), this); } catch (NoSuchElementException nse) { TestReporter.logFailure(STR + by.toString()); throw new NoSuchElementException(nse.getMessage()); } } | /**
* Method to find a single Element for a given page, using a Selenium <b><i>By</i></b> locator
* @param by - Selenium <b><i>By</i></b> locator with which to locate the Element
* @return Element, if any, found by using the Selenium <b><i>By</i></b> locator
* @see https://selenium.googlecode.com/svn/trunk/doc... | Method to find a single Element for a given page, using a Selenium By locator | findElement | {
"repo_name": "Orasi/Xeeva",
"path": "src/main/java/com/orasi/utils/OrasiDriver.java",
"license": "bsd-3-clause",
"size": 52445
} | [
"com.orasi.core.interfaces.Element",
"com.orasi.core.interfaces.impl.ElementImpl",
"org.openqa.selenium.By",
"org.openqa.selenium.NoSuchElementException"
] | import com.orasi.core.interfaces.Element; import com.orasi.core.interfaces.impl.ElementImpl; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; | import com.orasi.core.interfaces.*; import com.orasi.core.interfaces.impl.*; import org.openqa.selenium.*; | [
"com.orasi.core",
"org.openqa.selenium"
] | com.orasi.core; org.openqa.selenium; | 1,061,815 |
public void destroy() {
mStripTabEventHandler.removeCallbacksAndMessages(null);
// Vivaldi
if (mModelObserver != null) mModel.removeObserver(mModelObserver);
VivaldiPreferences.getSharedPreferencesManager().removeObserver(mPreferenceObserver);
} | void function() { mStripTabEventHandler.removeCallbacksAndMessages(null); if (mModelObserver != null) mModel.removeObserver(mModelObserver); VivaldiPreferences.getSharedPreferencesManager().removeObserver(mPreferenceObserver); } | /**
* Cleans up internal state.
*/ | Cleans up internal state | destroy | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java",
"license": "bsd-3-clause",
"size": 85367
} | [
"org.vivaldi.browser.preferences.VivaldiPreferences"
] | import org.vivaldi.browser.preferences.VivaldiPreferences; | import org.vivaldi.browser.preferences.*; | [
"org.vivaldi.browser"
] | org.vivaldi.browser; | 2,478,873 |
@JsonProperty("faxNumber")
public void setFaxNumber(final String faxNumber) {
this.faxNumber = faxNumber;
} | @JsonProperty(STR) void function(final String faxNumber) { this.faxNumber = faxNumber; } | /**
* The fax number of the contact point/person. This should include the international dialling code.
*
* @param faxNumber
* The faxNumber
*/ | The fax number of the contact point/person. This should include the international dialling code | setFaxNumber | {
"repo_name": "devgateway/ocvn",
"path": "persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/ContactPoint.java",
"license": "mit",
"size": 5479
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,988,768 |
public void readHeader(ReadBuffer readBuffer, long fileSize) throws IOException {
RequiredFields.readMagicByte(readBuffer);
RequiredFields.readRemainingHeader(readBuffer);
MapFileInfoBuilder mapFileInfoBuilder = new MapFileInfoBuilder();
RequiredFields.readFileVersion(readBuffer, m... | void function(ReadBuffer readBuffer, long fileSize) throws IOException { RequiredFields.readMagicByte(readBuffer); RequiredFields.readRemainingHeader(readBuffer); MapFileInfoBuilder mapFileInfoBuilder = new MapFileInfoBuilder(); RequiredFields.readFileVersion(readBuffer, mapFileInfoBuilder); RequiredFields.readFileSize... | /**
* Reads and validates the header block from the map file.
*
* @param readBuffer the ReadBuffer for the file data.
* @param fileSize the size of the map file in bytes.
* @throws IOException if an error occurs while reading the file.
*/ | Reads and validates the header block from the map file | readHeader | {
"repo_name": "usrusr/mapsforge",
"path": "mapsforge-map-reader/src/main/java/org/mapsforge/map/reader/header/MapFileHeader.java",
"license": "lgpl-3.0",
"size": 8475
} | [
"java.io.IOException",
"org.mapsforge.map.reader.ReadBuffer"
] | import java.io.IOException; import org.mapsforge.map.reader.ReadBuffer; | import java.io.*; import org.mapsforge.map.reader.*; | [
"java.io",
"org.mapsforge.map"
] | java.io; org.mapsforge.map; | 86,800 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<UsageInner>> listNextSinglePageAsync(String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
if ... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<UsageInner>> function(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by serve... | Get the next page of items | listNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/UsagesClientImpl.java",
"license": "mit",
"size": 13989
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.UsageInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.UsageInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,326,963 |
private static String extractContentType(String line) throws IOException {
// Convert the line to a lowercase string
line = line.toLowerCase();
// Get the content type, if any
// Note that Opera at least puts extra info after the type, so handle
// that. For example: Content-Type: text/plain; name="foo"... | static String function(String line) throws IOException { line = line.toLowerCase(); int end = line.indexOf(";"); if (end == -1) { end = line.length(); } return line.substring(13, end).trim(); } | /**
* Extracts and returns the content type from a line, or null if the
* line was empty.
*
* @return content type, or null if line was empty.
* @exception IOException if the line is malformatted.
*/ | Extracts and returns the content type from a line, or null if the line was empty | extractContentType | {
"repo_name": "blezek/Notion",
"path": "src/main/java/org/rsna/multipart/MultipartParser.java",
"license": "bsd-3-clause",
"size": 10469
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,859,868 |
public String getFullPath(String base_file_path, String relative_file_path)
throws OutRootException {
String base = getNormalize(base_file_path);
String file = getNormalize(relative_file_path);
String full;
if (! Files.isAbsolute(file) ) {
full = getRelativePa... | String function(String base_file_path, String relative_file_path) throws OutRootException { String base = getNormalize(base_file_path); String file = getNormalize(relative_file_path); String full; if (! Files.isAbsolute(file) ) { full = getRelativePath(base, file); if (!full.startsWith(root)) { throw new OutRootExcepti... | /**
* Calculate full path for filename relative base filename.
* Check whith root_path
*
* @throws com.mozartframework.io.OutRootException
*/ | Calculate full path for filename relative base filename. Check whith root_path | getFullPath | {
"repo_name": "mozartframework/cms",
"path": "src/com/mozartframework/util/Path.java",
"license": "gpl-3.0",
"size": 9739
} | [
"com.mozartframework.io.OutRootException"
] | import com.mozartframework.io.OutRootException; | import com.mozartframework.io.*; | [
"com.mozartframework.io"
] | com.mozartframework.io; | 2,182,747 |
protected Controller getController(ComponentDefinition definition, HttpServletRequest request)
throws Exception {
return definition.getOrCreateController();
}
| Controller function(ComponentDefinition definition, HttpServletRequest request) throws Exception { return definition.getOrCreateController(); } | /**
* Determine and initialize the Tiles component controller for the
* given Tiles definition, if any.
* @param definition the Tiles definition to render
* @param request current HTTP request
* @return the component controller to execute, or <code>null</code> if none
* @throws Exception if preparatio... | Determine and initialize the Tiles component controller for the given Tiles definition, if any | getController | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/servlet/view/tiles/TilesView.java",
"license": "unlicense",
"size": 7509
} | [
"javax.servlet.http.HttpServletRequest",
"org.apache.struts.tiles.ComponentDefinition",
"org.apache.struts.tiles.Controller"
] | import javax.servlet.http.HttpServletRequest; import org.apache.struts.tiles.ComponentDefinition; import org.apache.struts.tiles.Controller; | import javax.servlet.http.*; import org.apache.struts.tiles.*; | [
"javax.servlet",
"org.apache.struts"
] | javax.servlet; org.apache.struts; | 1,404,753 |
public List getStyleSheetNodes() {
if (styleSheetNodes == null) {
styleSheetNodes = new ArrayList();
selectorAttributes = new HashSet();
// Find all the style-sheets in the document.
findStyleSheetNodes(document);
int len = styleSheetNodes.size();
... | List function() { if (styleSheetNodes == null) { styleSheetNodes = new ArrayList(); selectorAttributes = new HashSet(); findStyleSheetNodes(document); int len = styleSheetNodes.size(); for (Object styleSheetNode : styleSheetNodes) { CSSStyleSheetNode ssn; ssn = (CSSStyleSheetNode) styleSheetNode; StyleSheet ss = ssn.ge... | /**
* Returns the document CSSStyleSheetNodes in a list. This list is
* updated as the document is modified.
*/ | Returns the document CSSStyleSheetNodes in a list. This list is updated as the document is modified | getStyleSheetNodes | {
"repo_name": "apache/batik",
"path": "batik-css/src/main/java/org/apache/batik/css/engine/CSSEngine.java",
"license": "apache-2.0",
"size": 90735
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List"
] | import java.util.ArrayList; import java.util.HashSet; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,934,117 |
public void setProperty(T prop, float val);
}
public static class AnimatableAnimation<V extends Enum<?>> extends
Animation<Animatable<V>> {
private final V mProperty;
public AnimatableAnimation(Animatable<V> animatable, V property, float start, float end,
... | void function(T prop, float val); } public static class AnimatableAnimation<V extends Enum<?>> extends Animation<Animatable<V>> { private final V mProperty; public AnimatableAnimation(Animatable<V> animatable, V property, float start, float end, long duration, long startTime, Interpolator interpolator) { super(animatab... | /**
* Updates an animatable property.
*
* @param prop The property to update
* @param val The new value
*/ | Updates an animatable property | setProperty | {
"repo_name": "Chilledheart/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/ChromeAnimation.java",
"license": "bsd-3-clause",
"size": 18954
} | [
"android.view.animation.Interpolator"
] | import android.view.animation.Interpolator; | import android.view.animation.*; | [
"android.view"
] | android.view; | 98,664 |
private MessageHandler getMessageHandler(DistributionMessage msg) {
Class<?> msgClazz = msg.getClass();
MessageHandler h = handlers.get(msgClazz);
if (h == null) {
for (Class<?> clazz : handlers.keySet()) {
if (clazz.isAssignableFrom(msgClazz)) {
h = handlers.get(claz... | MessageHandler function(DistributionMessage msg) { Class<?> msgClazz = msg.getClass(); MessageHandler h = handlers.get(msgClazz); if (h == null) { for (Class<?> clazz : handlers.keySet()) { if (clazz.isAssignableFrom(msgClazz)) { h = handlers.get(clazz); handlers.put(msg.getClass(), h); break; } } } if (h == null) { h ... | /**
* returns the handler that should process the given message. The default handler is the
* membership manager
*/ | returns the handler that should process the given message. The default handler is the membership manager | getMessageHandler | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/membership/gms/messenger/JGroupsMessenger.java",
"license": "apache-2.0",
"size": 53375
} | [
"org.apache.geode.distributed.internal.DistributionMessage",
"org.apache.geode.distributed.internal.membership.gms.interfaces.MessageHandler"
] | import org.apache.geode.distributed.internal.DistributionMessage; import org.apache.geode.distributed.internal.membership.gms.interfaces.MessageHandler; | import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.gms.interfaces.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,778,599 |
public static Exception amqpResponseCodeToException(int statusCode, String statusDescription,
AmqpErrorContext errorContext) {
final AmqpResponseCode amqpResponseCode = AmqpResponseCode.fromValue(statusCode);
final String message = String.format(AMQP_REQUEST_FAILED_ERROR, statusCode, status... | static Exception function(int statusCode, String statusDescription, AmqpErrorContext errorContext) { final AmqpResponseCode amqpResponseCode = AmqpResponseCode.fromValue(statusCode); final String message = String.format(AMQP_REQUEST_FAILED_ERROR, statusCode, statusDescription); if (amqpResponseCode == null) { return ne... | /**
* Given an AMQP response code, it maps it to an exception.
*
* @param statusCode AMQP response code.
* @param statusDescription Message associated with response.
* @param errorContext The context that this error occurred in.
* @return An exception that maps to that status code.
*/ | Given an AMQP response code, it maps it to an exception | amqpResponseCodeToException | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ExceptionUtil.java",
"license": "mit",
"size": 5534
} | [
"com.azure.core.amqp.exception.AmqpErrorCondition",
"com.azure.core.amqp.exception.AmqpErrorContext",
"com.azure.core.amqp.exception.AmqpException",
"com.azure.core.amqp.exception.AmqpResponseCode"
] | import com.azure.core.amqp.exception.AmqpErrorCondition; import com.azure.core.amqp.exception.AmqpErrorContext; import com.azure.core.amqp.exception.AmqpException; import com.azure.core.amqp.exception.AmqpResponseCode; | import com.azure.core.amqp.exception.*; | [
"com.azure.core"
] | com.azure.core; | 2,775,517 |
@Override
public Response processPDPRequest(Request pdpRequest) {
LOG.info("Begin AdapterPDPProxyJavaImpl.processPDPRequest(...)");
EffectType effect = EffectType.DENY;
PolicyType policyType = new PolicyType();
try {
String serviceType = getAttrValFromPdpRequest(pdpRe... | Response function(Request pdpRequest) { LOG.info(STR); EffectType effect = EffectType.DENY; PolicyType policyType = new PolicyType(); try { String serviceType = getAttrValFromPdpRequest(pdpRequest, AdapterPDPConstants.REQUEST_CONTEXT_ATTRIBUTE_SERVICE_TYPE, AdapterPDPConstants.ATTRIBUTEVALUE_DATATYPE_STRING); LOG.debug... | /**
* processPDPRequest process the pdp request and evaluates the policy to permit or deny
*
* @param pdpRequest
* @return pdpResponse
*/ | processPDPRequest process the pdp request and evaluates the policy to permit or deny | processPDPRequest | {
"repo_name": "AurionProject/Aurion",
"path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/policyengine/adapter/pdp/proxy/AdapterPDPProxyJavaImpl.java",
"license": "bsd-3-clause",
"size": 34909
} | [
"com.sun.identity.xacml.context.Request",
"com.sun.identity.xacml.context.Response",
"gov.hhs.fha.nhinc.docrepository.adapter.model.Document",
"gov.hhs.fha.nhinc.docrepository.adapter.model.DocumentQueryParams",
"gov.hhs.fha.nhinc.docrepository.adapter.service.DocumentService",
"java.util.ArrayList",
"j... | import com.sun.identity.xacml.context.Request; import com.sun.identity.xacml.context.Response; import gov.hhs.fha.nhinc.docrepository.adapter.model.Document; import gov.hhs.fha.nhinc.docrepository.adapter.model.DocumentQueryParams; import gov.hhs.fha.nhinc.docrepository.adapter.service.DocumentService; import java.util... | import com.sun.identity.xacml.context.*; import gov.hhs.fha.nhinc.docrepository.adapter.model.*; import gov.hhs.fha.nhinc.docrepository.adapter.service.*; import java.util.*; | [
"com.sun.identity",
"gov.hhs.fha",
"java.util"
] | com.sun.identity; gov.hhs.fha; java.util; | 2,845,725 |
public static String padComma(long num) {
DecimalFormat df = new DecimalFormat("#,###,###,###,###,###,###");
StringBuffer comma = new StringBuffer(df.format(num));
int pad = 25 - comma.length();
for (int i = 0; i < pad; i++) {
comma.insert(0, ' ');
}
... | static String function(long num) { DecimalFormat df = new DecimalFormat(STR); StringBuffer comma = new StringBuffer(df.format(num)); int pad = 25 - comma.length(); for (int i = 0; i < pad; i++) { comma.insert(0, ' '); } return comma.toString(); } | /**
* Pad and justify a long. This is useful for displaying the memory usage
* numbers from Runtime.freeMemory() and Runtime.totalMemory()
*
* @param num
* a number to render as a comma padded string.
* @return a 25 character wide string with the number right justified wnd
... | Pad and justify a long. This is useful for displaying the memory usage numbers from Runtime.freeMemory() and Runtime.totalMemory() | padComma | {
"repo_name": "severinh/java-gnome",
"path": "tests/bindings/com/operationaldynamics/ui/Text.java",
"license": "gpl-2.0",
"size": 6367
} | [
"java.text.DecimalFormat"
] | import java.text.DecimalFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,125,290 |
public TableViewerColumnBuilder cellLabelProvider(CellLabelProvider labelProvider) {
this.cellLabelProvider = labelProvider;
return this;
} | TableViewerColumnBuilder function(CellLabelProvider labelProvider) { this.cellLabelProvider = labelProvider; return this; } | /**
* If your column is not text based (for example a column with images that are owner-drawn), you can use a custom
* CellLabelProvider instead of a value and a value formatter.
*/ | If your column is not text based (for example a column with images that are owner-drawn), you can use a custom CellLabelProvider instead of a value and a value formatter | cellLabelProvider | {
"repo_name": "barta3/ch.bfh.bti7302Projekt2.IoTProtocols",
"path": "org.eclipse.paho.mqtt.java/org.eclipse.paho.ui/org.eclipse.paho.ui.core/src/org/eclipse/paho/mqtt/ui/support/table/TableViewerColumnBuilder.java",
"license": "mit",
"size": 5251
} | [
"org.eclipse.jface.viewers.CellLabelProvider"
] | import org.eclipse.jface.viewers.CellLabelProvider; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,397,103 |
public static <S> ThreadLocal<S> withInitial(Supplier<? extends S> supplier) {
return new SuppliedThreadLocal<>(supplier);
}
public ThreadLocal() {
} | static <S> ThreadLocal<S> function(Supplier<? extends S> supplier) { return new SuppliedThreadLocal<>(supplier); } public ThreadLocal() { } | /**
* Creates a thread local variable. The initial value of the variable is
* determined by invoking the {@code get} method on the {@code Supplier}.
*
* @param <S> the type of the thread local's value
* @param supplier the supplier to be used to determine the initial value
* @return a new ... | Creates a thread local variable. The initial value of the variable is determined by invoking the get method on the Supplier | withInitial | {
"repo_name": "yngui/jephyr",
"path": "integration/openjdk/8/src/main/java/jephyr/java/lang/ThreadLocal.java",
"license": "mit",
"size": 26477
} | [
"java.util.function.Supplier"
] | import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,407,630 |
protected final StoredNode[] selectAndLock(Txn transaction)
throws LockException, PermissionDeniedException, EXistException,
XPathException, TriggerException {
final java.util.concurrent.locks.Lock globalLock = broker.getBrokerPool().getGlobalUpdateLock();
globalLock.lock();
try {
final NodeL... | final StoredNode[] function(Txn transaction) throws LockException, PermissionDeniedException, EXistException, XPathException, TriggerException { final java.util.concurrent.locks.Lock globalLock = broker.getBrokerPool().getGlobalUpdateLock(); globalLock.lock(); try { final NodeList nl = select(docs); lockedDocuments = (... | /**
* Acquire a lock on all documents processed by this modification. We have
* to avoid that node positions change during the operation.
* feature trigger_update :
* At the same time we leverage on the fact that it's called before
* database modification to call the eventual triggers.
*
* @return The s... | Acquire a lock on all documents processed by this modification. We have to avoid that node positions change during the operation. feature trigger_update : At the same time we leverage on the fact that it's called before database modification to call the eventual triggers | selectAndLock | {
"repo_name": "joewiz/exist",
"path": "src/org/exist/xupdate/Modification.java",
"license": "lgpl-2.1",
"size": 11236
} | [
"org.exist.EXistException",
"org.exist.collections.triggers.TriggerException",
"org.exist.dom.persistent.DocumentImpl",
"org.exist.dom.persistent.NodeSet",
"org.exist.dom.persistent.StoredNode",
"org.exist.security.PermissionDeniedException",
"org.exist.storage.lock.Lock",
"org.exist.storage.txn.Txn",... | import org.exist.EXistException; import org.exist.collections.triggers.TriggerException; import org.exist.dom.persistent.DocumentImpl; import org.exist.dom.persistent.NodeSet; import org.exist.dom.persistent.StoredNode; import org.exist.security.PermissionDeniedException; import org.exist.storage.lock.Lock; import org.... | import org.exist.*; import org.exist.collections.triggers.*; import org.exist.dom.persistent.*; import org.exist.security.*; import org.exist.storage.lock.*; import org.exist.storage.txn.*; import org.exist.util.*; import org.exist.xquery.*; import org.w3c.dom.*; | [
"org.exist",
"org.exist.collections",
"org.exist.dom",
"org.exist.security",
"org.exist.storage",
"org.exist.util",
"org.exist.xquery",
"org.w3c.dom"
] | org.exist; org.exist.collections; org.exist.dom; org.exist.security; org.exist.storage; org.exist.util; org.exist.xquery; org.w3c.dom; | 2,649,324 |
protected ScheduledExecutorService getScheduledExecutorService()
{
if ( scheduler == null )
{
scheduler = Executors.newScheduledThreadPool(2,
new DaemonThreadFactory("JCS-JDBCDiskCacheManager-", Thread.MIN_PRIORITY));
}
return scheduler;
} | ScheduledExecutorService function() { if ( scheduler == null ) { scheduler = Executors.newScheduledThreadPool(2, new DaemonThreadFactory(STR, Thread.MIN_PRIORITY)); } return scheduler; } | /**
* Get the scheduler service (lazily loaded)
*
* @return the scheduler
*/ | Get the scheduler service (lazily loaded) | getScheduledExecutorService | {
"repo_name": "mohanaraosv/commons-jcs",
"path": "commons-jcs-core/src/main/java/org/apache/commons/jcs/auxiliary/disk/jdbc/JDBCDiskCacheFactory.java",
"license": "apache-2.0",
"size": 6328
} | [
"java.util.concurrent.Executors",
"java.util.concurrent.ScheduledExecutorService",
"org.apache.commons.jcs.utils.threadpool.DaemonThreadFactory"
] | import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import org.apache.commons.jcs.utils.threadpool.DaemonThreadFactory; | import java.util.concurrent.*; import org.apache.commons.jcs.utils.threadpool.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,505,625 |
private static void setupSecureConnection(Context context, HttpsURLConnection conn) throws IOException {
final SSLContext sslContext;
try {
// SSL certificates are provided by the Guardian Project:
// https://github.com/guardianproject/cacert
if (trustManagers == ... | static void function(Context context, HttpsURLConnection conn) throws IOException { final SSLContext sslContext; try { if (trustManagers == null) { final KeyStore keyStore = loadCertificates(context); final CustomTrustManager customTrustManager = new CustomTrustManager(keyStore); trustManagers = new TrustManager[] { cu... | /**
* Setup SSL connection.
*/ | Setup SSL connection | setupSecureConnection | {
"repo_name": "pixmob/httpclient",
"path": "src/org/pixmob/httpclient/HttpRequestBuilder.java",
"license": "apache-2.0",
"size": 22161
} | [
"android.content.Context",
"java.io.IOException",
"java.security.GeneralSecurityException",
"java.security.KeyStore",
"javax.net.ssl.HttpsURLConnection",
"javax.net.ssl.SSLContext",
"javax.net.ssl.TrustManager"
] | import android.content.Context; import java.io.IOException; import java.security.GeneralSecurityException; import java.security.KeyStore; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; | import android.content.*; import java.io.*; import java.security.*; import javax.net.ssl.*; | [
"android.content",
"java.io",
"java.security",
"javax.net"
] | android.content; java.io; java.security; javax.net; | 2,875,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.