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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private LogRecord createRcvdLogEntry(String packet) {
LogRecord r = new LogRecord();
r.setSrcIP(remoteIP);
r.setDstIP(localIP);
r.setDstPort(remotePort);
r.setSrcPort(localPort);
r.setPacket(packet);
r.setTimestamp(new Date());
return r;
}
| LogRecord function(String packet) { LogRecord r = new LogRecord(); r.setSrcIP(remoteIP); r.setDstIP(localIP); r.setDstPort(remotePort); r.setSrcPort(localPort); r.setPacket(packet); r.setTimestamp(new Date()); return r; } | /**
* make a LogRecord object for a received packet
* @param packet String
* @return LogRecord with appropriate information
*/ | make a LogRecord object for a received packet | createRcvdLogEntry | {
"repo_name": "twschiller/HoneyRJ",
"path": "src/main/java/edu/wustl/honeyrj/lowinteraction/LIModuleThread.java",
"license": "gpl-2.0",
"size": 7263
} | [
"edu.wustl.honeyrj.logging.LogRecord",
"java.util.Date"
] | import edu.wustl.honeyrj.logging.LogRecord; import java.util.Date; | import edu.wustl.honeyrj.logging.*; import java.util.*; | [
"edu.wustl.honeyrj",
"java.util"
] | edu.wustl.honeyrj; java.util; | 969,487 |
public interface ResourceFactoryConfiguration {
public ResourceFactory userResources();
| interface ResourceFactoryConfiguration { public ResourceFactory function(); | /** This resource factory provides the templates and files to create the multi-tenant admin pages for
authenticated users.
@return a resource factory for authenticated admin users.
*/ | This resource factory provides the templates and files to create the multi-tenant admin pages for | userResources | {
"repo_name": "emily-e/webframework",
"path": "src/main/java/net/metanotion/multitenant/adminapp/AdminAppFactory.java",
"license": "apache-2.0",
"size": 19699
} | [
"net.metanotion.simpletemplate.ResourceFactory"
] | import net.metanotion.simpletemplate.ResourceFactory; | import net.metanotion.simpletemplate.*; | [
"net.metanotion.simpletemplate"
] | net.metanotion.simpletemplate; | 1,536,606 |
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "Inkimar/Mediaserver-RESTful",
"path": "PlayerWebClient/src/main/java/se/media/CreatePlayer.java",
"license": "apache-2.0",
"size": 3532
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 580,869 |
@ServiceMethod(returns = ReturnType.SINGLE)
PollerFlux<PollResult<Void>, Void> beginPowerOffAsync(
String resourceGroupName, String vmName, Boolean skipShutdown); | @ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> beginPowerOffAsync( String resourceGroupName, String vmName, Boolean skipShutdown); | /**
* The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same
* provisioned resources. You are still charged for this virtual machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine.
... | The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine | beginPowerOffAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java",
"license": "mit",
"size": 119505
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.PollerFlux"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 1,953,855 |
private void checkOwner(LockedInodePath inodePath)
throws AccessControlException, InvalidPathException {
// collects inodes info on the path
List<InodeView> inodeList = inodePath.getInodeViewList();
// collects user and groups
String user = AuthenticatedClientUser.getClientUser(ServerConfigurat... | void function(LockedInodePath inodePath) throws AccessControlException, InvalidPathException { List<InodeView> inodeList = inodePath.getInodeViewList(); String user = AuthenticatedClientUser.getClientUser(ServerConfiguration.global()); List<String> groups = getGroups(user); if (isPrivilegedUser(user, groups)) { return;... | /**
* Checks whether the client user is the owner of the path.
*
* @param inodePath path to be checked on
* @throws AccessControlException if permission checking fails
* @throws InvalidPathException if the path is invalid
*/ | Checks whether the client user is the owner of the path | checkOwner | {
"repo_name": "madanadit/alluxio",
"path": "core/server/master/src/main/java/alluxio/master/file/DefaultPermissionChecker.java",
"license": "apache-2.0",
"size": 11788
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,264,699 |
@Test
public void testPackHiddenColumn() {
JXTable table = new JXTable(10, 4);
TableColumnExt columnExt = table.getColumnExt(0);
columnExt.setVisible(false);
try {
table.getColumnFactory().packColumn(table, columnExt, -1, -1);
fail("packColumn is doc'ed to... | void function() { JXTable table = new JXTable(10, 4); TableColumnExt columnExt = table.getColumnExt(0); columnExt.setVisible(false); try { table.getColumnFactory().packColumn(table, columnExt, -1, -1); fail(STR); } catch (IllegalStateException e) { } } | /**
* packColumn can't handle hidden columns.
*
*/ | packColumn can't handle hidden columns | testPackHiddenColumn | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/test/java/org/jdesktop/swingx/table/ColumnFactoryTest.java",
"license": "lgpl-2.1",
"size": 10976
} | [
"org.jdesktop.swingx.JXTable"
] | import org.jdesktop.swingx.JXTable; | import org.jdesktop.swingx.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 863,176 |
public Collection<Board> getNextBoards(final Player player) {
final List<Board> result = new ArrayList<Board>();
for (int i = 0; i < size(); ++i) {
if (isMovePermitted(i, player)) {
final Board newBoard = clone();
newBoard.takeCell(i, player);
result.add(newBoard);
}
}
return resul... | Collection<Board> function(final Player player) { final List<Board> result = new ArrayList<Board>(); for (int i = 0; i < size(); ++i) { if (isMovePermitted(i, player)) { final Board newBoard = clone(); newBoard.takeCell(i, player); result.add(newBoard); } } return result; } | /**
* Returns the {@link Board} instance that correspond to the next possible
* moves for the <tt>player</tt> given.
*
* @param player
* the player for whom the list of possible next boards is to be
* retrieved.
* @return a collection of all the possible next moves for the
... | Returns the <code>Board</code> instance that correspond to the next possible moves for the player given | getNextBoards | {
"repo_name": "asenovm/Reversi",
"path": "src/edu/fmi/ai/reversi/model/Board.java",
"license": "mit",
"size": 10694
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 899,968 |
@Test
public void testRemoveJobFromJobLeaderService() throws Exception {
final TaskSlotTable<Task> taskSlotTable = TaskSlotUtils.createTaskSlotTable(1);
final TaskExecutorLocalStateStoresManager localStateStoresManager =
createTaskExecutorLocalStateStoresManager();
fina... | void function() throws Exception { final TaskSlotTable<Task> taskSlotTable = TaskSlotUtils.createTaskSlotTable(1); final TaskExecutorLocalStateStoresManager localStateStoresManager = createTaskExecutorLocalStateStoresManager(); final TaskManagerServices taskManagerServices = new TaskManagerServicesBuilder() .setUnresol... | /**
* Tests that a job is removed from the JobLeaderService once a TaskExecutor has no more slots
* assigned to this job.
*
* <p>See FLINK-8504
*/ | Tests that a job is removed from the JobLeaderService once a TaskExecutor has no more slots assigned to this job. See FLINK-8504 | testRemoveJobFromJobLeaderService | {
"repo_name": "aljoscha/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java",
"license": "apache-2.0",
"size": 111774
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.flink.runtime.clusterframework.types.AllocationID",
"org.apache.flink.runtime.clusterframework.types.ResourceProfile",
"org.apache.flink.runtime.clusterframework.types.SlotID",
"org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListener",
"org.ap... | import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.clusterframework.types.AllocationID; import org.apache.flink.runtime.clusterframework.types.ResourceProfile; import org.apache.flink.runtime.clusterframework.types.SlotID; import org.apache.flink.runtime.leaderretrieval.LeaderRetrievalListen... | import java.util.concurrent.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.leaderretrieval.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.runtime.resourcemanager.utils.*; import org.apache.flink.runt... | [
"java.util",
"org.apache.flink",
"org.hamcrest",
"org.junit"
] | java.util; org.apache.flink; org.hamcrest; org.junit; | 2,527,956 |
Map<String, Object> getFieldMap(); | Map<String, Object> getFieldMap(); | /**
* Returns a map containing all fields of this record.
* @return a map from column names to the object-based values for
* this record. The map may not be null, though it may be empty.
*/ | Returns a map containing all fields of this record | getFieldMap | {
"repo_name": "hirohanin/sqoop-1.1.0hadoop21",
"path": "src/java/com/cloudera/sqoop/lib/FieldMappable.java",
"license": "apache-2.0",
"size": 1243
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 734,296 |
EList<String> getOwner(); | EList<String> getOwner(); | /**
* Returns the value of the '<em><b>Owner</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Owner</em>' attribute list isn't clear,
* there really should be more of a description here...
* </p>
* <!... | Returns the value of the 'Owner' attribute list. The list contents are of type <code>java.lang.String</code>. If the meaning of the 'Owner' attribute list isn't clear, there really should be more of a description here... | getOwner | {
"repo_name": "ebIX-TT/ebix",
"path": "org.ebix.umm/src-gen/org/ebix/umm/umm/BIELibrary.java",
"license": "gpl-3.0",
"size": 8485
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,850,566 |
public JSONObject getPluginData(){
JSONObject data = new JSONObject();
String pluginName = plugin.getDescription().getName();
String pluginVersion = plugin.getDescription().getVersion();
try{
data.put("pluginName", pluginName); // Append the name of the plugin
data.put("pluginVersion", pluginVersion... | JSONObject function(){ JSONObject data = new JSONObject(); String pluginName = plugin.getDescription().getName(); String pluginVersion = plugin.getDescription().getVersion(); try{ data.put(STR, pluginName); data.put(STR, pluginVersion); JSONArray customCharts = new JSONArray(); for(CustomChart customChart : charts){ JS... | /**
* Gets the plugin specific data.
* This method is called using Reflection.
*
* @return The plugin specific data.
*/ | Gets the plugin specific data. This method is called using Reflection | getPluginData | {
"repo_name": "Dablakbandit/DabCore",
"path": "src/me/dablakbandit/dabcore/metrics/Metrics.java",
"license": "mit",
"size": 19169
} | [
"me.dablakbandit.dabcore.json.JSONArray",
"me.dablakbandit.dabcore.json.JSONObject"
] | import me.dablakbandit.dabcore.json.JSONArray; import me.dablakbandit.dabcore.json.JSONObject; | import me.dablakbandit.dabcore.json.*; | [
"me.dablakbandit.dabcore"
] | me.dablakbandit.dabcore; | 1,329,692 |
private void removeUnusedEntries( Xpp3Dom applicationXmlDom, Xpp3Dom modulemapsXmlDom )
{
for ( Xpp3Dom aModulemapsXmlDomChildren : this.modulemapsXmlDomChildren )
{
if ( aModulemapsXmlDomChildren != null )
{
Xpp3Dom[] newModulemapsXmlDomChildren = modulem... | void function( Xpp3Dom applicationXmlDom, Xpp3Dom modulemapsXmlDom ) { for ( Xpp3Dom aModulemapsXmlDomChildren : this.modulemapsXmlDomChildren ) { if ( aModulemapsXmlDomChildren != null ) { Xpp3Dom[] newModulemapsXmlDomChildren = modulemapsXmlDom.getChildren(); for ( int newIndex = 0; newIndex < newModulemapsXmlDomChil... | /**
* delete all unused entries from the dom-trees.
*
* @param applicationXmlDom dom-tree of application.xml
* @param modulemapsXmlDom dom-tree of modulemaps
*/ | delete all unused entries from the dom-trees | removeUnusedEntries | {
"repo_name": "wcm-io-devops/maven-eclipse-plugin",
"path": "src/main/java/org/apache/maven/plugin/eclipse/writers/rad/RadApplicationXMLWriter.java",
"license": "apache-2.0",
"size": 22320
} | [
"org.codehaus.plexus.util.xml.Xpp3Dom"
] | import org.codehaus.plexus.util.xml.Xpp3Dom; | import org.codehaus.plexus.util.xml.*; | [
"org.codehaus.plexus"
] | org.codehaus.plexus; | 2,251,324 |
public static Map<String, String> getRepositoryNamespaces(
final Session session) throws RepositoryException {
final NamespaceRegistry reg =
session.getWorkspace().getNamespaceRegistry();
return asMap(newHashSet(reg.getPrefixes()),
new Function<String, String... | static Map<String, String> function( final Session session) throws RepositoryException { final NamespaceRegistry reg = session.getWorkspace().getNamespaceRegistry(); return asMap(newHashSet(reg.getPrefixes()), new Function<String, String>() { | /**
* Get a map of JCR prefixes to their URI namespaces
*
* @param session
* @return
* @throws RepositoryException
*/ | Get a map of JCR prefixes to their URI namespaces | getRepositoryNamespaces | {
"repo_name": "mikedurbin/fcrepo4",
"path": "fcrepo-kernel/src/main/java/org/fcrepo/kernel/services/RepositoryService.java",
"license": "apache-2.0",
"size": 11432
} | [
"com.google.common.base.Function",
"com.google.common.collect.Maps",
"java.util.Map",
"javax.jcr.NamespaceRegistry",
"javax.jcr.RepositoryException",
"javax.jcr.Session"
] | import com.google.common.base.Function; import com.google.common.collect.Maps; import java.util.Map; import javax.jcr.NamespaceRegistry; import javax.jcr.RepositoryException; import javax.jcr.Session; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import javax.jcr.*; | [
"com.google.common",
"java.util",
"javax.jcr"
] | com.google.common; java.util; javax.jcr; | 2,116,215 |
private void addChildDiff(
String name, NodeState before, NodeState after) {
EventHandler h = handler.getChildHandler(name, before, after);
if (h != null) {
continuations.addFirst(new Continuation(h, before, after, 0));
}
} | void function( String name, NodeState before, NodeState after) { EventHandler h = handler.getChildHandler(name, before, after); if (h != null) { continuations.addFirst(new Continuation(h, before, after, 0)); } } | /**
* Schedules a continuation for processing changes within the given
* child node, if changes within that subtree should be processed.
*/ | Schedules a continuation for processing changes within the given child node, if changes within that subtree should be processed | addChildDiff | {
"repo_name": "code-distillery/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventGenerator.java",
"license": "apache-2.0",
"size": 13814
} | [
"org.apache.jackrabbit.oak.spi.state.NodeState"
] | import org.apache.jackrabbit.oak.spi.state.NodeState; | import org.apache.jackrabbit.oak.spi.state.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 2,040,633 |
public List<DimensionalObject> getDimensionsAndFilters( DimensionType dimensionType )
{
return getDimensionsAndFilters().stream()
.filter( d -> dimensionType == d.getDimensionType() )
.collect( Collectors.toList() );
} | List<DimensionalObject> function( DimensionType dimensionType ) { return getDimensionsAndFilters().stream() .filter( d -> dimensionType == d.getDimensionType() ) .collect( Collectors.toList() ); } | /**
* Returns a list of dimensions and filters of the given dimension type.
*/ | Returns a list of dimensions and filters of the given dimension type | getDimensionsAndFilters | {
"repo_name": "hispindia/dhis2-Core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java",
"license": "bsd-3-clause",
"size": 105104
} | [
"java.util.List",
"java.util.stream.Collectors",
"org.hisp.dhis.common.DimensionType",
"org.hisp.dhis.common.DimensionalObject"
] | import java.util.List; import java.util.stream.Collectors; import org.hisp.dhis.common.DimensionType; import org.hisp.dhis.common.DimensionalObject; | import java.util.*; import java.util.stream.*; import org.hisp.dhis.common.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 775,135 |
@SuppressWarnings("unchecked")
public void testSuccessfulAsList_logging_error() throws Exception {
assertEquals(Lists.newArrayList((Object) null),
Futures.successfulAsList(
immediateFailedFuture(new MyError())).get());
List<LogRecord> logged = aggregateFutureLogHandler.getStoredLogRecord... | @SuppressWarnings(STR) void function() throws Exception { assertEquals(Lists.newArrayList((Object) null), Futures.successfulAsList( immediateFailedFuture(new MyError())).get()); List<LogRecord> logged = aggregateFutureLogHandler.getStoredLogRecords(); assertEquals(1, logged.size()); assertTrue(logged.get(0).getThrown()... | /**
* Ensure that errors are always logged.
*/ | Ensure that errors are always logged | testSuccessfulAsList_logging_error | {
"repo_name": "sunbeansoft/guava",
"path": "guava-tests/test/com/google/common/util/concurrent/FuturesTest.java",
"license": "apache-2.0",
"size": 136171
} | [
"com.google.common.collect.Lists",
"com.google.common.util.concurrent.Futures",
"java.util.List",
"java.util.logging.LogRecord"
] | import com.google.common.collect.Lists; import com.google.common.util.concurrent.Futures; import java.util.List; import java.util.logging.LogRecord; | import com.google.common.collect.*; import com.google.common.util.concurrent.*; import java.util.*; import java.util.logging.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,101,919 |
protected boolean checkIfHeaders(HttpServletRequest request, HttpServletResponse response,
RepositoryItemAttributes resourceAttributes) throws IOException {
// TODO Investigate how to load properties for RepositoryItem (Mongo or
// Filesystem)
return checkIfMatch(request, response, resourceAttribu... | boolean function(HttpServletRequest request, HttpServletResponse response, RepositoryItemAttributes resourceAttributes) throws IOException { return checkIfMatch(request, response, resourceAttributes) && checkIfModifiedSince(request, response, resourceAttributes) && checkIfNoneMatch(request, response, resourceAttributes... | /**
* Check if the conditions specified in the optional If headers are satisfied.
*
* @param request
* The servlet request we are processing
* @param response
* The servlet response we are creating
* @param resourceAttributes
* The resource information
* @return boo... | Check if the conditions specified in the optional If headers are satisfied | checkIfHeaders | {
"repo_name": "EugenioFidel/kurento-java",
"path": "kurento-repository/kurento-repository-internal/src/main/java/org/kurento/repository/internal/http/RepositoryHttpServlet.java",
"license": "lgpl-2.1",
"size": 40921
} | [
"java.io.IOException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.kurento.repository.RepositoryItemAttributes"
] | import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.kurento.repository.RepositoryItemAttributes; | import java.io.*; import javax.servlet.http.*; import org.kurento.repository.*; | [
"java.io",
"javax.servlet",
"org.kurento.repository"
] | java.io; javax.servlet; org.kurento.repository; | 2,108,293 |
public static boolean getBoolean(Element element) {
return "true".equals((String) element.getValue());
} | static boolean function(Element element) { return "true".equals((String) element.getValue()); } | /**
* Get the value of an element converted from a String ("true" or "false")
*
* @param element Element that contains the value
* @return the value converted from a String
**/ | Get the value of an element converted from a String ("true" or "false") | getBoolean | {
"repo_name": "johnjianfang/jxse",
"path": "src/main/java/net/jxta/util/documentSerializable/DocumentSerializableUtilities.java",
"license": "apache-2.0",
"size": 24377
} | [
"net.jxta.document.Element"
] | import net.jxta.document.Element; | import net.jxta.document.*; | [
"net.jxta.document"
] | net.jxta.document; | 1,514,289 |
public AppRegistration getAppRegistration() {
return _appRegistration;
} | AppRegistration function() { return _appRegistration; } | /**
* Get the AppRegistration for this App
* @return What I said
*/ | Get the AppRegistration for this App | getAppRegistration | {
"repo_name": "KritikalFabric/corefabric.io",
"path": "src/contrib/java/com/cisco/qte/jdtn/apps/AbstractApp.java",
"license": "apache-2.0",
"size": 11619
} | [
"com.cisco.qte.jdtn.bp.AppRegistration"
] | import com.cisco.qte.jdtn.bp.AppRegistration; | import com.cisco.qte.jdtn.bp.*; | [
"com.cisco.qte"
] | com.cisco.qte; | 604,249 |
private void prepareCopyNotTemplate(MoveOrCopyImageGroupParameters parameters) {
parameters.setAddImageDomainMapping(false);
Guid newImageId = Guid.newGuid();
Guid newId = Guid.newGuid();
DiskImage image = getImage();
image.setId(newId);
image.setImageId(newImageId)... | void function(MoveOrCopyImageGroupParameters parameters) { parameters.setAddImageDomainMapping(false); Guid newImageId = Guid.newGuid(); Guid newId = Guid.newGuid(); DiskImage image = getImage(); image.setId(newId); image.setImageId(newImageId); image.setDiskAlias(getDiskAlias()); image.setStorageIds(new ArrayList<>())... | /**
* Prepares the copy of the VM disks and floating disks
*/ | Prepares the copy of the VM disks and floating disks | prepareCopyNotTemplate | {
"repo_name": "OpenUniversity/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/MoveOrCopyDiskCommand.java",
"license": "apache-2.0",
"size": 22562
} | [
"java.util.ArrayList",
"org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters",
"org.ovirt.engine.core.common.businessentities.storage.DiskImage",
"org.ovirt.engine.core.common.businessentities.storage.ImageStatus",
"org.ovirt.engine.core.compat.Guid"
] | import java.util.ArrayList; import org.ovirt.engine.core.common.action.MoveOrCopyImageGroupParameters; import org.ovirt.engine.core.common.businessentities.storage.DiskImage; import org.ovirt.engine.core.common.businessentities.storage.ImageStatus; import org.ovirt.engine.core.compat.Guid; | import java.util.*; import org.ovirt.engine.core.common.action.*; import org.ovirt.engine.core.common.businessentities.storage.*; import org.ovirt.engine.core.compat.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 2,580,541 |
public static String getSAMLRequestURLWithSignature(AuthnRequestType authRequest, String relayState, PrivateKey signingKey)
throws SAXException, IOException, GeneralSecurityException {
SAML2Request saml2Request = new SAML2Request();
// Deal with the original request
StringWriter... | static String function(AuthnRequestType authRequest, String relayState, PrivateKey signingKey) throws SAXException, IOException, GeneralSecurityException { SAML2Request saml2Request = new SAML2Request(); StringWriter sw = new StringWriter(); saml2Request.marshall(authRequest, sw); String urlEncodedRequest = RedirectBin... | /**
* Get the URL for the SAML request that contains the signature and signature algorithm
*
* @param authRequest
* @param relayState
* @param signingKey
*
* @return
*
* @throws SAXException
* @throws IOException
* @throws GeneralSecurityException
*/ | Get the URL for the SAML request that contains the signature and signature algorithm | getSAMLRequestURLWithSignature | {
"repo_name": "agolPL/keycloak",
"path": "saml-core/src/main/java/org/keycloak/saml/processing/web/util/RedirectBindingSignatureUtil.java",
"license": "apache-2.0",
"size": 13352
} | [
"java.io.IOException",
"java.io.StringWriter",
"java.net.URLEncoder",
"java.security.GeneralSecurityException",
"java.security.PrivateKey",
"org.keycloak.dom.saml.v2.protocol.AuthnRequestType",
"org.keycloak.saml.common.constants.GeneralConstants",
"org.keycloak.saml.processing.api.saml.v2.request.SAM... | import java.io.IOException; import java.io.StringWriter; import java.net.URLEncoder; import java.security.GeneralSecurityException; import java.security.PrivateKey; import org.keycloak.dom.saml.v2.protocol.AuthnRequestType; import org.keycloak.saml.common.constants.GeneralConstants; import org.keycloak.saml.processing.... | import java.io.*; import java.net.*; import java.security.*; import org.keycloak.dom.saml.v2.protocol.*; import org.keycloak.saml.common.constants.*; import org.keycloak.saml.processing.api.saml.v2.request.*; import org.xml.sax.*; | [
"java.io",
"java.net",
"java.security",
"org.keycloak.dom",
"org.keycloak.saml",
"org.xml.sax"
] | java.io; java.net; java.security; org.keycloak.dom; org.keycloak.saml; org.xml.sax; | 2,029,970 |
public boolean doInteractHeadless() {
boolean result;
PlaceholderFile[] files;
String[] filesStr;
Properties props;
String msg;
int i;
PlaceholderDirectory initialDir;
PlaceholderFile[] initialFiles;
String[] initialFilesStr;
result = false;
m_Queue.clear(... | boolean function() { boolean result; PlaceholderFile[] files; String[] filesStr; Properties props; String msg; int i; PlaceholderDirectory initialDir; PlaceholderFile[] initialFiles; String[] initialFilesStr; result = false; m_Queue.clear(); initialDir = m_InitialDirectory; initialFiles = m_InitialFiles; initialFilesSt... | /**
* Performs the interaction with the user in a headless environment.
*
* @return true if successfully interacted
*/ | Performs the interaction with the user in a headless environment | doInteractHeadless | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/source/SelectFile.java",
"license": "gpl-3.0",
"size": 31663
} | [
"java.io.File",
"java.util.logging.Level"
] | import java.io.File; import java.util.logging.Level; | import java.io.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,003,536 |
public boolean run(DatabaseRegistryEntry dbre) {
boolean result = true;
result &= uniqueRegion(dbre);
return result;
} | boolean function(DatabaseRegistryEntry dbre) { boolean result = true; result &= uniqueRegion(dbre); return result; } | /**
* Check the data in the assembly_exception table. Note referential integrity checks are done in CoreForeignKeys.
*
* @param dbre
* The database to use.
* @return Result.
*/ | Check the data in the assembly_exception table. Note referential integrity checks are done in CoreForeignKeys | run | {
"repo_name": "Ensembl/ensj-healthcheck",
"path": "src/org/ensembl/healthcheck/testcase/generic/AssemblyExceptionTableUniqueRegion.java",
"license": "apache-2.0",
"size": 2802
} | [
"org.ensembl.healthcheck.DatabaseRegistryEntry"
] | import org.ensembl.healthcheck.DatabaseRegistryEntry; | import org.ensembl.healthcheck.*; | [
"org.ensembl.healthcheck"
] | org.ensembl.healthcheck; | 1,564,152 |
private boolean checkWriteConfiguration() {
if (!m_fieldconfiguration.getFields().isEmpty()) {
Iterator itFields = m_fieldconfiguration.getFields().iterator();
while (itFields.hasNext()) {
CmsSearchField field = (CmsSearchField)itFields.next();
if (fi... | boolean function() { if (!m_fieldconfiguration.getFields().isEmpty()) { Iterator itFields = m_fieldconfiguration.getFields().iterator(); while (itFields.hasNext()) { CmsSearchField field = (CmsSearchField)itFields.next(); if (field.getMappings().isEmpty()) { return false; } } return true; } return false; } | /**
* Checks the configuration to write.<p>
*
* @return true if configuration is valid, otherwise false
*/ | Checks the configuration to write | checkWriteConfiguration | {
"repo_name": "serrapos/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/searchindex/A_CmsFieldConfigurationDialog.java",
"license": "lgpl-2.1",
"size": 10646
} | [
"java.util.Iterator",
"org.opencms.search.fields.CmsSearchField"
] | import java.util.Iterator; import org.opencms.search.fields.CmsSearchField; | import java.util.*; import org.opencms.search.fields.*; | [
"java.util",
"org.opencms.search"
] | java.util; org.opencms.search; | 381,914 |
@Test
public void toArrayObjectArrayLarger() {
final SourceLocation[] arrayArgument = new SourceLocation[3];
arrayArgument[2] = SOURCE_LOCATION_LIST.get(0); // set this array item to test that null is written to it
final SourceLocation[] array = SUB_LIST_1_3.toArray(arrayArgument);
... | void function() { final SourceLocation[] arrayArgument = new SourceLocation[3]; arrayArgument[2] = SOURCE_LOCATION_LIST.get(0); final SourceLocation[] array = SUB_LIST_1_3.toArray(arrayArgument); assertThat(array, is(sameInstance(arrayArgument))); for (int i = 0; i < 2; i++) { assertThat(array[i], is(sameInstance(SOURC... | /**
* Asserts that {@link SourceLocationList.SubList#toArray(Object[])} returns the specified array filled with the sublist's
* elements, followed by a <code>null</code> elements when the specified array's length is greater than the sublist's size.
*/ | Asserts that <code>SourceLocationList.SubList#toArray(Object[])</code> returns the specified array filled with the sublist's elements, followed by a <code>null</code> elements when the specified array's length is greater than the sublist's size | toArrayObjectArrayLarger | {
"repo_name": "reasm/reasm-core",
"path": "src/test/java/org/reasm/source/SourceLocationListSubListTest.java",
"license": "mit",
"size": 11341
} | [
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import org.hamcrest.Matchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 28,005 |
public final static MXFFile readPartitions(
String fileName)
throws NullPointerException {
if (fileName == null)
throw new NullPointerException("Cannot open a file using a null filename.");
MXFFile mxfFile = new MXFFileImpl();
try {
if (mxfFile.open(fileName, false)) {
System.out.println("MXF... | final static MXFFile function( String fileName) throws NullPointerException { if (fileName == null) throw new NullPointerException(STR); MXFFile mxfFile = new MXFFileImpl(); try { if (mxfFile.open(fileName, false)) { System.out.println(STR + fileName + STR + mxfFile.getRunInSize() + "."); } else { System.err.println(ST... | /**
* <p>Read and return access to an MXF file with the given file name, building the partition tables
* in the process. If an error occurs when reading the file, access to the file is still returned for
* reasons of application-specific diagnosis.</p>
*
* @param fileName Name of an MXF file to read.
* @ret... | Read and return access to an MXF file with the given file name, building the partition tables in the process. If an error occurs when reading the file, access to the file is still returned for reasons of application-specific diagnosis | readPartitions | {
"repo_name": "AMWA-TV/maj",
"path": "src/main/java/tv/amwa/maj/io/mxf/MXFFactory.java",
"license": "apache-2.0",
"size": 10819
} | [
"tv.amwa.maj.io.mxf.impl.MXFFileImpl"
] | import tv.amwa.maj.io.mxf.impl.MXFFileImpl; | import tv.amwa.maj.io.mxf.impl.*; | [
"tv.amwa.maj"
] | tv.amwa.maj; | 1,146,614 |
public void setDimensionsChanged(boolean dimensionsChanged)
{
this.dimensionsChanged.setValue(dimensionsChanged);
}
private transient ArrayList<ChangeListener> changeListenerList =
new ArrayList<ChangeListener>(); | void function(boolean dimensionsChanged) { this.dimensionsChanged.setValue(dimensionsChanged); } private transient ArrayList<ChangeListener> changeListenerList = new ArrayList<ChangeListener>(); | /**
* Set the value of dimensionsChanged
*
* @param dimensionsChanged new value of dimensionsChanged
*/ | Set the value of dimensionsChanged | setDimensionsChanged | {
"repo_name": "IcmVis/VisNow-Pro",
"path": "src/pl/edu/icm/visnow/lib/basic/mappers/SegmentedSurfaces/Params.java",
"license": "gpl-3.0",
"size": 7466
} | [
"java.util.ArrayList",
"javax.swing.event.ChangeListener"
] | import java.util.ArrayList; import javax.swing.event.ChangeListener; | import java.util.*; import javax.swing.event.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 2,531,659 |
void scan() throws IOException; | void scan() throws IOException; | /**
* Scan for new keys.
* @throws IOException If an I/O Error occurs
*/ | Scan for new keys | scan | {
"repo_name": "devhub-tud/Java-Gitolite-Manager",
"path": "src/main/java/nl/tudelft/ewi/gitolite/keystore/KeyStore.java",
"license": "apache-2.0",
"size": 990
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 28,927 |
final float defaultSize = 12f * scaleFactor;
mainFont = null;
if (fontName != null) {
Font font = Font.decode(fontName);
if (font != null) {
font = font.deriveFont(defaultSize);
mainFont = font;
return font;
}
... | final float defaultSize = 12f * scaleFactor; mainFont = null; if (fontName != null) { Font font = Font.decode(fontName); if (font != null) { font = font.deriveFont(defaultSize); mainFont = font; return font; } logger.warning(STR + fontName); } return ResourceManager.getFont(STR).deriveFont(defaultSize); } | /**
* Create a default <code>Font</code> set on initialization of the GUI.
*
* @param fontName Can be used to choose a different font from a
* user-provided name.
* @param scaleFactor The applied scale factor.
*/ | Create a default <code>Font</code> set on initialization of the GUI | createMainFont | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "src/net/sf/freecol/client/gui/FontLibrary.java",
"license": "gpl-2.0",
"size": 10670
} | [
"java.awt.Font",
"net.sf.freecol.common.resources.ResourceManager"
] | import java.awt.Font; import net.sf.freecol.common.resources.ResourceManager; | import java.awt.*; import net.sf.freecol.common.resources.*; | [
"java.awt",
"net.sf.freecol"
] | java.awt; net.sf.freecol; | 2,291,783 |
public static boolean isKeepCubeHierarchyOnSeries( Chart cm )
{
return getBooleanProperty( cm,
EXTENDED_PROPERTY_HIERARCHY_SERIES,
ChartUtil.compareVersion( cm.getVersion( ), "2.5.3" ) > 0 ); //$NON-NLS-1$
} | static boolean function( Chart cm ) { return getBooleanProperty( cm, EXTENDED_PROPERTY_HIERARCHY_SERIES, ChartUtil.compareVersion( cm.getVersion( ), "2.5.3" ) > 0 ); } | /**
* Returns if cube hierarchy should be kept on series
*
* @param cm
* chart model
* @return result
*/ | Returns if cube hierarchy should be kept on series | isKeepCubeHierarchyOnSeries | {
"repo_name": "Charling-Huang/birt",
"path": "chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/api/ChartItemUtil.java",
"license": "epl-1.0",
"size": 60015
} | [
"org.eclipse.birt.chart.model.Chart",
"org.eclipse.birt.chart.util.ChartUtil"
] | import org.eclipse.birt.chart.model.Chart; import org.eclipse.birt.chart.util.ChartUtil; | import org.eclipse.birt.chart.model.*; import org.eclipse.birt.chart.util.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,675,061 |
@NonNull
@Override
//TODO: Finbugs: new DNSSDServiceCreator<BonjourService> should be a static class (Performance issue ???)
public Flowable<BonjourService> browse(@NonNull final String regType, @NonNull final String domain) {
return createFlowable(emitter ->
mDNSSD.browse(0, DNS... | Flowable<BonjourService> function(@NonNull final String regType, @NonNull final String domain) { return createFlowable(emitter -> mDNSSD.browse(0, DNSSD.ALL_INTERFACES, regType, domain, new Rx2BrowseListener(emitter))); } | /**
* Browse for instances of a service.<P>
*
* @param regType The registration type being browsed for followed by the protocol, separated by a
* dot (e.g. "_ftp._tcp"). The transport protocol must be "_tcp" or "_udp".
* <p>
* @param domain If non-null, speci... | Browse for instances of a service | browse | {
"repo_name": "andriydruk/RxDNSSD",
"path": "rx2dnssd/src/main/java/com/github/druk/rx2dnssd/Rx2DnssdCommon.java",
"license": "apache-2.0",
"size": 10846
} | [
"androidx.annotation.NonNull",
"io.reactivex.Flowable"
] | import androidx.annotation.NonNull; import io.reactivex.Flowable; | import androidx.annotation.*; import io.reactivex.*; | [
"androidx.annotation",
"io.reactivex"
] | androidx.annotation; io.reactivex; | 38,222 |
private void setMutableAttributes(Region region) {
AttributesMutator mutator = region.getAttributesMutator();
RegionAttributesCreation attrs = this.attrs;
if (attrs.hasCacheListeners()) {
mutator.initCacheListeners(attrs.getCacheListeners());
}
if (attrs.hasCacheLoader()) {
mutator.... | void function(Region region) { AttributesMutator mutator = region.getAttributesMutator(); RegionAttributesCreation attrs = this.attrs; if (attrs.hasCacheListeners()) { mutator.initCacheListeners(attrs.getCacheListeners()); } if (attrs.hasCacheLoader()) { mutator.setCacheLoader(attrs.getCacheLoader()); } if (attrs.hasCa... | /**
* Sets the mutable attributes of the given region based on the attributes of this
* <code>RegionCreation</code>. This allows us to modify the attributes of an existing region
* using a cache.xml file.
*
* @see AttributesMutator
*/ | Sets the mutable attributes of the given region based on the attributes of this <code>RegionCreation</code>. This allows us to modify the attributes of an existing region using a cache.xml file | setMutableAttributes | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/RegionCreation.java",
"license": "apache-2.0",
"size": 30324
} | [
"org.apache.geode.cache.AttributesMutator",
"org.apache.geode.cache.Region"
] | import org.apache.geode.cache.AttributesMutator; import org.apache.geode.cache.Region; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,317,274 |
public void doResume() {
// Move the real time clock up to now
synchronized (mSurfaceHolder) {
Log.d("GameThread", "doResume - resuming main loop");
if (mPaused) {
mPaused = false;
}
}
}
| void function() { synchronized (mSurfaceHolder) { Log.d(STR, STR); if (mPaused) { mPaused = false; } } } | /**
* Resumes from a pause.
*/ | Resumes from a pause | doResume | {
"repo_name": "johnny9/scorched_android",
"path": "src/edu/uiuc/android/scorch/GameThread.java",
"license": "gpl-3.0",
"size": 29707
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,820,107 |
Application getApplication(); | Application getApplication(); | /**
* Return the current application.
*
* @return The current application.
*/ | Return the current application | getApplication | {
"repo_name": "wichtounet/jtheque-core",
"path": "jtheque-core/src/main/java/org/jtheque/core/Core.java",
"license": "apache-2.0",
"size": 3782
} | [
"org.jtheque.core.application.Application"
] | import org.jtheque.core.application.Application; | import org.jtheque.core.application.*; | [
"org.jtheque.core"
] | org.jtheque.core; | 2,457,850 |
public static Animation createScaleDownAnimation() {
return createScaleDownAnimation(DEFAULT_DURATION);
} | static Animation function() { return createScaleDownAnimation(DEFAULT_DURATION); } | /**
* Function to create a scale down animation with the default duration from 100% to 50%
* @return the scale down animation
*/ | Function to create a scale down animation with the default duration from 100% to 50% | createScaleDownAnimation | {
"repo_name": "amritsinghbains/Mobile-applications",
"path": "Practice Handwriting/source-code/PracticeHandwriting/app/src/main/java/org/buildmlearn/practicehandwriting/helper/Animator.java",
"license": "bsd-3-clause",
"size": 7697
} | [
"android.view.animation.Animation"
] | import android.view.animation.Animation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 2,685,210 |
public ModelAndView handleHelpKKDBilledkunstReportPage03(HttpServletRequest request,
HttpServletResponse response) throws ServletException {
String viewName = "kkdBilledkunstHelpScreenPage03View";
return new ModelAndView(viewName);
} | ModelAndView function(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = STR; return new ModelAndView(viewName); } | /**
* Custom handler handleHelpKKDBilledkunstReportPage03.
*
* @param request current HTTP request
* @param response current HTTP response
* @return a ModelAndView to render the response
*/ | Custom handler handleHelpKKDBilledkunstReportPage03 | handleHelpKKDBilledkunstReportPage03 | {
"repo_name": "NationalLibraryOfNorway/Bibliotekstatistikk",
"path": "abmstatistikk-main/src/main/java/no/abmu/abmstatistikk/web/ABMStatistikkHelpController.java",
"license": "gpl-2.0",
"size": 61831
} | [
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.springframework.web.servlet.ModelAndView"
] | import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; | import javax.servlet.*; import javax.servlet.http.*; import org.springframework.web.servlet.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 2,867,012 |
public void appendLocalVariableLabel(ILocalVariable localVariable, long flags) {
if (getFlag(flags, JavaElementLabels.F_PRE_TYPE_SIGNATURE)) {
appendTypeSignatureLabel(localVariable, localVariable.getTypeSignature(), flags);
fBuffer.append(' ');
}
if (getFlag(flags, JavaElementLabels.F_FULLY_QUALIFIED))... | void function(ILocalVariable localVariable, long flags) { if (getFlag(flags, JavaElementLabels.F_PRE_TYPE_SIGNATURE)) { appendTypeSignatureLabel(localVariable, localVariable.getTypeSignature(), flags); fBuffer.append(' '); } if (getFlag(flags, JavaElementLabels.F_FULLY_QUALIFIED)) { appendElementLabel(localVariable.get... | /**
* Appends the styled label for a local variable.
*
* @param localVariable the element to render
* @param flags the rendering flags. Flags with names starting with 'F_' are considered.
*/ | Appends the styled label for a local variable | appendLocalVariableLabel | {
"repo_name": "trylimits/Eclipse-Postfix-Code-Completion-Juno38",
"path": "juno38/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabelComposer.java",
"license": "epl-1.0",
"size": 54009
} | [
"org.eclipse.jdt.core.ILocalVariable",
"org.eclipse.jdt.ui.JavaElementLabels"
] | import org.eclipse.jdt.core.ILocalVariable; import org.eclipse.jdt.ui.JavaElementLabels; | import org.eclipse.jdt.core.*; import org.eclipse.jdt.ui.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 800,160 |
// We actually throw the exceptions mentioned in the
void checkTableModifiable(final TableName tableName)
throws IOException, TableNotFoundException, TableNotDisabledException; | void checkTableModifiable(final TableName tableName) throws IOException, TableNotFoundException, TableNotDisabledException; | /**
* Check table is modifiable; i.e. exists and is offline.
* @param tableName Name of table to check.
* @throws TableNotDisabledException
* @throws TableNotFoundException
* @throws IOException
*/ | Check table is modifiable; i.e. exists and is offline | checkTableModifiable | {
"repo_name": "toshimasa-nasu/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterServices.java",
"license": "apache-2.0",
"size": 8252
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.TableNotDisabledException",
"org.apache.hadoop.hbase.TableNotFoundException"
] | import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.TableNotDisabledException; import org.apache.hadoop.hbase.TableNotFoundException; | import java.io.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 93,632 |
List<File> generateMixinJavaFiles(MultiFileOutputOptions options, ArgumentNameSource argumentNameSource,
Class<?>... delegateClasses) throws IOException; | List<File> generateMixinJavaFiles(MultiFileOutputOptions options, ArgumentNameSource argumentNameSource, Class<?>... delegateClasses) throws IOException; | /**
* Generate and write multiple wrapping mix-in interface files
*
* @param argumentNameSource
* Source of names for method arguments
* @param delegateClasses
* Classes whose static methods will be called by the generated
* mix-in interfaces
* @return The .java file wh... | Generate and write multiple wrapping mix-in interface files | generateMixinJavaFiles | {
"repo_name": "aro-tech/interface-it",
"path": "src/main/java/com/github/aro_tech/interface_it/api/MixinCodeGenerator.java",
"license": "mpl-2.0",
"size": 1826
} | [
"com.github.aro_tech.interface_it.meta.arguments.ArgumentNameSource",
"java.io.File",
"java.io.IOException",
"java.util.List"
] | import com.github.aro_tech.interface_it.meta.arguments.ArgumentNameSource; import java.io.File; import java.io.IOException; import java.util.List; | import com.github.aro_tech.interface_it.meta.arguments.*; import java.io.*; import java.util.*; | [
"com.github.aro_tech",
"java.io",
"java.util"
] | com.github.aro_tech; java.io; java.util; | 1,460,520 |
private void setPatient() {
if (!GenericValidator.isBlankOrNull(webData.getPatientId())) {
patient = patientDAO.readPatient(webData.getPatientId());
} else if (!GenericValidator.isBlankOrNull(webData.getNationalId())) {
patient = patientDAO.getPatientByNationalId(webData.getNationalId());
}
if (patie... | void function() { if (!GenericValidator.isBlankOrNull(webData.getPatientId())) { patient = patientDAO.readPatient(webData.getPatientId()); } else if (!GenericValidator.isBlankOrNull(webData.getNationalId())) { patient = patientDAO.getPatientByNationalId(webData.getNationalId()); } if (patient == null) { insertPatient =... | /**
* This is for when patients can not be added through the form
*/ | This is for when patients can not be added through the form | setPatient | {
"repo_name": "kalwar/openelisglobal-core",
"path": "app/src/us/mn/state/health/lims/qaevent/worker/NonConformityUpdateWorker.java",
"license": "mpl-2.0",
"size": 31843
} | [
"org.apache.commons.validator.GenericValidator",
"us.mn.state.health.lims.patient.util.PatientUtil",
"us.mn.state.health.lims.patient.valueholder.Patient"
] | import org.apache.commons.validator.GenericValidator; import us.mn.state.health.lims.patient.util.PatientUtil; import us.mn.state.health.lims.patient.valueholder.Patient; | import org.apache.commons.validator.*; import us.mn.state.health.lims.patient.util.*; import us.mn.state.health.lims.patient.valueholder.*; | [
"org.apache.commons",
"us.mn.state"
] | org.apache.commons; us.mn.state; | 713,329 |
GetWalks getWalks(); | GetWalks getWalks(); | /**
* Generates an example for the {@link GetWalks} operation.
*
* @return the example class for GetWalks
*/ | Generates an example for the <code>GetWalks</code> operation | getWalks | {
"repo_name": "GovernmentCommunicationsHeadquarters/Gaffer",
"path": "rest-api/core-rest/src/main/java/uk/gov/gchq/gaffer/rest/service/v2/example/ExamplesFactory.java",
"license": "apache-2.0",
"size": 4243
} | [
"uk.gov.gchq.gaffer.operation.impl.GetWalks"
] | import uk.gov.gchq.gaffer.operation.impl.GetWalks; | import uk.gov.gchq.gaffer.operation.impl.*; | [
"uk.gov.gchq"
] | uk.gov.gchq; | 922,627 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(MediatorsPackage.Literals.ROUTER_MEDIATOR__ROUTES);
}
return childrenFeatures;
}
| Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(MediatorsPackage.Literals.ROUTER_MEDIATOR__ROUTES); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "thiliniish/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb.edit/src/org/wso2/developerstudio/eclipse/esb/mediators/provider/RouterMediatorItemProvider.java",
"license": "apache-2.0",
"size": 6886
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.wso2.developerstudio.eclipse.esb.mediators.MediatorsPackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.wso2.developerstudio.eclipse.esb.mediators.*; | [
"java.util",
"org.eclipse.emf",
"org.wso2.developerstudio"
] | java.util; org.eclipse.emf; org.wso2.developerstudio; | 109,338 |
private List<String[]> formatResults(ResultSet results) throws SQLException
{
List<String[]> rows = new ArrayList<String[]>();
while (results.next())
{
String[] cols = new String[8];
cols[0] = String.valueOf(results.getLong("itemID"));
cols[1] = results.getString("title");
cols[2] = results.getStr... | List<String[]> function(ResultSet results) throws SQLException { List<String[]> rows = new ArrayList<String[]>(); while (results.next()) { String[] cols = new String[8]; cols[0] = String.valueOf(results.getLong(STR)); cols[1] = results.getString("title"); cols[2] = results.getString(STR); cols[3] = results.getString("b... | /**
* formats the ResultSet (returned from the executed query) as a string
* @param results the ResultSet (post query execution)
* @return String containing the formatted results.
* @throws SQLException
*/ | formats the ResultSet (returned from the executed query) as a string | formatResults | {
"repo_name": "jpchanson/OpenDMS",
"path": "src/tomoBay/model/sql/queries/concreteQueries/SelectEbayItemsError.java",
"license": "gpl-3.0",
"size": 3807
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 181,439 |
List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource) throws ResourceNotExistsException, ServiceNotExistsException; | List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource) throws ResourceNotExistsException, ServiceNotExistsException; | /**
* Get resource attributes which are required by the service.
* <p>
* PRIVILEGE: Get only those required attributes principal has access to.
*
* @param sess perun session
* @param resource resource for which you want to get the attributes
* @param service attributes required by this service you'll... | Get resource attributes which are required by the service. | getRequiredAttributes | {
"repo_name": "zoraseb/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/AttributesManager.java",
"license": "bsd-2-clause",
"size": 265364
} | [
"cz.metacentrum.perun.core.api.exceptions.ResourceNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.exceptions.ResourceNotExistsException; import cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException; import java.util.List; | import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,122,827 |
public DataNode setDescription(IDataset description); | DataNode function(IDataset description); | /**
* Description of the sample
*
* @param description the description
*/ | Description of the sample | setDescription | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsample.java",
"license": "epl-1.0",
"size": 49075
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode",
"org.eclipse.january.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*; | [
"org.eclipse.dawnsci",
"org.eclipse.january"
] | org.eclipse.dawnsci; org.eclipse.january; | 1,097,843 |
boolean isButtonActive(CmsJspActionElement jsp, String resourceName); | boolean isButtonActive(CmsJspActionElement jsp, String resourceName); | /**
* Returns true if the customized button should be active, otherwise false.<p>
*
* @param jsp the JSP action element
* @param resourceName the name of the edited resource
* @return true if the customized button should be active, otherwise false
*/ | Returns true if the customized button should be active, otherwise false | isButtonActive | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/workplace/editors/I_CmsEditorActionHandler.java",
"license": "lgpl-2.1",
"size": 8212
} | [
"org.opencms.jsp.CmsJspActionElement"
] | import org.opencms.jsp.CmsJspActionElement; | import org.opencms.jsp.*; | [
"org.opencms.jsp"
] | org.opencms.jsp; | 2,442,809 |
private Analyzer randomAnalyzer() {
switch(random().nextInt(3)) {
case 0: return new MockAnalyzer(random(), MockTokenizer.SIMPLE, true);
case 1: return new MockAnalyzer(random(), MockTokenizer.SIMPLE, true, MockTokenFilter.ENGLISH_STOPSET, true);
default: return new MockAnalyzer(random(), MockTo... | Analyzer function() { switch(random().nextInt(3)) { case 0: return new MockAnalyzer(random(), MockTokenizer.SIMPLE, true); case 1: return new MockAnalyzer(random(), MockTokenizer.SIMPLE, true, MockTokenFilter.ENGLISH_STOPSET, true); default: return new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false); } } privat... | /**
* Return a random analyzer (Simple, Stop, Standard) to analyze the terms.
*/ | Return a random analyzer (Simple, Stop, Standard) to analyze the terms | randomAnalyzer | {
"repo_name": "terrancesnyder/solr-analytics",
"path": "lucene/memory/src/test/org/apache/lucene/index/memory/MemoryIndexTest.java",
"license": "apache-2.0",
"size": 10585
} | [
"org.apache.lucene.analysis.Analyzer",
"org.apache.lucene.analysis.MockAnalyzer",
"org.apache.lucene.analysis.MockTokenFilter",
"org.apache.lucene.analysis.MockTokenizer",
"org.apache.lucene.index.Term"
] | import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.analysis.MockTokenFilter; import org.apache.lucene.analysis.MockTokenizer; import org.apache.lucene.index.Term; | import org.apache.lucene.analysis.*; import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,671,289 |
void setLogLevel(@NotNull LogLevel logLevel); | void setLogLevel(@NotNull LogLevel logLevel); | /**
* Changes the log level of the internal HiveMQ logger
* <p/>
* This does not support <code>null</code> parameters. If you pass
* <code>null</code>, this method is lenient and will ignore the parameter
*
* @param logLevel the new loglevel
*/ | Changes the log level of the internal HiveMQ logger This does not support <code>null</code> parameters. If you pass <code>null</code>, this method is lenient and will ignore the parameter | setLogLevel | {
"repo_name": "hivemq/hivemq-spi",
"path": "src/main/java/com/hivemq/spi/services/LogService.java",
"license": "apache-2.0",
"size": 1978
} | [
"com.hivemq.spi.annotations.NotNull"
] | import com.hivemq.spi.annotations.NotNull; | import com.hivemq.spi.annotations.*; | [
"com.hivemq.spi"
] | com.hivemq.spi; | 476,524 |
public EventuallyConsistentMap<VlanNextObjectiveStoreKey, Integer> vlanNextObjStore() {
return vlanNextObjStore;
} | EventuallyConsistentMap<VlanNextObjectiveStoreKey, Integer> function() { return vlanNextObjStore; } | /**
* Per device next objective ID store with (device id + vlanid) as key.
* Used to keep track on L2 flood group information.
*
* @return vlan next object store
*/ | Per device next objective ID store with (device id + vlanid) as key. Used to keep track on L2 flood group information | vlanNextObjStore | {
"repo_name": "oplinkoms/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java",
"license": "apache-2.0",
"size": 108504
} | [
"org.onosproject.segmentrouting.storekey.VlanNextObjectiveStoreKey",
"org.onosproject.store.service.EventuallyConsistentMap"
] | import org.onosproject.segmentrouting.storekey.VlanNextObjectiveStoreKey; import org.onosproject.store.service.EventuallyConsistentMap; | import org.onosproject.segmentrouting.storekey.*; import org.onosproject.store.service.*; | [
"org.onosproject.segmentrouting",
"org.onosproject.store"
] | org.onosproject.segmentrouting; org.onosproject.store; | 1,291,039 |
private void logE(String s, Throwable tr) {
DebugTool.logError(s, tr);
}
| void function(String s, Throwable tr) { DebugTool.logError(s, tr); } | /**
* Logs the string and the throwable with ERROR level.
*
* @param s string to log
* @param tr throwable to log
*/ | Logs the string and the throwable with ERROR level | logE | {
"repo_name": "anildahiya/sdl_android",
"path": "android/sdl_android/src/main/java/com/smartdevicelink/transport/USBTransport.java",
"license": "bsd-3-clause",
"size": 32798
} | [
"com.smartdevicelink.util.DebugTool"
] | import com.smartdevicelink.util.DebugTool; | import com.smartdevicelink.util.*; | [
"com.smartdevicelink.util"
] | com.smartdevicelink.util; | 2,222,496 |
public boolean copyInto(Bitmap bitmap) {
return mRenderer.copyLayerInto(this, bitmap);
} | boolean function(Bitmap bitmap) { return mRenderer.copyLayerInto(this, bitmap); } | /**
* Copies this layer into the specified bitmap.
*
* @param bitmap The bitmap to copy they layer into
*
* @return True if the copy was successful, false otherwise
*/ | Copies this layer into the specified bitmap | copyInto | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/view/HardwareLayer.java",
"license": "gpl-3.0",
"size": 5297
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,099,690 |
public Bitmap getSyncedFaviconImageForURL(String url) {
return mFaviconHelper.getSyncedFaviconImageForURL(mProfile, url);
} | Bitmap function(String url) { return mFaviconHelper.getSyncedFaviconImageForURL(mProfile, url); } | /**
* Returns a 16x16 favicon for a given synced url.
*
* @param url The url to fetch the favicon for.
* @return 16x16 favicon or null if favicon unavailable.
*/ | Returns a 16x16 favicon for a given synced url | getSyncedFaviconImageForURL | {
"repo_name": "Bysmyyr/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsManager.java",
"license": "bsd-3-clause",
"size": 15952
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 4,207 |
public Map<String, Object> toExceptionDescriptor() {
Map<String, Object> descriptor = new HashMap<>();
String text = message.formatMessage(offset);
descriptor.put("message", text);
descriptor.put("position", offset);
return descriptor;
} | Map<String, Object> function() { Map<String, Object> descriptor = new HashMap<>(); String text = message.formatMessage(offset); descriptor.put(STR, text); descriptor.put(STR, offset); return descriptor; } | /**
* Produce a simple map of information about the exception that can be sent to the
* client for display.
*
* @return map of simple information including message and position
*/ | Produce a simple map of information about the exception that can be sent to the client for display | toExceptionDescriptor | {
"repo_name": "dturanski/spring-cloud-data",
"path": "spring-cloud-dataflow-core/src/main/java/org/springframework/cloud/dataflow/core/dsl/TaskValidationProblem.java",
"license": "apache-2.0",
"size": 2633
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,688,338 |
public AlipayObject getBizModel() {
return this.bizModel;
} | AlipayObject function() { return this.bizModel; } | /**
* <p>Getter for the field <code>bizModel</code>.</p>
*
* @return a {@link cn.felord.wepay.ali.sdk.api.AlipayObject} object.
*/ | Getter for the field <code>bizModel</code> | getBizModel | {
"repo_name": "NotFound403/WePay",
"path": "src/main/java/cn/felord/wepay/ali/sdk/api/request/AlipayExscUserFirstfundinpourGetRequest.java",
"license": "apache-2.0",
"size": 4822
} | [
"cn.felord.wepay.ali.sdk.api.AlipayObject"
] | import cn.felord.wepay.ali.sdk.api.AlipayObject; | import cn.felord.wepay.ali.sdk.api.*; | [
"cn.felord.wepay"
] | cn.felord.wepay; | 996,767 |
if (note == null) {
throw new RepositoryException("Note is null");
}
try {
mapper.updateNote(note);
} catch (Exception e) {
throw new RepositoryException("An error occurred while updating note: " + e.getMessage(), e);
}
} | if (note == null) { throw new RepositoryException(STR); } try { mapper.updateNote(note); } catch (Exception e) { throw new RepositoryException(STR + e.getMessage(), e); } } | /**
* Updates note fields updated_at to update time, parent_note_id to specified in note by note id.
* @param note POJO that contains note data.
* @throws RepositoryException
*/ | Updates note fields updated_at to update time, parent_note_id to specified in note by note id | updateNote | {
"repo_name": "7bits/interships-2015-notes",
"path": "src/main/java/it/sevenbits/telenote/core/repository/Note/NoteRepository.java",
"license": "gpl-2.0",
"size": 14446
} | [
"it.sevenbits.telenote.core.repository.RepositoryException"
] | import it.sevenbits.telenote.core.repository.RepositoryException; | import it.sevenbits.telenote.core.repository.*; | [
"it.sevenbits.telenote"
] | it.sevenbits.telenote; | 3,345 |
@Override
public IComplexDouble createDouble(double real, double imag) {
return new ComplexDouble(real,imag);
} | IComplexDouble function(double real, double imag) { return new ComplexDouble(real,imag); } | /**
* Create an instance of a complex double
*
* @param real the real component
* @param imag the imaginary component
* @return a new imaginary double with the specified real and imaginary components
*/ | Create an instance of a complex double | createDouble | {
"repo_name": "wlin12/JNN",
"path": "src/org/nd4j/linalg/jblas/JblasNDArrayFactory.java",
"license": "apache-2.0",
"size": 12934
} | [
"org.nd4j.linalg.api.complex.IComplexDouble",
"org.nd4j.linalg.jblas.complex.ComplexDouble"
] | import org.nd4j.linalg.api.complex.IComplexDouble; import org.nd4j.linalg.jblas.complex.ComplexDouble; | import org.nd4j.linalg.api.complex.*; import org.nd4j.linalg.jblas.complex.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,241,047 |
protected List<Listener> listeners() {
return listeners;
} | List<Listener> function() { return listeners; } | /**
* Returns a list of listeners
*/ | Returns a list of listeners | listeners | {
"repo_name": "Edwin-Ran/es_source_read",
"path": "src/main/java/org/elasticsearch/watcher/AbstractResourceWatcher.java",
"license": "apache-2.0",
"size": 2161
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 648,908 |
protected void resetVersion() {
MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion();
version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion());
VERSION.set(handle, version);
} | void function() { MinecraftVersion minecraftVersion = MinecraftVersion.getCurrentVersion(); version = VERSION_CONSTRUCTOR.invoke(minecraftVersion.toString(), MinecraftProtocolVersion.getCurrentVersion()); VERSION.set(handle, version); } | /**
* Reset the version string to the default state.
*/ | Reset the version string to the default state | resetVersion | {
"repo_name": "HolodeckOne-Minecraft/ProtocolLib",
"path": "modules/API/src/main/java/com/comphenix/protocol/wrappers/WrappedServerPing.java",
"license": "gpl-2.0",
"size": 17779
} | [
"com.comphenix.protocol.utility.MinecraftProtocolVersion",
"com.comphenix.protocol.utility.MinecraftVersion"
] | import com.comphenix.protocol.utility.MinecraftProtocolVersion; import com.comphenix.protocol.utility.MinecraftVersion; | import com.comphenix.protocol.utility.*; | [
"com.comphenix.protocol"
] | com.comphenix.protocol; | 2,547,748 |
public static Length ex(int amt) {
return new Length(amt + Unit.EX.getType());
} | static Length function(int amt) { return new Length(amt + Unit.EX.getType()); } | /**
* Size as multiple of the 'x-height' of the relevant font.
*/ | Size as multiple of the 'x-height' of the relevant font | ex | {
"repo_name": "lucasam/gwtquery",
"path": "gwtquery-core/src/main/java/com/google/gwt/query/client/css/Length.java",
"license": "mit",
"size": 3563
} | [
"com.google.gwt.dom.client.Style"
] | import com.google.gwt.dom.client.Style; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,884,847 |
protected void close0(@Nullable Throwable th) {
// No-op by default.
} | void function(@Nullable Throwable th) { } | /**
* Closes this snapshot sender and releases any resources associated with it.
* If the sender is already closed then invoking this method has no effect.
*/ | Closes this snapshot sender and releases any resources associated with it. If the sender is already closed then invoking this method has no effect | close0 | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotSender.java",
"license": "apache-2.0",
"size": 6599
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,256,019 |
public boolean tryUse(Player player) {
return tryUse(player, 1, defaultDelay, TimeUnit.MILLISECONDS);
} | boolean function(Player player) { return tryUse(player, 1, defaultDelay, TimeUnit.MILLISECONDS); } | /**
* Attempt to use this ability. The player must have at least once charge for this operation
* to be successful. The player's charge count will be decremented by the given amount.
* <p>
* Otherwise, initiate the recharging cooldown and return FALSE.
*
* @param player - the player.
... | Attempt to use this ability. The player must have at least once charge for this operation to be successful. The player's charge count will be decremented by the given amount. Otherwise, initiate the recharging cooldown and return FALSE | tryUse | {
"repo_name": "ClimaxMC/Plugins",
"path": "KitPvp/src/main/java/net/climaxmc/kitpvp/utils/Ability.java",
"license": "apache-2.0",
"size": 8659
} | [
"java.util.concurrent.TimeUnit",
"org.bukkit.entity.Player"
] | import java.util.concurrent.TimeUnit; import org.bukkit.entity.Player; | import java.util.concurrent.*; import org.bukkit.entity.*; | [
"java.util",
"org.bukkit.entity"
] | java.util; org.bukkit.entity; | 906,605 |
public Observable<ServiceResponse<ServiceEndpointPolicyInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceG... | Observable<ServiceResponse<ServiceEndpointPolicyInner>> function(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serviceEndpointPolicyName == null) { throw new IllegalArgumentException(ST... | /**
* Creates or updates a service Endpoint Policies.
*
* @param resourceGroupName The name of the resource group.
* @param serviceEndpointPolicyName The name of the service endpoint policy.
* @param parameters Parameters supplied to the create or update service endpoint policy operation.
... | Creates or updates a service Endpoint Policies | beginCreateOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java",
"license": "mit",
"size": 72906
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 187,082 |
public void drawTickMarks(Graphics2D g2, double cursor,
Rectangle2D dataArea, RectangleEdge edge, AxisState state) {
Plot p = getPlot();
if (p == null) {
return;
}
CategoryPlot plot = (CategoryPlot) p;
double il = getTickMarkInsideLength();
... | void function(Graphics2D g2, double cursor, Rectangle2D dataArea, RectangleEdge edge, AxisState state) { Plot p = getPlot(); if (p == null) { return; } CategoryPlot plot = (CategoryPlot) p; double il = getTickMarkInsideLength(); double ol = getTickMarkOutsideLength(); Line2D line = new Line2D.Double(); List categories ... | /**
* Draws the tick marks.
*
* @since 1.0.13
*/ | Draws the tick marks | drawTickMarks | {
"repo_name": "ilyessou/jfreechart",
"path": "source/org/jfree/chart/axis/CategoryAxis.java",
"license": "lgpl-2.1",
"size": 55031
} | [
"java.awt.Graphics2D",
"java.awt.geom.Line2D",
"java.awt.geom.Rectangle2D",
"java.util.Iterator",
"java.util.List",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.chart.plot.Plot",
"org.jfree.chart.util.RectangleEdge"
] | import java.awt.Graphics2D; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import java.util.Iterator; import java.util.List; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.Plot; import org.jfree.chart.util.RectangleEdge; | import java.awt.*; import java.awt.geom.*; import java.util.*; import org.jfree.chart.plot.*; import org.jfree.chart.util.*; | [
"java.awt",
"java.util",
"org.jfree.chart"
] | java.awt; java.util; org.jfree.chart; | 2,153,538 |
private static boolean checkJavaVersion() {
if (SystemUtils.isJavaVersionAtLeast(JAVA_VERSION)) {
return true;
}
logger.fatal(LocalizedMessage.create(LocalizedStrings.MinimumSystemRequirements_JAVA_VERSION, JAVA_VERSION));
return false;
} | static boolean function() { if (SystemUtils.isJavaVersionAtLeast(JAVA_VERSION)) { return true; } logger.fatal(LocalizedMessage.create(LocalizedStrings.MinimumSystemRequirements_JAVA_VERSION, JAVA_VERSION)); return false; } | /**
* Check Java version at least {@link #JAVA_VERSION}.
*
* @return true if minimum system requirements met, otherwise false.
*
* @since 8.1
*/ | Check Java version at least <code>#JAVA_VERSION</code> | checkJavaVersion | {
"repo_name": "rvs/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/MinimumSystemRequirements.java",
"license": "apache-2.0",
"size": 2286
} | [
"com.gemstone.gemfire.internal.i18n.LocalizedStrings",
"com.gemstone.gemfire.internal.lang.SystemUtils",
"com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage"
] | import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.lang.SystemUtils; import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage; | import com.gemstone.gemfire.internal.i18n.*; import com.gemstone.gemfire.internal.lang.*; import com.gemstone.gemfire.internal.logging.log4j.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,025,289 |
protected void fillShape(Graphics graphics, String imageName) {
//Get the bounds and size of this item's container
Shape container = findContainerShape();
Rectangle containerBounds = container.getClientArea();
Dimension containerSize = container.getSize();
//We must reduce height by 3
... | void function(Graphics graphics, String imageName) { Shape container = findContainerShape(); Rectangle containerBounds = container.getClientArea(); Dimension containerSize = container.getSize(); containerSize.shrink(0, 3); this.setPreferredSize(containerSize); graphics.drawRectangle(containerBounds); graphics.drawImage... | /**
* Fills the shape with the image imageName and resizes it to his parent's size
* The Shape must be integrated in a container
* If more than one shape share the container, they share height
* @author AVE
* @param graphics
* @param imageName the path to the image file
*/ | Fills the shape with the image imageName and resizes it to his parent's size The Shape must be integrated in a container If more than one shape share the container, they share height | fillShape | {
"repo_name": "StephaneSeyvoz/mindEd",
"path": "org.ow2.mindEd.adl.editor.graphic.ui/customsrc/org/ow2/mindEd/adl/editor/graphic/ui/custom/figures/CShape.java",
"license": "lgpl-3.0",
"size": 2830
} | [
"org.eclipse.draw2d.Graphics",
"org.eclipse.draw2d.Shape",
"org.eclipse.draw2d.geometry.Dimension",
"org.eclipse.draw2d.geometry.Rectangle",
"org.eclipse.swt.graphics.Image"
] | import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.Shape; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.graphics.Image; | import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.draw2d",
"org.eclipse.swt"
] | org.eclipse.draw2d; org.eclipse.swt; | 2,268,572 |
public FeatureCursor queryFeaturesForChunk(boolean distinct,
GeometryEnvelope envelope, int limit, long offset) {
return queryFeaturesForChunk(distinct, envelope, getPkColumnName(),
limit, offset);
} | FeatureCursor function(boolean distinct, GeometryEnvelope envelope, int limit, long offset) { return queryFeaturesForChunk(distinct, envelope, getPkColumnName(), limit, offset); } | /**
* Query for features within the geometry envelope ordered by id, starting
* at the offset and returning no more than the limit
*
* @param distinct distinct rows
* @param envelope geometry envelope
* @param limit chunk limit
* @param offset chunk query offset
* @return fe... | Query for features within the geometry envelope ordered by id, starting at the offset and returning no more than the limit | queryFeaturesForChunk | {
"repo_name": "ngageoint/geopackage-android",
"path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java",
"license": "mit",
"size": 276322
} | [
"mil.nga.geopackage.features.user.FeatureCursor",
"mil.nga.sf.GeometryEnvelope"
] | import mil.nga.geopackage.features.user.FeatureCursor; import mil.nga.sf.GeometryEnvelope; | import mil.nga.geopackage.features.user.*; import mil.nga.sf.*; | [
"mil.nga.geopackage",
"mil.nga.sf"
] | mil.nga.geopackage; mil.nga.sf; | 347,361 |
@Override
public String encodeString(final String s) {
try {
return URLEncoder.encode(s, "UTF-8");
} catch (UnsupportedEncodingException e) {
return s;
}
} | String function(final String s) { try { return URLEncoder.encode(s, "UTF-8"); } catch (UnsupportedEncodingException e) { return s; } } | /**
* Encodes a string in a format suitable to send a http request.
*
* @param s
* The String that should be encoded
*
* @return A suitable encoded String
*/ | Encodes a string in a format suitable to send a http request | encodeString | {
"repo_name": "PDavid/aTunes",
"path": "aTunes/src/main/java/net/sourceforge/atunes/kernel/modules/network/NetworkHandler.java",
"license": "gpl-2.0",
"size": 8117
} | [
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder"
] | import java.io.UnsupportedEncodingException; import java.net.URLEncoder; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,081,790 |
public final State startElement
(final String ns, final String lnam, final String qnam, final Attributes atts)
throws SAXException {
final State ret = startElementStart(ns, lnam, qnam, atts);
if (ret == this) depth++;
return ret;
} | final State function (final String ns, final String lnam, final String qnam, final Attributes atts) throws SAXException { final State ret = startElementStart(ns, lnam, qnam, atts); if (ret == this) depth++; return ret; } | /**
* Template method. Calls startElementStart. If startElementStart returns this increments
* depth. Lastly, returns the value returned by startElementStart.
*/ | Template method. Calls startElementStart. If startElementStart returns this increments depth. Lastly, returns the value returned by startElementStart | startElement | {
"repo_name": "evlist/orbeon-forms",
"path": "src/main/java/org/orbeon/oxf/xml/saxrewrite/State.java",
"license": "lgpl-2.1",
"size": 5904
} | [
"org.xml.sax.Attributes",
"org.xml.sax.SAXException"
] | import org.xml.sax.Attributes; import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 299,850 |
public Future<Void> deleteStreamingDistributionAsync(DeleteStreamingDistributionRequest deleteStreamingDistributionRequest)
throws AmazonServiceException, AmazonClientException; | Future<Void> function(DeleteStreamingDistributionRequest deleteStreamingDistributionRequest) throws AmazonServiceException, AmazonClientException; | /**
* <p>
* Delete a streaming distribution.
* </p>
*
* @param deleteStreamingDistributionRequest Container for the necessary
* parameters to execute the DeleteStreamingDistribution operation on
* AmazonCloudFront.
*
* @return A Java Future object contain... | Delete a streaming distribution. | deleteStreamingDistributionAsync | {
"repo_name": "SaiNadh001/aws-sdk-for-java",
"path": "src/main/java/com/amazonaws/services/cloudfront_2012_03_15/AmazonCloudFrontAsync.java",
"license": "apache-2.0",
"size": 28945
} | [
"com.amazonaws.AmazonClientException",
"com.amazonaws.AmazonServiceException",
"com.amazonaws.services.cloudfront_2012_03_15.model.DeleteStreamingDistributionRequest",
"java.util.concurrent.Future"
] | import com.amazonaws.AmazonClientException; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.cloudfront_2012_03_15.model.DeleteStreamingDistributionRequest; import java.util.concurrent.Future; | import com.amazonaws.*; import com.amazonaws.services.cloudfront_2012_03_15.model.*; import java.util.concurrent.*; | [
"com.amazonaws",
"com.amazonaws.services",
"java.util"
] | com.amazonaws; com.amazonaws.services; java.util; | 376,411 |
public Observable<ServiceResponse<OperationStatusResponseInner>> deleteWithServiceResponseAsync(String resourceGroupName, String imageName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (... | Observable<ServiceResponse<OperationStatusResponseInner>> function(String resourceGroupName, String imageName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (imageName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalAr... | /**
* Deletes an Image.
*
* @param resourceGroupName The name of the resource group.
* @param imageName The name of the image.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/ | Deletes an Image | deleteWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/ImagesInner.java",
"license": "mit",
"size": 58594
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.rest.ServiceResponse"
] | import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; | import com.google.common.reflect.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.rest"
] | com.google.common; com.microsoft.rest; | 1,957,219 |
public static String findLibraryPath(String fileName)
{
String path = "";
if (Activator.getDefault() != null)
{
// for eclipse plug-in
path = ((AbstractBundle) Activator.getDefault().getBundle()).getBundleData()
.findLibrary(fileName);
}
else
{
// for general Java
URL url = Activator.... | static String function(String fileName) { String path = STRUTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return path; } | /**
* convert a library file name (ex. dll) to its absolute path
*/ | convert a library file name (ex. dll) to its absolute path | findLibraryPath | {
"repo_name": "roboidstudio/embedded",
"path": "org.roboid.audio/src/org/roboid/audio/Activator.java",
"license": "lgpl-2.1",
"size": 4837
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 2,106,069 |
public void testAxisMargins() {
XYSeries series = new XYSeries("S1");
series.add(100.0, 1.1);
series.add(200.0, 2.2);
XYSeriesCollection dataset = new XYSeriesCollection(series);
dataset.setIntervalWidth(0.0);
JFreeChart chart = ChartFactory.createScatterPlot(
... | void function() { XYSeries series = new XYSeries("S1"); series.add(100.0, 1.1); series.add(200.0, 2.2); XYSeriesCollection dataset = new XYSeriesCollection(series); dataset.setIntervalWidth(0.0); JFreeChart chart = ChartFactory.createScatterPlot( "Title", "X", "Y", dataset, PlotOrientation.VERTICAL, false, false, false... | /**
* Tests the the lower and upper margin settings produce the expected
* results.
*/ | Tests the the lower and upper margin settings produce the expected results | testAxisMargins | {
"repo_name": "JSansalone/JFreeChart",
"path": "tests/org/jfree/chart/axis/junit/ValueAxisTests.java",
"license": "lgpl-2.1",
"size": 7484
} | [
"org.jfree.chart.ChartFactory",
"org.jfree.chart.JFreeChart",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.PlotOrientation",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.Range",
"org.jfree.data.xy.XYSeries",
"org.jfree.data.xy.XYSeriesCollection"
] | import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.data.Range; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; | import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.data.*; import org.jfree.data.xy.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 499,793 |
@Test
public void testSendReceiveTransactedBatches() throws Exception
{
TextMessage message = session.createTextMessage("Batch Message");
for (int j = 0; j < batchCount; j++)
{
System.out.println("Producing bacth " + j + " of " + batchSize
+ " messages");
be... | void function() throws Exception { TextMessage message = session.createTextMessage(STR); for (int j = 0; j < batchCount; j++) { System.out.println(STR + j + STR + batchSize + STR); beginTx(); for (int i = 0; i < batchSize; i++) { producer.send(message); } messageSent(); commitTx(); System.out.println(STR + j + STR + ba... | /**
* Sends a batch of messages and validates that the messages are received.
*
* @throws Exception
*/ | Sends a batch of messages and validates that the messages are received | testSendReceiveTransactedBatches | {
"repo_name": "ryanemerson/activemq-artemis",
"path": "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTransactionTestSupport.java",
"license": "apache-2.0",
"size": 22077
} | [
"javax.jms.TextMessage"
] | import javax.jms.TextMessage; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 732,446 |
Iterator<?> getIterator(Object obj, JexlInfo info); | Iterator<?> getIterator(Object obj, JexlInfo info); | /**
* Gets an iterator from an object.
* @param obj to get the iterator for
* @param info contextual information
* @return an iterator over obj
*/ | Gets an iterator from an object | getIterator | {
"repo_name": "InsomniaxGaming/OWHInternals",
"path": "src/org/apache/commons/jexl2/introspection/Uberspect.java",
"license": "gpl-2.0",
"size": 3318
} | [
"java.util.Iterator",
"org.apache.commons.jexl2.JexlInfo"
] | import java.util.Iterator; import org.apache.commons.jexl2.JexlInfo; | import java.util.*; import org.apache.commons.jexl2.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,524,694 |
@NotNull
@ObjectiveCName("requestGetOAuthParamsCommand")
public Command<AuthState> requestGetOAuthParams() {
return modules.getAuthModule().requestGetOAuth2Params();
} | @ObjectiveCName(STR) Command<AuthState> function() { return modules.getAuthModule().requestGetOAuth2Params(); } | /**
* Request OAuth params
*
* @return Command for execution
*/ | Request OAuth params | requestGetOAuthParams | {
"repo_name": "luoxiaoshenghustedu/actor-platform",
"path": "actor-apps/core/src/main/java/im/actor/core/Messenger.java",
"license": "mit",
"size": 52564
} | [
"com.google.j2objc.annotations.ObjectiveCName",
"im.actor.core.viewmodel.Command"
] | import com.google.j2objc.annotations.ObjectiveCName; import im.actor.core.viewmodel.Command; | import com.google.j2objc.annotations.*; import im.actor.core.viewmodel.*; | [
"com.google.j2objc",
"im.actor.core"
] | com.google.j2objc; im.actor.core; | 48,061 |
public void setPortTypeInputdeckFormPersistence(
PortTypeInputdeckFormPersistence portTypeInputdeckFormPersistence) {
this.portTypeInputdeckFormPersistence = portTypeInputdeckFormPersistence;
} | void function( PortTypeInputdeckFormPersistence portTypeInputdeckFormPersistence) { this.portTypeInputdeckFormPersistence = portTypeInputdeckFormPersistence; } | /**
* Sets the port type inputdeck form persistence.
*
* @param portTypeInputdeckFormPersistence the port type inputdeck form persistence
*/ | Sets the port type inputdeck form persistence | setPortTypeInputdeckFormPersistence | {
"repo_name": "queza85/edison",
"path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/CommonModuleServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 52478
} | [
"org.kisti.edison.science.service.persistence.PortTypeInputdeckFormPersistence"
] | import org.kisti.edison.science.service.persistence.PortTypeInputdeckFormPersistence; | import org.kisti.edison.science.service.persistence.*; | [
"org.kisti.edison"
] | org.kisti.edison; | 2,543,299 |
public void unregisterStatement(Statement statement) {
this.openStatements.remove(statement);
} | void function(Statement statement) { this.openStatements.remove(statement); } | /**
* Remove the given statement from the list of open statements
*
* @param statement the Statement instance to remove
*/ | Remove the given statement from the list of open statements | unregisterStatement | {
"repo_name": "pivanof/vitess",
"path": "java/jdbc/src/main/java/io/vitess/jdbc/VitessConnection.java",
"license": "apache-2.0",
"size": 27787
} | [
"java.sql.Statement"
] | import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,113,638 |
public AccountData account(Account account) throws IOException,
JSONException, OpacErrorException; | AccountData function(Account account) throws IOException, JSONException, OpacErrorException; | /**
* Proxy for the {@link OpacApi#account(Account)} feature, adding ebook entries.
*/ | Proxy for the <code>OpacApi#account(Account)</code> feature, adding ebook entries | account | {
"repo_name": "thesebas/opacclient",
"path": "opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/EbookServiceApi.java",
"license": "mit",
"size": 4185
} | [
"de.geeksfactory.opacclient.apis.OpacApi",
"de.geeksfactory.opacclient.objects.Account",
"de.geeksfactory.opacclient.objects.AccountData",
"java.io.IOException",
"org.json.JSONException"
] | import de.geeksfactory.opacclient.apis.OpacApi; import de.geeksfactory.opacclient.objects.Account; import de.geeksfactory.opacclient.objects.AccountData; import java.io.IOException; import org.json.JSONException; | import de.geeksfactory.opacclient.apis.*; import de.geeksfactory.opacclient.objects.*; import java.io.*; import org.json.*; | [
"de.geeksfactory.opacclient",
"java.io",
"org.json"
] | de.geeksfactory.opacclient; java.io; org.json; | 2,074,681 |
//-----------------------------------------------------------------------
public MetaProperty<TradeInfo> info() {
return info;
} | MetaProperty<TradeInfo> function() { return info; } | /**
* The meta-property for the {@code info} property.
* @return the meta-property, not null
*/ | The meta-property for the info property | info | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/cms/ResolvedCmsTrade.java",
"license": "apache-2.0",
"size": 14614
} | [
"com.opengamma.strata.product.TradeInfo",
"org.joda.beans.MetaProperty"
] | import com.opengamma.strata.product.TradeInfo; import org.joda.beans.MetaProperty; | import com.opengamma.strata.product.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 15,182 |
private void exploreFolderWp(File dir, ArrayList<String> wpNameList) throws Exception {
File[] files = dir.listFiles();
for (int i = 0; i < files.length; i++) {
// We had a problem with an empty folder.
// this folder trigerred a dead loop
// In this case f... | void function(File dir, ArrayList<String> wpNameList) throws Exception { File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory() && !files[i].getName().equals(dir.getName())) { exploreFolder(files[i], wpNameList); } else { String fileName = files[i].getName(); if (fileName.en... | /**
* Different from exploreFolder, not only an extension file difference
* We don't take care of closingDate
* @param dir
* @param wpPathList
* @throws Exception
*/ | Different from exploreFolder, not only an extension file difference We don't take care of closingDate | exploreFolderWp | {
"repo_name": "giloutho/Logfly",
"path": "src/main/java/gps/reversale.java",
"license": "gpl-3.0",
"size": 14603
} | [
"java.io.File",
"java.util.ArrayList"
] | import java.io.File; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 232,120 |
public static void drawOutlinedBoundingBox(CustomHitBox hitbox) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(1);
// Top and Bottom faces
addMainVertex(hitbox, 1, hitbox.middleHeight, tessellator);
addMainVertex(hitbox, 0, 0, tessellator);
// Top and Bottom extensions
ad... | static void function(CustomHitBox hitbox) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawing(1); addMainVertex(hitbox, 1, hitbox.middleHeight, tessellator); addMainVertex(hitbox, 0, 0, tessellator); addTopBottomVertex(hitbox, 1, hitbox.sideLength[1], hitbox.middleHeight + hitbox.sideLength[1], t... | /**
* Draws lines for the edges of the bounding box.
*/ | Draws lines for the edges of the bounding box | drawOutlinedBoundingBox | {
"repo_name": "Todkommt/Mass-Effect-Ships-Mod",
"path": "lib/src/CoFHCore/src/main/java/cofh/core/render/hitbox/RenderHitbox.java",
"license": "gpl-3.0",
"size": 15113
} | [
"net.minecraft.client.renderer.Tessellator"
] | import net.minecraft.client.renderer.Tessellator; | import net.minecraft.client.renderer.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 1,325,480 |
public final void close() throws IOException {
synchronized (closeLock) {
if (closed)
return;
closed = true;
implCloseChannel();
}
} | final void function() throws IOException { synchronized (closeLock) { if (closed) return; closed = true; implCloseChannel(); } } | /**
* Closes this channel.
*
* <p> If the channel has already been closed then this method returns
* immediately. Otherwise it marks the channel as closed and then invokes
* the {@link #implCloseChannel implCloseChannel} method in order to
* complete the close operation. </p>
*
... | Closes this channel. If the channel has already been closed then this method returns immediately. Otherwise it marks the channel as closed and then invokes the <code>#implCloseChannel implCloseChannel</code> method in order to complete the close operation. | close | {
"repo_name": "md-5/jdk10",
"path": "src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java",
"license": "gpl-2.0",
"size": 8100
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,069,525 |
public static void makeGzippedCSVFile(ByteBuffer onePinData, Path path) throws IOException {
try (OutputStream output = Files.newOutputStream(path);
Writer writer = new OutputStreamWriter(new GZIPOutputStream(output), "UTF-8")) {
while (onePinData.remaining() > 0) {
... | static void function(ByteBuffer onePinData, Path path) throws IOException { try (OutputStream output = Files.newOutputStream(path); Writer writer = new OutputStreamWriter(new GZIPOutputStream(output), "UTF-8")) { while (onePinData.remaining() > 0) { double value = onePinData.getDouble(); long ts = onePinData.getLong();... | /**
* Writes ByteBuffer with value (double 8 bytes),
* timestamp (long 8 bytes) data to disk as csv file and gzips it.
*
* @param onePinData - reporting data
* @param path - path to file to store data
* @throws IOException
*/ | Writes ByteBuffer with value (double 8 bytes), timestamp (long 8 bytes) data to disk as csv file and gzips it | makeGzippedCSVFile | {
"repo_name": "Gspin96/blynk-server",
"path": "server/core/src/main/java/cc/blynk/utils/FileUtils.java",
"license": "gpl-3.0",
"size": 3946
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"java.io.Writer",
"java.nio.ByteBuffer",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.zip.GZIPOutputStream"
] | import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.ByteBuffer; import java.nio.file.Files; import java.nio.file.Path; import java.util.zip.GZIPOutputStream; | import java.io.*; import java.nio.*; import java.nio.file.*; import java.util.zip.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 234,280 |
CompletableFuture<TxnID> abortTxnOnSubscription(String topic,
String subscription,
long txnIdMostBits,
long txnIdLeastBits,
... | CompletableFuture<TxnID> abortTxnOnSubscription(String topic, String subscription, long txnIdMostBits, long txnIdLeastBits, long lowWaterMark); | /**
* Abort the transaction associated with the topic subscription.
*
* @param topic topic name
* @param subscription subscription name
* @param txnIdMostBits the most bits of txn id
* @param txnIdLeastBits the least bits of txn id
* @param lowWaterMark the low water mark of this txn
... | Abort the transaction associated with the topic subscription | abortTxnOnSubscription | {
"repo_name": "massakam/pulsar",
"path": "pulsar-client-api/src/main/java/org/apache/pulsar/client/api/transaction/TransactionBufferClient.java",
"license": "apache-2.0",
"size": 4019
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 803,844 |
public static Iterator<File> iterateFilesAndDirs(final File directory, final IOFileFilter fileFilter,
final IOFileFilter dirFilter) {
return listFilesAndDirs(directory, fileFilter, dirFilter).iterator();
}
//--------------------------------------... | static Iterator<File> function(final File directory, final IOFileFilter fileFilter, final IOFileFilter dirFilter) { return listFilesAndDirs(directory, fileFilter, dirFilter).iterator(); } /** * Converts an array of file extensions to suffixes for use * with IOFileFilters. * * @param extensions an array of extensions. F... | /**
* Allows iteration over the files in given directory (and optionally
* its subdirectories).
* <p>
* All files found are filtered by an IOFileFilter. This method is
* based on {@link #listFilesAndDirs(File, IOFileFilter, IOFileFilter)},
* which supports Iterable ('foreach' loop).
*... | Allows iteration over the files in given directory (and optionally its subdirectories). All files found are filtered by an IOFileFilter. This method is based on <code>#listFilesAndDirs(File, IOFileFilter, IOFileFilter)</code>, which supports Iterable ('foreach' loop). The resulting iterator includes the subdirectories ... | iterateFilesAndDirs | {
"repo_name": "pimtegelaar/commons-io-test3",
"path": "src/main/java/org/apache/commons/io/FileUtils.java",
"license": "apache-2.0",
"size": 129505
} | [
"java.io.File",
"java.util.Iterator",
"org.apache.commons.io.filefilter.IOFileFilter"
] | import java.io.File; import java.util.Iterator; import org.apache.commons.io.filefilter.IOFileFilter; | import java.io.*; import java.util.*; import org.apache.commons.io.filefilter.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 1,030,940 |
public ValueNode genEqualsFalseTree()
throws StandardException
{
BinaryRelationalOperatorNode equalsNode;
BooleanConstantNode falseNode;
boolean nullableResult;
NodeFactory nodeFactory = getNodeFactory();
falseNode = (BooleanConstantNode) nodeFactory.getNode(
C_NodeTypes.BOOLEAN_CONS... | ValueNode function() throws StandardException { BinaryRelationalOperatorNode equalsNode; BooleanConstantNode falseNode; boolean nullableResult; NodeFactory nodeFactory = getNodeFactory(); falseNode = (BooleanConstantNode) nodeFactory.getNode( C_NodeTypes.BOOLEAN_CONSTANT_NODE, Boolean.FALSE, getContextManager()); equal... | /**
* Transform this into this = false. Useful for NOT elimination.
*
*
* @return The modified expression
*
* @exception StandardException Thrown on error
*/ | Transform this into this = false. Useful for NOT elimination | genEqualsFalseTree | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/impl/sql/compile/ValueNode.java",
"license": "apache-2.0",
"size": 43555
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.sql.compile.NodeFactory",
"org.apache.derby.iapi.types.DataTypeDescriptor",
"org.apache.derby.iapi.types.TypeId"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.sql.compile.NodeFactory; import org.apache.derby.iapi.types.DataTypeDescriptor; import org.apache.derby.iapi.types.TypeId; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.sql.compile.*; import org.apache.derby.iapi.types.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,179,471 |
public synchronized void closeAllConnections() {
for (Socket socket : openConnections) {
safeClose(socket);
}
} | synchronized void function() { for (Socket socket : openConnections) { safeClose(socket); } } | /**
* Forcibly closes all connections that are open.
*/ | Forcibly closes all connections that are open | closeAllConnections | {
"repo_name": "ptrd/jmeter-plugins",
"path": "tools/table-server/src/main/java/org/jmeterplugins/protocol/http/control/NanoHTTPD.java",
"license": "apache-2.0",
"size": 57479
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 1,915,213 |
public static String prettifyXML(String xmlContent) {
Element element = DataSourceUtils.stringToElement(xmlContent);
if (element == null) {
throw new RuntimeException("Error in converting string to XML: " + xmlContent);
}
removeWhitespaceInMixedContentElements(element);
xmlContent = D... | static String function(String xmlContent) { Element element = DataSourceUtils.stringToElement(xmlContent); if (element == null) { throw new RuntimeException(STR + xmlContent); } removeWhitespaceInMixedContentElements(element); xmlContent = DataSourceUtils.elementToString(element); ByteArrayInputStream byteIn = new Byte... | /**
* Prettify a given XML string
*/ | Prettify a given XML string | prettifyXML | {
"repo_name": "madhawa-gunasekara/carbon-data",
"path": "components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/DBUtils.java",
"license": "apache-2.0",
"size": 54182
} | [
"java.io.ByteArrayInputStream",
"org.w3c.dom.Element",
"org.wso2.carbon.ndatasource.core.utils.DataSourceUtils",
"org.wso2.carbon.utils.xml.XMLPrettyPrinter"
] | import java.io.ByteArrayInputStream; import org.w3c.dom.Element; import org.wso2.carbon.ndatasource.core.utils.DataSourceUtils; import org.wso2.carbon.utils.xml.XMLPrettyPrinter; | import java.io.*; import org.w3c.dom.*; import org.wso2.carbon.ndatasource.core.utils.*; import org.wso2.carbon.utils.xml.*; | [
"java.io",
"org.w3c.dom",
"org.wso2.carbon"
] | java.io; org.w3c.dom; org.wso2.carbon; | 1,535,210 |
public static boolean isPortAvailable(int port) {
if (port < 0 || port > 65535) {
throw new IllegalArgumentException("Invalid start port: " + port);
}
ServerSocket ss = null;
DatagramSocket ds = null;
try {
ss = new ServerSocket(port);
ss.setReuseAddress(true);
ds = new DatagramSocket(port);
... | static boolean function(int port) { if (port < 0 port > 65535) { throw new IllegalArgumentException(STR + port); } ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); ds = new DatagramSocket(port); ds.setReuseAddress(true); return true; } catch (IOException e) ... | /**
* checks if a specific port is available.
*
* @param port
* the port to check for availability
*/ | checks if a specific port is available | isPortAvailable | {
"repo_name": "gfneto/Hive2Hive",
"path": "org.hive2hive.core/src/main/java/org/hive2hive/core/network/NetworkUtils.java",
"license": "mit",
"size": 2371
} | [
"java.io.IOException",
"java.net.DatagramSocket",
"java.net.ServerSocket"
] | import java.io.IOException; import java.net.DatagramSocket; import java.net.ServerSocket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,868,982 |
public synchronized void delete() throws IOException {
byName.remove(id.toLowerCase(Locale.ENGLISH));
Util.deleteRecursive(new File(getRootDir(), id));
} | synchronized void function() throws IOException { byName.remove(id.toLowerCase(Locale.ENGLISH)); Util.deleteRecursive(new File(getRootDir(), id)); } | /**
* Deletes the data directory and removes this user from Hudson.
*
* @throws IOException
* if we fail to delete.
*/ | Deletes the data directory and removes this user from Hudson | delete | {
"repo_name": "lvotypko/jenkins",
"path": "core/src/main/java/hudson/model/User.java",
"license": "mit",
"size": 19786
} | [
"java.io.File",
"java.io.IOException",
"java.util.Locale"
] | import java.io.File; import java.io.IOException; import java.util.Locale; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,819,083 |
public List<CmsUser> searchUsers(CmsRequestContext requestContext, CmsUserSearchParameters searchParams)
throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(requestContext);
try {
return m_driverManager.searchUsers(dbc, searchParams);
} catch (Exception ... | List<CmsUser> function(CmsRequestContext requestContext, CmsUserSearchParameters searchParams) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(requestContext); try { return m_driverManager.searchUsers(dbc, searchParams); } catch (Exception e) { dbc.report(null, Messages.get().container(Messages... | /**
* Searches users by search criteria.<p>
*
* @param requestContext the request context
* @param searchParams the search criteria object
*
* @return a list of users
* @throws CmsException if something goes wrong
*/ | Searches users by search criteria | searchUsers | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/db/CmsSecurityManager.java",
"license": "lgpl-2.1",
"size": 287876
} | [
"java.util.List",
"org.opencms.file.CmsRequestContext",
"org.opencms.file.CmsUser",
"org.opencms.file.CmsUserSearchParameters",
"org.opencms.main.CmsException"
] | import java.util.List; import org.opencms.file.CmsRequestContext; import org.opencms.file.CmsUser; import org.opencms.file.CmsUserSearchParameters; import org.opencms.main.CmsException; | import java.util.*; import org.opencms.file.*; import org.opencms.main.*; | [
"java.util",
"org.opencms.file",
"org.opencms.main"
] | java.util; org.opencms.file; org.opencms.main; | 2,580,158 |
private AnimatorSet setOpenCloseAnimation(boolean isCloseAnimation) {
List<Animator> textAnimations = new ArrayList<>();
List<Animator> imageAnimations = new ArrayList<>();
if (isCloseAnimation) {
for (int i = getItemCount() - 1; i >= 0; i--) {
fillOpenClosingAni... | AnimatorSet function(boolean isCloseAnimation) { List<Animator> textAnimations = new ArrayList<>(); List<Animator> imageAnimations = new ArrayList<>(); if (isCloseAnimation) { for (int i = getItemCount() - 1; i >= 0; i--) { fillOpenClosingAnimations(true, textAnimations, imageAnimations, i); } } else { for (int i = 0; ... | /**
* Creates Open / Close AnimatorSet
*/ | Creates Open / Close AnimatorSet | setOpenCloseAnimation | {
"repo_name": "shuhonglin/LostAndFound",
"path": "app/src/main/java/com/moonlight/nasa/lostandfound/UI/contextmenu/lib/MenuAdapter.java",
"license": "apache-2.0",
"size": 13162
} | [
"com.nineoldandroids.animation.Animator",
"com.nineoldandroids.animation.AnimatorSet",
"java.util.ArrayList",
"java.util.List"
] | import com.nineoldandroids.animation.Animator; import com.nineoldandroids.animation.AnimatorSet; import java.util.ArrayList; import java.util.List; | import com.nineoldandroids.animation.*; import java.util.*; | [
"com.nineoldandroids.animation",
"java.util"
] | com.nineoldandroids.animation; java.util; | 1,915,248 |
public DatanodeStorageInfo chooseStorage4Block(StorageType t,
long blockSize) {
final long requiredSize =
blockSize * HdfsServerConstants.MIN_BLOCKS_FOR_WRITE;
final long scheduledSize = blockSize * getBlocksScheduled(t);
long remaining = 0;
DatanodeStorageInfo storage = null;
for (D... | DatanodeStorageInfo function(StorageType t, long blockSize) { final long requiredSize = blockSize * HdfsServerConstants.MIN_BLOCKS_FOR_WRITE; final long scheduledSize = blockSize * getBlocksScheduled(t); long remaining = 0; DatanodeStorageInfo storage = null; for (DatanodeStorageInfo s : getStorageInfos()) { if (s.getS... | /**
* Find whether the datanode contains good storage of given type to
* place block of size <code>blockSize</code>.
*
* <p>Currently datanode only cares about the storage type, in this
* method, the first storage of given type we see is returned.
*
* @param t requested storage type
* @param blo... | Find whether the datanode contains good storage of given type to place block of size <code>blockSize</code>. Currently datanode only cares about the storage type, in this method, the first storage of given type we see is returned | chooseStorage4Block | {
"repo_name": "littlezhou/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java",
"license": "apache-2.0",
"size": 35719
} | [
"org.apache.hadoop.fs.StorageType",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.hdfs.server.protocol.DatanodeStorage"
] | import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,823,967 |
public static void encrypt(OutputStream out, byte[] src, int offset,
int length, Context context, byte[] iv) throws IOException {
Encryptor e = context.getCipher().getEncryptor();
e.setKey(context.getKey());
e.setIv(iv); // can be null
e.reset();
encrypt(out, src, offset, length, e);
} | static void function(OutputStream out, byte[] src, int offset, int length, Context context, byte[] iv) throws IOException { Encryptor e = context.getCipher().getEncryptor(); e.setKey(context.getKey()); e.setIv(iv); e.reset(); encrypt(out, src, offset, length, e); } | /**
* Encrypt a block of plaintext
* @param out ciphertext
* @param src plaintext
* @param offset
* @param length
* @param context
* @param iv
* @throws IOException
*/ | Encrypt a block of plaintext | encrypt | {
"repo_name": "ibmsoe/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/io/crypto/Encryption.java",
"license": "apache-2.0",
"size": 17756
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 27,188 |
EAttribute getDiagram_Id(); | EAttribute getDiagram_Id(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.dd.di.Diagram#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see org.eclipse.dd.di.Diagram#getId()
* @see #getDiagram()
* @generate... | Returns the meta object for the attribute '<code>org.eclipse.dd.di.Diagram#getId Id</code>'. | getDiagram_Id | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/dd/di/DiPackage.java",
"license": "apache-2.0",
"size": 59185
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,782,333 |
protected ResponseEntity<Object> handleServletRequestBindingException(ServletRequestBindingException ex,
HttpHeaders headers, HttpStatus status, WebRequest request) {
return handleExceptionInternal(ex, null, headers, status, request);
} | ResponseEntity<Object> function(ServletRequestBindingException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { return handleExceptionInternal(ex, null, headers, status, request); } | /**
* Customize the response for ServletRequestBindingException.
* This method delegates to {@link #handleExceptionInternal(Exception, Object, HttpHeaders, HttpStatus, WebRequest)}.
* @param ex the exception
* @param headers the headers to be written to the response
* @param status the selected response statu... | Customize the response for ServletRequestBindingException. This method delegates to <code>#handleExceptionInternal(Exception, Object, HttpHeaders, HttpStatus, WebRequest)</code> | handleServletRequestBindingException | {
"repo_name": "kingtang/spring-learn",
"path": "spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java",
"license": "gpl-3.0",
"size": 17606
} | [
"org.springframework.http.HttpHeaders",
"org.springframework.http.HttpStatus",
"org.springframework.http.ResponseEntity",
"org.springframework.web.bind.ServletRequestBindingException",
"org.springframework.web.context.request.WebRequest"
] | import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.context.request.WebRequest; | import org.springframework.http.*; import org.springframework.web.bind.*; import org.springframework.web.context.request.*; | [
"org.springframework.http",
"org.springframework.web"
] | org.springframework.http; org.springframework.web; | 2,444,757 |
@Test
public void testRequestAccessUsingToken() throws Exception {
String accessStatusUrl = BASE_URL + "/access";
String accessTokenUrl = BASE_URL + "/access/token";
ClientResponse response = TOKEN_USER.testGet(accessStatusUrl);
// ensure the request is successful
Asser... | void function() throws Exception { String accessStatusUrl = BASE_URL + STR; String accessTokenUrl = BASE_URL + STR; ClientResponse response = TOKEN_USER.testGet(accessStatusUrl); Assert.assertEquals(200, response.getStatus()); AccessStatusEntity accessStatusEntity = response.getEntity(AccessStatusEntity.class); AccessS... | /**
* Request access using access token.
*
* @throws Exception ex
*/ | Request access using access token | testRequestAccessUsingToken | {
"repo_name": "speddy93/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/integration/accesscontrol/ITAccessTokenEndpoint.java",
"license": "apache-2.0",
"size": 9760
} | [
"com.sun.jersey.api.client.ClientResponse",
"java.util.HashMap",
"java.util.Map",
"org.apache.nifi.web.api.dto.AccessStatusDTO",
"org.apache.nifi.web.api.entity.AccessStatusEntity",
"org.junit.Assert"
] | import com.sun.jersey.api.client.ClientResponse; import java.util.HashMap; import java.util.Map; import org.apache.nifi.web.api.dto.AccessStatusDTO; import org.apache.nifi.web.api.entity.AccessStatusEntity; import org.junit.Assert; | import com.sun.jersey.api.client.*; import java.util.*; import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*; import org.junit.*; | [
"com.sun.jersey",
"java.util",
"org.apache.nifi",
"org.junit"
] | com.sun.jersey; java.util; org.apache.nifi; org.junit; | 251,641 |
static int execSql(SQLiteDatabase db, String label, String finalSql, Object[] argArray) throws SQLException {
try {
db.execSQL(finalSql, argArray);
} catch (android.database.SQLException e) {
throw SqlExceptionUtil.create("Problems executing " + label + " Android statement: " + finalSql, e);
}
int resu... | static int execSql(SQLiteDatabase db, String label, String finalSql, Object[] argArray) throws SQLException { try { db.execSQL(finalSql, argArray); } catch (android.database.SQLException e) { throw SqlExceptionUtil.create(STR + label + STR + finalSql, e); } int result; SQLiteStatement stmt = null; try { stmt = db.compi... | /**
* Execute some SQL on the database and return the number of rows changed.
*/ | Execute some SQL on the database and return the number of rows changed | execSql | {
"repo_name": "dankito/ormlite-jpa-android",
"path": "src/main/java/com/j256/ormlite/android/AndroidCompiledStatement.java",
"license": "isc",
"size": 6798
} | [
"android.database.sqlite.SQLiteDatabase",
"android.database.sqlite.SQLiteStatement",
"com.j256.ormlite.misc.SqlExceptionUtil",
"java.sql.SQLException"
] | import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import com.j256.ormlite.misc.SqlExceptionUtil; import java.sql.SQLException; | import android.database.sqlite.*; import com.j256.ormlite.misc.*; import java.sql.*; | [
"android.database",
"com.j256.ormlite",
"java.sql"
] | android.database; com.j256.ormlite; java.sql; | 1,164,377 |
void setBreakpoints(@NotNull List<Breakpoint> breakPoints); | void setBreakpoints(@NotNull List<Breakpoint> breakPoints); | /**
* Sets breakpoints.
*
* @param breakPoints available breakpoints
*/ | Sets breakpoints | setBreakpoints | {
"repo_name": "Patricol/che",
"path": "plugins/plugin-debugger/che-plugin-debugger-ide/src/main/java/org/eclipse/che/plugin/debugger/ide/debug/DebuggerView.java",
"license": "epl-1.0",
"size": 3885
} | [
"java.util.List",
"javax.validation.constraints.NotNull",
"org.eclipse.che.api.debug.shared.model.Breakpoint"
] | import java.util.List; import javax.validation.constraints.NotNull; import org.eclipse.che.api.debug.shared.model.Breakpoint; | import java.util.*; import javax.validation.constraints.*; import org.eclipse.che.api.debug.shared.model.*; | [
"java.util",
"javax.validation",
"org.eclipse.che"
] | java.util; javax.validation; org.eclipse.che; | 948,484 |
@Test
public void testNodeJoinOnPendingOperation() throws Exception {
Ignite srv1 = ignitionStart(serverConfiguration(1));
createSqlCache(srv1);
CountDownLatch idxLatch = blockIndexing(srv1);
QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1));
IgniteInternalFutur... | void function() throws Exception { Ignite srv1 = ignitionStart(serverConfiguration(1)); createSqlCache(srv1); CountDownLatch idxLatch = blockIndexing(srv1); QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1)); IgniteInternalFuture<?> idxFut = queryProcessor(srv1).dynamicIndexCreate(CACHE_NAME, CACHE_NAME, TBL_NAME,... | /**
* Test node join on pending operation.
*
* @throws Exception If failed.
*/ | Test node join on pending operation | testNodeJoinOnPendingOperation | {
"repo_name": "SomeFire/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractConcurrentSelfTest.java",
"license": "apache-2.0",
"size": 37449
} | [
"java.util.concurrent.CountDownLatch",
"org.apache.ignite.Ignite",
"org.apache.ignite.cache.QueryIndex",
"org.apache.ignite.internal.IgniteInternalFuture"
] | import java.util.concurrent.CountDownLatch; import org.apache.ignite.Ignite; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.internal.IgniteInternalFuture; | import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,741,195 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.