method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void fillDetailFieldConfiguration(CmsListItem item, String detailId) {
// search for the corresponding A_CmsSearchIndex:
String idxName = (String)item.get(LIST_COLUMN_NAME);
CmsSearchIndex idx = OpenCms.getSearchManager().getIndex(idxName);
if (idx != null) {
St... | void function(CmsListItem item, String detailId) { String idxName = (String)item.get(LIST_COLUMN_NAME); CmsSearchIndex idx = OpenCms.getSearchManager().getIndex(idxName); if (idx != null) { StringBuffer html = new StringBuffer(); CmsSearchFieldConfiguration idxFieldConfiguration = idx.getFieldConfiguration(); List<CmsS... | /**
* Fills details of the field configuration into the given item. <p>
*
* @param item the list item to fill
* @param detailId the id for the detail to fill
*/ | Fills details of the field configuration into the given item. | fillDetailFieldConfiguration | {
"repo_name": "it-tavis/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/searchindex/CmsSearchIndexList.java",
"license": "lgpl-2.1",
"size": 31070
} | [
"java.util.Iterator",
"java.util.List",
"org.opencms.main.OpenCms",
"org.opencms.search.CmsSearchIndex",
"org.opencms.search.fields.CmsLuceneField",
"org.opencms.search.fields.CmsSearchField",
"org.opencms.search.fields.CmsSearchFieldConfiguration",
"org.opencms.search.fields.CmsSearchFieldMapping",
... | import java.util.Iterator; import java.util.List; import org.opencms.main.OpenCms; import org.opencms.search.CmsSearchIndex; import org.opencms.search.fields.CmsLuceneField; import org.opencms.search.fields.CmsSearchField; import org.opencms.search.fields.CmsSearchFieldConfiguration; import org.opencms.search.fields.Cm... | import java.util.*; import org.opencms.main.*; import org.opencms.search.*; import org.opencms.search.fields.*; import org.opencms.util.*; import org.opencms.workplace.list.*; | [
"java.util",
"org.opencms.main",
"org.opencms.search",
"org.opencms.util",
"org.opencms.workplace"
] | java.util; org.opencms.main; org.opencms.search; org.opencms.util; org.opencms.workplace; | 433,891 |
public static int[] encodeStateSequence(HmmModel model,
Collection<String> sequence, boolean observed, int defaultValue) {
int[] encoded = new int[sequence.size()];
Iterator<String> seqIter = sequence.iterator();
for (int i = 0; i < sequence.size(); ++i) {
S... | static int[] function(HmmModel model, Collection<String> sequence, boolean observed, int defaultValue) { int[] encoded = new int[sequence.size()]; Iterator<String> seqIter = sequence.iterator(); for (int i = 0; i < sequence.size(); ++i) { String nextState = seqIter.next(); int nextID; if (observed) { nextID = model.get... | /**
* Encodes a given collection of state names by the corresponding state IDs
* registered in a given model.
*
* @param model Model to provide the encoding for
* @param sequence Collection of state names
* @param observed If set, the sequence is encoded as a sequence of observed states... | Encodes a given collection of state names by the corresponding state IDs registered in a given model | encodeStateSequence | {
"repo_name": "huran2014/huran.github.io",
"path": "program_learning/Java/MyEclipseProfessional2014/mr/src/main/java/org/apache/mahout/classifier/sequencelearning/hmm/HmmUtils.java",
"license": "gpl-2.0",
"size": 14329
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,867,502 |
public void testNeverContainsNull() {
Deque<?>[] qs = {
new ConcurrentLinkedDeque<Object>(),
populatedDeque(2),
};
for (Deque<?> q : qs) {
assertFalse(q.contains(null));
try {
assertFalse(q.remove(null));
should... | void function() { Deque<?>[] qs = { new ConcurrentLinkedDeque<Object>(), populatedDeque(2), }; for (Deque<?> q : qs) { assertFalse(q.contains(null)); try { assertFalse(q.remove(null)); shouldThrow(); } catch (NullPointerException success) {} try { assertFalse(q.removeFirstOccurrence(null)); shouldThrow(); } catch (Null... | /**
* contains(null) always return false.
* remove(null) always throws NullPointerException.
*/ | contains(null) always return false. remove(null) always throws NullPointerException | testNeverContainsNull | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java",
"license": "gpl-2.0",
"size": 32225
} | [
"java.util.Deque",
"java.util.concurrent.ConcurrentLinkedDeque"
] | import java.util.Deque; import java.util.concurrent.ConcurrentLinkedDeque; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,385,034 |
ExprNode getFilter(); | ExprNode getFilter(); | /**
* Gets the search filter associated with this search request.
*
* @return the expression node for the root of the filter expression tree.
*/ | Gets the search filter associated with this search request | getFilter | {
"repo_name": "darranl/directory-shared",
"path": "ldap/model/src/main/java/org/apache/directory/api/ldap/model/message/SearchRequest.java",
"license": "apache-2.0",
"size": 9758
} | [
"org.apache.directory.api.ldap.model.filter.ExprNode"
] | import org.apache.directory.api.ldap.model.filter.ExprNode; | import org.apache.directory.api.ldap.model.filter.*; | [
"org.apache.directory"
] | org.apache.directory; | 1,988,431 |
@Test
public void testEmptyPattern() throws Exception {
String tablePath = buildTable(tableFuncDir, "tf", "emptyRegex",
"sample.logf", "/regex/simple.log1");
try {
String sql = "SELECT * FROM %s";
client.queryBuilder().sql(sql, tablePath).run();
fail();
} catch (Exception e) {
... | void function() throws Exception { String tablePath = buildTable(tableFuncDir, "tf", STR, STR, STR); try { String sql = STR; client.queryBuilder().sql(sql, tablePath).run(); fail(); } catch (Exception e) { assertTrue(e.getMessage().contains(STR)); } } | /**
* Verify that an error is thrown if no pattern is provided in
* the plugin config, table function or provided schema.
*/ | Verify that an error is thrown if no pattern is provided in the plugin config, table function or provided schema | testEmptyPattern | {
"repo_name": "arina-ielchiieva/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/store/log/TestLogReader.java",
"license": "apache-2.0",
"size": 29558
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 166,260 |
public static ClusterMetrics deserialize(byte[] data, int off) {
ClusterMetricsSnapshot metrics = new ClusterMetricsSnapshot();
int bufSize = min(METRICS_SIZE, data.length - off);
ByteBuffer buf = ByteBuffer.wrap(data, off, bufSize);
metrics.setLastUpdateTime(U.currentTimeMillis()... | static ClusterMetrics function(byte[] data, int off) { ClusterMetricsSnapshot metrics = new ClusterMetricsSnapshot(); int bufSize = min(METRICS_SIZE, data.length - off); ByteBuffer buf = ByteBuffer.wrap(data, off, bufSize); metrics.setLastUpdateTime(U.currentTimeMillis()); metrics.setMaximumActiveJobs(buf.getInt()); me... | /**
* De-serializes node metrics.
*
* @param data Byte array.
* @param off Offset into byte array.
* @return Deserialized node metrics.
*/ | De-serializes node metrics | deserialize | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java",
"license": "apache-2.0",
"size": 39332
} | [
"java.lang.Math",
"java.nio.ByteBuffer",
"org.apache.ignite.cluster.ClusterMetrics",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.lang.Math; import java.nio.ByteBuffer; import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.internal.util.typedef.internal.U; | import java.lang.*; import java.nio.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.lang",
"java.nio",
"org.apache.ignite"
] | java.lang; java.nio; org.apache.ignite; | 922,695 |
private void init(Context context, AttributeSet attrs, int defStyle) {
LayoutInflater.from(getContext()).inflate(R.layout.likeview, this, true);
icon = (ImageView) findViewById(R.id.icon);
dotsView = (DotsView) findViewById(R.id.dots);
circleView = (CircleView) findViewById(R.id.circ... | void function(Context context, AttributeSet attrs, int defStyle) { LayoutInflater.from(getContext()).inflate(R.layout.likeview, this, true); icon = (ImageView) findViewById(R.id.icon); dotsView = (DotsView) findViewById(R.id.dots); circleView = (CircleView) findViewById(R.id.circle); final TypedArray array = context.ob... | /**
* Does all the initial setup of the button such as retrieving all the attributes that were
* set in xml and inflating the like button's view and initial state.
* @param context
* @param attrs
* @param defStyle
*/ | Does all the initial setup of the button such as retrieving all the attributes that were set in xml and inflating the like button's view and initial state | init | {
"repo_name": "cowthan/AyoWeibo",
"path": "sample/src/main/java_opensource/com/ayo/opensource/zlikeview/LikeButton.java",
"license": "apache-2.0",
"size": 15004
} | [
"android.content.Context",
"android.content.res.TypedArray",
"android.util.AttributeSet",
"android.view.LayoutInflater",
"android.widget.ImageView"
] | import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; | import android.content.*; import android.content.res.*; import android.util.*; import android.view.*; import android.widget.*; | [
"android.content",
"android.util",
"android.view",
"android.widget"
] | android.content; android.util; android.view; android.widget; | 151,121 |
public static TickUnitSource createLogTickUnits(Locale locale) {
TickUnits units = new TickUnits();
NumberFormat numberFormat = new LogFormat();
units.add(new NumberTickUnit(0.05, numberFormat, 2));
units.add(new NumberTickUnit(0.1, numberFormat, 10));
units.add(new Numb... | static TickUnitSource function(Locale locale) { TickUnits units = new TickUnits(); NumberFormat numberFormat = new LogFormat(); units.add(new NumberTickUnit(0.05, numberFormat, 2)); units.add(new NumberTickUnit(0.1, numberFormat, 10)); units.add(new NumberTickUnit(0.2, numberFormat, 2)); units.add(new NumberTickUnit(0.... | /**
* Returns a collection of tick units for log (base 10) values.
* Uses a given Locale to create the DecimalFormats.
*
* @param locale the locale to use to represent Numbers.
*
* @return A collection of tick units for integer values.
*
* @since 1.0.7
*
* @d... | Returns a collection of tick units for log (base 10) values. Uses a given Locale to create the DecimalFormats | createLogTickUnits | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/axis/LogAxis.java",
"license": "lgpl-3.0",
"size": 41527
} | [
"java.text.NumberFormat",
"java.util.Locale",
"org.jfree.chart.util.LogFormat"
] | import java.text.NumberFormat; import java.util.Locale; import org.jfree.chart.util.LogFormat; | import java.text.*; import java.util.*; import org.jfree.chart.util.*; | [
"java.text",
"java.util",
"org.jfree.chart"
] | java.text; java.util; org.jfree.chart; | 1,714,564 |
public static TypeAdapter<MultiPolygon> typeAdapter(Gson gson) {
return new MultiPolygon.GsonTypeAdapter(gson);
} | static TypeAdapter<MultiPolygon> function(Gson gson) { return new MultiPolygon.GsonTypeAdapter(gson); } | /**
* Gson TYPE adapter for parsing Gson to this class.
*
* @param gson the built {@link Gson} object
* @return the TYPE adapter for this class
* @since 3.0.0
*/ | Gson TYPE adapter for parsing Gson to this class | typeAdapter | {
"repo_name": "mapbox/mapbox-java",
"path": "services-geojson/src/main/java/com/mapbox/geojson/MultiPolygon.java",
"license": "mit",
"size": 12730
} | [
"com.google.gson.Gson",
"com.google.gson.TypeAdapter"
] | import com.google.gson.Gson; import com.google.gson.TypeAdapter; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,698,289 |
@Test
public void testManyToOneCopies() throws KettleException {
prepareStepMetas_x2_1();
trans.prepareExecution( new String[] {} );
List<RowSet> rowsets = trans.getRowsets();
assertTrue( !rowsets.isEmpty() );
assertEquals( "We have 2 rowsets finally", 2, rowsets.size() );
assertEquals( "We... | void function() throws KettleException { prepareStepMetas_x2_1(); trans.prepareExecution( new String[] {} ); List<RowSet> rowsets = trans.getRowsets(); assertTrue( !rowsets.isEmpty() ); assertEquals( STR, 2, rowsets.size() ); assertEquals( STR, 3, trans.getSteps().size() ); StepInterface stepOne0 = getStepByName( S10 )... | /**
* This checks transformation initialization when using many copies to one next step
*
* @throws KettleException
*/ | This checks transformation initialization when using many copies to one next step | testManyToOneCopies | {
"repo_name": "wseyler/pentaho-kettle",
"path": "engine/src/test/java/org/pentaho/di/trans/TransPartitioningTest.java",
"license": "apache-2.0",
"size": 22274
} | [
"java.util.List",
"org.junit.Assert",
"org.pentaho.di.core.RowSet",
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.trans.step.StepInterface"
] | import java.util.List; import org.junit.Assert; import org.pentaho.di.core.RowSet; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.trans.step.StepInterface; | import java.util.*; import org.junit.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.trans.step.*; | [
"java.util",
"org.junit",
"org.pentaho.di"
] | java.util; org.junit; org.pentaho.di; | 453,660 |
public static class DummyPersistenceManager implements PersistenceManagerIF {
public ChannelGroupIF createGroup(String title) {
return null;
} | static class DummyPersistenceManager implements PersistenceManagerIF { public ChannelGroupIF function(String title) { return null; } | /**
* Creates new group of channels in persistent storage.
*
* @param title title of the group.
* @return initialized and persisted group object.
*/ | Creates new group of channels in persistent storage | createGroup | {
"repo_name": "nikos/informa",
"path": "src/test/java/de/nava/informa/utils/manager/TestPersistenceManagerConfig.java",
"license": "epl-1.0",
"size": 5933
} | [
"de.nava.informa.core.ChannelGroupIF"
] | import de.nava.informa.core.ChannelGroupIF; | import de.nava.informa.core.*; | [
"de.nava.informa"
] | de.nava.informa; | 145,772 |
@SuppressWarnings({ "unchecked", "rawtypes" })
public <T> T readValue(String content, TypeReference valueTypeRef)
throws IOException, JsonParseException, JsonMappingException {
return (T) _readMapAndClose(_jsonFactory.createParser(content), _typeFactory.constructType(valueTypeRef));
} | @SuppressWarnings({ STR, STR }) <T> T function(String content, TypeReference valueTypeRef) throws IOException, JsonParseException, JsonMappingException { return (T) _readMapAndClose(_jsonFactory.createParser(content), _typeFactory.constructType(valueTypeRef)); } | /**
* Method to deserialize JSON content from given JSON content String.
*
* @throws IOException
* if a low-level I/O problem (unexpected end-of-input, network
* error) occurs (passed through as-is without additional
* wrapping -- note that this is one ... | Method to deserialize JSON content from given JSON content String | readValue | {
"repo_name": "magidc/trevin-json",
"path": "src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java",
"license": "mit",
"size": 149768
} | [
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException"
] | import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.type.*; import java.io.*; | [
"com.fasterxml.jackson",
"java.io"
] | com.fasterxml.jackson; java.io; | 543,870 |
void claimJob(
@NotBlank String jobId,
@Valid AgentClientMetadata agentClientMetadata
) throws JobReservationException; | void claimJob( @NotBlank String jobId, @Valid AgentClientMetadata agentClientMetadata ) throws JobReservationException; | /**
* Claim a given job, telling the server that this agent is about to begin execution.
*
* @param jobId the id of the job
* @param agentClientMetadata metadata for the agent claiming this job
* @throws JobReservationException When the the claim request fails is invalid (reasons ... | Claim a given job, telling the server that this agent is about to begin execution | claimJob | {
"repo_name": "Netflix/genie",
"path": "genie-agent/src/main/java/com/netflix/genie/agent/execution/services/AgentJobService.java",
"license": "apache-2.0",
"size": 7014
} | [
"com.netflix.genie.agent.execution.exceptions.JobReservationException",
"com.netflix.genie.common.external.dtos.v4.AgentClientMetadata",
"javax.validation.Valid",
"javax.validation.constraints.NotBlank"
] | import com.netflix.genie.agent.execution.exceptions.JobReservationException; import com.netflix.genie.common.external.dtos.v4.AgentClientMetadata; import javax.validation.Valid; import javax.validation.constraints.NotBlank; | import com.netflix.genie.agent.execution.exceptions.*; import com.netflix.genie.common.external.dtos.v4.*; import javax.validation.*; import javax.validation.constraints.*; | [
"com.netflix.genie",
"javax.validation"
] | com.netflix.genie; javax.validation; | 1,138,066 |
public static void plotNodeValueLists(SeriesData seriesData, String dstDir)
throws IOException, InterruptedException {
Plotting.plot(new SeriesData[] { seriesData }, dstDir,
PlotFlag.plotNodeValueLists);
} | static void function(SeriesData seriesData, String dstDir) throws IOException, InterruptedException { Plotting.plot(new SeriesData[] { seriesData }, dstDir, PlotFlag.plotNodeValueLists); } | /**
* Plots only the nodevaluelists of the given series.
*
* @param seriesData
* SeriesData to be plotted.
* @param dstDir
* Destination directory of the plots.
* @throws IOException
* Thrown by writer.
* @throws InterruptedException
* Thrown by executi... | Plots only the nodevaluelists of the given series | plotNodeValueLists | {
"repo_name": "marcel-stud/DNA",
"path": "src/dna/plot/Plotting.java",
"license": "gpl-3.0",
"size": 49250
} | [
"dna.plot.PlottingConfig",
"dna.series.data.SeriesData",
"java.io.IOException"
] | import dna.plot.PlottingConfig; import dna.series.data.SeriesData; import java.io.IOException; | import dna.plot.*; import dna.series.data.*; import java.io.*; | [
"dna.plot",
"dna.series.data",
"java.io"
] | dna.plot; dna.series.data; java.io; | 1,110,573 |
private void createAccountInConfig(TEAccount playerAccount) throws IOException {
UUID uuid = playerAccount.getUniqueId();
for (Currency currency : totalEconomy.getCurrencies()) {
TECurrency teCurrency = (TECurrency) currency;
accountConfig.getNode(uuid.toString(), teCurrenc... | void function(TEAccount playerAccount) throws IOException { UUID uuid = playerAccount.getUniqueId(); for (Currency currency : totalEconomy.getCurrencies()) { TECurrency teCurrency = (TECurrency) currency; accountConfig.getNode(uuid.toString(), teCurrency.getName().toLowerCase() + STR).setValue(playerAccount.getDefaultB... | /**
* Creates a new unique account in the accounts configuration file.
*
* @param playerAccount A player's account
* @throws IOException Error saving the accounts configuration file
*/ | Creates a new unique account in the accounts configuration file | createAccountInConfig | {
"repo_name": "Erigitic/TotalEconomy",
"path": "src/main/java/com/erigitic/config/AccountManager.java",
"license": "mit",
"size": 22387
} | [
"java.io.IOException",
"org.spongepowered.api.service.economy.Currency"
] | import java.io.IOException; import org.spongepowered.api.service.economy.Currency; | import java.io.*; import org.spongepowered.api.service.economy.*; | [
"java.io",
"org.spongepowered.api"
] | java.io; org.spongepowered.api; | 1,448,290 |
@PreAuthorize("hasRole('USER')")
@GetMapping(value = EXCHANGE_RESOURCE_PATH)
public ExchangeConfig getExchange(@ApiIgnore Principal principal) {
LOG.info(
() ->
"GET " + EXCHANGE_RESOURCE_PATH + " - getExchange() - caller: " + principal.getName());
final ExchangeConfig exchangeConfig... | @PreAuthorize(STR) @GetMapping(value = EXCHANGE_RESOURCE_PATH) ExchangeConfig function(@ApiIgnore Principal principal) { LOG.info( () -> STR + EXCHANGE_RESOURCE_PATH + STR + principal.getName()); final ExchangeConfig exchangeConfig = exchangeConfigService.getExchangeConfig(); exchangeConfig.setAuthenticationConfig(null... | /**
* Returns the Exchange configuration for the bot.
*
* <p>The AuthenticationConfig is stripped out and not exposed for remote consumption. The API
* keys/credentials should not leave the bot's local machine via the REST API.
*
* @param principal the authenticated user making the request.
* @retu... | Returns the Exchange configuration for the bot. The AuthenticationConfig is stripped out and not exposed for remote consumption. The API keys/credentials should not leave the bot's local machine via the REST API | getExchange | {
"repo_name": "gazbert/BX-bot",
"path": "bxbot-rest-api/src/main/java/com/gazbert/bxbot/rest/api/v1/config/ExchangeConfigController.java",
"license": "mit",
"size": 5420
} | [
"com.gazbert.bxbot.domain.exchange.ExchangeConfig",
"java.security.Principal",
"org.springframework.security.access.prepost.PreAuthorize",
"org.springframework.web.bind.annotation.GetMapping"
] | import com.gazbert.bxbot.domain.exchange.ExchangeConfig; import java.security.Principal; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; | import com.gazbert.bxbot.domain.exchange.*; import java.security.*; import org.springframework.security.access.prepost.*; import org.springframework.web.bind.annotation.*; | [
"com.gazbert.bxbot",
"java.security",
"org.springframework.security",
"org.springframework.web"
] | com.gazbert.bxbot; java.security; org.springframework.security; org.springframework.web; | 1,394,501 |
public ArrayList getLinks() {
return hrefLink;
}
static final String symbols =
"nbsp,160,iexcl,161,cent,162,pound,163,curren,164,yen,165,brvbar,166," +
"sect,167,uml,168,copy,169,ordf,170,laquo,171,not,172,shy,173,reg,174," +
"macr,175,deg,176,plusmn,177,sup2,17... | ArrayList function() { return hrefLink; } static final String symbols = STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR; static { StringTokenizer st = new StringTokenizer(symbols, ","); while (st.hasMoreTokens()) { String name = "&" + st.nextToken(); String valueStrin... | /**
* Returns links found in <a href="link"> tags. Links will be converted
* from relative to absolute: if a page contains a relative link like
* "anotherpage.htm", the full URL path will be added so it is returned
* as "http://mysite.com/anotherpage.htm". Only correctly-formatted
* ... | Returns links found in <a href="link"> tags. Links will be converted from relative to absolute: if a page contains a relative link like "anotherpage.htm", the full URL path will be added so it is returned as "HREF". Only correctly-formatted URLs will be returned | getLinks | {
"repo_name": "Spantree/openpipeline",
"path": "src/main/java/org/openpipeline/pipeline/docfilter/HTMLFilter.java",
"license": "apache-2.0",
"size": 18806
} | [
"java.util.ArrayList",
"java.util.StringTokenizer"
] | import java.util.ArrayList; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 3,662 |
@Nonnull
default VertexWithInputConfig insertProcessor(@Nonnull DAG dag, @Nonnull Table table) {
throw new UnsupportedOperationException("INSERT INTO not supported for " + typeName());
} | default VertexWithInputConfig insertProcessor(@Nonnull DAG dag, @Nonnull Table table) { throw new UnsupportedOperationException(STR + typeName()); } | /**
* Returns the supplier for the insert processor.
*/ | Returns the supplier for the insert processor | insertProcessor | {
"repo_name": "jerrinot/hazelcast",
"path": "hazelcast-sql/src/main/java/com/hazelcast/jet/sql/impl/connector/SqlConnector.java",
"license": "apache-2.0",
"size": 13430
} | [
"com.hazelcast.sql.impl.schema.Table",
"javax.annotation.Nonnull"
] | import com.hazelcast.sql.impl.schema.Table; import javax.annotation.Nonnull; | import com.hazelcast.sql.impl.schema.*; import javax.annotation.*; | [
"com.hazelcast.sql",
"javax.annotation"
] | com.hazelcast.sql; javax.annotation; | 2,884,194 |
protected Pair<List<Message>, Boolean> getMessagesAndCheck(Conversation conversation, int start, int howMany) throws IOException, HttpException, ContentException {
if (howMany > 10) {
howMany = 10;
}
List<Message> messages;
HashMap<String, String> form = new HashMap<Str... | Pair<List<Message>, Boolean> function(Conversation conversation, int start, int howMany) throws IOException, HttpException, ContentException { if (howMany > 10) { howMany = 10; } List<Message> messages; HashMap<String, String> form = new HashMap<String, String>(4); form.put("from", String.valueOf(conversation.getOtherI... | /**
* Fetches messages and returns a pair containing a list of messages of given conversation and also a Boolean representing the fact that the conversation has still messages to be read.
* Not working properly in Reverse (but working great in FastReverse)
* @param conversation
* @param start
*... | Fetches messages and returns a pair containing a list of messages of given conversation and also a Boolean representing the fact that the conversation has still messages to be read. Not working properly in Reverse (but working great in FastReverse) | getMessagesAndCheck | {
"repo_name": "nerdzeu/nerdzapi-java-impl",
"path": "src/eu/nerdz/api/impl/reverse/messages/ReverseConversationHandler.java",
"license": "gpl-3.0",
"size": 19480
} | [
"eu.nerdz.api.ContentException",
"eu.nerdz.api.HttpException",
"eu.nerdz.api.UserInfo",
"eu.nerdz.api.messages.Conversation",
"eu.nerdz.api.messages.Message",
"java.io.IOException",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List",
"org.apache.commons.lang3.tuple.ImmutablePair",
"or... | import eu.nerdz.api.ContentException; import eu.nerdz.api.HttpException; import eu.nerdz.api.UserInfo; import eu.nerdz.api.messages.Conversation; import eu.nerdz.api.messages.Message; import java.io.IOException; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import org.apache.commons.lang... | import eu.nerdz.api.*; import eu.nerdz.api.messages.*; import java.io.*; import java.util.*; import org.apache.commons.lang3.tuple.*; | [
"eu.nerdz.api",
"java.io",
"java.util",
"org.apache.commons"
] | eu.nerdz.api; java.io; java.util; org.apache.commons; | 1,711,129 |
double sumDouble(Queryable<T> source,
FunctionExpression<DoubleFunction1<T>> selector); | double sumDouble(Queryable<T> source, FunctionExpression<DoubleFunction1<T>> selector); | /**
* Computes the sum of the sequence of Double values
* that is obtained by invoking a projection function on each
* element of the input sequence.
*/ | Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence | sumDouble | {
"repo_name": "minji-kim/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/QueryableFactory.java",
"license": "apache-2.0",
"size": 27824
} | [
"org.apache.calcite.linq4j.function.DoubleFunction1",
"org.apache.calcite.linq4j.tree.FunctionExpression"
] | import org.apache.calcite.linq4j.function.DoubleFunction1; import org.apache.calcite.linq4j.tree.FunctionExpression; | import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 254,237 |
public static double[] hedgeQuantity(final ParameterSensitivity ps, final ParameterSensitivity[] rs, final DoubleMatrix2D w, final LinkedHashSet<Pair<String, Integer>> order,
final FXMatrix fxMatrix) {
final Currency ccy = ps.getAllNamesCurrency().iterator().next().getSecond();
// Implementation note: ... | static double[] function(final ParameterSensitivity ps, final ParameterSensitivity[] rs, final DoubleMatrix2D w, final LinkedHashSet<Pair<String, Integer>> order, final FXMatrix fxMatrix) { final Currency ccy = ps.getAllNamesCurrency().iterator().next().getSecond(); final int nbReference = rs.length; final ParameterSen... | /**
* Computes the quantity of each reference instrument that optimally hedge a given sensitivity.
* @param ps The parameter sensitivity of the portfolio to hedge.
* @param rs The parameter sensitivities of the reference instruments.
* @param w The related parameters weight matrix. The order of the curve sh... | Computes the quantity of each reference instrument that optimally hedge a given sensitivity | hedgeQuantity | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/calculator/PortfolioHedgingCalculator.java",
"license": "apache-2.0",
"size": 5017
} | [
"com.opengamma.analytics.financial.curve.sensitivity.ParameterSensitivity",
"com.opengamma.analytics.financial.forex.method.FXMatrix",
"com.opengamma.analytics.math.linearalgebra.SVDecompositionResult",
"com.opengamma.analytics.math.matrix.DoubleMatrix1D",
"com.opengamma.analytics.math.matrix.DoubleMatrix2D... | import com.opengamma.analytics.financial.curve.sensitivity.ParameterSensitivity; import com.opengamma.analytics.financial.forex.method.FXMatrix; import com.opengamma.analytics.math.linearalgebra.SVDecompositionResult; import com.opengamma.analytics.math.matrix.DoubleMatrix1D; import com.opengamma.analytics.math.matrix.... | import com.opengamma.analytics.financial.curve.sensitivity.*; import com.opengamma.analytics.financial.forex.method.*; import com.opengamma.analytics.math.linearalgebra.*; import com.opengamma.analytics.math.matrix.*; import com.opengamma.util.money.*; import com.opengamma.util.tuple.*; import java.util.*; | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util"
] | com.opengamma.analytics; com.opengamma.util; java.util; | 329,974 |
private RuntimeException injectPrimitiveInitialValue(InjectableElement point, InjectCallback callback) {
Type primitiveType = ReflectionUtil.mapWrapperClasses(point.getType());
Object value = null;
if (primitiveType == int.class) {
value = Integer.valueOf(0);
} else if (p... | RuntimeException function(InjectableElement point, InjectCallback callback) { Type primitiveType = ReflectionUtil.mapWrapperClasses(point.getType()); Object value = null; if (primitiveType == int.class) { value = Integer.valueOf(0); } else if (primitiveType == long.class) { value = Long.valueOf(0); } else if (primitive... | /**
* Injects the default initial value for the given primitive class which
* cannot be null (e.g. int = 0, boolean = false).
*
* @param point Annotated element
* @param wrapperType Non-primitive wrapper class for primitive class
* @param callback Inject callback
* @param result
... | Injects the default initial value for the given primitive class which cannot be null (e.g. int = 0, boolean = false) | injectPrimitiveInitialValue | {
"repo_name": "Sivaramvt/sling",
"path": "bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/ModelAdapterFactory.java",
"license": "apache-2.0",
"size": 47617
} | [
"java.lang.reflect.Type",
"org.apache.sling.models.factory.ModelClassException",
"org.apache.sling.models.impl.model.InjectableElement"
] | import java.lang.reflect.Type; import org.apache.sling.models.factory.ModelClassException; import org.apache.sling.models.impl.model.InjectableElement; | import java.lang.reflect.*; import org.apache.sling.models.factory.*; import org.apache.sling.models.impl.model.*; | [
"java.lang",
"org.apache.sling"
] | java.lang; org.apache.sling; | 781,595 |
@Override
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) {
return false;
} | boolean function(int index, ItemStack stack, EnumFacing direction) { return false; } | /**
* Returns true if automation can extract the given item in the given slot from the given side.
*/ | Returns true if automation can extract the given item in the given slot from the given side | canExtractItem | {
"repo_name": "TheDragonTeam/ArmorPlus",
"path": "src/main/java/com/sofodev/armorplus/common/tileentity/TileEntityMapDevice.java",
"license": "lgpl-3.0",
"size": 5496
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.util.EnumFacing"
] | import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; | import net.minecraft.item.*; import net.minecraft.util.*; | [
"net.minecraft.item",
"net.minecraft.util"
] | net.minecraft.item; net.minecraft.util; | 872,518 |
public void setProfiles(ArrayList<IProfile> profiles) {
mAccountHeader.mProfiles = profiles;
mAccountHeader.updateHeaderAndList();
} | void function(ArrayList<IProfile> profiles) { mAccountHeader.mProfiles = profiles; mAccountHeader.updateHeaderAndList(); } | /**
* Set a new list of profiles for the header
*
* @param profiles
*/ | Set a new list of profiles for the header | setProfiles | {
"repo_name": "GaneshRepo/Material-Drawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/accountswitcher/AccountHeader.java",
"license": "apache-2.0",
"size": 42602
} | [
"com.mikepenz.materialdrawer.model.interfaces.IProfile",
"java.util.ArrayList"
] | import com.mikepenz.materialdrawer.model.interfaces.IProfile; import java.util.ArrayList; | import com.mikepenz.materialdrawer.model.interfaces.*; import java.util.*; | [
"com.mikepenz.materialdrawer",
"java.util"
] | com.mikepenz.materialdrawer; java.util; | 1,485,844 |
private void controlesUI() {
c.setLayout(null);
panel.setBackground(Color.decode("#D1D1D1"));
panel.setSize(new Dimension(300, 300));
panel.setBounds(10, 10, 300, 300);
c.add(panel);
optionAButton.setBounds(10, 320, 100, 36);
c.add(optionAButton);
optionBButton.setBounds(200, 320, 100, 36);
... | void function() { c.setLayout(null); panel.setBackground(Color.decode(STR)); panel.setSize(new Dimension(300, 300)); panel.setBounds(10, 10, 300, 300); c.add(panel); optionAButton.setBounds(10, 320, 100, 36); c.add(optionAButton); optionBButton.setBounds(200, 320, 100, 36); c.add(optionBButton); optionCButton.setBounds... | /**
* Controles principales de la GUI
*/ | Controles principales de la GUI | controlesUI | {
"repo_name": "adrianortiz/17-DibujoFactory",
"path": "src/com/codizer/view/DibujoView.java",
"license": "mit",
"size": 3171
} | [
"java.awt.Color",
"java.awt.Dimension"
] | import java.awt.Color; import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,107,738 |
public Socket createSocket(String host, int port, InetAddress localHost,
int localPort, int timeout)
throws IOException {
return ssl.createSocket(host, port, localHost, localPort, timeout);
} | Socket function(String host, int port, InetAddress localHost, int localPort, int timeout) throws IOException { return ssl.createSocket(host, port, localHost, localPort, timeout); } | /**
* Attempts to get a new socket connection to the given host within the
* given time limit.
*
* @param host the host name/IP
* @param port the port on the host
* @param localHost the local host name/IP to bind the socket to
* @param localPort the port on the local machine... | Attempts to get a new socket connection to the given host within the given time limit | createSocket | {
"repo_name": "dvandok/not-yet-commons-ssl-debian",
"path": "src/java/org/apache/commons/ssl/SSLClient.java",
"license": "apache-2.0",
"size": 8253
} | [
"java.io.IOException",
"java.net.InetAddress",
"java.net.Socket"
] | import java.io.IOException; import java.net.InetAddress; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,377,566 |
public static void validationInfo(IConstruct construct, String msg) {
XWPFRun lastRun = construct.getRuns().get(construct.getRuns().size() - 1);
construct.getValidationMessages().add(new TemplateValidationMessage(ValidationMessageLevel.INFO, msg, lastRun));
} | static void function(IConstruct construct, String msg) { XWPFRun lastRun = construct.getRuns().get(construct.getRuns().size() - 1); construct.getValidationMessages().add(new TemplateValidationMessage(ValidationMessageLevel.INFO, msg, lastRun)); } | /**
* Add a validation info message to a given {@link IConstruct}'s last run.
*
* @param construct
* The construct in which to 'log' the message
* @param msg
* the message to log
*/ | Add a validation info message to a given <code>IConstruct</code>'s last run | validationInfo | {
"repo_name": "ylussaud/M2Doc",
"path": "plugins/org.obeonetwork.m2doc/src/org/obeonetwork/m2doc/util/M2DocUtils.java",
"license": "epl-1.0",
"size": 33891
} | [
"org.apache.poi.xwpf.usermodel.XWPFRun",
"org.obeonetwork.m2doc.parser.TemplateValidationMessage",
"org.obeonetwork.m2doc.parser.ValidationMessageLevel",
"org.obeonetwork.m2doc.template.IConstruct"
] | import org.apache.poi.xwpf.usermodel.XWPFRun; import org.obeonetwork.m2doc.parser.TemplateValidationMessage; import org.obeonetwork.m2doc.parser.ValidationMessageLevel; import org.obeonetwork.m2doc.template.IConstruct; | import org.apache.poi.xwpf.usermodel.*; import org.obeonetwork.m2doc.parser.*; import org.obeonetwork.m2doc.template.*; | [
"org.apache.poi",
"org.obeonetwork.m2doc"
] | org.apache.poi; org.obeonetwork.m2doc; | 2,195,886 |
public Lexer get(Object syntaxInput, String baseName, List tokenSymbols,
List ignoredSymbols) throws Exception {
Lexer lexer = readLexer(syntaxInput, baseName);
if (lexer == null)
lexer = buildAndStoreLexer(syntaxInput, baseName, tokenSymbols,
ignoredSymbols);
return lexer;
} | Lexer function(Object syntaxInput, String baseName, List tokenSymbols, List ignoredSymbols) throws Exception { Lexer lexer = readLexer(syntaxInput, baseName); if (lexer == null) lexer = buildAndStoreLexer(syntaxInput, baseName, tokenSymbols, ignoredSymbols); return lexer; } | /**
* Builds the Lexer from scratch if not found in filesystem, else loads the
* serialized Lexer.
*
* @param syntaxInput
* the Lexer syntax as File, InputStream, List of Lists, String
* [][] or Syntax.
* @param baseName
* name of serialization file, can be null when sy... | Builds the Lexer from scratch if not found in filesystem, else loads the serialized Lexer | get | {
"repo_name": "dashorst/runcc",
"path": "src/main/java/com/martijndashorst/runcc/patterns/interpreter/parsergenerator/builder/SerializedLexer.java",
"license": "lgpl-3.0",
"size": 7446
} | [
"com.martijndashorst.runcc.patterns.interpreter.parsergenerator.Lexer",
"java.util.List"
] | import com.martijndashorst.runcc.patterns.interpreter.parsergenerator.Lexer; import java.util.List; | import com.martijndashorst.runcc.patterns.interpreter.parsergenerator.*; import java.util.*; | [
"com.martijndashorst.runcc",
"java.util"
] | com.martijndashorst.runcc; java.util; | 257,231 |
public Object topic(String id) {
return new T3(this, UUID.nameUUIDFromBytes(id.getBytes(DFLT_CHARSET)));
} | Object function(String id) { return new T3(this, UUID.nameUUIDFromBytes(id.getBytes(DFLT_CHARSET))); } | /**
* NOTE: The method should be used only for cases when there is no any other non-string identifier(s)
* to use to differentiate topics.
*
* @param id Topic ID.
* @return Grid message topic with specified ID.
*/ | to use to differentiate topics | topic | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/GridTopic.java",
"license": "apache-2.0",
"size": 19453
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 1,298,658 |
public WaveletOperation deserializeOperation(ProtocolWaveletOperation message,
ParticipantId creator, long timestamp) throws MessageException {
try {
return OperationFactory.createWaveletOperation(
new WaveletOperationContext(creator, timestamp, 1), message);
} catch (InvalidInputExcepti... | WaveletOperation function(ProtocolWaveletOperation message, ParticipantId creator, long timestamp) throws MessageException { try { return OperationFactory.createWaveletOperation( new WaveletOperationContext(creator, timestamp, 1), message); } catch (InvalidInputException e) { throw new MessageException(e); } } | /**
* The extra parameters are required because they are not present in the
* serialized form of a wavelet operation.
*/ | The extra parameters are required because they are not present in the serialized form of a wavelet operation | deserializeOperation | {
"repo_name": "latos/walkaround",
"path": "src/com/google/walkaround/wave/shared/WaveSerializer.java",
"license": "apache-2.0",
"size": 23668
} | [
"com.google.walkaround.proto.ProtocolWaveletOperation",
"com.google.walkaround.slob.shared.MessageException",
"com.google.walkaround.wave.shared.OperationFactory",
"org.waveprotocol.wave.model.operation.wave.WaveletOperation",
"org.waveprotocol.wave.model.operation.wave.WaveletOperationContext",
"org.wave... | import com.google.walkaround.proto.ProtocolWaveletOperation; import com.google.walkaround.slob.shared.MessageException; import com.google.walkaround.wave.shared.OperationFactory; import org.waveprotocol.wave.model.operation.wave.WaveletOperation; import org.waveprotocol.wave.model.operation.wave.WaveletOperationContext... | import com.google.walkaround.proto.*; import com.google.walkaround.slob.shared.*; import com.google.walkaround.wave.shared.*; import org.waveprotocol.wave.model.operation.wave.*; import org.waveprotocol.wave.model.wave.*; | [
"com.google.walkaround",
"org.waveprotocol.wave"
] | com.google.walkaround; org.waveprotocol.wave; | 2,485,904 |
void sendToAllAround(MessageBase message, Supplier<PacketDistributor.TargetPoint> point); | void sendToAllAround(MessageBase message, Supplier<PacketDistributor.TargetPoint> point); | /**
* Sends a message to all connected clients near a certain point,
* only valid if the message is handled on the client
*/ | Sends a message to all connected clients near a certain point, only valid if the message is handled on the client | sendToAllAround | {
"repo_name": "InfinityRaider/InfinityLib",
"path": "src/main/java/com/infinityraider/infinitylib/network/INetworkWrapper.java",
"license": "mit",
"size": 3944
} | [
"java.util.function.Supplier",
"net.minecraftforge.fml.network.PacketDistributor"
] | import java.util.function.Supplier; import net.minecraftforge.fml.network.PacketDistributor; | import java.util.function.*; import net.minecraftforge.fml.network.*; | [
"java.util",
"net.minecraftforge.fml"
] | java.util; net.minecraftforge.fml; | 2,279,797 |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public long getId() {
return id;
} | @Generated(value = STR, date = STR, comments = STR) long function() { return id; } | /**
* Gets the value of the id property.
*
*/ | Gets the value of the id property | getId | {
"repo_name": "kanonirov/lanb-client",
"path": "src/main/java/ru/lanbilling/webservice/wsdl/GetVgroup.java",
"license": "mit",
"size": 1684
} | [
"javax.annotation.Generated"
] | import javax.annotation.Generated; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 335,959 |
@Override
public void renameTo(String newName) throws IOException {
File oldBuildDir = getBuildDir();
super.renameTo(newName);
File newBuildDir = getBuildDir();
if (oldBuildDir.isDirectory() && !newBuildDir.isDirectory()) {
if (!newBuildDir.getParentFile().isDirectory... | void function(String newName) throws IOException { File oldBuildDir = getBuildDir(); super.renameTo(newName); File newBuildDir = getBuildDir(); if (oldBuildDir.isDirectory() && !newBuildDir.isDirectory()) { if (!newBuildDir.getParentFile().isDirectory()) { newBuildDir.getParentFile().mkdirs(); } if (!oldBuildDir.rename... | /**
* Renames a job.
*/ | Renames a job | renameTo | {
"repo_name": "rlugojr/jenkins",
"path": "core/src/main/java/hudson/model/Job.java",
"license": "mit",
"size": 53643
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 6,839 |
public void testClear_throwsUnsupportedOperationException() {
Map<K, V> map = createMap();
if (!isClearSupported) {
try {
map.clear();
fail("expected exception");
} catch (UnsupportedOperationException e) {
// expected outcome
}
}
} | void function() { Map<K, V> map = createMap(); if (!isClearSupported) { try { map.clear(); fail(STR); } catch (UnsupportedOperationException e) { } } } | /**
* Test method for 'java.util.Map.clear()'.
*
* @see java.util.Map#clear()
*/ | Test method for 'java.util.Map.clear()' | testClear_throwsUnsupportedOperationException | {
"repo_name": "google/j2cl",
"path": "jre/javatests/com/google/gwt/emultest/java/util/TreeMapTest.java",
"license": "apache-2.0",
"size": 108600
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,391,342 |
interface ResteasyComponentBuilder
extends
ComponentBuilder<ResteasyComponent> {
default ResteasyComponentBuilder httpRegistry(
org.apache.camel.http.common.HttpRegistry httpRegistry) {
doSetProperty("httpRegistry", httpRegistry);
... | interface ResteasyComponentBuilder extends ComponentBuilder<ResteasyComponent> { default ResteasyComponentBuilder httpRegistry( org.apache.camel.http.common.HttpRegistry httpRegistry) { doSetProperty(STR, httpRegistry); return this; } | /**
* Sets httpRegistry which can be externalized to be used by camel.
*
* The option is a:
* <code>org.apache.camel.http.common.HttpRegistry</code> type.
*
* Group: common
*/ | Sets httpRegistry which can be externalized to be used by camel. The option is a: <code>org.apache.camel.http.common.HttpRegistry</code> type. Group: common | httpRegistry | {
"repo_name": "DariusX/camel",
"path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/ResteasyComponentBuilderFactory.java",
"license": "apache-2.0",
"size": 18670
} | [
"org.apache.camel.builder.component.ComponentBuilder",
"org.apache.camel.component.resteasy.ResteasyComponent"
] | import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.resteasy.ResteasyComponent; | import org.apache.camel.builder.component.*; import org.apache.camel.component.resteasy.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,627,650 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Login that = (Login) o;
return Objects.equals(user, that.user) &&
Objects.equals(password, that.password);
... | boolean function(Object o) { if (this == o) { return true; } if (o == null getClass() != o.getClass()) { return false; } Login that = (Login) o; return Objects.equals(user, that.user) && Objects.equals(password, that.password); } | /**
* Equality test matches user and password.
* @param o other object
* @return true if the objects are considered equivalent.
*/ | Equality test matches user and password | equals | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3native/S3xLoginHelper.java",
"license": "gpl-3.0",
"size": 9081
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,941,521 |
FileDownloader getDelegate(String url) throws DownloadException {
String scheme;
try {
scheme = getScheme(url);
} catch (MalformedURLException e) {
LogUtil.e("%s: The download url is malformed, url = %s", TAG, url);
throw DownloadException.builder()
.setDownloadResultCode(Downl... | FileDownloader getDelegate(String url) throws DownloadException { String scheme; try { scheme = getScheme(url); } catch (MalformedURLException e) { LogUtil.e(STR, TAG, url); throw DownloadException.builder() .setDownloadResultCode(DownloadResultCode.MALFORMED_DOWNLOAD_URL) .setCause(e) .build(); } FileDownloader downlo... | /**
* Lookup the delegate FileDownloader that can handle a url, based on the url's scheme.
*
* @throws DownloadException If an appropriate delegate FileDownloader could not be found.
*/ | Lookup the delegate FileDownloader that can handle a url, based on the url's scheme | getDelegate | {
"repo_name": "google/mobile-data-download",
"path": "java/com/google/android/libraries/mobiledatadownload/downloader/MultiSchemeFileDownloader.java",
"license": "apache-2.0",
"size": 4796
} | [
"com.google.android.libraries.mobiledatadownload.DownloadException",
"com.google.android.libraries.mobiledatadownload.internal.logging.LogUtil",
"java.net.MalformedURLException"
] | import com.google.android.libraries.mobiledatadownload.DownloadException; import com.google.android.libraries.mobiledatadownload.internal.logging.LogUtil; import java.net.MalformedURLException; | import com.google.android.libraries.mobiledatadownload.*; import com.google.android.libraries.mobiledatadownload.internal.logging.*; import java.net.*; | [
"com.google.android",
"java.net"
] | com.google.android; java.net; | 990,361 |
public void validate(final Cookie cookie, final CookieOrigin origin)
throws MalformedCookieException {
if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null");
}
if (origin == null) {
throw new IllegalArgumentException("Cookie or... | void function(final Cookie cookie, final CookieOrigin origin) throws MalformedCookieException { if (cookie == null) { throw new IllegalArgumentException(STR); } if (origin == null) { throw new IllegalArgumentException(STR); } int port = origin.getPort(); if (cookie instanceof ClientCookie && ((ClientCookie) cookie).con... | /**
* Validate cookie port attribute. If the Port attribute was specified
* in header, the request port must be in cookie's port list.
*/ | Validate cookie port attribute. If the Port attribute was specified in header, the request port must be in cookie's port list | validate | {
"repo_name": "wilebeast/FireFox-OS",
"path": "B2G/gecko/mobile/android/base/httpclientandroidlib/impl/cookie/RFC2965PortAttributeHandler.java",
"license": "apache-2.0",
"size": 6359
} | [
"ch.boye.httpclientandroidlib.cookie.ClientCookie",
"ch.boye.httpclientandroidlib.cookie.Cookie",
"ch.boye.httpclientandroidlib.cookie.CookieOrigin",
"ch.boye.httpclientandroidlib.cookie.CookieRestrictionViolationException",
"ch.boye.httpclientandroidlib.cookie.MalformedCookieException"
] | import ch.boye.httpclientandroidlib.cookie.ClientCookie; import ch.boye.httpclientandroidlib.cookie.Cookie; import ch.boye.httpclientandroidlib.cookie.CookieOrigin; import ch.boye.httpclientandroidlib.cookie.CookieRestrictionViolationException; import ch.boye.httpclientandroidlib.cookie.MalformedCookieException; | import ch.boye.httpclientandroidlib.cookie.*; | [
"ch.boye.httpclientandroidlib"
] | ch.boye.httpclientandroidlib; | 2,234,585 |
ddFactory getddFactory();
interface Literals {
EClass BINDING_TYPE = eINSTANCE.getBindingType();
EAttribute BINDING_TYPE__NAME = eINSTANCE.getBindingType_Name();
EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
E... | ddFactory getddFactory(); interface Literals { EClass BINDING_TYPE = eINSTANCE.getBindingType(); EAttribute BINDING_TYPE__NAME = eINSTANCE.getBindingType_Name(); EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot(); EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed(); EReference DOCUMENT_ROOT__XMLNS_PREFI... | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getddFactory | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.apache.ode.deploy.model/src/org/eclipse/bpel/apache/ode/deploy/model/dd/ddPackage.java",
"license": "apache-2.0",
"size": 68076
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EDataType",
"org.eclipse.emf.ecore.EEnum",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,518,253 |
public Collection<V> values() {
return entries.stream()
.map(Entry::getValue)
.collect(Collectors.toList());
}
| Collection<V> function() { return entries.stream() .map(Entry::getValue) .collect(Collectors.toList()); } | /**
* Gets the values generated by this generator as collection.
* @return collection containing the values generated by this generator in the order of the generator
*/ | Gets the values generated by this generator as collection | values | {
"repo_name": "mhuisi/avl-tree",
"path": "AVLTree/src/de/szut/tree/EntryGenerator.java",
"license": "mit",
"size": 2816
} | [
"java.util.Collection",
"java.util.Map",
"java.util.stream.Collectors"
] | import java.util.Collection; import java.util.Map; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 582,671 |
public ByteBuffer getValueAsByteBuffer(byte [] family, byte [] qualifier) {
Cell kv = getColumnLatestCell(family, 0, family.length, qualifier, 0, qualifier.length);
if (kv == null) {
return null;
}
return ByteBuffer.wrap(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()).
asRe... | ByteBuffer function(byte [] family, byte [] qualifier) { Cell kv = getColumnLatestCell(family, 0, family.length, qualifier, 0, qualifier.length); if (kv == null) { return null; } return ByteBuffer.wrap(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()). asReadOnlyBuffer(); } | /**
* Returns the value wrapped in a new <code>ByteBuffer</code>.
*
* @param family family name
* @param qualifier column qualifier
*
* @return the latest version of the column, or <code>null</code> if none found
*/ | Returns the value wrapped in a new <code>ByteBuffer</code> | getValueAsByteBuffer | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java",
"license": "apache-2.0",
"size": 33516
} | [
"java.nio.ByteBuffer",
"org.apache.hadoop.hbase.Cell"
] | import java.nio.ByteBuffer; import org.apache.hadoop.hbase.Cell; | import java.nio.*; import org.apache.hadoop.hbase.*; | [
"java.nio",
"org.apache.hadoop"
] | java.nio; org.apache.hadoop; | 2,898,534 |
RelNode copy(
RelTraitSet traitSet,
List<RelNode> inputs); | RelNode copy( RelTraitSet traitSet, List<RelNode> inputs); | /**
* Creates a copy of this relational expression, perhaps changing traits and
* inputs.
*
* <p>Sub-classes with other important attributes are encouraged to create
* variants of this method with more parameters.</p>
*
* @param traitSet Trait set
* @param inputs Inputs
* @return Copy of th... | Creates a copy of this relational expression, perhaps changing traits and inputs. Sub-classes with other important attributes are encouraged to create variants of this method with more parameters | copy | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/rel/RelNode.java",
"license": "apache-2.0",
"size": 16536
} | [
"java.util.List",
"org.apache.calcite.plan.RelTraitSet"
] | import java.util.List; import org.apache.calcite.plan.RelTraitSet; | import java.util.*; import org.apache.calcite.plan.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,636,095 |
public void testPKAndFKColumnTypesIntegerToVarchar()
{
final String model1Xml =
"<?xml version='1.0' encoding='ISO-8859-1'?>\n"+
"<database xmlns='" + DatabaseIO.DDLUTILS_NAMESPACE + "' name='roundtriptest'>\n"+
" <table name='roundtrip1'>\n"+
" ... | void function() { final String model1Xml = STR+ STR + DatabaseIO.DDLUTILS_NAMESPACE + STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR; final String model2Xml = STR+ STR + DatabaseIO.DDLUTILS_NAMESPACE + STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR+ STR; createDatabase(model1Xml); insertRow(STR, new ... | /**
* Tests the change of the datatypes of PK and FK columns from integer to varchar.
*/ | Tests the change of the datatypes of PK and FK columns from integer to varchar | testPKAndFKColumnTypesIntegerToVarchar | {
"repo_name": "ramizul/ddlutilsplus",
"path": "src/test/java/org/apache/ddlutils/io/TestChangeColumn.java",
"license": "apache-2.0",
"size": 184741
} | [
"java.util.List",
"org.apache.commons.beanutils.DynaBean"
] | import java.util.List; import org.apache.commons.beanutils.DynaBean; | import java.util.*; import org.apache.commons.beanutils.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 738,695 |
BigDecimal stringToBigDecimal(String str) {
BigDecimal result = BigDecimal.ZERO;
BigDecimal curPlace = ONE_PLACE; // start with 1/65536 to compute the first digit.
int len = Math.min(str.length(), MAX_CHARS);
for (int i = 0; i < len; i++) {
int codePoint = str.codePointAt(i);
result = re... | BigDecimal stringToBigDecimal(String str) { BigDecimal result = BigDecimal.ZERO; BigDecimal curPlace = ONE_PLACE; int len = Math.min(str.length(), MAX_CHARS); for (int i = 0; i < len; i++) { int codePoint = str.codePointAt(i); result = result.add(tryDivide(new BigDecimal(codePoint), curPlace)); curPlace = curPlace.mult... | /**
* Return a BigDecimal representation of string 'str' suitable for use
* in a numerically-sorting order.
*/ | Return a BigDecimal representation of string 'str' suitable for use in a numerically-sorting order | stringToBigDecimal | {
"repo_name": "apache/hadoop-mapreduce",
"path": "src/java/org/apache/hadoop/mapreduce/lib/db/TextSplitter.java",
"license": "apache-2.0",
"size": 8231
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,126,663 |
protected boolean check(ResourceCollection rc) {
boolean upToDate = true;
if (isFileFileSet(rc)) {
FileSet fs = (FileSet) rc;
upToDate = check(fs.getDir(getProject()), getFileNames(fs));
} else if (!rc.isFilesystemOnly() && !supportsNonFileResources()) {
t... | boolean function(ResourceCollection rc) { boolean upToDate = true; if (isFileFileSet(rc)) { FileSet fs = (FileSet) rc; upToDate = check(fs.getDir(getProject()), getFileNames(fs)); } else if (!rc.isFilesystemOnly() && !supportsNonFileResources()) { throw new BuildException(STR); } else if (rc.isFilesystemOnly()) { HashS... | /**
* Checks whether the archive is out-of-date with respect to the resources
* of the given collection.
*
* <p>Also checks that either all collections only contain file
* resources or this class supports non-file collections.</p>
*
* <p>And - in case of file-collections - ensures tha... | Checks whether the archive is out-of-date with respect to the resources of the given collection. Also checks that either all collections only contain file resources or this class supports non-file collections. And - in case of file-collections - ensures that the archive won't contain itself | check | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/taskdefs/Tar.java",
"license": "gpl-2.0",
"size": 34170
} | [
"java.io.File",
"java.util.HashMap",
"java.util.HashSet",
"java.util.Iterator",
"java.util.Vector",
"org.apache.tools.ant.BuildException",
"org.apache.tools.ant.types.FileSet",
"org.apache.tools.ant.types.Resource",
"org.apache.tools.ant.types.ResourceCollection",
"org.apache.tools.ant.types.resou... | import java.io.File; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.types.ResourceCollection; import org... | import java.io.*; import java.util.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; import org.apache.tools.ant.types.resources.*; import org.apache.tools.ant.util.*; | [
"java.io",
"java.util",
"org.apache.tools"
] | java.io; java.util; org.apache.tools; | 2,404,351 |
public Vector3 set(FloatBuffer vals, int offset) {
return set(vals.get(offset), vals.get(offset + 1), vals.get(offset + 2));
} | Vector3 function(FloatBuffer vals, int offset) { return set(vals.get(offset), vals.get(offset + 1), vals.get(offset + 2)); } | /**
* As {@link #set(double[], int)} but the values are taken from the FloatBuffer.
*
* @param vals The double value source
* @param offset The index into vals for the x coordinate
*
* @return This vector
*
* @throws ArrayIndexOutOfBoundsException if vals doesn't have four valu... | As <code>#set(double[], int)</code> but the values are taken from the FloatBuffer | set | {
"repo_name": "geronimo-iia/ferox",
"path": "ferox-math/src/main/java/com/ferox/math/Vector3.java",
"license": "bsd-2-clause",
"size": 28202
} | [
"java.nio.FloatBuffer"
] | import java.nio.FloatBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 248,818 |
logger.entry(channelLineup);
boolean returnValue = true;
// This only applies when ClearQAM is not in use because we can't do anything with the
// returned information.
boolean enableAllChannels = HDHomeRunChannels.enableAllChannels.getBoolean();
boolean isQam = false;
b... | logger.entry(channelLineup); boolean returnValue = true; boolean enableAllChannels = HDHomeRunChannels.enableAllChannels.getBoolean(); boolean isQam = false; boolean isAtsc = false; HttpURLConnection httpURLConnection = null; try { InetAddress ipAddress = null; String lookupAddress = channelLineup.getAddress(); if (loo... | /**
* This will populate the provided channel lineup with the latest channel information provided
* by the the Prime DCT.
*
* @param channelLineup This is the lineup object.
* @return <i>true</i> if the update was successful.
*/ | This will populate the provided channel lineup with the latest channel information provided by the the Prime DCT | populateChannels | {
"repo_name": "enternoescape/opendct",
"path": "src/main/java/opendct/channel/updater/http/HDHomeRunChannels.java",
"license": "apache-2.0",
"size": 13388
} | [
"java.net.HttpURLConnection",
"java.net.InetAddress"
] | import java.net.HttpURLConnection; import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,209,565 |
@ApiMethod(
name = "get",
path = "user/{id}",
httpMethod = ApiMethod.HttpMethod.GET)
public User get(@Named("id") final String id) throws NotFoundException {
logger.info("Getting User with ID: " + id);
User user = ofy().load().type(User.class).id(id).now();
... | @ApiMethod( name = "get", path = STR, httpMethod = ApiMethod.HttpMethod.GET) User function(@Named("id") final String id) throws NotFoundException { logger.info(STR + id); User user = ofy().load().type(User.class).id(id).now(); if (user == null) { throw new NotFoundException(STR + id); } return user; } | /**
* Returns the {@link User} with the corresponding ID.
*
* @param id the ID of the entity to be retrieved
* @return the entity with the corresponding ID
* @throws NotFoundException if there is no {@code User} with the provided ID.
*/ | Returns the <code>User</code> with the corresponding ID | get | {
"repo_name": "padlaboris/AndroidHomework",
"path": "backend/src/main/java/com/example/padlabear/myapplication/backend/UserEndpoint.java",
"license": "apache-2.0",
"size": 5964
} | [
"com.google.api.server.spi.config.ApiMethod",
"com.google.api.server.spi.response.NotFoundException",
"com.googlecode.objectify.ObjectifyService",
"javax.inject.Named"
] | import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.NotFoundException; import com.googlecode.objectify.ObjectifyService; import javax.inject.Named; | import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.googlecode.objectify.*; import javax.inject.*; | [
"com.google.api",
"com.googlecode.objectify",
"javax.inject"
] | com.google.api; com.googlecode.objectify; javax.inject; | 6,501 |
public void setUnit(final Term unitVal) {
this.unit = unitVal;
}
| void function(final Term unitVal) { this.unit = unitVal; } | /**
* Sets the unit.
*
* @param unitVal the unit
*/ | Sets the unit | setUnit | {
"repo_name": "NCIP/caarray",
"path": "software/caarray-common.jar/src/main/java/gov/nih/nci/caarray/domain/project/AbstractFactorValue.java",
"license": "bsd-3-clause",
"size": 2988
} | [
"gov.nih.nci.caarray.domain.vocabulary.Term"
] | import gov.nih.nci.caarray.domain.vocabulary.Term; | import gov.nih.nci.caarray.domain.vocabulary.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 1,163,515 |
void processNotifies() throws SQLException;
//
// Fastpath interface.
// | void processNotifies() throws SQLException; // | /**
* Prior to attempting to retrieve notifications, we need to pull
* any recently received notifications off of the network buffers.
* The notification retrieval in ProtocolConnection cannot do this
* as it is prone to deadlock, so the higher level caller must be
* responsible which requires ... | Prior to attempting to retrieve notifications, we need to pull any recently received notifications off of the network buffers. The notification retrieval in ProtocolConnection cannot do this as it is prone to deadlock, so the higher level caller must be responsible which requires exposing this method | processNotifies | {
"repo_name": "schlosna/pgjdbc",
"path": "org/postgresql/core/QueryExecutor.java",
"license": "bsd-3-clause",
"size": 9792
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 968,920 |
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
this.setBlockBoundsBasedOnState(world, x, y, z);
return super.getSelectedBoundingBoxFromPool(world, x, y, z);
} | @SideOnly(Side.CLIENT) AxisAlignedBB function(World world, int x, int y, int z) { this.setBlockBoundsBasedOnState(world, x, y, z); return super.getSelectedBoundingBoxFromPool(world, x, y, z); } | /**
* Returns the bounding box of the wired rectangular prism to render.
*/ | Returns the bounding box of the wired rectangular prism to render | getSelectedBoundingBoxFromPool | {
"repo_name": "Elecs-Mods/RFTools",
"path": "src/main/java/mcjty/rftools/blocks/screens/ScreenBlock.java",
"license": "mit",
"size": 15957
} | [
"net.minecraft.util.AxisAlignedBB",
"net.minecraft.world.World"
] | import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; | import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.util; net.minecraft.world; | 721,885 |
private void setActiveTab(@NotNull PartPresenter part) {
for (TabItem tab : tabs.values()) {
tab.unSelect();
}
tabs.get(part).select();
delegate.onRequestFocus();
} | void function(@NotNull PartPresenter part) { for (TabItem tab : tabs.values()) { tab.unSelect(); } tabs.get(part).select(); delegate.onRequestFocus(); } | /**
* Displays and sets part tab active.
*
* @param part
*/ | Displays and sets part tab active | setActiveTab | {
"repo_name": "sleshchenko/che",
"path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/part/PartStackViewImpl.java",
"license": "epl-1.0",
"size": 9768
} | [
"javax.validation.constraints.NotNull",
"org.eclipse.che.ide.api.parts.PartPresenter"
] | import javax.validation.constraints.NotNull; import org.eclipse.che.ide.api.parts.PartPresenter; | import javax.validation.constraints.*; import org.eclipse.che.ide.api.parts.*; | [
"javax.validation",
"org.eclipse.che"
] | javax.validation; org.eclipse.che; | 2,452,793 |
Iterable<SemanticTag<EntityType, LabeledResource, LabeledResource>> getTagsForEntity(EntityType entityType); | Iterable<SemanticTag<EntityType, LabeledResource, LabeledResource>> getTagsForEntity(EntityType entityType); | /**
* Retrieves all tags for an entity.
*/ | Retrieves all tags for an entity | getTagsForEntity | {
"repo_name": "ChaoPang/molgenis",
"path": "molgenis-semantic-search/src/main/java/org/molgenis/semanticsearch/service/TagService.java",
"license": "lgpl-3.0",
"size": 2271
} | [
"org.molgenis.data.meta.model.EntityType",
"org.molgenis.data.semantic.LabeledResource",
"org.molgenis.data.semantic.SemanticTag"
] | import org.molgenis.data.meta.model.EntityType; import org.molgenis.data.semantic.LabeledResource; import org.molgenis.data.semantic.SemanticTag; | import org.molgenis.data.meta.model.*; import org.molgenis.data.semantic.*; | [
"org.molgenis.data"
] | org.molgenis.data; | 723,384 |
@Override
public UserModel authenticate(String username, SshKey key) {
if (username != null) {
if (!StringUtils.isEmpty(username)) {
UserModel user = userManager.getUserModel(username);
if (user != null) {
// existing user
logger.debug(MessageFormat.format("{0} authenticated by {1} public key... | UserModel function(String username, SshKey key) { if (username != null) { if (!StringUtils.isEmpty(username)) { UserModel user = userManager.getUserModel(username); if (user != null) { logger.debug(MessageFormat.format(STR, user.username, key.getAlgorithm())); return validateAuthentication(user, AuthenticationType.PUBL... | /**
* Authenticate a user based on a public key.
*
* This implementation assumes that the authentication has already take place
* (e.g. SSHDaemon) and that this is a validation/verification of the user.
*
* @param username
* @param key
* @return a user object or null
*/ | Authenticate a user based on a public key. This implementation assumes that the authentication has already take place (e.g. SSHDaemon) and that this is a validation/verification of the user | authenticate | {
"repo_name": "wellington-junio/gitblit",
"path": "src/main/java/com/gitblit/manager/AuthenticationManager.java",
"license": "apache-2.0",
"size": 19252
} | [
"com.gitblit.Constants",
"com.gitblit.models.UserModel",
"com.gitblit.transport.ssh.SshKey",
"com.gitblit.utils.StringUtils",
"java.text.MessageFormat"
] | import com.gitblit.Constants; import com.gitblit.models.UserModel; import com.gitblit.transport.ssh.SshKey; import com.gitblit.utils.StringUtils; import java.text.MessageFormat; | import com.gitblit.*; import com.gitblit.models.*; import com.gitblit.transport.ssh.*; import com.gitblit.utils.*; import java.text.*; | [
"com.gitblit",
"com.gitblit.models",
"com.gitblit.transport",
"com.gitblit.utils",
"java.text"
] | com.gitblit; com.gitblit.models; com.gitblit.transport; com.gitblit.utils; java.text; | 1,733,380 |
public BytesBuilder compact() {
if (count < value.length) {
value = Arrays.copyOf(value, count);
}
return this;
}
| BytesBuilder function() { if (count < value.length) { value = Arrays.copyOf(value, count); } return this; } | /**
* Trims the underlying array so that it is only big enough to contain the appended values.
*
* @return This BytesBuilder
*/ | Trims the underlying array so that it is only big enough to contain the appended values | compact | {
"repo_name": "nlr/Bytes",
"path": "src/io/njlr/bytes/BytesBuilder.java",
"license": "mit",
"size": 14992
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,240,151 |
public static void i(final String msg, final Object... args) {
logMessage(Log.INFO, msg, args, null);
} | static void function(final String msg, final Object... args) { logMessage(Log.INFO, msg, args, null); } | /**
* Log a message.
*
* @param msg message to log. This message is expected to be a format string if varargs are
* passed in.
* @param args optional arguments to be formatted into {@code msg}.
*/ | Log a message | i | {
"repo_name": "inloop/easylog",
"path": "easylog/src/main/java/eu/inloop/easylog/EasyLog.java",
"license": "apache-2.0",
"size": 9238
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,990,331 |
public List<ApplicationClusterContext> getApplicationClusterContexts() throws ApplicationDefinitionException; | List<ApplicationClusterContext> function() throws ApplicationDefinitionException; | /**
* Returns a set of ApplicationClusterContext which will comprise of cluster related information
* extracted from the Application definition
*
* @return Set of ApplicationClusterContext objects
* @throws ApplicationDefinitionException if any error occurs
*/ | Returns a set of ApplicationClusterContext which will comprise of cluster related information extracted from the Application definition | getApplicationClusterContexts | {
"repo_name": "agentmilindu/stratos",
"path": "components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/parser/ApplicationParser.java",
"license": "apache-2.0",
"size": 2223
} | [
"java.util.List",
"org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext",
"org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException"
] | import java.util.List; import org.apache.stratos.autoscaler.applications.pojo.ApplicationClusterContext; import org.apache.stratos.autoscaler.exception.application.ApplicationDefinitionException; | import java.util.*; import org.apache.stratos.autoscaler.applications.pojo.*; import org.apache.stratos.autoscaler.exception.application.*; | [
"java.util",
"org.apache.stratos"
] | java.util; org.apache.stratos; | 652,891 |
Iterable<? extends Resource> getResources();
void destroy(); | Iterable<? extends Resource> getResources(); void destroy(); | /**
* Destroys result.
*/ | Destroys result | destroy | {
"repo_name": "Esri/geoportal-server",
"path": "geoportal/src/com/esri/gpt/framework/resource/query/Result.java",
"license": "apache-2.0",
"size": 1156
} | [
"com.esri.gpt.framework.resource.api.Resource"
] | import com.esri.gpt.framework.resource.api.Resource; | import com.esri.gpt.framework.resource.api.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 265,255 |
@Override
boolean contains(Quad quad);
/**
* Check if dataset contains a pattern of quads.
*
* @param graphName
* The graph the quad belongs to, wrapped as an {@link Optional} | boolean contains(Quad quad); /** * Check if dataset contains a pattern of quads. * * @param graphName * The graph the quad belongs to, wrapped as an {@link Optional} | /**
* Check if dataset contains quad.
*
* @param quad
* The quad to check.
* @return True if the dataset contains the given Quad.
*/ | Check if dataset contains quad | contains | {
"repo_name": "apache/incubator-commonsrdf",
"path": "api/src/main/java/org/apache/commons/rdf/api/Dataset.java",
"license": "apache-2.0",
"size": 14013
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 934,210 |
String getId();
/**
* Configurable type identifier {@value #CONFIGURABLE_TYPE} | String getId(); /** * Configurable type identifier {@value #CONFIGURABLE_TYPE} | /**
* bean name / unique identifier (spring bean name)
*
* @return
*/ | bean name / unique identifier (spring bean name) | getId | {
"repo_name": "bcvsolutions/CzechIdMng",
"path": "Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/api/event/EntityEventProcessor.java",
"license": "mit",
"size": 2404
} | [
"eu.bcvsolutions.idm.core.api.service.Configurable"
] | import eu.bcvsolutions.idm.core.api.service.Configurable; | import eu.bcvsolutions.idm.core.api.service.*; | [
"eu.bcvsolutions.idm"
] | eu.bcvsolutions.idm; | 1,261,389 |
public LocatedObjects annotate(BufferedImage image) {
LocatedObjects result;
Report report;
LocatedObject current;
int i;
m_Stopped = false;
m_Errors.clear();
m_Warnings.clear();
check(image);
result = doLocate(image, true);
if (m_Stopped... | LocatedObjects function(BufferedImage image) { LocatedObjects result; Report report; LocatedObject current; int i; m_Stopped = false; m_Errors.clear(); m_Warnings.clear(); check(image); result = doLocate(image, true); if (m_Stopped) result = new LocatedObjects(); return result; } | /**
* Only annotates the objects in the image, does not output any sub-images.
*
* @param image the image to process
* @return the annotated objects
*/ | Only annotates the objects in the image, does not output any sub-images | annotate | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging/src/main/java/adams/flow/transformer/locateobjects/AbstractObjectLocator.java",
"license": "gpl-3.0",
"size": 11626
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,565,869 |
public static synchronized Map getReferences() {
return new HashMap(currentReferences);
} | static synchronized Map function() { return new HashMap(currentReferences); } | /** Return the Map of current region references (to be used for cloning validation).
*/ | Return the Map of current region references (to be used for cloning validation) | getReferences | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/delta/DeltaObserver.java",
"license": "apache-2.0",
"size": 5329
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,128,611 |
public void resolveIgnoredLinks() throws VTNException {
// Read all ignored inter-switch links.
InstanceIdentifier<IgnoredLinks> igPath =
InstanceIdentifier.create(IgnoredLinks.class);
LogicalDatastoreType oper = LogicalDatastoreType.OPERATIONAL;
Optional<IgnoredLinks> op... | void function() throws VTNException { InstanceIdentifier<IgnoredLinks> igPath = InstanceIdentifier.create(IgnoredLinks.class); LogicalDatastoreType oper = LogicalDatastoreType.OPERATIONAL; Optional<IgnoredLinks> opt = DataStoreUtils.read(transaction, oper, igPath); if (!opt.isPresent()) { return; } List<IgnoredLink> li... | /**
* Try to resolve ignored inter-switch links.
*
* @throws VTNException An error occurred.
*/ | Try to resolve ignored inter-switch links | resolveIgnoredLinks | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/main/java/org/opendaylight/vtn/manager/internal/util/inventory/LinkUpdateContext.java",
"license": "epl-1.0",
"size": 31274
} | [
"com.google.common.base.Optional",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType",
"org.opendaylight.vtn.manager.VTNException",
"org.opendaylight.vtn.manager.internal.util.DataStoreUtils",
"org.... | import com.google.common.base.Optional; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; import org.opendaylight.vtn.manager.VTNException; import org.opendaylight.vtn.manager.internal.util.D... | import com.google.common.base.*; import java.util.*; import org.opendaylight.controller.md.sal.common.api.data.*; import org.opendaylight.vtn.manager.*; import org.opendaylight.vtn.manager.internal.util.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.impl.topology.rev150209.*; import org.opendaylight.yang.g... | [
"com.google.common",
"java.util",
"org.opendaylight.controller",
"org.opendaylight.vtn",
"org.opendaylight.yang",
"org.opendaylight.yangtools"
] | com.google.common; java.util; org.opendaylight.controller; org.opendaylight.vtn; org.opendaylight.yang; org.opendaylight.yangtools; | 2,037,538 |
public static final AggregationFunction createAggregationFunction(String name, Attribute sourceAttribute,
boolean ignoreMissings, boolean countOnlyDistinct, OperatorVersion version) throws OperatorException {
if (name == null) {
throw new UserError(null, "aggregation.illegal_function_name", name);
}
... | static final AggregationFunction function(String name, Attribute sourceAttribute, boolean ignoreMissings, boolean countOnlyDistinct, OperatorVersion version) throws OperatorException { if (name == null) { throw new UserError(null, STR, name); } Class<? extends AggregationFunction> aggregationFunctionClass = null; if (v... | /**
* This will create the {@link AggregationFunction} with the given name for the given source
* Attribute with a fallback to a legacy {@link AggregationFunction} if necessary.
*
* @param name
* please use one of the FUNCTION_NAME_* constants to prevent unnecessary errors
* @param version
... | This will create the <code>AggregationFunction</code> with the given name for the given source Attribute with a fallback to a legacy <code>AggregationFunction</code> if necessary | createAggregationFunction | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/operator/preprocessing/transformation/aggregation/AggregationFunction.java",
"license": "agpl-3.0",
"size": 24979
} | [
"com.rapidminer.example.Attribute",
"com.rapidminer.operator.OperatorException",
"com.rapidminer.operator.OperatorVersion",
"com.rapidminer.operator.UserError",
"java.lang.reflect.Constructor"
] | import com.rapidminer.example.Attribute; import com.rapidminer.operator.OperatorException; import com.rapidminer.operator.OperatorVersion; import com.rapidminer.operator.UserError; import java.lang.reflect.Constructor; | import com.rapidminer.example.*; import com.rapidminer.operator.*; import java.lang.reflect.*; | [
"com.rapidminer.example",
"com.rapidminer.operator",
"java.lang"
] | com.rapidminer.example; com.rapidminer.operator; java.lang; | 1,249,813 |
private static void incValues(IdentityHashMap<Object, Integer> svdObjs, Object obj, int hashLen) {
Integer baseline = svdObjs.get(obj);
for (IdentityHashMap.Entry<Object, Integer> entry : svdObjs.entrySet()) {
Integer pos = entry.getValue();
if (pos > baseline)
... | static void function(IdentityHashMap<Object, Integer> svdObjs, Object obj, int hashLen) { Integer baseline = svdObjs.get(obj); for (IdentityHashMap.Entry<Object, Integer> entry : svdObjs.entrySet()) { Integer pos = entry.getValue(); if (pos > baseline) entry.setValue(pos + hashLen); } } | /**
* Increment positions of already presented objects afterward given object.
*
* @param svdObjs Map with objects already presented in the buffer.
* @param obj Object.
* @param hashLen Length of the object's hash.
*/ | Increment positions of already presented objects afterward given object | incValues | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/tostring/GridToStringBuilder.java",
"license": "apache-2.0",
"size": 60663
} | [
"java.util.IdentityHashMap"
] | import java.util.IdentityHashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,217,932 |
public void register() throws CommonException{
try {
writer.register(writerModel.getData());
} catch (CMException e) {
throw new CommonException(e.getMessage());
}
} | void function() throws CommonException{ try { writer.register(writerModel.getData()); } catch (CMException e) { throw new CommonException(e.getMessage()); } } | /**
* Registers the supplied data with the Writer of the model.
*
* @param data The data to register.
* @throws CommonException Thrown when the Writer is not available.
*/ | Registers the supplied data with the Writer of the model | register | {
"repo_name": "PrismTech/opensplice",
"path": "src/tools/cm/common/code/org/opensplice/common/model/sample/ReaderWriterDetailSampleModel.java",
"license": "gpl-3.0",
"size": 10096
} | [
"org.opensplice.cm.CMException",
"org.opensplice.common.CommonException"
] | import org.opensplice.cm.CMException; import org.opensplice.common.CommonException; | import org.opensplice.cm.*; import org.opensplice.common.*; | [
"org.opensplice.cm",
"org.opensplice.common"
] | org.opensplice.cm; org.opensplice.common; | 2,091,356 |
private void enterLibraryGeometries(final Attributes attributes)
{
this.geometryLibrary = new GeometryLibrary();
this.geometryLibrary.setName(attributes.getValue("name"));
this.geometryLibrary.setId(attributes.getValue("id"));
enterElement(ParserMode.LIBRARY_GEOMETRIES);
} | void function(final Attributes attributes) { this.geometryLibrary = new GeometryLibrary(); this.geometryLibrary.setName(attributes.getValue("name")); this.geometryLibrary.setId(attributes.getValue("id")); enterElement(ParserMode.LIBRARY_GEOMETRIES); } | /**
* Enters a library_geometries element.
*
* @param attributes
* The element attributes
*/ | Enters a library_geometries element | enterLibraryGeometries | {
"repo_name": "kayahr/jollada",
"path": "src/main/java/de/ailis/jollada/reader/ColladaHandler.java",
"license": "mit",
"size": 102287
} | [
"de.ailis.jollada.model.GeometryLibrary",
"org.xml.sax.Attributes"
] | import de.ailis.jollada.model.GeometryLibrary; import org.xml.sax.Attributes; | import de.ailis.jollada.model.*; import org.xml.sax.*; | [
"de.ailis.jollada",
"org.xml.sax"
] | de.ailis.jollada; org.xml.sax; | 402,550 |
@BeanTagAttribute(name = "additionalSecurePropertyNames", type = BeanTagAttribute.AttributeType.LISTVALUE)
public List<String> getAdditionalSecurePropertyNames() {
return additionalSecurePropertyNames;
}
| @BeanTagAttribute(name = STR, type = BeanTagAttribute.AttributeType.LISTVALUE) List<String> function() { return additionalSecurePropertyNames; } | /**
* List of secure property names that are in addition to the
* {@link org.kuali.rice.krad.uif.component.ComponentSecurity} or
* {@link org.kuali.rice.krad.datadictionary.AttributeSecurity} attributes.
*
* @return list of secure property names
*/ | List of secure property names that are in addition to the <code>org.kuali.rice.krad.uif.component.ComponentSecurity</code> or <code>org.kuali.rice.krad.datadictionary.AttributeSecurity</code> attributes | getAdditionalSecurePropertyNames | {
"repo_name": "ewestfal/rice-svn2git-test",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/lookup/LookupView.java",
"license": "apache-2.0",
"size": 34327
} | [
"java.util.List",
"org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute"
] | import java.util.List; import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; | import java.util.*; import org.kuali.rice.krad.datadictionary.parse.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 1,194,201 |
public static double earthDiameter(double latitude) {
// SloppyMath impl returns a result in kilometers
return SloppyMath.earthDiameter(latitude) * 1000;
} | static double function(double latitude) { return SloppyMath.earthDiameter(latitude) * 1000; } | /**
* Return an approximate value of the diameter of the earth (in meters) at the given latitude (in radians).
*/ | Return an approximate value of the diameter of the earth (in meters) at the given latitude (in radians) | earthDiameter | {
"repo_name": "jpountz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/geo/GeoUtils.java",
"license": "apache-2.0",
"size": 20029
} | [
"org.apache.lucene.util.SloppyMath"
] | import org.apache.lucene.util.SloppyMath; | import org.apache.lucene.util.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 345,713 |
@Override
protected void onResume() {
// Rebind activity to gps service
Intent mServiceIntent = new Intent(this, GPSService.class);
bindService(mServiceIntent, this, Context.BIND_AUTO_CREATE);
super.onResume();
} | void function() { Intent mServiceIntent = new Intent(this, GPSService.class); bindService(mServiceIntent, this, Context.BIND_AUTO_CREATE); super.onResume(); } | /**
* This activity returns to the foreground. The activity becomes active.
*/ | This activity returns to the foreground. The activity becomes active | onResume | {
"repo_name": "annchovie/edgwoodtripletherat",
"path": "src/com/harris/challenge/brata/tools/RangingActivity.java",
"license": "apache-2.0",
"size": 6501
} | [
"android.content.Context",
"android.content.Intent",
"com.harris.challenge.brata.framework.GPSService"
] | import android.content.Context; import android.content.Intent; import com.harris.challenge.brata.framework.GPSService; | import android.content.*; import com.harris.challenge.brata.framework.*; | [
"android.content",
"com.harris.challenge"
] | android.content; com.harris.challenge; | 1,913,097 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel3 = new javax.swing.JPanel();
okButton = new javax.swing.JButton();
... | @SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; jPanel3 = new javax.swing.JPanel(); okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); subjectsPanel = new javax.swing.J... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "pellcorp/jailer",
"path": "src/main/net/sf/jailer/ui/AdditionalSubjectsDialog.java",
"license": "apache-2.0",
"size": 14868
} | [
"java.awt.GridBagConstraints"
] | import java.awt.GridBagConstraints; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,185,437 |
private BaseDescr lhsParen( CEDescrBuilder< ? , ? > ce,
boolean allowOr ) throws RecognitionException {
match( input,
DRL5Lexer.LEFT_PAREN,
null,
null,
DroolsEditorType.SYMBOL );
if ( state.failed ) return nu... | BaseDescr function( CEDescrBuilder< ? , ? > ce, boolean allowOr ) throws RecognitionException { match( input, DRL5Lexer.LEFT_PAREN, null, null, DroolsEditorType.SYMBOL ); if ( state.failed ) return null; if ( state.backtracking == 0 && input.LA( 1 ) != DRL5Lexer.EOF ) { helper.emit( Location.LOCATION_LHS_BEGIN_OF_CONDI... | /**
* lhsParen := LEFT_PAREN lhsOr RIGHT_PAREN
*
* @param ce
* @return
* @throws RecognitionException
*/ | lhsParen := LEFT_PAREN lhsOr RIGHT_PAREN | lhsParen | {
"repo_name": "yurloc/drools",
"path": "drools-compiler/src/main/java/org/drools/lang/DRL5Parser.java",
"license": "apache-2.0",
"size": 169427
} | [
"org.antlr.runtime.RecognitionException",
"org.drools.lang.api.CEDescrBuilder",
"org.drools.lang.descr.BaseDescr"
] | import org.antlr.runtime.RecognitionException; import org.drools.lang.api.CEDescrBuilder; import org.drools.lang.descr.BaseDescr; | import org.antlr.runtime.*; import org.drools.lang.api.*; import org.drools.lang.descr.*; | [
"org.antlr.runtime",
"org.drools.lang"
] | org.antlr.runtime; org.drools.lang; | 1,133,101 |
@Override
public DatabaseMap getDatabaseMap()
{
return this.dbMap;
} | DatabaseMap function() { return this.dbMap; } | /**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/ | Gets the databasemap this map builder built | getDatabaseMap | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/map/TRoleMapBuilder.java",
"license": "gpl-3.0",
"size": 5825
} | [
"org.apache.torque.map.DatabaseMap"
] | import org.apache.torque.map.DatabaseMap; | import org.apache.torque.map.*; | [
"org.apache.torque"
] | org.apache.torque; | 1,123,841 |
public static WallpaperManager getInstance(Context context) {
return (WallpaperManager)context.getSystemService(
Context.WALLPAPER_SERVICE);
} | static WallpaperManager function(Context context) { return (WallpaperManager)context.getSystemService( Context.WALLPAPER_SERVICE); } | /**
* Retrieve a WallpaperManager associated with the given Context.
*/ | Retrieve a WallpaperManager associated with the given Context | getInstance | {
"repo_name": "OmniEvo/android_frameworks_base",
"path": "core/java/android/app/WallpaperManager.java",
"license": "gpl-3.0",
"size": 50806
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 539,456 |
public void setRedeliveryPolicy(RedeliveryPolicy redeliveryPolicy) {
this.redeliveryPolicy = redeliveryPolicy;
} | void function(RedeliveryPolicy redeliveryPolicy) { this.redeliveryPolicy = redeliveryPolicy; } | /**
* Sets the redelivery policy
*/ | Sets the redelivery policy | setRedeliveryPolicy | {
"repo_name": "objectiser/camel",
"path": "core/camel-core-engine/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java",
"license": "apache-2.0",
"size": 25831
} | [
"org.apache.camel.processor.errorhandler.RedeliveryPolicy"
] | import org.apache.camel.processor.errorhandler.RedeliveryPolicy; | import org.apache.camel.processor.errorhandler.*; | [
"org.apache.camel"
] | org.apache.camel; | 224,344 |
public List<ProfileInner> listAllInResourceGroup(String resourceGroupName) {
return listAllInResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body();
} | List<ProfileInner> function(String resourceGroupName) { return listAllInResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().body(); } | /**
* Lists all Traffic Manager profiles within a resource group.
*
* @param resourceGroupName The name of the resource group containing the Traffic Manager profiles to be listed.
* @return the List<ProfileInner> object if successful.
*/ | Lists all Traffic Manager profiles within a resource group | listAllInResourceGroup | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-trafficmanager/src/main/java/com/microsoft/azure/management/trafficmanager/implementation/ProfilesInner.java",
"license": "mit",
"size": 36826
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 712,855 |
public void removeAttributePolling(final String attributeName) throws DevFailed {
// jive sends value with lower case, so manage it
final AttributeImpl attribute = AttributeGetterSetter.getAttribute(attributeName, attributeList);
attribute.resetPolling();
cacheManager.removeAttri... | void function(final String attributeName) throws DevFailed { final AttributeImpl attribute = AttributeGetterSetter.getAttribute(attributeName, attributeList); attribute.resetPolling(); cacheManager.removeAttributePolling(attribute); pollAttributes.remove(attributeName.toLowerCase(Locale.ENGLISH)); if (attribute.getName... | /**
* Remove attribute polling
*
* @param attributeName the attribute
* @throws DevFailed
*/ | Remove attribute polling | removeAttributePolling | {
"repo_name": "tango-controls/JTango",
"path": "server/src/main/java/org/tango/server/cache/PollingManager.java",
"license": "lgpl-3.0",
"size": 17460
} | [
"fr.esrf.Tango",
"java.util.Locale",
"org.tango.server.attribute.AttributeImpl",
"org.tango.server.command.CommandImpl",
"org.tango.server.servant.AttributeGetterSetter",
"org.tango.server.servant.CommandGetter",
"org.tango.server.servant.DeviceImpl"
] | import fr.esrf.Tango; import java.util.Locale; import org.tango.server.attribute.AttributeImpl; import org.tango.server.command.CommandImpl; import org.tango.server.servant.AttributeGetterSetter; import org.tango.server.servant.CommandGetter; import org.tango.server.servant.DeviceImpl; | import fr.esrf.*; import java.util.*; import org.tango.server.attribute.*; import org.tango.server.command.*; import org.tango.server.servant.*; | [
"fr.esrf",
"java.util",
"org.tango.server"
] | fr.esrf; java.util; org.tango.server; | 2,668,594 |
public boolean isLanguageLevelSupported(@NotNull final LanguageLevel level) {
return true;
} | boolean function(@NotNull final LanguageLevel level) { return true; } | /**
* Checks if task supports this language level
*
* @param level level to check
* @return true if supports
*/ | Checks if task supports this language level | isLanguageLevelSupported | {
"repo_name": "siosio/intellij-community",
"path": "python/testSrc/com/jetbrains/env/PyTestTask.java",
"license": "apache-2.0",
"size": 2866
} | [
"com.jetbrains.python.psi.LanguageLevel",
"org.jetbrains.annotations.NotNull"
] | import com.jetbrains.python.psi.LanguageLevel; import org.jetbrains.annotations.NotNull; | import com.jetbrains.python.psi.*; import org.jetbrains.annotations.*; | [
"com.jetbrains.python",
"org.jetbrains.annotations"
] | com.jetbrains.python; org.jetbrains.annotations; | 1,628,559 |
public void test_scheduleLjava_util_TimerTaskJ() throws Exception {
Timer t = null;
try {
// Ensure a Timer throws an IllegalStateException after cancelled
t = new Timer();
TimerTestTask testTask = new TimerTestTask();
t.cancel();
try {
... | void function() throws Exception { Timer t = null; try { t = new Timer(); TimerTestTask testTask = new TimerTestTask(); t.cancel(); try { t.schedule(testTask, 100); fail(STR); } catch (IllegalStateException expected) { } t = new Timer(); testTask = new TimerTestTask(); testTask.cancel(); try { t.schedule(testTask, 100)... | /**
* java.util.Timer#schedule(java.util.TimerTask, long)
*/ | java.util.Timer#schedule(java.util.TimerTask, long) | test_scheduleLjava_util_TimerTaskJ | {
"repo_name": "mirego/j2objc",
"path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/TimerTest.java",
"license": "apache-2.0",
"size": 47501
} | [
"java.util.Timer"
] | import java.util.Timer; | import java.util.*; | [
"java.util"
] | java.util; | 665,262 |
public void findLocal(ResultStream<Cursor> result, String sql, Object ...args)
{
_kraken.findLocal(sql, args, result);
} | void function(ResultStream<Cursor> result, String sql, Object ...args) { _kraken.findLocal(sql, args, result); } | /**
* Queries the database, returning values to a result sink.
*
* @param sql the select query for the search
* @param result callback for the result iterator
* @param args arguments to the sql
*/ | Queries the database, returning values to a result sink | findLocal | {
"repo_name": "baratine/baratine",
"path": "framework/src/main/java/com/caucho/v5/ramp/db/DatabaseServiceRamp.java",
"license": "gpl-2.0",
"size": 6600
} | [
"io.baratine.db.Cursor",
"io.baratine.stream.ResultStream"
] | import io.baratine.db.Cursor; import io.baratine.stream.ResultStream; | import io.baratine.db.*; import io.baratine.stream.*; | [
"io.baratine.db",
"io.baratine.stream"
] | io.baratine.db; io.baratine.stream; | 254,754 |
public void addPathElement(Path.Element element) {
PathBuilder builder = new PathBuilder();
if (relPath != null) {
builder.addAll(relPath.getElements());
}
builder.addLast(element);
try {
relPath = builder.getPath();
} catch (MalformedPathExcep... | void function(Path.Element element) { PathBuilder builder = new PathBuilder(); if (relPath != null) { builder.addAll(relPath.getElements()); } builder.addLast(element); try { relPath = builder.getPath(); } catch (MalformedPathException e) { } } | /**
* Adds a path element to the existing relative path. To add a path element
* which matches all node names use {@link RelationQueryNode#STAR_NAME_TEST}.
*
* @param element the path element to append.
*/ | Adds a path element to the existing relative path. To add a path element which matches all node names use <code>RelationQueryNode#STAR_NAME_TEST</code> | addPathElement | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java",
"license": "apache-2.0",
"size": 6791
} | [
"org.apache.jackrabbit.spi.Path",
"org.apache.jackrabbit.spi.commons.conversion.MalformedPathException",
"org.apache.jackrabbit.spi.commons.name.PathBuilder"
] | import org.apache.jackrabbit.spi.Path; import org.apache.jackrabbit.spi.commons.conversion.MalformedPathException; import org.apache.jackrabbit.spi.commons.name.PathBuilder; | import org.apache.jackrabbit.spi.*; import org.apache.jackrabbit.spi.commons.conversion.*; import org.apache.jackrabbit.spi.commons.name.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 2,551,527 |
@OperationMeta(returnGenerics = FileArtifact.class)
public static Set<FileArtifact> jar(Path base, Collection<FileArtifact> artifacts, Path jar, Path manifest)
throws VilException {
return Zip.add(base, artifacts, jar, createJarHandler(manifest));
} | @OperationMeta(returnGenerics = FileArtifact.class) static Set<FileArtifact> function(Path base, Collection<FileArtifact> artifacts, Path jar, Path manifest) throws VilException { return Zip.add(base, artifacts, jar, createJarHandler(manifest)); } | /**
* Packs <code>source</code> files into <code>target</code>.
*
* @param base the base path used to make the paths of the <code>artifacts</code> relative, may
* be the source or target project
* @param artifacts the artifacts to be handled
* @param jar the target jar file
* @para... | Packs <code>source</code> files into <code>target</code> | jar | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Instantiation/Instantiator.Java/src/net/ssehub/easy/instantiation/java/instantiators/Jar.java",
"license": "apache-2.0",
"size": 4959
} | [
"net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact",
"net.ssehub.easy.instantiation.core.model.artifactModel.Path",
"net.ssehub.easy.instantiation.core.model.common.VilException",
"net.ssehub.easy.instantiation.core.model.defaultInstantiators.Zip",
"net.ssehub.easy.instantiation.core.model... | import net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact; import net.ssehub.easy.instantiation.core.model.artifactModel.Path; import net.ssehub.easy.instantiation.core.model.common.VilException; import net.ssehub.easy.instantiation.core.model.defaultInstantiators.Zip; import net.ssehub.easy.instantiat... | import net.ssehub.easy.instantiation.core.model.*; import net.ssehub.easy.instantiation.core.model.common.*; | [
"net.ssehub.easy"
] | net.ssehub.easy; | 2,471,047 |
public XPathHolder transposedPath(QName parentPath) {
XPathSegment segment = new XPathSegment(parentPath);
List<XPathSegment> segments = new ArrayList<XPathSegment>();
segments.add(segment);
return transposedPath(segments);
} | XPathHolder function(QName parentPath) { XPathSegment segment = new XPathSegment(parentPath); List<XPathSegment> segments = new ArrayList<XPathSegment>(); segments.add(segment); return transposedPath(segments); } | /**
* Returns new XPath with a specified element prepended to the path. Useful
* for "transposing" relative paths to a absolute root.
*
* @param parentPath
* @return
*/ | Returns new XPath with a specified element prepended to the path. Useful for "transposing" relative paths to a absolute root | transposedPath | {
"repo_name": "gureronder/midpoint",
"path": "infra/prism/src/main/java/com/evolveum/midpoint/prism/parser/XPathHolder.java",
"license": "apache-2.0",
"size": 19840
} | [
"java.util.ArrayList",
"java.util.List",
"javax.xml.namespace.QName"
] | import java.util.ArrayList; import java.util.List; import javax.xml.namespace.QName; | import java.util.*; import javax.xml.namespace.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 864,413 |
public static String toStringBinary(ByteBuffer buf) {
if (buf == null)
return "null";
if (buf.hasArray()) {
return toStringBinary(buf.array(), buf.arrayOffset(), buf.limit());
}
return toStringBinary(toBytes(buf));
}
private static final char[] HEX_CH... | static String function(ByteBuffer buf) { if (buf == null) return "null"; if (buf.hasArray()) { return toStringBinary(buf.array(), buf.arrayOffset(), buf.limit()); } return toStringBinary(toBytes(buf)); } private static final char[] HEX_CHARS_UPPER = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D'... | /**
* Converts the given byte buffer to a printable representation,
* from the index 0 (inclusive) to the limit (exclusive),
* regardless of the current position.
* The position and the other index parameters are not changed.
*
* @param buf a byte buffer
* @return a string representat... | Converts the given byte buffer to a printable representation, from the index 0 (inclusive) to the limit (exclusive), regardless of the current position. The position and the other index parameters are not changed | toStringBinary | {
"repo_name": "jiangchanghong/Mycat2",
"path": "src/main/java/io/mycat/memory/unsafe/utils/BytesTools.java",
"license": "gpl-2.0",
"size": 29659
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,451,588 |
public Adapter createAlternativeMessageAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link behavior.AlternativeMessage <em>Alternative Message</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-... | Creates a new adapter for an object of class '<code>behavior.AlternativeMessage Alternative Message</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createAlternativeMessageAdapter | {
"repo_name": "posl/iArch",
"path": "jp.ac.kyushu_u.iarch.model/src/behavior/util/BehaviorAdapterFactory.java",
"license": "epl-1.0",
"size": 22690
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,901,202 |
public static Expression regexReplaceAll(final Expression expression,
final String regex, final Expression replacementExpression) { | static Expression function(final Expression expression, final String regex, final Expression replacementExpression) { | /**
* Transforms the expression into a String then performs the regex
* replaceAll to transform the String and return the result
*/ | Transforms the expression into a String then performs the regex replaceAll to transform the String and return the result | regexReplaceAll | {
"repo_name": "zregvart/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 59850
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,274,080 |
public static DERUTCTime getInstance(
ASN1TaggedObject obj,
boolean explicit)
{
return getInstance(obj.getObject());
}
public DERUTCTime(
String time)
{
this.time = time;
try
{
this.getDate();
}
c... | static DERUTCTime function( ASN1TaggedObject obj, boolean explicit) { return getInstance(obj.getObject()); } public DERUTCTime( String time) { this.time = time; try { this.getDate(); } catch (ParseException e) { throw new IllegalArgumentException(STR + e.getMessage()); } } public DERUTCTime( Date time) { SimpleDateForm... | /**
* return an UTC Time from a tagged object.
*
* @param obj the tagged object holding the object we want
* @param explicit true if the object is meant to be explicitly
* tagged false otherwise.
* @exception IllegalArgumentException if the tagged object cannot
* ... | return an UTC Time from a tagged object | getInstance | {
"repo_name": "dirtyfilthy/dirtyfilthy-bouncycastle",
"path": "net/dirtyfilthy/bouncycastle/asn1/DERUTCTime.java",
"license": "mit",
"size": 6419
} | [
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.SimpleTimeZone"
] | import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.SimpleTimeZone; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,175,435 |
@Test
public void testConstrainedValues() throws Exception {
CacheCreation cache = new CacheCreation();
RegionAttributesCreation attrs = new RegionAttributesCreation(cache);
attrs.setValueConstraint(String.class);
cache.createRegion("root", attrs);
testXml(cache);
} | void function() throws Exception { CacheCreation cache = new CacheCreation(); RegionAttributesCreation attrs = new RegionAttributesCreation(cache); attrs.setValueConstraint(String.class); cache.createRegion("root", attrs); testXml(cache); } | /**
* Tests the value constraints region attribute that was added in GemFire 4.0.
*
* @since GemFire 4.1
*/ | Tests the value constraints region attribute that was added in GemFire 4.0 | testConstrainedValues | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache30/CacheXml66DUnitTest.java",
"license": "apache-2.0",
"size": 167383
} | [
"org.apache.geode.internal.cache.xmlcache.CacheCreation",
"org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation"
] | import org.apache.geode.internal.cache.xmlcache.CacheCreation; import org.apache.geode.internal.cache.xmlcache.RegionAttributesCreation; | import org.apache.geode.internal.cache.xmlcache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,443,318 |
public ReadonlyIndexedI<K, V> WithDefault(Function<K, V> defaultValue); | ReadonlyIndexedI<K, V> function(Function<K, V> defaultValue); | /**
* Sets the function for creating a default value as an alternative to an otherwise unsuccessful {@link #get(Object)} invocation.
*
* @param defaultValue the new default value
* @return <code>this (modified)</code>
*/ | Sets the function for creating a default value as an alternative to an otherwise unsuccessful <code>#get(Object)</code> invocation | WithDefault | {
"repo_name": "codebulb/LambdaOmega",
"path": "src/main/java/ch/codebulb/lambdaomega/abstractions/I.java",
"license": "bsd-3-clause",
"size": 2412
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 6,552 |
public static Optional<File> resolvePluginDependency(Dependency d, List<RemoteRepository> pluginRepos,
ArtifactResolver resolver, RepositorySystemSession repoSystemSession) {
Artifact a = new DefaultArtifact(d.getGroupId(), d.getArtifactId(), d.getClassifier(), d.getType(), d.getVersion());
ArtifactRequ... | static Optional<File> function(Dependency d, List<RemoteRepository> pluginRepos, ArtifactResolver resolver, RepositorySystemSession repoSystemSession) { Artifact a = new DefaultArtifact(d.getGroupId(), d.getArtifactId(), d.getClassifier(), d.getType(), d.getVersion()); ArtifactRequest artifactRequest = new ArtifactRequ... | /**
* Uses the aether to resolve a plugin dependency and returns the file for further processing.
*
* @param d the dependency to resolve.
* @param pluginRepos the plugin repositories to use for dependency resolution.
* @param resolver the resolver for aether access.
* @param repoSystemSession the sess... | Uses the aether to resolve a plugin dependency and returns the file for further processing | resolvePluginDependency | {
"repo_name": "shillner/maven-cdi-plugin-utils",
"path": "src/main/java/com/itemis/maven/plugins/cdi/internal/util/MavenUtil.java",
"license": "epl-1.0",
"size": 2049
} | [
"com.google.common.base.Optional",
"java.io.File",
"java.util.List",
"org.apache.maven.model.Dependency",
"org.eclipse.aether.RepositorySystemSession",
"org.eclipse.aether.artifact.Artifact",
"org.eclipse.aether.artifact.DefaultArtifact",
"org.eclipse.aether.impl.ArtifactResolver",
"org.eclipse.aeth... | import com.google.common.base.Optional; import java.io.File; import java.util.List; import org.apache.maven.model.Dependency; import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.impl.ArtifactResolve... | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.maven.model.*; import org.eclipse.aether.*; import org.eclipse.aether.artifact.*; import org.eclipse.aether.impl.*; import org.eclipse.aether.repository.*; import org.eclipse.aether.resolution.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.maven",
"org.eclipse.aether"
] | com.google.common; java.io; java.util; org.apache.maven; org.eclipse.aether; | 1,476,919 |
public IITArtwork addArtworkFromFile(String lastParam) {
return new IITArtwork(Dispatch.call(this, "AddArtworkFromFile", lastParam).toDispatch());
} | IITArtwork function(String lastParam) { return new IITArtwork(Dispatch.call(this, STR, lastParam).toDispatch()); } | /**
* Wrapper for calling the ActiveX-Method with input-parameter(s).
*
* @param lastParam an input-parameter of type String
* @return the result is of type IITArtwork
*/ | Wrapper for calling the ActiveX-Method with input-parameter(s) | addArtworkFromFile | {
"repo_name": "cpesch/MetaMusic",
"path": "itunes-com-library/src/main/java/slash/metamusic/itunes/com/binding/IITFileOrCDTrack.java",
"license": "gpl-2.0",
"size": 32709
} | [
"com.jacob.com.Dispatch"
] | import com.jacob.com.Dispatch; | import com.jacob.com.*; | [
"com.jacob.com"
] | com.jacob.com; | 1,587,909 |
public List<ModuleAssetParameter> parameters() {
return this.parameters;
} | List<ModuleAssetParameter> function() { return this.parameters; } | /**
* Get the parameters value.
*
* @return the parameters value
*/ | Get the parameters value | parameters | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/ModeValueInfo.java",
"license": "mit",
"size": 1734
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,075,527 |
public String getLocalizedMessage(Locale locale) {
return resolve(getMessage(), key, parameters, locale);
} | String function(Locale locale) { return resolve(getMessage(), key, parameters, locale); } | /**
* Creates a localized description of this throwable.
*
* @see #resolve(String,String,Object[])
* @return The localized description of this throwable.
*/ | Creates a localized description of this throwable | getLocalizedMessage | {
"repo_name": "Jacksson/mywms",
"path": "server.app/los.common-ejb/src/de/linogistix/los/common/exception/CustomException.java",
"license": "gpl-2.0",
"size": 6041
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,854,171 |
public void copyQualifiersFrom(AbstractBeanDefinition source) {
Assert.notNull(source, "Source must not be null");
this.qualifiers.putAll(source.qualifiers);
} | void function(AbstractBeanDefinition source) { Assert.notNull(source, STR); this.qualifiers.putAll(source.qualifiers); } | /**
* Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition.
* @param source the AbstractBeanDefinition to copy from
*/ | Copy the qualifiers from the supplied AbstractBeanDefinition to this bean definition | copyQualifiersFrom | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinition.java",
"license": "gpl-2.0",
"size": 35603
} | [
"org.springframework.util.Assert"
] | import org.springframework.util.Assert; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 722,160 |
private ChromosomePair crossover(AbstractListChromosome<T> first, AbstractListChromosome<T> second) {
int length = first.getLength();
if (length != second.getLength()) {
throw new IllegalArgumentException("Both chromosomes must have same lengths.");
}
// array representa... | ChromosomePair function(AbstractListChromosome<T> first, AbstractListChromosome<T> second) { int length = first.getLength(); if (length != second.getLength()) { throw new IllegalArgumentException(STR); } List<T> parent1Rep = first.getRepresentation(); List<T> parent2Rep = second.getRepresentation(); ArrayList<T> child1... | /**
* Helper for {@link #crossover(Chromosome, Chromosome)}. Performs the actual crossover.
*
* @param first the first chromosome.
* @param second the second chromosome.
* @return the pair of new chromosomes that resulted from the crossover.
*/ | Helper for <code>#crossover(Chromosome, Chromosome)</code>. Performs the actual crossover | crossover | {
"repo_name": "martingwhite/astor",
"path": "examples/math_50v2/src/main/java/org/apache/commons/math/genetics/OnePointCrossover.java",
"license": "gpl-2.0",
"size": 4981
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,789,587 |
@Test
@Transactional
public void testSize() throws Exception {
JPAQuery<TestPerson> query = new JPAQuery<TestPerson>(entityManager);
QTestPerson testPerson = QTestPerson.testPerson;
QTestAdresse testAdresse = QTestAdresse.testAdresse;
JPAQuery<Set<TestPerson>> subQuery = ne... | void function() throws Exception { JPAQuery<TestPerson> query = new JPAQuery<TestPerson>(entityManager); QTestPerson testPerson = QTestPerson.testPerson; QTestAdresse testAdresse = QTestAdresse.testAdresse; JPAQuery<Set<TestPerson>> subQuery = new JPAQuery<Set<TestPerson>>(entityManager).select( testAdresse.testPersons... | /**
* <pre>
* select testAdresse.testPersons
* from TestAdresse testAdresse where size(testAdresse.testPersons) > ?1
* </pre>
*
* @throws Exception
*/ | <code> select testAdresse.testPersons from TestAdresse testAdresse where size(testAdresse.testPersons) > ?1 </code> | testSize | {
"repo_name": "csc19601128/misc-examples",
"path": "querydsl/src/test/java/org/csc/phynixx/sqlquery/querydsl/H2DatabaseJPQLTest.java",
"license": "apache-2.0",
"size": 28538
} | [
"com.querydsl.jpa.impl.JPAQuery",
"java.util.Set",
"org.csc.phynixx.sqlquery.jpa.QTestAdresse",
"org.csc.phynixx.sqlquery.jpa.QTestPerson",
"org.csc.phynixx.sqlquery.jpa.TestPerson"
] | import com.querydsl.jpa.impl.JPAQuery; import java.util.Set; import org.csc.phynixx.sqlquery.jpa.QTestAdresse; import org.csc.phynixx.sqlquery.jpa.QTestPerson; import org.csc.phynixx.sqlquery.jpa.TestPerson; | import com.querydsl.jpa.impl.*; import java.util.*; import org.csc.phynixx.sqlquery.jpa.*; | [
"com.querydsl.jpa",
"java.util",
"org.csc.phynixx"
] | com.querydsl.jpa; java.util; org.csc.phynixx; | 349,502 |
private void _serializeQuery(PageContext pc,Set test,Query query, StringBuilder sb, boolean serializeQueryByColumns, Set<Object> done) throws ConverterException {
Collection.Key[] _keys = CollectionUtil.keys(query);
sb.append(goIn());
sb.append("{");
// Rowcount
if(serializeQueryByColumns){
sb.... | void function(PageContext pc,Set test,Query query, StringBuilder sb, boolean serializeQueryByColumns, Set<Object> done) throws ConverterException { Collection.Key[] _keys = CollectionUtil.keys(query); sb.append(goIn()); sb.append("{"); if(serializeQueryByColumns){ sb.append("\"ROWCOUNT\":"); sb.append(Caster.toString(q... | /**
* serialize a Query
* @param query Query to serialize
* @param sb
* @param serializeQueryByColumns
* @param done
* @throws ConverterException
*/ | serialize a Query | _serializeQuery | {
"repo_name": "paulklinkenberg/Lucee4",
"path": "lucee-java/lucee-core/src/lucee/runtime/converter/JSONConverter.java",
"license": "lgpl-2.1",
"size": 20288
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,213,189 |
// TODO: There's a lot of boiler plate code identical to increment.
// We should refactor append and increment as local get-mutate-put
// transactions, so all stores only go through one code path for puts.
public Result append(Append append, long nonceGroup, long nonce)
throws IOException {
byte[] ro... | Result function(Append append, long nonceGroup, long nonce) throws IOException { byte[] row = append.getRow(); checkRow(row, STR); boolean flush = false; Durability durability = getEffectiveDurability(append.getDurability()); boolean writeToWAL = durability != Durability.SKIP_WAL; WALEdit walEdits = null; List<Cell> al... | /**
* Perform one or more append operations on a row.
*
* @return new keyvalues after increment
* @throws IOException
*/ | Perform one or more append operations on a row | append | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 259731
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashMap",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.Tag",
"org.apach... | import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.KeyValue; import org.apache... | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.regionserver.wal.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop... | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 469,471 |
@Override
CostEstimate getCostEstimate()
{
if (super.getCostEstimate() == null)
{
return childResult.getCostEstimate();
}
else
{
return super.getCostEstimate();
}
} | CostEstimate getCostEstimate() { if (super.getCostEstimate() == null) { return childResult.getCostEstimate(); } else { return super.getCostEstimate(); } } | /**
* Get the CostEstimate for this ProjectRestrictNode.
*
* @return The CostEstimate for this ProjectRestrictNode, which is
* the cost estimate for the child node.
*/ | Get the CostEstimate for this ProjectRestrictNode | getCostEstimate | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java",
"license": "apache-2.0",
"size": 63780
} | [
"org.apache.derby.iapi.sql.compile.CostEstimate"
] | import org.apache.derby.iapi.sql.compile.CostEstimate; | import org.apache.derby.iapi.sql.compile.*; | [
"org.apache.derby"
] | org.apache.derby; | 170,713 |
private IgniteBiTuple<Integer, Double> findClosestCentroid(Vector[] centers, LabeledVector pnt) {
double bestDistance = Double.POSITIVE_INFINITY;
int bestInd = 0;
for (int i = 0; i < centers.length; i++) {
double dist = distance.compute(centers[i], pnt.features());
i... | IgniteBiTuple<Integer, Double> function(Vector[] centers, LabeledVector pnt) { double bestDistance = Double.POSITIVE_INFINITY; int bestInd = 0; for (int i = 0; i < centers.length; i++) { double dist = distance.compute(centers[i], pnt.features()); if (dist < bestDistance) { bestDistance = dist; bestInd = i; } } return n... | /**
* Find the closest cluster center index and distance to it from a given point.
*
* @param centers Centers to look in.
* @param pnt Point.
*/ | Find the closest cluster center index and distance to it from a given point | findClosestCentroid | {
"repo_name": "daradurvs/ignite",
"path": "modules/ml/src/main/java/org/apache/ignite/ml/clustering/kmeans/KMeansTrainer.java",
"license": "apache-2.0",
"size": 13921
} | [
"org.apache.ignite.lang.IgniteBiTuple",
"org.apache.ignite.ml.math.primitives.vector.Vector",
"org.apache.ignite.ml.structures.LabeledVector"
] | import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.ml.math.primitives.vector.Vector; import org.apache.ignite.ml.structures.LabeledVector; | import org.apache.ignite.lang.*; import org.apache.ignite.ml.math.primitives.vector.*; import org.apache.ignite.ml.structures.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 284,584 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.