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
@SuppressWarnings("unused") public void setSelectableDays(Calendar[] selectableDays) { // Sort the array to optimize searching over it later on Arrays.sort(selectableDays); this.selectableDays = selectableDays; }
@SuppressWarnings(STR) void function(Calendar[] selectableDays) { Arrays.sort(selectableDays); this.selectableDays = selectableDays; }
/** * Set's a list of days which are the only valid selections. * Setting this value will take precedence over using setMinDate() and setMaxDate() * @param selectableDays an Array of Calendar Objects containing the selectable dates */
Set's a list of days which are the only valid selections. Setting this value will take precedence over using setMinDate() and setMaxDate()
setSelectableDays
{ "repo_name": "viacheslavokolitiy/MaterialDateTimePicker", "path": "library/src/main/java/com/wdullaer/materialdatetimepicker/date/DatePickerDialog.java", "license": "apache-2.0", "size": 27402 }
[ "java.util.Arrays", "java.util.Calendar" ]
import java.util.Arrays; import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,917,782
public static ArcLabelledImmutableGraph filterArcs( final ArcLabelledImmutableGraph graph, final LabelledArcFilter filter ) { return new FilteredArcLabelledImmutableGraph( filter, graph ); }
static ArcLabelledImmutableGraph function( final ArcLabelledImmutableGraph graph, final LabelledArcFilter filter ) { return new FilteredArcLabelledImmutableGraph( filter, graph ); }
/** Returns a labelled graph with some arcs eventually stripped, according to the given filter. * * @param graph a labelled graph. * @param filter the filter (telling whether each arc should be kept or not). * @return the filtered graph. */
Returns a labelled graph with some arcs eventually stripped, according to the given filter
filterArcs
{ "repo_name": "lhelwerd/WebGraph", "path": "src/it/unimi/dsi/webgraph/Transform.java", "license": "gpl-3.0", "size": 97942 }
[ "it.unimi.dsi.webgraph.labelling.ArcLabelledImmutableGraph" ]
import it.unimi.dsi.webgraph.labelling.ArcLabelledImmutableGraph;
import it.unimi.dsi.webgraph.labelling.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
1,796,396
PceServerProvider getPceServerProvider();
PceServerProvider getPceServerProvider();
/** * PCE Server Provider. * * @return PceServerProvider */
PCE Server Provider
getPceServerProvider
{ "repo_name": "opendaylight/bgpcep", "path": "pcep/topology/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/PCEPTopologyProviderDependencies.java", "license": "epl-1.0", "size": 1547 }
[ "org.opendaylight.bgpcep.pcep.server.PceServerProvider" ]
import org.opendaylight.bgpcep.pcep.server.PceServerProvider;
import org.opendaylight.bgpcep.pcep.server.*;
[ "org.opendaylight.bgpcep" ]
org.opendaylight.bgpcep;
1,957,998
public void addUserRecipients(UserRecipient[] users) { if (users != null) { this.userRecipients.addAll(Arrays.asList(users)); } }
void function(UserRecipient[] users) { if (users != null) { this.userRecipients.addAll(Arrays.asList(users)); } }
/** * Add a user recipient to user recipients * @param users users to be added */
Add a user recipient to user recipients
addUserRecipients
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/silverpeas/notificationManager/NotificationMetaData.java", "license": "agpl-3.0", "size": 12715 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,827,297
BigInteger getVal();
BigInteger getVal();
/** * Returns the value of the '<em><b>Val</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Val</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Val</em>' at...
Returns the value of the 'Val' attribute. If the meaning of the 'Val' attribute isn't clear, there really should be more of a description here...
getVal
{ "repo_name": "agacek/jkind-xtext", "path": "jkind.xtext/src-gen/jkind/xtext/jkind/IntExpr.java", "license": "bsd-3-clause", "size": 1287 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
459,625
private void exitFlease() { fleaseStage.closeCell(REPLICATION_CELL, true); } private final class FailoverTaskRunner extends LifeCycleThread { private final AtomicReference<InetSocketAddress> failoverRequest = new AtomicReference<InetSocketAddress>(null); ...
void function() { fleaseStage.closeCell(REPLICATION_CELL, true); } private final class FailoverTaskRunner extends LifeCycleThread { private final AtomicReference<InetSocketAddress> failoverRequest = new AtomicReference<InetSocketAddress>(null); private boolean quit = true; private InetSocketAddress currentLeaseHolder =...
/** * Method to exclude this BabuDB instance from {@link Flease}. */
Method to exclude this BabuDB instance from <code>Flease</code>
exitFlease
{ "repo_name": "caraboides/babuDB", "path": "replication/src/org/xtreemfs/babudb/replication/control/ControlLayer.java", "license": "bsd-3-clause", "size": 18193 }
[ "java.net.InetSocketAddress", "java.util.concurrent.atomic.AtomicReference", "org.xtreemfs.foundation.LifeCycleThread" ]
import java.net.InetSocketAddress; import java.util.concurrent.atomic.AtomicReference; import org.xtreemfs.foundation.LifeCycleThread;
import java.net.*; import java.util.concurrent.atomic.*; import org.xtreemfs.foundation.*;
[ "java.net", "java.util", "org.xtreemfs.foundation" ]
java.net; java.util; org.xtreemfs.foundation;
2,686,617
public double getBeagleScore() { return txBeagleScore; } public GatewayResponse(InputStream xmlstream, GatewayRequest req) throws Exception { DocumentBuilderFactory builderFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder builder = builderFactory...
double function() { return txBeagleScore; } public GatewayResponse(InputStream xmlstream, GatewayRequest req) throws Exception { DocumentBuilderFactory builderFactory = DocumentBuilderFactory .newInstance(); DocumentBuilder builder = builderFactory.newDocumentBuilder(); Document doc = builder.parse(xmlstream); Node roo...
/** * Gets the beagle score. Defaults to -1 in case of non-Beagle payment methods * or if the response does not contain this field. * * @return The beagle score or -1 if it was not defined in the response */
Gets the beagle score. Defaults to -1 in case of non-Beagle payment methods or if the response does not contain this field
getBeagleScore
{ "repo_name": "ilscipio/scipio-erp", "path": "applications/accounting/src/org/ofbiz/accounting/thirdparty/eway/GatewayResponse.java", "license": "apache-2.0", "size": 8015 }
[ "java.io.InputStream", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "org.w3c.dom.Document", "org.w3c.dom.Node", "org.w3c.dom.NodeList", "org.w3c.dom.Text" ]
import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.w3c.dom" ]
java.io; javax.xml; org.w3c.dom;
1,358,957
public synchronized Transformer newTransformer() throws TransformerConfigurationException { TransformerImpl transformer; transformer = new TransformerImpl(getTransletInstance(), _outputProperties, _indentNumber, _tfactory); if (_uriResolver != null) { tr...
synchronized Transformer function() throws TransformerConfigurationException { TransformerImpl transformer; transformer = new TransformerImpl(getTransletInstance(), _outputProperties, _indentNumber, _tfactory); if (_uriResolver != null) { transformer.setURIResolver(_uriResolver); } if (_tfactory.getFeature(XMLConstants...
/** * Implements JAXP's Templates.newTransformer() * * @throws TransformerConfigurationException */
Implements JAXP's Templates.newTransformer()
newTransformer
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java", "license": "apache-2.0", "size": 14244 }
[ "javax.xml.XMLConstants", "javax.xml.transform.Transformer", "javax.xml.transform.TransformerConfigurationException" ]
import javax.xml.XMLConstants; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException;
import javax.xml.*; import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
505,325
@Override public boolean performFinish() { try { // Remember the file. // final IFile modelFile = getModelFile();
boolean function() { try { final IFile modelFile = getModelFile();
/** * Do the work after everything is specified. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Do the work after everything is specified.
performFinish
{ "repo_name": "uppaal-emf/uppaal", "path": "metamodel/org.muml.uppaal.editor/src/org/muml/uppaal/declarations/global/presentation/GlobalModelWizard.java", "license": "epl-1.0", "size": 18337 }
[ "org.eclipse.core.resources.IFile" ]
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
1,891,931
public static ImmutableList<String> getCoptsFromOptions( CppConfiguration config, String sourceFilename) { ImmutableList.Builder<String> flagsBuilder = ImmutableList.builder(); flagsBuilder.addAll(config.getCopts()); if (CppFileTypes.C_SOURCE.matches(sourceFilename)) { flagsBuilder.addAll(co...
static ImmutableList<String> function( CppConfiguration config, String sourceFilename) { ImmutableList.Builder<String> flagsBuilder = ImmutableList.builder(); flagsBuilder.addAll(config.getCopts()); if (CppFileTypes.C_SOURCE.matches(sourceFilename)) { flagsBuilder.addAll(config.getConlyopts()); } if (CppFileTypes.CPP_S...
/** * Return flags that were specified on the Blaze command line. Take the filetype of sourceFilename * into account. */
Return flags that were specified on the Blaze command line. Take the filetype of sourceFilename into account
getCoptsFromOptions
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java", "license": "apache-2.0", "size": 92871 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,746,873
Matrix matrix = new Matrix(matrixHeight, matrixWidth); RandomTetromino random = new RandomTetromino(new Random()); Tetromino first = random.nextTetromino(); Piece piece = new Piece(first, matrix); return new Tetra(matrix, piece, random); }
Matrix matrix = new Matrix(matrixHeight, matrixWidth); RandomTetromino random = new RandomTetromino(new Random()); Tetromino first = random.nextTetromino(); Piece piece = new Piece(first, matrix); return new Tetra(matrix, piece, random); }
/** * Creates a set of objects which describe a new game. Returns a reference * to the created game instance. The other objects linked to Tetra can be * obtained by querying the appropriate get-methods. * * @return a new game instance */
Creates a set of objects which describe a new game. Returns a reference to the created game instance. The other objects linked to Tetra can be obtained by querying the appropriate get-methods
create
{ "repo_name": "vesarie/tetra", "path": "tetra/src/main/java/tetra/gui/CreateGame.java", "license": "mit", "size": 1329 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
693,375
@GetMapping("/{stub}/info") public Optional<LinkInfo> getInfo(@PathVariable String stub) { final Optional<Link> link = getLink(stub); if (link.isPresent()) { return Optional.of(linkInfoService.getLinkInfo(link.get())); } return Optional.empty(); }
@GetMapping(STR) Optional<LinkInfo> function(@PathVariable String stub) { final Optional<Link> link = getLink(stub); if (link.isPresent()) { return Optional.of(linkInfoService.getLinkInfo(link.get())); } return Optional.empty(); }
/** * Gets augmented data for a link with the given stub. * * @param stub The short name of the link. * @return Augmented info, if the link exists. */
Gets augmented data for a link with the given stub
getInfo
{ "repo_name": "GoogleCloudPlatform/service-broker-samples", "path": "link-shortener/src/main/java/com/google/cloud/servicebroker/examples/linkshortener/controllers/LinkController.java", "license": "apache-2.0", "size": 3971 }
[ "com.google.cloud.servicebroker.examples.linkshortener.domain.Link", "com.google.cloud.servicebroker.examples.linkshortener.domain.LinkInfo", "java.util.Optional", "org.springframework.web.bind.annotation.GetMapping", "org.springframework.web.bind.annotation.PathVariable" ]
import com.google.cloud.servicebroker.examples.linkshortener.domain.Link; import com.google.cloud.servicebroker.examples.linkshortener.domain.LinkInfo; import java.util.Optional; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable;
import com.google.cloud.servicebroker.examples.linkshortener.domain.*; import java.util.*; import org.springframework.web.bind.annotation.*;
[ "com.google.cloud", "java.util", "org.springframework.web" ]
com.google.cloud; java.util; org.springframework.web;
1,093,972
public MimeType getDefaultMimeType() { return getMimeTypes().get(0); }
MimeType function() { return getMimeTypes().get(0); }
/** * The default MIME type is the first one in the configuration * * @return */
The default MIME type is the first one in the configuration
getDefaultMimeType
{ "repo_name": "viffer/geowebcache-1.5.0", "path": "core/src/main/java/org/geowebcache/layer/TileLayer.java", "license": "lgpl-3.0", "size": 22303 }
[ "org.geowebcache.mime.MimeType" ]
import org.geowebcache.mime.MimeType;
import org.geowebcache.mime.*;
[ "org.geowebcache.mime" ]
org.geowebcache.mime;
398,264
public LazyGenotypesContext.LazyData createGenotypeMap(final String str, final List<Allele> alleles, final String chr, final int p...
LazyGenotypesContext.LazyData function(final String str, final List<Allele> alleles, final String chr, final int pos) { if (genotypeParts == null) genotypeParts = new String[header.getColumnCount() - NUM_STANDARD_FIELDS]; int nParts = ParsingUtils.split(str, genotypeParts, VCFConstants.FIELD_SEPARATOR_CHAR); if ( nPart...
/** * create a genotype map * * @param str the string * @param alleles the list of alleles * @return a mapping of sample name to genotype object */
create a genotype map
createGenotypeMap
{ "repo_name": "xubo245/CloudSW", "path": "src/main/java/htsjdk/variant/vcf/AbstractVCFCodec.java", "license": "gpl-2.0", "size": 35811 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,563,867
public Observable<ServiceResponse<PrivateCloudInner>> updateWithServiceResponseAsync(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is requ...
Observable<ServiceResponse<PrivateCloudInner>> function(String resourceGroupName, String privateCloudName, PrivateCloudInner privateCloud) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (privateCloud...
/** * Update a private cloud. * * @param resourceGroupName Name of the resource group within the Azure subscription * @param privateCloudName Name of the private cloud * @param privateCloud The private cloud * @throws IllegalArgumentException thrown if parameters fail the validation *...
Update a private cloud
updateWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/avs/mgmt-v2019_08_09_preview/src/main/java/com/microsoft/azure/management/avs/v2019_08_09_preview/implementation/PrivateCloudsInner.java", "license": "mit", "size": 71567 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse", "com.microsoft.rest.Validator" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,009,611
public void changeActualConfiguration() { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); ISchedulingRule rule = ruleFactory.createRule(project); try { Job.getJobManager().beginRule(rule, new NullProgressMonitor()); actualConfiguration = configurations.getText(); f...
void function() { IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); ISchedulingRule rule = ruleFactory.createRule(project); try { Job.getJobManager().beginRule(rule, new NullProgressMonitor()); actualConfiguration = configurations.getText(); final HashSet<IResource> changedResources = ...
/** * Changes the actually used configuration to the one being selected in * the configuration selector. Also loads all of the settings of the new * configuration into the project. * */
Changes the actually used configuration to the one being selected in the configuration selector. Also loads all of the settings of the new configuration into the project
changeActualConfiguration
{ "repo_name": "eroslevi/titan.EclipsePlug-ins", "path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/properties/pages/ConfigurationManagerControl.java", "license": "epl-1.0", "size": 19435 }
[ "java.util.HashSet", "org.eclipse.core.resources.IResource", "org.eclipse.core.resources.IResourceRuleFactory", "org.eclipse.core.resources.ResourcesPlugin", "org.eclipse.core.runtime.NullProgressMonitor", "org.eclipse.core.runtime.jobs.ISchedulingRule", "org.eclipse.core.runtime.jobs.Job", "org.eclip...
import java.util.HashSet; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceRuleFactory; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.job...
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.core.runtime.jobs.*; import org.eclipse.titan.common.logging.*; import org.eclipse.titan.designer.properties.data.*; import org.w3c.dom.*;
[ "java.util", "org.eclipse.core", "org.eclipse.titan", "org.w3c.dom" ]
java.util; org.eclipse.core; org.eclipse.titan; org.w3c.dom;
201,423
@Before public void setup() throws Exception { GenomeMap.getInstance().clear(); InputStream in = GfaReader.class.getClassLoader().getResourceAsStream("TB10.gfa"); InputStreamGraphFactory graphFactory = new InputStreamGraphFactory(in); graph = graphFactory.getGraph(); TreeFactory treeFactory = n...
void function() throws Exception { GenomeMap.getInstance().clear(); InputStream in = GfaReader.class.getClassLoader().getResourceAsStream(STR); InputStreamGraphFactory graphFactory = new InputStreamGraphFactory(in); graph = graphFactory.getGraph(); TreeFactory treeFactory = new InputStreamTreeFactory(GfaReader.class.ge...
/** * Initialize classes. * * @throws Exception won't be thrown. */
Initialize classes
setup
{ "repo_name": "ProgrammingLife2016/PL2-2016", "path": "PL2/PL2-core/src/test/java/nl/tudelft/pl2016gr2/core/algorithms/bubbles/tree/ZoomInTest.java", "license": "apache-2.0", "size": 3043 }
[ "java.io.InputStream", "java.util.List", "net.sourceforge.olduvai.treejuxtaposer.drawer.Tree", "nl.tudelft.pl2016gr2.core.factories.InputStreamGraphFactory", "nl.tudelft.pl2016gr2.core.factories.InputStreamTreeFactory", "nl.tudelft.pl2016gr2.core.factories.TreeFactory", "nl.tudelft.pl2016gr2.model.Genom...
import java.io.InputStream; import java.util.List; import net.sourceforge.olduvai.treejuxtaposer.drawer.Tree; import nl.tudelft.pl2016gr2.core.factories.InputStreamGraphFactory; import nl.tudelft.pl2016gr2.core.factories.InputStreamTreeFactory; import nl.tudelft.pl2016gr2.core.factories.TreeFactory; import nl.tudelft.p...
import java.io.*; import java.util.*; import net.sourceforge.olduvai.treejuxtaposer.drawer.*; import nl.tudelft.pl2016gr2.core.factories.*; import nl.tudelft.pl2016gr2.model.*; import nl.tudelft.pl2016gr2.model.phylogenetictree.*; import nl.tudelft.pl2016gr2.parser.controller.*;
[ "java.io", "java.util", "net.sourceforge.olduvai", "nl.tudelft.pl2016gr2" ]
java.io; java.util; net.sourceforge.olduvai; nl.tudelft.pl2016gr2;
1,082,483
public static String getFormattedString( String key, Object[] arguments, Locale locale ) { return MessageFormat.format( getString( key, locale ), arguments ); }
static String function( String key, Object[] arguments, Locale locale ) { return MessageFormat.format( getString( key, locale ), arguments ); }
/** * Returns formatted translation for current local. * * @param key * the key to translate. * @return translated value string. */
Returns formatted translation for current local
getFormattedString
{ "repo_name": "sguan-actuate/birt", "path": "engine/org.eclipse.birt.report.engine.emitter.config.excel/src/org/eclipse/birt/report/engine/emitter/config/excel/i18n/Messages.java", "license": "epl-1.0", "size": 3737 }
[ "java.text.MessageFormat", "java.util.Locale" ]
import java.text.MessageFormat; import java.util.Locale;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,401,211
public Stroke getItemStroke(int row, int column) { return lookupSeriesStroke(row); }
Stroke function(int row, int column) { return lookupSeriesStroke(row); }
/** * Returns the stroke used to draw data items. * <p> * The default implementation passes control to the getSeriesStroke method. * You can override this method if you require different behaviour. * * @param row the row (or series) index (zero-based). * @param column the col...
Returns the stroke used to draw data items. The default implementation passes control to the getSeriesStroke method. You can override this method if you require different behaviour
getItemStroke
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 143969 }
[ "java.awt.Stroke" ]
import java.awt.Stroke;
import java.awt.*;
[ "java.awt" ]
java.awt;
110,055
public final Object get(Object key) { try { final Element element = getCache().get( key ); if ( element == null ) { return null; } else { return element.getObjectValue(); } } catch (net.sf.ehcache.CacheException e) { if ( e instanceof NonStopCacheException ) { HibernateNonstopCach...
final Object function(Object key) { try { final Element element = getCache().get( key ); if ( element == null ) { return null; } else { return element.getObjectValue(); } } catch (net.sf.ehcache.CacheException e) { if ( e instanceof NonStopCacheException ) { HibernateNonstopCacheExceptionHandler.getInstance() .handleNo...
/** * Get the value mapped to this key, or null if no value is mapped to this key. * * @param key The cache key * * @return The cached data */
Get the value mapped to this key, or null if no value is mapped to this key
get
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-ehcache/src/main/java/org/hibernate/cache/ehcache/internal/regions/EhcacheTransactionalDataRegion.java", "license": "lgpl-2.1", "size": 8255 }
[ "net.sf.ehcache.Element", "net.sf.ehcache.constructs.nonstop.NonStopCacheException", "org.hibernate.cache.CacheException", "org.hibernate.cache.ehcache.internal.nonstop.HibernateNonstopCacheExceptionHandler" ]
import net.sf.ehcache.Element; import net.sf.ehcache.constructs.nonstop.NonStopCacheException; import org.hibernate.cache.CacheException; import org.hibernate.cache.ehcache.internal.nonstop.HibernateNonstopCacheExceptionHandler;
import net.sf.ehcache.*; import net.sf.ehcache.constructs.nonstop.*; import org.hibernate.cache.*; import org.hibernate.cache.ehcache.internal.nonstop.*;
[ "net.sf.ehcache", "org.hibernate.cache" ]
net.sf.ehcache; org.hibernate.cache;
2,404,640
private boolean isFastConnection() { int value = (Integer) ImporterAgent.getRegistry().lookup( LookupNames.CONNECTION_SPEED); return value == RenderingControl.UNCOMPRESSED; }
boolean function() { int value = (Integer) ImporterAgent.getRegistry().lookup( LookupNames.CONNECTION_SPEED); return value == RenderingControl.UNCOMPRESSED; }
/** * Helper method returning <code>true</code> if the connection is fast, * <code>false</code> otherwise. * * @return See above. */
Helper method returning <code>true</code> if the connection is fast, <code>false</code> otherwise
isFastConnection
{ "repo_name": "lucalianas/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/ImportDialog.java", "license": "gpl-2.0", "size": 51962 }
[ "org.openmicroscopy.shoola.agents.fsimporter.ImporterAgent", "org.openmicroscopy.shoola.env.LookupNames", "org.openmicroscopy.shoola.env.rnd.RenderingControl" ]
import org.openmicroscopy.shoola.agents.fsimporter.ImporterAgent; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.rnd.RenderingControl;
import org.openmicroscopy.shoola.agents.fsimporter.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.rnd.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
2,810,602
Camera.Parameters parameters = camera.getParameters(); previewFormat = parameters.getPreviewFormat(); previewFormatString = parameters.get("preview-format"); Log.d(TAG, "Default preview format: " + previewFormat + '/' + previewFormatString); WindowManager manager = (WindowManager) context.getSystemServi...
Camera.Parameters parameters = camera.getParameters(); previewFormat = parameters.getPreviewFormat(); previewFormatString = parameters.get(STR); Log.d(TAG, STR + previewFormat + '/' + previewFormatString); WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manage...
/** * Reads, one time, values from the camera that are needed by the app. */
Reads, one time, values from the camera that are needed by the app
initFromCameraParameters
{ "repo_name": "wxb2939/rwxlicai", "path": "mzb-phone-app-android/MzbCustomerApp/src/main/java/com/xem/mzbcustomerapp/other/zxing/camera/CameraConfigurationManager.java", "license": "apache-2.0", "size": 8984 }
[ "android.content.Context", "android.graphics.Point", "android.hardware.Camera", "android.util.Log", "android.view.Display", "android.view.WindowManager" ]
import android.content.Context; import android.graphics.Point; import android.hardware.Camera; import android.util.Log; import android.view.Display; import android.view.WindowManager;
import android.content.*; import android.graphics.*; import android.hardware.*; import android.util.*; import android.view.*;
[ "android.content", "android.graphics", "android.hardware", "android.util", "android.view" ]
android.content; android.graphics; android.hardware; android.util; android.view;
824,638
public List<? extends Model> getModels();
List<? extends Model> function();
/** * Gets models. * * @return the models */
Gets models
getModels
{ "repo_name": "cm-is-dog/rapidminer-studio-core", "path": "src/main/java/com/rapidminer/operator/learner/meta/MetaModel.java", "license": "agpl-3.0", "size": 1508 }
[ "com.rapidminer.operator.Model", "java.util.List" ]
import com.rapidminer.operator.Model; import java.util.List;
import com.rapidminer.operator.*; import java.util.*;
[ "com.rapidminer.operator", "java.util" ]
com.rapidminer.operator; java.util;
992,177
private Integer getTallyOnAccessType(AccessNode node) { if (node.isPublic()) { return NumericConstants.ONE; } return NumericConstants.ZERO; }
Integer function(AccessNode node) { if (node.isPublic()) { return NumericConstants.ONE; } return NumericConstants.ZERO; }
/** * Method counts a node if it is public * * @param AccessNode node * @return Integer 1 if node is public 0 otherwise */
Method counts a node if it is public
getTallyOnAccessType
{ "repo_name": "pscadiz/pmd-4.2.6-gds", "path": "src/net/sourceforge/pmd/rules/ExcessivePublicCount.java", "license": "bsd-3-clause", "size": 2127 }
[ "net.sourceforge.pmd.ast.AccessNode", "net.sourceforge.pmd.util.NumericConstants" ]
import net.sourceforge.pmd.ast.AccessNode; import net.sourceforge.pmd.util.NumericConstants;
import net.sourceforge.pmd.ast.*; import net.sourceforge.pmd.util.*;
[ "net.sourceforge.pmd" ]
net.sourceforge.pmd;
2,016,315
void onDialogDismissed(@DialogDismissalCause int dismissalCause); }
void onDialogDismissed(@DialogDismissalCause int dismissalCause); }
/** * Called when dialog is dismissed. * @param dismissalCause The dismissal cause. */
Called when dialog is dismissed
onDialogDismissed
{ "repo_name": "endlessm/chromium-browser", "path": "components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogTestUtils.java", "license": "bsd-3-clause", "size": 5700 }
[ "org.chromium.ui.modaldialog.DialogDismissalCause" ]
import org.chromium.ui.modaldialog.DialogDismissalCause;
import org.chromium.ui.modaldialog.*;
[ "org.chromium.ui" ]
org.chromium.ui;
2,166,165
int getMonthLength(int prolepticYear, int monthOfYear) { int epochMonth = yearToEpochMonth(prolepticYear) + (monthOfYear - 1); if (epochMonth < 0 || epochMonth >= hijrahEpochMonthStartDays.length) { throw new DateTimeException("Invalid Hijrah date, year: " + proleptic...
int getMonthLength(int prolepticYear, int monthOfYear) { int epochMonth = yearToEpochMonth(prolepticYear) + (monthOfYear - 1); if (epochMonth < 0 epochMonth >= hijrahEpochMonthStartDays.length) { throw new DateTimeException(STR + prolepticYear + STR + monthOfYear); } return epochMonthLength(epochMonth); }
/** * Returns month length for the year and month. * * @param prolepticYear a proleptic year * @param monthOfYear a month, 1-origin. * @return the length of the month */
Returns month length for the year and month
getMonthLength
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/java/time/chrono/HijrahChronology.java", "license": "mit", "size": 40751 }
[ "java.time.DateTimeException" ]
import java.time.DateTimeException;
import java.time.*;
[ "java.time" ]
java.time;
697,599
public int countJobParameter(long id_job) throws KettleException { return countNrTransAttributes(id_job, JOB_ATTRIBUTE_PARAM_KEY); }
int function(long id_job) throws KettleException { return countNrTransAttributes(id_job, JOB_ATTRIBUTE_PARAM_KEY); }
/** * Count the number of parameters of a job. * * @param id_job job id * @return the number of transactions * * @throws KettleException Upon any error. */
Count the number of parameters of a job
countJobParameter
{ "repo_name": "icholy/geokettle-2.0", "path": "src/org/pentaho/di/repository/Repository.java", "license": "lgpl-2.1", "size": 217371 }
[ "org.pentaho.di.core.exception.KettleException" ]
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,066,525
public void taskStarted(BuildEvent event) { taskStartedEvents.addElement(event); }
void function(BuildEvent event) { taskStartedEvents.addElement(event); }
/** * Signals that a task is starting. * * @param event * An event with any relevant extra information. Must not be * <code>null</code>. * * @see BuildEvent#getTask() */
Signals that a task is starting
taskStarted
{ "repo_name": "maven-nar/cpptasks-parallel", "path": "src/test/java/com/github/maven_nar/cpptasks/MockBuildListener.java", "license": "apache-2.0", "size": 5286 }
[ "org.apache.tools.ant.BuildEvent" ]
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.*;
[ "org.apache.tools" ]
org.apache.tools;
1,682,790
public static boolean supports(Collection<Caps> caps, FrameBuffer fb){ if (!caps.contains(Caps.FrameBuffer)) return false; if (fb.getSamples() > 1 && !caps.contains(Caps.FrameBufferMultisample)) return false; RenderBuffer depthBuf = fb.getDepthBuffer(); ...
static boolean function(Collection<Caps> caps, FrameBuffer fb){ if (!caps.contains(Caps.FrameBuffer)) return false; if (fb.getSamples() > 1 && !caps.contains(Caps.FrameBufferMultisample)) return false; RenderBuffer depthBuf = fb.getDepthBuffer(); if (depthBuf != null){ Format depthFmt = depthBuf.getFormat(); if (!depth...
/** * Returns true if given the renderer capabilities, the framebuffer * can be supported by the renderer. * * @param caps The collection of renderer capabilities Renderer#getCaps() }. * @param fb The framebuffer to check * @return True if it is supported, false otherwise. */
Returns true if given the renderer capabilities, the framebuffer can be supported by the renderer
supports
{ "repo_name": "PlanetWaves/clockworkengine", "path": "branches/3.0/engine/src/core/com/clockwork/renderer/Caps.java", "license": "apache-2.0", "size": 8946 }
[ "com.clockwork.texture.FrameBuffer", "com.clockwork.texture.Image", "java.util.Collection" ]
import com.clockwork.texture.FrameBuffer; import com.clockwork.texture.Image; import java.util.Collection;
import com.clockwork.texture.*; import java.util.*;
[ "com.clockwork.texture", "java.util" ]
com.clockwork.texture; java.util;
1,792,934
public boolean abort() throws IOException { if(closed) return false; aborted = true; return true; }
boolean function() throws IOException { if(closed) return false; aborted = true; return true; }
/** Abort the stream. Will write a length of 0 when close()'ed. * @return False if the stream has already been closed. */
Abort the stream. Will write a length of 0 when close()'ed
abort
{ "repo_name": "deepstupid/fred", "path": "src/freenet/support/io/PrependLengthOutputStream.java", "license": "gpl-2.0", "size": 2532 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,145,112
public CompleteMultipartUploadRequest withPartETags(List<PartETag> partETags) { setPartETags(partETags); return this; }
CompleteMultipartUploadRequest function(List<PartETag> partETags) { setPartETags(partETags); return this; }
/** * Sets the list of part numbers and ETags that identify the individual * parts of the multipart upload to complete, and returns this updated * CompleteMultipartUploadRequest object so that additional method calls can be chained. * * @param partETags * The list of part number...
Sets the list of part numbers and ETags that identify the individual parts of the multipart upload to complete, and returns this updated CompleteMultipartUploadRequest object so that additional method calls can be chained
withPartETags
{ "repo_name": "loremipsumdolor/CastFast", "path": "src/com/amazonaws/services/s3/model/CompleteMultipartUploadRequest.java", "license": "mit", "size": 11605 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
36,182
public void write(UUID hostId, Hint hint) { write(Collections.singleton(hostId), hint); }
void function(UUID hostId, Hint hint) { write(Collections.singleton(hostId), hint); }
/** * Write a hint for a single node. * * @param hostId host id of the hint's target node * @param hint the hint to store */
Write a hint for a single node
write
{ "repo_name": "jrwest/cassandra", "path": "src/java/org/apache/cassandra/hints/HintsService.java", "license": "apache-2.0", "size": 17509 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,692,794
private int getFlagValue(String flag) { int flagVal = Notification.FLAG_AUTO_CANCEL; // We trust the flag value as it comes from our JS constant. // This is also backwards compatible as it will be emtpy. if (!flag.isEmpty()) { flagVal = Integer.parseInt(flag); } ...
int function(String flag) { int flagVal = Notification.FLAG_AUTO_CANCEL; if (!flag.isEmpty()) { flagVal = Integer.parseInt(flag); } return flagVal; }
/** * Helper method that returns a flag value to be used for notification by default it will return 16 representing FLAG_NO_CLEAR * * @param flag * * @return int value of the flag */
Helper method that returns a flag value to be used for notification by default it will return 16 representing FLAG_NO_CLEAR
getFlagValue
{ "repo_name": "KSolutionsSS/dental-navarra_mobileapp", "path": "platforms/android/src/com/phonegap/plugins/statusBarNotification/StatusBarNotification.java", "license": "gpl-3.0", "size": 5513 }
[ "android.app.Notification" ]
import android.app.Notification;
import android.app.*;
[ "android.app" ]
android.app;
1,507,025
public void unsubscribeListActivities(SimpleRequestTask task){ if(activityListeners == null){ return; } activityListeners.remove(task); }
void function(SimpleRequestTask task){ if(activityListeners == null){ return; } activityListeners.remove(task); }
/** * Remove a listener from the tasks listening to the task retrieving all the activities * @param task listener to be removed */
Remove a listener from the tasks listening to the task retrieving all the activities
unsubscribeListActivities
{ "repo_name": "ProjectGroep1/Joetz-Android-V2", "path": "Joetz_Android_V2/app/src/main/java/com/example/jens/myapplication/apimanager/manager/ActivityManager.java", "license": "gpl-2.0", "size": 6446 }
[ "com.example.jens.myapplication.apimanager.SimpleRequestTask" ]
import com.example.jens.myapplication.apimanager.SimpleRequestTask;
import com.example.jens.myapplication.apimanager.*;
[ "com.example.jens" ]
com.example.jens;
1,024,863
public static final SmsMessage[] getMessagesFromIntent(Intent intent) { Object[] messages = (Object[]) intent.getSerializableExtra("pdus"); if (messages == null) { return null; } if (messages.length == 0) { return null; } byte[][] pduObjs = new byte[messages.length][]; for (int i = 0; i < messa...
static final SmsMessage[] function(Intent intent) { Object[] messages = (Object[]) intent.getSerializableExtra("pdus"); if (messages == null) { return null; } if (messages.length == 0) { return null; } byte[][] pduObjs = new byte[messages.length][]; for (int i = 0; i < messages.length; i++) { pduObjs[i] = (byte[]) mess...
/** * Read the PDUs out of an {@link #SMS_RECEIVED_ACTION} or a * {@link #DATA_SMS_RECEIVED_ACTION} intent. * * @param intent * the intent to read from * @return an array of SmsMessages for the PDUs */
Read the PDUs out of an <code>#SMS_RECEIVED_ACTION</code> or a <code>#DATA_SMS_RECEIVED_ACTION</code> intent
getMessagesFromIntent
{ "repo_name": "star-app/xbmc-remote-control", "path": "src/org/xbmc/android/util/SmsPopupUtils.java", "license": "gpl-2.0", "size": 31656 }
[ "android.content.Intent", "android.telephony.gsm.SmsMessage" ]
import android.content.Intent; import android.telephony.gsm.SmsMessage;
import android.content.*; import android.telephony.gsm.*;
[ "android.content", "android.telephony" ]
android.content; android.telephony;
2,627,061
private CmsElementView initViews(CmsUUID startId) { Map<CmsUUID, CmsElementView> viewMap = OpenCms.getADEManager().getElementViews(A_CmsUI.getCmsObject()); List<CmsElementView> viewList = new ArrayList<CmsElementView>(viewMap.values()); Collections.sort(viewList, new Comparator<CmsElementVi...
CmsElementView function(CmsUUID startId) { Map<CmsUUID, CmsElementView> viewMap = OpenCms.getADEManager().getElementViews(A_CmsUI.getCmsObject()); List<CmsElementView> viewList = new ArrayList<CmsElementView>(viewMap.values()); Collections.sort(viewList, new Comparator<CmsElementView>() {
/** * Initializes the view selector, using the given view id as an initial value.<p> * * @param startId the start view * * @return the start view */
Initializes the view selector, using the given view id as an initial value
initViews
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/ui/dialogs/CmsNewDialog.java", "license": "lgpl-2.1", "size": 19690 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Comparator", "java.util.List", "java.util.Map", "org.opencms.ade.configuration.CmsElementView", "org.opencms.main.OpenCms", "org.opencms.util.CmsUUID" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import org.opencms.ade.configuration.CmsElementView; import org.opencms.main.OpenCms; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.ade.configuration.*; import org.opencms.main.*; import org.opencms.util.*;
[ "java.util", "org.opencms.ade", "org.opencms.main", "org.opencms.util" ]
java.util; org.opencms.ade; org.opencms.main; org.opencms.util;
891,917
@WebMethod(operationName = "getAgendaItemsByTypeAndContext") @XmlElementWrapper(name = "agendaItems", required = true) @XmlElement(name = "agendaItem", required = false) @WebResult(name = "agendaItems") @Cacheable(value= AgendaItemDefinition.Cache.NAME, key="'typeId=' + #p0 + '|' + 'contextId=' + #p...
@WebMethod(operationName = STR) @XmlElementWrapper(name = STR, required = true) @XmlElement(name = STR, required = false) @WebResult(name = STR) @Cacheable(value= AgendaItemDefinition.Cache.NAME, key=STR) List<AgendaItemDefinition> function(@WebParam(name = STR) String typeId, @WebParam(name = STR) String contextId) th...
/** * Retrieve AgendaItems by type and context * * @param typeId type of the Agendas * @param contextId context with which the Agendas are associated * @return list of AgendaItems of the specified type and context * @throws RiceIllegalArgumentException if the given typeId or contextId ...
Retrieve AgendaItems by type and context
getAgendaItemsByTypeAndContext
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/krms/api/src/main/java/org/kuali/rice/krms/api/repository/RuleManagementService.java", "license": "apache-2.0", "size": 61035 }
[ "java.util.List", "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.bind.annotation.XmlElement", "javax.xml.bind.annotation.XmlElementWrapper", "org.kuali.rice.core.api.exception.RiceIllegalArgumentException", "org.kuali.rice.krms.api.repository.agenda.AgendaItemDefinition...
import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; import org.kuali.rice.krms.api.repository.agen...
import java.util.*; import javax.jws.*; import javax.xml.bind.annotation.*; import org.kuali.rice.core.api.exception.*; import org.kuali.rice.krms.api.repository.agenda.*; import org.springframework.cache.annotation.*;
[ "java.util", "javax.jws", "javax.xml", "org.kuali.rice", "org.springframework.cache" ]
java.util; javax.jws; javax.xml; org.kuali.rice; org.springframework.cache;
1,494,415
private void updateResultWithStatus( Map<String, CondensedStatus> resultToUpdate, String queryStatusUrl, Long queryDate, Status resultStatus) { log.trace("updateResultWithStatus(" + resultToUpdate + ", '" + queryStatusUrl + "', " + queryDate + ", " + resultStatus ...
void function( Map<String, CondensedStatus> resultToUpdate, String queryStatusUrl, Long queryDate, Status resultStatus) { log.trace(STR + resultToUpdate + STR + queryStatusUrl + STR + queryDate + STR + resultStatus + ")"); CondensedStatus status = resultToUpdate.get(resultStatus.getName()); if (status == null) { status...
/** * Update the status result map with information from a status query. * Also updates the map of newest status timestamps. * * @param resultToUpdate The map to update * @param queryStatusUrl The query URL * @param queryDate The query date * @param resultStatus The query results ...
Update the status result map with information from a status query. Also updates the map of newest status timestamps
updateResultWithStatus
{ "repo_name": "statsbiblioteket/doms-surveillance", "path": "surveillance-surveyor-service/src/main/java/dk/statsbiblioteket/doms/surveillance/surveyor/WebServiceSurveyor.java", "license": "apache-2.0", "size": 22236 }
[ "dk.statsbiblioteket.doms.domsutil.surveyable.Status", "dk.statsbiblioteket.doms.domsutil.surveyable.StatusMessage", "java.util.Map", "java.util.Set" ]
import dk.statsbiblioteket.doms.domsutil.surveyable.Status; import dk.statsbiblioteket.doms.domsutil.surveyable.StatusMessage; import java.util.Map; import java.util.Set;
import dk.statsbiblioteket.doms.domsutil.surveyable.*; import java.util.*;
[ "dk.statsbiblioteket.doms", "java.util" ]
dk.statsbiblioteket.doms; java.util;
2,534,784
public Font getTextFont() { return m_TextPane.getFont(); }
Font function() { return m_TextPane.getFont(); }
/** * Returns the font currently in use by the text area. * * @return the font in use */
Returns the font currently in use by the text area
getTextFont
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/gui/core/StyledTextEditorPanel.java", "license": "gpl-3.0", "size": 15920 }
[ "java.awt.Font" ]
import java.awt.Font;
import java.awt.*;
[ "java.awt" ]
java.awt;
895,449
@Override public String toString() { return ReflectionToStringBuilder.toString(this); }
String function() { return ReflectionToStringBuilder.toString(this); }
/** * Return a String representation of the metadata. * * @see java.lang.Object#toString() */
Return a String representation of the metadata
toString
{ "repo_name": "HerbertJordan/JimCat", "path": "src/org/jimcat/model/ExifMetadata.java", "license": "gpl-2.0", "size": 2866 }
[ "org.apache.commons.lang.builder.ReflectionToStringBuilder" ]
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.*;
[ "org.apache.commons" ]
org.apache.commons;
1,824,756
public static void removeArticle(LinkSet linkSet) { for (int i = 0; i < linkSet.size() - 1;) { Link current = linkSet.getLink(i); if (isARemovableArticle(current.getWord()) == true) { linkSet.remove(i); } else { i++; } } }
static void function(LinkSet linkSet) { for (int i = 0; i < linkSet.size() - 1;) { Link current = linkSet.getLink(i); if (isARemovableArticle(current.getWord()) == true) { linkSet.remove(i); } else { i++; } } }
/** * remove all articles of the linkSet * * @param linkSet */
remove all articles of the linkSet
removeArticle
{ "repo_name": "ArtemMy/CallRec", "path": "app/src/main/java/fr/lium/experimental/spkDiarization/libNamedSpeaker/SpeakerNameUtils.java", "license": "gpl-3.0", "size": 11356 }
[ "fr.lium.experimental.spkDiarization.libClusteringData.transcription.Link", "fr.lium.experimental.spkDiarization.libClusteringData.transcription.LinkSet" ]
import fr.lium.experimental.spkDiarization.libClusteringData.transcription.Link; import fr.lium.experimental.spkDiarization.libClusteringData.transcription.LinkSet;
import fr.lium.experimental.*;
[ "fr.lium.experimental" ]
fr.lium.experimental;
921,557
return new TestSuite(BoxAndWhiskerItemTests.class); } public BoxAndWhiskerItemTests(String name) { super(name); }
return new TestSuite(BoxAndWhiskerItemTests.class); } public BoxAndWhiskerItemTests(String name) { super(name); }
/** * Returns the tests as a test suite. * * @return The test suite. */
Returns the tests as a test suite
suite
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/data/statistics/junit/BoxAndWhiskerItemTests.java", "license": "gpl-2.0", "size": 4231 }
[ "junit.framework.TestSuite" ]
import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
2,253,362
void addRenderCommand(RenderCommand command) { weight++; bodyElement.peek().addToBody(command); }
void addRenderCommand(RenderCommand command) { weight++; bodyElement.peek().addToBody(command); }
/** * Adds the command to the top element of the {@link #bodyElement} stack. * * @param command */
Adds the command to the top element of the <code>#bodyElement</code> stack
addRenderCommand
{ "repo_name": "apache/tapestry-5", "path": "tapestry-core/src/main/java/org/apache/tapestry5/internal/pageload/PageAssembly.java", "license": "apache-2.0", "size": 3432 }
[ "org.apache.tapestry5.runtime.RenderCommand" ]
import org.apache.tapestry5.runtime.RenderCommand;
import org.apache.tapestry5.runtime.*;
[ "org.apache.tapestry5" ]
org.apache.tapestry5;
954,952
private static List<Gene> getGenePool() { List<Gene> list = new ArrayList(); char[] chars = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' '}; for (int i = 0; i < chars.length; i+...
static List<Gene> function() { List<Gene> list = new ArrayList(); char[] chars = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' '}; for (int i = 0; i < chars.length; i++) { Gene gene = new Gene(new Character(chars[i])); list.add(gene...
/** * Helper routine to initialize Gene pool * * In typical usecase genes may be stored in database. * * @return List<Gene> */
Helper routine to initialize Gene pool In typical usecase genes may be stored in database
getGenePool
{ "repo_name": "alexzaitzev/ignite", "path": "examples/src/main/java/org/apache/ignite/examples/ml/genetic/helloworld/HelloWorldGAExample.java", "license": "apache-2.0", "size": 4152 }
[ "java.util.ArrayList", "java.util.List", "org.apache.ignite.ml.genetic.Gene" ]
import java.util.ArrayList; import java.util.List; import org.apache.ignite.ml.genetic.Gene;
import java.util.*; import org.apache.ignite.ml.genetic.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,217,252
public Authorization doVoid(String accessToken) throws PayPalRESTException { APIContext apiContext = new APIContext(accessToken); return doVoid(apiContext); }
Authorization function(String accessToken) throws PayPalRESTException { APIContext apiContext = new APIContext(accessToken); return doVoid(apiContext); }
/** * Voids (cancels) an Authorization. * @param accessToken * Access Token used for the API call. * @return Authorization * @throws PayPalRESTException */
Voids (cancels) an Authorization
doVoid
{ "repo_name": "ERJIALI/gbdbas", "path": "src/main/java/com/paypal/api/payments/Authorization.java", "license": "mit", "size": 12056 }
[ "com.paypal.base.rest.APIContext", "com.paypal.base.rest.PayPalRESTException" ]
import com.paypal.base.rest.APIContext; import com.paypal.base.rest.PayPalRESTException;
import com.paypal.base.rest.*;
[ "com.paypal.base" ]
com.paypal.base;
1,062,748
@ObjectiveCName("formatMessagesExport:") public String formatMessagesExport(Message[] messages) { String text = ""; Arrays.sort(messages, new Comparator<Message>() {
@ObjectiveCName(STR) String function(Message[] messages) { String text = ""; Arrays.sort(messages, new Comparator<Message>() {
/** * Formatting messages for exporting * * @param messages messages to export * @return formatted text */
Formatting messages for exporting
formatMessagesExport
{ "repo_name": "ljshj/actor-platform", "path": "actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/i18n/I18nEngine.java", "license": "mit", "size": 19858 }
[ "com.google.j2objc.annotations.ObjectiveCName", "im.actor.core.entity.Message", "java.util.Arrays", "java.util.Comparator" ]
import com.google.j2objc.annotations.ObjectiveCName; import im.actor.core.entity.Message; import java.util.Arrays; import java.util.Comparator;
import com.google.j2objc.annotations.*; import im.actor.core.entity.*; import java.util.*;
[ "com.google.j2objc", "im.actor.core", "java.util" ]
com.google.j2objc; im.actor.core; java.util;
2,177,502
public static void setACPwd(Configuration conf, String str) { conf.set(AC_PWD_PROP, str); }
static void function(Configuration conf, String str) { conf.set(AC_PWD_PROP, str); }
/** * Sets the password in the given Configuration. * @param conf Configuration containing MapReduce tool options. * @param str Accumulo password string, used for input and/or output. */
Sets the password in the given Configuration
setACPwd
{ "repo_name": "apache/incubator-rya", "path": "mapreduce/src/main/java/org/apache/rya/accumulo/mr/MRUtils.java", "license": "apache-2.0", "size": 12226 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
222,086
public float getValue(int x) { if (xx.length == 0) { return Float.NaN; } if (xx.length == 1) { if (xx[0] == x) { return yy[0]; } else { return Float.NaN; } } int index = Arrays.binarySearch(xx, ...
float function(int x) { if (xx.length == 0) { return Float.NaN; } if (xx.length == 1) { if (xx[0] == x) { return yy[0]; } else { return Float.NaN; } } int index = Arrays.binarySearch(xx, x); if (index >= 0) { return yy[index]; } index = -(index + 1) - 1; if (index < 0) { return yy[0]; } return a[index] + b[index] * (x ...
/** * Returns an interpolated value. * * @param x * @return the interpolated value */
Returns an interpolated value
getValue
{ "repo_name": "gagauz/grapx", "path": "src/main/java/org/gagauz/playground/serial/BSpline.java", "license": "gpl-2.0", "size": 5821 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
475,709
public DescribeTopicsResult describeTopics(Collection<String> topicNames) { return describeTopics(topicNames, new DescribeTopicsOptions()); }
DescribeTopicsResult function(Collection<String> topicNames) { return describeTopics(topicNames, new DescribeTopicsOptions()); }
/** * Describe some topics in the cluster, with the default options. * * This is a convenience method for #{@link AdminClient#describeTopics(Collection, DescribeTopicsOptions)} with * default options. See the overload for more details. * * @param topicNames The names of the topics t...
Describe some topics in the cluster, with the default options. This is a convenience method for #<code>AdminClient#describeTopics(Collection, DescribeTopicsOptions)</code> with default options. See the overload for more details
describeTopics
{ "repo_name": "richhaase/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/admin/AdminClient.java", "license": "apache-2.0", "size": 36939 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
972,817
public static String getString(Context context, String key, String defaultValue) { SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); return settings.getString(key, defaultValue); }
static String function(Context context, String key, String defaultValue) { SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); return settings.getString(key, defaultValue); }
/** * get string preferences * * @param context * @param key The name of the preference to retrieve * @param defaultValue Value to return if this preference does not exist * @return The preference value if it exists, or defValue. Throws ClassCastException if there is a preference with ...
get string preferences
getString
{ "repo_name": "hanningxiao/bosi-android", "path": "BosiChineseClass/src/com/bosi/chineseclass/han/util/PreferencesUtils.java", "license": "apache-2.0", "size": 10027 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,974,897
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<ExpressRouteCircuitStatsInner>> getStatsWithResponseAsync( String resourceGroupName, String circuitName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgu...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ExpressRouteCircuitStatsInner>> function( String resourceGroupName, String circuitName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentE...
/** * Gets all the stats from an express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws Manage...
Gets all the stats from an express route circuit in a resource group
getStatsWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java", "license": "mit", "size": 143721 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitStatsInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitStatsInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,427,432
public static MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> createReturnClient(com.mozu.api.contracts.commerceruntime.returns.Return ret, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.createReturnUrl(responseFields); String verb = "POST"; ...
static MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> function(com.mozu.api.contracts.commerceruntime.returns.Return ret, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.createReturnUrl(responseFields); String verb = "POST"; Class<?> clz = com.mozu.api.con...
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> mozuClient=CreateReturnClient( ret, responseFields); * client.setBaseAddress(url); * client.executeRequest(); * Return return = client.Result(); * </code></pre></p> * @param responseFields Filtering synt...
<code><code> MozuClient mozuClient=CreateReturnClient( ret, responseFields); client.setBaseAddress(url); client.executeRequest(); Return return = client.Result(); </code></code>
createReturnClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/ReturnClient.java", "license": "mit", "size": 41533 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
366,310
public void requestPermissionsWithRequestCode(String[] permissions, int requestCode) { if (android.os.Build.VERSION.SDK_INT < 23) return; try { java.lang.reflect.Method methodRequestPermission = Activity.class.getMethod("requestPermissions", St...
void function(String[] permissions, int requestCode) { if (android.os.Build.VERSION.SDK_INT < 23) return; try { java.lang.reflect.Method methodRequestPermission = Activity.class.getMethod(STR, String[].class, int.class); methodRequestPermission.invoke(this, permissions, requestCode); } catch (IllegalAccessException NoS...
/** * Used by android.permissions p4a module to request runtime permissions **/
Used by android.permissions p4a module to request runtime permissions
requestPermissionsWithRequestCode
{ "repo_name": "kivy/python-for-android", "path": "pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java", "license": "mit", "size": 24999 }
[ "android.app.Activity", "java.lang.reflect.InvocationTargetException" ]
import android.app.Activity; import java.lang.reflect.InvocationTargetException;
import android.app.*; import java.lang.reflect.*;
[ "android.app", "java.lang" ]
android.app; java.lang;
1,535,626
protected List<String> splitZones(String input) { // Regex seaches for areas tables zones // Rules is: // (^|\\n\\n) - Search for begining of line or double carrige return // (\\{(.+)\\}\\n)? - Search for an optional css class line e.g. {red} // ={3,} - Searc...
List<String> function(String input) { Pattern p = Pattern.compile(STR); Matcher m = p.matcher(input); List<String> zones = new ArrayList<String>(); int lastZoneEnd = 0; while (m.find()) { if (lastZoneEnd != m.start()) { String zone = input.substring(lastZoneEnd, m.start()); zones.add(formatTextZone(zone)); } String zon...
/** * Splits source test into table and non-tables areas. * * @param input * @return */
Splits source test into table and non-tables areas
splitZones
{ "repo_name": "0x006EA1E5/oo6", "path": "src/main/java/org/otherobjects/cms/tools/WikiFormatter.java", "license": "gpl-3.0", "size": 24622 }
[ "java.util.ArrayList", "java.util.List", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
286,151
public Paint getColor(double value) { int izV = (int) (253 * (value - this.minZ) / (this.maxZ - this.minZ)) + 2; return new Color(this.r[izV], this.g[izV], this.b[izV]); }
Paint function(double value) { int izV = (int) (253 * (value - this.minZ) / (this.maxZ - this.minZ)) + 2; return new Color(this.r[izV], this.g[izV], this.b[izV]); }
/** * Returns the color associated with a value. * * @param value the value. * * @return The color. */
Returns the color associated with a value
getColor
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/ColorPalette.java", "license": "lgpl-2.1", "size": 12117 }
[ "java.awt.Color", "java.awt.Paint" ]
import java.awt.Color; import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
601,393
public static Ignite start(IgniteConfiguration cfg, boolean failIfStarted) throws IgniteCheckedException { return start(cfg, null, failIfStarted).get1(); }
static Ignite function(IgniteConfiguration cfg, boolean failIfStarted) throws IgniteCheckedException { return start(cfg, null, failIfStarted).get1(); }
/** * Starts a grid with given configuration. If the grid is already started and failIfStarted set to TRUE * an exception will be thrown. * * @param cfg Grid configuration. This cannot be {@code null}. * @param failIfStarted When flag is {@code true} and grid with specified name has been alread...
Starts a grid with given configuration. If the grid is already started and failIfStarted set to TRUE an exception will be thrown
start
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java", "license": "apache-2.0", "size": 135488 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.configuration.IgniteConfiguration" ]
import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.*; import org.apache.ignite.configuration.*;
[ "org.apache.ignite" ]
org.apache.ignite;
224,187
public List<Criteria> getOredCriteria() { return oredCriteria; }
List<Criteria> function() { return oredCriteria; }
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_account * * @mbggenerated Thu Jul 16 10:50:10 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_crm_account
getOredCriteria
{ "repo_name": "uniteddiversity/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/crm/domain/AccountExample.java", "license": "agpl-3.0", "size": 76854 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
962,611
public Builder applyToAllUnaryMethods( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; }
/** * Applies the given settings updater function to all of the unary API methods in this service. * * <p>Note: This method does not support applying settings to streaming methods. */
Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods
applyToAllUnaryMethods
{ "repo_name": "googleapis/java-dialogflow-cx", "path": "google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java", "license": "apache-2.0", "size": 19303 }
[ "com.google.api.core.ApiFunction", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.core.*; import com.google.api.gax.rpc.*;
[ "com.google.api" ]
com.google.api;
2,468,673
void registerMouseCursor( @Nonnull String id, @Nonnull String filename, int hotspotX, int hotspotY) throws IOException;
void registerMouseCursor( @Nonnull String id, @Nonnull String filename, int hotspotX, int hotspotY) throws IOException;
/** * Register, load and prepare the given file for use as a mouse cursor later. * * @param id id of mouse cursor for later reference * @param filename the image to load. * @param hotspotX the hotspot x coordinate of the cursor image with 0 being left * @param hotspotY the hotspot y coordinate o...
Register, load and prepare the given file for use as a mouse cursor later
registerMouseCursor
{ "repo_name": "void256/nifty-gui", "path": "nifty-core/src/main/java/de/lessvoid/nifty/NiftyMouse.java", "license": "bsd-2-clause", "size": 2079 }
[ "java.io.IOException", "javax.annotation.Nonnull" ]
import java.io.IOException; import javax.annotation.Nonnull;
import java.io.*; import javax.annotation.*;
[ "java.io", "javax.annotation" ]
java.io; javax.annotation;
1,768,730
public boolean forOneArbitraryMatch(final FSObject pO1, final FSObject pO2, final Consumer<? super PatternContent.Match> processor) { return rawForOneArbitraryMatch(new Object[]{pO1, pO2}, processor); }
boolean function(final FSObject pO1, final FSObject pO2, final Consumer<? super PatternContent.Match> processor) { return rawForOneArbitraryMatch(new Object[]{pO1, pO2}, processor); }
/** * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. * Neither determinism nor randomness of selection is guaranteed. * @param pO1 the fixed value of pattern parameter o1, or null if not bound. * @param pO2 the f...
Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. Neither determinism nor randomness of selection is guaranteed
forOneArbitraryMatch
{ "repo_name": "viatra/VIATRA-Generator", "path": "Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/src-gen/hu/bme/mit/inf/dslreasoner/domains/alloyexamples/PatternContent.java", "license": "epl-1.0", "size": 27758 }
[ "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem", "java.util.function.Consumer" ]
import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem; import java.util.function.Consumer;
import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.*; import java.util.function.*;
[ "hu.bme.mit", "java.util" ]
hu.bme.mit; java.util;
2,633,457
void addStatement(URI contextURI, Resource subject, URI predicate, Node object) throws ModelRuntimeException;
void addStatement(URI contextURI, Resource subject, URI predicate, Node object) throws ModelRuntimeException;
/** * This method creates a Model named 'contextURI' if needed. Then the * statement (s,p,o) is inserted into that model. * * @param contextURI * a URI or null * @param subject * a Resource (URI or BlankNode) * @param predicate * @param object * a Node ...
This method creates a Model named 'contextURI' if needed. Then the statement (s,p,o) is inserted into that model
addStatement
{ "repo_name": "semweb4j/semweb4j", "path": "org.semweb4j.rdf2go.api/src/main/java/org/ontoware/rdf2go/model/ModelSetAddRemove.java", "license": "bsd-2-clause", "size": 5676 }
[ "org.ontoware.rdf2go.exception.ModelRuntimeException", "org.ontoware.rdf2go.model.node.Node", "org.ontoware.rdf2go.model.node.Resource" ]
import org.ontoware.rdf2go.exception.ModelRuntimeException; import org.ontoware.rdf2go.model.node.Node; import org.ontoware.rdf2go.model.node.Resource;
import org.ontoware.rdf2go.exception.*; import org.ontoware.rdf2go.model.node.*;
[ "org.ontoware.rdf2go" ]
org.ontoware.rdf2go;
732,562
public PortletColumnRow[] getPortletColumns(String query) throws UtilException { List<PortletColumnRow> rows = getRows(query); return rows.toArray(new PortletColumnRow[rows.size()]); }
PortletColumnRow[] function(String query) throws UtilException { List<PortletColumnRow> rows = getRows(query); return rows.toArray(new PortletColumnRow[rows.size()]); }
/** * Returns all the rows given by a no parameters query. */
Returns all the rows given by a no parameters query
getPortletColumns
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "web-core/src/main/java/com/stratelia/silverpeas/portlet/model/PortletColumnTable.java", "license": "agpl-3.0", "size": 6830 }
[ "com.stratelia.webactiv.util.exception.UtilException", "java.util.List" ]
import com.stratelia.webactiv.util.exception.UtilException; import java.util.List;
import com.stratelia.webactiv.util.exception.*; import java.util.*;
[ "com.stratelia.webactiv", "java.util" ]
com.stratelia.webactiv; java.util;
1,708,653
public Query rangeQuery( Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, DateTimeZone timeZone, DateMathParser parser, QueryShardContext context) { throw new IllegalArgumentException("Field [" + name + "]...
Query function( Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, DateTimeZone timeZone, DateMathParser parser, QueryShardContext context) { throw new IllegalArgumentException(STR + name + STR + typeName() + STR); }
/** * Factory method for range queries. * @param relation the relation, nulls should be interpreted like INTERSECTS */
Factory method for range queries
rangeQuery
{ "repo_name": "Stacey-Gammon/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/mapper/MappedFieldType.java", "license": "apache-2.0", "size": 20666 }
[ "org.apache.lucene.search.Query", "org.elasticsearch.common.geo.ShapeRelation", "org.elasticsearch.common.joda.DateMathParser", "org.elasticsearch.index.query.QueryShardContext", "org.joda.time.DateTimeZone" ]
import org.apache.lucene.search.Query; import org.elasticsearch.common.geo.ShapeRelation; import org.elasticsearch.common.joda.DateMathParser; import org.elasticsearch.index.query.QueryShardContext; import org.joda.time.DateTimeZone;
import org.apache.lucene.search.*; import org.elasticsearch.common.geo.*; import org.elasticsearch.common.joda.*; import org.elasticsearch.index.query.*; import org.joda.time.*;
[ "org.apache.lucene", "org.elasticsearch.common", "org.elasticsearch.index", "org.joda.time" ]
org.apache.lucene; org.elasticsearch.common; org.elasticsearch.index; org.joda.time;
739,641
@Test public void checkBrowser() { // This test can use the shared editor. // Create a temporary ICEResource that should be opened in the // ICEResourcePage's browser. File file = null; try { file = createTemporaryFile("dsarif.html", "frneticpny"); } catch (IOException e) { fail("ICEResourcePageT...
void function() { File file = null; try { file = createTemporaryFile(STR, STR); } catch (IOException e) { fail(STR + STR" + STR + "\"."); } ICEResource resource = createICEResource(file); sharedResources.add(resource); doubleClickResource(resource); SWTBot bot = new SWTBot(sharedPage.getPartControl()); sharedResources....
/** * Checks that non-text files that lack an associated IVizService are * rendered in the browser. */
Checks that non-text files that lack an associated IVizService are rendered in the browser
checkBrowser
{ "repo_name": "eclipse/ice", "path": "org.eclipse.ice.tests.client.widgets/src/org/eclipse/ice/tests/client/widgets/ICEResourcePageTester.java", "license": "epl-1.0", "size": 12097 }
[ "java.io.File", "java.io.IOException", "org.eclipse.ice.datastructures.resource.ICEResource", "org.eclipse.swtbot.swt.finder.SWTBot" ]
import java.io.File; import java.io.IOException; import org.eclipse.ice.datastructures.resource.ICEResource; import org.eclipse.swtbot.swt.finder.SWTBot;
import java.io.*; import org.eclipse.ice.datastructures.resource.*; import org.eclipse.swtbot.swt.finder.*;
[ "java.io", "org.eclipse.ice", "org.eclipse.swtbot" ]
java.io; org.eclipse.ice; org.eclipse.swtbot;
2,609,655
public interface AttributeInfoProvider { boolean isAttributeValueExplicitlySpecified(Attribute attribute); }
interface AttributeInfoProvider { boolean function(Attribute attribute); }
/** * Returns true iff the value of the specified attribute is explicitly set in * the BUILD file (as opposed to its default value). This also returns true if * the value from the BUILD file is the same as the default value. */
Returns true iff the value of the specified attribute is explicitly set in the BUILD file (as opposed to its default value). This also returns true if the value from the BUILD file is the same as the default value
isAttributeValueExplicitlySpecified
{ "repo_name": "iamthearm/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/DependencyFilter.java", "license": "apache-2.0", "size": 4257 }
[ "com.google.devtools.build.lib.packages.DependencyFilter" ]
import com.google.devtools.build.lib.packages.DependencyFilter;
import com.google.devtools.build.lib.packages.*;
[ "com.google.devtools" ]
com.google.devtools;
1,658,424
private void bide(SequenceDatabase database){ // The algorithm first scan the database to find all frequent items // The algorithm note the sequences in which these items appear. // This is stored in a map: Key: item Value : IDs of sequences containing the item Map<Item, Set<Integer>> mapSequenceID = find...
void function(SequenceDatabase database){ Map<Item, Set<Integer>> mapSequenceID = findSequencesContainingItems(database); initialDatabase = new PseudoSequenceDatabase(); for(Sequence sequence : database.getSequences()){ Sequence optimizedSequence = sequence.cloneSequenceMinusItems(mapSequenceID, minsuppRelative); if(op...
/** * This is the main method for the BIDE+ algorithm. * @param database The initial sequence database. */
This is the main method for the BIDE+ algorithm
bide
{ "repo_name": "YinYanfei/CadalWorkspace", "path": "ca/pfv/spmf/algorithms/sequentialpatterns/fournier2008/AlgoBIDEPlus.java", "license": "gpl-3.0", "size": 21731 }
[ "java.util.Map", "java.util.Set" ]
import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
136,792
public HackedJsonEncoder configure(OutputStream out) throws IOException { this.configure(getJsonGenerator(out)); return this; }
HackedJsonEncoder function(OutputStream out) throws IOException { this.configure(getJsonGenerator(out)); return this; }
/** * Reconfigures this JsonEncoder to use the output stream provided. * <p/> * If the OutputStream provided is null, a NullPointerException is thrown. * <p/> * Otherwise, this JsonEncoder will flush its current output and then * reconfigure its output to use a default UTF8 JsonGenerator that writes ...
Reconfigures this JsonEncoder to use the output stream provided. If the OutputStream provided is null, a NullPointerException is thrown. Otherwise, this JsonEncoder will flush its current output and then reconfigure its output to use a default UTF8 JsonGenerator that writes to the provided OutputStream
configure
{ "repo_name": "openaire/iis", "path": "iis-3rdparty-avrojsoncoders/src/main/java/org/apache/avro/io/HackedJsonEncoder.java", "license": "apache-2.0", "size": 9110 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,422,725
@ApiModelProperty(example = "null", value = "Unique, non-empty document identifier.") public String getId() { return id; }
@ApiModelProperty(example = "null", value = STR) String function() { return id; }
/** * Unique, non-empty document identifier. * @return id **/
Unique, non-empty document identifier
getId
{ "repo_name": "A-Team-hackathon/Hackathon2016", "path": "textanalytics-client/src/main/java/org/pontis/hackathon/textanalytics/client/model/InputV2.java", "license": "apache-2.0", "size": 3616 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,566,553
public static void inlayGuiItem(SpringLayout springLayout, JPanel panelToInlayIn, Component toInlay, boolean alignToLeftSide, Component leftRightObjToAlignTo, int leftOffset, int rightOffset, int topOffset, int bottomOffset) { String rightLeftSideAlign = SpringLayout.WEST; ...
static void function(SpringLayout springLayout, JPanel panelToInlayIn, Component toInlay, boolean alignToLeftSide, Component leftRightObjToAlignTo, int leftOffset, int rightOffset, int topOffset, int bottomOffset) { String rightLeftSideAlign = SpringLayout.WEST; if (!alignToLeftSide) { rightLeftSideAlign = SpringLayout...
/** Inlays the component in another GUI item, positioning it vertically based on that item and horizontally based on * the passed item which can be the same as the item it is inlayed in. * * @param springLayout The SpringLayout that is being used to layout the component * @param panelToInlayIn The ...
Inlays the component in another GUI item, positioning it vertically based on that item and horizontally based on the passed item which can be the same as the item it is inlayed in
inlayGuiItem
{ "repo_name": "darksideprogramming/LineFit", "path": "LineFit WS/LineFit/src/linefit/Utils.java", "license": "agpl-3.0", "size": 4437 }
[ "java.awt.Component", "javax.swing.JPanel", "javax.swing.SpringLayout" ]
import java.awt.Component; import javax.swing.JPanel; import javax.swing.SpringLayout;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,026,038
return new CurveParallelShifts(ShiftType.ABSOLUTE, DoubleArray.copyOf(shiftAmounts)); }
return new CurveParallelShifts(ShiftType.ABSOLUTE, DoubleArray.copyOf(shiftAmounts)); }
/** * Creates a shift that adds a fixed amount to the value at every node in the curve. * * @param shiftAmounts the amount to add to each node value in the curve * @return a shift that adds a fixed amount to the value at every node in the curve */
Creates a shift that adds a fixed amount to the value at every node in the curve
absolute
{ "repo_name": "jmptrader/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/CurveParallelShifts.java", "license": "apache-2.0", "size": 12193 }
[ "com.opengamma.strata.collect.array.DoubleArray", "com.opengamma.strata.market.ShiftType" ]
import com.opengamma.strata.collect.array.DoubleArray; import com.opengamma.strata.market.ShiftType;
import com.opengamma.strata.collect.array.*; import com.opengamma.strata.market.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
414,299
for(Object ob : recursos){ if(ob instanceof PreparedStatement) try { ((PreparedStatement) ob).close(); } catch (Exception ex) { ex.printStackTrace(); } } }
for(Object ob : recursos){ if(ob instanceof PreparedStatement) try { ((PreparedStatement) ob).close(); } catch (Exception ex) { ex.printStackTrace(); } } }
/** * Metodo que cierra todos los recursos que estan enel arreglo de recursos * <b>post: </b> Todos los recurso del arreglo de recursos han sido cerrados */
Metodo que cierra todos los recursos que estan enel arreglo de recursos post: Todos los recurso del arreglo de recursos han sido cerrados
cerrarRecursos
{ "repo_name": "js-diaz/sistrans", "path": "src/dao/DAOTablaInfoIngRest.java", "license": "mit", "size": 9554 }
[ "java.sql.PreparedStatement" ]
import java.sql.PreparedStatement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,843,789
public void setRestrictions(Map<DisplayRestrictions, Object> mRestrictions) { this.mRestrictions = mRestrictions; }
void function(Map<DisplayRestrictions, Object> mRestrictions) { this.mRestrictions = mRestrictions; }
/** * Method that sets the display restrictions to apply to this view. * * @param mRestrictions The restrictions to apply */
Method that sets the display restrictions to apply to this view
setRestrictions
{ "repo_name": "AnimeROM/android_package_AnimeManager", "path": "src/com/animerom/filemanager/ui/widgets/NavigationView.java", "license": "apache-2.0", "size": 48373 }
[ "com.animerom.filemanager.preferences.DisplayRestrictions", "java.util.Map" ]
import com.animerom.filemanager.preferences.DisplayRestrictions; import java.util.Map;
import com.animerom.filemanager.preferences.*; import java.util.*;
[ "com.animerom.filemanager", "java.util" ]
com.animerom.filemanager; java.util;
2,210,625
@Test public void testNamespace() throws IOException { final GlobalDoc global = parse("namespace.js"); assertEquals(2, global.getNamespaces().size()); final Iterator<NamespaceDoc> namespaces = global.getNamespaces().iterator(); NamespaceDoc namespace = namespaces....
void function() throws IOException { final GlobalDoc global = parse(STR); assertEquals(2, global.getNamespaces().size()); final Iterator<NamespaceDoc> namespaces = global.getNamespaces().iterator(); NamespaceDoc namespace = namespaces.next(); assertEquals(STR, namespace.getName()); assertEquals(STR, namespace.getDescri...
/** * Tests parsing a namespace. * * @throws IOException * If JavaScript parsing fails. */
Tests parsing a namespace
testNamespace
{ "repo_name": "kayahr/jasdoc", "path": "src/test/java/de/ailis/jasdoc/doc/DocParserTest.java", "license": "gpl-3.0", "size": 38080 }
[ "java.io.IOException", "java.util.Iterator", "org.junit.Assert" ]
import java.io.IOException; import java.util.Iterator; import org.junit.Assert;
import java.io.*; import java.util.*; import org.junit.*;
[ "java.io", "java.util", "org.junit" ]
java.io; java.util; org.junit;
1,303,700
private void truncateTranslogs(Path directory) throws Exception { Path[] files = FileSystemUtils.files(directory, "translog-*"); for (Path file : files) { try (FileChannel f = FileChannel.open(file, StandardOpenOption.READ, StandardOpenOption.WRITE)) { long prevSize = f.s...
void function(Path directory) throws Exception { Path[] files = FileSystemUtils.files(directory, STR); for (Path file : files) { try (FileChannel f = FileChannel.open(file, StandardOpenOption.READ, StandardOpenOption.WRITE)) { long prevSize = f.size(); long newSize = prevSize - randomIntBetween(1, (int) prevSize / 2); ...
/** * Randomly truncate some bytes in the translog files */
Randomly truncate some bytes in the translog files
truncateTranslogs
{ "repo_name": "HonzaKral/elasticsearch", "path": "server/src/test/java/org/elasticsearch/index/translog/TranslogTests.java", "license": "apache-2.0", "size": 159272 }
[ "java.nio.channels.FileChannel", "java.nio.file.Path", "java.nio.file.StandardOpenOption", "org.elasticsearch.common.io.FileSystemUtils" ]
import java.nio.channels.FileChannel; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import org.elasticsearch.common.io.FileSystemUtils;
import java.nio.channels.*; import java.nio.file.*; import org.elasticsearch.common.io.*;
[ "java.nio", "org.elasticsearch.common" ]
java.nio; org.elasticsearch.common;
2,656,164
public Builder<E> withMaxEntrySize(int maxEntrySize) { checkArgument(maxEntrySize > 0, "maxEntrySize must be positive"); this.maxEntrySize = maxEntrySize; return this; }
Builder<E> function(int maxEntrySize) { checkArgument(maxEntrySize > 0, STR); this.maxEntrySize = maxEntrySize; return this; }
/** * Sets the maximum entry size in bytes, returning the builder for method chaining. * * @param maxEntrySize the maximum entry size in bytes * @return the storage builder * @throws IllegalArgumentException if the {@code maxEntrySize} is not positive */
Sets the maximum entry size in bytes, returning the builder for method chaining
withMaxEntrySize
{ "repo_name": "kuujo/copycat", "path": "storage/src/main/java/io/atomix/storage/journal/SegmentedJournal.java", "license": "apache-2.0", "size": 28688 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,043,501
private void writeRandomKeyValues(RecordWriter<ImmutableBytesWritable, KeyValue> writer, TaskAttemptContext context, Set<byte[]> families, int numRows) throws IOException, InterruptedException { byte keyBytes[] = new byte[Bytes.SIZEOF_INT]; int valLength = 10; byte valBytes[] = new byte[valLen...
void function(RecordWriter<ImmutableBytesWritable, KeyValue> writer, TaskAttemptContext context, Set<byte[]> families, int numRows) throws IOException, InterruptedException { byte keyBytes[] = new byte[Bytes.SIZEOF_INT]; int valLength = 10; byte valBytes[] = new byte[valLength]; int taskId = context.getTaskAttemptID()....
/** * Write random values to the writer assuming a table created using * {@link #FAMILIES} as column family descriptors */
Write random values to the writer assuming a table created using <code>#FAMILIES</code> as column family descriptors
writeRandomKeyValues
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java", "license": "apache-2.0", "size": 42150 }
[ "java.io.IOException", "java.util.Random", "java.util.Set", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.PerformanceEvaluation", "org.apache.hadoop.hbase.io.ImmutableBytesWritable", "org.apache.hadoop.hbase.util.Bytes", "org.apache.hadoop.mapreduce.RecordWriter", "org.apache.hadoop.m...
import java.io.IOException; import java.util.Random; import java.util.Set; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.PerformanceEvaluation; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.mapreduce.RecordWriter; ...
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,187,804
@Override public boolean decompose( DenseMatrix64F A ) { if( A.numRows != A.numCols ) throw new IllegalArgumentException("A must be square."); QH = A; N = A.numCols; if( b.length < N ) { b = new double[ N ]; gammas = new double[ N ]; ...
boolean function( DenseMatrix64F A ) { if( A.numRows != A.numCols ) throw new IllegalArgumentException(STR); QH = A; N = A.numCols; if( b.length < N ) { b = new double[ N ]; gammas = new double[ N ]; u = new double[ N ]; } return _decompose(); }
/** * Computes the decomposition of the provided matrix. If no errors are detected then true is returned, * false otherwise. * @param A The matrix that is being decomposed. Not modified. * @return If it detects any errors or not. */
Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise
decompose
{ "repo_name": "benralexander/efficient-java-matrix-library", "path": "src/org/ejml/alg/dense/decomposition/hessenberg/HessenbergSimilarDecomposition_D64.java", "license": "apache-2.0", "size": 7510 }
[ "org.ejml.data.DenseMatrix64F" ]
import org.ejml.data.DenseMatrix64F;
import org.ejml.data.*;
[ "org.ejml.data" ]
org.ejml.data;
1,408,723
public static ims.core.resource.place.domain.objects.LocSite extractLocSite(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.LocSiteUpprNameVo valueObject) { return extractLocSite(domainFactory, valueObject, new HashMap()); }
static ims.core.resource.place.domain.objects.LocSite function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.LocSiteUpprNameVo valueObject) { return extractLocSite(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractLocSite
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/LocSiteUpprNameVoAssembler.java", "license": "agpl-3.0", "size": 20625 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
542,958
void setCharset(Charset charset);
void setCharset(Charset charset);
/** * Set the Charset passed by the browser if defined * * @param charset * Charset to set - must be not null */
Set the Charset passed by the browser if defined
setCharset
{ "repo_name": "nathanchen/netty-netty-5.0.0.Alpha1", "path": "codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpData.java", "license": "apache-2.0", "size": 6101 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,567,209
public int damageDropped(IBlockState state) { return ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata(); }
int function(IBlockState state) { return ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata(); }
/** * Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It * returns the metadata of the dropped item based on the old metadata of the block. */
Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It returns the metadata of the dropped item based on the old metadata of the block
damageDropped
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockNewLeaf.java", "license": "gpl-3.0", "size": 4887 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
23,610
EList<Expression> getExprs();
EList<Expression> getExprs();
/** * Returns the value of the '<em><b>Exprs</b></em>' containment reference list. * The list contents are of type {@link msi.gama.lang.gaml.gaml.Expression}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Exprs</em>' containment reference list isn't clear, * there really should be more ...
Returns the value of the 'Exprs' containment reference list. The list contents are of type <code>msi.gama.lang.gaml.gaml.Expression</code>. If the meaning of the 'Exprs' containment reference list isn't clear, there really should be more of a description here...
getExprs
{ "repo_name": "SonTG/gama", "path": "msi.gama.lang.gaml/src-gen/msi/gama/lang/gaml/gaml/ExpressionList.java", "license": "gpl-3.0", "size": 1162 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,180,269
public void setParameter(WideCommunityParameter parameter) { this.parameter = parameter; }
void function(WideCommunityParameter parameter) { this.parameter = parameter; }
/** * Sets wide community parameter. * * @param parameter wide community parameter */
Sets wide community parameter
setParameter
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/WideCommunity.java", "license": "apache-2.0", "size": 15657 }
[ "org.onosproject.bgpio.types.WideCommunityParameter" ]
import org.onosproject.bgpio.types.WideCommunityParameter;
import org.onosproject.bgpio.types.*;
[ "org.onosproject.bgpio" ]
org.onosproject.bgpio;
2,465,347
protected static IOptionsServer getSuperConnection(String serverURL) throws Exception { IOptionsServer Server = getServerAsSuper(serverURL); MatcherAssert.assertThat(Server, notNullValue()); Server.connect(); IClient superClient = getDefaultClient(Server); MatcherAssert.assertThat(superClient, notNullValue...
static IOptionsServer function(String serverURL) throws Exception { IOptionsServer Server = getServerAsSuper(serverURL); MatcherAssert.assertThat(Server, notNullValue()); Server.connect(); IClient superClient = getDefaultClient(Server); MatcherAssert.assertThat(superClient, notNullValue()); Server.setCurrentClient(supe...
/** * Gets a super user connection to server * * @param serverURL * @return server object with super user connection * @throws Exception */
Gets a super user connection to server
getSuperConnection
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/P4JavaTestCase.java", "license": "apache-2.0", "size": 107234 }
[ "com.perforce.p4java.client.IClient", "com.perforce.p4java.impl.mapbased.server.Server", "com.perforce.p4java.server.IOptionsServer", "org.hamcrest.MatcherAssert", "org.hamcrest.core.IsNull", "org.junit.Assert" ]
import com.perforce.p4java.client.IClient; import com.perforce.p4java.impl.mapbased.server.Server; import com.perforce.p4java.server.IOptionsServer; import org.hamcrest.MatcherAssert; import org.hamcrest.core.IsNull; import org.junit.Assert;
import com.perforce.p4java.client.*; import com.perforce.p4java.impl.mapbased.server.*; import com.perforce.p4java.server.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.junit.*;
[ "com.perforce.p4java", "org.hamcrest", "org.hamcrest.core", "org.junit" ]
com.perforce.p4java; org.hamcrest; org.hamcrest.core; org.junit;
2,113,652
public static java.util.Set extractDrawingGraphicAreaSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.GraphicAreaVoCollection voCollection) { return extractDrawingGraphicAreaSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.GraphicAreaVoCollection voCollection) { return extractDrawingGraphicAreaSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.core.configuration.domain.objects.DrawingGraphicArea set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.core.configuration.domain.objects.DrawingGraphicArea set from the value object collection
extractDrawingGraphicAreaSet
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/GraphicAreaVoAssembler.java", "license": "agpl-3.0", "size": 17468 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
387,364
private void testMultiMaxAggregation() { String queryString = "Select max(p.age), max(p.salary) from PersonES p"; Query query = em.createQuery(queryString); List resultList = query.getResultList(); Assert.assertEquals(2, resultList.size()); Assert.assertEquals(40.0, res...
void function() { String queryString = STR; Query query = em.createQuery(queryString); List resultList = query.getResultList(); Assert.assertEquals(2, resultList.size()); Assert.assertEquals(40.0, resultList.get(0)); Assert.assertEquals(400.0, resultList.get(1)); }
/** * Test multi max aggregation. */
Test multi max aggregation
testMultiMaxAggregation
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-elastic-search/src/test/java/com/impetus/client/es/ESAggregationTest.java", "license": "apache-2.0", "size": 20075 }
[ "java.util.List", "javax.persistence.Query", "junit.framework.Assert" ]
import java.util.List; import javax.persistence.Query; import junit.framework.Assert;
import java.util.*; import javax.persistence.*; import junit.framework.*;
[ "java.util", "javax.persistence", "junit.framework" ]
java.util; javax.persistence; junit.framework;
2,334,890
public boolean hasEnoughSpaceOnPartition(String target, long size) { try { // new File(target).getFreeSpace() (API 9) is not working on data partition // get directory without file String directory = new File(target).getParent(); StatFs stat = new StatFs(dir...
boolean function(String target, long size) { try { String directory = new File(target).getParent(); StatFs stat = new StatFs(directory); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); long availableSpace = availableBlocks * blockSize; Log.i(RootCommands.TAG, STR + target + STR +...
/** * Check if there is enough space on partition where target is located * * @param size size of file to put on partition * @param target path where to put the file * @return true if it will fit on partition of target, false if it will not fit. */
Check if there is enough space on partition where target is located
hasEnoughSpaceOnPartition
{ "repo_name": "DsLNeXuS/AOSPBrowserInstaller", "path": "root-commands/src/main/java/org/sufficientlysecure/rootcommands/Toolbox.java", "license": "gpl-3.0", "size": 26637 }
[ "android.os.StatFs", "java.io.File", "org.sufficientlysecure.rootcommands.util.Log" ]
import android.os.StatFs; import java.io.File; import org.sufficientlysecure.rootcommands.util.Log;
import android.os.*; import java.io.*; import org.sufficientlysecure.rootcommands.util.*;
[ "android.os", "java.io", "org.sufficientlysecure.rootcommands" ]
android.os; java.io; org.sufficientlysecure.rootcommands;
1,676,562
private StringBuilder getSongsCondition(Album album) { final StringBuilder sb = new StringBuilder(); sb.append("idAlbum = "); sb.append(album.id); return sb; }
StringBuilder function(Album album) { final StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(album.id); return sb; }
/** * Returns the SQL condition that returns all songs of an album. * @param album Album * @return SQL string */
Returns the SQL condition that returns all songs of an album
getSongsCondition
{ "repo_name": "r00li/RHome", "path": "Android/RHome/lib-src/org/xbmc/jsonrpc/client/MusicClient.java", "license": "gpl-3.0", "size": 37620 }
[ "org.xbmc.api.object.Album" ]
import org.xbmc.api.object.Album;
import org.xbmc.api.object.*;
[ "org.xbmc.api" ]
org.xbmc.api;
383,814
public OffsetDateTime lastCertificateIssuanceTime() { return this.innerProperties() == null ? null : this.innerProperties().lastCertificateIssuanceTime(); }
OffsetDateTime function() { return this.innerProperties() == null ? null : this.innerProperties().lastCertificateIssuanceTime(); }
/** * Get the lastCertificateIssuanceTime property: Certificate last issuance time. * * @return the lastCertificateIssuanceTime value. */
Get the lastCertificateIssuanceTime property: Certificate last issuance time
lastCertificateIssuanceTime
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/AppServiceCertificateOrderInner.java", "license": "mit", "size": 12735 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,344,686
private void sendResponse(ChannelHandlerContext ctx, long queryArrivalTimeMs, byte[] serializedDataTable) { long sendResponseStartTimeMs = System.currentTimeMillis(); int queryProcessingTimeMs = (int) (sendResponseStartTimeMs - queryArrivalTimeMs); ctx.writeAndFlush(Unpooled.wrappedBuffer(serializedDataTa...
void function(ChannelHandlerContext ctx, long queryArrivalTimeMs, byte[] serializedDataTable) { long sendResponseStartTimeMs = System.currentTimeMillis(); int queryProcessingTimeMs = (int) (sendResponseStartTimeMs - queryArrivalTimeMs); ctx.writeAndFlush(Unpooled.wrappedBuffer(serializedDataTable)).addListener(f -> { l...
/** * Send a response (either query results or exception) back to broker as response to the query request. */
Send a response (either query results or exception) back to broker as response to the query request
sendResponse
{ "repo_name": "linkedin/pinot", "path": "pinot-core/src/main/java/org/apache/pinot/core/transport/InstanceRequestHandler.java", "license": "apache-2.0", "size": 8809 }
[ "io.netty.buffer.Unpooled", "io.netty.channel.ChannelHandlerContext", "java.util.concurrent.TimeUnit", "org.apache.pinot.common.metrics.ServerMeter", "org.apache.pinot.common.metrics.ServerTimer" ]
import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import java.util.concurrent.TimeUnit; import org.apache.pinot.common.metrics.ServerMeter; import org.apache.pinot.common.metrics.ServerTimer;
import io.netty.buffer.*; import io.netty.channel.*; import java.util.concurrent.*; import org.apache.pinot.common.metrics.*;
[ "io.netty.buffer", "io.netty.channel", "java.util", "org.apache.pinot" ]
io.netty.buffer; io.netty.channel; java.util; org.apache.pinot;
2,480,898
public void saveDataSource(String eid, String oldDataSourceName, DataSource dataSource);
void function(String eid, String oldDataSourceName, DataSource dataSource);
/** * Replace an existing local data source * * @param eid the tc Runtime instance id * @param oldDataSourceName the old data source's human id * @param dataSource the new data source */
Replace an existing local data source
saveDataSource
{ "repo_name": "pivotal/tcs-hq-management-plugin", "path": "com.springsource.hq.plugin.tcserver.serverconfig.web/src/main/java/com/springsource/hq/plugin/tcserver/serverconfig/web/services/SettingsService.java", "license": "gpl-2.0", "size": 15742 }
[ "com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.DataSource" ]
import com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.DataSource;
import com.springsource.hq.plugin.tcserver.serverconfig.resources.jdbc.*;
[ "com.springsource.hq" ]
com.springsource.hq;
2,501,626
public AgentCommand dequeue(String hostname, String commandId) { Queue<AgentCommand> q = getQueue(hostname); if (q == null) { return null; } if (q.isEmpty()) { return null; } else { AgentCommand c = null; for (Iterator<AgentCommand> it = q.iterator(); it.hasNext();) { ...
AgentCommand function(String hostname, String commandId) { Queue<AgentCommand> q = getQueue(hostname); if (q == null) { return null; } if (q.isEmpty()) { return null; } else { AgentCommand c = null; for (Iterator<AgentCommand> it = q.iterator(); it.hasNext();) { AgentCommand ac = it.next(); if (ac instanceof ExecutionC...
/** * Try to dequeue command with provided id. * * @param hostname * @param commandId * @return */
Try to dequeue command with provided id
dequeue
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java", "license": "apache-2.0", "size": 5699 }
[ "java.util.Iterator", "java.util.Queue" ]
import java.util.Iterator; import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
2,729,667
public void testDerby3781() throws IOException, StandardException { final long size = 10; InputStream in = new LoopingAlphabetStream(size); PositionedStoreStream pss = new PositionedStoreStream(in); assertEquals("Invalid initial position", 0L, pss.getPosition()); ...
void function() throws IOException, StandardException { final long size = 10; InputStream in = new LoopingAlphabetStream(size); PositionedStoreStream pss = new PositionedStoreStream(in); assertEquals(STR, 0L, pss.getPosition()); pss.reposition(size -1); assertEquals(size -1, pss.getPosition()); assertEquals('j', pss.re...
/** * Tests that trying to move past the end of the stream leaves the stream * object in a consistent state, and can be repositioned again after the * failed reposition attempt. * <p> * Issue logged in Jira as DERBY-3781 * * @throws IOException if reading the stream fails unexpectedly...
Tests that trying to move past the end of the stream leaves the stream object in a consistent state, and can be repositioned again after the failed reposition attempt. Issue logged in Jira as DERBY-3781
testDerby3781
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/store/PositionedStoreStreamTest.java", "license": "apache-2.0", "size": 9302 }
[ "java.io.EOFException", "java.io.IOException", "java.io.InputStream", "org.apache.derby.iapi.error.StandardException", "org.apache.derby.impl.jdbc.PositionedStoreStream", "org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetStream" ]
import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import org.apache.derby.iapi.error.StandardException; import org.apache.derby.impl.jdbc.PositionedStoreStream; import org.apache.derbyTesting.functionTests.util.streams.LoopingAlphabetStream;
import java.io.*; import org.apache.*; import org.apache.derby.iapi.error.*; import org.apache.derby.impl.jdbc.*;
[ "java.io", "org.apache", "org.apache.derby" ]
java.io; org.apache; org.apache.derby;
1,951,326
@Override protected CollectionPersister[] getCollectionPersisters() { return collectionPersisters; }
CollectionPersister[] function() { return collectionPersisters; }
/** * An (optional) persister for a collection to be initialized; only collection loaders * return a non-null value */
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value
getCollectionPersisters
{ "repo_name": "HerrB92/obp", "path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/loader/hql/QueryLoader.java", "license": "mit", "size": 20704 }
[ "org.hibernate.persister.collection.CollectionPersister" ]
import org.hibernate.persister.collection.CollectionPersister;
import org.hibernate.persister.collection.*;
[ "org.hibernate.persister" ]
org.hibernate.persister;
1,246,827
@ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String circuitName, Context context);
@ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String circuitName, Context context);
/** * Deletes the specified express route circuit. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters...
Deletes the specified express route circuit
delete
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCircuitsClient.java", "license": "mit", "size": 51909 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context;
import com.azure.core.annotation.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
2,799,850
public void add(TXCommitMessage msg) { synchronized (this.txInProgress) { final Object key = msg.getTrackerKey(); if (key == null) { Assert.assertTrue(false, "TXFarSideCMTracker must have a non-null key for message " + msg); } this.txInProgress.put(key, msg); this.txInProgres...
void function(TXCommitMessage msg) { synchronized (this.txInProgress) { final Object key = msg.getTrackerKey(); if (key == null) { Assert.assertTrue(false, STR + msg); } this.txInProgress.put(key, msg); this.txInProgress.notifyAll(); } }
/** * The transcation commit message has been received */
The transcation commit message has been received
add
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/TXFarSideCMTracker.java", "license": "apache-2.0", "size": 11780 }
[ "org.apache.geode.internal.Assert" ]
import org.apache.geode.internal.Assert;
import org.apache.geode.internal.*;
[ "org.apache.geode" ]
org.apache.geode;
1,095,054
public PodcastChannel getChannel(int channelId) { String sql = "select " + CHANNEL_QUERY_COLUMNS + " from podcast_channel where id=?"; return queryOne(sql, channelRowMapper, channelId); }
PodcastChannel function(int channelId) { String sql = STR + CHANNEL_QUERY_COLUMNS + STR; return queryOne(sql, channelRowMapper, channelId); }
/** * Returns a single Podcast channel. */
Returns a single Podcast channel
getChannel
{ "repo_name": "airsonic/airsonic", "path": "airsonic-main/src/main/java/org/airsonic/player/dao/PodcastDao.java", "license": "gpl-3.0", "size": 8434 }
[ "org.airsonic.player.domain.PodcastChannel" ]
import org.airsonic.player.domain.PodcastChannel;
import org.airsonic.player.domain.*;
[ "org.airsonic.player" ]
org.airsonic.player;
845,226
private void setKerberosRampartConfig(Node kerberosConfig, Map<String, String> carbonSecKerberosDataMap) { NodeList list = kerberosConfig.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (SecurityFormConstants.RAMPART_PROPERTY.equal...
void function(Node kerberosConfig, Map<String, String> carbonSecKerberosDataMap) { NodeList list = kerberosConfig.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { Node node = list.item(i); if (SecurityFormConstants.RAMPART_PROPERTY.equals(node.getNodeName())) { Element eElement = (Element) node; String att...
/** * Sets the kerberos configs * * @param kerberosConfig kerbeos config */
Sets the kerberos configs
setKerberosRampartConfig
{ "repo_name": "knadikari/developer-studio", "path": "common/org.wso2.developerstudio.eclipse.artifact.security/src/org/wso2/developerstudio/eclipse/security/project/ui/form/SecurityFormPage.java", "license": "apache-2.0", "size": 118741 }
[ "java.util.Map", "org.apache.commons.lang.StringUtils", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList", "org.wso2.developerstudio.eclipse.artifact.security.utils.SecurityFormConstants" ]
import java.util.Map; import org.apache.commons.lang.StringUtils; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.wso2.developerstudio.eclipse.artifact.security.utils.SecurityFormConstants;
import java.util.*; import org.apache.commons.lang.*; import org.w3c.dom.*; import org.wso2.developerstudio.eclipse.artifact.security.utils.*;
[ "java.util", "org.apache.commons", "org.w3c.dom", "org.wso2.developerstudio" ]
java.util; org.apache.commons; org.w3c.dom; org.wso2.developerstudio;
1,957,458
synchronized boolean lock(final TaskId taskId, int retry) throws IOException { final File lockFile; // we already have the lock so bail out here final LockAndOwner lockAndOwner = locks.get(taskId); if (lockAndOwner != null && lockAndOwner.owningThread.equals(Thread.currentThread().g...
synchronized boolean lock(final TaskId taskId, int retry) throws IOException { final File lockFile; final LockAndOwner lockAndOwner = locks.get(taskId); if (lockAndOwner != null && lockAndOwner.owningThread.equals(Thread.currentThread().getName())) { log.trace(STR, logPrefix(), taskId); return true; } else if (lockAndO...
/** * Get the lock for the {@link TaskId}s directory if it is available * @param taskId * @param retry * @return true if successful * @throws IOException */
Get the lock for the <code>TaskId</code>s directory if it is available
lock
{ "repo_name": "ErikKringen/kafka", "path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/StateDirectory.java", "license": "apache-2.0", "size": 11677 }
[ "java.io.File", "java.io.IOException", "java.nio.channels.FileChannel", "java.nio.channels.FileLock", "java.nio.file.NoSuchFileException", "org.apache.kafka.streams.errors.ProcessorStateException", "org.apache.kafka.streams.processor.TaskId" ]
import java.io.File; import java.io.IOException; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.file.NoSuchFileException; import org.apache.kafka.streams.errors.ProcessorStateException; import org.apache.kafka.streams.processor.TaskId;
import java.io.*; import java.nio.channels.*; import java.nio.file.*; import org.apache.kafka.streams.errors.*; import org.apache.kafka.streams.processor.*;
[ "java.io", "java.nio", "org.apache.kafka" ]
java.io; java.nio; org.apache.kafka;
1,357,308
public static int numChars(Font font) { int numChars = 0; CMap cmap = FontUtils.getUCSCMap(font); // Find the number of characters that point to a valid glyph for (int charId : cmap) { if (cmap.glyphId(charId) != CMapTable.NOTDEF) { // Valid glyph numChars++; } } ...
static int function(Font font) { int numChars = 0; CMap cmap = FontUtils.getUCSCMap(font); for (int charId : cmap) { if (cmap.glyphId(charId) != CMapTable.NOTDEF) { numChars++; } } return numChars; }
/** * Gets the number of valid characters in the given font * * @param font * the source font * @return the number of valid characters in the given font * @throws UnsupportedOperationException * if font does not contain a UCS-4 or UCS-2 cmap */
Gets the number of valid characters in the given font
numChars
{ "repo_name": "hoangchunghien/sfntwari", "path": "src/com/google/typography/font/tools/fontinfo/FontInfo.java", "license": "apache-2.0", "size": 24681 }
[ "com.google.typography.font.sfntly.Font", "com.google.typography.font.sfntly.table.core.CMap", "com.google.typography.font.sfntly.table.core.CMapTable" ]
import com.google.typography.font.sfntly.Font; import com.google.typography.font.sfntly.table.core.CMap; import com.google.typography.font.sfntly.table.core.CMapTable;
import com.google.typography.font.sfntly.*; import com.google.typography.font.sfntly.table.core.*;
[ "com.google.typography" ]
com.google.typography;
1,197,390
protected final int readResidual( final InputBitStream ibs ) throws IOException { switch( residualCoding ) { case GAMMA: return ibs.readGamma(); case ZETA: return ibs.readZeta( zetaK ); case DELTA: return ibs.readDelta(); case GOLOMB: return ibs.readGolomb( zetaK ); case NIBBLE: return ibs.readNibble(); ...
final int function( final InputBitStream ibs ) throws IOException { switch( residualCoding ) { case GAMMA: return ibs.readGamma(); case ZETA: return ibs.readZeta( zetaK ); case DELTA: return ibs.readDelta(); case GOLOMB: return ibs.readGolomb( zetaK ); case NIBBLE: return ibs.readNibble(); default: throw new Unsupporte...
/** Reads a residual from the given stream. * * @param ibs a graph-file input bit stream. * @return the next residual. */
Reads a residual from the given stream
readResidual
{ "repo_name": "lhelwerd/WebGraph", "path": "src/it/unimi/dsi/webgraph/BVGraph.java", "license": "gpl-3.0", "size": 108146 }
[ "it.unimi.dsi.io.InputBitStream", "java.io.IOException" ]
import it.unimi.dsi.io.InputBitStream; import java.io.IOException;
import it.unimi.dsi.io.*; import java.io.*;
[ "it.unimi.dsi", "java.io" ]
it.unimi.dsi; java.io;
2,080,991