method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public IDataset getPath_length(); | IDataset function(); | /**
* Path length through sample/can for simple case when
* it does not vary with scattering direction
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_LENGTH
* </p>
*
* @return the value.
*/ | Path length through sample/can for simple case when it does not vary with scattering direction Type: NX_FLOAT Units: NX_LENGTH | getPath_length | {
"repo_name": "Anthchirp/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXsample.java",
"license": "epl-1.0",
"size": 13436
} | [
"org.eclipse.dawnsci.analysis.api.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,275,195 |
public List<SubResource> subnets() {
return this.subnets;
} | List<SubResource> function() { return this.subnets; } | /**
* Get an array of references to the subnets using this nat gateway resource.
*
* @return the subnets value
*/ | Get an array of references to the subnets using this nat gateway resource | subnets | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/NatGatewayInner.java",
"license": "mit",
"size": 7754
} | [
"com.microsoft.azure.SubResource",
"java.util.List"
] | import com.microsoft.azure.SubResource; import java.util.List; | import com.microsoft.azure.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,784,053 |
private String getAssignmentStatus(String assignmentId, SessionState state)
{
String rv = null;
try
{
Session session = SessionManager.getCurrentSession();
rv = AssignmentService.getAssignmentStatus(assignmentId);
}
catch (IdUnusedException e)
{
M_log.warn(this + " " + e.getMessage() + " " + a... | String function(String assignmentId, SessionState state) { String rv = null; try { Session session = SessionManager.getCurrentSession(); rv = AssignmentService.getAssignmentStatus(assignmentId); } catch (IdUnusedException e) { M_log.warn(this + " " + e.getMessage() + " " + assignmentId); } catch (PermissionException e)... | /**
* Retrieves the status of a given assignment.
* @param assignmentId
* @param state
* @return
*/ | Retrieves the status of a given assignment | getAssignmentStatus | {
"repo_name": "tl-its-umich-edu/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 671846
} | [
"org.sakaiproject.assignment.cover.AssignmentService",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.exception.PermissionException",
"org.sakaiproject.tool.api.Session",
"org.sakaiproject.tool.cover.SessionManager"
] | import org.sakaiproject.assignment.cover.AssignmentService; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.exception.PermissionException; import org.sakaiproject.tool.api.Session; import org.sakaiproject.tool.cover.SessionManager; | import org.sakaiproject.assignment.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; | [
"org.sakaiproject.assignment",
"org.sakaiproject.event",
"org.sakaiproject.exception",
"org.sakaiproject.tool"
] | org.sakaiproject.assignment; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.tool; | 909,159 |
public void close()
{
LOGGER.entering(CLASS_NAME, "close");
synchronized (lock)
{
if (userAgent != null)
{
serviceRegistration.unregister();
if (LOGGER.isLoggable(Level.FINER)) LOGGER.finer("User Agent " + this + " stopping...");
... | void function() { LOGGER.entering(CLASS_NAME, "close"); synchronized (lock) { if (userAgent != null) { serviceRegistration.unregister(); if (LOGGER.isLoggable(Level.FINER)) LOGGER.finer(STR + this + STR); userAgent.stop(); if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine(STR + this + STR); } } LOGGER.exiting(CLASS_NAME, ... | /**
* Shuts down the user agent if one exists.
*/ | Shuts down the user agent if one exists | close | {
"repo_name": "livetribe/livetribe-slp",
"path": "osgi/bundle/src/main/java/org/livetribe/slp/osgi/UserAgentManagedService.java",
"license": "apache-2.0",
"size": 5520
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,202,889 |
EClass getTimeAction(); | EClass getTimeAction(); | /**
* Returns the meta object for class '{@link org.tud.inf.st.mbt.actions.TimeAction <em>Time Action</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Time Action</em>'.
* @see org.tud.inf.st.mbt.actions.TimeAction
* @generated
*/ | Returns the meta object for class '<code>org.tud.inf.st.mbt.actions.TimeAction Time Action</code>'. | getTimeAction | {
"repo_name": "paetti1988/qmate",
"path": "MATE/org.tud.inf.st.mbt.emf/src-gen/org/tud/inf/st/mbt/actions/ActionsPackage.java",
"license": "apache-2.0",
"size": 60449
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,031,176 |
public void setOutputBufferSize(int serial_buffer_size)
{
try
{
Method method = classSerialPort.getMethod("setOutputBufferSize", int.class);
method.invoke(this.realObject, serial_buffer_size);
}
catch (InvocationTargetException e)
{
throw new RuntimeException(new RuntimeException(e.getTargetExcep... | void function(int serial_buffer_size) { try { Method method = classSerialPort.getMethod(STR, int.class); method.invoke(this.realObject, serial_buffer_size); } catch (InvocationTargetException e) { throw new RuntimeException(new RuntimeException(e.getTargetException().toString())); } catch (Exception e) { throw new Runt... | /**
* Sets the output buffer size. Note that this is advisory and memory
* availability may determine the ultimate buffer size used by the driver.
*
* @param serial_buffer_size
* size of the output buffer
*/ | Sets the output buffer size. Note that this is advisory and memory availability may determine the ultimate buffer size used by the driver | setOutputBufferSize | {
"repo_name": "taufikterdidik/smslib-v3",
"path": "src/java/org/smslib/helper/SerialPort.java",
"license": "apache-2.0",
"size": 21453
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,185,515 |
@Override public T visitPipelineTo(@NotNull GikiParser.PipelineToContext ctx) { return visitChildren(ctx); } | @Override public T visitPipelineTo(@NotNull GikiParser.PipelineToContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
* <p/>
* The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitVariableDeclaration | {
"repo_name": "jakobehmsen/giki-lang",
"path": "eclipse/src/giki/antlr4/GikiBaseVisitor.java",
"license": "mit",
"size": 11148
} | [
"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; | 2,897,646 |
@Override
public ModificationStatus copyValuesFrom(final BaseDO< ? extends Serializable> source, final String... ignoreFields)
{
ModificationStatus modificationStatus = super.copyValuesFrom(source, ignoreFields);
final GroupTaskAccessDO src = (GroupTaskAccessDO) source;
if (src.getAccessEntries() != n... | ModificationStatus function(final BaseDO< ? extends Serializable> source, final String... ignoreFields) { ModificationStatus modificationStatus = super.copyValuesFrom(source, ignoreFields); final GroupTaskAccessDO src = (GroupTaskAccessDO) source; if (src.getAccessEntries() != null) { for (final AccessEntryDO srcEntry ... | /**
* Copies all values from the given src object excluding the values created and modified. Null values will be excluded.
* @param src
*/ | Copies all values from the given src object excluding the values created and modified. Null values will be excluded | copyValuesFrom | {
"repo_name": "micromata/projectforge-webapp",
"path": "src/main/java/org/projectforge/access/GroupTaskAccessDO.java",
"license": "gpl-3.0",
"size": 11673
} | [
"java.io.Serializable",
"java.util.Iterator",
"org.projectforge.core.BaseDO",
"org.projectforge.core.ModificationStatus"
] | import java.io.Serializable; import java.util.Iterator; import org.projectforge.core.BaseDO; import org.projectforge.core.ModificationStatus; | import java.io.*; import java.util.*; import org.projectforge.core.*; | [
"java.io",
"java.util",
"org.projectforge.core"
] | java.io; java.util; org.projectforge.core; | 2,689,148 |
protected void changeToAssistant(final AssistantType type) {
if (assistantBubble == null && currentAssistant != AssistantType.NO_ASSISTANT_ACTIVE
|| assistantBubble != null && currentAssistant == AssistantType.NO_ASSISTANT_ACTIVE) {
currentAssistant = AssistantType.NO_ASSISTANT_ACTIVE;
assistantBubble = ... | void function(final AssistantType type) { if (assistantBubble == null && currentAssistant != AssistantType.NO_ASSISTANT_ACTIVE assistantBubble != null && currentAssistant == AssistantType.NO_ASSISTANT_ACTIVE) { currentAssistant = AssistantType.NO_ASSISTANT_ACTIVE; assistantBubble = null; } if (currentAssistant != Assis... | /**
* creates an Assistant-Bubble which pauses the current Step-Bubble. Every Bubble can only have
* one Assistant but an Assistant can have an Assistant too.
*
* @param type
* of the Assistant you want to create
*/ | creates an Assistant-Bubble which pauses the current Step-Bubble. Every Bubble can only have one Assistant but an Assistant can have an Assistant too | changeToAssistant | {
"repo_name": "boob-sbcm/3838438",
"path": "src/main/java/com/rapidminer/gui/tools/bubble/BubbleWindow.java",
"license": "agpl-3.0",
"size": 72570
} | [
"java.awt.event.HierarchyListener"
] | import java.awt.event.HierarchyListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 428,408 |
public static String createSubject(String module, String namespace, String entity, String action) {
String subject;
String simplifiedModuleName = simplifiedModuleName(module);
if (StringUtils.isBlank(module)) {
subject = BASE_SUBJECT + entity + "." + action;
} else if (S... | static String function(String module, String namespace, String entity, String action) { String subject; String simplifiedModuleName = simplifiedModuleName(module); if (StringUtils.isBlank(module)) { subject = BASE_SUBJECT + entity + "." + action; } else if (StringUtils.isBlank(namespace)) { subject = BASE_SUBJECT + sim... | /**
* Creates subject for a Motech Event, sent upon encounter
* of a CRUD event in MDS.
*
* @param module module name of an entity
* @param namespace namespace of an entity
* @param entity entity name
* @param action String representation of a CRUD event type
* @return Constructe... | Creates subject for a Motech Event, sent upon encounter of a CRUD event in MDS | createSubject | {
"repo_name": "sebbrudzinski/motech",
"path": "platform/mds/mds/src/main/java/org/motechproject/mds/event/CrudEventBuilder.java",
"license": "bsd-3-clause",
"size": 4496
} | [
"org.apache.commons.lang.StringUtils",
"org.motechproject.mds.util.ClassName"
] | import org.apache.commons.lang.StringUtils; import org.motechproject.mds.util.ClassName; | import org.apache.commons.lang.*; import org.motechproject.mds.util.*; | [
"org.apache.commons",
"org.motechproject.mds"
] | org.apache.commons; org.motechproject.mds; | 1,480,822 |
public int characters(final CharSequence s) {
if(s == null) {
return -1;
}
final int lastNode = doc.getLastNode();
if((lastNode > 0) && (level == doc.getTreeLevel(lastNode))) {
if((doc.getNodeType(lastNode) == Node.TEXT_NODE) || (doc.getNodeType(lastNode) =... | int function(final CharSequence s) { if(s == null) { return -1; } final int lastNode = doc.getLastNode(); if((lastNode > 0) && (level == doc.getTreeLevel(lastNode))) { if((doc.getNodeType(lastNode) == Node.TEXT_NODE) (doc.getNodeType(lastNode) == Node.CDATA_SECTION_NODE)) { doc.appendChars(lastNode, s); return lastNode... | /**
* Create a new text node.
*
* @param s DOCUMENT ME!
* @return the node number of the created node, -1 if no node was created
*/ | Create a new text node | characters | {
"repo_name": "windauer/exist",
"path": "exist-core/src/main/java/org/exist/dom/memtree/MemTreeBuilder.java",
"license": "lgpl-2.1",
"size": 17300
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,286,530 |
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
EnumFacing enumfacing = placer.getHorizontalFacing().rotateY();
return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).wit... | IBlockState function(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { EnumFacing enumfacing = placer.getHorizontalFacing().rotateY(); return super.onBlockPlaced(worldIn, pos, facing, hitX, hitY, hitZ, meta, placer).withProperty(FACING, enumfacing);... | /**
* Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
* IBlockstate
*/ | Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate | onBlockPlaced | {
"repo_name": "MartyParty21/AwakenDreamsClient",
"path": "mcp/src/minecraft/com/elementfx/tvp/ad/block/BlockBell.java",
"license": "gpl-3.0",
"size": 4937
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 1,325,501 |
public void refresh()
{
if (m_nagare_service == null)
{
return;
}
try
{
int state = m_nagare_service.state();
if (state == NagareService.STOPPED)
{
m_play_button.setImageResource(android.R.drawable.ic_media_play);
}
else
{
m_play_butt... | void function() { if (m_nagare_service == null) { return; } try { int state = m_nagare_service.state(); if (state == NagareService.STOPPED) { m_play_button.setImageResource(android.R.drawable.ic_media_play); } else { m_play_button.setImageResource(android.R.drawable.ic_media_pause); } String errors = m_nagare_service.e... | /**
* Refresh the button state
*/ | Refresh the button state | refresh | {
"repo_name": "dz0ny/White-Label-Shoutcast",
"path": "src/com/shoutcastwhitelabel/player/Nagare.java",
"license": "mit",
"size": 4727
} | [
"android.os.RemoteException",
"android.util.Log"
] | import android.os.RemoteException; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 2,614,207 |
@IgniteSpiConfiguration(optional = true)
public PriorityQueueCollisionSpi setPriorityAttributeKey(String taskPriAttrKey) {
this.taskPriAttrKey = taskPriAttrKey;
return this;
} | @IgniteSpiConfiguration(optional = true) PriorityQueueCollisionSpi function(String taskPriAttrKey) { this.taskPriAttrKey = taskPriAttrKey; return this; } | /**
* Sets task priority attribute key. This key will be used to look up task
* priorities from task context (see {@link org.apache.ignite.compute.ComputeTaskSession#getAttribute(Object)}).
* <p>
* If not provided, default value is {@code {@link #DFLT_PRIORITY_ATTRIBUTE_KEY}}.
*
* @param t... | Sets task priority attribute key. This key will be used to look up task priorities from task context (see <code>org.apache.ignite.compute.ComputeTaskSession#getAttribute(Object)</code>). If not provided, default value is <code>#DFLT_PRIORITY_ATTRIBUTE_KEY</code> | setPriorityAttributeKey | {
"repo_name": "irudyak/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/collision/priorityqueue/PriorityQueueCollisionSpi.java",
"license": "apache-2.0",
"size": 29429
} | [
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import org.apache.ignite.spi.IgniteSpiConfiguration; | import org.apache.ignite.spi.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 366,220 |
EClass getJumped(); | EClass getJumped(); | /**
* Returns the meta object for class '{@link fr.obeo.dsl.game.Jumped <em>Jumped</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Jumped</em>'.
* @see fr.obeo.dsl.game.Jumped
* @generated
*/ | Returns the meta object for class '<code>fr.obeo.dsl.game.Jumped Jumped</code>'. | getJumped | {
"repo_name": "Obeo/Game-Designer",
"path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java",
"license": "epl-1.0",
"size": 149639
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,371,657 |
public ComputeNodeEnableSchedulingOptions withOcpDate(DateTime ocpDate) {
if (ocpDate == null) {
this.ocpDate = null;
} else {
this.ocpDate = new DateTimeRfc1123(ocpDate);
}
return this;
} | ComputeNodeEnableSchedulingOptions function(DateTime ocpDate) { if (ocpDate == null) { this.ocpDate = null; } else { this.ocpDate = new DateTimeRfc1123(ocpDate); } return this; } | /**
* Set the time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.
*
* @param ocpDate the ocpDate value to set
* @return the ComputeNodeEnableSchedulingOptions object itself.
*/ | Set the time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly | withOcpDate | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/batch/microsoft-azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/ComputeNodeEnableSchedulingOptions.java",
"license": "mit",
"size": 4481
} | [
"com.microsoft.rest.DateTimeRfc1123",
"org.joda.time.DateTime"
] | import com.microsoft.rest.DateTimeRfc1123; import org.joda.time.DateTime; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 1,384,954 |
public void setCurrentIteration(final Iteration currentIteration) {
this.currentIteration = currentIteration;
} | void function(final Iteration currentIteration) { this.currentIteration = currentIteration; } | /**
* Sets the current iteration.
*
* @param currentIteration
* the new current iteration
*/ | Sets the current iteration | setCurrentIteration | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/net/sf/xplanner/domain/view/ProjectView.java",
"license": "gpl-2.0",
"size": 2869
} | [
"net.sf.xplanner.domain.Iteration"
] | import net.sf.xplanner.domain.Iteration; | import net.sf.xplanner.domain.*; | [
"net.sf.xplanner"
] | net.sf.xplanner; | 238,710 |
@Nullable
default PaymentAppFactoryInterface createAutofillPaymentAppFactory() {
return new AutofillPaymentAppFactory();
} | default PaymentAppFactoryInterface createAutofillPaymentAppFactory() { return new AutofillPaymentAppFactory(); } | /**
* Creates an instance of Autofill payment app factory.
* @return The instance, can be null for testing.
*/ | Creates an instance of Autofill payment app factory | createAutofillPaymentAppFactory | {
"repo_name": "nwjs/chromium.src",
"path": "chrome/android/java/src/org/chromium/chrome/browser/payments/ChromePaymentRequestService.java",
"license": "bsd-3-clause",
"size": 28576
} | [
"org.chromium.components.payments.PaymentAppFactoryInterface"
] | import org.chromium.components.payments.PaymentAppFactoryInterface; | import org.chromium.components.payments.*; | [
"org.chromium.components"
] | org.chromium.components; | 2,004,537 |
private static ImmutableSortedMap<String, String> getOrderedUserDefinedOptions(
BuildConfiguration config) {
ImmutableSortedMap.Builder<String, String> ans = ImmutableSortedMap.naturalOrder();
// Starlark-defined options:
for (Map.Entry<Label, Object> entry : config.getOptions().getStarlarkOptions(... | static ImmutableSortedMap<String, String> function( BuildConfiguration config) { ImmutableSortedMap.Builder<String, String> ans = ImmutableSortedMap.naturalOrder(); for (Map.Entry<Label, Object> entry : config.getOptions().getStarlarkOptions().entrySet()) { ans.put(entry.getKey().toString(), String.valueOf(entry.getVal... | /**
* Returns a configuration's user-definable settings in canonical order.
*
* <p>While actual option values are objects, we serialize them to strings to prevent command
* output from interpreting them more deeply than we want for simple "name=value" output.
*/ | Returns a configuration's user-definable settings in canonical order. While actual option values are objects, we serialize them to strings to prevent command output from interpreting them more deeply than we want for simple "name=value" output | getOrderedUserDefinedOptions | {
"repo_name": "akira-baruah/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/commands/ConfigCommand.java",
"license": "apache-2.0",
"size": 27221
} | [
"com.google.common.base.Verify",
"com.google.common.collect.ImmutableSortedMap",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.CoreOptions",
"com.google.devtools.build.lib.cmdline.Label",
"java.util.Map"
] | import com.google.common.base.Verify; import com.google.common.collect.ImmutableSortedMap; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.CoreOptions; import com.google.devtools.build.lib.cmdline.Label; import java.util.Map; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.cmdline.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,309,068 |
@Test
public void testConfigBackwardCompatibility() throws Exception {
final DrillConfig newConfig = new DrillConfig(DrillConfig.create()
.withValue(ExecConstants.USER_AUTHENTICATION_ENABLED,
ConfigValueFactory.fromAnyRef(true)));
final ScanResult scanResult = ClassPathScanner.fromPres... | void function() throws Exception { final DrillConfig newConfig = new DrillConfig(DrillConfig.create() .withValue(ExecConstants.USER_AUTHENTICATION_ENABLED, ConfigValueFactory.fromAnyRef(true))); final ScanResult scanResult = ClassPathScanner.fromPrescan(newConfig); final AuthenticatorProviderImpl authenticatorProvider ... | /**
* Validate when none of the security mechanism is specified in the
* {@link ExecConstants#HTTP_AUTHENTICATION_MECHANISMS}, FORM security handler is still configured correctly when
* authentication is enabled along with PAM authenticator module.
* @throws Exception
*/ | Validate when none of the security mechanism is specified in the <code>ExecConstants#HTTP_AUTHENTICATION_MECHANISMS</code>, FORM security handler is still configured correctly when authentication is enabled along with PAM authenticator module | testConfigBackwardCompatibility | {
"repo_name": "superbstreak/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/server/rest/spnego/TestSpnegoAuthentication.java",
"license": "apache-2.0",
"size": 14629
} | [
"com.typesafe.config.ConfigValueFactory",
"org.apache.drill.common.config.DrillConfig",
"org.apache.drill.common.scanner.ClassPathScanner",
"org.apache.drill.common.scanner.persistence.ScanResult",
"org.apache.drill.exec.ExecConstants",
"org.apache.drill.exec.rpc.security.AuthenticatorProviderImpl",
"or... | import com.typesafe.config.ConfigValueFactory; import org.apache.drill.common.config.DrillConfig; import org.apache.drill.common.scanner.ClassPathScanner; import org.apache.drill.common.scanner.persistence.ScanResult; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.rpc.security.AuthenticatorPro... | import com.typesafe.config.*; import org.apache.drill.common.config.*; import org.apache.drill.common.scanner.*; import org.apache.drill.common.scanner.persistence.*; import org.apache.drill.exec.*; import org.apache.drill.exec.rpc.security.*; import org.apache.drill.exec.rpc.security.plain.*; import org.apache.drill.e... | [
"com.typesafe.config",
"org.apache.drill",
"org.junit",
"org.mockito"
] | com.typesafe.config; org.apache.drill; org.junit; org.mockito; | 2,702,690 |
public final static void replaceExpectedResultFile(final String document, final Class<?> clazz,
final String file) throws IOException
{
String filename = clazz.getPackage().getName();
filename = filename.replace('.', '/');
filename += "/" + file;
final URL url = clazz.getClassLoader().getResource(filenam... | final static void function(final String document, final Class<?> clazz, final String file) throws IOException { String filename = clazz.getPackage().getName(); filename = filename.replace('.', '/'); filename += "/" + file; final URL url = clazz.getClassLoader().getResource(filename); filename = url.getFile(); filename ... | /**
* Replace the expected result file with the current output.
*
* @param document
* How the expected result should look like
* @param clazz
* Used to load the file (relative to clazz package)
* @param file
* The name of the expected result file to be created
* @thro... | Replace the expected result file with the current output | replaceExpectedResultFile | {
"repo_name": "astubbs/wicket.get-portals2",
"path": "wicket/src/main/java/org/apache/wicket/util/diff/DiffUtil.java",
"license": "apache-2.0",
"size": 5719
} | [
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.PrintWriter"
] | import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,667,194 |
public static PublicKey publicToExplicitParameters(PublicKey key, String providerName)
throws IllegalArgumentException, NoSuchAlgorithmException, NoSuchProviderException
{
Provider provider = Security.getProvider(providerName);
if (provider == null)
{
throw new NoSuc... | static PublicKey function(PublicKey key, String providerName) throws IllegalArgumentException, NoSuchAlgorithmException, NoSuchProviderException { Provider provider = Security.getProvider(providerName); if (provider == null) { throw new NoSuchProviderException(STR + providerName); } return publicToExplicitParameters(ke... | /**
* Convert a passed in public EC key to have explicit parameters. If the key
* is already using explicit parameters it is returned.
*
* @param key key to be converted
* @param providerName provider name to be used.
* @return the equivalent key with explicit curve parameters
* @thro... | Convert a passed in public EC key to have explicit parameters. If the key is already using explicit parameters it is returned | publicToExplicitParameters | {
"repo_name": "bullda/DroidText",
"path": "src/bouncycastle/repack/org/bouncycastle/jce/ECKeyUtil.java",
"license": "lgpl-3.0",
"size": 8819
} | [
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.Provider",
"java.security.PublicKey",
"java.security.Security"
] | import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.Provider; import java.security.PublicKey; import java.security.Security; | import java.security.*; | [
"java.security"
] | java.security; | 2,257,034 |
private boolean isNotStale(final HttpResponse httpResponse) {
final Header[] warnings = httpResponse.getHeaders(HeaderConstants.WARNING);
if (warnings != null)
{
for (final Header warning : warnings)
{
final String warningValue = warni... | boolean function(final HttpResponse httpResponse) { final Header[] warnings = httpResponse.getHeaders(HeaderConstants.WARNING); if (warnings != null) { for (final Header warning : warnings) { final String warningValue = warning.getValue(); if (warningValue.startsWith("110") warningValue.startsWith("111")) { return fals... | /**
* Try to detect if the returned response is generated from a stale cache entry.
* @param httpResponse the response to be checked
* @return whether the response is stale or not
*/ | Try to detect if the returned response is generated from a stale cache entry | isNotStale | {
"repo_name": "byronka/xenos",
"path": "lib/lib_src/httpcomponents_source/httpcomponents-client-4.4/httpclient-cache/src/main/java/org/apache/http/impl/client/cache/AsynchronousValidationRequest.java",
"license": "mit",
"size": 6578
} | [
"org.apache.http.Header",
"org.apache.http.HttpResponse",
"org.apache.http.client.cache.HeaderConstants"
] | import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.http.client.cache.HeaderConstants; | import org.apache.http.*; import org.apache.http.client.cache.*; | [
"org.apache.http"
] | org.apache.http; | 1,411,452 |
@Override
public void updatePipeline(String clientName, ExtendedBlock oldBlock,
ExtendedBlock newBlock, DatanodeID[] newNodes, String[] newStorageIDs)
throws IOException {
rpcServer.checkOperation(NameNode.OperationCategory.WRITE);
RemoteMethod method = new RemoteMethod("updatePipeline",
... | void function(String clientName, ExtendedBlock oldBlock, ExtendedBlock newBlock, DatanodeID[] newNodes, String[] newStorageIDs) throws IOException { rpcServer.checkOperation(NameNode.OperationCategory.WRITE); RemoteMethod method = new RemoteMethod(STR, new Class<?>[] {String.class, ExtendedBlock.class, ExtendedBlock.cl... | /**
* Datanode are not verified to be in the same nameservice as the old block.
* TODO This may require validation.
*/ | Datanode are not verified to be in the same nameservice as the old block. TODO This may require validation | updatePipeline | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java",
"license": "apache-2.0",
"size": 82365
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.namenode.NameNode"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.namenode.NameNode; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,512,015 |
private void addViewShortcuts(IPageLayout layout) {
}
| void function(IPageLayout layout) { } | /**
* Add view shortcuts to the perspective.
*/ | Add view shortcuts to the perspective | addViewShortcuts | {
"repo_name": "gheetshyin/trainingRCP3",
"path": "com.sogeti.rental.ui/src/com/sogeti/rental/ui/perspective/RentalPerspective.java",
"license": "epl-1.0",
"size": 1151
} | [
"org.eclipse.ui.IPageLayout"
] | import org.eclipse.ui.IPageLayout; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 849,542 |
AttestationProviderInner innerModel();
interface Definition
extends DefinitionStages.Blank,
DefinitionStages.WithLocation,
DefinitionStages.WithResourceGroup,
DefinitionStages.WithProperties,
DefinitionStages.WithCreate {
}
interface Def... | AttestationProviderInner innerModel(); interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } interface DefinitionStages { interface Blank extends WithLocation { } | /**
* Gets the inner com.azure.resourcemanager.attestation.fluent.models.AttestationProviderInner object.
*
* @return the inner object.
*/ | Gets the inner com.azure.resourcemanager.attestation.fluent.models.AttestationProviderInner object | innerModel | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/attestation/azure-resourcemanager-attestation/src/main/java/com/azure/resourcemanager/attestation/models/AttestationProvider.java",
"license": "mit",
"size": 7816
} | [
"com.azure.resourcemanager.attestation.fluent.models.AttestationProviderInner"
] | import com.azure.resourcemanager.attestation.fluent.models.AttestationProviderInner; | import com.azure.resourcemanager.attestation.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,809,642 |
public static DetachedCriteria addOrders(DetachedCriteria dc, Order... orders) {
shouldNotBeNull(dc, "dc");
for (Order order : orders) {
dc.addOrder(order);
}
return dc;
} | static DetachedCriteria function(DetachedCriteria dc, Order... orders) { shouldNotBeNull(dc, "dc"); for (Order order : orders) { dc.addOrder(order); } return dc; } | /**
* Add orders.
*
* @param dc the dc
* @param orders the orders
* @return the detached criteria
*/ | Add orders | addOrders | {
"repo_name": "debop/debop4j",
"path": "debop4j-data/src/main/java/kr/debop4j/data/hibernate/tools/HibernateTool.java",
"license": "apache-2.0",
"size": 12709
} | [
"kr.debop4j.core.Guard",
"org.hibernate.criterion.DetachedCriteria",
"org.hibernate.criterion.Order"
] | import kr.debop4j.core.Guard; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Order; | import kr.debop4j.core.*; import org.hibernate.criterion.*; | [
"kr.debop4j.core",
"org.hibernate.criterion"
] | kr.debop4j.core; org.hibernate.criterion; | 2,901,578 |
public synchronized GBeanInstance getGBeanInstance(ObjectName name) throws GBeanNotFoundException {
GBeanInstance instance = objectNameRegistry.get(normalizeObjectName(name));
if (instance == null) {
throw new GBeanNotFoundException(name);
}
return instance;
} | synchronized GBeanInstance function(ObjectName name) throws GBeanNotFoundException { GBeanInstance instance = objectNameRegistry.get(normalizeObjectName(name)); if (instance == null) { throw new GBeanNotFoundException(name); } return instance; } | /**
* Return the GBeanInstance registered with the supplied name.
*
* @param name the name of the instance to return
* @return the GBeanInstance
* @throws GBeanNotFoundException if there is no GBean registered with the supplied name
*/ | Return the GBeanInstance registered with the supplied name | getGBeanInstance | {
"repo_name": "apache/geronimo",
"path": "framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/basic/BasicRegistry.java",
"license": "apache-2.0",
"size": 9460
} | [
"javax.management.ObjectName",
"org.apache.geronimo.gbean.runtime.GBeanInstance",
"org.apache.geronimo.kernel.GBeanNotFoundException"
] | import javax.management.ObjectName; import org.apache.geronimo.gbean.runtime.GBeanInstance; import org.apache.geronimo.kernel.GBeanNotFoundException; | import javax.management.*; import org.apache.geronimo.gbean.runtime.*; import org.apache.geronimo.kernel.*; | [
"javax.management",
"org.apache.geronimo"
] | javax.management; org.apache.geronimo; | 2,174,846 |
public List<List<Object>> getRowsAsLists(String query, Page page) {
return getRows(query, page).getRowsAsLists();
} | List<List<Object>> function(String query, Page page) { return getRows(query, page).getRowsAsLists(); } | /**
* Get results for a query as rows of objects.
*
* @param query The query to run.
* @param page The subsection of the result set to retrieve.
* @return a list of rows, which are each a list of cells.
*/ | Get results for a query as rows of objects | getRowsAsLists | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/webservice/client/main/src/org/intermine/webservice/client/services/QueryService.java",
"license": "lgpl-2.1",
"size": 22047
} | [
"java.util.List",
"org.intermine.webservice.client.results.Page"
] | import java.util.List; import org.intermine.webservice.client.results.Page; | import java.util.*; import org.intermine.webservice.client.results.*; | [
"java.util",
"org.intermine.webservice"
] | java.util; org.intermine.webservice; | 2,447,581 |
for (SGArena a : arenas) {
if (a.getId() == i) {
return a;
}
}
throw new ArenaNotFoundException("Could not find given arena with given ID: " + i);
} | for (SGArena a : arenas) { if (a.getId() == i) { return a; } } throw new ArenaNotFoundException(STR + i); } | /**
* Gets an arena from an integer ID
*
* @param i The ID to get the Arena from
* @return The arena from which the ID represents. May be null.
* @throws ArenaNotFoundException
*/ | Gets an arena from an integer ID | getArena | {
"repo_name": "SurvivalGamesDevTeam/TheSurvivalGames",
"path": "src/main/java/com/communitysurvivalgames/thesurvivalgames/managers/ArenaManager.java",
"license": "unlicense",
"size": 14132
} | [
"com.communitysurvivalgames.thesurvivalgames.exception.ArenaNotFoundException",
"com.communitysurvivalgames.thesurvivalgames.objects.SGArena"
] | import com.communitysurvivalgames.thesurvivalgames.exception.ArenaNotFoundException; import com.communitysurvivalgames.thesurvivalgames.objects.SGArena; | import com.communitysurvivalgames.thesurvivalgames.exception.*; import com.communitysurvivalgames.thesurvivalgames.objects.*; | [
"com.communitysurvivalgames.thesurvivalgames"
] | com.communitysurvivalgames.thesurvivalgames; | 2,703,718 |
public void emitNumbersByElement(APIDiff apiDiff)
{
// Local variables to hold the values
int numPackagesRemoved = apiDiff.packagesRemoved.size();
int numPackagesAdded = apiDiff.packagesAdded.size();
int numPackagesChanged = apiDiff.packagesChanged.size();
int numClassesRemoved = 0;
int numClassesAdde... | void function(APIDiff apiDiff) { int numPackagesRemoved = apiDiff.packagesRemoved.size(); int numPackagesAdded = apiDiff.packagesAdded.size(); int numPackagesChanged = apiDiff.packagesChanged.size(); int numClassesRemoved = 0; int numClassesAdded = 0; int numClassesChanged = 0; int numCtorsRemoved = 0; int numCtorsAdde... | /**
* Emit a table of numbers of removals, additions and changes by package, class, constructor,
* method and field.
*/ | Emit a table of numbers of removals, additions and changes by package, class, constructor, method and field | emitNumbersByElement | {
"repo_name": "topicusonderwijs/jdiff",
"path": "src/main/java/jdiff/HTMLStatistics.java",
"license": "lgpl-2.1",
"size": 18780
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 798,184 |
public String getRelayClass() {
Element relayE = getUniqueDescendant(getDocument().getFirstChild(),
"relay");
return relayE.getAttribute("relayClass");
} | String function() { Element relayE = getUniqueDescendant(getDocument().getFirstChild(), "relay"); return relayE.getAttribute(STR); } | /**
* Get class name to be used for the relay. If overriding the WamiRelay,
* you'll need to specify the class in the config.xml file. Note that if you
* override AjaxGalaxyControl, however, this needs to be specified in the
* WebContent/WEB-INF/web.xml. This is because AjaxGalaxyControl is an
*/ | Get class name to be used for the relay. If overriding the WamiRelay, you'll need to specify the class in the config.xml file. Note that if you override AjaxGalaxyControl, however, this needs to be specified in the WebContent/WEB-INF/web.xml. This is because AjaxGalaxyControl is an | getRelayClass | {
"repo_name": "ananthvelu/wami",
"path": "src/edu/mit/csail/sls/wami/WamiConfig.java",
"license": "mit",
"size": 39472
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,102,425 |
public SwipeData decodeToASCII(BitSet bits, int beginIndex,
int bitsPerChar, int baseChar) {
StringBuilder sb = new StringBuilder();
SwipeData toreturn = new SwipeData();
int i = beginIndex;
char endSentinel = '?'; // for both!
int charCount = 0;
boolean sentinelFound = false;
int size = bit... | SwipeData function(BitSet bits, int beginIndex, int bitsPerChar, int baseChar) { StringBuilder sb = new StringBuilder(); SwipeData toreturn = new SwipeData(); int i = beginIndex; char endSentinel = '?'; int charCount = 0; boolean sentinelFound = false; int size = bits.size(); int letterVal = 0; char letter; boolean exp... | /**
* Turn BitSet into String by decoding binary into ASCII characters
*
* @param bits
* BitSet of logical bits in swipe
* @param beginIndex
* int index of first 1 (start of sentinel)
* @param bitsPerChar
* int number of bits (not including parity bit) in charac... | Turn BitSet into String by decoding binary into ASCII characters | decodeToASCII | {
"repo_name": "davalidator/rhombuslibexample",
"path": "src/com/chumpchange/android/rhombuslibexample/audio/decoder/AudioDecoder.java",
"license": "mit",
"size": 16276
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 366,445 |
public List<SubjectEntity> getAllSubjects() {
Session session = this.sessionFactory.openSession();
session.beginTransaction();
Query query = session.createNamedQuery("getAllSubjects", SubjectEntity.class);
List<SubjectEntity> results = query.getResultList();
session.close();... | List<SubjectEntity> function() { Session session = this.sessionFactory.openSession(); session.beginTransaction(); Query query = session.createNamedQuery(STR, SubjectEntity.class); List<SubjectEntity> results = query.getResultList(); session.close(); return results; } | /**
* Get all SubjectEntities
*
* @return List of SubjectEntities
*/ | Get all SubjectEntities | getAllSubjects | {
"repo_name": "glowstone-io/Glowstone",
"path": "src/main/java/com/github/glowstone/io/core/persistence/repositories/SubjectRepository.java",
"license": "mit",
"size": 5513
} | [
"com.github.glowstone.io.core.entities.SubjectEntity",
"java.util.List",
"javax.persistence.Query",
"org.hibernate.Session"
] | import com.github.glowstone.io.core.entities.SubjectEntity; import java.util.List; import javax.persistence.Query; import org.hibernate.Session; | import com.github.glowstone.io.core.entities.*; import java.util.*; import javax.persistence.*; import org.hibernate.*; | [
"com.github.glowstone",
"java.util",
"javax.persistence",
"org.hibernate"
] | com.github.glowstone; java.util; javax.persistence; org.hibernate; | 2,133,750 |
public Set<String> hkeys(final String key) {
checkIsInMulti();
client.hkeys(key);
return BuilderFactory.STRING_SET
.build(client.getBinaryMultiBulkReply());
} | Set<String> function(final String key) { checkIsInMulti(); client.hkeys(key); return BuilderFactory.STRING_SET .build(client.getBinaryMultiBulkReply()); } | /**
* Return all the fields in a hash.
* <p>
* <b>Time complexity:</b> O(N), where N is the total number of entries
*
* @param key
* @return All the fields names contained into a hash.
*/ | Return all the fields in a hash. Time complexity: O(N), where N is the total number of entries | hkeys | {
"repo_name": "prosche/jedis",
"path": "src/main/java/redis/clients/jedis/Jedis.java",
"license": "mit",
"size": 119655
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,433,662 |
protected final Clock clock() {
return clock;
} | final Clock function() { return clock; } | /**
* Returns the {@link Clock} which provides the current date and time.
*/ | Returns the <code>Clock</code> which provides the current date and time | clock | {
"repo_name": "anuraaga/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFile.java",
"license": "apache-2.0",
"size": 12819
} | [
"java.time.Clock"
] | import java.time.Clock; | import java.time.*; | [
"java.time"
] | java.time; | 37,761 |
public static <T> LinkedHashSet<T> newLinkedHashSet(int expSize) {
return new LinkedHashSet<>(capacity(expSize));
} | static <T> LinkedHashSet<T> function(int expSize) { return new LinkedHashSet<>(capacity(expSize)); } | /**
* Creates new {@link LinkedHashSet} with expected size.
*
* @param expSize Expected size of created map.
* @param <T> Type of elements.
* @return New set.
*/ | Creates new <code>LinkedHashSet</code> with expected size | newLinkedHashSet | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 325083
} | [
"java.util.LinkedHashSet"
] | import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,202,786 |
static PskContext fromReceiverAddress(byte[] receiverSecret, InterledgerAddress address) {
Objects.requireNonNull(receiverSecret, "receiverSecret must not be null");
Objects.requireNonNull(address, "address must not be null");
if (receiverSecret.length != RECEIVER_SECRET_LEN_BYTES) {
throw new Ill... | static PskContext fromReceiverAddress(byte[] receiverSecret, InterledgerAddress address) { Objects.requireNonNull(receiverSecret, STR); Objects.requireNonNull(address, STR); if (receiverSecret.length != RECEIVER_SECRET_LEN_BYTES) { throw new IllegalArgumentException(STR + RECEIVER_SECRET_LEN_BYTES + STR + STR + receive... | /**
* Create a new receiver context based on the given Interledger Payment address.
*
* <p>This will attempt to parse the token of the payment address.
*
* @param receiverSecret The receiver's local secret
* @param address The destination address of the incoming payment
*
* @return A new ... | Create a new receiver context based on the given Interledger Payment address. This will attempt to parse the token of the payment address | fromReceiverAddress | {
"repo_name": "interledger/java-ilp-core",
"path": "src/main/java/org/interledger/psk/PskContext.java",
"license": "apache-2.0",
"size": 17609
} | [
"java.util.Base64",
"java.util.Objects",
"org.interledger.InterledgerAddress"
] | import java.util.Base64; import java.util.Objects; import org.interledger.InterledgerAddress; | import java.util.*; import org.interledger.*; | [
"java.util",
"org.interledger"
] | java.util; org.interledger; | 2,669,812 |
public boolean isCacheable(RequestHeaders request) {
// Always go to network for uncacheable response codes (RFC 2616, 13.4),
// This implementation doesn't support caching partial content.
int responseCode = headers.getResponseCode();
if (responseCode != HttpURLConnection.HTTP_OK
&& responseC... | boolean function(RequestHeaders request) { int responseCode = headers.getResponseCode(); if (responseCode != HttpURLConnection.HTTP_OK && responseCode != HttpURLConnection.HTTP_NOT_AUTHORITATIVE && responseCode != HttpURLConnection.HTTP_MULT_CHOICE && responseCode != HttpURLConnection.HTTP_MOVED_PERM && responseCode !=... | /**
* Returns true if this response can be stored to later serve another
* request.
*/ | Returns true if this response can be stored to later serve another request | isCacheable | {
"repo_name": "omnirom/android_external_okhttp",
"path": "src/main/java/com/squareup/okhttp/internal/http/ResponseHeaders.java",
"license": "apache-2.0",
"size": 16883
} | [
"java.net.HttpURLConnection"
] | import java.net.HttpURLConnection; | import java.net.*; | [
"java.net"
] | java.net; | 1,923,702 |
public Glyph createGlyph(BridgeContext ctx,
Element glyphElement,
Element textElement,
int glyphCode,
float fontSize,
GVTFontFace fontFace,
Te... | Glyph function(BridgeContext ctx, Element glyphElement, Element textElement, int glyphCode, float fontSize, GVTFontFace fontFace, TextPaintInfo tpi) { float fontHeight = fontFace.getUnitsPerEm(); float scale = fontSize/fontHeight; AffineTransform scaleTransform = AffineTransform.getScaleInstance(scale, -scale); String ... | /**
* Constructs a new Glyph that represents the specified <glyph> element
* at the requested size.
*
* @param ctx The current bridge context.
* @param glyphElement The glyph element to base the glyph construction on.
* @param textElement The textElement the glyph will be used for.
... | Constructs a new Glyph that represents the specified <glyph> element at the requested size | createGlyph | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/bridge/SVGGlyphElementBridge.java",
"license": "apache-2.0",
"size": 12787
} | [
"java.awt.Shape",
"java.awt.geom.AffineTransform",
"java.awt.geom.Point2D",
"java.util.ArrayList",
"java.util.List",
"java.util.StringTokenizer",
"org.apache.batik.gvt.CompositeGraphicsNode",
"org.apache.batik.gvt.GraphicsNode",
"org.apache.batik.gvt.font.GVTFontFace",
"org.apache.batik.gvt.font.G... | import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.apache.batik.gvt.CompositeGraphicsNode; import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.font.GVTFontFace; impor... | import java.awt.*; import java.awt.geom.*; import java.util.*; import org.apache.batik.gvt.*; import org.apache.batik.gvt.font.*; import org.apache.batik.gvt.text.*; import org.apache.batik.parser.*; import org.w3c.dom.*; | [
"java.awt",
"java.util",
"org.apache.batik",
"org.w3c.dom"
] | java.awt; java.util; org.apache.batik; org.w3c.dom; | 253,811 |
protected final <T extends ComponentDefinition> Component create(
Class<T> definition, Init.None initEvent) {
Optional<Init<T>> init = Optional.absent();
return core.doCreate(definition, init);
}
| final <T extends ComponentDefinition> Component function( Class<T> definition, Init.None initEvent) { Optional<Init<T>> init = Optional.absent(); return core.doCreate(definition, init); } | /**
* Creates the.
*
* @param definition the definition
* @param initEvent none
*
* @return the component
*/ | Creates the | create | {
"repo_name": "o-alex/kompics",
"path": "core/src/main/java/se/sics/kompics/ComponentDefinition.java",
"license": "gpl-2.0",
"size": 25441
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 413,841 |
private List getMessages(AnnouncementChannel defaultChannel, Filter filter, boolean ascending, AnnouncementActionState state,
VelocityPortlet portlet) throws PermissionException
{
List messageList = new ArrayList();
MergedList mergedAnnouncementList = new MergedList();
// TODO - MERGE FIX
String[] cha... | List function(AnnouncementChannel defaultChannel, Filter filter, boolean ascending, AnnouncementActionState state, VelocityPortlet portlet) throws PermissionException { List messageList = new ArrayList(); MergedList mergedAnnouncementList = new MergedList(); String[] channelArrayFromConfigParameterValue = new String[0]... | /**
* This should be the single point for getting lists of announcements in this action. It collects together all the announcements and wraps the real announcements in a decorator object that adds extra properties for use in the VM template.
*
* @throws PermissionException
*/ | This should be the single point for getting lists of announcements in this action. It collects together all the announcements and wraps the real announcements in a decorator object that adds extra properties for use in the VM template | getMessages | {
"repo_name": "wfuedu/sakai",
"path": "announcement/announcement-tool/tool/src/java/org/sakaiproject/announcement/tool/AnnouncementAction.java",
"license": "apache-2.0",
"size": 173293
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apache.commons.lang.StringUtils",
"org.sakaiproject.announcement.api.AnnouncementChannel",
"org.sakaiproject.announcement.cover.AnnouncementService",
"org.sakaiproject.cheftool.VelocityPortlet",
"org.sakaiproject.exception.IdUnusedExc... | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.commons.lang.StringUtils; import org.sakaiproject.announcement.api.AnnouncementChannel; import org.sakaiproject.announcement.cover.AnnouncementService; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiprojec... | import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.announcement.api.*; import org.sakaiproject.announcement.cover.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.exception.*; import org.sakaiproject.javax.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover... | [
"java.util",
"org.apache.commons",
"org.sakaiproject.announcement",
"org.sakaiproject.cheftool",
"org.sakaiproject.exception",
"org.sakaiproject.javax",
"org.sakaiproject.site",
"org.sakaiproject.tool",
"org.sakaiproject.util"
] | java.util; org.apache.commons; org.sakaiproject.announcement; org.sakaiproject.cheftool; org.sakaiproject.exception; org.sakaiproject.javax; org.sakaiproject.site; org.sakaiproject.tool; org.sakaiproject.util; | 2,845,502 |
public List<MongoIndex> indexes() {
return this.indexes;
} | List<MongoIndex> function() { return this.indexes; } | /**
* Get list of index keys.
*
* @return the indexes value
*/ | Get list of index keys | indexes | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/mgmt-v2019_12_12/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_12_12/MongoDBCollectionGetPropertiesResource.java",
"license": "mit",
"size": 3709
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,683,517 |
private boolean translateKeyDown(int keyCode, KeyEvent event) {
mMetaState = MetaKeyKeyListener.handleKeyDown(mMetaState,
keyCode, event);
int c = event.getUnicodeChar(MetaKeyKeyListener.getMetaState(mMetaState));
mMetaState = MetaKeyKeyListener.adjustMetaAfterKeypress(mMetaS... | boolean function(int keyCode, KeyEvent event) { mMetaState = MetaKeyKeyListener.handleKeyDown(mMetaState, keyCode, event); int c = event.getUnicodeChar(MetaKeyKeyListener.getMetaState(mMetaState)); mMetaState = MetaKeyKeyListener.adjustMetaAfterKeypress(mMetaState); InputConnection ic = getCurrentInputConnection(); if ... | /**
* This translates incoming hard key events in to edit operations on an
* InputConnection. It is only needed when using the
* PROCESS_HARD_KEYS option.
*/ | This translates incoming hard key events in to edit operations on an InputConnection. It is only needed when using the PROCESS_HARD_KEYS option | translateKeyDown | {
"repo_name": "hfavisado/DeleteAsBackspace",
"path": "app/src/main/java/com/hfavisado/android/deleteasbackspace/SoftKeyboard.java",
"license": "apache-2.0",
"size": 27684
} | [
"android.text.method.MetaKeyKeyListener",
"android.view.KeyCharacterMap",
"android.view.KeyEvent",
"android.view.inputmethod.InputConnection"
] | import android.text.method.MetaKeyKeyListener; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.inputmethod.InputConnection; | import android.text.method.*; import android.view.*; import android.view.inputmethod.*; | [
"android.text",
"android.view"
] | android.text; android.view; | 398,368 |
public Connection getConnection() throws SQLException
{
Connection conn = m_dataSource.getConnection();
if( conn.getAutoCommit() != m_autocommit )
{
conn.setAutoCommit( m_autocommit );
}
return conn;
} | Connection function() throws SQLException { Connection conn = m_dataSource.getConnection(); if( conn.getAutoCommit() != m_autocommit ) { conn.setAutoCommit( m_autocommit ); } return conn; } | /**
* Return an Informix Connection object
*/ | Return an Informix Connection object | getConnection | {
"repo_name": "eva-xuyen/excalibur",
"path": "components/datasource/src/main/java/org/apache/avalon/excalibur/datasource/InformixDataSource.java",
"license": "apache-2.0",
"size": 9920
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,305,283 |
public Icon createIcon(Float fixedFraction, Dimension size) {
return new ThrobberIcon(this, fixedFraction, size);
}
private static class ThrobberIcon implements Icon {
final int width;
final int height;
final Float fixedFraction;
final ThrobberUI ui;
final Dimension defaultSize;
public ThrobberI... | Icon function(Float fixedFraction, Dimension size) { return new ThrobberIcon(this, fixedFraction, size); } private static class ThrobberIcon implements Icon { final int width; final int height; final Float fixedFraction; final ThrobberUI ui; final Dimension defaultSize; public ThrobberIcon(ThrobberUI ui, Float fraction... | /**
* Create an Icon representation of this ThrobberUI.
*
* @param fixedFraction
* the fraction from [0,1] indicating this icon's animation
* progress, or null if this icon should update based on
* <code>System.currentTimeMillis()</code>.
* @param size
* the ... | Create an Icon representation of this ThrobberUI | createIcon | {
"repo_name": "mickleness/pumpernickel",
"path": "src/main/java/com/pump/plaf/ThrobberUI.java",
"license": "mit",
"size": 10168
} | [
"java.awt.Dimension",
"javax.swing.Icon"
] | import java.awt.Dimension; import javax.swing.Icon; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,065,242 |
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException {
writeStartElement(localName);
} | void function(String namespaceURI, String localName) throws XMLStreamException { writeStartElement(localName); } | /**
* Writes a start tag to the output
*
* @param namespaceURI the namespaceURI of the prefix to use, may not be null
* @param localName local name of the tag, may not be null
* @throws javax.xml.stream.XMLStreamException
* if the namespace URI has not been bound to a prefix an... | Writes a start tag to the output | writeStartElement | {
"repo_name": "apache/axis2-java",
"path": "modules/json/src/org/apache/axis2/json/gson/GsonXMLStreamWriter.java",
"license": "apache-2.0",
"size": 29093
} | [
"javax.xml.stream.XMLStreamException"
] | import javax.xml.stream.XMLStreamException; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 1,783,472 |
public int syncRepo(User loggedInUser, String channelLabel, String cronExpr) {
Channel chan = lookupChannelByLabel(loggedInUser, channelLabel);
if (StringUtils.isEmpty(cronExpr)) {
new TaskomaticApi().unscheduleRepoSync(chan, loggedInUser);
}
else {
new Taskom... | int function(User loggedInUser, String channelLabel, String cronExpr) { Channel chan = lookupChannelByLabel(loggedInUser, channelLabel); if (StringUtils.isEmpty(cronExpr)) { new TaskomaticApi().unscheduleRepoSync(chan, loggedInUser); } else { new TaskomaticApi().scheduleRepoSync(chan, loggedInUser, cronExpr); } return ... | /**
* Schedule periodic repo synchronization
* @param loggedInUser The current user
* @param channelLabel channel label
* @param cronExpr cron expression, if empty all periodic schedules will be disabled
* @return 1 on success
*
* @xmlrpc.doc Schedule periodic repo synchronization
... | Schedule periodic repo synchronization | syncRepo | {
"repo_name": "davidhrbac/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java",
"license": "gpl-2.0",
"size": 127652
} | [
"com.redhat.rhn.domain.channel.Channel",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.taskomatic.TaskomaticApi",
"org.apache.commons.lang.StringUtils"
] | import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.taskomatic.TaskomaticApi; import org.apache.commons.lang.StringUtils; | import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.taskomatic.*; import org.apache.commons.lang.*; | [
"com.redhat.rhn",
"org.apache.commons"
] | com.redhat.rhn; org.apache.commons; | 1,918,406 |
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
if (this.field_143015_k < 0)
{
this.field_143015_k = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn);
... | boolean function(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { if (this.field_143015_k < 0) { this.field_143015_k = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn); if (this.field_143015_k < 0) { return true; } this.boundingBox.offset(0, this.field_143015_k - this.boundingBo... | /**
* second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes
* Mineshafts at the end, it adds Fences...
*/ | second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at the end, it adds Fences.. | addComponentParts | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureVillagePieces.java",
"license": "gpl-3.0",
"size": 130983
} | [
"java.util.Random",
"net.minecraft.block.BlockLadder",
"net.minecraft.block.BlockStairs",
"net.minecraft.block.BlockTorch",
"net.minecraft.block.material.Material",
"net.minecraft.block.state.IBlockState",
"net.minecraft.init.Blocks",
"net.minecraft.util.EnumFacing",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.BlockLadder; import net.minecraft.block.BlockStairs; import net.minecraft.block.BlockTorch; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.m... | import java.util.*; import net.minecraft.block.*; import net.minecraft.block.material.*; import net.minecraft.block.state.*; import net.minecraft.init.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.init",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.init; net.minecraft.util; net.minecraft.world; | 2,841,834 |
public final void cloneEnvironment(EnvironmentVarModel environmentVarSets)
{
if (environmentVarSets == null)
{
return;
}
this.environmentVarSets = new EnvironmentVarModel(environmentVarSets);
updateEnvironments();
} | final void function(EnvironmentVarModel environmentVarSets) { if (environmentVarSets == null) { return; } this.environmentVarSets = new EnvironmentVarModel(environmentVarSets); updateEnvironments(); } | /**
* Clone the given environment into this process.
*
* @param environmentVarSets the environment to clone
*/ | Clone the given environment into this process | cloneEnvironment | {
"repo_name": "kingkybel/utilities",
"path": "ProcessUtilities/src/com/kybelksties/process/ConcreteProcess.java",
"license": "gpl-2.0",
"size": 16777
} | [
"com.kybelksties.general.EnvironmentVarModel"
] | import com.kybelksties.general.EnvironmentVarModel; | import com.kybelksties.general.*; | [
"com.kybelksties.general"
] | com.kybelksties.general; | 301,650 |
public void endEffect(Effect effect) {
}
| void function(Effect effect) { } | /**
* End effect on effected
*
* @param effect
*/ | End effect on effected | endEffect | {
"repo_name": "GiGatR00n/Aion-Core-v4.7.5",
"path": "AC-Game/src/com/aionemu/gameserver/skillengine/effect/EffectTemplate.java",
"license": "gpl-2.0",
"size": 26754
} | [
"com.aionemu.gameserver.skillengine.model.Effect"
] | import com.aionemu.gameserver.skillengine.model.Effect; | import com.aionemu.gameserver.skillengine.model.*; | [
"com.aionemu.gameserver"
] | com.aionemu.gameserver; | 1,921,158 |
private boolean exportHeadCertOnlyDER(String sEntryAlias)
{
X509Certificate cert;
try
{
// Get the head certificate
cert = getHeadCert(sEntryAlias);
}
catch (CryptoException ex)
{
DThrowable.showAndWait(this, null, ex);
return false;
}
String basename = X509CertUtil.getCertificateAlias(... | boolean function(String sEntryAlias) { X509Certificate cert; try { cert = getHeadCert(sEntryAlias); } catch (CryptoException ex) { DThrowable.showAndWait(this, null, ex); return false; } String basename = X509CertUtil.getCertificateAlias(cert); if (basename.isEmpty()) { basename = sEntryAlias; } File fExportFile = choo... | /**
* Export the head certificate of the keystore entry in a DER encoding.
*
* @param sEntryAlias Entry alias
* @return True if the export is successful, false otherwise
*/ | Export the head certificate of the keystore entry in a DER encoding | exportHeadCertOnlyDER | {
"repo_name": "scop/portecle",
"path": "src/main/net/sf/portecle/FPortecle.java",
"license": "gpl-2.0",
"size": 189435
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.security.cert.X509Certificate",
"java.text.MessageFormat",
"javax.swing.JOptionPane",
"net.sf.portecle.crypto.CryptoException",
"net.sf.portecle.crypto.X509CertUtil",
"net.sf.portecle.gui.erro... | import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.security.cert.X509Certificate; import java.text.MessageFormat; import javax.swing.JOptionPane; import net.sf.portecle.crypto.CryptoException; import net.sf.portecle.crypto.X509CertUtil; im... | import java.io.*; import java.security.cert.*; import java.text.*; import javax.swing.*; import net.sf.portecle.crypto.*; import net.sf.portecle.gui.error.*; | [
"java.io",
"java.security",
"java.text",
"javax.swing",
"net.sf.portecle"
] | java.io; java.security; java.text; javax.swing; net.sf.portecle; | 2,862,656 |
public boolean replaceDNSEntry(DNSEntry newDNSEntry, DNSEntry existingDNSEntry) {
boolean result = false;
if ((newDNSEntry != null) && (existingDNSEntry != null) && (newDNSEntry.getKey().equals(existingDNSEntry.getKey()))) {
List<DNSEntry> entryList = this.get(newDNSEntry.getKey());
... | boolean function(DNSEntry newDNSEntry, DNSEntry existingDNSEntry) { boolean result = false; if ((newDNSEntry != null) && (existingDNSEntry != null) && (newDNSEntry.getKey().equals(existingDNSEntry.getKey()))) { List<DNSEntry> entryList = this.get(newDNSEntry.getKey()); if (entryList == null) { this.putIfAbsent(newDNSEn... | /**
* Replace an existing entry by a new one.<br/>
* <b>Note:</b> the 2 entries must have the same key.
*
* @param newDNSEntry
* @param existingDNSEntry
* @return <code>true</code> if the entry has been replace, <code>false</code> otherwise.
*/ | Replace an existing entry by a new one. Note: the 2 entries must have the same key | replaceDNSEntry | {
"repo_name": "shelmesky/nexfi_android_ble",
"path": "underdark/src/main/java/javax/jmdns/impl/DNSCache.java",
"license": "gpl-3.0",
"size": 9256
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 404,584 |
protected File doTestProject( final String projectName, final String[] expectedArtifacts,
boolean testDeploymentDescriptors )
throws Exception
{
return doTestProject( projectName, expectedArtifacts, new boolean[expectedArtifacts.length] );
} | File function( final String projectName, final String[] expectedArtifacts, boolean testDeploymentDescriptors ) throws Exception { return doTestProject( projectName, expectedArtifacts, new boolean[expectedArtifacts.length] ); } | /**
* Executes the specified projects and asserts the given artifacts as
* artifacts (non directory)
*
* @param projectName the project to test
* @param expectedArtifacts the list of artifacts to be found in the EAR archive
* @param testDeploymentDescriptors whether w... | Executes the specified projects and asserts the given artifacts as artifacts (non directory) | doTestProject | {
"repo_name": "dmlloyd/maven-plugins",
"path": "maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/it/AbstractEarPluginIT.java",
"license": "apache-2.0",
"size": 15956
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 845,601 |
public final static void write32(final OutputStream out, final int value) throws IOException
{
out.write(value >> 24);
out.write(value >> 16);
out.write(value >> 8);
out.write(value);
} | final static void function(final OutputStream out, final int value) throws IOException { out.write(value >> 24); out.write(value >> 16); out.write(value >> 8); out.write(value); } | /**
* Writes an integer.
*
* @param out
* Stream to write to
* @param value
* Value to write
* @throws IOException
* if an IO error occurred
*/ | Writes an integer | write32 | {
"repo_name": "rjeschke/neetutils-base",
"path": "src/main/java/com/github/rjeschke/neetutils/io/BEIO.java",
"license": "apache-2.0",
"size": 9947
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,837,697 |
public void setMessage(@Nullable final byte[] data, final int length) throws InvalidMidiDataException {
if (data == null) {
this.data = null;
this.length = 0;
} else {
if (this.data == null || this.data.length != data.length) {
this.data = new by... | void function(@Nullable final byte[] data, final int length) throws InvalidMidiDataException { if (data == null) { this.data = null; this.length = 0; } else { if (this.data == null this.data.length != data.length) { this.data = new byte[data.length]; } this.length = data.length; System.arraycopy(data, 0, this.data, 0, ... | /**
* Constructor with the raw data, and its length
*
* @param data the raw data
* @param length unused parameter. Use always data.length
* @throws InvalidMidiDataException
*/ | Constructor with the raw data, and its length | setMessage | {
"repo_name": "KyoSherlock/SherlockMidi",
"path": "sherlockmidi/src/main/java/jp/kshoji/javax/sound/midi/MidiMessage.java",
"license": "apache-2.0",
"size": 2841
} | [
"android.support.annotation.Nullable"
] | import android.support.annotation.Nullable; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,788,978 |
public static <K, V> ConcurrentHashMap<K, V> newConcurrentHashMap() {
return new ConcurrentHashMap<K, V>();
} | static <K, V> ConcurrentHashMap<K, V> function() { return new ConcurrentHashMap<K, V>(); } | /**
* DOCUMENT ME!
*
* @param <K> DOCUMENT ME!
* @param <V> DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | newConcurrentHashMap | {
"repo_name": "cismet/jpresso",
"path": "jpresso-core/src/main/java/de/cismet/jpresso/core/utils/TypeSafeCollections.java",
"license": "lgpl-3.0",
"size": 18545
} | [
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.concurrent.ConcurrentHashMap; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 706,576 |
public Map<String, Integer> getProcessedMessages() {
return stats.processedMessages();
} | Map<String, Integer> function() { return stats.processedMessages(); } | /**
* Gets processed messages counts (grouped by type).
*
* @return Map containing message types and respective counts.
*/ | Gets processed messages counts (grouped by type) | getProcessedMessages | {
"repo_name": "a1vanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java",
"license": "apache-2.0",
"size": 76111
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,527,265 |
@Test(timeout=20000)
public void testWorkingDirectory() throws IOException {
Configuration conf = new HdfsConfiguration();
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
FileSystem fileSys = cluster.getFileSystem();
try {
Path orig_path = fileSys.getWorkingDirectory();
... | @Test(timeout=20000) void function() throws IOException { Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build(); FileSystem fileSys = cluster.getFileSystem(); try { Path orig_path = fileSys.getWorkingDirectory(); assertTrue(orig_path.isAbsolute()); Path file1 = ... | /**
* Tests get/set working directory in DFS.
*/ | Tests get/set working directory in DFS | testWorkingDirectory | {
"repo_name": "odpi/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestLocalDFS.java",
"license": "apache-2.0",
"size": 4444
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.junit.Assert",
"org.junit.Test"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.junit.Assert; import org.junit.Test; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 2,225,228 |
protected void bringActivityToForeground() {
// This intent is sent in order to get the activity back to the foreground if it was
// not already. The previous call will activate the right tab in the context of the
// TabModel but will only show the tab to the user if Chrome was already in th... | void function() { Intent newIntent = Tab.createBringTabToFrontIntent(mTab.getId()); if (newIntent != null) { newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mTab.getApplicationContext().startActivity(newIntent); } } | /**
* Brings chrome's Activity to foreground, if it is not so.
*/ | Brings chrome's Activity to foreground, if it is not so | bringActivityToForeground | {
"repo_name": "danakj/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java",
"license": "bsd-3-clause",
"size": 19357
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 975,419 |
public final String getToken() {
if (this.placeRequest == null) {
return null;
}
if (this.placeRequest.getParameterNames() == null
|| this.placeRequest.getParameterNames().size() == 0) {
return this.placeRequest.getNameToken();
}
final StringBuilder token = new StringBu... | final String function() { if (this.placeRequest == null) { return null; } if (this.placeRequest.getParameterNames() == null this.placeRequest.getParameterNames().size() == 0) { return this.placeRequest.getNameToken(); } final StringBuilder token = new StringBuilder(); token.append(this.placeRequest.getNameToken()); for... | /**
* get/create token out of placeRequest.
*
* @return token string
*/ | get/create token out of placeRequest | getToken | {
"repo_name": "ManfredTremmel/gwtp-dynamic-navigation",
"path": "src/main/java/de/knightsoftnet/navigation/client/event/ChangePlaceEvent.java",
"license": "apache-2.0",
"size": 3048
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 114,974 |
public static boolean isPermissionsGranted(Context context, String... permissions) {
for (String permission : permissions) {
if (!isPermissionGranted(context, permission)) {
return false;
}
}
return true;
} | static boolean function(Context context, String... permissions) { for (String permission : permissions) { if (!isPermissionGranted(context, permission)) { return false; } } return true; } | /**
* whether app has granted this permissions
*
* @param context
* @param permissions Manifest.permission
* @return true if app has, also false
*/ | whether app has granted this permissions | isPermissionsGranted | {
"repo_name": "AndroidKnife/Utils",
"path": "application/src/main/java/com/hwangjr/utils/application/PermissionHelper.java",
"license": "apache-2.0",
"size": 3657
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,795,032 |
private void checkIfRegionServerIsRemote() throws UnknownHostException {
String myAddress = DNS.getDefaultHost("default", "default");
if (this.location.getHostname().equalsIgnoreCase(myAddress)) {
isRegionServerRemote = false;
} else {
isRegionServerRemote = true;
}
} | void function() throws UnknownHostException { String myAddress = DNS.getDefaultHost(STR, STR); if (this.location.getHostname().equalsIgnoreCase(myAddress)) { isRegionServerRemote = false; } else { isRegionServerRemote = true; } } | /**
* compare the local machine hostname with region server's hostname
* to decide if hbase client connects to a remote region server
* @throws UnknownHostException.
*/ | compare the local machine hostname with region server's hostname to decide if hbase client connects to a remote region server | checkIfRegionServerIsRemote | {
"repo_name": "matteobertozzi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java",
"license": "apache-2.0",
"size": 10524
} | [
"java.net.UnknownHostException",
"org.apache.hadoop.net.DNS"
] | import java.net.UnknownHostException; import org.apache.hadoop.net.DNS; | import java.net.*; import org.apache.hadoop.net.*; | [
"java.net",
"org.apache.hadoop"
] | java.net; org.apache.hadoop; | 1,632,015 |
@ServiceMethod(returns = ReturnType.SINGLE)
ElasticPoolInner get(String resourceGroupName, String serverName, String elasticPoolName); | @ServiceMethod(returns = ReturnType.SINGLE) ElasticPoolInner get(String resourceGroupName, String serverName, String elasticPoolName); | /**
* Gets an elastic pool.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param elasticPoolName The name of the elasti... | Gets an elastic pool | get | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/ElasticPoolsClient.java",
"license": "mit",
"size": 39632
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,758,266 |
public static long getShiftMsbLsbMask(final OperandSize size) {
return -(size.getBitSize() - 1);
} | static long function(final OperandSize size) { return -(size.getBitSize() - 1); } | /**
* Returns a shift mask that can be used to shift isolated MSBs into LSBs for values of a given
* operand size.
*
* @param size The operand size of the value
*
* @return The shift mask.
*/ | Returns a shift mask that can be used to shift isolated MSBs into LSBs for values of a given operand size | getShiftMsbLsbMask | {
"repo_name": "hoangcuongflp/binnavi",
"path": "src/main/java/com/google/security/zynamics/reil/translators/TranslationHelpers.java",
"license": "apache-2.0",
"size": 6018
} | [
"com.google.security.zynamics.reil.OperandSize"
] | import com.google.security.zynamics.reil.OperandSize; | import com.google.security.zynamics.reil.*; | [
"com.google.security"
] | com.google.security; | 1,292,055 |
public static boolean deleteRecursive(File path) throws FileNotFoundException{
if (!path.exists()){
return true;
}
boolean ret = true;
if (path.isDirectory()){
for (File f : path.listFiles()){
ret = ret && deleteRecursive(f);
}
... | static boolean function(File path) throws FileNotFoundException{ if (!path.exists()){ return true; } boolean ret = true; if (path.isDirectory()){ for (File f : path.listFiles()){ ret = ret && deleteRecursive(f); } } return ret && path.delete(); } | /**
* By default File#delete fails for non-empty directories, it works like "rm".
* We need something a little more brutual - this does the equivalent of "rm -r"
* @param path Root File Path
* @return true iff the file and all sub files/directories have been removed
* @throws FileNotFoundExcep... | By default File#delete fails for non-empty directories, it works like "rm". We need something a little more brutual - this does the equivalent of "rm -r" | deleteRecursive | {
"repo_name": "HitTheSticks/alamode",
"path": "src/com/htssoft/alamode/UpdateService.java",
"license": "bsd-2-clause",
"size": 4821
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 981,931 |
@ServiceMethod(returns = ReturnType.SINGLE)
public ExpressRouteCircuitsRoutesTableSummaryListResultInner listRoutesTableSummary(
String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) {
return listRoutesTableSummaryAsync(resourceGroupName, circuitNa... | @ServiceMethod(returns = ReturnType.SINGLE) ExpressRouteCircuitsRoutesTableSummaryListResultInner function( String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) { return listRoutesTableSummaryAsync(resourceGroupName, circuitName, peeringName, devicePath, context).block()... | /**
* Gets the currently advertised routes table summary associated with the express route circuit in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @param circuitName The name of the express route circuit.
* @param peeringName The name of the peering.
* @... | Gets the currently advertised routes table summary associated with the express route circuit in a resource group | listRoutesTableSummary | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java",
"license": "mit",
"size": 143721
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitsRoutesTableSummaryListResultInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitsRoutesTableSummaryListResultInner; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,427,431 |
public String getCurrentState(String resourceName, Partition partition, String instanceName) {
Map<Partition, Map<String, String>> map = _currentStateMap.get(resourceName);
if (map != null) {
Map<String, String> instanceStateMap = map.get(partition);
if (instanceStateMap != null) {
return ... | String function(String resourceName, Partition partition, String instanceName) { Map<Partition, Map<String, String>> map = _currentStateMap.get(resourceName); if (map != null) { Map<String, String> instanceStateMap = map.get(partition); if (instanceStateMap != null) { return instanceStateMap.get(instanceName); } } retu... | /**
* given (resource, partition, instance), returns currentState
* @param resourceName
* @param partition
* @param instanceName
* @return
*/ | given (resource, partition, instance), returns currentState | getCurrentState | {
"repo_name": "Teino1978-Corp/Teino1978-Corp-helix",
"path": "helix-core/src/main/java/org/apache/helix/controller/stages/CurrentStateOutput.java",
"license": "apache-2.0",
"size": 5890
} | [
"java.util.Map",
"org.apache.helix.model.Partition"
] | import java.util.Map; import org.apache.helix.model.Partition; | import java.util.*; import org.apache.helix.model.*; | [
"java.util",
"org.apache.helix"
] | java.util; org.apache.helix; | 2,021,265 |
void addRepositoryDecoratorFactory(RepositoryDecoratorFactory decorator); | void addRepositoryDecoratorFactory(RepositoryDecoratorFactory decorator); | /**
* Adds a repository decorator to intercept repository calls.
*
* @param RepositoryDecoratorFactory
* decorator
*/ | Adds a repository decorator to intercept repository calls | addRepositoryDecoratorFactory | {
"repo_name": "adnovum/katharsis-framework",
"path": "katharsis-core/src/main/java/io/katharsis/module/Module.java",
"license": "apache-2.0",
"size": 4751
} | [
"io.katharsis.repository.decorate.RepositoryDecoratorFactory"
] | import io.katharsis.repository.decorate.RepositoryDecoratorFactory; | import io.katharsis.repository.decorate.*; | [
"io.katharsis.repository"
] | io.katharsis.repository; | 1,005,277 |
public final Inventory getEquipment() {
return equipment;
} | final Inventory function() { return equipment; } | /**
* Gets this mob's equipment.
*
* @return The mob's equipment.
*/ | Gets this mob's equipment | getEquipment | {
"repo_name": "Major-/apollo",
"path": "game/src/main/org/apollo/game/model/entity/Mob.java",
"license": "isc",
"size": 13644
} | [
"org.apollo.game.model.inv.Inventory"
] | import org.apollo.game.model.inv.Inventory; | import org.apollo.game.model.inv.*; | [
"org.apollo.game"
] | org.apollo.game; | 2,541,757 |
public List<Document> importDocuments(Path filePath, Delimiters delimiters, boolean hasHeader,
String keyColumnName, String parentColumnName, String childColumnName, String childColumnDelimiter,
List<UnstructuredRepresentativeSetting> repSettings) {
List<String[]> parsedData = par... | List<Document> function(Path filePath, Delimiters delimiters, boolean hasHeader, String keyColumnName, String parentColumnName, String childColumnName, String childColumnDelimiter, List<UnstructuredRepresentativeSetting> repSettings) { List<String[]> parsedData = parser.parse(filePath, delimiters); return builder.build... | /**
* Imports documents from a text delimited file
* @param filePath path to the text delimited file
* @param delimiters delimiters that should be used for parsing the text delimited file
* @param hasHeader indicates if the text delimited file has a header
* @param keyColumnName the column... | Imports documents from a text delimited file | importDocuments | {
"repo_name": "caspianb/eAdapter",
"path": "src/main/java/importers/TextDelimitedImporter.java",
"license": "mit",
"size": 1838
} | [
"java.nio.file.Path",
"java.util.List"
] | import java.nio.file.Path; import java.util.List; | import java.nio.file.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 2,420,709 |
private String getItemUid( final QueryItem item )
{
String uid = item.getItem().getUid();
if ( item.hasProgramStage() )
{
uid = joinWith( ".", item.getProgramStage().getUid(), uid );
}
return uid;
} | String function( final QueryItem item ) { String uid = item.getItem().getUid(); if ( item.hasProgramStage() ) { uid = joinWith( ".", item.getProgramStage().getUid(), uid ); } return uid; } | /**
* Based on the given item this method returns the correct uid based on
* internal rules/requirements.
*
* @param item the current QueryItem
* @return the correct uid based on the item type
*/ | Based on the given item this method returns the correct uid based on internal rules/requirements | getItemUid | {
"repo_name": "dhis2/dhis2-core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/AbstractAnalyticsService.java",
"license": "bsd-3-clause",
"size": 21883
} | [
"org.apache.commons.lang3.StringUtils",
"org.hisp.dhis.common.QueryItem"
] | import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.QueryItem; | import org.apache.commons.lang3.*; import org.hisp.dhis.common.*; | [
"org.apache.commons",
"org.hisp.dhis"
] | org.apache.commons; org.hisp.dhis; | 1,265,246 |
@Override // FsDatasetSpi
public void checkDataDir() throws DiskErrorException {
long totalBlocks = 0, removedBlocks = 0;
List<FsVolumeImpl> failedVols = volumes.checkDirs();
// If there no failed volumes return
if (failedVols == null) {
return;
}
// Otherwise remove blocks f... | @Override void function() throws DiskErrorException { long totalBlocks = 0, removedBlocks = 0; List<FsVolumeImpl> failedVols = volumes.checkDirs(); if (failedVols == null) { return; } long mlsec = Time.now(); synchronized (this) { for (FsVolumeImpl fv : failedVols) { for (String bpid : fv.getBlockPoolList()) { Iterator... | /**
* check if a data directory is healthy
* if some volumes failed - make sure to remove all the blocks that belong
* to these volumes
*
* @throws DiskErrorException
*/ | check if a data directory is healthy if some volumes failed - make sure to remove all the blocks that belong to these volumes | checkDataDir | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java",
"license": "apache-2.0",
"size": 63116
} | [
"java.util.Iterator",
"java.util.List",
"org.apache.hadoop.hdfs.server.datanode.ReplicaInfo",
"org.apache.hadoop.util.DiskChecker",
"org.apache.hadoop.util.Time"
] | import java.util.Iterator; import java.util.List; import org.apache.hadoop.hdfs.server.datanode.ReplicaInfo; import org.apache.hadoop.util.DiskChecker; import org.apache.hadoop.util.Time; | import java.util.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,742,716 |
public void testLogUpload() {
try {
String logtxt = FileUtils.readFile(LOG_FILE);
assertNotStringContains("Log does not contain file before uploading.",
logtxt, ARC_FILE_NAME1); // clean log
archive.upload(new TestRemoteFile(ARC_FILE, false, false, fa... | void function() { try { String logtxt = FileUtils.readFile(LOG_FILE); assertNotStringContains(STR, logtxt, ARC_FILE_NAME1); archive.upload(new TestRemoteFile(ARC_FILE, false, false, false), ARC_FILE.getName()); FileAsserts.assertFileContains(STR, ARC_FILE_NAME1, LOG_FILE); FileAsserts.assertFileContains(STR, STR, LOG_F... | /**
* Test logging of upload command
*/ | Test logging of upload command | testLogUpload | {
"repo_name": "netarchivesuite/netarchivesuite-svngit-migration",
"path": "tests/dk/netarkivet/archive/bitarchive/BitarchiveTesterLog.java",
"license": "lgpl-2.1",
"size": 6166
} | [
"dk.netarkivet.common.distribute.TestRemoteFile",
"dk.netarkivet.common.utils.FileUtils",
"dk.netarkivet.testutils.FileAsserts",
"java.io.IOException"
] | import dk.netarkivet.common.distribute.TestRemoteFile; import dk.netarkivet.common.utils.FileUtils; import dk.netarkivet.testutils.FileAsserts; import java.io.IOException; | import dk.netarkivet.common.distribute.*; import dk.netarkivet.common.utils.*; import dk.netarkivet.testutils.*; import java.io.*; | [
"dk.netarkivet.common",
"dk.netarkivet.testutils",
"java.io"
] | dk.netarkivet.common; dk.netarkivet.testutils; java.io; | 309,331 |
private List<String> convertToPlantNameList(List<Plant> plantList) {
List<String> plants = new ArrayList<String>();
for (Plant plant : plantList) {
plants.add(plant.getName());
}
return plants;
} | List<String> function(List<Plant> plantList) { List<String> plants = new ArrayList<String>(); for (Plant plant : plantList) { plants.add(plant.getName()); } return plants; } | /**
* Convert a list of plants to a list of plant names.
* @param plantList A list of plants.
* @return A list of plant names.
*/ | Convert a list of plants to a list of plant names | convertToPlantNameList | {
"repo_name": "OpenRainGarden/OpenRainGarden",
"path": "app/models/RainGarden.java",
"license": "mit",
"size": 11318
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,614,241 |
protected boolean isUnique(RootAggregateId rootAggregateId, String attributeName, String attributeValue) {
return uniqueValuesStore.isUnique(rootClass, rootAggregateId, attributeName, attributeValue);
} | boolean function(RootAggregateId rootAggregateId, String attributeName, String attributeValue) { return uniqueValuesStore.isUnique(rootClass, rootAggregateId, attributeName, attributeValue); } | /**
* To be used by implementation
*/ | To be used by implementation | isUnique | {
"repo_name": "bilu/yaess",
"path": "core/src/main/java/pl/biltec/yaess/core/adapters/store/RepositoryOverEventStore.java",
"license": "apache-2.0",
"size": 3396
} | [
"pl.biltec.yaess.core.domain.RootAggregateId"
] | import pl.biltec.yaess.core.domain.RootAggregateId; | import pl.biltec.yaess.core.domain.*; | [
"pl.biltec.yaess"
] | pl.biltec.yaess; | 243,760 |
public int getGeneCount() {
return Array.getLength(getArrayInstance());
}
| int function() { return Array.getLength(getArrayInstance()); } | /**
* Returns genotype length. Should be override for best performance.
*
* @return array length
*/ | Returns genotype length. Should be override for best performance | getGeneCount | {
"repo_name": "fivetimesa/frazer",
"path": "src/frazer/genotypes/Genotype.java",
"license": "gpl-3.0",
"size": 3208
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,815,005 |
public static void addIntruderHuman(SensorNetworkContext context,
Random random, int id) {
StealthySensorNetworkWorld world = context.getWorld();
double speed = 10.0;
double speedStdDev = 5;
double waitTime = 5;
double waitTimeStdDev = 10.0;
ProgrammedPathMovement ppm = PPMGenerator.randomWaypoint(
... | static void function(SensorNetworkContext context, Random random, int id) { StealthySensorNetworkWorld world = context.getWorld(); double speed = 10.0; double speedStdDev = 5; double waitTime = 5; double waitTimeStdDev = 10.0; ProgrammedPathMovement ppm = PPMGenerator.randomWaypoint( context.environment.getFullArea(), ... | /**
* Adds an intruder human, moving in a random waypoint movement in the full area
* of the environment until the stop time.
*
* @param context
* @param random
* @param id
*/ | Adds an intruder human, moving in a random waypoint movement in the full area of the environment until the stop time | addIntruderHuman | {
"repo_name": "NetMoc/Yaes-SensorNetwork",
"path": "src/main/java/yaes/sensornetwork/applications/intrudertracking/IntruderHelper.java",
"license": "lgpl-2.1",
"size": 9718
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 874,643 |
EReference getDocumentRoot_BaseElementWithMixedContent(); | EReference getDocumentRoot_BaseElementWithMixedContent(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.DocumentRoot#getBaseElementWithMixedContent <em>Base Element With Mixed Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Base Element Wi... | Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.DocumentRoot#getBaseElementWithMixedContent Base Element With Mixed Content</code>'. | getDocumentRoot_BaseElementWithMixedContent | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,407,802 |
private void checkAttributes(Iterable<ClusterNode> nodes) throws IgniteCheckedException {
ClusterNode locNode = getSpi().getLocalNode();
assert locNode != null;
// Fetch local node attributes once.
String locPreferIpV4 = locNode.attribute("java.net.preferIPv4Stack");
Objec... | void function(Iterable<ClusterNode> nodes) throws IgniteCheckedException { ClusterNode locNode = getSpi().getLocalNode(); assert locNode != null; String locPreferIpV4 = locNode.attribute(STR); Object locMode = locNode.attribute(ATTR_DEPLOYMENT_MODE); int locJvmMajVer = nodeJavaMajorVersion(locNode); boolean locP2pEnabl... | /**
* Checks whether attributes of the local node are consistent with remote nodes.
*
* @param nodes List of remote nodes to check attributes on.
* @throws IgniteCheckedException In case of error.
*/ | Checks whether attributes of the local node are consistent with remote nodes | checkAttributes | {
"repo_name": "mcherkasov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 99736
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,496,814 |
public void setCaseSensitive(boolean b) {
regexpOptions = RegexpUtil.asOptions(b);
} | void function(boolean b) { regexpOptions = RegexpUtil.asOptions(b); } | /**
* Whether to match casesensitevly.
* @since Ant 1.8.2
*/ | Whether to match casesensitevly | setCaseSensitive | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java",
"license": "mit",
"size": 8118
} | [
"org.apache.tools.ant.util.regexp.RegexpUtil"
] | import org.apache.tools.ant.util.regexp.RegexpUtil; | import org.apache.tools.ant.util.regexp.*; | [
"org.apache.tools"
] | org.apache.tools; | 2,388,002 |
Map<String, Certificate> getCertificates(); | Map<String, Certificate> getCertificates(); | /**
* Get certificates.
* @return certificates
*/ | Get certificates | getCertificates | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/implementation/certificates/AzureCertificates.java",
"license": "mit",
"size": 847
} | [
"java.security.cert.Certificate",
"java.util.Map"
] | import java.security.cert.Certificate; import java.util.Map; | import java.security.cert.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 2,501,298 |
public Map<CmsResource, List<CmsRelationType>> getRelationTypes() {
return m_relationTypes;
} | Map<CmsResource, List<CmsRelationType>> function() { return m_relationTypes; } | /**
* Returns the relationTypes.<p>
*
* @return the relationTypes
*/ | Returns the relationTypes | getRelationTypes | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-modules/org/opencms/workplace/commons/CmsResourceLinkRelationList.java",
"license": "lgpl-2.1",
"size": 11701
} | [
"java.util.List",
"java.util.Map",
"org.opencms.file.CmsResource",
"org.opencms.relations.CmsRelationType"
] | import java.util.List; import java.util.Map; import org.opencms.file.CmsResource; import org.opencms.relations.CmsRelationType; | import java.util.*; import org.opencms.file.*; import org.opencms.relations.*; | [
"java.util",
"org.opencms.file",
"org.opencms.relations"
] | java.util; org.opencms.file; org.opencms.relations; | 2,211,290 |
public static String dash(int len) {
char[] dash = new char[len];
Arrays.fill(dash, '-');
dash[0] = dash[len - 1] = '+';
return new String(dash);
} | static String function(int len) { char[] dash = new char[len]; Arrays.fill(dash, '-'); dash[0] = dash[len - 1] = '+'; return new String(dash); } | /**
* Makes a {@code '+---+'} dash line.
*
* @param len Length of the dash line to make.
* @return Dash line.
*/ | Makes a '+---+' dash line | dash | {
"repo_name": "ascherbakoff/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 385578
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,273,527 |
public static ceylon.language.meta.declaration.NestableDeclaration getOrCreateMetamodel(java.lang.Class<?> klass){
synchronized(getLock()){
ceylon.language.meta.declaration.NestableDeclaration result = classToDeclaration.get(klass);
if (result == null) {
// FIXME: is ... | static ceylon.language.meta.declaration.NestableDeclaration function(java.lang.Class<?> klass){ synchronized(getLock()){ ceylon.language.meta.declaration.NestableDeclaration result = classToDeclaration.get(klass); if (result == null) { String typeName = klass.getName(); org.eclipse.ceylon.model.typechecker.model.Module... | /**
* This is also used by generated code in the JVM compiler, for type declaration literals.
* In theory this can only be used for ClassOrInterface or TypeAlias.
*/ | This is also used by generated code in the JVM compiler, for type declaration literals. In theory this can only be used for ClassOrInterface or TypeAlias | getOrCreateMetamodel | {
"repo_name": "ceylon/ceylon",
"path": "language/runtime/org/eclipse/ceylon/compiler/java/runtime/metamodel/Metamodel.java",
"license": "apache-2.0",
"size": 123821
} | [
"org.eclipse.ceylon.model.loader.ModelLoader",
"org.eclipse.ceylon.model.typechecker.model.TypeDeclaration"
] | import org.eclipse.ceylon.model.loader.ModelLoader; import org.eclipse.ceylon.model.typechecker.model.TypeDeclaration; | import org.eclipse.ceylon.model.loader.*; import org.eclipse.ceylon.model.typechecker.model.*; | [
"org.eclipse.ceylon"
] | org.eclipse.ceylon; | 535,697 |
@JsonIgnore
ParallelizationInfo getSenderParallelizationInfo(List<DrillbitEndpoint> receiverFragmentEndpoints); | ParallelizationInfo getSenderParallelizationInfo(List<DrillbitEndpoint> receiverFragmentEndpoints); | /**
* Provide parallelization parameters for sender side of the exchange. Output includes min width,
* max width and affinity to Drillbits.
*
* @param receiverFragmentEndpoints Endpoints assigned to receiver fragment if available, otherwise an empty list.
* @return Sender {@link org.apache.drill.exec.pla... | Provide parallelization parameters for sender side of the exchange. Output includes min width, max width and affinity to Drillbits | getSenderParallelizationInfo | {
"repo_name": "superbstreak/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/Exchange.java",
"license": "apache-2.0",
"size": 4737
} | [
"java.util.List",
"org.apache.drill.exec.planner.fragment.ParallelizationInfo",
"org.apache.drill.exec.proto.CoordinationProtos"
] | import java.util.List; import org.apache.drill.exec.planner.fragment.ParallelizationInfo; import org.apache.drill.exec.proto.CoordinationProtos; | import java.util.*; import org.apache.drill.exec.planner.fragment.*; import org.apache.drill.exec.proto.*; | [
"java.util",
"org.apache.drill"
] | java.util; org.apache.drill; | 2,367,942 |
static ExpressionType determineMappingPhase(String exprString, AnalyticsValueStream... params)
throws SolrException {
boolean unreduced = true;
boolean reduced = true;
for (AnalyticsValueStream param : params) {
unreduced &= param.getExpressionType().isUnreduced();
reduced &= param.getEx... | static ExpressionType determineMappingPhase(String exprString, AnalyticsValueStream... params) throws SolrException { boolean unreduced = true; boolean reduced = true; for (AnalyticsValueStream param : params) { unreduced &= param.getExpressionType().isUnreduced(); reduced &= param.getExpressionType().isReduced(); } if... | /**
* Determine whether the expression is a unreduced mapping expression, a reduced mapping
* expression, or a constant.
*
* @param exprString the string representing the expression, used when creating exceptions
* @param params the parameters
* @return the expression type
* @throws SolrException i... | Determine whether the expression is a unreduced mapping expression, a reduced mapping expression, or a constant | determineMappingPhase | {
"repo_name": "apache/solr",
"path": "solr/modules/analytics/src/java/org/apache/solr/analytics/value/AnalyticsValueStream.java",
"license": "apache-2.0",
"size": 5108
} | [
"org.apache.solr.common.SolrException"
] | import org.apache.solr.common.SolrException; | import org.apache.solr.common.*; | [
"org.apache.solr"
] | org.apache.solr; | 1,751,272 |
default AdvancedFtpEndpointBuilder ftpClientParameters(
Map<String, Object> ftpClientParameters) {
doSetProperty("ftpClientParameters", ftpClientParameters);
return this;
} | default AdvancedFtpEndpointBuilder ftpClientParameters( Map<String, Object> ftpClientParameters) { doSetProperty(STR, ftpClientParameters); return this; } | /**
* Used by FtpComponent to provide additional parameters for the
* FTPClient.
*
* The option is a: <code>java.util.Map<java.lang.String,
* java.lang.Object></code> type.
*
* Group: advanced
*/ | Used by FtpComponent to provide additional parameters for the FTPClient. The option is a: <code>java.util.Map<java.lang.String, java.lang.Object></code> type. Group: advanced | ftpClientParameters | {
"repo_name": "ullgren/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FtpEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 207700
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,126,314 |
protected void addDuplicatePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sequence_duplicate_feature"),
getString("_UI_PropertyDescriptor_d... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.SEQUENCE__DUPLICATE, true, false, false, ItemPropertyDescriptor.BOOLEAN_VALUE... | /**
* This adds a property descriptor for the Duplicate feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Duplicate feature. | addDuplicatePropertyDescriptor | {
"repo_name": "chanakaudaya/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/SequenceItemProvider.java",
"license": "apache-2.0",
"size": 19589
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 1,510,763 |
EList<PublishEventAttribute> getAttributes(); | EList<PublishEventAttribute> getAttributes(); | /**
* Returns the value of the '<em><b>Attributes</b></em>' reference list.
* The list contents are of type {@link org.wso2.developerstudio.eclipse.gmf.esb.PublishEventAttribute}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Attributes</em>' reference list isn't clear,
* there really should ... | Returns the value of the 'Attributes' reference list. The list contents are of type <code>org.wso2.developerstudio.eclipse.gmf.esb.PublishEventAttribute</code>. If the meaning of the 'Attributes' reference list isn't clear, there really should be more of a description here... | getAttributes | {
"repo_name": "nwnpallewela/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb/src/org/wso2/developerstudio/eclipse/gmf/esb/PublishEventCorrelationAttributes.java",
"license": "apache-2.0",
"size": 1993
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 515,703 |
protected void loadInt(int location, int value) {
glUniform1i(location, value);
}
| void function(int location, int value) { glUniform1i(location, value); } | /**
* Load an int
*
* @param location
* Uniform ID
* @param value
* Value
*/ | Load an int | loadInt | {
"repo_name": "Guerra24/Infinity",
"path": "src/main/java/net/guerra24/infinity/client/graphics/shaders/ShaderProgram.java",
"license": "mit",
"size": 8989
} | [
"org.lwjgl.opengl.GL20"
] | import org.lwjgl.opengl.GL20; | import org.lwjgl.opengl.*; | [
"org.lwjgl.opengl"
] | org.lwjgl.opengl; | 887,711 |
void setAttributes(PerunSession sess, Facility facility, List<Attribute> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | void setAttributes(PerunSession sess, Facility facility, List<Attribute> attributes) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException; | /**
* Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification).
*
* @param sess perun session
* @param facility facility to set on
* @param attributes attribute to set
*
* @throws InternalErrorException if ... | Store the attributes associated with the facility. If an attribute is core attribute then the attribute isn't stored (It's skipped without any notification) | setAttributes | {
"repo_name": "jirmauritz/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 193360
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.core.api... | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metacentr... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,296,464 |
private QName generateTypeQName(QName referenceEltQName, XmlSchema parentSchema) {
QName generatedTypeName = new QName(referenceEltQName.getNamespaceURI(),
referenceEltQName.getLocalPart() + getNextTypeSuffix(referenceEltQName.getLocalPart()));
while (parentSchema.getTypeByName(ge... | QName function(QName referenceEltQName, XmlSchema parentSchema) { QName generatedTypeName = new QName(referenceEltQName.getNamespaceURI(), referenceEltQName.getLocalPart() + getNextTypeSuffix(referenceEltQName.getLocalPart())); while (parentSchema.getTypeByName(generatedTypeName) != null) { generatedTypeName = new QNam... | /**
* Generate a unique type Qname using an element name
*
* @param referenceEltQName
* @param parentSchema
*/ | Generate a unique type Qname using an element name | generateTypeQName | {
"repo_name": "gillesgagniard/wso2-wsf-cpp-gg",
"path": "build/codegen/modules/adb-codegen/src/org/apache/axis2/schema/SchemaCompiler.java",
"license": "apache-2.0",
"size": 136654
} | [
"javax.xml.namespace.QName",
"org.apache.ws.commons.schema.XmlSchema"
] | import javax.xml.namespace.QName; import org.apache.ws.commons.schema.XmlSchema; | import javax.xml.namespace.*; import org.apache.ws.commons.schema.*; | [
"javax.xml",
"org.apache.ws"
] | javax.xml; org.apache.ws; | 2,449,820 |
public static <T extends Tree> Enclosing.Method<T> enclosingMethod(Matcher<MethodTree> matcher) {
return new Enclosing.Method<>(matcher);
} | static <T extends Tree> Enclosing.Method<T> function(Matcher<MethodTree> matcher) { return new Enclosing.Method<>(matcher); } | /**
* Matches an AST node which is enclosed by a method node that matches the given matcher.
*/ | Matches an AST node which is enclosed by a method node that matches the given matcher | enclosingMethod | {
"repo_name": "Anish2/error-prone",
"path": "core/src/main/java/com/google/errorprone/matchers/Matchers.java",
"license": "apache-2.0",
"size": 48610
} | [
"com.sun.source.tree.MethodTree",
"com.sun.source.tree.Tree"
] | import com.sun.source.tree.MethodTree; import com.sun.source.tree.Tree; | import com.sun.source.tree.*; | [
"com.sun.source"
] | com.sun.source; | 2,645,979 |
public static SynapseSubscription createGetStatusMessage(MessageContext mc) {
SynapseSubscription subscription = new SynapseSubscription();
subscription.setAddressUrl(mc.getTo().getAddress());
OMElement elem = mc.getEnvelope().getHeader().getFirstChildWithName(IDENTIFIER);
String id ... | static SynapseSubscription function(MessageContext mc) { SynapseSubscription subscription = new SynapseSubscription(); subscription.setAddressUrl(mc.getTo().getAddress()); OMElement elem = mc.getEnvelope().getHeader().getFirstChildWithName(IDENTIFIER); String id = elem.getText(); subscription.setId(id); return subscrip... | /**
* (01) <s12:Envelope
* (02) xmlns:s12="http://www.w3.org/2003/05/soap-envelope"
* (03) xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
* (04) xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
* (05) xmlns:ow="http://www.example.org/oceanwatch" >
* ... | (01) (06) (07) (08) HREF (09) (10) (11) uuid:bd88b3df-5db4-4392-9621-aee9160721f6 (12) (13) (14) HREF (15) (16) (17) HREF (18) (19) (20) uuid:22e8a584-0d18-4228-b2a8-3716fa2097fa (21) (22) (23) (24) (25) (26) | createGetStatusMessage | {
"repo_name": "maheshika/wso2-synapse",
"path": "modules/core/src/main/java/org/apache/synapse/eventing/builders/SubscriptionMessageBuilder.java",
"license": "apache-2.0",
"size": 16749
} | [
"org.apache.axiom.om.OMElement",
"org.apache.axis2.context.MessageContext",
"org.apache.synapse.eventing.SynapseSubscription"
] | import org.apache.axiom.om.OMElement; import org.apache.axis2.context.MessageContext; import org.apache.synapse.eventing.SynapseSubscription; | import org.apache.axiom.om.*; import org.apache.axis2.context.*; import org.apache.synapse.eventing.*; | [
"org.apache.axiom",
"org.apache.axis2",
"org.apache.synapse"
] | org.apache.axiom; org.apache.axis2; org.apache.synapse; | 440,793 |
public static ZonedDateTimeIterator createDateTimeIterator(
String rdata, ZonedDateTime start, ZoneId tzid, boolean strict)
throws ParseException {
return new RecurrenceIteratorWrapper(
RecurrenceIteratorFactory.createRecurrenceIterator(
rdata,... | static ZonedDateTimeIterator function( String rdata, ZonedDateTime start, ZoneId tzid, boolean strict) throws ParseException { return new RecurrenceIteratorWrapper( RecurrenceIteratorFactory.createRecurrenceIterator( rdata, zonedDateTimeToDateValue(start.withZoneSameInstant(tzid)), TimeZoneConverter.toTimeZone(tzid), s... | /**
* given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse
* them into a single date time iterator.
* @param rdata RRULE, EXRULE, RDATE, and EXDATE lines.
* @param start the first occurrence of the series.
* @param tzid the local timezone -- used to interpret start and any dat... | given a block of RRULE, EXRULE, RDATE, and EXDATE content lines, parse them into a single date time iterator | createDateTimeIterator | {
"repo_name": "imario42/CalendarFX",
"path": "CalendarFXRecurrence/src/main/java/com/google/ical/compat/javatime/ZonedDateTimeIteratorFactory.java",
"license": "apache-2.0",
"size": 6106
} | [
"com.google.ical.iter.RecurrenceIteratorFactory",
"java.text.ParseException",
"java.time.ZoneId",
"java.time.ZonedDateTime"
] | import com.google.ical.iter.RecurrenceIteratorFactory; import java.text.ParseException; import java.time.ZoneId; import java.time.ZonedDateTime; | import com.google.ical.iter.*; import java.text.*; import java.time.*; | [
"com.google.ical",
"java.text",
"java.time"
] | com.google.ical; java.text; java.time; | 1,993,406 |
protected boolean updateProgress() {
if (reporter != null &&
(System.currentTimeMillis() - lastProgressReport) > timeOut) {
reporter.progress();
lastProgressReport = System.currentTimeMillis();
return true;
} else {
return false;
}
}
protected Writable recordValue; | boolean function() { if (reporter != null && (System.currentTimeMillis() - lastProgressReport) > timeOut) { reporter.progress(); lastProgressReport = System.currentTimeMillis(); return true; } else { return false; } } protected Writable recordValue; | /**
* Report status to JT so that JT won't kill this task if closing takes too long
* due to too many files to close and the NN is overloaded.
*
* @return true if a new progress update is reported, false otherwise.
*/ | Report status to JT so that JT won't kill this task if closing takes too long due to too many files to close and the NN is overloaded | updateProgress | {
"repo_name": "wangbin83-gmail-com/hive-1.1.0-cdh5.4.8",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java",
"license": "apache-2.0",
"size": 46999
} | [
"org.apache.hadoop.io.Writable"
] | import org.apache.hadoop.io.Writable; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,666,506 |
private boolean canBeAllocatedToAtLeastOneNode(ShardRouting shard, RoutingAllocation allocation) {
for (ObjectCursor<DiscoveryNode> cursor : allocation.nodes().dataNodes().values()) {
RoutingNode node = allocation.routingNodes().node(cursor.value.id());
if (node == null) {
... | boolean function(ShardRouting shard, RoutingAllocation allocation) { for (ObjectCursor<DiscoveryNode> cursor : allocation.nodes().dataNodes().values()) { RoutingNode node = allocation.routingNodes().node(cursor.value.id()); if (node == null) { continue; } Decision decision = allocation.deciders().canAllocate(shard, nod... | /**
* Can the shard be allocated on at least one node based on the allocation deciders.
*/ | Can the shard be allocated on at least one node based on the allocation deciders | canBeAllocatedToAtLeastOneNode | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/gateway/ReplicaShardAllocator.java",
"license": "apache-2.0",
"size": 18028
} | [
"com.carrotsearch.hppc.cursors.ObjectCursor",
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.cluster.routing.RoutingNode",
"org.elasticsearch.cluster.routing.ShardRouting",
"org.elasticsearch.cluster.routing.allocation.RoutingAllocation",
"org.elasticsearch.cluster.routing.allocation.d... | import com.carrotsearch.hppc.cursors.ObjectCursor; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.routing.RoutingNode; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; import org.elasticsearch.cluster.rou... | import com.carrotsearch.hppc.cursors.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; import org.elasticsearch.cluster.routing.allocation.decider.*; | [
"com.carrotsearch.hppc",
"org.elasticsearch.cluster"
] | com.carrotsearch.hppc; org.elasticsearch.cluster; | 584,607 |
protected String getLogFileCanonicalPath() {
try {
return getLogFile().getCanonicalPath();
} catch (IOException handled) {
return getLogFileName();
}
} | String function() { try { return getLogFile().getCanonicalPath(); } catch (IOException handled) { return getLogFileName(); } } | /**
* Gets the fully qualified canonical path of the log file for the process.
*
* @return a String value indicating the canonical path of the log file for the process.
*/ | Gets the fully qualified canonical path of the log file for the process | getLogFileCanonicalPath | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/AbstractLauncher.java",
"license": "apache-2.0",
"size": 33279
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,066,884 |
@SmallTest
@Feature({"Gestures"})
public void testScrollUpdateCoordinates() {
final int deltaX = 16;
final int deltaY = 84;
final long downTime = SystemClock.uptimeMillis();
GestureRecordingMotionEventDelegate delegate = new GestureRecordingMotionEventDelegate();
Con... | @Feature({STR}) void function() { final int deltaX = 16; final int deltaY = 84; final long downTime = SystemClock.uptimeMillis(); GestureRecordingMotionEventDelegate delegate = new GestureRecordingMotionEventDelegate(); ContentViewGestureHandler gestureHandler = new ContentViewGestureHandler( getInstrumentation().getTa... | /**
* Generate a scroll gesture and verify that the resulting scroll motion event has both absolute
* and relative position information.
*/ | Generate a scroll gesture and verify that the resulting scroll motion event has both absolute and relative position information | testScrollUpdateCoordinates | {
"repo_name": "mogoweb/chromium-crosswalk",
"path": "content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java",
"license": "bsd-3-clause",
"size": 84548
} | [
"android.os.Bundle",
"android.os.SystemClock",
"android.view.MotionEvent",
"org.chromium.base.test.util.Feature"
] | import android.os.Bundle; import android.os.SystemClock; import android.view.MotionEvent; import org.chromium.base.test.util.Feature; | import android.os.*; import android.view.*; import org.chromium.base.test.util.*; | [
"android.os",
"android.view",
"org.chromium.base"
] | android.os; android.view; org.chromium.base; | 2,458,287 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.