method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected final String[] filterEmpty(String[] stringArray) { if (stringArray == null) { return null; } List<String> list = new ArrayList<>(stringArray.length); for (String string : stringArray) { if (!Strings.isEmpty(string)) { list.add(string); } } return list.toArray(new String[li...
final String[] function(String[] stringArray) { if (stringArray == null) { return null; } List<String> list = new ArrayList<>(stringArray.length); for (String string : stringArray) { if (!Strings.isEmpty(string)) { list.add(string); } } return list.toArray(new String[list.size()]); }
/** * Filter all empty elements (workaround for {@link DateFormatSymbols} returning arrays with * empty elements). * * @param stringArray * array to filter * @return filtered array (without null or empty string elements) */
Filter all empty elements (workaround for <code>DateFormatSymbols</code> returning arrays with empty elements)
filterEmpty
{ "repo_name": "astrapi69/wicket", "path": "wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java", "license": "apache-2.0", "size": 26892 }
[ "java.util.ArrayList", "java.util.List", "org.apache.wicket.util.string.Strings" ]
import java.util.ArrayList; import java.util.List; import org.apache.wicket.util.string.Strings;
import java.util.*; import org.apache.wicket.util.string.*;
[ "java.util", "org.apache.wicket" ]
java.util; org.apache.wicket;
1,300,034
public void setMediaList(SACMediaList ml) { mediaList = ml; }
void function(SACMediaList ml) { mediaList = ml; }
/** * Sets the media list. */
Sets the media list
setMediaList
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/css/engine/MediaRule.java", "license": "apache-2.0", "size": 2021 }
[ "org.w3c.css.sac.SACMediaList" ]
import org.w3c.css.sac.SACMediaList;
import org.w3c.css.sac.*;
[ "org.w3c.css" ]
org.w3c.css;
2,386,258
public Collection<Property> listProperties() throws OlogException;
Collection<Property> function() throws OlogException;
/** * Get a list of all the Properties currently existing * * @return * @throws OlogException */
Get a list of all the Properties currently existing
listProperties
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "thirdparty/plugins/edu.msu.nscl.olog.api/src/edu/msu/nscl/olog/api/OlogClient.java", "license": "epl-1.0", "size": 12130 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,872,870
ImmutableList<String> getRustBinaryFlags() { ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.addAll(getRustCompilerFlags()); builder.addAll(delegate.getListWithoutComments(SECTION, RUSTC_BINARY_FLAGS, ' ')); return builder.build(); }
ImmutableList<String> getRustBinaryFlags() { ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.addAll(getRustCompilerFlags()); builder.addAll(delegate.getListWithoutComments(SECTION, RUSTC_BINARY_FLAGS, ' ')); return builder.build(); }
/** * Get rustc flags for rust_binary() rules. * * @return List of rustc_binary_flags, as well as common rustc_flags. */
Get rustc flags for rust_binary() rules
getRustBinaryFlags
{ "repo_name": "daedric/buck", "path": "src/com/facebook/buck/rust/RustBuckConfig.java", "license": "apache-2.0", "size": 4651 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
9,015
void delete(DeleteSAMLProviderRequest request, ResultCapture<Void> extractor );
void delete(DeleteSAMLProviderRequest request, ResultCapture<Void> extractor );
/** * Performs the <code>Delete</code> action and use a ResultCapture to * retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>SamlProvider</code> resource, and any conflicting parameter value * set in the ...
Performs the <code>Delete</code> action and use a ResultCapture to retrieve the low-level client response. The following request parameters will be populated from the data of this <code>SamlProvider</code> resource, and any conflicting parameter value set in the request will be overridden: <code>SAMLProviderArn</code> ...
delete
{ "repo_name": "smartpcr/aws-sdk-java-resources", "path": "aws-resources-iam/src/main/java/com/amazonaws/resources/identitymanagement/SamlProvider.java", "license": "apache-2.0", "size": 7389 }
[ "com.amazonaws.resources.ResultCapture" ]
import com.amazonaws.resources.ResultCapture;
import com.amazonaws.resources.*;
[ "com.amazonaws.resources" ]
com.amazonaws.resources;
2,578,815
@Test public void testSetName() { products.setName("Hello"); assertEquals("Hello", products.getName()); }
void function() { products.setName("Hello"); assertEquals("Hello", products.getName()); }
/** * Test setter of product's name. */
Test setter of product's name
testSetName
{ "repo_name": "firstvan/OrderTaker", "path": "model/src/test/java/hu/firstvan/model/ProductsTest.java", "license": "gpl-3.0", "size": 5768 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,071,470
interface WithCreate extends WithDiagnosticLogRecipient, Creatable<DiagnosticSetting> { WithCreate withMetric(String category, Duration timeGrain, int retentionDays);
interface WithCreate extends WithDiagnosticLogRecipient, Creatable<DiagnosticSetting> { WithCreate withMetric(String category, Duration timeGrain, int retentionDays);
/** * Adds a Metric Setting to the list of Metric Settings for the current Diagnostic Settings. * * @param category name of a Metric category for a resource type this setting is applied to. * @param timeGrain the timegrain of the metric in ISO8601 format. ...
Adds a Metric Setting to the list of Metric Settings for the current Diagnostic Settings
withMetric
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/models/DiagnosticSetting.java", "license": "mit", "size": 13500 }
[ "com.azure.resourcemanager.resources.fluentcore.model.Creatable", "java.time.Duration" ]
import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import java.time.Duration;
import com.azure.resourcemanager.resources.fluentcore.model.*; import java.time.*;
[ "com.azure.resourcemanager", "java.time" ]
com.azure.resourcemanager; java.time;
2,815,253
@Override public Schema getLatestSchemaByTopic(String topic) throws SchemaRegistryException { String schemaUrl = KafkaAvroSchemaRegistry.this.url + GET_RESOURCE_BY_TYPE + topic; LOG.debug("Fetching from URL : " + schemaUrl); GetMethod get = new GetMethod(schemaUrl); int statusCode; String sch...
Schema function(String topic) throws SchemaRegistryException { String schemaUrl = KafkaAvroSchemaRegistry.this.url + GET_RESOURCE_BY_TYPE + topic; LOG.debug(STR + schemaUrl); GetMethod get = new GetMethod(schemaUrl); int statusCode; String schemaString; HttpClient httpClient = this.borrowClient(); try { statusCode = ht...
/** * Get the latest schema of a topic. * * @param topic topic name * @return the latest schema * @throws SchemaRegistryException if failed to retrieve schema. */
Get the latest schema of a topic
getLatestSchemaByTopic
{ "repo_name": "zliu41/gobblin", "path": "gobblin-metrics/src/main/java/gobblin/metrics/kafka/KafkaAvroSchemaRegistry.java", "license": "apache-2.0", "size": 9246 }
[ "java.io.IOException", "org.apache.avro.Schema", "org.apache.commons.httpclient.HttpClient", "org.apache.commons.httpclient.HttpException", "org.apache.commons.httpclient.HttpStatus", "org.apache.commons.httpclient.methods.GetMethod" ]
import java.io.IOException; import org.apache.avro.Schema; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod;
import java.io.*; import org.apache.avro.*; import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*;
[ "java.io", "org.apache.avro", "org.apache.commons" ]
java.io; org.apache.avro; org.apache.commons;
1,033,920
private static void visitAllFiles(File folder, int option, PrintWriter writer) { if(folder != null){ for (File file : folder.listFiles()) { if (file.isDirectory()) { visitAllFiles(file, option, writer); } else { readFile(fil...
static void function(File folder, int option, PrintWriter writer) { if(folder != null){ for (File file : folder.listFiles()) { if (file.isDirectory()) { visitAllFiles(file, option, writer); } else { readFile(file, option, writer); } } } }
/** * Travsit all the files with the given folder, including the files within the sub-folders. * * @param folder input folder * @param option reading option * @param writer PrintWriter */
Travsit all the files with the given folder, including the files within the sub-folders
visitAllFiles
{ "repo_name": "PRIDE-Utilities/ms-data-core-api", "path": "src/test/java/uk/ac/ebi/pride/utilities/data/utils/FileControllerBatchTest.java", "license": "apache-2.0", "size": 5843 }
[ "java.io.File", "java.io.PrintWriter" ]
import java.io.File; import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,221,442
public LocalDate getEndDate() { return endDate; }
LocalDate function() { return endDate; }
/** * The date until which the loan will be in its current status. Dates are returned in an [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD). * @return endDate **/
The date until which the loan will be in its current status. Dates are returned in an [ISO 8601](HREF) format (YYYY-MM-DD)
getEndDate
{ "repo_name": "plaid/plaid-java", "path": "src/main/java/com/plaid/client/model/StudentLoanStatus.java", "license": "mit", "size": 5120 }
[ "java.time.LocalDate" ]
import java.time.LocalDate;
import java.time.*;
[ "java.time" ]
java.time;
2,322,722
public double valueToJava2D(double value, Rectangle2D area, RectangleEdge edge) { double result = Double.NaN; double axisMin = this.first.getFirstMillisecond(this.calendar); double axisMax = this.last.getLastMillisecond...
double function(double value, Rectangle2D area, RectangleEdge edge) { double result = Double.NaN; double axisMin = this.first.getFirstMillisecond(this.calendar); double axisMax = this.last.getLastMillisecond(this.calendar); if (RectangleEdge.isTopOrBottom(edge)) { double minX = area.getX(); double maxX = area.getMaxX()...
/** * Converts a data value to a coordinate in Java2D space, assuming that the * axis runs along one edge of the specified dataArea. * <p> * Note that it is possible for the coordinate to fall outside the area. * * @param value the data value. * @param area the area for plotting the...
Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified dataArea. Note that it is possible for the coordinate to fall outside the area
valueToJava2D
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/axis/PeriodAxis.java", "license": "mit", "size": 43095 }
[ "java.awt.geom.Rectangle2D", "org.jfree.ui.RectangleEdge" ]
import java.awt.geom.Rectangle2D; import org.jfree.ui.RectangleEdge;
import java.awt.geom.*; import org.jfree.ui.*;
[ "java.awt", "org.jfree.ui" ]
java.awt; org.jfree.ui;
1,274,480
default void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle) { throw new PrestoException(NOT_SUPPORTED, "This connector does not support dropping tables"); }
default void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle) { throw new PrestoException(NOT_SUPPORTED, STR); }
/** * Drops the specified table * * @throws RuntimeException if the table cannot be dropped or table handle is no longer valid */
Drops the specified table
dropTable
{ "repo_name": "hgschmie/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 38741 }
[ "io.prestosql.spi.PrestoException" ]
import io.prestosql.spi.PrestoException;
import io.prestosql.spi.*;
[ "io.prestosql.spi" ]
io.prestosql.spi;
2,254,892
@Test public void debugFormattedStringWithIntAndObject() { logger.debugf("%d = %s", 42, "magic"); if (debugEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq("%d = %s"), eq(42), eq("magic")); } else { verify(provider, never()).log(anyI...
void function() { logger.debugf(STR, 42, "magic"); if (debugEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq(STR), eq(42), eq("magic")); } else { verify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any()); } }
/** * Verifies that a formatted string with an integer and an object argument will be logged correctly at * {@link Level#DEBUG DEBUG} level. */
Verifies that a formatted string with an integer and an object argument will be logged correctly at <code>Level#DEBUG DEBUG</code> level
debugFormattedStringWithIntAndObject
{ "repo_name": "pmwmedia/tinylog", "path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java", "license": "apache-2.0", "size": 189291 }
[ "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org.tinylog.Level", "org.tinylog.format.PrintfStyleFormatter" ]
import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; import org.tinylog.format.PrintfStyleFormatter;
import org.mockito.*; import org.tinylog.*; import org.tinylog.format.*;
[ "org.mockito", "org.tinylog", "org.tinylog.format" ]
org.mockito; org.tinylog; org.tinylog.format;
1,061,127
public static java.util.Set extractDischargeReportDetailSet(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.DischargeReportDetailVoCollection voCollection) { return extractDischargeReportDetailSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.DischargeReportDetailVoCollection voCollection) { return extractDischargeReportDetailSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.edischarge.domain.objects.DischargeReportDetail set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.edischarge.domain.objects.DischargeReportDetail set from the value object collection
extractDischargeReportDetailSet
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/DischargeReportDetailVoAssembler.java", "license": "agpl-3.0", "size": 22732 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
650,968
Throwable throwable = Assertions.assertThrows(FrameworkException.class, () -> { message.print4(); }); assertThat(throwable).hasMessage(FrameworkErrorCode.UnknownAppError.getErrMessage()); assertThat(((FrameworkException)throwable).getErrcode()).isEqualTo(FrameworkErrorCode.UnknownApp...
Throwable throwable = Assertions.assertThrows(FrameworkException.class, () -> { message.print4(); }); assertThat(throwable).hasMessage(FrameworkErrorCode.UnknownAppError.getErrMessage()); assertThat(((FrameworkException)throwable).getErrcode()).isEqualTo(FrameworkErrorCode.UnknownAppError); }
/** * Test get errcode. */
Test get errcode
testGetErrcode
{ "repo_name": "seata/seata", "path": "common/src/test/java/io/seata/common/exception/FrameworkExceptionTest.java", "license": "apache-2.0", "size": 4497 }
[ "org.assertj.core.api.Assertions", "org.junit.jupiter.api.Assertions" ]
import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.assertj.core.api.*; import org.junit.jupiter.api.*;
[ "org.assertj.core", "org.junit.jupiter" ]
org.assertj.core; org.junit.jupiter;
2,486,329
public long getPresentationTimeOffsetUs() { return Util.scaleLargeTimestamp(presentationTimeOffset, C.MICROS_PER_SECOND, timescale); } public static class SingleSegmentBase extends SegmentBase { public final String uri; final long indexStart; final long indexLength; public S...
long function() { return Util.scaleLargeTimestamp(presentationTimeOffset, C.MICROS_PER_SECOND, timescale); } public static class SingleSegmentBase extends SegmentBase { public final String uri; final long indexStart; final long indexLength; public SingleSegmentBase(RangedUri initialization, long timescale, long present...
/** * Gets the presentation time offset, in microseconds. * * @return The presentation time offset, in microseconds. */
Gets the presentation time offset, in microseconds
getPresentationTimeOffsetUs
{ "repo_name": "moicorp/ExoPlayer", "path": "library/src/main/java/com/google/android/exoplayer/dash/mpd/SegmentBase.java", "license": "apache-2.0", "size": 15070 }
[ "com.google.android.exoplayer.util.Util" ]
import com.google.android.exoplayer.util.Util;
import com.google.android.exoplayer.util.*;
[ "com.google.android" ]
com.google.android;
242,888
public final Map<Integer, Reward> getTreasureBox() { return this.treasureBox; }
final Map<Integer, Reward> function() { return this.treasureBox; }
/** * Get all the treasure box generated in combat. * @return */
Get all the treasure box generated in combat
getTreasureBox
{ "repo_name": "wangqi/gameserver", "path": "server/src/main/java/com/xinqihd/sns/gameserver/battle/Battle.java", "license": "apache-2.0", "size": 88331 }
[ "com.xinqihd.sns.gameserver.reward.Reward", "java.util.Map" ]
import com.xinqihd.sns.gameserver.reward.Reward; import java.util.Map;
import com.xinqihd.sns.gameserver.reward.*; import java.util.*;
[ "com.xinqihd.sns", "java.util" ]
com.xinqihd.sns; java.util;
542,121
private void postBoils() { // Only generate these if there are already steps in the list. if (list.size() > 0) { // Check for USE_AROMA / whirlpool / flame out hops. ArrayList<Ingredient> aromaHops = r.getHops(Ingredient.USE_AROMA); ArrayList<Instruction> aromaInstructions = new ArrayList<>(...
void function() { if (list.size() > 0) { ArrayList<Ingredient> aromaHops = r.getHops(Ingredient.USE_AROMA); ArrayList<Instruction> aromaInstructions = new ArrayList<>(); if (aromaHops.size() != 0) { HashMap<Integer, ArrayList<Ingredient>> hopMap = new HashMap<Integer, ArrayList<Ingredient>>(); for (Ingredient i : aroma...
/** * Generates misc instructions from the recipe */
Generates misc instructions from the recipe
postBoils
{ "repo_name": "caseydavenport/biermacht", "path": "src/com/biermacht/brews/utils/InstructionGenerator.java", "license": "apache-2.0", "size": 19146 }
[ "com.biermacht.brews.ingredient.Hop", "com.biermacht.brews.ingredient.Ingredient", "com.biermacht.brews.recipe.Instruction", "com.biermacht.brews.recipe.Recipe", "com.biermacht.brews.utils.comparators.InstructionComparator", "java.util.ArrayList", "java.util.Collections", "java.util.HashMap" ]
import com.biermacht.brews.ingredient.Hop; import com.biermacht.brews.ingredient.Ingredient; import com.biermacht.brews.recipe.Instruction; import com.biermacht.brews.recipe.Recipe; import com.biermacht.brews.utils.comparators.InstructionComparator; import java.util.ArrayList; import java.util.Collections; import java....
import com.biermacht.brews.ingredient.*; import com.biermacht.brews.recipe.*; import com.biermacht.brews.utils.comparators.*; import java.util.*;
[ "com.biermacht.brews", "java.util" ]
com.biermacht.brews; java.util;
2,167,953
public Date getXDate(int series, int item) { return this.data[item].getDate(); }
Date function(int series, int item) { return this.data[item].getDate(); }
/** * Returns the x-value for a data item as a date. * * @param series the series index (ignored). * @param item the item index (zero-based). * * @return The x-value as a date. */
Returns the x-value for a data item as a date
getXDate
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/source/org/jfree/data/xy/DefaultOHLCDataset.java", "license": "gpl-2.0", "size": 9096 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,609,854
protected static void cancelAnimationsRecursive(View view) { if (view != null && view.hasTransientState()) { view.animate().cancel(); if (view instanceof ViewGroup) { final int count = ((ViewGroup) view).getChildCount(); for (int i = 0; view.hasTransie...
static void function(View view) { if (view != null && view.hasTransientState()) { view.animate().cancel(); if (view instanceof ViewGroup) { final int count = ((ViewGroup) view).getChildCount(); for (int i = 0; view.hasTransientState() && i < count; i++) { cancelAnimationsRecursive(((ViewGroup) view).getChildAt(i)); } }...
/** * Utility method for removing all running animations on a view. */
Utility method for removing all running animations on a view
cancelAnimationsRecursive
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/support/v17/leanback/widget/Presenter.java", "license": "gpl-3.0", "size": 7562 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
2,513,857
@Test(timeout = 3000) public void testSingleEntryAfterEnsembleChange() throws Exception { LedgerHandle lh = bkc.createLedger(3, 3, BookKeeper.DigestType.CRC32, TEST_LEDGER_PASSWORD); for (int i = 0; i < 10; i++) { lh.addEntry(TEST_LEDGER_ENTRY_DATA); } ...
@Test(timeout = 3000) void function() throws Exception { LedgerHandle lh = bkc.createLedger(3, 3, BookKeeper.DigestType.CRC32, TEST_LEDGER_PASSWORD); for (int i = 0; i < 10; i++) { lh.addEntry(TEST_LEDGER_ENTRY_DATA); } ArrayList<InetSocketAddress> firstEnsemble = lh.getLedgerMetadata() .getEnsembles().get(0L); InetSoc...
/** * Tests that LedgerChecker correctly identifies missing fragments * when a single entry is written after an ensemble change. * This is important, as the last add confirmed may be less than the * first entry id of the final segment. */
Tests that LedgerChecker correctly identifies missing fragments when a single entry is written after an ensemble change. This is important, as the last add confirmed may be less than the first entry id of the final segment
testSingleEntryAfterEnsembleChange
{ "repo_name": "mocc/bookkeeper-lab", "path": "bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestLedgerChecker.java", "license": "apache-2.0", "size": 18352 }
[ "java.net.InetSocketAddress", "java.util.ArrayList", "java.util.Set", "org.junit.Test" ]
import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Set; import org.junit.Test;
import java.net.*; import java.util.*; import org.junit.*;
[ "java.net", "java.util", "org.junit" ]
java.net; java.util; org.junit;
2,352,035
public CompactionInfo getCompactionForSSTable(SSTableReader sstable) { CompactionInfo toReturn = null; synchronized (compactions) { for (CompactionInfo.Holder holder : compactions) { if (holder.getCompactionInfo().getSSTables().contains(sstable)) ...
CompactionInfo function(SSTableReader sstable) { CompactionInfo toReturn = null; synchronized (compactions) { for (CompactionInfo.Holder holder : compactions) { if (holder.getCompactionInfo().getSSTables().contains(sstable)) { if (toReturn != null) throw new IllegalStateException(STR + sstable + STR); toReturn = holder...
/** * Iterates over the active compactions and tries to find the CompactionInfo for the given sstable * * Number of entries in compactions should be small (< 10) but avoid calling in any time-sensitive context */
Iterates over the active compactions and tries to find the CompactionInfo for the given sstable Number of entries in compactions should be small (< 10) but avoid calling in any time-sensitive context
getCompactionForSSTable
{ "repo_name": "jeromatron/cassandra", "path": "src/java/org/apache/cassandra/db/compaction/ActiveCompactions.java", "license": "apache-2.0", "size": 2708 }
[ "org.apache.cassandra.io.sstable.format.SSTableReader" ]
import org.apache.cassandra.io.sstable.format.SSTableReader;
import org.apache.cassandra.io.sstable.format.*;
[ "org.apache.cassandra" ]
org.apache.cassandra;
1,510,895
public static String validatePath(String path) throws IOException { if (path.startsWith(Constants.HEADER) || path.startsWith(Constants.HEADER_FT)) { if (!path.contains(":")) { throw new IOException("Invalid Path: " + path + ". Use " + Constants.HEADER + "host:port/ ," + Constants.HEADER_...
static String function(String path) throws IOException { if (path.startsWith(Constants.HEADER) path.startsWith(Constants.HEADER_FT)) { if (!path.contains(":")) { throw new IOException(STR + path + STR + Constants.HEADER + STR + Constants.HEADER_FT + STR + STR); } else { return path; } } else { String hostname = Network...
/** * Validates the path, verifying that it contains the {@link Constants#HEADER} or * {@link Constants#HEADER_FT} and a hostname:port specified. * * @param path the path to be verified * @return the verified path in a form like alluxio://host:port/dir. If only the "/dir" or "dir" * part is pr...
Validates the path, verifying that it contains the <code>Constants#HEADER</code> or <code>Constants#HEADER_FT</code> and a hostname:port specified
validatePath
{ "repo_name": "riversand963/alluxio", "path": "shell/src/main/java/alluxio/cli/fs/FileSystemShellUtils.java", "license": "apache-2.0", "size": 10897 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
788,328
return _result; } private static final String JSIG_NAMESPACE_URI = "urn:hl7-jsig"; private static final String JSIG_ATT_CLASS = "class"; // private final boolean // CONF_MERGE_ASSOCIATIVE_OBJECT_WITH_SAME_SOURCE_AND_TARGET; // set in // constructor based on application context private final boolean CONF_...
return _result; } private static final String JSIG_NAMESPACE_URI = STR; private static final String JSIG_ATT_CLASS = "class"; private final boolean CONF_OBEY_JCLASS_ATTRIBUTE; private final boolean CONF_PRESERVE_EXTENSIONS; private List<Merger> _mergers;
/** * Get the result of this parse. */
Get the result of this parse
getResult
{ "repo_name": "markusgumbel/dshl7", "path": "hl7-javasig/src/org/hl7/xml/parser/MessageElementContentHandler.java", "license": "apache-2.0", "size": 26332 }
[ "java.util.List", "org.hl7.merger.Merger" ]
import java.util.List; import org.hl7.merger.Merger;
import java.util.*; import org.hl7.merger.*;
[ "java.util", "org.hl7.merger" ]
java.util; org.hl7.merger;
1,245,745
public static String[] getPortNames(Pattern pattern, Comparator<String> comparator) { return getPortNames(PORTNAMES_PATH, pattern, comparator); }
static String[] function(Pattern pattern, Comparator<String> comparator) { return getPortNames(PORTNAMES_PATH, pattern, comparator); }
/** * Get sorted array of serial ports in the system matched pattern and sorted by comparator * * @param pattern RegExp pattern for matching port names <b>(not null)</b> * @param comparator Comparator for sotring port names <b>(not null)</b> * * @return String array. If there is no p...
Get sorted array of serial ports in the system matched pattern and sorted by comparator
getPortNames
{ "repo_name": "os-cillation/easyfpga-sdk-java", "path": "src/jssc/SerialPortList.java", "license": "gpl-3.0", "size": 13566 }
[ "java.util.Comparator", "java.util.regex.Pattern" ]
import java.util.Comparator; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
587,891
public static long rEvalSimpleLongExpression( Hop root, HashMap<Long, Long> valMemo ) throws HopsException { long ret = Long.MAX_VALUE; //for simplicity and robustness call double and cast. HashMap<Long, Double> dvalMemo = new HashMap<Long, Double>(); double tmp = rEvalSimpleDoubleExpression(root, dva...
static long function( Hop root, HashMap<Long, Long> valMemo ) throws HopsException { long ret = Long.MAX_VALUE; HashMap<Long, Double> dvalMemo = new HashMap<Long, Double>(); double tmp = rEvalSimpleDoubleExpression(root, dvalMemo); if( tmp!=Double.MAX_VALUE ) ret = UtilFunctions.toLong( tmp ); return ret; }
/** * Function to evaluate simple size expressions over literals and now/ncol. * * It returns the exact results of this expressions if known, otherwise * Long.MAX_VALUE if unknown. * * @param root the root high-level operator * @param valMemo ? * @return size expression * @throws HopsException if Ho...
Function to evaluate simple size expressions over literals and now/ncol. It returns the exact results of this expressions if known, otherwise Long.MAX_VALUE if unknown
rEvalSimpleLongExpression
{ "repo_name": "asurve/arvind-sysml", "path": "src/main/java/org/apache/sysml/hops/OptimizerUtils.java", "license": "apache-2.0", "size": 45915 }
[ "java.util.HashMap", "org.apache.sysml.runtime.util.UtilFunctions" ]
import java.util.HashMap; import org.apache.sysml.runtime.util.UtilFunctions;
import java.util.*; import org.apache.sysml.runtime.util.*;
[ "java.util", "org.apache.sysml" ]
java.util; org.apache.sysml;
2,765,797
@Test public void getMissingValue() { assertThat(MDC.get("pi")).isNull(); }
void function() { assertThat(MDC.get("pi")).isNull(); }
/** * Verifies that {@code null} will be returned, if a requested context value doesn't exist in underlying context * provider. */
Verifies that null will be returned, if a requested context value doesn't exist in underlying context provider
getMissingValue
{ "repo_name": "pmwmedia/tinylog", "path": "log4j1.2-api/src/test/java/org/apache/log4j/MdcTest.java", "license": "apache-2.0", "size": 3027 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
1,000,747
@Override public void render(HtmlStringBuffer buffer) { buffer.elementStart(getTag()); buffer.appendAttribute("type", getType()); buffer.appendAttribute("name", getName()); buffer.appendAttribute("id", getId()); Class<?> valueCls = getValueClass(); if...
void function(HtmlStringBuffer buffer) { buffer.elementStart(getTag()); buffer.appendAttribute("type", getType()); buffer.appendAttribute("name", getName()); buffer.appendAttribute("id", getId()); Class<?> valueCls = getValueClass(); if (valueCls == String.class valueCls == Integer.class valueCls == Boolean.class value...
/** * Render the HTML representation of the HiddenField. * * @see org.apache.click.Control#render(org.apache.click.util.HtmlStringBuffer) * * @param buffer the specified buffer to render the control's output to */
Render the HTML representation of the HiddenField
render
{ "repo_name": "medgar/click", "path": "framework/src/org/apache/click/control/HiddenField.java", "license": "apache-2.0", "size": 12565 }
[ "java.io.IOException", "java.io.Serializable", "java.util.Date", "org.apache.click.util.ClickUtils", "org.apache.click.util.HtmlStringBuffer" ]
import java.io.IOException; import java.io.Serializable; import java.util.Date; import org.apache.click.util.ClickUtils; import org.apache.click.util.HtmlStringBuffer;
import java.io.*; import java.util.*; import org.apache.click.util.*;
[ "java.io", "java.util", "org.apache.click" ]
java.io; java.util; org.apache.click;
2,231,388
@Test @Ignore("This test takes ~2s and is therefore disabled by default") public void testSyncSSLNoClientValidation() throws Exception { int blobSize = 5 * MB; FileStore primary = serverFileStore.fileStore(); FileStore secondary = clientFileStore.fileStore(); FileOutputStrea...
@Ignore(STR) void function() throws Exception { int blobSize = 5 * MB; FileStore primary = serverFileStore.fileStore(); FileStore secondary = clientFileStore.fileStore(); FileOutputStream fos; File serverKeyFile = folder.newFile(); fos = new FileOutputStream(serverKeyFile); IOUtils.writeString(fos, serverKey); fos.clos...
/** * This test syncs a few segments over an encrypted connection. * The server has a configured certificate which can be validated with the truststore. * The server does not validate the client certificate. * The client creates its certificate on-the-fly. */
This test syncs a few segments over an encrypted connection. The server has a configured certificate which can be validated with the truststore. The server does not validate the client certificate. The client creates its certificate on-the-fly
testSyncSSLNoClientValidation
{ "repo_name": "apache/jackrabbit-oak", "path": "oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/standby/StandbyTestIT.java", "license": "apache-2.0", "size": 40804 }
[ "com.google.common.io.ByteStreams", "java.io.ByteArrayInputStream", "java.io.File", "java.io.FileOutputStream", "java.security.KeyStore", "java.security.cert.Certificate", "java.security.cert.CertificateFactory", "org.apache.jackrabbit.oak.api.Blob", "org.apache.jackrabbit.oak.api.PropertyState", ...
import com.google.common.io.ByteStreams; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; import java.security.KeyStore; import java.security.cert.Certificate; import java.security.cert.CertificateFactory; import org.apache.jackrabbit.oak.api.Blob; import org.apache.jackrabbit....
import com.google.common.io.*; import java.io.*; import java.security.*; import java.security.cert.*; import org.apache.jackrabbit.oak.api.*; import org.apache.jackrabbit.oak.commons.*; import org.apache.jackrabbit.oak.segment.*; import org.apache.jackrabbit.oak.segment.file.*; import org.apache.jackrabbit.oak.segment....
[ "com.google.common", "java.io", "java.security", "org.apache.jackrabbit", "org.junit" ]
com.google.common; java.io; java.security; org.apache.jackrabbit; org.junit;
2,564,660
@Test public void fromFilenames_Multiple_asFiles() throws IOException { // given String f1 = "src/test/resources/Thumbnailator/grid.png"; String f2 = "src/test/resources/Thumbnailator/grid.jpg"; // when List<File> thumbnails = Thumbnails.fromFilenames(Arrays.asList(f1, f2)) .size(50, 50)...
void function() throws IOException { String f1 = STR; String f2 = STR; List<File> thumbnails = Thumbnails.fromFilenames(Arrays.asList(f1, f2)) .size(50, 50) .asFiles(Rename.PREFIX_DOT_THUMBNAIL); File outFile1 = new File(STR); File outFile2 = new File(STR); outFile1.deleteOnExit(); outFile2.deleteOnExit(); assertEquals...
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.fromFilenames([String, String])</li> * <li>toFiles(Rename)</li> * </ol> * and the expected outcome is, * <ol> * <li>Two images are generated and written to a file whose name is * generated from the Rename objec...
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.fromFilenames([String, String]) toFiles(Rename) and the expected outcome is, Two images are generated and written to a file whose name is generated from the Rename object.
fromFilenames_Multiple_asFiles
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.IOException", "java.util.Arrays", "java.util.List", "javax.imageio.ImageIO", "net.coobird.thumbnailator.name.Rename", "org.junit.Assert" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.List; import javax.imageio.ImageIO; import net.coobird.thumbnailator.name.Rename; import org.junit.Assert;
import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.*; import net.coobird.thumbnailator.name.*; import org.junit.*;
[ "java.awt", "java.io", "java.util", "javax.imageio", "net.coobird.thumbnailator", "org.junit" ]
java.awt; java.io; java.util; javax.imageio; net.coobird.thumbnailator; org.junit;
272,299
@Override @QosPriority(priority=HConstants.HIGH_QOS) public CloseRegionResponse closeRegion(final RpcController controller, final CloseRegionRequest request) throws ServiceException { int versionOfClosingNode = -1; if (request.hasVersionOfClosingNode()) { versionOfClosingNode = request.getVers...
@QosPriority(priority=HConstants.HIGH_QOS) CloseRegionResponse function(final RpcController controller, final CloseRegionRequest request) throws ServiceException { int versionOfClosingNode = -1; if (request.hasVersionOfClosingNode()) { versionOfClosingNode = request.getVersionOfClosingNode(); } boolean zk = request.get...
/** * Close a region on the region server. * * @param controller the RPC controller * @param request the request * @throws ServiceException */
Close a region on the region server
closeRegion
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java", "license": "apache-2.0", "size": 81238 }
[ "com.google.protobuf.RpcController", "com.google.protobuf.ServiceException", "java.io.IOException", "org.apache.hadoop.hbase.DoNotRetryIOException", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.protobuf.ProtobufUtil", "org.apache.hadoop.hbase.pro...
import com.google.protobuf.RpcController; import com.google.protobuf.ServiceException; import java.io.IOException; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.protobuf.ProtobufUtil; import org....
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.*; import org.apache.hadoop.hbase.protobuf.generated.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop" ]
com.google.protobuf; java.io; org.apache.hadoop;
150,535
private void processModel( Model model ) { Parent parent = model.getParent(); if ( this.groupId == null ) { this.groupId = model.getGroupId(); if ( this.groupId == null && parent != null ) { this.groupId = parent.getGroupId(); ...
void function( Model model ) { Parent parent = model.getParent(); if ( this.groupId == null ) { this.groupId = model.getGroupId(); if ( this.groupId == null && parent != null ) { this.groupId = parent.getGroupId(); } } if ( this.artifactId == null ) { this.artifactId = model.getArtifactId(); } if ( this.version == null...
/** * Process the supplied pomFile to get groupId, artifactId, version, and packaging * * @param model The POM to extract missing artifact coordinates from, must not be <code>null</code>. */
Process the supplied pomFile to get groupId, artifactId, version, and packaging
processModel
{ "repo_name": "lennartj/maven-plugins", "path": "maven-deploy-plugin/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java", "license": "apache-2.0", "size": 24502 }
[ "org.apache.maven.model.Model", "org.apache.maven.model.Parent" ]
import org.apache.maven.model.Model; import org.apache.maven.model.Parent;
import org.apache.maven.model.*;
[ "org.apache.maven" ]
org.apache.maven;
2,778,474
public static ConcatNode getUncached() { return TruffleStringFactory.ConcatNodeGen.getUncached(); } } @ImportStatic(TStringGuards.class) @GeneratePackagePrivate @GenerateUncached public abstract static class RepeatNode extends Node { RepeatNode() { ...
static ConcatNode function() { return TruffleStringFactory.ConcatNodeGen.getUncached(); } } @ImportStatic(TStringGuards.class) public abstract static class RepeatNode extends Node { RepeatNode() { }
/** * Get the uncached version of {@link ConcatNode}. * * @since 22.1 */
Get the uncached version of <code>ConcatNode</code>
getUncached
{ "repo_name": "smarr/Truffle", "path": "truffle/src/com.oracle.truffle.api.strings/src/com/oracle/truffle/api/strings/TruffleString.java", "license": "gpl-2.0", "size": 210753 }
[ "com.oracle.truffle.api.dsl.ImportStatic", "com.oracle.truffle.api.nodes.Node" ]
import com.oracle.truffle.api.dsl.ImportStatic; import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.dsl.*; import com.oracle.truffle.api.nodes.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
582,843
public void setUserName(String userName) { m_userName = OpenCms.getImportExportManager().translateUser(userName); }
void function(String userName) { m_userName = OpenCms.getImportExportManager().translateUser(userName); }
/** * Sets the user Name.<p> * * @param userName the name to set */
Sets the user Name
setUserName
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/importexport/CmsImportVersion7.java", "license": "lgpl-2.1", "size": 114451 }
[ "org.opencms.main.OpenCms" ]
import org.opencms.main.OpenCms;
import org.opencms.main.*;
[ "org.opencms.main" ]
org.opencms.main;
593,289
static public void copyFromLocalToCluster(MiniCluster cluster, String localFileName, String fileNameOnCluster) throws IOException { PigServer ps = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()); String script = "fs -put " + localFileName + " " + fileNameOnCluster; GruntParser parser =...
static void function(MiniCluster cluster, String localFileName, String fileNameOnCluster) throws IOException { PigServer ps = new PigServer(ExecType.MAPREDUCE, cluster.getProperties()); String script = STR + localFileName + " " + fileNameOnCluster; GruntParser parser = new GruntParser(new StringReader(script)); parser....
/** * Utility method to copy a file form local filesystem to the dfs on * the minicluster for testing in mapreduce mode * @param cluster a reference to the minicluster * @param localFileName the pathname of local file * @param fileNameOnCluster the name with which the file should be created on the minicluster...
Utility method to copy a file form local filesystem to the dfs on the minicluster for testing in mapreduce mode
copyFromLocalToCluster
{ "repo_name": "dmeister/pig-cll-gz", "path": "test/org/apache/pig/test/Util.java", "license": "apache-2.0", "size": 37825 }
[ "java.io.IOException", "java.io.StringReader", "org.apache.pig.ExecType", "org.apache.pig.PigServer", "org.apache.pig.tools.grunt.GruntParser" ]
import java.io.IOException; import java.io.StringReader; import org.apache.pig.ExecType; import org.apache.pig.PigServer; import org.apache.pig.tools.grunt.GruntParser;
import java.io.*; import org.apache.pig.*; import org.apache.pig.tools.grunt.*;
[ "java.io", "org.apache.pig" ]
java.io; org.apache.pig;
762,783
Object executeOnQueuesAndReturnPrimaryResult(Op op) throws NoSubscriptionServersAvailableException, SubscriptionNotEnabledException;
Object executeOnQueuesAndReturnPrimaryResult(Op op) throws NoSubscriptionServersAvailableException, SubscriptionNotEnabledException;
/** * Execute the given op on all the servers that have server-to-client queues for this pool. The op * will be executed on all backups, and then the primary. This method will block until a primary * is available. * * @param op the operation to execute * @return The result from the primary server. ...
Execute the given op on all the servers that have server-to-client queues for this pool. The op will be executed on all backups, and then the primary. This method will block until a primary is available
executeOnQueuesAndReturnPrimaryResult
{ "repo_name": "smgoller/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/client/internal/ExecutablePool.java", "license": "apache-2.0", "size": 5799 }
[ "org.apache.geode.cache.NoSubscriptionServersAvailableException", "org.apache.geode.cache.client.SubscriptionNotEnabledException" ]
import org.apache.geode.cache.NoSubscriptionServersAvailableException; import org.apache.geode.cache.client.SubscriptionNotEnabledException;
import org.apache.geode.cache.*; import org.apache.geode.cache.client.*;
[ "org.apache.geode" ]
org.apache.geode;
1,197,353
@Test public void testSetStartLspId() throws Exception { csnp.setStartLspId(srcId); resultStr = csnp.startLspId(); assertThat(resultStr, is(srcId)); }
void function() throws Exception { csnp.setStartLspId(srcId); resultStr = csnp.startLspId(); assertThat(resultStr, is(srcId)); }
/** * Tests startLspId() setter method. */
Tests startLspId() setter method
testSetStartLspId
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/isis/isisio/src/test/java/org/onosproject/isis/io/isispacket/pdu/CsnpTest.java", "license": "apache-2.0", "size": 7236 }
[ "org.hamcrest.CoreMatchers", "org.hamcrest.MatcherAssert" ]
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,065,810
@FIXVersion(introduced = "4.3") @TagNumRef(tagNum = TagNum.TransactTime) public void setTransactTime(Date transactTime) { this.transactTime = transactTime; }
@FIXVersion(introduced = "4.3") @TagNumRef(tagNum = TagNum.TransactTime) void function(Date transactTime) { this.transactTime = transactTime; }
/** * Message field setter. * @param transactTime field value */
Message field setter
setTransactTime
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/group/QuoteRequestRejectGroup.java", "license": "gpl-3.0", "size": 50378 }
[ "java.util.Date", "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import java.util.Date; import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import java.util.*; import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "java.util", "net.hades.fix" ]
java.util; net.hades.fix;
1,896,689
@Test public void testStartGatewaySender_onMember() throws Exception { Integer locator1Port = locatorSite1.getPort(); // setup servers in Site #1 server1 = clusterStartupRule.startServerVM(3, locator1Port); server1.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true)); ...
void function() throws Exception { Integer locator1Port = locatorSite1.getPort(); server1 = clusterStartupRule.startServerVM(3, locator1Port); server1.invoke(() -> createSender("ln", 2, false, 100, 400, false, false, null, true)); server1.invoke(() -> verifySenderState("ln", false, false)); locatorSite1.invoke( () -> v...
/** * test to validate that the start gateway sender starts the gateway sender on a member */
test to validate that the start gateway sender starts the gateway sender on a member
testStartGatewaySender_onMember
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/wancommand/StartGatewaySenderCommandDUnitTest.java", "license": "apache-2.0", "size": 16582 }
[ "org.apache.geode.distributed.DistributedMember", "org.apache.geode.internal.cache.wan.wancommand.WANCommandUtils", "org.apache.geode.management.cli.Result", "org.apache.geode.management.internal.cli.i18n.CliStrings", "org.apache.geode.management.internal.cli.result.CommandResult", "org.assertj.core.api.A...
import org.apache.geode.distributed.DistributedMember; import org.apache.geode.internal.cache.wan.wancommand.WANCommandUtils; import org.apache.geode.management.cli.Result; import org.apache.geode.management.internal.cli.i18n.CliStrings; import org.apache.geode.management.internal.cli.result.CommandResult; import org.a...
import org.apache.geode.distributed.*; import org.apache.geode.internal.cache.wan.wancommand.*; import org.apache.geode.management.cli.*; import org.apache.geode.management.internal.cli.i18n.*; import org.apache.geode.management.internal.cli.result.*; import org.assertj.core.api.*;
[ "org.apache.geode", "org.assertj.core" ]
org.apache.geode; org.assertj.core;
1,792,844
public Resource createResourceWithNoPropertiesNoCredential(String id, String pluginId) { Resource resource = new Resource(); resource.setId(id); resource.setPluginId(pluginId); return resource; }
Resource function(String id, String pluginId) { Resource resource = new Resource(); resource.setId(id); resource.setPluginId(pluginId); return resource; }
/** * Create resource with no properties. * * @param id * resource ID. * @param pluginId * plugin ID. */
Create resource with no properties
createResourceWithNoPropertiesNoCredential
{ "repo_name": "athrane/pineapple", "path": "testing/pineapple-test-utils/src/main/java/com/alpha/testutils/ObjectMotherResource.java", "license": "gpl-3.0", "size": 5096 }
[ "com.alpha.pineapple.model.configuration.Resource" ]
import com.alpha.pineapple.model.configuration.Resource;
import com.alpha.pineapple.model.configuration.*;
[ "com.alpha.pineapple" ]
com.alpha.pineapple;
827,018
public static void copy(Reader input, OutputStream output, Charset encoding) throws IOException { OutputStreamWriter out = new OutputStreamWriter(output, Charsets.toCharset(encoding)); copy(input, out); // XXX Unless anyone is planning on rewriting OutputStreamWriter, // we have to f...
static void function(Reader input, OutputStream output, Charset encoding) throws IOException { OutputStreamWriter out = new OutputStreamWriter(output, Charsets.toCharset(encoding)); copy(input, out); out.flush(); }
/** * Copy chars from a <code>Reader</code> to bytes on an * <code>OutputStream</code> using the specified character encoding, and * calling flush. * <p> * This method buffers the input internally, so there is no need to use a * <code>BufferedReader</code>. * </p> * <p> * Du...
Copy chars from a <code>Reader</code> to bytes on an <code>OutputStream</code> using the specified character encoding, and calling flush. This method buffers the input internally, so there is no need to use a <code>BufferedReader</code>. Due to the implementation of OutputStreamWriter, this method performs a flush. Thi...
copy
{ "repo_name": "solaris0403/SeleneDemo", "path": "common_lib/src/main/java/com/tony/selene/common/trinea/android/common/io/IOUtil.java", "license": "gpl-2.0", "size": 95443 }
[ "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.Reader", "java.nio.charset.Charset" ]
import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
347,787
private void checkIfDir(File directory, Integer nodeId, InetAddress primary, int interval, int range, Date date, Map<String,ThresholdEntity> baseIfThresholdMap, Map<String,Map<String,ThresholdEntity>> allIfThresholdMap, Events events) throws IllegalArgumentException { // Sanity Check if (directory =...
void function(File directory, Integer nodeId, InetAddress primary, int interval, int range, Date date, Map<String,ThresholdEntity> baseIfThresholdMap, Map<String,Map<String,ThresholdEntity>> allIfThresholdMap, Events events) throws IllegalArgumentException { if (directory == null nodeId == null primary == null date == ...
/** * Performs threshold checking on an JMX RRD interface directory. * * @param directory * RRD repository directory * @param nodeId * Node identifier * @param primary * Primary JMX interface address * @param interval * Confi...
Performs threshold checking on an JMX RRD interface directory
checkIfDir
{ "repo_name": "bugcy013/opennms-tmp-tools", "path": "opennms-services/src/main/java/org/opennms/netmgt/threshd/JMXThresholder.java", "license": "gpl-2.0", "size": 29847 }
[ "java.io.File", "java.net.InetAddress", "java.util.Collection", "java.util.Date", "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map", "org.opennms.netmgt.xml.event.Event", "org.opennms.netmgt.xml.event.Events" ]
import java.io.File; import java.net.InetAddress; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.opennms.netmgt.xml.event.Event; import org.opennms.netmgt.xml.event.Events;
import java.io.*; import java.net.*; import java.util.*; import org.opennms.netmgt.xml.event.*;
[ "java.io", "java.net", "java.util", "org.opennms.netmgt" ]
java.io; java.net; java.util; org.opennms.netmgt;
1,978,395
public void computeCoefficients(final int j, final int s) { // sign of j-s final int sign = j < s ? -1 : 1; //|j-s| final int absJmS = FastMath.abs(j - s); //j+s final int jps = j + s; //Compute the coefficient A and its deri...
void function(final int j, final int s) { final int sign = j < s ? -1 : 1; final int absJmS = FastMath.abs(j - s); final int jps = j + s; coefAandDeriv[0] = sign * cjsjalbe.getCj(s) * cjsjkh.getSj(absJmS) + cjsjalbe.getSj(s) * cjsjkh.getCj(absJmS); coefAandDeriv[1] = sign * cjsjalbe.getCj(s) * cjsjkh.getDsjDk(absJmS) +...
/** Compute the coefficients and their derivatives for a given (j,s) pair. * @param j j index * @param s s index */
Compute the coefficients and their derivatives for a given (j,s) pair
computeCoefficients
{ "repo_name": "liscju/Orekit", "path": "src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTThirdBody.java", "license": "apache-2.0", "size": 76152 }
[ "org.apache.commons.math3.util.FastMath" ]
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.*;
[ "org.apache.commons" ]
org.apache.commons;
2,050,879
public static ByteBuffer convertImageData(BufferedImage bi) { DataBuffer buff = bi.getRaster().getDataBuffer(); // ClassCastException thrown if buff not instanceof DataBufferByte because raster data is not necessarily bytes. // Convert the original buffered image to grayscale. if (!(...
static ByteBuffer function(BufferedImage bi) { DataBuffer buff = bi.getRaster().getDataBuffer(); if (!(buff instanceof DataBufferByte)) { bi = ImageHelper.convertImageToGrayscale(bi); buff = bi.getRaster().getDataBuffer(); } byte[] pixelData = ((DataBufferByte) buff).getData(); ByteBuffer buf = ByteBuffer.allocateDirec...
/** * Converts <code>BufferedImage</code> to <code>ByteBuffer</code>. * * @param bi Input image * @return pixel data */
Converts <code>BufferedImage</code> to <code>ByteBuffer</code>
convertImageData
{ "repo_name": "wcecil/tess4j", "path": "src/main/java/net/sourceforge/tess4j/util/ImageIOHelper.java", "license": "apache-2.0", "size": 18785 }
[ "java.awt.image.BufferedImage", "java.awt.image.DataBuffer", "java.awt.image.DataBufferByte", "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.awt.image.BufferedImage; import java.awt.image.DataBuffer; import java.awt.image.DataBufferByte; import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.awt.image.*; import java.nio.*;
[ "java.awt", "java.nio" ]
java.awt; java.nio;
2,396,023
public Observable<ServiceResponse<Page<FirewallRuleInner>>> listByServerSinglePageAsync(final String resourceGroupName, final String serverName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } ...
Observable<ServiceResponse<Page<FirewallRuleInner>>> function(final String resourceGroupName, final String serverName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serverName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new ...
/** * Gets a list of firewall rules. * ServiceResponse<PageImpl<FirewallRuleInner>> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. ServiceResponse<PageImpl<FirewallRuleInner>> * @param s...
Gets a list of firewall rules
listByServerSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FirewallRulesInner.java", "license": "mit", "size": 46937 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,166,197
@ApiModelProperty(value = "") public Integer getTotalPages() { return totalPages; }
@ApiModelProperty(value = "") Integer function() { return totalPages; }
/** * Get totalPages * @return totalPages **/
Get totalPages
getTotalPages
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/PageResourcestring.java", "license": "apache-2.0", "size": 7178 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,026,174
public Row getRow(Session session, long key) { return scanIndex.getRow(session, key); }
Row function(Session session, long key) { return scanIndex.getRow(session, key); }
/** * Read the given row. * * @param session the session * @param key unique key * @return the row */
Read the given row
getRow
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/table/RegularTable.java", "license": "gpl-3.0", "size": 27430 }
[ "org.h2.engine.Session", "org.h2.result.Row" ]
import org.h2.engine.Session; import org.h2.result.Row;
import org.h2.engine.*; import org.h2.result.*;
[ "org.h2.engine", "org.h2.result" ]
org.h2.engine; org.h2.result;
487,142
static int readBase250Word(DataInputStream in) throws IOException { return in.readUnsignedByte() * 250 + in.readUnsignedByte(); }
static int readBase250Word(DataInputStream in) throws IOException { return in.readUnsignedByte() * 250 + in.readUnsignedByte(); }
/** * Read a base-250 2-byte big-endian word from a <code>DataInputStream</code>. * This is the default (and only) encoding for words imported modules. */
Read a base-250 2-byte big-endian word from a <code>DataInputStream</code>. This is the default (and only) encoding for words imported modules
readBase250Word
{ "repo_name": "caiusb/vassal", "path": "src/VASSAL/tools/imports/adc2/ADC2Utils.java", "license": "lgpl-2.1", "size": 9151 }
[ "java.io.DataInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
721,289
public final void setBorderDash(int... borderDash) { setArrayValueAndAddToParent(Property.BORDER_DASH, ArrayInteger.fromOrNull(borderDash)); }
final void function(int... borderDash) { setArrayValueAndAddToParent(Property.BORDER_DASH, ArrayInteger.fromOrNull(borderDash)); }
/** * Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern. * * @param borderDash the line dash pattern used when stroking lines */
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern
setBorderDash
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/options/AbstractScaleLines.java", "license": "apache-2.0", "size": 4162 }
[ "org.pepstock.charba.client.commons.ArrayInteger" ]
import org.pepstock.charba.client.commons.ArrayInteger;
import org.pepstock.charba.client.commons.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,963,716
Iterator<NodeHandle> getBestRoutingCandidates(Id key); // boolean routeMessage(RouteMessage rm);
Iterator<NodeHandle> getBestRoutingCandidates(Id key);
/** * Returns an ordered list of the best candidates for the next to the key. Always starts with * a node that matches an additional prefix, if it is available. * * @param key * @return */
Returns an ordered list of the best candidates for the next to the key. Always starts with a node that matches an additional prefix, if it is available
getBestRoutingCandidates
{ "repo_name": "barnyard/pi", "path": "freepastry/src/rice/pastry/routing/Router.java", "license": "apache-2.0", "size": 2561 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,151,973
public List<LinkElement> getNameList() { return NameList; }
List<LinkElement> function() { return NameList; }
/** * getNameList * Gets List<LinkElement> * @return NameList */
getNameList Gets List
getNameList
{ "repo_name": "asposecells/Aspose_Cells_Cloud", "path": "SDKs/Aspose.Cells-Cloud-SDK-for-Java/src/main/java/com/aspose/cells/model/Names.java", "license": "mit", "size": 1371 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,403,795
private void updateMaxRssMemory() { if (!doUpdateReservedPhysicalMemory) { return; } final int MEM_CONFIGURATION_READ_PERIOD = 100; maxRssMemoryAllowedUpdateCounter++; if (maxRssMemoryAllowedUpdateCounter > MEM_CONFIGURATION_READ_PERIOD) { maxRssMemoryAllowedUpdateCounter = 0; Co...
void function() { if (!doUpdateReservedPhysicalMemory) { return; } final int MEM_CONFIGURATION_READ_PERIOD = 100; maxRssMemoryAllowedUpdateCounter++; if (maxRssMemoryAllowedUpdateCounter > MEM_CONFIGURATION_READ_PERIOD) { maxRssMemoryAllowedUpdateCounter = 0; Configuration conf = new Configuration(); long reservedRssMe...
/** * Read the reserved physical memory configuration and update the maximum * physical memory allowed periodically. This allows us to change the * physcial memory limit configuration without starting TaskTracker */
Read the reserved physical memory configuration and update the maximum physical memory allowed periodically. This allows us to change the physcial memory limit configuration without starting TaskTracker
updateMaxRssMemory
{ "repo_name": "jchen123/hadoop-20-warehouse-fix", "path": "src/mapred/org/apache/hadoop/mapred/TaskMemoryManagerThread.java", "license": "apache-2.0", "size": 22424 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
776,533
@Override public List<PayloadType> getPayloads() { List<PayloadType> list = new ArrayList<PayloadType>(); if (preferredPayloadType != null) list.add(preferredPayloadType); for (JingleMediaManager manager : managers) { for (PayloadType payloadType : manager.getPayloads()) { ...
List<PayloadType> function() { List<PayloadType> list = new ArrayList<PayloadType>(); if (preferredPayloadType != null) list.add(preferredPayloadType); for (JingleMediaManager manager : managers) { for (PayloadType payloadType : manager.getPayloads()) { if (!list.contains(payloadType) && !payloadType.equals(preferredPa...
/** * Return all supported Payloads for this Manager. * * @return The Payload List */
Return all supported Payloads for this Manager
getPayloads
{ "repo_name": "esl/Smack", "path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/multi/MultiMediaManager.java", "license": "apache-2.0", "size": 3583 }
[ "java.util.ArrayList", "java.util.List", "org.jivesoftware.smackx.jingleold.media.JingleMediaManager", "org.jivesoftware.smackx.jingleold.media.PayloadType" ]
import java.util.ArrayList; import java.util.List; import org.jivesoftware.smackx.jingleold.media.JingleMediaManager; import org.jivesoftware.smackx.jingleold.media.PayloadType;
import java.util.*; import org.jivesoftware.smackx.jingleold.media.*;
[ "java.util", "org.jivesoftware.smackx" ]
java.util; org.jivesoftware.smackx;
113,272
private void serializeReifier(ReifiableIF obj) throws IOException { if (obj.getReifier() != null) { writer.pair("reifier", getTopicRef(obj.getReifier())); } }
void function(ReifiableIF obj) throws IOException { if (obj.getReifier() != null) { writer.pair(STR, getTopicRef(obj.getReifier())); } }
/** * INTERNAL: Serialize the reference to the reifier of a topic map construct, * if there is one present. * * @param obj a reifiable topic map construct. */
if there is one present
serializeReifier
{ "repo_name": "ontopia/ontopia", "path": "ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/jtm/JTMTopicMapWriter.java", "license": "apache-2.0", "size": 23384 }
[ "java.io.IOException", "net.ontopia.topicmaps.core.ReifiableIF" ]
import java.io.IOException; import net.ontopia.topicmaps.core.ReifiableIF;
import java.io.*; import net.ontopia.topicmaps.core.*;
[ "java.io", "net.ontopia.topicmaps" ]
java.io; net.ontopia.topicmaps;
1,309,139
public WSRequest params(Map<String, Object> parameters) { this.parameters = parameters; return this; }
WSRequest function(Map<String, Object> parameters) { this.parameters = parameters; return this; }
/** * Add parameters to request. * If POST or PUT, parameters are passed in body using x-www-form-urlencoded if alone, or form-data if there is files too. * For any other method, those params are appended to the queryString. * @return the WSRequest for chaining. */
Add parameters to request. If POST or PUT, parameters are passed in body using x-www-form-urlencoded if alone, or form-data if there is files too. For any other method, those params are appended to the queryString
params
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/play-1.1/framework/src/play/libs/WS.java", "license": "mit", "size": 14564 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
600,094
protected void configureVncAccessForKVMHostFailedMigrations(HostVO host, List<VMInstanceVO> failedMigrations) { if (host.getHypervisorType().equals(HypervisorType.KVM)) { _agentMgr.pullAgentOutMaintenance(host.getId()); setKVMVncAccess(host.getId(), failedMigrations); _ag...
void function(HostVO host, List<VMInstanceVO> failedMigrations) { if (host.getHypervisorType().equals(HypervisorType.KVM)) { _agentMgr.pullAgentOutMaintenance(host.getId()); setKVMVncAccess(host.getId(), failedMigrations); _agentMgr.pullAgentToMaintenance(host.getId()); } }
/** * Configure VNC access for host VMs which have failed migrating to another host while trying to enter Maintenance mode */
Configure VNC access for host VMs which have failed migrating to another host while trying to enter Maintenance mode
configureVncAccessForKVMHostFailedMigrations
{ "repo_name": "wido/cloudstack", "path": "server/src/main/java/com/cloud/resource/ResourceManagerImpl.java", "license": "apache-2.0", "size": 131823 }
[ "com.cloud.host.HostVO", "com.cloud.hypervisor.Hypervisor", "com.cloud.vm.VMInstanceVO", "java.util.List" ]
import com.cloud.host.HostVO; import com.cloud.hypervisor.Hypervisor; import com.cloud.vm.VMInstanceVO; import java.util.List;
import com.cloud.host.*; import com.cloud.hypervisor.*; import com.cloud.vm.*; import java.util.*;
[ "com.cloud.host", "com.cloud.hypervisor", "com.cloud.vm", "java.util" ]
com.cloud.host; com.cloud.hypervisor; com.cloud.vm; java.util;
606,644
@SuppressWarnings("deprecation") @Deprecated public DumbModeAction getDumbModeAction() { return DumbModeAction.NOTHING; } } public abstract static class Modal extends Task { public Modal(@Nullable Project project, @Nls(capitalization = Nls.Capitalization.Title) @NotNull String title, bool...
@SuppressWarnings(STR) DumbModeAction function() { return DumbModeAction.NOTHING; } } public abstract static class Modal extends Task { public Modal(@Nullable Project project, @Nls(capitalization = Nls.Capitalization.Title) @NotNull String title, boolean canBeCancelled) { super(project, title, canBeCancelled); }
/** * to remove in IDEA 16 */
to remove in IDEA 16
getDumbModeAction
{ "repo_name": "ThiagoGarciaAlves/intellij-community", "path": "platform/core-api/src/com/intellij/openapi/progress/Task.java", "license": "apache-2.0", "size": 9928 }
[ "com.intellij.openapi.project.DumbModeAction", "com.intellij.openapi.project.Project", "org.jetbrains.annotations.Nls", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable" ]
import com.intellij.openapi.project.DumbModeAction; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;
import com.intellij.openapi.project.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "org.jetbrains.annotations" ]
com.intellij.openapi; org.jetbrains.annotations;
2,420,658
public static String convertTo(String normalizedValue, LineEndings lineEndings) { if (normalizedValue == null) { return null; } if (lineEndings == null || lineEndings == LineEndings.unix) { return normalizedValue; } return PATTERN_UNIX.matcher(normalizedValue).replaceAll(lineEndings.ge...
static String function(String normalizedValue, LineEndings lineEndings) { if (normalizedValue == null) { return null; } if (lineEndings == null lineEndings == LineEndings.unix) { return normalizedValue; } return PATTERN_UNIX.matcher(normalizedValue).replaceAll(lineEndings.getLineEnding()); }
/** * Converts all unix line endings to the given line ending style. * @param normalizedValue String with line endings normalized to Unix-style * @param lineEndings Line ending style. * @return String with the given line ending style. */
Converts all unix line endings to the given line ending style
convertTo
{ "repo_name": "wcm-io-devops/conga", "path": "generator/src/main/java/io/wcm/devops/conga/generator/util/LineEndingConverter.java", "license": "apache-2.0", "size": 2582 }
[ "io.wcm.devops.conga.model.shared.LineEndings" ]
import io.wcm.devops.conga.model.shared.LineEndings;
import io.wcm.devops.conga.model.shared.*;
[ "io.wcm.devops" ]
io.wcm.devops;
256,019
public Request.Builder post(String path) { return new Request.Builder(HttpMethods.HttpMethod.POST, path); }
Request.Builder function(String path) { return new Request.Builder(HttpMethods.HttpMethod.POST, path); }
/** * Factory method for POST HTTP method. * @param path to call * @return builder */
Factory method for POST HTTP method
post
{ "repo_name": "spring-cloud/spring-cloud-contract", "path": "spring-cloud-contract-verifier/src/main/java/org/springframework/cloud/contract/verifier/http/Request.java", "license": "apache-2.0", "size": 9568 }
[ "org.springframework.cloud.contract.spec.internal.HttpMethods" ]
import org.springframework.cloud.contract.spec.internal.HttpMethods;
import org.springframework.cloud.contract.spec.internal.*;
[ "org.springframework.cloud" ]
org.springframework.cloud;
928,561
public FoldManager getFoldManager() { return foldManager; }
FoldManager function() { return foldManager; }
/** * Returns the fold manager for this text area. * * @return The fold manager. */
Returns the fold manager for this text area
getFoldManager
{ "repo_name": "thomasgalvin/ThirdParty", "path": "RText/RText-Editor/src/main/java/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java", "license": "apache-2.0", "size": 82868 }
[ "org.fife.ui.rsyntaxtextarea.folding.FoldManager" ]
import org.fife.ui.rsyntaxtextarea.folding.FoldManager;
import org.fife.ui.rsyntaxtextarea.folding.*;
[ "org.fife.ui" ]
org.fife.ui;
619,881
Collection<CaseStageInstance> getCaseInstanceStages(String caseId, boolean activeOnly, QueryContext queryContext);
Collection<CaseStageInstance> getCaseInstanceStages(String caseId, boolean activeOnly, QueryContext queryContext);
/** * Returns stages of given case instance, identified by case id. * @param caseId unique id of the case * @param activeOnly filter option to return only stages that are active * @param queryContext control parameters for the result e.g. sorting, paging * */
Returns stages of given case instance, identified by case id
getCaseInstanceStages
{ "repo_name": "sutaakar/jbpm", "path": "jbpm-case-mgmt/jbpm-case-mgmt-api/src/main/java/org/jbpm/casemgmt/api/CaseRuntimeDataService.java", "license": "apache-2.0", "size": 6657 }
[ "java.util.Collection", "org.jbpm.casemgmt.api.model.instance.CaseStageInstance", "org.kie.internal.query.QueryContext" ]
import java.util.Collection; import org.jbpm.casemgmt.api.model.instance.CaseStageInstance; import org.kie.internal.query.QueryContext;
import java.util.*; import org.jbpm.casemgmt.api.model.instance.*; import org.kie.internal.query.*;
[ "java.util", "org.jbpm.casemgmt", "org.kie.internal" ]
java.util; org.jbpm.casemgmt; org.kie.internal;
1,323,209
public void computeBounds( RectF bounds, boolean b ) { }
public void computeBounds( RectF bounds, boolean b ) { }
/** affine transform - it does nothing * @param mm transform coefficients * @param m transform matrix */
affine transform - it does nothing
affineTransformPathBy
{ "repo_name": "marcocorvi/topodroid", "path": "src/com/topodroid/DistoX/EraseCommand.java", "license": "gpl-3.0", "size": 3666 }
[ "android.graphics.RectF" ]
import android.graphics.RectF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,042,155
protected void initJvmClassLoading(MBeanServer server) throws Exception { final String oid = getGroupOid("JvmClassLoading", "1.3.6.1.4.1.42.2.145.3.163.1.1.1"); ObjectName objname = null; if (server != null) { objname = getGroupObjectName("JvmClassLoading", oid, mibName +...
void function(MBeanServer server) throws Exception { final String oid = getGroupOid(STR, STR); ObjectName objname = null; if (server != null) { objname = getGroupObjectName(STR, oid, mibName + STR); } final JvmClassLoadingMeta meta = createJvmClassLoadingMetaNode(STR, oid, objname, server); if (meta != null) { meta.reg...
/** * Initialization of the "JvmClassLoading" group. * * To disable support of this group, redefine the * "createJvmClassLoadingMetaNode()" factory method, and make it return "null" * * @param server MBeanServer for this group (may be null) * **/
Initialization of the "JvmClassLoading" group. To disable support of this group, redefine the "createJvmClassLoadingMetaNode()" factory method, and make it return "null"
initJvmClassLoading
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/sun/management/snmp/jvmmib/JVM_MANAGEMENT_MIB.java", "license": "mit", "size": 25367 }
[ "javax.management.MBeanServer", "javax.management.ObjectName" ]
import javax.management.MBeanServer; import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
455,917
void delete(String entity, String id, AsyncResultHandler<Number> response);
void delete(String entity, String id, AsyncResultHandler<Number> response);
/** * Deletes a object given an id. Returns the total number of removed elements. */
Deletes a object given an id. Returns the total number of removed elements
delete
{ "repo_name": "pmlopes/yoke", "path": "middleware/reststore/src/main/java/com/jetdrone/vertx/yoke/middleware/rest/Store.java", "license": "apache-2.0", "size": 1913 }
[ "io.vertx.core.AsyncResultHandler" ]
import io.vertx.core.AsyncResultHandler;
import io.vertx.core.*;
[ "io.vertx.core" ]
io.vertx.core;
2,736,255
protected void addRegionsToMeta(final CatalogTracker ct, final List<HRegionInfo> regionInfos) throws IOException { MetaEditor.addRegionsToMeta(this.catalogTracker, regionInfos); }
void function(final CatalogTracker ct, final List<HRegionInfo> regionInfos) throws IOException { MetaEditor.addRegionsToMeta(this.catalogTracker, regionInfos); }
/** * Add the specified set of regions to the hbase:meta table. */
Add the specified set of regions to the hbase:meta table
addRegionsToMeta
{ "repo_name": "tobegit3hub/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java", "license": "apache-2.0", "size": 11145 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.catalog.CatalogTracker", "org.apache.hadoop.hbase.catalog.MetaEditor" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.catalog.CatalogTracker; import org.apache.hadoop.hbase.catalog.MetaEditor;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.catalog.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
21,706
public final RexNode makeCall( SqlOperator op, RexNode... exprs) { return makeCall(op, ImmutableList.copyOf(exprs)); }
final RexNode function( SqlOperator op, RexNode... exprs) { return makeCall(op, ImmutableList.copyOf(exprs)); }
/** * Creates a call with a list of arguments. * * <p>Equivalent to * <code>makeCall(op, exprList.toArray(new RexNode[exprList.size()]))</code>. */
Creates a call with a list of arguments. Equivalent to <code>makeCall(op, exprList.toArray(new RexNode[exprList.size()]))</code>
makeCall
{ "repo_name": "b-slim/calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 51633 }
[ "com.google.common.collect.ImmutableList", "org.apache.calcite.sql.SqlOperator" ]
import com.google.common.collect.ImmutableList; import org.apache.calcite.sql.SqlOperator;
import com.google.common.collect.*; import org.apache.calcite.sql.*;
[ "com.google.common", "org.apache.calcite" ]
com.google.common; org.apache.calcite;
1,209,823
XContentBuilder newDocument(SecureString apiKey, String name, Authentication authentication, Set<RoleDescriptor> userRoles, Instant created, Instant expiration, List<RoleDescriptor> keyRoles, Version version) throws IOException { ...
XContentBuilder newDocument(SecureString apiKey, String name, Authentication authentication, Set<RoleDescriptor> userRoles, Instant created, Instant expiration, List<RoleDescriptor> keyRoles, Version version) throws IOException { XContentBuilder builder = XContentFactory.jsonBuilder(); builder.startObject() .field(STR,...
/** * package-private for testing */
package-private for testing
newDocument
{ "repo_name": "scorpionvicky/elasticsearch", "path": "x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/ApiKeyService.java", "license": "apache-2.0", "size": 56639 }
[ "java.io.IOException", "java.time.Instant", "java.util.Arrays", "java.util.List", "java.util.Set", "org.elasticsearch.Version", "org.elasticsearch.common.CharArrays", "org.elasticsearch.common.settings.SecureString", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xc...
import java.io.IOException; import java.time.Instant; import java.util.Arrays; import java.util.List; import java.util.Set; import org.elasticsearch.Version; import org.elasticsearch.common.CharArrays; import org.elasticsearch.common.settings.SecureString; import org.elasticsearch.common.xcontent.XContentBuilder; impor...
import java.io.*; import java.time.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.xpack.core.security.authc.*; import org.elasticsearch.xpack.core.security.authz.*;
[ "java.io", "java.time", "java.util", "org.elasticsearch", "org.elasticsearch.common", "org.elasticsearch.xpack" ]
java.io; java.time; java.util; org.elasticsearch; org.elasticsearch.common; org.elasticsearch.xpack;
2,187,975
private void resetModels() { listModel = new SortedListModel(); comboboxModel = new DefaultComboBoxModel(); cmbxMarkers.setModel( comboboxModel ); listMarkers.setModel( listModel ); }
void function() { listModel = new SortedListModel(); comboboxModel = new DefaultComboBoxModel(); cmbxMarkers.setModel( comboboxModel ); listMarkers.setModel( listModel ); }
/** * Create and set new models */
Create and set new models
resetModels
{ "repo_name": "Rubbiroid/VVIDE", "path": "src/vvide/ui/views/MarkerView.java", "license": "gpl-3.0", "size": 10425 }
[ "javax.swing.DefaultComboBoxModel" ]
import javax.swing.DefaultComboBoxModel;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,544,925
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) private void showProgress(final boolean show) { // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow // for very easy animations. If available, use these APIs to fade-in // the progress spinner. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES....
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void function(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger( android.R.integer.config_shortAnimTime);
/** * Shows the progress UI and hides the login form. */
Shows the progress UI and hides the login form
showProgress
{ "repo_name": "HumanDynamics/Bandicoot-openPDS", "path": "SocialMetadataDemo/src/edu/mit/media/socialmetadatademo/AnonymousLoginActivity.java", "license": "mit", "size": 7620 }
[ "android.annotation.TargetApi", "android.os.Build" ]
import android.annotation.TargetApi; import android.os.Build;
import android.annotation.*; import android.os.*;
[ "android.annotation", "android.os" ]
android.annotation; android.os;
1,917,015
private boolean handleLocalRemoved(final String fileName, final KeyFile keyFile) { if (keyFile == null) { return false; } boolean successful = false; // Get ClientFile from keyfile ClientFile file = keyFile.getClientFileByName(fileName); try { // Remove the file on the server boolean result = ...
boolean function(final String fileName, final KeyFile keyFile) { if (keyFile == null) { return false; } boolean successful = false; ClientFile file = keyFile.getClientFileByName(fileName); try { boolean result = encManager.removeFile(file); if (result) { keyFile.removeClientFileByName(fileName); if (encManager.updateKe...
/** * Handles a remove of a local file * * @param fileName * name of the removed file * @return whether the remove was successful or not * */
Handles a remove of a local file
handleLocalRemoved
{ "repo_name": "Fides-Storage/Client", "path": "src/main/java/org/fides/client/files/FileSyncManager.java", "license": "gpl-2.0", "size": 16423 }
[ "org.fides.client.files.data.ClientFile", "org.fides.client.files.data.KeyFile", "org.fides.client.tools.LocalHashes" ]
import org.fides.client.files.data.ClientFile; import org.fides.client.files.data.KeyFile; import org.fides.client.tools.LocalHashes;
import org.fides.client.files.data.*; import org.fides.client.tools.*;
[ "org.fides.client" ]
org.fides.client;
580,444
public void exportTable(com.cloudera.sqoop.manager.ExportJobContext context) throws IOException, ExportException { context.setConnManager(this); JdbcExportJob exportJob = new JdbcExportJob(context, null, null, ExportBatchOutputFormat.class); exportJob.runExport(); } @Override /** ...
void function(com.cloudera.sqoop.manager.ExportJobContext context) throws IOException, ExportException { context.setConnManager(this); JdbcExportJob exportJob = new JdbcExportJob(context, null, null, ExportBatchOutputFormat.class); exportJob.runExport(); } /** * {@inheritDoc}
/** * Export data stored in HDFS into a table in a database. */
Export data stored in HDFS into a table in a database
exportTable
{ "repo_name": "unicredit/zSqoop", "path": "src/java/org/apache/sqoop/manager/OracleManager.java", "license": "apache-2.0", "size": 32838 }
[ "com.cloudera.sqoop.mapreduce.ExportBatchOutputFormat", "com.cloudera.sqoop.mapreduce.JdbcExportJob", "com.cloudera.sqoop.util.ExportException", "java.io.IOException" ]
import com.cloudera.sqoop.mapreduce.ExportBatchOutputFormat; import com.cloudera.sqoop.mapreduce.JdbcExportJob; import com.cloudera.sqoop.util.ExportException; import java.io.IOException;
import com.cloudera.sqoop.mapreduce.*; import com.cloudera.sqoop.util.*; import java.io.*;
[ "com.cloudera.sqoop", "java.io" ]
com.cloudera.sqoop; java.io;
1,386,614
@Override @ValueRange(minimum=-90, maximum=90) @XmlElement(name = "southBoundLatitude", required = true) public double getSouthBoundLatitude() { return southBoundLatitude; }
@ValueRange(minimum=-90, maximum=90) @XmlElement(name = STR, required = true) double function() { return southBoundLatitude; }
/** * Returns the southern-most coordinate of the limit of the dataset extent. * The value is expressed in latitude in decimal degrees (positive north). * * @return the southern-most latitude between -90° and +90° inclusive, * or {@linkplain Double#NaN NaN} if undefined. */
Returns the southern-most coordinate of the limit of the dataset extent. The value is expressed in latitude in decimal degrees (positive north)
getSouthBoundLatitude
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java", "license": "apache-2.0", "size": 39452 }
[ "javax.xml.bind.annotation.XmlElement", "org.apache.sis.measure.ValueRange" ]
import javax.xml.bind.annotation.XmlElement; import org.apache.sis.measure.ValueRange;
import javax.xml.bind.annotation.*; import org.apache.sis.measure.*;
[ "javax.xml", "org.apache.sis" ]
javax.xml; org.apache.sis;
518,855
public void write(Iterator<?> row) throws IOException { if (row != null) { writer.write(formatter.format(row)); } writer.write(SystemInfo.LINE_SEPARATOR); }
void function(Iterator<?> row) throws IOException { if (row != null) { writer.write(formatter.format(row)); } writer.write(SystemInfo.LINE_SEPARATOR); }
/** * Writes the items in the row to the resource in DSV format. * * @param row the row * @throws IOException Signals that an I/O exception has occurred. */
Writes the items in the row to the resource in DSV format
write
{ "repo_name": "dbracewell/mango", "path": "src/main/java/com/davidbracewell/io/CSVWriter.java", "license": "apache-2.0", "size": 6400 }
[ "com.davidbracewell.SystemInfo", "java.io.IOException", "java.util.Iterator" ]
import com.davidbracewell.SystemInfo; import java.io.IOException; import java.util.Iterator;
import com.davidbracewell.*; import java.io.*; import java.util.*;
[ "com.davidbracewell", "java.io", "java.util" ]
com.davidbracewell; java.io; java.util;
47,244
public void setChannelSelection(int index, boolean b) { switch (model.getState()) { case NEW: case DISCARDED: throw new IllegalStateException( "This method can't be invoked in the DISCARDED or " + "NEW state."); } //depends on model model.setLastSettingsRef(model.getTabbedIndex()); i...
void function(int index, boolean b) { switch (model.getState()) { case NEW: case DISCARDED: throw new IllegalStateException( STR + STR); } model.setLastSettingsRef(model.getTabbedIndex()); int uiIndex = -1; if (model.getColorModel().equals(GREY_SCALE_MODEL)) { if (model.getTabbedIndex() == ImViewer.GRID_INDEX) { List<I...
/** * Implemented as specified by the {@link ImViewer} interface. * @see ImViewer#setChannelSelection(int, boolean) */
Implemented as specified by the <code>ImViewer</code> interface
setChannelSelection
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java", "license": "gpl-2.0", "size": 96803 }
[ "java.util.ArrayList", "java.util.List", "org.openmicroscopy.shoola.agents.events.iviewer.ChannelSelection" ]
import java.util.ArrayList; import java.util.List; import org.openmicroscopy.shoola.agents.events.iviewer.ChannelSelection;
import java.util.*; import org.openmicroscopy.shoola.agents.events.iviewer.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
104,586
void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx);
void enterTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx); void exitTypeArgument(@NotNull Java8Parser.TypeArgumentContext ctx);
/** * Exit a parse tree produced by {@link Java8Parser#typeArgument}. * @param ctx the parse tree */
Exit a parse tree produced by <code>Java8Parser#typeArgument</code>
exitTypeArgument
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/Java8Listener.java", "license": "gpl-3.0", "size": 95845 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
608,408
public EmailNotification withCustomEmails(List<String> customEmails) { this.customEmails = customEmails; return this; }
EmailNotification function(List<String> customEmails) { this.customEmails = customEmails; return this; }
/** * Set the customEmails value. * * @param customEmails the customEmails value to set * @return the EmailNotification object itself. */
Set the customEmails value
withCustomEmails
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-monitor/src/main/java/com/microsoft/azure/management/monitor/EmailNotification.java", "license": "mit", "size": 3001 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,095,101
public ApplicationGatewayInner withGatewayIPConfigurations(List<ApplicationGatewayIPConfigurationInner> gatewayIPConfigurations) { this.gatewayIPConfigurations = gatewayIPConfigurations; return this; }
ApplicationGatewayInner function(List<ApplicationGatewayIPConfigurationInner> gatewayIPConfigurations) { this.gatewayIPConfigurations = gatewayIPConfigurations; return this; }
/** * Set the gatewayIPConfigurations value. * * @param gatewayIPConfigurations the gatewayIPConfigurations value to set * @return the ApplicationGatewayInner object itself. */
Set the gatewayIPConfigurations value
withGatewayIPConfigurations
{ "repo_name": "herveyw/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java", "license": "mit", "size": 13782 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
105,630
public Object[][] getTableModel() { Object[][] rowsData = null; try { rowsData = new Object[this.personArray.size()][sizeOfColumns]; Iterator<Person> it = this.personArray.iterator(); int row = 0, col = 0; while (it.hasNext()) ...
Object[][] function() { Object[][] rowsData = null; try { rowsData = new Object[this.personArray.size()][sizeOfColumns]; Iterator<Person> it = this.personArray.iterator(); int row = 0, col = 0; while (it.hasNext()) { Object resuObj = it.next(); if (resuObj instanceof Person) { Person person = (Person) resuObj; rowsData...
/** * * Method to create a model. * * @return Object[][]list of objects. Is different optional to information type */
Method to create a model
getTableModel
{ "repo_name": "prowim/prowim", "path": "prowim-portal/src/org/prowim/portal/controller/knowledge/SearchPersonsController.java", "license": "gpl-3.0", "size": 4783 }
[ "java.util.Iterator", "org.prowim.datamodel.prowim.Person" ]
import java.util.Iterator; import org.prowim.datamodel.prowim.Person;
import java.util.*; import org.prowim.datamodel.prowim.*;
[ "java.util", "org.prowim.datamodel" ]
java.util; org.prowim.datamodel;
386,267
public void listen(EndPoint ep, boolean isHttp) throws IOException;
void function(EndPoint ep, boolean isHttp) throws IOException;
/** * Listen on the specified port. * @param ep EndPoint whose port to listen on. * @param isHttp specify if the port is an Http port. */
Listen on the specified port
listen
{ "repo_name": "leonhong/cassandra-dev", "path": "src/com/facebook/infrastructure/net/IMessagingService.java", "license": "apache-2.0", "size": 6450 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,532,577
public static Shell startCustomShell(String shellPath, ArrayList<String> customEnv, String baseDirectory) throws IOException { Log.d(RootCommands.TAG, "Starting Custom Shell!"); Shell shell = new Shell(shellPath, customEnv, baseDirectory); return shell; }
static Shell function(String shellPath, ArrayList<String> customEnv, String baseDirectory) throws IOException { Log.d(RootCommands.TAG, STR); Shell shell = new Shell(shellPath, customEnv, baseDirectory); return shell; }
/** * Start custom shell defined by shellPath * * @param shellPath * @param customEnv * @param baseDirectory * @return * @throws java.io.IOException */
Start custom shell defined by shellPath
startCustomShell
{ "repo_name": "0359xiaodong/turbo-editor", "path": "libraries/RootCommands/src/main/java/org/sufficientlysecure/rootcommands/Shell.java", "license": "gpl-3.0", "size": 10541 }
[ "java.io.IOException", "java.util.ArrayList", "org.sufficientlysecure.rootcommands.util.Log" ]
import java.io.IOException; import java.util.ArrayList; import org.sufficientlysecure.rootcommands.util.Log;
import java.io.*; import java.util.*; import org.sufficientlysecure.rootcommands.util.*;
[ "java.io", "java.util", "org.sufficientlysecure.rootcommands" ]
java.io; java.util; org.sufficientlysecure.rootcommands;
520,563
@Deprecated public List getOverflowList(int userView) { return Collections.emptyList(); }
List function(int userView) { return Collections.emptyList(); }
/** * Gets the overflow list. * * @param userView the user view * @return the overflow list * @deprecated */
Gets the overflow list
getOverflowList
{ "repo_name": "atcult/mod-cataloging", "path": "src/main/java/org/folio/marccat/dao/persistence/BibliographicNoteTag.java", "license": "apache-2.0", "size": 14316 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,837,593
public void validate(Object obj, Errors errors) { FieldType fieldType = (FieldType) obj; if (fieldType == null) { errors.rejectValue("fieldType", "error.general"); } else { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "error.name"); if (!errors.hasErrors()) { FieldType exist = Context...
void function(Object obj, Errors errors) { FieldType fieldType = (FieldType) obj; if (fieldType == null) { errors.rejectValue(STR, STR); } else { ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", STR); if (!errors.hasErrors()) { FieldType exist = Context.getFormService().getFieldTypeByName(fieldType.getName());...
/** * Checks the form object for any inconsistencies/errors * * @see org.springframework.validation.Validator#validate(java.lang.Object, * org.springframework.validation.Errors) * @should fail validation if name is null or empty or whitespace * @should pass validation if all required fields have prope...
Checks the form object for any inconsistencies/errors
validate
{ "repo_name": "Winbobob/openmrs-core", "path": "api/src/main/java/org/openmrs/validator/FieldTypeValidator.java", "license": "mpl-2.0", "size": 2433 }
[ "org.openmrs.FieldType", "org.openmrs.api.context.Context", "org.openmrs.util.OpenmrsUtil", "org.springframework.validation.Errors", "org.springframework.validation.ValidationUtils" ]
import org.openmrs.FieldType; import org.openmrs.api.context.Context; import org.openmrs.util.OpenmrsUtil; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils;
import org.openmrs.*; import org.openmrs.api.context.*; import org.openmrs.util.*; import org.springframework.validation.*;
[ "org.openmrs", "org.openmrs.api", "org.openmrs.util", "org.springframework.validation" ]
org.openmrs; org.openmrs.api; org.openmrs.util; org.springframework.validation;
393,621
public void open() { super.open(); // avoid concurrency call. synchronized (this) { if (!mIsReady && !mIsOpening && (null != mMetadata) && (null != mHandlerThread)) { mIsOpening = true; Log.e(LOG_TAG, "Open the store."); // creat...
void function() { super.open(); synchronized (this) { if (!mIsReady && !mIsOpening && (null != mMetadata) && (null != mHandlerThread)) { mIsOpening = true; Log.e(LOG_TAG, STR); if (null == mFileStoreHandler) { try { mHandlerThread.start(); } catch (IllegalThreadStateException e) { Log.e(LOG_TAG, STR); return; } mFileSt...
/** * Open the store. */
Open the store
open
{ "repo_name": "Nehasing/Nehachat", "path": "matrix-sdk/src/main/java/org/matrix/androidsdk/data/MXFileStore.java", "license": "apache-2.0", "size": 44971 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,512,380
public byte[] encodePubKey(KeyParams keyParams, FullPolynomial h) { PubKeyFormatter_PUBLIC_KEY_v1 formatter = new PubKeyFormatter_PUBLIC_KEY_v1(); return formatter.encode(keyParams, h); }
byte[] function(KeyParams keyParams, FullPolynomial h) { PubKeyFormatter_PUBLIC_KEY_v1 formatter = new PubKeyFormatter_PUBLIC_KEY_v1(); return formatter.encode(keyParams, h); }
/** * Encode a public key as a byte array. */
Encode a public key as a byte array
encodePubKey
{ "repo_name": "TGX-ZQ/Z-Queen", "path": "src/main/third-party-source/com/securityinnovation/jNeo/ntruencrypt/encoder/NtruEncryptKeyNativeEncoder.java", "license": "mit", "size": 4210 }
[ "com.securityinnovation.jNeo.math.FullPolynomial", "com.securityinnovation.jNeo.ntruencrypt.KeyParams" ]
import com.securityinnovation.jNeo.math.FullPolynomial; import com.securityinnovation.jNeo.ntruencrypt.KeyParams;
import com.securityinnovation.*;
[ "com.securityinnovation" ]
com.securityinnovation;
27,879
public void segmentate(){ PlayerDetector playerDetector = new PlayerDetector(); playerDetector.Detect(this.frames); ArrayList<Mat> playerFrames = playerDetector.getProcessedPlayers(); SoccerFieldDetector fieldDetector = new SoccerFieldDetector(); fieldDetector.Detect(this.frames); ArrayLis...
void function(){ PlayerDetector playerDetector = new PlayerDetector(); playerDetector.Detect(this.frames); ArrayList<Mat> playerFrames = playerDetector.getProcessedPlayers(); SoccerFieldDetector fieldDetector = new SoccerFieldDetector(); fieldDetector.Detect(this.frames); ArrayList<Mat> fieldFrames = fieldDetector.getP...
/** * Segmentates the players of the video. * * */
Segmentates the players of the video
segmentate
{ "repo_name": "SethStalley/IC6831-Project1", "path": "Implementation/Source Code/backend/complete/src/main/java/teamidentifier/Video.java", "license": "mit", "size": 3175 }
[ "java.util.ArrayList", "org.opencv.core.Mat" ]
import java.util.ArrayList; import org.opencv.core.Mat;
import java.util.*; import org.opencv.core.*;
[ "java.util", "org.opencv.core" ]
java.util; org.opencv.core;
100,661
BoundingBoxType getBoundingBoxData();
BoundingBoxType getBoundingBoxData();
/** * Returns the value of the '<em><b>Bounding Box Data</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Identifies this input or output data as an ows:BoundingBox data structure, and provides that ows:BoundingBox data. * <!-- end-model...
Returns the value of the 'Bounding Box Data' containment reference. Identifies this input or output data as an ows:BoundingBox data structure, and provides that ows:BoundingBox data.
getBoundingBoxData
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wps/src/net/opengis/wps10/DataType.java", "license": "lgpl-2.1", "size": 4504 }
[ "net.opengis.ows11.BoundingBoxType" ]
import net.opengis.ows11.BoundingBoxType;
import net.opengis.ows11.*;
[ "net.opengis.ows11" ]
net.opengis.ows11;
2,795,328
public void setStatus(int value) throws InvalidHeaderValueException { mPduHeaders.setOctet(value, PduHeaders.STATUS); }
void function(int value) throws InvalidHeaderValueException { mPduHeaders.setOctet(value, PduHeaders.STATUS); }
/** * Set Status value. * * @param value the value * @throws InvalidHeaderValueException if the value is invalid. */
Set Status value
setStatus
{ "repo_name": "ccard/NoDrunkTexting", "path": "src/com/google/android/mms/pdu/DeliveryInd.java", "license": "gpl-2.0", "size": 3674 }
[ "com.google.android.mms.InvalidHeaderValueException" ]
import com.google.android.mms.InvalidHeaderValueException;
import com.google.android.mms.*;
[ "com.google.android" ]
com.google.android;
359,213
public TreeMap<Double, List<String>> enumerate(String notation, int depth) { TreeMap<Double, List<String>> massToSmiles = new TreeMap<>(); BufferedInputStream bufStream = null; try { List<String> commands = new ArrayList<>(); commands.add(executable); co...
TreeMap<Double, List<String>> function(String notation, int depth) { TreeMap<Double, List<String>> massToSmiles = new TreeMap<>(); BufferedInputStream bufStream = null; try { List<String> commands = new ArrayList<>(); commands.add(executable); commands.add(notation); commands.add(depth + STRfragonlySTR\\sSTRexpectingST...
/** * Executes the Backtracker binary using the parameters defined by the parameter map. * * @param notation the molecule line notation * @param depth the depth * @return the resulting mass to SMILES map */
Executes the Backtracker binary using the parameters defined by the parameter map
enumerate
{ "repo_name": "tomas-pluskal/masscascade", "path": "MassCascadeReference/src/main/java/uk/ac/ebi/masscascade/msn/MsnEnumerator.java", "license": "gpl-3.0", "size": 7748 }
[ "java.io.BufferedInputStream", "java.util.ArrayList", "java.util.List", "java.util.TreeMap", "uk.ac.ebi.masscascade.utilities.TextUtils" ]
import java.io.BufferedInputStream; import java.util.ArrayList; import java.util.List; import java.util.TreeMap; import uk.ac.ebi.masscascade.utilities.TextUtils;
import java.io.*; import java.util.*; import uk.ac.ebi.masscascade.utilities.*;
[ "java.io", "java.util", "uk.ac.ebi" ]
java.io; java.util; uk.ac.ebi;
766,108
private MiBandSupport pair(TransactionBuilder transaction) { LOG.info("Attempting to pair MI device..."); BluetoothGattCharacteristic characteristic = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_PAIR); if (characteristic != null) { transaction.write(characteristic, new by...
MiBandSupport function(TransactionBuilder transaction) { LOG.info(STR); BluetoothGattCharacteristic characteristic = getCharacteristic(MiBandService.UUID_CHARACTERISTIC_PAIR); if (characteristic != null) { transaction.write(characteristic, new byte[]{2}); } else { LOG.info(STR); } return this; }
/** * Part of device initialization process. Do not call manually. * * @param transaction * @return */
Part of device initialization process. Do not call manually
pair
{ "repo_name": "danielegobbetti/Gadgetbridge", "path": "app/src/main/java/nodomain/freeyourgadget/gadgetbridge/miband/MiBandSupport.java", "license": "agpl-3.0", "size": 32334 }
[ "android.bluetooth.BluetoothGattCharacteristic" ]
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.*;
[ "android.bluetooth" ]
android.bluetooth;
471,266
@MatchRule("(Not (Xor value1 value2))") @MatchRule("(Xor value1 (Not value2))") @MatchRule("(Xor (Not value1) value2)") public ComplexMatchResult bitwiseNotXor(ValueNode value1, ValueNode value2) { return builder -> { Value a = operand(value1); Value b = operand(value2); ...
@MatchRule(STR) @MatchRule(STR) @MatchRule(STR) ComplexMatchResult function(ValueNode value1, ValueNode value2) { return builder -> { Value a = operand(value1); Value b = operand(value2); LIRKind resultKind = LIRKind.combine(a, b); return getArithmeticLIRGenerator().emitBinary(resultKind, AArch64ArithmeticOp.EON, true,...
/** * Goal: Use AArch64's bitwise exclusive or not (eon) instruction. * * Note that !(A^B) == (!A)^B == A^(!B). */
Goal: Use AArch64's bitwise exclusive or not (eon) instruction. Note that !(A^B) == (!A)^B == A^(!B)
bitwiseNotXor
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java", "license": "gpl-2.0", "size": 42516 }
[ "org.graalvm.compiler.core.common.LIRKind", "org.graalvm.compiler.core.match.ComplexMatchResult", "org.graalvm.compiler.core.match.MatchRule", "org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp", "org.graalvm.compiler.nodes.ValueNode" ]
import org.graalvm.compiler.core.common.LIRKind; import org.graalvm.compiler.core.match.ComplexMatchResult; import org.graalvm.compiler.core.match.MatchRule; import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticOp; import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.core.common.*; import org.graalvm.compiler.core.match.*; import org.graalvm.compiler.lir.aarch64.*; import org.graalvm.compiler.nodes.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
2,171,400
public Map<byte [], List<KeyValue>> getFamilyMap() { return this.familyMap; }
Map<byte [], List<KeyValue>> function() { return this.familyMap; }
/** * Method for retrieving the put's familyMap * @return familyMap */
Method for retrieving the put's familyMap
getFamilyMap
{ "repo_name": "adragomir/hbaseindex", "path": "src/java/org/apache/hadoop/hbase/client/Put.java", "license": "apache-2.0", "size": 10502 }
[ "java.util.List", "java.util.Map", "org.apache.hadoop.hbase.KeyValue" ]
import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.KeyValue;
import java.util.*; import org.apache.hadoop.hbase.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,420,273
@Override public void write( byte[] b) throws IOException { if (_found_header) { _out.write(b, 0, b.length); } else { int i = 0; while (!_found_header && i < b.length) { write(b[i++]); } _out.write(b, i, b.length...
void function( byte[] b) throws IOException { if (_found_header) { _out.write(b, 0, b.length); } else { int i = 0; while (!_found_header && i < b.length) { write(b[i++]); } _out.write(b, i, b.length - i); } }
/** * Write out the byte array, first stripping a two line header * if it has not already been found and removed. * * NB: IJ Idea suggested adding @NotNull to qualify the byte[] b but * doing so break the ant build (it works fine in the IDE). See the * above comment. jhrg 3/11/15 * ...
Write out the byte array, first stripping a two line header if it has not already been found and removed. doing so break the ant build (it works fine in the IDE). See the above comment. jhrg 3/11/15
write
{ "repo_name": "OPENDAP/olfs", "path": "src/opendap/aggregation/FilterAsciiHeaderStream.java", "license": "lgpl-2.1", "size": 5870 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,231,094
public static void putGraphicalUserAuthenticationImage(final RequestContext requestContext, final String image) { requestContext.getFlowScope().put("guaUserImage", image); }
static void function(final RequestContext requestContext, final String image) { requestContext.getFlowScope().put(STR, image); }
/** * Put graphical user authentication image. * * @param requestContext the request context * @param image the image */
Put graphical user authentication image
putGraphicalUserAuthenticationImage
{ "repo_name": "apereo/cas", "path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 71894 }
[ "org.springframework.webflow.execution.RequestContext" ]
import org.springframework.webflow.execution.RequestContext;
import org.springframework.webflow.execution.*;
[ "org.springframework.webflow" ]
org.springframework.webflow;
325,109
public TextView setText(final int id, final CharSequence content) { final TextView text = find(id); text.setText(content); return text; }
TextView function(final int id, final CharSequence content) { final TextView text = find(id); text.setText(content); return text; }
/** * Set text of child view with given id * * @param id * @param content * @return text view */
Set text of child view with given id
setText
{ "repo_name": "soarcn/COCO-Accessory", "path": "views/src/main/java/com/cocosw/accessory/views/ViewFinder.java", "license": "apache-2.0", "size": 7366 }
[ "android.widget.TextView" ]
import android.widget.TextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
528,056
protected void checkLinearizedDictionary(PreflightContext ctx, COSDictionary linearizedDict) { // ---- check if all keys are authorized in a linearized dictionary // ---- Linearized dictionary must contain the lhoent keys boolean l = linearizedDict.getItem(COSName.L) != null; boo...
void function(PreflightContext ctx, COSDictionary linearizedDict) { boolean l = linearizedDict.getItem(COSName.L) != null; boolean h = linearizedDict.getItem(COSName.H) != null; boolean o = linearizedDict.getItem(COSName.O) != null; boolean e = linearizedDict.getItem(COSName.E) != null; boolean n = linearizedDict.getIt...
/** * Check if mandatory keys of linearized dictionary are present. * * @param ctx the preflight context. * @param linearizedDict the linearization dictionary. */
Check if mandatory keys of linearized dictionary are present
checkLinearizedDictionary
{ "repo_name": "apache/pdfbox", "path": "preflight/src/main/java/org/apache/pdfbox/preflight/process/TrailerValidationProcess.java", "license": "apache-2.0", "size": 12145 }
[ "org.apache.pdfbox.cos.COSDictionary", "org.apache.pdfbox.cos.COSName", "org.apache.pdfbox.preflight.PreflightConstants", "org.apache.pdfbox.preflight.PreflightContext", "org.apache.pdfbox.preflight.ValidationResult" ]
import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.preflight.PreflightConstants; import org.apache.pdfbox.preflight.PreflightContext; import org.apache.pdfbox.preflight.ValidationResult;
import org.apache.pdfbox.cos.*; import org.apache.pdfbox.preflight.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,832,735
public void setPassword(final String password) { registry.put(Constants.CONNECTION_PASSWORD, password); }
void function(final String password) { registry.put(Constants.CONNECTION_PASSWORD, password); }
/** * Set the password of the openmrs server. * * @param password the password of the openmrs server. */
Set the password of the openmrs server
setPassword
{ "repo_name": "mssavai/muzima-api", "path": "src/main/java/com/muzima/api/config/Configuration.java", "license": "mpl-2.0", "size": 3004 }
[ "com.muzima.util.Constants" ]
import com.muzima.util.Constants;
import com.muzima.util.*;
[ "com.muzima.util" ]
com.muzima.util;
1,711,161
auth.requireView(); List<ClientTemplateRepresentation> rep = new ArrayList<>(); List<ClientTemplateModel> clientModels = realm.getClientTemplates(); boolean view = auth.hasView(); for (ClientTemplateModel clientModel : clientModels) { if (view) { rep.add(Mod...
auth.requireView(); List<ClientTemplateRepresentation> rep = new ArrayList<>(); List<ClientTemplateModel> clientModels = realm.getClientTemplates(); boolean view = auth.hasView(); for (ClientTemplateModel clientModel : clientModels) { if (view) { rep.add(ModelToRepresentation.toRepresentation(clientModel)); } else { Cl...
/** * Get client templates belonging to the realm * * Returns a list of client templates belonging to the realm */
Get client templates belonging to the realm Returns a list of client templates belonging to the realm
getClientTemplates
{ "repo_name": "manuel-palacio/keycloak", "path": "services/src/main/java/org/keycloak/services/resources/admin/ClientTemplatesResource.java", "license": "apache-2.0", "size": 4998 }
[ "java.util.ArrayList", "java.util.List", "org.keycloak.models.ClientTemplateModel", "org.keycloak.models.utils.ModelToRepresentation", "org.keycloak.representations.idm.ClientTemplateRepresentation" ]
import java.util.ArrayList; import java.util.List; import org.keycloak.models.ClientTemplateModel; import org.keycloak.models.utils.ModelToRepresentation; import org.keycloak.representations.idm.ClientTemplateRepresentation;
import java.util.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*;
[ "java.util", "org.keycloak.models", "org.keycloak.representations" ]
java.util; org.keycloak.models; org.keycloak.representations;
1,989,292
boolean containsEntry(@Nullable Object key, @Nullable Object value); // Modification Operations
boolean containsEntry(@Nullable Object key, @Nullable Object value);
/** * Returns {@code true} if this multimap contains at least one key-value pair * with the key {@code key} and the value {@code value}. */
Returns true if this multimap contains at least one key-value pair with the key key and the value value
containsEntry
{ "repo_name": "trivium-io/trivium-core", "path": "src/io/trivium/dep/com/google/common/collect/Multimap.java", "license": "apache-2.0", "size": 15001 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,560,362
protected void addInput__iInitialConditionsPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_CtrlUnit54_Input__iInitialConditions_feature"), g...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), WTSpecPackage.Literals.CTRL_UNIT54__INPUT_IINITIAL_CONDITIONS, true, false, true, null, null, nul...
/** * This adds a property descriptor for the Input iInitial Conditions feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Input iInitial Conditions feature.
addInput__iInitialConditionsPropertyDescriptor
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/mondo-access-control/CollaborationIncQuery/WTSpec.edit/src/WTSpec/provider/CtrlUnit54ItemProvider.java", "license": "epl-1.0", "size": 8823 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,880,927
private CorporateDirectives publish(String workspaceID, Session session) throws DeepaMehtaException { String workspaceName = cm.getTopic(workspaceID, 1).getName(); Vector users = as.workgroupMembers(workspaceID); boolean isFirstPublishing = as.getOriginWorkspace(getID()) == null; String notifyText = isFirstP...
CorporateDirectives function(String workspaceID, Session session) throws DeepaMehtaException { String workspaceName = cm.getTopic(workspaceID, 1).getName(); Vector users = as.workgroupMembers(workspaceID); boolean isFirstPublishing = as.getOriginWorkspace(getID()) == null; String notifyText = isFirstPublishing ? STRSTR...
/** * Returns the client directives for publishing this topicmap to the specified workspace. * * @see #executeCommand */
Returns the client directives for publishing this topicmap to the specified workspace
publish
{ "repo_name": "mukil/deepamehta2", "path": "develop/src/de/deepamehta/topics/TopicMapTopic.java", "license": "gpl-3.0", "size": 48623 }
[ "de.deepamehta.DeepaMehtaException", "de.deepamehta.service.CorporateDirectives", "de.deepamehta.service.Session", "java.util.Vector" ]
import de.deepamehta.DeepaMehtaException; import de.deepamehta.service.CorporateDirectives; import de.deepamehta.service.Session; import java.util.Vector;
import de.deepamehta.*; import de.deepamehta.service.*; import java.util.*;
[ "de.deepamehta", "de.deepamehta.service", "java.util" ]
de.deepamehta; de.deepamehta.service; java.util;
1,191,226