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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected TrustedWebActivityDisplayMode getDisplayMode() {
return this.mMetadata.displayMode;
} | TrustedWebActivityDisplayMode function() { return this.mMetadata.displayMode; } | /**
* Returns the display mode the TrustedWebWebActivity should be launched with. Defaults to the
* "android.support.customtabs.trusted.DISPLAY_MODE" metadata from the manifest or the "default"
* mode if the metadata is not present.
*
* Override this for starting the Trusted Web Activity with d... | Returns the display mode the TrustedWebWebActivity should be launched with. Defaults to the "android.support.customtabs.trusted.DISPLAY_MODE" metadata from the manifest or the "default" mode if the metadata is not present. Override this for starting the Trusted Web Activity with different display mode, with special han... | getDisplayMode | {
"repo_name": "GoogleChrome/android-browser-helper",
"path": "androidbrowserhelper/src/main/java/com/google/androidbrowserhelper/trusted/LauncherActivity.java",
"license": "apache-2.0",
"size": 18532
} | [
"androidx.browser.trusted.TrustedWebActivityDisplayMode"
] | import androidx.browser.trusted.TrustedWebActivityDisplayMode; | import androidx.browser.trusted.*; | [
"androidx.browser"
] | androidx.browser; | 1,425,605 |
private Object getChildAtDetailAst(DetailAST parent, int index) {
final Object result;
if (parseMode == ParseMode.JAVA_WITH_JAVADOC_AND_COMMENTS
&& parent.getType() == TokenTypes.COMMENT_CONTENT
&& JavadocUtils.isJavadocComment(parent.getParent())) {
resul... | Object function(DetailAST parent, int index) { final Object result; if (parseMode == ParseMode.JAVA_WITH_JAVADOC_AND_COMMENTS && parent.getType() == TokenTypes.COMMENT_CONTENT && JavadocUtils.isJavadocComment(parent.getParent())) { result = getJavadocTree(parent.getParent()); } else { int currentIndex = 0; DetailAST ch... | /**
* Gets child of DetailAST node at specified index.
* @param parent DetailAST node
* @param index child index
* @return child DetailsAST or DetailNode if child is Javadoc node
* and parseMode is JAVA_WITH_JAVADOC_AND_COMMENTS.
*/ | Gets child of DetailAST node at specified index | getChildAtDetailAst | {
"repo_name": "sharang108/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/gui/ParseTreeTablePresentation.java",
"license": "lgpl-2.1",
"size": 11689
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes",
"com.puppycrawl.tools.checkstyle.gui.MainFrameModel",
"com.puppycrawl.tools.checkstyle.utils.JavadocUtils"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import com.puppycrawl.tools.checkstyle.gui.MainFrameModel; import com.puppycrawl.tools.checkstyle.utils.JavadocUtils; | import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.gui.*; import com.puppycrawl.tools.checkstyle.utils.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,622,991 |
private Node tryFoldArithmeticOp(Node n, Node left, Node right) {
Node result = performArithmeticOp(n, left, right);
if (result != null) {
result.srcrefTreeIfMissing(n);
reportChangeToEnclosingScope(n);
n.replaceWith(result);
return result;
}
return n;
} | Node function(Node n, Node left, Node right) { Node result = performArithmeticOp(n, left, right); if (result != null) { result.srcrefTreeIfMissing(n); reportChangeToEnclosingScope(n); n.replaceWith(result); return result; } return n; } | /**
* Try to fold arithmetic binary operators
*/ | Try to fold arithmetic binary operators | tryFoldArithmeticOp | {
"repo_name": "GoogleChromeLabs/chromeos_smart_card_connector",
"path": "third_party/closure-compiler/src/src/com/google/javascript/jscomp/PeepholeFoldConstants.java",
"license": "apache-2.0",
"size": 59538
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 205,710 |
private List<? extends ConditionalStyleDescription> getConditionalStyles(final DiagramElementMapping mapping, final DDiagram diagram) {
return new GetConditionalStyle(diagram).doSwitch(mapping);
} | List<? extends ConditionalStyleDescription> function(final DiagramElementMapping mapping, final DDiagram diagram) { return new GetConditionalStyle(diagram).doSwitch(mapping); } | /**
* Returns the conditional style of the given mapping.
*
* @param mapping
* the mapping.
* @param diagram
* the current diagram (for calculate imported mapping)
* @return the conditional style of the given mapping.
*/ | Returns the conditional style of the given mapping | getConditionalStyles | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-core/org/eclipse/sirius/diagram/business/internal/metamodel/helper/BestStyleDescriptionRegistry.java",
"license": "epl-1.0",
"size": 15073
} | [
"java.util.List",
"org.eclipse.sirius.diagram.DDiagram",
"org.eclipse.sirius.diagram.description.DiagramElementMapping",
"org.eclipse.sirius.viewpoint.description.ConditionalStyleDescription"
] | import java.util.List; import org.eclipse.sirius.diagram.DDiagram; import org.eclipse.sirius.diagram.description.DiagramElementMapping; import org.eclipse.sirius.viewpoint.description.ConditionalStyleDescription; | import java.util.*; import org.eclipse.sirius.diagram.*; import org.eclipse.sirius.diagram.description.*; import org.eclipse.sirius.viewpoint.description.*; | [
"java.util",
"org.eclipse.sirius"
] | java.util; org.eclipse.sirius; | 2,416,763 |
public void start() {
logger.info("----------------------------"); //$NON-NLS-1$
logger.info(Messages.i18n.format("StorageImportDispatcher.StartingImport")); //$NON-NLS-1$
policyDefIndex.clear();
currentOrg = null;
currentPlan = null;
currentService = null;
... | void function() { logger.info(STR); logger.info(Messages.i18n.format(STR)); policyDefIndex.clear(); currentOrg = null; currentPlan = null; currentService = null; currentApp = null; currentAppVersion = null; contracts.clear(); servicesToPublish.clear(); appsToRegister.clear(); gatewayLinkCache.clear(); try { this.storag... | /**
* Starts the import.
*/ | Starts the import | start | {
"repo_name": "kunallimaye/apiman",
"path": "manager/api/export-import/src/main/java/io/apiman/manager/api/exportimport/manager/StorageImportDispatcher.java",
"license": "apache-2.0",
"size": 31160
} | [
"io.apiman.manager.api.core.exceptions.StorageException",
"io.apiman.manager.api.exportimport.i18n.Messages"
] | import io.apiman.manager.api.core.exceptions.StorageException; import io.apiman.manager.api.exportimport.i18n.Messages; | import io.apiman.manager.api.core.exceptions.*; import io.apiman.manager.api.exportimport.i18n.*; | [
"io.apiman.manager"
] | io.apiman.manager; | 2,376,854 |
public void invalidate(CachedSeekableInputStream inputStream) throws IOException {
mUnderFileInputStreamCache.invalidate(inputStream.getResourceId());
release(inputStream);
} | void function(CachedSeekableInputStream inputStream) throws IOException { mUnderFileInputStreamCache.invalidate(inputStream.getResourceId()); release(inputStream); } | /**
* Invalidates an input stream from the cache.
*
* @param inputStream the cached input stream
* @throws IOException when the invalidated input stream fails to release
*/ | Invalidates an input stream from the cache | invalidate | {
"repo_name": "apc999/alluxio",
"path": "core/server/worker/src/main/java/alluxio/worker/block/UfsInputStreamManager.java",
"license": "apache-2.0",
"size": 13366
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,676,529 |
public File getWorldDirectory()
{
return this.worldDirectory;
} | File function() { return this.worldDirectory; } | /**
* Gets the File object corresponding to the base directory of this world.
*/ | Gets the File object corresponding to the base directory of this world | getWorldDirectory | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/storage/SaveHandler.java",
"license": "lgpl-2.1",
"size": 10225
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,876,360 |
public boolean setupPermissions() {
RegisteredServiceProvider<Permission> permissionProvider = getServer().getServicesManager().getRegistration(Permission.class);
if (permissionProvider != null) {
permission = permissionProvider.getProvider();
}
return permission != null;... | boolean function() { RegisteredServiceProvider<Permission> permissionProvider = getServer().getServicesManager().getRegistration(Permission.class); if (permissionProvider != null) { permission = permissionProvider.getProvider(); } return permission != null; } | /**
* Find the resident permission system and set up Vault to use it.
*
* @return True if successful
*/ | Find the resident permission system and set up Vault to use it | setupPermissions | {
"repo_name": "ericpauley/CommandIt",
"path": "src/main/java/org/zone/commandit/CommandIt.java",
"license": "gpl-3.0",
"size": 6351
} | [
"net.milkbowl.vault.permission.Permission",
"org.bukkit.plugin.RegisteredServiceProvider"
] | import net.milkbowl.vault.permission.Permission; import org.bukkit.plugin.RegisteredServiceProvider; | import net.milkbowl.vault.permission.*; import org.bukkit.plugin.*; | [
"net.milkbowl.vault",
"org.bukkit.plugin"
] | net.milkbowl.vault; org.bukkit.plugin; | 1,095,863 |
@Test
public void testGoogleSecretsReadPropertiesFromFile() throws Exception {
PropertiesConfiguration config = new PropertiesConfiguration();
config.setProperty("api.admanager.clientId", "clientId");
config.setProperty("api.admanager.clientSecret", "clientSecret");
when(configurationHelper.fromFil... | void function() throws Exception { PropertiesConfiguration config = new PropertiesConfiguration(); config.setProperty(STR, STR); config.setProperty(STR, STR); when(configurationHelper.fromFile("path")).thenReturn(config); GoogleClientSecretsForApiBuilder builder = new GoogleClientSecretsForApiBuilder( configurationHelp... | /**
* Tests that the builder correctly reads from a file.
*/ | Tests that the builder correctly reads from a file | testGoogleSecretsReadPropertiesFromFile | {
"repo_name": "googleads/googleads-java-lib",
"path": "modules/ads_lib/src/test/java/com/google/api/ads/common/lib/auth/GoogleClientSecretsBuilderTest.java",
"license": "apache-2.0",
"size": 11657
} | [
"com.google.api.ads.common.lib.auth.GoogleClientSecretsBuilder",
"com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets",
"org.apache.commons.configuration.PropertiesConfiguration",
"org.junit.Assert",
"org.mockito.Mockito"
] | import com.google.api.ads.common.lib.auth.GoogleClientSecretsBuilder; import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets; import org.apache.commons.configuration.PropertiesConfiguration; import org.junit.Assert; import org.mockito.Mockito; | import com.google.api.ads.common.lib.auth.*; import com.google.api.client.googleapis.auth.oauth2.*; import org.apache.commons.configuration.*; import org.junit.*; import org.mockito.*; | [
"com.google.api",
"org.apache.commons",
"org.junit",
"org.mockito"
] | com.google.api; org.apache.commons; org.junit; org.mockito; | 1,600,013 |
public void setFullScreen(boolean value) {
JsoHelper.setAttribute(config, TouchAttribute.FULL_SCREEN.getValue(), value);
} | void function(boolean value) { JsoHelper.setAttribute(config, TouchAttribute.FULL_SCREEN.getValue(), value); } | /**
* Sets the value of data.
*
* @param value
* , Object
*
*/ | Sets the value of data | setFullScreen | {
"repo_name": "ahome-it/ahome-touch",
"path": "ahome-touch/src/main/java/com/ait/toolkit/sencha/touch/client/core/Component.java",
"license": "apache-2.0",
"size": 73764
} | [
"com.ait.toolkit.core.client.JsoHelper",
"com.ait.toolkit.sencha.touch.client.core.config.TouchAttribute"
] | import com.ait.toolkit.core.client.JsoHelper; import com.ait.toolkit.sencha.touch.client.core.config.TouchAttribute; | import com.ait.toolkit.core.client.*; import com.ait.toolkit.sencha.touch.client.core.config.*; | [
"com.ait.toolkit"
] | com.ait.toolkit; | 2,546,265 |
protected void releaseData() {
synchronized (this) {
for (NodeIdentifier identifier : mUpdateContainer.getListDeleteIdentifier()) {
mGraphPool.releaseIdentifier(identifier.getIdentifier());
}
for (ExpandedLink link : mUpdateContainer.getListDeleteLinks()) {
mGraphPool.releaseLink(link.getLink());
... | void function() { synchronized (this) { for (NodeIdentifier identifier : mUpdateContainer.getListDeleteIdentifier()) { mGraphPool.releaseIdentifier(identifier.getIdentifier()); } for (ExpandedLink link : mUpdateContainer.getListDeleteLinks()) { mGraphPool.releaseLink(link.getLink()); } for (List<NodeMetadata> listMetad... | /**
* Release the data in the delete lists of the UpdateContainer.
*/ | Release the data in the delete lists of the UpdateContainer | releaseData | {
"repo_name": "trustathsh/visitmeta",
"path": "visualization/src/main/java/de/hshannover/f4/trust/visitmeta/network/GraphNetworkConnection.java",
"license": "apache-2.0",
"size": 16823
} | [
"de.hshannover.f4.trust.visitmeta.datawrapper.ExpandedLink",
"de.hshannover.f4.trust.visitmeta.datawrapper.NodeIdentifier",
"de.hshannover.f4.trust.visitmeta.datawrapper.NodeMetadata",
"java.util.List"
] | import de.hshannover.f4.trust.visitmeta.datawrapper.ExpandedLink; import de.hshannover.f4.trust.visitmeta.datawrapper.NodeIdentifier; import de.hshannover.f4.trust.visitmeta.datawrapper.NodeMetadata; import java.util.List; | import de.hshannover.f4.trust.visitmeta.datawrapper.*; import java.util.*; | [
"de.hshannover.f4",
"java.util"
] | de.hshannover.f4; java.util; | 2,178,284 |
@SuppressWarnings("unchecked")
public <T> Future<T> getFuture() {
return FutureContext.getContext().getCompletableFuture();
} | @SuppressWarnings(STR) <T> Future<T> function() { return FutureContext.getContext().getCompletableFuture(); } | /**
* get future.
*
* @param <T>
* @return future
*/ | get future | getFuture | {
"repo_name": "wuwen5/dubbo",
"path": "dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java",
"license": "apache-2.0",
"size": 22380
} | [
"java.util.concurrent.Future"
] | import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 76,881 |
public List<E> getAllRecords(boolean sorted) {
return getAllRecords(sorted, true, keyColName);
} | List<E> function(boolean sorted) { return getAllRecords(sorted, true, keyColName); } | /**
* Gets all database records optionally sorted by the key column
* @param sorted setting this to true returns a sorted list in ascending order
* @return A list of database records
*/ | Gets all database records optionally sorted by the key column | getAllRecords | {
"repo_name": "elegnamnden/tsl-trust",
"path": "admin-weblogic/src/main/java/se/tillvaxtverket/tsltrust/weblogic/hibernate/HigernateDbUtil.java",
"license": "gpl-3.0",
"size": 7152
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,209,328 |
void processDeviceRemoved(Device device) {
seenLinks.keySet()
.removeIf(key -> key.src().deviceId().equals(device.id())
|| key.dst().deviceId().equals(device.id()));
} | void processDeviceRemoved(Device device) { seenLinks.keySet() .removeIf(key -> key.src().deviceId().equals(device.id()) key.dst().deviceId().equals(device.id())); } | /**
* Cleans up internal LinkHandler stores.
*
* @param device the device that has been removed
*/ | Cleans up internal LinkHandler stores | processDeviceRemoved | {
"repo_name": "kuujo/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java",
"license": "apache-2.0",
"size": 30018
} | [
"org.onosproject.net.Device"
] | import org.onosproject.net.Device; | import org.onosproject.net.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 1,318,804 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, SQLException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
HttpSessio... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException { response.setContentType(STR); try (PrintWriter out = response.getWriter()) { HttpSession session = request.getSession(); User user = (User) session.getAttribute("user"); ServletContext ctx = getS... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "chin8628/Usami",
"path": "src/java/controller/BuyPremium.java",
"license": "mit",
"size": 5067
} | [
"java.io.IOException",
"java.io.PrintWriter",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Timestamp",
"javax.servlet.ServletContext",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.H... | import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequ... | import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"java.sql",
"javax.servlet"
] | java.io; java.sql; javax.servlet; | 1,301,578 |
public AppliedPTransform<?, ?, ?> getAppliedTransformForStepName(String stepName) {
return appliedStepNames.inverse().get(stepName);
} | AppliedPTransform<?, ?, ?> function(String stepName) { return appliedStepNames.inverse().get(stepName); } | /**
* Gets the {@link PTransform} that was assigned the provided step name.
*/ | Gets the <code>PTransform</code> that was assigned the provided step name | getAppliedTransformForStepName | {
"repo_name": "joshualitt/incubator-beam",
"path": "runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/internal/DataflowAggregatorTransforms.java",
"license": "apache-2.0",
"size": 3246
} | [
"org.apache.beam.sdk.transforms.AppliedPTransform"
] | import org.apache.beam.sdk.transforms.AppliedPTransform; | import org.apache.beam.sdk.transforms.*; | [
"org.apache.beam"
] | org.apache.beam; | 374,171 |
private static boolean isSharingTableData( ReportItemHandle handle )
{
return getReportItemReference( handle ) instanceof ListingHandle;
} | static boolean function( ReportItemHandle handle ) { return getReportItemReference( handle ) instanceof ListingHandle; } | /**
* Check whether the reportitem is sharing data with a table or list.
*
* @param handle
* @return
*/ | Check whether the reportitem is sharing data with a table or list | isSharingTableData | {
"repo_name": "Charling-Huang/birt",
"path": "chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemUtil.java",
"license": "epl-1.0",
"size": 37128
} | [
"org.eclipse.birt.report.model.api.ListingHandle",
"org.eclipse.birt.report.model.api.ReportItemHandle"
] | import org.eclipse.birt.report.model.api.ListingHandle; import org.eclipse.birt.report.model.api.ReportItemHandle; | import org.eclipse.birt.report.model.api.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,939,527 |
private String getLocation(ValidationEvent event) {
StringBuffer msg = new StringBuffer();
ValidationEventLocator locator = event.getLocator();
if( locator != null ) {
URL url = locator.getURL();
Object obj = locator.getObject();
Node node = locator.get... | String function(ValidationEvent event) { StringBuffer msg = new StringBuffer(); ValidationEventLocator locator = event.getLocator(); if( locator != null ) { URL url = locator.getURL(); Object obj = locator.getObject(); Node node = locator.getNode(); int line = locator.getLineNumber(); if( url!=null line!=-1 ) { msg.app... | /**
* Calculate a location message for the event
*
*/ | Calculate a location message for the event | getLocation | {
"repo_name": "axDev-JDK/jaxws",
"path": "src/share/jaxws_classes/javax/xml/bind/helpers/DefaultValidationEventHandler.java",
"license": "gpl-2.0",
"size": 4739
} | [
"javax.xml.bind.ValidationEvent",
"javax.xml.bind.ValidationEventLocator",
"org.w3c.dom.Node"
] | import javax.xml.bind.ValidationEvent; import javax.xml.bind.ValidationEventLocator; import org.w3c.dom.Node; | import javax.xml.bind.*; import org.w3c.dom.*; | [
"javax.xml",
"org.w3c.dom"
] | javax.xml; org.w3c.dom; | 2,906,728 |
public void updateFuel(SurfaceVehicle vehicle) {
fuelLabel.setVisible(true);
fuelCapacity.setVisible(true);
fuelCapacity.setValue((int)(100*vehicle.getFuelTank().getAmount()/vehicle.getFuelTank().getMaxAmount()));
fuelCapacity.setString(fuelFormat.format(vehicle.getFuelTank().getAmount())
+ " / " + fuel... | void function(SurfaceVehicle vehicle) { fuelLabel.setVisible(true); fuelCapacity.setVisible(true); fuelCapacity.setValue((int)(100*vehicle.getFuelTank().getAmount()/vehicle.getFuelTank().getMaxAmount())); fuelCapacity.setString(fuelFormat.format(vehicle.getFuelTank().getAmount()) + STR + fuelFormat.format(vehicle.getFu... | /**
* Update capacities.
*
* @param vehicle the vehicle
* @return true, if successful
*/ | Update capacities | updateFuel | {
"repo_name": "ptgrogan/spacenet",
"path": "src/main/java/edu/mit/spacenet/gui/component/FuelPanel.java",
"license": "apache-2.0",
"size": 4847
} | [
"edu.mit.spacenet.domain.element.SurfaceVehicle"
] | import edu.mit.spacenet.domain.element.SurfaceVehicle; | import edu.mit.spacenet.domain.element.*; | [
"edu.mit.spacenet"
] | edu.mit.spacenet; | 827,642 |
private void evalPartitionFiltersInBe(List<HdfsPartitionFilter> filters,
HashSet<Long> matchingPartitionIds, Analyzer analyzer) throws ImpalaException {
Map<Long, HdfsPartition> partitionMap = tbl_.getPartitionMap();
// Set of partition ids that pass a filter
HashSet<Long> matchingIds = Sets.newHash... | void function(List<HdfsPartitionFilter> filters, HashSet<Long> matchingPartitionIds, Analyzer analyzer) throws ImpalaException { Map<Long, HdfsPartition> partitionMap = tbl_.getPartitionMap(); HashSet<Long> matchingIds = Sets.newHashSet(); ArrayList<HdfsPartition> partitionBatch = Lists.newArrayList(); for (HdfsPartiti... | /**
* Evaluate a list of HdfsPartitionFilters in the BE. These are 'complex'
* filters that could not be evaluated from the partition key values.
*/ | Evaluate a list of HdfsPartitionFilters in the BE. These are 'complex' filters that could not be evaluated from the partition key values | evalPartitionFiltersInBe | {
"repo_name": "924060929/impala-frontend",
"path": "fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java",
"license": "apache-2.0",
"size": 19386
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.Lists",
"com.google.common.collect.Sets",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"org.apache.impala.analysis.Analyzer",
"org.apache.impala.catalog.HdfsPartition",
"org.apache.impala.common.Im... | import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import org.apache.impala.analysis.Analyzer; import org.apache.impala.catalog.HdfsPartition; impor... | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.impala.analysis.*; import org.apache.impala.catalog.*; import org.apache.impala.common.*; | [
"com.google.common",
"java.util",
"org.apache.impala"
] | com.google.common; java.util; org.apache.impala; | 379,949 |
public TestExecutionInfo getTestStatus(TestExecutionInfo testStatus) throws TestEngineException, RemoteException; | TestExecutionInfo function(TestExecutionInfo testStatus) throws TestEngineException, RemoteException; | /**
* Accesses the status of an running test.
*
* @param testStatus
* TestStatusInfo of the test runner job containing the job id
* @return The actual status of the running job.
* @throws TestEngineException throw, if an error occurs
*/ | Accesses the status of an running test | getTestStatus | {
"repo_name": "NABUCCO/org.nabucco.testautomation.engine",
"path": "org.nabucco.testautomation.engine/src/intf/org/nabucco/testautomation/engine/TestEngine.java",
"license": "epl-1.0",
"size": 3668
} | [
"java.rmi.RemoteException",
"org.nabucco.testautomation.settings.facade.datatype.engine.TestExecutionInfo",
"org.nabucco.testautomation.settings.facade.exception.engine.TestEngineException"
] | import java.rmi.RemoteException; import org.nabucco.testautomation.settings.facade.datatype.engine.TestExecutionInfo; import org.nabucco.testautomation.settings.facade.exception.engine.TestEngineException; | import java.rmi.*; import org.nabucco.testautomation.settings.facade.datatype.engine.*; import org.nabucco.testautomation.settings.facade.exception.engine.*; | [
"java.rmi",
"org.nabucco.testautomation"
] | java.rmi; org.nabucco.testautomation; | 2,373,354 |
@Test
public final void testLogging() {
Configurator.currentConfig().level(org.pmw.tinylog.Level.INFO).activate();
Exception exception = new Exception();
logger.log(Level.TRACE, "Hello!");
LogEntry logEntry = writer.consumeLogEntry();
assertNull(logEntry);
logger.log(Level.DEBUG, "Hello!", ex... | final void function() { Configurator.currentConfig().level(org.pmw.tinylog.Level.INFO).activate(); Exception exception = new Exception(); logger.log(Level.TRACE, STR); LogEntry logEntry = writer.consumeLogEntry(); assertNull(logEntry); logger.log(Level.DEBUG, STR, exception); logEntry = writer.consumeLogEntry(); assert... | /**
* Test logging.
*/ | Test logging | testLogging | {
"repo_name": "yarish/tinylog",
"path": "log4j-facade/src/test/java/org/apache/log4j/TinylogBridgeTest.java",
"license": "apache-2.0",
"size": 8221
} | [
"org.junit.Assert",
"org.pmw.tinylog.Configurator",
"org.pmw.tinylog.LogEntry"
] | import org.junit.Assert; import org.pmw.tinylog.Configurator; import org.pmw.tinylog.LogEntry; | import org.junit.*; import org.pmw.tinylog.*; | [
"org.junit",
"org.pmw.tinylog"
] | org.junit; org.pmw.tinylog; | 2,601,592 |
@Override
protected Optional<Ref> getRemoteRef(String refspec) {
return remoteRepo.command(RefParse.class).setName(refspec).call();
} | Optional<Ref> function(String refspec) { return remoteRepo.command(RefParse.class).setName(refspec).call(); } | /**
* Gets the remote ref that matches the provided ref spec.
*
* @param refspec the refspec to parse
* @return the matching {@link Ref} or {@link Optional#absent()} if the ref could not be found
*/ | Gets the remote ref that matches the provided ref spec | getRemoteRef | {
"repo_name": "jdgarrett/geogig",
"path": "src/core/src/main/java/org/locationtech/geogig/remote/LocalMappedRemoteRepo.java",
"license": "bsd-3-clause",
"size": 12373
} | [
"com.google.common.base.Optional",
"org.locationtech.geogig.model.Ref",
"org.locationtech.geogig.plumbing.RefParse"
] | import com.google.common.base.Optional; import org.locationtech.geogig.model.Ref; import org.locationtech.geogig.plumbing.RefParse; | import com.google.common.base.*; import org.locationtech.geogig.model.*; import org.locationtech.geogig.plumbing.*; | [
"com.google.common",
"org.locationtech.geogig"
] | com.google.common; org.locationtech.geogig; | 484,094 |
protected void onEditTitleTextBox(TextBox box) {
if (m_titleEditHandler != null) {
m_titleEditHandler.handleEdit(m_title, box);
return;
}
String text = box.getText();
box.removeFromParent();
m_title.setText(text);
m_title.setVisible(true);
... | void function(TextBox box) { if (m_titleEditHandler != null) { m_titleEditHandler.handleEdit(m_title, box); return; } String text = box.getText(); box.removeFromParent(); m_title.setText(text); m_title.setVisible(true); } | /**
* Internal method which is called when the user has finished editing the title.
*
* @param box the text box which has been edited
*/ | Internal method which is called when the user has finished editing the title | onEditTitleTextBox | {
"repo_name": "serrapos/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/CmsListItemWidget.java",
"license": "lgpl-2.1",
"size": 34354
} | [
"com.google.gwt.user.client.ui.TextBox"
] | import com.google.gwt.user.client.ui.TextBox; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,090,610 |
void appendTo(StringBuffer buffer, Calendar calendar);
}
| void appendTo(StringBuffer buffer, Calendar calendar); } | /**
* Appends the value of the specified calendar to the output buffer based on the rule implementation.
*
* @param buffer the output buffer
* @param calendar calendar to be appended
*/ | Appends the value of the specified calendar to the output buffer based on the rule implementation | appendTo | {
"repo_name": "cjug/jigsaw-commons-lang3",
"path": "common-lang-jigsaw/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java",
"license": "apache-2.0",
"size": 41173
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,541,092 |
public void addPackageFromDrl(final Reader reader) throws DroolsParserException,
IOException {
addPackageFromDrl(reader, new ReaderResource(reader, ResourceType.DRL));
} | void function(final Reader reader) throws DroolsParserException, IOException { addPackageFromDrl(reader, new ReaderResource(reader, ResourceType.DRL)); } | /**
* Load a rule package from DRL source.
*
* @throws DroolsParserException
* @throws java.io.IOException
*/ | Load a rule package from DRL source | addPackageFromDrl | {
"repo_name": "TonnyFeng/drools",
"path": "drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java",
"license": "apache-2.0",
"size": 103414
} | [
"java.io.IOException",
"java.io.Reader",
"org.drools.compiler.compiler.DroolsParserException",
"org.drools.core.io.impl.ReaderResource",
"org.kie.api.io.ResourceType"
] | import java.io.IOException; import java.io.Reader; import org.drools.compiler.compiler.DroolsParserException; import org.drools.core.io.impl.ReaderResource; import org.kie.api.io.ResourceType; | import java.io.*; import org.drools.compiler.compiler.*; import org.drools.core.io.impl.*; import org.kie.api.io.*; | [
"java.io",
"org.drools.compiler",
"org.drools.core",
"org.kie.api"
] | java.io; org.drools.compiler; org.drools.core; org.kie.api; | 1,772,793 |
public synchronized Set<String> nodesInclude(String index) {
if (clusterService().state().routingTable().hasIndex(index)) {
List<ShardRouting> allShards = clusterService().state().routingTable().allShards(index);
DiscoveryNodes discoveryNodes = clusterService().state().getNodes();
... | synchronized Set<String> function(String index) { if (clusterService().state().routingTable().hasIndex(index)) { List<ShardRouting> allShards = clusterService().state().routingTable().allShards(index); DiscoveryNodes discoveryNodes = clusterService().state().getNodes(); Set<String> nodes = new HashSet<>(); for (ShardRo... | /**
* Returns a set of nodes that have at least one shard of the given index.
*/ | Returns a set of nodes that have at least one shard of the given index | nodesInclude | {
"repo_name": "clintongormley/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java",
"license": "apache-2.0",
"size": 81745
} | [
"java.util.Collections",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.cluster.node.DiscoveryNodes",
"org.elasticsearch.cluster.routing.ShardRouting"
] | import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.routing.ShardRouting; | import java.util.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 309,768 |
protected void activate() {
IShellProvider shellProvider = () -> {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null && window.getShell() != null) {
return window.getShell();
}
return workbench... | void function() { IShellProvider shellProvider = () -> { IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); if (window != null && window.getShell() != null) { return window.getShell(); } return workbench.getDisplay().getActiveShell(); }; LoginServiceLogger ... | /**
* Called by OSGi Declarative Services Runtime when the {@link GoogleLoginService} is activated
* as an OSGi service.
*/ | Called by OSGi Declarative Services Runtime when the <code>GoogleLoginService</code> is activated as an OSGi service | activate | {
"repo_name": "GoogleCloudPlatform/google-cloud-eclipse",
"path": "plugins/com.google.cloud.tools.eclipse.login/src/com/google/cloud/tools/eclipse/login/GoogleLoginService.java",
"license": "apache-2.0",
"size": 6278
} | [
"com.google.cloud.tools.eclipse.login.ui.LoginServiceUi",
"com.google.cloud.tools.eclipse.util.CloudToolsInfo",
"com.google.cloud.tools.login.GoogleLoginState",
"com.google.cloud.tools.login.JavaPreferenceOAuthDataStore",
"com.google.cloud.tools.login.LoggerFacade",
"com.google.cloud.tools.login.OAuthData... | import com.google.cloud.tools.eclipse.login.ui.LoginServiceUi; import com.google.cloud.tools.eclipse.util.CloudToolsInfo; import com.google.cloud.tools.login.GoogleLoginState; import com.google.cloud.tools.login.JavaPreferenceOAuthDataStore; import com.google.cloud.tools.login.LoggerFacade; import com.google.cloud.tool... | import com.google.cloud.tools.eclipse.login.ui.*; import com.google.cloud.tools.eclipse.util.*; import com.google.cloud.tools.login.*; import org.eclipse.jface.window.*; import org.eclipse.ui.*; | [
"com.google.cloud",
"org.eclipse.jface",
"org.eclipse.ui"
] | com.google.cloud; org.eclipse.jface; org.eclipse.ui; | 972,869 |
public void unSubscribeAlerts(String userName, String agent) throws APIManagementException, SQLException {
Connection connection;
PreparedStatement ps = null;
ResultSet rs = null;
connection = APIMgtDBUtil.getConnection();
connection.setAutoCommit(false);
try {
... | void function(String userName, String agent) throws APIManagementException, SQLException { Connection connection; PreparedStatement ps = null; ResultSet rs = null; connection = APIMgtDBUtil.getConnection(); connection.setAutoCommit(false); try { connection.setAutoCommit(false); String alertTypesQuery = SQLConstants.ADD... | /**
* This method will delete all email alert subscriptions details from tables
* @param userName
* @param agent whether its publisher or store or admin dash board.
*/ | This method will delete all email alert subscriptions details from tables | unSubscribeAlerts | {
"repo_name": "knPerera/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 493075
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil; | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,052,145 |
@Override
public void setContentView(int layoutResID) {
final View contentView = getLayoutInflater().inflate(layoutResID, mDrawerLayout, false);
contentLayout.addView(contentView);
setContentView(mDrawerLayout);
navigationView = (NavigationView) findViewById(R.id.navigation_draw... | void function(int layoutResID) { final View contentView = getLayoutInflater().inflate(layoutResID, mDrawerLayout, false); contentLayout.addView(contentView); setContentView(mDrawerLayout); navigationView = (NavigationView) findViewById(R.id.navigation_drawer_view); navigationView.setNavigationItemSelectedListener(this)... | /**
* Intercepts the call to 'setContentView', and wrap the passed layout
* within a DrawerLayout object. This way, the children of this class don't
* have to do anything to benefit from the navigation drawer.
*
* @param layoutResID layout resource for the activity view
*/ | Intercepts the call to 'setContentView', and wrap the passed layout within a DrawerLayout object. This way, the children of this class don't have to do anything to benefit from the navigation drawer | setContentView | {
"repo_name": "vuyaniShabangu/now.next",
"path": "Research/Tower-develop/Tower-develop/Android/src/org/droidplanner/android/activities/DrawerNavigationUI.java",
"license": "mit",
"size": 9622
} | [
"android.support.design.widget.NavigationView",
"android.view.View"
] | import android.support.design.widget.NavigationView; import android.view.View; | import android.support.design.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,370,250 |
protected Model createCleanPom( Model effectivePom ) throws MojoExecutionException
{
Model cleanPom = new Model();
cleanPom.setGroupId( effectivePom.getGroupId() );
cleanPom.setArtifactId( effectivePom.getArtifactId() );
cleanPom.setVersion( effectivePom.getVersion() );
... | Model function( Model effectivePom ) throws MojoExecutionException { Model cleanPom = new Model(); cleanPom.setGroupId( effectivePom.getGroupId() ); cleanPom.setArtifactId( effectivePom.getArtifactId() ); cleanPom.setVersion( effectivePom.getVersion() ); cleanPom.setPackaging( effectivePom.getPackaging() ); cleanPom.se... | /**
* This method creates the clean POM as a {@link Model} where to copy elements from that shall be
* {@link ElementHandling#flatten flattened}. Will be mainly empty but contains some the minimum elements that have
* to be kept in flattened POM.
*
* @param effectivePom is the effective POM.
... | This method creates the clean POM as a <code>Model</code> where to copy elements from that shall be <code>ElementHandling#flatten flattened</code>. Will be mainly empty but contains some the minimum elements that have to be kept in flattened POM | createCleanPom | {
"repo_name": "mojohaus/flatten-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java",
"license": "apache-2.0",
"size": 55135
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.maven.model.Build",
"org.apache.maven.model.Dependency",
"org.apache.maven.model.Model",
"org.apache.maven.model.Plugin",
"org.apache.maven.model.Profile",
"org.apache.maven.plugin.MojoExecutionException"
] | import java.util.ArrayList; import java.util.List; import org.apache.maven.model.Build; import org.apache.maven.model.Dependency; import org.apache.maven.model.Model; import org.apache.maven.model.Plugin; import org.apache.maven.model.Profile; import org.apache.maven.plugin.MojoExecutionException; | import java.util.*; import org.apache.maven.model.*; import org.apache.maven.plugin.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 494,114 |
@Test
public void testNotEmptyDir() throws Exception {
Path parentDir = rootDir.toPath().resolve("ae").resolve("ffacd15b0f66d5081a93407d3ff5e3c65a71");
Path overlay = parentDir.resolve("overlay.xhtml");
Path content = parentDir.resolve("content");
Files.createDirectories(overlay.... | void function() throws Exception { Path parentDir = rootDir.toPath().resolve("ae").resolve(STR); Path overlay = parentDir.resolve(STR); Path content = parentDir.resolve(STR); Files.createDirectories(overlay.getParent()); try (InputStream stream = getResourceAsStream(STR)) { Files.copy(stream, overlay); Files.copy(overl... | /**
* Test that an dir not empty with no content will not be removed during cleaning.
*/ | Test that an dir not empty with no content will not be removed during cleaning | testNotEmptyDir | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "deployment-repository/src/test/java/org/jboss/as/repository/ContentRepositoryTest.java",
"license": "lgpl-2.1",
"size": 34875
} | [
"java.io.InputStream",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.Map",
"java.util.Set",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.Map; import java.util.Set; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import java.io.*; import java.nio.file.*; import java.util.*; import org.hamcrest.*; import org.junit.*; | [
"java.io",
"java.nio",
"java.util",
"org.hamcrest",
"org.junit"
] | java.io; java.nio; java.util; org.hamcrest; org.junit; | 2,019,580 |
protected void sequence_ExternalImport(ISerializationContext context, Import semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, Import semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* ExternalImport returns Import
*
* Constraint:
* (ecoreUri=STRING (genmodelUris+=STRING genmodelUris+=STRING*)?)
*/ | Contexts: ExternalImport returns Import Constraint: (ecoreUri=STRING (genmodelUris+=STRING genmodelUris+=STRING*)?) | sequence_ExternalImport | {
"repo_name": "diverse-project/melange",
"path": "plugins/fr.inria.diverse.melange/src-gen/fr/inria/diverse/melange/serializer/MelangeSemanticSequencer.java",
"license": "epl-1.0",
"size": 31055
} | [
"fr.inria.diverse.melange.metamodel.melange.Import",
"org.eclipse.xtext.serializer.ISerializationContext"
] | import fr.inria.diverse.melange.metamodel.melange.Import; import org.eclipse.xtext.serializer.ISerializationContext; | import fr.inria.diverse.melange.metamodel.melange.*; import org.eclipse.xtext.serializer.*; | [
"fr.inria.diverse",
"org.eclipse.xtext"
] | fr.inria.diverse; org.eclipse.xtext; | 684,665 |
private List stripInvisibleAttachments(Object attachments)
{
List stripped = new ArrayList();
if (attachments == null || !(attachments instanceof List))
{
return stripped;
}
Iterator itAttachments = ((List) attachments).iterator();
while (itAttachments.hasNext())
{
Object next = itAttachments.ne... | List function(Object attachments) { List stripped = new ArrayList(); if (attachments == null !(attachments instanceof List)) { return stripped; } Iterator itAttachments = ((List) attachments).iterator(); while (itAttachments.hasNext()) { Object next = itAttachments.next(); if (next instanceof Reference) { Reference att... | /**
* Returns a clone of the passed in List of attachments minus any attachments that should not be displayed in the UI
*/ | Returns a clone of the passed in List of attachments minus any attachments that should not be displayed in the UI | stripInvisibleAttachments | {
"repo_name": "lorenamgUMU/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 677150
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.sakaiproject.assignment.api.AssignmentSubmission",
"org.sakaiproject.entity.api.Reference"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.sakaiproject.assignment.api.AssignmentSubmission; import org.sakaiproject.entity.api.Reference; | import java.util.*; import org.sakaiproject.assignment.api.*; import org.sakaiproject.entity.api.*; | [
"java.util",
"org.sakaiproject.assignment",
"org.sakaiproject.entity"
] | java.util; org.sakaiproject.assignment; org.sakaiproject.entity; | 868,508 |
@Override
public void setBackground(final Color bg) {
super.setBackground(bg);
if (dayChooser != null) {
dayChooser.setBackground(bg);
}
} | void function(final Color bg) { super.setBackground(bg); if (dayChooser != null) { dayChooser.setBackground(bg); } } | /**
* Sets the background color.
*
* @param bg
* the new background
*/ | Sets the background color | setBackground | {
"repo_name": "freeplane/freeplane",
"path": "freeplane/src/main/java/org/freeplane/core/ui/components/calendar/JCalendar.java",
"license": "gpl-2.0",
"size": 17605
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 94,513 |
public static Color toSwtColor(Device device, java.awt.Color color) {
return new org.eclipse.swt.graphics.Color(device,
color.getRed(), color.getGreen(), color.getBlue());
} | static Color function(Device device, java.awt.Color color) { return new org.eclipse.swt.graphics.Color(device, color.getRed(), color.getGreen(), color.getBlue()); } | /**
* Creates a swt color instance to match the rgb values
* of the specified awt color. alpha channel is not supported.
* Note that the dispose method will need to be called on the
* returned object.
*
* @param device The swt device to draw on (display or gc device).
* @param color T... | Creates a swt color instance to match the rgb values of the specified awt color. alpha channel is not supported. Note that the dispose method will need to be called on the returned object | toSwtColor | {
"repo_name": "JSansalone/JFreeChart",
"path": "swt/org/jfree/experimental/swt/SWTUtils.java",
"license": "lgpl-2.1",
"size": 18394
} | [
"org.eclipse.swt.graphics.Color",
"org.eclipse.swt.graphics.Device"
] | import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Device; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 71,126 |
// GridData fieldData = new GridData();
// fieldData.heightHint = 10;
// Composite container = new Composite(parent, SWT.NULL);
// container.setLayout(new GridLayout());
// container.setLayoutData(fieldData);
//
// ScrolledComposite cmpScrolled = new ScrolledComposite(container, SWT.V_SCROLL);
// cmpScr... | Composite cmpField = new Composite(parent, SWT.None); cmpField.setLayout(new GridLayout(2, false)); Label label = new Label(cmpField, SWT.RIGHT); GridDataFactory.swtDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label); label.setText(Messages.getString(STR)); Point namePoint = label.computeSize(SWT.DEFAULT, SWT.DEFAUL... | /**
* Create contents of the preference page.
* @param parent
*/ | Create contents of the preference page | createContents | {
"repo_name": "heartsome/translationstudio8",
"path": "ts/net.heartsome.cat.ts.ui/src/net/heartsome/cat/ts/ui/projectsetting/ProjectSettingBaseInfoPage.java",
"license": "gpl-2.0",
"size": 9470
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.Map",
"net.heartsome.cat.common.util.TextUtil",
"net.heartsome.cat.ts.ui.resource.Messages",
"org.eclipse.jface.layout.GridDataFactory",
"org.eclipse.swt.events.ModifyListener",
"org.eclipse.swt.graphics.Point",
"org.eclipse.swt.layout.GridData... | import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import net.heartsome.cat.common.util.TextUtil; import net.heartsome.cat.ts.ui.resource.Messages; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.graphics.Point; import org.e... | import java.util.*; import net.heartsome.cat.common.util.*; import net.heartsome.cat.ts.ui.resource.*; import org.eclipse.jface.layout.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"java.util",
"net.heartsome.cat",
"org.eclipse.jface",
"org.eclipse.swt"
] | java.util; net.heartsome.cat; org.eclipse.jface; org.eclipse.swt; | 2,055,693 |
public Job createInstallPlan(InstallRequest installRequest)
{
setError(null);
if (!this.authorization.hasAccess(Right.PROGRAM)) {
// Make sure only PR user can remove the right checking or change the users
setRightsProperties(installRequest);
}
Job job =... | Job function(InstallRequest installRequest) { setError(null); if (!this.authorization.hasAccess(Right.PROGRAM)) { setRightsProperties(installRequest); } Job job = null; try { job = this.jobExecutor.execute(InstallPlanJob.JOBTYPE, installRequest); } catch (JobException e) { setError(e); } return job; } | /**
* Start the asynchronous installation plan creation process for an extension.
*
* @param installRequest installation instructions
* @return the {@link Job} object which can be used to monitor the progress of the installation process, or
* {@code null} in case of failure
*/ | Start the asynchronous installation plan creation process for an extension | createInstallPlan | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-extension/xwiki-platform-extension-script/src/main/java/org/xwiki/extension/script/ExtensionManagerScriptService.java",
"license": "lgpl-2.1",
"size": 44384
} | [
"org.xwiki.extension.job.InstallRequest",
"org.xwiki.extension.job.internal.InstallPlanJob",
"org.xwiki.job.Job",
"org.xwiki.job.JobException",
"org.xwiki.security.authorization.Right"
] | import org.xwiki.extension.job.InstallRequest; import org.xwiki.extension.job.internal.InstallPlanJob; import org.xwiki.job.Job; import org.xwiki.job.JobException; import org.xwiki.security.authorization.Right; | import org.xwiki.extension.job.*; import org.xwiki.extension.job.internal.*; import org.xwiki.job.*; import org.xwiki.security.authorization.*; | [
"org.xwiki.extension",
"org.xwiki.job",
"org.xwiki.security"
] | org.xwiki.extension; org.xwiki.job; org.xwiki.security; | 2,508,690 |
@Nullable
public FsInfo getFs() {
return fs;
} | FsInfo function() { return fs; } | /**
* File system level stats.
*/ | File system level stats | getFs | {
"repo_name": "wbowling/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java",
"license": "apache-2.0",
"size": 9989
} | [
"org.elasticsearch.monitor.fs.FsInfo"
] | import org.elasticsearch.monitor.fs.FsInfo; | import org.elasticsearch.monitor.fs.*; | [
"org.elasticsearch.monitor"
] | org.elasticsearch.monitor; | 1,619,636 |
@Override
public Set<String> smembers(final String key) {
checkIsInMultiOrPipeline();
client.smembers(key);
final List<String> members = client.getMultiBulkReply();
return SetFromList.of(members);
} | Set<String> function(final String key) { checkIsInMultiOrPipeline(); client.smembers(key); final List<String> members = client.getMultiBulkReply(); return SetFromList.of(members); } | /**
* Return all the members (elements) of the set value stored at key. This is just syntax glue for
* {@link #sinter(String...) SINTER}.
* <p>
* Time complexity O(N)
* @param key
* @return Multi bulk reply
*/ | Return all the members (elements) of the set value stored at key. This is just syntax glue for <code>#sinter(String...) SINTER</code>. Time complexity O(N) | smembers | {
"repo_name": "RedisLabs/jedis",
"path": "src/main/java/redis/clients/jedis/Jedis.java",
"license": "mit",
"size": 130160
} | [
"java.util.List",
"java.util.Set"
] | import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 397,556 |
protected BusinessObjectDataNotificationRegistrationEntity createBusinessObjectDataNotificationRegistrationEntity(
NotificationRegistrationKey businessObjectDataNotificationRegistrationKey, String notificationEventTypeCode, String businessObjectDefinitionNamespace,
String businessObjectDefinitionNam... | BusinessObjectDataNotificationRegistrationEntity function( NotificationRegistrationKey businessObjectDataNotificationRegistrationKey, String notificationEventTypeCode, String businessObjectDefinitionNamespace, String businessObjectDefinitionName, String businessObjectFormatUsage, String businessObjectFormatFileType, In... | /**
* Creates and persists a business object data notification registration entity.
*
* @param businessObjectDataNotificationRegistrationKey the business object data notification registration key
* @param notificationEventTypeCode the notification event type
* @param businessObjectDefinitionNam... | Creates and persists a business object data notification registration entity | createBusinessObjectDataNotificationRegistrationEntity | {
"repo_name": "seoj/herd",
"path": "herd-code/herd-dao/src/test/java/org/finra/herd/dao/AbstractDaoTest.java",
"license": "apache-2.0",
"size": 127305
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.finra.herd.model.api.xml.BusinessObjectDefinitionKey",
"org.finra.herd.model.api.xml.JobAction",
"org.finra.herd.model.api.xml.NotificationRegistrationKey",
"org.finra.herd.model.jpa.BusinessObjectDataNotificationRegis... | import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.finra.herd.model.api.xml.BusinessObjectDefinitionKey; import org.finra.herd.model.api.xml.JobAction; import org.finra.herd.model.api.xml.NotificationRegistrationKey; import org.finra.herd.model.jpa.BusinessObjectD... | import java.util.*; import org.apache.commons.lang3.*; import org.finra.herd.model.api.xml.*; import org.finra.herd.model.jpa.*; import org.springframework.util.*; | [
"java.util",
"org.apache.commons",
"org.finra.herd",
"org.springframework.util"
] | java.util; org.apache.commons; org.finra.herd; org.springframework.util; | 1,538,513 |
protected Point intersection(double position) {
return intersect = position(coordinate, next.coordinate, position);
} | Point function(double position) { return intersect = position(coordinate, next.coordinate, position); } | /**
* Set the intersection of this line segment to the given position
*
* @param position position of the intersection [0..1]
* @return the {@link Point} of the intersection
*/ | Set the intersection of this line segment to the given position | intersection | {
"repo_name": "coding0011/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/mapper/GeoShapeIndexer.java",
"license": "apache-2.0",
"size": 45809
} | [
"org.elasticsearch.geometry.Point"
] | import org.elasticsearch.geometry.Point; | import org.elasticsearch.geometry.*; | [
"org.elasticsearch.geometry"
] | org.elasticsearch.geometry; | 874,736 |
public static void waitTillInstancesAreCreated(OozieClient oozieClient, String entity, int bundleSeqNo
) throws OozieClientException {
int sleep = INSTANCES_CREATED_TIMEOUT * 60 / 5;
waitTillInstancesAreCreated(oozieClient, entity, bundleSeqNo, sleep);
} | static void function(OozieClient oozieClient, String entity, int bundleSeqNo ) throws OozieClientException { int sleep = INSTANCES_CREATED_TIMEOUT * 60 / 5; waitTillInstancesAreCreated(oozieClient, entity, bundleSeqNo, sleep); } | /**
* Waits till instances of specific job will be created during timeout.
* Timeout is common for most of usual test cases.
*
* @param oozieClient oozieClient of cluster job is running on
* @param entity definition of entity which describes job
* @param bundleSeqNo bundle number if ... | Waits till instances of specific job will be created during timeout. Timeout is common for most of usual test cases | waitTillInstancesAreCreated | {
"repo_name": "kenneththo/incubator-falcon",
"path": "falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java",
"license": "apache-2.0",
"size": 33271
} | [
"org.apache.oozie.client.OozieClient",
"org.apache.oozie.client.OozieClientException"
] | import org.apache.oozie.client.OozieClient; import org.apache.oozie.client.OozieClientException; | import org.apache.oozie.client.*; | [
"org.apache.oozie"
] | org.apache.oozie; | 1,133,282 |
@SuppressWarnings("unchecked")
public VehicleDataResult getFuelLevel() {
Object obj = parameters.get(KEY_FUEL_LEVEL);
if (obj instanceof VehicleDataResult) {
return (VehicleDataResult) obj;
} else if (obj instanceof Hashtable) {
try {
return new Vehicle... | @SuppressWarnings(STR) VehicleDataResult function() { Object obj = parameters.get(KEY_FUEL_LEVEL); if (obj instanceof VehicleDataResult) { return (VehicleDataResult) obj; } else if (obj instanceof Hashtable) { try { return new VehicleDataResult((Hashtable<String, Object>) obj); } catch (Exception e) { DebugTool.logErro... | /**
* Gets Fuel Level
* @return VehicleDataResult
*/ | Gets Fuel Level | getFuelLevel | {
"repo_name": "mrapitis/sdl_android",
"path": "sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java",
"license": "bsd-3-clause",
"size": 25197
} | [
"com.smartdevicelink.util.DebugTool",
"java.util.Hashtable"
] | import com.smartdevicelink.util.DebugTool; import java.util.Hashtable; | import com.smartdevicelink.util.*; import java.util.*; | [
"com.smartdevicelink.util",
"java.util"
] | com.smartdevicelink.util; java.util; | 1,567,929 |
@Override
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
{
return true;
} | boolean function(EntityPlayer par1EntityPlayer) { return true; } | /**
* Do not make give this method the name canInteractWith because it clashes
* with Container
*/ | Do not make give this method the name canInteractWith because it clashes with Container | isUseableByPlayer | {
"repo_name": "micdoodle8/Crossbow_Mod_2",
"path": "src/main/java/micdoodle8/mods/crossbowmod/inventory/InventoryCrossbowBench.java",
"license": "lgpl-3.0",
"size": 4401
} | [
"net.minecraft.entity.player.EntityPlayer"
] | import net.minecraft.entity.player.EntityPlayer; | import net.minecraft.entity.player.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 1,794,470 |
public static String unexpand(String self, int tabStop) {
if (self.length() == 0) return self;
try {
StringBuilder builder = new StringBuilder();
for (String line : readLines(self)) {
builder.append(unexpandLine(line, tabStop));
builder.append(... | static String function(String self, int tabStop) { if (self.length() == 0) return self; try { StringBuilder builder = new StringBuilder(); for (String line : readLines(self)) { builder.append(unexpandLine(line, tabStop)); builder.append("\n"); } if (!self.endsWith("\n")) { builder.deleteCharAt(builder.length() - 1); } ... | /**
* Replaces sequences of whitespaces with tabs.
*
* @param self A String to unexpand
* @param tabStop The number of spaces a tab represents
* @return The unexpanded String
* @since 1.7.3
*/ | Replaces sequences of whitespaces with tabs | unexpand | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,415,961 |
public void deleteAllVersionsandBackup(List<Inode> nodes, User user, boolean respectFrontendRoles) throws DotDataException,
DotSecurityException, DotStateException; | void function(List<Inode> nodes, User user, boolean respectFrontendRoles) throws DotDataException, DotSecurityException, DotStateException; | /**
* This method completely deletes the given node from the system and
* make a xml file backup
*
* @param nodes
* @param user
* @param respectFrontendRoles
* @throws DotDataException
* @throws DotSecurityException
*/ | This method completely deletes the given node from the system and make a xml file backup | deleteAllVersionsandBackup | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/business/skeleton/DotCMSAPIPostHook.java",
"license": "gpl-3.0",
"size": 24644
} | [
"com.dotmarketing.beans.Inode",
"com.dotmarketing.business.DotStateException",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.liferay.portal.model.User",
"java.util.List"
] | import com.dotmarketing.beans.Inode; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.liferay.portal.model.User; import java.util.List; | import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.exception; com.liferay.portal; java.util; | 1,967,159 |
protected void initReadContext(ProfileReadContext ctx) throws IOException {
NetcdfFile netcdfFile = ctx.getNetcdfFile();
final RasterDigest rasterDigest = RasterDigest.createRasterDigest(netcdfFile.getRootGroup());
if (rasterDigest == null) {
throw new IOException("File does not ... | void function(ProfileReadContext ctx) throws IOException { NetcdfFile netcdfFile = ctx.getNetcdfFile(); final RasterDigest rasterDigest = RasterDigest.createRasterDigest(netcdfFile.getRootGroup()); if (rasterDigest == null) { throw new IOException(STR); } ctx.setRasterDigest(rasterDigest); } | /**
* Initialises the {@link ProfileReadContext} for the following read operation.
* When overriding this method at least the {@link RasterDigest} must be set to the context.
*
* @param ctx the context
* @throws IOException if an IO-Error occurs
*/ | Initialises the <code>ProfileReadContext</code> for the following read operation. When overriding this method at least the <code>RasterDigest</code> must be set to the context | initReadContext | {
"repo_name": "arraydev/snap-engine",
"path": "snap-netcdf/src/main/java/org/esa/snap/dataio/netcdf/AbstractNetCdfReaderPlugIn.java",
"license": "gpl-3.0",
"size": 8407
} | [
"java.io.IOException",
"org.esa.snap.dataio.netcdf.util.RasterDigest"
] | import java.io.IOException; import org.esa.snap.dataio.netcdf.util.RasterDigest; | import java.io.*; import org.esa.snap.dataio.netcdf.util.*; | [
"java.io",
"org.esa.snap"
] | java.io; org.esa.snap; | 2,336,781 |
public List<Lane> getLaneList() {
List<Lane> laneList = new ArrayList<Lane>();
if(getChildLaneSet(false) == null)
return laneList;
laneList.addAll(getChildLaneSet(false).getAllLanes());
return laneList;
} | List<Lane> function() { List<Lane> laneList = new ArrayList<Lane>(); if(getChildLaneSet(false) == null) return laneList; laneList.addAll(getChildLaneSet(false).getAllLanes()); return laneList; } | /**
* Retrieves all child lane.
*/ | Retrieves all child lane | getLaneList | {
"repo_name": "dryabkov/activiti-modeler-experiment",
"path": "platform extensions/bpmn20xmlbasic/src/de/hpi/bpmn2_0/model/participant/Lane.java",
"license": "gpl-3.0",
"size": 8583
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 92,319 |
public Filter setParameterList(String name, Collection values); | Filter function(String name, Collection values); | /**
* Set the named parameter's value list for this filter. Used
* in conjunction with IN-style filter criteria.
*
* @param name The parameter's name.
* @param values The values to be expanded into an SQL IN list.
* @return This FilterImpl instance (for method chaining).
*/ | Set the named parameter's value list for this filter. Used in conjunction with IN-style filter criteria | setParameterList | {
"repo_name": "raedle/univis",
"path": "lib/hibernate-3.1.3/src/org/hibernate/Filter.java",
"license": "lgpl-2.1",
"size": 1969
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,421,193 |
public static WaveBasedDigest create(WaveContext wave) {
WaveBasedDigest digest = new WaveBasedDigest(wave);
digest.init();
return digest;
} | static WaveBasedDigest function(WaveContext wave) { WaveBasedDigest digest = new WaveBasedDigest(wave); digest.init(); return digest; } | /**
* Creates a digest.
*/ | Creates a digest | create | {
"repo_name": "vega113/incubator-wave",
"path": "wave/src/main/java/org/waveprotocol/box/webclient/search/WaveBasedDigest.java",
"license": "apache-2.0",
"size": 9496
} | [
"org.waveprotocol.wave.model.document.WaveContext"
] | import org.waveprotocol.wave.model.document.WaveContext; | import org.waveprotocol.wave.model.document.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 2,293,606 |
public static VIF create(Connection c, VIF.Record record) throws
Types.BadServerResponse,
XmlRpcException {
String method_call = "VIF.create";
String session = c.getSessionReference();
Map<String, Object> record_map = record.toMap();
Object[] method_params = {Marshallin... | static VIF function(Connection c, VIF.Record record) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Map<String, Object> record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map resp... | /**
* Create a new VIF instance, and return its handle.
*
* @param record All constructor arguments
* @return reference to the newly created object
*/ | Create a new VIF instance, and return its handle | create | {
"repo_name": "cc14514/hq6",
"path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/VIF.java",
"license": "unlicense",
"size": 34400
} | [
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.util.*; import org.apache.xmlrpc.*; | [
"java.util",
"org.apache.xmlrpc"
] | java.util; org.apache.xmlrpc; | 2,764,895 |
private void updateZones() {
Calendar calendar = Calendar.getInstance();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Weather change: rain=" + rain.getValue() + "/"
+ rain.getMax() + ", temp=" + temperature.getValue() + "/"
+ temperature.getMax() + ", fog=" + fog.getValue() + "/"
+ fog.getMa... | void function() { Calendar calendar = Calendar.getInstance(); if (LOGGER.isDebugEnabled()) { LOGGER.debug(STR + rain.getValue() + "/" + rain.getMax() + STR + temperature.getValue() + "/" + temperature.getMax() + STR + fog.getValue() + "/" + fog.getMax() + STR + thunder.getValue() + "/" + thunder.getMax()); LOGGER.debug... | /**
* Check and update all managed zones.
*/ | Check and update all managed zones | updateZones | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "src/games/stendhal/server/core/rp/WeatherUpdater.java",
"license": "gpl-2.0",
"size": 16853
} | [
"java.util.Calendar",
"java.util.regex.Pattern"
] | import java.util.Calendar; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 2,639,224 |
@Test
public void testBinaryToLong() {
final boolean[] src = {
false, false, true, true, true, false, true, true, true, true, true, true, true,
false, false, false, true, true, true, true, false, false, false, false, false,
false, true, true, true, false, false, false... | void function() { final boolean[] src = { false, false, true, true, true, false, true, true, true, true, true, true, true, false, false, false, true, true, true, true, false, false, false, false, false, false, true, true, true, false, false, false, false, false, false, false, true, true, true, true, true, false, false,... | /**
* Tests {@link Conversion#binaryToLong(boolean[], int, long, int, int)}.
*/ | Tests <code>Conversion#binaryToLong(boolean[], int, long, int, int)</code> | testBinaryToLong | {
"repo_name": "apache/commons-lang",
"path": "src/test/java/org/apache/commons/lang3/ConversionTest.java",
"license": "apache-2.0",
"size": 98680
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 108,931 |
public void testIncrementRetiredWords()
{
System.out.println("FileStorageTest.testIncrementRetiredWords ------------------");
File path_file = new File("");
String user_id = new String("-5519451928541341468");
String current_dir = path_file.getAbsolutePath();
// first get the number of ... | void function() { System.out.println(STR); File path_file = new File(STR-5519451928541341468STRFileStorageTest.testIncrementRetiredWords ----- last_recordSTRnumber_of_retired_wordsSTRFileStorageTest.testIncrementRetiredWords ----- before increment: STRFileStorageTest.testIncrementRetiredWords ----- after increment: STR... | /**
* Testing incrementRetiredWords
*/ | Testing incrementRetiredWords | testIncrementRetiredWords | {
"repo_name": "timofeysie/catechis",
"path": "test/org/catechis/file/FileTestRecordsTest.java",
"license": "apache-2.0",
"size": 42186
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,699,866 |
Validate.notNull(underlyingSwap, "underlying swap");
double strike = underlyingSwap.getFixedLeg().getNthPayment(0).getFixedRate();
// Implementation comment: The strike is working only for swap with same rate on all coupons and standard conventions. The strike equivalent is computed in the pricing methods.
... | Validate.notNull(underlyingSwap, STR); double strike = underlyingSwap.getFixedLeg().getNthPayment(0).getFixedRate(); return new SwaptionPhysicalFixedIbor(expiryTime, strike, underlyingSwap, settlementTime, underlyingSwap.getFixedLeg().isPayer(), isLong); } | /**
* Builder from the expiry date, the underlying swap and the long/short flag. The strike stored in the EuropeanVanillaOption should not be used for pricing as the
* strike can be different for each coupon and need to be computed at the pricing method level.
* @param expiryTime The expiry time.
* @param ... | Builder from the expiry date, the underlying swap and the long/short flag. The strike stored in the EuropeanVanillaOption should not be used for pricing as the strike can be different for each coupon and need to be computed at the pricing method level | from | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/interestrate/swaption/derivative/SwaptionPhysicalFixedIbor.java",
"license": "apache-2.0",
"size": 5574
} | [
"org.apache.commons.lang.Validate"
] | import org.apache.commons.lang.Validate; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 990,174 |
void requestInitialized(ServletRequestEvent event); | void requestInitialized(ServletRequestEvent event); | /**
* Respond to {@link ServletRequest} initialized event.
*/ | Respond to <code>ServletRequest</code> initialized event | requestInitialized | {
"repo_name": "ocpsoft/rewrite",
"path": "api-servlet/src/main/java/org/ocpsoft/rewrite/servlet/spi/RequestListener.java",
"license": "apache-2.0",
"size": 1300
} | [
"javax.servlet.ServletRequestEvent"
] | import javax.servlet.ServletRequestEvent; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,512,960 |
public static Notification buildNotification(Context context,
@DownloadNotificationService.DownloadStatus int downloadStatus,
DownloadUpdate downloadUpdate, int notificationId) {
// TODO(xingliu): Write a unit test for this class.
String channelId = ChromeChannelDefinitions.C... | static Notification function(Context context, @DownloadNotificationService.DownloadStatus int downloadStatus, DownloadUpdate downloadUpdate, int notificationId) { String channelId = ChromeChannelDefinitions.ChannelId.DOWNLOADS; if (LegacyHelpers.isLegacyDownload(downloadUpdate.getContentId()) && downloadStatus == Downl... | /**
* Builds a downloads notification based on the status of the download and its information. All
* changes to this function should consider the difference between normal profile and off the
* record profile.
* @param context of the download.
* @param downloadStatus (in progress, paused, succe... | Builds a downloads notification based on the status of the download and its information. All changes to this function should consider the difference between normal profile and off the record profile | buildNotification | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationFactory.java",
"license": "bsd-3-clause",
"size": 22917
} | [
"android.app.DownloadManager",
"android.app.Notification",
"android.app.PendingIntent",
"android.content.ComponentName",
"android.content.Context",
"android.content.Intent",
"android.os.Bundle",
"android.text.TextUtils",
"androidx.core.app.NotificationCompat",
"org.chromium.base.ContentUriUtils",
... | import android.app.DownloadManager; import android.app.Notification; import android.app.PendingIntent; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import androidx.core.app.NotificationCompat; import org.chr... | import android.app.*; import android.content.*; import android.os.*; import android.text.*; import androidx.core.app.*; import org.chromium.base.*; import org.chromium.chrome.browser.flags.*; import org.chromium.chrome.browser.media.*; import org.chromium.chrome.browser.notifications.*; import org.chromium.chrome.brows... | [
"android.app",
"android.content",
"android.os",
"android.text",
"androidx.core",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.components"
] | android.app; android.content; android.os; android.text; androidx.core; org.chromium.base; org.chromium.chrome; org.chromium.components; | 493,277 |
protected XMLStreamWriter getStreamWriter() {
return streamWriter;
} | XMLStreamWriter function() { return streamWriter; } | /**
* <p>Getter for the field <code>streamWriter</code>.</p>
*
* @return a {@link javax.xml.stream.XMLStreamWriter} object.
*/ | Getter for the field <code>streamWriter</code> | getStreamWriter | {
"repo_name": "MICommunity/psi-jami",
"path": "jami-xml/src/main/java/psidev/psi/mi/jami/xml/io/writer/elements/impl/abstracts/AbstractXmlPublicationWriter.java",
"license": "apache-2.0",
"size": 16585
} | [
"javax.xml.stream.XMLStreamWriter"
] | import javax.xml.stream.XMLStreamWriter; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 1,652,546 |
public static String getBaseDir(File[] selectedFiles) {
String baseDir = "";
if (selectedFiles[0] != null) {
baseDir = selectedFiles[0].getParent();
}
return baseDir == null ? "" : baseDir;
} | static String function(File[] selectedFiles) { String baseDir = STR" : baseDir; } | /**
* returns the base dir of the given files/folders
*
* @param selectedFiles
* @return
*/ | returns the base dir of the given files/folders | getBaseDir | {
"repo_name": "s3phir0th/TextureAttack",
"path": "src/de/tud/textureAttack/model/io/IOUtils.java",
"license": "apache-2.0",
"size": 3486
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,682,479 |
int runIntellijProjectGenerator(
CommandRunnerParams params,
final TargetGraphAndTargets targetGraphAndTargets) throws IOException, InterruptedException {
ImmutableSet<BuildTarget> requiredBuildTargets =
writeProjectAndGetRequiredBuildTargets(params, targetGraphAndTargets);
if (requiredBu... | int runIntellijProjectGenerator( CommandRunnerParams params, final TargetGraphAndTargets targetGraphAndTargets) throws IOException, InterruptedException { ImmutableSet<BuildTarget> requiredBuildTargets = writeProjectAndGetRequiredBuildTargets(params, targetGraphAndTargets); if (requiredBuildTargets.isEmpty()) { return ... | /**
* Run intellij specific project generation actions.
*/ | Run intellij specific project generation actions | runIntellijProjectGenerator | {
"repo_name": "raviagarwal7/buck",
"path": "src/com/facebook/buck/cli/ProjectCommand.java",
"license": "apache-2.0",
"size": 51292
} | [
"com.facebook.buck.event.ConsoleEvent",
"com.facebook.buck.model.BuildTarget",
"com.facebook.buck.rules.TargetGraphAndTargets",
"com.google.common.collect.ImmutableSet",
"java.io.IOException"
] | import com.facebook.buck.event.ConsoleEvent; import com.facebook.buck.model.BuildTarget; import com.facebook.buck.rules.TargetGraphAndTargets; import com.google.common.collect.ImmutableSet; import java.io.IOException; | import com.facebook.buck.event.*; import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.google.common.collect.*; import java.io.*; | [
"com.facebook.buck",
"com.google.common",
"java.io"
] | com.facebook.buck; com.google.common; java.io; | 62,823 |
@Override
public HttpSession getSession(boolean b)
{
HttpSession sess = null;
if (session instanceof MockHttpSession)
{
MockHttpSession mockHttpSession = (MockHttpSession) session;
if (b)
{
mockHttpSession.setTemporary(false);
}
if (mockHttpSession.isTemporary() == false)
... | HttpSession function(boolean b) { HttpSession sess = null; if (session instanceof MockHttpSession) { MockHttpSession mockHttpSession = (MockHttpSession) session; if (b) { mockHttpSession.setTemporary(false); } if (mockHttpSession.isTemporary() == false) { sess = session; } } return sess; } | /**
* Get the session.
*
* @param b
* Ignored, there is always a session
* @return The session
*/ | Get the session | getSession | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockHttpServletRequest.java",
"license": "apache-2.0",
"size": 41258
} | [
"javax.servlet.http.HttpSession"
] | import javax.servlet.http.HttpSession; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,012,657 |
public RexLiteral makeCharLiteral(NlsString str) {
assert str != null;
RelDataType type = SqlUtil.createNlsStringType(typeFactory, str);
return makeLiteral(str, type, SqlTypeName.CHAR);
} | RexLiteral function(NlsString str) { assert str != null; RelDataType type = SqlUtil.createNlsStringType(typeFactory, str); return makeLiteral(str, type, SqlTypeName.CHAR); } | /**
* Creates a character string literal from an {@link NlsString}.
*
* <p>If the string's charset and collation are not set, uses the system
* defaults.
*/ | Creates a character string literal from an <code>NlsString</code>. If the string's charset and collation are not set, uses the system defaults | makeCharLiteral | {
"repo_name": "wanglan/calcite",
"path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java",
"license": "apache-2.0",
"size": 45773
} | [
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.sql.SqlUtil",
"org.apache.calcite.sql.type.SqlTypeName",
"org.apache.calcite.util.NlsString"
] | import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.SqlUtil; import org.apache.calcite.sql.type.SqlTypeName; import org.apache.calcite.util.NlsString; | import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*; import org.apache.calcite.sql.type.*; import org.apache.calcite.util.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 2,034,311 |
public void testToString() {
LinkedBlockingDeque q = populatedDeque(SIZE);
String s = q.toString();
for (int i = 0; i < SIZE; ++i) {
assertTrue(s.contains(String.valueOf(i)));
}
} | void function() { LinkedBlockingDeque q = populatedDeque(SIZE); String s = q.toString(); for (int i = 0; i < SIZE; ++i) { assertTrue(s.contains(String.valueOf(i))); } } | /**
* toString contains toStrings of elements
*/ | toString contains toStrings of elements | testToString | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java",
"license": "gpl-2.0",
"size": 59941
} | [
"java.util.concurrent.LinkedBlockingDeque"
] | import java.util.concurrent.LinkedBlockingDeque; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,607,516 |
public void start(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException; | void function(GridKernalContext ctx, GridSpinBusyLock busyLock) throws IgniteCheckedException; | /**
* Starts indexing.
*
* @param ctx Context.
* @param busyLock Busy lock.
* @throws IgniteCheckedException If failed.
*/ | Starts indexing | start | {
"repo_name": "shroman/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java",
"license": "apache-2.0",
"size": 15927
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.GridKernalContext",
"org.apache.ignite.internal.util.GridSpinBusyLock"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.util.GridSpinBusyLock; | import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 848,867 |
@Override
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
try {
final List<ClassNameInformation> classNames = collectClassNames(dependency);
final String fileName = dependency.getFileName().toLowerCase();
if (classNames.isE... | void function(Dependency dependency, Engine engine) throws AnalysisException { try { final List<ClassNameInformation> classNames = collectClassNames(dependency); final String fileName = dependency.getFileName().toLowerCase(); if (classNames.isEmpty() && (fileName.endsWith(STR) fileName.endsWith(STR) fileName.endsWith(S... | /**
* Loads a specified JAR file and collects information from the manifest and checksums to identify the correct CPE
* information.
*
* @param dependency the dependency to analyze.
* @param engine the engine that is scanning the dependencies
* @throws AnalysisException is thrown if there ... | Loads a specified JAR file and collects information from the manifest and checksums to identify the correct CPE information | analyzeFileType | {
"repo_name": "sirkkalap/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/JarAnalyzer.java",
"license": "apache-2.0",
"size": 51579
} | [
"java.io.IOException",
"java.util.List",
"org.owasp.dependencycheck.Engine",
"org.owasp.dependencycheck.analyzer.exception.AnalysisException",
"org.owasp.dependencycheck.dependency.Dependency"
] | import java.io.IOException; import java.util.List; import org.owasp.dependencycheck.Engine; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.dependency.Dependency; | import java.io.*; import java.util.*; import org.owasp.dependencycheck.*; import org.owasp.dependencycheck.analyzer.exception.*; import org.owasp.dependencycheck.dependency.*; | [
"java.io",
"java.util",
"org.owasp.dependencycheck"
] | java.io; java.util; org.owasp.dependencycheck; | 148,568 |
public Collection<JoinCondition> getJoinConditions() {
return joinConditions;
} | Collection<JoinCondition> function() { return joinConditions; } | /**
* Get the join conditions that should be applied to this index if/when it is used.
*
* @return the join conditions; may be null or empty if there are no join conditions
*/ | Get the join conditions that should be applied to this index if/when it is used | getJoinConditions | {
"repo_name": "pleacu/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/IndexPlan.java",
"license": "apache-2.0",
"size": 9686
} | [
"java.util.Collection",
"javax.jcr.query.qom.JoinCondition"
] | import java.util.Collection; import javax.jcr.query.qom.JoinCondition; | import java.util.*; import javax.jcr.query.qom.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 2,098,413 |
public List<ConfigDescriptionParameter> getParameters() {
return this.parameters;
} | List<ConfigDescriptionParameter> function() { return this.parameters; } | /**
* Returns the description of a concrete configuration parameter.
* <p>
* The returned list is immutable.
*
* @return the description of a concrete configuration parameter (not null, could be empty)
*/ | Returns the description of a concrete configuration parameter. The returned list is immutable | getParameters | {
"repo_name": "iivalchev/smarthome",
"path": "bundles/config/org.eclipse.smarthome.config.core/src/main/java/org/eclipse/smarthome/config/core/ConfigDescription.java",
"license": "epl-1.0",
"size": 5607
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,397,056 |
public HadoopJarStepConfig newRunHiveScriptStepVersioned(String script,
String hiveVersion, String... scriptArgs) {
List<String> hiveArgs = new ArrayList<String>();
hiveArgs.add("--hive-versions");
hiveArgs.add(hiveVersion);
hiveArgs.add("--run-hive-script");
hiveArgs... | HadoopJarStepConfig function(String script, String hiveVersion, String... scriptArgs) { List<String> hiveArgs = new ArrayList<String>(); hiveArgs.add(STR); hiveArgs.add(hiveVersion); hiveArgs.add(STR); hiveArgs.add(STR); hiveArgs.add("-f"); hiveArgs.add(script); hiveArgs.addAll(Arrays.asList(scriptArgs)); return newHiv... | /**
* Step that runs a Hive script on your job flow using the specified Hive version.
*
* @param script
* The script to run.
* @param hiveVersion
* The Hive version to use.
* @param scriptArgs
* Arguments that get passed to the script.
* @ret... | Step that runs a Hive script on your job flow using the specified Hive version | newRunHiveScriptStepVersioned | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java",
"license": "apache-2.0",
"size": 10846
} | [
"com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List"
] | import com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig; import java.util.ArrayList; import java.util.Arrays; import java.util.List; | import com.amazonaws.services.elasticmapreduce.model.*; import java.util.*; | [
"com.amazonaws.services",
"java.util"
] | com.amazonaws.services; java.util; | 1,231,649 |
public static ExportComponentImpl createWithoutInProcessStores(EventQueue eventQueue) {
return new ExportComponentImpl( false, eventQueue);
}
private ExportComponentImpl(boolean supportInProcessStores, EventQueue eventQueue) {
this.spanExporter = SpanExporterImpl.create(EXPORTER_BUFFER_SIZE, EXPORTER_... | static ExportComponentImpl function(EventQueue eventQueue) { return new ExportComponentImpl( false, eventQueue); } private ExportComponentImpl(boolean supportInProcessStores, EventQueue eventQueue) { this.spanExporter = SpanExporterImpl.create(EXPORTER_BUFFER_SIZE, EXPORTER_SCHEDULE_DELAY); this.inProcessRunningSpanSto... | /**
* Returns a new {@code ExportComponentImpl} that has {@code null} instances for {@link
* RunningSpanStore} and {@link SampledSpanStore}.
*
* @return a new {@code ExportComponentImpl}.
*/ | Returns a new ExportComponentImpl that has null instances for <code>RunningSpanStore</code> and <code>SampledSpanStore</code> | createWithoutInProcessStores | {
"repo_name": "songy23/instrumentation-java",
"path": "impl_core/src/main/java/io/opencensus/implcore/trace/export/ExportComponentImpl.java",
"license": "apache-2.0",
"size": 3215
} | [
"io.opencensus.implcore.internal.EventQueue"
] | import io.opencensus.implcore.internal.EventQueue; | import io.opencensus.implcore.internal.*; | [
"io.opencensus.implcore"
] | io.opencensus.implcore; | 1,873,012 |
private void setupDatabase(ConnectionSource connectionSource) throws Exception {
DatabaseTableConfig<Account> accountTableConfig = buildAccountTableConfig();
accountDao = DaoManager.createDao(connectionSource, accountTableConfig);
DatabaseTableConfig<Delivery> deliveryTableConfig = buildDeliveryTableConfig(a... | void function(ConnectionSource connectionSource) throws Exception { DatabaseTableConfig<Account> accountTableConfig = buildAccountTableConfig(); accountDao = DaoManager.createDao(connectionSource, accountTableConfig); DatabaseTableConfig<Delivery> deliveryTableConfig = buildDeliveryTableConfig(accountTableConfig); deli... | /**
* Setup our database and DAOs
*/ | Setup our database and DAOs | setupDatabase | {
"repo_name": "t9nf/ormlite-jdbc",
"path": "src/test/java/com/j256/ormlite/examples/fieldConfig/FieldConfigMain.java",
"license": "isc",
"size": 4344
} | [
"com.j256.ormlite.dao.DaoManager",
"com.j256.ormlite.support.ConnectionSource",
"com.j256.ormlite.table.DatabaseTableConfig",
"com.j256.ormlite.table.TableUtils"
] | import com.j256.ormlite.dao.DaoManager; import com.j256.ormlite.support.ConnectionSource; import com.j256.ormlite.table.DatabaseTableConfig; import com.j256.ormlite.table.TableUtils; | import com.j256.ormlite.dao.*; import com.j256.ormlite.support.*; import com.j256.ormlite.table.*; | [
"com.j256.ormlite"
] | com.j256.ormlite; | 325,651 |
public static Object callConstructor(Class<?> clazz, Class<?>[] argTypes, Object[] args) throws Exception {
Constructor constructor = clazz.getConstructor(argTypes);
return constructor.newInstance(args);
} | static Object function(Class<?> clazz, Class<?>[] argTypes, Object[] args) throws Exception { Constructor constructor = clazz.getConstructor(argTypes); return constructor.newInstance(args); } | /**
* Helper method to call a constructor.
*
* @param clazz the class
* @param argTypes argument Classes for constructor lookup. Must not be null.
* @param args the argument array
*
* @return the value the method returns.
*
* @throws Exception if the method is not fou... | Helper method to call a constructor | callConstructor | {
"repo_name": "clementvillanueva/SimpleHDR",
"path": "src/com/jidesoft/utils/ReflectionUtils.java",
"license": "gpl-3.0",
"size": 9409
} | [
"java.lang.reflect.Constructor"
] | import java.lang.reflect.Constructor; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,878,316 |
public void setFont(final Font font) {
this.font = font;
} | void function(final Font font) { this.font = font; } | /**
* Sets the font.
*
* @param font the font.
*/ | Sets the font | setFont | {
"repo_name": "apetresc/JCommon",
"path": "src/main/java/org/jfree/demo/DrawStringPanel.java",
"license": "lgpl-2.1",
"size": 5351
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 521,985 |
@Issue("JENKINS-5769")
@Test
public void unmarshalThrowableMissingField() {
Level oldLevel = disableLogging();
Baz baz = new Baz();
baz.myFailure = new Exception("foo");
XStream2 xs = new XStream2();
String xml = xs.toXML(baz);
baz = (Baz)xs.fromXML(xml);
... | @Issue(STR) void function() { Level oldLevel = disableLogging(); Baz baz = new Baz(); baz.myFailure = new Exception("foo"); XStream2 xs = new XStream2(); String xml = xs.toXML(baz); baz = (Baz)xs.fromXML(xml); assertEquals("foo", baz.myFailure.getMessage()); baz = (Baz)xs.fromXML(STR + STR + STR + STR + STR + STR + STR... | /**
* Verify RobustReflectionConverter can handle missing fields in a class extending
* Throwable/Exception (default ThrowableConverter registered by XStream calls
* ReflectionConverter directly, rather than our RobustReflectionConverter replacement).
*/ | Verify RobustReflectionConverter can handle missing fields in a class extending Throwable/Exception (default ThrowableConverter registered by XStream calls ReflectionConverter directly, rather than our RobustReflectionConverter replacement) | unmarshalThrowableMissingField | {
"repo_name": "pjanouse/jenkins",
"path": "core/src/test/java/hudson/util/XStream2Test.java",
"license": "mit",
"size": 22113
} | [
"java.util.logging.Level",
"org.junit.Assert",
"org.jvnet.hudson.test.Issue"
] | import java.util.logging.Level; import org.junit.Assert; import org.jvnet.hudson.test.Issue; | import java.util.logging.*; import org.junit.*; import org.jvnet.hudson.test.*; | [
"java.util",
"org.junit",
"org.jvnet.hudson"
] | java.util; org.junit; org.jvnet.hudson; | 1,814,588 |
public final int updateAndGet(T obj, IntUnaryOperator updateFunction) {
int prev, next;
do {
prev = get(obj);
next = updateFunction.applyAsInt(prev);
} while (!compareAndSet(obj, prev, next));
return next;
} | final int function(T obj, IntUnaryOperator updateFunction) { int prev, next; do { prev = get(obj); next = updateFunction.applyAsInt(prev); } while (!compareAndSet(obj, prev, next)); return next; } | /**
* Atomically updates the field of the given object managed by this updater
* with the results of applying the given function, returning the updated
* value. The function should be side-effect-free, since it may be
* re-applied when attempted updates fail due to contention among threads.
*
... | Atomically updates the field of the given object managed by this updater with the results of applying the given function, returning the updated value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads | updateAndGet | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java",
"license": "apache-2.0",
"size": 18980
} | [
"java.util.function.IntUnaryOperator"
] | import java.util.function.IntUnaryOperator; | import java.util.function.*; | [
"java.util"
] | java.util; | 21,946 |
public TreeViewItem getItem(final Pattern namePattern)
throws AutomationException {
List<Element> collection;
Element foundElement = null;
collection = this.findAll(new TreeScope(TreeScope.DESCENDANTS),
this.createControlTypeCondition(ControlType.TreeItem));
... | TreeViewItem function(final Pattern namePattern) throws AutomationException { List<Element> collection; Element foundElement = null; collection = this.findAll(new TreeScope(TreeScope.DESCENDANTS), this.createControlTypeCondition(ControlType.TreeItem)); for (Element element : collection) { String name = element.getName(... | /**
* Gets the item matching the namePattern.
* @param namePattern Name to look for
* @return The selected item
* @throws AutomationException Something has gone wrong
*/ | Gets the item matching the namePattern | getItem | {
"repo_name": "mmarquee/ui-automation",
"path": "src/main/java/mmarquee/automation/controls/TreeView.java",
"license": "apache-2.0",
"size": 4407
} | [
"java.util.List",
"java.util.regex.Pattern"
] | import java.util.List; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 1,886,040 |
public static <M extends Writable> M createPartialAggregateValue(Configuration conf, String aggClassName) {
Class<M> aggregateValueClass = getPartialAggregateValueClass(conf, aggClassName);
try {
return aggregateValueClass.newInstance();
} catch (InstantiationException e) {
... | static <M extends Writable> M function(Configuration conf, String aggClassName) { Class<M> aggregateValueClass = getPartialAggregateValueClass(conf, aggClassName); try { return aggregateValueClass.newInstance(); } catch (InstantiationException e) { throw new IllegalArgumentException(STR, e); } catch (IllegalAccessExcep... | /**
* Create a user partial aggregate value
*
* @param conf
* Configuration to check
* @return Instantiated user aggregate value
*/ | Create a user partial aggregate value | createPartialAggregateValue | {
"repo_name": "sigmod/asterixdb-analytics",
"path": "pregelix/pregelix-api/src/main/java/edu/uci/ics/pregelix/api/util/BspUtils.java",
"license": "apache-2.0",
"size": 39926
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.io.Writable"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Writable; | import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,979,091 |
List<I_C_AllocationHdr> retrievePostedWithoutFactAcct(Properties ctx, Date startTime); | List<I_C_AllocationHdr> retrievePostedWithoutFactAcct(Properties ctx, Date startTime); | /**
* Retrieve all the AllocationHdr documents that are marked as posted but do not actually have fact accounts.
* Exclude the entries that don't have either Amount, DiscountAmt, WriteOffAmt or OverUnderAmt. These entries will produce 0 in posting.
*
* @param ctx
* @param startTime
* @return
*/ | Retrieve all the AllocationHdr documents that are marked as posted but do not actually have fact accounts. Exclude the entries that don't have either Amount, DiscountAmt, WriteOffAmt or OverUnderAmt. These entries will produce 0 in posting | retrievePostedWithoutFactAcct | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java/de/metas/allocation/api/IAllocationDAO.java",
"license": "gpl-2.0",
"size": 3445
} | [
"java.util.Date",
"java.util.List",
"java.util.Properties"
] | import java.util.Date; import java.util.List; import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,656,482 |
protected IrCommand getIrCommand(String someString){
IrCommand theCommand = null;
if(someString != null) {
// Run through the dB if IrCommands to see which one is matching, if any, the payload we just received
Iterator<IrCommand> commandIterator = irCommands.iterator();
while(commandIterator.hasNext()... | IrCommand function(String someString){ IrCommand theCommand = null; if(someString != null) { Iterator<IrCommand> commandIterator = irCommands.iterator(); while(commandIterator.hasNext()){ IrCommand aCommand = commandIterator.next(); if(aCommand.sequenceToHEXString().equals(someString)){ theCommand = aCommand; break; } ... | /**
* Fetch the IrCommand that corresponds with the given (hex)String.
*
* @param someString
* the some string
* @return the ir command
*/ | Fetch the IrCommand that corresponds with the given (hex)String | getIrCommand | {
"repo_name": "paulianttila/openhab",
"path": "bundles/binding/org.openhab.binding.irtrans/src/main/java/org/openhab/binding/irtrans/internal/IRtransBinding.java",
"license": "epl-1.0",
"size": 25637
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,660,643 |
@GwtIncompatible // To be supported
CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) {
checkState(keyEquivalence == null, "key equivalence was already set to %s", keyEquivalence);
keyEquivalence = checkNotNull(equivalence);
return this;
} | @GwtIncompatible CacheBuilder<K, V> keyEquivalence(Equivalence<Object> equivalence) { checkState(keyEquivalence == null, STR, keyEquivalence); keyEquivalence = checkNotNull(equivalence); return this; } | /**
* Sets a custom {@code Equivalence} strategy for comparing keys.
*
* <p>By default, the cache uses {@link Equivalence#identity} to determine key equality when
* {@link #weakKeys} is specified, and {@link Equivalence#equals()} otherwise.
*
* @return this {@code CacheBuilder} instance (for chaining)... | Sets a custom Equivalence strategy for comparing keys. By default, the cache uses <code>Equivalence#identity</code> to determine key equality when <code>#weakKeys</code> is specified, and <code>Equivalence#equals()</code> otherwise | keyEquivalence | {
"repo_name": "rgoldberg/guava",
"path": "guava/src/com/google/common/cache/CacheBuilder.java",
"license": "apache-2.0",
"size": 45681
} | [
"com.google.common.annotations.GwtIncompatible",
"com.google.common.base.Equivalence",
"com.google.common.base.Preconditions"
] | import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Equivalence; import com.google.common.base.Preconditions; | import com.google.common.annotations.*; import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,315,844 |
public ViewFactory getViewFactory() {
return this;
} | ViewFactory function() { return this; } | /**
* Fetches a factory that is suitable for producing
* views of any models that are produced by this
* kit. The default is to have the UI produce the
* factory, so this method has no implementation.
*
* @return the view factory
*/ | Fetches a factory that is suitable for producing views of any models that are produced by this kit. The default is to have the UI produce the factory, so this method has no implementation | getViewFactory | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JEditorPane.java",
"license": "apache-2.0",
"size": 96705
} | [
"javax.swing.text.ViewFactory"
] | import javax.swing.text.ViewFactory; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 1,144,586 |
public void randomIndexTemplate() throws IOException {
// TODO move settings for random directory etc here into the index based randomized settings.
if (cluster().size() > 0) {
Settings.Builder randomSettingsBuilder =
setRandomIndexSettings(getRandom(), Settings.buil... | void function() throws IOException { if (cluster().size() > 0) { Settings.Builder randomSettingsBuilder = setRandomIndexSettings(getRandom(), Settings.builder()) .put(SETTING_INDEX_SEED, getRandom().nextLong()); randomSettingsBuilder.put(SETTING_NUMBER_OF_SHARDS, numberOfShards()) .put(SETTING_NUMBER_OF_REPLICAS, numbe... | /**
* Creates a randomized index template. This template is used to pass in randomized settings on a
* per index basis. Allows to enable/disable the randomization for number of shards and replicas
*/ | Creates a randomized index template. This template is used to pass in randomized settings on a per index basis. Allows to enable/disable the randomization for number of shards and replicas | randomIndexTemplate | {
"repo_name": "Ansh90/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 97784
} | [
"java.io.IOException",
"org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.index.codec.CodecService",... | import java.io.IOException; import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.cod... | import java.io.*; import org.elasticsearch.action.admin.indices.template.put.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.codec.*; import org.elasticsearch.index.fielddata.*; import org.elasticsearch.index.mapper.*; import org.elasticsearch.in... | [
"java.io",
"org.elasticsearch.action",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.test",
"org.hamcrest"
] | java.io; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.test; org.hamcrest; | 1,766,342 |
@Test
public void homePageForceEncryptionOfRequestListener()
{
PageAndComponentProvider provider = new PageAndComponentProvider(tester.getApplication().getHomePage(), "link");
IRequestHandler requestHandler = new BookmarkableListenerRequestHandler(provider);
Url plainUrl = mapper.getDelegateMapper().mapHandl... | void function() { PageAndComponentProvider provider = new PageAndComponentProvider(tester.getApplication().getHomePage(), "link"); IRequestHandler requestHandler = new BookmarkableListenerRequestHandler(provider); Url plainUrl = mapper.getDelegateMapper().mapHandler(requestHandler); assertTrue(STR + plainUrl.toString()... | /**
* Tests that we do not allow unencrypted URLs to IRequestListeners on the home page, like: ?0-0.ILinkListener-link
*/ | Tests that we do not allow unencrypted URLs to IRequestListeners on the home page, like: ?0-0.ILinkListener-link | homePageForceEncryptionOfRequestListener | {
"repo_name": "dashorst/wicket",
"path": "wicket-core/src/test/java/org/apache/wicket/core/request/mapper/CryptoMapperTest.java",
"license": "apache-2.0",
"size": 24885
} | [
"org.apache.wicket.core.request.handler.BookmarkableListenerRequestHandler",
"org.apache.wicket.core.request.handler.PageAndComponentProvider",
"org.apache.wicket.request.IRequestHandler",
"org.apache.wicket.request.Url"
] | import org.apache.wicket.core.request.handler.BookmarkableListenerRequestHandler; import org.apache.wicket.core.request.handler.PageAndComponentProvider; import org.apache.wicket.request.IRequestHandler; import org.apache.wicket.request.Url; | import org.apache.wicket.core.request.handler.*; import org.apache.wicket.request.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,267,619 |
public void addJump(final JoinPredecessor jumpOrigin, final Label targetLabel) {
if (jumps == null) {
jumps = new HashMap<>();
}
jumps.put(targetLabel, jumpOrigin);
} | void function(final JoinPredecessor jumpOrigin, final Label targetLabel) { if (jumps == null) { jumps = new HashMap<>(); } jumps.put(targetLabel, jumpOrigin); } | /**
* Adds a jump that crosses this split node's boundary (it originates within the split node, and goes to a target
* outside of it).
* @param jumpOrigin the join predecessor that's the origin of the jump
* @param targetLabel the label that's the target of the jump.
*/ | Adds a jump that crosses this split node's boundary (it originates within the split node, and goes to a target outside of it) | addJump | {
"repo_name": "koutheir/incinerator-hotspot",
"path": "nashorn/src/jdk/nashorn/internal/ir/SplitNode.java",
"license": "gpl-2.0",
"size": 5538
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,513,709 |
public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) {
if (DEBUG){
Log.d(TAG, "onSelectedChanged:"+actionState);
}
if (viewHolder != null) {
sUICallback.onSelected(viewHolder.itemView);
}
} | void function(RecyclerView.ViewHolder viewHolder, int actionState) { if (DEBUG){ Log.d(TAG, STR+actionState); } if (viewHolder != null) { sUICallback.onSelected(viewHolder.itemView); } } | /**
* Called when the ViewHolder swiped or dragged by the ItemTouchHelper is changed.
* <p/>
* If you override this method, you should call super.
*
* @param viewHolder The new ViewHolder that is being swiped or dragged. Might be null if
* it is ... | Called when the ViewHolder swiped or dragged by the ItemTouchHelper is changed. If you override this method, you should call super | onSelectedChanged | {
"repo_name": "YumoDevTest/AndroidOpenTest",
"path": "ui/src/main/java/com/yumodev/ui/recyclerview/touchhelper/DragItemTouchHelper1.java",
"license": "apache-2.0",
"size": 108574
} | [
"android.support.v7.widget.RecyclerView",
"android.util.Log"
] | import android.support.v7.widget.RecyclerView; import android.util.Log; | import android.support.v7.widget.*; import android.util.*; | [
"android.support",
"android.util"
] | android.support; android.util; | 965,236 |
public void addRoute(String routeName, Location loc)
{
_correspondences.put(getUniqueKey(loc), routeName);
}
| void function(String routeName, Location loc) { _correspondences.put(getUniqueKey(loc), routeName); } | /**
* Add correspondence between specific route and specific spawn point
* @param routeName name of route
* @param loc Location of spawn point
*/ | Add correspondence between specific route and specific spawn point | addRoute | {
"repo_name": "rubenswagner/L2J-Global",
"path": "java/com/l2jglobal/gameserver/model/holders/NpcRoutesHolder.java",
"license": "gpl-3.0",
"size": 1974
} | [
"com.l2jglobal.gameserver.model.Location"
] | import com.l2jglobal.gameserver.model.Location; | import com.l2jglobal.gameserver.model.*; | [
"com.l2jglobal.gameserver"
] | com.l2jglobal.gameserver; | 1,216,142 |
@SuppressWarnings("unchecked") // impl never uses a parameter or returns any non-null value
static <E> Queue<E> discardingQueue() {
return (Queue) DISCARDING_QUEUE;
}
static class StrongEntry<K, V> extends AbstractReferenceEntry<K, V> {
final K key;
StrongEntry(K key, int hash, @Nullable Ref... | @SuppressWarnings(STR) static <E> Queue<E> discardingQueue() { return (Queue) DISCARDING_QUEUE; } static class StrongEntry<K, V> extends AbstractReferenceEntry<K, V> { final K key; StrongEntry(K key, int hash, @Nullable ReferenceEntry<K, V> next) { this.key = key; this.hash = hash; this.next = next; } | /**
* Queue that discards all elements.
*/ | Queue that discards all elements | discardingQueue | {
"repo_name": "wolffcm/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/cache/LocalCache.java",
"license": "agpl-3.0",
"size": 144718
} | [
"java.util.Queue",
"javax.annotation_voltpatches.Nullable"
] | import java.util.Queue; import javax.annotation_voltpatches.Nullable; | import java.util.*; import javax.annotation_voltpatches.*; | [
"java.util",
"javax.annotation_voltpatches"
] | java.util; javax.annotation_voltpatches; | 1,828,924 |
static public int getServiceByName(String tcpipService,
String tcpipClass) {
int port = -1;
// Look for our service, line-by-line:
try {
String line;
BufferedReader br = new BufferedReader(
new InputStreamReader(
new FileInputStream(
SERVICES_FILENAME)));
// Read /etc/servic... | static int function(String tcpipService, String tcpipClass) { int port = -1; try { String line; BufferedReader br = new BufferedReader( new InputStreamReader( new FileInputStream( SERVICES_FILENAME))); while (((line = br.readLine()) != null) && (port == -1)) { if ((line.length() != 0) && (line.charAt(0) != '#')) { port... | /**
* The <code>getServiceByName()</code> method
* Search the /etc/services file for a service name and class.
* Return the port number.
* <p>
* For example, given this line in <tt>/etc/services</tt>,
* <pre>
* farkle 4545/udp
* </pre>
* In this example, a search for service "farkle" and class "udp"
... | The <code>getServiceByName()</code> method Search the /etc/services file for a service name and class. Return the port number. For example, given this line in /etc/services, <code> farkle 4545/udp </code> In this example, a search for service "farkle" and class "udp" will return 4545 | getServiceByName | {
"repo_name": "jacobmorzinski/moira-java",
"path": "GetServiceByName.java",
"license": "mit",
"size": 7557
} | [
"java.io.BufferedReader",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 13,578 |
void sendDTMFDigit(int callID, String digit) {
try {
sipManager.sendDTMF(callID, digit);
}
catch (CommunicationsException exc) {
Log.error("sendDTMFDigit", exc);
}
}
| void sendDTMFDigit(int callID, String digit) { try { sipManager.sendDTMF(callID, digit); } catch (CommunicationsException exc) { Log.error(STR, exc); } } | /**
* Send the dtmf digit to the sip server.
*
* @param callID the caller id
* @param digit the digit typed.
*/ | Send the dtmf digit to the sip server | sendDTMFDigit | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/plugins/sip/src/java/net/java/sipmack/softphone/SoftPhoneManager.java",
"license": "apache-2.0",
"size": 38087
} | [
"net.java.sipmack.common.Log",
"net.java.sipmack.sip.CommunicationsException"
] | import net.java.sipmack.common.Log; import net.java.sipmack.sip.CommunicationsException; | import net.java.sipmack.common.*; import net.java.sipmack.sip.*; | [
"net.java.sipmack"
] | net.java.sipmack; | 1,139,541 |
static void rollback(Connection conn, Logger logger) throws SQLException {
final String DEBUG_HEADER = "rollback(): ";
if (conn == null) {
throw new IllegalArgumentException("Null connection");
}
try {
conn.rollback();
if (logger != null && logger.isDebug3())
logger.debug3(DEBUG_H... | static void rollback(Connection conn, Logger logger) throws SQLException { final String DEBUG_HEADER = STR; if (conn == null) { throw new IllegalArgumentException(STR); } try { conn.rollback(); if (logger != null && logger.isDebug3()) logger.debug3(DEBUG_HEADER + STR); } catch (SQLException sqle) { if (logger != null) ... | /**
* Rolls back a transaction.
*
* @param conn
* A connection with the database connection to be rolled back.
* @param logger
* A Logger used to report errors.
* @throws SQLException
* if any problem occurred accessing the database.
*/ | Rolls back a transaction | rollback | {
"repo_name": "lockss/lockss-daemon",
"path": "src/org/lockss/db/JdbcBridge.java",
"license": "bsd-3-clause",
"size": 28522
} | [
"java.sql.Connection",
"java.sql.SQLException",
"org.lockss.util.Logger"
] | import java.sql.Connection; import java.sql.SQLException; import org.lockss.util.Logger; | import java.sql.*; import org.lockss.util.*; | [
"java.sql",
"org.lockss.util"
] | java.sql; org.lockss.util; | 1,837,971 |
VirtualLink addLink(NetworkId networkId, ConnectPoint src, ConnectPoint dst, Link.State state, TunnelId realizedBy); | VirtualLink addLink(NetworkId networkId, ConnectPoint src, ConnectPoint dst, Link.State state, TunnelId realizedBy); | /**
* Adds a new virtual link.
*
* @param networkId network identifier
* @param src source end-point of the link
* @param dst destination end-point of the link
* @param state link state
* @param realizedBy underlying tunnel identifier using which this link is reali... | Adds a new virtual link | addLink | {
"repo_name": "donNewtonAlpha/onos",
"path": "incubator/api/src/main/java/org/onosproject/incubator/net/virtual/VirtualNetworkStore.java",
"license": "apache-2.0",
"size": 9227
} | [
"org.onosproject.incubator.net.tunnel.TunnelId",
"org.onosproject.net.ConnectPoint",
"org.onosproject.net.Link"
] | import org.onosproject.incubator.net.tunnel.TunnelId; import org.onosproject.net.ConnectPoint; import org.onosproject.net.Link; | import org.onosproject.incubator.net.tunnel.*; import org.onosproject.net.*; | [
"org.onosproject.incubator",
"org.onosproject.net"
] | org.onosproject.incubator; org.onosproject.net; | 2,024,921 |
public static RenderScript create(Context ctx, ContextType ct) {
int v = ctx.getApplicationInfo().targetSdkVersion;
return create(ctx, v, ct, CREATE_FLAG_NONE);
} | static RenderScript function(Context ctx, ContextType ct) { int v = ctx.getApplicationInfo().targetSdkVersion; return create(ctx, v, ct, CREATE_FLAG_NONE); } | /**
* Create a RenderScript context.
*
*
* @param ctx The context.
* @param ct The type of context to be created.
* @return RenderScript
*/ | Create a RenderScript context | create | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/rs/java/android/renderscript/RenderScript.java",
"license": "gpl-3.0",
"size": 52423
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,259,564 |
private String dropTableIndex() {
String sql = null;
if (DbConnectionFactory.isMySql()) {
sql = MYSQL_DROP_WORKFLOW_SCHEME_X_STRUCTURE_INDEX;
} else if (DbConnectionFactory.isPostgres()) {
sql = POSTGRES_DROP_WORKFLOW_SCHEME_X_STRUCTURE_INDEX;
} else if (D... | String function() { String sql = null; if (DbConnectionFactory.isMySql()) { sql = MYSQL_DROP_WORKFLOW_SCHEME_X_STRUCTURE_INDEX; } else if (DbConnectionFactory.isPostgres()) { sql = POSTGRES_DROP_WORKFLOW_SCHEME_X_STRUCTURE_INDEX; } else if (DbConnectionFactory.isMsSql()) { sql = MSSQL_DROP_WORKFLOW_SCHEME_X_STRUCTURE_I... | /**
* Drops the {@code workflow_scheme_x_structure} unique index.
* @return
*/ | Drops the workflow_scheme_x_structure unique index | dropTableIndex | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task04305UpdateWorkflowActionTable.java",
"license": "gpl-3.0",
"size": 36884
} | [
"com.dotmarketing.db.DbConnectionFactory"
] | import com.dotmarketing.db.DbConnectionFactory; | import com.dotmarketing.db.*; | [
"com.dotmarketing.db"
] | com.dotmarketing.db; | 840,801 |
@Generated
@Selector("isUserInteractionEnabled")
public native boolean isUserInteractionEnabled(); | @Selector(STR) native boolean function(); | /**
* Defaults to YES. Raises if set on an active animator.
*/ | Defaults to YES. Raises if set on an active animator | isUserInteractionEnabled | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIViewPropertyAnimator.java",
"license": "apache-2.0",
"size": 14297
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 302,087 |
public com.squareup.okhttp.Call validateOpenAPIDefinitionAsync(String url, File file, Boolean returnContent, final ApiCallback<OpenAPIDefinitionValidationResponseDTO> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestLi... | com.squareup.okhttp.Call function(String url, File file, Boolean returnContent, final ApiCallback<OpenAPIDefinitionValidationResponseDTO> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | /**
* Validate an OpenAPI Definition (asynchronously)
* This operation can be used to validate an OpenAPI definition and retrieve a summary. Provide either `url` or `file` to specify the definition.
* @param url OpenAPI definition url (optional)
* @param file OpenAPI definition ... | Validate an OpenAPI Definition (asynchronously) This operation can be used to validate an OpenAPI definition and retrieve a summary. Provide either `url` or `file` to specify the definition | validateOpenAPIDefinitionAsync | {
"repo_name": "jaadds/product-apim",
"path": "modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ValidationApi.java",
"license": "apache-2.0",
"size": 38246
} | [
"java.io.File",
"org.wso2.am.integration.clients.publisher.api.ApiCallback",
"org.wso2.am.integration.clients.publisher.api.ApiException",
"org.wso2.am.integration.clients.publisher.api.ProgressRequestBody",
"org.wso2.am.integration.clients.publisher.api.ProgressResponseBody",
"org.wso2.am.integration.cli... | import java.io.File; import org.wso2.am.integration.clients.publisher.api.ApiCallback; import org.wso2.am.integration.clients.publisher.api.ApiException; import org.wso2.am.integration.clients.publisher.api.ProgressRequestBody; import org.wso2.am.integration.clients.publisher.api.ProgressResponseBody; import org.wso2.a... | import java.io.*; import org.wso2.am.integration.clients.publisher.api.*; import org.wso2.am.integration.clients.publisher.api.v1.dto.*; | [
"java.io",
"org.wso2.am"
] | java.io; org.wso2.am; | 1,165,645 |
void moveRight() {
List<IAssignable<T>> selectedValuesLeft = assignmentComposite.getSelectedValuesLeft();
if (selectedValuesLeft.isEmpty()) {
return;
}
List<IAssignable<T>> valuesLeft = assignmentCompositeModel.getTableRowValuesLeft();
List<IAssignable<T>> valuesRight = assignmentCompositeModel.getTabl... | void moveRight() { List<IAssignable<T>> selectedValuesLeft = assignmentComposite.getSelectedValuesLeft(); if (selectedValuesLeft.isEmpty()) { return; } List<IAssignable<T>> valuesLeft = assignmentCompositeModel.getTableRowValuesLeft(); List<IAssignable<T>> valuesRight = assignmentCompositeModel.getTableRowValuesRight()... | /**
* Moves the selected entities from the left table to the right.
*/ | Moves the selected entities from the left table to the right | moveRight | {
"repo_name": "kaiwinter/swing-assignmentdialog",
"path": "assignmentdialog/src/main/java/com/googlecode/assignmentdialog/ui/composite/AssignmentCompositeController.java",
"license": "apache-2.0",
"size": 10391
} | [
"com.googlecode.assignmentdialog.core.IAssignable",
"java.util.List"
] | import com.googlecode.assignmentdialog.core.IAssignable; import java.util.List; | import com.googlecode.assignmentdialog.core.*; import java.util.*; | [
"com.googlecode.assignmentdialog",
"java.util"
] | com.googlecode.assignmentdialog; java.util; | 1,117,894 |
public void setRepositoryService(RepositoryService repositoryService) {
this.repositoryService = repositoryService;
}
| void function(RepositoryService repositoryService) { this.repositoryService = repositoryService; } | /**
* Set the repository service
*
* @param repositoryService
*/ | Set the repository service | setRepositoryService | {
"repo_name": "nate-rcl/irplus",
"path": "ir_web/src/edu/ur/ir/web/action/researcher/ManageResearcherPicture.java",
"license": "apache-2.0",
"size": 6050
} | [
"edu.ur.ir.repository.RepositoryService"
] | import edu.ur.ir.repository.RepositoryService; | import edu.ur.ir.repository.*; | [
"edu.ur.ir"
] | edu.ur.ir; | 599,752 |
void addPredicate(Predicate predicate); | void addPredicate(Predicate predicate); | /**
* Adds a predicate to the builder.
* @param predicate the predicate to add.
*/ | Adds a predicate to the builder | addPredicate | {
"repo_name": "loddar/ajunit",
"path": "ajunit/src/main/java/org/failearly/ajunit/internal/builder/Builder.java",
"license": "gpl-3.0",
"size": 1624
} | [
"org.failearly.ajunit.internal.predicate.Predicate"
] | import org.failearly.ajunit.internal.predicate.Predicate; | import org.failearly.ajunit.internal.predicate.*; | [
"org.failearly.ajunit"
] | org.failearly.ajunit; | 912,820 |
public static void startReview() throws ExecutionException {
new StartReviewAction().execute(null);
} | static void function() throws ExecutionException { new StartReviewAction().execute(null); } | /**
* Acts as if the user clicked "start review".
*/ | Acts as if the user clicked "start review" | startReview | {
"repo_name": "tobiasbaum/reviewtool",
"path": "de.setsoftware.reviewtool.core/src/de/setsoftware/reviewtool/ui/facade/ReviewUi.java",
"license": "epl-1.0",
"size": 2272
} | [
"de.setsoftware.reviewtool.ui.popup.actions.StartReviewAction",
"org.eclipse.core.commands.ExecutionException"
] | import de.setsoftware.reviewtool.ui.popup.actions.StartReviewAction; import org.eclipse.core.commands.ExecutionException; | import de.setsoftware.reviewtool.ui.popup.actions.*; import org.eclipse.core.commands.*; | [
"de.setsoftware.reviewtool",
"org.eclipse.core"
] | de.setsoftware.reviewtool; org.eclipse.core; | 1,442,653 |
public static void issueRedirect(ServletRequest request, ServletResponse response, String url, Map queryParams, boolean contextRelative, boolean http10Compatible) throws IOException {
RedirectView view = new RedirectView(url, contextRelative, http10Compatible);
view.renderMergedOutputModel(queryPara... | static void function(ServletRequest request, ServletResponse response, String url, Map queryParams, boolean contextRelative, boolean http10Compatible) throws IOException { RedirectView view = new RedirectView(url, contextRelative, http10Compatible); view.renderMergedOutputModel(queryParams, toHttp(request), toHttp(resp... | /**
* Redirects the current request to a new URL based on the given parameters.
*
* @param request the servlet request.
* @param response the servlet response.
* @param url the URL to redirect the user to.
* @param queryParams a map of parameters that sho... | Redirects the current request to a new URL based on the given parameters | issueRedirect | {
"repo_name": "sonatype/shiro",
"path": "web/src/main/java/org/apache/shiro/web/util/WebUtils.java",
"license": "apache-2.0",
"size": 27860
} | [
"java.io.IOException",
"java.util.Map",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse"
] | import java.io.IOException; import java.util.Map; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; | import java.io.*; import java.util.*; import javax.servlet.*; | [
"java.io",
"java.util",
"javax.servlet"
] | java.io; java.util; javax.servlet; | 694,267 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.