method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setInterpreters(String noteId, List<String> ids) throws IOException {
putNoteInterpreterSettingBinding(noteId, ids);
} | void function(String noteId, List<String> ids) throws IOException { putNoteInterpreterSettingBinding(noteId, ids); } | /**
* map interpreter ids into noteId
*
* @param noteId note id
* @param ids InterpreterSetting id list
*/ | map interpreter ids into noteId | setInterpreters | {
"repo_name": "spacewalkman/incubator-zeppelin",
"path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterFactory.java",
"license": "apache-2.0",
"size": 47020
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,363,841 |
@Override
public FileStatus getFileStatus(Path f) throws IOException {
HarStatus hstatus = getFileHarStatus(f);
return toFileStatus(hstatus, null);
} | FileStatus function(Path f) throws IOException { HarStatus hstatus = getFileHarStatus(f); return toFileStatus(hstatus, null); } | /**
* return the filestatus of files in har archive.
* The permission returned are that of the archive
* index files. The permissions are not persisted
* while creating a hadoop archive.
* @param f the path in har filesystem
* @return filestatus.
* @throws IOException
*/ | return the filestatus of files in har archive. The permission returned are that of the archive index files. The permissions are not persisted while creating a hadoop archive | getFileStatus | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/HarFileSystem.java",
"license": "apache-2.0",
"size": 34617
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,051,352 |
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
} | void function(Date createdDate) { this.createdDate = createdDate; } | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column profit.created_date
*
* @param createdDate the value for profit.created_date
*
* @mbg.generated Wed Jul 05 12:05:47 CST 2017
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column profit.created_date | setCreatedDate | {
"repo_name": "rosegun/mybatis-generator-pagination",
"path": "sample/src/main/java/com/rosegun/plugin/sample/dto/Profit.java",
"license": "apache-2.0",
"size": 7370
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 343,774 |
public static void findResources(
String host,
String resourceUri,
EnumSet<OcConnectivityType> connectivityTypeSet,
OnResourcesFoundListener onResourcesFoundListener) throws OcException {
OcPlatform.initCheck();
int connTypeInt = 0;
for (OcCo... | static void function( String host, String resourceUri, EnumSet<OcConnectivityType> connectivityTypeSet, OnResourcesFoundListener onResourcesFoundListener) throws OcException { OcPlatform.initCheck(); int connTypeInt = 0; for (OcConnectivityType connType : OcConnectivityType.values()) { if (connectivityTypeSet.contains(... | /**
* API for Service and Resource Discovery
* <p>
* Note: This API is for client side only.
* </p>
*
* @param host Host Address of a service to direct resource discovery query.
* If empty, performs multicast resource discovery query... | API for Service and Resource Discovery Note: This API is for client side only. | findResources | {
"repo_name": "iotivity/iotivity",
"path": "java/iotivity-java/src/main/java/org/iotivity/base/OcPlatform.java",
"license": "apache-2.0",
"size": 48068
} | [
"java.util.EnumSet"
] | import java.util.EnumSet; | import java.util.*; | [
"java.util"
] | java.util; | 280,830 |
@Override
public void parse(final CharSequence string) throws IOException
{
Args.notNull(string, "string");
this.input = new FullyBufferedReader(new StringReader(string.toString()));
this.encoding = null;
}
/**
* Reads and parses markup from an input stream, using UTF-8 encoding by default when not
*... | void function(final CharSequence string) throws IOException { Args.notNull(string, STR); this.input = new FullyBufferedReader(new StringReader(string.toString())); this.encoding = null; } /** * Reads and parses markup from an input stream, using UTF-8 encoding by default when not * specified in XML declaration. * * @pa... | /**
* Parse the given string.
* <p>
* Note: xml character encoding is NOT applied. It is assumed the input provided does have the
* correct encoding already.
*
* @param string
* The input string
* @throws IOException
* Error while reading the resource
*/ | Parse the given string. Note: xml character encoding is NOT applied. It is assumed the input provided does have the correct encoding already | parse | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/markup/parser/XmlPullParser.java",
"license": "apache-2.0",
"size": 18232
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.StringReader",
"org.apache.wicket.util.io.FullyBufferedReader",
"org.apache.wicket.util.lang.Args"
] | import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import org.apache.wicket.util.io.FullyBufferedReader; import org.apache.wicket.util.lang.Args; | import java.io.*; import org.apache.wicket.util.io.*; import org.apache.wicket.util.lang.*; | [
"java.io",
"org.apache.wicket"
] | java.io; org.apache.wicket; | 734,369 |
public void testSqlFieldsQueryNotFullyFetchedMetrics() throws Exception {
IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A");
SqlFieldsQuery qry = new SqlFieldsQuery("select * from Integer");
qry.setPageSize(10);
testQueryNotFullyFetchedMetrics(cache, qry, f... | void function() throws Exception { IgniteCache<String, Integer> cache = grid(0).context().cache().jcache("A"); SqlFieldsQuery qry = new SqlFieldsQuery(STR); qry.setPageSize(10); testQueryNotFullyFetchedMetrics(cache, qry, false); } | /**
* Test metrics for SQL fields queries.
*
* @throws Exception In case of error.
*/ | Test metrics for SQL fields queries | testSqlFieldsQueryNotFullyFetchedMetrics | {
"repo_name": "dlnufox/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheAbstractQueryMetricsSelfTest.java",
"license": "apache-2.0",
"size": 11433
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.query.SqlFieldsQuery"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.SqlFieldsQuery; | import org.apache.ignite.*; import org.apache.ignite.cache.query.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,600,048 |
public void writeString(int prefix, String value) throws IOException {
out.write(prefix);
writeln(value.getBytes(StandardCharsets.UTF_8));
}
| void function(int prefix, String value) throws IOException { out.write(prefix); writeln(value.getBytes(StandardCharsets.UTF_8)); } | /**
* Write string
*
* @param prefix + or -
* @param value Value
* @throws IOException I/O error
*/ | Write string | writeString | {
"repo_name": "nakazawaken1/java-web",
"path": "src/main/java/framework/Redis.java",
"license": "apache-2.0",
"size": 11296
} | [
"java.io.IOException",
"java.nio.charset.StandardCharsets"
] | import java.io.IOException; import java.nio.charset.StandardCharsets; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,035,678 |
public TimeZone getTimeZone() {
if (timeZone == null) {
timeZone = TimeZone.getDefault();
}
return timeZone;
} | TimeZone function() { if (timeZone == null) { timeZone = TimeZone.getDefault(); } return timeZone; } | /**
* Returns the time zone for which this <code>CronExpression</code>
* will be resolved.
*
* @return the time zone
*/ | Returns the time zone for which this <code>CronExpression</code> will be resolved | getTimeZone | {
"repo_name": "zuoyebushiwo/elasticsearch-1.5.0",
"path": "src/main/java/org/xbib/elasticsearch/plugin/jdbc/cron/CronExpression.java",
"license": "apache-2.0",
"size": 46223
} | [
"java.util.TimeZone"
] | import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 50,020 |
public OutputStream create(String src, boolean overwrite, short replication,
long blockSize, Progressable progress, int buffersize)
throws IOException {
return create(src, FsPermission.getFileDefault(),
overwrite ? EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE)
: EnumSet.of(Cr... | OutputStream function(String src, boolean overwrite, short replication, long blockSize, Progressable progress, int buffersize) throws IOException { return create(src, FsPermission.getFileDefault(), overwrite ? EnumSet.of(CreateFlag.CREATE, CreateFlag.OVERWRITE) : EnumSet.of(CreateFlag.CREATE), replication, blockSize, p... | /**
* Call {@link #create(String, FsPermission, EnumSet, short, long,
* Progressable, int, ChecksumOpt)} with default <code>permission</code>
* {@link FsPermission#getFileDefault()}.
*
* @param src File name
* @param overwrite overwrite an existing file if true
* @param replication replication fact... | Call <code>#create(String, FsPermission, EnumSet, short, long, Progressable, int, ChecksumOpt)</code> with default <code>permission</code> <code>FsPermission#getFileDefault()</code> | create | {
"repo_name": "aliyun-beta/aliyun-oss-hadoop-fs",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 108503
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.util.EnumSet",
"org.apache.hadoop.fs.CreateFlag",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.util.Progressable"
] | import java.io.IOException; import java.io.OutputStream; import java.util.EnumSet; import org.apache.hadoop.fs.CreateFlag; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.util.Progressable; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,820,675 |
public static void assertEquals(String message, Attribute expected, Attribute actual, boolean compareDefaultValues) {
Assert.assertEquals(message + " (attribute name)", expected.getName(), actual.getName());
Assert.assertEquals(message + " (attribute type of attribute '" + expected.getName() + "': expected '" + ... | static void function(String message, Attribute expected, Attribute actual, boolean compareDefaultValues) { Assert.assertEquals(message + STR, expected.getName(), actual.getName()); Assert.assertEquals(message + STR + expected.getName() + STR + Ontology.ATTRIBUTE_VALUE_TYPE.mapIndex(expected.getValueType()) + STR + Onto... | /**
* Tests two attributes by using the name, type, block, type, default value and the nominal mapping
*
* @param message message to display if an error occurs
* @param expected expected value
* @param actual actual value
*/ | Tests two attributes by using the name, type, block, type, default value and the nominal mapping | assertEquals | {
"repo_name": "rapidminer/rapidminer-5",
"path": "src/com/rapidminer/test_utils/RapidAssert.java",
"license": "agpl-3.0",
"size": 18055
} | [
"com.rapidminer.example.Attribute",
"com.rapidminer.tools.Ontology",
"junit.framework.Assert"
] | import com.rapidminer.example.Attribute; import com.rapidminer.tools.Ontology; import junit.framework.Assert; | import com.rapidminer.example.*; import com.rapidminer.tools.*; import junit.framework.*; | [
"com.rapidminer.example",
"com.rapidminer.tools",
"junit.framework"
] | com.rapidminer.example; com.rapidminer.tools; junit.framework; | 1,109,589 |
public static Set<Class<?>> getAllInterfacesAsSet(Object instance) {
Assert.notNull(instance, "Instance must not be null");
return getAllInterfacesForClassAsSet(instance.getClass());
} | static Set<Class<?>> function(Object instance) { Assert.notNull(instance, STR); return getAllInterfacesForClassAsSet(instance.getClass()); } | /**
* Return all interfaces that the given instance implements as Set,
* including ones implemented by superclasses.
*
* @param instance
* the instance to analyze for interfaces
* @return all interfaces that the given instance implements as Set
*/ | Return all interfaces that the given instance implements as Set, including ones implemented by superclasses | getAllInterfacesAsSet | {
"repo_name": "HotswapProjects/HotswapAgent",
"path": "hotswap-agent-core/src/main/java/org/hotswap/agent/util/spring/util/ClassUtils.java",
"license": "gpl-2.0",
"size": 55130
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 731,128 |
private boolean isPlayerOpeningInventory(final PlayerInteractEvent event) {
return event.getAction().equals(Action.RIGHT_CLICK_BLOCK);
} | boolean function(final PlayerInteractEvent event) { return event.getAction().equals(Action.RIGHT_CLICK_BLOCK); } | /**
* Test if player is attempting to open a chest by right-clicking
*
* @param event the PlayerInteractEvent being checked
* @return true if player is opening a chest by right-clinking
*/ | Test if player is attempting to open a chest by right-clicking | isPlayerOpeningInventory | {
"repo_name": "tim-savage/SavageDeathChest",
"path": "src/main/java/com/winterhavenmc/deathchest/listeners/PlayerEventListener.java",
"license": "gpl-3.0",
"size": 6969
} | [
"org.bukkit.event.block.Action",
"org.bukkit.event.player.PlayerInteractEvent"
] | import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; | import org.bukkit.event.block.*; import org.bukkit.event.player.*; | [
"org.bukkit.event"
] | org.bukkit.event; | 1,081,924 |
public static <T, R> Function1<T, R> memoizeFunction(final Function<T, R> fn, final Cacheable<R> cache) {
LazyImmutable<R> nullR = LazyImmutable.def();
return t -> t==null? nullR.computeIfAbsent(()->fn.apply(null)) : (R)cache.soften()
.computeIfAbsent(t, (Function) fn);
... | static <T, R> Function1<T, R> function(final Function<T, R> fn, final Cacheable<R> cache) { LazyImmutable<R> nullR = LazyImmutable.def(); return t -> t==null? nullR.computeIfAbsent(()->fn.apply(null)) : (R)cache.soften() .computeIfAbsent(t, (Function) fn); } | /**
* Convert a Function into one that caches it's result
*
* @param fn Function to memoise
* @param cache Cachable to store the results
* @return Memoised Function
*/ | Convert a Function into one that caches it's result | memoizeFunction | {
"repo_name": "aol/cyclops-react",
"path": "cyclops/src/main/java/cyclops/function/Memoize.java",
"license": "apache-2.0",
"size": 16398
} | [
"com.oath.cyclops.util.box.LazyImmutable",
"java.util.function.Function"
] | import com.oath.cyclops.util.box.LazyImmutable; import java.util.function.Function; | import com.oath.cyclops.util.box.*; import java.util.function.*; | [
"com.oath.cyclops",
"java.util"
] | com.oath.cyclops; java.util; | 2,675,705 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<UpgradeOperationHistoricalStatusInfoInner> getOSUpgradeHistory(
String resourceGroupName, String vmScaleSetName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<UpgradeOperationHistoricalStatusInfoInner> getOSUpgradeHistory( String resourceGroupName, String vmScaleSetName); | /**
* Gets list of OS upgrades on a VM scale set instance.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exc... | Gets list of OS upgrades on a VM scale set instance | getOSUpgradeHistory | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java",
"license": "mit",
"size": 129320
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.compute.fluent.models.UpgradeOperationHistoricalStatusInfoInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.compute.fluent.models.UpgradeOperationHistoricalStatusInfoInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 445,789 |
public void removeInvitationListener(WorkgroupInvitationListener invitationListener) {
synchronized (invitationListeners) {
invitationListeners.remove(invitationListener);
}
} | void function(WorkgroupInvitationListener invitationListener) { synchronized (invitationListeners) { invitationListeners.remove(invitationListener); } } | /**
* Removes an invitation listener.
*
* @param invitationListener the invitation listener.
*/ | Removes an invitation listener | removeInvitationListener | {
"repo_name": "Soo000/SooChat",
"path": "src/org/jivesoftware/smackx/workgroup/agent/AgentSession.java",
"license": "apache-2.0",
"size": 45270
} | [
"org.jivesoftware.smackx.workgroup.WorkgroupInvitationListener"
] | import org.jivesoftware.smackx.workgroup.WorkgroupInvitationListener; | import org.jivesoftware.smackx.workgroup.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 2,886,328 |
public interface ComponentPeer
{
int checkImage(Image img, int width, int height,
ImageObserver ob); | interface ComponentPeer { int function(Image img, int width, int height, ImageObserver ob); | /**
* Returns the construction status of the specified image. This is called
* by {@link Component#checkImage(Image, int, int, ImageObserver)}.
*
* @param img the image
* @param width the width of the image
* @param height the height of the image
* @param ob the image observer to be notified of upd... | Returns the construction status of the specified image. This is called by <code>Component#checkImage(Image, int, int, ImageObserver)</code> | checkImage | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/java/awt/peer/ComponentPeer.java",
"license": "bsd-3-clause",
"size": 16128
} | [
"java.awt.Image",
"java.awt.image.ImageObserver"
] | import java.awt.Image; import java.awt.image.ImageObserver; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,553,756 |
static synchronized String getResource(String resourcePath) {
try {
File file = resources.get(resourcePath);
if (file == null) {
String basename = PathUtil.basename(resourcePath);
String prefix;
String suffix;
int lastDot = basename.lastIndexOf(".");
if (lastDot... | static synchronized String getResource(String resourcePath) { try { File file = resources.get(resourcePath); if (file == null) { String basename = PathUtil.basename(resourcePath); String prefix; String suffix; int lastDot = basename.lastIndexOf("."); if (lastDot != -1) { prefix = basename.substring(0, lastDot); suffix ... | /**
* Writes out the given resource as a temp file and returns the absolute path.
* Caches the location of the files, so we can reuse them.
*
* @param resourcePath the name of the resource
*/ | Writes out the given resource as a temp file and returns the absolute path. Caches the location of the files, so we can reuse them | getResource | {
"repo_name": "dengxinyue0420/appinventor-sources",
"path": "appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java",
"license": "apache-2.0",
"size": 62929
} | [
"com.google.common.io.Files",
"com.google.common.io.Resources",
"java.io.File",
"java.io.IOException"
] | import com.google.common.io.Files; import com.google.common.io.Resources; import java.io.File; import java.io.IOException; | import com.google.common.io.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 47,786 |
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
QMachineInterfaceCorePackage theMachineInterfaceCorePackage = (QMachineInterfaceCorePackage... | void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); QMachineInterfaceCorePackage theMachineInterfaceCorePackage = (QMachineInterfaceCorePackage)EPackage.Registry.INSTANCE.getEPackage(QMachineInterfaceCorePackage.eNS_URI); ETypeParameter singleto... | /**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first. | initializePackageContents | {
"repo_name": "smeup/asup",
"path": "org.smeup.sys.mi.core/src/org/smeup/sys/mi/core/util/impl/MachineInterfaceUtilPackageImpl.java",
"license": "epl-1.0",
"size": 20300
} | [
"org.eclipse.emf.ecore.EGenericType",
"org.eclipse.emf.ecore.EOperation",
"org.eclipse.emf.ecore.EPackage",
"org.eclipse.emf.ecore.ETypeParameter",
"org.smeup.sys.mi.core.QMachineInterfaceCorePackage",
"org.smeup.sys.mi.core.util.QFiles",
"org.smeup.sys.mi.core.util.QLists",
"org.smeup.sys.mi.core.uti... | import org.eclipse.emf.ecore.EGenericType; import org.eclipse.emf.ecore.EOperation; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.ETypeParameter; import org.smeup.sys.mi.core.QMachineInterfaceCorePackage; import org.smeup.sys.mi.core.util.QFiles; import org.smeup.sys.mi.core.util.QLists; import or... | import org.eclipse.emf.ecore.*; import org.smeup.sys.mi.core.*; import org.smeup.sys.mi.core.util.*; | [
"org.eclipse.emf",
"org.smeup.sys"
] | org.eclipse.emf; org.smeup.sys; | 940,040 |
NestedSet<Artifact> getAllInputs(boolean prune) {
if (actionCacheInputs == null) {
return defaultInputs;
}
NestedSetBuilder<Artifact> builder = new NestedSetBuilder<>(Order.STABLE_ORDER);
if (prune) {
// actionCacheInputs is never a NestedSet.
builder.addAll(actionCa... | NestedSet<Artifact> getAllInputs(boolean prune) { if (actionCacheInputs == null) { return defaultInputs; } NestedSetBuilder<Artifact> builder = new NestedSetBuilder<>(Order.STABLE_ORDER); if (prune) { builder.addAll(actionCacheInputs); } else { builder.addTransitive(allowedDerivedInputs); } builder.addTransitive(defaul... | /**
* Compute the inputs to request from Skyframe.
*
* @param prune If true, only return default inputs and any inputs from action cache checker.
* Otherwise, return default inputs and all possible derived inputs of the action. Bazel's
* {@link com.google.devtools.build.lib.remote.Remot... | Compute the inputs to request from Skyframe | getAllInputs | {
"repo_name": "bazelbuild/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/ActionExecutionFunction.java",
"license": "apache-2.0",
"size": 73725
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.actions.PackageRootResolver",
"com.google.devtools.build.lib.collect.nestedset.NestedSet",
"com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder",
"com.google.devtools.build.lib.collect.nestedset.Order",
"java.uti... | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.PackageRootResolver; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order... | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 694,276 |
public String getCdnStreamingUrl ()
{
Header cdnHeader = getResponseHeader (FilesConstants.X_CDN_Streaming_URI);
if (cdnHeader != null )
return cdnHeader.getValue();
return null;
} | String function () { Header cdnHeader = getResponseHeader (FilesConstants.X_CDN_Streaming_URI); if (cdnHeader != null ) return cdnHeader.getValue(); return null; } | /**
* Get the SSL URL For a shared container
*
* @return null if the header is not present or the correct value as defined by the header
*/ | Get the SSL URL For a shared container | getCdnStreamingUrl | {
"repo_name": "stacksync/java-cloudfiles",
"path": "src/main/java/com/rackspacecloud/client/cloudfiles/FilesResponse.java",
"license": "mit",
"size": 9643
} | [
"org.apache.http.Header"
] | import org.apache.http.Header; | import org.apache.http.*; | [
"org.apache.http"
] | org.apache.http; | 1,180,656 |
public final Property<Boolean> exchangeFinalNotional() {
return metaBean().exchangeFinalNotional().createProperty(this);
} | final Property<Boolean> function() { return metaBean().exchangeFinalNotional().createProperty(this); } | /**
* Gets the the {@code exchangeFinalNotional} property.
* @return the property, not null
*/ | Gets the the exchangeFinalNotional property | exchangeFinalNotional | {
"repo_name": "DevStreet/FinanceAnalytics",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/swap/SwapSecurityBean.java",
"license": "apache-2.0",
"size": 24017
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 703,311 |
public static void printMessage(Message msg){
try {
OutputStream os = new ByteArrayOutputStream();
msg.writeTo(os);
String s = os.toString();
System.out.println(s);
} catch (Exception e){
log.error("Error in method printMessage", e);
... | static void function(Message msg){ try { OutputStream os = new ByteArrayOutputStream(); msg.writeTo(os); String s = os.toString(); System.out.println(s); } catch (Exception e){ log.error(STR, e); } } | /**
* for testing purpose
*/ | for testing purpose | printMessage | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/util/Utility.java",
"license": "agpl-3.0",
"size": 53607
} | [
"java.io.ByteArrayOutputStream",
"java.io.OutputStream",
"javax.mail.Message"
] | import java.io.ByteArrayOutputStream; import java.io.OutputStream; import javax.mail.Message; | import java.io.*; import javax.mail.*; | [
"java.io",
"javax.mail"
] | java.io; javax.mail; | 1,496,456 |
public static FileStatus[] listStatus(final FileSystem fs, final Path dir) throws IOException {
return listStatus(fs, dir, null);
} | static FileStatus[] function(final FileSystem fs, final Path dir) throws IOException { return listStatus(fs, dir, null); } | /**
* Calls fs.listStatus() and treats FileNotFoundException as non-fatal
* This would accommodates differences between hadoop versions
*
* @param fs file system
* @param dir directory
* @return null if dir is empty or doesn't exist, otherwise FileStatus array
*/ | Calls fs.listStatus() and treats FileNotFoundException as non-fatal This would accommodates differences between hadoop versions | listStatus | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "apache-2.0",
"size": 71457
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 904,328 |
public ArrayList<Node> getOps() {
ArrayList<Node> argsList = new ArrayList<>();
for (Node n : list) {
if (n.relation.matches(Glossary.AMR_OP)) {
argsList.add(n);
}
}
return argsList;
} | ArrayList<Node> function() { ArrayList<Node> argsList = new ArrayList<>(); for (Node n : list) { if (n.relation.matches(Glossary.AMR_OP)) { argsList.add(n); } } return argsList; } | /**
* Restituisce una lista con i sottonodi di tipo :op
*
* @return
*/ | Restituisce una lista con i sottonodi di tipo :op | getOps | {
"repo_name": "infovillasimius/amr2Fred",
"path": "amr2Fred/src/amr2fred/Node.java",
"license": "gpl-3.0",
"size": 9811
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,273,116 |
public static <T> Optional<T> readJsonFile(
String filePath, Class<T> classOfObjectToDeserialize) throws DataConversionException {
assert filePath != null;
File file = new File(filePath);
if (!file.exists()) {
logger.info("Json file " + file + " not found");
... | static <T> Optional<T> function( String filePath, Class<T> classOfObjectToDeserialize) throws DataConversionException { assert filePath != null; File file = new File(filePath); if (!file.exists()) { logger.info(STR + file + STR); return Optional.empty(); } T jsonFile; try { jsonFile = deserializeObjectFromJsonFile(file... | /**
* Returns the Json object from the given file or {@code Optional.empty()} object if the file is not found.
* If any values are missing from the file, default values will be used, as long as the file is a valid json file.
* @param filePath cannot be null.
* @param classOfObjectToDeserialize Json ... | Returns the Json object from the given file or Optional.empty() object if the file is not found. If any values are missing from the file, default values will be used, as long as the file is a valid json file | readJsonFile | {
"repo_name": "CS2103JAN2017-F14-B2/main",
"path": "src/main/java/seedu/task/commons/util/JsonUtil.java",
"license": "mit",
"size": 5582
} | [
"java.io.File",
"java.io.IOException",
"java.util.Optional"
] | import java.io.File; import java.io.IOException; import java.util.Optional; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,220,269 |
public void deploy(
String packageName,
String version,
String[] collections,
boolean shouldInstallClusterPlugins,
String[] parameters,
boolean isUpdate,
boolean noprompt)
throws SolrException {
ensureCollectionsExist(Arrays.asList(collections));
// User wants ... | void function( String packageName, String version, String[] collections, boolean shouldInstallClusterPlugins, String[] parameters, boolean isUpdate, boolean noprompt) throws SolrException { ensureCollectionsExist(Arrays.asList(collections)); boolean pegToLatest = PackageUtils.LATEST.equals(version); SolrPackageInstance... | /**
* Deploys a version of a package to a list of collections.
*
* @param version If null, the most recent version is deployed. EXPERT FEATURE: If version is
* PackageUtils.LATEST, this collection will be auto updated whenever a newer version of this
* package is installed.
* @param isUpdate I... | Deploys a version of a package to a list of collections | deploy | {
"repo_name": "apache/solr",
"path": "solr/core/src/java/org/apache/solr/packagemanager/PackageManager.java",
"license": "apache-2.0",
"size": 46192
} | [
"java.util.Arrays",
"org.apache.solr.common.SolrException",
"org.apache.solr.packagemanager.SolrPackage",
"org.apache.solr.util.SolrVersion"
] | import java.util.Arrays; import org.apache.solr.common.SolrException; import org.apache.solr.packagemanager.SolrPackage; import org.apache.solr.util.SolrVersion; | import java.util.*; import org.apache.solr.common.*; import org.apache.solr.packagemanager.*; import org.apache.solr.util.*; | [
"java.util",
"org.apache.solr"
] | java.util; org.apache.solr; | 1,667,232 |
protected static RegisterPriority registerPriorityOfInputOperand(EnumSet<OperandFlag> flags) {
if (flags.contains(OperandFlag.STACK)) {
return RegisterPriority.ShouldHaveRegister;
}
// all other operands require a register
return RegisterPriority.MustHaveRegister;
} | static RegisterPriority function(EnumSet<OperandFlag> flags) { if (flags.contains(OperandFlag.STACK)) { return RegisterPriority.ShouldHaveRegister; } return RegisterPriority.MustHaveRegister; } | /**
* Determines the priority which with an instruction's input operand will be allocated a
* register.
*/ | Determines the priority which with an instruction's input operand will be allocated a register | registerPriorityOfInputOperand | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java",
"license": "gpl-2.0",
"size": 39794
} | [
"java.util.EnumSet",
"org.graalvm.compiler.lir.LIRInstruction",
"org.graalvm.compiler.lir.alloc.lsra.Interval"
] | import java.util.EnumSet; import org.graalvm.compiler.lir.LIRInstruction; import org.graalvm.compiler.lir.alloc.lsra.Interval; | import java.util.*; import org.graalvm.compiler.lir.*; import org.graalvm.compiler.lir.alloc.lsra.*; | [
"java.util",
"org.graalvm.compiler"
] | java.util; org.graalvm.compiler; | 1,213,350 |
public void setArguments(List<Object> arguments) {
this.arguments = arguments;
}
//endregion
//region > returnValue
private Object returnValue;
/**
* The value returned by the action.
*
* <p>
* Only available for the {@link org.apache.isis.applib.services.e... | void function(List<Object> arguments) { this.arguments = arguments; } private Object returnValue; /** * The value returned by the action. * * <p> * Only available for the {@link org.apache.isis.applib.services.eventbus.AbstractDomainEvent.Phase#EXECUTED} | /**
* Not API - set by the framework.
*/ | Not API - set by the framework | setArguments | {
"repo_name": "incodehq/isis",
"path": "core/applib/src/main/java/org/apache/isis/applib/services/eventbus/ActionDomainEvent.java",
"license": "apache-2.0",
"size": 7602
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 579,704 |
private LocalResource findNextResource() {
synchronized (pending) {
for (Iterator<LocalizerResourceRequestEvent> i = pending.iterator();
i.hasNext();) {
LocalizerResourceRequestEvent evt = i.next();
LocalizedResource nRsrc = evt.getResource();
// Resource downloa... | LocalResource function() { synchronized (pending) { for (Iterator<LocalizerResourceRequestEvent> i = pending.iterator(); i.hasNext();) { LocalizerResourceRequestEvent evt = i.next(); LocalizedResource nRsrc = evt.getResource(); if (nRsrc.getState() != ResourceState.DOWNLOADING) { i.remove(); continue; } if (nRsrc.tryAc... | /**
* Find next resource to be given to a spawned localizer.
*
* @return the next resource to be localized
*/ | Find next resource to be given to a spawned localizer | findNextResource | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java",
"license": "apache-2.0",
"size": 64643
} | [
"java.util.Iterator",
"org.apache.hadoop.yarn.api.records.LocalResource",
"org.apache.hadoop.yarn.api.records.URL",
"org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.event.LocalizerResourceRequestEvent"
] | import java.util.Iterator; import org.apache.hadoop.yarn.api.records.LocalResource; import org.apache.hadoop.yarn.api.records.URL; import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.event.LocalizerResourceRequestEvent; | import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.event.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,251,041 |
public static String getExceptionMessage(String msgID,
Exception originalException) {
try {
Object exArgs[] = { originalException.getMessage() };
String s = MessageFormat.format(resourceBundle.getString(msgID),
... | static String function(String msgID, Exception originalException) { try { Object exArgs[] = { originalException.getMessage() }; String s = MessageFormat.format(resourceBundle.getString(msgID), exArgs); return s; } catch (Throwable t) { if (com.sun.org.apache.xml.internal.security.Init.isInitialized()) { return STRSTR\S... | /**
* Method getExceptionMessage
*
* @param msgID
* @param originalException
* @return message translated
*/ | Method getExceptionMessage | getExceptionMessage | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/I18n.java",
"license": "apache-2.0",
"size": 7242
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 235,929 |
public List<CmsProject> getAllManageableProjects(
CmsDbContext dbc,
CmsOrganizationalUnit orgUnit,
boolean includeSubOus)
throws CmsException {
Set<CmsProject> projects = new HashSet<CmsProject>();
// get the ous where the user has the project manager role
List<... | List<CmsProject> function( CmsDbContext dbc, CmsOrganizationalUnit orgUnit, boolean includeSubOus) throws CmsException { Set<CmsProject> projects = new HashSet<CmsProject>(); List<CmsOrganizationalUnit> ous = getOrgUnitsForRole( dbc, CmsRole.PROJECT_MANAGER.forOrgUnit(orgUnit.getName()), includeSubOus); Set<CmsUUID> us... | /**
* Returns all projects which are owned by the current user or which are manageable
* for the group of the user.<p>
*
* @param dbc the current database context
* @param orgUnit the organizational unit to search project in
* @param includeSubOus if to include sub organizational units
... | Returns all projects which are owned by the current user or which are manageable for the group of the user | getAllManageableProjects | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/db/CmsDriverManager.java",
"license": "lgpl-2.1",
"size": 494693
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.opencms.file.CmsGroup",
"org.opencms.file.CmsProject",
"org.opencms.main.CmsException",
"org.opencms.security.CmsOrganizationalUnit",
"org.opencms.security.CmsRole",... | import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.opencms.file.CmsGroup; import org.opencms.file.CmsProject; import org.opencms.main.CmsException; import org.opencms.security.CmsOrganizationalUnit; impor... | import java.util.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; import org.opencms.util.*; | [
"java.util",
"org.opencms.file",
"org.opencms.main",
"org.opencms.security",
"org.opencms.util"
] | java.util; org.opencms.file; org.opencms.main; org.opencms.security; org.opencms.util; | 2,877,362 |
public List<Item> findByName(String key) {
return this.items.stream()
.filter(item -> item.getName().equals(key))
.collect(Collectors.toList());
} | List<Item> function(String key) { return this.items.stream() .filter(item -> item.getName().equals(key)) .collect(Collectors.toList()); } | /**
* Find all items in array by name.
* @param key - key for search.
* @return all items equals by name.
*/ | Find all items in array by name | findByName | {
"repo_name": "nik1202/EduProject",
"path": "chapter_002/src/main/java/ru/tracker/TrackerForStreamTask.java",
"license": "apache-2.0",
"size": 2130
} | [
"java.util.List",
"java.util.stream.Collectors"
] | import java.util.List; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 2,183,488 |
private Enum<?> readEnum0(@Nullable Class<?> cls) throws BinaryObjectException {
if (checkFlagNoHandles(ENUM) == Flag.NORMAL) {
// Read class even if we know it in advance to set correct stream position.
Class<?> cls0 = BinaryUtils.doReadClass(in, ctx, ldr);
if (cls == n... | Enum<?> function(@Nullable Class<?> cls) throws BinaryObjectException { if (checkFlagNoHandles(ENUM) == Flag.NORMAL) { Class<?> cls0 = BinaryUtils.doReadClass(in, ctx, ldr); if (cls == null) cls = cls0; return BinaryUtils.doReadEnum(in, cls); } else return null; } | /**
* Internal routine to read enum for named field.
*
* @param cls Class.
* @return Value.
* @throws BinaryObjectException In case of error.
*/ | Internal routine to read enum for named field | readEnum0 | {
"repo_name": "agura/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java",
"license": "apache-2.0",
"size": 62687
} | [
"org.apache.ignite.binary.BinaryObjectException",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.binary.BinaryObjectException; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.binary.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 1,219,805 |
public static ImageIcon getImageIconLocalized(String imageName)
{
String locale = Locale.getDefault().getLanguage();
int indexofend = imageName.lastIndexOf('.');
String newImageName = imageName.substring(0, indexofend) + "_" + locale + imageName.substring(indexofend);
URL imag... | static ImageIcon function(String imageName) { String locale = Locale.getDefault().getLanguage(); int indexofend = imageName.lastIndexOf('.'); String newImageName = imageName.substring(0, indexofend) + "_" + locale + imageName.substring(indexofend); URL imageURL = cl.getResource(newImageName); if (imageURL != null) { re... | /**
* Returns a localized version of an image <br>
* by changing the name of <code>image.png</code> to
* <code>image_en.png</code><br>
* if the localized version is not existant it will default to the input
*
* @param imageName
* @return localized image if existant or original image ... | Returns a localized version of an image by changing the name of <code>image.png</code> to <code>image_en.png</code> if the localized version is not existant it will default to the input | getImageIconLocalized | {
"repo_name": "sturesy/client",
"path": "src/src-main/sturesy/core/backend/Loader.java",
"license": "agpl-3.0",
"size": 6715
} | [
"java.util.Locale",
"javax.swing.ImageIcon"
] | import java.util.Locale; import javax.swing.ImageIcon; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,202,367 |
//-----------------//
// privateRegister //
//-----------------//
private int privateRegister (Glyph glyph)
{
int id = glyph.getId();
if (id == 0) {
WeakGlyph weak = new WeakGlyph(glyph);
// Register in index
id = weakIndex.register(w... | int function (Glyph glyph) { int id = glyph.getId(); if (id == 0) { WeakGlyph weak = new WeakGlyph(glyph); id = weakIndex.register(weak); glyph.setIndex(this); } return id; } private static class Constants extends ConstantSet { private final Constant.String vipGlyphs = new Constant.String( STR(Debug) Comma-separated va... | /**
* NOTA: This method is meant to be called <b>ONLY</b> from
* {@link #registerOriginal(omr.glyph.Glyph)} in this class.
*
* @param glyph the glyph to register in glyphIndex
* @return the glyph ID
*/ | <code>#registerOriginal(omr.glyph.Glyph)</code> in this class | privateRegister | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/glyph/GlyphIndex.java",
"license": "agpl-3.0",
"size": 15784
} | [
"java.util.Iterator",
"org.audiveris.omr.constant.Constant",
"org.audiveris.omr.constant.ConstantSet"
] | import java.util.Iterator; import org.audiveris.omr.constant.Constant; import org.audiveris.omr.constant.ConstantSet; | import java.util.*; import org.audiveris.omr.constant.*; | [
"java.util",
"org.audiveris.omr"
] | java.util; org.audiveris.omr; | 218,262 |
@Override
public void begin(String namespace, String name, Attributes attributes)
throws Exception {
// Push an array to capture the parameter values if necessary
if (paramCount > 0) {
Object parameters[] = new Object[paramCount];
for (int i = 0; i < paramete... | void function(String namespace, String name, Attributes attributes) throws Exception { if (paramCount > 0) { Object parameters[] = new Object[paramCount]; for (int i = 0; i < parameters.length; i++) { parameters[i] = null; } digester.pushParams(parameters); } } | /**
* Process the start of this element.
*
* @param namespace the namespace URI of the matching element, or an
* empty string if the parser is not namespace aware or the element has
* no namespace
* @param name the local name if the parser is namespace aware, or just
* the eleme... | Process the start of this element | begin | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/tomcat/util/digester/CallMethodRule.java",
"license": "apache-2.0",
"size": 16837
} | [
"org.xml.sax.Attributes"
] | import org.xml.sax.Attributes; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,876,302 |
public List<LinkedServiceInfo> linkService(OioUrl url, String type,
RequestContext reqCtx) throws OioException {
checkArgument(!nullOrEmpty(type), "Missing type");
OioHttpResponse resp = http.post(
format(DIR_LINK_SRV_FORMAT, settings.url(), settings.ns(),
... | List<LinkedServiceInfo> function(OioUrl url, String type, RequestContext reqCtx) throws OioException { checkArgument(!nullOrEmpty(type), STR); OioHttpResponse resp = http.post( format(DIR_LINK_SRV_FORMAT, settings.url(), settings.ns(), Strings.urlEncode(url.account()), Strings.urlEncode(url.container()), type)) .hosts(... | /**
* Attachs a service of the specified type to a reference
*
* @param url
* the url of the reference
* @param type
* the type of service to link
* @param reqCtx
* common parameters to all requests
* @return the linked services
* @thro... | Attachs a service of the specified type to a reference | linkService | {
"repo_name": "open-io/oio-api-java",
"path": "src/main/java/io/openio/sds/proxy/ProxyClient.java",
"license": "lgpl-3.0",
"size": 69667
} | [
"io.openio.sds.RequestContext",
"io.openio.sds.common.Check",
"io.openio.sds.common.Strings",
"io.openio.sds.exceptions.OioException",
"io.openio.sds.http.OioHttpResponse",
"io.openio.sds.models.LinkedServiceInfo",
"io.openio.sds.models.OioUrl",
"java.lang.String",
"java.util.List"
] | import io.openio.sds.RequestContext; import io.openio.sds.common.Check; import io.openio.sds.common.Strings; import io.openio.sds.exceptions.OioException; import io.openio.sds.http.OioHttpResponse; import io.openio.sds.models.LinkedServiceInfo; import io.openio.sds.models.OioUrl; import java.lang.String; import java.ut... | import io.openio.sds.*; import io.openio.sds.common.*; import io.openio.sds.exceptions.*; import io.openio.sds.http.*; import io.openio.sds.models.*; import java.lang.*; import java.util.*; | [
"io.openio.sds",
"java.lang",
"java.util"
] | io.openio.sds; java.lang; java.util; | 454,423 |
public Set<ProductVersion> addVersion(ProductVersion version) {
productVersions.add(version);
return productVersions;
}
public static class Builder {
private Integer id;
private String name;
private String description;
private String abbreviation;
... | Set<ProductVersion> function(ProductVersion version) { productVersions.add(version); return productVersions; } public static class Builder { private Integer id; private String name; private String description; private String abbreviation; private String productCode; private String pgmSystemName; private Set<ProductVers... | /**
* Add a version for the Product
*
* @param version
* @return
*/ | Add a version for the Product | addVersion | {
"repo_name": "mareknovotny/pnc",
"path": "model/src/main/java/org/jboss/pnc/model/Product.java",
"license": "apache-2.0",
"size": 6754
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 51,988 |
@NotNull
@Contract(pure = true)
public YamlConfiguration getSigns() {
return signs;
} | @Contract(pure = true) YamlConfiguration function() { return signs; } | /**
* Returns the signs.yml YAML configuration
*
* @return the YAML configuration
* @since 2.1.0
*/ | Returns the signs.yml YAML configuration | getSigns | {
"repo_name": "stefvanschie/buildinggame",
"path": "addon/src/main/java/com/gmail/stefvanschiedev/buildinggame/files/SettingsManager.java",
"license": "unlicense",
"size": 3572
} | [
"org.bukkit.configuration.file.YamlConfiguration",
"org.jetbrains.annotations.Contract"
] | import org.bukkit.configuration.file.YamlConfiguration; import org.jetbrains.annotations.Contract; | import org.bukkit.configuration.file.*; import org.jetbrains.annotations.*; | [
"org.bukkit.configuration",
"org.jetbrains.annotations"
] | org.bukkit.configuration; org.jetbrains.annotations; | 1,322,932 |
public ServiceResponse<Void> head204() throws ErrorException, IOException {
Call<Void> call = service.head204();
return head204Delegate(call.execute());
} | ServiceResponse<Void> function() throws ErrorException, IOException { Call<Void> call = service.head204(); return head204Delegate(call.execute()); } | /**
* Return 204 status code if successful.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the {@link ServiceResponse} object if successful.
*/ | Return 204 status code if successful | head204 | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpSuccessImpl.java",
"license": "mit",
"size": 71792
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 2,208,686 |
public boolean setAttribute( final String domain, final String key, final Object value ) {
if ( LibRepositoryBoot.REPOSITORY_DOMAIN.equals( domain ) ) {
if ( LibRepositoryBoot.VERSION_ATTRIBUTE.equals( key ) ) {
if ( value instanceof Date ) {
final Date date = (Date) value;
retur... | boolean function( final String domain, final String key, final Object value ) { if ( LibRepositoryBoot.REPOSITORY_DOMAIN.equals( domain ) ) { if ( LibRepositoryBoot.VERSION_ATTRIBUTE.equals( key ) ) { if ( value instanceof Date ) { final Date date = (Date) value; return backend.setLastModified( date.getTime() ); } else... | /**
* Updates the attribute value for the given attribute domain and name. If the element is not writable or the
* attribute could not be updated for any other reason, the method will return false. This method only returns true,
* if the attribute has been updated successfully.
*
* @param domain the attr... | Updates the attribute value for the given attribute domain and name. If the element is not writable or the attribute could not be updated for any other reason, the method will return false. This method only returns true, if the attribute has been updated successfully | setAttribute | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "libraries/librepository/src/main/java/org/pentaho/reporting/libraries/repository/file/FileContentEntity.java",
"license": "lgpl-2.1",
"size": 6209
} | [
"java.util.Date",
"org.pentaho.reporting.libraries.repository.LibRepositoryBoot"
] | import java.util.Date; import org.pentaho.reporting.libraries.repository.LibRepositoryBoot; | import java.util.*; import org.pentaho.reporting.libraries.repository.*; | [
"java.util",
"org.pentaho.reporting"
] | java.util; org.pentaho.reporting; | 2,659,967 |
public void onClick(View view) {
Intent intent = new Intent();
switch(view.getId()) {
case R.id.addFindButton :
intent.setClass(this, FindActivity.class);
intent.setAction(Intent.ACTION_INSERT);
startActivity(intent);
break;
case R.id.listFindButton :
intent.setClass(this, ListFindsActivity.c... | void function(View view) { Intent intent = new Intent(); switch(view.getId()) { case R.id.addFindButton : intent.setClass(this, FindActivity.class); intent.setAction(Intent.ACTION_INSERT); startActivity(intent); break; case R.id.listFindButton : intent.setClass(this, ListFindsActivity.class); startActivity(intent); bre... | /**
* Handles clicks on PositMain's buttons.
*/ | Handles clicks on PositMain's buttons | onClick | {
"repo_name": "google-code-export/posit-mobile",
"path": "android/src/org/hfoss/posit/PositMain.java",
"license": "lgpl-2.1",
"size": 10433
} | [
"android.content.Intent",
"android.view.View"
] | import android.content.Intent; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 2,416,351 |
Set<Configuration> getAll(); | Set<Configuration> getAll(); | /**
* Returns all the configurations belonging to the same configuration container as this
* configuration (including this configuration).
*
* @return All of the configurations belong to the configuration container that this set belongs to.
*/ | Returns all the configurations belonging to the same configuration container as this configuration (including this configuration) | getAll | {
"repo_name": "gstevey/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/Configuration.java",
"license": "apache-2.0",
"size": 19285
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,193,675 |
@Test()
public void testThrowOnRequest()
throws Exception
{
TestRequestHandler.setThrowOnProcessRequest(true);
try
{
final LDAPListener listener = new LDAPListener(new LDAPListenerConfig(0,
new TestRequestHandler()));
listener.startListening();
final LDAPConnect... | @Test() void function() throws Exception { TestRequestHandler.setThrowOnProcessRequest(true); try { final LDAPListener listener = new LDAPListener(new LDAPListenerConfig(0, new TestRequestHandler())); listener.startListening(); final LDAPConnection conn = new LDAPConnection(STR, listener.getListenPort()); final AddRequ... | /**
* Tests the behavior when the request handler throws an unexpected exception
* in the course of processing a request.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when the request handler throws an unexpected exception in the course of processing a request | testThrowOnRequest | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/listener/LDAPListenerClientConnectionTestCase.java",
"license": "gpl-2.0",
"size": 8441
} | [
"com.unboundid.ldap.sdk.AddRequest",
"com.unboundid.ldap.sdk.CompareRequest",
"com.unboundid.ldap.sdk.DeleteRequest",
"com.unboundid.ldap.sdk.ExtendedRequest",
"com.unboundid.ldap.sdk.LDAPConnection",
"com.unboundid.ldap.sdk.ModifyDNRequest",
"com.unboundid.ldap.sdk.ModifyRequest",
"com.unboundid.ldap... | import com.unboundid.ldap.sdk.AddRequest; import com.unboundid.ldap.sdk.CompareRequest; import com.unboundid.ldap.sdk.DeleteRequest; import com.unboundid.ldap.sdk.ExtendedRequest; import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.ModifyDNRequest; import com.unboundid.ldap.sdk.ModifyRequest; im... | import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.ldap; org.testng.annotations; | 876,594 |
void onPodcastLoaded(Podcast podcast); | void onPodcastLoaded(Podcast podcast); | /**
* Called on completion.
*
* @param podcast Podcast loaded.
*/ | Called on completion | onPodcastLoaded | {
"repo_name": "salema/Podcatcher-Deluxe-Android-Studio",
"path": "app/src/main/java/com/podcatcher/deluxe/listeners/OnLoadPodcastListener.java",
"license": "gpl-3.0",
"size": 3111
} | [
"com.podcatcher.deluxe.model.types.Podcast"
] | import com.podcatcher.deluxe.model.types.Podcast; | import com.podcatcher.deluxe.model.types.*; | [
"com.podcatcher.deluxe"
] | com.podcatcher.deluxe; | 1,896,804 |
protected void replyItemNotFoundPacket(IQ request) {
XMPPError xmppError = new XMPPError(XMPPError.Condition.item_not_found);
IQ error = IQ.createErrorResponse(request, xmppError);
this.connection.sendPacket(error);
}
| void function(IQ request) { XMPPError xmppError = new XMPPError(XMPPError.Condition.item_not_found); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendPacket(error); } | /**
* Responses to the given IQ packet's sender with an XMPP error that an
* In-Band Bytestream session could not be found.
*
* @param request
* IQ packet that should be answered with a item-not-found error
*/ | Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream session could not be found | replyItemNotFoundPacket | {
"repo_name": "ikantech/xmppsupport_v2",
"path": "src/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java",
"license": "gpl-2.0",
"size": 20740
} | [
"org.jivesoftware.smack.packet.IQ",
"org.jivesoftware.smack.packet.XMPPError"
] | import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.XMPPError; | import org.jivesoftware.smack.packet.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 404,100 |
public void setClip(Shape clip) {
if (clip == null) {
return;
}
Path clipPath = toSwtPath(clip);
this.gc.setClipping(clipPath);
clipPath.dispose();
} | void function(Shape clip) { if (clip == null) { return; } Path clipPath = toSwtPath(clip); this.gc.setClipping(clipPath); clipPath.dispose(); } | /**
* Sets the clip region.
*
* @param clip the clip.
*/ | Sets the clip region | setClip | {
"repo_name": "gama-platform/gama.cloud",
"path": "ummisco.gama.java2d_web/src/ummisco/gama/java2d/SWTGraphics2D.java",
"license": "agpl-3.0",
"size": 74442
} | [
"java.awt.Shape",
"org.eclipse.swt.graphics.Path"
] | import java.awt.Shape; import org.eclipse.swt.graphics.Path; | import java.awt.*; import org.eclipse.swt.graphics.*; | [
"java.awt",
"org.eclipse.swt"
] | java.awt; org.eclipse.swt; | 1,679,811 |
private void renderSplitString (String par1Str, int par2, int par3, int par4, boolean par5)
{
List<String> list = this.listFormattedStringToWidth(par1Str, par4);
for (Iterator<String> iterator = list.iterator(); iterator.hasNext(); par3 += this.FONT_HEIGHT)
{
String s1 = ite... | void function (String par1Str, int par2, int par3, int par4, boolean par5) { List<String> list = this.listFormattedStringToWidth(par1Str, par4); for (Iterator<String> iterator = list.iterator(); iterator.hasNext(); par3 += this.FONT_HEIGHT) { String s1 = iterator.next(); this.renderStringAligned(s1, par2, par3, par4, t... | /**
* Perform actual work of rendering a multi-line string with wordwrap and with darker drop shadow color if flag is
* set
*/ | Perform actual work of rendering a multi-line string with wordwrap and with darker drop shadow color if flag is set | renderSplitString | {
"repo_name": "tterrag1098/ARKCraft-Code",
"path": "src/main/java/com/arkcraft/mod/core/book/SmallFontRenderer.java",
"license": "mit",
"size": 32503
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,674,617 |
public static void appendFile(FileSystem fs, Path p, int length)
throws IOException {
assert fs.exists(p);
assert length >= 0;
byte[] toAppend = new byte[length];
Random random = new Random();
random.nextBytes(toAppend);
try (FSDataOutputStream out = fs.append(p)) {
out.write(toApp... | static void function(FileSystem fs, Path p, int length) throws IOException { assert fs.exists(p); assert length >= 0; byte[] toAppend = new byte[length]; Random random = new Random(); random.nextBytes(toAppend); try (FSDataOutputStream out = fs.append(p)) { out.write(toAppend); } } | /**
* Append specified length of bytes to a given file
* @param fs The file system
* @param p Path of the file to append
* @param length Length of bytes to append to the file
* @throws IOException
*/ | Append specified length of bytes to a given file | appendFile | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java",
"license": "apache-2.0",
"size": 95400
} | [
"java.io.IOException",
"java.util.Random",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.util.Random; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,255,418 |
private String paramSubstitution(String template, String query) {
final String locale = Locale.getDefault().toString();
template = template.replaceAll(MOZ_PARAM_LOCALE, locale);
template = template.replaceAll(MOZ_PARAM_DIST_ID, "");
template = template.replaceAll(MOZ_PARAM_OFFICIAL,... | String function(String template, String query) { final String locale = Locale.getDefault().toString(); template = template.replaceAll(MOZ_PARAM_LOCALE, locale); template = template.replaceAll(MOZ_PARAM_DIST_ID, STRunofficialSTRUTF-8STRUTF-8STR"); return template; } | /**
* Formats template string with proper parameters. Modeled after
* ParamSubstitution in nsSearchService.js
*
* @param template
* @param query
* @return
*/ | Formats template string with proper parameters. Modeled after ParamSubstitution in nsSearchService.js | paramSubstitution | {
"repo_name": "mastizada/focus-android",
"path": "app/src/main/java/org/mozilla/focus/search/SearchEngine.java",
"license": "mpl-2.0",
"size": 3989
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,425,115 |
final public double getyScale() {
return Display.getHeight() / ySize;
}
| final double function() { return Display.getHeight() / ySize; } | /**
* Gets the y scale of this camera. This is dependent of the width of the
* screen, and also the size of the viewport.
*
* If the game contains tiles, this number is generally the size of those
* tiles in pixels.
*
* @return The scale of the viewport for coordinates vs pixels
*/ | Gets the y scale of this camera. This is dependent of the width of the screen, and also the size of the viewport. If the game contains tiles, this number is generally the size of those tiles in pixels | getyScale | {
"repo_name": "bfan94/Sbdi",
"path": "src/com/lukke100/sbdi/Camera.java",
"license": "gpl-3.0",
"size": 7266
} | [
"org.lwjgl.opengl.Display"
] | import org.lwjgl.opengl.Display; | import org.lwjgl.opengl.*; | [
"org.lwjgl.opengl"
] | org.lwjgl.opengl; | 2,289,592 |
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException {
int cacheSyncType = stream.read();
this.cacheSynchronizationType = cacheSyncType;
// The boolean variables have been assembled into a byte.
// Extract them here
this... | void function(java.io.ObjectInputStream stream) throws java.io.IOException, ClassNotFoundException { int cacheSyncType = stream.read(); this.cacheSynchronizationType = cacheSyncType; this.shouldBeDeleted = stream.readBoolean(); this.isInvalid = stream.readBoolean(); this.isNew = stream.readBoolean(); this.isAggregate =... | /**
* INTERNAL:
* Override the default serialization. Object Change Sets will be serialized differently
* depending on the type of cache synchronization they use.
*/ | Override the default serialization. Object Change Sets will be serialized differently depending on the type of cache synchronization they use | readObject | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/ObjectChangeSet.java",
"license": "epl-1.0",
"size": 56003
} | [
"org.eclipse.persistence.descriptors.ClassDescriptor"
] | import org.eclipse.persistence.descriptors.ClassDescriptor; | import org.eclipse.persistence.descriptors.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,189,224 |
public SnapshotInfo snapshot(final String repositoryName, final SnapshotId snapshotId) {
List<SnapshotsInProgress.Entry> entries = currentSnapshots(repositoryName, Arrays.asList(snapshotId.getName()));
if (!entries.isEmpty()) {
return inProgressSnapshot(entries.iterator().next());
... | SnapshotInfo function(final String repositoryName, final SnapshotId snapshotId) { List<SnapshotsInProgress.Entry> entries = currentSnapshots(repositoryName, Arrays.asList(snapshotId.getName())); if (!entries.isEmpty()) { return inProgressSnapshot(entries.iterator().next()); } return repositoriesService.repository(repos... | /**
* Retrieves snapshot from repository
*
* @param repositoryName repository name
* @param snapshotId snapshot id
* @return snapshot
* @throws SnapshotMissingException if snapshot is not found
*/ | Retrieves snapshot from repository | snapshot | {
"repo_name": "wangtuo/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java",
"license": "apache-2.0",
"size": 86285
} | [
"java.util.Arrays",
"java.util.List",
"org.elasticsearch.cluster.SnapshotsInProgress"
] | import java.util.Arrays; import java.util.List; import org.elasticsearch.cluster.SnapshotsInProgress; | import java.util.*; import org.elasticsearch.cluster.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 112,350 |
protected String replace(String str)
{
// Implementation is copied from ClassLoaderLogManager.replace(),
// but added special processing for catalina.home and catalina.base.
String result = str;
int pos_start = str.indexOf("${");
if (pos_start >= 0) {
StringBuilder builder = new StringBuilder();
int... | String function(String str) { String result = str; int pos_start = str.indexOf("${"); if (pos_start >= 0) { StringBuilder builder = new StringBuilder(); int pos_end = -1; while (pos_start >= 0) { builder.append(str, pos_end + 1, pos_start); pos_end = str.indexOf('}', pos_start + 2); if (pos_end < 0) { pos_end = pos_sta... | /**
* System property replacement in the given string.
*
* @param str
* The original string
* @return the modified string
*/ | System property replacement in the given string | replace | {
"repo_name": "emacslisp/Java",
"path": "TomcatReading/src/org/apache/catalina/startup/Bootstrap.java",
"license": "mit",
"size": 16357
} | [
"org.apache.catalina.Globals"
] | import org.apache.catalina.Globals; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,388,110 |
@Test
public void test_GetClassNameAliasForXML() {
System.out.println("Testing InitialPbModelET's getClassNameAliasForXML()");
String modelName = "test instance";
int versionNumber = 0;
int minorVersionNumber = 0;
String labName = "lab instance";
String dateCertif... | void function() { System.out.println(STR); String modelName = STR; int versionNumber = 0; int minorVersionNumber = 0; String labName = STR; String dateCertified = STR; String reference = STR; String comment = STR; AbstractRatiosDataModel instance = new InitialPbModelET(modelName,versionNumber,minorVersionNumber,labName... | /**
* Test of getClassNameAliasForXML method, of class InitialPbModelET.
*/ | Test of getClassNameAliasForXML method, of class InitialPbModelET | test_GetClassNameAliasForXML | {
"repo_name": "bowring/ET_Redux",
"path": "src/test/java/org/earthtime/ratioDataModels/initialPbModelsET/InitialPbModelETTest.java",
"license": "apache-2.0",
"size": 20412
} | [
"org.earthtime.ratioDataModels.AbstractRatiosDataModel",
"org.junit.Assert"
] | import org.earthtime.ratioDataModels.AbstractRatiosDataModel; import org.junit.Assert; | import org.earthtime.*; import org.junit.*; | [
"org.earthtime",
"org.junit"
] | org.earthtime; org.junit; | 1,560,391 |
void setRole(Channel channel, OFControllerRole role); | void setRole(Channel channel, OFControllerRole role); | /**
* Sets a role of the controller with a given channel.
*
* @param channel openflow channel
* @param role role of the controller
*/ | Sets a role of the controller with a given channel | setRole | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "apps/ofagent/src/main/java/org/onosproject/ofagent/api/OFControllerRoleService.java",
"license": "apache-2.0",
"size": 1809
} | [
"io.netty.channel.Channel",
"org.projectfloodlight.openflow.protocol.OFControllerRole"
] | import io.netty.channel.Channel; import org.projectfloodlight.openflow.protocol.OFControllerRole; | import io.netty.channel.*; import org.projectfloodlight.openflow.protocol.*; | [
"io.netty.channel",
"org.projectfloodlight.openflow"
] | io.netty.channel; org.projectfloodlight.openflow; | 479,405 |
protected String getPrincipalAttributeValue(final Principal principal,
final String attributeName) {
val attributes = principal.getAttributes();
if (attributes.containsKey(attributeName)) {
return CollectionUtils.toCollection(attributes.get... | String function(final Principal principal, final String attributeName) { val attributes = principal.getAttributes(); if (attributes.containsKey(attributeName)) { return CollectionUtils.toCollection(attributes.get(attributeName)).iterator().next().toString(); } return null; } | /**
* Gets principal attribute value.
*
* @param principal the principal
* @param attributeName the attribute name
* @return the principal attribute value
*/ | Gets principal attribute value | getPrincipalAttributeValue | {
"repo_name": "apereo/cas",
"path": "support/cas-server-support-scim-core/src/main/java/org/apereo/cas/scim/v2/DefaultScimV2PrincipalAttributeMapper.java",
"license": "apache-2.0",
"size": 3666
} | [
"org.apereo.cas.authentication.principal.Principal",
"org.apereo.cas.util.CollectionUtils"
] | import org.apereo.cas.authentication.principal.Principal; import org.apereo.cas.util.CollectionUtils; | import org.apereo.cas.authentication.principal.*; import org.apereo.cas.util.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 2,453,515 |
public List<CapacityDevelopmentType> findAll();
| List<CapacityDevelopmentType> function(); | /**
* This method gets a list of capacityDevelopmentType that are active
*
* @return a list from CapacityDevelopmentType null if no exist records
*/ | This method gets a list of capacityDevelopmentType that are active | findAll | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ICapacityDevelopmentTypeService.java",
"license": "gpl-3.0",
"size": 3440
} | [
"java.util.List",
"org.cgiar.ccafs.marlo.data.model.CapacityDevelopmentType"
] | import java.util.List; import org.cgiar.ccafs.marlo.data.model.CapacityDevelopmentType; | import java.util.*; import org.cgiar.ccafs.marlo.data.model.*; | [
"java.util",
"org.cgiar.ccafs"
] | java.util; org.cgiar.ccafs; | 1,311,029 |
@Override
protected Class<?> getExpectedType() {
return Time.class;
} | Class<?> function() { return Time.class; } | /**
* Gets the expected type
* @return The expected type
*/ | Gets the expected type | getExpectedType | {
"repo_name": "apache/commons-beanutils",
"path": "src/test/java/org/apache/commons/beanutils2/converters/SqlTimeConverterTestCase.java",
"license": "apache-2.0",
"size": 4391
} | [
"java.sql.Time"
] | import java.sql.Time; | import java.sql.*; | [
"java.sql"
] | java.sql; | 794,932 |
@ApiModelProperty(value = "Link to the next subset of resources qualified. Empty if no more resources are to be returned. ")
public String getNext() {
return next;
} | @ApiModelProperty(value = STR) String function() { return next; } | /**
* Link to the next subset of resources qualified. Empty if no more resources are to be returned.
* @return next
**/ | Link to the next subset of resources qualified. Empty if no more resources are to be returned | getNext | {
"repo_name": "Minoli/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.analytics/src/gen/java/org/wso2/carbon/apimgt/rest/api/analytics/dto/APICountListDTO.java",
"license": "apache-2.0",
"size": 3747
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,904,919 |
public List<StripeStatistics> getStripeStatistics() throws IOException {
if (reader == null) {
LOG.warn("Please use Reader.getStripeStatistics or give `Reader` to OrcTail constructor.");
return new ArrayList<>();
} else {
return reader.getStripeStatistics();
}
} | List<StripeStatistics> function() throws IOException { if (reader == null) { LOG.warn(STR); return new ArrayList<>(); } else { return reader.getStripeStatistics(); } } | /**
* Get the stripe statistics from the file tail.
* This code is for compatibility with ORC 1.5.
* @return the stripe statistics
* @deprecated the user should use Reader.getStripeStatistics instead.
*/ | Get the stripe statistics from the file tail. This code is for compatibility with ORC 1.5 | getStripeStatistics | {
"repo_name": "apache/orc",
"path": "java/core/src/java/org/apache/orc/impl/OrcTail.java",
"license": "apache-2.0",
"size": 7084
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.orc.StripeStatistics"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.orc.StripeStatistics; | import java.io.*; import java.util.*; import org.apache.orc.*; | [
"java.io",
"java.util",
"org.apache.orc"
] | java.io; java.util; org.apache.orc; | 636,322 |
@Pure
public static <P extends MapPolyline> P getNearest(Tree<P, GISTreeSetNode<P>> tree, double x, double y) {
final NearNodeSelector<P> selector = new NearNodeSelector<>(x, y);
return selector.select(tree);
} | static <P extends MapPolyline> P function(Tree<P, GISTreeSetNode<P>> tree, double x, double y) { final NearNodeSelector<P> selector = new NearNodeSelector<>(x, y); return selector.select(tree); } | /** Replies the nearest polyline that has one of its ends near to the specified point.
*
* @param <P> is the type of user data.
* @param tree is the tree to explore
* @param x is one coordinate of the point
* @param y is one coordinate of the point
* @return the nearest polyline to the specified point... | Replies the nearest polyline that has one of its ends near to the specified point | getNearest | {
"repo_name": "gallandarakhneorg/afc",
"path": "advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/tree/MapPolylineTreeSet.java",
"license": "apache-2.0",
"size": 13935
} | [
"org.arakhne.afc.gis.mapelement.MapPolyline",
"org.arakhne.afc.math.tree.Tree"
] | import org.arakhne.afc.gis.mapelement.MapPolyline; import org.arakhne.afc.math.tree.Tree; | import org.arakhne.afc.gis.mapelement.*; import org.arakhne.afc.math.tree.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 1,214,307 |
private void iniciarJuego(int mano)
{
Intent i;
if(siguientePantalla.equals("libre"))
{
i = new Intent(this, ARXylophoneLibre.class);
i.putExtra("mano", mano);
startActivity(i);
}else if(siguientePantalla.equals("guiado"))
{
i = new Intent... | void function(int mano) { Intent i; if(siguientePantalla.equals("libre")) { i = new Intent(this, ARXylophoneLibre.class); i.putExtra("mano", mano); startActivity(i); }else if(siguientePantalla.equals(STR)) { i = new Intent(this, ARXylophoneGuiada.class); i.putExtra("mano", mano); i.putExtra(STR, informacionExtra); star... | /**
* Inicia el juego correspondiente con la mano seleccionada
* @param mano
*/ | Inicia el juego correspondiente con la mano seleccionada | iniciarJuego | {
"repo_name": "DavidGSola/ARXylophone",
"path": "src/com/CojiSoft/ARXylophone/PantallaSeleccionMano.java",
"license": "apache-2.0",
"size": 3046
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,669,097 |
public ArrayList<BluetoothDevice> getPairedDevices() {
Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();
ArrayList<BluetoothDevice> deviceList = new ArrayList<>();
// check has paired devices or not
if(pairedDevices.size() > 0) {
// initiate array list
//deviceList = new ArrayL... | ArrayList<BluetoothDevice> function() { Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices(); ArrayList<BluetoothDevice> deviceList = new ArrayList<>(); if(pairedDevices.size() > 0) { for(BluetoothDevice device : pairedDevices) { deviceList.add(device); } } return deviceList; } | /**
* Returns paired devices connected with this device
*
* @return deviceList
*/ | Returns paired devices connected with this device | getPairedDevices | {
"repo_name": "Nabid/BluetoothRobotController",
"path": "app/src/main/java/com/prome/bluetoothdevicecontroller/helpers/BluetoothHelper.java",
"license": "mit",
"size": 10604
} | [
"android.bluetooth.BluetoothDevice",
"java.util.ArrayList",
"java.util.Set"
] | import android.bluetooth.BluetoothDevice; import java.util.ArrayList; import java.util.Set; | import android.bluetooth.*; import java.util.*; | [
"android.bluetooth",
"java.util"
] | android.bluetooth; java.util; | 101,554 |
public IPathwayRepresentation create(AGLView remoteRenderingView, PathwayGraph pathway,
List<TablePerspective> tablePerspectives, TablePerspective mappingTablePerspective,
String embeddingEventSpace); | IPathwayRepresentation function(AGLView remoteRenderingView, PathwayGraph pathway, List<TablePerspective> tablePerspectives, TablePerspective mappingTablePerspective, String embeddingEventSpace); | /**
* Creates a pathway view.
*
* @param remoteRenderingView
* View that remote-renders the created view.
* @param pathway
* The pathway for the view.
* @param tablePerspectives
* The tableperspectives associated with this pathway. Can be used for multi-table perspective... | Creates a pathway view | create | {
"repo_name": "Caleydo/caleydo",
"path": "org.caleydo.datadomain.pathway/src/org/caleydo/datadomain/pathway/embedding/IPathwayRepresentationCreator.java",
"license": "bsd-3-clause",
"size": 1700
} | [
"java.util.List",
"org.caleydo.core.data.perspective.table.TablePerspective",
"org.caleydo.core.view.opengl.canvas.AGLView",
"org.caleydo.datadomain.pathway.IPathwayRepresentation",
"org.caleydo.datadomain.pathway.graph.PathwayGraph"
] | import java.util.List; import org.caleydo.core.data.perspective.table.TablePerspective; import org.caleydo.core.view.opengl.canvas.AGLView; import org.caleydo.datadomain.pathway.IPathwayRepresentation; import org.caleydo.datadomain.pathway.graph.PathwayGraph; | import java.util.*; import org.caleydo.core.data.perspective.table.*; import org.caleydo.core.view.opengl.canvas.*; import org.caleydo.datadomain.pathway.*; import org.caleydo.datadomain.pathway.graph.*; | [
"java.util",
"org.caleydo.core",
"org.caleydo.datadomain"
] | java.util; org.caleydo.core; org.caleydo.datadomain; | 2,132,766 |
public RowSet findOutputRowSet( String from, int fromcopy, String to, int tocopy ) {
for ( RowSet rs : outputRowSets ) {
if ( rs.getOriginStepName().equalsIgnoreCase( from )
&& rs.getDestinationStepName().equalsIgnoreCase( to ) && rs.getOriginStepCopy() == fromcopy
&& rs.getDestinationStepCo... | RowSet function( String from, int fromcopy, String to, int tocopy ) { for ( RowSet rs : outputRowSets ) { if ( rs.getOriginStepName().equalsIgnoreCase( from ) && rs.getDestinationStepName().equalsIgnoreCase( to ) && rs.getOriginStepCopy() == fromcopy && rs.getDestinationStepCopy() == tocopy ) { return rs; } } if ( base... | /**
* Find an output rowset in a running transformation. It will also look at the "to" step to see if this is a mapping.
* If it is, it will find the appropriate rowset in that transformation.
*
* @param from
* @param fromcopy
* @param to
* @param tocopy
* @return The rowset or null if none is f... | Find an output rowset in a running transformation. It will also look at the "to" step to see if this is a mapping. If it is, it will find the appropriate rowset in that transformation | findOutputRowSet | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/step/BaseStep.java",
"license": "apache-2.0",
"size": 124726
} | [
"org.pentaho.di.core.RowSet",
"org.pentaho.di.trans.steps.mapping.Mapping",
"org.pentaho.di.trans.steps.mappinginput.MappingInput"
] | import org.pentaho.di.core.RowSet; import org.pentaho.di.trans.steps.mapping.Mapping; import org.pentaho.di.trans.steps.mappinginput.MappingInput; | import org.pentaho.di.core.*; import org.pentaho.di.trans.steps.mapping.*; import org.pentaho.di.trans.steps.mappinginput.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,809,406 |
default RealMatrix toRealMatrix() {
final double[][] elements = toDoubleMatrix();
if (elements != null && elements.length > 0 && elements[0].length > 0) {
return new Array2DRowRealMatrix(elements, false);
}
return null;
} | default RealMatrix toRealMatrix() { final double[][] elements = toDoubleMatrix(); if (elements != null && elements.length > 0 && elements[0].length > 0) { return new Array2DRowRealMatrix(elements, false); } return null; } | /**
* Convert this object into a RealMatrix.
*
* @return <code>null</code> if this object can not be converted into a RealMatrix
*/ | Convert this object into a RealMatrix | toRealMatrix | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/interfaces/IExpr.java",
"license": "gpl-3.0",
"size": 152649
} | [
"org.hipparchus.linear.Array2DRowRealMatrix",
"org.hipparchus.linear.RealMatrix"
] | import org.hipparchus.linear.Array2DRowRealMatrix; import org.hipparchus.linear.RealMatrix; | import org.hipparchus.linear.*; | [
"org.hipparchus.linear"
] | org.hipparchus.linear; | 72,139 |
public AppServiceEnvironmentPatchResource withClusterSettings(List<NameValuePair> clusterSettings) {
this.clusterSettings = clusterSettings;
return this;
} | AppServiceEnvironmentPatchResource function(List<NameValuePair> clusterSettings) { this.clusterSettings = clusterSettings; return this; } | /**
* Set custom settings for changing the behavior of the App Service Environment.
*
* @param clusterSettings the clusterSettings value to set
* @return the AppServiceEnvironmentPatchResource object itself.
*/ | Set custom settings for changing the behavior of the App Service Environment | withClusterSettings | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/AppServiceEnvironmentPatchResource.java",
"license": "mit",
"size": 25529
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,240,039 |
public void testTag(String tagName) throws OperationException {
testKeyDowns(tagName);
testRendering(tagName);
} | void function(String tagName) throws OperationException { testKeyDowns(tagName); testRendering(tagName); } | /**
* Goes thru all tests for a given paragraph tag name
*
* @param tagName
* @throws OperationException
*/ | Goes thru all tests for a given paragraph tag name | testTag | {
"repo_name": "gburd/wave",
"path": "test/org/waveprotocol/wave/client/editor/integration/ParagraphGwtTest.java",
"license": "apache-2.0",
"size": 10627
} | [
"org.waveprotocol.wave.model.operation.OperationException"
] | import org.waveprotocol.wave.model.operation.OperationException; | import org.waveprotocol.wave.model.operation.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 1,707,687 |
public void start(@Nullable final Activity callerActivity) {
start(callerActivity, callerActivity.getWindow());
} | void function(@Nullable final Activity callerActivity) { start(callerActivity, callerActivity.getWindow()); } | /**
* Start the Maoni Activity. If screenCapturingFeatureEnabled is true this will take a
* screenshot of the activity window
*
* @param callerActivity the caller activity
*/ | Start the Maoni Activity. If screenCapturingFeatureEnabled is true this will take a screenshot of the activity window | start | {
"repo_name": "rm3l/maoni",
"path": "maoni/src/main/java/org/rm3l/maoni/Maoni.java",
"license": "mit",
"size": 30267
} | [
"android.app.Activity",
"androidx.annotation.Nullable"
] | import android.app.Activity; import androidx.annotation.Nullable; | import android.app.*; import androidx.annotation.*; | [
"android.app",
"androidx.annotation"
] | android.app; androidx.annotation; | 695,626 |
public void updateInNavigation(CmsClientSitemapEntry entry) {
if (entry.isInNavigation()) {
m_inNavigationStyle.setValue(null);
getListItemWidget().setTitleEditable(true);
} else {
m_inNavigationStyle.setValue(CSS.notInNavigationEntry());
getListItemW... | void function(CmsClientSitemapEntry entry) { if (entry.isInNavigation()) { m_inNavigationStyle.setValue(null); getListItemWidget().setTitleEditable(true); } else { m_inNavigationStyle.setValue(CSS.notInNavigationEntry()); getListItemWidget().setTitleEditable(false); } } | /**
* Updates the in navigation properties of the displayed entry.<p>
*
* @param entry the sitemap entry
*/ | Updates the in navigation properties of the displayed entry | updateInNavigation | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java",
"license": "lgpl-2.1",
"size": 33400
} | [
"org.opencms.ade.sitemap.shared.CmsClientSitemapEntry"
] | import org.opencms.ade.sitemap.shared.CmsClientSitemapEntry; | import org.opencms.ade.sitemap.shared.*; | [
"org.opencms.ade"
] | org.opencms.ade; | 1,463,977 |
@Test
public void testAcceptOffers() {
new Context() {{
new Within(duration("10 seconds")) {
@Override
protected void run() {
try {
// set the initial persistent state with a new task then initialize the RM
MesosWorkerStore.Worker worker1 = MesosWorkerStore.Worker.newWorker(task1);
... | void function() { new Context() {{ new Within(duration(STR)) { protected void run() { try { MesosWorkerStore.Worker worker1 = MesosWorkerStore.Worker.newWorker(task1); when(workerStore.getFrameworkID()).thenReturn(Option.apply(framework1)); when(workerStore.recoverWorkers()).thenReturn(singletonList(worker1)); initiali... | /**
* Test offer acceptance.
*/ | Test offer acceptance | testAcceptOffers | {
"repo_name": "mylog00/flink",
"path": "flink-mesos/src/test/java/org/apache/flink/mesos/runtime/clusterframework/MesosFlinkResourceManagerTest.java",
"license": "apache-2.0",
"size": 29379
} | [
"java.util.Collections",
"org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore",
"org.apache.flink.mesos.scheduler.TaskMonitor",
"org.apache.flink.mesos.scheduler.messages.AcceptOffers",
"org.apache.flink.runtime.clusterframework.types.ResourceID",
"org.apache.mesos.Protos",
"org.hamcr... | import java.util.Collections; import org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore; import org.apache.flink.mesos.scheduler.TaskMonitor; import org.apache.flink.mesos.scheduler.messages.AcceptOffers; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.mesos.Prot... | import java.util.*; import org.apache.flink.mesos.runtime.clusterframework.store.*; import org.apache.flink.mesos.scheduler.*; import org.apache.flink.mesos.scheduler.messages.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.mesos.*; import org.hamcrest.*; import org.junit.*; import org.mo... | [
"java.util",
"org.apache.flink",
"org.apache.mesos",
"org.hamcrest",
"org.junit",
"org.mockito"
] | java.util; org.apache.flink; org.apache.mesos; org.hamcrest; org.junit; org.mockito; | 664,990 |
@Override
public Date getDate(String parameterName, Calendar cal) throws SQLException {
return getDate(getIndexForName(parameterName), cal);
} | Date function(String parameterName, Calendar cal) throws SQLException { return getDate(getIndexForName(parameterName), cal); } | /**
* Returns the value of the specified column as a java.sql.Date using a
* specified time zone.
*
* @param parameterName the parameter name
* @param cal the calendar
* @return the value
* @throws SQLException if the column is not found or if this object is
* closed
... | Returns the value of the specified column as a java.sql.Date using a specified time zone | getDate | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/jdbc/JdbcCallableStatement.java",
"license": "mpl-2.0",
"size": 53201
} | [
"java.sql.Date",
"java.sql.SQLException",
"java.util.Calendar"
] | import java.sql.Date; import java.sql.SQLException; import java.util.Calendar; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,450,868 |
boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> aAdditionalParams)
throws ResourceInitializationException; | boolean initialize(ResourceSpecifier aSpecifier, Map<String, Object> aAdditionalParams) throws ResourceInitializationException; | /**
* Initializes this <code>Resource</code> from a <code>ResourceSpecifier</code>. Applications do
* not need to call this method. It is called automatically by the <code>ResourceFactory</code>
* and cannot be called a second time.
*
* @param aSpecifier
* specifies how to create a resource ... | Initializes this <code>Resource</code> from a <code>ResourceSpecifier</code>. Applications do not need to call this method. It is called automatically by the <code>ResourceFactory</code> and cannot be called a second time | initialize | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-core/src/main/java/org/apache/uima/resource/Resource.java",
"license": "apache-2.0",
"size": 8334
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 171,814 |
@IgniteSpiConfiguration(optional = true)
public TcpDiscoverySpi setLocalAddress(String locAddr) {
// Injection should not override value already set by Spring or user.
if (this.locAddr == null)
this.locAddr = locAddr;
return this;
} | @IgniteSpiConfiguration(optional = true) TcpDiscoverySpi function(String locAddr) { if (this.locAddr == null) this.locAddr = locAddr; return this; } | /**
* Sets local host IP address that discovery SPI uses.
* <p>
* If not provided, by default a first found non-loopback address
* will be used. If there is no non-loopback address available,
* then {@link InetAddress#getLocalHost()} will be used.
*
* @param locAddr IP address.
*... | Sets local host IP address that discovery SPI uses. If not provided, by default a first found non-loopback address will be used. If there is no non-loopback address available, then <code>InetAddress#getLocalHost()</code> will be used | setLocalAddress | {
"repo_name": "dmagda/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java",
"license": "apache-2.0",
"size": 69172
} | [
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import org.apache.ignite.spi.IgniteSpiConfiguration; | import org.apache.ignite.spi.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 474,353 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Void> deleteAsync(String resourceGroupName, String virtualHubName); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> deleteAsync(String resourceGroupName, String virtualHubName); | /**
* Deletes a VirtualHub.
*
* @param resourceGroupName The resource group name of the VirtualHub.
* @param virtualHubName The name of the VirtualHub.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementExcep... | Deletes a VirtualHub | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java",
"license": "mit",
"size": 30840
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,573,408 |
public static String getCanonicalHostName(String hostName) {
try {
return InetAddress.getByName(hostName).getCanonicalHostName();
}
catch(UnknownHostException exception) {
LOG.warn("Could not retrieve canonical hostname for " + hostName, exception);
return hostName;
}
} | static String function(String hostName) { try { return InetAddress.getByName(hostName).getCanonicalHostName(); } catch(UnknownHostException exception) { LOG.warn(STR + hostName, exception); return hostName; } } | /**
* Method to get canonical-ized hostname, given a hostname (possibly a CNAME).
* This should allow for service-principals to use simplified CNAMEs.
* @param hostName The hostname to be canonical-ized.
* @return Given a CNAME, the canonical-ized hostname is returned. If not found, the original hostname is... | Method to get canonical-ized hostname, given a hostname (possibly a CNAME). This should allow for service-principals to use simplified CNAMEs | getCanonicalHostName | {
"repo_name": "sankarh/hive",
"path": "jdbc/src/java/org/apache/hive/jdbc/Utils.java",
"license": "apache-2.0",
"size": 33920
} | [
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 1,222,022 |
private VariationPointModel extractVPM(List<Refinement> refinements) {
for (Refinement refinement : refinements) {
EList<VariationPoint> vps = refinement.getVariationPoints();
if (vps.size() > 0) {
VariationPointGroup group = (VariationPointGroup) vps.get(0).eContain... | VariationPointModel function(List<Refinement> refinements) { for (Refinement refinement : refinements) { EList<VariationPoint> vps = refinement.getVariationPoints(); if (vps.size() > 0) { VariationPointGroup group = (VariationPointGroup) vps.get(0).eContainer(); VariationPointModel model = (VariationPointModel) group.e... | /**
* Extract access to the VPM from a given list of refinements.
*
* @param refinements
* The refinements to check.
* @return The VPM or null if none is referenced anyhow.
*/ | Extract access to the VPM from a given list of refinements | extractVPM | {
"repo_name": "kopl/SPLevo",
"path": "UI/org.splevo.ui/src/org/splevo/ui/refinementbrowser/action/ApplyRefinementsAction.java",
"license": "epl-1.0",
"size": 5614
} | [
"java.util.List",
"org.eclipse.emf.common.util.EList",
"org.splevo.vpm.refinement.Refinement",
"org.splevo.vpm.variability.VariationPoint",
"org.splevo.vpm.variability.VariationPointGroup",
"org.splevo.vpm.variability.VariationPointModel"
] | import java.util.List; import org.eclipse.emf.common.util.EList; import org.splevo.vpm.refinement.Refinement; import org.splevo.vpm.variability.VariationPoint; import org.splevo.vpm.variability.VariationPointGroup; import org.splevo.vpm.variability.VariationPointModel; | import java.util.*; import org.eclipse.emf.common.util.*; import org.splevo.vpm.refinement.*; import org.splevo.vpm.variability.*; | [
"java.util",
"org.eclipse.emf",
"org.splevo.vpm"
] | java.util; org.eclipse.emf; org.splevo.vpm; | 2,158,753 |
@Test
public final void testYLengthAverage() {
Assert.assertTrue(this.p.yLengthAverage() == 4.0 / 3.0);
}
| final void function() { Assert.assertTrue(this.p.yLengthAverage() == 4.0 / 3.0); } | /**
* Test method for
* {@link fr.nantes1900.models.basis.Polygon#yLengthAverage()} .
*/ | Test method for <code>fr.nantes1900.models.basis.Polygon#yLengthAverage()</code> | testYLengthAverage | {
"repo_name": "Nantes1900/Nantes-1900-PGROU-IHM",
"path": "src/test/fr/nantes1900/models/PolylineTest.java",
"license": "gpl-3.0",
"size": 17527
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 937,877 |
@Override
public final List<Integer> getBorderDash() {
// gets array
ArrayInteger array = getArrayValue(Property.BORDER_DASH);
// checks if consistent
if (array != null) {
// exists then returns the value
return ArrayListHelper.list(array);
}
// if here, the options is missing
// the returns the... | final List<Integer> function() { ArrayInteger array = getArrayValue(Property.BORDER_DASH); if (array != null) { return ArrayListHelper.list(array); } return getDefaultBorderDash(); } | /**
* Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
*
* @return the line dash pattern used when stroking lines
*/ | Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern | getBorderDash | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/options/AbstractScaleLines.java",
"license": "apache-2.0",
"size": 4162
} | [
"java.util.List",
"org.pepstock.charba.client.commons.ArrayInteger",
"org.pepstock.charba.client.commons.ArrayListHelper"
] | import java.util.List; import org.pepstock.charba.client.commons.ArrayInteger; import org.pepstock.charba.client.commons.ArrayListHelper; | import java.util.*; import org.pepstock.charba.client.commons.*; | [
"java.util",
"org.pepstock.charba"
] | java.util; org.pepstock.charba; | 1,963,717 |
public void end() {
this.course.onRaceEnd(this);
this.endTimer = null;
if (this.updateInventoryHack != -1) {
Bukkit.getScheduler().cancelTask(updateInventoryHack);
this.updateInventoryHack = -1;
}
Map<String, Jockey> tempJockeys = new HashMap<String, Jockey>(this.jockeys);
for (Jock... | void function() { this.course.onRaceEnd(this); this.endTimer = null; if (this.updateInventoryHack != -1) { Bukkit.getScheduler().cancelTask(updateInventoryHack); this.updateInventoryHack = -1; } Map<String, Jockey> tempJockeys = new HashMap<String, Jockey>(this.jockeys); for (Jockey jockey : tempJockeys.values()) { rem... | /**
* End the race
*/ | End the race | end | {
"repo_name": "CodingBadgers/MineKart",
"path": "minekart/src/main/java/uk/thecodingbadgers/minekart/race/Race.java",
"license": "gpl-2.0",
"size": 12893
} | [
"java.util.HashMap",
"java.util.Map",
"org.bukkit.Bukkit",
"uk.thecodingbadgers.minekart.jockey.Jockey"
] | import java.util.HashMap; import java.util.Map; import org.bukkit.Bukkit; import uk.thecodingbadgers.minekart.jockey.Jockey; | import java.util.*; import org.bukkit.*; import uk.thecodingbadgers.minekart.jockey.*; | [
"java.util",
"org.bukkit",
"uk.thecodingbadgers.minekart"
] | java.util; org.bukkit; uk.thecodingbadgers.minekart; | 1,905,911 |
public static void testProjectPom() throws Exception {
Maven maven = new Maven(null);
ProjectPom pom = maven.createProjectModel(IO.getFile(cwd, "testresources/ws/maven1/testpom.xml"));
assertEquals("artifact", pom.getArtifactId());
assertEquals("group-parent", pom.getGroupId());
assertEquals("1.0.0", pom.g... | static void function() throws Exception { Maven maven = new Maven(null); ProjectPom pom = maven.createProjectModel(IO.getFile(cwd, STR)); assertEquals(STR, pom.getArtifactId()); assertEquals(STR, pom.getGroupId()); assertEquals("1.0.0", pom.getVersion()); assertEquals(STR, pom.getName()); assertEquals(STR, pom.getDescr... | /**
* Test parsing a project pom
*
* @throws Exception
*/ | Test parsing a project pom | testProjectPom | {
"repo_name": "magnet/bnd",
"path": "biz.aQute.bndlib.tests/src/test/MavenTest.java",
"license": "apache-2.0",
"size": 15937
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,285,959 |
public RecordId writeString(String string) {
synchronized (this) {
RecordId id = records.get(string);
if (id != null) {
return id; // shortcut if the same string was recently stored
}
}
byte[] data = string.getBytes(Charsets.UTF_8);
... | RecordId function(String string) { synchronized (this) { RecordId id = records.get(string); if (id != null) { return id; } } byte[] data = string.getBytes(Charsets.UTF_8); if (data.length < Segment.MEDIUM_LIMIT) { synchronized (this) { RecordId id = records.get(string); if (id == null) { id = writeValueRecord(data.leng... | /**
* Writes a string value record.
*
* @param string string to be written
* @return value record identifier
*/ | Writes a string value record | writeString | {
"repo_name": "AndreasAbdi/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentWriter.java",
"license": "apache-2.0",
"size": 45266
} | [
"com.google.common.base.Charsets",
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.base.Charsets; import com.google.common.collect.Lists; import java.util.List; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,298,454 |
public static String createTableValueTypeName(String schemaName, String tblName) {
return createTableCacheName(schemaName, tblName) + "_" + UUID.randomUUID().toString().replace("-", "_");
} | static String function(String schemaName, String tblName) { return createTableCacheName(schemaName, tblName) + "_" + UUID.randomUUID().toString().replace("-", "_"); } | /**
* Construct value type name for table.
*
* @param schemaName Schema name.
* @param tblName Table name.
* @return Value type name.
*/ | Construct value type name for table | createTableValueTypeName | {
"repo_name": "endian675/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java",
"license": "apache-2.0",
"size": 49969
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 2,787,012 |
protected List<Metric> serializeSnapshot(String name, Snapshot snapshot) {
return Lists.newArrayList(
serializeValue(name, snapshot.getMean(), Measurements.MEAN.name()),
serializeValue(name, snapshot.getMin(), Measurements.MIN.name()),
serializeValue(name, snapshot.getMax(), Measurements.MAX.nam... | List<Metric> function(String name, Snapshot snapshot) { return Lists.newArrayList( serializeValue(name, snapshot.getMean(), Measurements.MEAN.name()), serializeValue(name, snapshot.getMin(), Measurements.MIN.name()), serializeValue(name, snapshot.getMax(), Measurements.MAX.name()), serializeValue(name, snapshot.getMedi... | /**
* Extracts metrics from {@link com.codahale.metrics.Snapshot}.
*
* @param name name of the {@link com.codahale.metrics.Snapshot}.
* @param snapshot instance of {@link com.codahale.metrics.Snapshot} to serialize.
* @return a list of {@link gobblin.metrics.Metric}.
*/ | Extracts metrics from <code>com.codahale.metrics.Snapshot</code> | serializeSnapshot | {
"repo_name": "liyinan926/gobblin",
"path": "gobblin-metrics/src/main/java/gobblin/metrics/reporter/MetricReportReporter.java",
"license": "apache-2.0",
"size": 12378
} | [
"com.codahale.metrics.Snapshot",
"com.google.common.collect.Lists",
"java.util.List"
] | import com.codahale.metrics.Snapshot; import com.google.common.collect.Lists; import java.util.List; | import com.codahale.metrics.*; import com.google.common.collect.*; import java.util.*; | [
"com.codahale.metrics",
"com.google.common",
"java.util"
] | com.codahale.metrics; com.google.common; java.util; | 1,283,014 |
public static boolean betweenInDay(Date date, Date start, Date end) {
return isAfterOrEqualForDay(date, start) && isBeforeOrEqualForDay(date, end);
} | static boolean function(Date date, Date start, Date end) { return isAfterOrEqualForDay(date, start) && isBeforeOrEqualForDay(date, end); } | /**
* check id a date in between two other date, but date in range.
*
* @param date
* @param start
* @param end
* @return
*/ | check id a date in between two other date, but date in range | betweenInDay | {
"repo_name": "Javlo/javlo",
"path": "src/main/java/org/javlo/helper/TimeHelper.java",
"license": "lgpl-3.0",
"size": 11719
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,812,484 |
@Override
public void addReadOnlyStatusChangeListener(
Property.ReadOnlyStatusChangeListener listener) {
if (readOnlyStatusChangeListeners == null) {
readOnlyStatusChangeListeners = new LinkedList<>();
}
readOnlyStatusChangeListeners.add(listener);
}
/**
... | void function( Property.ReadOnlyStatusChangeListener listener) { if (readOnlyStatusChangeListeners == null) { readOnlyStatusChangeListeners = new LinkedList<>(); } readOnlyStatusChangeListeners.add(listener); } /** * @deprecated As of 7.0, replaced by * {@link #addReadOnlyStatusChangeListener(com.vaadin.v7.data.Propert... | /**
* Registers a new read-only status change listener for this Property.
*
* @param listener
* the new Listener to be registered.
*/ | Registers a new read-only status change listener for this Property | addReadOnlyStatusChangeListener | {
"repo_name": "Legioth/vaadin",
"path": "compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java",
"license": "apache-2.0",
"size": 8257
} | [
"com.vaadin.v7.data.Property",
"java.util.LinkedList"
] | import com.vaadin.v7.data.Property; import java.util.LinkedList; | import com.vaadin.v7.data.*; import java.util.*; | [
"com.vaadin.v7",
"java.util"
] | com.vaadin.v7; java.util; | 358,091 |
public synchronized void killJob() throws IOException {
job.killJob();
}
| synchronized void function() throws IOException { job.killJob(); } | /**
* Tells the service to terminate the current job.
*/ | Tells the service to terminate the current job | killJob | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/JobClient.java",
"license": "apache-2.0",
"size": 38755
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,768,134 |
public Long createContestProblem(ContestProblemDto contestProblemDto); | Long function(ContestProblemDto contestProblemDto); | /**
* Create a new record by contestProblemDto entity
* @param contestProblemDto
* @return
*/ | Create a new record by contestProblemDto entity | createContestProblem | {
"repo_name": "chunInsane/Teaching-Assistance",
"path": "src/main/java/cn/edu/nuc/acmicpc/mapper/ContestProblemMapper.java",
"license": "apache-2.0",
"size": 1246
} | [
"cn.edu.nuc.acmicpc.dto.ContestProblemDto"
] | import cn.edu.nuc.acmicpc.dto.ContestProblemDto; | import cn.edu.nuc.acmicpc.dto.*; | [
"cn.edu.nuc"
] | cn.edu.nuc; | 1,189,122 |
public void setVertx(Vertx vertx) {
this.vertx = vertx;
} | void function(Vertx vertx) { this.vertx = vertx; } | /**
* To use the given vertx EventBus instead of creating a new embedded EventBus
*/ | To use the given vertx EventBus instead of creating a new embedded EventBus | setVertx | {
"repo_name": "oscerd/camel",
"path": "components/camel-vertx/src/main/java/org/apache/camel/component/vertx/VertxComponent.java",
"license": "apache-2.0",
"size": 5577
} | [
"org.vertx.java.core.Vertx"
] | import org.vertx.java.core.Vertx; | import org.vertx.java.core.*; | [
"org.vertx.java"
] | org.vertx.java; | 1,909,525 |
@Override public void enterExprMax(@NotNull ErlangParser.ExprMaxContext ctx) { } | @Override public void enterExprMax(@NotNull ErlangParser.ExprMaxContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitLcExpr | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ErlangBaseListener.java",
"license": "gpl-3.0",
"size": 35359
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 559,238 |
public void addAggregate(BgpAggregate aggregate) {
Prefix network = aggregate.getNetwork();
checkArgument(
!_aggregates.containsKey(network),
"Already contains an aggregate for network: %s",
network);
_aggregates =
ImmutableMap.<Prefix, BgpAggregate>builderWithExpectedSize(... | void function(BgpAggregate aggregate) { Prefix network = aggregate.getNetwork(); checkArgument( !_aggregates.containsKey(network), STR, network); _aggregates = ImmutableMap.<Prefix, BgpAggregate>builderWithExpectedSize(_aggregates.size() + 1) .putAll(_aggregates) .put(network, aggregate) .build(); } | /**
* Add a {@link BgpAggregate}.
*
* @throws IllegalArgumentException if an entry already exists for the same network.
*/ | Add a <code>BgpAggregate</code> | addAggregate | {
"repo_name": "dhalperi/batfish",
"path": "projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/BgpProcess.java",
"license": "apache-2.0",
"size": 22799
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.ImmutableMap",
"org.batfish.datamodel.bgp.BgpAggregate"
] | import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import org.batfish.datamodel.bgp.BgpAggregate; | import com.google.common.base.*; import com.google.common.collect.*; import org.batfish.datamodel.bgp.*; | [
"com.google.common",
"org.batfish.datamodel"
] | com.google.common; org.batfish.datamodel; | 96,142 |
public KeyAgreement diffieHellman(boolean side) throws IOException, GeneralSecurityException {
return diffieHellman(side,512);
} | KeyAgreement function(boolean side) throws IOException, GeneralSecurityException { return diffieHellman(side,512); } | /**
* Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection.
*
* <p>
* DH is also useful as a coin-toss algorithm. Two parties get the same random number without trusting
* each other.
*/ | Performs a Diffie-Hellman key exchange and produce a common secret between two ends of the connection. DH is also useful as a coin-toss algorithm. Two parties get the same random number without trusting each other | diffieHellman | {
"repo_name": "MadsNielsen/jtemp",
"path": "cli/src/main/java/hudson/cli/Connection.java",
"license": "mit",
"size": 9461
} | [
"java.io.IOException",
"java.security.GeneralSecurityException",
"javax.crypto.KeyAgreement"
] | import java.io.IOException; import java.security.GeneralSecurityException; import javax.crypto.KeyAgreement; | import java.io.*; import java.security.*; import javax.crypto.*; | [
"java.io",
"java.security",
"javax.crypto"
] | java.io; java.security; javax.crypto; | 2,553,675 |
public Condition createOnlyTypeCondition() throws CSSException {
throw new CSSException("Not implemented in CSS2");
} | Condition function() throws CSSException { throw new CSSException(STR); } | /**
* <b>SAC</b>: Implements {@link
* org.w3c.css.sac.ConditionFactory#createOnlyTypeCondition()}.
*/ | SAC: Implements <code>org.w3c.css.sac.ConditionFactory#createOnlyTypeCondition()</code> | createOnlyTypeCondition | {
"repo_name": "shyamalschandra/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/sac/CSSConditionFactory.java",
"license": "apache-2.0",
"size": 7476
} | [
"org.w3c.css.sac.CSSException",
"org.w3c.css.sac.Condition"
] | import org.w3c.css.sac.CSSException; import org.w3c.css.sac.Condition; | import org.w3c.css.sac.*; | [
"org.w3c.css"
] | org.w3c.css; | 2,882,606 |
ScheduledExecutorService newScheduledThreadPool(Object source, String name, String profileId); | ScheduledExecutorService newScheduledThreadPool(Object source, String name, String profileId); | /**
* Creates a new scheduled thread pool using a profile id
*
* @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
* @param profileId the id of the profile with the thread pool settings t... | Creates a new scheduled thread pool using a profile id | newScheduledThreadPool | {
"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,903 |
ManagementStrategy getManagementStrategy(); | ManagementStrategy getManagementStrategy(); | /**
* Gets the management strategy
*
* @return the management strategy
*/ | Gets the management strategy | getManagementStrategy | {
"repo_name": "kevinearls/camel",
"path": "camel-api/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 58352
} | [
"org.apache.camel.spi.ManagementStrategy"
] | import org.apache.camel.spi.ManagementStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 207,206 |
List<URL> getPaths() throws IOException; | List<URL> getPaths() throws IOException; | /**
* Returns a list of storage node paths from which this file can be accessed.
*
* @return A list of storage node paths or an empty list.
* @throws fm.last.moji.tracker.UnknownKeyException If this file doesn't exist in MogileFS.
* @throws IOException If there was a problem communicating with MogileFS.... | Returns a list of storage node paths from which this file can be accessed | getPaths | {
"repo_name": "lastfm/moji",
"path": "src/main/java/fm/last/moji/MojiFile.java",
"license": "apache-2.0",
"size": 4368
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 891,942 |
public String getServerName(){
if (server == null) {
String version = "???";
String os = "(unknown os)";
try {
Properties versionInfo = new Properties();
versionInfo.load( new URL( "resource:/openejb-version.properties" ).openConnection().... | String function(){ if (server == null) { String version = "???"; String os = STR; try { Properties versionInfo = new Properties(); versionInfo.load( new URL( STR ).openConnection().getInputStream() ); version = versionInfo.getProperty( STR ); os = System.getProperty(STR)+"/"+System.getProperty(STR)+STR+System.getProper... | /** gets the name of the server being used
* @return the name of the server
*/ | gets the name of the server being used | getServerName | {
"repo_name": "apache/openejb",
"path": "server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java",
"license": "apache-2.0",
"size": 15407
} | [
"java.io.IOException",
"java.util.Properties"
] | import java.io.IOException; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,101,534 |
public static ResourceBundle getProperties() {
if (res == null) {
loadProperties();
}
return res;
}
| static ResourceBundle function() { if (res == null) { loadProperties(); } return res; } | /**
* Get properties resource
* @return
*/ | Get properties resource | getProperties | {
"repo_name": "schlotze/u-qasar.platform",
"path": "src/main/java/eu/uqasar/util/UQasarUtil.java",
"license": "apache-2.0",
"size": 44740
} | [
"java.util.ResourceBundle"
] | import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 358,632 |
@Programmatic
public Participation addParticipation(Activity activity) {
if (!hasParticipation(activity)) {
Participation participation = container.newTransientInstance(Participation.class);
participation.setParticipant(this);
participation.setActivity(activity);
container.persistIfNotAlready(particip... | Participation function(Activity activity) { if (!hasParticipation(activity)) { Participation participation = container.newTransientInstance(Participation.class); participation.setParticipant(this); participation.setActivity(activity); container.persistIfNotAlready(participation); participations.add(participation); retu... | /**
* Creates a new Participation linking the Activity to the Participant
* Called from Activity
*
* @param activity
* @return
*/ | Creates a new Participation linking the Activity to the Participant Called from Activity | addParticipation | {
"repo_name": "jcvanderwal/isis-chats",
"path": "dom/src/main/java/au/com/scds/chats/dom/module/participant/Participant.java",
"license": "apache-2.0",
"size": 14975
} | [
"au.com.scds.chats.dom.module.activity.Activity"
] | import au.com.scds.chats.dom.module.activity.Activity; | import au.com.scds.chats.dom.module.activity.*; | [
"au.com.scds"
] | au.com.scds; | 1,179,429 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.