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
@Override public void installPackages(List<Package> toInstall, PrintStream... progress) throws Exception { File[] archivePaths = new File[toInstall.size()]; for (int i = 0; i < toInstall.size(); i++) { Package toDownload = toInstall.get(i); if (toDownload.isInstalled()) { for (Print...
void function(List<Package> toInstall, PrintStream... progress) throws Exception { File[] archivePaths = new File[toInstall.size()]; for (int i = 0; i < toInstall.size(); i++) { Package toDownload = toInstall.get(i); if (toDownload.isInstalled()) { for (PrintStream p : progress) { p.println(STR + toDownload.getName());...
/** * Installs all the packages in the supplied list. * * @param toInstall a list of Packages to install. * @param progress optional varargs parameter, that, if supplied, is expected * to contain one or more PrintStream objects to write progress to. * @throws Exception if something goes wron...
Installs all the packages in the supplied list
installPackages
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/core/packageManagement/DefaultPackageManager.java", "license": "epl-1.0", "size": 45681 }
[ "java.io.File", "java.io.PrintStream", "java.util.List" ]
import java.io.File; import java.io.PrintStream; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,496,101
// we get the root classes and build up a set of // classes upon which they depend Hashtable<String, String> dependencies = new Hashtable<String, String>(); Hashtable<File, File> containers = new Hashtable<File, File>(); Hashtable<String, String> toAnalyze = new Hashtable<String, String>...
Hashtable<String, String> dependencies = new Hashtable<String, String>(); Hashtable<File, File> containers = new Hashtable<File, File>(); Hashtable<String, String> toAnalyze = new Hashtable<String, String>(); Hashtable<String, String> nextAnalyze = new Hashtable<String, String>(); for (Enumeration<String> e = getRootCl...
/** * Determine the dependencies of the configured root classes. * * @param files a vector to be populated with the files which contain * the dependency classes * @param classes a vector to be populated with the names of the * dependency classes. */
Determine the dependencies of the configured root classes
determineDependencies
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java", "license": "mit", "size": 5381 }
[ "java.io.File", "java.io.IOException", "java.util.Enumeration", "java.util.Hashtable", "org.apache.bcel.classfile.ClassParser", "org.apache.bcel.classfile.JavaClass" ]
import java.io.File; import java.io.IOException; import java.util.Enumeration; import java.util.Hashtable; import org.apache.bcel.classfile.ClassParser; import org.apache.bcel.classfile.JavaClass;
import java.io.*; import java.util.*; import org.apache.bcel.classfile.*;
[ "java.io", "java.util", "org.apache.bcel" ]
java.io; java.util; org.apache.bcel;
746,429
public void setBaseItemLabelFont(Font font) { ParamChecks.nullNotPermitted(font, "font"); setBaseItemLabelFont(font, true); }
void function(Font font) { ParamChecks.nullNotPermitted(font, "font"); setBaseItemLabelFont(font, true); }
/** * Sets the base item label font and sends a {@link RendererChangeEvent} to * all registered listeners. * * @param font the font (<code>null</code> not permitted). * * @see #getBaseItemLabelFont() */
Sets the base item label font and sends a <code>RendererChangeEvent</code> to all registered listeners
setBaseItemLabelFont
{ "repo_name": "sternze/CurrentTopics_JFreeChart", "path": "source/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 142562 }
[ "java.awt.Font", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Font; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
1,194,960
@Test public void noFilePlan() throws Exception { // setup given conditions doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE); doReturn(RecordableVersionPolicy.MAJOR_ONLY.toString()).when(mockedNodeService).getProperty(nodeRef, ...
void function() throws Exception { doReturn(true).when(mockedNodeService).hasAspect(nodeRef, RecordableVersionModel.ASPECT_VERSIONABLE); doReturn(RecordableVersionPolicy.MAJOR_ONLY.toString()).when(mockedNodeService).getProperty(nodeRef, RecordableVersionModel.PROP_RECORDABLE_VERSION_POLICY); versionProperties.put(Vers...
/** * Given that the node has a valid recordable version policy * And there is no file plan * When I create a new version * Then an exception should be thrown to indicate that there is no file plan */
Given that the node has a valid recordable version policy And there is no file plan When I create a new version Then an exception should be thrown to indicate that there is no file plan
noFilePlan
{ "repo_name": "dnacreative/records-management", "path": "rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/version/RecordableVersionServiceImplUnitTest.java", "license": "lgpl-3.0", "size": 22998 }
[ "org.alfresco.error.AlfrescoRuntimeException", "org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService", "org.alfresco.repo.version.VersionModel", "org.alfresco.service.cmr.version.VersionType", "org.mockito.Mockito" ]
import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.module.org_alfresco_module_rm.fileplan.FilePlanService; import org.alfresco.repo.version.VersionModel; import org.alfresco.service.cmr.version.VersionType; import org.mockito.Mockito;
import org.alfresco.error.*; import org.alfresco.module.org_alfresco_module_rm.fileplan.*; import org.alfresco.repo.version.*; import org.alfresco.service.cmr.version.*; import org.mockito.*;
[ "org.alfresco.error", "org.alfresco.module", "org.alfresco.repo", "org.alfresco.service", "org.mockito" ]
org.alfresco.error; org.alfresco.module; org.alfresco.repo; org.alfresco.service; org.mockito;
910,466
@Test public void toEquationBinaryAdd() { // Setup. final TreeNode<Integer> child0 = new ConstantTerminal<Integer>(converterInteger, 3); final TreeNode<Integer> child1 = new ConstantTerminal<Integer>(converterInteger, 4); final TreeNode<Integer> function = new AddFunction<Int...
void function() { final TreeNode<Integer> child0 = new ConstantTerminal<Integer>(converterInteger, 3); final TreeNode<Integer> child1 = new ConstantTerminal<Integer>(converterInteger, 4); final TreeNode<Integer> function = new AddFunction<Integer>(converterInteger, child0, child1); final String result = InfixNotationVi...
/** * Test the <code>toEquation()</code> method. */
Test the <code>toEquation()</code> method
toEquationBinaryAdd
{ "repo_name": "jmthompson2015/vizzini", "path": "ai/src/test/java/org/vizzini/ai/geneticalgorithm/geneticprogramming/InfixNotationVisitorTest.java", "license": "mit", "size": 6082 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
1,628,677
private PartitionStats computePartition( Computation<I, V, E, M1, M2> computation, Partition<I, V, E> partition, OutOfCoreEngine oocEngine) throws IOException, InterruptedException { PartitionStats partitionStats = new PartitionStats(partition.getId(), 0, 0, 0, 0, 0); long verticesCo...
PartitionStats function( Computation<I, V, E, M1, M2> computation, Partition<I, V, E> partition, OutOfCoreEngine oocEngine) throws IOException, InterruptedException { PartitionStats partitionStats = new PartitionStats(partition.getId(), 0, 0, 0, 0, 0); long verticesComputedProgress = 0; long startTime = System.currentT...
/** * Compute a single partition * * @param computation Computation to use * @param partition Partition to compute * @param oocEngine out-of-core engine * @return Partition stats for this computed partition */
Compute a single partition
computePartition
{ "repo_name": "KidEinstein/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/graph/ComputeCallable.java", "license": "apache-2.0", "size": 14464 }
[ "com.google.common.collect.Iterables", "java.io.IOException", "org.apache.giraph.ooc.OutOfCoreEngine", "org.apache.giraph.partition.Partition", "org.apache.giraph.partition.PartitionStats", "org.apache.giraph.utils.Trimmable", "org.apache.giraph.worker.WorkerProgress" ]
import com.google.common.collect.Iterables; import java.io.IOException; import org.apache.giraph.ooc.OutOfCoreEngine; import org.apache.giraph.partition.Partition; import org.apache.giraph.partition.PartitionStats; import org.apache.giraph.utils.Trimmable; import org.apache.giraph.worker.WorkerProgress;
import com.google.common.collect.*; import java.io.*; import org.apache.giraph.ooc.*; import org.apache.giraph.partition.*; import org.apache.giraph.utils.*; import org.apache.giraph.worker.*;
[ "com.google.common", "java.io", "org.apache.giraph" ]
com.google.common; java.io; org.apache.giraph;
2,060,209
public void requestInterrupts() { if (m_interrupt != 0) { throw new AllocationException("The interrupt has already been allocated"); } allocateInterrupts(true); assert (m_interrupt != 0); InterruptJNI.requestInterrupts(m_interrupt, getPortHandleForRouting(), ...
void function() { if (m_interrupt != 0) { throw new AllocationException(STR); } allocateInterrupts(true); assert (m_interrupt != 0); InterruptJNI.requestInterrupts(m_interrupt, getPortHandleForRouting(), getAnalogTriggerTypeForRouting()); setUpSourceEdge(true, false); }
/** * Request one of the 8 interrupts synchronously on this digital input. Request interrupts in * synchronous mode where the user program will have to explicitly wait for the interrupt to occur * using {@link #waitForInterrupt}. The default is interrupt on rising edges only. */
Request one of the 8 interrupts synchronously on this digital input. Request interrupts in synchronous mode where the user program will have to explicitly wait for the interrupt to occur using <code>#waitForInterrupt</code>. The default is interrupt on rising edges only
requestInterrupts
{ "repo_name": "PeterMitrano/allwpilib", "path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java", "license": "bsd-3-clause", "size": 7599 }
[ "edu.wpi.first.wpilibj.hal.InterruptJNI", "edu.wpi.first.wpilibj.util.AllocationException" ]
import edu.wpi.first.wpilibj.hal.InterruptJNI; import edu.wpi.first.wpilibj.util.AllocationException;
import edu.wpi.first.wpilibj.hal.*; import edu.wpi.first.wpilibj.util.*;
[ "edu.wpi.first" ]
edu.wpi.first;
131,680
String[] geoParts = StringUtils.split(geolocation, ","); if (geoParts.length == 2) { latitude = toDouble(geoParts[0]); longitude = toDouble(geoParts[1]); } }
String[] geoParts = StringUtils.split(geolocation, ","); if (geoParts.length == 2) { latitude = toDouble(geoParts[0]); longitude = toDouble(geoParts[1]); } }
/** * Splits the geolocation into latitude and longitude. */
Splits the geolocation into latitude and longitude
parseGeoLocation
{ "repo_name": "peuter/openhab2-addons", "path": "addons/binding/org.openhab.binding.astro/src/main/java/org/openhab/binding/astro/internal/config/AstroThingConfig.java", "license": "epl-1.0", "size": 3113 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
2,877,232
return new VectorQuery(); } static Logger LOGGER = LoggerFactory.getLogger(VectorQuery.class); Set<String> fields = new HashSet<String>(3); Bounds bounds; Filter<Feature> filter; Integer limit, offset; // // List<Sort> sort; Pair<CoordinateReferenc...
return new VectorQuery(); } static Logger LOGGER = LoggerFactory.getLogger(VectorQuery.class); Set<String> fields = new HashSet<String>(3); Bounds bounds; Filter<Feature> filter; Integer limit, offset; Pair<CoordinateReferenceSystem,CoordinateReferenceSystem> reproject; Double simplify; Transaction transaction = Transa...
/** * Returns a vector query with no constraints. */
Returns a vector query with no constraints
all
{ "repo_name": "ryantxu/jeo", "path": "core/src/main/java/io/jeo/vector/VectorQuery.java", "license": "apache-2.0", "size": 15255 }
[ "io.jeo.data.Transaction", "io.jeo.filter.Filter", "io.jeo.geom.Bounds", "io.jeo.util.Pair", "java.util.HashSet", "java.util.Set", "org.osgeo.proj4j.CoordinateReferenceSystem", "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import io.jeo.data.Transaction; import io.jeo.filter.Filter; import io.jeo.geom.Bounds; import io.jeo.util.Pair; import java.util.HashSet; import java.util.Set; import org.osgeo.proj4j.CoordinateReferenceSystem; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import io.jeo.data.*; import io.jeo.filter.*; import io.jeo.geom.*; import io.jeo.util.*; import java.util.*; import org.osgeo.proj4j.*; import org.slf4j.*;
[ "io.jeo.data", "io.jeo.filter", "io.jeo.geom", "io.jeo.util", "java.util", "org.osgeo.proj4j", "org.slf4j" ]
io.jeo.data; io.jeo.filter; io.jeo.geom; io.jeo.util; java.util; org.osgeo.proj4j; org.slf4j;
1,816,338
protected void handleDateNext(Date startDate, Date endDate) { if (isVisibleInActivity()) { if (!shiftDates(startDate, endDate, +1)) { return; } } refreshIfVisible(); }
void function(Date startDate, Date endDate) { if (isVisibleInActivity()) { if (!shiftDates(startDate, endDate, +1)) { return; } } refreshIfVisible(); }
/** * Default implementation shifts the dates by one day, if visible * and calls #refreshIfVisible(). * * @param startDate * @param endDate */
Default implementation shifts the dates by one day, if visible and calls #refreshIfVisible()
handleDateNext
{ "repo_name": "gtank/Gadgetbridge", "path": "app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/AbstractChartFragment.java", "license": "agpl-3.0", "size": 22659 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,620,510
void loadDicoList() { dicoList = new ArrayList<String>(); BufferedReader ficTexte; String ligne = ""; try { ficTexte = new BufferedReader(new FileReader(new File(dicoFile))); if (ficTexte == null) { throw new FileNotFoundException("Fichier non trouvé: " + dicoFile); } while ((...
void loadDicoList() { dicoList = new ArrayList<String>(); BufferedReader ficTexte; String ligne = STRFichier non trouvé: " + dicoFile); } while ((ligne = ficTexte.readLine()) != null) { if (ligne != null) { dicoList.add(ligne); } } ficTexte.close(); } catch (FileNotFoundException e) { System.out.println(e.getMessage())...
/** * remplir dicoList avec les mots qui se trouvent dans le fichier * dictionnaire */
remplir dicoList avec les mots qui se trouvent dans le fichier dictionnaire
loadDicoList
{ "repo_name": "SaharChang/Author-Extraction", "path": "AuthorExtract/src/authorExtract/DomParseBalie.java", "license": "apache-2.0", "size": 43134 }
[ "java.io.BufferedReader", "java.io.FileNotFoundException", "java.io.IOException", "java.util.ArrayList" ]
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
535,219
List<AlignmentRecord> loadRecords(String referenceName, int start, int end) throws IOException, DataFormatException, MappingFileException;
List<AlignmentRecord> loadRecords(String referenceName, int start, int end) throws IOException, DataFormatException, MappingFileException;
/** * Loads alignment records in a given interval for a given reference * sequence. * * @param referenceName * the name of the reference sequence on which the alignment * records are * @param start * the beginning of the interval in which the start of the * ...
Loads alignment records in a given interval for a given reference sequence
loadRecords
{ "repo_name": "astrid/GenoViewer", "path": "GenoViewer/src/main/java/hu/astrid/mapping/io/IndexedMappingFileReader.java", "license": "gpl-3.0", "size": 4056 }
[ "hu.astrid.mapping.exception.MappingFileException", "hu.astrid.mapping.model.AlignmentRecord", "java.io.IOException", "java.util.List", "java.util.zip.DataFormatException" ]
import hu.astrid.mapping.exception.MappingFileException; import hu.astrid.mapping.model.AlignmentRecord; import java.io.IOException; import java.util.List; import java.util.zip.DataFormatException;
import hu.astrid.mapping.exception.*; import hu.astrid.mapping.model.*; import java.io.*; import java.util.*; import java.util.zip.*;
[ "hu.astrid.mapping", "java.io", "java.util" ]
hu.astrid.mapping; java.io; java.util;
1,442,964
public static Term materialize(Maker maker, Constructor constructor, Copyable child, boolean discard) { Buffer b = new Buffer(maker); child.copy(b.sink().start(constructor), discard, LinkedExtensibleMap.EMPTY_RENAMING).end(); return b.term(true); }
static Term function(Maker maker, Constructor constructor, Copyable child, boolean discard) { Buffer b = new Buffer(maker); child.copy(b.sink().start(constructor), discard, LinkedExtensibleMap.EMPTY_RENAMING).end(); return b.term(true); }
/** * Materialize construction term with single child. * @param maker to use for materialization * @param constructor to use * @param child of construction * @param discard whether the child should be discarded (and thus may be reused) * @return the materialized term */
Materialize construction term with single child
materialize
{ "repo_name": "crsx/crsx", "path": "src/net/sf/crsx/util/Buffer.java", "license": "epl-1.0", "size": 8246 }
[ "net.sf.crsx.Constructor", "net.sf.crsx.Copyable", "net.sf.crsx.Maker", "net.sf.crsx.Term" ]
import net.sf.crsx.Constructor; import net.sf.crsx.Copyable; import net.sf.crsx.Maker; import net.sf.crsx.Term;
import net.sf.crsx.*;
[ "net.sf.crsx" ]
net.sf.crsx;
912,547
public static List<SQSMessage> receiveMessageFromQueue(String queueUrl, int msgCount) { ArrayList<SQSMessage> sqsMessages = new ArrayList<SQSMessage>(); if (msgCount == 0) { return sqsMessages; } ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl); int msgs = ms...
static List<SQSMessage> function(String queueUrl, int msgCount) { ArrayList<SQSMessage> sqsMessages = new ArrayList<SQSMessage>(); if (msgCount == 0) { return sqsMessages; } ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(queueUrl); int msgs = msgCount; int batch = 99; while (msgs > 0) { if (msg...
/** * <p>Returns a <code>List</code> of receipt handles, or an empty <code>List</code> if none were received.</p> * * @param queueUrl * @param msgCount * * @return a List of receipt handles, or an empty List if none were received. */
Returns a <code>List</code> of receipt handles, or an empty <code>List</code> if none were received
receiveMessageFromQueue
{ "repo_name": "jackstraw66/web", "path": "livescribe/lsdatametrics/src/main/java/com/livescribe/aws/heartbeat/DataMetricsTransferApp.java", "license": "bsd-2-clause", "size": 11538 }
[ "com.amazonaws.services.sqs.model.Message", "com.amazonaws.services.sqs.model.ReceiveMessageRequest", "com.livescribe.aws.heartbeat.msg.SQSMessage", "java.util.ArrayList", "java.util.List" ]
import com.amazonaws.services.sqs.model.Message; import com.amazonaws.services.sqs.model.ReceiveMessageRequest; import com.livescribe.aws.heartbeat.msg.SQSMessage; import java.util.ArrayList; import java.util.List;
import com.amazonaws.services.sqs.model.*; import com.livescribe.aws.heartbeat.msg.*; import java.util.*;
[ "com.amazonaws.services", "com.livescribe.aws", "java.util" ]
com.amazonaws.services; com.livescribe.aws; java.util;
2,172,321
private UserRepo<DccdUser> getUserRepo() { return DccdUserService.getService().getUserRepo(); }
UserRepo<DccdUser> function() { return DccdUserService.getService().getUserRepo(); }
/** * Get the user repository * replaces Easy On Fedora call: Data.getUserRepo() * * @return The repository */
Get the user repository replaces Easy On Fedora call: Data.getUserRepo()
getUserRepo
{ "repo_name": "DANS-KNAW/dccd-lib", "path": "src/main/java/nl/knaw/dans/dccd/authn/RegistrationService.java", "license": "apache-2.0", "size": 19411 }
[ "nl.knaw.dans.common.lang.ldap.UserRepo", "nl.knaw.dans.dccd.application.services.DccdUserService", "nl.knaw.dans.dccd.model.DccdUser" ]
import nl.knaw.dans.common.lang.ldap.UserRepo; import nl.knaw.dans.dccd.application.services.DccdUserService; import nl.knaw.dans.dccd.model.DccdUser;
import nl.knaw.dans.common.lang.ldap.*; import nl.knaw.dans.dccd.application.services.*; import nl.knaw.dans.dccd.model.*;
[ "nl.knaw.dans" ]
nl.knaw.dans;
1,946,174
@Override public Table getTable(String dbName, String tableName) throws CatalogException { Table table = super.getTable(dbName, tableName); if (table == null) return null; if (table.isLoaded() && table instanceof IncompleteTable) { // If there were problems loading this table's metadata, th...
Table function(String dbName, String tableName) throws CatalogException { Table table = super.getTable(dbName, tableName); if (table == null) return null; if (table.isLoaded() && table instanceof IncompleteTable) { ImpalaException cause = ((IncompleteTable) table).getCause(); if (cause instanceof TableLoadingException)...
/** * Returns the Table object for the given dbName/tableName. Returns null * if the table does not exist. Will throw a TableLoadingException if the table's * metadata was not able to be loaded successfully and DatabaseNotFoundException * if the parent database does not exist. */
Returns the Table object for the given dbName/tableName. Returns null if the table does not exist. Will throw a TableLoadingException if the table's metadata was not able to be loaded successfully and DatabaseNotFoundException if the parent database does not exist
getTable
{ "repo_name": "cloudera/recordservice", "path": "fe/src/main/java/com/cloudera/impala/catalog/ImpaladCatalog.java", "license": "apache-2.0", "size": 18542 }
[ "com.cloudera.impala.common.ImpalaException" ]
import com.cloudera.impala.common.ImpalaException;
import com.cloudera.impala.common.*;
[ "com.cloudera.impala" ]
com.cloudera.impala;
1,915,114
public Socket createClientSocket(EndPoint remoteEndPoint) throws IOException { final SSLSocket socket; try { socket = (SSLSocket)m_clientSocketFactory.createSocket( remoteEndPoint.getHost(), remoteEndPoint.getPort()); } catch (ConnectException e) { throw new VerboseConnectExc...
Socket function(EndPoint remoteEndPoint) throws IOException { final SSLSocket socket; try { socket = (SSLSocket)m_clientSocketFactory.createSocket( remoteEndPoint.getHost(), remoteEndPoint.getPort()); } catch (ConnectException e) { throw new VerboseConnectException(e, STR + remoteEndPoint); } socket.setEnabledCipherSui...
/** * Factory method for client sockets. * * @param remoteEndPoint Remote host and port. * @return A new <code>Socket</code>. * @exception IOException If an error occurs. */
Factory method for client sockets
createClientSocket
{ "repo_name": "slantview/DrupalLoadTest", "path": "lib/grinder/grinder-http/src/main/java/net/grinder/tools/tcpproxy/TCPProxySSLSocketFactoryImplementation.java", "license": "gpl-2.0", "size": 7502 }
[ "java.io.IOException", "java.net.ConnectException", "java.net.Socket", "javax.net.ssl.SSLSocket" ]
import java.io.IOException; import java.net.ConnectException; import java.net.Socket; import javax.net.ssl.SSLSocket;
import java.io.*; import java.net.*; import javax.net.ssl.*;
[ "java.io", "java.net", "javax.net" ]
java.io; java.net; javax.net;
188,278
@Override public void nextBytes(byte[] bytes) { synchronized (OpenSslJnaCryptoRandom.class) { //this method is synchronized for now //to support multithreading https://wiki.openssl.org/index.php/Manual:Threads(3) needs to be done if(rdrandEnabled...
void function(byte[] bytes) { synchronized (OpenSslJnaCryptoRandom.class) { if(rdrandEnabled && OpenSslNativeJna.RAND_get_rand_method().equals(OpenSslNativeJna.RAND_SSLeay())) { close(); throw new RuntimeException(STR); } ByteBuffer buf = ByteBuffer.allocateDirect(bytes.length); int retVal = OpenSslNativeJna.RAND_bytes...
/** * Generates a user-specified number of random bytes. It's thread-safe. * * @param bytes the array to be filled in with random bytes. */
Generates a user-specified number of random bytes. It's thread-safe
nextBytes
{ "repo_name": "kexianda/commons-crypto", "path": "src/main/java/org/apache/commons/crypto/jna/OpenSslJnaCryptoRandom.java", "license": "apache-2.0", "size": 6796 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
900,730
final Figure figure = new Figure() .add(Points.random()).add(Points.random()).add(Points.random()) .add(Points.random()).add(Points.random()).add(Points.random()); final Awt awt = new Awt().withSize(50, 50); awt.render(figure); awt.setVisible(true); }
final Figure figure = new Figure() .add(Points.random()).add(Points.random()).add(Points.random()) .add(Points.random()).add(Points.random()).add(Points.random()); final Awt awt = new Awt().withSize(50, 50); awt.render(figure); awt.setVisible(true); }
/** * Main start method. * @param args Unused args */
Main start method
main
{ "repo_name": "HDouss/jeometry", "path": "jeometry-double/src/it/com/jeometry/main/Points.java", "license": "mit", "size": 2240 }
[ "com.jeometry.render.awt.Awt", "com.jeometry.twod.Figure" ]
import com.jeometry.render.awt.Awt; import com.jeometry.twod.Figure;
import com.jeometry.render.awt.*; import com.jeometry.twod.*;
[ "com.jeometry.render", "com.jeometry.twod" ]
com.jeometry.render; com.jeometry.twod;
1,864,151
public VirtualMachineScaleSetUpdateIpConfigurationProperties withSubnet(ApiEntityReference subnet) { this.subnet = subnet; return this; }
VirtualMachineScaleSetUpdateIpConfigurationProperties function(ApiEntityReference subnet) { this.subnet = subnet; return this; }
/** * Set the subnet property: The subnet. * * @param subnet the subnet value to set. * @return the VirtualMachineScaleSetUpdateIpConfigurationProperties object itself. */
Set the subnet property: The subnet
withSubnet
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/VirtualMachineScaleSetUpdateIpConfigurationProperties.java", "license": "mit", "size": 9538 }
[ "com.azure.resourcemanager.compute.models.ApiEntityReference" ]
import com.azure.resourcemanager.compute.models.ApiEntityReference;
import com.azure.resourcemanager.compute.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
870,161
public void waitForTaskRunning() throws Exception { Preconditions.checkState(taskThread != null, "Task thread was not started."); StreamTask<?, ?> streamTask = taskThread.task; while (!streamTask.isRunning()) { Thread.sleep(10); if (!taskThread.isAlive()) { if (taskThread.getError() != null) { t...
void function() throws Exception { Preconditions.checkState(taskThread != null, STR); StreamTask<?, ?> streamTask = taskThread.task; while (!streamTask.isRunning()) { Thread.sleep(10); if (!taskThread.isAlive()) { if (taskThread.getError() != null) { throw new Exception(STR, taskThread.getError()); } else { throw new E...
/** * Waits for the task to be running. * * @throws Exception */
Waits for the task to be running
waitForTaskRunning
{ "repo_name": "mbode/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTestHarness.java", "license": "apache-2.0", "size": 15372 }
[ "org.apache.flink.util.Preconditions" ]
import org.apache.flink.util.Preconditions;
import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
1,214,342
public static void register(@NonNull Class< ? extends IIdentifyable< ? >> dataclass, @NonNull String linkname, @NonNull String rurl) { TextLinkInfo li = new TextLinkInfo(linkname, rurl, dataclass); if(null != m_map.put(linkname, li)) throw new IllegalStateException("Duplicate link definition: " + linkname + "...
static void function(@NonNull Class< ? extends IIdentifyable< ? >> dataclass, @NonNull String linkname, @NonNull String rurl) { TextLinkInfo li = new TextLinkInfo(linkname, rurl, dataclass); if(null != m_map.put(linkname, li)) throw new IllegalStateException(STR + linkname + STR + dataclass); }
/** * Register an explicitly named link that represents a given data type. * @param dataclass * @param linkname * @param rurl */
Register an explicitly named link that represents a given data type
register
{ "repo_name": "fjalvingh/domui", "path": "to.etc.webapp.core/src/main/java/to/etc/webapp/mailer/TextLinkInfo.java", "license": "lgpl-2.1", "size": 5140 }
[ "org.eclipse.jdt.annotation.NonNull", "to.etc.webapp.query.IIdentifyable" ]
import org.eclipse.jdt.annotation.NonNull; import to.etc.webapp.query.IIdentifyable;
import org.eclipse.jdt.annotation.*; import to.etc.webapp.query.*;
[ "org.eclipse.jdt", "to.etc.webapp" ]
org.eclipse.jdt; to.etc.webapp;
2,563,798
private static void setImageViewScaleTypeMatrix(ImageView imageView) { if (null != imageView && !(imageView instanceof IPhotoView)) { if (!ScaleType.MATRIX.equals(imageView.getScaleType())) { imageView.setScaleType(ScaleType.MATRIX); } } } pr...
static void function(ImageView imageView) { if (null != imageView && !(imageView instanceof IPhotoView)) { if (!ScaleType.MATRIX.equals(imageView.getScaleType())) { imageView.setScaleType(ScaleType.MATRIX); } } } WeakReference<ImageView> mImageView; private GestureDetector mGestureDetector; private uk.co.senab.photovie...
/** * Set's the ImageView's ScaleType to Matrix. */
Set's the ImageView's ScaleType to Matrix
setImageViewScaleTypeMatrix
{ "repo_name": "ChenSiLiang/RotatePhotoView", "path": "RotatePhotoView/rotatephotoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java", "license": "apache-2.0", "size": 46312 }
[ "android.graphics.Matrix", "android.graphics.RectF", "android.view.GestureDetector", "android.view.View", "android.view.ViewTreeObserver", "android.widget.ImageView", "java.lang.ref.WeakReference", "uk.co.senab.photoview.gestures.RotateGestureDetector", "uk.co.senab.photoview.gestures.VersionedGestu...
import android.graphics.Matrix; import android.graphics.RectF; import android.view.GestureDetector; import android.view.View; import android.view.ViewTreeObserver; import android.widget.ImageView; import java.lang.ref.WeakReference; import uk.co.senab.photoview.gestures.RotateGestureDetector; import uk.co.senab.photovi...
import android.graphics.*; import android.view.*; import android.widget.*; import java.lang.ref.*; import uk.co.senab.photoview.gestures.*;
[ "android.graphics", "android.view", "android.widget", "java.lang", "uk.co.senab" ]
android.graphics; android.view; android.widget; java.lang; uk.co.senab;
2,146,180
EReference getDocumentRoot_ContactInfo();
EReference getDocumentRoot_ContactInfo();
/** * Returns the meta object for the containment reference '{@link net.opengis.ows20.DocumentRoot#getContactInfo <em>Contact Info</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Contact Info</em>'. * @see net.opengis.ows20.Document...
Returns the meta object for the containment reference '<code>net.opengis.ows20.DocumentRoot#getContactInfo Contact Info</code>'.
getDocumentRoot_ContactInfo
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.ows/src/net/opengis/ows20/Ows20Package.java", "license": "lgpl-2.1", "size": 356067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,706,281
@ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux<PollResult<VirtualMachineExtensionInner>, VirtualMachineExtensionInner> beginCreateOrUpdateAsync( String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineExten...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<VirtualMachineExtensionInner>, VirtualMachineExtensionInner> function( String resourceGroupName, String vmScaleSetName, String instanceId, String vmExtensionName, VirtualMachineExtensionInner extensionParameters, Context context) { context = this.client....
/** * The operation to create or update the VMSS VM extension. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param vmExtensionName The name of the virtual mac...
The operation to create or update the VMSS VM extension
beginCreateOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetVMExtensionsClientImpl.java", "license": "mit", "size": 76869 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.compute.fluent.models.VirtualMachine...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.compute.fluent.m...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.compute.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,777,767
@Nullable private static MediaFormat getFileMediaFormat(File file, MediaExtractor extractor, int videoOffset) throws IOException { try (FileInputStream fileInputStream = new FileInputStream(file)) { ...
static MediaFormat function(File file, MediaExtractor extractor, int videoOffset) throws IOException { try (FileInputStream fileInputStream = new FileInputStream(file)) { FileDescriptor fd = fileInputStream.getFD(); extractor.setDataSource(fd, file.length() - videoOffset, videoOffset); for (int i = 0; i < extractor.get...
/** * Get the MediaFormat associated with the video track of the Motion Photo MPEG4. */
Get the MediaFormat associated with the video track of the Motion Photo MPEG4
getFileMediaFormat
{ "repo_name": "googleinterns/motion-photos-filereader", "path": "MotionPhotoReader/app/src/main/java/com/google/android/libraries/motionphotoreader/MotionPhotoInfo.java", "license": "apache-2.0", "size": 8841 }
[ "android.media.MediaExtractor", "android.media.MediaFormat", "java.io.File", "java.io.FileDescriptor", "java.io.FileInputStream", "java.io.IOException" ]
import android.media.MediaExtractor; import android.media.MediaFormat; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.IOException;
import android.media.*; import java.io.*;
[ "android.media", "java.io" ]
android.media; java.io;
1,016,792
@Test public void testSetGetMessageIdOnNewMessageWithString() throws Exception { String testMessageId = "ID:myStringMessageId"; AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); amqpMessageFacade.setMessageId(testMessageId); assertEquals("Expected messageId no...
void function() throws Exception { String testMessageId = STR; AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade(); amqpMessageFacade.setMessageId(testMessageId); assertEquals(STR, testMessageId, amqpMessageFacade.getMessageId()); assertEquals(STR, testMessageId, amqpMessageFacade.getMessageId()); }
/** * Test that setting then getting a String value as the messageId returns the expected value * * @throws Exception if the test encounters an unexpected error */
Test that setting then getting a String value as the messageId returns the expected value
testSetGetMessageIdOnNewMessageWithString
{ "repo_name": "apache/qpid-jms", "path": "qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/amqp/message/AmqpJmsMessageFacadeTest.java", "license": "apache-2.0", "size": 96283 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,201,405
if (!bundle.containsKey(EXTRA_LINKER_PARAMS_BASE_LOAD_ADDRESS) || !bundle.containsKey(EXTRA_LINKER_PARAMS_WAIT_FOR_SHARED_RELRO) || !bundle.containsKey(EXTRA_LINKER_PARAMS_TEST_RUNNER_CLASS_NAME) || !bundle.containsKey(EXTRA_LINKER_PARAMS_LINKER_IMPLEMENTATION)) { ...
if (!bundle.containsKey(EXTRA_LINKER_PARAMS_BASE_LOAD_ADDRESS) !bundle.containsKey(EXTRA_LINKER_PARAMS_WAIT_FOR_SHARED_RELRO) !bundle.containsKey(EXTRA_LINKER_PARAMS_TEST_RUNNER_CLASS_NAME) !bundle.containsKey(EXTRA_LINKER_PARAMS_LINKER_IMPLEMENTATION)) { return null; } return new ChromiumLinkerParams(bundle); } privat...
/** * Use this method to recreate a LinkerParams instance from a Bundle. * * @param bundle A Bundle, its content must have been populated by a previous * call to populateBundle(). * @return params instance or possibly null if params was not put into bundle. */
Use this method to recreate a LinkerParams instance from a Bundle
create
{ "repo_name": "endlessm/chromium-browser", "path": "content/public/android/java/src/org/chromium/content/app/ChromiumLinkerParams.java", "license": "bsd-3-clause", "size": 4825 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
207,276
public void testExplicitNullabilityOfConstraints() throws SQLException { Statement s = createStatement(); //-- primary key cannot be explicitly nullable assertStatementError("42X01" , s , "create table neg2(c1 int null constraint asdf primary key)"); assertStatementError("42X01" , s , "create table neg2(...
void function() throws SQLException { Statement s = createStatement(); assertStatementError("42X01" , s , STR); assertStatementError("42X01" , s , STR); assertStatementError("42X01" , s , STR); assertStatementError("42X01" , s , STR); }
/** * Tests that primary and Unique key constraint cannot be Explicitely Nullable. * * @exception SQLException */
Tests that primary and Unique key constraint cannot be Explicitely Nullable
testExplicitNullabilityOfConstraints
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/PrimaryKeyTest.java", "license": "agpl-3.0", "size": 13451 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,379,066
public static String getCurrentUserId() { FirebaseUser user = getFirebaseNewInstance().getCurrentUser(); if (user != null) { return user.getUid(); } return null; }
static String function() { FirebaseUser user = getFirebaseNewInstance().getCurrentUser(); if (user != null) { return user.getUid(); } return null; }
/** * get current User Id * * @return String */
get current User Id
getCurrentUserId
{ "repo_name": "RubitOrganization/Rubit", "path": "app/src/main/java/com/coderschool/android2/rubit/utils/FirebaseUtils.java", "license": "apache-2.0", "size": 4169 }
[ "com.google.firebase.auth.FirebaseUser" ]
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.*;
[ "com.google.firebase" ]
com.google.firebase;
1,496,215
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); }
IBlockState function(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); }
/** * Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the * IBlockstate */
Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate
getStateForPlacement
{ "repo_name": "SparkyTheFox/Sparkys-Mod-1.11.2-1.4.0-Alpha-SourceCode", "path": "common/mod/sparkyfox/servermod/block/adventure/BlockRuinsBridge.java", "license": "lgpl-3.0", "size": 4334 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.entity.EntityLivingBase", "net.minecraft.util.EnumFacing", "net.minecraft.util.math.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World;
import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.entity", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraft.world;
1,413,304
public void plot() { State s; double z; final double resX = Math.abs((boundaries[1] - boundaries[0]) / isosamples[0]); final double resY = Math.abs((boundaries[3] - boundaries[2]) / isosamples[1]); int iData = 0; for (double x=boundaries[0]; x<=boundaries[1]; x+=resX) { ...
void function() { State s; double z; final double resX = Math.abs((boundaries[1] - boundaries[0]) / isosamples[0]); final double resY = Math.abs((boundaries[3] - boundaries[2]) / isosamples[1]); int iData = 0; for (double x=boundaries[0]; x<=boundaries[1]; x+=resX) { for (double y=boundaries[2]; y<=boundaries[3]; y+=re...
/** * This function plots the Q-function */
This function plots the Q-function
plot
{ "repo_name": "ieugen/Teachingbox", "path": "src/org/hswgt/teachingbox/core/rl/plot/QFunctionPlotter3D.java", "license": "gpl-3.0", "size": 5086 }
[ "org.hswgt.teachingbox.core.rl.env.State" ]
import org.hswgt.teachingbox.core.rl.env.State;
import org.hswgt.teachingbox.core.rl.env.*;
[ "org.hswgt.teachingbox" ]
org.hswgt.teachingbox;
493,894
public void logoffAction() { constructAuthForm(); authPanel.recalculate(); authPanel.layout(true); authPanel.fireEvent(Events.Refresh); }
void function() { constructAuthForm(); authPanel.recalculate(); authPanel.layout(true); authPanel.fireEvent(Events.Refresh); }
/** * Logoff action. */
Logoff action
logoffAction
{ "repo_name": "alexript/balas", "path": "src/net/autosauler/ballance/client/gui/AuthPanel.java", "license": "apache-2.0", "size": 8238 }
[ "com.extjs.gxt.ui.client.event.Events" ]
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.*;
[ "com.extjs.gxt" ]
com.extjs.gxt;
1,368,381
// TODO consider enabling pagination here public List<User> getAuthorizedUsers(AbstractSecurityEnabledResource resource) { List<User> userDTOs = Lists.newArrayList(); if (MapUtils.isNotEmpty(resource.getUserPermissions())) { List<User> users = alienUserDao.find(resource.getUserPermis...
List<User> function(AbstractSecurityEnabledResource resource) { List<User> userDTOs = Lists.newArrayList(); if (MapUtils.isNotEmpty(resource.getUserPermissions())) { List<User> users = alienUserDao.find(resource.getUserPermissions().keySet().toArray(new String[resource.getUserPermissions().size()])); users.sort(Compara...
/** * Get summary infos of all authorized users of the resource * * @param resource * @return */
Get summary infos of all authorized users of the resource
getAuthorizedUsers
{ "repo_name": "san-tak/alien4cloud", "path": "alien4cloud-core/src/main/java/alien4cloud/authorization/ResourcePermissionService.java", "license": "apache-2.0", "size": 10514 }
[ "java.util.Comparator", "java.util.List", "org.apache.commons.collections4.MapUtils", "org.elasticsearch.common.collect.Lists" ]
import java.util.Comparator; import java.util.List; import org.apache.commons.collections4.MapUtils; import org.elasticsearch.common.collect.Lists;
import java.util.*; import org.apache.commons.collections4.*; import org.elasticsearch.common.collect.*;
[ "java.util", "org.apache.commons", "org.elasticsearch.common" ]
java.util; org.apache.commons; org.elasticsearch.common;
1,963,791
void getDescendantRect(View descendant, Rect out) { ViewGroupUtils.getDescendantRect(this, descendant, out); }
void getDescendantRect(View descendant, Rect out) { ViewGroupUtils.getDescendantRect(this, descendant, out); }
/** * Retrieve the transformed bounding rect of an arbitrary descendant view. * This does not need to be a direct child. * * @param descendant descendant view to reference * @param out rect to set to the bounds of the descendant view */
Retrieve the transformed bounding rect of an arbitrary descendant view. This does not need to be a direct child
getDescendantRect
{ "repo_name": "mobvoi/ticdesign", "path": "ticDesign/src/main/java/ticwear/design/widget/CoordinatorLayout.java", "license": "apache-2.0", "size": 129547 }
[ "android.graphics.Rect", "android.view.View" ]
import android.graphics.Rect; import android.view.View;
import android.graphics.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
1,121,784
private void downloadScript(ScriptActivityParam param) { FileChooser chooser = new FileChooser(view, FileChooser.SAVE, "Download", "Select where to download the file.", null, true); IconManager icons = IconManager.getInstance(); chooser.setTitleIcon(icons.getIcon(IconManager.DOWNLOAD_48)); chooser...
void function(ScriptActivityParam param) { FileChooser chooser = new FileChooser(view, FileChooser.SAVE, STR, STR, null, true); IconManager icons = IconManager.getInstance(); chooser.setTitleIcon(icons.getIcon(IconManager.DOWNLOAD_48)); chooser.setSelectedFileFull(param.getScript().getName()); chooser.setApproveButtonT...
/** * Downloads the possible script. * * @param param The parameter holding the script. */
Downloads the possible script
downloadScript
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerControl.java", "license": "gpl-2.0", "size": 59385 }
[ "java.beans.PropertyChangeListener", "org.openmicroscopy.shoola.agents.treeviewer.IconManager", "org.openmicroscopy.shoola.env.data.model.ScriptActivityParam", "org.openmicroscopy.shoola.util.ui.filechooser.FileChooser" ]
import java.beans.PropertyChangeListener; import org.openmicroscopy.shoola.agents.treeviewer.IconManager; import org.openmicroscopy.shoola.env.data.model.ScriptActivityParam; import org.openmicroscopy.shoola.util.ui.filechooser.FileChooser;
import java.beans.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.util.ui.filechooser.*;
[ "java.beans", "org.openmicroscopy.shoola" ]
java.beans; org.openmicroscopy.shoola;
7,408
private void handleInitContainerResources( ContainerLocalizationRequestEvent rsrcReqs) { Container c = rsrcReqs.getContainer(); // create a loading cache for the file statuses LoadingCache<Path,Future<FileStatus>> statCache = CacheBuilder.newBuilder().build(FSDownload.createStatusCacheLoader...
void function( ContainerLocalizationRequestEvent rsrcReqs) { Container c = rsrcReqs.getContainer(); LoadingCache<Path,Future<FileStatus>> statCache = CacheBuilder.newBuilder().build(FSDownload.createStatusCacheLoader(getConfig())); LocalizerContext ctxt = new LocalizerContext( c.getUser(), c.getContainerId(), c.getCred...
/** * For each of the requested resources for a container, determines the * appropriate {@link LocalResourcesTracker} and forwards a * {@link LocalResourceRequest} to that tracker. */
For each of the requested resources for a container, determines the appropriate <code>LocalResourcesTracker</code> and forwards a <code>LocalResourceRequest</code> to that tracker
handleInitContainerResources
{ "repo_name": "bruthe/hadoop-2.6.0r", "path": "src/yarn/server/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ResourceLocalizationService.java", "license": "apache-2.0", "size": 57089 }
[ "com.google.common.cache.CacheBuilder", "com.google.common.cache.LoadingCache", "java.util.Collection", "java.util.Map", "java.util.concurrent.Future", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path", "org.apache.hadoop.yarn.api.records.LocalResourceVisibility", "org.apache.hadoop.yar...
import com.google.common.cache.CacheBuilder; import com.google.common.cache.LoadingCache; import java.util.Collection; import java.util.Map; import java.util.concurrent.Future; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.yarn.api.records.LocalResourceVisibility; im...
import com.google.common.cache.*; import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.even...
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
2,346,768
public AnimalTamer getOwner() { return owner; }
AnimalTamer function() { return owner; }
/** * Gets the owning AnimalTamer * * @return the owning AnimalTamer */
Gets the owning AnimalTamer
getOwner
{ "repo_name": "Dinnerbone/Bukkit-1", "path": "src/main/java/org/bukkit/event/entity/EntityTameEvent.java", "license": "gpl-3.0", "size": 806 }
[ "org.bukkit.entity.AnimalTamer" ]
import org.bukkit.entity.AnimalTamer;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
1,860,128
public ShardsAcknowledgedResponse freeze(FreezeIndexRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, IndicesRequestConverters::freezeIndex, options, ShardsAcknowledgedResponse::fromXContent, emptySet()); }
ShardsAcknowledgedResponse function(FreezeIndexRequest request, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(request, IndicesRequestConverters::freezeIndex, options, ShardsAcknowledgedResponse::fromXContent, emptySet()); }
/** * Synchronously calls the _freeze API * * @param request the request * @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized */
Synchronously calls the _freeze API
freeze
{ "repo_name": "ern/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java", "license": "apache-2.0", "size": 87672 }
[ "java.io.IOException", "java.util.Collections", "org.elasticsearch.client.core.ShardsAcknowledgedResponse", "org.elasticsearch.client.indices.FreezeIndexRequest" ]
import java.io.IOException; import java.util.Collections; import org.elasticsearch.client.core.ShardsAcknowledgedResponse; import org.elasticsearch.client.indices.FreezeIndexRequest;
import java.io.*; import java.util.*; import org.elasticsearch.client.core.*; import org.elasticsearch.client.indices.*;
[ "java.io", "java.util", "org.elasticsearch.client" ]
java.io; java.util; org.elasticsearch.client;
2,742,436
public native final void setTarget(Element targetElement);
native final void function(Element targetElement);
/** * The container for the map. If not specified at construction time, ol.Map#setTarget must be called for the map to * be rendered. */
The container for the map. If not specified at construction time, ol.Map#setTarget must be called for the map to be rendered
setTarget
{ "repo_name": "grandeemme/v-ol3", "path": "gwt-ol3/src/main/java/org/vaadin/gwtol3/client/MapOptions.java", "license": "apache-2.0", "size": 3667 }
[ "com.google.gwt.dom.client.Element" ]
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,812,823
public void testMaxActivePerKeyExceeded() { WaiterFactory factory = new WaiterFactory(0, 20, 0, 0, 0, 0, 8, 5, 0); pool = new GenericKeyedObjectPool(factory); pool.setMaxActive(5); pool.setMaxTotal(8); pool.setTestOnBorrow(true); pool.setMaxIdle(5); pool.setMa...
void function() { WaiterFactory factory = new WaiterFactory(0, 20, 0, 0, 0, 0, 8, 5, 0); pool = new GenericKeyedObjectPool(factory); pool.setMaxActive(5); pool.setMaxTotal(8); pool.setTestOnBorrow(true); pool.setMaxIdle(5); pool.setMaxWait(-1); runTestThreads(20, 300, 250); }
/** * Test case for POOL-180. */
Test case for POOL-180
testMaxActivePerKeyExceeded
{ "repo_name": "xiaolds/tomcat7", "path": "tomcat-build-libs/commons-pool-1.5.7-src/src/test/org/apache/commons/pool/impl/TestGenericKeyedObjectPool.java", "license": "apache-2.0", "size": 72353 }
[ "org.apache.commons.pool.WaiterFactory" ]
import org.apache.commons.pool.WaiterFactory;
import org.apache.commons.pool.*;
[ "org.apache.commons" ]
org.apache.commons;
437,639
@VisibleForTesting public static void cleanInbox(String dirLoc, int seconds) { final long now = Time.currentTimeMillis(); final long ms = Time.secsToMillis(seconds); File dir = new File(dirLoc); for (File f : dir.listFiles((f) -> f.isFile() && ((f.lastModified() + ms) <= now))) {...
static void function(String dirLoc, int seconds) { final long now = Time.currentTimeMillis(); final long ms = Time.secsToMillis(seconds); File dir = new File(dirLoc); for (File f : dir.listFiles((f) -> f.isFile() && ((f.lastModified() + ms) <= now))) { if (f.delete()) { LOG.info(STR, f.getName()); } else { LOG.error(ST...
/** * Deletes jar files in dirLoc older than seconds. * @param dirLoc the location to look in for file * @param seconds how old is too old and should be deleted */
Deletes jar files in dirLoc older than seconds
cleanInbox
{ "repo_name": "0x726d77/storm", "path": "storm-server/src/main/java/org/apache/storm/daemon/nimbus/Nimbus.java", "license": "apache-2.0", "size": 205146 }
[ "java.io.File", "org.apache.storm.utils.Time" ]
import java.io.File; import org.apache.storm.utils.Time;
import java.io.*; import org.apache.storm.utils.*;
[ "java.io", "org.apache.storm" ]
java.io; org.apache.storm;
429,553
if (!config.has("engine")) { throw new RuntimeException("No configuration present for engine"); } JSONObject engineConfig = config.getJSONObject("engine"); prepareEngine(engineConfig); if (!config.has("bots")) { throw new RuntimeException("No bots found ...
if (!config.has(STR)) { throw new RuntimeException(STR); } JSONObject engineConfig = config.getJSONObject(STR); prepareEngine(engineConfig); if (!config.has("bots")) { throw new RuntimeException(STR); } JSONArray bots = config.getJSONArray("bots"); try { bots.forEach(botConfig -> this.prepareBot((JSONObject) botConfig)...
/** * Config looks as follows: * { * engine: { * command: String, * configuration: { * * } * }, * bots: [ * { * command: String * } * ] * } * @param config Matchrunner configura...
Config looks as follows: { engine: { command: String, configuration: { } }, bots: [ { command: String } ] }
prepare
{ "repo_name": "riddlesio/match-wrapper", "path": "src/main/java/io/riddles/matchwrapper/runner/MatchRunner.java", "license": "apache-2.0", "size": 7394 }
[ "org.json.JSONArray", "org.json.JSONObject" ]
import org.json.JSONArray; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
2,901,111
static void validate(final Transformer<?, ?>... transformers) { if (transformers == null) { throw new IllegalArgumentException("The transformer array must not be null"); } for (int i = 0; i < transformers.length; i++) { if (transformers[i] == null) { t...
static void validate(final Transformer<?, ?>... transformers) { if (transformers == null) { throw new IllegalArgumentException(STR); } for (int i = 0; i < transformers.length; i++) { if (transformers[i] == null) { throw new IllegalArgumentException( STR + i + STR); } } }
/** * Validate method * * @param transformers the transformers to validate */
Validate method
validate
{ "repo_name": "krivachy/compgs03_mutation_testing", "path": "src/main/java/org/apache/commons/collections4/functors/FunctorUtils.java", "license": "apache-2.0", "size": 7290 }
[ "org.apache.commons.collections4.Transformer" ]
import org.apache.commons.collections4.Transformer;
import org.apache.commons.collections4.*;
[ "org.apache.commons" ]
org.apache.commons;
2,483,382
public StorePtConsentResponseType storePtConsent(StorePtConsentRequestType request, AssertionType assertion) { LOG.trace("Begin AdapterPIPProxyOptInNoOpImpl.storePtConsent"); StorePtConsentResponseType oResponse = new StorePtConsentResponseType(); oResponse.setStatus("SUCCESS"); LOG....
StorePtConsentResponseType function(StorePtConsentRequestType request, AssertionType assertion) { LOG.trace(STR); StorePtConsentResponseType oResponse = new StorePtConsentResponseType(); oResponse.setStatus(STR); LOG.trace(STR); return oResponse; }
/** * NOOP implememtation of the storePtConsent operation. This does nothing but still returns "SUCCESS". * * @param request Patient consent preferenes to be stored. * @return Always returns "SUCCESS". */
NOOP implememtation of the storePtConsent operation. This does nothing but still returns "SUCCESS"
storePtConsent
{ "repo_name": "beiyuxinke/CONNECT", "path": "Product/Production/Services/PolicyEngineCore/src/main/java/gov/hhs/fha/nhinc/policyengine/adapter/pip/proxy/AdapterPIPProxyOptInNoOpImpl.java", "license": "bsd-3-clause", "size": 5779 }
[ "gov.hhs.fha.nhinc.common.nhinccommon.AssertionType", "gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentRequestType", "gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentResponseType" ]
import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType; import gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentRequestType; import gov.hhs.fha.nhinc.common.nhinccommonadapter.StorePtConsentResponseType;
import gov.hhs.fha.nhinc.common.nhinccommon.*; import gov.hhs.fha.nhinc.common.nhinccommonadapter.*;
[ "gov.hhs.fha" ]
gov.hhs.fha;
1,215,050
public static int countSubscribedToChannelWithoutOrg(Long orgId, Long cid) { SelectMode m = ModeFactory.getMode("System_queries", "count_systems_subscribed_to_channel_not_in_org"); Map<String, Object> params = new HashMap<String, Object>(); params.put("org_id", orgId); ...
static int function(Long orgId, Long cid) { SelectMode m = ModeFactory.getMode(STR, STR); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, orgId); params.put("cid", cid); DataResult<Map<String, Object>> dr = m.execute(params); Map<String, Object> result = dr.get(0); Long count = (Long) result...
/** * Returns the number of systems subscribed to the channel that are * <strong>not</strong> in the given org. * * @param orgId identifies the filter org * @param cid identifies the channel * @return count of systems */
Returns the number of systems subscribed to the channel that are not in the given org
countSubscribedToChannelWithoutOrg
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java", "license": "gpl-2.0", "size": 134651 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
1,043,675
private static byte[] convertASN1toXMLDSIG(byte asn1Bytes[]) throws IOException { byte rLength = asn1Bytes[3]; int i; for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--); byte sLength = asn1Bytes[5 + rLength]; int j; for (j = sLength; ...
static byte[] function(byte asn1Bytes[]) throws IOException { byte rLength = asn1Bytes[3]; int i; for (i = rLength; (i > 0) && (asn1Bytes[(4 + rLength) - i] == 0); i--); byte sLength = asn1Bytes[5 + rLength]; int j; for (j = sLength; (j > 0) && (asn1Bytes[(6 + rLength + sLength) - j] == 0); j--); if ((asn1Bytes[0] != 4...
/** * Converts an ASN.1 DSA value to a XML Signature DSA Value. * * The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value * pairs; the XML Signature requires the core BigInteger values. * * @param asn1Bytes * @return the decode bytes * * @throws IOException * @se...
Converts an ASN.1 DSA value to a XML Signature DSA Value. The JAVA JCE DSA Signature algorithm creates ASN.1 encoded (r,s) value pairs; the XML Signature requires the core BigInteger values
convertASN1toXMLDSIG
{ "repo_name": "test2v/DanDelXAdES", "path": "proj/xml-security-src-1_3_0/xml-security-1_3_0/src/org/apache/xml/security/algorithms/implementations/SignatureDSA.java", "license": "lgpl-3.0", "size": 10744 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,497,926
public IDataset getTop_up();
IDataset function();
/** * Is the synchrotron operating in top_up mode? * <p> * <b>Type:</b> NX_BOOLEAN * </p> * * @return the value. */
Is the synchrotron operating in top_up mode? Type: NX_BOOLEAN
getTop_up
{ "repo_name": "willrogers/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXsource.java", "license": "epl-1.0", "size": 7211 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
2,324,989
public Class<? extends UserdataMapper> bindTypeUserdataMapper() { return UserdataMapper.class; }
Class<? extends UserdataMapper> function() { return UserdataMapper.class; }
/** * Required for serializing/deserializing type instances in order to save them to the user data field of * EObjectDescriptions * * @return Class<{@link UserdataMapper}> */
Required for serializing/deserializing type instances in order to save them to the user data field of EObjectDescriptions
bindTypeUserdataMapper
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js/src/org/eclipse/n4js/N4JSRuntimeModule.java", "license": "epl-1.0", "size": 19500 }
[ "org.eclipse.n4js.resource.UserdataMapper" ]
import org.eclipse.n4js.resource.UserdataMapper;
import org.eclipse.n4js.resource.*;
[ "org.eclipse.n4js" ]
org.eclipse.n4js;
2,498,877
public static <T extends FightParticipant> FightParticipant merge(List<T> list) { return merge(list, null, null); }
static <T extends FightParticipant> FightParticipant function(List<T> list) { return merge(list, null, null); }
/** * Merge participants. The GUID is set to "" if there are 2 or more to merge. * The name is set to "Merged participants" if 2 or more to merge. * The flags are merged at a bit level with & to retain flags that are equal for all participants. * @param list The participants to merge * @return...
Merge participants. The GUID is set to "" if there are 2 or more to merge. The name is set to "Merged participants" if 2 or more to merge. The flags are merged at a bit level with & to retain flags that are equal for all participants
merge
{ "repo_name": "setjmp2013/WowLogParser", "path": "src/wowlogparserbase/FightParticipant.java", "license": "gpl-2.0", "size": 40432 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
463,578
protected static SummaryData getSummaryData() { SummaryData entity = new SummaryData(); entity.setTotalPaymentsRequired(BigDecimal.ONE); entity.setTotalInitialInterest(BigDecimal.ONE); entity.setTotalPaymentsApplied(BigDecimal.ONE); entity.setTotalBalance(BigDecimal.ONE); ...
static SummaryData function() { SummaryData entity = new SummaryData(); entity.setTotalPaymentsRequired(BigDecimal.ONE); entity.setTotalInitialInterest(BigDecimal.ONE); entity.setTotalPaymentsApplied(BigDecimal.ONE); entity.setTotalBalance(BigDecimal.ONE); return entity; }
/** * Creates an instance of SummaryData. * * @return the SummaryData instance. */
Creates an instance of SummaryData
getSummaryData
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/BasePersistenceTests.java", "license": "apache-2.0", "size": 58033 }
[ "gov.opm.scrd.entities.application.SummaryData", "java.math.BigDecimal" ]
import gov.opm.scrd.entities.application.SummaryData; import java.math.BigDecimal;
import gov.opm.scrd.entities.application.*; import java.math.*;
[ "gov.opm.scrd", "java.math" ]
gov.opm.scrd; java.math;
800,998
public void refresh(Collection<ImageDisplay> nodes, List<ImageDisplay> selected) { rootDisplay.removeAllChildrenDisplay(); if (nodes == null) return; Iterator<ImageDisplay> i = nodes.iterator(); while (i.hasNext()) rootDisplay.addChildDisplay(i.next()); if (selected == null) return; boolean b = ...
void function(Collection<ImageDisplay> nodes, List<ImageDisplay> selected) { rootDisplay.removeAllChildrenDisplay(); if (nodes == null) return; Iterator<ImageDisplay> i = nodes.iterator(); while (i.hasNext()) rootDisplay.addChildDisplay(i.next()); if (selected == null) return; boolean b = selected.size() > 1; i = selec...
/** * Implemented as specified by the {@link Browser} interface. * @see Browser#refresh(Collection, List) */
Implemented as specified by the <code>Browser</code> interface
refresh
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/browser/BrowserModel.java", "license": "gpl-2.0", "size": 24111 }
[ "java.util.Collection", "java.util.Iterator", "java.util.List" ]
import java.util.Collection; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,023,626
@Nullable PsiClass resolveReferencedClass(@NotNull String referenceText, PsiElement context);
PsiClass resolveReferencedClass(@NotNull String referenceText, PsiElement context);
/** * Resolves a reference to a class, given the text of the reference and the context * in which it was encountered. * * @param referenceText the text of the reference. * @param context the context in which the reference is found. * @return the resolve result, or null if the resolve was not suc...
Resolves a reference to a class, given the text of the reference and the context in which it was encountered
resolveReferencedClass
{ "repo_name": "Soya93/Extract-Refactoring", "path": "java/java-psi-api/src/com/intellij/psi/PsiResolveHelper.java", "license": "apache-2.0", "size": 8176 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
681,774
public static File docsDir() { lock.readLock().lock(); try { return docs_dir; } finally { lock.readLock().unlock(); } }
static File function() { lock.readLock().lock(); try { return docs_dir; } finally { lock.readLock().unlock(); } }
/** * Return the configured documentation directory. * * @return {@link File} containing the path to the documentation directory. */
Return the configured documentation directory
docsDir
{ "repo_name": "LordHeldchen/SpaceBattleSimulation", "path": "Battleships/src/main/java/de/rauwolf/gaming/battleships/gui/blueprintDisplay/Configuration.java", "license": "gpl-3.0", "size": 15363 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
288,338
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, String liveEventName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, liveEventName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String accountName, String liveEventName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, liveEventName), serviceCallback); }
/** * Delete Live Event. * Deletes a Live Event. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param liveEventName The name of the Live Event. * @param serviceCallback the async Servi...
Delete Live Event. Deletes a Live Event
deleteAsync
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/implementation/LiveEventsInner.java", "license": "mit", "size": 111938 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
87,314
private PackageRef createPackageRefFromHandle(String handle) { PackageRef packageRef = Mif2Factory.eINSTANCE.createPackageRef(); final int ROOTSEGMENT = 0; final int REALMSEGMENT = 1; final int ARTIFACTSEGMENT = 2; final int VERSIONSEGMENT = 3; // TODO - Hard coded - need to set up datatype lib...
PackageRef function(String handle) { PackageRef packageRef = Mif2Factory.eINSTANCE.createPackageRef(); final int ROOTSEGMENT = 0; final int REALMSEGMENT = 1; final int ARTIFACTSEGMENT = 2; final int VERSIONSEGMENT = 3; String[] handleSegments = handle.split("="); if (handleSegments.length == 4) { if (PackageRootKind.ge...
/** * createPackageRefFromHandle is based on HL7 file naming convention of * "root=realm=artifact=version" The assumption here is this will not change * but there are no guarantees. The method splits the handle on "=" and * populates the PackageRef accordingly * * @param handle * @return */
createPackageRefFromHandle is based on HL7 file naming convention of "root=realm=artifact=version" The assumption here is this will not change but there are no guarantees. The method splits the handle on "=" and populates the PackageRef accordingly
createPackageRefFromHandle
{ "repo_name": "drbgfc/mdht", "path": "hl7/plugins/org.openhealthtools.mdht.uml.hl7.mif2uml/src/org/openhealthtools/mdht/uml/hl7/mif2uml/internal/exporter/UMLProcessor.java", "license": "epl-1.0", "size": 39086 }
[ "org.openhealthtools.mdht.emf.hl7.mif2.ArtifactKind", "org.openhealthtools.mdht.emf.hl7.mif2.Mif2Factory", "org.openhealthtools.mdht.emf.hl7.mif2.PackageRef", "org.openhealthtools.mdht.emf.hl7.mif2.PackageRootKind" ]
import org.openhealthtools.mdht.emf.hl7.mif2.ArtifactKind; import org.openhealthtools.mdht.emf.hl7.mif2.Mif2Factory; import org.openhealthtools.mdht.emf.hl7.mif2.PackageRef; import org.openhealthtools.mdht.emf.hl7.mif2.PackageRootKind;
import org.openhealthtools.mdht.emf.hl7.mif2.*;
[ "org.openhealthtools.mdht" ]
org.openhealthtools.mdht;
2,639,653
public void addMeToPropertyChangeListeners(AEFileInputStreamInterface is) { // is.getSupport().addPropertyChangeListener(AEInputStream.EVENT_MARK_IN_SET, this); // is.getSupport().addPropertyChangeListener(AEInputStream.EVENT_MARK_OUT_SET, this); // is.getSupport().addPropertyChangeListener(AEI...
void function(AEFileInputStreamInterface is) { is.getSupport().addPropertyChangeListener(this); }
/** * Use this method to add this to the AEFileInputStream listener list for * position updates. * * @param is the input stream. */
Use this method to add this to the AEFileInputStream listener list for position updates
addMeToPropertyChangeListeners
{ "repo_name": "SensorsINI/jaer", "path": "src/net/sf/jaer/graphics/AePlayerAdvancedControlsPanel.java", "license": "lgpl-2.1", "size": 37472 }
[ "net.sf.jaer.eventio.AEFileInputStreamInterface" ]
import net.sf.jaer.eventio.AEFileInputStreamInterface;
import net.sf.jaer.eventio.*;
[ "net.sf.jaer" ]
net.sf.jaer;
2,541,050
public void setRules(Templates rules) { this.rules = rules; }
void function(Templates rules) { this.rules = rules; }
/** * To use the given schematron rules instead of loading from the path */
To use the given schematron rules instead of loading from the path
setRules
{ "repo_name": "neoramon/camel", "path": "components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java", "license": "apache-2.0", "size": 6641 }
[ "javax.xml.transform.Templates" ]
import javax.xml.transform.Templates;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
2,269,943
public String getActionType() { return LocalizationService.getInstance(). getMessage(action.getActionType().getLabel()); }
String function() { return LocalizationService.getInstance(). getMessage(action.getActionType().getLabel()); }
/** * Get the Action Type * @return String of the ActionType */
Get the Action Type
getActionType
{ "repo_name": "moio/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/action/ActionFormatter.java", "license": "gpl-2.0", "size": 6690 }
[ "com.redhat.rhn.common.localization.LocalizationService" ]
import com.redhat.rhn.common.localization.LocalizationService;
import com.redhat.rhn.common.localization.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
480,295
public void initConfiguration() throws CmsConfigurationException { if ((!TYPE_INCLUDE.equals(m_type)) && (!TYPE_EXCLUDE.equals(m_type))) { throw new CmsConfigurationException(Messages.get().container(Messages.ERR_INVALID_FILTER_TYPE_1, m_type)); } if (CmsLog.INIT.isInfoEn...
void function() throws CmsConfigurationException { if ((!TYPE_INCLUDE.equals(m_type)) && (!TYPE_EXCLUDE.equals(m_type))) { throw new CmsConfigurationException(Messages.get().container(Messages.ERR_INVALID_FILTER_TYPE_1, m_type)); } if (CmsLog.INIT.isInfoEnabled()) { Iterator iter = m_filterRules.iterator(); while (iter...
/** * Initializes a configuration after all parameters have been added.<p> * * @throws CmsConfigurationException if something goes wrong */
Initializes a configuration after all parameters have been added
initConfiguration
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/repository/CmsRepositoryFilter.java", "license": "lgpl-2.1", "size": 5814 }
[ "java.util.Collections", "java.util.Iterator", "java.util.regex.Pattern", "org.opencms.configuration.CmsConfigurationException", "org.opencms.main.CmsLog" ]
import java.util.Collections; import java.util.Iterator; import java.util.regex.Pattern; import org.opencms.configuration.CmsConfigurationException; import org.opencms.main.CmsLog;
import java.util.*; import java.util.regex.*; import org.opencms.configuration.*; import org.opencms.main.*;
[ "java.util", "org.opencms.configuration", "org.opencms.main" ]
java.util; org.opencms.configuration; org.opencms.main;
2,194,101
public static Object readYamlConfigFile(Path file) throws IdentityException { try (InputStreamReader inputStreamReader = new InputStreamReader(Files.newInputStream(file), StandardCharsets.UTF_8)) { Yaml yaml = new Yaml(); return yaml.load(inputStreamReader); ...
static Object function(Path file) throws IdentityException { try (InputStreamReader inputStreamReader = new InputStreamReader(Files.newInputStream(file), StandardCharsets.UTF_8)) { Yaml yaml = new Yaml(); return yaml.load(inputStreamReader); } catch (IOException e) { throw new IdentityException(String.format(STR, file....
/** * Reads a YAML file and returns the content. * * @param file Path to the YAML file. * @return Content of the YAML file. * @throws IdentityException If error occurred while reading the file. */
Reads a YAML file and returns the content
readYamlConfigFile
{ "repo_name": "omindu/carbon-identity-commons", "path": "components/org.wso2.carbon.identity.common/src/main/java/org/wso2/carbon/identity/common/util/config/IdentityConfigUtils.java", "license": "apache-2.0", "size": 3981 }
[ "java.io.IOException", "java.io.InputStreamReader", "java.nio.charset.StandardCharsets", "java.nio.file.Files", "java.nio.file.Path", "org.wso2.carbon.identity.common.base.exception.IdentityException", "org.yaml.snakeyaml.Yaml" ]
import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import org.wso2.carbon.identity.common.base.exception.IdentityException; import org.yaml.snakeyaml.Yaml;
import java.io.*; import java.nio.charset.*; import java.nio.file.*; import org.wso2.carbon.identity.common.base.exception.*; import org.yaml.snakeyaml.*;
[ "java.io", "java.nio", "org.wso2.carbon", "org.yaml.snakeyaml" ]
java.io; java.nio; org.wso2.carbon; org.yaml.snakeyaml;
1,130,693
protected int getExperiencePoints(EntityPlayer p_70693_1_) { return 0; }
int function(EntityPlayer p_70693_1_) { return 0; }
/** * Get the experience points the entity currently has. */
Get the experience points the entity currently has
getExperiencePoints
{ "repo_name": "mviitanen/marsmod", "path": "mcp/src/minecraft/net/minecraft/entity/EntityLivingBase.java", "license": "gpl-2.0", "size": 72968 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
919,335
public synchronized InMemoryObjectEntry getShallowCopy( String bucketName, String objectName) throws IOException { if (!isCompleted()) { throw new IOException("Cannot getShallowCopy() before the writeChannel has been closed!"); } InMemoryObjectEntry copy = new InMemoryObjectEntry(); copy.c...
synchronized InMemoryObjectEntry function( String bucketName, String objectName) throws IOException { if (!isCompleted()) { throw new IOException(STR); } InMemoryObjectEntry copy = new InMemoryObjectEntry(); copy.completedContents = completedContents; copy.writeStream = writeStream; copy.writeChannel = writeChannel; co...
/** * Returns a copy of this InMemoryObjectEntry which shares the underlying completedContents data; * it is illegal to call this method if the write channel has not yet been closed. */
Returns a copy of this InMemoryObjectEntry which shares the underlying completedContents data; it is illegal to call this method if the write channel has not yet been closed
getShallowCopy
{ "repo_name": "ravwojdyla/bigdata-interop", "path": "gcs/src/test/java/com/google/cloud/hadoop/gcsio/InMemoryObjectEntry.java", "license": "apache-2.0", "size": 9123 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,086,291
//----------------------------------------------------------------------- public DiscountFactors getDiscountFactors() { return discountFactors; }
DiscountFactors function() { return discountFactors; }
/** * Gets the underlying discount factors for a single currency. * <p> * This contains curve, curve currency, valuation date and day count convention. * The discount factor, its point sensitivity and curve sensitivity are computed by this {@code DiscountFactors}. * @return the value of the property, not...
Gets the underlying discount factors for a single currency. This contains curve, curve currency, valuation date and day count convention. The discount factor, its point sensitivity and curve sensitivity are computed by this DiscountFactors
getDiscountFactors
{ "repo_name": "jmptrader/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/bond/RepoCurveDiscountFactors.java", "license": "apache-2.0", "size": 15019 }
[ "com.opengamma.strata.pricer.DiscountFactors" ]
import com.opengamma.strata.pricer.DiscountFactors;
import com.opengamma.strata.pricer.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
295,448
private void initialize(String string) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); GridBagLayout grigbug=new GridBagLayout(); //this.setSize(600, 100); this.setLayout(grigbug); // ƒ‰ƒxƒ‹ jlabel=new JLabel(string+": "); jlabel.setHorizontalTextPosition(SwingConstants.LEFT); ...
void function(String string) { GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); GridBagLayout grigbug=new GridBagLayout(); this.setLayout(grigbug); jlabel=new JLabel(string+STR); jlabel.setHorizontalTextPosition(SwingConstants.LEFT); Font font = new Font("Arial", Font.BOLD, 16); jlabel.setFont(font); ...
/** * This method initializes this * * @return void */
This method initializes this
initialize
{ "repo_name": "itplanter/itpManager2", "path": "src/RoundLabelTextPane.java", "license": "gpl-2.0", "size": 3959 }
[ "java.awt.Color", "java.awt.ComponentOrientation", "java.awt.Dimension", "java.awt.Font", "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "java.util.Observer", "javax.swing.JLabel", "javax.swing.JTextField", "javax.swing.SwingConstants" ]
import java.awt.Color; import java.awt.ComponentOrientation; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.util.Observer; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.SwingConstants;
import java.awt.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
763,767
public MetaClass getEffectiveMetaClass(Class originalClass) { return metadata.getSession().getClassNN(getEffectiveClass(originalClass)); }
MetaClass function(Class originalClass) { return metadata.getSession().getClassNN(getEffectiveClass(originalClass)); }
/** * Searches for an extended entity and returns it if found, otherwise returns the original entity. * * @param originalClass original entity * @return extended or original entity */
Searches for an extended entity and returns it if found, otherwise returns the original entity
getEffectiveMetaClass
{ "repo_name": "cuba-platform/cuba", "path": "modules/global/src/com/haulmont/cuba/core/global/ExtendedEntities.java", "license": "apache-2.0", "size": 6431 }
[ "com.haulmont.chile.core.model.MetaClass" ]
import com.haulmont.chile.core.model.MetaClass;
import com.haulmont.chile.core.model.*;
[ "com.haulmont.chile" ]
com.haulmont.chile;
2,685,168
public Observable<ServiceResponse<Page<RouteTableInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<RouteTableInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Gets all route tables in a resource group. * ServiceResponse<PageImpl<RouteTableInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;RouteTableI...
Gets all route tables in a resource group
listByResourceGroupNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/RouteTablesInner.java", "license": "mit", "size": 67373 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
560,157
private String getProGuardName(IMethodBinding method) { if (!method.isConstructor() || !method.getDeclaringClass().isMember()) { return method.getName(); } ITypeBinding parent = method.getDeclaringClass(); assert parent != null; List<String> components = Lists.newLinkedList(); // LinkedList ...
String function(IMethodBinding method) { if (!method.isConstructor() !method.getDeclaringClass().isMember()) { return method.getName(); } ITypeBinding parent = method.getDeclaringClass(); assert parent != null; List<String> components = Lists.newLinkedList(); do { components.add(0, parent.getName()); parent = parent.ge...
/** * Get the ProGuard name of a method. * For non-constructors this is the method's name. * For constructors of top-level classes, this is the name of the class. * For constructors of inner classes, this is the $-delimited name path * from the outermost class declaration to the inner class declaration. ...
Get the ProGuard name of a method. For non-constructors this is the method's name. For constructors of top-level classes, this is the name of the class. For constructors of inner classes, this is the $-delimited name path from the outermost class declaration to the inner class declaration
getProGuardName
{ "repo_name": "Buggaboo/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java", "license": "apache-2.0", "size": 8219 }
[ "com.google.common.collect.Lists", "java.util.List", "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.ITypeBinding" ]
import com.google.common.collect.Lists; import java.util.List; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding;
import com.google.common.collect.*; import java.util.*; import org.eclipse.jdt.core.dom.*;
[ "com.google.common", "java.util", "org.eclipse.jdt" ]
com.google.common; java.util; org.eclipse.jdt;
521,263
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11") public long getRet() { return ret; }
@Generated(value = STR, date = STR, comments = STR) long function() { return ret; }
/** * Gets the value of the ret property. * */
Gets the value of the ret property
getRet
{ "repo_name": "kanonirov/lanb-client", "path": "src/main/java/ru/lanbilling/webservice/wsdl/StopUsboxServiceResponse.java", "license": "mit", "size": 1723 }
[ "javax.annotation.Generated" ]
import javax.annotation.Generated;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
651,328
@NotNull public static String getLanguageName(Language lang) { final LanguageCodeStyleSettingsProvider provider = forLanguage(lang); String providerLangName = provider != null ? provider.getLanguageName() : null; return providerLangName != null ? providerLangName : lang.getDisplayName(); }
static String function(Language lang) { final LanguageCodeStyleSettingsProvider provider = forLanguage(lang); String providerLangName = provider != null ? provider.getLanguageName() : null; return providerLangName != null ? providerLangName : lang.getDisplayName(); }
/** * Returns a language name to be shown in UI. Used to overwrite language's display name by another name to * be shown in UI. * * @param lang The language whose display name must be return. * @return Alternative UI name defined by provider.getLanguageName() method or (if the method returns null) * ...
Returns a language name to be shown in UI. Used to overwrite language's display name by another name to be shown in UI
getLanguageName
{ "repo_name": "mdanielwork/intellij-community", "path": "platform/lang-api/src/com/intellij/psi/codeStyle/LanguageCodeStyleSettingsProvider.java", "license": "apache-2.0", "size": 14267 }
[ "com.intellij.lang.Language" ]
import com.intellij.lang.Language;
import com.intellij.lang.*;
[ "com.intellij.lang" ]
com.intellij.lang;
970,313
private String searchXmlFile() { File selectedFile = null; contractFileLoadPathChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); contractFileLoadPathChooser.setAcceptAllFileFilterUsed(false);
String function() { File selectedFile = null; contractFileLoadPathChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); contractFileLoadPathChooser.setAcceptAllFileFilterUsed(false);
/** * Shows a file dialog that lets the user choose a certain xml file * * @return The path to the xml file chosen by the user */
Shows a file dialog that lets the user choose a certain xml file
searchXmlFile
{ "repo_name": "da-nrw/DNSCore", "path": "SIP-Builder/src/main/java/de/uzk/hki/da/gui/Gui.java", "license": "gpl-3.0", "size": 182921 }
[ "java.io.File", "javax.swing.JFileChooser" ]
import java.io.File; import javax.swing.JFileChooser;
import java.io.*; import javax.swing.*;
[ "java.io", "javax.swing" ]
java.io; javax.swing;
1,132,854
public static void update() { try { switch(getVersion()){ //This falls through intentionally since ALL updates since the version have to be applied. case 2: //Version 0.2 -> 0.3 query("INSERT INTO `settings` VALUES('notify_updates','1')"); query("ALTER TABLE `uploads` ADD COLUMN 'm...
static void function() { try { switch(getVersion()){ case 2: query(STR); query(STR); case 3: query(STR); query(STR); query(STR); query(STR); case 4: query(STR); case 5: query(STR); query(STR); case 6: case 7: case 8: query(STR); case 9: query(STR); query(STR); default: setVersion(Main.getDBVersion()); break; } } catch ...
/** * This method applies all required updates to the Database if necessary * */
This method applies all required updates to the Database if necessary
update
{ "repo_name": "Meduax/YouPloader", "path": "src/main/java/at/becast/youploader/database/SQLite.java", "license": "mit", "size": 18018 }
[ "at.becast.youploader.Main", "java.sql.SQLException" ]
import at.becast.youploader.Main; import java.sql.SQLException;
import at.becast.youploader.*; import java.sql.*;
[ "at.becast.youploader", "java.sql" ]
at.becast.youploader; java.sql;
2,860,336
public PropertySources getAppliedPropertySources() throws IllegalStateException { Assert.state(this.appliedPropertySources != null, "PropertySources have not get been applied"); return this.appliedPropertySources; }
PropertySources function() throws IllegalStateException { Assert.state(this.appliedPropertySources != null, STR); return this.appliedPropertySources; }
/** * Returns the property sources that were actually applied during * {@link #postProcessBeanFactory(ConfigurableListableBeanFactory) post-processing}. * @return the property sources that were applied * @throws IllegalStateException if the property sources have not yet been applied * @since 4.0 */
Returns the property sources that were actually applied during <code>#postProcessBeanFactory(ConfigurableListableBeanFactory) post-processing</code>
getAppliedPropertySources
{ "repo_name": "shivpun/spring-framework", "path": "spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java", "license": "apache-2.0", "size": 8772 }
[ "org.springframework.core.env.PropertySources", "org.springframework.util.Assert" ]
import org.springframework.core.env.PropertySources; import org.springframework.util.Assert;
import org.springframework.core.env.*; import org.springframework.util.*;
[ "org.springframework.core", "org.springframework.util" ]
org.springframework.core; org.springframework.util;
1,426,486
public Script combineScript() { return combineScript; }
Script function() { return combineScript; }
/** * Get the <tt>combine</tt> script. */
Get the combine script
combineScript
{ "repo_name": "jbertouch/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/metrics/scripted/ScriptedMetricAggregatorBuilder.java", "license": "apache-2.0", "size": 7396 }
[ "org.elasticsearch.script.Script" ]
import org.elasticsearch.script.Script;
import org.elasticsearch.script.*;
[ "org.elasticsearch.script" ]
org.elasticsearch.script;
2,337,457
public String get(AKeySimple attribute) { return getAttribute(attribute).get(); }
String function(AKeySimple attribute) { return getAttribute(attribute).get(); }
/** * Get the value of the specified attribute for the singular group * * @param attribute * @return */
Get the value of the specified attribute for the singular group
get
{ "repo_name": "Subterranean-Security/Crimson", "path": "src/main/java/com/subterranean_security/crimson/sv/profile/Profile.java", "license": "apache-2.0", "size": 8091 }
[ "com.subterranean_security.crimson.core.attribute.keys.singular.AKeySimple" ]
import com.subterranean_security.crimson.core.attribute.keys.singular.AKeySimple;
import com.subterranean_security.crimson.core.attribute.keys.singular.*;
[ "com.subterranean_security.crimson" ]
com.subterranean_security.crimson;
243,545
private JsDocToken parseModifiesTag(JsDocToken token) { if (token == JsDocToken.LEFT_CURLY) { Set<String> modifies = new HashSet<>(); while (true) { if (match(JsDocToken.STRING)) { String name = stream.getString(); if (!modifiesAnnotationKeywords.contains(name) ...
JsDocToken function(JsDocToken token) { if (token == JsDocToken.LEFT_CURLY) { Set<String> modifies = new HashSet<>(); while (true) { if (match(JsDocToken.STRING)) { String name = stream.getString(); if (!modifiesAnnotationKeywords.contains(name) && !jsdocBuilder.hasParameter(name)) { addParserWarning(STR, name); } modi...
/** * Parse a {@code @modifies} tag of the form * {@code @modifies&#123;this|arguments|param&#125;}. * * @param token The current token. */
Parse a @modifies tag of the form @modifies&#123;this|arguments|param&#125;
parseModifiesTag
{ "repo_name": "lgeorgieff/closure-compiler", "path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java", "license": "apache-2.0", "size": 83891 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,893,989
public static SoyType of(SoyType... members) { return of(Arrays.asList(members)); }
static SoyType function(SoyType... members) { return of(Arrays.asList(members)); }
/** * Convenience method for creating unions. * @param members Member types of the union. * @return Union of those types. * If there is exactly one distinct type in members, then this will not be a UnionType. */
Convenience method for creating unions
of
{ "repo_name": "viqueen/closure-templates", "path": "java/src/com/google/template/soy/types/aggregate/UnionType.java", "license": "apache-2.0", "size": 6198 }
[ "com.google.template.soy.types.SoyType", "java.util.Arrays" ]
import com.google.template.soy.types.SoyType; import java.util.Arrays;
import com.google.template.soy.types.*; import java.util.*;
[ "com.google.template", "java.util" ]
com.google.template; java.util;
2,650,026
public List<Bid> getBids(Item item) { return item.getBids(); }
List<Bid> function(Item item) { return item.getBids(); }
/** * Returns the bids * @param item - item * @return list<bid> */
Returns the bids
getBids
{ "repo_name": "KiranMohan/actionbazaar", "path": "actionbazaar-chapter3/actionbazaar-chapter3-ejb/src/main/java/com/actionbazaar/buslogic/BidManagerBean.java", "license": "apache-2.0", "size": 3973 }
[ "com.actionbazaar.persistence.Bid", "com.actionbazaar.persistence.Item", "java.util.List" ]
import com.actionbazaar.persistence.Bid; import com.actionbazaar.persistence.Item; import java.util.List;
import com.actionbazaar.persistence.*; import java.util.*;
[ "com.actionbazaar.persistence", "java.util" ]
com.actionbazaar.persistence; java.util;
2,397,987
public boolean isAncestorSSLProtected() throws ProcessingException { boolean ssl; try { String ancestorUrl = ""; int lastSlashIndex = url.lastIndexOf("/"); if (lastSlashIndex != -1) { ancestorUrl = url.substring(0, lastSlashIndex); } ...
boolean function() throws ProcessingException { boolean ssl; try { String ancestorUrl = STR/STRResolving policy failed: ", e); } return ssl; }
/** * Returns if one of the ancestors of this URL is SSL protected. * @return A boolean value. * @throws ProcessingException when something went wrong. */
Returns if one of the ancestors of this URL is SSL protected
isAncestorSSLProtected
{ "repo_name": "apache/lenya", "path": "src/java/org/apache/lenya/cms/ac/cocoon/PolicyHelper.java", "license": "apache-2.0", "size": 12700 }
[ "org.apache.cocoon.ProcessingException" ]
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.*;
[ "org.apache.cocoon" ]
org.apache.cocoon;
996,446
public void setTextPalette(Color[] palette, boolean intenseBackground) { // TODO : use intenseBackground info textPalette = palette; repaint(); }
void function(Color[] palette, boolean intenseBackground) { textPalette = palette; repaint(); }
/** Update text mode palette. TODO: implement intenseBackground */
Update text mode palette
setTextPalette
{ "repo_name": "ggeorg/jx86pc", "path": "src/jx86pc/v1/TerminalCanvas.java", "license": "gpl-2.0", "size": 11245 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
598,889
public void testStopwordsCasing() throws IOException { FrenchAnalyzer a = new FrenchAnalyzer(Version.LUCENE_31); assertAnalyzesTo(a, "Votre", new String[] { }); }
void function() throws IOException { FrenchAnalyzer a = new FrenchAnalyzer(Version.LUCENE_31); assertAnalyzesTo(a, "Votre", new String[] { }); }
/** * Test that stopwords are not case sensitive */
Test that stopwords are not case sensitive
testStopwordsCasing
{ "repo_name": "pkarmstr/NYBC", "path": "solr-4.2.1/lucene/analysis/common/src/test/org/apache/lucene/analysis/fr/TestFrenchAnalyzer.java", "license": "apache-2.0", "size": 8104 }
[ "java.io.IOException", "org.apache.lucene.util.Version" ]
import java.io.IOException; import org.apache.lucene.util.Version;
import java.io.*; import org.apache.lucene.util.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
790,542
@Test public void loadIsForwardedToCapability() throws Exception { underTest = new DefaultCapabilityReference( capabilityRegistry, eventBus, achf, vchf, capabilityIdentity("test"), capabilityType("TEST"), mock(CapabilityDescriptor.class), c...
void function() throws Exception { underTest = new DefaultCapabilityReference( capabilityRegistry, eventBus, achf, vchf, capabilityIdentity("test"), capabilityType("TEST"), mock(CapabilityDescriptor.class), capability ); final HashMap<String, String> properties = new HashMap<String, String>(); underTest.load(properties...
/** * Calling load forwards to capability. * * @throws Exception re-thrown */
Calling load forwards to capability
loadIsForwardedToCapability
{ "repo_name": "scmod/nexus-public", "path": "plugins/capabilities/nexus-capabilities-plugin/src/test/java/org/sonatype/nexus/plugins/capabilities/internal/DefaultCapabilityReferenceTest.java", "license": "epl-1.0", "size": 16002 }
[ "java.util.HashMap", "org.mockito.Mockito", "org.sonatype.nexus.plugins.capabilities.CapabilityDescriptor", "org.sonatype.nexus.plugins.capabilities.CapabilityIdentity", "org.sonatype.nexus.plugins.capabilities.CapabilityType" ]
import java.util.HashMap; import org.mockito.Mockito; import org.sonatype.nexus.plugins.capabilities.CapabilityDescriptor; import org.sonatype.nexus.plugins.capabilities.CapabilityIdentity; import org.sonatype.nexus.plugins.capabilities.CapabilityType;
import java.util.*; import org.mockito.*; import org.sonatype.nexus.plugins.capabilities.*;
[ "java.util", "org.mockito", "org.sonatype.nexus" ]
java.util; org.mockito; org.sonatype.nexus;
2,169,281
protected void readResponse(InputStream input) throws IOException { if(isKilled()) { return; } if(destinationFile != null) { OutputStream o = FileSystemStorage.getInstance().openOutputStream(destinationFile); Util.copy(input, o); ...
void function(InputStream input) throws IOException { if(isKilled()) { return; } if(destinationFile != null) { OutputStream o = FileSystemStorage.getInstance().openOutputStream(destinationFile); Util.copy(input, o); if(isKilled()) { FileSystemStorage.getInstance().delete(destinationFile); } } else { if(destinationStora...
/** * Callback for the server response with the input stream from the server. * This method is invoked on the network thread * * @param input the input stream containing the response * @throws IOException when a read input occurs */
Callback for the server response with the input stream from the server. This method is invoked on the network thread
readResponse
{ "repo_name": "Firethunder/CodenameOne", "path": "CodenameOne/src/com/codename1/io/ConnectionRequest.java", "license": "gpl-2.0", "size": 90869 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,422,045
///////////////////////////////////////////////////// // Create/manage tasks ///////////////////////////////////////////////////// public synchronized Task obtainNewMapTask(TaskTrackerStatus tts, int clusterSize, int numU...
synchronized Task function(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts ) throws IOException { if (status.getRunState() != JobStatus.RUNNING) { LOG.info(STR + profile.getJobID()); return null; } int target = findNewMapTask(tts, clusterSize, numUniqueHosts, anyCacheLevel, status.mapProgress()); if (target ...
/** * Return a MapTask, if appropriate, to run on the given tasktracker */
Return a MapTask, if appropriate, to run on the given tasktracker
obtainNewMapTask
{ "repo_name": "jbellis/hadoop-common", "path": "src/mapred/org/apache/hadoop/mapred/JobInProgress.java", "license": "apache-2.0", "size": 113257 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,230,166
@Test public void testImmutabilityOfMappingInstructions() { assertThatClassIsImmutable(MulticastMappingInstruction.WeightMappingInstruction.class); assertThatClassIsImmutable(MulticastMappingInstruction.PriorityMappingInstruction.class); assertThatClassIsImmutable(UnicastMappingInstructi...
void function() { assertThatClassIsImmutable(MulticastMappingInstruction.WeightMappingInstruction.class); assertThatClassIsImmutable(MulticastMappingInstruction.PriorityMappingInstruction.class); assertThatClassIsImmutable(UnicastMappingInstruction.WeightMappingInstruction.class); assertThatClassIsImmutable(UnicastMapp...
/** * Checks that the MappingInstruction class implementation are immutable. */
Checks that the MappingInstruction class implementation are immutable
testImmutabilityOfMappingInstructions
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "apps/mappingmanagement/api/src/test/java/org/onosproject/mapping/instructions/MappingInstructionsTest.java", "license": "apache-2.0", "size": 13240 }
[ "org.onlab.junit.ImmutableClassChecker" ]
import org.onlab.junit.ImmutableClassChecker;
import org.onlab.junit.*;
[ "org.onlab.junit" ]
org.onlab.junit;
2,231,277
public interface EvaluationContext extends EvaluationResults { DirectPipelineOptions getPipelineOptions();
interface EvaluationContext extends EvaluationResults { DirectPipelineOptions function();
/** * Returns the configured pipeline options. */
Returns the configured pipeline options
getPipelineOptions
{ "repo_name": "sammcveety/DataflowJavaSDK", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/DirectPipelineRunner.java", "license": "apache-2.0", "size": 42652 }
[ "com.google.cloud.dataflow.sdk.options.DirectPipelineOptions" ]
import com.google.cloud.dataflow.sdk.options.DirectPipelineOptions;
import com.google.cloud.dataflow.sdk.options.*;
[ "com.google.cloud" ]
com.google.cloud;
1,226,783
private boolean flowSpecAllowsFlow(String container, Match match) { return true; // Always true for now }
boolean function(String container, Match match) { return true; }
/** * Returns whether the container flowspec allows the passed flow * * @param container * @param match * @return */
Returns whether the container flowspec allows the passed flow
flowSpecAllowsFlow
{ "repo_name": "martinmathewhuawei/daylight-cisco-ctrl", "path": "opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/internal/ReadServiceFilter.java", "license": "epl-1.0", "size": 17133 }
[ "org.opendaylight.controller.sal.match.Match" ]
import org.opendaylight.controller.sal.match.Match;
import org.opendaylight.controller.sal.match.*;
[ "org.opendaylight.controller" ]
org.opendaylight.controller;
1,873,716
public SortedSet<Hash> getUnknownParents() { return unknownParents; }
SortedSet<Hash> function() { return unknownParents; }
/** * Provides unknown parents revisions hashes of this tree, those which are referenced as a parent of a revision in * this tree, but are themselve absent. * * @return A sorted set of revision hashes. */
Provides unknown parents revisions hashes of this tree, those which are referenced as a parent of a revision in this tree, but are themselve absent
getUnknownParents
{ "repo_name": "elasticlib/elasticlib", "path": "elasticlib-common/src/main/java/org/elasticlib/common/model/RevisionTree.java", "license": "apache-2.0", "size": 18492 }
[ "java.util.SortedSet", "org.elasticlib.common.hash.Hash" ]
import java.util.SortedSet; import org.elasticlib.common.hash.Hash;
import java.util.*; import org.elasticlib.common.hash.*;
[ "java.util", "org.elasticlib.common" ]
java.util; org.elasticlib.common;
1,124,273
public boolean implies(Permission perm) { Object obj = perms.get(perm.getName()); if (obj == null) return(false); if (!(obj instanceof Permission)) return(false); Permission p = (Permission)obj; return(p.implies(perm)); }
boolean function(Permission perm) { Object obj = perms.get(perm.getName()); if (obj == null) return(false); if (!(obj instanceof Permission)) return(false); Permission p = (Permission)obj; return(p.implies(perm)); }
/** * This method checks to see if the specified permission is implied by * this collection. */
This method checks to see if the specified permission is implied by this collection
implies
{ "repo_name": "sehugg/SSBT", "path": "fastjlib/gnu/java/security/DefaultPermissionCollection.java", "license": "lgpl-2.1", "size": 3846 }
[ "java.security.Permission" ]
import java.security.Permission;
import java.security.*;
[ "java.security" ]
java.security;
2,012,458
public void stopServer() throws Exception { Method method = catalinaDaemon.getClass().getMethod("stopServer", (Class []) null); method.invoke(catalinaDaemon, (Object []) null); }
void function() throws Exception { Method method = catalinaDaemon.getClass().getMethod(STR, (Class []) null); method.invoke(catalinaDaemon, (Object []) null); }
/** * Stop the standalone server. * @throws Exception Fatal stop error */
Stop the standalone server
stopServer
{ "repo_name": "Nickname0806/Test_Q4", "path": "java/org/apache/catalina/startup/Bootstrap.java", "license": "apache-2.0", "size": 19454 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,765,161
public void testValueConstraintNotSatisfied() throws NotExecutableException, ParseException, RepositoryException { PropertyDefinition propDef = NodeTypeUtil.locatePropertyDef(session, PropertyType.BOOLEAN, false, false, true, false); if (propDef == null) { t...
void function() throws NotExecutableException, ParseException, RepositoryException { PropertyDefinition propDef = NodeTypeUtil.locatePropertyDef(session, PropertyType.BOOLEAN, false, false, true, false); if (propDef == null) { throw new NotExecutableException(STR + STR); } Value value = NodeTypeUtil.getValueAccordingTo...
/** * Tests if canSetProperty(String propertyName, Value value) returns false * if value does not satisfy the value constraints of the property def */
Tests if canSetProperty(String propertyName, Value value) returns false if value does not satisfy the value constraints of the property def
testValueConstraintNotSatisfied
{ "repo_name": "jalkanen/Priha", "path": "tests/tck/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyBooleanTest.java", "license": "apache-2.0", "size": 11995 }
[ "java.text.ParseException", "javax.jcr.PropertyType", "javax.jcr.RepositoryException", "javax.jcr.Value", "javax.jcr.nodetype.NodeType", "javax.jcr.nodetype.PropertyDefinition", "org.apache.jackrabbit.test.NotExecutableException" ]
import java.text.ParseException; import javax.jcr.PropertyType; import javax.jcr.RepositoryException; import javax.jcr.Value; import javax.jcr.nodetype.NodeType; import javax.jcr.nodetype.PropertyDefinition; import org.apache.jackrabbit.test.NotExecutableException;
import java.text.*; import javax.jcr.*; import javax.jcr.nodetype.*; import org.apache.jackrabbit.test.*;
[ "java.text", "javax.jcr", "org.apache.jackrabbit" ]
java.text; javax.jcr; org.apache.jackrabbit;
1,711,920
private void addScopePreValidation(ScopeDTO scope) throws IdentityOAuthClientException { validateScopeName(scope.getName()); validateRegex(scope.getName()); validateDisplayName(scope.getDisplayName()); }
void function(ScopeDTO scope) throws IdentityOAuthClientException { validateScopeName(scope.getName()); validateRegex(scope.getName()); validateDisplayName(scope.getDisplayName()); }
/** * Scope validation before adding the scope. * * @param scope Scope. * @throws IdentityOAuth2ScopeClientException */
Scope validation before adding the scope
addScopePreValidation
{ "repo_name": "wso2-extensions/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/OAuthAdminServiceImpl.java", "license": "apache-2.0", "size": 88457 }
[ "org.wso2.carbon.identity.oauth.dto.ScopeDTO" ]
import org.wso2.carbon.identity.oauth.dto.ScopeDTO;
import org.wso2.carbon.identity.oauth.dto.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,344,516
public void execute( ) throws BuildException { Object o = getProject( ).getReference( refID ); ProjectList list; if ( o instanceof ProjectList ) { list = (ProjectList) o; } else { log( "ForEach only support one ProjectList reference!", //$NON-NLS-1$ Project.MSG_ERR ); throw new BuildExce...
void function( ) throws BuildException { Object o = getProject( ).getReference( refID ); ProjectList list; if ( o instanceof ProjectList ) { list = (ProjectList) o; } else { log( STR, Project.MSG_ERR ); throw new BuildException( STR ); } for ( int i = 0; i < list.getCount( ); i++ ) { ProjectInfo projectInfo = list.getP...
/** * Execute all nestedTasks. * * @throws BuildException * if one of the nested tasks fails. */
Execute all nestedTasks
execute
{ "repo_name": "sguan-actuate/birt", "path": "build/org.eclipse.birt.build/src/org/eclipse/birt/build/ForEach.java", "license": "epl-1.0", "size": 9828 }
[ "java.io.File", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.PrintStream", "java.util.Enumeration", "org.apache.tools.ant.BuildException", "org.apache.tools.ant.DefaultLogger", "org.apache.tools.ant.Project", "org.apache.tools.ant.Task" ]
import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream; import java.util.Enumeration; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DefaultLogger; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task;
import java.io.*; import java.util.*; import org.apache.tools.ant.*;
[ "java.io", "java.util", "org.apache.tools" ]
java.io; java.util; org.apache.tools;
2,481,813
private void computeClassInvInfo(AClassDeclCG clazz) { if (clazz.getInvariant() != null) { List<String> fieldNames = new LinkedList<String>(); for (AFieldDeclCG field : clazz.getFields()) { if (!field.getFinal() && !field.getVolatile()) { fieldNames.add(field.getName()); } } cla...
void function(AClassDeclCG clazz) { if (clazz.getInvariant() != null) { List<String> fieldNames = new LinkedList<String>(); for (AFieldDeclCG field : clazz.getFields()) { if (!field.getFinal() && !field.getVolatile()) { fieldNames.add(field.getName()); } } classInvInfo.put(clazz.getName(), annotator.consAnno(JML_STATIC...
/** * Computes class invariant information for a class under the assumption that that the dialect is VDMPP * * @param clazz * The class to compute class invariant information for */
Computes class invariant information for a class under the assumption that that the dialect is VDMPP
computeClassInvInfo
{ "repo_name": "ldcouto/overture", "path": "core/codegen/vdm2jml/src/main/java/org/overture/codegen/vdm2jml/JmlGenerator.java", "license": "gpl-3.0", "size": 22250 }
[ "java.util.LinkedList", "java.util.List", "org.overture.codegen.cgast.declarations.AClassDeclCG", "org.overture.codegen.cgast.declarations.AFieldDeclCG" ]
import java.util.LinkedList; import java.util.List; import org.overture.codegen.cgast.declarations.AClassDeclCG; import org.overture.codegen.cgast.declarations.AFieldDeclCG;
import java.util.*; import org.overture.codegen.cgast.declarations.*;
[ "java.util", "org.overture.codegen" ]
java.util; org.overture.codegen;
817,618
public ParamValueType<ServletType<T>> createInitParam() { return new ParamValueTypeImpl<ServletType<T>>(this, "init-param", childNode); }
ParamValueType<ServletType<T>> function() { return new ParamValueTypeImpl<ServletType<T>>(this, STR, childNode); }
/** * Creates a new <code>init-param</code> element * @return the new created instance of <code>ParamValueType<ServletType<T>></code> */
Creates a new <code>init-param</code> element
createInitParam
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/webcommon31/ServletTypeImpl.java", "license": "epl-1.0", "size": 23086 }
[ "org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType", "org.jboss.shrinkwrap.descriptor.api.webcommon31.ServletType", "org.jboss.shrinkwrap.descriptor.impl.javaee7.ParamValueTypeImpl" ]
import org.jboss.shrinkwrap.descriptor.api.javaee7.ParamValueType; import org.jboss.shrinkwrap.descriptor.api.webcommon31.ServletType; import org.jboss.shrinkwrap.descriptor.impl.javaee7.ParamValueTypeImpl;
import org.jboss.shrinkwrap.descriptor.api.javaee7.*; import org.jboss.shrinkwrap.descriptor.api.webcommon31.*; import org.jboss.shrinkwrap.descriptor.impl.javaee7.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,200,631
TopologyElement getTo();
TopologyElement getTo();
/** * Returns the value of the '<em><b>To</b></em>' reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>To</em>' reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>To</em>' reference. * @see #...
Returns the value of the 'To' reference. If the meaning of the 'To' reference isn't clear, there really should be more of a description here...
getTo
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain/src/de/dfki/iui/basys/model/domain/linebalancing/WMPathTime.java", "license": "epl-1.0", "size": 2366 }
[ "de.dfki.iui.basys.model.domain.topology.TopologyElement" ]
import de.dfki.iui.basys.model.domain.topology.TopologyElement;
import de.dfki.iui.basys.model.domain.topology.*;
[ "de.dfki.iui" ]
de.dfki.iui;
1,460,104
private void initSchema() throws Exception { File workingDirectory = directoryService.getInstanceLayout().getPartitionsDirectory(); // Extract the schema on disk (a brand new one) and load the registries File schemaRepository = new File( workingDirectory, "schema" ); SchemaLdifE...
void function() throws Exception { File workingDirectory = directoryService.getInstanceLayout().getPartitionsDirectory(); File schemaRepository = new File( workingDirectory, STR ); SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor( workingDirectory ); try { extractor.extractOrCopy(); } catch ( IOException ...
/** * Inits the schema and schema partition. */
Inits the schema and schema partition
initSchema
{ "repo_name": "drankye/directory-server", "path": "core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java", "license": "apache-2.0", "size": 9551 }
[ "java.io.File", "java.io.IOException", "java.util.List", "org.apache.directory.api.ldap.model.schema.LdapComparator", "org.apache.directory.api.ldap.model.schema.SchemaManager", "org.apache.directory.api.ldap.model.schema.comparators.NormalizingComparator", "org.apache.directory.api.ldap.model.schema.re...
import java.io.File; import java.io.IOException; import java.util.List; import org.apache.directory.api.ldap.model.schema.LdapComparator; import org.apache.directory.api.ldap.model.schema.SchemaManager; import org.apache.directory.api.ldap.model.schema.comparators.NormalizingComparator; import org.apache.directory.api....
import java.io.*; import java.util.*; import org.apache.directory.api.ldap.model.schema.*; import org.apache.directory.api.ldap.model.schema.comparators.*; import org.apache.directory.api.ldap.model.schema.registries.*; import org.apache.directory.api.ldap.schema.extractor.*; import org.apache.directory.api.ldap.schema...
[ "java.io", "java.util", "org.apache.directory" ]
java.io; java.util; org.apache.directory;
1,366,188
private void formatBrackets(int bracketType) { assert (!isBracketType(bracketType, BracketType.ARRAY_TYPE)); assert (currentChar == '{' || currentChar == '}'); if (currentChar == '{') { parenStack.add(0); } else if (currentChar == '}') { // parenStack must co...
void function(int bracketType) { assert (!isBracketType(bracketType, BracketType.ARRAY_TYPE)); assert (currentChar == '{' currentChar == '}'); if (currentChar == '{') { parenStack.add(0); } else if (currentChar == '}') { if (parenStack.size() > 1) { parenStack.pop(); } } if (currentChar == '{') { boolean breakBracket =...
/** * format brackets as attached or broken currentChar contains the bracket * the brackets will be appended to the current formattedLine or a new * formattedLine as necessary the calling function should have a continue * statement after calling this method * * @param bracketType the type ...
format brackets as attached or broken currentChar contains the bracket the brackets will be appended to the current formattedLine or a new formattedLine as necessary the calling function should have a continue statement after calling this method
formatBrackets
{ "repo_name": "stephenc/jastyle", "path": "src/main/java/com/github/stephenc/jastyle/ASFormatter.java", "license": "lgpl-3.0", "size": 115636 }
[ "com.github.stephenc.jastyle.constants.BracketType" ]
import com.github.stephenc.jastyle.constants.BracketType;
import com.github.stephenc.jastyle.constants.*;
[ "com.github.stephenc" ]
com.github.stephenc;
2,686,054
public String deleteScenario(String id) { return new MongoDBQueries().deleteDocument(COL_SCENARIOS, id).toString(); }
String function(String id) { return new MongoDBQueries().deleteDocument(COL_SCENARIOS, id).toString(); }
/** * curl -i -X DELETE http://localhost:8080/cassandra/api/scn/4fed8930e4b0026f6740d7fa * * @param id * @return */
curl -i -X DELETE HREF
deleteScenario
{ "repo_name": "cassandra-project/platform", "path": "src/eu/cassandra/server/mongo/MongoScenarios.java", "license": "apache-2.0", "size": 4448 }
[ "eu.cassandra.server.mongo.util.MongoDBQueries" ]
import eu.cassandra.server.mongo.util.MongoDBQueries;
import eu.cassandra.server.mongo.util.*;
[ "eu.cassandra.server" ]
eu.cassandra.server;
1,666,840
private ContentValues getContentValues(Round round) { ContentValues values = new ContentValues(); values.put(RoundTable.Cols.PLAYERUUID, round.getSecondUserUUID()); values.put(RoundTable.Cols.ROUNDUUID, round.getId()); values.put(RoundTable.Cols.DATE, round.getDate()); ...
ContentValues function(Round round) { ContentValues values = new ContentValues(); values.put(RoundTable.Cols.PLAYERUUID, round.getSecondUserUUID()); values.put(RoundTable.Cols.ROUNDUUID, round.getId()); values.put(RoundTable.Cols.DATE, round.getDate()); values.put(RoundTable.Cols.TITLE, round.getTitle()); values.put(Ro...
/** * Rellena los datos de un contendor para insertar en la base de datos * @param round Ronda de la que obtener los datos * @return Contenedor listo para insertar en la base de datos */
Rellena los datos de un contendor para insertar en la base de datos
getContentValues
{ "repo_name": "manso92/DADM", "path": "app/src/main/java/com/manso92/damas/database/DataBase.java", "license": "gpl-3.0", "size": 16871 }
[ "android.content.ContentValues", "com.manso92.damas.database.RoundDataBaseSchema", "com.manso92.damas.model.Round" ]
import android.content.ContentValues; import com.manso92.damas.database.RoundDataBaseSchema; import com.manso92.damas.model.Round;
import android.content.*; import com.manso92.damas.database.*; import com.manso92.damas.model.*;
[ "android.content", "com.manso92.damas" ]
android.content; com.manso92.damas;
2,284,961