method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void testGetCharacterStream() throws SQLException, IOException { Connection conn = getConnection(); PreparedStatement st; st = conn.prepareStatement("insert into t3(text_data) values(?)"); st.setCharacterStream(1, new StringReader(TEST_STRING_DATA...
void function() throws SQLException, IOException { Connection conn = getConnection(); PreparedStatement st; st = conn.prepareStatement(STR); st.setCharacterStream(1, new StringReader(TEST_STRING_DATA), TEST_STRING_DATA.length()); st.executeUpdate(); st = conn.prepareStatement(STR + STR + STR + STR + "t3"); ResultSet rs...
/** * test getCharacterStream against inserted data * * @throws SQLException * @throws IOException */
test getCharacterStream against inserted data
testGetCharacterStream
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetStreamTest.java", "license": "apache-2.0", "size": 18101 }
[ "java.io.IOException", "java.io.Reader", "java.io.StringReader", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
1,830,550
public String getInQueueForString() { long duration = System.currentTimeMillis() - this.inQueueSince; return Util.getTimeSpanString(duration); } @WithBridgeMethods(Future.class) public QueueTaskFuture<Executable> getFuture() { return future; }
String function() { long duration = System.currentTimeMillis() - this.inQueueSince; return Util.getTimeSpanString(duration); } @WithBridgeMethods(Future.class) public QueueTaskFuture<Executable> getFuture() { return future; }
/** * Returns a human readable presentation of how long this item is already in the queue. * E.g. something like '3 minutes 40 seconds' */
Returns a human readable presentation of how long this item is already in the queue. E.g. something like '3 minutes 40 seconds'
getInQueueForString
{ "repo_name": "ndeloof/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 108592 }
[ "com.infradna.tool.bridge_method_injector.WithBridgeMethods", "hudson.model.queue.QueueTaskFuture", "java.util.concurrent.Future" ]
import com.infradna.tool.bridge_method_injector.WithBridgeMethods; import hudson.model.queue.QueueTaskFuture; import java.util.concurrent.Future;
import com.infradna.tool.bridge_method_injector.*; import hudson.model.queue.*; import java.util.concurrent.*;
[ "com.infradna.tool", "hudson.model.queue", "java.util" ]
com.infradna.tool; hudson.model.queue; java.util;
4,608
public IdentityEventService getIdentityEventService() { return identityEventService; }
IdentityEventService function() { return identityEventService; }
/** * Return identity event service. * * @return Identity Event Service. */
Return identity event service
getIdentityEventService
{ "repo_name": "wso2/carbon-identity-framework", "path": "components/central-logger/org.wso2.carbon.identity.central.log.mgt/src/main/java/org/wso2/carbon/identity/central/log/mgt/internal/CentralLogMgtServiceComponentHolder.java", "license": "apache-2.0", "size": 1765 }
[ "org.wso2.carbon.identity.event.services.IdentityEventService" ]
import org.wso2.carbon.identity.event.services.IdentityEventService;
import org.wso2.carbon.identity.event.services.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,954,443
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ExceptionResponse info = (ExceptionResponse)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalThrowable(wireFormat, info.getException(), dataOut); }
void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ExceptionResponse info = (ExceptionResponse)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalThrowable(wireFormat, info.getException(), dataOut); }
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
looseMarshal
{ "repo_name": "Mark-Booth/daq-eclipse", "path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java", "license": "epl-1.0", "size": 4367 }
[ "java.io.DataOutput", "java.io.IOException", "org.apache.activemq.command.ExceptionResponse", "org.apache.activemq.openwire.OpenWireFormat" ]
import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.command.ExceptionResponse; import org.apache.activemq.openwire.OpenWireFormat;
import java.io.*; import org.apache.activemq.command.*; import org.apache.activemq.openwire.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
2,510,004
@Override public SortedMap<String, Counter> getCounters(MetricFilter filter) { return getSimplyNamedMetrics(Counter.class, Optional.of(filter)); }
SortedMap<String, Counter> function(MetricFilter filter) { return getSimplyNamedMetrics(Counter.class, Optional.of(filter)); }
/** * See {@link com.codahale.metrics.MetricRegistry#getCounters(com.codahale.metrics.MetricFilter)}. * * <p> * This method will return fully-qualified metric names if the {@link MetricContext} is configured * to report fully-qualified metric names. * </p> */
See <code>com.codahale.metrics.MetricRegistry#getCounters(com.codahale.metrics.MetricFilter)</code>. This method will return fully-qualified metric names if the <code>MetricContext</code> is configured to report fully-qualified metric names.
getCounters
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/InnerMetricContext.java", "license": "apache-2.0", "size": 14262 }
[ "com.codahale.metrics.Counter", "com.codahale.metrics.MetricFilter", "com.google.common.base.Optional", "java.util.SortedMap" ]
import com.codahale.metrics.Counter; import com.codahale.metrics.MetricFilter; import com.google.common.base.Optional; import java.util.SortedMap;
import com.codahale.metrics.*; import com.google.common.base.*; import java.util.*;
[ "com.codahale.metrics", "com.google.common", "java.util" ]
com.codahale.metrics; com.google.common; java.util;
35,585
public static List<String> removeNotes(Collection<String> logLines) { List<String> r = new ArrayList<String>(logLines.size()); for (String l : logLines) r.add(removeNotes(l)); return r; }
static List<String> function(Collection<String> logLines) { List<String> r = new ArrayList<String>(logLines.size()); for (String l : logLines) r.add(removeNotes(l)); return r; }
/** * Removes the embedded console notes in the given log lines. * * @since 1.350 */
Removes the embedded console notes in the given log lines
removeNotes
{ "repo_name": "aheritier/jenkins", "path": "core/src/main/java/hudson/console/ConsoleNote.java", "license": "mit", "size": 12718 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,045,788
public AttributeInfo copy(ConstPool newCp, Map classnames) throws RuntimeCopyException { try { return new StackMapTable(newCp, new Copier(this.constPool, info, newCp).doit()); } catch (BadBytecode e) { throw new RuntimeCopyExcep...
AttributeInfo function(ConstPool newCp, Map classnames) throws RuntimeCopyException { try { return new StackMapTable(newCp, new Copier(this.constPool, info, newCp).doit()); } catch (BadBytecode e) { throw new RuntimeCopyException(STR); } } public static class RuntimeCopyException extends RuntimeException { public Runti...
/** * Makes a copy. * * @exception RuntimeCopyException if a <code>BadBytecode</code> * exception is thrown while copying, * it is converted into * <code>RuntimeCopyException</code>. * */
Makes a copy
copy
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/javassist/src/main/javassist/bytecode/StackMapTable.java", "license": "gpl-3.0", "size": 32034 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,510,741
public T pages_getInfo(Integer userId, Set<CharSequence> fields) throws FacebookException, IOException;
T function(Integer userId, Set<CharSequence> fields) throws FacebookException, IOException;
/** * Retrieves the requested profile fields for the Facebook Pages of the user with the given * <code>userId</code>. * @param userId the ID of a user about whose pages to fetch info * @param fields a set of page profile fields * @return a T consisting of a list of pages, with each page element * ...
Retrieves the requested profile fields for the Facebook Pages of the user with the given <code>userId</code>
pages_getInfo
{ "repo_name": "jkinner/ringside", "path": "api/clients/java/com/facebook/api/IFacebookRestClient.java", "license": "lgpl-2.1", "size": 46105 }
[ "java.io.IOException", "java.util.Set" ]
import java.io.IOException; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
141,142
public static <M extends Map<K, V>, K, V> M dict(M map, Pair<K, V>... array) { dbc.precondition(map != null, "cannot call dict with a null map"); final Function<Iterator<Pair<K, V>>, M> consumer = new ConsumeIntoMap<>(new ConstantSupplier<M>(map)); return consumer.apply(new ArrayIterator<>(a...
static <M extends Map<K, V>, K, V> M function(M map, Pair<K, V>... array) { dbc.precondition(map != null, STR); final Function<Iterator<Pair<K, V>>, M> consumer = new ConsumeIntoMap<>(new ConstantSupplier<M>(map)); return consumer.apply(new ArrayIterator<>(array)); }
/** * Yields all elements of the array (in the provided map). * * @param <M> the returned map type * @param <K> the map key type * @param <V> the map value type * @param map the map where the iterator is consumed * @param array the array that will be consumed * @return the map fi...
Yields all elements of the array (in the provided map)
dict
{ "repo_name": "emaze/emaze-dysfunctional", "path": "src/main/java/net/emaze/dysfunctional/Consumers.java", "license": "bsd-3-clause", "size": 28336 }
[ "java.util.Iterator", "java.util.Map", "java.util.function.Function", "net.emaze.dysfunctional.consumers.ConsumeIntoMap", "net.emaze.dysfunctional.dispatching.delegates.ConstantSupplier", "net.emaze.dysfunctional.iterations.ArrayIterator", "net.emaze.dysfunctional.tuples.Pair" ]
import java.util.Iterator; import java.util.Map; import java.util.function.Function; import net.emaze.dysfunctional.consumers.ConsumeIntoMap; import net.emaze.dysfunctional.dispatching.delegates.ConstantSupplier; import net.emaze.dysfunctional.iterations.ArrayIterator; import net.emaze.dysfunctional.tuples.Pair;
import java.util.*; import java.util.function.*; import net.emaze.dysfunctional.consumers.*; import net.emaze.dysfunctional.dispatching.delegates.*; import net.emaze.dysfunctional.iterations.*; import net.emaze.dysfunctional.tuples.*;
[ "java.util", "net.emaze.dysfunctional" ]
java.util; net.emaze.dysfunctional;
77,915
public void executeAction(String actualPath) { String keyword = actualPath.substring(actualPath.lastIndexOf("/") + 1).replace(" ", "_"); switch (selectedFrom) { case DOCUMENT_PROPERTIES: Main.get().mainPanel.desktop.browser.tabMultiple.tabDocument.document.addKeywordToPendinList(...
void function(String actualPath) { String keyword = actualPath.substring(actualPath.lastIndexOf("/") + 1).replace(" ", "_"); switch (selectedFrom) { case DOCUMENT_PROPERTIES: Main.get().mainPanel.desktop.browser.tabMultiple.tabDocument.document.addKeywordToPendinList(keyword); Main.get().mainPanel.desktop.browser.tabMu...
/** * Executes the action */
Executes the action
executeAction
{ "repo_name": "codelibs/n2dms", "path": "src/main/java/com/openkm/frontend/client/widget/thesaurus/ThesaurusSelectPopup.java", "license": "gpl-2.0", "size": 6293 }
[ "com.openkm.frontend.client.Main" ]
import com.openkm.frontend.client.Main;
import com.openkm.frontend.client.*;
[ "com.openkm.frontend" ]
com.openkm.frontend;
1,903,526
public Iterator<WALItem> getWALFilesIterator(String backupRoot) throws IOException { if (LOG.isTraceEnabled()) { LOG.trace("get WAL files from backup system table"); } final Table table = connection.getTable(tableName); Scan scan = createScanForGetWALs(backupRoot); final ResultScanner scanne...
Iterator<WALItem> function(String backupRoot) throws IOException { if (LOG.isTraceEnabled()) { LOG.trace(STR); } final Table table = connection.getTable(tableName); Scan scan = createScanForGetWALs(backupRoot); final ResultScanner scanner = table.getScanner(scan); final Iterator<Result> it = scanner.iterator(); return ...
/** * Register WAL files as eligible for deletion * @param backupRoot root directory path to backup * @throws IOException exception */
Register WAL files as eligible for deletion
getWALFilesIterator
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java", "license": "apache-2.0", "size": 67577 }
[ "java.io.IOException", "java.util.Iterator", "org.apache.hadoop.hbase.client.Result", "org.apache.hadoop.hbase.client.ResultScanner", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.client.Table" ]
import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,075,214
public static ims.core.vitals.domain.objects.VitalSigns extractVitalSigns(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.VitalSignsVo valueObject) { return extractVitalSigns(domainFactory, valueObject, new HashMap()); }
static ims.core.vitals.domain.objects.VitalSigns function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.VitalSignsVo valueObject) { return extractVitalSigns(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractVitalSigns
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/VitalSignsVoAssembler.java", "license": "agpl-3.0", "size": 35922 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
674,326
public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); }
Date function(Date date) { return getTimeAfter(date); }
/** * Returns the next date/time <I>after</I> the given date/time which satisfies the cron expression. * * @param date the date/time at which to begin the search for the next valid date/time * @return the next valid date/time */
Returns the next date/time after the given date/time which satisfies the cron expression
getNextValidTimeAfter
{ "repo_name": "scmod/nexus-public", "path": "components/nexus-scheduler/src/main/java/org/sonatype/scheduling/iterators/cron/CronExpression.java", "license": "epl-1.0", "size": 50308 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
482,671
public int[] get1DIndexes() { TIntList results = new TIntArrayList(getMaxIndex() + 1); visit(dimensions, 0, new int[numDimensions], results); return results.toArray(); }
int[] function() { TIntList results = new TIntArrayList(getMaxIndex() + 1); visit(dimensions, 0, new int[numDimensions], results); return results.toArray(); }
/** * Returns an array of all the flat indexes that can be * computed from the current configuration. * @return */
Returns an array of all the flat indexes that can be computed from the current configuration
get1DIndexes
{ "repo_name": "clumsy/htm.java", "path": "src/main/java/org/numenta/nupic/util/SparseMatrix.java", "license": "gpl-3.0", "size": 15212 }
[ "gnu.trove.list.TIntList", "gnu.trove.list.array.TIntArrayList" ]
import gnu.trove.list.TIntList; import gnu.trove.list.array.TIntArrayList;
import gnu.trove.list.*; import gnu.trove.list.array.*;
[ "gnu.trove.list" ]
gnu.trove.list;
2,279,350
public Cancellable invalidateApiKeyAsync(final InvalidateApiKeyRequest request, final RequestOptions options, final ActionListener<InvalidateApiKeyResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverter...
Cancellable function(final InvalidateApiKeyRequest request, final RequestOptions options, final ActionListener<InvalidateApiKeyResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverters::invalidateApiKey, options, InvalidateApiKeyResponse::fromXContent, listene...
/** * Asynchronously invalidates API key(s).<br> * See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html"> * the docs</a> for more. * * @param request the request to invalidate API key(s) * @param options the request options (e.g....
Asynchronously invalidates API key(s). See the docs for more
invalidateApiKeyAsync
{ "repo_name": "coding0011/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/SecurityClient.java", "license": "apache-2.0", "size": 62531 }
[ "java.util.Collections", "org.elasticsearch.action.ActionListener", "org.elasticsearch.client.security.InvalidateApiKeyRequest", "org.elasticsearch.client.security.InvalidateApiKeyResponse" ]
import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.security.InvalidateApiKeyRequest; import org.elasticsearch.client.security.InvalidateApiKeyResponse;
import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.security.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.client" ]
java.util; org.elasticsearch.action; org.elasticsearch.client;
18,431
public static String getExtensionFile(File file) { if(file == null) { throw new NullPointerException("File is null"); } String url = file.getName(); String[] urlSplit = url.split("/"); String filename = urlSplit[urlSplit.length - 1]; String[] nameSplit = filename.split("[.]"); StringBuffer fileExte...
static String function(File file) { if(file == null) { throw new NullPointerException(STR); } String url = file.getName(); String[] urlSplit = url.split("/"); String filename = urlSplit[urlSplit.length - 1]; String[] nameSplit = filename.split("[.]"); StringBuffer fileExtension = new StringBuffer(); if (nameSplit.lengt...
/** * Gets the extension of a filename. * This method returns the textual part of the filename after the last dot. * There must be no directory separator after the dot. * * @param file - the file to retrieve the extension * @return the extension of the file or an empty string if none exists or nu...
Gets the extension of a filename. This method returns the textual part of the filename after the last dot. There must be no directory separator after the dot
getExtensionFile
{ "repo_name": "gjpsiqueira/Minus", "path": "src/com/minus/util/FileUtils.java", "license": "mit", "size": 1863 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
374,358
private void log(Exception exception) { if (ctx.channel().isActive()) { String uri = "unknown"; RestMethod restMethod = RestMethod.UNKNOWN; if (request != null) { uri = request.getUri(); restMethod = request.getRestMethod(); } if (exception instanceof RestServiceExcep...
void function(Exception exception) { if (ctx.channel().isActive()) { String uri = STR; RestMethod restMethod = RestMethod.UNKNOWN; if (request != null) { uri = request.getUri(); restMethod = request.getRestMethod(); } if (exception instanceof RestServiceException) { RestServiceErrorCode errorCode = ((RestServiceExcepti...
/** * Logs the exception at the appropriate level. * @param exception the {@link Exception} that has to be logged. */
Logs the exception at the appropriate level
log
{ "repo_name": "cgtz/ambry", "path": "ambry-rest/src/main/java/com/github/ambry/rest/NettyResponseChannel.java", "license": "apache-2.0", "size": 51419 }
[ "com.github.ambry.utils.Utils" ]
import com.github.ambry.utils.Utils;
import com.github.ambry.utils.*;
[ "com.github.ambry" ]
com.github.ambry;
422,215
public List<OperandTreeNode> getNodes() { // ESCA-JAVA0259: Return of collection is OK, speed is more important // when creating nodes. return m_nodes; }
List<OperandTreeNode> function() { return m_nodes; }
/** * Returns the nodes of the operand tree. * * @return The nodes of the operand tree. */
Returns the nodes of the operand tree
getNodes
{ "repo_name": "mayl8822/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Database/NodeParser/OperandTree.java", "license": "apache-2.0", "size": 1604 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,923,188
public void setExtra(Map<String, Object> info) { extra = info; }
void function(Map<String, Object> info) { extra = info; }
/** * Sets extra information coming from the status. */
Sets extra information coming from the status
setExtra
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/agent/ComponentStatus.java", "license": "apache-2.0", "size": 3439 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,168,716
public void setPayPeriodEndDate(Date payPeriodEndDate) { this.payPeriodEndDate = payPeriodEndDate; }
void function(Date payPeriodEndDate) { this.payPeriodEndDate = payPeriodEndDate; }
/** * Sets the payPeriodEndDate. * * @param payPeriodEndDate The payPeriodEndDate to set. */
Sets the payPeriodEndDate
setPayPeriodEndDate
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-ld/src/main/java/org/kuali/kfs/module/ld/businessobject/LaborJournalVoucherDetail.java", "license": "agpl-3.0", "size": 13015 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
233,631
protected Collection<Window.TimeWindow> getTimeWindowsForTimestamp(long timestamp) { List<Window.TimeWindow> windows = new ArrayList<>(); if (windowOption instanceof WindowOption.TimeWindows) { long durationMillis = ((WindowOption.TimeWindows)windowOption).getDuration().getMillis(); long beginTi...
Collection<Window.TimeWindow> function(long timestamp) { List<Window.TimeWindow> windows = new ArrayList<>(); if (windowOption instanceof WindowOption.TimeWindows) { long durationMillis = ((WindowOption.TimeWindows)windowOption).getDuration().getMillis(); long beginTimestamp = timestamp - timestamp % durationMillis; wi...
/** * Returns the list of windows TimeWindows for the given timestamp. * If we are doing sliding windows, this will return multiple windows. Otherwise, only one window will be returned. * Note that this method does not apply to SessionWindows. * * @param timestamp the timestamp * @return the windows t...
Returns the list of windows TimeWindows for the given timestamp. If we are doing sliding windows, this will return multiple windows. Otherwise, only one window will be returned. Note that this method does not apply to SessionWindows
getTimeWindowsForTimestamp
{ "repo_name": "trusli/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/window/impl/AbstractWindowedOperator.java", "license": "apache-2.0", "size": 22919 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.apache.apex.malhar.lib.window.Window", "org.apache.apex.malhar.lib.window.WindowOption" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.apex.malhar.lib.window.Window; import org.apache.apex.malhar.lib.window.WindowOption;
import java.util.*; import org.apache.apex.malhar.lib.window.*;
[ "java.util", "org.apache.apex" ]
java.util; org.apache.apex;
209,227
public List<Item> find(boolean onlyActive, String model, List<String> pids) throws FedoraClientException, IOException { // issue 85: reasonable count of PIDs per query to prevent StackOverflowError. // Greater query page sizes (>1000, <2000) are acceptable but Mulgara responses are really slow. ...
List<Item> function(boolean onlyActive, String model, List<String> pids) throws FedoraClientException, IOException { final int queryPageSize = 100; final int size = pids.size(); ArrayList<Item> result = new ArrayList<Item>(size); for (int startOffset = 0; startOffset < size; ) { int endOffset = Math.min(size, startOffs...
/** * Finds descriptors of passed PIDs. * * @param pids PIDs of digital objects * @param onlyActive {@code true} includes only active objects * @return list of descriptors * @throws FedoraClientException * @throws IOException */
Finds descriptors of passed PIDs
find
{ "repo_name": "proarc/proarc", "path": "proarc-common/src/main/java/cz/cas/lib/proarc/common/fedora/SearchView.java", "license": "gpl-3.0", "size": 51403 }
[ "com.yourmediashelf.fedora.client.FedoraClientException", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import com.yourmediashelf.fedora.client.FedoraClientException; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import com.yourmediashelf.fedora.client.*; import java.io.*; import java.util.*;
[ "com.yourmediashelf.fedora", "java.io", "java.util" ]
com.yourmediashelf.fedora; java.io; java.util;
1,583,022
ProcessorEntity updateProcessor(Revision revision, ProcessorDTO processorDTO);
ProcessorEntity updateProcessor(Revision revision, ProcessorDTO processorDTO);
/** * Updates the specified Processor. * * @param revision Revision to compare with current base revision * @param processorDTO The processorDTO * @return The updated processor */
Updates the specified Processor
updateProcessor
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 85713 }
[ "org.apache.nifi.web.api.dto.ProcessorDTO", "org.apache.nifi.web.api.entity.ProcessorEntity" ]
import org.apache.nifi.web.api.dto.ProcessorDTO; import org.apache.nifi.web.api.entity.ProcessorEntity;
import org.apache.nifi.web.api.dto.*; import org.apache.nifi.web.api.entity.*;
[ "org.apache.nifi" ]
org.apache.nifi;
2,542,411
protected String toStringOriginal() { StringBuffer text = new StringBuffer(); text.append("Naive Bayes Classifier"); if (m_Instances == null) { text.append(": No model built yet."); } else { try { for (int i = 0; i < m_Distributions[0].length; i++) { text.append("\n\nCl...
String function() { StringBuffer text = new StringBuffer(); text.append(STR); if (m_Instances == null) { text.append(STR); } else { try { for (int i = 0; i < m_Distributions[0].length; i++) { text.append(STR + m_Instances.classAttribute().value(i) + STR + Utils.doubleToString(m_ClassDistribution.getProbability(i), 4, 2...
/** * Returns a description of the classifier in the old format. * * @return a description of the classifier as a string. */
Returns a description of the classifier in the old format
toStringOriginal
{ "repo_name": "Scauser/j2ee", "path": "Weka_Parallel_Test/weka/weka/classifiers/bayes/NaiveBayes.java", "license": "apache-2.0", "size": 33664 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,972,691
Set<Integer> getSignaturePeptideIdsByProteaseShortNamesProteinLevel(Set<String> proteaseShortNames);
Set<Integer> getSignaturePeptideIdsByProteaseShortNamesProteinLevel(Set<String> proteaseShortNames);
/** * Returns the signature peptide ids by protease short names protein level. * * @param proteaseShortNames the short names for the proteases * @return the signature peptide ids by protease short names protein level */
Returns the signature peptide ids by protease short names protein level
getSignaturePeptideIdsByProteaseShortNamesProteinLevel
{ "repo_name": "compomics/compomics-sigpep", "path": "sigpep-persistence/src/main/java/com/compomics/sigpep/persistence/dao/SimpleQueryDao.java", "license": "apache-2.0", "size": 8358 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,985,784
public void setExecuteFrame(JFrame f) { executeFrame = f; if (f != null) { ExecutePanel ep = getExecutePanel(); f.setLayout(new BorderLayout()); f.add(ep, BorderLayout.CENTER); f.pack(); } }
void function(JFrame f) { executeFrame = f; if (f != null) { ExecutePanel ep = getExecutePanel(); f.setLayout(new BorderLayout()); f.add(ep, BorderLayout.CENTER); f.pack(); } }
/** * We are given a Frame to use so the View can save it's state. * * @param f A JFrame instance. */
We are given a Frame to use so the View can save it's state
setExecuteFrame
{ "repo_name": "djb61230/jflicks", "path": "src/org/jflicks/ui/view/aspirin/ControlPanel.java", "license": "gpl-3.0", "size": 11386 }
[ "java.awt.BorderLayout", "javax.swing.JFrame" ]
import java.awt.BorderLayout; import javax.swing.JFrame;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,468,352
public static ParquetWriter create(TableSchema schema, AlluxioURI uri, @Nullable PartitionInfo partitionInfo) throws IOException { String compressionCodec = DEFAULT_COMPRESSION_CODEC; if (partitionInfo != null) { compressionCodec = partitionInfo.getSerdeProperties()....
static ParquetWriter function(TableSchema schema, AlluxioURI uri, @Nullable PartitionInfo partitionInfo) throws IOException { String compressionCodec = DEFAULT_COMPRESSION_CODEC; if (partitionInfo != null) { compressionCodec = partitionInfo.getSerdeProperties().getOrDefault( PartitionInfo.PARQUET_COMPRESSION, DEFAULT_C...
/** * Creates a parquet writer based on the partitionInfo. * * @param schema the schema * @param uri the URI to the output * @param partitionInfo the partitionInfo (default configuration is used if null) * @return the writer */
Creates a parquet writer based on the partitionInfo
create
{ "repo_name": "wwjiang007/alluxio", "path": "job/server/src/main/java/alluxio/job/plan/transform/format/parquet/ParquetWriter.java", "license": "apache-2.0", "size": 6287 }
[ "java.io.IOException", "javax.annotation.Nullable" ]
import java.io.IOException; import javax.annotation.Nullable;
import java.io.*; import javax.annotation.*;
[ "java.io", "javax.annotation" ]
java.io; javax.annotation;
240,202
@Deprecated public Connection getConnection() { return connection; }
Connection function() { return connection; }
/** * Only use if you know what you are doing * * @return */
Only use if you know what you are doing
getConnection
{ "repo_name": "pietervdvn/DAO", "path": "src/database/tools/logging/LoggingConnection.java", "license": "gpl-2.0", "size": 1831 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,885,355
private boolean hasNestedStatsForColumn(SchemaPath column, Metadata metadata) { return metadata.getColumnsStatistics().keySet().stream() .anyMatch(path -> path.contains(column)); }
boolean function(SchemaPath column, Metadata metadata) { return metadata.getColumnsStatistics().keySet().stream() .anyMatch(path -> path.contains(column)); }
/** * For complex columns, stats may be present only for nested fields. For example, a column path is `a`, * but stats present for `a`.`b`. So before making a decision that column is absent, the case needs * to be tested. * * @param column parent column path * @param metadata metadata with column st...
For complex columns, stats may be present only for nested fields. For example, a column path is `a`, but stats present for `a`.`b`. So before making a decision that column is absent, the case needs to be tested
hasNestedStatsForColumn
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScanWithMetadata.java", "license": "apache-2.0", "size": 44761 }
[ "org.apache.drill.common.expression.SchemaPath", "org.apache.drill.metastore.metadata.Metadata" ]
import org.apache.drill.common.expression.SchemaPath; import org.apache.drill.metastore.metadata.Metadata;
import org.apache.drill.common.expression.*; import org.apache.drill.metastore.metadata.*;
[ "org.apache.drill" ]
org.apache.drill;
660,295
public static void validatePlateInteger(int rows, int columns, PlateInteger plate) { Preconditions.checkNotNull(plate, "Plate cannot be null."); Preconditions.checkArgument(plate.rows() == rows && plate.columns() == columns, "...
static void function(int rows, int columns, PlateInteger plate) { Preconditions.checkNotNull(plate, STR); Preconditions.checkArgument(plate.rows() == rows && plate.columns() == columns, STR); }
/** * Validates the plate by checking for null values and invalid dimensions. * @param int the number of rows * @param int the number of columns * @param PlateInteger the second plate */
Validates the plate by checking for null values and invalid dimensions
validatePlateInteger
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/util/ValUtil.java", "license": "apache-2.0", "size": 22431 }
[ "com.github.jessemull.microflex.integerflex.plate.PlateInteger", "com.google.common.base.Preconditions" ]
import com.github.jessemull.microflex.integerflex.plate.PlateInteger; import com.google.common.base.Preconditions;
import com.github.jessemull.microflex.integerflex.plate.*; import com.google.common.base.*;
[ "com.github.jessemull", "com.google.common" ]
com.github.jessemull; com.google.common;
500,987
public Font getFont() { if (gallery != null) { return gallery.getFont(); } return null; }
Font function() { if (gallery != null) { return gallery.getFont(); } return null; }
/** * Returns the font used for drawing all item labels or <tt>null</tt> if * system font is used. * * @return the font * @see {@link Gallery#getFont()} for setting font for a specific * GalleryItem. */
Returns the font used for drawing all item labels or null if system font is used
getFont
{ "repo_name": "bdaum/zoraPD", "path": "org.eclipse.nebula.widgets.gallery/src/org/eclipse/nebula/widgets/gallery/DefaultGalleryItemRenderer.java", "license": "gpl-2.0", "size": 10471 }
[ "org.eclipse.swt.graphics.Font" ]
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,752,470
public static List<AnnotationFS> selectOverlapping(CAS aCas, Type aType, int aSelBegin, int aSelEnd) { requireAnnotationType(aCas, aType); List<AnnotationFS> annotations = new ArrayList<>(); for (AnnotationFS t : aCas.getAnnotationIndex(aType)) { int begin = t.getBegin(); int end = ...
static List<AnnotationFS> function(CAS aCas, Type aType, int aSelBegin, int aSelEnd) { requireAnnotationType(aCas, aType); List<AnnotationFS> annotations = new ArrayList<>(); for (AnnotationFS t : aCas.getAnnotationIndex(aType)) { int begin = t.getBegin(); int end = t.getEnd(); if (aSelBegin != begin && begin >= aSelEn...
/** * Get a list of annotations of the given annotation type overlapping the given span. Does not use * subiterators and does not respect type prioritites. * * @param aCas * a CAS. * @param aType * a UIMA type. * @param aSelBegin * begin offset. * @param aSelEnd...
Get a list of annotations of the given annotation type overlapping the given span. Does not use subiterators and does not respect type prioritites
selectOverlapping
{ "repo_name": "apache/uima-uimafit", "path": "uimafit-core/src/main/java/org/apache/uima/fit/util/CasUtil.java", "license": "apache-2.0", "size": 50911 }
[ "java.util.ArrayList", "java.util.List", "org.apache.uima.cas.Type", "org.apache.uima.cas.text.AnnotationFS" ]
import java.util.ArrayList; import java.util.List; import org.apache.uima.cas.Type; import org.apache.uima.cas.text.AnnotationFS;
import java.util.*; import org.apache.uima.cas.*; import org.apache.uima.cas.text.*;
[ "java.util", "org.apache.uima" ]
java.util; org.apache.uima;
672,204
@GET @GZIP @Path("jobs/{jobid}/taskstates/paginated") @Produces("application/json") RestPage<TaskStateData> getJobTaskStatesPaginated(@HeaderParam("sessionid") String sessionId, @PathParam("jobid") String jobId, @QueryParam("offset") @DefaultValue("0") int offset, @QueryParam...
@Path(STR) @Produces(STR) RestPage<TaskStateData> getJobTaskStatesPaginated(@HeaderParam(STR) String sessionId, @PathParam("jobid") String jobId, @QueryParam(STR) @DefaultValue("0") int offset, @QueryParam("limit") @DefaultValue("50") int limit) throws NotConnectedRestException, UnknownJobRestException, PermissionRestE...
/** * Returns a list of taskState with pagination * * @param sessionId * a valid session id * @param jobId * the job id * @param offset * the index of the first TaskState to return * @param limit * the index (non inclusive) o...
Returns a list of taskState with pagination
getJobTaskStatesPaginated
{ "repo_name": "tobwiens/scheduling", "path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java", "license": "agpl-3.0", "size": 80291 }
[ "javax.ws.rs.DefaultValue", "javax.ws.rs.HeaderParam", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "org.ow2.proactive_grid_cloud_portal.scheduler.dto.RestPage", "org.ow2.proactive_grid_cloud_portal.scheduler.dto.TaskStateData", "org.ow2.proactive_gr...
import javax.ws.rs.DefaultValue; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.RestPage; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.TaskStateData; i...
import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*;
[ "javax.ws", "org.ow2.proactive_grid_cloud_portal" ]
javax.ws; org.ow2.proactive_grid_cloud_portal;
443,748
public void setViewport(AFPDataObjectInfo dataObjectInfo) { AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo(); // object area descriptor int width = objectAreaInfo.getWidth(); int height = objectAreaInfo.getHeight(); int widthRes = objectAreaInfo.getWidth...
void function(AFPDataObjectInfo dataObjectInfo) { AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo(); int width = objectAreaInfo.getWidth(); int height = objectAreaInfo.getHeight(); int widthRes = objectAreaInfo.getWidthRes(); int heightRes = objectAreaInfo.getHeightRes(); ObjectAreaDescriptor object...
/** * Sets the object view port (area position and size). * * @param dataObjectInfo * the object area info */
Sets the object view port (area position and size)
setViewport
{ "repo_name": "StrategyObject/fop", "path": "src/java/org/apache/fop/afp/modca/AbstractDataObject.java", "license": "apache-2.0", "size": 4795 }
[ "org.apache.fop.afp.AFPDataObjectInfo", "org.apache.fop.afp.AFPObjectAreaInfo", "org.apache.fop.afp.AFPResourceInfo", "org.apache.fop.afp.AFPResourceLevel" ]
import org.apache.fop.afp.AFPDataObjectInfo; import org.apache.fop.afp.AFPObjectAreaInfo; import org.apache.fop.afp.AFPResourceInfo; import org.apache.fop.afp.AFPResourceLevel;
import org.apache.fop.afp.*;
[ "org.apache.fop" ]
org.apache.fop;
2,399,203
public static void deleteNode(ZooKeeperWatcher zkw, String node) throws KeeperException { deleteNode(zkw, node, -1); }
static void function(ZooKeeperWatcher zkw, String node) throws KeeperException { deleteNode(zkw, node, -1); }
/** * Delete the specified node. Sets no watches. Throws all exceptions. */
Delete the specified node. Sets no watches. Throws all exceptions
deleteNode
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java", "license": "apache-2.0", "size": 72700 }
[ "org.apache.zookeeper.KeeperException" ]
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
179,349
@Generated(hash = 97163663) public List<JointIngredientTag> getTags() { if (tags == null) { final DaoSession daoSession = this.daoSession; if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } JointIngre...
@Generated(hash = 97163663) List<JointIngredientTag> function() { if (tags == null) { final DaoSession daoSession = this.daoSession; if (daoSession == null) { throw new DaoException(STR); } JointIngredientTagDao targetDao = daoSession.getJointIngredientTagDao(); List<JointIngredientTag> tagsNew = targetDao._queryIngred...
/** * To-many relationship, resolved on first access (and after reset). * Changes to to-many relations are not persisted, make changes to the target entity. */
To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity
getTags
{ "repo_name": "st1hy/Red-Calorie", "path": "database/src/main/java/com/github/st1hy/countthemcalories/database/IngredientTemplate.java", "license": "mit", "size": 7962 }
[ "java.util.List", "org.greenrobot.greendao.DaoException", "org.greenrobot.greendao.annotation.Generated" ]
import java.util.List; import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.annotation.Generated;
import java.util.*; import org.greenrobot.greendao.*; import org.greenrobot.greendao.annotation.*;
[ "java.util", "org.greenrobot.greendao" ]
java.util; org.greenrobot.greendao;
2,386,860
// push the change into the PLF if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) { // we are dealing with an incorporated node, adding will replace // an existing one for the same target node id and name ParameterEditManager.addParmEditDirective(nodeId, name, value, ...
if (nodeId.startsWith(Constants.FRAGMENT_ID_USER_PREFIX)) { ParameterEditManager.addParmEditDirective(nodeId, name, value, person); } else { Document plf = RDBMDistributedLayoutStore.getPLF(person); Element plfNode = plf.getElementById(nodeId); changeParameterChild(plfNode, name, value); } changeParameterChild(ilfNode,...
/** * Change the parameter for a channel in both the ILF and PLF using the appropriate mechanisms * for incorporated nodes versus owned nodes. */
Change the parameter for a channel in both the ILF and PLF using the appropriate mechanisms for incorporated nodes versus owned nodes
perform
{ "repo_name": "stalele/uPortal", "path": "uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/dlm/LPAChangeParameter.java", "license": "apache-2.0", "size": 3596 }
[ "org.w3c.dom.Document", "org.w3c.dom.Element" ]
import org.w3c.dom.Document; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
939,168
public void setItems(List<ForClauseItem> items) { this.items = items; }
void function(List<ForClauseItem> items) { this.items = items; }
/** * Sets for-clause items. * @param items items */
Sets for-clause items
setItems
{ "repo_name": "mobile-event-processing/Asper", "path": "source/src/com/espertech/esper/client/soda/ForClause.java", "license": "gpl-2.0", "size": 2045 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,220,227
public static ChapterAutoNumber getChapter(Properties attributes) { ChapterAutoNumber chapter = new ChapterAutoNumber(""); setSectionParameters(chapter, attributes); return chapter; }
static ChapterAutoNumber function(Properties attributes) { ChapterAutoNumber chapter = new ChapterAutoNumber(""); setSectionParameters(chapter, attributes); return chapter; }
/** * Creates a ChapterAutoNumber object based on a list of properties. * @param attributes * @return a Chapter */
Creates a ChapterAutoNumber object based on a list of properties
getChapter
{ "repo_name": "shitalm/jsignpdf2", "path": "src/main/java/com/lowagie/text/factories/ElementFactory.java", "license": "gpl-2.0", "size": 19723 }
[ "com.lowagie.text.ChapterAutoNumber", "java.util.Properties" ]
import com.lowagie.text.ChapterAutoNumber; import java.util.Properties;
import com.lowagie.text.*; import java.util.*;
[ "com.lowagie.text", "java.util" ]
com.lowagie.text; java.util;
71,824
public static String dumpMessageHistoryStacktrace(Exchange exchange, ExchangeFormatter exchangeFormatter, boolean logStackTrace) { // must not cause new exceptions so run this in a try catch block try { return doDumpMessageHistoryStacktrace(exchange, exchangeFormatter, logStackTrace); ...
static String function(Exchange exchange, ExchangeFormatter exchangeFormatter, boolean logStackTrace) { try { return doDumpMessageHistoryStacktrace(exchange, exchangeFormatter, logStackTrace); } catch (Throwable e) { return ""; } }
/** * Dumps the {@link MessageHistory} from the {@link Exchange} in a human readable format. * * @param exchange the exchange * @param exchangeFormatter if provided then information about the exchange is included in the dump * @param logStackTrace whether to include a header for...
Dumps the <code>MessageHistory</code> from the <code>Exchange</code> in a human readable format
dumpMessageHistoryStacktrace
{ "repo_name": "objectiser/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java", "license": "apache-2.0", "size": 24151 }
[ "org.apache.camel.Exchange", "org.apache.camel.spi.ExchangeFormatter" ]
import org.apache.camel.Exchange; import org.apache.camel.spi.ExchangeFormatter;
import org.apache.camel.*; import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
659,377
public Vector3f getCrossPoint(Edge edge, boolean extendThisEdge, boolean extendSecondEdge) { Vector3d P1 = new Vector3d(this.getFirstVertex()); Vector3d P2 = new Vector3d(edge.getFirstVertex()); Vector3d u = new Vector3d(this.getSecondVertex()).subtract(P1).normalizeLocal(); Vector3d v = new Vector3d(edge.ge...
Vector3f function(Edge edge, boolean extendThisEdge, boolean extendSecondEdge) { Vector3d P1 = new Vector3d(this.getFirstVertex()); Vector3d P2 = new Vector3d(edge.getFirstVertex()); Vector3d u = new Vector3d(this.getSecondVertex()).subtract(P1).normalizeLocal(); Vector3d v = new Vector3d(edge.getSecondVertex()).subtra...
/** * The method computes the crossing pint of this edge and another edge. If * there is no crossing then null is returned. This method also allows to * get the crossing point of the straight lines that contain these edges if * you set the 'extend' parameter to true. * * @param edge * the edge...
The method computes the crossing pint of this edge and another edge. If there is no crossing then null is returned. This method also allows to get the crossing point of the straight lines that contain these edges if you set the 'extend' parameter to true
getCrossPoint
{ "repo_name": "delftsre/jmonkeyengine", "path": "jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/Edge.java", "license": "bsd-3-clause", "size": 12126 }
[ "com.jme3.math.FastMath", "com.jme3.math.Vector3f", "com.jme3.scene.plugins.blender.math.Vector3d" ]
import com.jme3.math.FastMath; import com.jme3.math.Vector3f; import com.jme3.scene.plugins.blender.math.Vector3d;
import com.jme3.math.*; import com.jme3.scene.plugins.blender.math.*;
[ "com.jme3.math", "com.jme3.scene" ]
com.jme3.math; com.jme3.scene;
2,721,440
@Test public void testUpdate() throws SQLException { DataColumnsUtils.testUpdate(geoPackage); }
void function() throws SQLException { DataColumnsUtils.testUpdate(geoPackage); }
/** * Test updating * * @throws SQLException */
Test updating
testUpdate
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/androidTest/java/mil/nga/geopackage/schema/columns/DataColumnsCreateTest.java", "license": "mit", "size": 1103 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,826,927
public CurveGroupDefinition withCurveDefinitions(List<NodalCurveDefinition> curveDefinitions) { Set<CurveName> curveNames = entries.stream().map(entry -> entry.getCurveName()).collect(toSet()); List<NodalCurveDefinition> filteredDefinitions = curveDefinitions.stream().filter(def -> curveNames.contains...
CurveGroupDefinition function(List<NodalCurveDefinition> curveDefinitions) { Set<CurveName> curveNames = entries.stream().map(entry -> entry.getCurveName()).collect(toSet()); List<NodalCurveDefinition> filteredDefinitions = curveDefinitions.stream().filter(def -> curveNames.contains(def.getName())).collect(toImmutableL...
/** * Returns a copy of this object containing the specified curve definitions. * <p> * Curves are ignored if there is no entry in this definition with the same curve name. * * @param curveDefinitions curve definitions * @return a copy of this object containing the specified curve definitions */
Returns a copy of this object containing the specified curve definitions. Curves are ignored if there is no entry in this definition with the same curve name
withCurveDefinitions
{ "repo_name": "jmptrader/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/curve/CurveGroupDefinition.java", "license": "apache-2.0", "size": 26188 }
[ "java.util.List", "java.util.Set" ]
import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,827,472
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.SEQUENCE__INPUT_CONNECTOR); childrenFeatures.add(EsbPackage.Literals.SEQUENCE__OUTPUT_CONNECTOR); chi...
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EsbPackage.Literals.SEQUENCE__INPUT_CONNECTOR); childrenFeatures.add(EsbPackage.Literals.SEQUENCE__OUTPUT_CONNECTOR); childrenFeatures.add(EsbPackage.Literals.SEQUEN...
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/SequenceItemProvider.java", "license": "apache-2.0", "size": 19589 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import java.util.*; import org.eclipse.emf.ecore.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "java.util", "org.eclipse.emf", "org.wso2.developerstudio" ]
java.util; org.eclipse.emf; org.wso2.developerstudio;
1,510,767
data = new ArrayList<String>(); BufferedReader bfdrd = new BufferedReader(reader); try { String line = bfdrd.readLine(); while (line!=null) { data.add(line); line = bfdrd.readLine(); } bfdrd.close(); ...
data = new ArrayList<String>(); BufferedReader bfdrd = new BufferedReader(reader); try { String line = bfdrd.readLine(); while (line!=null) { data.add(line); line = bfdrd.readLine(); } bfdrd.close(); reader.close(); } catch(IOException e) { throw new IDMapperException(e); } }
/** * Read data. * @param reader to read data from * @throws IDMapperException when file can't be read */
Read data
readData
{ "repo_name": "amarillion/BridgeDb", "path": "org.bridgedb/src/org/bridgedb/file/IDMappingReaderFromDelimitedReader.java", "license": "apache-2.0", "size": 7669 }
[ "java.io.BufferedReader", "java.io.IOException", "java.util.ArrayList", "org.bridgedb.IDMapperException" ]
import java.io.BufferedReader; import java.io.IOException; import java.util.ArrayList; import org.bridgedb.IDMapperException;
import java.io.*; import java.util.*; import org.bridgedb.*;
[ "java.io", "java.util", "org.bridgedb" ]
java.io; java.util; org.bridgedb;
1,111,906
protected final Class<?> defineClass(String className, byte[] classRep, int offset, int length, ProtectionDomain protectionDomain) throws java.lang.ClassFormatError { return null; }
final Class<?> function(String className, byte[] classRep, int offset, int length, ProtectionDomain protectionDomain) throws java.lang.ClassFormatError { return null; }
/** * Constructs a new class from an array of bytes containing a class * definition in class file format and assigns the specified protection * domain to the new class. If the provided protection domain is * {@code null} then a default protection domain is assigned to the class. * * @param...
Constructs a new class from an array of bytes containing a class definition in class file format and assigns the specified protection domain to the new class. If the provided protection domain is null then a default protection domain is assigned to the class
defineClass
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/luni-kernel/src/main/java/java/lang/ClassLoader.java", "license": "apache-2.0", "size": 27509 }
[ "java.security.ProtectionDomain" ]
import java.security.ProtectionDomain;
import java.security.*;
[ "java.security" ]
java.security;
312,515
List<T> getAll();
List<T> getAll();
/** * Get all entity objects. * * @return */
Get all entity objects
getAll
{ "repo_name": "Rocky-Hu/jecstore", "path": "base-main/base-service/src/main/java/net/oxmall/base/service/GenericService.java", "license": "gpl-2.0", "size": 2704 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,568,318
public void setPort(int port) { Preconditions.checkArgument(port > 0, "port must be positive: %s", port); this.port = port; }
void function(int port) { Preconditions.checkArgument(port > 0, STR, port); this.port = port; }
/** * Cannot be set if {@link #setAllPartitionsSpecification(String)} is set * @param port Serving Layer port to communicate with */
Cannot be set if <code>#setAllPartitionsSpecification(String)</code> is set
setPort
{ "repo_name": "rajatchhajed/myrrix-recommender", "path": "client/src/net/myrrix/client/MyrrixClientConfiguration.java", "license": "apache-2.0", "size": 6735 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
701,110
public Iterable<String> split(final CharSequence sequence) { checkNotNull(sequence);
Iterable<String> function(final CharSequence sequence) { checkNotNull(sequence);
/** * Splits {@code sequence} into string components and makes them available * through an {@link Iterator}, which may be lazily evaluated. * * @param sequence the sequence of characters to split * @return an iteration over the segments split from the parameter. */
Splits sequence into string components and makes them available through an <code>Iterator</code>, which may be lazily evaluated
split
{ "repo_name": "hceylan/guava", "path": "guava/src/com/google/common/base/Splitter.java", "license": "apache-2.0", "size": 20472 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,446,976
public void initMetaData() { EiColumn eiColumn; eiColumn = new EiColumn("segNo"); eiColumn.setPrimaryKey(true); eiColumn.setFieldLength(20); eiColumn.setDescName("业务单元代码"); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn("settleId"); eiColumn.setPrimaryKey(true); eiColumn.setFieldLen...
void function() { EiColumn eiColumn; eiColumn = new EiColumn("segNo"); eiColumn.setPrimaryKey(true); eiColumn.setFieldLength(20); eiColumn.setDescName(STR); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn(STR); eiColumn.setPrimaryKey(true); eiColumn.setFieldLength(20); eiColumn.setDescName(STR); eiMetadata.addMet...
/** * initialize the metadata */
initialize the metadata
initMetaData
{ "repo_name": "stserp/erp1", "path": "source/src/com/baosight/sts/st/zw/domain/STZW020101.java", "license": "apache-2.0", "size": 47291 }
[ "com.baosight.iplat4j.core.ei.EiColumn" ]
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.ei.*;
[ "com.baosight.iplat4j" ]
com.baosight.iplat4j;
2,086,567
public static void startFinalizer( Class<?> finalizableReferenceClass, ReferenceQueue<Object> queue, PhantomReference<Object> frqReference) { if (!finalizableReferenceClass.getName().equals(FINALIZABLE_REFERENCE)) { throw new IllegalArgumentException( "Expected " + FINALIZAB...
static void function( Class<?> finalizableReferenceClass, ReferenceQueue<Object> queue, PhantomReference<Object> frqReference) { if (!finalizableReferenceClass.getName().equals(FINALIZABLE_REFERENCE)) { throw new IllegalArgumentException( STR + FINALIZABLE_REFERENCE + "."); } Finalizer finalizer = new Finalizer(finaliz...
/** * Starts the Finalizer thread. FinalizableReferenceQueue calls this method * reflectively. * * @param finalizableReferenceClass FinalizableReference.class. * @param queue a reference queue that the thread will poll. * @param frqReference a phantom reference to the FinalizableReferenceQueue, which ...
Starts the Finalizer thread. FinalizableReferenceQueue calls this method reflectively
startFinalizer
{ "repo_name": "sensui/guava-libraries", "path": "guava/src/com/google/common/base/internal/Finalizer.java", "license": "apache-2.0", "size": 7568 }
[ "java.lang.ref.PhantomReference", "java.lang.ref.ReferenceQueue", "java.lang.ref.WeakReference", "java.lang.reflect.Field", "java.util.logging.Level" ]
import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.lang.reflect.Field; import java.util.logging.Level;
import java.lang.ref.*; import java.lang.reflect.*; import java.util.logging.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,272,478
private ProtocolSummary[] makeArray(DBconnection conn, List found) throws SQLException { ProtocolSummary[] searchResults = null; searchResults = new ProtocolSummary[found.size()]; searchResults = (ProtocolSummary[]) found.toArray(searchResults); for (int i = 0; i < searchResults.length; i++) { search...
ProtocolSummary[] function(DBconnection conn, List found) throws SQLException { ProtocolSummary[] searchResults = null; searchResults = new ProtocolSummary[found.size()]; searchResults = (ProtocolSummary[]) found.toArray(searchResults); for (int i = 0; i < searchResults.length; i++) { searchResults[i].populate(conn); s...
/** * create array of ProtocolSummary objects from list of found objects; * populate extra info needed for display of current slice * (description etc.) * * @param conn -- DB connection * @param found -- found objects * @return ProtocolSummary -- array of results to be displayed ...
create array of ProtocolSummary objects from list of found objects; populate extra info needed for display of current slice (description etc.)
makeArray
{ "repo_name": "tair/tairwebapp", "path": "src/org/tair/search/ProtocolSearcher.java", "license": "gpl-3.0", "size": 18522 }
[ "java.sql.SQLException", "java.util.List", "org.tair.tfc.DBconnection" ]
import java.sql.SQLException; import java.util.List; import org.tair.tfc.DBconnection;
import java.sql.*; import java.util.*; import org.tair.tfc.*;
[ "java.sql", "java.util", "org.tair.tfc" ]
java.sql; java.util; org.tair.tfc;
1,472,754
protected void doAction(ActionEvent event) { MarkGuideReadAction.markSelectedGuides(false); }
void function(ActionEvent event) { MarkGuideReadAction.markSelectedGuides(false); }
/** * Actual action. * * @param event original event object. */
Actual action
doAction
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/core/actions/guide/MarkGuideUnreadAction.java", "license": "gpl-2.0", "size": 2206 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,511,320
private final ClientContext createClientContext() throws Exception { return PlatformClient.getService(ClientContextFactory.class).create(PlatformClient.getClientConfiguration(), getServerEndpoint().toURI()); }
final ClientContext function() throws Exception { return PlatformClient.getService(ClientContextFactory.class).create(PlatformClient.getClientConfiguration(), getServerEndpoint().toURI()); }
/** * Returns the Dolphin Platform configuration for the client. As long as all the default configurations can be used * this method don't need to be overridden. The URL of the server will be configured by the {@link DolphinPlatformApplication#getServerEndpoint()} * method. * * @return The Dolp...
Returns the Dolphin Platform configuration for the client. As long as all the default configurations can be used this method don't need to be overridden. The URL of the server will be configured by the <code>DolphinPlatformApplication#getServerEndpoint()</code> method
createClientContext
{ "repo_name": "canoo/dolphin-platform", "path": "platform/dolphin-platform-remoting-client-javafx/src/main/java/com/canoo/platform/remoting/client/javafx/DolphinPlatformApplication.java", "license": "apache-2.0", "size": 10928 }
[ "com.canoo.platform.client.PlatformClient", "com.canoo.platform.remoting.client.ClientContext", "com.canoo.platform.remoting.client.ClientContextFactory" ]
import com.canoo.platform.client.PlatformClient; import com.canoo.platform.remoting.client.ClientContext; import com.canoo.platform.remoting.client.ClientContextFactory;
import com.canoo.platform.client.*; import com.canoo.platform.remoting.client.*;
[ "com.canoo.platform" ]
com.canoo.platform;
2,132,459
public static String optionalAttributeValue(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } ...
static String function(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } return null; }
/** * Returns the optional String value of the given name */
Returns the optional String value of the given name
optionalAttributeValue
{ "repo_name": "fabric8io/fabric8-forge", "path": "addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/ConfigureEndpointPropertiesStep.java", "license": "apache-2.0", "size": 40892 }
[ "java.util.Map", "org.jboss.forge.roaster.model.util.Strings" ]
import java.util.Map; import org.jboss.forge.roaster.model.util.Strings;
import java.util.*; import org.jboss.forge.roaster.model.util.*;
[ "java.util", "org.jboss.forge" ]
java.util; org.jboss.forge;
2,671,147
Observable<NamespaceAuthorizationRule> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
Observable<NamespaceAuthorizationRule> listAuthorizationRulesAsync(final String resourceGroupName, final String namespaceName);
/** * Gets a list of authorization rules for a Namespace. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable fo...
Gets a list of authorization rules for a Namespace
listAuthorizationRulesAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/eventhubs/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/eventhubs/v2017_04_01/Namespaces.java", "license": "mit", "size": 6314 }
[ "com.microsoft.azure.management.eventhubs.v2017_04_01.NamespaceAuthorizationRule" ]
import com.microsoft.azure.management.eventhubs.v2017_04_01.NamespaceAuthorizationRule;
import com.microsoft.azure.management.eventhubs.v2017_04_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
241,979
public double calculate(List<Double> list) { double mean = this.mean(list); double sum = 0; for(double db : list) { sum += Math.pow(db - mean, 2); } return sum / list.size(); }
double function(List<Double> list) { double mean = this.mean(list); double sum = 0; for(double db : list) { sum += Math.pow(db - mean, 2); } return sum / list.size(); }
/** * Calculates the population variance. * @param List<Double> the list * @return the result */
Calculates the population variance
calculate
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/doubleflex/stat/PopulationVarianceDouble.java", "license": "apache-2.0", "size": 8006 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,082,656
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<SearchDocumentsResult>> searchPostWithResponseAsync( SearchRequest searchRequest, RequestOptions requestOptions, Context context) { final String accept = "application/json; odata.metadata=none"; UUID xMsClientRequestIdI...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<SearchDocumentsResult>> function( SearchRequest searchRequest, RequestOptions requestOptions, Context context) { final String accept = STR; UUID xMsClientRequestIdInternal = null; if (requestOptions != null) { xMsClientRequestIdInternal = requestOptions.getXMsCl...
/** * Searches for documents in the index. * * @param searchRequest The definition of the Search request. * @param requestOptions Parameter group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. ...
Searches for documents in the index
searchPostWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/implementation/DocumentsImpl.java", "license": "mit", "size": 38438 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.search.documents.implementation.models.RequestOptions", "com.azure.search.documents.implementation.models.SearchDocumentsResult", "com.azure.s...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.search.documents.implementation.models.RequestOptions; import com.azure.search.documents.implementation.models.SearchDocumentsResult...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.search.documents.implementation.models.*;
[ "com.azure.core", "com.azure.search" ]
com.azure.core; com.azure.search;
361,683
@Test void testGroupByDaySortLimit() { final String sql = "select \"brand_name\"," + " floor(\"timestamp\" to DAY) as d," + " sum(\"unit_sales\") as s\n" + "from \"foodmart\"\n" + "group by \"brand_name\", floor(\"timestamp\" to DAY)\n" + "order by s desc limit 30"; fin...
@Test void testGroupByDaySortLimit() { final String sql = STRbrand_name\"," + STRtimestamp\STR + STRunit_sales\STR + STRfoodmart\"\n" + STRbrand_name\STRtimestamp\STR + STR; final String druidQueryPart1 = STR; final String druidQueryPart2 = STR + STR + STR + STR + STR; final String explain = STR + STR + STR + STR; sql(...
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-1579">[CALCITE-1579] * Druid adapter: wrong semantics of groupBy query limit with * granularity</a>. * * <p>Before CALCITE-1579 was fixed, this would use a "groupBy" query but * wrongly try to use a {@code limitSpec} to sort an...
Test case for [CALCITE-1579] Druid adapter: wrong semantics of groupBy query limit with granularity. Before CALCITE-1579 was fixed, this would use a "groupBy" query but wrongly try to use a limitSpec to sort and filter. (A "topN" query
testGroupByDaySortLimit
{ "repo_name": "googleinterns/calcite", "path": "druid/src/test/java/org/apache/calcite/test/DruidAdapter2IT.java", "license": "apache-2.0", "size": 202207 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
33,410
private org.eclipse.swt.graphics.Point getPointInRectangle(int x, int y, Rectangle area) { x = Math.max(area.x, Math.min(x, area.x + area.width)); y = Math.max(area.y, Math.min(y, area.y + area.height)); return new org.eclipse.swt.graphics.Point(x, y); }
org.eclipse.swt.graphics.Point function(int x, int y, Rectangle area) { x = Math.max(area.x, Math.min(x, area.x + area.width)); y = Math.max(area.y, Math.min(y, area.y + area.height)); return new org.eclipse.swt.graphics.Point(x, y); }
/** * Returns a point based on (x, y) but constrained to be within the bounds * of the given rectangle. This method could be moved to JCommon. * * @param x the x-coordinate. * @param y the y-coordinate. * @param area the rectangle (<code>null</code> not permitted). * * @retur...
Returns a point based on (x, y) but constrained to be within the bounds of the given rectangle. This method could be moved to JCommon
getPointInRectangle
{ "repo_name": "raincs13/phd", "path": "swt/org/jfree/experimental/chart/swt/ChartComposite.java", "license": "lgpl-2.1", "size": 69511 }
[ "java.awt.Point", "org.eclipse.swt.graphics.Rectangle" ]
import java.awt.Point; import org.eclipse.swt.graphics.Rectangle;
import java.awt.*; import org.eclipse.swt.graphics.*;
[ "java.awt", "org.eclipse.swt" ]
java.awt; org.eclipse.swt;
1,964,934
public static void upgradeIndicesIfNeeded(final Settings settings, final NodeEnvironment nodeEnv) throws IOException { final IndexFolderUpgrader upgrader = new IndexFolderUpgrader(settings, nodeEnv); for (String indexFolderName : nodeEnv.availableIndexFolders()) { upgrader.upgrade(indexF...
static void function(final Settings settings, final NodeEnvironment nodeEnv) throws IOException { final IndexFolderUpgrader upgrader = new IndexFolderUpgrader(settings, nodeEnv); for (String indexFolderName : nodeEnv.availableIndexFolders()) { upgrader.upgrade(indexFolderName); } }
/** * Upgrades all indices found under <code>nodeEnv</code>. Already upgraded indices are ignored. */
Upgrades all indices found under <code>nodeEnv</code>. Already upgraded indices are ignored
upgradeIndicesIfNeeded
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/util/IndexFolderUpgrader.java", "license": "apache-2.0", "size": 6450 }
[ "java.io.IOException", "org.elasticsearch.common.settings.Settings", "org.elasticsearch.env.NodeEnvironment" ]
import java.io.IOException; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.env.NodeEnvironment;
import java.io.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.env.*;
[ "java.io", "org.elasticsearch.common", "org.elasticsearch.env" ]
java.io; org.elasticsearch.common; org.elasticsearch.env;
941,718
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<Void>, Void> beginStart( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs) { return beginStartAsync(resourceGroupName, vmScaleSetName, vmInstanceIDs).getSync...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs) { return beginStartAsync(resourceGroupName, vmScaleSetName, vmInstanceIDs).getSyncPoller(); }
/** * Starts one or more virtual machines in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machine instance IDs from the VM scale set. * @throws IllegalArgumentExce...
Starts one or more virtual machines in a VM scale set
beginStart
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineScaleSetsClientImpl.java", "license": "mit", "size": 352067 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.compute.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,864,464
@Generated @Selector("setFontColor:") public native void setFontColor(UIColor value);
@Selector(STR) native void function(UIColor value);
/** * Base color that the text is rendered with (if supported by the font) */
Base color that the text is rendered with (if supported by the font)
setFontColor
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/spritekit/SKLabelNode.java", "license": "apache-2.0", "size": 12139 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,697,044
protected static UUID uuidFromValue(Value val) { try { return UUID.fromString(val.getString()); } catch (RuntimeException e) { return null; } }
static UUID function(Value val) { try { return UUID.fromString(val.getString()); } catch (RuntimeException e) { return null; } }
/** * Converts value to UUID safe (suppressing exceptions). * * @param val UUID. */
Converts value to UUID safe (suppressing exceptions)
uuidFromValue
{ "repo_name": "amirakhmedov/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/sys/view/SqlAbstractLocalSystemView.java", "license": "apache-2.0", "size": 4644 }
[ "java.util.UUID", "org.h2.value.Value" ]
import java.util.UUID; import org.h2.value.Value;
import java.util.*; import org.h2.value.*;
[ "java.util", "org.h2.value" ]
java.util; org.h2.value;
924,159
public static IProject[] getProjectsUnderPath(final IPath path) { IProject[] allProjects = getProjectsForContainerMatch(ResourcesPlugin .getWorkspace().getRoot()); Set<IProject> projects = new HashSet<IProject>(); for (IProject p : allProjects) if (path.isPrefixOf(p.getLocation())) projects.add(p); ...
static IProject[] function(final IPath path) { IProject[] allProjects = getProjectsForContainerMatch(ResourcesPlugin .getWorkspace().getRoot()); Set<IProject> projects = new HashSet<IProject>(); for (IProject p : allProjects) if (path.isPrefixOf(p.getLocation())) projects.add(p); return projects.toArray(new IProject[pr...
/** * Find projects located under the given path * * @param path * absolute path under which to look for projects * @return projects located under the given path */
Find projects located under the given path
getProjectsUnderPath
{ "repo_name": "SmithAndr/egit", "path": "org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ProjectUtil.java", "license": "epl-1.0", "size": 16026 }
[ "java.util.HashSet", "java.util.Set", "org.eclipse.core.resources.IProject", "org.eclipse.core.resources.ResourcesPlugin", "org.eclipse.core.runtime.IPath" ]
import java.util.HashSet; import java.util.Set; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath;
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "java.util", "org.eclipse.core" ]
java.util; org.eclipse.core;
1,606,159
public ServiceReference getServiceReference() { return ref; } /** * Returns the type of this event. * * <p> * The type values are {@link #ROLE_CREATED} type, {@link #ROLE_CHANGED}
ServiceReference function() { return ref; } /** * Returns the type of this event. * * <p> * The type values are {@link #ROLE_CREATED} type, {@link #ROLE_CHANGED}
/** * Gets the <code>ServiceReference</code> object of the User Admin service * that generated this event. * * @return The User Admin service's <code>ServiceReference</code> object. */
Gets the <code>ServiceReference</code> object of the User Admin service that generated this event
getServiceReference
{ "repo_name": "lbchen/odl-mod", "path": "opendaylight/samples/northbound/loadbalancer/target/enunciate-scratch/enunciate36928727411227568915205/OSGI-OPT/src/org/osgi/service/useradmin/UserAdminEvent.java", "license": "epl-1.0", "size": 3205 }
[ "org.osgi.framework.ServiceReference" ]
import org.osgi.framework.ServiceReference;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
308,647
public Table createMultiRegionTable(TableName tableName, byte[][] families, int numVersions) throws IOException { return createTable(tableName, families, numVersions, KEYS_FOR_HBA_CREATE_TABLE); }
Table function(TableName tableName, byte[][] families, int numVersions) throws IOException { return createTable(tableName, families, numVersions, KEYS_FOR_HBA_CREATE_TABLE); }
/** * Create a table with multiple regions. * @param tableName * @param families * @param numVersions * @return A Table instance for the created table. * @throws IOException */
Create a table with multiple regions
createMultiRegionTable
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 173926 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.Table" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.Table;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,069,414
void onCreate(Bundle savedInstanceState, PersistableBundle persistentState);
void onCreate(Bundle savedInstanceState, PersistableBundle persistentState);
/** * Called from Activity#onCreate(Bundle savedInstanceState, PersistableBundle persistentState) * * @param savedInstanceState saved instance state * @param persistentState persistent state */
Called from Activity#onCreate(Bundle savedInstanceState, PersistableBundle persistentState)
onCreate
{ "repo_name": "Bodo1981/BaseKit", "path": "common/src/main/java/com/christianbahl/basekit/common/activity/CBIActivityDelegate.java", "license": "apache-2.0", "size": 3802 }
[ "android.os.Bundle", "android.os.PersistableBundle" ]
import android.os.Bundle; import android.os.PersistableBundle;
import android.os.*;
[ "android.os" ]
android.os;
1,320,913
@After public void stopServer() throws InterruptedException { m_server.shutdown(); MockLogAppender.assertNoWarningsOrGreater(); }
void function() throws InterruptedException { m_server.shutdown(); MockLogAppender.assertNoWarningsOrGreater(); }
/** * Cleans up the Syslog server after each test runs. * @throws InterruptedException */
Cleans up the Syslog server after each test runs
stopServer
{ "repo_name": "roskens/opennms-pre-github", "path": "opennms-alarms/syslog-northbounder/src/test/java/org/opennms/netmgt/alarmd/northbounder/syslog/SyslogNorthBounderTest.java", "license": "agpl-3.0", "size": 13657 }
[ "org.opennms.core.test.MockLogAppender" ]
import org.opennms.core.test.MockLogAppender;
import org.opennms.core.test.*;
[ "org.opennms.core" ]
org.opennms.core;
1,758,609
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.setShort("xTile", (short)this.xTile); par1NBTTagCompound.setShort("yTile", (short)this.yTile); par1NBTTagCompound.setShort("zTile", (short)this.zTile); par1NBTTagCompound.setShort("life", (short)...
void function(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.setShort("xTile", (short)this.xTile); par1NBTTagCompound.setShort("yTile", (short)this.yTile); par1NBTTagCompound.setShort("zTile", (short)this.zTile); par1NBTTagCompound.setShort("life", (short)this.ticksInGround); par1NBTTagCompound.setByte(STR, (b...
/** * (abstract) Protected helper method to write subclass entity data to NBT. */
(abstract) Protected helper method to write subclass entity data to NBT
writeEntityToNBT
{ "repo_name": "immediately/rancraftPeng172p", "path": "java/rancraftPenguins/EntityPenguinShuriken.java", "license": "gpl-3.0", "size": 21350 }
[ "net.minecraft.block.Block", "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.block.Block; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.block.*; import net.minecraft.nbt.*;
[ "net.minecraft.block", "net.minecraft.nbt" ]
net.minecraft.block; net.minecraft.nbt;
1,511,557
static void b2iBig(byte[] in, int inOfs, int[] out, int outOfs, int len) { if ((inOfs < 0) || ((in.length - inOfs) < len) || (outOfs < 0) || ((out.length - outOfs) < len/4)) { throw new ArrayIndexOutOfBoundsException(); } if (littleEndianUnaligned) { inOfs...
static void b2iBig(byte[] in, int inOfs, int[] out, int outOfs, int len) { if ((inOfs < 0) ((in.length - inOfs) < len) (outOfs < 0) ((out.length - outOfs) < len/4)) { throw new ArrayIndexOutOfBoundsException(); } if (littleEndianUnaligned) { inOfs += byteArrayOfs; len += inOfs; while (inOfs < len) { out[outOfs++] = rev...
/** * byte[] to int[] conversion, big endian byte order. */
byte[] to int[] conversion, big endian byte order
b2iBig
{ "repo_name": "JetBrains/jdk8u_jdk", "path": "src/share/classes/sun/security/provider/ByteArrayAccess.java", "license": "gpl-2.0", "size": 20390 }
[ "java.lang.Integer", "java.lang.Long" ]
import java.lang.Integer; import java.lang.Long;
import java.lang.*;
[ "java.lang" ]
java.lang;
2,080,149
MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs);
MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs);
/** * Returns a new {@link MediaPeriod} identified by {@code periodId}. * * <p>Should not be called directly from application code. * * <p>Must only be called if the source is enabled. * * @param id The identifier of the period. * @param allocator An {@link Allocator} from which to obtain media ...
Returns a new <code>MediaPeriod</code> identified by periodId. Should not be called directly from application code. Must only be called if the source is enabled
createPeriod
{ "repo_name": "google/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/source/MediaSource.java", "license": "apache-2.0", "size": 13260 }
[ "com.google.android.exoplayer2.upstream.Allocator" ]
import com.google.android.exoplayer2.upstream.Allocator;
import com.google.android.exoplayer2.upstream.*;
[ "com.google.android" ]
com.google.android;
586,342
public Vector<MyBitSet> getReachabilityForAllStates() { Vector<MyBitSet> v = new Vector<MyBitSet>(); v.setSize(_state_to_scc.size()); for (int i = 0; i < _state_to_scc.size(); ++i) { int scc = state2scc(i); MyBitSet reachable_sccs = _reachability.get(scc); MyBitSet reachable_states = new MyBitSet();...
Vector<MyBitSet> function() { Vector<MyBitSet> v = new Vector<MyBitSet>(); v.setSize(_state_to_scc.size()); for (int i = 0; i < _state_to_scc.size(); ++i) { int scc = state2scc(i); MyBitSet reachable_sccs = _reachability.get(scc); MyBitSet reachable_states = new MyBitSet(); for (Integer it : reachable_sccs) { reachable...
/** Get a vector of BitSets with reachability information * (state -> reachable_states) */
Get a vector of BitSets with reachability information (state -> reachable_states)
getReachabilityForAllStates
{ "repo_name": "nicodelpiano/prism", "path": "src/jltl2dstar/SCCs.java", "license": "gpl-2.0", "size": 4139 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,556,625
public Object getProperty(String name) throws PropertyException; /** * Specify the JAXP 1.3 {@link Schema Schema} * object that should be used to validate subsequent unmarshal operations * against. Passing null into this method will disable validation. * <p> * This method replaces the...
Object function(String name) throws PropertyException; /** * Specify the JAXP 1.3 {@link Schema Schema} * object that should be used to validate subsequent unmarshal operations * against. Passing null into this method will disable validation. * <p> * This method replaces the deprecated {@link #setValidating(boolean) se...
/** * Get the particular property in the underlying implementation of * <tt>Unmarshaller</tt>. This method can only be used to get one of * the standard JAXB defined properties above or a provider specific * property. Attempting to get an undefined property will result in * a PropertyExceptio...
Get the particular property in the underlying implementation of Unmarshaller. This method can only be used to get one of the standard JAXB defined properties above or a provider specific property. Attempting to get an undefined property will result in a PropertyException being thrown. See Supported Properties
getProperty
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/javax/xml/bind/Unmarshaller.java", "license": "apache-2.0", "size": 48681 }
[ "javax.xml.validation.Schema" ]
import javax.xml.validation.Schema;
import javax.xml.validation.*;
[ "javax.xml" ]
javax.xml;
1,471,345
protected void postProcessApplicationContext(ConfigurableApplicationContext context) { if (this.beanNameGenerator != null) { context.getBeanFactory().registerSingleton( AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, this.beanNameGenerator); } if (this.resourceLoader != null) { if (con...
void function(ConfigurableApplicationContext context) { if (this.beanNameGenerator != null) { context.getBeanFactory().registerSingleton( AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR, this.beanNameGenerator); } if (this.resourceLoader != null) { if (context instanceof GenericApplicationContext) { ((GenericAp...
/** * Apply any relevant post processing the {@link ApplicationContext}. Subclasses can * apply additional processing as required. * @param context the application context */
Apply any relevant post processing the <code>ApplicationContext</code>. Subclasses can apply additional processing as required
postProcessApplicationContext
{ "repo_name": "candrews/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/SpringApplication.java", "license": "apache-2.0", "size": 44385 }
[ "org.springframework.context.ConfigurableApplicationContext", "org.springframework.context.annotation.AnnotationConfigUtils", "org.springframework.context.support.GenericApplicationContext", "org.springframework.core.io.DefaultResourceLoader" ]
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.context.*; import org.springframework.context.annotation.*; import org.springframework.context.support.*; import org.springframework.core.io.*;
[ "org.springframework.context", "org.springframework.core" ]
org.springframework.context; org.springframework.core;
422,577
@VisibleForTesting Path getAndValidateTempFilePath(Record record, String sourceFileName) throws StageException { RecordEL.setRecordInContext(variables, record); String dirPath; try { dirPath = resolveEL(tempDirElEval, variables, jobConfig.tempDir, String.class); } catch (ELEvalException ex) { ...
Path getAndValidateTempFilePath(Record record, String sourceFileName) throws StageException { RecordEL.setRecordInContext(variables, record); String dirPath; try { dirPath = resolveEL(tempDirElEval, variables, jobConfig.tempDir, String.class); } catch (ELEvalException ex) { throw new TransformerStageCheckedException(Er...
/** * Return the temporary parquet file path and validate the path * @param record the {@link com.streamsets.pipeline.api.Record} whole file record * @param sourceFileName the source Avro file name */
Return the temporary parquet file path and validate the path
getAndValidateTempFilePath
{ "repo_name": "kunickiaj/datacollector", "path": "wholefile-transformer-lib/src/main/java/com/streamsets/pipeline/stage/processor/transformer/WholeFileTransformerProcessor.java", "license": "apache-2.0", "size": 12565 }
[ "com.streamsets.pipeline.api.Record", "com.streamsets.pipeline.api.StageException", "com.streamsets.pipeline.api.el.ELEvalException", "com.streamsets.pipeline.lib.el.RecordEL", "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.Paths", "org.apache.parquet.Strings" ]
import com.streamsets.pipeline.api.Record; import com.streamsets.pipeline.api.StageException; import com.streamsets.pipeline.api.el.ELEvalException; import com.streamsets.pipeline.lib.el.RecordEL; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.a...
import com.streamsets.pipeline.api.*; import com.streamsets.pipeline.api.el.*; import com.streamsets.pipeline.lib.el.*; import java.io.*; import java.nio.file.*; import org.apache.parquet.*;
[ "com.streamsets.pipeline", "java.io", "java.nio", "org.apache.parquet" ]
com.streamsets.pipeline; java.io; java.nio; org.apache.parquet;
1,114,327
public static void runReportToHtmlFile( String sourceFileName, String destFileName, Map parameters ) throws JRException { JasperPrint jasperPrint = JasperFillManager.fillReport(sourceFileName, parameters); JasperExportManager.exportReportToHtmlFile(jasperPrint, destFileName); }
static void function( String sourceFileName, String destFileName, Map parameters ) throws JRException { JasperPrint jasperPrint = JasperFillManager.fillReport(sourceFileName, parameters); JasperExportManager.exportReportToHtmlFile(jasperPrint, destFileName); }
/** * Fills a report and saves it directly into a HTML file. * The intermediate JasperPrint object is not saved on disk. * * @param sourceFileName source file containing the compile report design * @param destFileName name of the destination HTML file * @param parameters report parameters map * @thr...
Fills a report and saves it directly into a HTML file. The intermediate JasperPrint object is not saved on disk
runReportToHtmlFile
{ "repo_name": "delafer/j7project", "path": "jasper352/csb-jasperreport-dep/src/net/sf/jasperreports/engine/JasperRunManager.java", "license": "gpl-2.0", "size": 16511 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
386,135
private void deleteContainerIfEmpty(String container){ if(deleteEmptyContainers) { ContainerApi containerApi = swiftApi.containerApiInRegion(region); containerApi.deleteIfEmpty(container); } }
void function(String container){ if(deleteEmptyContainers) { ContainerApi containerApi = swiftApi.containerApiInRegion(region); containerApi.deleteIfEmpty(container); } }
/** * Delete the container if it is empty. */
Delete the container if it is empty
deleteContainerIfEmpty
{ "repo_name": "OpenCollabZA/sakai-openstack-swift", "path": "src/main/java/coza/opencollab/sakai/swift/SwiftFileSystemHandler.java", "license": "apache-2.0", "size": 15462 }
[ "org.jclouds.openstack.swift.v1.features.ContainerApi" ]
import org.jclouds.openstack.swift.v1.features.ContainerApi;
import org.jclouds.openstack.swift.v1.features.*;
[ "org.jclouds.openstack" ]
org.jclouds.openstack;
1,956,748
@Override protected void registerNatives() throws KettlePluginException { // None at this moment }
void function() throws KettlePluginException { }
/** * Scan & register internal row distribution plugins */
Scan & register internal row distribution plugins
registerNatives
{ "repo_name": "tkafalas/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/step/RowDistributionPluginType.java", "license": "apache-2.0", "size": 3840 }
[ "org.pentaho.di.core.exception.KettlePluginException" ]
import org.pentaho.di.core.exception.KettlePluginException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,886,952
@Override public void finish() throws IOException { // TODO: is there a bug here? why not checkOpen? if (out == null) { throw new IOException("Stream is closed"); } if (cDir == null) { return; } if (entries.isEmpty()) { throw ne...
void function() throws IOException { if (out == null) { throw new IOException(STR); } if (cDir == null) { return; } if (entries.isEmpty()) { throw new ZipException(STR); } if (currentEntry != null) { closeEntry(); } int cdirSize = cDir.size(); writeLong(cDir, ENDSIG); writeShort(cDir, 0); writeShort(cDir, 0); writeShor...
/** * Indicates that all entries have been written to the stream. Any terminal * information is written to the underlying stream. * * @throws IOException * if an error occurs while terminating the stream. */
Indicates that all entries have been written to the stream. Any terminal information is written to the underlying stream
finish
{ "repo_name": "intrigus/jtransc", "path": "jtransc-rt/src/java/util/zip/ZipOutputStream.java", "license": "apache-2.0", "size": 15053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,422,204
public int startOpNoThrow(int op, int uid, String packageName) { try { return mService.startOperation(getToken(mService), op, uid, packageName); } catch (RemoteException e) { } return MODE_IGNORED; }
int function(int op, int uid, String packageName) { try { return mService.startOperation(getToken(mService), op, uid, packageName); } catch (RemoteException e) { } return MODE_IGNORED; }
/** * Like {@link #startOp} but instead of throwing a {@link SecurityException} it * returns {@link #MODE_ERRORED}. * @hide */
Like <code>#startOp</code> but instead of throwing a <code>SecurityException</code> it returns <code>#MODE_ERRORED</code>
startOpNoThrow
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/app/AppOpsManager.java", "license": "apache-2.0", "size": 41556 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
2,730,784
public Produced<K, V> withStreamPartitioner(final StreamPartitioner<? super K, ? super V> partitioner) { this.partitioner = partitioner; return this; }
Produced<K, V> function(final StreamPartitioner<? super K, ? super V> partitioner) { this.partitioner = partitioner; return this; }
/** * Produce records using the provided partitioner. * @param partitioner the function used to determine how records are distributed among partitions of the topic, * if not specified and the key serde provides a {@link WindowedSerializer} for the key * {@...
Produce records using the provided partitioner
withStreamPartitioner
{ "repo_name": "MyPureCloud/kafka", "path": "streams/src/main/java/org/apache/kafka/streams/kstream/Produced.java", "license": "apache-2.0", "size": 7033 }
[ "org.apache.kafka.streams.processor.StreamPartitioner" ]
import org.apache.kafka.streams.processor.StreamPartitioner;
import org.apache.kafka.streams.processor.*;
[ "org.apache.kafka" ]
org.apache.kafka;
497,526
public synchronized void draftOutClassified(String classifiedId, ClassifiedsRole highestRole) throws RemoteException, PublicationTemplateException, FormException { getClassifiedService().draftOutClassified(classifiedId, highestRole.toString()); if (highestRole == ClassifiedsRole.MANAGER) { ...
synchronized void function(String classifiedId, ClassifiedsRole highestRole) throws RemoteException, PublicationTemplateException, FormException { getClassifiedService().draftOutClassified(classifiedId, highestRole.toString()); if (highestRole == ClassifiedsRole.MANAGER) { sendSubscriptionsNotification(classifiedId); }...
/** * take out draft mode the classified corresponding to classified * @param classifiedId : String * @param profile : String * @throws RemoteException * @throws PublicationTemplateException * @throws FormException */
take out draft mode the classified corresponding to classified
draftOutClassified
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Components", "path": "classifieds/classifieds-war/src/main/java/com/silverpeas/classifieds/control/ClassifiedsSessionController.java", "license": "agpl-3.0", "size": 21214 }
[ "com.silverpeas.form.FormException", "com.silverpeas.publicationTemplate.PublicationTemplateException", "java.rmi.RemoteException" ]
import com.silverpeas.form.FormException; import com.silverpeas.publicationTemplate.PublicationTemplateException; import java.rmi.RemoteException;
import com.silverpeas.*; import com.silverpeas.form.*; import java.rmi.*;
[ "com.silverpeas", "com.silverpeas.form", "java.rmi" ]
com.silverpeas; com.silverpeas.form; java.rmi;
951,170
public static void removeEmailServiceOperation( InputEventAdaptorMessageConfiguration inputEventAdaptorMessageConfiguration, InputEventAdaptorConfiguration inputEventAdaptorConfiguration, AxisConfiguration axisConfiguration, String subscriptionId) throws AxisFault { Str...
static void function( InputEventAdaptorMessageConfiguration inputEventAdaptorMessageConfiguration, InputEventAdaptorConfiguration inputEventAdaptorConfiguration, AxisConfiguration axisConfiguration, String subscriptionId) throws AxisFault { String axisServiceName = inputEventAdaptorConfiguration.getName() + STR; AxisSe...
/** * removes the operation from the Axis service. * * @param inputEventAdaptorMessageConfiguration * * @param inputEventAdaptorConfiguration * @param axisConfiguration * @param subscriptionId * @throws AxisFault */
removes the operation from the Axis service
removeEmailServiceOperation
{ "repo_name": "malakasilva/carbon-event-processing", "path": "components/adaptors/event-input-adaptor/org.wso2.carbon.event.input.adaptor.email/src/main/java/org/wso2/carbon/event/input/adaptor/email/internal/Axis2Util.java", "license": "apache-2.0", "size": 10457 }
[ "javax.xml.namespace.QName", "org.apache.axis2.AxisFault", "org.apache.axis2.description.AxisOperation", "org.apache.axis2.description.AxisService", "org.apache.axis2.engine.AxisConfiguration", "org.apache.axis2.engine.AxisEvent", "org.wso2.carbon.event.input.adaptor.core.config.InputEventAdaptorConfigu...
import javax.xml.namespace.QName; import org.apache.axis2.AxisFault; import org.apache.axis2.description.AxisOperation; import org.apache.axis2.description.AxisService; import org.apache.axis2.engine.AxisConfiguration; import org.apache.axis2.engine.AxisEvent; import org.wso2.carbon.event.input.adaptor.core.config.Inpu...
import javax.xml.namespace.*; import org.apache.axis2.*; import org.apache.axis2.description.*; import org.apache.axis2.engine.*; import org.wso2.carbon.event.input.adaptor.core.config.*; import org.wso2.carbon.event.input.adaptor.core.message.config.*; import org.wso2.carbon.event.input.adaptor.email.internal.util.*;
[ "javax.xml", "org.apache.axis2", "org.wso2.carbon" ]
javax.xml; org.apache.axis2; org.wso2.carbon;
2,067,549
public DataNode setWidth(IDataset width);
DataNode function(IDataset width);
/** * input beam width * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_LENGTH * </p> * * @param width the width */
input beam width Type: NX_FLOAT Units: NX_LENGTH
setWidth
{ "repo_name": "belkassaby/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXfermi_chopper.java", "license": "epl-1.0", "size": 11611 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode", "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*;
[ "org.eclipse.dawnsci", "org.eclipse.january" ]
org.eclipse.dawnsci; org.eclipse.january;
543,233
@SelectProvider(type = SqlProviderAdapter.class, method = "select") List<Integer> selectManyIntegers(SelectStatementProvider selectStatement);
@SelectProvider(type = SqlProviderAdapter.class, method = STR) List<Integer> selectManyIntegers(SelectStatementProvider selectStatement);
/** * Retrieve a List of {@link java.lang.Integer} from a result set. The result set must have * only one column, but can have any number of rows. The column must be retrievable from the result set * via the ResultSet.getInt() method. * * @param selectStatement the select statement * @retu...
Retrieve a List of <code>java.lang.Integer</code> from a result set. The result set must have only one column, but can have any number of rows. The column must be retrievable from the result set via the ResultSet.getInt() method
selectManyIntegers
{ "repo_name": "jeffgbutler/mybatis-qbe", "path": "src/main/java/org/mybatis/dynamic/sql/util/mybatis3/CommonSelectMapper.java", "license": "apache-2.0", "size": 14586 }
[ "java.util.List", "org.apache.ibatis.annotations.SelectProvider", "org.mybatis.dynamic.sql.select.render.SelectStatementProvider", "org.mybatis.dynamic.sql.util.SqlProviderAdapter" ]
import java.util.List; import org.apache.ibatis.annotations.SelectProvider; import org.mybatis.dynamic.sql.select.render.SelectStatementProvider; import org.mybatis.dynamic.sql.util.SqlProviderAdapter;
import java.util.*; import org.apache.ibatis.annotations.*; import org.mybatis.dynamic.sql.select.render.*; import org.mybatis.dynamic.sql.util.*;
[ "java.util", "org.apache.ibatis", "org.mybatis.dynamic" ]
java.util; org.apache.ibatis; org.mybatis.dynamic;
538,371
@Test public void testGetDomainAxisIndex() { CategoryAxis domainAxis1 = new CategoryAxis("X1"); CategoryAxis domainAxis2 = new CategoryAxis("X2"); NumberAxis rangeAxis1 = new NumberAxis("Y1"); CategoryPlot plot = new CategoryPlot(null, domainAxis1, rangeAxis1, ...
void function() { CategoryAxis domainAxis1 = new CategoryAxis("X1"); CategoryAxis domainAxis2 = new CategoryAxis("X2"); NumberAxis rangeAxis1 = new NumberAxis("Y1"); CategoryPlot plot = new CategoryPlot(null, domainAxis1, rangeAxis1, null); assertEquals(0, plot.getDomainAxisIndex(domainAxis1)); assertEquals(-1, plot.ge...
/** * Some checks for the getDomainAxisIndex() method. */
Some checks for the getDomainAxisIndex() method
testGetDomainAxisIndex
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/plot/CategoryPlotTest.java", "license": "lgpl-2.1", "size": 49136 }
[ "org.jfree.chart.axis.CategoryAxis", "org.jfree.chart.axis.NumberAxis", "org.junit.Assert" ]
import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.NumberAxis; import org.junit.Assert;
import org.jfree.chart.axis.*; import org.junit.*;
[ "org.jfree.chart", "org.junit" ]
org.jfree.chart; org.junit;
1,499,039
public Optional<String> method(final Element element) { final List<String> methods = new ArrayList<>(); annotation(element, GET).ifPresent(v -> methods.add(HttpMethod.GET)); annotation(element, POST).ifPresent(v -> methods.add(HttpMethod.POST)); annotation(element, PUT).ifPresent(v ...
Optional<String> function(final Element element) { final List<String> methods = new ArrayList<>(); annotation(element, GET).ifPresent(v -> methods.add(HttpMethod.GET)); annotation(element, POST).ifPresent(v -> methods.add(HttpMethod.POST)); annotation(element, PUT).ifPresent(v -> methods.add(HttpMethod.PUT)); annotatio...
/** * Get first method annotation from the given element. Fails with broken result on multiple * annotations present, returns empty if none. * * @param element Element to get annotations for. * @return An optional result containing the annotation. */
Get first method annotation from the given element. Fails with broken result on multiple annotations present, returns empty if none
method
{ "repo_name": "udoprog/tiny-rs", "path": "tiny-rs-processor/src/main/java/eu/toolchain/rs/processor/RsUtils.java", "license": "apache-2.0", "size": 22505 }
[ "java.util.ArrayList", "java.util.List", "java.util.Optional", "javax.lang.model.element.Element", "javax.ws.rs.HttpMethod" ]
import java.util.ArrayList; import java.util.List; import java.util.Optional; import javax.lang.model.element.Element; import javax.ws.rs.HttpMethod;
import java.util.*; import javax.lang.model.element.*; import javax.ws.rs.*;
[ "java.util", "javax.lang", "javax.ws" ]
java.util; javax.lang; javax.ws;
1,085,198
@JsonProperty("mag") public float[] getMag() { return mag; }
@JsonProperty("mag") float[] function() { return mag; }
/** * Gets the X, Y, Z Magnitude * * @return */
Gets the X, Y, Z Magnitude
getMag
{ "repo_name": "florianspecker/DragStars", "path": "src/main/java/com/zuehlke/carrera/bot/model/SensorEvent.java", "license": "mit", "size": 3380 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,413,908
public IDataset getHarmonic();
IDataset function();
/** * harmonic number of peak * <p> * <b>Type:</b> NX_INT * <b>Units:</b> NX_UNITLESS * </p> * * @return the value. */
harmonic number of peak Type: NX_INT Units: NX_UNITLESS
getHarmonic
{ "repo_name": "xen-0/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXinsertion_device.java", "license": "epl-1.0", "size": 12169 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
719,906
public void testIterator() throws InterruptedException { LinkedBlockingDeque q = populatedDeque(SIZE); Iterator it = q.iterator(); int i; for (i = 0; it.hasNext(); i++) assertTrue(q.contains(it.next())); assertEquals(i, SIZE); assertIteratorExhausted(it); ...
void function() throws InterruptedException { LinkedBlockingDeque q = populatedDeque(SIZE); Iterator it = q.iterator(); int i; for (i = 0; it.hasNext(); i++) assertTrue(q.contains(it.next())); assertEquals(i, SIZE); assertIteratorExhausted(it); it = q.iterator(); for (i = 0; it.hasNext(); i++) assertEquals(it.next(), q...
/** * iterator iterates through all elements */
iterator iterates through all elements
testIterator
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java", "license": "gpl-2.0", "size": 59941 }
[ "java.util.Iterator", "java.util.concurrent.LinkedBlockingDeque" ]
import java.util.Iterator; import java.util.concurrent.LinkedBlockingDeque;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,607,508
public String getNumericline(Set<Integer> appropriateItems) { Set<Integer> uniqueValues = new java.util.HashSet<Integer>(); StringBuilder sb = new StringBuilder(); for (Map.Entry<Integer, Integer> itemIdFreqPair : getItemsToFrequency().entrySet()) { if (appropriateItems.contains(...
String function(Set<Integer> appropriateItems) { Set<Integer> uniqueValues = new java.util.HashSet<Integer>(); StringBuilder sb = new StringBuilder(); for (Map.Entry<Integer, Integer> itemIdFreqPair : getItemsToFrequency().entrySet()) { if (appropriateItems.contains(itemIdFreqPair.getKey())) { for (int i = 0; i < itemI...
/** * Write only the items which passed the support constraints * * @param appropriateItems * @return */
Write only the items which passed the support constraints
getNumericline
{ "repo_name": "sapirgolan/MFIBlocking", "path": "MFIblocks/shared/src/main/java/il/ac/technion/ie/model/MfiRecord.java", "license": "mit", "size": 2709 }
[ "java.util.Map", "java.util.Set" ]
import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,171,861
public static void abort() throws jmt.common.exception.NetException { ListIterator<QueueNetwork> nets = networkList.listIterator(); QueueNetwork network; while (nets.hasNext()) { network = nets.next(); abort(network); } SimSystem.abort(); }
static void function() throws jmt.common.exception.NetException { ListIterator<QueueNetwork> nets = networkList.listIterator(); QueueNetwork network; while (nets.hasNext()) { network = nets.next(); abort(network); } SimSystem.abort(); }
/** Aborts the NetSystem Engine and terminates the simulation (aborts all * the controlled QueueNetworks). * @throws jmt.common.exception.NetException */
Aborts the NetSystem Engine and terminates the simulation (aborts all the controlled QueueNetworks)
abort
{ "repo_name": "HOMlab/QN-ACTR-Release", "path": "QN-ACTR Java/src/jmt/engine/QueueNet/NetSystem.java", "license": "lgpl-3.0", "size": 10620 }
[ "java.util.ListIterator" ]
import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
60,077
public Set<String> listFunctionSets() { return Collections.unmodifiableSet(new HashSet<>(functionSets.keySet())); }
Set<String> function() { return Collections.unmodifiableSet(new HashSet<>(functionSets.keySet())); }
/** * Returns the names of all the registered function sets. * * @return the names of the registered function sets */
Returns the names of all the registered function sets
listFunctionSets
{ "repo_name": "richardfearn/diirt", "path": "pvmanager/datasource-formula/src/main/java/org/diirt/datasource/formula/FormulaRegistry.java", "license": "mit", "size": 4602 }
[ "java.util.Collections", "java.util.HashSet", "java.util.Set" ]
import java.util.Collections; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,016,938
public void waitMessage(String message) { loadPageDriverWait.until(textToBe(By.id(PullRequestLocators.MESSAGE), message)); }
void function(String message) { loadPageDriverWait.until(textToBe(By.id(PullRequestLocators.MESSAGE), message)); }
/** * Wait message in the 'Pull Request' panel * * @param message text of message */
Wait message in the 'Pull Request' panel
waitMessage
{ "repo_name": "TypeFox/che", "path": "selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/PullRequestPanel.java", "license": "epl-1.0", "size": 8377 }
[ "org.openqa.selenium.By" ]
import org.openqa.selenium.By;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
2,036,390
private void drawResult( final Object result, final Project project, JPanel panel, GridBagConstraints gc) { if (result instanceof Task) { Task task = (Task) result; gc.gridx = COL_NAME; panel.add(new JLabel(task.getText()), gc); gc.gridx = COL_START_DATE; panel.add(new JLabel(dateForm...
void function( final Object result, final Project project, JPanel panel, GridBagConstraints gc) { if (result instanceof Task) { Task task = (Task) result; gc.gridx = COL_NAME; panel.add(new JLabel(task.getText()), gc); gc.gridx = COL_START_DATE; panel.add(new JLabel(dateFormat.format(task.getStartDate().getDate())), gc...
/** * Helper method for drawing a single search result. * @param result The search result Object * @param project The project the result belongs to * @param panel The enclosing panel * @param gc The GridBagConstraints used for layout */
Helper method for drawing a single search result
drawResult
{ "repo_name": "cst316/spring16project-Ada", "path": "src/net/sf/memoranda/ui/SearchDialog.java", "license": "gpl-2.0", "size": 16509 }
[ "java.awt.GridBagConstraints", "java.awt.event.ActionListener", "javax.swing.JButton", "javax.swing.JLabel", "javax.swing.JPanel", "net.sf.memoranda.Note", "net.sf.memoranda.Process", "net.sf.memoranda.Project", "net.sf.memoranda.Task", "net.sf.memoranda.Template" ]
import java.awt.GridBagConstraints; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JPanel; import net.sf.memoranda.Note; import net.sf.memoranda.Process; import net.sf.memoranda.Project; import net.sf.memoranda.Task; import net.sf.memoranda.Template;
import java.awt.*; import java.awt.event.*; import javax.swing.*; import net.sf.memoranda.*;
[ "java.awt", "javax.swing", "net.sf.memoranda" ]
java.awt; javax.swing; net.sf.memoranda;
2,340,028
public Types getTypes() { return types; }
Types function() { return types; }
/** * Gets the {@link Types} object that lets you navigate around {@link TypeMirror}s. * * @return * always non-null, same object. */
Gets the <code>Types</code> object that lets you navigate around <code>TypeMirror</code>s
getTypes
{ "repo_name": "kohsuke/sorcerer", "path": "core/src/main/java/org/jvnet/sorcerer/ParsedSourceSet.java", "license": "mit", "size": 25942 }
[ "javax.lang.model.util.Types" ]
import javax.lang.model.util.Types;
import javax.lang.model.util.*;
[ "javax.lang" ]
javax.lang;
441,144
EAttribute getMappedStructure_StructureType();
EAttribute getMappedStructure_StructureType();
/** * Returns the meta object for the attribute '{@link com.openMap1.mapper.MappedStructure#getStructureType <em>Structure Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Structure Type</em>'. * @see com.openMap1.mapper.MappedStructure#getSt...
Returns the meta object for the attribute '<code>com.openMap1.mapper.MappedStructure#getStructureType Structure Type</code>'.
getMappedStructure_StructureType
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-lib/src/main/java/com/openMap1/mapper/MapperPackage.java", "license": "epl-1.0", "size": 172715 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,184,732
public List<Product> findByNameIgnoreCase(String partialName);
List<Product> function(String partialName);
/** * Find products whose owner name contains the specified string * * @param partialName * Any alphabetic string. * @return The list of matching products - always non-null, but may be * empty. */
Find products whose owner name contains the specified string
findByNameIgnoreCase
{ "repo_name": "dsarlis/SAD-Spring-2016-Team4", "path": "src/main/java/edu/cmu/sad/microservices/products/ProductRepository.java", "license": "mit", "size": 1062 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
589,635
ClassMapping<T> on(FieldMapping fieldMapping) throws FieldNotFoundException;
ClassMapping<T> on(FieldMapping fieldMapping) throws FieldNotFoundException;
/** * add a field mapping * * @param fieldMapping the field mapping to add * @return the current class mapping * @throws FieldNotFoundException if the field doesn't exist in the current class */
add a field mapping
on
{ "repo_name": "mrenou/jacksonatic", "path": "src/main/java/com/github/mrenou/jacksonatic/mapping/ClassMapping.java", "license": "apache-2.0", "size": 10275 }
[ "com.github.mrenou.jacksonatic.exception.FieldNotFoundException" ]
import com.github.mrenou.jacksonatic.exception.FieldNotFoundException;
import com.github.mrenou.jacksonatic.exception.*;
[ "com.github.mrenou" ]
com.github.mrenou;
727,851