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 Builder appendPlaceholderReference(String name) {
Preconditions.checkNotNull(name, "Placeholder name could not be null");
parts.add(new PlaceholderReference(name));
placeholders.add(name);
return this;
} | Builder function(String name) { Preconditions.checkNotNull(name, STR); parts.add(new PlaceholderReference(name)); placeholders.add(name); return this; } | /**
* Appends a placeholder reference to the message
*/ | Appends a placeholder reference to the message | appendPlaceholderReference | {
"repo_name": "anomaly/closure-compiler",
"path": "src/com/google/javascript/jscomp/JsMessage.java",
"license": "apache-2.0",
"size": 20636
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,474,600 |
void enterLiteral(@NotNull JavaParser.LiteralContext ctx);
void exitLiteral(@NotNull JavaParser.LiteralContext ctx); | void enterLiteral(@NotNull JavaParser.LiteralContext ctx); void exitLiteral(@NotNull JavaParser.LiteralContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#literal}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#literal</code> | exitLiteral | {
"repo_name": "code4craft/daogen",
"path": "daogen-core/src/main/java/com/dianping/daogen/antlr/JavaListener.java",
"license": "mit",
"size": 38983
} | [
"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,470,342 |
public final void create(LocalRegion region, DiskEntry entry, ValueWrapper value, boolean async) {
if (this != getOplogSet().getChild()) {
getOplogSet().getChild().create(region, entry, value, async);
} else {
DiskId did = entry.getDiskId();
boolean exceptionOccured = false;
byte prev... | final void function(LocalRegion region, DiskEntry entry, ValueWrapper value, boolean async) { if (this != getOplogSet().getChild()) { getOplogSet().getChild().create(region, entry, value, async); } else { DiskId did = entry.getDiskId(); boolean exceptionOccured = false; byte prevUsrBit = did.getUserBits(); int len = di... | /**
* Asif: Modified the code so as to reuse the already created ByteBuffer
* during transition. Creates a key/value pair from a region entry on disk.
* Updates all of the necessary {@linkplain DiskStoreStats statistics} and
* invokes basicCreate
*
* @param entry
* The DiskEntry object fo... | Asif: Modified the code so as to reuse the already created ByteBuffer during transition. Creates a key/value pair from a region entry on disk. Updates all of the necessary DiskStoreStats statistics and invokes basicCreate | create | {
"repo_name": "sshcherbakov/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java",
"license": "apache-2.0",
"size": 294400
} | [
"com.gemstone.gemfire.cache.DiskAccessException",
"com.gemstone.gemfire.internal.cache.DiskEntry",
"com.gemstone.gemfire.internal.i18n.LocalizedStrings",
"java.io.IOException"
] | import com.gemstone.gemfire.cache.DiskAccessException; import com.gemstone.gemfire.internal.cache.DiskEntry; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import java.io.IOException; | import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.i18n.*; import java.io.*; | [
"com.gemstone.gemfire",
"java.io"
] | com.gemstone.gemfire; java.io; | 1,505,530 |
public void draw(Graphics buffer) {
for (int i = 0; i < particles.size(); i++)
particles.get(i).draw(buffer);
} | void function(Graphics buffer) { for (int i = 0; i < particles.size(); i++) particles.get(i).draw(buffer); } | /**
* Calls the draw method for all particles in the list
* @param buffer Buffer to draw to
*/ | Calls the draw method for all particles in the list | draw | {
"repo_name": "quartz55/lpoo_asteroids",
"path": "asteroids/Managers/ParticleManager.java",
"license": "gpl-2.0",
"size": 1578
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,088,034 |
Collection<String> getRepositoryAliases(String repositoryName); | Collection<String> getRepositoryAliases(String repositoryName); | /**
* Gets all aliases known for the specified repository.
* @param repositoryName the repository-ID or -alias. Must not be <code>null</code>.
* @return the known aliases. <code>null</code>, if there is no repository with
* the given {@code repositoryName}. Empty, if the repository is known, but there
* are n... | Gets all aliases known for the specified repository | getRepositoryAliases | {
"repo_name": "cloudstore/cloudstore",
"path": "co.codewizards.cloudstore.core/src/main/java/co/codewizards/cloudstore/core/repo/local/LocalRepoRegistry.java",
"license": "lgpl-3.0",
"size": 3346
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,191,501 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<RouteFilterInner> listByResourceGroup(String resourceGroupName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RouteFilterInner> listByResourceGroup(String resourceGroupName); | /**
* Gets all route filters in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by serv... | Gets all route filters in a resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/RouteFiltersClient.java",
"license": "mit",
"size": 25711
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.RouteFilterInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.RouteFilterInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,306,001 |
@Pure
public Resource eResource() {
return getXBlockExpression().eResource();
} | Resource function() { return getXBlockExpression().eResource(); } | /** Replies the resource to which the XBlockExpression is attached.
*/ | Replies the resource to which the XBlockExpression is attached | eResource | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/BlockExpressionBuilderImpl.java",
"license": "apache-2.0",
"size": 5709
} | [
"org.eclipse.emf.ecore.resource.Resource"
] | import org.eclipse.emf.ecore.resource.Resource; | import org.eclipse.emf.ecore.resource.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,800,958 |
@Test
public void testListIndexedWriteMethod() throws Exception {
final PropertyDescriptor descriptor = propertyUtilsBean.getPropertyDescriptor(bean, "stringList");
assertNotNull("stringList descriptor not found", descriptor);
assumeTrue("JDK does not support index bean properties on jav... | void function() throws Exception { final PropertyDescriptor descriptor = propertyUtilsBean.getPropertyDescriptor(bean, STR); assertNotNull(STR, descriptor); assumeTrue(STR, Jira492IndexedListsSupport.supportsIndexedLists()); assertNotNull(STR, ((IndexedPropertyDescriptor)descriptor).getIndexedWriteMethod()); } | /**
* Test Indexed Write Method for a List
*/ | Test Indexed Write Method for a List | testListIndexedWriteMethod | {
"repo_name": "apache/commons-beanutils",
"path": "src/test/java/org/apache/commons/beanutils2/IndexedPropertyTestCase.java",
"license": "apache-2.0",
"size": 15948
} | [
"java.beans.IndexedPropertyDescriptor",
"java.beans.PropertyDescriptor",
"org.apache.commons.beanutils2.bugs.other.Jira492IndexedListsSupport",
"org.junit.Assert",
"org.junit.Assume"
] | import java.beans.IndexedPropertyDescriptor; import java.beans.PropertyDescriptor; import org.apache.commons.beanutils2.bugs.other.Jira492IndexedListsSupport; import org.junit.Assert; import org.junit.Assume; | import java.beans.*; import org.apache.commons.beanutils2.bugs.other.*; import org.junit.*; | [
"java.beans",
"org.apache.commons",
"org.junit"
] | java.beans; org.apache.commons; org.junit; | 739,314 |
protected void showSession(PortalRenderContext rcontext, boolean html)
{
// get the current user session information
Session s = SessionManager.getCurrentSession();
rcontext.put("sessionSession", s);
ToolSession ts = SessionManager.getCurrentToolSession();
rcontext.put("sessionToolSession", ts);
} | void function(PortalRenderContext rcontext, boolean html) { Session s = SessionManager.getCurrentSession(); rcontext.put(STR, s); ToolSession ts = SessionManager.getCurrentToolSession(); rcontext.put(STR, ts); } | /**
* Output some session information
*
* @param rcontext
* The print writer
* @param html
* If true, output in HTML, else in text.
*/ | Output some session information | showSession | {
"repo_name": "ktakacs/sakai",
"path": "portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java",
"license": "apache-2.0",
"size": 76048
} | [
"org.sakaiproject.portal.api.PortalRenderContext",
"org.sakaiproject.tool.api.Session",
"org.sakaiproject.tool.api.ToolSession",
"org.sakaiproject.tool.cover.SessionManager"
] | import org.sakaiproject.portal.api.PortalRenderContext; import org.sakaiproject.tool.api.Session; import org.sakaiproject.tool.api.ToolSession; import org.sakaiproject.tool.cover.SessionManager; | import org.sakaiproject.portal.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; | [
"org.sakaiproject.portal",
"org.sakaiproject.tool"
] | org.sakaiproject.portal; org.sakaiproject.tool; | 1,166,550 |
public void connector(short connectorType) throws SAXException;
public final short OCCURENCE_ZERO_OR_MORE = 0;
public final short OCCURENCE_ONE_OR_MORE = 1;
public final short OCCURENCE_ZERO_OR_ONE = 2;
public final short OCCURENCE_ONCE = 3; | void function(short connectorType) throws SAXException; public final short OCCURENCE_ZERO_OR_MORE = 0; public final short OCCURENCE_ONE_OR_MORE = 1; public final short OCCURENCE_ZERO_OR_ONE = 2; public final short OCCURENCE_ONCE = 3; | /**
* Connectors in one model group is guaranteed to be the same.
* <p/>
* <p/>
* IOW, you'll never see an event sequence like (a|b,c)
*
* @return {@link #CHOICE} or {@link #SEQUENCE}.
*/ | Connectors in one model group is guaranteed to be the same. IOW, you'll never see an event sequence like (a|b,c) | connector | {
"repo_name": "shelan/jdk9-mirror",
"path": "jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/DTDEventListener.java",
"license": "gpl-2.0",
"size": 13531
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 639,891 |
protected void skipSubPath() throws ParseException, IOException {
for (;;) {
switch (current) {
case -1: case 'm': case 'M': return;
default: break;
}
current = reader.read();
}
} | void function() throws ParseException, IOException { for (;;) { switch (current) { case -1: case 'm': case 'M': return; default: break; } current = reader.read(); } } | /**
* Skips a sub-path.
*/ | Skips a sub-path | skipSubPath | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/parser/PathParser.java",
"license": "apache-2.0",
"size": 20870
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,025,051 |
int deleteByExample(AuthorityExample example); | int deleteByExample(AuthorityExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table g_authority
*
* @mbg.generated Sun Aug 13 20:54:51 CST 2017
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table g_authority | deleteByExample | {
"repo_name": "happyxiaofan/springboot-learning-example",
"path": "src/main/java/com/rhwayfun/springboot/security/datasource/mapper/AuthorityMapper.java",
"license": "epl-1.0",
"size": 3098
} | [
"com.rhwayfun.springboot.security.datasource.model.AuthorityExample"
] | import com.rhwayfun.springboot.security.datasource.model.AuthorityExample; | import com.rhwayfun.springboot.security.datasource.model.*; | [
"com.rhwayfun.springboot"
] | com.rhwayfun.springboot; | 2,752,374 |
Field field = new Field(4);
Bomberman man = new Bomberman("A", field);
Bomberman man1 = new Bomberman("B", field);
Bomberman man2 = new Bomberman("C", field);
new Thread(man).start();
new Thread(man1).start();
new Thread(man2).start();
Cell[][] board = f... | Field field = new Field(4); Bomberman man = new Bomberman("A", field); Bomberman man1 = new Bomberman("B", field); Bomberman man2 = new Bomberman("C", field); new Thread(man).start(); new Thread(man1).start(); new Thread(man2).start(); Cell[][] board = field.getBoard(); int index = 15; while (--index > 0) { for (int i ... | /**
* The method main.
* @param args line parameters.
* @throws InterruptedException exception.
*/ | The method main | main | {
"repo_name": "OleksandrProshak/Alexandr_Proshak",
"path": "Level_Junior/Part_002_Multithreading/7_Control_Tasks_Multithreading/src/main/java/ru/job4j/bomberv1/Runner.java",
"license": "apache-2.0",
"size": 1270
} | [
"ru.job4j.bomberv1.heroes.Bomberman",
"ru.job4j.bomberv1.playground.Cell",
"ru.job4j.bomberv1.playground.Field"
] | import ru.job4j.bomberv1.heroes.Bomberman; import ru.job4j.bomberv1.playground.Cell; import ru.job4j.bomberv1.playground.Field; | import ru.job4j.bomberv1.heroes.*; import ru.job4j.bomberv1.playground.*; | [
"ru.job4j.bomberv1"
] | ru.job4j.bomberv1; | 963,216 |
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
if (this.averageGroundLvl < 0)
{
this.averageGroundLvl = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn);
... | boolean function(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { if (this.averageGroundLvl < 0) { this.averageGroundLvl = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn); if (this.averageGroundLvl < 0) { return true; } this.boundingBox.offset(0, this.averageGroundLvl - this.bo... | /**
* 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": "Im-Jrotica/forge_latest",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureVillagePieces.java",
"license": "lgpl-2.1",
"size": 136617
} | [
"java.util.Random",
"net.minecraft.block.BlockStairs",
"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.BlockStairs; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.world.World; | 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; | 141,071 |
private void processAbstractWidget(AbstractWidget widget, Boolean sidePanel) {
if (widget instanceof Panel) {
processPanel((Panel) widget, sidePanel);
} else if (widget instanceof PanelRelated) {
PanelRelated panelRelated = (PanelRelated) widget;
sidePanel = sidePanel != null && sidePanel ? sidePanel
... | void function(AbstractWidget widget, Boolean sidePanel) { if (widget instanceof Panel) { processPanel((Panel) widget, sidePanel); } else if (widget instanceof PanelRelated) { PanelRelated panelRelated = (PanelRelated) widget; sidePanel = sidePanel != null && sidePanel ? sidePanel : panelRelated.getSidebar(); processPan... | /**
* Check given AbstractWidget and process it according to its type.
*
* @param widget
* AbstractWidget to process
* @param sidePanel
* Boolean to check if widget is sidePanel.
*/ | Check given AbstractWidget and process it according to its type | processAbstractWidget | {
"repo_name": "jph-axelor/axelor-business-suite",
"path": "axelor-studio/src/main/java/com/axelor/studio/service/builder/ReportBuilderService.java",
"license": "agpl-3.0",
"size": 17063
} | [
"com.axelor.meta.schema.views.AbstractWidget",
"com.axelor.meta.schema.views.Panel",
"com.axelor.meta.schema.views.PanelField",
"com.axelor.meta.schema.views.PanelRelated"
] | import com.axelor.meta.schema.views.AbstractWidget; import com.axelor.meta.schema.views.Panel; import com.axelor.meta.schema.views.PanelField; import com.axelor.meta.schema.views.PanelRelated; | import com.axelor.meta.schema.views.*; | [
"com.axelor.meta"
] | com.axelor.meta; | 1,580,770 |
protected Element findNamedType(QName typeName) {
Schema s = getSchema(typeName.getNamespaceURI());
if (s == null) {
return null;
}
Element schemaRoot = s.getElement();
// get all simple and complex types defined at the top-level.
//
... | Element function(QName typeName) { Schema s = getSchema(typeName.getNamespaceURI()); if (s == null) { return null; } Element schemaRoot = s.getElement(); List<Element> types = DomUtils.getChildElementsByName(schemaRoot, WsdlUtils.COMPLEX_TYPE_NAME); types.addAll(DomUtils.getChildElementsByName(schemaRoot, WsdlUtils.SIM... | /**
* Find a named <complexType> or <simpleType> in the types section of the WSDL.
*
* @param typeName Name of the type to find.
* @return null if type not found.
*/ | Find a named <complexType> or <simpleType> in the types section of the WSDL | findNamedType | {
"repo_name": "icholy/geokettle-2.0",
"path": "src/org/pentaho/di/trans/steps/webservices/wsdl/WsdlTypes.java",
"license": "lgpl-2.1",
"size": 8018
} | [
"java.util.List",
"javax.wsdl.extensions.schema.Schema",
"javax.xml.namespace.QName",
"org.w3c.dom.Element"
] | import java.util.List; import javax.wsdl.extensions.schema.Schema; import javax.xml.namespace.QName; import org.w3c.dom.Element; | import java.util.*; import javax.wsdl.extensions.schema.*; import javax.xml.namespace.*; import org.w3c.dom.*; | [
"java.util",
"javax.wsdl",
"javax.xml",
"org.w3c.dom"
] | java.util; javax.wsdl; javax.xml; org.w3c.dom; | 2,182,893 |
public AzureFirewallIpConfiguration withProvisioningState(ProvisioningState provisioningState) {
if (this.innerProperties() == null) {
this.innerProperties = new AzureFirewallIpConfigurationPropertiesFormat();
}
this.innerProperties().withProvisioningState(provisioningState);
... | AzureFirewallIpConfiguration function(ProvisioningState provisioningState) { if (this.innerProperties() == null) { this.innerProperties = new AzureFirewallIpConfigurationPropertiesFormat(); } this.innerProperties().withProvisioningState(provisioningState); return this; } | /**
* Set the provisioningState property: The provisioning state of the resource.
*
* @param provisioningState the provisioningState value to set.
* @return the AzureFirewallIpConfiguration object itself.
*/ | Set the provisioningState property: The provisioning state of the resource | withProvisioningState | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/AzureFirewallIpConfiguration.java",
"license": "mit",
"size": 5979
} | [
"com.azure.resourcemanager.network.fluent.models.AzureFirewallIpConfigurationPropertiesFormat"
] | import com.azure.resourcemanager.network.fluent.models.AzureFirewallIpConfigurationPropertiesFormat; | import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 902,535 |
public PowerHost findHostForVm(Vm vm, Set<? extends Host> excludedHosts) {
double minPower = Double.MAX_VALUE;
PowerHost allocatedHost = null;
for (PowerHost host : this.<PowerHost> getHostList()) {
if (excludedHosts.contains(host)) {
continue;
}
if (host.isSuitableForVm(vm)) {
if (g... | PowerHost function(Vm vm, Set<? extends Host> excludedHosts) { double minPower = Double.MAX_VALUE; PowerHost allocatedHost = null; for (PowerHost host : this.<PowerHost> getHostList()) { if (excludedHosts.contains(host)) { continue; } if (host.isSuitableForVm(vm)) { if (getUtilizationOfCpuMips(host) != 0 && isHostOverU... | /**
* Find host for vm.
*
* @param vm the vm
* @param excludedHosts the excluded hosts
* @return the power host
*/ | Find host for vm | findHostForVm | {
"repo_name": "hieuvt/tccloudsim",
"path": "sources/org/cloudbus/cloudsim/power/PowerVmAllocationPolicyMigrationAbstract.java",
"license": "lgpl-3.0",
"size": 20796
} | [
"java.util.Set",
"org.cloudbus.cloudsim.Host",
"org.cloudbus.cloudsim.Vm"
] | import java.util.Set; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.Vm; | import java.util.*; import org.cloudbus.cloudsim.*; | [
"java.util",
"org.cloudbus.cloudsim"
] | java.util; org.cloudbus.cloudsim; | 121,572 |
private static List<File> findFilesInDirectory(File directory,
Pattern pattern, boolean scanRecursive) {
List<File> files = new ArrayList<File>();
String[] filesInDirectory = directory.list();
if (filesInDirectory == null) {
return files;
}
for (String fileToCheck : filesInDirectory) {
File file =... | static List<File> function(File directory, Pattern pattern, boolean scanRecursive) { List<File> files = new ArrayList<File>(); String[] filesInDirectory = directory.list(); if (filesInDirectory == null) { return files; } for (String fileToCheck : filesInDirectory) { File file = new File(directory, fileToCheck); if (fil... | /**
* This class is the recursive part of the file search.
*
* @param directory
* @param pattern
* @param scanRecursive
* @return
*/ | This class is the recursive part of the file search | findFilesInDirectory | {
"repo_name": "PureSolTechnologies/commons",
"path": "misc/src/main/java/com/puresoltechnologies/commons/misc/io/FileSearch.java",
"license": "apache-2.0",
"size": 3443
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Pattern"
] | import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; | import java.io.*; import java.util.*; import java.util.regex.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 651,932 |
public static int hiddenLayer(
final NetCoreGenerator gen,
final int blocksnum,
final CellType gates,
final CellType netin,
final CellType netout,
final boolean peepholes,
final boolean usegatesbias,
final double gatesbias,
final boolean useinp... | static int function( final NetCoreGenerator gen, final int blocksnum, final CellType gates, final CellType netin, final CellType netout, final boolean peepholes, final boolean usegatesbias, final double gatesbias, final boolean useinputbias, final double inputbias, final boolean useoutputbias, final double outputbias )... | /**
* Creates a hidden layer with n LSTM blocks.
* <br></br>
* @param gen Instance of NetCoreGenerator.
* @param blocksnum Number of LSTM blocks
* @param gates CellType of the gates.
* @param netin CellType of cell-input.
* @param netout CellType of cell-output.
* @param peephole... | Creates a hidden layer with n LSTM blocks. | hiddenLayer | {
"repo_name": "JANNLab/JANNLab",
"path": "src/main/java/de/jannlab/generator/LSTMGenerator.java",
"license": "gpl-3.0",
"size": 13158
} | [
"de.jannlab.core.CellType"
] | import de.jannlab.core.CellType; | import de.jannlab.core.*; | [
"de.jannlab.core"
] | de.jannlab.core; | 822,016 |
private void launchOnNewNotificationEventRunnable(Context context, Bundle extras) {
//2.- Run the runnable set for a new notification received event.
if(NotificationModule.doWhenNotificationRunnable==null) {
//...if null, we try to get the runnable from the saved configuration
... | void function(Context context, Bundle extras) { if(NotificationModule.doWhenNotificationRunnable==null) { String notificationOnNotReceivedThreadToCall = (String) ToolBox.prefs_readPreference(context.getApplicationContext().getApplicationContext(), NotificationModule.FIREBASE_PREF_NAME, NotificationModule.FIREBASE_PREF_... | /**
* Try to launch the configured runnable (if set) from the
* Firebase OnNewNotification received event.
*
* @param extras
*/ | Try to launch the configured runnable (if set) from the Firebase OnNewNotification received event | launchOnNewNotificationEventRunnable | {
"repo_name": "javocsoft/JavocsoftToolboxAS",
"path": "toolbox/src/main/java/es/javocsoft/android/lib/toolbox/firebase/core/FirebaseCustomNotificationReceiver.java",
"license": "gpl-3.0",
"size": 22614
} | [
"android.content.Context",
"android.os.Bundle",
"android.util.Log",
"es.javocsoft.android.lib.toolbox.ToolBox",
"es.javocsoft.android.lib.toolbox.firebase.NotificationModule",
"es.javocsoft.android.lib.toolbox.firebase.core.callback.OnNewNotificationCallback",
"java.lang.reflect.Constructor"
] | import android.content.Context; import android.os.Bundle; import android.util.Log; import es.javocsoft.android.lib.toolbox.ToolBox; import es.javocsoft.android.lib.toolbox.firebase.NotificationModule; import es.javocsoft.android.lib.toolbox.firebase.core.callback.OnNewNotificationCallback; import java.lang.reflect.Cons... | import android.content.*; import android.os.*; import android.util.*; import es.javocsoft.android.lib.toolbox.*; import es.javocsoft.android.lib.toolbox.firebase.*; import es.javocsoft.android.lib.toolbox.firebase.core.callback.*; import java.lang.reflect.*; | [
"android.content",
"android.os",
"android.util",
"es.javocsoft.android",
"java.lang"
] | android.content; android.os; android.util; es.javocsoft.android; java.lang; | 953,625 |
public void setConfiguration(FacebookEndpointConfiguration configuration) {
this.configuration = configuration;
} | void function(FacebookEndpointConfiguration configuration) { this.configuration = configuration; } | /**
* Sets the {@link FacebookEndpointConfiguration} to use
*
* @param configuration the {@link FacebookEndpointConfiguration} to use
*/ | Sets the <code>FacebookEndpointConfiguration</code> to use | setConfiguration | {
"repo_name": "pax95/camel",
"path": "components/camel-facebook/src/main/java/org/apache/camel/component/facebook/FacebookEndpoint.java",
"license": "apache-2.0",
"size": 8495
} | [
"org.apache.camel.component.facebook.config.FacebookEndpointConfiguration"
] | import org.apache.camel.component.facebook.config.FacebookEndpointConfiguration; | import org.apache.camel.component.facebook.config.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,021,196 |
CiPaint createReferencePointPaint(); | CiPaint createReferencePointPaint(); | /**
* Creates a paint for drawing reference point.
*
* @return the paint object created
*/ | Creates a paint for drawing reference point | createReferencePointPaint | {
"repo_name": "mocircle/cidrawing",
"path": "cidrawinglib/src/main/java/com/mocircle/cidrawing/PaintBuilder.java",
"license": "apache-2.0",
"size": 1992
} | [
"com.mocircle.cidrawing.core.CiPaint"
] | import com.mocircle.cidrawing.core.CiPaint; | import com.mocircle.cidrawing.core.*; | [
"com.mocircle.cidrawing"
] | com.mocircle.cidrawing; | 1,165,601 |
private static String capitalFirst(@Nullable String str) {
return str == null ? null :
str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1);
} | static String function(@Nullable String str) { return str == null ? null : str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1); } | /**
* Capitalizes the first character of the given string.
*
* @param str String.
* @return String with capitalized first character.
*/ | Capitalizes the first character of the given string | capitalFirst | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 298812
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,316,365 |
protected void set(String name, String value, String namespaceUri) {
Element currentElement = element.element(name);
if (value == null) {
if (element != null) {
element.remove(currentElement);
}
}
if (currentElement == null) {
if (namespaceUri == null) {
currentElement = element.addElem... | void function(String name, String value, String namespaceUri) { Element currentElement = element.element(name); if (value == null) { if (element != null) { element.remove(currentElement); } } if (currentElement == null) { if (namespaceUri == null) { currentElement = element.addElement(name); } else { currentElement = e... | /**
* <p>Sets the value of a given XMPP element. If the element does not exist then a new element
* with the given name will be created.</p>
* <p>The value can be null. If the value is null then the element will be removed from the XMPP object.</p>
*
* @param name Name of the element to be added
* @para... | Sets the value of a given XMPP element. If the element does not exist then a new element with the given name will be created. The value can be null. If the value is null then the element will be removed from the XMPP object | set | {
"repo_name": "voxeolabs/moho",
"path": "moho-remote/src/main/java/com/voxeo/rayo/client/xmpp/stanza/AbstractXmppObject.java",
"license": "apache-2.0",
"size": 13338
} | [
"org.dom4j.Element",
"org.dom4j.Namespace",
"org.dom4j.QName"
] | import org.dom4j.Element; import org.dom4j.Namespace; import org.dom4j.QName; | import org.dom4j.*; | [
"org.dom4j"
] | org.dom4j; | 2,313,749 |
private void scanLibs(List<T> factories, String libDir) {
LOG.info("Loading core jars from {}", libDir);
List<File> files = new ArrayList<>();
try (DirectoryStream<Path> stream =
Files.newDirectoryStream(Paths.get(libDir), mExtensionPattern)) {
for (Path entry : stream) {
if (entry.t... | void function(List<T> factories, String libDir) { LOG.info(STR, libDir); List<File> files = new ArrayList<>(); try (DirectoryStream<Path> stream = Files.newDirectoryStream(Paths.get(libDir), mExtensionPattern)) { for (Path entry : stream) { if (entry.toFile().isFile()) { files.add(entry.toFile()); } } } catch (IOExcept... | /**
* Finds all factory from the lib directory.
*
* @param factories list of factories to add to
*/ | Finds all factory from the lib directory | scanLibs | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/main/java/alluxio/extensions/ExtensionFactoryRegistry.java",
"license": "apache-2.0",
"size": 10065
} | [
"java.io.File",
"java.io.IOException",
"java.nio.file.DirectoryStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.nio.file.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,900,594 |
public void valueChanged(ListSelectionEvent e)
{
//if (e.getValueIsAdjusting()) return;
ListSelectionModel lsm = (ListSelectionModel) e.getSource();
List<Integer> indexes = new ArrayList<Integer>();
if (!lsm.isSelectionEmpty()) {
int minIndex = lsm.getMinSelectionIndex();
int maxIndex = lsm.g... | void function(ListSelectionEvent e) { ListSelectionModel lsm = (ListSelectionModel) e.getSource(); List<Integer> indexes = new ArrayList<Integer>(); if (!lsm.isSelectionEmpty()) { int minIndex = lsm.getMinSelectionIndex(); int maxIndex = lsm.getMaxSelectionIndex(); for (int i = minIndex; i <= maxIndex; i++) { if (lsm.i... | /**
* Listens to selection in table. Selects the ROIs in the display.
* @see ListSelectionListener#valueChanged(ListSelectionEvent)
*/ | Listens to selection in table. Selects the ROIs in the display | valueChanged | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/ServerROITable.java",
"license": "gpl-2.0",
"size": 13665
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"javax.swing.ListSelectionModel",
"javax.swing.event.ListSelectionEvent",
"org.openmicroscopy.shoola.util.roi.figures.ROIFigure",
"org.openmicroscopy.shoola.util.roi.model.ROIShape",
"org.openmicro... | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import org.openmicroscopy.shoola.util.roi.figures.ROIFigure; import org.openmicroscopy.shoola.util.roi.model.R... | import java.util.*; import javax.swing.*; import javax.swing.event.*; import org.openmicroscopy.shoola.util.roi.figures.*; import org.openmicroscopy.shoola.util.roi.model.*; import org.openmicroscopy.shoola.util.roi.model.util.*; | [
"java.util",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.util; javax.swing; org.openmicroscopy.shoola; | 2,303,403 |
EClass getConditionalExpression(); | EClass getConditionalExpression(); | /**
* Returns the meta object for class '{@link org.yakindu.base.expressions.expressions.ConditionalExpression <em>Conditional Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Conditional Expression</em>'.
* @see org.yakindu.base.expressions.express... | Returns the meta object for class '<code>org.yakindu.base.expressions.expressions.ConditionalExpression Conditional Expression</code>'. | getConditionalExpression | {
"repo_name": "Yakindu/statecharts",
"path": "plugins/org.yakindu.base.expressions/emf-gen/org/yakindu/base/expressions/expressions/ExpressionsPackage.java",
"license": "epl-1.0",
"size": 108238
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,930,841 |
protected void addExcludedPathsPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_ProjectFactory_excludedPaths_feature"),
getString("_UI_PropertyDes... | void function(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), ResourcesPackage.Literals.PROJECT_FACTORY__EXCLUDED_PATHS, true, false, false, ItemPropertyDescript... | /**
* This adds a property descriptor for the Excluded Paths feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Excluded Paths feature. | addExcludedPathsPropertyDescriptor | {
"repo_name": "peterkir/org.eclipse.oomph",
"path": "plugins/org.eclipse.oomph.resources.edit/src/org/eclipse/oomph/resources/provider/ProjectFactoryItemProvider.java",
"license": "epl-1.0",
"size": 4175
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.eclipse.oomph.resources.ResourcesPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.oomph.resources.ResourcesPackage; | import org.eclipse.emf.edit.provider.*; import org.eclipse.oomph.resources.*; | [
"org.eclipse.emf",
"org.eclipse.oomph"
] | org.eclipse.emf; org.eclipse.oomph; | 1,714,852 |
public void setSinogramParams(Grid2D sino, double focalLength, double maxRot)
{
this.focalLength = focalLength;
this.numProjs = sino.getHeight();
this.detectorPixels = sino.getWidth();
this.detectorSpacing = sino.getSpacing()[0];
this.detectorLength = detectorSpacing*detectorPixels;
double halfFan... | void function(Grid2D sino, double focalLength, double maxRot) { this.focalLength = focalLength; this.numProjs = sino.getHeight(); this.detectorPixels = sino.getWidth(); this.detectorSpacing = sino.getSpacing()[0]; this.detectorLength = detectorSpacing*detectorPixels; double halfFanAngle = 0; System.out.println(STR + ha... | /**
* Initialize all relevant parameters for the reconstruction
* @param sino the sinogram
* @param focalLength source to detector distance
* @param maxRot maximum rotation angle in [rad] at which the sinogram was acquired
*/ | Initialize all relevant parameters for the reconstruction | setSinogramParams | {
"repo_name": "bergerma/CONRAD",
"path": "src/edu/stanford/rsl/tutorial/dmip/DMIP_FanBeamBackProjector2D.java",
"license": "gpl-3.0",
"size": 10151
} | [
"edu.stanford.rsl.conrad.data.numeric.Grid2D"
] | import edu.stanford.rsl.conrad.data.numeric.Grid2D; | import edu.stanford.rsl.conrad.data.numeric.*; | [
"edu.stanford.rsl"
] | edu.stanford.rsl; | 2,531,111 |
EClass getNotes(); | EClass getNotes(); | /**
* Returns the meta object for class '{@link io.opensemantics.semiotics.model.assessment.Notes <em>Notes</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Notes</em>'.
* @see io.opensemantics.semiotics.model.assessment.Notes
* @generated
*/ | Returns the meta object for class '<code>io.opensemantics.semiotics.model.assessment.Notes Notes</code>'. | getNotes | {
"repo_name": "CoastalHacking/semiotics-main",
"path": "bundles/io.opensemantics.semiotics.model.assessment/src-gen/io/opensemantics/semiotics/model/assessment/AssessmentPackage.java",
"license": "apache-2.0",
"size": 151116
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,795,315 |
private void validatorClassMarker(PsiElement psiElement, Collection<LineMarkerInfo> results) {
PsiElement phpClassContext = psiElement.getContext();
if(!(phpClassContext instanceof PhpClass) || !PhpElementsUtil.isInstanceOf((PhpClass) phpClassContext, "\\Symfony\\Component\\Validator\\Constraint")) ... | void function(PsiElement psiElement, Collection<LineMarkerInfo> results) { PsiElement phpClassContext = psiElement.getContext(); if(!(phpClassContext instanceof PhpClass) !PhpElementsUtil.isInstanceOf((PhpClass) phpClassContext, STR)) { return; } Collection<PhpClass> phpClasses = new ArrayList<>(); String className = (... | /**
* Constraints in same namespace and validateBy service name
*/ | Constraints in same namespace and validateBy service name | validatorClassMarker | {
"repo_name": "gencer/idea-php-symfony2-plugin",
"path": "src/fr/adrienbrault/idea/symfony2plugin/config/ServiceLineMarkerProvider.java",
"license": "mit",
"size": 10009
} | [
"com.intellij.codeInsight.daemon.LineMarkerInfo",
"com.intellij.codeInsight.navigation.NavigationGutterIconBuilder",
"com.intellij.psi.PsiElement",
"com.jetbrains.php.lang.psi.elements.PhpClass",
"fr.adrienbrault.idea.symfony2plugin.Symfony2Icons",
"fr.adrienbrault.idea.symfony2plugin.util.PhpElementsUtil... | import com.intellij.codeInsight.daemon.LineMarkerInfo; import com.intellij.codeInsight.navigation.NavigationGutterIconBuilder; import com.intellij.psi.PsiElement; import com.jetbrains.php.lang.psi.elements.PhpClass; import fr.adrienbrault.idea.symfony2plugin.Symfony2Icons; import fr.adrienbrault.idea.symfony2plugin.uti... | import com.intellij.*; import com.intellij.psi.*; import com.jetbrains.php.lang.psi.elements.*; import fr.adrienbrault.idea.symfony2plugin.*; import fr.adrienbrault.idea.symfony2plugin.util.*; import java.util.*; | [
"com.intellij",
"com.intellij.psi",
"com.jetbrains.php",
"fr.adrienbrault.idea",
"java.util"
] | com.intellij; com.intellij.psi; com.jetbrains.php; fr.adrienbrault.idea; java.util; | 1,681,778 |
private Node parseRecordType(JsDocToken token) {
Node recordType = newNode(Token.LC);
Node fieldTypeList = parseFieldTypeList(token);
if (fieldTypeList == null) {
return reportGenericTypeSyntaxWarning();
}
skipEOLs();
if (!match(JsDocToken.RC)) {
return reportTypeSyntaxWarning("m... | Node function(JsDocToken token) { Node recordType = newNode(Token.LC); Node fieldTypeList = parseFieldTypeList(token); if (fieldTypeList == null) { return reportGenericTypeSyntaxWarning(); } skipEOLs(); if (!match(JsDocToken.RC)) { return reportTypeSyntaxWarning(STR); } next(); recordType.addChildToBack(fieldTypeList);... | /**
* RecordType := '{' FieldTypeList '}'
*/ | RecordType := '{' FieldTypeList '}' | parseRecordType | {
"repo_name": "JonathanWalsh/Granule-Closure-Compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 73655
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,274,219 |
private static <T> void assertListsEqualInOrder(
String message, String expectedLabel, List<T> expected, String actualLabel, List<T> actual) {
int i = 0;
for (; i < expected.size() && i < actual.size(); ++i) {
if (!Objects.equals(expected.get(i), actual.get(i))) {
Assert.fail(String.format... | static <T> void function( String message, String expectedLabel, List<T> expected, String actualLabel, List<T> actual) { int i = 0; for (; i < expected.size() && i < actual.size(); ++i) { if (!Objects.equals(expected.get(i), actual.get(i))) { Assert.fail(String.format( STR + STR, message, expectedLabel, actualLabel, i, ... | /**
* Compares two lists elementwise and throws a detailed assertion failure optimized for
* human reading in case they are unequal.
*/ | Compares two lists elementwise and throws a detailed assertion failure optimized for human reading in case they are unequal | assertListsEqualInOrder | {
"repo_name": "shakamunyi/beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/testing/SourceTestUtils.java",
"license": "apache-2.0",
"size": 32668
} | [
"java.util.List",
"java.util.Objects",
"org.junit.Assert"
] | import java.util.List; import java.util.Objects; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,839,876 |
private void offer(Node<K, V> node) {
node.setState(State.LINKING);
node.setNext(tail);
for (; ;) {
Node<K, V> prev = tail.getPrev();
node.setPrev(prev);
if (prev.casNext(tail, node)) {
Node<K, V> next = tail;
for (; ;) {
... | void function(Node<K, V> node) { node.setState(State.LINKING); node.setNext(tail); for (; ;) { Node<K, V> prev = tail.getPrev(); node.setPrev(prev); if (prev.casNext(tail, node)) { Node<K, V> next = tail; for (; ;) { if (next.casPrev(prev, node)) { node.setState(State.LINKED); return; } next = next.getPrev(); } } } } | /**
* Inserts the specified node on to the tail of the list.
*
* @param node An unlinked node to append to the tail of the list.
*/ | Inserts the specified node on to the tail of the list | offer | {
"repo_name": "unkascrack/compass-fork",
"path": "compass-core/src/main/java/org/compass/core/util/concurrent/ConcurrentLinkedHashMap.java",
"license": "apache-2.0",
"size": 25189
} | [
"org.compass.core.util.concurrent.ConcurrentLinkedHashMap"
] | import org.compass.core.util.concurrent.ConcurrentLinkedHashMap; | import org.compass.core.util.concurrent.*; | [
"org.compass.core"
] | org.compass.core; | 2,118,115 |
public void exitSign(SQLParser.SignContext ctx) { } | public void exitSign(SQLParser.SignContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterSign | {
"repo_name": "HEIG-GAPS/slasher",
"path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java",
"license": "mit",
"size": 73849
} | [
"ch.gaps.slasher.corrector.SQLParser"
] | import ch.gaps.slasher.corrector.SQLParser; | import ch.gaps.slasher.corrector.*; | [
"ch.gaps.slasher"
] | ch.gaps.slasher; | 761,167 |
@Test
public void testPaboUploadProvidedPaboFile() throws Exception{
List<PaboData> paboDataList = PaboParser.parsePaboUpload(shortenedProvidedPaboFile);
int validRows = 5; // The first 5 rows
int remainingEmptyRows = 6; // Last 6 rows are empty like in the example file
PaboDat... | void function() throws Exception{ List<PaboData> paboDataList = PaboParser.parsePaboUpload(shortenedProvidedPaboFile); int validRows = 5; int remainingEmptyRows = 6; PaboData expectedPaboData123450 = new PaboData(); expectedPaboData123450.setAttempt(2); expectedPaboData123450.setExamName(STR); expectedPaboData123450.se... | /**
* Tests if the contents of rows with data gets parsed with the shortened
* provided pabo csv file.
* @throws Exception If there is an IOException while parsing this file, not
* expected.
*/ | Tests if the contents of rows with data gets parsed with the shortened provided pabo csv file | testPaboUploadProvidedPaboFile | {
"repo_name": "stefanoberdoerfer/exmatrikulator",
"path": "src/test/java/de/unibremen/opensores/util/csv/PaboParserTest.java",
"license": "agpl-3.0",
"size": 16062
} | [
"de.unibremen.opensores.model.PaboData",
"java.util.List",
"org.junit.Assert"
] | import de.unibremen.opensores.model.PaboData; import java.util.List; import org.junit.Assert; | import de.unibremen.opensores.model.*; import java.util.*; import org.junit.*; | [
"de.unibremen.opensores",
"java.util",
"org.junit"
] | de.unibremen.opensores; java.util; org.junit; | 596,815 |
public List<Shape> getShapes() {
return this.shapes;
} | List<Shape> function() { return this.shapes; } | /**
* shape_id Optional The shape_id field contains an ID that defines a shape for the trip. This
* value is referenced from the shapes.txt file. The shapes.txt file allows you to define how a
* line should be drawn on the map to represent a trip.
*
* @return shares related to the current trip.... | shape_id Optional The shape_id field contains an ID that defines a shape for the trip. This value is referenced from the shapes.txt file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip | getShapes | {
"repo_name": "trein/gtfs-java",
"path": "gtfs-mongo/src/main/java/com/trein/gtfs/mongo/entity/Trip.java",
"license": "mit",
"size": 6566
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 222,629 |
private void handleLayoutAnimation() throws IllegalStateException {
final List<Animator> animators = new ArrayList<Animator>();
// b/8422632 - Without this dummy first animator, startDelays of subsequent animators won't
// be honored correctly; all animators will block regardless of startDe... | void function() throws IllegalStateException { final List<Animator> animators = new ArrayList<Animator>(); final ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f); anim.setDuration(0); animators.add(anim); addOutAnimatorsForStaleViews(animators, mAnimationOutMode); final int animationInStartDelay = animators.size() > ... | /**
* Performs layout animation of child views.
* @throws IllegalStateException Exception is thrown of currently set animation mode is
* not recognized.
*/ | Performs layout animation of child views | handleLayoutAnimation | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/DeskClock/src/com/android/deskclock/widget/sgv/StaggeredGridView.java",
"license": "gpl-3.0",
"size": 168058
} | [
"android.animation.Animator",
"android.animation.ValueAnimator",
"java.util.ArrayList",
"java.util.List"
] | import android.animation.Animator; import android.animation.ValueAnimator; import java.util.ArrayList; import java.util.List; | import android.animation.*; import java.util.*; | [
"android.animation",
"java.util"
] | android.animation; java.util; | 2,178,864 |
public static ImageDescriptor getImageDescriptor(String path)
{
return imageDescriptorFromPlugin(PLUGIN_ID, path);
}
| static ImageDescriptor function(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } | /**
* Creates and returns a new image descriptor for an image file in this plug-in.
* @param path the relative path of the image file, relative to the root of the plug-in; the path must be legal
* @return an image descriptor, or null if no image could be found
*/ | Creates and returns a new image descriptor for an image file in this plug-in | getImageDescriptor | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/android.codeutils/src/com/motorola/studio/android/codeutils/CodeUtilsActivator.java",
"license": "gpl-2.0",
"size": 2767
} | [
"org.eclipse.jface.resource.ImageDescriptor"
] | import org.eclipse.jface.resource.ImageDescriptor; | import org.eclipse.jface.resource.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,144,713 |
protected void init() throws IOException, ReplicationException {
for (String id : this.replicationPeers.getConnectedPeers()) {
addSource(id);
}
List<String> currentReplicators = this.replicationQueues.getListOfReplicators();
if (currentReplicators == null || currentReplicators.size() == 0) {
... | void function() throws IOException, ReplicationException { for (String id : this.replicationPeers.getConnectedPeers()) { addSource(id); } List<String> currentReplicators = this.replicationQueues.getListOfReplicators(); if (currentReplicators == null currentReplicators.size() == 0) { return; } List<String> otherRegionSe... | /**
* Adds a normal source per registered peer cluster and tries to process all
* old region server hlog queues
*/ | Adds a normal source per registered peer cluster and tries to process all old region server hlog queues | init | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java",
"license": "apache-2.0",
"size": 20382
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.replication.ReplicationException"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.replication.ReplicationException; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.replication.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,137,498 |
void createSdpFile(String fileName) throws LibavException, FileNotFoundException; | void createSdpFile(String fileName) throws LibavException, FileNotFoundException; | /**
* Generate the SDP and write it to the file. DO NOT call this method before
* the writeHeader is called.
*
* @param fileName a file name
* @throws LibavException if an error occurs while creating the SDP
* @throws FileNotFoundException if the given file name does not represent
* ... | Generate the SDP and write it to the file. DO NOT call this method before the writeHeader is called | createSdpFile | {
"repo_name": "operutka/jlibav",
"path": "jlibav/src/main/java/org/libav/IMediaWriter.java",
"license": "lgpl-3.0",
"size": 5147
} | [
"java.io.FileNotFoundException"
] | import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 2,005,990 |
public static void setUserAttributes(Map<String, Object> userAttributes) {
if (userAttributes == null || userAttributes.isEmpty()) {
Log.e("setUserAttributes - Invalid userAttributes parameter provided (null or empty).");
return;
}
setUserAttributes(null, userAttributes);
} | static void function(Map<String, Object> userAttributes) { if (userAttributes == null userAttributes.isEmpty()) { Log.e(STR); return; } setUserAttributes(null, userAttributes); } | /**
* Adds or modifies user attributes.
*/ | Adds or modifies user attributes | setUserAttributes | {
"repo_name": "Leanplum/Leanplum-Android-SDK",
"path": "AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java",
"license": "apache-2.0",
"size": 82101
} | [
"com.leanplum.internal.Log",
"java.util.Map"
] | import com.leanplum.internal.Log; import java.util.Map; | import com.leanplum.internal.*; import java.util.*; | [
"com.leanplum.internal",
"java.util"
] | com.leanplum.internal; java.util; | 669,143 |
@Override
public RecoverDatabaseOperationCreateResponse create(String sourceServerName, RecoverDatabaseOperationCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException {
// Validate
if (sourceServerName == null) {
... | RecoverDatabaseOperationCreateResponse function(String sourceServerName, RecoverDatabaseOperationCreateParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException { if (sourceServerName == null) { throw new NullPointerException(STR); } if (parameters == ... | /**
* Issues a recovery request for an Azure SQL Database.
*
* @param sourceServerName Required. The name of the Azure SQL Database
* Server on which the database was hosted.
* @param parameters Required. Additional parameters for the Create Recover
* Database Operation request.
* @throws Pa... | Issues a recovery request for an Azure SQL Database | create | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-sql/src/main/java/com/microsoft/windowsazure/management/sql/RecoverDatabaseOperationsImpl.java",
"license": "apache-2.0",
"size": 15429
} | [
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.sql.models.RecoverDatabaseOperation",
"com.microsoft.windowsazure.management.sql.models.RecoverDatabaseOperationCreateParameters",
"com.microsoft.windowsazure.m... | import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.sql.models.RecoverDatabaseOperation; import com.microsoft.windowsazure.management.sql.models.RecoverDatabaseOperationCreateParameters; import com.microsoft.... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.sql.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; import org.w3c.dom.*; imp... | [
"com.microsoft.windowsazure",
"java.io",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 928,718 |
@Override
public Adapter createDivideAdapter() {
if (divideItemProvider == null) {
divideItemProvider = new DivideItemProvider(this);
}
return divideItemProvider;
}
protected FloorItemProvider floorItemProvider; | Adapter function() { if (divideItemProvider == null) { divideItemProvider = new DivideItemProvider(this); } return divideItemProvider; } protected FloorItemProvider floorItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.datamapper.Divide}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.datamapper.Divide</code>. | createDivideAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.visualdatamapper.edit/src/org/wso2/developerstudio/datamapper/provider/DataMapperItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 41714
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,428,896 |
@Transactional(propagation = Propagation.REQUIRED)
private void removeUserRoleForEntity(final String uid, final Long target) {
// remove from childs
List<Category> categories = categoryDao.getAllCategoryOfEntity(target);
for (Category c : categories) {
List<Topic> to... | @Transactional(propagation = Propagation.REQUIRED) void function(final String uid, final Long target) { List<Category> categories = categoryDao.getAllCategoryOfEntity(target); for (Category c : categories) { List<Topic> topics = topicDao.getTopicListByCategory(c.getCategoryId()); for (Topic t : topics) { if (LOG.isDebu... | /**
* Remove roles from the Entity and on all categories and topics of the entity.
* @param uid
* @param target
*/ | Remove roles from the Entity and on all categories and topics of the entity | removeUserRoleForEntity | {
"repo_name": "GIP-RECIA/esup-news",
"path": "src/org/esco/portlets/news/services/UserManagerImpl.java",
"license": "gpl-3.0",
"size": 39276
} | [
"java.util.List",
"org.springframework.transaction.annotation.Propagation",
"org.springframework.transaction.annotation.Transactional",
"org.uhp.portlets.news.NewsConstants",
"org.uhp.portlets.news.domain.Category",
"org.uhp.portlets.news.domain.Topic"
] | import java.util.List; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.uhp.portlets.news.NewsConstants; import org.uhp.portlets.news.domain.Category; import org.uhp.portlets.news.domain.Topic; | import java.util.*; import org.springframework.transaction.annotation.*; import org.uhp.portlets.news.*; import org.uhp.portlets.news.domain.*; | [
"java.util",
"org.springframework.transaction",
"org.uhp.portlets"
] | java.util; org.springframework.transaction; org.uhp.portlets; | 1,328,023 |
@Test
public void listValues() throws Exception {
final ScheduleObject so = new ScheduleObject(d1, 0, "sch0", new DateRange(Date.MINIMUM_DATE, Date.MAXIMUM_DATE),
null, new SequenceOf<>(), new Real(8), new SequenceOf<>(), 12, false);
// Add a few items to the list.
final... | void function() throws Exception { final ScheduleObject so = new ScheduleObject(d1, 0, "sch0", new DateRange(Date.MINIMUM_DATE, Date.MAXIMUM_DATE), null, new SequenceOf<>(), new Real(8), new SequenceOf<>(), 12, false); final ObjectIdentifier oid = new ObjectIdentifier(ObjectType.analogInput, 0); final DeviceObjectPrope... | /**
* Ensures that schedule.listOfObjectPropertyReferences can be modified with WriteProperty
*/ | Ensures that schedule.listOfObjectPropertyReferences can be modified with WriteProperty | listValues | {
"repo_name": "infiniteautomation/BACnet4J",
"path": "src/test/java/com/serotonin/bacnet4j/obj/ScheduleObjectTest.java",
"license": "gpl-3.0",
"size": 18806
} | [
"com.serotonin.bacnet4j.service.confirmed.AddListElementRequest",
"com.serotonin.bacnet4j.service.confirmed.RemoveListElementRequest",
"com.serotonin.bacnet4j.type.Encodable",
"com.serotonin.bacnet4j.type.constructed.DateRange",
"com.serotonin.bacnet4j.type.constructed.Destination",
"com.serotonin.bacnet4... | import com.serotonin.bacnet4j.service.confirmed.AddListElementRequest; import com.serotonin.bacnet4j.service.confirmed.RemoveListElementRequest; import com.serotonin.bacnet4j.type.Encodable; import com.serotonin.bacnet4j.type.constructed.DateRange; import com.serotonin.bacnet4j.type.constructed.Destination; import com.... | import com.serotonin.bacnet4j.service.confirmed.*; import com.serotonin.bacnet4j.type.*; import com.serotonin.bacnet4j.type.constructed.*; import com.serotonin.bacnet4j.type.enumerated.*; import com.serotonin.bacnet4j.type.primitive.*; import com.serotonin.bacnet4j.util.*; import org.junit.*; | [
"com.serotonin.bacnet4j",
"org.junit"
] | com.serotonin.bacnet4j; org.junit; | 1,894,329 |
public String selectGame(Client client, HashMap<String, String> param)
{
String actionResult = null;
String gameName = param.get("gameName");
ServerController controller = ServerController.getInstance();
// search the hall of the game
GameHall hall = controller.getRealm().searchHall(gameName);
if(... | String function(Client client, HashMap<String, String> param) { String actionResult = null; String gameName = param.get(STR); ServerController controller = ServerController.getInstance(); GameHall hall = controller.getRealm().searchHall(gameName); if(hall == null) actionResult = Action.ERROR + "?" + STR + STR; client.g... | /**
* Sets the game of the client as the selected game.
* (action command: SELECT_GAME)
*
* @param client source Client of the action command
* @param param parameter list of the action
* @return action result as a string
*/ | Sets the game of the client as the selected game. (action command: SELECT_GAME) | selectGame | {
"repo_name": "onursumer/game-server",
"path": "src/main/java/server/action/RealmAction.java",
"license": "lgpl-3.0",
"size": 5337
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,231,098 |
@Override
protected TestEnvironment createTestEnvironment(TestParameters tParam,
PrintWriter log) throws Exception {
XInterface oObj = null;
// create testobject here
SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF());
... | TestEnvironment function(TestParameters tParam, PrintWriter log) throws Exception { XInterface oObj = null; SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF()); xTextDoc = SOF.createTextDoc(null); XTextCursor xCursor = xTextDoc.getText().createTextCursor(); try { XMultiServiceFactory xMultiServiceFactory =... | /**
* creating a TestEnvironment for the interfaces to be tested
*
* @param tParam class which contains additional test parameters
* @param log class to log the test state and result
*
* @return Status class
*
* @see TestParameters
* @see PrintWriter
... | creating a TestEnvironment for the interfaces to be tested | createTestEnvironment | {
"repo_name": "sbbic/core",
"path": "qadevOOo/tests/java/mod/_sw/SwXTextEmbeddedObject.java",
"license": "gpl-3.0",
"size": 5748
} | [
"com.sun.star.beans.XPropertySet",
"com.sun.star.container.XIndexAccess",
"com.sun.star.container.XNameAccess",
"com.sun.star.lang.XMultiServiceFactory",
"com.sun.star.text.XText",
"com.sun.star.text.XTextContent",
"com.sun.star.text.XTextCursor",
"com.sun.star.text.XTextEmbeddedObjectsSupplier",
"c... | import com.sun.star.beans.XPropertySet; import com.sun.star.container.XIndexAccess; import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.text.XText; import com.sun.star.text.XTextContent; import com.sun.star.text.XTextCursor; import com.sun.star.text.XTextEmbedde... | import com.sun.star.beans.*; import com.sun.star.container.*; import com.sun.star.lang.*; import com.sun.star.text.*; import com.sun.star.uno.*; import java.io.*; | [
"com.sun.star",
"java.io"
] | com.sun.star; java.io; | 511,093 |
@Test
public void testDelimiterParsingDisabledXPath() throws ConfigurationException
{
XMLConfiguration conf2 = new XMLConfiguration();
conf2.setExpressionEngine(new XPathExpressionEngine());
load(conf2, testProperties);
assertEquals("a,b,c", conf2.getString("split/list3/@val... | void function() throws ConfigurationException { XMLConfiguration conf2 = new XMLConfiguration(); conf2.setExpressionEngine(new XPathExpressionEngine()); load(conf2, testProperties); assertEquals("a,b,c", conf2.getString(STR)); assertEquals(0, conf2.getMaxIndex(STR)); assertEquals(STR, conf2.getString(STR)); assertEqual... | /**
* Tests whether string properties with list delimiters can be accessed if
* delimiter parsing is disabled and the XPath expression engine is used.
*/ | Tests whether string properties with list delimiters can be accessed if delimiter parsing is disabled and the XPath expression engine is used | testDelimiterParsingDisabledXPath | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestXMLConfiguration.java",
"license": "apache-2.0",
"size": 59359
} | [
"org.apache.commons.configuration2.ex.ConfigurationException",
"org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine",
"org.junit.Assert"
] | import org.apache.commons.configuration2.ex.ConfigurationException; import org.apache.commons.configuration2.tree.xpath.XPathExpressionEngine; import org.junit.Assert; | import org.apache.commons.configuration2.ex.*; import org.apache.commons.configuration2.tree.xpath.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 2,849,714 |
Long smembers(ValueStreamingChannel<V> channel, K key); | Long smembers(ValueStreamingChannel<V> channel, K key); | /**
* Get all the members in a set.
*
* @param channel the channel.
* @param key the keys.
* @return Long count of members of the resulting set.
*/ | Get all the members in a set | smembers | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/api/sync/RedisSetCommands.java",
"license": "apache-2.0",
"size": 10193
} | [
"io.lettuce.core.output.ValueStreamingChannel"
] | import io.lettuce.core.output.ValueStreamingChannel; | import io.lettuce.core.output.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 2,658,218 |
@Deprecated
public static void write(final StringBuffer data, final Writer output)
throws IOException {
if (data != null) {
output.write(data.toString());
}
} | static void function(final StringBuffer data, final Writer output) throws IOException { if (data != null) { output.write(data.toString()); } } | /**
* Writes chars from a <code>StringBuffer</code> to a <code>Writer</code>.
*
* @param data the <code>StringBuffer</code> to write, null ignored
* @param output the <code>Writer</code> to write to
* @throws NullPointerException if output is null
* @throws IOException if an I/O e... | Writes chars from a <code>StringBuffer</code> to a <code>Writer</code> | write | {
"repo_name": "krosenvold/commons-io",
"path": "src/main/java/org/apache/commons/io/IOUtils.java",
"license": "apache-2.0",
"size": 125142
} | [
"java.io.IOException",
"java.io.Writer"
] | import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,548,596 |
public Page findByTechnical(String pagename); | Page function(String pagename); | /**
* Methode zum laden eines Objektes der Klasse Page anhand der
* Benutzernames.
*
* @param pagename - Benutzername des Objektes das geladen werden soll.
* @return Page - Objekt das den angegebenen Benutzernamen besitzt.
*/ | Methode zum laden eines Objektes der Klasse Page anhand der Benutzernames | findByTechnical | {
"repo_name": "tiv-source/tiv-page",
"path": "dao/src/main/java/de/tivsource/page/dao/page/PageDaoLocal.java",
"license": "gpl-2.0",
"size": 2526
} | [
"de.tivsource.page.entity.page.Page"
] | import de.tivsource.page.entity.page.Page; | import de.tivsource.page.entity.page.*; | [
"de.tivsource.page"
] | de.tivsource.page; | 2,712,572 |
protected void alk(final EncodingResult result, final Variable[] vars, final int rhs) {
if (rhs < 0) {
throw new IllegalArgumentException("Invalid right hand side of cardinality constraint: " + rhs);
}
if (rhs > vars.length) {
result.addClause();
return;
... | void function(final EncodingResult result, final Variable[] vars, final int rhs) { if (rhs < 0) { throw new IllegalArgumentException(STR + rhs); } if (rhs > vars.length) { result.addClause(); return; } if (rhs == 0) { return; } if (rhs == 1) { result.addClause(vars); return; } if (rhs == vars.length) { for (final Varia... | /**
* Encodes an at-lest-k constraint.
* @param result the result
* @param vars the variables of the constraint
* @param rhs the right hand side of the constraint
*/ | Encodes an at-lest-k constraint | alk | {
"repo_name": "logic-ng/LogicNG",
"path": "src/main/java/org/logicng/cardinalityconstraints/CCEncoder.java",
"license": "apache-2.0",
"size": 25318
} | [
"org.logicng.datastructures.EncodingResult",
"org.logicng.formulas.Variable"
] | import org.logicng.datastructures.EncodingResult; import org.logicng.formulas.Variable; | import org.logicng.datastructures.*; import org.logicng.formulas.*; | [
"org.logicng.datastructures",
"org.logicng.formulas"
] | org.logicng.datastructures; org.logicng.formulas; | 1,969,133 |
public ActionForward recalculateDirectFandADistributionTotals(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
return mapping.findForward(Constants.MAPPING_BASIC);
} | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mapping.findForward(Constants.MAPPING_BASIC); } | /**
* This method is used to recalculate the Total amounts in the Direct F and A Distribution panel.
*
* @param mapping
* @param form
* @param request
* @param response
* @return mapping forward
* @throws Exception
*/ | This method is used to recalculate the Total amounts in the Direct F and A Distribution panel | recalculateDirectFandADistributionTotals | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/timeandmoney/web/struts/action/TimeAndMoneyAction.java",
"license": "apache-2.0",
"size": 75923
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.struts.action.ActionForm",
"org.apache.struts.action.ActionForward",
"org.apache.struts.action.ActionMapping",
"org.kuali.kra.infrastructure.Constants"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kra.infrastructure.Constants; | import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kra.infrastructure.*; | [
"javax.servlet",
"org.apache.struts",
"org.kuali.kra"
] | javax.servlet; org.apache.struts; org.kuali.kra; | 1,398,052 |
public Gesture fill(double zoomFactor, double scale, PredefinedColor color) throws IOException
{ Gesture result = new Gesture();
double zoom = zoomFactor/scale;
// name
result.setName(name);
// animes
for(Entry<Direction,HollowAnimeDirection> e: animes.entrySet())
{ AnimeDirection temp = e... | Gesture function(double zoomFactor, double scale, PredefinedColor color) throws IOException { Gesture result = new Gesture(); double zoom = zoomFactor/scale; result.setName(name); for(Entry<Direction,HollowAnimeDirection> e: animes.entrySet()) { AnimeDirection temp = e.getValue().fill(zoom,color); Direction direction =... | /**
* used when generating an actual Factory from a HollowFactory.
* Images names are replaced by the actual images, scalable stuff
* is scaled, etc.
*/ | used when generating an actual Factory from a HollowFactory. Images names are replaced by the actual images, scalable stuff is scaled, etc | fill | {
"repo_name": "vlabatut/totalboumboum",
"path": "src/org/totalboumboum/engine/content/feature/gesture/HollowGesture.java",
"license": "gpl-2.0",
"size": 5677
} | [
"java.io.IOException",
"java.util.Map",
"org.totalboumboum.engine.content.feature.Direction",
"org.totalboumboum.engine.content.feature.gesture.anime.direction.AnimeDirection",
"org.totalboumboum.engine.content.feature.gesture.anime.direction.HollowAnimeDirection",
"org.totalboumboum.engine.content.featur... | import java.io.IOException; import java.util.Map; import org.totalboumboum.engine.content.feature.Direction; import org.totalboumboum.engine.content.feature.gesture.anime.direction.AnimeDirection; import org.totalboumboum.engine.content.feature.gesture.anime.direction.HollowAnimeDirection; import org.totalboumboum.engi... | import java.io.*; import java.util.*; import org.totalboumboum.engine.content.feature.*; import org.totalboumboum.engine.content.feature.gesture.anime.direction.*; import org.totalboumboum.engine.content.feature.gesture.modulation.*; import org.totalboumboum.engine.content.feature.gesture.trajectory.direction.*; import... | [
"java.io",
"java.util",
"org.totalboumboum.engine",
"org.totalboumboum.tools"
] | java.io; java.util; org.totalboumboum.engine; org.totalboumboum.tools; | 1,429,567 |
public void setImageMagickPath(String ImageMagickPath) {
if (!ImageMagickPath.isEmpty() && !ImageMagickPath.endsWith(File.separator))
ImageMagickPath += File.separator;
this.ImageMagickPath = ImageMagickPath;
} | void function(String ImageMagickPath) { if (!ImageMagickPath.isEmpty() && !ImageMagickPath.endsWith(File.separator)) ImageMagickPath += File.separator; this.ImageMagickPath = ImageMagickPath; } | /**
* Set the path to the ImageMagick executable, needed if it is not on system path.
*
* @param ImageMagickPath to ImageMagick file.
*/ | Set the path to the ImageMagick executable, needed if it is not on system path | setImageMagickPath | {
"repo_name": "zamattiac/tika",
"path": "tika-parsers/src/main/java/org/apache/tika/parser/ocr/TesseractOCRConfig.java",
"license": "apache-2.0",
"size": 16463
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 734,885 |
public List<String> getInformation() {
return this.mInformationsAsString;
}
| List<String> function() { return this.mInformationsAsString; } | /**
* Gets the information hold by this panel.
*
* @return The information mentioned.
*/ | Gets the information hold by this panel | getInformation | {
"repo_name": "ZabuzaW/TreeFlood",
"path": "src/de/zabuza/treeflood/demo/gui/model/InformationPanel.java",
"license": "gpl-3.0",
"size": 4800
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,908,167 |
@Test
public void testErrorNonForeachInput() throws Exception {
String query = "A = load 'myfile' as (name, age, gpa);" +
"store A into 'output';";
LogicalPlan newLogicalPlan = migrateAndOptimizePlan( query );
Operator load = newLogicalPlan.getSources().get( 0 );
... | void function() throws Exception { String query = STR + STR; LogicalPlan newLogicalPlan = migrateAndOptimizePlan( query ); Operator load = newLogicalPlan.getSources().get( 0 ); Assert.assertTrue( load instanceof LOLoad ); List<Operator> nexts = newLogicalPlan.getSuccessors( load ); Assert.assertTrue( nexts != null && n... | /**
* No foreach in the plan, no effect.
*/ | No foreach in the plan, no effect | testErrorNonForeachInput | {
"repo_name": "kaituo/sedge",
"path": "trunk/test/org/apache/pig/test/TestNewPlanPushDownForeachFlatten.java",
"license": "mit",
"size": 51650
} | [
"java.util.List",
"org.apache.pig.newplan.Operator",
"org.apache.pig.newplan.logical.relational.LOLoad",
"org.apache.pig.newplan.logical.relational.LogicalPlan",
"org.junit.Assert"
] | import java.util.List; import org.apache.pig.newplan.Operator; import org.apache.pig.newplan.logical.relational.LOLoad; import org.apache.pig.newplan.logical.relational.LogicalPlan; import org.junit.Assert; | import java.util.*; import org.apache.pig.newplan.*; import org.apache.pig.newplan.logical.relational.*; import org.junit.*; | [
"java.util",
"org.apache.pig",
"org.junit"
] | java.util; org.apache.pig; org.junit; | 1,690,713 |
public void destroy() {
getScheduler().stop();
}
static Logger logger = LoggerFactory.getLogger(Interpreter.class);
private InterpreterGroup interpreterGroup;
private URL [] classloaderUrls;
protected Properties property;
public Interpreter(Properties property) {
this.property = property;
... | void function() { getScheduler().stop(); } static Logger logger = LoggerFactory.getLogger(Interpreter.class); private InterpreterGroup interpreterGroup; private URL [] classloaderUrls; protected Properties property; public Interpreter(Properties property) { this.property = property; } | /**
* Called when interpreter is no longer used.
*/ | Called when interpreter is no longer used | destroy | {
"repo_name": "myrtleTree33/zeppelin",
"path": "zeppelin-interpreter/src/main/java/com/nflabs/zeppelin/interpreter/Interpreter.java",
"license": "apache-2.0",
"size": 7063
} | [
"java.util.Properties",
"org.slf4j.Logger",
"org.slf4j.LoggerFactory"
] | import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; | import java.util.*; import org.slf4j.*; | [
"java.util",
"org.slf4j"
] | java.util; org.slf4j; | 525,993 |
protected void applyToAbstractRenderer(AbstractRenderer renderer) {
if (renderer.getAutoPopulateSeriesPaint()) {
renderer.clearSeriesPaints(false);
}
if (renderer.getAutoPopulateSeriesStroke()) {
renderer.clearSeriesStrokes(false);
}
}
| void function(AbstractRenderer renderer) { if (renderer.getAutoPopulateSeriesPaint()) { renderer.clearSeriesPaints(false); } if (renderer.getAutoPopulateSeriesStroke()) { renderer.clearSeriesStrokes(false); } } | /**
* Applies the attributes for this theme to an {@link AbstractRenderer}.
*
* @param renderer the renderer (<code>null</code> not permitted).
*/ | Applies the attributes for this theme to an <code>AbstractRenderer</code> | applyToAbstractRenderer | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/StandardChartTheme.java",
"license": "lgpl-3.0",
"size": 60532
} | [
"org.jfree.chart.renderer.AbstractRenderer"
] | import org.jfree.chart.renderer.AbstractRenderer; | import org.jfree.chart.renderer.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,796,948 |
int read(byte[] writeBuffer, int writeOffset, int writeSize, byte[] readBuffer, int readOffset, int readSize) throws IOException; | int read(byte[] writeBuffer, int writeOffset, int writeSize, byte[] readBuffer, int readOffset, int readSize) throws IOException; | /**
* This method writes and reads bytes to/from the i2c device in a single method call
*
* @param writeBuffer buffer of data to be written to the i2c device in one go
* @param writeOffset offset in write buffer
* @param writeSize number of bytes to be written from buffer
* @param readBuff... | This method writes and reads bytes to/from the i2c device in a single method call | read | {
"repo_name": "RasPelikan/pi4j",
"path": "pi4j-core/src/main/java/com/pi4j/io/i2c/I2CDevice.java",
"license": "lgpl-3.0",
"size": 5890
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 845,438 |
List<BeanInfo> searchByName(String beanName); | List<BeanInfo> searchByName(String beanName); | /**
* Search beans by bean name.
*
* @param beanName
* @return
*/ | Search beans by bean name | searchByName | {
"repo_name": "arthur-except/spring-bean-browser",
"path": "src/main/java/com/arthur/bean/service/BeanService.java",
"license": "apache-2.0",
"size": 476
} | [
"com.arthur.bean.details.BeanInfo",
"java.util.List"
] | import com.arthur.bean.details.BeanInfo; import java.util.List; | import com.arthur.bean.details.*; import java.util.*; | [
"com.arthur.bean",
"java.util"
] | com.arthur.bean; java.util; | 1,673,237 |
private synchronized void destroyProcess() {
boolean wasInterrupted = false;
try {
this.process.destroy();
while (true) {
try {
this.process.waitFor();
return;
} catch (InterruptedException ie) {
wasInterrupted = true;
}
}
} finally {... | synchronized void function() { boolean wasInterrupted = false; try { this.process.destroy(); while (true) { try { this.process.waitFor(); return; } catch (InterruptedException ie) { wasInterrupted = true; } } } finally { if (shutdownHook != null) { Runtime.getRuntime().removeShutdownHook(shutdownHook); shutdownHook = n... | /**
* Destroys the worker subprocess. This might block forever if the subprocess refuses to die. It
* is safe to call this multiple times.
*/ | Destroys the worker subprocess. This might block forever if the subprocess refuses to die. It is safe to call this multiple times | destroyProcess | {
"repo_name": "bazelbuild/bazel",
"path": "src/main/java/com/google/devtools/build/lib/worker/WorkerMultiplexer.java",
"license": "apache-2.0",
"size": 18173
} | [
"java.util.concurrent.Semaphore"
] | import java.util.concurrent.Semaphore; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 488,525 |
private Color getFillColor(Object annotationType, boolean temporary) {
return getColor(annotationType, temporary && fIsTemporaryAnnotationDiscolored ? 0.9 : 0.75);
} | Color function(Object annotationType, boolean temporary) { return getColor(annotationType, temporary && fIsTemporaryAnnotationDiscolored ? 0.9 : 0.75); } | /**
* Returns the fill color for the given annotation type and characteristics.
*
* @param annotationType the annotation type
* @param temporary <code>true</code> if for temporary annotations
* @return the fill color
*/ | Returns the fill color for the given annotation type and characteristics | getFillColor | {
"repo_name": "neelance/jface4ruby",
"path": "jface4ruby/src/org/eclipse/jface/text/source/OverviewRuler.java",
"license": "epl-1.0",
"size": 39538
} | [
"org.eclipse.swt.graphics.Color"
] | import org.eclipse.swt.graphics.Color; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,284,261 |
public void updateLong(int index,
long x,
boolean forceEncrypt) throws SQLServerException {
if (loggerExternal.isLoggable(java.util.logging.Level.FINER))
loggerExternal.entering(getClassNameLogging(), "updateLong", new Object[] {index, x, forceEncrypt});
checkClo... | void function(int index, long x, boolean forceEncrypt) throws SQLServerException { if (loggerExternal.isLoggable(java.util.logging.Level.FINER)) loggerExternal.entering(getClassNameLogging(), STR, new Object[] {index, x, forceEncrypt}); checkClosed(); updateValue(index, JDBCType.BIGINT, Long.valueOf(x), JavaType.LONG, ... | /**
* Updates the designated column with a <code>long</code> value. The updater methods are used to update column values in the current row or the
* insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are
* called to ... | Updates the designated column with a <code>long</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the database | updateLong | {
"repo_name": "v-nisidh/mssql-jdbc",
"path": "src/main/java/com/microsoft/sqlserver/jdbc/SQLServerResultSet.java",
"license": "mit",
"size": 288041
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,630,785 |
public void addKeywordsToDatabase(String[] kws) {
// if keyeord is empty, return
if (null == kws || 0 == kws.length) {
return;
}
// iterate all keywords
for (String kw : kws) {
// check whether keyword already exists
int pos = getKeywordPos... | void function(String[] kws) { if (null == kws 0 == kws.length) { return; } for (String kw : kws) { int pos = getKeywordPosition(kw, false); if (-1 == pos) { int emptypos = retrieveFirstEmptyElement(keywordFile); if (emptypos != -1) { try { Element k = retrieveElement(keywordFile, emptypos); k.setText(kw); String kwid; ... | /**
* This method adds several keywords to the keyword xml datafile, without
* assigning them to a certain entry
*
* @param kws the keywords which should be added
*/ | This method adds several keywords to the keyword xml datafile, without assigning them to a certain entry | addKeywordsToDatabase | {
"repo_name": "sjPlot/Zettelkasten",
"path": "src/main/java/de/danielluedecke/zettelkasten/database/Daten.java",
"license": "gpl-3.0",
"size": 336724
} | [
"de.danielluedecke.zettelkasten.util.Constants",
"de.danielluedecke.zettelkasten.util.Tools",
"java.util.logging.Level",
"org.jdom2.Element",
"org.jdom2.IllegalAddException",
"org.jdom2.IllegalDataException",
"org.jdom2.IllegalNameException"
] | import de.danielluedecke.zettelkasten.util.Constants; import de.danielluedecke.zettelkasten.util.Tools; import java.util.logging.Level; import org.jdom2.Element; import org.jdom2.IllegalAddException; import org.jdom2.IllegalDataException; import org.jdom2.IllegalNameException; | import de.danielluedecke.zettelkasten.util.*; import java.util.logging.*; import org.jdom2.*; | [
"de.danielluedecke.zettelkasten",
"java.util",
"org.jdom2"
] | de.danielluedecke.zettelkasten; java.util; org.jdom2; | 181,377 |
protected int getRefreshTokenValiditySeconds(OAuth2Request clientAuth) {
if (clientDetailsService != null) {
ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId());
Integer validity = client.getRefreshTokenValiditySeconds();
if (validity != null) {
return validity;
... | int function(OAuth2Request clientAuth) { if (clientDetailsService != null) { ClientDetails client = clientDetailsService.loadClientByClientId(clientAuth.getClientId()); Integer validity = client.getRefreshTokenValiditySeconds(); if (validity != null) { return validity; } } return refreshTokenValiditySeconds; } | /**
* The refresh token validity period in seconds
*
* @param clientAuth the current authorization request
* @return the refresh token validity period in seconds
*/ | The refresh token validity period in seconds | getRefreshTokenValiditySeconds | {
"repo_name": "spring-projects/spring-security-oauth",
"path": "spring-security-oauth2/src/main/java/org/springframework/security/oauth2/provider/token/DefaultTokenServices.java",
"license": "apache-2.0",
"size": 17711
} | [
"org.springframework.security.oauth2.provider.ClientDetails",
"org.springframework.security.oauth2.provider.OAuth2Request"
] | import org.springframework.security.oauth2.provider.ClientDetails; import org.springframework.security.oauth2.provider.OAuth2Request; | import org.springframework.security.oauth2.provider.*; | [
"org.springframework.security"
] | org.springframework.security; | 2,301,988 |
protected void handleResponse(final NextFilter nextFilter,
final IoBuffer buf, int step) throws Exception {
int len = 2;
if (step == SocksProxyConstants.SOCKS5_GREETING_STEP) {
// Send greeting message
byte method = buf.get(1);
if (method == SocksProx... | void function(final NextFilter nextFilter, final IoBuffer buf, int step) throws Exception { int len = 2; if (step == SocksProxyConstants.SOCKS5_GREETING_STEP) { byte method = buf.get(1); if (method == SocksProxyConstants.NO_ACCEPTABLE_AUTH_METHOD) { throw new IllegalStateException( STR + STR); } getSession().setAttribu... | /**
* Handle a SOCKS v5 response from the proxy server.
*
* @param nextFilter the next filter
* @param buf the buffered data received
* @param step the current step in the authentication process
*/ | Handle a SOCKS v5 response from the proxy server | handleResponse | {
"repo_name": "krismcqueen/gateway",
"path": "mina.core/core/src/main/java/org/apache/mina/proxy/handlers/socks/Socks5LogicHandler.java",
"license": "apache-2.0",
"size": 18046
} | [
"org.apache.mina.core.buffer.IoBuffer",
"org.apache.mina.core.filterchain.IoFilter",
"org.apache.mina.proxy.utils.ByteUtilities",
"org.ietf.jgss.GSSContext"
] | import org.apache.mina.core.buffer.IoBuffer; import org.apache.mina.core.filterchain.IoFilter; import org.apache.mina.proxy.utils.ByteUtilities; import org.ietf.jgss.GSSContext; | import org.apache.mina.core.buffer.*; import org.apache.mina.core.filterchain.*; import org.apache.mina.proxy.utils.*; import org.ietf.jgss.*; | [
"org.apache.mina",
"org.ietf.jgss"
] | org.apache.mina; org.ietf.jgss; | 1,462,108 |
public ServiceCall putNonResourceAsync(Sku sku, final ServiceCallback<Sku> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(Sku sku, final ServiceCallback<Sku> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Long running put request with non resource.
*
* @param sku sku to put
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/ | Long running put request with non resource | putNonResourceAsync | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROsOperationsImpl.java",
"license": "mit",
"size": 315973
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,700,799 |
void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) {
MenuManager menuMgr= new MenuManager();
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(menuListener);
Menu menu= menuMgr.createContextMenu(getControl());
getControl()... | void initContextMenu(IMenuListener menuListener, String popupId, IWorkbenchPartSite viewSite) { MenuManager menuMgr= new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(menuListener); Menu menu= menuMgr.createContextMenu(getControl()); getControl().setMenu(menu); viewSite.registerContextMenu... | /**
* Attaches a contextmenu listener to the tree
*/ | Attaches a contextmenu listener to the tree | initContextMenu | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/callhierarchy/LocationViewer.java",
"license": "epl-1.0",
"size": 4635
} | [
"org.eclipse.jface.action.IMenuListener",
"org.eclipse.jface.action.MenuManager",
"org.eclipse.swt.widgets.Menu",
"org.eclipse.ui.IWorkbenchPartSite"
] | import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.MenuManager; import org.eclipse.swt.widgets.Menu; import org.eclipse.ui.IWorkbenchPartSite; | import org.eclipse.jface.action.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.*; | [
"org.eclipse.jface",
"org.eclipse.swt",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.swt; org.eclipse.ui; | 101,015 |
@Test
public void testRequestNewWorkers() throws Exception {
new Context() {{
startResourceManager();
// allocate a worker
when(rmServices.workerStore.newTaskID()).thenReturn(task1).thenThrow(new AssertionFailedError());
rmServices.slotManagerStarted.get(timeout.toMilliseconds(), TimeUnit.MILLISECOND... | void function() throws Exception { new Context() {{ startResourceManager(); when(rmServices.workerStore.newTaskID()).thenReturn(task1).thenThrow(new AssertionFailedError()); rmServices.slotManagerStarted.get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS); CompletableFuture<Void> allocateResourceFuture = resourceManag... | /**
* Test request for new workers.
*/ | Test request for new workers | testRequestNewWorkers | {
"repo_name": "mylog00/flink",
"path": "flink-mesos/src/test/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManagerTest.java",
"license": "apache-2.0",
"size": 33027
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.TimeUnit",
"junit.framework.AssertionFailedError",
"org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore",
"org.apache.flink.mesos.scheduler.LaunchCoordinator",
"org.apache.flink.mesos.scheduler.TaskMonitor",
"org.hamcrest... | import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import junit.framework.AssertionFailedError; import org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore; import org.apache.flink.mesos.scheduler.LaunchCoordinator; import org.apache.flink.mesos.scheduler.TaskMonitor;... | import java.util.concurrent.*; import junit.framework.*; import org.apache.flink.mesos.runtime.clusterframework.store.*; import org.apache.flink.mesos.scheduler.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*; | [
"java.util",
"junit.framework",
"org.apache.flink",
"org.hamcrest",
"org.junit",
"org.mockito"
] | java.util; junit.framework; org.apache.flink; org.hamcrest; org.junit; org.mockito; | 1,686,912 |
public okhttp3.Call readClusterRoleAsync(
String name, String pretty, final ApiCallback<V1ClusterRole> _callback) throws ApiException {
okhttp3.Call localVarCall = readClusterRoleValidateBeforeCall(name, pretty, _callback);
Type localVarReturnType = new TypeToken<V1ClusterRole>() {}.getType();
loca... | okhttp3.Call function( String name, String pretty, final ApiCallback<V1ClusterRole> _callback) throws ApiException { okhttp3.Call localVarCall = readClusterRoleValidateBeforeCall(name, pretty, _callback); Type localVarReturnType = new TypeToken<V1ClusterRole>() {}.getType(); localVarApiClient.executeAsync(localVarCall,... | /**
* (asynchronously) read the specified ClusterRole
*
* @param name name of the ClusterRole (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws Ap... | (asynchronously) read the specified ClusterRole | readClusterRoleAsync | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java",
"license": "apache-2.0",
"size": 563123
} | [
"com.google.gson.reflect.TypeToken",
"io.kubernetes.client.openapi.ApiCallback",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.models.V1ClusterRole",
"java.lang.reflect.Type"
] | import com.google.gson.reflect.TypeToken; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V1ClusterRole; import java.lang.reflect.Type; | import com.google.gson.reflect.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*; | [
"com.google.gson",
"io.kubernetes.client",
"java.lang"
] | com.google.gson; io.kubernetes.client; java.lang; | 2,509,511 |
Map<String, Collection<String>> toMap(); | Map<String, Collection<String>> toMap(); | /**
* Converts to a {@link Map}.
*
* @return
*/ | Converts to a <code>Map</code> | toMap | {
"repo_name": "wildfly-security-incubator/keycloak",
"path": "server-spi/src/main/java/org/keycloak/authorization/attribute/Attributes.java",
"license": "apache-2.0",
"size": 4475
} | [
"java.util.Collection",
"java.util.Map"
] | import java.util.Collection; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,739,704 |
public void setQty (BigDecimal Qty)
{
super.setQty (Qty);
} // setQty
| void function (BigDecimal Qty) { super.setQty (Qty); } | /**
* Set Allocation Qty (e.g. free products)
* @param Qty
*/ | Set Allocation Qty (e.g. free products) | setQty | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.business/src/main/java-legacy/org/compiere/model/MLandedCostAllocation.java",
"license": "gpl-2.0",
"size": 4725
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,649,580 |
protected void delay(long delay, Exchange exchange) throws InterruptedException {
// only run is we are started
if (!isRunAllowed()) {
return;
}
if (delay < 0) {
return;
} else {
try {
// keep track on delayer counter while... | void function(long delay, Exchange exchange) throws InterruptedException { if (!isRunAllowed()) { return; } if (delay < 0) { return; } else { try { delayedCount.incrementAndGet(); sleep(delay); } catch (InterruptedException e) { handleSleepInterruptedException(e, exchange); } finally { delayedCount.decrementAndGet(); }... | /**
* Delays the given time before continuing.
* <p/>
* This implementation will block while waiting
*
* @param delay the delay time in millis
* @param exchange the exchange being processed
*/ | Delays the given time before continuing. This implementation will block while waiting | delay | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-core/src/main/java/org/apache/camel/processor/DelayProcessorSupport.java",
"license": "apache-2.0",
"size": 10403
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,342,140 |
Collection<DataRistorante> getToBeImported(int maxResults); | Collection<DataRistorante> getToBeImported(int maxResults); | /**
* Return restaurants to be imported randomly
*
* @param maxResults the max number of results, 0 for unlimited
* @return Collection<DataRistorante>
*/ | Return restaurants to be imported randomly | getToBeImported | {
"repo_name": "alessandro-vincelli/youeat",
"path": "src/main/java/it/av/youeat/service/DataRistoranteService.java",
"license": "apache-2.0",
"size": 3800
} | [
"it.av.youeat.ocm.model.DataRistorante",
"java.util.Collection"
] | import it.av.youeat.ocm.model.DataRistorante; import java.util.Collection; | import it.av.youeat.ocm.model.*; import java.util.*; | [
"it.av.youeat",
"java.util"
] | it.av.youeat; java.util; | 302,318 |
default Map<String, RecoveryStateFactory> getRecoveryStateFactories() {
return Collections.emptyMap();
} | default Map<String, RecoveryStateFactory> getRecoveryStateFactories() { return Collections.emptyMap(); } | /**
* The {@link RecoveryStateFactory} mappings for this plugin. When an index is created the recovery type setting
* {@link org.elasticsearch.index.IndexModule#INDEX_RECOVERY_TYPE_SETTING} on the index will be examined and either use the default
* or looked up among all the recovery state factories from... | The <code>RecoveryStateFactory</code> mappings for this plugin. When an index is created the recovery type setting <code>org.elasticsearch.index.IndexModule#INDEX_RECOVERY_TYPE_SETTING</code> on the index will be examined and either use the default or looked up among all the recovery state factories from <code>IndexSto... | getRecoveryStateFactories | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/plugins/IndexStorePlugin.java",
"license": "apache-2.0",
"size": 6396
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 860,868 |
private void truncateTable(TTruncateParams params, TDdlExecResponse resp)
throws ImpalaException {
synchronized (metastoreDdlLock_) {
TTableName tblName = params.getTable_name();
try {
Table table = getExistingTable(tblName.getDb_name(), tblName.getTable_name());
Preconditions.ch... | void function(TTruncateParams params, TDdlExecResponse resp) throws ImpalaException { synchronized (metastoreDdlLock_) { TTableName tblName = params.getTable_name(); try { Table table = getExistingTable(tblName.getDb_name(), tblName.getTable_name()); Preconditions.checkNotNull(table); if (!(table instanceof HdfsTable))... | /**
* Truncate a table by deleting all files in its partition directories, and dropping
* all column and table statistics.
* TODO truncate specified partitions.
*/ | Truncate a table by deleting all files in its partition directories, and dropping all column and table statistics. TODO truncate specified partitions | truncateTable | {
"repo_name": "theyaa/Impala",
"path": "fe/src/main/java/com/cloudera/impala/service/CatalogOpExecutor.java",
"license": "apache-2.0",
"size": 116066
} | [
"com.cloudera.impala.catalog.CatalogException",
"com.cloudera.impala.catalog.HdfsPartition",
"com.cloudera.impala.catalog.HdfsTable",
"com.cloudera.impala.catalog.Table",
"com.cloudera.impala.common.FileSystemUtil",
"com.cloudera.impala.common.ImpalaException",
"com.cloudera.impala.thrift.TDdlExecRespon... | import com.cloudera.impala.catalog.CatalogException; import com.cloudera.impala.catalog.HdfsPartition; import com.cloudera.impala.catalog.HdfsTable; import com.cloudera.impala.catalog.Table; import com.cloudera.impala.common.FileSystemUtil; import com.cloudera.impala.common.ImpalaException; import com.cloudera.impala.t... | import com.cloudera.impala.catalog.*; import com.cloudera.impala.common.*; import com.cloudera.impala.thrift.*; import com.google.common.base.*; import org.apache.hadoop.fs.*; | [
"com.cloudera.impala",
"com.google.common",
"org.apache.hadoop"
] | com.cloudera.impala; com.google.common; org.apache.hadoop; | 670,086 |
ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate); | ExternalTaskQuery lockExpirationBefore(Date lockExpirationDate); | /**
* Only select external tasks that have a lock expiring before the given date
*/ | Only select external tasks that have a lock expiring before the given date | lockExpirationBefore | {
"repo_name": "hawky-4s-/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/externaltask/ExternalTaskQuery.java",
"license": "apache-2.0",
"size": 3740
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 783,218 |
public ServiceFuture<P2SVpnGatewayInner> getP2sVpnConnectionHealthAsync(String resourceGroupName, String gatewayName, final ServiceCallback<P2SVpnGatewayInner> serviceCallback) {
return ServiceFuture.fromResponse(getP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallb... | ServiceFuture<P2SVpnGatewayInner> function(String resourceGroupName, String gatewayName, final ServiceCallback<P2SVpnGatewayInner> serviceCallback) { return ServiceFuture.fromResponse(getP2sVpnConnectionHealthWithServiceResponseAsync(resourceGroupName, gatewayName), serviceCallback); } | /**
* Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param gatewayName The name of the P2SVpnGateway.
* @param serviceCallback the async ServiceCallback to handle success... | Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified resource group | getP2sVpnConnectionHealthAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/P2sVpnGatewaysInner.java",
"license": "mit",
"size": 105321
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 723,274 |
public Map<String, Map<String, List<String>>> getResourcePermissions() {
if (resourcePermissions == null) {
resourcePermissions = new LinkedHashMap<>();
}
return resourcePermissions;
} | Map<String, Map<String, List<String>>> function() { if (resourcePermissions == null) { resourcePermissions = new LinkedHashMap<>(); } return resourcePermissions; } | /**
* Returns a map of resource permissions.
* @return the permissions map
*/ | Returns a map of resource permissions | getResourcePermissions | {
"repo_name": "Erudika/para",
"path": "para-core/src/main/java/com/erudika/para/core/App.java",
"license": "apache-2.0",
"size": 42818
} | [
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 234,834 |
public void setPatchLevel(final int patchLevel) throws SQLException {
final PatchTable patchTable = this.makePatchTable();
patchTable.lockPatchTable();
patchTable.updatePatchLevel(patchLevel);
AutopatchSupport.log.info("Set the patch level to " + patchLevel);
patchTable.unloc... | void function(final int patchLevel) throws SQLException { final PatchTable patchTable = this.makePatchTable(); patchTable.lockPatchTable(); patchTable.updatePatchLevel(patchLevel); AutopatchSupport.log.info(STR + patchLevel); patchTable.unlockPatchTable(); } | /**
* Sets the patch level.
*
* @param patchLevel
* the new patch level
* @throws SQLException
* the SQL exception
*/ | Sets the patch level | setPatchLevel | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/com/tacitknowledge/util/migration/jdbc/AutopatchSupport.java",
"license": "gpl-2.0",
"size": 3173
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,461,924 |
protected void initFactoidWeb(Result[] resultsCorp) {
// question analysis
Ontology wordNet = new WordNet();
// - dictionaries for term extraction
QuestionAnalysis.clearDictionaries();
QuestionAnalysis.addDictionary(wordNet);
// - ontologies for term expansion
QuestionAnalysis.clearOntologies();... | void function(Result[] resultsCorp) { Ontology wordNet = new WordNet(); QuestionAnalysis.clearDictionaries(); QuestionAnalysis.addDictionary(wordNet); QuestionAnalysis.clearOntologies(); QuestionAnalysis.addOntology(wordNet); QueryGeneration.clearQueryGenerators(); QueryGeneration.addQueryGenerator(new BagOfWordsG()); ... | /**
* Initializes the pipeline for factoid questions, using the Web as a
* knowledge source.
*
* @param resultsCorp results retrieved from the corpus
*/ | Initializes the pipeline for factoid questions, using the Web as a knowledge source | initFactoidWeb | {
"repo_name": "vishnujayvel/QAGenerator",
"path": "src/info/ephyra/trec/OpenEphyraCorpus.java",
"license": "gpl-3.0",
"size": 10246
} | [
"info.ephyra.answerselection.AnswerSelection",
"info.ephyra.answerselection.filters.AnswerPatternFilter",
"info.ephyra.answerselection.filters.AnswerProjectionFilter",
"info.ephyra.answerselection.filters.AnswerTypeFilter",
"info.ephyra.answerselection.filters.DuplicateFilter",
"info.ephyra.answerselectio... | import info.ephyra.answerselection.AnswerSelection; import info.ephyra.answerselection.filters.AnswerPatternFilter; import info.ephyra.answerselection.filters.AnswerProjectionFilter; import info.ephyra.answerselection.filters.AnswerTypeFilter; import info.ephyra.answerselection.filters.DuplicateFilter; import info.ephy... | import info.ephyra.answerselection.*; import info.ephyra.answerselection.filters.*; import info.ephyra.nlp.semantics.ontologies.*; import info.ephyra.querygeneration.*; import info.ephyra.querygeneration.generators.*; import info.ephyra.questionanalysis.*; import info.ephyra.search.*; import info.ephyra.search.searcher... | [
"info.ephyra.answerselection",
"info.ephyra.nlp",
"info.ephyra.querygeneration",
"info.ephyra.questionanalysis",
"info.ephyra.search"
] | info.ephyra.answerselection; info.ephyra.nlp; info.ephyra.querygeneration; info.ephyra.questionanalysis; info.ephyra.search; | 2,844,995 |
@Deprecated
void postLockRow(final ObserverContext<RegionCoprocessorEnvironment> ctx,
final byte[] regionName, final byte[] row) throws IOException; | void postLockRow(final ObserverContext<RegionCoprocessorEnvironment> ctx, final byte[] regionName, final byte[] row) throws IOException; | /**
* Called after locking a row.
*
* @param ctx
* @param regionName the region name
* @param row
* @throws IOException Signals that an I/O exception has occurred.
* @deprecated Will be removed in 0.96
*/ | Called after locking a row | postLockRow | {
"repo_name": "zqxjjj/NobidaBase",
"path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 41666
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 904,971 |
@Test
public void testHierarchyOfColocatedChildPRsMissing() throws Exception {
int childPRGenerations = 2;
for (VM vm : toArray(vm0, vm1)) {
vm.invoke(() -> {
createCache();
createDiskStore(diskStoreName1);
createPR_withPersistence(regionName, diskStoreName1, DEFAULT_RECOVERY_... | void function() throws Exception { int childPRGenerations = 2; for (VM vm : toArray(vm0, vm1)) { vm.invoke(() -> { createCache(); createDiskStore(diskStoreName1); createPR_withPersistence(regionName, diskStoreName1, DEFAULT_RECOVERY_DELAY, DEFAULT_REDUNDANT_COPIES, DEFAULT_STARTUP_RECOVERY_DELAY); createChildPR_withPer... | /**
* Testing that all missing persistent PRs in a colocation hierarchy are logged as warnings
*/ | Testing that all missing persistent PRs in a colocation hierarchy are logged as warnings | testHierarchyOfColocatedChildPRsMissing | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDistributedTest.java",
"license": "apache-2.0",
"size": 82266
} | [
"java.util.HashMap",
"java.util.Map",
"java.util.Set",
"org.apache.geode.test.awaitility.GeodeAwaitility",
"org.apache.geode.test.dunit.AsyncInvocation",
"org.apache.geode.test.dunit.VM",
"org.assertj.core.api.Assertions"
] | import java.util.HashMap; import java.util.Map; import java.util.Set; import org.apache.geode.test.awaitility.GeodeAwaitility; import org.apache.geode.test.dunit.AsyncInvocation; import org.apache.geode.test.dunit.VM; import org.assertj.core.api.Assertions; | import java.util.*; import org.apache.geode.test.awaitility.*; import org.apache.geode.test.dunit.*; import org.assertj.core.api.*; | [
"java.util",
"org.apache.geode",
"org.assertj.core"
] | java.util; org.apache.geode; org.assertj.core; | 2,469,659 |
public static String getBundleProperty(final String inKey) {
// without context path set, we try to retrieve the properties file from the bundle
if (cContextPath.isEmpty()) {
try {
final ResourceBundle lBundle = ResourceBundle.getBundle(cSysName);
ret... | static String function(final String inKey) { if (cContextPath.isEmpty()) { try { final ResourceBundle lBundle = ResourceBundle.getBundle(cSysName); return lBundle == null ? null : (String) lBundle.getObject(inKey); } catch (final MissingResourceException exc) { return null; } } try { return getVSysProperties().getPrope... | /** <p>
* Convenience method to get the specified key's value from the application's properties possibly without
* initializing the system.
* </p>
* <p>
* This method should only be used in the bundle activation phase.
* </p>
*
* @param inKey String
* @return String... | Convenience method to get the specified key's value from the application's properties possibly without initializing the system. This method should only be used in the bundle activation phase. | getBundleProperty | {
"repo_name": "aktion-hip/viffw",
"path": "org.hip.viffw/src/org/hip/kernel/sys/VSys.java",
"license": "lgpl-2.1",
"size": 17607
} | [
"java.io.IOException",
"java.util.MissingResourceException",
"java.util.ResourceBundle"
] | import java.io.IOException; import java.util.MissingResourceException; import java.util.ResourceBundle; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,229,441 |
@Override
public Request<ModifySubnetAttributeRequest> getDryRunRequest() {
Request<ModifySubnetAttributeRequest> request = new ModifySubnetAttributeRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<ModifySubnetAttributeRequest> function() { Request<ModifySubnetAttributeRequest> request = new ModifySubnetAttributeRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ModifySubnetAttributeRequest.java",
"license": "apache-2.0",
"size": 14983
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.ModifySubnetAttributeRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.ModifySubnetAttributeRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 1,045,275 |
public Page beginPage(); | Page function(); | /**
* Positions the questionnaire at the first page containing a question.
*
* @return new current page (first page with a question)
*/ | Positions the questionnaire at the first page containing a question | beginPage | {
"repo_name": "apruden/onyx",
"path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/service/ActiveQuestionnaireAdministrationService.java",
"license": "gpl-3.0",
"size": 11728
} | [
"org.obiba.onyx.quartz.core.engine.questionnaire.question.Page"
] | import org.obiba.onyx.quartz.core.engine.questionnaire.question.Page; | import org.obiba.onyx.quartz.core.engine.questionnaire.question.*; | [
"org.obiba.onyx"
] | org.obiba.onyx; | 488,654 |
public void onItemAdd(final Memorea memorea, final int position) {
mMemoreaList.add(position, memorea);
notifyItemInserted(position);
} | void function(final Memorea memorea, final int position) { mMemoreaList.add(position, memorea); notifyItemInserted(position); } | /**
* Adds a memorea to the memorea list in the position specified
*/ | Adds a memorea to the memorea list in the position specified | onItemAdd | {
"repo_name": "thomasameisel/memorease",
"path": "app/src/main/java/com/tarian/memorease/presenter/MemoreaListAdapter.java",
"license": "apache-2.0",
"size": 10093
} | [
"com.tarian.memorease.model.Memorea"
] | import com.tarian.memorease.model.Memorea; | import com.tarian.memorease.model.*; | [
"com.tarian.memorease"
] | com.tarian.memorease; | 2,280,632 |
public static void putSequentialKeysTaskForInValid() throws Exception {
Set regionVisited = new HashSet();
for (String regionName : regionNames) {
if (!regionVisited.contains(regionName)) {
regionVisited.add(regionName);
Region region = RegionHelper.getRegion(regionName);
Log.get... | static void function() throws Exception { Set regionVisited = new HashSet(); for (String regionName : regionNames) { if (!regionVisited.contains(regionName)) { regionVisited.add(regionName); Region region = RegionHelper.getRegion(regionName); Log.getLogWriter() .info( STR + regionName); String key = INVALID_PRIFIX + +W... | /**
* Same as the putSequentialKeysTask() but with the keys prefixed with
* "invalid"
*/ | Same as the putSequentialKeysTask() but with the keys prefixed with "invalid" | putSequentialKeysTaskForInValid | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/newWan/security/WanSecurity.java",
"license": "apache-2.0",
"size": 26405
} | [
"com.gemstone.gemfire.cache.Region",
"java.util.HashSet",
"java.util.Set"
] | import com.gemstone.gemfire.cache.Region; import java.util.HashSet; import java.util.Set; | import com.gemstone.gemfire.cache.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 839,801 |
public Axis getAxis() {
return axis;
} | Axis function() { return axis; } | /**
* Returns the name of the axis this axis expression is populating.
*
* @return axis name
*/ | Returns the name of the axis this axis expression is populating | getAxis | {
"repo_name": "tesluk/olap4j",
"path": "src/org/olap4j/mdx/AxisNode.java",
"license": "apache-2.0",
"size": 5306
} | [
"org.olap4j.Axis"
] | import org.olap4j.Axis; | import org.olap4j.*; | [
"org.olap4j"
] | org.olap4j; | 2,683,244 |
@ServiceMethod(returns = ReturnType.SINGLE)
public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner snapshot) {
return createOrUpdateAsync(resourceGroupName, snapshotName, snapshot).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) SnapshotInner function(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { return createOrUpdateAsync(resourceGroupName, snapshotName, snapshot).block(); } | /**
* Creates or updates a snapshot.
*
* @param resourceGroupName The name of the resource group.
* @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot
* is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. Th... | Creates or updates a snapshot | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/SnapshotsClientImpl.java",
"license": "mit",
"size": 112349
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.compute.fluent.models.SnapshotInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.SnapshotInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,566,548 |
public String makeResponseCtx(ResponseCtx resCtx) {
ByteArrayOutputStream response = new ByteArrayOutputStream();
resCtx.encode(response, new Indenter());
return new String(response.toByteArray());
} | String function(ResponseCtx resCtx) { ByteArrayOutputStream response = new ByteArrayOutputStream(); resCtx.encode(response, new Indenter()); return new String(response.toByteArray()); } | /**
* Converst a ResponseCtx object to its string representation.
*
* @param resCtx
* the ResponseCtx object
* @return the String representation of the ResponseCtx object
*/ | Converst a ResponseCtx object to its string representation | makeResponseCtx | {
"repo_name": "FLVC/fcrepo-src-3.4.2",
"path": "fcrepo-security/fcrepo-security-pdp/src/main/java/org/fcrepo/server/security/xacml/util/ContextUtil.java",
"license": "apache-2.0",
"size": 19487
} | [
"com.sun.xacml.Indenter",
"com.sun.xacml.ctx.ResponseCtx",
"java.io.ByteArrayOutputStream"
] | import com.sun.xacml.Indenter; import com.sun.xacml.ctx.ResponseCtx; import java.io.ByteArrayOutputStream; | import com.sun.xacml.*; import com.sun.xacml.ctx.*; import java.io.*; | [
"com.sun.xacml",
"java.io"
] | com.sun.xacml; java.io; | 2,478,606 |
ActionFuture<SearchResponse> searchScroll(SearchScrollRequest request); | ActionFuture<SearchResponse> searchScroll(SearchScrollRequest request); | /**
* A search scroll request to continue searching a previous scrollable search request.
*
* @param request The search scroll request
* @return The result future
* @see Requests#searchScrollRequest(String)
*/ | A search scroll request to continue searching a previous scrollable search request | searchScroll | {
"repo_name": "strapdata/elassandra",
"path": "server/src/main/java/org/elasticsearch/client/Client.java",
"license": "apache-2.0",
"size": 17621
} | [
"org.elasticsearch.action.ActionFuture",
"org.elasticsearch.action.search.SearchResponse",
"org.elasticsearch.action.search.SearchScrollRequest"
] | import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchScrollRequest; | import org.elasticsearch.action.*; import org.elasticsearch.action.search.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,588,053 |
public void decrement(int numBytes) {
if (this.mNumBytes >= numBytes && this.mCount > 0) {
this.mCount--;
this.mNumBytes -= numBytes;
} else {
FLog.wtf(
TAG,
"Unexpected decrement of %d. Current numBytes = %d, count = %d",
numBytes,
... | void function(int numBytes) { if (this.mNumBytes >= numBytes && this.mCount > 0) { this.mCount--; this.mNumBytes -= numBytes; } else { FLog.wtf( TAG, STR, numBytes, this.mNumBytes, this.mCount); } } | /**
* 'Decrement' an item from the counter
* @param numBytes size of the item in bytes
*/ | 'Decrement' an item from the counter | decrement | {
"repo_name": "amitshekhariitbhu/fresco",
"path": "imagepipeline/src/main/java/com/facebook/imagepipeline/memory/BasePool.java",
"license": "bsd-3-clause",
"size": 28644
} | [
"com.facebook.common.logging.FLog"
] | import com.facebook.common.logging.FLog; | import com.facebook.common.logging.*; | [
"com.facebook.common"
] | com.facebook.common; | 2,765,592 |
public BigInteger getCommitment(){
// Q
return BigIntegerUtils.multiplyBaseExponents(G.getP(), bases, randomExponents);
}
| BigInteger function(){ return BigIntegerUtils.multiplyBaseExponents(G.getP(), bases, randomExponents); } | /**
* Get the commitment value
* @return the commitment value
*/ | Get the commitment value | getCommitment | {
"repo_name": "twyburton/MCompProject",
"path": "java/PKProject/src/uk/ac/ncl/burton/twy/ZKPoK/components/PKComponentProver.java",
"license": "mit",
"size": 5785
} | [
"java.math.BigInteger",
"uk.ac.ncl.burton.twy.ZKPoK"
] | import java.math.BigInteger; import uk.ac.ncl.burton.twy.ZKPoK; | import java.math.*; import uk.ac.ncl.burton.twy.*; | [
"java.math",
"uk.ac.ncl"
] | java.math; uk.ac.ncl; | 971,547 |
public SocketConnection getConnection() {
return connection;
}
| SocketConnection function() { return connection; } | /**
* Returns the connection to the server.
*
* @return the connection to the server.
*/ | Returns the connection to the server | getConnection | {
"repo_name": "onlychoice/ws-xmpp-proxy",
"path": "src/java/org/jivesoftware/multiplexer/ConnectionWorkerThread.java",
"license": "gpl-2.0",
"size": 21281
} | [
"org.jivesoftware.multiplexer.net.SocketConnection"
] | import org.jivesoftware.multiplexer.net.SocketConnection; | import org.jivesoftware.multiplexer.net.*; | [
"org.jivesoftware.multiplexer"
] | org.jivesoftware.multiplexer; | 1,746,322 |
public AssetStatusDTO findDefaultStatusForItem(int itemId) {
Query query = getSession().getNamedQuery("AssetStatusDTO.findDefaultStatusForItem");
query.setParameter("item_id", itemId);
return (AssetStatusDTO) query.uniqueResult();
} | AssetStatusDTO function(int itemId) { Query query = getSession().getNamedQuery(STR); query.setParameter(STR, itemId); return (AssetStatusDTO) query.uniqueResult(); } | /**
* Find the default status for the ItemTypeDTO (which allows asset management) linked to the item.
*
* @param itemId ItemDTO id
* @return
*/ | Find the default status for the ItemTypeDTO (which allows asset management) linked to the item | findDefaultStatusForItem | {
"repo_name": "WebDataConsulting/billing",
"path": "src/java/com/sapienter/jbilling/server/item/db/AssetStatusDAS.java",
"license": "agpl-3.0",
"size": 2203
} | [
"org.hibernate.Query"
] | import org.hibernate.Query; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 372,497 |
protected List<Order> getOrderList(CriteriaBuilder cb, Root<T> root) {
logger.log(Level.FINEST, "Order list not overridden by subclass. Order will not be specified.");
return null;
}
| List<Order> function(CriteriaBuilder cb, Root<T> root) { logger.log(Level.FINEST, STR); return null; } | /**
* Method that can be overriden by the subclasses to determine the default ordering when using retrieveAll and
* retrieveSome methods. The default implementation returns null, establishing no order.
*
* @param cb
* The criteria builder object, needed to build queries.
* @param root
*... | Method that can be overriden by the subclasses to determine the default ordering when using retrieveAll and retrieveSome methods. The default implementation returns null, establishing no order | getOrderList | {
"repo_name": "manzoli2122/Vip",
"path": "src/br/ufes/inf/nemo/jbutler/ejb/persistence/BaseJPADAO.java",
"license": "apache-2.0",
"size": 32771
} | [
"java.util.List",
"java.util.logging.Level",
"javax.persistence.criteria.CriteriaBuilder",
"javax.persistence.criteria.Order",
"javax.persistence.criteria.Root"
] | import java.util.List; import java.util.logging.Level; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.Order; import javax.persistence.criteria.Root; | import java.util.*; import java.util.logging.*; import javax.persistence.criteria.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 908,368 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.