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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testDomainAsString() {
System.out.println("domainAsString");
ParameterSpec instance = new ParameterSpec("D:10..20");
String result = instance.domainAsString();
assertEquals(result, "10..20");
} | void function() { System.out.println(STR); ParameterSpec instance = new ParameterSpec(STR); String result = instance.domainAsString(); assertEquals(result, STR); } | /**
* Test of domainAsString method, of class ParameterSpec.
*/ | Test of domainAsString method, of class ParameterSpec | testDomainAsString | {
"repo_name": "bengtmartensson/IrpTransmogrifier",
"path": "src/test/java/org/harctoolbox/irp/ParameterSpecNGTest.java",
"license": "gpl-3.0",
"size": 6726
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 1,367,764 |
@RequestMapping(value = "/{id}/tags", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseStatus(HttpStatus.NO_CONTENT)
public void addTagsForApplication(
@PathVariable("id") final String id,
@RequestBody final Set<String> tags
) throws GenieException {
... | @RequestMapping(value = STR, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(HttpStatus.NO_CONTENT) void function( @PathVariable("id") final String id, @RequestBody final Set<String> tags ) throws GenieException { log.debug(STR, id, tags); this.applicationService.addTagsForAppl... | /**
* Add new tags to a given application.
*
* @param id The id of the application to add the tags to. Not
* null/empty/blank.
* @param tags The tags to add. Not null/empty/blank.
* @throws GenieException For any error
*/ | Add new tags to a given application | addTagsForApplication | {
"repo_name": "ajoymajumdar/genie",
"path": "genie-web/src/main/java/com/netflix/genie/web/controllers/ApplicationRestController.java",
"license": "apache-2.0",
"size": 20549
} | [
"com.netflix.genie.common.exceptions.GenieException",
"java.util.Set",
"org.springframework.http.HttpStatus",
"org.springframework.http.MediaType",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.Requ... | import com.netflix.genie.common.exceptions.GenieException; import java.util.Set; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.... | import com.netflix.genie.common.exceptions.*; import java.util.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"com.netflix.genie",
"java.util",
"org.springframework.http",
"org.springframework.web"
] | com.netflix.genie; java.util; org.springframework.http; org.springframework.web; | 2,357,273 |
boolean isFixedSampleSize();
}
static final class StszSampleSizeBox implements SampleSizeBox {
private final int fixedSampleSize;
private final int sampleCount;
private final ParsableByteArray data;
public StszSampleSizeBox(Atom.LeafAtom stszAtom) {
data = stszAtom.data;
data... | boolean isFixedSampleSize(); } static final class StszSampleSizeBox implements SampleSizeBox { private final int fixedSampleSize; private final int sampleCount; private final ParsableByteArray data; public StszSampleSizeBox(Atom.LeafAtom stszAtom) { data = stszAtom.data; data.setPosition(Atom.FULL_HEADER_SIZE); fixedSa... | /**
* Returns whether samples have a fixed size.
*/ | Returns whether samples have a fixed size | isFixedSampleSize | {
"repo_name": "saki4510t/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java",
"license": "apache-2.0",
"size": 64868
} | [
"com.google.android.exoplayer2.util.ParsableByteArray"
] | import com.google.android.exoplayer2.util.ParsableByteArray; | import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 1,834,962 |
public URI conventionVersion(final UniqueId conventionId) {
return WebConventionVersionResource.uri(_data, conventionId);
} | URI function(final UniqueId conventionId) { return WebConventionVersionResource.uri(_data, conventionId); } | /**
* Gets the URI.
* @param conventionId the convention id, not null
* @return the URI
*/ | Gets the URI | conventionVersion | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Web/src/main/java/com/opengamma/web/convention/WebConventionUris.java",
"license": "apache-2.0",
"size": 1746
} | [
"com.opengamma.id.UniqueId"
] | import com.opengamma.id.UniqueId; | import com.opengamma.id.*; | [
"com.opengamma.id"
] | com.opengamma.id; | 708,351 |
public void setObjectLevelAllowedValidation(Validation objectLevelAllowedValidation) {
this.objectLevelAllowedValidation = objectLevelAllowedValidation;
} | void function(Validation objectLevelAllowedValidation) { this.objectLevelAllowedValidation = objectLevelAllowedValidation; } | /**
* Sets the objectLevelAllowedValidation attribute value.
*
* @param objectLevelAllowedValidation The objectLevelAllowedValidation to set.
*/ | Sets the objectLevelAllowedValidation attribute value | setObjectLevelAllowedValidation | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/sys/document/validation/impl/AccountingLineValuesAllowedValidationHutch.java",
"license": "agpl-3.0",
"size": 13873
} | [
"org.kuali.kfs.sys.document.validation.Validation"
] | import org.kuali.kfs.sys.document.validation.Validation; | import org.kuali.kfs.sys.document.validation.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 849,760 |
private Map < String, String > generateConverterClasses(
String xmlSchemaSource, String targetPackageName) {
log.debug("Converter support classes generation started");
Map < String, String > codeMap = xsd2CobolTypes.generate(
new StringReader(xmlSchemaSource), targetPack... | Map < String, String > function( String xmlSchemaSource, String targetPackageName) { log.debug(STR); Map < String, String > codeMap = xsd2CobolTypes.generate( new StringReader(xmlSchemaSource), targetPackageName); if (log.isDebugEnabled()) { log.debug(STR); for (String code : codeMap.values()) { log.debug(code); log.de... | /**
* Produce the LegStar converter support classes.
*
* @param xmlSchemaSource the XML schema source
* @param targetPackageName the target Avro package name
* @return a map of lass names associated with their code
*/ | Produce the LegStar converter support classes | generateConverterClasses | {
"repo_name": "legsem/legstar.avro",
"path": "legstar.avro.generator/src/main/java/com/legstar/avro/generator/Cob2AvroGenerator.java",
"license": "agpl-3.0",
"size": 10521
} | [
"java.io.StringReader",
"java.util.Map"
] | import java.io.StringReader; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,820,175 |
public static File imagesDir() {
lock.readLock().lock();
try {
return (images_dir != null) ? images_dir : new File(dataDir(),
DEFAULT_DIR_NAME_IMAGES);
} finally {
lock.readLock().unlock();
}
} | static File function() { lock.readLock().lock(); try { return (images_dir != null) ? images_dir : new File(dataDir(), DEFAULT_DIR_NAME_IMAGES); } finally { lock.readLock().unlock(); } } | /**
* Return the configured images directory, if set, otherwise return the
* default path, relative to the configured data directory.
*
* @return {@link File} containing the path to the images directory.
*/ | Return the configured images directory, if set, otherwise return the default path, relative to the configured data directory | imagesDir | {
"repo_name": "chvink/kilomek",
"path": "megamek/src/megamek/common/Configuration.java",
"license": "gpl-3.0",
"size": 16433
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,575,764 |
@Override
public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx,
Object... nodeOutputs) throws SemanticException {
ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx;
ExprNodeColumnDesc colref = (ExprNodeColumnDesc) nd;
RowSchema toRS = ctx.getOp().getSchema();
Op... | Object function(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ExprWalkerInfo ctx = (ExprWalkerInfo) procCtx; ExprNodeColumnDesc colref = (ExprNodeColumnDesc) nd; RowSchema toRS = ctx.getOp().getSchema(); Operator<? extends OperatorDesc> op = ctx.getOp(); ColumnI... | /**
* Converts the reference from child row resolver to current row resolver.
*/ | Converts the reference from child row resolver to current row resolver | process | {
"repo_name": "alanfgates/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/ppd/ExprWalkerProcFactory.java",
"license": "apache-2.0",
"size": 15045
} | [
"java.util.Stack",
"org.apache.hadoop.hive.ql.exec.ColumnInfo",
"org.apache.hadoop.hive.ql.exec.GroupByOperator",
"org.apache.hadoop.hive.ql.exec.Operator",
"org.apache.hadoop.hive.ql.exec.RowSchema",
"org.apache.hadoop.hive.ql.lib.Node",
"org.apache.hadoop.hive.ql.lib.NodeProcessorCtx",
"org.apache.h... | import java.util.Stack; import org.apache.hadoop.hive.ql.exec.ColumnInfo; import org.apache.hadoop.hive.ql.exec.GroupByOperator; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.RowSchema; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.lib.NodeProcessorC... | import java.util.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.lib.*; import org.apache.hadoop.hive.ql.parse.*; import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.hive.ql.ppd.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,210,807 |
public void changeCursor(Cursor cursor) {
Cursor old = swapCursor(cursor);
if (old != null) {
old.close();
}
} | void function(Cursor cursor) { Cursor old = swapCursor(cursor); if (old != null) { old.close(); } } | /**
* Change the underlying cursor to a new cursor. If there is an existing cursor it will be
* closed.
*/ | Change the underlying cursor to a new cursor. If there is an existing cursor it will be closed | changeCursor | {
"repo_name": "SopraCovoit/AndroidApp",
"path": "app/src/main/java/wtf/sur/original/puissante/rapide/automobile/sopracovoit/covoit/CovoitUsersRecyclerViewAdapter.java",
"license": "apache-2.0",
"size": 8377
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 2,891,645 |
public static GamaUIColor get(final GamaIcon icon) {
final Image image = icon.image();
final ImageData data = image.getImageData();
final PaletteData palette = data.palette;
final int pixelValue = data.getPixel(0, 0);
return get(palette.getRGB(pixelValue));
} | static GamaUIColor function(final GamaIcon icon) { final Image image = icon.image(); final ImageData data = image.getImageData(); final PaletteData palette = data.palette; final int pixelValue = data.getPixel(0, 0); return get(palette.getRGB(pixelValue)); } | /**
* Get the color of the icon passed in parameter (supposing it's mono-colored)
*
* @param create
* @return
*/ | Get the color of the icon passed in parameter (supposing it's mono-colored) | get | {
"repo_name": "gama-platform/gama.cloud",
"path": "ummisco.gama.ui.shared_web/src/ummisco/gama/ui/resources/GamaColors.java",
"license": "agpl-3.0",
"size": 7981
} | [
"org.eclipse.swt.graphics.Image",
"org.eclipse.swt.graphics.ImageData",
"org.eclipse.swt.graphics.PaletteData"
] | import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.PaletteData; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,092,555 |
@Test
@SmallTest
public void testLaunchWebApk_BypassIntentPicker() {
mDelegate.add(new IntentActivity(WEBAPK_SCOPE, WEBAPK_PACKAGE_NAME));
checkUrl(WEBAPK_SCOPE)
.expecting(
OverrideUrlLoadingResultType.OVERRIDE_WITH_EXTERNAL_INTENT, START_WEBAPK);
... | void function() { mDelegate.add(new IntentActivity(WEBAPK_SCOPE, WEBAPK_PACKAGE_NAME)); checkUrl(WEBAPK_SCOPE) .expecting( OverrideUrlLoadingResultType.OVERRIDE_WITH_EXTERNAL_INTENT, START_WEBAPK); } | /**
* Test that tapping a link which falls solely in the scope of a WebAPK launches a WebAPK
* without showing the intent picker.
*/ | Test that tapping a link which falls solely in the scope of a WebAPK launches a WebAPK without showing the intent picker | testLaunchWebApk_BypassIntentPicker | {
"repo_name": "chromium/chromium",
"path": "components/external_intents/android/javatests/src/org/chromium/components/external_intents/ExternalNavigationHandlerTest.java",
"license": "bsd-3-clause",
"size": 138530
} | [
"org.chromium.components.external_intents.ExternalNavigationHandler"
] | import org.chromium.components.external_intents.ExternalNavigationHandler; | import org.chromium.components.external_intents.*; | [
"org.chromium.components"
] | org.chromium.components; | 623,147 |
public Collection<LamiChartModel> getPredefinedViews() {
return fPredefinedViews;
} | Collection<LamiChartModel> function() { return fPredefinedViews; } | /**
* Get the pre-defined views of this table.
*
* @return The predefined views
*/ | Get the pre-defined views of this table | getPredefinedViews | {
"repo_name": "alexmonthy/lttng-scope",
"path": "lttng-scope/src/main/java/org/lttng/scope/lami/module/LamiTableClass.java",
"license": "epl-1.0",
"size": 3356
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,735,142 |
@Deprecated
public B forJsonSchema(TableSchema jsonSchema) {
this.jsonSchema = jsonSchema;
return builder();
} | B function(TableSchema jsonSchema) { this.jsonSchema = jsonSchema; return builder(); } | /**
* Sets the schema of the JSON-encoded Kafka messages.
* If not set, the JSON messages are decoded with the table schema.
*
* @param jsonSchema The schema of the JSON-encoded Kafka messages.
* @return The builder.
* @deprecated Use table descriptors instead of implementation-specific builders.
*... | Sets the schema of the JSON-encoded Kafka messages. If not set, the JSON messages are decoded with the table schema | forJsonSchema | {
"repo_name": "yew1eb/flink",
"path": "flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/KafkaJsonTableSource.java",
"license": "apache-2.0",
"size": 6930
} | [
"org.apache.flink.table.api.TableSchema"
] | import org.apache.flink.table.api.TableSchema; | import org.apache.flink.table.api.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,891,122 |
public synchronized void connect(String connect, Properties props) throws RpcException {
if (connected) {
return;
}
properties = DrillProperties.createFromProperties(props);
final List<DrillbitEndpoint> endpoints = new ArrayList<>();
if (isDirectConnection) {
// Populate the endpoint... | synchronized void function(String connect, Properties props) throws RpcException { if (connected) { return; } properties = DrillProperties.createFromProperties(props); final List<DrillbitEndpoint> endpoints = new ArrayList<>(); if (isDirectConnection) { endpoints.addAll(parseAndVerifyEndpoints(properties.getProperty(Dr... | /**
* Start's a connection from client to server
* @param connect - Zookeeper connection string provided at connection URL
* @param props - not null {@link Properties} filled with connection url parameters
* @throws RpcException
*/ | Start's a connection from client to server | connect | {
"repo_name": "arina-ielchiieva/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/client/DrillClient.java",
"license": "apache-2.0",
"size": 36520
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Properties",
"org.apache.drill.common.config.DrillProperties",
"org.apache.drill.exec.ExecConstants",
"org.apache.drill.exec.coord.zk.ZKClusterCoordinator",
"org.apache.drill.exec.proto.CoordinationProtos",
"org.apache.dril... | import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Properties; import org.apache.drill.common.config.DrillProperties; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.coord.zk.ZKClusterCoordinator; import org.apache.drill.exec.proto.CoordinationProt... | import java.util.*; import org.apache.drill.common.config.*; import org.apache.drill.exec.*; import org.apache.drill.exec.coord.zk.*; import org.apache.drill.exec.proto.*; import org.apache.drill.exec.rpc.*; import org.apache.drill.shaded.guava.com.google.common.base.*; | [
"java.util",
"org.apache.drill"
] | java.util; org.apache.drill; | 2,077,251 |
private synchronized boolean syncGroups(Object item, boolean keyOrValue, boolean addOrRemove) {
boolean result = false;
Set<String> groupSet = (keyOrValue == KEYS) ? knownGroupNamesFromKeys : knownGroupNamesFromValues;
// only sync if the group list has been instantiated
if (groupSet... | synchronized boolean function(Object item, boolean keyOrValue, boolean addOrRemove) { boolean result = false; Set<String> groupSet = (keyOrValue == KEYS) ? knownGroupNamesFromKeys : knownGroupNamesFromValues; if (groupSet != null) { Group group = Group.resolveFrom(item); if (group != null) { result = true; if (addOrRem... | /**
* This method is called from several of the mutators to keep
* the group set in sync with the keys in the map.
*
* @param item The item to be added or removed if it is in the group set
* @param keyOrValue True for keys, false for values
* @param addOrRemove True to add, false to remo... | This method is called from several of the mutators to keep the group set in sync with the keys in the map | syncGroups | {
"repo_name": "speedy01/Openfire",
"path": "xmppserver/src/main/java/org/jivesoftware/openfire/group/ConcurrentGroupMap.java",
"license": "apache-2.0",
"size": 10737
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,570,413 |
public void setContentType(final String ctString) {
Header h = null;
if (ctString != null) {
h = new BasicHeader(HTTP.CONTENT_TYPE, ctString);
}
setContentType(h);
} | void function(final String ctString) { Header h = null; if (ctString != null) { h = new BasicHeader(HTTP.CONTENT_TYPE, ctString); } setContentType(h); } | /**
* Specifies the Content-Type header, as a string.
* The default implementation calls
* {@link #setContentType(Header) setContentType(Header)}.
*
* @param ctString the new Content-Type header, or
* {@code null} to unset
*/ | Specifies the Content-Type header, as a string. The default implementation calls <code>#setContentType(Header) setContentType(Header)</code> | setContentType | {
"repo_name": "kalikov/lighthouse",
"path": "app/src/main/java/ru/radiomayak/http/entity/AbstractHttpEntity.java",
"license": "apache-2.0",
"size": 6295
} | [
"ru.radiomayak.http.Header",
"ru.radiomayak.http.message.BasicHeader"
] | import ru.radiomayak.http.Header; import ru.radiomayak.http.message.BasicHeader; | import ru.radiomayak.http.*; import ru.radiomayak.http.message.*; | [
"ru.radiomayak.http"
] | ru.radiomayak.http; | 2,101,753 |
@NonNull
static StatusDevice get(@NonNull Context context) {
synchronized (sLock) {
if (sInstance == null) {
sInstance = new StatusDevice(context);
}
return sInstance;
}
} | static StatusDevice get(@NonNull Context context) { synchronized (sLock) { if (sInstance == null) { sInstance = new StatusDevice(context); } return sInstance; } } | /**
* Creates a single instance of the device status to avoid multiple receivers
* from being registered.
*
* @param context The context.
* @return The current status.
*/ | Creates a single instance of the device status to avoid multiple receivers from being registered | get | {
"repo_name": "mobgen/halo-android",
"path": "sdk/halo-framework/src/main/java/com/mobgen/halo/android/framework/toolbox/scheduler/StatusDevice.java",
"license": "apache-2.0",
"size": 3585
} | [
"android.content.Context",
"android.support.annotation.NonNull"
] | import android.content.Context; import android.support.annotation.NonNull; | import android.content.*; import android.support.annotation.*; | [
"android.content",
"android.support"
] | android.content; android.support; | 649,887 |
public String getModifyColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
{
return "ALTER TABLE "+tablename+" MODIFY ("+getFieldDefinition(v, tk, pk, use_autoinc, true, false)+" )";
} | String function(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon) { return STR+tablename+STR+getFieldDefinition(v, tk, pk, use_autoinc, true, false)+STR; } | /**
* Generates the SQL statement to modify a column in the specified table
* @param tablename The table to add
* @param v The column defined as a value
* @param tk the name of the technical key field
* @param use_autoinc whether or not this field uses auto increment
* @param pk the name of the primary key ... | Generates the SQL statement to modify a column in the specified table | getModifyColumnStatement | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta-db/src/main/java/com/panet/imeta/core/database/OracleRDBDatabaseMeta.java",
"license": "gpl-2.0",
"size": 10649
} | [
"com.panet.imeta.core.row.ValueMetaInterface"
] | import com.panet.imeta.core.row.ValueMetaInterface; | import com.panet.imeta.core.row.*; | [
"com.panet.imeta"
] | com.panet.imeta; | 1,422,179 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<PrivateEndpointConnectionInner>> updateWithResponseAsync(
String resourceGroupName,
String searchServiceName,
String privateEndpointConnectionName,
UUID clientRequestId,
PrivateEndpointConnectionProperties ... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PrivateEndpointConnectionInner>> function( String resourceGroupName, String searchServiceName, String privateEndpointConnectionName, UUID clientRequestId, PrivateEndpointConnectionProperties properties, Context context) { if (this.client.getEndpoint() == null) {... | /**
* Updates a Private Endpoint connection to the search service in the given resource group.
*
* @param resourceGroupName The name of the resource group within the current subscription. You can obtain this
* value from the Azure Resource Manager API or the portal.
* @param searchServiceNa... | Updates a Private Endpoint connection to the search service in the given resource group | updateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-search/src/main/java/com/azure/resourcemanager/search/implementation/PrivateEndpointConnectionsClientImpl.java",
"license": "mit",
"size": 65744
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner",
"com.azure.resourcemanager.search.models.PrivateEndpointConnectionProperti... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.search.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.search.models.PrivateEndpointC... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.search.fluent.models.*; import com.azure.resourcemanager.search.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 679,633 |
private void setPartitionStatus(int partitionID, int state, String description) {
String itemName;
itemName = getItemName(DSCAlarmItemType.PARTITION_STATUS, partitionID, 0);
if (StringUtils.isNotEmpty(itemName)) {
updateItem(itemName, state, description);
}
} | void function(int partitionID, int state, String description) { String itemName; itemName = getItemName(DSCAlarmItemType.PARTITION_STATUS, partitionID, 0); if (StringUtils.isNotEmpty(itemName)) { updateItem(itemName, state, description); } } | /**
* Method to set a partition status item
*
* @param partitionID
* @param state
* @param description
*/ | Method to set a partition status item | setPartitionStatus | {
"repo_name": "kreutpet/openhab",
"path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/DSCAlarmActiveBinding.java",
"license": "epl-1.0",
"size": 49180
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 15,620 |
public boolean removeImage(final Image image) throws ShiftClientException {
return this.removeImageById(image.getItemId());
} | boolean function(final Image image) throws ShiftClientException { return this.removeImageById(image.getItemId()); } | /**
* Remove an existing image from SHIFT.
*
* @param image The image to remove.
* @return {@code true} if successful, {@code false} otherwise.
* @throws ShiftClientException
*/ | Remove an existing image from SHIFT | removeImage | {
"repo_name": "retresco/shift-java-client",
"path": "src/main/java/de/retresco/shift/ShiftClient.java",
"license": "apache-2.0",
"size": 7793
} | [
"de.retresco.shift.dao.Image",
"de.retresco.shift.exceptions.ShiftClientException"
] | import de.retresco.shift.dao.Image; import de.retresco.shift.exceptions.ShiftClientException; | import de.retresco.shift.dao.*; import de.retresco.shift.exceptions.*; | [
"de.retresco.shift"
] | de.retresco.shift; | 1,917,905 |
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
{
par1ItemStack.damageItem(1, par3EntityLivingBase);
return true;
} | boolean function(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { par1ItemStack.damageItem(1, par3EntityLivingBase); return true; } | /**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/ | Current implementations of this method in child classes do not use the entry argument beside ev. They just raise the damage on the stack | hitEntity | {
"repo_name": "DrSideburns/Secret-Agent-Craft-Minecraft-1.6.4",
"path": "src/Dr_Sideburns/SecretAgentMod/ItemKnuckles.java",
"license": "apache-2.0",
"size": 3737
} | [
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; | import net.minecraft.entity.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.item; | 1,354,045 |
public void setContext(Registry ctx)
{
registry = ctx;
EventBus bus = registry.getEventBus();
bus.register(this, RndSettingsCopied.class);
bus.register(this, CopyRndSettings.class);
bus.register(this, CopyItems.class);
bus.register(this, UserGroupSwitched.class);
... | void function(Registry ctx) { registry = ctx; EventBus bus = registry.getEventBus(); bus.register(this, RndSettingsCopied.class); bus.register(this, CopyRndSettings.class); bus.register(this, CopyItems.class); bus.register(this, UserGroupSwitched.class); } public boolean canTerminate() { return true; } | /**
* Implemented as specified by {@link Agent}.
* @see Agent#setContext(Registry)
*/ | Implemented as specified by <code>Agent</code> | setContext | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/DataBrowserAgent.java",
"license": "gpl-2.0",
"size": 8230
} | [
"org.openmicroscopy.shoola.agents.events.iviewer.CopyRndSettings",
"org.openmicroscopy.shoola.agents.events.iviewer.RndSettingsCopied",
"org.openmicroscopy.shoola.agents.events.treeviewer.CopyItems",
"org.openmicroscopy.shoola.env.config.Registry",
"org.openmicroscopy.shoola.env.data.events.UserGroupSwitche... | import org.openmicroscopy.shoola.agents.events.iviewer.CopyRndSettings; import org.openmicroscopy.shoola.agents.events.iviewer.RndSettingsCopied; import org.openmicroscopy.shoola.agents.events.treeviewer.CopyItems; import org.openmicroscopy.shoola.env.config.Registry; import org.openmicroscopy.shoola.env.data.events.Us... | import org.openmicroscopy.shoola.agents.events.iviewer.*; import org.openmicroscopy.shoola.agents.events.treeviewer.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.env.data.events.*; import org.openmicroscopy.shoola.env.event.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 773,583 |
public static SimpleFeatureType featureType(
XSDElementDeclaration element, BindingWalkerFactory bwFactory) throws Exception {
return GML2ParsingUtils.featureType(element, bwFactory);
} | static SimpleFeatureType function( XSDElementDeclaration element, BindingWalkerFactory bwFactory) throws Exception { return GML2ParsingUtils.featureType(element, bwFactory); } | /**
* Turns a xml type definition into a geotools feature type.
*
* @return The corresponding geotools feature type.
*/ | Turns a xml type definition into a geotools feature type | featureType | {
"repo_name": "geotools/geotools",
"path": "modules/extension/xsd/xsd-gml3/src/main/java/org/geotools/gml3/bindings/GML3ParsingUtils.java",
"license": "lgpl-2.1",
"size": 8347
} | [
"org.eclipse.xsd.XSDElementDeclaration",
"org.geotools.gml2.bindings.GML2ParsingUtils",
"org.geotools.xsd.BindingWalkerFactory",
"org.opengis.feature.simple.SimpleFeatureType"
] | import org.eclipse.xsd.XSDElementDeclaration; import org.geotools.gml2.bindings.GML2ParsingUtils; import org.geotools.xsd.BindingWalkerFactory; import org.opengis.feature.simple.SimpleFeatureType; | import org.eclipse.xsd.*; import org.geotools.gml2.bindings.*; import org.geotools.xsd.*; import org.opengis.feature.simple.*; | [
"org.eclipse.xsd",
"org.geotools.gml2",
"org.geotools.xsd",
"org.opengis.feature"
] | org.eclipse.xsd; org.geotools.gml2; org.geotools.xsd; org.opengis.feature; | 343,193 |
public static <K, V> PrettyLinkedHashMap<K, V> newPrettyLinkedHashMap(
String keyName, String valueName) {
return new PrettyLinkedHashMap<K, V>(keyName, valueName);
}
private static final long serialVersionUID = 1L; // serializability
... | static <K, V> PrettyLinkedHashMap<K, V> function( String keyName, String valueName) { return new PrettyLinkedHashMap<K, V>(keyName, valueName); } private static final long serialVersionUID = 1L; private String keyName = "Key"; private String valueName = "Value"; private int keyLength = keyName.length(); private int val... | /**
* Return an empty TLinkedHashMap with the specified {@code keyName} and
* {@code valueName}.
*
* @param keyName
* @param valueName
* @return the PrettyLinkedHashMap.
*/ | Return an empty TLinkedHashMap with the specified keyName and valueName | newPrettyLinkedHashMap | {
"repo_name": "dubex/concourse",
"path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/util/PrettyLinkedHashMap.java",
"license": "apache-2.0",
"size": 5008
} | [
"com.google.common.base.Strings",
"javax.annotation.Nullable"
] | import com.google.common.base.Strings; import javax.annotation.Nullable; | import com.google.common.base.*; import javax.annotation.*; | [
"com.google.common",
"javax.annotation"
] | com.google.common; javax.annotation; | 271,466 |
public void buildBones(Long armatureObjectOMA, Structure boneStructure, Bone parent, List<Bone> result, Matrix4f objectToArmatureTransformation, BlenderContext blenderContext) throws BlenderFileException {
BoneContext bc = new BoneContext(armatureObjectOMA, boneStructure, blenderContext);
bc.build... | void function(Long armatureObjectOMA, Structure boneStructure, Bone parent, List<Bone> result, Matrix4f objectToArmatureTransformation, BlenderContext blenderContext) throws BlenderFileException { BoneContext bc = new BoneContext(armatureObjectOMA, boneStructure, blenderContext); bc.buildBone(result, objectToArmatureTr... | /**
* This method builds the object's bones structure.
*
* @param boneStructure
* the structure containing the bones' data
* @param parent
* the parent bone
* @param result
* the list where the newly created bone will be added
* @pa... | This method builds the object's bones structure | buildBones | {
"repo_name": "chototsu/MikuMikuStudio",
"path": "engine/src/blender/com/jme3/scene/plugins/blender/animations/ArmatureHelper.java",
"license": "bsd-2-clause",
"size": 11375
} | [
"com.jme3.animation.Bone",
"com.jme3.math.Matrix4f",
"com.jme3.scene.plugins.blender.BlenderContext",
"com.jme3.scene.plugins.blender.exceptions.BlenderFileException",
"com.jme3.scene.plugins.blender.file.Structure",
"java.util.List"
] | import com.jme3.animation.Bone; import com.jme3.math.Matrix4f; import com.jme3.scene.plugins.blender.BlenderContext; import com.jme3.scene.plugins.blender.exceptions.BlenderFileException; import com.jme3.scene.plugins.blender.file.Structure; import java.util.List; | import com.jme3.animation.*; import com.jme3.math.*; import com.jme3.scene.plugins.blender.*; import com.jme3.scene.plugins.blender.exceptions.*; import com.jme3.scene.plugins.blender.file.*; import java.util.*; | [
"com.jme3.animation",
"com.jme3.math",
"com.jme3.scene",
"java.util"
] | com.jme3.animation; com.jme3.math; com.jme3.scene; java.util; | 1,865,259 |
@Override
public DbContextBulkUpdateBuilder<T> setField(String fieldName, Function<T, Object> transformer) {
//noinspection ResultOfMethodCallIgnored
builder.setField(fieldName, transformer);
return this;
} | DbContextBulkUpdateBuilder<T> function(String fieldName, Function<T, Object> transformer) { builder.setField(fieldName, transformer); return this; } | /**
* Adds a function that will be called for each object to get the value for
* {@link PreparedStatement#setObject(int, Object)} for each row in the bulk update
* to extract the values for the <code>SET fieldName = ?</code> clause
*/ | Adds a function that will be called for each object to get the value for <code>PreparedStatement#setObject(int, Object)</code> for each row in the bulk update to extract the values for the <code>SET fieldName = ?</code> clause | setField | {
"repo_name": "jhannes/fluent-jdbc",
"path": "src/main/java/org/fluentjdbc/DbContextBulkUpdateBuilder.java",
"license": "apache-2.0",
"size": 2569
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,111,009 |
public static int getParameterSlotCount (final MethodNode method) {
final Type [] types = Type.getArgumentTypes (method.desc);
final boolean isStatic = (method.access & Opcodes.ACC_STATIC) != 0;
int result = isStatic ? 0 : 1;
for (final Type type : types) {
result += typ... | static int function (final MethodNode method) { final Type [] types = Type.getArgumentTypes (method.desc); final boolean isStatic = (method.access & Opcodes.ACC_STATIC) != 0; int result = isStatic ? 0 : 1; for (final Type type : types) { result += type.getSize (); } return result; } /** * Clones a method node, includin... | /**
* Returns the number of local slots occupied by parameters of the given
* method.
*/ | Returns the number of local slots occupied by parameters of the given method | getParameterSlotCount | {
"repo_name": "akashche/disl-mirror",
"path": "src-disl/ch/usi/dag/disl/util/AsmHelper.java",
"license": "apache-2.0",
"size": 38067
} | [
"org.objectweb.asm.Opcodes",
"org.objectweb.asm.Type",
"org.objectweb.asm.tree.MethodNode"
] | import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import org.objectweb.asm.tree.MethodNode; | import org.objectweb.asm.*; import org.objectweb.asm.tree.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 190,756 |
@Override
protected boolean isClickable(Point location) {
return super.isClickable(location) && !component.isCellEditable(location.y, location.x);
} | boolean function(Point location) { return super.isClickable(location) && !component.isCellEditable(location.y, location.x); } | /**
* overridden to return false if cell editable.
*/ | overridden to return false if cell editable | isClickable | {
"repo_name": "sing-group/aibench-project",
"path": "aibench-pluginmanager/src/main/java/org/jdesktop/swingx/rollover/TableRolloverController.java",
"license": "lgpl-3.0",
"size": 4755
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,354,291 |
@SuppressLint("NewApi")
private void startSync() {
int serverTimeout;
mPaused = false;
if (isInitialSyncDone()) {
resumeInitialSync();
serverTimeout = 0;
} else {
// Start with initial sync
executeInitialSync();
serverTi... | @SuppressLint(STR) void function() { int serverTimeout; mPaused = false; if (isInitialSyncDone()) { resumeInitialSync(); serverTimeout = 0; } else { executeInitialSync(); serverTimeout = mNextServerTimeoutms; } Log.d(LOG_TAG, STR + mCurrentToken); if (null != mNetworkConnectivityReceiver) { mNetworkConnectivityReceiver... | /**
* Start the events sync
*/ | Start the events sync | startSync | {
"repo_name": "matrix-org/matrix-android-sdk",
"path": "matrix-sdk/src/main/java/org/matrix/androidsdk/sync/EventsThread.java",
"license": "apache-2.0",
"size": 27337
} | [
"android.annotation.SuppressLint",
"android.app.AlarmManager",
"android.app.PendingIntent",
"android.content.Intent",
"android.os.Build",
"android.os.SystemClock",
"java.util.concurrent.CountDownLatch",
"org.matrix.androidsdk.core.Log"
] | import android.annotation.SuppressLint; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Intent; import android.os.Build; import android.os.SystemClock; import java.util.concurrent.CountDownLatch; import org.matrix.androidsdk.core.Log; | import android.annotation.*; import android.app.*; import android.content.*; import android.os.*; import java.util.concurrent.*; import org.matrix.androidsdk.core.*; | [
"android.annotation",
"android.app",
"android.content",
"android.os",
"java.util",
"org.matrix.androidsdk"
] | android.annotation; android.app; android.content; android.os; java.util; org.matrix.androidsdk; | 784,516 |
public InputStream newInputStream(int index) throws IOException {
synchronized (DiskLruCache.this) {
if (entry.currentEditor != this) {
throw new IllegalStateException();
}
if (!entry.readable) {
return null;
... | InputStream function(int index) throws IOException { synchronized (DiskLruCache.this) { if (entry.currentEditor != this) { throw new IllegalStateException(); } if (!entry.readable) { return null; } return new FileInputStream(entry.getCleanFile(index)); } } | /**
* Returns an unbuffered input stream to read the last committed value,
* or null if no value has been committed.
*/ | Returns an unbuffered input stream to read the last committed value, or null if no value has been committed | newInputStream | {
"repo_name": "Shaojia/ZHCarPocket",
"path": "MaintainService/src/com/coortouch/android/urlimagehelper/DiskLruCache.java",
"license": "mit",
"size": 33069
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,822,098 |
public Set<Org> getTrustedOrgs() {
return new TrustSet(this, trustedOrgs);
} | Set<Org> function() { return new TrustSet(this, trustedOrgs); } | /**
* Gets the list of trusted orgs.
* @return A set of trusted orgs.
*/ | Gets the list of trusted orgs | getTrustedOrgs | {
"repo_name": "davidhrbac/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/org/Org.java",
"license": "gpl-2.0",
"size": 18758
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,956,901 |
private void assertValidToLocale(String localeString, String language, String country) {
Locale locale = LocaleUtils.toLocale(localeString);
assertNotNull("valid locale", locale);
assertEquals(language, locale.getLanguage());
assertEquals(country, locale.getCountry());
//vari... | void function(String localeString, String language, String country) { Locale locale = LocaleUtils.toLocale(localeString); assertNotNull(STR, locale); assertEquals(language, locale.getLanguage()); assertEquals(country, locale.getCountry()); assertTrue(locale.getVariant() == null locale.getVariant().length() == 0); } | /**
* Pass in a valid language, test toLocale.
*
* @param localeString to pass to toLocale()
* @param language of the resulting Locale
* @param country of the resulting Locale
*/ | Pass in a valid language, test toLocale | assertValidToLocale | {
"repo_name": "justinwm/astor",
"path": "examples/lang_55/src/test/org/apache/commons/lang/LocaleUtilsTest.java",
"license": "gpl-2.0",
"size": 18244
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,130,812 |
private void validateApiInfo(API api) throws APIManagementException {
String apiName = api.getId().getApiName();
String apiVersion = api.getId().getVersion();
if (apiName == null) {
handleException("API Name is required.");
} else if (containsIllegals(apiName)) {
... | void function(API api) throws APIManagementException { String apiName = api.getId().getApiName(); String apiVersion = api.getId().getVersion(); if (apiName == null) { handleException(STR); } else if (containsIllegals(apiName)) { handleException(STR + STR + APIConstants.REGEX_ILLEGAL_CHARACTERS_FOR_API_METADATA + STR); ... | /**
* Validates the name and version of api against illegal characters.
*
* @param api API info object
* @throws APIManagementException
*/ | Validates the name and version of api against illegal characters | validateApiInfo | {
"repo_name": "malinthaprasan/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java",
"license": "apache-2.0",
"size": 479940
} | [
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.ExceptionCodes"
] | import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.ExceptionCodes; | import org.wso2.carbon.apimgt.api.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 262,470 |
Browser getBrowser() { return browser; } | Browser getBrowser() { return browser; } | /**
* Sets the browser.
*
* @param browser The value to set.
*/ | Sets the browser | setBrowser | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java",
"license": "gpl-2.0",
"size": 125983
} | [
"org.openmicroscopy.shoola.agents.metadata.browser.Browser"
] | import org.openmicroscopy.shoola.agents.metadata.browser.Browser; | import org.openmicroscopy.shoola.agents.metadata.browser.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 770,899 |
public OrientElement getElement(final Object id) {
if (null == id)
throw ExceptionFactory.vertexIdCanNotBeNull();
if (id instanceof OrientElement)
return (OrientElement) id;
OIdentifiable rec;
if (id instanceof OIdentifiable)
rec = (OIdentifiable) id;
else
try {
rec = new ORecordId(id.toS... | OrientElement function(final Object id) { if (null == id) throw ExceptionFactory.vertexIdCanNotBeNull(); if (id instanceof OrientElement) return (OrientElement) id; OIdentifiable rec; if (id instanceof OIdentifiable) rec = (OIdentifiable) id; else try { rec = new ORecordId(id.toString()); } catch (IllegalArgumentExcept... | /**
* Returns a graph element, vertex or edge, starting from an ID.
*
* @param id
* element id
* @return OrientElement subclass such as OrientVertex or OrientEdge
*/ | Returns a graph element, vertex or edge, starting from an ID | getElement | {
"repo_name": "orientechnologies/blueprints",
"path": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"license": "bsd-3-clause",
"size": 41019
} | [
"com.orientechnologies.orient.core.db.record.OIdentifiable",
"com.orientechnologies.orient.core.id.ORecordId",
"com.orientechnologies.orient.core.metadata.schema.OClass",
"com.orientechnologies.orient.core.record.impl.ODocument",
"com.tinkerpop.blueprints.util.ExceptionFactory"
] | import com.orientechnologies.orient.core.db.record.OIdentifiable; import com.orientechnologies.orient.core.id.ORecordId; import com.orientechnologies.orient.core.metadata.schema.OClass; import com.orientechnologies.orient.core.record.impl.ODocument; import com.tinkerpop.blueprints.util.ExceptionFactory; | import com.orientechnologies.orient.core.db.record.*; import com.orientechnologies.orient.core.id.*; import com.orientechnologies.orient.core.metadata.schema.*; import com.orientechnologies.orient.core.record.impl.*; import com.tinkerpop.blueprints.util.*; | [
"com.orientechnologies.orient",
"com.tinkerpop.blueprints"
] | com.orientechnologies.orient; com.tinkerpop.blueprints; | 246,996 |
public void setSelection(int offset, int length) {
ISourceViewer sourceViewer = getSourceViewer();
sourceViewer.setSelectedRange(offset, length);
sourceViewer.revealRange(offset, length);
} | void function(int offset, int length) { ISourceViewer sourceViewer = getSourceViewer(); sourceViewer.setSelectedRange(offset, length); sourceViewer.revealRange(offset, length); } | /**
* implementation copied from org.eclipse.ui.externaltools.internal.ant.editor.PlantyEditor#setSelection
*/ | implementation copied from org.eclipse.ui.externaltools.internal.ant.editor.PlantyEditor#setSelection | setSelection | {
"repo_name": "akurtakov/Pydev",
"path": "plugins/org.python.pydev.shared_ui/src/org/python/pydev/shared_ui/editor/BaseEditor.java",
"license": "epl-1.0",
"size": 21270
} | [
"org.eclipse.jface.text.source.ISourceViewer"
] | import org.eclipse.jface.text.source.ISourceViewer; | import org.eclipse.jface.text.source.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,541,365 |
public Set<String> getRoleNamesByLoginId(String loginId);
| Set<String> function(String loginId); | /**
* Get roles by user name
* @param name
* @return
*/ | Get roles by user name | getRoleNamesByLoginId | {
"repo_name": "Feolive/EmploymentWebsite",
"path": "src/main/java/com/charmyin/cmstudio/basic/authorize/service/UserInitService.java",
"license": "mit",
"size": 1107
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,313,004 |
public boolean getFollowMasterBackground(){
SlideAtom sa = getSlideRecord().getSlideAtom();
return sa.getFollowMasterBackground();
} | boolean function(){ SlideAtom sa = getSlideRecord().getSlideAtom(); return sa.getFollowMasterBackground(); } | /**
* Whether this slide follows master sheet background
*
* @return <code>true</code> if the slide follows master background,
* <code>false</code> otherwise
*/ | Whether this slide follows master sheet background | getFollowMasterBackground | {
"repo_name": "rmage/gnvc-ims",
"path": "stratchpad/org/apache/poi/hslf/model/Slide.java",
"license": "lgpl-3.0",
"size": 16033
} | [
"org.apache.poi.hslf.record.SlideAtom"
] | import org.apache.poi.hslf.record.SlideAtom; | import org.apache.poi.hslf.record.*; | [
"org.apache.poi"
] | org.apache.poi; | 2,285,177 |
public Builder setSourceGenDirectory(PathFragment sourceGenDirectory) {
this.sourceGenDirectory = sourceGenDirectory;
return this;
} | Builder function(PathFragment sourceGenDirectory) { this.sourceGenDirectory = sourceGenDirectory; return this; } | /**
* Sets the directory where source files generated by annotation processors should be stored.
*/ | Sets the directory where source files generated by annotation processors should be stored | setSourceGenDirectory | {
"repo_name": "gavares/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java",
"license": "apache-2.0",
"size": 38884
} | [
"com.google.devtools.build.lib.vfs.PathFragment"
] | import com.google.devtools.build.lib.vfs.PathFragment; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 867,199 |
interface WithOSSettings {
Update withOSType(OperatingSystemTypes osType);
}
}
interface Update extends
Appliable<Disk>,
Resource.UpdateWithTags<Disk.Update>,
UpdateStages.WithSku,
UpdateStages.WithSize,
U... | interface WithOSSettings { Update withOSType(OperatingSystemTypes osType); } } interface Update extends Appliable<Disk>, Resource.UpdateWithTags<Disk.Update>, UpdateStages.WithSku, UpdateStages.WithSize, UpdateStages.WithOSSettings { } | /**
* Specifies the operating system.
*
* @param osType operating system type
* @return the next stage of the update
*/ | Specifies the operating system | withOSType | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/Disk.java",
"license": "mit",
"size": 16360
} | [
"com.microsoft.azure.management.resources.fluentcore.arm.models.Resource",
"com.microsoft.azure.management.resources.fluentcore.model.Appliable"
] | import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; | import com.microsoft.azure.management.resources.fluentcore.arm.models.*; import com.microsoft.azure.management.resources.fluentcore.model.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 310,184 |
public Date getInstallTime(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "VM_metrics.get_install_time";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLR... | Date function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = re... | /**
* Get the install_time field of the given VM_metrics.
*
* @return value of the field
*/ | Get the install_time field of the given VM_metrics | getInstallTime | {
"repo_name": "guzy/OnceCenter",
"path": "src/com/once/xenapi/VMMetrics.java",
"license": "apache-2.0",
"size": 18952
} | [
"com.once.xenapi.Types",
"java.util.Date",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.once.xenapi.Types; import java.util.Date; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.once.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.once.xenapi; java.util; org.apache.xmlrpc; | 1,545,135 |
@Override
public void setBeanContext(BeanContext bc) {
m_beanContext = bc;
m_design = m_beanContext.isDesignTime();
if (m_design) {
appearanceDesign();
} else {
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();
if (!GraphicsEnvironment.isHeadless()) {
appearanceFi... | void function(BeanContext bc) { m_beanContext = bc; m_design = m_beanContext.isDesignTime(); if (m_design) { appearanceDesign(); } else { java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(); if (!GraphicsEnvironment.isHeadless()) { appearanceFinal(); } } } | /**
* Set a bean context for this bean
*
* @param bc a <code>BeanContext</code> value
*/ | Set a bean context for this bean | setBeanContext | {
"repo_name": "ModelWriter/Deliverables",
"path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/gui/beans/DataVisualizer.java",
"license": "epl-1.0",
"size": 26969
} | [
"java.awt.GraphicsEnvironment",
"java.beans.beancontext.BeanContext"
] | import java.awt.GraphicsEnvironment; import java.beans.beancontext.BeanContext; | import java.awt.*; import java.beans.beancontext.*; | [
"java.awt",
"java.beans"
] | java.awt; java.beans; | 3,154 |
@NotNull
private static byte[] encode3to4(byte[] threeBytes, int numSigBytes)
{
@NotNull byte[] dest = new byte[4];
encode3to4(threeBytes, 0, numSigBytes, dest, 0);
return dest;
} | static byte[] function(byte[] threeBytes, int numSigBytes) { @NotNull byte[] dest = new byte[4]; encode3to4(threeBytes, 0, numSigBytes, dest, 0); return dest; } | /**
* Encodes up to the first three bytes of array <var>threeBytes</var> and returns a four-byte array in Base64 notation.
* The actual number of significant bytes in your array is given by <var>numSigBytes</var>. The array
* <var>threeBytes</var> needs only be as big as <var>numSigBytes</var>.
*
* @param thr... | Encodes up to the first three bytes of array threeBytes and returns a four-byte array in Base64 notation. The actual number of significant bytes in your array is given by numSigBytes. The array threeBytes needs only be as big as numSigBytes | encode3to4 | {
"repo_name": "davidsoergel/dsutils",
"path": "src/main/java/com/davidsoergel/dsutils/Base64.java",
"license": "apache-2.0",
"size": 46236
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 478,856 |
public void queueSetPartitionLock(AbstractTransaction ts) {
assert(ts.isInitialized()) : "Unexpected uninitialized transaction: " + ts;
SetDistributedTxnMessage work = ts.getSetDistributedTxnMessage();
boolean success = this.work_queue.offer(work);
assert(success) :
Strin... | void function(AbstractTransaction ts) { assert(ts.isInitialized()) : STR + ts; SetDistributedTxnMessage work = ts.getSetDistributedTxnMessage(); boolean success = this.work_queue.offer(work); assert(success) : String.format(STR, work, this.partitionId, ts); if (debug.val) LOG.debug(String.format(STR + STR, ts, work.get... | /**
* Queue a new transaction initialization at this partition. This will cause the
* transaction to get added to this partition's lock queue. This PartitionExecutor does
* not have to be this txn's base partition/
* @param ts
*/ | Queue a new transaction initialization at this partition. This will cause the transaction to get added to this partition's lock queue. This PartitionExecutor does not have to be this txn's base partition | queueSetPartitionLock | {
"repo_name": "apavlo/h-store",
"path": "src/frontend/edu/brown/hstore/PartitionExecutor.java",
"license": "gpl-3.0",
"size": 278798
} | [
"edu.brown.hstore.internal.SetDistributedTxnMessage",
"edu.brown.hstore.txns.AbstractTransaction"
] | import edu.brown.hstore.internal.SetDistributedTxnMessage; import edu.brown.hstore.txns.AbstractTransaction; | import edu.brown.hstore.internal.*; import edu.brown.hstore.txns.*; | [
"edu.brown.hstore"
] | edu.brown.hstore; | 2,302,542 |
public BindableStatement parseStatement() throws SQLException {
try {
BindableStatement statement = parser.statement();
return statement;
} catch (RecognitionException e) {
throw PhoenixParserException.newException(e, parser.getTokenNames());
} catch (Unsu... | BindableStatement function() throws SQLException { try { BindableStatement statement = parser.statement(); return statement; } catch (RecognitionException e) { throw PhoenixParserException.newException(e, parser.getTokenNames()); } catch (UnsupportedOperationException e) { throw new SQLFeatureNotSupportedException(e); ... | /**
* Parses the input as a SQL select or upsert statement.
* @throws SQLException
*/ | Parses the input as a SQL select or upsert statement | parseStatement | {
"repo_name": "shehzaadn/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/parse/SQLParser.java",
"license": "apache-2.0",
"size": 9853
} | [
"java.sql.SQLException",
"java.sql.SQLFeatureNotSupportedException",
"org.antlr.runtime.RecognitionException",
"org.apache.phoenix.exception.PhoenixParserException"
] | import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import org.antlr.runtime.RecognitionException; import org.apache.phoenix.exception.PhoenixParserException; | import java.sql.*; import org.antlr.runtime.*; import org.apache.phoenix.exception.*; | [
"java.sql",
"org.antlr.runtime",
"org.apache.phoenix"
] | java.sql; org.antlr.runtime; org.apache.phoenix; | 1,539,944 |
HashMap<String, Object> caseVariables = new HashMap<>();
caseVariables.put("stringVar", "Azerty");
caseVariables.put("intVar", 67890);
caseVariables.put("booleanVar", false);
CaseInstance caseInstance = runtimeService.createCaseInstanceBuilder().caseDefinitionKey("oneHumanTaskCase").var... | HashMap<String, Object> caseVariables = new HashMap<>(); caseVariables.put(STR, STR); caseVariables.put(STR, 67890); caseVariables.put(STR, false); CaseInstance caseInstance = runtimeService.createCaseInstanceBuilder().caseDefinitionKey(STR).variables(caseVariables).start(); String url = CmmnRestUrls.createRelativeReso... | /**
* Test querying case instance based on variables. POST query/case-instances
*/ | Test querying case instance based on variables. POST query/case-instances | testQueryCaseInstancesWithVariables | {
"repo_name": "paulstapleton/flowable-engine",
"path": "modules/flowable-cmmn-rest/src/test/java/org/flowable/cmmn/rest/service/api/runtime/CaseInstanceQueryResourceTest.java",
"license": "apache-2.0",
"size": 9583
} | [
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.util.HashMap",
"org.flowable.cmmn.api.runtime.CaseInstance",
"org.flowable.cmmn.rest.service.api.CmmnRestUrls"
] | import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import java.util.HashMap; import org.flowable.cmmn.api.runtime.CaseInstance; import org.flowable.cmmn.rest.service.api.CmmnRestUrls; | import com.fasterxml.jackson.databind.node.*; import java.util.*; import org.flowable.cmmn.api.runtime.*; import org.flowable.cmmn.rest.service.api.*; | [
"com.fasterxml.jackson",
"java.util",
"org.flowable.cmmn"
] | com.fasterxml.jackson; java.util; org.flowable.cmmn; | 557,477 |
protected boolean hint(List<ValidationMessage> errors, IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments) {
if (!thePass) {
String message = formatMessage(theMessage, theMessageArguments);
errors.add(new ValidationMessage(source, type,... | boolean function(List<ValidationMessage> errors, IssueType type, int line, int col, String path, boolean thePass, String theMessage, Object... theMessageArguments) { if (!thePass) { String message = formatMessage(theMessage, theMessageArguments); errors.add(new ValidationMessage(source, type, line, col, path, message, ... | /**
* Test a rule and add a {@link IssueSeverity#INFORMATION} validation message if the validation fails
*
* @param thePass
* Set this parameter to <code>false</code> if the validation does not pass
* @return Returns <code>thePass</code> (in other words, returns <code>true</code> if the ru... | Test a rule and add a <code>IssueSeverity#INFORMATION</code> validation message if the validation fails | hint | {
"repo_name": "eug48/hapi-fhir",
"path": "hapi-fhir-validation/src/main/java/org/hl7/fhir/dstu3/validation/BaseValidator.java",
"license": "apache-2.0",
"size": 20569
} | [
"java.util.List",
"org.hl7.fhir.utilities.validation.ValidationMessage"
] | import java.util.List; import org.hl7.fhir.utilities.validation.ValidationMessage; | import java.util.*; import org.hl7.fhir.utilities.validation.*; | [
"java.util",
"org.hl7.fhir"
] | java.util; org.hl7.fhir; | 2,449,793 |
public void addManager(Link manager) {
// add the manager only if it's not already a manager.
if (! _managers.contains(manager)) {
if (!LABEL_MANAGER.equals(manager.targetLabel())) {
manager = new Link(manager.targetName(), LABEL_MANAGER, manager.targetAuthenticator());
}
// if the manager is alread... | void function(Link manager) { if (! _managers.contains(manager)) { if (!LABEL_MANAGER.equals(manager.targetLabel())) { manager = new Link(manager.targetName(), LABEL_MANAGER, manager.targetAuthenticator()); } if (_readers.contains(manager)) { removeReader(manager); } else if (_writers.contains(manager)) { removeWriter(... | /**
* Add a specified manager to the ACL
* This method does nothing if the manager is already a manager.
* If the manager is already a reader or a writer, it is removed from
* _readers or _writers and added to _managers.
* @param manager the manager
*/ | Add a specified manager to the ACL This method does nothing if the manager is already a manager. If the manager is already a reader or a writer, it is removed from _readers or _writers and added to _managers | addManager | {
"repo_name": "gujianxiao/gatewayForMulticom",
"path": "javasrc/src/main/org/ndnx/ndn/profiles/security/access/group/ACL.java",
"license": "lgpl-2.1",
"size": 18014
} | [
"org.ndnx.ndn.io.content.Link"
] | import org.ndnx.ndn.io.content.Link; | import org.ndnx.ndn.io.content.*; | [
"org.ndnx.ndn"
] | org.ndnx.ndn; | 585,497 |
public void testMoveRenameDirectorySourceParentRootSourceMissing() throws Exception {
IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name());
create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null);
create(igfs, paths(DIR_NEW, SUBDIR_NEW), null);
igfs.rename(dir, SUBSUBDIR_NE... | void function() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); create(igfsSecondary, paths(DIR_NEW, SUBDIR_NEW, dir), null); create(igfs, paths(DIR_NEW, SUBDIR_NEW), null); igfs.rename(dir, SUBSUBDIR_NEW); checkExist(igfs, igfsSecondary, SUBSUBDIR_NEW); checkNotExist(igfs, igfsSecondary, di... | /**
* Test directory move and rename when source parent is the root and the source is missing locally.
*
* @throws Exception If failed.
*/ | Test directory move and rename when source parent is the root and the source is missing locally | testMoveRenameDirectorySourceParentRootSourceMissing | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java",
"license": "apache-2.0",
"size": 55550
} | [
"org.apache.ignite.igfs.IgfsPath"
] | import org.apache.ignite.igfs.IgfsPath; | import org.apache.ignite.igfs.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,408,541 |
@Test
public void testGetAllVmsRelatedToQuotaIdWithNoVmsRelated() {
List<VM> result = dao.getAllVmsRelatedToQuotaId(FixturesTool.QUOTA_SPECIFIC);
assertNotNull(result);
assertTrue(result.isEmpty());
} | void function() { List<VM> result = dao.getAllVmsRelatedToQuotaId(FixturesTool.QUOTA_SPECIFIC); assertNotNull(result); assertTrue(result.isEmpty()); } | /**
* Ensures that getting all VMs for a storage domain works as expected.
*/ | Ensures that getting all VMs for a storage domain works as expected | testGetAllVmsRelatedToQuotaIdWithNoVmsRelated | {
"repo_name": "halober/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDAOTest.java",
"license": "apache-2.0",
"size": 17059
} | [
"java.util.List",
"org.junit.Assert"
] | import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,741,409 |
public void testPushPull_extStorageVariable() throws IOException, DeviceNotAvailableException {
Log.i(LOG_TAG, "testPushPull");
File tmpFile = null;
File tmpDestFile = null;
File tmpDestFile2 = null;
String deviceFilePath = null;
final String filename = "tmp_testPushP... | void function() throws IOException, DeviceNotAvailableException { Log.i(LOG_TAG, STR); File tmpFile = null; File tmpDestFile = null; File tmpDestFile2 = null; String deviceFilePath = null; final String filename = STR; try { tmpFile = createTempTestFile(null); String externalStorePath = STR; assertNotNull(externalStoreP... | /**
* Push and then pull a file from device, and verify contents are as expected.
* <p />
* This variant of the test uses "${EXTERNAL_STORAGE}" in the pathname.
*/ | Push and then pull a file from device, and verify contents are as expected. This variant of the test uses "${EXTERNAL_STORAGE}" in the pathname | testPushPull_extStorageVariable | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/cts/hostsidetests/aadb/src/com/android/cts/aadb/TestDeviceFuncTest.java",
"license": "apache-2.0",
"size": 15931
} | [
"com.android.ddmlib.Log",
"com.android.tradefed.device.DeviceNotAvailableException",
"com.android.tradefed.util.FileUtil",
"java.io.File",
"java.io.IOException"
] | import com.android.ddmlib.Log; import com.android.tradefed.device.DeviceNotAvailableException; import com.android.tradefed.util.FileUtil; import java.io.File; import java.io.IOException; | import com.android.ddmlib.*; import com.android.tradefed.device.*; import com.android.tradefed.util.*; import java.io.*; | [
"com.android.ddmlib",
"com.android.tradefed",
"java.io"
] | com.android.ddmlib; com.android.tradefed; java.io; | 2,617,753 |
public KualiDecimal getOutstandingEncum() {
return outstandingEncum;
}
| KualiDecimal function() { return outstandingEncum; } | /**
* Gets an outstanding encumberance value
*
* @return outstanding encumberance value
*/ | Gets an outstanding encumberance value | getOutstandingEncum | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/businessobject/AccountStatusCurrentFunds.java",
"license": "agpl-3.0",
"size": 6088
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 883,574 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/FilterMediatorFailOutputConnectorItemProvider.java",
"license": "apache-2.0",
"size": 3160
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,498,128 |
public void setParameters(Map<String, String> parameters) {
this.parameters = parameters;
} | void function(Map<String, String> parameters) { this.parameters = parameters; } | /**
* Sets the map of all associated connection parameter values which apply
* when the sharing profile is used, indexed by parameter name.
*
* @param parameters
* The map of all associated connection parameter values which apply
* when the sharing profile is used, indexed by param... | Sets the map of all associated connection parameter values which apply when the sharing profile is used, indexed by parameter name | setParameters | {
"repo_name": "glyptodon/guacamole-client",
"path": "guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/APISharingProfile.java",
"license": "apache-2.0",
"size": 6718
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,732,812 |
private static boolean getPrerequisites(
Environment env, Rule testSuite, String attrName, List<Target> targets)
throws InterruptedException {
List<Label> labels =
NonconfigurableAttributeMapper.of(testSuite).get(attrName, BuildType.LABEL_LIST);
Set<PackageIdentifier> pkgIdentifiers = new ... | static boolean function( Environment env, Rule testSuite, String attrName, List<Target> targets) throws InterruptedException { List<Label> labels = NonconfigurableAttributeMapper.of(testSuite).get(attrName, BuildType.LABEL_LIST); Set<PackageIdentifier> pkgIdentifiers = new LinkedHashSet<>(); for (Label label : labels) ... | /**
* Adds the set of targets found in the attribute named {@code attrName}, which must be of label
* list type, of the {@code test_suite} rule named {@code testSuite}. Returns true if the method
* found a problem during the lookup process; the actual error message is reported to the
* environment.
*/ | Adds the set of targets found in the attribute named attrName, which must be of label list type, of the test_suite rule named testSuite. Returns true if the method found a problem during the lookup process; the actual error message is reported to the environment | getPrerequisites | {
"repo_name": "mbrukman/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/TestsInSuiteFunction.java",
"license": "apache-2.0",
"size": 9498
} | [
"com.google.devtools.build.lib.cmdline.Label",
"com.google.devtools.build.lib.cmdline.PackageIdentifier",
"com.google.devtools.build.lib.events.Event",
"com.google.devtools.build.lib.packages.BuildFileNotFoundException",
"com.google.devtools.build.lib.packages.BuildType",
"com.google.devtools.build.lib.pa... | import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.cmdline.PackageIdentifier; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.packages.BuildFileNotFoundException; import com.google.devtools.build.lib.packages.BuildType; import com.google.devt... | import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.skyframe.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,041,697 |
@Test
void expirePage()
{
tester.startPage(TestExpirePage.class);
String document = tester.getLastResponseAsString();
assertTrue(document.contains("Click me to get an error"));
Link<?> link = (Link<?>)tester.getComponentFromLastRenderedPage("link");
String linkUrl = tester.urlFor(link);
// Clear the ... | void expirePage() { tester.startPage(TestExpirePage.class); String document = tester.getLastResponseAsString(); assertTrue(document.contains(STR)); Link<?> link = (Link<?>)tester.getComponentFromLastRenderedPage("link"); String linkUrl = tester.urlFor(link); tester.getSession().invalidateNow(); tester.setExposeExceptio... | /**
* Tests page expired.
*/ | Tests page expired | expirePage | {
"repo_name": "mosoft521/wicket",
"path": "wicket-core/src/test/java/org/apache/wicket/protocol/http/WebResponseExceptionsTest.java",
"license": "apache-2.0",
"size": 3103
} | [
"org.apache.wicket.markup.html.link.Link",
"org.apache.wicket.markup.html.pages.PageExpiredErrorPage",
"org.junit.jupiter.api.Assertions"
] | import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.pages.PageExpiredErrorPage; import org.junit.jupiter.api.Assertions; | import org.apache.wicket.markup.html.link.*; import org.apache.wicket.markup.html.pages.*; import org.junit.jupiter.api.*; | [
"org.apache.wicket",
"org.junit.jupiter"
] | org.apache.wicket; org.junit.jupiter; | 1,986,845 |
private RowKeyAndTuple createAndPutAssociationRowForInsert(Serializable key, PersistentCollection collection,
AssociationPersister associationPersister, SessionImplementor session, int i, Object entry) {
RowKeyBuilder rowKeyBuilder = initializeRowKeyBuilder();
Tuple associationRow = new Tuple();
// the col... | RowKeyAndTuple function(Serializable key, PersistentCollection collection, AssociationPersister associationPersister, SessionImplementor session, int i, Object entry) { RowKeyBuilder rowKeyBuilder = initializeRowKeyBuilder(); Tuple associationRow = new Tuple(); if ( hasIdentifier ) { final Object identifier = collectio... | /**
* Creates an association row representing the given entry and adds it to the association managed by the given
* persister.
*/ | Creates an association row representing the given entry and adds it to the association managed by the given persister | createAndPutAssociationRowForInsert | {
"repo_name": "jhalliday/hibernate-ogm",
"path": "core/src/main/java/org/hibernate/ogm/persister/impl/OgmCollectionPersister.java",
"license": "lgpl-2.1",
"size": 32883
} | [
"java.io.Serializable",
"org.hibernate.collection.spi.PersistentCollection",
"org.hibernate.engine.spi.SessionImplementor",
"org.hibernate.ogm.model.impl.RowKeyBuilder",
"org.hibernate.ogm.model.key.spi.RowKey",
"org.hibernate.ogm.model.spi.Tuple",
"org.hibernate.ogm.util.impl.AssociationPersister"
] | import java.io.Serializable; import org.hibernate.collection.spi.PersistentCollection; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.ogm.model.impl.RowKeyBuilder; import org.hibernate.ogm.model.key.spi.RowKey; import org.hibernate.ogm.model.spi.Tuple; import org.hibernate.ogm.util.impl.Associ... | import java.io.*; import org.hibernate.collection.spi.*; import org.hibernate.engine.spi.*; import org.hibernate.ogm.model.impl.*; import org.hibernate.ogm.model.key.spi.*; import org.hibernate.ogm.model.spi.*; import org.hibernate.ogm.util.impl.*; | [
"java.io",
"org.hibernate.collection",
"org.hibernate.engine",
"org.hibernate.ogm"
] | java.io; org.hibernate.collection; org.hibernate.engine; org.hibernate.ogm; | 2,780,698 |
public void setCenterTextColor(int color) {
((PieChartRenderer) mRenderer).getPaintCenterText().setColor(color);
} | void function(int color) { ((PieChartRenderer) mRenderer).getPaintCenterText().setColor(color); } | /**
* Sets the color of the center text of the PieChart.
*
* @param color
*/ | Sets the color of the center text of the PieChart | setCenterTextColor | {
"repo_name": "BD-ITAC/BD-ITAC",
"path": "mobile/Alertas/MPChartLib/src/main/java/com/github/mikephil/charting/charts/PieChart.java",
"license": "mit",
"size": 16836
} | [
"com.github.mikephil.charting.renderer.PieChartRenderer"
] | import com.github.mikephil.charting.renderer.PieChartRenderer; | import com.github.mikephil.charting.renderer.*; | [
"com.github.mikephil"
] | com.github.mikephil; | 2,547,060 |
public void addListener(final ORecordListener iListener) {
if (_listeners == null)
_listeners = Collections.newSetFromMap(new WeakHashMap<ORecordListener, Boolean>());
_listeners.add(iListener);
}
| void function(final ORecordListener iListener) { if (_listeners == null) _listeners = Collections.newSetFromMap(new WeakHashMap<ORecordListener, Boolean>()); _listeners.add(iListener); } | /**
* Add a listener to the current document to catch all the supported events.
*
* @see ORecordListener
*
* @param iListener
* ODocumentListener implementation
*/ | Add a listener to the current document to catch all the supported events | addListener | {
"repo_name": "MaDaPHaKa/Orient-object",
"path": "core/src/main/java/com/orientechnologies/orient/core/record/ORecordAbstract.java",
"license": "apache-2.0",
"size": 10068
} | [
"java.util.Collections",
"java.util.WeakHashMap"
] | import java.util.Collections; import java.util.WeakHashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,856,899 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411")
@RequestWrapper(localName = "createCustomFieldOptions", targetNamespace = "https://www.google.com/apis/ads/publisher/v201411", className = "com.google.api.ads.dfp.jaxws.v201411.CustomFieldServiceInter... | @WebResult(name = "rval", targetNamespace = STRcreateCustomFieldOptionsSTRhttps: @ResponseWrapper(localName = "createCustomFieldOptionsResponseSTRhttps: List<CustomFieldOption> function( @WebParam(name = "customFieldOptionsSTRhttps: List<CustomFieldOption> customFieldOptions) throws ApiException_Exception ; | /**
*
* Creates new {@link CustomFieldOption} objects.
*
* The following fields are required:
* <ul>
* <li>{@link CustomFieldOption#displayName}</li>
* <li>{@link CustomFieldOption#customFieldId}</li>
* </ul>
* ... | Creates new <code>CustomFieldOption</code> objects. The following fields are required: <code>CustomFieldOption#displayName</code> <code>CustomFieldOption#customFieldId</code> | createCustomFieldOptions | {
"repo_name": "nafae/developer",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201411/CustomFieldServiceInterface.java",
"license": "apache-2.0",
"size": 11729
} | [
"java.util.List",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.ResponseWrapper"
] | import java.util.List; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper; | import java.util.*; import javax.jws.*; import javax.xml.ws.*; | [
"java.util",
"javax.jws",
"javax.xml"
] | java.util; javax.jws; javax.xml; | 2,391,108 |
public void setSelectionCall(Call call) {
getSelectionQuery().setCall(call);
setCustomSelectionQuery(getSelectionQuery());
} | void function(Call call) { getSelectionQuery().setCall(call); setCustomSelectionQuery(getSelectionQuery()); } | /**
* PUBLIC:
* This is a property on the mapping which will allow custom call to be
* substituted for reading a reference object.
*/ | This is a property on the mapping which will allow custom call to be substituted for reading a reference object | setSelectionCall | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/ForeignReferenceMapping.java",
"license": "epl-1.0",
"size": 115540
} | [
"org.eclipse.persistence.queries.Call"
] | import org.eclipse.persistence.queries.Call; | import org.eclipse.persistence.queries.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,608,683 |
public ResolvableType asMap() {
return as(Map.class);
}
/**
* Return this type as a {@link ResolvableType} of the specified class. Searches
* {@link #getSuperType() supertype} and {@link #getInterfaces() interface} | ResolvableType function() { return as(Map.class); } /** * Return this type as a {@link ResolvableType} of the specified class. Searches * {@link #getSuperType() supertype} and {@link #getInterfaces() interface} | /**
* Convenience method to return this type as a resolvable {@link Map} type.
* Returns {@link #NONE} if this type does not implement or extend
* {@link Map}.
* @see #as(Class)
* @see #asCollection()
*/ | Convenience method to return this type as a resolvable <code>Map</code> type. Returns <code>#NONE</code> if this type does not implement or extend <code>Map</code> | asMap | {
"repo_name": "zollty-org/zollty-util",
"path": "jretty-util-order/src/main/java/org/jretty/util/ResolvableType.java",
"license": "gpl-2.0",
"size": 58394
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,106,552 |
void refreshInstanceInfo() {
applicationInfoManager.refreshDataCenterInfoIfRequired();
InstanceStatus status;
try {
status = getHealthCheckHandler().getStatus(instanceInfo.getStatus());
} catch (Exception e) {
logger.warn("Exception from healthcheckHandler.ge... | void refreshInstanceInfo() { applicationInfoManager.refreshDataCenterInfoIfRequired(); InstanceStatus status; try { status = getHealthCheckHandler().getStatus(instanceInfo.getStatus()); } catch (Exception e) { logger.warn(STR, e); status = InstanceStatus.DOWN; } if (null != status) { instanceInfo.setStatus(status); } }... | /**
* Refresh the current local instanceInfo. Note that after a valid refresh where changes are observed, the
* isDirty flag on the instanceInfo is set to true
*/ | Refresh the current local instanceInfo. Note that after a valid refresh where changes are observed, the isDirty flag on the instanceInfo is set to true | refreshInstanceInfo | {
"repo_name": "ccortezb/eureka",
"path": "eureka-client/src/main/java/com/netflix/discovery/DiscoveryClient.java",
"license": "apache-2.0",
"size": 89455
} | [
"com.netflix.appinfo.InstanceInfo"
] | import com.netflix.appinfo.InstanceInfo; | import com.netflix.appinfo.*; | [
"com.netflix.appinfo"
] | com.netflix.appinfo; | 63,010 |
ServiceResponseWithHeaders<Void, LROSADsDelete202RetryInvalidHeaderHeaders> beginDelete202RetryInvalidHeader() throws CloudException, IOException; | ServiceResponseWithHeaders<Void, LROSADsDelete202RetryInvalidHeaderHeaders> beginDelete202RetryInvalidHeader() throws CloudException, IOException; | /**
* Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers.
*
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return ... | Long running delete request, service returns a 202 to the initial request receing a reponse with an invalid 'Location' and 'Retry-After' headers | beginDelete202RetryInvalidHeader | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperations.java",
"license": "mit",
"size": 104323
} | [
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponseWithHeaders",
"java.io.IOException"
] | import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] | com.microsoft.azure; com.microsoft.rest; java.io; | 1,617,400 |
public static int startNewSession(String optionsAsStr,
String rulesAsStr,
Transformer.Callback callback) throws IOException {
synchronized (globalLock) {
Class[] classes = getLoadedClasses(true);
print(0, "**... | static int function(String optionsAsStr, String rulesAsStr, Transformer.Callback callback) throws IOException { synchronized (globalLock) { Class[] classes = getLoadedClasses(true); print(0, STR + classes.length + ")"); ThreadProfiler.startSessionConfig(); config.parseRules(optionsAsStr, rulesAsStr); synchronized (modi... | /**
* Schedules all currently loaded classes to be reloaded, applying the current set of
* instrumentation rules.
* <p>
* This method will try as much as possible to reload only those really needed classes
* (see {@link #mustRedefineClass(Class)} for details) depending on the current and
*... | Schedules all currently loaded classes to be reloaded, applying the current set of instrumentation rules. This method will try as much as possible to reload only those really needed classes (see <code>#mustRedefineClass(Class)</code> for details) depending on the current and new set of rules | startNewSession | {
"repo_name": "mknecht/profiler4j",
"path": "src/java/net/sf/profiler4j/agent/Agent.java",
"license": "apache-2.0",
"size": 11278
} | [
"java.io.IOException",
"net.sf.profiler4j.agent.Log"
] | import java.io.IOException; import net.sf.profiler4j.agent.Log; | import java.io.*; import net.sf.profiler4j.agent.*; | [
"java.io",
"net.sf.profiler4j"
] | java.io; net.sf.profiler4j; | 1,099,485 |
public RestConfigurationProperties withEndpointProperty(String key, Object value) {
if (getEndpointProperties() == null) {
setEndpointProperties(new HashMap<>());
}
getEndpointProperties().put(key, value);
return this;
} | RestConfigurationProperties function(String key, Object value) { if (getEndpointProperties() == null) { setEndpointProperties(new HashMap<>()); } getEndpointProperties().put(key, value); return this; } | /**
* Adds a endpoint property
*/ | Adds a endpoint property | withEndpointProperty | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-main/src/main/java/org/apache/camel/main/RestConfigurationProperties.java",
"license": "apache-2.0",
"size": 12892
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,284,179 |
public static ProgressbarGUI newProgressbarGUI(String textString) {
final Shell shell = new Shell(Display.getCurrent(), SWT.SYSTEM_MODAL
| SWT.CLOSE);
shell.setLocation(Display.getCurrent().getBounds().x / 2, Display
.getCurrent().getBounds().y / 2);
shell.setText(LocalizationHandler.getItem(textS... | static ProgressbarGUI function(String textString) { final Shell shell = new Shell(Display.getCurrent(), SWT.SYSTEM_MODAL SWT.CLOSE); shell.setLocation(Display.getCurrent().getBounds().x / 2, Display .getCurrent().getBounds().y / 2); shell.setText(LocalizationHandler.getItem(textString)); ProgressbarGUI gui = new Progre... | /**
* Create a new ProgressbarGUI with the status in textString
* This will create a new shell
*
* @param textString
* @return
*/ | Create a new ProgressbarGUI with the status in textString This will create a new shell | newProgressbarGUI | {
"repo_name": "sizuest/EMod",
"path": "ch.ethz.inspire.emod/src/ch/ethz/inspire/emod/gui/utils/ProgressbarGUI.java",
"license": "gpl-3.0",
"size": 6204
} | [
"ch.ethz.inspire.emod.utils.LocalizationHandler",
"org.eclipse.swt.graphics.Rectangle",
"org.eclipse.swt.widgets.Display",
"org.eclipse.swt.widgets.Monitor",
"org.eclipse.swt.widgets.Shell"
] | import ch.ethz.inspire.emod.utils.LocalizationHandler; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Monitor; import org.eclipse.swt.widgets.Shell; | import ch.ethz.inspire.emod.utils.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"ch.ethz.inspire",
"org.eclipse.swt"
] | ch.ethz.inspire; org.eclipse.swt; | 1,736,399 |
public void releaseNetwork() {
synchronized (this) {
if (mMmsRequestCount > 0) {
mMmsRequestCount -= 1;
Log.d(MmsService.TAG, "MmsNetworkManager: release, count=" + mMmsRequestCount);
if (mMmsRequestCount < 1) {
releaseRequestLo... | void function() { synchronized (this) { if (mMmsRequestCount > 0) { mMmsRequestCount -= 1; Log.d(MmsService.TAG, STR + mMmsRequestCount); if (mMmsRequestCount < 1) { releaseRequestLocked(mNetworkCallback); } } } } | /**
* Release the MMS network when nobody is holding on to it.
*/ | Release the MMS network when nobody is holding on to it | releaseNetwork | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/services/Mms/src/com/android/mms/service/MmsNetworkManager.java",
"license": "gpl-3.0",
"size": 10943
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 603,693 |
public static SassListItem createExpression(List<SassListItem> items) {
// filter out trailing whitespace
int lastNonWhitespace = items.size() - 1;
while (lastNonWhitespace > 0
&& isWhitespace(items.get(lastNonWhitespace))) {
--lastNonWhitespace;
}
... | static SassListItem function(List<SassListItem> items) { int lastNonWhitespace = items.size() - 1; while (lastNonWhitespace > 0 && isWhitespace(items.get(lastNonWhitespace))) { --lastNonWhitespace; } if (lastNonWhitespace < items.size() - 1) { items = new ArrayList<SassListItem>(items.subList(0, lastNonWhitespace + 1))... | /**
* Creates a new expression containing the elements of the parameter items
* but with trailing whitespace items eliminated. If items contains only one
* element excluding the trailing whitespace, returns the only contained
* element. Otherwise returns a SassExpression.
*
* @param items... | Creates a new expression containing the elements of the parameter items but with trailing whitespace items eliminated. If items contains only one element excluding the trailing whitespace, returns the only contained element. Otherwise returns a SassExpression | createExpression | {
"repo_name": "customweb/sass-compiler",
"path": "src/main/java/com/customweb/sass/internal/parser/SassExpression.java",
"license": "apache-2.0",
"size": 12110
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 727,314 |
boolean setServerROI(Collection rois)
throws ROICreationException, NoSuchROIException
{
measurementResults = rois;
state = MeasurementViewer.READY;
List<ROI> roiList = new ArrayList<ROI>();
Iterator r = rois.iterator();
ROIResult result;
long userID = MeasurementAgent.getUserDetails().getId();
while... | boolean setServerROI(Collection rois) throws ROICreationException, NoSuchROIException { measurementResults = rois; state = MeasurementViewer.READY; List<ROI> roiList = new ArrayList<ROI>(); Iterator r = rois.iterator(); ROIResult result; long userID = MeasurementAgent.getUserDetails().getId(); while (r.hasNext()) { res... | /**
* Sets the server ROIS.
*
* @param rois The collection of Rois.
* @return See above.
* @throws ROICreationException
* @throws NoSuchROIException
*/ | Sets the server ROIS | setServerROI | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java",
"license": "gpl-2.0",
"size": 50154
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"org.openmicroscopy.shoola.agents.measurement.MeasurementAgent",
"org.openmicroscopy.shoola.env.data.model.ROIResult",
"org.openmicroscopy.shoola.util.roi.exception.NoSuchROIE... | import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.openmicroscopy.shoola.agents.measurement.MeasurementAgent; import org.openmicroscopy.shoola.env.data.model.ROIResult; import org.openmicroscopy.shoola.uti... | import java.util.*; import org.openmicroscopy.shoola.agents.measurement.*; import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.util.roi.exception.*; import org.openmicroscopy.shoola.util.roi.figures.*; import org.openmicroscopy.shoola.util.roi.model.*; import org.openmicroscopy.shoola.ut... | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,202,907 |
public void save() throws IOException {
file.setLength(0);
this.writeSignature();
this.writeHeaders();
file.writeChar('\n');
this.writeEntries();
} | void function() throws IOException { file.setLength(0); this.writeSignature(); this.writeHeaders(); file.writeChar('\n'); this.writeEntries(); } | /**
* Writes this book data to its file.
*/ | Writes this book data to its file | save | {
"repo_name": "joansalasoler/aalina",
"path": "src/main/java/com/joansala/book/uct/BookWriter.java",
"license": "gpl-3.0",
"size": 3716
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,538,704 |
public BlockVector3 clampY(int min, int max) {
checkArgument(min <= max, "minimum cannot be greater than maximum");
if (y < min) {
return BlockVector3.at(x, min, z);
}
if (y > max) {
return BlockVector3.at(x, max, z);
}
return this;
} | BlockVector3 function(int min, int max) { checkArgument(min <= max, STR); if (y < min) { return BlockVector3.at(x, min, z); } if (y > max) { return BlockVector3.at(x, max, z); } return this; } | /**
* Clamp the Y component.
*
* @param min the minimum value
* @param max the maximum value
* @return a new vector
*/ | Clamp the Y component | clampY | {
"repo_name": "HolodeckOne-Minecraft/WorldEdit",
"path": "worldedit-core/src/main/java/com/sk89q/worldedit/math/BlockVector3.java",
"license": "gpl-3.0",
"size": 18952
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,602,761 |
@Test
public void testCanonical2() throws Throwable {
final String targetPath = "/one/two/./three";
assertEquals("Canonical path handles current directories",
"/one/two/three",
Paths.canonical(targetPath));
} | void function() throws Throwable { final String targetPath = STR; assertEquals(STR, STR, Paths.canonical(targetPath)); } | /**
* Path: /one/two/./three
* Canonical Path: /one/two/three
*/ | Path: /one/two/./three Canonical Path: /one/two/three | testCanonical2 | {
"repo_name": "Shenker93/playframework",
"path": "framework/src/play/src/test/java/play/core/PathsTest.java",
"license": "apache-2.0",
"size": 6223
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,203,810 |
public void killTask(final TaskAttemptID taskId)
throws IOException {
killTask(taskId, false);
} | void function(final TaskAttemptID taskId) throws IOException { killTask(taskId, false); } | /**
* Kill indicated task attempt.
*
* @param taskId the id of the task to be terminated.
* @throws IOException
*/ | Kill indicated task attempt | killTask | {
"repo_name": "tecknowledgeable/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java",
"license": "apache-2.0",
"size": 50272
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,543,730 |
protected HttpStatus getAsyncResponseCode(AsyncServiceBrokerResponse response) {
if (response != null && response.isAsync()) {
return HttpStatus.ACCEPTED;
}
return HttpStatus.OK;
} | HttpStatus function(AsyncServiceBrokerResponse response) { if (response != null && response.isAsync()) { return HttpStatus.ACCEPTED; } return HttpStatus.OK; } | /**
* If an asynchronous request is received, then return HTTP 202 Accepted, otherwise HTTP 200 OK
*
* @param response the response
* @return the HTTP status
*/ | If an asynchronous request is received, then return HTTP 202 Accepted, otherwise HTTP 200 OK | getAsyncResponseCode | {
"repo_name": "spring-cloud/spring-cloud-cloudfoundry-service-broker",
"path": "spring-cloud-open-service-broker-core/src/main/java/org/springframework/cloud/servicebroker/controller/BaseController.java",
"license": "apache-2.0",
"size": 9216
} | [
"org.springframework.cloud.servicebroker.model.AsyncServiceBrokerResponse",
"org.springframework.http.HttpStatus"
] | import org.springframework.cloud.servicebroker.model.AsyncServiceBrokerResponse; import org.springframework.http.HttpStatus; | import org.springframework.cloud.servicebroker.model.*; import org.springframework.http.*; | [
"org.springframework.cloud",
"org.springframework.http"
] | org.springframework.cloud; org.springframework.http; | 2,587,050 |
@ServiceMethod(returns = ReturnType.SINGLE)
void resume(String resourceGroupName, String cacheName, String storageTargetName); | @ServiceMethod(returns = ReturnType.SINGLE) void resume(String resourceGroupName, String cacheName, String storageTargetName); | /**
* Resumes client access to a previously suspended storage target.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be from the
* [-0-9a-zA-Z_] char class.
* @param storageTargetName Name ... | Resumes client access to a previously suspended storage target | resume | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/fluent/StorageTargetOperationsClient.java",
"license": "mit",
"size": 11541
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 730,807 |
public String getOriginatingIOI() {
return getParameter(ParameterNamesIms.ORIG_IOI);
} | String function() { return getParameter(ParameterNamesIms.ORIG_IOI); } | /**
* <p>
* Get the orig-ioi parameter value
* </p>
*
* @return the orig-ioi parameter value
*/ | Get the orig-ioi parameter value | getOriginatingIOI | {
"repo_name": "fhg-fokus-nubomedia/ims-connector",
"path": "src/main/java/gov/nist/javax/sip/header/ims/PChargingVector.java",
"license": "apache-2.0",
"size": 6536
} | [
"gov.nist.javax.sip.header.ims.ParameterNamesIms"
] | import gov.nist.javax.sip.header.ims.ParameterNamesIms; | import gov.nist.javax.sip.header.ims.*; | [
"gov.nist.javax"
] | gov.nist.javax; | 2,604,103 |
public static boolean isParent(File poss, File filename) {
File canon = FileUtil.getCanonicalFile(poss);
File canonFile = FileUtil.getCanonicalFile(filename);
if(isParentInner(poss, filename)) return true;
if(isParentInner(poss, canonFile)) return true;
if(isParentInner(canon, filename)) return true;
if... | static boolean function(File poss, File filename) { File canon = FileUtil.getCanonicalFile(poss); File canonFile = FileUtil.getCanonicalFile(filename); if(isParentInner(poss, filename)) return true; if(isParentInner(poss, canonFile)) return true; if(isParentInner(canon, filename)) return true; if(isParentInner(canon, c... | /**
* Is possParent a parent of filename?
* Why doesn't java provide this? :(
* */ | Is possParent a parent of filename? Why doesn't java provide this? :( | isParent | {
"repo_name": "tbaumeist/FreeNet-Source",
"path": "src/freenet/support/io/FileUtil.java",
"license": "gpl-2.0",
"size": 20056
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,310,736 |
public List<JsniMethodRef> getJsniMethodRefs() {
return jsniMethodRefs;
} | List<JsniMethodRef> function() { return jsniMethodRefs; } | /**
* Return this method's references to Java methods.
*/ | Return this method's references to Java methods | getJsniMethodRefs | {
"repo_name": "syntelos/gwtcc",
"path": "src/com/google/gwt/dev/jjs/ast/js/JsniMethodBody.java",
"license": "apache-2.0",
"size": 3679
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 915,565 |
public Worker fetchByName_Last(String name,
OrderByComparator orderByComparator) throws SystemException {
int count = countByName(name);
List<Worker> list = findByName(name, count - 1, count, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
} | Worker function(String name, OrderByComparator orderByComparator) throws SystemException { int count = countByName(name); List<Worker> list = findByName(name, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } | /**
* Returns the last worker in the ordered set where name = ?.
*
* @param name the name
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the last matching worker, or <code>null</code> if a matching worker could not be found
* @throws SystemExceptio... | Returns the last worker in the ordered set where name = ? | fetchByName_Last | {
"repo_name": "rsicart/mpwc",
"path": "docroot/WEB-INF/src/com/mpwc/service/persistence/WorkerPersistenceImpl.java",
"license": "bsd-3-clause",
"size": 189688
} | [
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.OrderByComparator",
"com.mpwc.model.Worker",
"java.util.List"
] | import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator; import com.mpwc.model.Worker; import java.util.List; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; import com.mpwc.model.*; import java.util.*; | [
"com.liferay.portal",
"com.mpwc.model",
"java.util"
] | com.liferay.portal; com.mpwc.model; java.util; | 403,972 |
@Experimental(Kind.TRIGGER)
public static <T> Bound<T> discardingFiredPanes() {
return new Unbound().discardingFiredPanes();
} | @Experimental(Kind.TRIGGER) static <T> Bound<T> function() { return new Unbound().discardingFiredPanes(); } | /**
* Returns a new {@code Window} {@code PTransform} that uses the registered WindowFn and
* Triggering behavior, and that discards elements in a pane after they are triggered.
*
* <p> Does not modify this transform. The resulting {@code PTransform} is sufficiently
* specified to be applied, but more p... | Returns a new Window PTransform that uses the registered WindowFn and Triggering behavior, and that discards elements in a pane after they are triggered. Does not modify this transform. The resulting PTransform is sufficiently specified to be applied, but more properties can still be specified | discardingFiredPanes | {
"repo_name": "PieterDM/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/transforms/windowing/Window.java",
"license": "apache-2.0",
"size": 28321
} | [
"com.google.cloud.dataflow.sdk.annotations.Experimental"
] | import com.google.cloud.dataflow.sdk.annotations.Experimental; | import com.google.cloud.dataflow.sdk.annotations.*; | [
"com.google.cloud"
] | com.google.cloud; | 2,231,208 |
public void close() throws IOException; | void function() throws IOException; | /**
* Closes and resets the service.
* @throws IOException If there is an error closing the file.
*/ | Closes and resets the service | close | {
"repo_name": "dgault/bioformats",
"path": "components/formats-gpl/src/loci/formats/services/NetCDFService.java",
"license": "gpl-2.0",
"size": 4165
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 765,612 |
private static void explode(File archive, File destDir) throws IOException {
destDir.mkdirs();
// timestamp check
File explodeTime = new File(destDir,".timestamp2");
if(explodeTime.exists() && explodeTime.lastModified()==archive.lastModified())
return; // no need to expa... | static void function(File archive, File destDir) throws IOException { destDir.mkdirs(); File explodeTime = new File(destDir,STR); if(explodeTime.exists() && explodeTime.lastModified()==archive.lastModified()) return; Util.deleteRecursive(destDir); try { Project prj = new Project(); unzipExceptClasses(archive, destDir, ... | /**
* Explodes the plugin into a directory, if necessary.
*/ | Explodes the plugin into a directory, if necessary | explode | {
"repo_name": "vjuranek/jenkins",
"path": "core/src/main/java/hudson/ClassicPluginStrategy.java",
"license": "mit",
"size": 36091
} | [
"java.io.File",
"java.io.IOException",
"org.apache.tools.ant.BuildException",
"org.apache.tools.ant.Project"
] | import java.io.File; import java.io.IOException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; | import java.io.*; import org.apache.tools.ant.*; | [
"java.io",
"org.apache.tools"
] | java.io; org.apache.tools; | 1,457,444 |
public void delete(String url, Object... urlVariables) throws RestClientException {
this.restTemplate.delete(url, urlVariables);
} | void function(String url, Object... urlVariables) throws RestClientException { this.restTemplate.delete(url, urlVariables); } | /**
* Delete the resources at the specified URI.
* <p>
* URI Template variables are expanded using the given URI variables, if any.
* @param url the URL
* @param urlVariables the variables to expand in the template
* @throws RestClientException on client-side HTTP error
* @see RestTemplate#delete(java.lan... | Delete the resources at the specified URI. URI Template variables are expanded using the given URI variables, if any | delete | {
"repo_name": "drumonii/spring-boot",
"path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/web/client/TestRestTemplate.java",
"license": "apache-2.0",
"size": 48131
} | [
"org.springframework.web.client.RestClientException"
] | import org.springframework.web.client.RestClientException; | import org.springframework.web.client.*; | [
"org.springframework.web"
] | org.springframework.web; | 1,739,982 |
@Test
public void deleteWithVarargsQueryParams() throws Exception {
final Map<String, String> outputParams = new HashMap<String, String>();
final AtomicReference<String> method = new AtomicReference<String>();
handler = new RequestHandler() { | void function() throws Exception { final Map<String, String> outputParams = new HashMap<String, String>(); final AtomicReference<String> method = new AtomicReference<String>(); handler = new RequestHandler() { | /**
* Verify DELETE with query parameters
*
* @throws Exception
*/ | Verify DELETE with query parameters | deleteWithVarargsQueryParams | {
"repo_name": "shulei1/http-request",
"path": "lib/src/test/java/com/github/kevinsawicki/http/HttpRequestTest.java",
"license": "mit",
"size": 108437
} | [
"java.util.HashMap",
"java.util.Map",
"java.util.concurrent.atomic.AtomicReference"
] | import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; | import java.util.*; import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 2,918 |
public AccountingLine getAccountingLineForValidation() {
return accountingLineForValidation;
}
| AccountingLine function() { return accountingLineForValidation; } | /**
* Gets the accountingLineForValidation attribute.
* @return Returns the accountingLineForValidation.
*/ | Gets the accountingLineForValidation attribute | getAccountingLineForValidation | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/sys/document/validation/impl/AccountingLineValueAllowedValidation.java",
"license": "agpl-3.0",
"size": 10441
} | [
"org.kuali.kfs.sys.businessobject.AccountingLine"
] | import org.kuali.kfs.sys.businessobject.AccountingLine; | import org.kuali.kfs.sys.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 744,739 |
void dropTable(String dbname, String tableName, boolean deleteData,
boolean ignoreUnknownTab) throws MetaException, TException,
NoSuchObjectException; | void dropTable(String dbname, String tableName, boolean deleteData, boolean ignoreUnknownTab) throws MetaException, TException, NoSuchObjectException; | /**
* Drop the table.
*
* @param dbname
* The database for this table
* @param tableName
* The table to drop
* @param deleteData
* Should we delete the underlying data
* @param ignoreUnknownTab
* don't throw if the requested table doesn't exist
* @thr... | Drop the table | dropTable | {
"repo_name": "winningsix/hive",
"path": "metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java",
"license": "apache-2.0",
"size": 53383
} | [
"org.apache.hadoop.hive.metastore.api.MetaException",
"org.apache.hadoop.hive.metastore.api.NoSuchObjectException",
"org.apache.thrift.TException"
] | import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.NoSuchObjectException; import org.apache.thrift.TException; | import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.*; | [
"org.apache.hadoop",
"org.apache.thrift"
] | org.apache.hadoop; org.apache.thrift; | 2,371,844 |
public void rowsAddedToBody(Range added) {
boolean bodyHasFocus = containerWithFocus == escalator.getBody();
boolean insertionIsAboveFocusedCell = added
.getStart() <= rowWithFocus;
if (bodyHasFocus && insertionIsAboveFocusedCell) {
rowWith... | void function(Range added) { boolean bodyHasFocus = containerWithFocus == escalator.getBody(); boolean insertionIsAboveFocusedCell = added .getStart() <= rowWithFocus; if (bodyHasFocus && insertionIsAboveFocusedCell) { rowWithFocus += added.length(); rowWithFocus = Math.min(rowWithFocus, escalator.getBody().getRowCount... | /**
* Informs {@link CellFocusHandler} that certain range of rows has been
* added to the Grid body. {@link CellFocusHandler} will fix indices
* accordingly.
*
* @param added
* a range of added rows
*/ | Informs <code>CellFocusHandler</code> that certain range of rows has been added to the Grid body. <code>CellFocusHandler</code> will fix indices accordingly | rowsAddedToBody | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 332371
} | [
"com.vaadin.shared.Range"
] | import com.vaadin.shared.Range; | import com.vaadin.shared.*; | [
"com.vaadin.shared"
] | com.vaadin.shared; | 1,349,281 |
public void processArguments() {
// For most objects we'd handle the multiple possibilities for initialization variables
// as multiple constructors. For Fragments, however, it's customary to use
// setArguments / getArguments.
if (getArguments() != null) {
Bundle ... | void function() { if (getArguments() != null) { Bundle args = getArguments(); if (args.containsKey(TEXT_KEY)) { mText = args.getString(TEXT_KEY); Log.d(STR, STR); } else if (args.containsKey(TEXT_ID_KEY)) { mTextId = args.getInt(TEXT_ID_KEY); mText = getString(mTextId); } } } | /**
* Processes the arguments passed into this Fragment via setArguments method.
* Currently the method only looks for text or a textID, nothing else.
*/ | Processes the arguments passed into this Fragment via setArguments method. Currently the method only looks for text or a textID, nothing else | processArguments | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/developers/samples/android/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java",
"license": "apache-2.0",
"size": 3431
} | [
"android.os.Bundle",
"android.util.Log"
] | import android.os.Bundle; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 1,922,468 |
public static XMLObject unmarshall(String authReqStr) throws IdentityException {
InputStream inputStream = null;
try {
doBootstrap();
inputStream = new ByteArrayInputStream(authReqStr.trim().getBytes(StandardCharsets.UTF_8));
return XMLObjectSupport.unmarshallFrom... | static XMLObject function(String authReqStr) throws IdentityException { InputStream inputStream = null; try { doBootstrap(); inputStream = new ByteArrayInputStream(authReqStr.trim().getBytes(StandardCharsets.UTF_8)); return XMLObjectSupport.unmarshallFromInputStream( XMLObjectProviderRegistrySupport.getParserPool(), in... | /**
* Constructing the AuthnRequest Object from a String
*
* @param authReqStr Decoded AuthReq String
* @return AuthnRequest Object
* @throws org.wso2.carbon.identity.base.IdentityException
*/ | Constructing the AuthnRequest Object from a String | unmarshall | {
"repo_name": "wso2-extensions/identity-inbound-auth-saml",
"path": "components/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/util/SAMLSSOUtil.java",
"license": "apache-2.0",
"size": 115944
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.nio.charset.StandardCharsets",
"org.opensaml.core.xml.XMLObject",
"org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport",
"org.opensaml.core.xml.util.XMLObjectSupport",
"org.wso2.carbon.identity.base.IdentityE... | import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import org.opensaml.core.xml.XMLObject; import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport; import org.opensaml.core.xml.util.XMLObjectSupport; import org.wso2.carbon.... | import java.io.*; import java.nio.charset.*; import org.opensaml.core.xml.*; import org.opensaml.core.xml.config.*; import org.opensaml.core.xml.util.*; import org.wso2.carbon.identity.base.*; | [
"java.io",
"java.nio",
"org.opensaml.core",
"org.wso2.carbon"
] | java.io; java.nio; org.opensaml.core; org.wso2.carbon; | 2,234,100 |
private JComboBox getNamespaceReplacementPolicyComboBox() {
if (namespaceReplacementPolicyComboBox == null) {
namespaceReplacementPolicyComboBox = new JComboBox();
namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration().getNamespaceReplacementPolicy().ERROR);
... | JComboBox function() { if (namespaceReplacementPolicyComboBox == null) { namespaceReplacementPolicyComboBox = new JComboBox(); namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration().getNamespaceReplacementPolicy().ERROR); namespaceReplacementPolicyComboBox.addItem(getIntroducePortalConfiguration()... | /**
* This method initializes namespaceReplacementPolicyComboBox
*
* @return javax.swing.JComboBox
*/ | This method initializes namespaceReplacementPolicyComboBox | getNamespaceReplacementPolicyComboBox | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/introduce/src/java/Portal/gov/nih/nci/cagrid/introduce/portal/configuration/IntroducePortalConfigurationPanel.java",
"license": "bsd-3-clause",
"size": 11196
} | [
"java.awt.event.ActionListener",
"javax.swing.JComboBox"
] | import java.awt.event.ActionListener; import javax.swing.JComboBox; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,598,162 |
private void searchForLocalFileInDefaultPath(OCFile file) {
if (file.getStoragePath() == null && !file.isFolder()) {
File f = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
if (f.exists()) {
file.setStoragePath(f.getAbsolutePath());
... | void function(OCFile file) { if (file.getStoragePath() == null && !file.isFolder()) { File f = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file)); if (f.exists()) { file.setStoragePath(f.getAbsolutePath()); file.setLastSyncDateForData(f.lastModified()); } } } | /**
* Scans the default location for saving local copies of files searching for
* a 'lost' file with the same full name as the {@link OCFile} received as
* parameter.
*
* @param file File to associate a possible 'lost' local file.
*/ | Scans the default location for saving local copies of files searching for a 'lost' file with the same full name as the <code>OCFile</code> received as parameter | searchForLocalFileInDefaultPath | {
"repo_name": "asifdahir/nscloud",
"path": "src/com/nscloud/android/operations/RefreshFolderOperation.java",
"license": "gpl-2.0",
"size": 26142
} | [
"com.nscloud.android.datamodel.OCFile",
"com.nscloud.android.utils.FileStorageUtils",
"java.io.File"
] | import com.nscloud.android.datamodel.OCFile; import com.nscloud.android.utils.FileStorageUtils; import java.io.File; | import com.nscloud.android.datamodel.*; import com.nscloud.android.utils.*; import java.io.*; | [
"com.nscloud.android",
"java.io"
] | com.nscloud.android; java.io; | 2,443,585 |
public void normalize(final File file) {
if (this.analyst == null) {
throw new EncogError(
"Can't normalize yet, file has not been analyzed.");
}
int inputCount = analyst.getScript().getNormalize().calculateInputColumns();
int idealCount = analyst.getScript().getNormalize().calculateOutputColumns... | void function(final File file) { if (this.analyst == null) { throw new EncogError( STR); } int inputCount = analyst.getScript().getNormalize().calculateInputColumns(); int idealCount = analyst.getScript().getNormalize().calculateOutputColumns(); BasicMLData inputData = new BasicMLData(inputCount); BasicMLData idealData... | /**
* Normalize the input file. Write to the specified file.
*
* @param file
* The file to write to.
*/ | Normalize the input file. Write to the specified file | normalize | {
"repo_name": "rudolfbono/NAIM",
"path": "src/main/java/org/encog/app/analyst/csv/normalize/AnalystNormalizeToEGB.java",
"license": "gpl-3.0",
"size": 4917
} | [
"java.io.File",
"org.encog.EncogError",
"org.encog.ml.data.basic.BasicMLData",
"org.encog.ml.data.buffer.BufferedMLDataSet",
"org.encog.util.csv.ReadCSV",
"org.encog.util.logging.EncogLogging"
] | import java.io.File; import org.encog.EncogError; import org.encog.ml.data.basic.BasicMLData; import org.encog.ml.data.buffer.BufferedMLDataSet; import org.encog.util.csv.ReadCSV; import org.encog.util.logging.EncogLogging; | import java.io.*; import org.encog.*; import org.encog.ml.data.basic.*; import org.encog.ml.data.buffer.*; import org.encog.util.csv.*; import org.encog.util.logging.*; | [
"java.io",
"org.encog",
"org.encog.ml",
"org.encog.util"
] | java.io; org.encog; org.encog.ml; org.encog.util; | 2,503,415 |
protected void processOtherEvent(SimEvent ev) {
if (ev == null) {
Log.printConcatLine("CloudInformationService.processOtherEvent(): ",
"Unable to handle a request since the event is null.");
return;
}
Log.printLine("CloudInformationSevice.processO... | void function(SimEvent ev) { if (ev == null) { Log.printConcatLine(STR, STR); return; } Log.printLine(STR + STR + CloudSim.getEntityName(ev.getSource()) + STR + ev.getTag()); } | /**
* Process non-default received events that aren't processed by the
* {@link #processEvent(org.cloudbus.cloudsim.core.SimEvent)} method. This
* method should be overridden by subclasses in other to process new defined
* events.
*
* @param ev a SimEvent object
* @pre ev != null
... | Process non-default received events that aren't processed by the <code>#processEvent(org.cloudbus.cloudsim.core.SimEvent)</code> method. This method should be overridden by subclasses in other to process new defined events | processOtherEvent | {
"repo_name": "thejotta/CloudSimPlusModificado",
"path": "cloudsim-plus/src/main/java/org/cloudbus/cloudsim/core/CloudInformationService.java",
"license": "gpl-3.0",
"size": 8837
} | [
"org.cloudbus.cloudsim.Log"
] | import org.cloudbus.cloudsim.Log; | import org.cloudbus.cloudsim.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 1,557,017 |
void createTable(TableLayoutDesc layout, int numRegions) throws IOException;
/**
* Creates a Kiji table in an HBase instance.
*
* @param name The name of the table to create.
* @param layout The initial layout of the table (with unassigned column ids).
* @param splitKeys The initial key boundaries b... | void createTable(TableLayoutDesc layout, int numRegions) throws IOException; /** * Creates a Kiji table in an HBase instance. * * @param name The name of the table to create. * @param layout The initial layout of the table (with unassigned column ids). * @param splitKeys The initial key boundaries between regions. Ther... | /**
* Creates a Kiji table in an HBase instance.
*
* @param layout The initial layout of the table (with unassigned column ids).
* @param numRegions The initial number of regions to create.
* @throws IllegalArgumentException If numRegions is non-positive, or if numRegions is
* more than 1 and row ... | Creates a Kiji table in an HBase instance | createTable | {
"repo_name": "robotoer/ast-java",
"path": "Kiji.java",
"license": "apache-2.0",
"size": 11430
} | [
"java.io.IOException",
"org.kiji.schema.avro.TableLayoutDesc"
] | import java.io.IOException; import org.kiji.schema.avro.TableLayoutDesc; | import java.io.*; import org.kiji.schema.avro.*; | [
"java.io",
"org.kiji.schema"
] | java.io; org.kiji.schema; | 351,753 |
public boolean isForecast(ProviderName provider, String property) {
if (property == null || !forecastMappings.containsKey(provider)) {
return false;
}
return forecastMappings.get(provider).contains(property);
} | boolean function(ProviderName provider, String property) { if (property == null !forecastMappings.containsKey(provider)) { return false; } return forecastMappings.get(provider).contains(property); } | /**
* Returns true, if the property is a forecast property.
*/ | Returns true, if the property is a forecast property | isForecast | {
"repo_name": "steintore/openhab",
"path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/metadata/MetadataHandler.java",
"license": "epl-1.0",
"size": 6358
} | [
"org.openhab.binding.weather.internal.model.ProviderName"
] | import org.openhab.binding.weather.internal.model.ProviderName; | import org.openhab.binding.weather.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 263,494 |
private void stopGPS() {
// clean up and kill the service
if (lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
lm.removeUpdates(locationListener);
}
if (timer != null) {
timer.cancel();
}
if (wl != null) {
wl.release();
}
stopService();
}
| void function() { if (lm.isProviderEnabled(LocationManager.GPS_PROVIDER)) { lm.removeUpdates(locationListener); } if (timer != null) { timer.cancel(); } if (wl != null) { wl.release(); } stopService(); } | /**
* Kills Location manager clears timers and wake locks Triggered if location
* is not available
*
* @return void
*/ | Kills Location manager clears timers and wake locks Triggered if location is not available | stopGPS | {
"repo_name": "Eymir/text2gps",
"path": "src/uk/co/jamesy/Text2GPS/FindResponse.java",
"license": "bsd-3-clause",
"size": 7270
} | [
"android.location.LocationManager"
] | import android.location.LocationManager; | import android.location.*; | [
"android.location"
] | android.location; | 1,921,250 |
public static boolean isPrintable( int codePoint)
{
return
Character.toChars( codePoint)[0] == ' '
|| !(Character.isSpaceChar( codePoint) || notVisible_.contains( Character.getType( codePoint))) ;
}
private static final List<Integer> notVisible_ =
Arrays.asList(
... | static boolean function( int codePoint) { return Character.toChars( codePoint)[0] == ' ' !(Character.isSpaceChar( codePoint) notVisible_.contains( Character.getType( codePoint))) ; } private static final List<Integer> notVisible_ = Arrays.asList( (int) Character.CONTROL, (int) Character.SURROGATE, (int) Character.UNASS... | /**
* Return true if the character with the given code point is printable.
*/ | Return true if the character with the given code point is printable | isPrintable | {
"repo_name": "Cornutum/tcases",
"path": "tcases-openapi/src/main/java/org/cornutum/tcases/openapi/Characters.java",
"license": "mit",
"size": 7059
} | [
"java.util.Arrays",
"java.util.List"
] | import java.util.Arrays; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,107,699 |
if (Collection.class.isAssignableFrom(targetType)) {
InvocationHandler handler = new LazyResultLoader(client, statementName, parameterObject, targetType);
ClassLoader cl = targetType.getClassLoader();
if (Set.class.isAssignableFrom(targetType)) {
return Proxy.newProxyInstance(cl, SET_INTER... | if (Collection.class.isAssignableFrom(targetType)) { InvocationHandler handler = new LazyResultLoader(client, statementName, parameterObject, targetType); ClassLoader cl = targetType.getClassLoader(); if (Set.class.isAssignableFrom(targetType)) { return Proxy.newProxyInstance(cl, SET_INTERFACES, handler); } else { retu... | /**
* Loads the result
*
* @return the results - a list or object
*
* @throws SQLException if there is a problem
*/ | Loads the result | loadResult | {
"repo_name": "ahwxl/ads",
"path": "ads/src/main/java/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java",
"license": "apache-2.0",
"size": 3699
} | [
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Proxy",
"java.util.Collection",
"java.util.Set"
] | import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import java.util.Collection; import java.util.Set; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 883,828 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.