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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Nonnull
@Contract(pure = true)
public static <T> NonBlockingReadAction<T> nonBlocking(@Nonnull Callable<T> task) {
return AsyncExecutionService.getService().buildNonBlockingReadAction(task);
} | @Contract(pure = true) static <T> NonBlockingReadAction<T> function(@Nonnull Callable<T> task) { return AsyncExecutionService.getService().buildNonBlockingReadAction(task); } | /**
* Create an {@link NonBlockingReadAction} builder to run the given Callable in a non-blocking read action on a background thread.
*/ | Create an <code>NonBlockingReadAction</code> builder to run the given Callable in a non-blocking read action on a background thread | nonBlocking | {
"repo_name": "consulo/consulo",
"path": "modules/base/core-api/src/main/java/com/intellij/openapi/application/ReadAction.java",
"license": "apache-2.0",
"size": 2174
} | [
"java.util.concurrent.Callable",
"javax.annotation.Nonnull",
"org.jetbrains.annotations.Contract"
] | import java.util.concurrent.Callable; import javax.annotation.Nonnull; import org.jetbrains.annotations.Contract; | import java.util.concurrent.*; import javax.annotation.*; import org.jetbrains.annotations.*; | [
"java.util",
"javax.annotation",
"org.jetbrains.annotations"
] | java.util; javax.annotation; org.jetbrains.annotations; | 492,264 |
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
super.onRestoreInstanceState(savedInstanceState);
mExpandableAdapter.onRestoreInstanceState(savedInstanceState);
} | void function(@NonNull Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); mExpandableAdapter.onRestoreInstanceState(savedInstanceState); } | /**
* Load the expanded/collapsed states of the adapter back into the view when done rotating or
* resuming the activity.
*/ | Load the expanded/collapsed states of the adapter back into the view when done rotating or resuming the activity | onRestoreInstanceState | {
"repo_name": "captain-miao/bleYan",
"path": "example/src/main/java/com/github/captain_miao/android/bluetoothletutorial/BleDeviceActivity.java",
"license": "gpl-2.0",
"size": 24561
} | [
"android.os.Bundle",
"android.support.annotation.NonNull"
] | import android.os.Bundle; import android.support.annotation.NonNull; | import android.os.*; import android.support.annotation.*; | [
"android.os",
"android.support"
] | android.os; android.support; | 917,064 |
@SuppressWarnings("checkstyle:npathcomplexity")
//RU_COMPAT_4_0
private boolean commitMigrationToDestination(MigrationInfo migration) {
PartitionReplica destination = migration.getDestination();
if (destination.isIdentical(node.getLocalMember())) {
if (logger.isFinestEnabled()) ... | @SuppressWarnings(STR) boolean function(MigrationInfo migration) { PartitionReplica destination = migration.getDestination(); if (destination.isIdentical(node.getLocalMember())) { if (logger.isFinestEnabled()) { logger.finest(STR + migration); } return true; } Member member = node.getClusterService().getMember(destinat... | /**
* Sends a {@link MigrationCommitOperation} to the destination and returns {@code true} if the new partition state
* was applied on the destination.
*/ | Sends a <code>MigrationCommitOperation</code> to the destination and returns true if the new partition state was applied on the destination | commitMigrationToDestination | {
"repo_name": "jerrinot/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java",
"license": "apache-2.0",
"size": 97853
} | [
"com.hazelcast.cluster.Member",
"com.hazelcast.core.OperationTimeoutException",
"com.hazelcast.internal.partition.MigrationInfo",
"com.hazelcast.internal.partition.PartitionReplica",
"com.hazelcast.internal.partition.operation.MigrationCommitOperation",
"java.util.concurrent.Future"
] | import com.hazelcast.cluster.Member; import com.hazelcast.core.OperationTimeoutException; import com.hazelcast.internal.partition.MigrationInfo; import com.hazelcast.internal.partition.PartitionReplica; import com.hazelcast.internal.partition.operation.MigrationCommitOperation; import java.util.concurrent.Future; | import com.hazelcast.cluster.*; import com.hazelcast.core.*; import com.hazelcast.internal.partition.*; import com.hazelcast.internal.partition.operation.*; import java.util.concurrent.*; | [
"com.hazelcast.cluster",
"com.hazelcast.core",
"com.hazelcast.internal",
"java.util"
] | com.hazelcast.cluster; com.hazelcast.core; com.hazelcast.internal; java.util; | 2,046,155 |
private static void setContentLength(FullHttpRequest req, FullHttpResponse res) {
final int statusCode = res.status().code();
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
// prohibits to send message body for below cases.
// and in those cases, content-length shoul... | static void function(FullHttpRequest req, FullHttpResponse res) { final int statusCode = res.status().code(); if (statusCode < 200 statusCode == 204 statusCode == 304 req.method() == HttpMethod.HEAD) { return; } res.headers().set(HttpHeaderNames.CONTENT_LENGTH, res.content().readableBytes()); } | /**
* Sets the 'content-length' header to the response.
*/ | Sets the 'content-length' header to the response | setContentLength | {
"repo_name": "jongyeol/armeria",
"path": "src/main/java/com/linecorp/armeria/server/HttpServerHandler.java",
"license": "apache-2.0",
"size": 26547
} | [
"io.netty.handler.codec.http.FullHttpRequest",
"io.netty.handler.codec.http.FullHttpResponse",
"io.netty.handler.codec.http.HttpHeaderNames",
"io.netty.handler.codec.http.HttpMethod"
] | import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpMethod; | import io.netty.handler.codec.http.*; | [
"io.netty.handler"
] | io.netty.handler; | 774,309 |
public static void renderResultsColumn(UIBranchContainer container, EvalEvaluation eval, EvalGroup group,
Date viewDate, DateFormat df, int responsesNeeded, int responsesRequired, boolean evalResultsViewable) {
Date now = new Date();
if (container == null) { throw new IllegalArgumentE... | static void function(UIBranchContainer container, EvalEvaluation eval, EvalGroup group, Date viewDate, DateFormat df, int responsesNeeded, int responsesRequired, boolean evalResultsViewable) { Date now = new Date(); if (container == null) { throw new IllegalArgumentException(STR); } if (eval == null) { throw new Illega... | /**
* Renders the reports/results column content (since the logic is complex)
*
* @param container the branch container (must contain the following elements):
* evalReportDisplay (output)
* evalReportDisplayLink (link)
* evalRespondentsDisplayLink (link)
* @param eval ... | Renders the reports/results column content (since the logic is complex) | renderResultsColumn | {
"repo_name": "sakaiproject/evaluation",
"path": "sakai-evaluation-tool/src/java/org/sakaiproject/evaluation/tool/utils/RenderingUtils.java",
"license": "apache-2.0",
"size": 28590
} | [
"java.text.DateFormat",
"java.util.Date",
"org.sakaiproject.evaluation.constant.EvalConstants",
"org.sakaiproject.evaluation.logic.model.EvalGroup",
"org.sakaiproject.evaluation.model.EvalEvaluation",
"org.sakaiproject.evaluation.tool.producers.ReportChooseGroupsProducer",
"org.sakaiproject.evaluation.t... | import java.text.DateFormat; import java.util.Date; import org.sakaiproject.evaluation.constant.EvalConstants; import org.sakaiproject.evaluation.logic.model.EvalGroup; import org.sakaiproject.evaluation.model.EvalEvaluation; import org.sakaiproject.evaluation.tool.producers.ReportChooseGroupsProducer; import org.sakai... | import java.text.*; import java.util.*; import org.sakaiproject.evaluation.constant.*; import org.sakaiproject.evaluation.logic.model.*; import org.sakaiproject.evaluation.model.*; import org.sakaiproject.evaluation.tool.producers.*; import org.sakaiproject.evaluation.tool.viewparams.*; import org.sakaiproject.evaluati... | [
"java.text",
"java.util",
"org.sakaiproject.evaluation",
"uk.org.ponder"
] | java.text; java.util; org.sakaiproject.evaluation; uk.org.ponder; | 2,375,224 |
@Test
@Ignore //RT-36616
public void testRotateRightOneBigStep() throws Exception {
Rotate(80, 1);
} | @Ignore void function() throws Exception { Rotate(80, 1); } | /**
* Tap two fingers, rotate the object right by only 1 very big step - 80 degrees
*/ | Tap two fingers, rotate the object right by only 1 very big step - 80 degrees | testRotateRightOneBigStep | {
"repo_name": "teamfx/openjfx-9-dev-rt",
"path": "tests/system/src/test/java/test/robot/com/sun/glass/ui/monocle/RotateTest.java",
"license": "gpl-2.0",
"size": 13040
} | [
"org.junit.Ignore"
] | import org.junit.Ignore; | import org.junit.*; | [
"org.junit"
] | org.junit; | 579,455 |
public UserInfo toUserInfo() {
return convertToUserInfo(this);
}
| UserInfo function() { return convertToUserInfo(this); } | /** Converts this user into a UserInfo
*
* @return The resulting user info, with sensitive fields removed
*/ | Converts this user into a UserInfo | toUserInfo | {
"repo_name": "mwcaisse/AndroidFT",
"path": "aft-servlet/src/main/java/com/ricex/aft/servlet/entity/User.java",
"license": "mit",
"size": 6043
} | [
"com.ricex.aft.common.entity.UserInfo"
] | import com.ricex.aft.common.entity.UserInfo; | import com.ricex.aft.common.entity.*; | [
"com.ricex.aft"
] | com.ricex.aft; | 2,513,649 |
protected void writeConfigurationExtras( EclipseWriterConfig config )
throws MojoExecutionException
{
// extension point.
} | void function( EclipseWriterConfig config ) throws MojoExecutionException { } | /**
* Write any extra configuration information for the Eclipse project. This is an extension point, called before the
* main configurations are written. <br/>
* <b> NOTE: This could change the config! </b>
*
* @param config
* @throws MojoExecutionException
*/ | Write any extra configuration information for the Eclipse project. This is an extension point, called before the main configurations are written. | writeConfigurationExtras | {
"repo_name": "restlet/maven-plugins",
"path": "maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java",
"license": "apache-2.0",
"size": 80043
} | [
"org.apache.maven.plugin.MojoExecutionException",
"org.apache.maven.plugin.eclipse.writers.EclipseWriterConfig"
] | import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.eclipse.writers.EclipseWriterConfig; | import org.apache.maven.plugin.*; import org.apache.maven.plugin.eclipse.writers.*; | [
"org.apache.maven"
] | org.apache.maven; | 2,436,231 |
public void setValue(double val) {
if (!OPTIMIZE_RUNTIME) {
checkReadOnly();
}
if (_numValue == null) {
_numValue = new SNumber(val);
} else {
_numValue.setValue(val);
}
_sValue = null;
}
| void function(double val) { if (!OPTIMIZE_RUNTIME) { checkReadOnly(); } if (_numValue == null) { _numValue = new SNumber(val); } else { _numValue.setValue(val); } _sValue = null; } | /**
* Sets the value
*
* @param val the value
*/ | Sets the value | setValue | {
"repo_name": "appnativa/rare",
"path": "source/spot/src/com/appnativa/spot/SPOTReal.java",
"license": "gpl-3.0",
"size": 18032
} | [
"com.appnativa.util.SNumber"
] | import com.appnativa.util.SNumber; | import com.appnativa.util.*; | [
"com.appnativa.util"
] | com.appnativa.util; | 1,121,249 |
public static MetaPluginInfo readFromProperties(final Path path) throws IOException {
final Path descriptor = path.resolve(ES_META_PLUGIN_PROPERTIES);
final Map<String, String> propsMap;
{
final Properties props = new Properties();
try (InputStream stream = File... | static MetaPluginInfo function(final Path path) throws IOException { final Path descriptor = path.resolve(ES_META_PLUGIN_PROPERTIES); final Map<String, String> propsMap; { final Properties props = new Properties(); try (InputStream stream = Files.newInputStream(descriptor)) { props.load(stream); } propsMap = props.stri... | /**
* Reads and validates the meta plugin descriptor file.
*
* @param path the path to the root directory for the meta plugin
* @return the meta plugin info
* @throws IOException if an I/O exception occurred reading the meta plugin descriptor
*/ | Reads and validates the meta plugin descriptor file | readFromProperties | {
"repo_name": "jprante/elasticsearch-server",
"path": "server/src/main/java/org/elasticsearch/plugins/MetaPluginInfo.java",
"license": "apache-2.0",
"size": 4767
} | [
"java.io.IOException",
"java.io.InputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.Map",
"java.util.Properties",
"java.util.function.Function",
"java.util.stream.Collectors"
] | import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; import java.util.Properties; import java.util.function.Function; import java.util.stream.Collectors; | import java.io.*; import java.nio.file.*; import java.util.*; import java.util.function.*; import java.util.stream.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 2,462,454 |
public Collection<MachineSystemPart> machines() {
return machines.values();
}
| Collection<MachineSystemPart> function() { return machines.values(); } | /**
* Returns all machines.
*
* @return all machines
*/ | Returns all machines | machines | {
"repo_name": "QualiMaster/Infrastructure",
"path": "MonitoringLayer/src/eu/qualimaster/monitoring/systemState/PlatformSystemPart.java",
"license": "apache-2.0",
"size": 9851
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 282,113 |
@RequestMapping(method = RequestMethod.POST, params = "methodToCall=updateOfficial")
public ModelAndView updateOfficial(@ModelAttribute("KualiForm") UifFormBase uifForm, BindingResult result,
HttpServletRequest request, HttpServletResponse response) {
String actionParm1 = uifForm.getAct... | @RequestMapping(method = RequestMethod.POST, params = STR) ModelAndView function(@ModelAttribute(STR) UifFormBase uifForm, BindingResult result, HttpServletRequest request, HttpServletResponse response) { String actionParm1 = uifForm.getActionParamaterValue(STR); GlobalVariables.getMessageMap().addGrowlMessage(STR, STR... | /**
* Performs custom line action for collection 4 in kitchen sink collection demo.
* Just puts out a growl message and returns.
*
* @param uifForm
* @param result
* @param request
* @param response
* @return
*/ | Performs custom line action for collection 4 in kitchen sink collection demo. Just puts out a growl message and returns | updateOfficial | {
"repo_name": "mztaylor/rice-git",
"path": "rice-framework/krad-sampleapp/web/src/main/java/org/kuali/rice/krad/labs/kitchensink/UifComponentsTestController.java",
"license": "apache-2.0",
"size": 20801
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.kuali.rice.krad.util.GlobalVariables",
"org.kuali.rice.krad.web.form.UifFormBase",
"org.springframework.validation.BindingResult",
"org.springframework.web.bind.annotation.ModelAttribute",
"org.springframework.web.bi... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.kuali.rice.krad.util.GlobalVariables; import org.kuali.rice.krad.web.form.UifFormBase; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.sp... | import javax.servlet.http.*; import org.kuali.rice.krad.util.*; import org.kuali.rice.krad.web.form.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; | [
"javax.servlet",
"org.kuali.rice",
"org.springframework.validation",
"org.springframework.web"
] | javax.servlet; org.kuali.rice; org.springframework.validation; org.springframework.web; | 360,910 |
@Test public void alf_9460()
{
TopicInfo siteTopic;
TopicInfo nodeTopic;
PostInfo post;
PostInfo reply;
// Nothing to start with
PagingResults<TopicInfo> results =
DISCUSSION_SERVICE.listTopics(DISCUSSION_SITE.getShortName(), true, ne... | @Test void function() { TopicInfo siteTopic; TopicInfo nodeTopic; PostInfo post; PostInfo reply; PagingResults<TopicInfo> results = DISCUSSION_SERVICE.listTopics(DISCUSSION_SITE.getShortName(), true, new PagingRequest(10)); assertEquals(0, results.getPage().size()); results = DISCUSSION_SERVICE.listTopics(FORUM_NODE, t... | /**
* Tests that "fm:post" content is not archived.
*/ | Tests that "fm:post" content is not archived | alf_9460 | {
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/test-java/org/alfresco/repo/discussion/DiscussionServiceImplTest.java",
"license": "lgpl-3.0",
"size": 95809
} | [
"java.util.List",
"org.alfresco.model.ContentModel",
"org.alfresco.query.PagingRequest",
"org.alfresco.query.PagingResults",
"org.alfresco.service.cmr.discussion.PostInfo",
"org.alfresco.service.cmr.discussion.TopicInfo",
"org.alfresco.service.cmr.repository.AssociationRef",
"org.junit.Assert",
"org... | import java.util.List; import org.alfresco.model.ContentModel; import org.alfresco.query.PagingRequest; import org.alfresco.query.PagingResults; import org.alfresco.service.cmr.discussion.PostInfo; import org.alfresco.service.cmr.discussion.TopicInfo; import org.alfresco.service.cmr.repository.AssociationRef; import or... | import java.util.*; import org.alfresco.model.*; import org.alfresco.query.*; import org.alfresco.service.cmr.discussion.*; import org.alfresco.service.cmr.repository.*; import org.junit.*; | [
"java.util",
"org.alfresco.model",
"org.alfresco.query",
"org.alfresco.service",
"org.junit"
] | java.util; org.alfresco.model; org.alfresco.query; org.alfresco.service; org.junit; | 1,393,971 |
@Mod.EventHandler
public void preInit(FMLPostInitializationEvent e){
this.proxy.preInit(e);
MainCompatHandler.registerWaila();
MainCompatHandler.registerTOP();
} | @Mod.EventHandler void function(FMLPostInitializationEvent e){ this.proxy.preInit(e); MainCompatHandler.registerWaila(); MainCompatHandler.registerTOP(); } | /**
* Run before anything else. Read your config, create blocks, items, etc, and
* register them with the GameRegistry.
*/ | Run before anything else. Read your config, create blocks, items, etc, and register them with the GameRegistry | preInit | {
"repo_name": "Helimyne/Minechem",
"path": "src/main/java/ca/helimyne/minechem/Minechem.java",
"license": "gpl-3.0",
"size": 2341
} | [
"net.minecraftforge.fml.common.Mod",
"net.minecraftforge.fml.common.event.FMLPostInitializationEvent"
] | import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; | import net.minecraftforge.fml.common.*; import net.minecraftforge.fml.common.event.*; | [
"net.minecraftforge.fml"
] | net.minecraftforge.fml; | 2,315,873 |
String status() {
if (LocatorLauncher.getInstance() != null) {
return LocatorLauncher.getLocatorState().toJson();
}
if (ServerLauncher.getInstance() != null) {
return ServerLauncher.getServerState().toJson();
}
return null;
} | String status() { if (LocatorLauncher.getInstance() != null) { return LocatorLauncher.getLocatorState().toJson(); } if (ServerLauncher.getInstance() != null) { return ServerLauncher.getServerState().toJson(); } return null; } | /**
* Gets a String describing the GemFire member's status. A GemFire member includes, but is not
* limited to: Locators, Managers, Cache Servers and so on.
*
* @return String description of the GemFire member's status.
* @see #isLocator()
* @see #isServer()
*/ | Gets a String describing the GemFire member's status. A GemFire member includes, but is not limited to: Locators, Managers, Cache Servers and so on | status | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/management/internal/beans/MemberMBeanBridge.java",
"license": "apache-2.0",
"size": 45415
} | [
"org.apache.geode.distributed.LocatorLauncher",
"org.apache.geode.distributed.ServerLauncher"
] | import org.apache.geode.distributed.LocatorLauncher; import org.apache.geode.distributed.ServerLauncher; | import org.apache.geode.distributed.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,136,872 |
public void start() {
if (this.c.isDisposed()) {
SWT.error(SWT.ERROR_WIDGET_DISPOSED);
}
this.currentPosition = 0;
this.fadeIn = true;
this.fadeOut = false;
this.fadeOutCounter = 0;
if (this.defaultColor == null) {
this.defaultColor = SWTGraphicUtil.getDefaultColor(this.c, 200, 200, 200);
}
... | void function() { if (this.c.isDisposed()) { SWT.error(SWT.ERROR_WIDGET_DISPOSED); } this.currentPosition = 0; this.fadeIn = true; this.fadeOut = false; this.fadeOutCounter = 0; if (this.defaultColor == null) { this.defaultColor = SWTGraphicUtil.getDefaultColor(this.c, 200, 200, 200); } if (this.selectionColor == null)... | /**
* Starts the ticker
*/ | Starts the ticker | start | {
"repo_name": "Transkribus/TranskribusSwtGui",
"path": "src/main/java/eu/transkribus/swt/util/MyInfiniteProgressPanel.java",
"license": "gpl-3.0",
"size": 16731
} | [
"org.eclipse.swt.SWT",
"org.mihalis.opal.utils.SWTGraphicUtil"
] | import org.eclipse.swt.SWT; import org.mihalis.opal.utils.SWTGraphicUtil; | import org.eclipse.swt.*; import org.mihalis.opal.utils.*; | [
"org.eclipse.swt",
"org.mihalis.opal"
] | org.eclipse.swt; org.mihalis.opal; | 1,108,377 |
@Override
public boolean isLockable(Type type, Scope scope) {
return supportedLock.isSupportedLock(type, scope);
} | boolean function(Type type, Scope scope) { return supportedLock.isSupportedLock(type, scope); } | /**
* Returns true, if the {@link SupportedLock} property contains an entry
* with the given type and scope. By default resources allow for {@link org.apache.jackrabbit.webdav.transaction.TransactionConstants#XML_TRANSACTION
* transaction} lock only.
*
* @param type
* @param scope
* @... | Returns true, if the <code>SupportedLock</code> property contains an entry with the given type and scope. By default resources allow for <code>org.apache.jackrabbit.webdav.transaction.TransactionConstants#XML_TRANSACTION transaction</code> lock only | isLockable | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/AbstractResource.java",
"license": "apache-2.0",
"size": 32873
} | [
"org.apache.jackrabbit.webdav.lock.Scope",
"org.apache.jackrabbit.webdav.lock.Type"
] | import org.apache.jackrabbit.webdav.lock.Scope; import org.apache.jackrabbit.webdav.lock.Type; | import org.apache.jackrabbit.webdav.lock.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 1,253,547 |
@Command(shortDescription = "Removes all entities of the given prefab", runOnServer = true)
public void destroyEntitiesUsingPrefab(@CommandParam("prefabName") String prefabName) {
Prefab prefab = entityManager.getPrefabManager().getPrefab(prefabName);
if (prefab != null) {
for (Entit... | @Command(shortDescription = STR, runOnServer = true) void function(@CommandParam(STR) String prefabName) { Prefab prefab = entityManager.getPrefabManager().getPrefab(prefabName); if (prefab != null) { for (EntityRef entity : entityManager.getAllEntities()) { if (prefab.equals(entity.getParentPrefab())) { entity.destroy... | /**
* Removes all entities of the given prefab
* @param prefabName String containing prefab name
*/ | Removes all entities of the given prefab | destroyEntitiesUsingPrefab | {
"repo_name": "kartikey0303/Terasology",
"path": "engine/src/main/java/org/terasology/logic/console/commands/CoreCommands.java",
"license": "apache-2.0",
"size": 31609
} | [
"org.terasology.entitySystem.entity.EntityRef",
"org.terasology.entitySystem.prefab.Prefab",
"org.terasology.logic.console.commandSystem.annotations.Command",
"org.terasology.logic.console.commandSystem.annotations.CommandParam"
] | import org.terasology.entitySystem.entity.EntityRef; import org.terasology.entitySystem.prefab.Prefab; import org.terasology.logic.console.commandSystem.annotations.Command; import org.terasology.logic.console.commandSystem.annotations.CommandParam; | import org.terasology.*; import org.terasology.logic.console.*; | [
"org.terasology",
"org.terasology.logic"
] | org.terasology; org.terasology.logic; | 295,343 |
// package-private to return a typed UnboundedCountingSource rather than the UnboundedSource type.
static UnboundedCountingSource createUnbounded() {
return new UnboundedCountingSource(0, 1, 1L, Duration.ZERO, new NowTimestampFn());
} | static UnboundedCountingSource createUnbounded() { return new UnboundedCountingSource(0, 1, 1L, Duration.ZERO, new NowTimestampFn()); } | /**
* Create a new {@link UnboundedCountingSource}.
*/ | Create a new <code>UnboundedCountingSource</code> | createUnbounded | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java",
"license": "apache-2.0",
"size": 17782
} | [
"org.joda.time.Duration"
] | import org.joda.time.Duration; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,371,063 |
@Test
public void testHashcode() {
XYDotRenderer r1 = new XYDotRenderer();
XYDotRenderer r2 = new XYDotRenderer();
assertTrue(r1.equals(r2));
int h1 = r1.hashCode();
int h2 = r2.hashCode();
assertEquals(h1, h2);
r1.setDotHeight(12);
r2.setDotHeigh... | void function() { XYDotRenderer r1 = new XYDotRenderer(); XYDotRenderer r2 = new XYDotRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); r1.setDotHeight(12); r2.setDotHeight(12); assertTrue(r1.equals(r2)); h1 = r1.hashCode(); h2 = r2.hashCode(); assertEquals(h1,... | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashcode | {
"repo_name": "GitoMat/jfreechart",
"path": "src/test/java/org/jfree/chart/renderer/xy/XYDotRendererTest.java",
"license": "lgpl-2.1",
"size": 5671
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 515,119 |
@Query("SELECT SUM(fin.faceValue)"
+ " FROM AbstractFinance fin "
+ " WHERE fin.entity.id = ?1 "
+ " AND fin.nextCheckDate > ?2 "
+ " AND fin.resolution in (?3)")
BigDecimal sumFaceValueByEntityIdAndNextCheckDateAfter(Integer entityId, Date start, Set<Character> resolutions); | @Query(STR + STR + STR + STR + STR) BigDecimal sumFaceValueByEntityIdAndNextCheckDateAfter(Integer entityId, Date start, Set<Character> resolutions); | /**
* Sum faceValue by entityId nextCheckDate after startDate.
*
* @param entityId
*
*/ | Sum faceValue by entityId nextCheckDate after startDate | sumFaceValueByEntityIdAndNextCheckDateAfter | {
"repo_name": "iservport/helianto-finance",
"path": "src/main/java/org/helianto/finance/repository/AbstractFinanceRepository.java",
"license": "apache-2.0",
"size": 10575
} | [
"java.math.BigDecimal",
"java.util.Date",
"java.util.Set",
"org.springframework.data.jpa.repository.Query"
] | import java.math.BigDecimal; import java.util.Date; import java.util.Set; import org.springframework.data.jpa.repository.Query; | import java.math.*; import java.util.*; import org.springframework.data.jpa.repository.*; | [
"java.math",
"java.util",
"org.springframework.data"
] | java.math; java.util; org.springframework.data; | 766,920 |
protected void assertEquals(Database expected, Database actual)
{
try
{
assertEquals("Model names do not match.",
expected.getName(),
actual.getName());
assertEquals("Not the same number of tables.",
... | void function(Database expected, Database actual) { try { assertEquals(STR, expected.getName(), actual.getName()); assertEquals(STR, expected.getTableCount(), actual.getTableCount()); for (int tableIdx = 0; tableIdx < actual.getTableCount(); tableIdx++) { assertEquals(expected.getTable(tableIdx), actual.getTable(tableI... | /**
* Asserts that the two given database models are equal, and if not, writes both of them
* in XML form to <code>stderr</code>.
*
* @param expected The expected model
* @param actual The actual model
*/ | Asserts that the two given database models are equal, and if not, writes both of them in XML form to <code>stderr</code> | assertEquals | {
"repo_name": "etiago/apache-ddlutils",
"path": "src/test/org/apache/ddlutils/io/RoundtripTestBase.java",
"license": "apache-2.0",
"size": 28094
} | [
"java.io.StringWriter",
"org.apache.ddlutils.DdlUtilsException",
"org.apache.ddlutils.model.Database"
] | import java.io.StringWriter; import org.apache.ddlutils.DdlUtilsException; import org.apache.ddlutils.model.Database; | import java.io.*; import org.apache.ddlutils.*; import org.apache.ddlutils.model.*; | [
"java.io",
"org.apache.ddlutils"
] | java.io; org.apache.ddlutils; | 1,909,227 |
public static List<Endpoint> getConsoleServerList() {
String config = SentinelConfig.getConfig(CONSOLE_SERVER);
List<Endpoint> list = new ArrayList<Endpoint>();
if (StringUtil.isBlank(config)) {
return list;
}
int pos = -1;
int cur = 0;
while (tru... | static List<Endpoint> function() { String config = SentinelConfig.getConfig(CONSOLE_SERVER); List<Endpoint> list = new ArrayList<Endpoint>(); if (StringUtil.isBlank(config)) { return list; } int pos = -1; int cur = 0; while (true) { pos = config.indexOf(',', cur); if (cur < config.length() - 1 && pos < 0) { pos = confi... | /**
* Get a list of Endpoint(protocol, ip/domain, port) indicating Sentinel Dashboard's address.<br>
* NOTE: only support <b>HTTP</b> and <b>HTTPS</b> protocol
*
* @return list of Endpoint(protocol, ip/domain, port). <br>
* <b>May not be null</b>. <br>
* An empty list retur... | Get a list of Endpoint(protocol, ip/domain, port) indicating Sentinel Dashboard's address | getConsoleServerList | {
"repo_name": "alibaba/Sentinel",
"path": "sentinel-transport/sentinel-transport-common/src/main/java/com/alibaba/csp/sentinel/transport/config/TransportConfig.java",
"license": "apache-2.0",
"size": 6335
} | [
"com.alibaba.csp.sentinel.config.SentinelConfig",
"com.alibaba.csp.sentinel.log.RecordLog",
"com.alibaba.csp.sentinel.transport.endpoint.Endpoint",
"com.alibaba.csp.sentinel.transport.endpoint.Protocol",
"com.alibaba.csp.sentinel.util.StringUtil",
"java.util.ArrayList",
"java.util.List"
] | import com.alibaba.csp.sentinel.config.SentinelConfig; import com.alibaba.csp.sentinel.log.RecordLog; import com.alibaba.csp.sentinel.transport.endpoint.Endpoint; import com.alibaba.csp.sentinel.transport.endpoint.Protocol; import com.alibaba.csp.sentinel.util.StringUtil; import java.util.ArrayList; import java.util.Li... | import com.alibaba.csp.sentinel.config.*; import com.alibaba.csp.sentinel.log.*; import com.alibaba.csp.sentinel.transport.endpoint.*; import com.alibaba.csp.sentinel.util.*; import java.util.*; | [
"com.alibaba.csp",
"java.util"
] | com.alibaba.csp; java.util; | 2,059,967 |
public boolean getCenterSectionStatusIP(String section, long programID) {
CrpProgram program = this.crpProgramManager.getCrpProgramById(programID);
if (ImpactPathwaySectionsEnum.getValue(section) == null) {
return false;
}
switch (ImpactPathwaySectionsEnum.getValue(section)) {
case PROGR... | boolean function(String section, long programID) { CrpProgram program = this.crpProgramManager.getCrpProgramById(programID); if (ImpactPathwaySectionsEnum.getValue(section) == null) { return false; } switch (ImpactPathwaySectionsEnum.getValue(section)) { case PROGRAM_IMPACT: return this.validateCenterImpact(program, se... | /**
* ************************ CENTER METHOD ********************* Validate the
* sections of the Impact Pathway *
* ***************************************************************
*
* @return true if the IP is complete
*/ | CENTER METHOD ********************* Validate the sections of the Impact Pathway | getCenterSectionStatusIP | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-web/src/main/java/org/cgiar/ccafs/marlo/action/BaseAction.java",
"license": "gpl-3.0",
"size": 268256
} | [
"org.cgiar.ccafs.marlo.data.model.CrpProgram",
"org.cgiar.ccafs.marlo.data.model.ImpactPathwaySectionsEnum"
] | import org.cgiar.ccafs.marlo.data.model.CrpProgram; import org.cgiar.ccafs.marlo.data.model.ImpactPathwaySectionsEnum; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 2,570,300 |
protected char[] getPasswordFromConfig(String name) {
char[] pass = null;
if (getBoolean(CredentialProvider.CLEAR_TEXT_FALLBACK,
CommonConfigurationKeysPublic.
HADOOP_SECURITY_CREDENTIAL_CLEAR_TEXT_FALLBACK_DEFAULT)) {
String passStr = get(name);
if (passStr != null) {
... | char[] function(String name) { char[] pass = null; if (getBoolean(CredentialProvider.CLEAR_TEXT_FALLBACK, CommonConfigurationKeysPublic. HADOOP_SECURITY_CREDENTIAL_CLEAR_TEXT_FALLBACK_DEFAULT)) { String passStr = get(name); if (passStr != null) { pass = passStr.toCharArray(); } } return pass; } | /**
* Fallback to clear text passwords in configuration.
* @param name
* @return clear text password or null
*/ | Fallback to clear text passwords in configuration | getPasswordFromConfig | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 128054
} | [
"org.apache.hadoop.fs.CommonConfigurationKeysPublic",
"org.apache.hadoop.security.alias.CredentialProvider"
] | import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.security.alias.CredentialProvider; | import org.apache.hadoop.fs.*; import org.apache.hadoop.security.alias.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,996,875 |
public void startLogging(RequestLogger logger) {
ResourceServices services = getServices();
if (services != null)
services.startLogging(logger);
} | void function(RequestLogger logger) { ResourceServices services = getServices(); if (services != null) services.startLogging(logger); } | /**
* Starts debugging client requests. You can suspend and resume debugging output
* using the methods of the logger.
*
* @param logger the logger that receives debugging output
*/ | Starts debugging client requests. You can suspend and resume debugging output using the methods of the logger | startLogging | {
"repo_name": "grechaw/java-client-api",
"path": "src/main/java/com/marklogic/client/extensions/ResourceManager.java",
"license": "apache-2.0",
"size": 2550
} | [
"com.marklogic.client.util.RequestLogger"
] | import com.marklogic.client.util.RequestLogger; | import com.marklogic.client.util.*; | [
"com.marklogic.client"
] | com.marklogic.client; | 1,037,406 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<SBSubscriptionInner>> listByTopicSinglePageAsync(
String resourceGroupName, String namespaceName, String topicName, Integer skip, Integer top) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<SBSubscriptionInner>> function( String resourceGroupName, String namespaceName, String topicName, Integer skip, Integer top) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null)... | /**
* List all the subscriptions under a specified topic.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param namespaceName The namespace name.
* @param topicName The topic name.
* @param skip Skip is only used if a previous operation returned a ... | List all the subscriptions under a specified topic | listByTopicSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-servicebus/src/main/java/com/azure/resourcemanager/servicebus/implementation/SubscriptionsClientImpl.java",
"license": "mit",
"size": 50121
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.servicebus.fluent.models.SBSubscriptionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.servicebus.fluent.models.SBSubscriptionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.servicebus.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,392,317 |
private static SuggestedFix getFixForEarlyReference(JSError error, AbstractCompiler compiler) {
Matcher m = EARLY_REF.matcher(error.description);
if (m.matches()) {
String name = m.group(1);
Node stmt = NodeUtil.getEnclosingStatement(error.node);
return new SuggestedFix.Builder()
.... | static SuggestedFix function(JSError error, AbstractCompiler compiler) { Matcher m = EARLY_REF.matcher(error.description); if (m.matches()) { String name = m.group(1); Node stmt = NodeUtil.getEnclosingStatement(error.node); return new SuggestedFix.Builder() .attachMatchedNodeInfo(error.node, compiler) .insertBefore(stm... | /**
* This fix is not ideal. It trades one warning (JSC_REFERENCE_BEFORE_DECLARE) for another
* (JSC_REDECLARED_VARIABLE). But after running the fixer once, you can then run it again and
* #getFixForRedeclaration will take care of the JSC_REDECLARED_VARIABLE warning.
*/ | This fix is not ideal. It trades one warning (JSC_REFERENCE_BEFORE_DECLARE) for another (JSC_REDECLARED_VARIABLE). But after running the fixer once, you can then run it again and #getFixForRedeclaration will take care of the JSC_REDECLARED_VARIABLE warning | getFixForEarlyReference | {
"repo_name": "Pimm/closure-compiler",
"path": "src/com/google/javascript/refactoring/ErrorToFixMapper.java",
"license": "apache-2.0",
"size": 16284
} | [
"com.google.javascript.jscomp.AbstractCompiler",
"com.google.javascript.jscomp.JSError",
"com.google.javascript.jscomp.NodeUtil",
"com.google.javascript.rhino.Node",
"java.util.regex.Matcher"
] | import com.google.javascript.jscomp.AbstractCompiler; import com.google.javascript.jscomp.JSError; import com.google.javascript.jscomp.NodeUtil; import com.google.javascript.rhino.Node; import java.util.regex.Matcher; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.regex.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 88,231 |
@Override
public T defaultCase(EObject object) {
return null;
} | T function(EObject object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.... | Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway. | defaultCase | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/integers/util/IntegersSwitch.java",
"license": "epl-1.0",
"size": 22808
} | [
"org.eclipse.emf.ecore.EObject"
] | import org.eclipse.emf.ecore.EObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 708,757 |
public Variable[] getIterables() {
Variable[] iterables= getCompletion().findLocalIterables();
arrange(iterables);
return iterables;
} | Variable[] function() { Variable[] iterables= getCompletion().findLocalIterables(); arrange(iterables); return iterables; } | /**
* Returns the names of local iterables or arrays.
*
* @return the names of local iterables or arrays
*/ | Returns the names of local iterables or arrays | getIterables | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38",
"path": "juno38/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/template/java/JavaContext.java",
"license": "epl-1.0",
"size": 25130
} | [
"org.eclipse.jdt.internal.corext.template.java.CompilationUnitCompletion"
] | import org.eclipse.jdt.internal.corext.template.java.CompilationUnitCompletion; | import org.eclipse.jdt.internal.corext.template.java.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,574,702 |
public MediaDao getMediaDao(MediaTable mediaTable) {
return getMediaDao(mediaTable.getTableName());
} | MediaDao function(MediaTable mediaTable) { return getMediaDao(mediaTable.getTableName()); } | /**
* Get a related media table DAO
*
* @param mediaTable
* media table
* @return media DAO
*/ | Get a related media table DAO | getMediaDao | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/related/RelatedTablesExtension.java",
"license": "mit",
"size": 6418
} | [
"mil.nga.geopackage.extension.related.media.MediaDao",
"mil.nga.geopackage.extension.related.media.MediaTable"
] | import mil.nga.geopackage.extension.related.media.MediaDao; import mil.nga.geopackage.extension.related.media.MediaTable; | import mil.nga.geopackage.extension.related.media.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 2,886,978 |
public void recvMessage(String message);
}
// ==================================================================
// The public API to the UI class
public CCNCS2Net(CCNChatCallback callback, String namespace) throws MalformedContentNameStringException {
_callback = callback;
_namespace =... | void function(String message); } public CCNCS2Net(CCNChatCallback callback, String namespace) throws MalformedContentNameStringException { _callback = callback; _namespace = ContentName.fromURI(namespace); _namespaceStr = namespace; _friendlyNameToDigestHash = new HashMap<PublisherPublicKeyDigest, String>(); } | /**
* Implemented by concrete UI class
* Receive a message from the network
* @param message
*/ | Implemented by concrete UI class Receive a message from the network | recvMessage | {
"repo_name": "svartika/ccnx",
"path": "apps/ccnVartikaCS2/src/org/ccnx/ccn/apps/ccnVartikaCS2/CCNCS2Net.java",
"license": "lgpl-2.1",
"size": 9579
} | [
"java.util.HashMap",
"org.ccnx.ccn.protocol.ContentName",
"org.ccnx.ccn.protocol.MalformedContentNameStringException",
"org.ccnx.ccn.protocol.PublisherPublicKeyDigest"
] | import java.util.HashMap; import org.ccnx.ccn.protocol.ContentName; import org.ccnx.ccn.protocol.MalformedContentNameStringException; import org.ccnx.ccn.protocol.PublisherPublicKeyDigest; | import java.util.*; import org.ccnx.ccn.protocol.*; | [
"java.util",
"org.ccnx.ccn"
] | java.util; org.ccnx.ccn; | 1,978,628 |
public Stream<WayPoint> points() {
return _points.stream();
} | Stream<WayPoint> function() { return _points.stream(); } | /**
* Return a stream of {@link WayPoint} objects this track-segments contains.
*
* @return a stream of {@link WayPoint} objects this track-segment contains
*/ | Return a stream of <code>WayPoint</code> objects this track-segments contains | points | {
"repo_name": "jenetics/jpx",
"path": "jpx/src/main/java/io/jenetics/jpx/TrackSegment.java",
"license": "apache-2.0",
"size": 11849
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 1,871,951 |
public ErrorMessage getErrorMessage() {
return componentError;
} | ErrorMessage function() { return componentError; } | /**
* Gets the error message for this component.
*
* @return ErrorMessage containing the description of the error state of the
* component or null, if the component contains no errors. Extending
* classes should override this method if they support other error
* mes... | Gets the error message for this component | getErrorMessage | {
"repo_name": "Legioth/vaadin",
"path": "server/src/main/java/com/vaadin/ui/AbstractComponent.java",
"license": "apache-2.0",
"size": 46149
} | [
"com.vaadin.server.ErrorMessage"
] | import com.vaadin.server.ErrorMessage; | import com.vaadin.server.*; | [
"com.vaadin.server"
] | com.vaadin.server; | 1,224,048 |
public static L2ModificationInstruction modL2Dst(MacAddress addr) {
checkNotNull(addr, "Dst l2 address cannot be null");
return new ModEtherInstruction(L2SubType.ETH_DST, addr);
} | static L2ModificationInstruction function(MacAddress addr) { checkNotNull(addr, STR); return new ModEtherInstruction(L2SubType.ETH_DST, addr); } | /**
* Creates a L2 dst modification.
*
* @param addr the mac address to modify to
* @return a L2 modification
*/ | Creates a L2 dst modification | modL2Dst | {
"repo_name": "kuangrewawa/onos",
"path": "core/api/src/main/java/org/onosproject/net/flow/instructions/Instructions.java",
"license": "apache-2.0",
"size": 15029
} | [
"com.google.common.base.Preconditions",
"org.onlab.packet.MacAddress",
"org.onosproject.net.flow.instructions.L2ModificationInstruction"
] | import com.google.common.base.Preconditions; import org.onlab.packet.MacAddress; import org.onosproject.net.flow.instructions.L2ModificationInstruction; | import com.google.common.base.*; import org.onlab.packet.*; import org.onosproject.net.flow.instructions.*; | [
"com.google.common",
"org.onlab.packet",
"org.onosproject.net"
] | com.google.common; org.onlab.packet; org.onosproject.net; | 906,320 |
public Response getDatasets(Map<String, String> queryParameters) {
return given() //
.when() //
.queryParameters(queryParameters) //
.get("/api/datasets");
} | Response function(Map<String, String> queryParameters) { return given() .queryParameters(queryParameters) } | /**
* Return the list of datasets
*
* @param queryParameters Map containing the parameter names and their values to send with the request.
* @return The response of the request.
*/ | Return the list of datasets | getDatasets | {
"repo_name": "Talend/data-prep",
"path": "dataprep-api/src/test/java/org/talend/dataprep/helper/OSDataPrepAPIHelper.java",
"license": "apache-2.0",
"size": 23380
} | [
"com.jayway.restassured.response.Response",
"java.util.Map"
] | import com.jayway.restassured.response.Response; import java.util.Map; | import com.jayway.restassured.response.*; import java.util.*; | [
"com.jayway.restassured",
"java.util"
] | com.jayway.restassured; java.util; | 1,346,992 |
@javax.annotation.Nullable
@ApiModelProperty(value = "Defending alliance, only present in Defense Events ")
public Integer getDefenderId() {
return defenderId;
} | @javax.annotation.Nullable @ApiModelProperty(value = STR) Integer function() { return defenderId; } | /**
* Defending alliance, only present in Defense Events
*
* @return defenderId
**/ | Defending alliance, only present in Defense Events | getDefenderId | {
"repo_name": "burberius/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/SovereigntyCampaignsResponse.java",
"license": "apache-2.0",
"size": 13885
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 698,812 |
public StreamingReader read(InputStream is) {
File f = null;
try {
f = writeInputStreamToFile(is, bufferSize);
log.debug("Created temp file [" + f.getAbsolutePath() + "]");
StreamingReader r = read(f);
r.tmp = f;
return r;
} catch (IOException e) {
... | StreamingReader function(InputStream is) { File f = null; try { f = writeInputStreamToFile(is, bufferSize); log.debug(STR + f.getAbsolutePath() + "]"); StreamingReader r = read(f); r.tmp = f; return r; } catch (IOException e) { throw new ReadException(STR, e); } catch (RuntimeException e) { f.delete(); throw e; } } | /**
* Reads a given {@code InputStream} and returns a new
* instance of {@code StreamingReader}. Due to Apache POI
* limitations, a temporary file must be written in order
* to create a streaming iterator. This process will use
* the same buffer size as specified in {@link #bufferSize(int)}.
... | Reads a given InputStream and returns a new instance of StreamingReader. Due to Apache POI limitations, a temporary file must be written in order to create a streaming iterator. This process will use the same buffer size as specified in <code>#bufferSize(int)</code> | read | {
"repo_name": "nyer/excel-streaming-reader",
"path": "src/main/java/com/monitorjbl/xlsx/StreamingReader.java",
"license": "gpl-2.0",
"size": 12699
} | [
"com.monitorjbl.xlsx.exceptions.ReadException",
"java.io.File",
"java.io.IOException",
"java.io.InputStream"
] | import com.monitorjbl.xlsx.exceptions.ReadException; import java.io.File; import java.io.IOException; import java.io.InputStream; | import com.monitorjbl.xlsx.exceptions.*; import java.io.*; | [
"com.monitorjbl.xlsx",
"java.io"
] | com.monitorjbl.xlsx; java.io; | 2,427,682 |
public T caseMMESPSWIPackageElement(MMESPSWIPackageElement object) {
return null;
} | T function(MMESPSWIPackageElement object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>MMESPSWIPackageElement</em>'.
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>MMESPSWIPackageElement</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject... | Returns the result of interpreting the object as an instance of 'MMESPSWIPackageElement' | caseMMESPSWIPackageElement | {
"repo_name": "parraman/micobs",
"path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/mespswi/util/mespswiSwitch.java",
"license": "epl-1.0",
"size": 6068
} | [
"es.uah.aut.srg.micobs.mesp.mespswi.MMESPSWIPackageElement"
] | import es.uah.aut.srg.micobs.mesp.mespswi.MMESPSWIPackageElement; | import es.uah.aut.srg.micobs.mesp.mespswi.*; | [
"es.uah.aut"
] | es.uah.aut; | 1,615,557 |
EEnum getColor(); | EEnum getColor(); | /**
* Returns the meta object for enum '{@link visualizacionMetricas3.visualizacion.Color <em>Color</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for enum '<em>Color</em>'.
* @see visualizacionMetricas3.visualizacion.Color
* @generated
*/ | Returns the meta object for enum '<code>visualizacionMetricas3.visualizacion.Color Color</code>'. | getColor | {
"repo_name": "lfmendivelso10/AppModernization",
"path": "source/i2/VisualizacionMetricas3/src/visualizacionMetricas3/visualizacion/VisualizacionPackage.java",
"license": "mit",
"size": 96014
} | [
"org.eclipse.emf.ecore.EEnum"
] | import org.eclipse.emf.ecore.EEnum; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,504,837 |
public void run()
{
while(m_isDrawing)
{
Canvas canvas = m_surface.lockCanvas();
if(canvas != null)
{
try
{
// clear canvas
canvas.drawColor(Color.WHITE);
// draw stuffs
m_grid.Draw(canvas, m_camera);
}
finally
{
m_surface.unlockCanvasAndPost(canv... | void function() { while(m_isDrawing) { Canvas canvas = m_surface.lockCanvas(); if(canvas != null) { try { canvas.drawColor(Color.WHITE); m_grid.Draw(canvas, m_camera); } finally { m_surface.unlockCanvasAndPost(canvas); } } try { Thread.sleep((long) (1000.0f / FPS)); } catch (InterruptedException e) { Log.w(TAG, STR); }... | /**
* Main thread for drawing
*/ | Main thread for drawing | run | {
"repo_name": "IPPETAD/adventure.datetime",
"path": "adventure.datetime/src/ca/cmput301f13t03/adventure_datetime/view/treeView/TreeView.java",
"license": "mit",
"size": 5325
} | [
"android.graphics.Canvas",
"android.graphics.Color",
"android.util.Log"
] | import android.graphics.Canvas; import android.graphics.Color; import android.util.Log; | import android.graphics.*; import android.util.*; | [
"android.graphics",
"android.util"
] | android.graphics; android.util; | 34,808 |
public static void closeQuietly(OutputStream os) {
close(os);
} | static void function(OutputStream os) { close(os); } | /**
* Equivalent of {@link #closeQuietly(InputStream)} but for
* {@link OutputStream} extending classes
*/ | Equivalent of <code>#closeQuietly(InputStream)</code> but for <code>OutputStream</code> extending classes | closeQuietly | {
"repo_name": "thomasmaurel/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/util/InputOutputUtils.java",
"license": "apache-2.0",
"size": 9464
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 566,898 |
@Override
public Size2D arrange(Graphics2D g2, RectangleConstraint constraint) {
Size2D s = new Size2D(this.image.getWidth(null),
this.image.getHeight(null));
return new Size2D(calculateTotalWidth(s.getWidth()),
calculateTotalHeight(s.getHeight()));
}
| Size2D function(Graphics2D g2, RectangleConstraint constraint) { Size2D s = new Size2D(this.image.getWidth(null), this.image.getHeight(null)); return new Size2D(calculateTotalWidth(s.getWidth()), calculateTotalHeight(s.getHeight())); } | /**
* Arranges the contents of the block, within the given constraints, and
* returns the block size.
*
* @param g2 the graphics device.
* @param constraint the constraint (<code>null</code> not permitted).
*
* @return The block size (in Java2D units, never <code>null</code>)... | Arranges the contents of the block, within the given constraints, and returns the block size | arrange | {
"repo_name": "raincs13/phd",
"path": "source/org/jfree/chart/title/ImageTitle.java",
"license": "lgpl-2.1",
"size": 13512
} | [
"java.awt.Graphics2D",
"org.jfree.chart.block.RectangleConstraint",
"org.jfree.ui.Size2D"
] | import java.awt.Graphics2D; import org.jfree.chart.block.RectangleConstraint; import org.jfree.ui.Size2D; | import java.awt.*; import org.jfree.chart.block.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.ui"
] | java.awt; org.jfree.chart; org.jfree.ui; | 2,350,975 |
Match child();
/**
* Find the first matching child of each element in the current set of
* matched elements
* <p>
* The selector provided to this method supports the following features:
* <ul>
* <li><strong>*</strong> can be used to select everything</li>
* <li><stro... | Match child(); /** * Find the first matching child of each element in the current set of * matched elements * <p> * The selector provided to this method supports the following features: * <ul> * <li><strong>*</strong> can be used to select everything</li> * <li><strong>tag names</strong> can be used to select XML eleme... | /**
* Find the first child of each element in the current set of matched
* elements.
* <p>
* This is the same as calling <code>child(0)</code>.
*/ | Find the first child of each element in the current set of matched elements. This is the same as calling <code>child(0)</code> | child | {
"repo_name": "jOOQ/jOOX",
"path": "jOOX/src/main/java/org/joox/Match.java",
"license": "apache-2.0",
"size": 83723
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,181,831 |
public static <T extends Fragment> void notImplemented(T context) {
notImplemented(context.getActivity());
} | static <T extends Fragment> void function(T context) { notImplemented(context.getActivity()); } | /**
* Show not implemented message to the user.
*
* @param context any available context.
*/ | Show not implemented message to the user | notImplemented | {
"repo_name": "OleksandrKucherenko/spacefish",
"path": "_libs/artfulbits-sdk/src/main/com/artfulbits/utils/Use.java",
"license": "mit",
"size": 46048
} | [
"android.support.v4.app.Fragment"
] | import android.support.v4.app.Fragment; | import android.support.v4.app.*; | [
"android.support"
] | android.support; | 154,601 |
public void setIsAllProp(boolean isAllProp) {
Element child = getFirstChild(root, childNames);
boolean isAlreadyAllProp = isDAVElement(child, "allprop"); //$NON-NLS-1$
if (isAllProp) {
if (!isAlreadyAllProp) {
if (child != null)
root.removeChil... | void function(boolean isAllProp) { Element child = getFirstChild(root, childNames); boolean isAlreadyAllProp = isDAVElement(child, STR); if (isAllProp) { if (!isAlreadyAllProp) { if (child != null) root.removeChild(child); appendChild(root, STR); } } else if (isAlreadyAllProp) root.removeChild(child); } | /**
* Sets whether this propfind is in the "all prop" form.
*
* @param isAllProp boolean indicating whether this propfind will be in the
* "all prop" form
*/ | Sets whether this propfind is in the "all prop" form | setIsAllProp | {
"repo_name": "droolsjbpm/droolsjbpm-tools",
"path": "drools-eclipse/org.guvnor.eclipse.webdav/src/interface/org/eclipse/webdav/dom/PropFind.java",
"license": "apache-2.0",
"size": 8001
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,170,749 |
@Test
public void testForAllFields() {
RestOperations restOperationsObject = new RestOperations();
com.jayway.restassured.response.Response getResponse = restOperationsObject.get("http://" + this.getHostName() + "/" + this.SERVICES + "/" + GoalMethods.GET_GOALS);
JSONArray jsonArray = this.convertGoalRespons... | void function() { RestOperations restOperationsObject = new RestOperations(); com.jayway.restassured.response.Response getResponse = restOperationsObject.get(STRidSTRExpected that id field exists in goal.STRnameSTRExpected that name field exists in goal.STRdueDateSTRExpected that dueDate field exists in goal.STRnotesST... | /**
* Test Scenario : Verify whether goal contains all the fields.
*/ | Test Scenario : Verify whether goal contains all the fields | testForAllFields | {
"repo_name": "lawpremkumar/goal-tracker-automation",
"path": "src/test/java/com/theothermattm/goal/domain/qe/tests/TestGetGoals.java",
"license": "apache-2.0",
"size": 2322
} | [
"com.theothermattm.goal.domain.qe.lib.RestOperations"
] | import com.theothermattm.goal.domain.qe.lib.RestOperations; | import com.theothermattm.goal.domain.qe.lib.*; | [
"com.theothermattm.goal"
] | com.theothermattm.goal; | 661,466 |
protected static <ReturnType, InputType> Symbol evaluateIfLiterals(Scalar<ReturnType, InputType> scalar,
TransactionContext txnCtx,
NodeContext nodeCtx,
... | static <ReturnType, InputType> Symbol function(Scalar<ReturnType, InputType> scalar, TransactionContext txnCtx, NodeContext nodeCtx, Function function) { List<Symbol> arguments = function.arguments(); for (Symbol argument : arguments) { if (!(argument instanceof Input)) { return function; } } Input[] inputs = new Input... | /**
* This method will evaluate the function using the given scalar if all arguments are literals.
* Otherwise it will return the function as is or NULL in case it contains a null literal
*/ | This method will evaluate the function using the given scalar if all arguments are literals. Otherwise it will return the function as is or NULL in case it contains a null literal | evaluateIfLiterals | {
"repo_name": "crate/crate",
"path": "server/src/main/java/io/crate/metadata/Scalar.java",
"license": "apache-2.0",
"size": 7927
} | [
"io.crate.data.Input",
"io.crate.expression.symbol.Function",
"io.crate.expression.symbol.Literal",
"io.crate.expression.symbol.Symbol",
"java.util.List"
] | import io.crate.data.Input; import io.crate.expression.symbol.Function; import io.crate.expression.symbol.Literal; import io.crate.expression.symbol.Symbol; import java.util.List; | import io.crate.data.*; import io.crate.expression.symbol.*; import java.util.*; | [
"io.crate.data",
"io.crate.expression",
"java.util"
] | io.crate.data; io.crate.expression; java.util; | 2,541,284 |
@Test
public void testHelpWithDanglingArgument() throws Exception {
logFile();
Process p = createAndStartProcess("--help", "true");
int exitCode = p.waitFor();
assertEquals("successful termination", 0, exitCode);
} | void function() throws Exception { logFile(); Process p = createAndStartProcess(STR, "true"); int exitCode = p.waitFor(); assertEquals(STR, 0, exitCode); } | /**
* Test simple help command with dangling argument (should be ignored).
*/ | Test simple help command with dangling argument (should be ignored) | testHelpWithDanglingArgument | {
"repo_name": "lbeurerkellner/n4js",
"path": "tests/org.eclipse.n4js.hlc.integrationtests/src/org/eclipse/n4js/hlc/integrationtests/SingleFileCompileN4jscJarTest.java",
"license": "epl-1.0",
"size": 5527
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 292,790 |
void onClose(List<String> changedStructureIds, long delayMillis); | void onClose(List<String> changedStructureIds, long delayMillis); | /**
* Disposes of the extension, and tells the server which resources have changed.<p>
*
* @param changedStructureIds the structure ids of changed resources, as strings
* @param delayMillis time to delay the RPC (for allowing short background operations to finish)
*/ | Disposes of the extension, and tells the server which resources have changed | onClose | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/ui/shared/components/I_CmsGwtDialogServerRpc.java",
"license": "lgpl-2.1",
"size": 1946
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 552,923 |
@Test
public void readTest6() throws Exception {
String uniqPath = PathUtils.uniqPath();
for (int k = MIN_LEN + DELTA; k <= MAX_LEN; k += DELTA) {
AlluxioURI uri = new AlluxioURI(uniqPath + "/file_" + k);
FileSystemTestUtils.createByteFile(mFileSystem, uri, mWriteAlluxio, k);
URIStatus st... | void function() throws Exception { String uniqPath = PathUtils.uniqPath(); for (int k = MIN_LEN + DELTA; k <= MAX_LEN; k += DELTA) { AlluxioURI uri = new AlluxioURI(uniqPath + STR + k); FileSystemTestUtils.createByteFile(mFileSystem, uri, mWriteAlluxio, k); URIStatus status = mFileSystem.getStatus(uri); InStreamOptions... | /**
* Tests the batch read API with offset and length from a remote location when the data is in an
* Alluxio worker.
*/ | Tests the batch read API with offset and length from a remote location when the data is in an Alluxio worker | readTest6 | {
"repo_name": "bf8086/alluxio",
"path": "tests/src/test/java/alluxio/client/fs/RemoteReadIntegrationTest.java",
"license": "apache-2.0",
"size": 22015
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,401,325 |
private File storeSshScript(String keyPath) throws ServerException {
File sshScriptFile = new File(rootFolder, getSshKeyFileName());
try (FileOutputStream fos = new FileOutputStream(sshScriptFile)) {
fos.write(getSshScriptTemplate().replace("$ssh_key", keyPath).getBytes());
} catch (IOException e) {... | File function(String keyPath) throws ServerException { File sshScriptFile = new File(rootFolder, getSshKeyFileName()); try (FileOutputStream fos = new FileOutputStream(sshScriptFile)) { fos.write(getSshScriptTemplate().replace(STR, keyPath).getBytes()); } catch (IOException e) { LOG.error(STR, keyPath); throw new Serve... | /**
* Stores ssh script that will be executed with all commands that need ssh.
*
* @param keyPath path to ssh key
* @return file that contains script for ssh commands
* @throws ServerException when any error with ssh script storing occurs
*/ | Stores ssh script that will be executed with all commands that need ssh | storeSshScript | {
"repo_name": "TypeFox/che",
"path": "wsagent/che-core-ssh-key-server/src/main/java/org/eclipse/che/plugin/ssh/key/script/SshScript.java",
"license": "epl-1.0",
"size": 3962
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"org.eclipse.che.api.core.ServerException"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.eclipse.che.api.core.ServerException; | import java.io.*; import org.eclipse.che.api.core.*; | [
"java.io",
"org.eclipse.che"
] | java.io; org.eclipse.che; | 462,866 |
EReference getProcess_CorrelationSubscriptions(); | EReference getProcess_CorrelationSubscriptions(); | /**
* Returns the meta object for the containment reference list '{@link org.eclipse.bpmn2.Process#getCorrelationSubscriptions <em>Correlation Subscriptions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Correlation Subscriptions</em>'... | Returns the meta object for the containment reference list '<code>org.eclipse.bpmn2.Process#getCorrelationSubscriptions Correlation Subscriptions</code>'. | getProcess_CorrelationSubscriptions | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,430 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "punkhorn/jboss-sap-jca",
"path": "org.jboss.jca.adapters.sap.edit/src/org/jboss/jca/adapters/sap/cci/provider/ConnectionSpecItemProvider.java",
"license": "lgpl-2.1",
"size": 12937
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,162,742 |
protected void fireSelectionChanged( )
{
ReportRequest request = new ReportRequest( source );
List list = new ArrayList( );
list.add( source );
request.setSelectionObject( list );
request.setType( ReportRequest.SELECTION );
SessionHandleAdapter.getInstance( )
.getMediator( )
.notifyRequest( re... | void function( ) { ReportRequest request = new ReportRequest( source ); List list = new ArrayList( ); list.add( source ); request.setSelectionObject( list ); request.setType( ReportRequest.SELECTION ); SessionHandleAdapter.getInstance( ) .getMediator( ) .notifyRequest( request ); } | /**
* Fires a selection changed event.
*
* @param selection
* the new selection
*/ | Fires a selection changed event | fireSelectionChanged | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/model/views/outline/ScriptElementNode.java",
"license": "epl-1.0",
"size": 3037
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.birt.report.designer.core.model.SessionHandleAdapter",
"org.eclipse.birt.report.designer.core.util.mediator.request.ReportRequest"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.birt.report.designer.core.model.SessionHandleAdapter; import org.eclipse.birt.report.designer.core.util.mediator.request.ReportRequest; | import java.util.*; import org.eclipse.birt.report.designer.core.model.*; import org.eclipse.birt.report.designer.core.util.mediator.request.*; | [
"java.util",
"org.eclipse.birt"
] | java.util; org.eclipse.birt; | 667,365 |
public static List<String> readAssets2List(final String assetsPath,
final String charsetName) {
try {
return is2List(Utils.getApp().getResources().getAssets().open(assetsPath), charsetName);
} catch (IOException e) {
e.printStack... | static List<String> function(final String assetsPath, final String charsetName) { try { return is2List(Utils.getApp().getResources().getAssets().open(assetsPath), charsetName); } catch (IOException e) { e.printStackTrace(); return null; } } | /**
* Return the content of file in assets.
*
* @param assetsPath The path of file in assets.
* @param charsetName The name of charset.
* @return the content of file in assets
*/ | Return the content of file in assets | readAssets2List | {
"repo_name": "meclub/MeUI",
"path": "lib_util/src/main/java/com/me/ui/util/ResourceUtils.java",
"license": "apache-2.0",
"size": 10419
} | [
"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; | 492,548 |
@ApiModelProperty(example = "null", required = true, value = "ship_type_id integer")
public Integer getShipTypeId() {
return shipTypeId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return shipTypeId; } | /**
* ship_type_id integer
* @return shipTypeId
**/ | ship_type_id integer | getShipTypeId | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/PostCharactersCharacterIdFittingsFitting.java",
"license": "gpl-3.0",
"size": 4721
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 148,086 |
public List<String> zones() {
return this.zones;
} | List<String> function() { return this.zones; } | /**
* Get a list of availability zones denoting the zone in which Nat Gateway should be deployed.
*
* @return the zones value
*/ | Get a list of availability zones denoting the zone in which Nat Gateway should be deployed | zones | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/NatGatewayInner.java",
"license": "mit",
"size": 6797
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,849,078 |
public void validateRpd11s4()
{
for (Element table : getElements(ELEM_TABLE)) {
boolean hasHeadersAndIds = hasTableHeadersAndIds(table);
if (!hasHeadersAndIds) {
for (Element th : getChildren(table, ELEM_TH)) {
assertTrue(Type.ERROR, "rpd11s4.... | void function() { for (Element table : getElements(ELEM_TABLE)) { boolean hasHeadersAndIds = hasTableHeadersAndIds(table); if (!hasHeadersAndIds) { for (Element th : getChildren(table, ELEM_TH)) { assertTrue(Type.ERROR, STR, hasAttribute(th, ATTR_SCOPE)); } } } } | /**
* Use the scope attribute to associate table labels (th cells) with columns or rows.
*/ | Use the scope attribute to associate table labels (th cells) with columns or rows | validateRpd11s4 | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-tools/xwiki-platform-tool-standards-validator/src/main/java/org/xwiki/validator/HTML5DutchWebGuidelinesValidator.java",
"license": "lgpl-2.1",
"size": 48931
} | [
"org.jsoup.nodes.Element",
"org.xwiki.validator.ValidationError"
] | import org.jsoup.nodes.Element; import org.xwiki.validator.ValidationError; | import org.jsoup.nodes.*; import org.xwiki.validator.*; | [
"org.jsoup.nodes",
"org.xwiki.validator"
] | org.jsoup.nodes; org.xwiki.validator; | 2,480,695 |
public void onEntityAdded(Entity entityIn)
{
if (entityIn instanceof EntityLiving)
{
this.navigations.add(((EntityLiving)entityIn).getNavigator());
}
}
| void function(Entity entityIn) { if (entityIn instanceof EntityLiving) { this.navigations.add(((EntityLiving)entityIn).getNavigator()); } } | /**
* Called on all IWorldAccesses when an entity is created or loaded. On client worlds, starts downloading any
* necessary textures. On server worlds, adds the entity to the entity tracker.
*/ | Called on all IWorldAccesses when an entity is created or loaded. On client worlds, starts downloading any necessary textures. On server worlds, adds the entity to the entity tracker | onEntityAdded | {
"repo_name": "lucemans/ShapeClient-SRC",
"path": "net/minecraft/pathfinding/PathWorldListener.java",
"license": "mpl-2.0",
"size": 4704
} | [
"net.minecraft.entity.Entity",
"net.minecraft.entity.EntityLiving"
] | import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; | import net.minecraft.entity.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 1,167,747 |
public JobEntryCopy findNextJobEntry(JobEntryCopy from, int cnt) {
int count = 0;
for (JobHopMeta hi : jobhops) // Look at all the hops
{
if (hi.isEnabled() && (hi.getFromEntry() != null) && hi.getFromEntry().equals(from)) {
if (count == cnt) {
return hi.getToEntry();
}
count++;
... | JobEntryCopy function(JobEntryCopy from, int cnt) { int count = 0; for (JobHopMeta hi : jobhops) { if (hi.isEnabled() && (hi.getFromEntry() != null) && hi.getFromEntry().equals(from)) { if (count == cnt) { return hi.getToEntry(); } count++; } } return null; } | /**
* Find next job entry.
*
* @param from the from
* @param cnt the cnt
* @return the job entry copy
*/ | Find next job entry | findNextJobEntry | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 103745
} | [
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.pentaho.di.job.entry.JobEntryCopy; | import org.pentaho.di.job.entry.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 797,113 |
@ApiModelProperty(required = true, value = "the user's email email")
@JsonProperty("email")
public String getEmail() {
return email;
} | @ApiModelProperty(required = true, value = STR) @JsonProperty("email") String function() { return email; } | /**
* the user's email email
**/ | the user's email email | getEmail | {
"repo_name": "chenjianjx/srb4j-desktop-client",
"path": "src/main/java/org/srb4j/desktopclient/model/GenRandomLoginCodeRequest.java",
"license": "apache-2.0",
"size": 1728
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"io.swagger.annotations.ApiModelProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; | import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*; | [
"com.fasterxml.jackson",
"io.swagger.annotations"
] | com.fasterxml.jackson; io.swagger.annotations; | 250,725 |
public final void warn(final Serializable message)
{
addFeedbackMessage(message, FeedbackMessage.WARNING);
} | final void function(final Serializable message) { addFeedbackMessage(message, FeedbackMessage.WARNING); } | /**
* Registers a warning feedback message for this session
*
* @param message
* The feedback message
*/ | Registers a warning feedback message for this session | warn | {
"repo_name": "afiantara/apache-wicket-1.5.7",
"path": "src/wicket-core/src/main/java/org/apache/wicket/Session.java",
"license": "apache-2.0",
"size": 24590
} | [
"java.io.Serializable",
"org.apache.wicket.feedback.FeedbackMessage"
] | import java.io.Serializable; import org.apache.wicket.feedback.FeedbackMessage; | import java.io.*; import org.apache.wicket.feedback.*; | [
"java.io",
"org.apache.wicket"
] | java.io; org.apache.wicket; | 284,420 |
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
// Inflate the menu; this adds items to the action bar if it is present.
menuInflater.inflate(R.menu.fragment_menu_files, menu);
// get tint color
int tintColor = ThemeUtils.getThemeColor(getContex... | void function(Menu menu, MenuInflater menuInflater) { menuInflater.inflate(R.menu.fragment_menu_files, menu); int tintColor = ThemeUtils.getThemeColor(getContext(), R.attr.malp_color_text_accent); Drawable drawable = menu.findItem(R.id.action_add_directory).getIcon(); drawable = DrawableCompat.wrap(drawable); DrawableC... | /**
* Initialize the options menu.
* Be sure to call {@link #setHasOptionsMenu} before.
*
* @param menu The container for the custom options menu.
* @param menuInflater The inflater to instantiate the layout.
*/ | Initialize the options menu. Be sure to call <code>#setHasOptionsMenu</code> before | onCreateOptionsMenu | {
"repo_name": "Sohalt/malp",
"path": "app/src/main/java/org/gateshipone/malp/application/fragments/serverfragments/FilesFragment.java",
"license": "gpl-3.0",
"size": 17076
} | [
"android.graphics.drawable.Drawable",
"android.support.v4.graphics.drawable.DrawableCompat",
"android.support.v7.widget.SearchView",
"android.view.Menu",
"android.view.MenuInflater",
"org.gateshipone.malp.application.utils.ThemeUtils",
"org.gateshipone.malp.mpdservice.handlers.serverhandler.MPDQueryHand... | import android.graphics.drawable.Drawable; import android.support.v4.graphics.drawable.DrawableCompat; import android.support.v7.widget.SearchView; import android.view.Menu; import android.view.MenuInflater; import org.gateshipone.malp.application.utils.ThemeUtils; import org.gateshipone.malp.mpdservice.handlers.server... | import android.graphics.drawable.*; import android.support.v4.graphics.drawable.*; import android.support.v7.widget.*; import android.view.*; import org.gateshipone.malp.application.utils.*; import org.gateshipone.malp.mpdservice.handlers.serverhandler.*; import org.gateshipone.malp.mpdservice.mpdprotocol.*; | [
"android.graphics",
"android.support",
"android.view",
"org.gateshipone.malp"
] | android.graphics; android.support; android.view; org.gateshipone.malp; | 1,522,755 |
public static int issueCreateDurableRequest(
MessageProcessor MP,
ConsumerDispatcherState subState,
SIBUuid8 remoteMEUuid,
SIBUuid12 destinationID)
throws SIResourceException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "issueCreateDurableRequest"... | static int function( MessageProcessor MP, ConsumerDispatcherState subState, SIBUuid8 remoteMEUuid, SIBUuid12 destinationID) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, STR, new Object[] { MP, subState, remoteMEUuid, destinationID}); long requestID = MP.n... | /**
* Issue a CreateDurable request for a new remote durable subscription.
* The caller is blocked until we receive a reply for this request.
*
* @param req The state describing the request
* @return One of STATUS_OK, STATUS_SUB_ALREADY_EXISTS, or STATUS_SUB_GENERAL_ERROR
*/ | Issue a CreateDurable request for a new remote durable subscription. The caller is blocked until we receive a reply for this request | issueCreateDurableRequest | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DurableInputHandler.java",
"license": "epl-1.0",
"size": 39173
} | [
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.websphere.sib.exception.SIResourceException",
"com.ibm.ws.sib.mfp.control.ControlDurableConfirm",
"com.ibm.ws.sib.mfp.control.ControlMessage",
"com.ibm.ws.sib.utils.SIBUuid12",
"com.ibm.ws.sib.utils.SIBUuid8",
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.websphere.ras.TraceComponent; import com.ibm.websphere.sib.exception.SIResourceException; import com.ibm.ws.sib.mfp.control.ControlDurableConfirm; import com.ibm.ws.sib.mfp.control.ControlMessage; import com.ibm.ws.sib.utils.SIBUuid12; import com.ibm.ws.sib.utils.SIBUuid8; import com.ibm.ws.sib.utils.ras... | import com.ibm.websphere.ras.*; import com.ibm.websphere.sib.exception.*; import com.ibm.ws.sib.mfp.control.*; import com.ibm.ws.sib.utils.*; import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 2,534,990 |
public Intent putExtra(String name, float value) {
if (mExtras == null) {
mExtras = new Bundle();
}
mExtras.putFloat(name, value);
return this;
} | Intent function(String name, float value) { if (mExtras == null) { mExtras = new Bundle(); } mExtras.putFloat(name, value); return this; } | /**
* Add extended data to the intent. The name must include a package
* prefix, for example the app com.android.contacts would use names
* like "com.android.contacts.ShowAll".
*
* @param name The name of the extra data, with package prefix.
* @param value The float data value.
*
... | Add extended data to the intent. The name must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll" | putExtra | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/content/Intent.java",
"license": "gpl-3.0",
"size": 331610
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,787,938 |
@Override
public Map execute(FileSystem fs) throws IOException {
FileChecksum checksum = fs.getFileChecksum(path);
return fileChecksumToJSON(checksum);
}
}
@InterfaceAudience.Private
public static class FSFileStatus implements FileSystemAccess.FileSystemExecutor<Map> {
private Pat... | Map function(FileSystem fs) throws IOException { FileChecksum checksum = fs.getFileChecksum(path); return fileChecksumToJSON(checksum); } } @InterfaceAudience.Private public static class FSFileStatus implements FileSystemAccess.FileSystemExecutor<Map> { private Path path; public FSFileStatus(String path) { this.path = ... | /**
* Executes the filesystem operation.
*
* @param fs filesystem instance to use.
*
* @return a Map object (JSON friendly) with the file checksum.
*
* @throws IOException thrown if an IO error occured.
*/ | Executes the filesystem operation | execute | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java",
"license": "apache-2.0",
"size": 42877
} | [
"java.io.IOException",
"java.util.Map",
"org.apache.hadoop.classification.InterfaceAudience",
"org.apache.hadoop.fs.FileChecksum",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.lib.service.FileSystemAccess"
] | import java.io.IOException; import java.util.Map; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.FileChecksum; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.lib.service.FileSystemAccess; | import java.io.*; import java.util.*; import org.apache.hadoop.classification.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.lib.service.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 60,369 |
public NestedSet<Label> getTransitiveExports() {
return transitiveExports;
} | NestedSet<Label> function() { return transitiveExports; } | /**
* Returns the labels of exported targets and artifacts reached transitively through the "exports"
* attribute.
*/ | Returns the labels of exported targets and artifacts reached transitively through the "exports" attribute | getTransitiveExports | {
"repo_name": "vt09/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaExportsProvider.java",
"license": "apache-2.0",
"size": 1516
} | [
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.build.lib.collect.nestedset.NestedSet"
] | import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.collect.nestedset.NestedSet; | import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.collect.nestedset.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,039,308 |
public void writeToParcel( Parcel oParcel, int zFlags )
{
if( oParcel == null )
throw new NullPointerException( "Can't use null reference here." ) ;
oParcel.writeInt(m_zHearts) ;
// oParcel.writeInt( m_bITookTheRest ? 1 : 0 ) ;
oParcel.writeInt(m_zQueens) ;
oParcel.writeInt(m_zOmnibus) ;
o... | void function( Parcel oParcel, int zFlags ) { if( oParcel == null ) throw new NullPointerException( STR ) ; oParcel.writeInt(m_zHearts) ; oParcel.writeInt(m_zQueens) ; oParcel.writeInt(m_zOmnibus) ; oParcel.writeInt(m_zHooligan) ; oParcel.writeBooleanArray(m_abMarks) ; return ; } | /**
* Translates a BoxScore into an Android Parcel.
* @param oParcel A reference to the Parcel supplied by the platform.
*/ | Translates a BoxScore into an Android Parcel | writeToParcel | {
"repo_name": "zerobandwidth-net/hearts",
"path": "app/src/main/java/net/zerobandwidth/android/apps/heartsscoreboard/BoxScore.java",
"license": "apache-2.0",
"size": 18598
} | [
"android.os.Parcel"
] | import android.os.Parcel; | import android.os.*; | [
"android.os"
] | android.os; | 2,412,651 |
Term getTerm(int termIndex) throws IOException {
PagedBytesDataInput input = dataInput.clone();
input.setPosition(indexToDataOffset.get(termIndex));
// read the term
int fieldId = input.readVInt();
Term field = fields[fieldId];
return new Term(field.field(), input.readString());
} | Term getTerm(int termIndex) throws IOException { PagedBytesDataInput input = dataInput.clone(); input.setPosition(indexToDataOffset.get(termIndex)); int fieldId = input.readVInt(); Term field = fields[fieldId]; return new Term(field.field(), input.readString()); } | /**
* Gets the term at the given position. For testing.
*
* @param termIndex
* the position to read the term from the index.
* @return the term.
* @throws IOException If there is a low-level I/O error.
*/ | Gets the term at the given position. For testing | getTerm | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "solr-4.7.2/src/org/apache/lucene/codecs/lucene3x/TermInfosReaderIndex.java",
"license": "apache-2.0",
"size": 9144
} | [
"java.io.IOException",
"org.apache.lucene.index.Term",
"org.apache.lucene.util.PagedBytes"
] | import java.io.IOException; import org.apache.lucene.index.Term; import org.apache.lucene.util.PagedBytes; | import java.io.*; import org.apache.lucene.index.*; import org.apache.lucene.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 91,433 |
protected void threadDump(PrintWriter writer, StringManager smClient,
Enumeration<Locale> requestedLocales) {
writer.println(smClient.getString("managerServlet.threaddump"));
writer.print(Diagnostics.getThreadDump(requestedLocales));
} | void function(PrintWriter writer, StringManager smClient, Enumeration<Locale> requestedLocales) { writer.println(smClient.getString(STR)); writer.print(Diagnostics.getThreadDump(requestedLocales)); } | /**
*
* Write a JVM thread dump
*
* @param writer
*/ | Write a JVM thread dump | threadDump | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/ManagerServlet.java",
"license": "mit",
"size": 61543
} | [
"java.io.PrintWriter",
"java.util.Enumeration",
"java.util.Locale",
"org.apache.tomcat.util.Diagnostics",
"org.apache.tomcat.util.res.StringManager"
] | import java.io.PrintWriter; import java.util.Enumeration; import java.util.Locale; import org.apache.tomcat.util.Diagnostics; import org.apache.tomcat.util.res.StringManager; | import java.io.*; import java.util.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.res.*; | [
"java.io",
"java.util",
"org.apache.tomcat"
] | java.io; java.util; org.apache.tomcat; | 120,202 |
private double convert(double num, CharSequence from, CharSequence to) {
if (from == to) return num;
Toast.makeText(this, "From "+from+" to "+to, Toast.LENGTH_SHORT).show();
Resources r = getResources();
if (from.equals(r.getString(R.string.str_fahrenheit))) {
num = Celcius.fromFahrenheit(num);
... | double function(double num, CharSequence from, CharSequence to) { if (from == to) return num; Toast.makeText(this, STR+from+STR+to, Toast.LENGTH_SHORT).show(); Resources r = getResources(); if (from.equals(r.getString(R.string.str_fahrenheit))) { num = Celcius.fromFahrenheit(num); } else if (from.equals(r.getString(R.s... | /**
* Perform unit conversion
*
* @param num the temperature value to be converted
* @param from the temperature unit of source
* @param to the temperature unit of target
*
* @return
*/ | Perform unit conversion | convert | {
"repo_name": "chazzuka/androple",
"path": "converter_temperature/src/me/egois/converter/HomeActivity.java",
"license": "mit",
"size": 5847
} | [
"android.content.res.Resources",
"android.widget.Toast"
] | import android.content.res.Resources; import android.widget.Toast; | import android.content.res.*; import android.widget.*; | [
"android.content",
"android.widget"
] | android.content; android.widget; | 1,998,529 |
protected HashMap<DirectedNode, Integer> getUnion(
HashMap<DirectedNode, Integer> neighbors1,
HashMap<DirectedNode, Integer> neighbors2) {
if (neighbors1 == null && neighbors2 != null)
return neighbors2;
else if (neighbors2 == null && neighbors1 != null)
return neighbors1;
else if (neighbors1 == n... | HashMap<DirectedNode, Integer> function( HashMap<DirectedNode, Integer> neighbors1, HashMap<DirectedNode, Integer> neighbors2) { if (neighbors1 == null && neighbors2 != null) return neighbors2; else if (neighbors2 == null && neighbors1 != null) return neighbors1; else if (neighbors1 == null & neighbors2 == null) return... | /**
* Computes the union between the neighbors of two {@link Node}s.
*
* @param neighbors1
* A {@link Map} includes the neighbors of the first node with
* their frequency.
* @param neighbors2
* A {@link Map} includes the neighbors of the second node with
* th... | Computes the union between the neighbors of two <code>Node</code>s | getUnion | {
"repo_name": "marcel-stud/DNA",
"path": "src/dna/metrics/similarityMeasures/jaccard/JaccardDirectedIntWeighted.java",
"license": "gpl-3.0",
"size": 6810
} | [
"dna.graph.nodes.DirectedNode",
"java.util.HashMap",
"java.util.Map"
] | import dna.graph.nodes.DirectedNode; import java.util.HashMap; import java.util.Map; | import dna.graph.nodes.*; import java.util.*; | [
"dna.graph.nodes",
"java.util"
] | dna.graph.nodes; java.util; | 2,506,144 |
List<ReadOnlyDeadline> getDeadlineList(); | List<ReadOnlyDeadline> getDeadlineList(); | /**
* Returns an unmodifiable view of deadlines list
*/ | Returns an unmodifiable view of deadlines list | getDeadlineList | {
"repo_name": "CS2103AUG2016-T13-C3/main",
"path": "src/main/java/seedu/malitio/model/ReadOnlyMalitio.java",
"license": "mit",
"size": 1178
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,322,947 |
@Override
public int countByTasksById(long taskEntryId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_TASKSBYID;
Object[] finderArgs = new Object[] { taskEntryId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);... | int function(long taskEntryId) { FinderPath finderPath = FINDER_PATH_COUNT_BY_TASKSBYID; Object[] finderArgs = new Object[] { taskEntryId }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(2); query.append(_SQL_COUNT_TASKENTRY_WHERE); ... | /**
* Returns the number of task entries where taskEntryId = ?.
*
* @param taskEntryId the task entry ID
* @return the number of matching task entries
*/ | Returns the number of task entries where taskEntryId = ? | countByTasksById | {
"repo_name": "moltam89/OWXP",
"path": "modules/micro-maintainance-task/micro-maintainance-task-service/src/main/java/com/liferay/micro/maintainance/task/service/persistence/impl/TaskEntryPersistenceImpl.java",
"license": "gpl-3.0",
"size": 57073
} | [
"com.liferay.micro.maintainance.task.model.impl.TaskEntryImpl",
"com.liferay.micro.maintainance.task.model.impl.TaskEntryModelImpl",
"com.liferay.portal.kernel.dao.orm.FinderPath",
"com.liferay.portal.kernel.dao.orm.Query",
"com.liferay.portal.kernel.dao.orm.QueryPos",
"com.liferay.portal.kernel.dao.orm.S... | import com.liferay.micro.maintainance.task.model.impl.TaskEntryImpl; import com.liferay.micro.maintainance.task.model.impl.TaskEntryModelImpl; import com.liferay.portal.kernel.dao.orm.FinderPath; import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal... | import com.liferay.micro.maintainance.task.model.impl.*; import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.util.*; | [
"com.liferay.micro",
"com.liferay.portal"
] | com.liferay.micro; com.liferay.portal; | 1,412,022 |
public boolean hasChildren() throws ModelspaceException {
return this.delegate.hasChildren();
} | boolean function() throws ModelspaceException { return this.delegate.hasChildren(); } | /**
* Determine if object has children
*
* @return 'true' if has children, 'false' if not
* @throws ModelspaceException
* if an error occurs
*/ | Determine if object has children | hasChildren | {
"repo_name": "Polyglotter/chrysalix",
"path": "modelspace/modelspace-ddl/src/main/java/org/modelspace/ddl/relational/RelationalObject.java",
"license": "lgpl-2.1",
"size": 9872
} | [
"org.modelspace.ModelspaceException"
] | import org.modelspace.ModelspaceException; | import org.modelspace.*; | [
"org.modelspace"
] | org.modelspace; | 2,289,724 |
long readLong()
throws IOException
{
return (((long) _is.read() << 56) |
((long) _is.read() << 48) |
((long) _is.read() << 40) |
((long) _is.read() << 32) |
((long) _is.read() << 24) |
((long) _is.read() << 16) |
((long) _is.read() << 8... | long readLong() throws IOException { return (((long) _is.read() << 56) ((long) _is.read() << 48) ((long) _is.read() << 40) ((long) _is.read() << 32) ((long) _is.read() << 24) ((long) _is.read() << 16) ((long) _is.read() << 8) ((long) _is.read())); } | /**
* Parses a 64-bit int.
*/ | Parses a 64-bit int | readLong | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/kernel/src/com/caucho/bytecode/ByteCodeParser.java",
"license": "gpl-2.0",
"size": 13508
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,289,868 |
InputStream get(DeviceId device, String request, String mediaType); | InputStream get(DeviceId device, String request, String mediaType); | /**
* Does a REST GET request with specified parameters to the device.
*
* @param device device to make the request to
* @param request url of the request
* @param mediaType format to retrieve the content in
* @return an inputstream of data from the reply.
*/ | Does a REST GET request with specified parameters to the device | get | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "protocols/rest/api/src/main/java/org/onosproject/protocol/rest/RestSBController.java",
"license": "apache-2.0",
"size": 4898
} | [
"java.io.InputStream",
"org.onosproject.net.DeviceId"
] | import java.io.InputStream; import org.onosproject.net.DeviceId; | import java.io.*; import org.onosproject.net.*; | [
"java.io",
"org.onosproject.net"
] | java.io; org.onosproject.net; | 2,725,564 |
private void appendJsonElementToString(String jsonKey, JsonElement jsonElement, String startIndent, StringBuilder sb) {
if (jsonElement.isJsonArray()) {
JsonArray jsonArray = jsonElement.getAsJsonArray();
if (jsonArray.size() > 0) {
int count = 1;
... | void function(String jsonKey, JsonElement jsonElement, String startIndent, StringBuilder sb) { if (jsonElement.isJsonArray()) { JsonArray jsonArray = jsonElement.getAsJsonArray(); if (jsonArray.size() > 0) { int count = 1; sb.append(NEW_LINE).append(String.format("%s%s", startIndent, jsonKey)); for (JsonElement arrayMe... | /**
* Converts the given JSON element into string and appends to the given string builder.
*
* @param jsonKey
* @param jsonElement
* @param startIndent Starting indentation for the element.
* @param sb String builder to append to.
*/ | Converts the given JSON element into string and appends to the given string builder | appendJsonElementToString | {
"repo_name": "esaunders/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java",
"license": "apache-2.0",
"size": 44982
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonElement"
] | import com.google.gson.JsonArray; import com.google.gson.JsonElement; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,869,627 |
public void reconnectNow(boolean forceIfStopped) {
assert executor.inEventLoop();
if (state == State.ATTEMPT_IN_PROGRESS || state == State.STOP_AFTER_CURRENT) {
LOG.debug(
"[{}] reconnectNow and current attempt was still running, letting it complete",
logPrefix);
if (state == S... | void function(boolean forceIfStopped) { assert executor.inEventLoop(); if (state == State.ATTEMPT_IN_PROGRESS state == State.STOP_AFTER_CURRENT) { LOG.debug( STR, logPrefix); if (state == State.STOP_AFTER_CURRENT) { state = State.ATTEMPT_IN_PROGRESS; } } else if (state == State.STOPPED && !forceIfStopped) { LOG.debug(S... | /**
* Forces a reconnection now, without waiting for the next scheduled attempt.
*
* @param forceIfStopped if true and the reconnection is not running, it will get started (meaning
* subsequent reconnections will be scheduled if this attempt fails). If false and the
* reconnection is not running,... | Forces a reconnection now, without waiting for the next scheduled attempt | reconnectNow | {
"repo_name": "datastax/java-driver",
"path": "core/src/main/java/com/datastax/oss/driver/internal/core/util/concurrent/Reconnection.java",
"license": "apache-2.0",
"size": 8268
} | [
"com.datastax.oss.driver.internal.core.util.Loggers"
] | import com.datastax.oss.driver.internal.core.util.Loggers; | import com.datastax.oss.driver.internal.core.util.*; | [
"com.datastax.oss"
] | com.datastax.oss; | 655,103 |
public final int compare(LocalControllerDescription localController1,
LocalControllerDescription localController2)
{
Guard.check(localController1, localController2);
ArrayList<Double> utilization1 = estimator_.computeLocalControllerCapacity(localController1... | final int function(LocalControllerDescription localController1, LocalControllerDescription localController2) { Guard.check(localController1, localController2); ArrayList<Double> utilization1 = estimator_.computeLocalControllerCapacity(localController1); ArrayList<Double> utilization2 = estimator_.computeLocalController... | /**
* Compares two virtual machines.
*
* @param localController1 First virtual machine
* @param localController2 Second virtual machine
* @return -1, 0, 1
*/ | Compares two virtual machines | compare | {
"repo_name": "snoozesoftware/snoozenode",
"path": "src/main/java/org/inria/myriads/snoozenode/groupmanager/managerpolicies/comparators/LocalControllerL1Decreasing.java",
"license": "gpl-2.0",
"size": 3307
} | [
"java.util.ArrayList",
"org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerDescription",
"org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerStatus",
"org.inria.myriads.snoozecommon.guard.Guard",
"org.inria.myriads.snoozecommon.util.MathUtils"
] | import java.util.ArrayList; import org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerDescription; import org.inria.myriads.snoozecommon.communication.localcontroller.LocalControllerStatus; import org.inria.myriads.snoozecommon.guard.Guard; import org.inria.myriads.snoozecommon.util.MathUtils; | import java.util.*; import org.inria.myriads.snoozecommon.communication.localcontroller.*; import org.inria.myriads.snoozecommon.guard.*; import org.inria.myriads.snoozecommon.util.*; | [
"java.util",
"org.inria.myriads"
] | java.util; org.inria.myriads; | 2,228,231 |
public static Map<String, String> parseParameters(URI uri) throws Exception {
if (uri == null || uri.getQuery() == null) {
return Collections.emptyMap();
}
return parseQuery(stripPrefix(uri.getQuery(), "?"));
}
/**
* Parse properties from a named resource -eg. a UR... | static Map<String, String> function(URI uri) throws Exception { if (uri == null uri.getQuery() == null) { return Collections.emptyMap(); } return parseQuery(stripPrefix(uri.getQuery(), "?")); } /** * Parse properties from a named resource -eg. a URI or a simple name e.g. * {@literal foo?name="fred"&size=2} | /**
* Get properties from a URI and return them in a new {@code Map<String, String>} instance.
*
* If the URI is null or the query string of the URI is null an empty Map is returned.
*
* @param uri
* the URI whose parameters are to be parsed.
*
* @return <Code>Map</Code> o... | Get properties from a URI and return them in a new Map instance. If the URI is null or the query string of the URI is null an empty Map is returned | parseParameters | {
"repo_name": "avranju/qpid-jms",
"path": "qpid-jms-client/src/main/java/org/apache/qpid/jms/util/PropertyUtil.java",
"license": "apache-2.0",
"size": 22264
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 284,674 |
void percolateParent( Element elem, String vers )
{
Discriminator.addVersion( elem, vers );
Node parent = elem.getParentNode();
if ( parent != null && parent instanceof Element )
percolateParent( (Element)parent, vers );
} | void percolateParent( Element elem, String vers ) { Discriminator.addVersion( elem, vers ); Node parent = elem.getParentNode(); if ( parent != null && parent instanceof Element ) percolateParent( (Element)parent, vers ); } | /**
* Copy the given child versions to all parent nodes, recursively
* @param elem the parent node
* @param vers the versions of the child to add to elem
*/ | Copy the given child versions to all parent nodes, recursively | percolateParent | {
"repo_name": "Ecdosis/Importer",
"path": "src/importer/handler/post/stages/Cluster.java",
"license": "gpl-2.0",
"size": 10779
} | [
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import org.w3c.dom.Element; import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,701,523 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
} | void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "occiware/Multi-Cloud-Studio",
"path": "plugins/org.eclipse.cmf.occi.multicloud.aws.ec2.edit/src-gen/org/eclipse/cmf/occi/multicloud/aws/ec2/provider/SecuritygrouplinkItemProvider.java",
"license": "epl-1.0",
"size": 24554
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,169,246 |
@Override
public Adapter createAddressEndPointInputConnectorAdapter() {
if (addressEndPointInputConnectorItemProvider == null) {
addressEndPointInputConnectorItemProvider = new AddressEndPointInputConnectorItemProvider(this);
}
return addressEndPointInputConnectorItemProvider;
}
protected AddressEndPoi... | Adapter function() { if (addressEndPointInputConnectorItemProvider == null) { addressEndPointInputConnectorItemProvider = new AddressEndPointInputConnectorItemProvider(this); } return addressEndPointInputConnectorItemProvider; } protected AddressEndPointOutputConnectorItemProvider addressEndPointOutputConnectorItemProv... | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.AddressEndPointInputConnector}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.AddressEndPointInputConnector</code>. | createAddressEndPointInputConnectorAdapter | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 286852
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,344,648 |
public synchronized boolean consolidate() throws IOException {
if (isTainted()) {
// proceed with consolidation
XSequentialEventBuffer nBuffer = new XSequentialEventBuffer(buffer
.getProvider(), this.attributeMapSerializer);
int overflowIndex = 0;
int fileBufferIndex = 0;
for (int i = 0; i < si... | synchronized boolean function() throws IOException { if (isTainted()) { XSequentialEventBuffer nBuffer = new XSequentialEventBuffer(buffer .getProvider(), this.attributeMapSerializer); int overflowIndex = 0; int fileBufferIndex = 0; for (int i = 0; i < size; i++) { if (overflowIndex < overflowSize && overflowIndices[ov... | /**
* Consolidates this fast event list. Consolidation implies, that all
* overflow and skipping data structures are freed, and the buffered
* representation is brought completely in-line with the virtual current
* contents of the list.
*
* The actual consolidation will be skipped, if no need for it is det... | Consolidates this fast event list. Consolidation implies, that all overflow and skipping data structures are freed, and the buffered representation is brought completely in-line with the virtual current contents of the list. The actual consolidation will be skipped, if no need for it is detected by the algorithm | consolidate | {
"repo_name": "nicksi/xestools",
"path": "src/main/java/org/deckfour/xes/model/buffered/XFastEventList.java",
"license": "mit",
"size": 12474
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,777,202 |
public DcmElement putTM(int tag, String value) {
return put(value != null && value.length() != 0 ? StringElement
.createTM(tag, value) : StringElement.createTM(tag));
} | DcmElement function(int tag, String value) { return put(value != null && value.length() != 0 ? StringElement .createTM(tag, value) : StringElement.createTM(tag)); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @param value
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putTM | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_31/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 86527
} | [
"org.dcm4che.data.DcmElement"
] | import org.dcm4che.data.DcmElement; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 1,516,459 |
ServiceCall<List<Product>> getMultiplePagesAsync(final ListOperationCallback<Product> serviceCallback) throws IllegalArgumentException;
ServiceResponse<PagedList<Product>> getMultiplePages(final String clientRequestId, final PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions) throws CloudException... | ServiceCall<List<Product>> getMultiplePagesAsync(final ListOperationCallback<Product> serviceCallback) throws IllegalArgumentException; ServiceResponse<PagedList<Product>> getMultiplePages(final String clientRequestId, final PagingGetMultiplePagesOptions pagingGetMultiplePagesOptions) throws CloudException, IOException... | /**
* A paging operation that includes a nextLink that has 10 pages.
*
* @param clientRequestId the String value
* @param pagingGetMultiplePagesOptions Additional parameters for the operation
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown fr... | A paging operation that includes a nextLink that has 10 pages | getMultiplePages | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/paging/Pagings.java",
"license": "mit",
"size": 32351
} | [
"com.microsoft.azure.CloudException",
"com.microsoft.azure.ListOperationCallback",
"com.microsoft.azure.PagedList",
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException",
"java.util.List"
] | import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.io",
"java.util"
] | com.microsoft.azure; com.microsoft.rest; java.io; java.util; | 1,354,185 |
public static void setIsolationLevel(Connection c) throws SQLException {
try {
if (_isolationLevel != 0 && c.getTransactionIsolation() != _isolationLevel) {
if (__log.isDebugEnabled()) __log.debug("Set isolation level to "+_isolationLevel);
c.setTransactionIsolati... | static void function(Connection c) throws SQLException { try { if (_isolationLevel != 0 && c.getTransactionIsolation() != _isolationLevel) { if (__log.isDebugEnabled()) __log.debug(STR+_isolationLevel); c.setTransactionIsolation(_isolationLevel); } } catch (Exception e) { if (__log.isDebugEnabled()) __log.debug(STR+_is... | /**
* Set Ode-specific isolation level on the connection, if needed.
*/ | Set Ode-specific isolation level on the connection, if needed | setIsolationLevel | {
"repo_name": "mproch/apache-ode",
"path": "utils/src/main/java/org/apache/ode/utils/DbIsolation.java",
"license": "apache-2.0",
"size": 2394
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 665,011 |
@Override public void exitTypeArray(@NotNull BigDataScriptParser.TypeArrayContext ctx) { } | @Override public void exitTypeArray(@NotNull BigDataScriptParser.TypeArrayContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterTypeArray | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptBaseListener.java",
"license": "apache-2.0",
"size": 36363
} | [
"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; | 449,957 |
public void createUser(User user) {
String sql = "insert into user (" + USER_COLUMNS + ") values (" + questionMarks(USER_COLUMNS) + ')';
update(sql, user.getUsername(), encrypt(user.getPassword()), user.getEmail(), user.isLdapAuthenticated(),
user.getBytesStreamed(), user.getBytesDow... | void function(User user) { String sql = STR + USER_COLUMNS + STR + questionMarks(USER_COLUMNS) + ')'; update(sql, user.getUsername(), encrypt(user.getPassword()), user.getEmail(), user.isLdapAuthenticated(), user.getBytesStreamed(), user.getBytesDownloaded(), user.getBytesUploaded()); writeRoles(user); } | /**
* Creates a new user.
*
* @param user The user to create.
*/ | Creates a new user | createUser | {
"repo_name": "langera/libresonic",
"path": "libresonic-main/src/main/java/org/libresonic/player/dao/UserDao.java",
"license": "gpl-3.0",
"size": 17703
} | [
"org.libresonic.player.domain.User"
] | import org.libresonic.player.domain.User; | import org.libresonic.player.domain.*; | [
"org.libresonic.player"
] | org.libresonic.player; | 1,385,797 |
public void checkCast(final Type type) {
if (!type.equals(OBJECT_TYPE)) {
typeInsn(Opcodes.CHECKCAST, type);
}
} | void function(final Type type) { if (!type.equals(OBJECT_TYPE)) { typeInsn(Opcodes.CHECKCAST, type); } } | /**
* Generates the instruction to check that the top stack value is of the
* given type.
*
* @param type
* a class or interface type.
*/ | Generates the instruction to check that the top stack value is of the given type | checkCast | {
"repo_name": "Fantast/mvel",
"path": "src/main/java/org/mvel2/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 50816
} | [
"org.mvel2.asm.Opcodes",
"org.mvel2.asm.Type"
] | import org.mvel2.asm.Opcodes; import org.mvel2.asm.Type; | import org.mvel2.asm.*; | [
"org.mvel2.asm"
] | org.mvel2.asm; | 2,360,496 |
public Observable<ServiceResponse<P2SVpnGatewayInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.sub... | Observable<ServiceResponse<P2SVpnGatewayInner>> function(String resourceGroupName, String gatewayName, P2SVpnGatewayInner p2SVpnGatewayParameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (gate... | /**
* Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway.
*
* @param resourceGroupName The resource group name of the P2SVpnGateway.
* @param gatewayName The name of the gateway.
* @param p2SVpnGatewayParameters Parameters supplied to create or Update a ... | Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway | beginCreateOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/P2sVpnGatewaysInner.java",
"license": "mit",
"size": 129361
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,579,446 |
public Record[] readAll(String fileType, int bf) //@C1C
throws AS400Exception, AS400SecurityException, InterruptedException, IOException
{
// Open the file with a blocking factor of 100.
openFile2(AS400File.READ_ONLY, bf, AS400File.COMMIT_LOCK_LEVEL_NONE, fileType); //@C0C @C1C
... | Record[] function(String fileType, int bf) throws AS400Exception, AS400SecurityException, InterruptedException, IOException { openFile2(AS400File.READ_ONLY, bf, AS400File.COMMIT_LOCK_LEVEL_NONE, fileType); Record[] records = null; try { records = new Record[openFeedback_.getNumberOfRecords()]; for (int i = 0; i < recor... | /**
*Reads all the records in the file.
*@param fileType The type of file. Valid values are: key or seq
*@return The records read.
*@exception AS400Exception If the server returns an error message.
*@exception AS400SecurityException If a security or authority error occurs.
*@exception Int... | Reads all the records in the file | readAll | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/access/AS400FileImplNative.java",
"license": "epl-1.0",
"size": 99559
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 50,943 |
public static NameBasedWhereBuilder lt(Long value) {
return new NameBasedWhereBuilder(new QualifierExpression<Long>(LESSER_THAN, GREATER_THAN, value));
}
| static NameBasedWhereBuilder function(Long value) { return new NameBasedWhereBuilder(new QualifierExpression<Long>(LESSER_THAN, GREATER_THAN, value)); } | /**
* see {@link #lt(Double)}.
*/ | see <code>#lt(Double)</code> | lt | {
"repo_name": "Xiermires/EntityMatcher",
"path": "src/main/java/org/matcher/name/NameBasedExpressions.java",
"license": "mit",
"size": 11239
} | [
"org.matcher.expression.QualifierExpression"
] | import org.matcher.expression.QualifierExpression; | import org.matcher.expression.*; | [
"org.matcher.expression"
] | org.matcher.expression; | 2,200,505 |
public void _updateTime() {
boolean result = true ;
int idx = findColumnOfType(Time.class) ;
if (idx < 0) {
log.println("Required type not found") ;
tRes.tested("updateTime()", Status.skipped(true)) ;
return ;
}
try {
Time new... | void function() { boolean result = true ; int idx = findColumnOfType(Time.class) ; if (idx < 0) { log.println(STR) ; tRes.tested(STR, Status.skipped(true)) ; return ; } try { Time newVal = row.getTime(idx) ; newVal.Seconds ++ ; oObj.updateTime(idx, newVal) ; Time getVal = row.getTime(idx) ; result = ValueComparer.equal... | /**
* Updates column with the appropriate type (if exists) and then
* checks result with interface <code>XRow</code>.<p>
* Has OK status if column successfully updated, ahd the same
* result returned.
*/ | Updates column with the appropriate type (if exists) and then checks result with interface <code>XRow</code>. Has OK status if column successfully updated, ahd the same result returned | _updateTime | {
"repo_name": "jvanz/core",
"path": "qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java",
"license": "gpl-3.0",
"size": 22429
} | [
"com.sun.star.sdbc.SQLException",
"com.sun.star.util.Time"
] | import com.sun.star.sdbc.SQLException; import com.sun.star.util.Time; | import com.sun.star.sdbc.*; import com.sun.star.util.*; | [
"com.sun.star"
] | com.sun.star; | 1,723,678 |
Executions<Void> subscribe(K... channels); | Executions<Void> subscribe(K... channels); | /**
* Listen for messages published to the given channels.
*
* @param channels the channels
* @return Executions Future to synchronize {@code subscribe} completion
*/ | Listen for messages published to the given channels | subscribe | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/cluster/pubsub/api/sync/NodeSelectionPubSubCommands.java",
"license": "apache-2.0",
"size": 1923
} | [
"io.lettuce.core.cluster.api.sync.Executions"
] | import io.lettuce.core.cluster.api.sync.Executions; | import io.lettuce.core.cluster.api.sync.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 2,825,073 |
@Path("/executions/{executionId}")
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public Response getExecution(final @PathParam("executionId") String executionId) {
//http://localhost:8080/auth/admin/realms/master/authentication/executions/cf26211b-9e68-4788-b754-1afd02e59d7f
auth.... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) Response function(final @PathParam(STR) String executionId) { auth.realm().requireManageRealm(); final Optional<AuthenticationExecutionModel> model = Optional.ofNullable(realm.getAuthenticationExecutionById(executionId)); if (!model.isPresent()) { logger.debugv(STR, exec... | /**
* Get Single Execution
*/ | Get Single Execution | getExecution | {
"repo_name": "mhajas/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/AuthenticationManagementResource.java",
"license": "apache-2.0",
"size": 53043
} | [
"java.util.Optional",
"javax.ws.rs.NotFoundException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.keycloak.models.AuthenticationExecutionModel"
] | import java.util.Optional; import javax.ws.rs.NotFoundException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.keycloak.models.AuthenticationExecutionModel; | import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.models.*; | [
"java.util",
"javax.ws",
"org.keycloak.models"
] | java.util; javax.ws; org.keycloak.models; | 44,890 |
protected MessageHandlerFactory getUserDefinedMessageHandlerFactory() {
return new ControllerUserDefinedMessageHandlerFactory(this.flowCatalog, this.scheduler);
} | MessageHandlerFactory function() { return new ControllerUserDefinedMessageHandlerFactory(this.flowCatalog, this.scheduler); } | /**
* Creates and returns a {@link MessageHandlerFactory} for handling of Helix
* {@link org.apache.helix.model.Message.MessageType#USER_DEFINE_MSG}s.
*
* @returns a {@link MessageHandlerFactory}.
*/ | Creates and returns a <code>MessageHandlerFactory</code> for handling of Helix <code>org.apache.helix.model.Message.MessageType#USER_DEFINE_MSG</code>s | getUserDefinedMessageHandlerFactory | {
"repo_name": "pcadabam/gobblin",
"path": "gobblin-service/src/main/java/org/apache/gobblin/service/modules/core/GobblinServiceManager.java",
"license": "apache-2.0",
"size": 25435
} | [
"org.apache.helix.messaging.handling.MessageHandlerFactory"
] | import org.apache.helix.messaging.handling.MessageHandlerFactory; | import org.apache.helix.messaging.handling.*; | [
"org.apache.helix"
] | org.apache.helix; | 2,139,689 |
if (!spans.isEmpty()) {
final long traceId = spans.iterator().next().context().traceId();
for (MockSpan span : spans) {
Assert.assertEquals(traceId, span.context().traceId());
}
}
} | if (!spans.isEmpty()) { final long traceId = spans.iterator().next().context().traceId(); for (MockSpan span : spans) { Assert.assertEquals(traceId, span.context().traceId()); } } } | /**
* Check if all spans have same traceId.
*
* @param spans the spans to check
*/ | Check if all spans have same traceId | assertSameTraceId | {
"repo_name": "opentracing-contrib/java-spring-cloud",
"path": "instrument-starters/opentracing-spring-cloud-jms-starter/src/test/java/io/opentracing/contrib/spring/cloud/jms/TestUtils.java",
"license": "apache-2.0",
"size": 1231
} | [
"io.opentracing.mock.MockSpan",
"org.junit.Assert"
] | import io.opentracing.mock.MockSpan; import org.junit.Assert; | import io.opentracing.mock.*; import org.junit.*; | [
"io.opentracing.mock",
"org.junit"
] | io.opentracing.mock; org.junit; | 1,051,512 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.