method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private static void writeError(BinaryRawWriterEx writer, Exception ex) {
if (ex.getCause() instanceof PlatformNativeException)
writer.writeObjectDetached(((PlatformNativeException)ex.getCause()).cause());
else {
writer.writeObjectDetached(ex.getClass().getName());
... | static void function(BinaryRawWriterEx writer, Exception ex) { if (ex.getCause() instanceof PlatformNativeException) writer.writeObjectDetached(((PlatformNativeException)ex.getCause()).cause()); else { writer.writeObjectDetached(ex.getClass().getName()); writer.writeObjectDetached(ex.getMessage()); writer.writeObjectDe... | /**
* Writes an error to the writer either as a native exception, or as a couple of strings.
* @param writer Writer.
* @param ex Exception.
*/ | Writes an error to the writer either as a native exception, or as a couple of strings | writeError | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java",
"license": "apache-2.0",
"size": 57640
} | [
"org.apache.ignite.internal.binary.BinaryRawWriterEx",
"org.apache.ignite.internal.processors.platform.PlatformNativeException",
"org.apache.ignite.internal.util.typedef.X"
] | import org.apache.ignite.internal.binary.BinaryRawWriterEx; import org.apache.ignite.internal.processors.platform.PlatformNativeException; import org.apache.ignite.internal.util.typedef.X; | import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.processors.platform.*; import org.apache.ignite.internal.util.typedef.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,853,320 |
public Token peek() throws IOException {
if (isToken)
return token;
int c;
do {
c = readChar();
} while (isWhiteSpace(c));
switch (c) {
case -1:
token = Token.EOF;
break;
case '0':
... | Token function() throws IOException { if (isToken) return token; int c; do { c = readChar(); } while (isWhiteSpace(c)); switch (c) { case -1: token = Token.EOF; break; case '0': token = Token.ZERO; break; case '1': token = Token.ONE; break; case '(': token = Token.OPEN; break; case ')': token = Token.CLOSE; break; case... | /**
* Peeks the next token.
* The token is kept in the stream, so next() or peek() will return this token again!
*
* @return the token
* @throws IOException IOException
*/ | Peeks the next token. The token is kept in the stream, so next() or peek() will return this token again | peek | {
"repo_name": "hneemann/Digital",
"path": "src/main/java/de/neemann/digital/analyse/parser/Tokenizer.java",
"license": "gpl-3.0",
"size": 4963
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 758,952 |
public final Class<? extends Annotation> getAnnotationType() {
return annotationStrategy.getAnnotationType();
} | final Class<? extends Annotation> function() { return annotationStrategy.getAnnotationType(); } | /**
* Gets the annotation type.
*/ | Gets the annotation type | getAnnotationType | {
"repo_name": "utopiazh/google-guice",
"path": "core/src/com/google/inject/Key.java",
"license": "apache-2.0",
"size": 14234
} | [
"java.lang.annotation.Annotation"
] | import java.lang.annotation.Annotation; | import java.lang.annotation.*; | [
"java.lang"
] | java.lang; | 43,066 |
@Asynchronous
@Lock(LockType.WRITE)
@SuppressWarnings("unchecked")
public void createUdis(@Observes(during = TransactionPhase.AFTER_COMPLETION) CreateUdiEvent createUdiEvent) throws BusinessValidationException {
LOGGER.info(USEFConstants.LOG_COORDINATOR_START_HANDLING_EVENT, createUdiEvent);
... | @Lock(LockType.WRITE) @SuppressWarnings(STR) void function(@Observes(during = TransactionPhase.AFTER_COMPLETION) CreateUdiEvent createUdiEvent) throws BusinessValidationException { LOGGER.info(USEFConstants.LOG_COORDINATOR_START_HANDLING_EVENT, createUdiEvent); eventValidationService.validateEventPeriodInFuture(createU... | /**
* Create the Udi's for the active connection Profile.
*
* @param createUdiEvent {@link CreateUdiEvent} event triggering the workflow.
*/ | Create the Udi's for the active connection Profile | createUdis | {
"repo_name": "USEF-Foundation/ri.usef.energy",
"path": "usef-build/usef-workflow/usef-agr/src/main/java/energy/usef/agr/workflow/plan/connection/profile/AgrCreateUdiCoordinator.java",
"license": "apache-2.0",
"size": 6345
} | [
"energy.usef.agr.config.ConfigAgrParam",
"energy.usef.agr.dto.ConnectionPortfolioDto",
"energy.usef.agr.dto.ElementDto",
"energy.usef.agr.dto.device.capability.UdiEventDto",
"energy.usef.core.config.ConfigParam",
"energy.usef.core.constant.USEFConstants",
"energy.usef.core.exception.BusinessValidationEx... | import energy.usef.agr.config.ConfigAgrParam; import energy.usef.agr.dto.ConnectionPortfolioDto; import energy.usef.agr.dto.ElementDto; import energy.usef.agr.dto.device.capability.UdiEventDto; import energy.usef.core.config.ConfigParam; import energy.usef.core.constant.USEFConstants; import energy.usef.core.exception.... | import energy.usef.agr.config.*; import energy.usef.agr.dto.*; import energy.usef.agr.dto.device.capability.*; import energy.usef.core.config.*; import energy.usef.core.constant.*; import energy.usef.core.exception.*; import energy.usef.core.workflow.*; import java.util.*; import java.util.stream.*; import javax.ejb.*;... | [
"energy.usef.agr",
"energy.usef.core",
"java.util",
"javax.ejb",
"javax.enterprise",
"org.joda.time"
] | energy.usef.agr; energy.usef.core; java.util; javax.ejb; javax.enterprise; org.joda.time; | 777,384 |
@Override
public void setStore(Map<String, Credentials> store) {
synchronized (storeLock) {
super.setStore(store);
}
} | void function(Map<String, Credentials> store) { synchronized (storeLock) { super.setStore(store); } } | /**
* The underlying credential store is not thread safe
* Use this accessor instead of the protected 'store' field
*/ | The underlying credential store is not thread safe Use this accessor instead of the protected 'store' field | setStore | {
"repo_name": "jonathanchristison/fabric8",
"path": "fabric/fabric-core-agent-jclouds/src/main/java/io/fabric8/service/jclouds/modules/ZookeeperCredentialStore.java",
"license": "apache-2.0",
"size": 13754
} | [
"java.util.Map",
"org.jclouds.domain.Credentials"
] | import java.util.Map; import org.jclouds.domain.Credentials; | import java.util.*; import org.jclouds.domain.*; | [
"java.util",
"org.jclouds.domain"
] | java.util; org.jclouds.domain; | 103,671 |
Set<Package> resolvePackages( final Project project ); | Set<Package> resolvePackages( final Project project ); | /**
* Given a Project resolves the calculation of all the packages for this project.
* @param project
* @return Collection containing all the packages for the project.
*/ | Given a Project resolves the calculation of all the packages for this project | resolvePackages | {
"repo_name": "yurloc/guvnor",
"path": "guvnor-project/guvnor-project-api/src/main/java/org/guvnor/common/services/project/service/ProjectService.java",
"license": "apache-2.0",
"size": 4229
} | [
"java.util.Set",
"org.guvnor.common.services.project.model.Package",
"org.guvnor.common.services.project.model.Project"
] | import java.util.Set; import org.guvnor.common.services.project.model.Package; import org.guvnor.common.services.project.model.Project; | import java.util.*; import org.guvnor.common.services.project.model.*; | [
"java.util",
"org.guvnor.common"
] | java.util; org.guvnor.common; | 2,648,271 |
public static ArrayList<String> getStatement(String theme){
ArrayList<String> list = new ArrayList<String>();
String cover = "\'";
if(theme.contains("\'")){
cover = "\"";
}
String quarry = "SELECT "+ DataBaseConstant.STATEMENT_COLUMN
+ " FROM "... | static ArrayList<String> function(String theme){ ArrayList<String> list = new ArrayList<String>(); String cover = "\'"; if(theme.contains("\'")){ cover = "\"STRSELECT STR FROM STR WHERE STR=STR;"; try { ResultSet rs = dataBase.runQuarry(quarry); while(rs.next()){ list.add(rs.getString(DataBaseConstant.STATEMENT_COLUMN)... | /**
*
* Return statements for a given theme
*
* */ | Return statements for a given theme | getStatement | {
"repo_name": "thilina27/pptgen",
"path": "src/main/java/pptgen/data/DataStore.java",
"license": "unlicense",
"size": 8906
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.ArrayList"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,736,123 |
EReference getUnaryExpr_Expr(); | EReference getUnaryExpr_Expr(); | /**
* Returns the meta object for the containment reference '{@link com.rockwellcollins.atc.agree.agree.UnaryExpr#getExpr <em>Expr</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Expr</em>'.
* @see com.rockwellcollins.atc.agree.agree.Unary... | Returns the meta object for the containment reference '<code>com.rockwellcollins.atc.agree.agree.UnaryExpr#getExpr Expr</code>'. | getUnaryExpr_Expr | {
"repo_name": "smaccm/smaccm",
"path": "fm-workbench/agree/com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/agree/AgreePackage.java",
"license": "bsd-3-clause",
"size": 292940
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,185,935 |
@Test
public void excludesIncorrectClassFormCheck() throws Exception {
final byte[] bytecode = new BytecodeMocker()
.withSource("class Foo { public Foo clone() { return this; } }")
.mock();
final Environment env = new Environment.Mock()
.withFile("target/class... | void function() throws Exception { final byte[] bytecode = new BytecodeMocker() .withSource(STR) .mock(); final Environment env = new Environment.Mock() .withFile(STR, bytecode) .withExcludes("Foo") .withDefaultClasspath(); new FindBugsValidator().validate(env); } | /**
* FindbugsValidator can exclude classes from check.
* @throws Exception If something wrong happens inside
*/ | FindbugsValidator can exclude classes from check | excludesIncorrectClassFormCheck | {
"repo_name": "carlosmiranda/qulice",
"path": "qulice-findbugs/src/test/java/com/qulice/findbugs/FindBugsValidatorTest.java",
"license": "bsd-3-clause",
"size": 4408
} | [
"com.qulice.spi.Environment"
] | import com.qulice.spi.Environment; | import com.qulice.spi.*; | [
"com.qulice.spi"
] | com.qulice.spi; | 616,770 |
private ImmutableNode getRootNode()
{
return config.getModel().getNodeHandler().getRootNode();
} | ImmutableNode function() { return config.getModel().getNodeHandler().getRootNode(); } | /**
* Convenience method for obtaining the root node of the test configuration.
*
* @return the root node of the test configuration
*/ | Convenience method for obtaining the root node of the test configuration | getRootNode | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestAbstractHierarchicalConfiguration.java",
"license": "apache-2.0",
"size": 42005
} | [
"org.apache.commons.configuration2.tree.ImmutableNode"
] | import org.apache.commons.configuration2.tree.ImmutableNode; | import org.apache.commons.configuration2.tree.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,682,504 |
public okhttp3.Call replaceFlowSchemaStatusAsync(
String name,
V1beta2FlowSchema body,
String pretty,
String dryRun,
String fieldManager,
String fieldValidation,
final ApiCallback<V1beta2FlowSchema> _callback)
throws ApiException {
okhttp3.Call localVarCall =
... | okhttp3.Call function( String name, V1beta2FlowSchema body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback<V1beta2FlowSchema> _callback) throws ApiException { okhttp3.Call localVarCall = replaceFlowSchemaStatusValidateBeforeCall( name, body, pretty, dryRun, fieldManager, fi... | /**
* (asynchronously) replace status of the specified FlowSchema
*
* @param name name of the FlowSchema (required)
* @param body (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param dryRun When present, indicates that modifications should not be persist... | (asynchronously) replace status of the specified FlowSchema | replaceFlowSchemaStatusAsync | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/FlowcontrolApiserverV1beta2Api.java",
"license": "apache-2.0",
"size": 322022
} | [
"com.google.gson.reflect.TypeToken",
"io.kubernetes.client.openapi.ApiCallback",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.models.V1beta2FlowSchema",
"java.lang.reflect.Type"
] | import com.google.gson.reflect.TypeToken; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V1beta2FlowSchema; import java.lang.reflect.Type; | import com.google.gson.reflect.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*; | [
"com.google.gson",
"io.kubernetes.client",
"java.lang"
] | com.google.gson; io.kubernetes.client; java.lang; | 2,294,919 |
interface WithVirtualNetworkPeerings {
WithCreate withVirtualNetworkPeerings(List<VirtualNetworkPeeringInner> virtualNetworkPeerings);
}
interface WithCreate extends Creatable<VirtualNetwork>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAddres... | interface WithVirtualNetworkPeerings { WithCreate withVirtualNetworkPeerings(List<VirtualNetworkPeeringInner> virtualNetworkPeerings); } interface WithCreate extends Creatable<VirtualNetwork>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithAddressSpace, DefinitionStages.WithDdosProtectionPlan, Definition... | /**
* Specifies virtualNetworkPeerings.
* @param virtualNetworkPeerings A list of peerings in a Virtual Network
* @return the next definition stage
*/ | Specifies virtualNetworkPeerings | withVirtualNetworkPeerings | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/VirtualNetwork.java",
"license": "mit",
"size": 13963
} | [
"com.microsoft.azure.arm.model.Appliable",
"com.microsoft.azure.arm.model.Creatable",
"com.microsoft.azure.arm.resources.models.Resource",
"com.microsoft.azure.management.network.v2018_04_01.implementation.VirtualNetworkPeeringInner",
"java.util.List"
] | import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.Resource; import com.microsoft.azure.management.network.v2018_04_01.implementation.VirtualNetworkPeeringInner; import java.util.List; | import com.microsoft.azure.arm.model.*; import com.microsoft.azure.arm.resources.models.*; import com.microsoft.azure.management.network.v2018_04_01.implementation.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,813,694 |
public double lengthSquared() {
return NumberConversions.square(x) + NumberConversions.square(y) + NumberConversions.square(z);
} | double function() { return NumberConversions.square(x) + NumberConversions.square(y) + NumberConversions.square(z); } | /**
* Gets the magnitude of the location squared. Not world-aware and
* orientation independent.
*
* @see Vector
* @return the magnitude
*/ | Gets the magnitude of the location squared. Not world-aware and orientation independent | lengthSquared | {
"repo_name": "AlmuraDev/Almura-API",
"path": "src/main/java/org/bukkit/Location.java",
"license": "gpl-3.0",
"size": 13004
} | [
"org.bukkit.util.NumberConversions"
] | import org.bukkit.util.NumberConversions; | import org.bukkit.util.*; | [
"org.bukkit.util"
] | org.bukkit.util; | 2,590,005 |
public Message updateChatMessage(
final MessageData messageUpdate,
final int roomId,
final int messageId) {
final UUID locationId = UUID.fromString("7d11c820-4bdc-4bca-8957-9d74e32cdd20"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-pre... | Message function( final MessageData messageUpdate, final int roomId, final int messageId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, roomId); routeValues.pu... | /**
* [Preview API 3.1-preview.1] Update a given chat message
*
* @param messageUpdate
* New message content
* @param roomId
* Id of the room
* @param messageId
* Id of the message
* @return Message
*/ | [Preview API 3.1-preview.1] Update a given chat message | updateChatMessage | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/chat/webapi/ChatHttpClientBase.java",
"license": "mit",
"size": 18876
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.chat.webapi.Message",
"com.microsoft.alm.teamfoundation.chat.webapi.MessageData",
"com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.chat.webapi.Message; import com.microsoft.alm.teamfoundation.chat.webapi.MessageData; import com.microsoft.alm.visualstudio.services.webapi.A... | import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.chat.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 2,835,688 |
super.add(tuple);
int tupleSize = tuple.size();
size.add(tupleSize);
ensureSize(tupleSize);
for (int i = 0; i < tupleSize; i++) {
FieldSummaryData fieldSummaryData = fields.get(i);
try {
FieldSchema field = getField(schema, i);
fieldSummaryData.setName(getName(field));
... | super.add(tuple); int tupleSize = tuple.size(); size.add(tupleSize); ensureSize(tupleSize); for (int i = 0; i < tupleSize; i++) { FieldSummaryData fieldSummaryData = fields.get(i); try { FieldSchema field = getField(schema, i); fieldSummaryData.setName(getName(field)); Object o = tuple.get(i); fieldSummaryData.add(getS... | /**
* add tuple to the summary
*
* @param tuple
*/ | add tuple to the summary | addTuple | {
"repo_name": "cchang738/parquet-mr",
"path": "parquet-pig/src/main/java/org/apache/parquet/pig/summary/TupleSummaryData.java",
"license": "apache-2.0",
"size": 3058
} | [
"java.util.logging.Level",
"org.apache.pig.backend.executionengine.ExecException",
"org.apache.pig.impl.logicalLayer.schema.Schema"
] | import java.util.logging.Level; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.impl.logicalLayer.schema.Schema; | import java.util.logging.*; import org.apache.pig.backend.executionengine.*; import org.apache.pig.impl.*; | [
"java.util",
"org.apache.pig"
] | java.util; org.apache.pig; | 326,029 |
double readDouble() throws IOException; | double readDouble() throws IOException; | /**
* Read a double.
*
* @return the value
*/ | Read a double | readDouble | {
"repo_name": "jdubrule/bond",
"path": "java/core/src/main/java/org/bondlib/TaggedProtocolReader.java",
"license": "mit",
"size": 4345
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,870,959 |
public HistogramAggregationBuilder order(List<BucketOrder> orders) {
if (orders == null) {
throw new IllegalArgumentException("[orders] must not be null: [" + name + "]");
}
// if the list only contains one order use that to avoid inconsistent xcontent
order(orders.size()... | HistogramAggregationBuilder function(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException(STR + name + "]"); } order(orders.size() > 1 ? BucketOrder.compound(orders) : orders.get(0)); return this; } | /**
* Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic
* ordering.
*/ | Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic ordering | order | {
"repo_name": "uschindler/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/aggregations/bucket/histogram/HistogramAggregationBuilder.java",
"license": "apache-2.0",
"size": 13651
} | [
"java.util.List",
"org.elasticsearch.search.aggregations.BucketOrder"
] | import java.util.List; import org.elasticsearch.search.aggregations.BucketOrder; | import java.util.*; import org.elasticsearch.search.aggregations.*; | [
"java.util",
"org.elasticsearch.search"
] | java.util; org.elasticsearch.search; | 779,559 |
public static void clear() {
GlobalVariables vars = getCurrentGlobalVariables();
vars.messageMap = new MessageMap();
vars.requestCache = new HashMap<String,Object>();
} | static void function() { GlobalVariables vars = getCurrentGlobalVariables(); vars.messageMap = new MessageMap(); vars.requestCache = new HashMap<String,Object>(); } | /**
* Clears out GlobalVariable objects with the exception of the UserSession
*/ | Clears out GlobalVariable objects with the exception of the UserSession | clear | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/util/GlobalVariables.java",
"license": "apache-2.0",
"size": 7062
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 83,527 |
protected void createComponents(UnitedNameTreeModel model)
{
query = new QueryPanel<T>();
views = new HierarchiesPane<T>(model);
//FIXME 20141201
//query.setQueryManager(table.getAlignerTree());
} | void function(UnitedNameTreeModel model) { query = new QueryPanel<T>(); views = new HierarchiesPane<T>(model); } | /**
* Create <CODE>Components</CODE>
* of specified locale
*
* @param locale <CODE>Locale</CODE> to determine texts in labels and buttons
*/ | Create <code>Components</code> of specified locale | createComponents | {
"repo_name": "nomencurator/taxonaut",
"path": "src/main/java/org/nomencurator/gui/swing/Hierarchies.java",
"license": "apache-2.0",
"size": 7116
} | [
"org.nomencurator.gui.swing.tree.UnitedNameTreeModel"
] | import org.nomencurator.gui.swing.tree.UnitedNameTreeModel; | import org.nomencurator.gui.swing.tree.*; | [
"org.nomencurator.gui"
] | org.nomencurator.gui; | 97,583 |
public void actionPerformed(ActionEvent e) {
if(editor.locked == false) {
editor.setBtnLock(true, true);
editor.toggleButtonsAndFields(false, false);
editor.clearItem();
}
else {
if(editor.checkPassword() == true) {
editor.setBtnLock(false, true);
editor.showItem();
}
}
... | void function(ActionEvent e) { if(editor.locked == false) { editor.setBtnLock(true, true); editor.toggleButtonsAndFields(false, false); editor.clearItem(); } else { if(editor.checkPassword() == true) { editor.setBtnLock(false, true); editor.showItem(); } } } } | /**
* This method sets the button "Lock / Unlock" according to variable locked.
*
* @param e the ActionEvent to process
*/ | This method sets the button "Lock / Unlock" according to variable locked | actionPerformed | {
"repo_name": "krid/keyring-java",
"path": "src/com/otisbean/keyring/gui/Editor.java",
"license": "gpl-3.0",
"size": 37052
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 766,206 |
private void refactorConditionalPattern(final boolean isNamedGroup) {
this.increaseParenthesisDepth(!DURING_PREREFACTOR);
String groupName = this.normalizeGroupName(
isNamedGroup ? this.matcher.group(this.group) : "[" + this.matcher.group(this.group) + "]");
// start of groupName / number
int start = th... | void function(final boolean isNamedGroup) { this.increaseParenthesisDepth(!DURING_PREREFACTOR); String groupName = this.normalizeGroupName( isNamedGroup ? this.matcher.group(this.group) : "[" + this.matcher.group(this.group) + "]"); int start = this.matcher.start(this.group); if (groupName.equals("[0]")) { throw this.e... | /**
* Refactors a conditional pattern during the refactoring step
*
* @param isNamedGroup
* whether the condition is a name or number
*/ | Refactors a conditional pattern during the refactoring step | refactorConditionalPattern | {
"repo_name": "codesaway/regexplus",
"path": "RegExPlus/src/main/java/info/codesaway/util/regex/Refactor.java",
"license": "bsd-3-clause",
"size": 111762
} | [
"info.codesaway.util.regex.RefactorUtility"
] | import info.codesaway.util.regex.RefactorUtility; | import info.codesaway.util.regex.*; | [
"info.codesaway.util"
] | info.codesaway.util; | 1,886,163 |
public void setCreateOn(Date createOn) {
this.createOn = createOn;
} | void function(Date createOn) { this.createOn = createOn; } | /**
* Sets create on.
*
* @param createOn the create on
*/ | Sets create on | setCreateOn | {
"repo_name": "forsrc/MyStudy",
"path": "src/main/java/com/forsrc/pojo/Book.java",
"license": "apache-2.0",
"size": 3170
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,903,986 |
public CloseableIterator<IndexStoreEntry> get(Object indexKey); | CloseableIterator<IndexStoreEntry> function(Object indexKey); | /**
* Return all of the IndexStoreEntries that map to a given region key.
*/ | Return all of the IndexStoreEntries that map to a given region key | get | {
"repo_name": "kidaa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexStore.java",
"license": "apache-2.0",
"size": 4006
} | [
"com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator"
] | import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator; | import com.gemstone.gemfire.internal.cache.persistence.query.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,519,528 |
public static java.security.cert.X509CRL buildJavaX509CRL(String base64CRL)
throws CertificateException, CRLException {
CertificateFactory cf = CertificateFactory.getInstance("X.509");
ByteArrayInputStream input = new ByteArrayInputStream(Base64.decode(base64CRL));
return (j... | static java.security.cert.X509CRL function(String base64CRL) throws CertificateException, CRLException { CertificateFactory cf = CertificateFactory.getInstance("X.509"); ByteArrayInputStream input = new ByteArrayInputStream(Base64.decode(base64CRL)); return (java.security.cert.X509CRL) cf.generateCRL(input); } | /**
* Build Java CRL from base64 encoding.
*
* @param base64CRL base64-encoded CRL
* @return a native Java X509 CRL
* @throws CertificateException thrown if there is an error constructing certificate
* @throws CRLException thrown if there is an error constructing CRL
*/ | Build Java CRL from base64 encoding | buildJavaX509CRL | {
"repo_name": "duck1123/java-xmltooling",
"path": "src/main/java/org/opensaml/xml/security/SecurityTestHelper.java",
"license": "apache-2.0",
"size": 13458
} | [
"java.io.ByteArrayInputStream",
"java.security.cert.CRLException",
"java.security.cert.CertificateException",
"java.security.cert.CertificateFactory",
"org.opensaml.xml.util.Base64"
] | import java.io.ByteArrayInputStream; import java.security.cert.CRLException; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import org.opensaml.xml.util.Base64; | import java.io.*; import java.security.cert.*; import org.opensaml.xml.util.*; | [
"java.io",
"java.security",
"org.opensaml.xml"
] | java.io; java.security; org.opensaml.xml; | 1,066,199 |
Iterable<Artifact> getObjectFiles(); | Iterable<Artifact> getObjectFiles(); | /**
* Return the list of object files included in the input artifact, if there are any. It is
* legal to call this only when {@link #containsObjectFiles()} returns true.
*/ | Return the list of object files included in the input artifact, if there are any. It is legal to call this only when <code>#containsObjectFiles()</code> returns true | getObjectFiles | {
"repo_name": "dhootha/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInput.java",
"license": "apache-2.0",
"size": 1778
} | [
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.devtools.build.lib.actions.Artifact; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 455,902 |
public BigDecimal backlog() {
if (isUnknown()) {
throw new IllegalStateException("Backlog is unknown, there is no byte[] representation.");
}
return backlogInternal();
} | BigDecimal function() { if (isUnknown()) { throw new IllegalStateException(STR); } return backlogInternal(); } | /**
* Returns the {@code byte[]} representation of the backlog if it is known.
*
* @throws IllegalStateException if the backlog is unknown.
*/ | Returns the byte[] representation of the backlog if it is known | backlog | {
"repo_name": "mxm/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/splittabledofn/Backlog.java",
"license": "apache-2.0",
"size": 3891
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,447,531 |
EAttribute getPowerQualityPricing_VoltLimitViolCost(); | EAttribute getPowerQualityPricing_VoltLimitViolCost(); | /**
* Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Informative.InfCustomers.PowerQualityPricing#getVoltLimitViolCost <em>Volt Limit Viol Cost</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Volt Limit Viol Cost</em>'.
* @se... | Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Informative.InfCustomers.PowerQualityPricing#getVoltLimitViolCost Volt Limit Viol Cost</code>'. | getPowerQualityPricing_VoltLimitViolCost | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfCustomers/InfCustomersPackage.java",
"license": "mit",
"size": 116381
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,133,604 |
public void removeInfoWindowClosedListener(
InfoWindowClosedListener listener) {
infoWindowClosedListeners.remove(listener);
}
| void function( InfoWindowClosedListener listener) { infoWindowClosedListeners.remove(listener); } | /**
* Removes an InfoWindowClosedListener from the map.
*
* @param listener The listener to remove.
*/ | Removes an InfoWindowClosedListener from the map | removeInfoWindowClosedListener | {
"repo_name": "gpedro/GoogleMapsVaadin7",
"path": "googlemaps/src/main/java/com/vaadin/tapio/googlemaps/GoogleMap.java",
"license": "apache-2.0",
"size": 23137
} | [
"com.vaadin.tapio.googlemaps.client.events.InfoWindowClosedListener"
] | import com.vaadin.tapio.googlemaps.client.events.InfoWindowClosedListener; | import com.vaadin.tapio.googlemaps.client.events.*; | [
"com.vaadin.tapio"
] | com.vaadin.tapio; | 1,238,681 |
protected final DataAccessObject initializeNewDAO(int pageIndex) throws SpineException {
synchronized (initThisObject){
final SpineConfiguration sc = SpineConfiguration.getInstance(1);
String[] className = null;
String delegateFullName = this.getClass().getName();
... | final DataAccessObject function(int pageIndex) throws SpineException { synchronized (initThisObject){ final SpineConfiguration sc = SpineConfiguration.getInstance(1); String[] className = null; String delegateFullName = this.getClass().getName(); final ManagedDaoBean[] managedBeans = sc.getManagedBean(this.processorNam... | /**
* <p>
* Re initalizes this BusinessDelegate to use a new DataProxy and DataAccessObject where the processor is a MultiView Processor.
* </p>
* <p>
* This method will not work for a simpl processor instance
* </p>
*
* @param pageIndex The pageIndex of the DAO instance... | Re initalizes this BusinessDelegate to use a new DataProxy and DataAccessObject where the processor is a MultiView Processor. This method will not work for a simpl processor instance | initializeNewDAO | {
"repo_name": "davidlad123/spine",
"path": "spine/src/com/zphinx/spine/core/AbstractBusinessDelegate.java",
"license": "gpl-3.0",
"size": 12835
} | [
"com.zphinx.spine.data.DataAccessObject",
"com.zphinx.spine.exceptions.SpineException",
"com.zphinx.spine.start.SpineConfiguration",
"com.zphinx.spine.vo.ManagedDaoBean"
] | import com.zphinx.spine.data.DataAccessObject; import com.zphinx.spine.exceptions.SpineException; import com.zphinx.spine.start.SpineConfiguration; import com.zphinx.spine.vo.ManagedDaoBean; | import com.zphinx.spine.data.*; import com.zphinx.spine.exceptions.*; import com.zphinx.spine.start.*; import com.zphinx.spine.vo.*; | [
"com.zphinx.spine"
] | com.zphinx.spine; | 2,424,319 |
public String getActions()
{
if (actions == null)
actions = getActions(this.mask);
return actions;
}
/**
* Returns a new PermissionCollection object for storing SocketPermission
* objects.
* <p>
* SocketPermission objects must be stored in a manner that ... | String function() { if (actions == null) actions = getActions(this.mask); return actions; } /** * Returns a new PermissionCollection object for storing SocketPermission * objects. * <p> * SocketPermission objects must be stored in a manner that allows them * to be inserted into the collection in any order, but that als... | /**
* Returns the canonical string representation of the actions.
* Always returns present actions in the following order:
* connect, listen, accept, resolve.
*
* @return the canonical string representation of the actions.
*/ | Returns the canonical string representation of the actions. Always returns present actions in the following order: connect, listen, accept, resolve | getActions | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/java/net/SocketPermission.java",
"license": "apache-2.0",
"size": 49733
} | [
"java.security.PermissionCollection"
] | import java.security.PermissionCollection; | import java.security.*; | [
"java.security"
] | java.security; | 233,148 |
public int getFolderCount() {
List<Folder> folders = getAllFolders();
if (folders == null)
return 0;
else return folders.size();
}
| int function() { List<Folder> folders = getAllFolders(); if (folders == null) return 0; else return folders.size(); } | /**
* Retrieves the total number of folders owned by the
* current authenticated user, including subfolders.
*
* @return The current authenticated user's total folder count.
*/ | Retrieves the total number of folders owned by the current authenticated user, including subfolders | getFolderCount | {
"repo_name": "cianfrocco-lab/COSMIC-CryoEM-Gateway",
"path": "gateway_config/portal/src/main/java/org/ngbw/web/controllers/FolderController.java",
"license": "gpl-3.0",
"size": 26068
} | [
"java.util.List",
"org.ngbw.sdk.database.Folder"
] | import java.util.List; import org.ngbw.sdk.database.Folder; | import java.util.*; import org.ngbw.sdk.database.*; | [
"java.util",
"org.ngbw.sdk"
] | java.util; org.ngbw.sdk; | 1,345,351 |
private static boolean validateArtifacts(
ActionCache.Entry entry,
Action action,
NestedSet<Artifact> actionInputs,
MetadataHandler metadataHandler,
boolean checkOutput) {
Map<String, FileArtifactValue> mdMap = new HashMap<>();
if (checkOutput) {
for (Artifact artifact : ac... | static boolean function( ActionCache.Entry entry, Action action, NestedSet<Artifact> actionInputs, MetadataHandler metadataHandler, boolean checkOutput) { Map<String, FileArtifactValue> mdMap = new HashMap<>(); if (checkOutput) { for (Artifact artifact : action.getOutputs()) { mdMap.put(artifact.getExecPathString(), ge... | /**
* Validate metadata state for action input or output artifacts.
*
* @param entry cached action information.
* @param action action to be validated.
* @param actionInputs the inputs of the action. Normally just the result of action.getInputs(),
* but if this action doesn't yet know its inputs, ... | Validate metadata state for action input or output artifacts | validateArtifacts | {
"repo_name": "ulfjack/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/ActionCacheChecker.java",
"license": "apache-2.0",
"size": 25851
} | [
"com.google.devtools.build.lib.actions.cache.ActionCache",
"com.google.devtools.build.lib.actions.cache.DigestUtils",
"com.google.devtools.build.lib.actions.cache.MetadataHandler",
"com.google.devtools.build.lib.collect.nestedset.NestedSet",
"java.util.Arrays",
"java.util.HashMap",
"java.util.Map"
] | import com.google.devtools.build.lib.actions.cache.ActionCache; import com.google.devtools.build.lib.actions.cache.DigestUtils; import com.google.devtools.build.lib.actions.cache.MetadataHandler; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import java.util.Arrays; import java.util.HashMap; import ... | import com.google.devtools.build.lib.actions.cache.*; import com.google.devtools.build.lib.collect.nestedset.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,638,796 |
public void onConnected() {
disconnected = false;
((vt320) buffer).reset();
// We no longer need our local output.
localOutput.clear();
// previously tried vt100 and xterm for emulation modes
// "screen" works the best for color and escape codes
((vt320) buffer).setAnswerBack(emulation);
if (Host... | void function() { disconnected = false; ((vt320) buffer).reset(); localOutput.clear(); ((vt320) buffer).setAnswerBack(emulation); if (HostDatabase.DELKEY_BACKSPACE.equals(host.getDelKey())) ((vt320) buffer).setBackspace(vt320.DELETE_IS_BACKSPACE); else ((vt320) buffer).setBackspace(vt320.DELETE_IS_DEL); relay = new Rel... | /**
* Internal method to request actual PTY terminal once we've finished
* authentication. If called before authenticated, it will just fail.
*/ | Internal method to request actual PTY terminal once we've finished authentication. If called before authenticated, it will just fail | onConnected | {
"repo_name": "rhansby/connectbot",
"path": "app/src/main/java/org/connectbot/service/TerminalBridge.java",
"license": "apache-2.0",
"size": 29733
} | [
"org.connectbot.util.HostDatabase"
] | import org.connectbot.util.HostDatabase; | import org.connectbot.util.*; | [
"org.connectbot.util"
] | org.connectbot.util; | 873,722 |
public DocumentReference createDocumentReference(DocumentReference reference, Locale locale)
{
return new DocumentReference(reference, locale);
} | DocumentReference function(DocumentReference reference, Locale locale) { return new DocumentReference(reference, locale); } | /**
* Create a new reference with the passed {@link Locale}.
*
* @param reference the reference (with or without locale)
* @param locale the locale of the new reference
* @return the typed Document Reference object
* @since 5.4RC1
*/ | Create a new reference with the passed <code>Locale</code> | createDocumentReference | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-model/xwiki-platform-model-api/src/main/java/org/xwiki/model/script/ModelScriptService.java",
"license": "lgpl-2.1",
"size": 44760
} | [
"java.util.Locale",
"org.xwiki.model.reference.DocumentReference"
] | import java.util.Locale; import org.xwiki.model.reference.DocumentReference; | import java.util.*; import org.xwiki.model.reference.*; | [
"java.util",
"org.xwiki.model"
] | java.util; org.xwiki.model; | 1,113,236 |
Stopwatch stopwatch = Stopwatch.createStarted();
String ticket = UUID.randomUUID().toString();
requestQueue.put(ticket, request);
logger.debug("Queue size: {}, store time: {}", requestQueue.size(), stopwatch.stop());
return ticket;
}
/**
* Restore a {@link Request} using a unique identifier. ... | Stopwatch stopwatch = Stopwatch.createStarted(); String ticket = UUID.randomUUID().toString(); requestQueue.put(ticket, request); logger.debug(STR, requestQueue.size(), stopwatch.stop()); return ticket; } /** * Restore a {@link Request} using a unique identifier. The identifier can only be used once. If * no Request wa... | /**
* Store a {@link Request} and get a unique identifier to fetch it later on.
*
* @param request the {@link Request}.
* @return a unique identifier used to fetch the request.
*/ | Store a <code>Request</code> and get a unique identifier to fetch it later on | store | {
"repo_name": "ChangeTimeEU/Java-OCA-OCPP",
"path": "ocpp-common/src/main/java/eu/chargetime/ocpp/Queue.java",
"license": "mit",
"size": 3303
} | [
"eu.chargetime.ocpp.model.Request",
"eu.chargetime.ocpp.utilities.Stopwatch",
"java.util.UUID"
] | import eu.chargetime.ocpp.model.Request; import eu.chargetime.ocpp.utilities.Stopwatch; import java.util.UUID; | import eu.chargetime.ocpp.model.*; import eu.chargetime.ocpp.utilities.*; import java.util.*; | [
"eu.chargetime.ocpp",
"java.util"
] | eu.chargetime.ocpp; java.util; | 2,708,849 |
public static int getValueAsInt(Cell cell) {
if (cell instanceof ByteBufferExtendedCell) {
return ByteBufferUtils.toInt(((ByteBufferExtendedCell) cell).getValueByteBuffer(),
((ByteBufferExtendedCell) cell).getValuePosition());
}
return Bytes.toInt(cell.getValueArray(), cell.getValueOffset())... | static int function(Cell cell) { if (cell instanceof ByteBufferExtendedCell) { return ByteBufferUtils.toInt(((ByteBufferExtendedCell) cell).getValueByteBuffer(), ((ByteBufferExtendedCell) cell).getValuePosition()); } return Bytes.toInt(cell.getValueArray(), cell.getValueOffset()); } | /**
* Converts the value bytes of the given cell into a int value
* @param cell
* @return value as int
*/ | Converts the value bytes of the given cell into a int value | getValueAsInt | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java",
"license": "apache-2.0",
"size": 99961
} | [
"org.apache.hadoop.hbase.util.ByteBufferUtils",
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.ByteBufferUtils; import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 848,754 |
private float getParamFloat(StringTokenizer s)
{
String val = s.nextToken();
val = s.nextToken();
return Float.parseFloat(val);
}
| float function(StringTokenizer s) { String val = s.nextToken(); val = s.nextToken(); return Float.parseFloat(val); } | /** obtain a float value from the parameter file
@param s is the StringTokenizer */ | obtain a float value from the parameter file | getParamFloat | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/Algorithms/LQD/preprocess/Expert/parameters.java",
"license": "gpl-3.0",
"size": 8250
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,115,230 |
public static void main(String[] args) {
System.setProperty("jdk.net.registerGopherProtocol", "true"); // does not work, not soon enough?
Logger log = LogManager.getLogger(URIReader.class.getName());
int iarg = 0;
try {
if (args.length == 0) { // without an argument, seve... | static void function(String[] args) { System.setProperty(STR, "true"); Logger log = LogManager.getLogger(URIReader.class.getName()); int iarg = 0; try { if (args.length == 0) { new URIReader(STRhttp: , STR , STRnews: , STRfile: , STRtelnet:teherba.orgSTRverbatim:STRdata:this+is%20the+text+to+be+readSTRURL STR okSTR fai... | /** Test method: read from an URI.
* @param args command line arguments
* <pre>
* java -cp dist/common.jar org.teherba.common.URIReader [uri [enc [args]]]
* </pre>
* Without any argument, the program tries a set of URI schemas/protocols, and
* shows whether the JVM has a handler for ... | Test method: read from an URI | main | {
"repo_name": "gfis/dbat",
"path": "src/main/java/org/teherba/common/URIReader.java",
"license": "apache-2.0",
"size": 35492
} | [
"java.util.Arrays",
"org.apache.logging.log4j.LogManager",
"org.apache.logging.log4j.Logger"
] | import java.util.Arrays; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; | import java.util.*; import org.apache.logging.log4j.*; | [
"java.util",
"org.apache.logging"
] | java.util; org.apache.logging; | 1,808,942 |
public Book getCurrent() {
if (LOG.isDebugEnabled()) LOG.debug("getCurrent");
return this.current;
}
| Book function() { if (LOG.isDebugEnabled()) LOG.debug(STR); return this.current; } | /**
* Get current entity
* @return current entity
*/ | Get current entity | getCurrent | {
"repo_name": "faten2015/Struts2-Rest-Jpa-BootStap",
"path": "src/main/java/org/demo/book/action/Actions.java",
"license": "mit",
"size": 2109
} | [
"org.demo.book.bean.Book"
] | import org.demo.book.bean.Book; | import org.demo.book.bean.*; | [
"org.demo.book"
] | org.demo.book; | 597,599 |
public static boolean parallelFilterRenderNoStitch(String outputPath)
{
try {
RectangleRDD spatialRDD = new RectangleRDD(sparkContext, RectangleInputLocation, RectangleSplitter, false, RectangleNumPartitions, StorageLevel.MEMORY_ONLY());
HeatMap visualizationOperator = new HeatMa... | static boolean function(String outputPath) { try { RectangleRDD spatialRDD = new RectangleRDD(sparkContext, RectangleInputLocation, RectangleSplitter, false, RectangleNumPartitions, StorageLevel.MEMORY_ONLY()); HeatMap visualizationOperator = new HeatMap(1000, 600, USMainLandBoundary, false, 2, 4, 4, true, true); visua... | /**
* Parallel filter render no stitch.
*
* @param outputPath the output path
* @return true, if successful
*/ | Parallel filter render no stitch | parallelFilterRenderNoStitch | {
"repo_name": "Sarwat/GeoSpark",
"path": "viz/src/main/java/org/datasyslab/geosparkviz/showcase/Example.java",
"license": "mit",
"size": 16958
} | [
"org.apache.spark.storage.StorageLevel",
"org.datasyslab.geospark.spatialRDD.RectangleRDD",
"org.datasyslab.geosparkviz.extension.imageGenerator.GeoSparkVizImageGenerator",
"org.datasyslab.geosparkviz.extension.visualizationEffect.HeatMap",
"org.datasyslab.geosparkviz.utils.ImageType"
] | import org.apache.spark.storage.StorageLevel; import org.datasyslab.geospark.spatialRDD.RectangleRDD; import org.datasyslab.geosparkviz.extension.imageGenerator.GeoSparkVizImageGenerator; import org.datasyslab.geosparkviz.extension.visualizationEffect.HeatMap; import org.datasyslab.geosparkviz.utils.ImageType; | import org.apache.spark.storage.*; import org.datasyslab.geospark.*; import org.datasyslab.geosparkviz.extension.*; import org.datasyslab.geosparkviz.utils.*; | [
"org.apache.spark",
"org.datasyslab.geospark",
"org.datasyslab.geosparkviz"
] | org.apache.spark; org.datasyslab.geospark; org.datasyslab.geosparkviz; | 1,839,316 |
@Test
public void RSSamlIDPInitiatedConfigTests_setAllPureSamlAttributes() throws Exception {
RSSamlConfigSettings updatedRsSamlSettings = rsConfigSettings.copyConfigSettings();
RSSamlProviderSettings rsSamlProviderSettings = updatedRsSamlSettings.getDefaultRSSamlProviderSettings();
rs... | void function() throws Exception { RSSamlConfigSettings updatedRsSamlSettings = rsConfigSettings.copyConfigSettings(); RSSamlProviderSettings rsSamlProviderSettings = updatedRsSamlSettings.getDefaultRSSamlProviderSettings(); rsSamlProviderSettings.nullifyPureSamlAttributes(); rsSamlProviderSettings.setAuthnRequestsSign... | /**
* Test purpose: - Set all pure SAML attributes to random or non-default
* values Expected results: - The runtime should ignore all pure SAML
* attributes. - The SAML token should be successfully processed by JAX-RS.
*
* @throws Exception
*/ | Test purpose: - Set all pure SAML attributes to random or non-default values Expected results: - The runtime should ignore all pure SAML attributes. - The SAML token should be successfully processed by JAX-RS | RSSamlIDPInitiatedConfigTests_setAllPureSamlAttributes | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.saml.sso_fat.jaxrs.config/fat/src/com/ibm/ws/security/saml/fat/jaxrs/config/IDPInitiated/RSSamlIDPInitiatedMiscConfigTests.java",
"license": "epl-1.0",
"size": 47360
} | [
"com.ibm.ws.security.fat.common.Utils",
"com.ibm.ws.security.saml.fat.jaxrs.config.utils.RSSamlConfigSettings",
"com.ibm.ws.security.saml.fat.jaxrs.config.utils.RSSamlProviderSettings",
"com.ibm.ws.security.saml20.fat.commonTest.SAMLTestSettings",
"java.util.List"
] | import com.ibm.ws.security.fat.common.Utils; import com.ibm.ws.security.saml.fat.jaxrs.config.utils.RSSamlConfigSettings; import com.ibm.ws.security.saml.fat.jaxrs.config.utils.RSSamlProviderSettings; import com.ibm.ws.security.saml20.fat.commonTest.SAMLTestSettings; import java.util.List; | import com.ibm.ws.security.fat.common.*; import com.ibm.ws.security.saml.fat.jaxrs.config.utils.*; import com.ibm.ws.security.saml20.fat.*; import java.util.*; | [
"com.ibm.ws",
"java.util"
] | com.ibm.ws; java.util; | 1,874,732 |
public IdeaDetail getIdeaDetail(String ideaKey, boolean isAdmin) throws IdeasExchangeException {
Idea idea = ideaService.getIdeaByKey(ideaKey);
if (idea == null)
return null;
if (Idea.STATUS_PUBLISHED.equalsIgnoreCase(idea.getStatus())
|| Idea.STATUS_DUPLI... | IdeaDetail function(String ideaKey, boolean isAdmin) throws IdeasExchangeException { Idea idea = ideaService.getIdeaByKey(ideaKey); if (idea == null) return null; if (Idea.STATUS_PUBLISHED.equalsIgnoreCase(idea.getStatus()) Idea.STATUS_DUPLICATE.equalsIgnoreCase(idea.getStatus()) isAdmin) { return convertToIdeaDetail(i... | /**
* Gets idea details for the given idea key. For non admin request, only
* published and duplicate ideas are fetched.
* For admin requests, ideas with all statuses are fetched.
*
* @param ideaKey the key of the idea whose details are to be fetched
* @param isAdmin boolean that indicate... | Gets idea details for the given idea key. For non admin request, only published and duplicate ideas are fetched. For admin requests, ideas with all statuses are fetched | getIdeaDetail | {
"repo_name": "akrain/thoughtsite",
"path": "src/main/java/com/google/ie/common/builder/IdeaBuilder.java",
"license": "apache-2.0",
"size": 10732
} | [
"com.google.ie.business.domain.Idea",
"com.google.ie.common.exception.IdeasExchangeException",
"com.google.ie.dto.IdeaDetail"
] | import com.google.ie.business.domain.Idea; import com.google.ie.common.exception.IdeasExchangeException; import com.google.ie.dto.IdeaDetail; | import com.google.ie.business.domain.*; import com.google.ie.common.exception.*; import com.google.ie.dto.*; | [
"com.google.ie"
] | com.google.ie; | 2,389,469 |
private void updateBaseMatrix(Drawable d) {
ImageView imageView = getImageView();
if (null == imageView || null == d) {
return;
}
final float viewWidth = imageView.getWidth();
final float viewHeight = imageView.getHeight();
final int drawableWidth = d.get... | void function(Drawable d) { ImageView imageView = getImageView(); if (null == imageView null == d) { return; } final float viewWidth = imageView.getWidth(); final float viewHeight = imageView.getHeight(); final int drawableWidth = d.getIntrinsicWidth(); final int drawableHeight = d.getIntrinsicHeight(); mBaseMatrix.res... | /**
* Calculate Matrix for FIT_CENTER
*
* @param d
* - Drawable being displayed
*/ | Calculate Matrix for FIT_CENTER | updateBaseMatrix | {
"repo_name": "lujianzhi/photoalbum",
"path": "app/src/main/java/com/lujianzhi/photoalbum/view/photoview/PhotoViewAttacher.java",
"license": "gpl-2.0",
"size": 32914
} | [
"android.graphics.Matrix",
"android.graphics.RectF",
"android.graphics.drawable.Drawable",
"android.widget.ImageView"
] | import android.graphics.Matrix; import android.graphics.RectF; import android.graphics.drawable.Drawable; import android.widget.ImageView; | import android.graphics.*; import android.graphics.drawable.*; import android.widget.*; | [
"android.graphics",
"android.widget"
] | android.graphics; android.widget; | 1,544,730 |
static void writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions) {
XMLOutputFactory xof = XMLOutputFactory.newInstance();
xof.setProperty("javax.xml.stream.isRepairingNamespaces", true);
XMLStreamWriter sw = null;
try {
sw = xof.createXMLStream... | static void writeDependenciesFeature(Writer writer, ProvisionOption<?>... provisionOptions) { XMLOutputFactory xof = XMLOutputFactory.newInstance(); xof.setProperty(STR, true); XMLStreamWriter sw = null; try { sw = xof.createXMLStreamWriter(writer); sw.writeStartDocument("UTF-8", "1.0"); sw.setDefaultNamespace(KARAF_FE... | /**
* Write a feature xml structure for test dependencies specified as ProvisionOption
* in system to the given writer
*
* @param writer where to write the feature xml
* @param provisionOptions dependencies
*/ | Write a feature xml structure for test dependencies specified as ProvisionOption in system to the given writer | writeDependenciesFeature | {
"repo_name": "ops4j/org.ops4j.pax.exam2",
"path": "containers/pax-exam-container-karaf/src/main/java/org/ops4j/pax/exam/karaf/container/internal/DependenciesDeployer.java",
"license": "apache-2.0",
"size": 7595
} | [
"java.io.Writer",
"javax.xml.stream.XMLOutputFactory",
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamWriter",
"org.ops4j.pax.exam.options.ProvisionOption"
] | import java.io.Writer; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.ops4j.pax.exam.options.ProvisionOption; | import java.io.*; import javax.xml.stream.*; import org.ops4j.pax.exam.options.*; | [
"java.io",
"javax.xml",
"org.ops4j.pax"
] | java.io; javax.xml; org.ops4j.pax; | 1,790,375 |
public VnodeState verify(ReadTransaction rtx, VlanMap vlmap) {
assertEquals(mapId, vlmap.getMapId());
NodeId node = (nodeId == null)
? null
: new NodeId(nodeId);
Boolean act = active;
if (act == null) {
// Determine the expected state of the VLAN... | VnodeState function(ReadTransaction rtx, VlanMap vlmap) { assertEquals(mapId, vlmap.getMapId()); NodeId node = (nodeId == null) ? null : new NodeId(nodeId); Boolean act = active; if (act == null) { act = (nodeId == null) ? Boolean.TRUE : InventoryUtils.hasEdgePort(rtx, nodeId); } Integer v = (vlanId == null) ? DEFAULT_... | /**
* Verify the given VLAN mapping.
*
* @param rtx A read-only MD-SAL datastore transaction.
* @param vlmap The VLAN mapping to be verified.
* @return A {@link VnodeState} instance that indicates the stauts of the
* VLAN mapping.
*/ | Verify the given VLAN mapping | verify | {
"repo_name": "opendaylight/vtn",
"path": "manager/it/util/src/main/java/org/opendaylight/vtn/manager/it/util/vnode/VTNVlanMapConfig.java",
"license": "epl-1.0",
"size": 11442
} | [
"org.junit.Assert",
"org.opendaylight.controller.md.sal.binding.api.ReadTransaction",
"org.opendaylight.vtn.manager.it.util.inventory.InventoryUtils",
"org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId",
"org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId",
"org... | import org.junit.Assert; import org.opendaylight.controller.md.sal.binding.api.ReadTransaction; import org.opendaylight.vtn.manager.it.util.inventory.InventoryUtils; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.V... | import org.junit.*; import org.opendaylight.controller.md.sal.binding.api.*; import org.opendaylight.vtn.manager.it.util.inventory.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.*; import org.opendaylight.yang.gen.v1... | [
"org.junit",
"org.opendaylight.controller",
"org.opendaylight.vtn",
"org.opendaylight.yang"
] | org.junit; org.opendaylight.controller; org.opendaylight.vtn; org.opendaylight.yang; | 2,327,331 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ConfigurationProfileAssignmentInner>> listByResourceGroupSinglePageAsync(
String resourceGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ConfigurationProfileAssignmentInner>> function( String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalA... | /**
* Get list of configuration profile assignments.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @thr... | Get list of configuration profile assignments | listByResourceGroupSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automanage/azure-resourcemanager-automanage/src/main/java/com/azure/resourcemanager/automanage/implementation/ConfigurationProfileAssignmentsClientImpl.java",
"license": "mit",
"size": 48461
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.automanage.fluent.models.ConfigurationProfileAssignmentInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.automanage.fluent.models.ConfigurationProfileAssignmentInner... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.automanage.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,681,756 |
public default <E2> void forEachRemaining(final Class<E2> endType, final Consumer<E2> consumer) {
try {
while (true) {
consumer.accept((E2) next());
}
} catch (final NoSuchElementException ignore) {
}
} | default <E2> void function(final Class<E2> endType, final Consumer<E2> consumer) { try { while (true) { consumer.accept((E2) next()); } } catch (final NoSuchElementException ignore) { } } | /**
* A traversal can be rewritten such that its defined end type E may yield objects of a different type.
* This helper method allows for the casting of the output to the known the type.
*
* @param endType the true output type of the traversal
* @param consumer a {@link Consumer} to process e... | A traversal can be rewritten such that its defined end type E may yield objects of a different type. This helper method allows for the casting of the output to the known the type | forEachRemaining | {
"repo_name": "dalaro/incubator-tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java",
"license": "apache-2.0",
"size": 19839
} | [
"java.util.NoSuchElementException",
"java.util.function.Consumer"
] | import java.util.NoSuchElementException; import java.util.function.Consumer; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 2,175,052 |
public final EditOptions inputStyle(@StyleRes int resId) {
updateIsSet(INPUT_CONFIG);
if (inputConfigStyle != resId) {
this.inputConfigStyle = resId;
notifyChanged();
}
return this;
} | final EditOptions function(@StyleRes int resId) { updateIsSet(INPUT_CONFIG); if (inputConfigStyle != resId) { this.inputConfigStyle = resId; notifyChanged(); } return this; } | /**
* Sets a resource id of the style containing attributes for configuration options for input
* of a dialog associated with these options.
*
* @param resId Resource id of the desired style.
* @return These options to allow methods chaining.
* @see R.attr#dialogInp... | Sets a resource id of the style containing attributes for configuration options for input of a dialog associated with these options | inputStyle | {
"repo_name": "android-libraries/android_dialogs",
"path": "library/src/common/input/java/com/albedinsky/android/dialog/EditDialog.java",
"license": "apache-2.0",
"size": 22899
} | [
"android.support.annotation.StyleRes"
] | import android.support.annotation.StyleRes; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 2,689,424 |
public final void setPasswordEncoder(final PasswordEncoder passwordEncoder) {
this.passwordEncoder = passwordEncoder;
} | final void function(final PasswordEncoder passwordEncoder) { this.passwordEncoder = passwordEncoder; } | /**
* Sets the PasswordEncoder to be used with this class.
*
* @param passwordEncoder the PasswordEncoder to use when encoding
* passwords.
*/ | Sets the PasswordEncoder to be used with this class | setPasswordEncoder | {
"repo_name": "keshvari/cas",
"path": "cas-server-core/src/main/java/org/jasig/cas/authentication/handler/support/AbstractUsernamePasswordAuthenticationHandler.java",
"license": "apache-2.0",
"size": 6364
} | [
"org.jasig.cas.authentication.handler.PasswordEncoder"
] | import org.jasig.cas.authentication.handler.PasswordEncoder; | import org.jasig.cas.authentication.handler.*; | [
"org.jasig.cas"
] | org.jasig.cas; | 187,752 |
@Test
public void testNamespaceVerifiedOnFileTransfer() throws IOException {
MiniDFSCluster cluster = null;
Configuration conf = new HdfsConfiguration();
try {
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0)
.format(true).build();
NamenodeProtocols nn = clust... | void function() throws IOException { MiniDFSCluster cluster = null; Configuration conf = new HdfsConfiguration(); try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0) .format(true).build(); NamenodeProtocols nn = cluster.getNameNodeRpc(); String fsName = NetUtils.getHostPortString( cluster.getNameNode().get... | /**
* Test that the primary NN will not serve any files to a 2NN who doesn't
* share its namespace ID, and also will not accept any files from one.
*/ | Test that the primary NN will not serve any files to a 2NN who doesn't share its namespace ID, and also will not accept any files from one | testNamespaceVerifiedOnFileTransfer | {
"repo_name": "ict-carch/hadoop-plus",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java",
"license": "apache-2.0",
"size": 83413
} | [
"com.google.common.collect.Lists",
"java.io.File",
"java.io.IOException",
"java.net.InetSocketAddress",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.HdfsConfiguration",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache.hadoop.hdfs.server.common.StorageInfo",
"org.apache.hadoop.... | import com.google.common.collect.Lists; import java.io.File; import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.server.common.StorageInfo;... | import com.google.common.collect.*; import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.net.*; impo... | [
"com.google.common",
"java.io",
"java.net",
"org.apache.hadoop",
"org.junit",
"org.mockito"
] | com.google.common; java.io; java.net; org.apache.hadoop; org.junit; org.mockito; | 2,121,380 |
final Map userData = JvmContextFactory.getUserData();
return getTableDatas(userData);
} | final Map userData = JvmContextFactory.getUserData(); return getTableDatas(userData); } | /**
* Call <code>getTableDatas(JvmContextFactory.getUserData())</code>.
**/ | Call <code>getTableDatas(JvmContextFactory.getUserData())</code> | getTableHandler | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java",
"license": "mit",
"size": 10235
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,069,633 |
void checkKey() throws IOException {
if (klen >= 0) return;
if (atEnd()) {
throw new EOFException("No key-value to read");
}
klen = -1;
vlen = -1;
valueChecked = false;
klen = Utils.readVInt(blkReader);
blkReader.readFully(keyBuffer, 0, kl... | void checkKey() throws IOException { if (klen >= 0) return; if (atEnd()) { throw new EOFException(STR); } klen = -1; vlen = -1; valueChecked = false; klen = Utils.readVInt(blkReader); blkReader.readFully(keyBuffer, 0, klen); valueBufferInputStream.reset(blkReader); if (valueBufferInputStream.isLastChunk()) { vlen = val... | /**
* check whether we have already successfully obtained the key. It also
* initializes the valueInputStream.
*/ | check whether we have already successfully obtained the key. It also initializes the valueInputStream | checkKey | {
"repo_name": "hanhlh/hadoop-0.20.2_FatBTree",
"path": "src/core/org/apache/hadoop/io/file/tfile/TFile.java",
"license": "apache-2.0",
"size": 78806
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 689,935 |
@Transactional(readOnly = true)
public IntervalActivity getActivity(Predicate<ActiveSession> activeSessionFilter,
int topQueriesCount) {
checkNotNull(activeSessionFilter);
List<AshSnapshot> snapshots = agent.getSnapshots();
long start = snapshots.isEmpty() ? 0 : snapshots.get(0).timestamp;
l... | @Transactional(readOnly = true) IntervalActivity function(Predicate<ActiveSession> activeSessionFilter, int topQueriesCount) { checkNotNull(activeSessionFilter); List<AshSnapshot> snapshots = agent.getSnapshots(); long start = snapshots.isEmpty() ? 0 : snapshots.get(0).timestamp; long end = snapshots.isEmpty() ? 0 : It... | /**
* Returns activity data from the snapshots currently in memory.
*
* @param activeSessionFilter a predicate for session filtering
* @param topQueriesCount number of statements to return
* @return activity data for the sessions that satisfy the predicate
*/ | Returns activity data from the snapshots currently in memory | getActivity | {
"repo_name": "fernandopeinado/ora_manager",
"path": "src/main/java/br/com/cas10/oraman/agent/ash/Ash.java",
"license": "apache-2.0",
"size": 7977
} | [
"br.com.cas10.oraman.oracle.data.ActiveSession",
"com.google.common.base.Preconditions",
"com.google.common.collect.Iterables",
"java.util.List",
"java.util.function.Predicate",
"org.springframework.transaction.annotation.Transactional"
] | import br.com.cas10.oraman.oracle.data.ActiveSession; import com.google.common.base.Preconditions; import com.google.common.collect.Iterables; import java.util.List; import java.util.function.Predicate; import org.springframework.transaction.annotation.Transactional; | import br.com.cas10.oraman.oracle.data.*; import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import java.util.function.*; import org.springframework.transaction.annotation.*; | [
"br.com.cas10",
"com.google.common",
"java.util",
"org.springframework.transaction"
] | br.com.cas10; com.google.common; java.util; org.springframework.transaction; | 2,582,784 |
public static void exportObject(Remote obj)
throws RemoteException {
// Let the delegate do everything, including error handling.
if (proDelegate != null) {
proDelegate.exportObject(obj);
}
} | static void function(Remote obj) throws RemoteException { if (proDelegate != null) { proDelegate.exportObject(obj); } } | /**
* Makes a server object ready to receive remote calls. Note
* that subclasses of PortableRemoteObject do not need to call this
* method, as it is called by the constructor.
* @param obj the server object to export.
* @exception RemoteException if export fails.
*/ | Makes a server object ready to receive remote calls. Note that subclasses of PortableRemoteObject do not need to call this method, as it is called by the constructor | exportObject | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/corba/src/java.corba/share/classes/javax/rmi/PortableRemoteObject.java",
"license": "gpl-2.0",
"size": 10486
} | [
"java.rmi.Remote",
"java.rmi.RemoteException"
] | import java.rmi.Remote; import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 1,635,209 |
public void testEquals() {
TickLabelEntity e1 = new TickLabelEntity(
new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), "ToolTip", "URL"
);
TickLabelEntity e2 = new TickLabelEntity(
new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), "ToolTip", "URL"
);
assertTrue(... | void function() { TickLabelEntity e1 = new TickLabelEntity( new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), STR, "URL" ); TickLabelEntity e2 = new TickLabelEntity( new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0), STR, "URL" ); assertTrue(e1.equals(e2)); e1.setArea(new Rectangle2D.Double(4.0, 3.0, 2.0, 1.0)); assertFalse(e1.equa... | /**
* Confirm that the equals method can distinguish all the required fields.
*/ | Confirm that the equals method can distinguish all the required fields | testEquals | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/entity/junit/TickLabelEntityTests.java",
"license": "lgpl-3.0",
"size": 4798
} | [
"java.awt.geom.Rectangle2D",
"org.jfree.chart.entity.TickLabelEntity"
] | import java.awt.geom.Rectangle2D; import org.jfree.chart.entity.TickLabelEntity; | import java.awt.geom.*; import org.jfree.chart.entity.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,342,694 |
public void testNull() throws ValidatorException
{
Mock mock = buildMockUIComponent();
UIComponent component = (UIComponent) mock.proxy();
MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
LongRangeValidator validator = new LongRangeValidator();
doTestNull(facesConte... | void function() throws ValidatorException { Mock mock = buildMockUIComponent(); UIComponent component = (UIComponent) mock.proxy(); MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component); LongRangeValidator validator = new LongRangeValidator(); doTestNull(facesContext, wrapper, validator); } | /**
* Tests that null returns immediately.
*
* @throws ValidatorException when test fails
*/ | Tests that null returns immediately | testNull | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java",
"license": "apache-2.0",
"size": 6705
} | [
"javax.faces.component.UIComponent",
"javax.faces.validator.ValidatorException",
"org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper",
"org.jmock.Mock"
] | import javax.faces.component.UIComponent; import javax.faces.validator.ValidatorException; import org.apache.myfaces.trinidadbuild.test.MockUIComponentWrapper; import org.jmock.Mock; | import javax.faces.component.*; import javax.faces.validator.*; import org.apache.myfaces.trinidadbuild.test.*; import org.jmock.*; | [
"javax.faces",
"org.apache.myfaces",
"org.jmock"
] | javax.faces; org.apache.myfaces; org.jmock; | 315,858 |
Future<StackTraceSampleResponse> requestStackTraceSample(
final ExecutionAttemptID executionAttemptID,
final int sampleId,
final int numSamples,
final Time delayBetweenSamples,
final int maxStackTraceDepth,
final Time timeout); | Future<StackTraceSampleResponse> requestStackTraceSample( final ExecutionAttemptID executionAttemptID, final int sampleId, final int numSamples, final Time delayBetweenSamples, final int maxStackTraceDepth, final Time timeout); | /**
* Request a stack trace sample from the given task.
*
* @param executionAttemptID identifying the task to sample
* @param sampleId of the sample
* @param numSamples to take from the given task
* @param delayBetweenSamples to wait for
* @param maxStackTraceDepth of the returned sample
* @param timeou... | Request a stack trace sample from the given task | requestStackTraceSample | {
"repo_name": "hongyuhong/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/slots/TaskManagerGateway.java",
"license": "apache-2.0",
"size": 6127
} | [
"org.apache.flink.api.common.time.Time",
"org.apache.flink.runtime.concurrent.Future",
"org.apache.flink.runtime.executiongraph.ExecutionAttemptID",
"org.apache.flink.runtime.messages.StackTraceSampleResponse"
] | import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.concurrent.Future; import org.apache.flink.runtime.executiongraph.ExecutionAttemptID; import org.apache.flink.runtime.messages.StackTraceSampleResponse; | import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.messages.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,076,530 |
public void unRegisterRuntime(Runtime runtime) {
Utils.checkSecurity();
runtimeList.remove(runtime);
} | void function(Runtime runtime) { Utils.checkSecurity(); runtimeList.remove(runtime); } | /**
* Un-register runtime instance on RuntimeManager.
*
* @param runtime - runtime to be un-registered
*/ | Un-register runtime instance on RuntimeManager | unRegisterRuntime | {
"repo_name": "nilminiwso2/carbon-kernel-1",
"path": "core/src/main/java/org/wso2/carbon/kernel/internal/runtime/RuntimeManager.java",
"license": "apache-2.0",
"size": 1840
} | [
"org.wso2.carbon.kernel.runtime.Runtime",
"org.wso2.carbon.kernel.utils.Utils"
] | import org.wso2.carbon.kernel.runtime.Runtime; import org.wso2.carbon.kernel.utils.Utils; | import org.wso2.carbon.kernel.runtime.*; import org.wso2.carbon.kernel.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,594,939 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<CertificateInner>> createOrUpdateWithResponseAsync(
String resourceGroupName, String name, CertificateInner certificateEnvelope, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<CertificateInner>> function( String resourceGroupName, String name, CertificateInner certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { retu... | /**
* Create or update a certificate.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the certificate.
* @param certificateEnvelope Details of certificate, if it exists already.
* @param context The context to associate with this... | Create or update a certificate | createOrUpdateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/CertificatesClientImpl.java",
"license": "mit",
"size": 58437
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.CertificateInner"
] | 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.appservice.fluent.models.CertificateInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,651,652 |
private void loggerLog(int level, String message, String category, String errorInfo) {
IgniteLogger log = ctx.grid().log();
if (category != null)
log = log.getLogger(category);
Throwable err = errorInfo == null ? null : new IgniteException("Platform error:" + errorInfo);
... | void function(int level, String message, String category, String errorInfo) { IgniteLogger log = ctx.grid().log(); if (category != null) log = log.getLogger(category); Throwable err = errorInfo == null ? null : new IgniteException(STR + errorInfo); switch (level) { case PlatformLogger.LVL_TRACE: log.trace(message); bre... | /**
* Logs to the Ignite logger.
*
* @param level Level.
* @param message Message.
* @param category Category.
* @param errorInfo Exception.
*/ | Logs to the Ignite logger | loggerLog | {
"repo_name": "vadopolski/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessorImpl.java",
"license": "apache-2.0",
"size": 26324
} | [
"org.apache.ignite.IgniteException",
"org.apache.ignite.IgniteLogger",
"org.apache.ignite.internal.logger.platform.PlatformLogger"
] | import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.logger.platform.PlatformLogger; | import org.apache.ignite.*; import org.apache.ignite.internal.logger.platform.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 350,433 |
public Process exec(String[] cmd) throws IOException
{
return exec(cmd, null, null);
} | Process function(String[] cmd) throws IOException { return exec(cmd, null, null); } | /**
* Create a new subprocess with the specified command line, already
* tokenized. Calls <code>exec(cmd, null, null)</code>. A security check
* is performed, <code>checkExec</code>.
*
* @param cmd the command to call
* @return the Process object
* @throws SecurityException if permission is denied
... | Create a new subprocess with the specified command line, already tokenized. Calls <code>exec(cmd, null, null)</code>. A security check is performed, <code>checkExec</code> | exec | {
"repo_name": "kaffe/kaffe",
"path": "libraries/javalib/vmspecific/java/lang/Runtime.java",
"license": "lgpl-2.1",
"size": 29459
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 368,714 |
public static int[] findDirty(
final StandardProperty[] properties,
final Object[] x,
final Object[] y,
final boolean[][] includeColumns,
final boolean anyUninitializedProperties,
final SessionImplementor session)
throws HibernateException {
int[] results = null;
int count = 0;
int span ... | static int[] function( final StandardProperty[] properties, final Object[] x, final Object[] y, final boolean[][] includeColumns, final boolean anyUninitializedProperties, final SessionImplementor session) throws HibernateException { int[] results = null; int count = 0; int span = properties.length; for ( int i = 0; i ... | /**
* Determine if any of the given field values are dirty, returning an array containing
* indexes of the dirty fields or <tt>null</tt> if no fields are dirty.
* @param x the current state of the entity
* @param y the snapshot state from the time the object was loaded
*/ | Determine if any of the given field values are dirty, returning an array containing indexes of the dirty fields or null if no fields are dirty | findDirty | {
"repo_name": "raedle/univis",
"path": "lib/hibernate-3.1.3/src/org/hibernate/type/TypeFactory.java",
"license": "lgpl-2.1",
"size": 18643
} | [
"org.hibernate.HibernateException",
"org.hibernate.engine.SessionImplementor",
"org.hibernate.intercept.LazyPropertyInitializer",
"org.hibernate.tuple.StandardProperty"
] | import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor; import org.hibernate.intercept.LazyPropertyInitializer; import org.hibernate.tuple.StandardProperty; | import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.intercept.*; import org.hibernate.tuple.*; | [
"org.hibernate",
"org.hibernate.engine",
"org.hibernate.intercept",
"org.hibernate.tuple"
] | org.hibernate; org.hibernate.engine; org.hibernate.intercept; org.hibernate.tuple; | 2,881,211 |
@Test
public void testSpentJSONPlates() throws IOException, JAXBException {
for(StackDouble stack : stacks) {
File writerFile = new File("plateToJSON.txt");
PlateWriterDouble writer = new PlateWriterDouble(writerFile);
writer.plateToJSON(stack.toArray());
PlateReaderDouble reade... | void function() throws IOException, JAXBException { for(StackDouble stack : stacks) { File writerFile = new File(STR); PlateWriterDouble writer = new PlateWriterDouble(writerFile); writer.plateToJSON(stack.toArray()); PlateReaderDouble reader = new PlateReaderDouble(writerFile); Iterator<PlateDouble> iter = stack.itera... | /**
* Tests the spent JSON plates method.
* @throws JAXBException
* @throws IOException
*/ | Tests the spent JSON plates method | testSpentJSONPlates | {
"repo_name": "jessemull/MicroFlex",
"path": "src/test/java/com/github/jessemull/microflex/io/iodouble/PlateReaderDoublePlatesTest.java",
"license": "apache-2.0",
"size": 22744
} | [
"com.github.jessemull.microflex.doubleflex.io.PlateReaderDouble",
"com.github.jessemull.microflex.doubleflex.io.PlateWriterDouble",
"com.github.jessemull.microflex.doubleflex.plate.PlateDouble",
"com.github.jessemull.microflex.doubleflex.plate.StackDouble",
"com.github.jessemull.microflex.doubleflex.plate.W... | import com.github.jessemull.microflex.doubleflex.io.PlateReaderDouble; import com.github.jessemull.microflex.doubleflex.io.PlateWriterDouble; import com.github.jessemull.microflex.doubleflex.plate.PlateDouble; import com.github.jessemull.microflex.doubleflex.plate.StackDouble; import com.github.jessemull.microflex.doub... | import com.github.jessemull.microflex.doubleflex.io.*; import com.github.jessemull.microflex.doubleflex.plate.*; import java.io.*; import java.util.*; import javax.xml.bind.*; import org.junit.*; | [
"com.github.jessemull",
"java.io",
"java.util",
"javax.xml",
"org.junit"
] | com.github.jessemull; java.io; java.util; javax.xml; org.junit; | 1,051,674 |
@Test(enabled = false)
public void functionTest() {
final boolean[] tfSet = new boolean[] {true, false };
final double eps = 1.e-6;
final double lower = 85.;
final double upper = 135.;
for (final boolean isCall : tfSet) {
for (final double strike : STRIKES) {
for (final double inte... | @Test(enabled = false) void function() { final boolean[] tfSet = new boolean[] {true, false }; final double eps = 1.e-6; final double lower = 85.; final double upper = 135.; for (final boolean isCall : tfSet) { for (final double strike : STRIKES) { for (final double interest : INTERESTS) { for (final double vol : VOLS)... | /**
* test for analytic formula
*/ | test for analytic formula | functionTest | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/test/java/com/opengamma/analytics/financial/model/option/pricing/tree/DoubleBarrierOptionFunctionProviderTest.java",
"license": "apache-2.0",
"size": 35455
} | [
"org.testng.Assert",
"org.testng.annotations.Test"
] | import org.testng.Assert; import org.testng.annotations.Test; | import org.testng.*; import org.testng.annotations.*; | [
"org.testng",
"org.testng.annotations"
] | org.testng; org.testng.annotations; | 177,396 |
@Test
public void testSFLocalEJBLocalObjectGetEJBLocalHome() throws Exception {
SFLa ejb1 = fhome1.create();
Object tempHome = ejb1.getEJBLocalHome();
assertNotNull("getEJBLocalHome from ejb was null.", tempHome);
SFLaHome home1 = (SFLaHome) tempHome;
assertNotNull("Cast ... | void function() throws Exception { SFLa ejb1 = fhome1.create(); Object tempHome = ejb1.getEJBLocalHome(); assertNotNull(STR, tempHome); SFLaHome home1 = (SFLaHome) tempHome; assertNotNull(STR, home1); ejb1.remove(); } | /**
* (bxj03) Test Stateful local interface EJBLocalObject.getEJBLocalHome.
*/ | (bxj03) Test Stateful local interface EJBLocalObject.getEJBLocalHome | testSFLocalEJBLocalObjectGetEJBLocalHome | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XLocalSpecWeb.war/src/com/ibm/ejb2x/base/spec/sfl/web/SFLocalInterfaceContextServlet.java",
"license": "epl-1.0",
"size": 6626
} | [
"com.ibm.ejb2x.base.spec.sfl.ejb.SFLa",
"com.ibm.ejb2x.base.spec.sfl.ejb.SFLaHome",
"org.junit.Assert"
] | import com.ibm.ejb2x.base.spec.sfl.ejb.SFLa; import com.ibm.ejb2x.base.spec.sfl.ejb.SFLaHome; import org.junit.Assert; | import com.ibm.ejb2x.base.spec.sfl.ejb.*; import org.junit.*; | [
"com.ibm.ejb2x",
"org.junit"
] | com.ibm.ejb2x; org.junit; | 360,727 |
public void connectToServerHistorique(String ip,int port) throws SocketTimeoutException
{
try
{
InetSocketAddress adresse;
adresse = new InetSocketAddress(ip,port);
this.socket = new Socket();
this.socket.connect(adresse,Integer.parseInt(Outils.getProperty("defaultTimeOut")));
}catch (SocketTime... | void function(String ip,int port) throws SocketTimeoutException { try { InetSocketAddress adresse; adresse = new InetSocketAddress(ip,port); this.socket = new Socket(); this.socket.connect(adresse,Integer.parseInt(Outils.getProperty(STR))); }catch (SocketTimeoutException e) { throw new SocketTimeoutException(); }catch ... | /**
* connection to the history server
* @param ip
* @param port
* @throws SocketTimeoutException
*/ | connection to the history server | connectToServerHistorique | {
"repo_name": "michel57/OnlineTicTacToe",
"path": "Client/src/model/HistoryFrameModel.java",
"license": "gpl-2.0",
"size": 4475
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.Socket",
"java.net.SocketTimeoutException",
"java.net.UnknownHostException"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketTimeoutException; import java.net.UnknownHostException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 74,054 |
protected Registry getRegistry(String registryHost, int registryPort,
RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory)
throws RemoteException {
if (registryHost != null) {
// Host explictly specified: only lookup possible.
if (logger.isInfoEnabled()) {
logger... | Registry function(String registryHost, int registryPort, RMIClientSocketFactory clientSocketFactory, RMIServerSocketFactory serverSocketFactory) throws RemoteException { if (registryHost != null) { if (logger.isInfoEnabled()) { logger.info(STR + registryPort + STR + registryHost + "]"); } Registry reg = LocateRegistry.... | /**
* Locate or create the RMI registry for this exporter.
* @param registryHost the registry host to use (if this is specified,
* no implicit creation of a RMI registry will happen)
* @param registryPort the registry port to use
* @param clientSocketFactory the RMI client socket factory for the registry (if ... | Locate or create the RMI registry for this exporter | getRegistry | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/remoting/rmi/RmiServiceExporter.java",
"license": "apache-2.0",
"size": 16880
} | [
"java.rmi.RemoteException",
"java.rmi.registry.LocateRegistry",
"java.rmi.registry.Registry",
"java.rmi.server.RMIClientSocketFactory",
"java.rmi.server.RMIServerSocketFactory"
] | import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.RMIClientSocketFactory; import java.rmi.server.RMIServerSocketFactory; | import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.*; | [
"java.rmi"
] | java.rmi; | 2,114,184 |
//-----------------------------------------------------------------------
public Tenor getStartTenor() {
return _startTenor;
} | Tenor function() { return _startTenor; } | /**
* Gets the start tenor.
* @return the value of the property, not null
*/ | Gets the start tenor | getStartTenor | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/ircurve/strips/FXForwardNode.java",
"license": "apache-2.0",
"size": 16364
} | [
"com.opengamma.util.time.Tenor"
] | import com.opengamma.util.time.Tenor; | import com.opengamma.util.time.*; | [
"com.opengamma.util"
] | com.opengamma.util; | 1,200,568 |
static void addLabelPopupMenu(JLabel label, JMenuItem... menuItems)
{
final JPopupMenu menu = new JPopupMenu();
final Color labelForeground = label.getForeground();
menu.setBorder(new EmptyBorder(5, 5, 5, 5));
for (final JMenuItem menuItem : menuItems)
{
if (menuItem == null)
{
continue;
}
... | static void addLabelPopupMenu(JLabel label, JMenuItem... menuItems) { final JPopupMenu menu = new JPopupMenu(); final Color labelForeground = label.getForeground(); menu.setBorder(new EmptyBorder(5, 5, 5, 5)); for (final JMenuItem menuItem : menuItems) { if (menuItem == null) { continue; } menuItem.addActionListener(e ... | /**
* Adds a mouseover effect to change the text of the passed label to {@link ColorScheme#BRAND_ORANGE} color, and
* adds the passed menu items to a popup menu shown when the label is clicked.
*
* @param label The label to attach the mouseover and click effects to
* @param menuItems The menu items to be ... | Adds a mouseover effect to change the text of the passed label to <code>ColorScheme#BRAND_ORANGE</code> color, and adds the passed menu items to a popup menu shown when the label is clicked | addLabelPopupMenu | {
"repo_name": "l2-/runelite",
"path": "runelite-client/src/main/java/net/runelite/client/plugins/config/PluginListItem.java",
"license": "bsd-2-clause",
"size": 8270
} | [
"java.awt.Color",
"java.awt.event.MouseAdapter",
"javax.swing.JLabel",
"javax.swing.JMenuItem",
"javax.swing.JPopupMenu",
"javax.swing.border.EmptyBorder"
] | import java.awt.Color; import java.awt.event.MouseAdapter; import javax.swing.JLabel; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.border.EmptyBorder; | import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,239,267 |
private void persistMTM()
{
Set<HabitatMToM> habitats1 = new HashSet<HabitatMToM>();
Set<HabitatMToM> habitats2 = new HashSet<HabitatMToM>();
HabitatMToM habitat1 = new HabitatMToM();
habitat1.setAddressId("7");
habitat1.setStreet("downing street");
HabitatMToM ... | void function() { Set<HabitatMToM> habitats1 = new HashSet<HabitatMToM>(); Set<HabitatMToM> habitats2 = new HashSet<HabitatMToM>(); HabitatMToM habitat1 = new HabitatMToM(); habitat1.setAddressId("7"); habitat1.setStreet(STR); HabitatMToM habitat2 = new HabitatMToM(); habitat2.setAddressId("8"); habitat2.setStreet(STR)... | /**
* Persist mtm.
*/ | Persist mtm | persistMTM | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-hbase/kundera-hbase-v2/src/test/java/com/impetus/client/hbase/crud/association/HbaseManyToManyTest.java",
"license": "apache-2.0",
"size": 5668
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,558,664 |
@WebMethod
@WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201502")
@RequestWrapper(localName = "updateProductPackages", targetNamespace = "https://www.google.com/apis/ads/publisher/v201502", className = "com.google.api.ads.dfp.jaxws.v201502.ProductPackageServiceInter... | @WebResult(name = "rval", targetNamespace = STRupdateProductPackagesSTRhttps: @ResponseWrapper(localName = "updateProductPackagesResponseSTRhttps: List<ProductPackage> function( @WebParam(name = "productPackagesSTRhttps: List<ProductPackage> productPackages) throws ApiException_Exception ; | /**
*
* Updates the specified {@link ProductPackage} objects.
*
* @param productPackages the product packages to update
* @return the updated product packages
*
*
* @param productPackages
* @return
* returns java.util.List<c... | Updates the specified <code>ProductPackage</code> objects | updateProductPackages | {
"repo_name": "stoksey69/googleads-java-lib",
"path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201502/ProductPackageServiceInterface.java",
"license": "apache-2.0",
"size": 7879
} | [
"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; | 558,368 |
public Future<AnalysisSubmission> transferAnalysisResults(AnalysisSubmission submittedAnalysis)
throws ExecutionManagerException, IridaWorkflowNotFoundException, IOException,
IridaWorkflowAnalysisTypeException;
/**
* Performs any post processing required for an {@link AnalysisSubmission}. Usually this wil... | Future<AnalysisSubmission> function(AnalysisSubmission submittedAnalysis) throws ExecutionManagerException, IridaWorkflowNotFoundException, IOException, IridaWorkflowAnalysisTypeException; /** * Performs any post processing required for an {@link AnalysisSubmission}. Usually this will be a sample updater implementation... | /**
* Downloads and saves the results of an {@link AnalysisSubmission} that was
* previously submitted from an execution manager.
*
* @param submittedAnalysis
* An {@link AnalysisSubmission} that was previously submitted.
* @return A {@link Future} with an {@link AnalysisSubmission} object
* ... | Downloads and saves the results of an <code>AnalysisSubmission</code> that was previously submitted from an execution manager | transferAnalysisResults | {
"repo_name": "phac-nml/irida",
"path": "src/main/java/ca/corefacility/bioinformatics/irida/service/analysis/execution/AnalysisExecutionService.java",
"license": "apache-2.0",
"size": 5344
} | [
"ca.corefacility.bioinformatics.irida.exceptions.ExecutionManagerException",
"ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowAnalysisTypeException",
"ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowNotFoundException",
"ca.corefacility.bioinformatics.irida.model.workflow.submission.A... | import ca.corefacility.bioinformatics.irida.exceptions.ExecutionManagerException; import ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowAnalysisTypeException; import ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowNotFoundException; import ca.corefacility.bioinformatics.irida.model.workflow.s... | import ca.corefacility.bioinformatics.irida.exceptions.*; import ca.corefacility.bioinformatics.irida.model.workflow.submission.*; import java.io.*; import java.util.concurrent.*; | [
"ca.corefacility.bioinformatics",
"java.io",
"java.util"
] | ca.corefacility.bioinformatics; java.io; java.util; | 302,268 |
public void setDescriptions(List<Description> descriptions) {
this.descriptions = descriptions;
} | void function(List<Description> descriptions) { this.descriptions = descriptions; } | /**
* Sets the list of description.
*
* @param descriptions the list of description.
*/ | Sets the list of description | setDescriptions | {
"repo_name": "lorislab/appky",
"path": "appky-application/src/main/java/org/lorislab/appky/application/model/Platform.java",
"license": "apache-2.0",
"size": 6368
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 554,779 |
public void setDates(List<ExtractedDate> dates) {
this.dates = dates;
} | void function(List<ExtractedDate> dates) { this.dates = dates; } | /**
* Sets the dates.
*
* @param dates the new dates
*/ | Sets the dates | setDates | {
"repo_name": "m2fd/java-sdk",
"path": "src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/model/Dates.java",
"license": "apache-2.0",
"size": 2307
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,892,763 |
private boolean isClick(MotionEvent upEvent, float xDown, float yDown, float xUp, float yUp) {
if (upEvent == null) return false;
long time = upEvent.getEventTime() - upEvent.getDownTime();
float distance = PointF.length( //
xDown - xUp, //
yDown - yUp);
... | boolean function(MotionEvent upEvent, float xDown, float yDown, float xUp, float yUp) { if (upEvent == null) return false; long time = upEvent.getEventTime() - upEvent.getDownTime(); float distance = PointF.length( xDown - xUp, yDown - yUp); return time < MAX_CLICK_TIME && distance < MAX_CLICK_DISTANCE; } | /**
* Test if a MotionEvent with the given start and end offsets
* can be considered as a "click".
* @param upEvent The final finger-up event.
* @param xDown The x-offset of the down event.
* @param yDown The y-offset of the down event.
* @param xUp The x-offset of the up eve... | Test if a MotionEvent with the given start and end offsets can be considered as a "click" | isClick | {
"repo_name": "michaelmuenzer/android-pdfview",
"path": "android-pdfview/src/main/java/com/joanzapata/pdfview/util/DragPinchListener.java",
"license": "gpl-3.0",
"size": 9602
} | [
"android.graphics.PointF",
"android.view.MotionEvent"
] | import android.graphics.PointF; import android.view.MotionEvent; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 2,061,628 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ConfigurationInner> listByServer(
String resourceGroupName, String serverName, Context context) {
return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ConfigurationInner> function( String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } | /**
* List all the configurations in a given server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thro... | List all the configurations in a given server | listByServer | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/main/java/com/azure/resourcemanager/mysqlflexibleserver/implementation/ConfigurationsClientImpl.java",
"license": "mit",
"size": 57583
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.ConfigurationInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,705,512 |
@Override
public java.math.BigDecimal getCR_TaxBaseAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CR_TaxBaseAmt);
if (bd == null)
return Env.ZERO;
return bd;
} | java.math.BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CR_TaxBaseAmt); if (bd == null) return Env.ZERO; return bd; } | /** Get Bezugswert (Haben).
@return Bezugswert für die Berechnung der Steuer
*/ | Get Bezugswert (Haben) | getCR_TaxBaseAmt | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_GL_JournalLine.java",
"license": "gpl-2.0",
"size": 29546
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,446,066 |
public String getCases() {
return this.fileInstances.stream().map(AbstractCommonAttributeInstance::getCaseName).collect(Collectors.joining(", "));
} | String function() { return this.fileInstances.stream().map(AbstractCommonAttributeInstance::getCaseName).collect(Collectors.joining(STR)); } | /**
* concatenate cases this value was seen into a single string
*
* @return
*/ | concatenate cases this value was seen into a single string | getCases | {
"repo_name": "rcordovano/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributeValue.java",
"license": "apache-2.0",
"size": 4117
} | [
"java.util.stream.Collectors"
] | import java.util.stream.Collectors; | import java.util.stream.*; | [
"java.util"
] | java.util; | 2,319,955 |
public void expandComments(UserRequest ureq) {
if (!canExpandToFullView) { throw new AssertException("Can not expand messages when controller initialized as not expandable"); }
commentsCtr = new UserCommentsController(ureq, getWindowControl(), commentManager, securityCallback);
listenTo(commentsCtr);
userCom... | void function(UserRequest ureq) { if (!canExpandToFullView) { throw new AssertException(STR); } commentsCtr = new UserCommentsController(ureq, getWindowControl(), commentManager, securityCallback); listenTo(commentsCtr); userCommentsAndRatingsVC.put(STR, commentsCtr.getInitialComponent()); isExpanded = true; if (getCom... | /**
* Method to manually expand the comments view
*
* @param ureq
*/ | Method to manually expand the comments view | expandComments | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/core/commons/services/commentAndRating/impl/ui/UserCommentsAndRatingsController.java",
"license": "apache-2.0",
"size": 12299
} | [
"org.olat.core.gui.UserRequest",
"org.olat.core.logging.AssertException"
] | import org.olat.core.gui.UserRequest; import org.olat.core.logging.AssertException; | import org.olat.core.gui.*; import org.olat.core.logging.*; | [
"org.olat.core"
] | org.olat.core; | 40,113 |
@ApiModelProperty(value = "The payment gateway (external) transaction ID")
public String getTransactionId() {
return transactionId;
} | @ApiModelProperty(value = STR) String function() { return transactionId; } | /**
* The payment gateway (external) transaction ID
* @return transactionId
**/ | The payment gateway (external) transaction ID | getTransactionId | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/main/java/com/knetikcloud/model/TransactionResource.java",
"license": "apache-2.0",
"size": 10670
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 193,746 |
public void adjustCommons(final AlertDialog dialog) {
if (this.title != null) {
this.title.applyTo(dialog.findViewById(android.R.id.title));
}
if (this.message != null) {
this.message.applyTo(dialog.findViewById(android.R.id.message));
}
} | void function(final AlertDialog dialog) { if (this.title != null) { this.title.applyTo(dialog.findViewById(android.R.id.title)); } if (this.message != null) { this.message.applyTo(dialog.findViewById(android.R.id.message)); } } | /**
* adjusts common dialog settings for the created dialog (e.g. title and message). Call this method after calling dialog.show()!
*/ | adjusts common dialog settings for the created dialog (e.g. title and message). Call this method after calling dialog.show() | adjustCommons | {
"repo_name": "rsudev/c-geo-opensource",
"path": "main/src/cgeo/geocaching/ui/dialog/SimpleDialog.java",
"license": "apache-2.0",
"size": 19353
} | [
"androidx.appcompat.app.AlertDialog"
] | import androidx.appcompat.app.AlertDialog; | import androidx.appcompat.app.*; | [
"androidx.appcompat"
] | androidx.appcompat; | 1,840,260 |
public void updateDouble(String columnName, double x) throws SQLException {
resultSet.updateDouble(columnName, x);
} | void function(String columnName, double x) throws SQLException { resultSet.updateDouble(columnName, x); } | /**
* Updates the designated column with a <code>double</code> value. The
* updater methods are used to update column values in the current row or
* the insert row. The updater methods do not update the underlying
* database; instead the <code>updateRow</code> or <code>insertRow</code>
* methods are called to... | Updates the designated column with a <code>double</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the database | updateDouble | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/relational/resultSets/DecoratorResultSet.java",
"license": "lgpl-3.0",
"size": 169497
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,780,857 |
public List<TeamMember> getByPersonId(Integer personId, boolean isNotDeleted) {
logger.debug("getByPersonId - START");
DetachedCriteria dc = DetachedCriteria.forEntityName(IModelConstant.teamMemberSimpleEntity);
dc.add(Restrictions.eq("personId", personId));
List<TeamMember> teamMembers = new ArrayLi... | List<TeamMember> function(Integer personId, boolean isNotDeleted) { logger.debug(STR); DetachedCriteria dc = DetachedCriteria.forEntityName(IModelConstant.teamMemberSimpleEntity); dc.add(Restrictions.eq(STR, personId)); List<TeamMember> teamMembers = new ArrayList<TeamMember>(); List<TeamMember> members = getHibernateT... | /**
* Gets the list of team members for a person
* @author Coni
* @param personId
* @return
*/ | Gets the list of team members for a person | getByPersonId | {
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaCM/src/ro/cs/cm/model/dao/impl/DaoTeamMemberImpl.java",
"license": "agpl-3.0",
"size": 21893
} | [
"java.util.ArrayList",
"java.util.List",
"org.hibernate.criterion.DetachedCriteria",
"org.hibernate.criterion.Restrictions",
"ro.cs.cm.business.BLPerson",
"ro.cs.cm.common.IConstant",
"ro.cs.cm.common.IModelConstant",
"ro.cs.cm.entity.TeamMember",
"ro.cs.cm.exception.BusinessException",
"ro.cs.cm.... | import java.util.ArrayList; import java.util.List; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import ro.cs.cm.business.BLPerson; import ro.cs.cm.common.IConstant; import ro.cs.cm.common.IModelConstant; import ro.cs.cm.entity.TeamMember; import ro.cs.cm.exception.Busine... | import java.util.*; import org.hibernate.criterion.*; import ro.cs.cm.business.*; import ro.cs.cm.common.*; import ro.cs.cm.entity.*; import ro.cs.cm.exception.*; import ro.cs.cm.om.*; | [
"java.util",
"org.hibernate.criterion",
"ro.cs.cm"
] | java.util; org.hibernate.criterion; ro.cs.cm; | 1,983,358 |
public static void testProjectPom() throws Exception {
Maven maven = new Maven(null);
ProjectPom pom = maven.createProjectModel(IO.getFile(cwd, "testresources/ws/maven1/testpom.xml"));
assertEquals("artifact", pom.getArtifactId());
assertEquals("group-parent", pom.getGroupId());
assertEquals("1.0.0", pom.g... | static void function() throws Exception { Maven maven = new Maven(null); ProjectPom pom = maven.createProjectModel(IO.getFile(cwd, STR)); assertEquals(STR, pom.getArtifactId()); assertEquals(STR, pom.getGroupId()); assertEquals("1.0.0", pom.getVersion()); assertEquals(STR, pom.getName()); assertEquals(STR, pom.getDescr... | /**
* Test parsing a project pom
*
* @throws Exception
*/ | Test parsing a project pom | testProjectPom | {
"repo_name": "mcculls/bnd",
"path": "biz.aQute.bndlib.tests/src/test/MavenTest.java",
"license": "apache-2.0",
"size": 15904
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,702,225 |
public int getCurrentIBPageID(IWContext iwc) {
String theReturn = getCurrentIBPage(iwc);
if (theReturn == null) {
return -1;
}
try {
return Integer.parseInt(theReturn);
} catch(NumberFormatException e) {
e.printStackTrace();
}
return -1;
}
/*public String getPageKeyByURIAndServerName(Strin... | int function(IWContext iwc) { String theReturn = getCurrentIBPage(iwc); if (theReturn == null) { return -1; } try { return Integer.parseInt(theReturn); } catch(NumberFormatException e) { e.printStackTrace(); } return -1; } /*public String getPageKeyByURIAndServerName(String requestURI,String serverName){ try{ return ge... | /**
* Returns the current IBPageID that the user has requested
*/ | Returns the current IBPageID that the user has requested | getCurrentIBPageID | {
"repo_name": "idega/com.idega.builder",
"path": "src/java/com/idega/builder/business/BuilderLogic.java",
"license": "gpl-3.0",
"size": 145872
} | [
"com.idega.presentation.IWContext"
] | import com.idega.presentation.IWContext; | import com.idega.presentation.*; | [
"com.idega.presentation"
] | com.idega.presentation; | 703,951 |
public static Path create(final FileSystem fs, final Path p)
throws IOException {
if (fs.exists(p)) {
throw new IOException("File already exists " + p.toString());
}
if (!fs.createNewFile(p)) {
throw new IOException("Failed create of " + p);
}
return p;
} | static Path function(final FileSystem fs, final Path p) throws IOException { if (fs.exists(p)) { throw new IOException(STR + p.toString()); } if (!fs.createNewFile(p)) { throw new IOException(STR + p); } return p; } | /**
* Create file.
* @param fs filesystem object
* @param p path to create
* @return Path
* @throws IOException e
*/ | Create file | create | {
"repo_name": "bcopeland/hbase-thrift",
"path": "src/main/java/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "apache-2.0",
"size": 40607
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,096,352 |
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayLi... | void function() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table dict_province
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table dict_province | clear | {
"repo_name": "fuhongliang/taolijie",
"path": "src/main/java/com/fh/taolijie/domain/DictProvinceModelExample.java",
"license": "gpl-3.0",
"size": 12041
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 735,764 |
public List<CoreDescriptor> getCoreDescriptors() {
return solrCores.getCoreDescriptors();
} | List<CoreDescriptor> function() { return solrCores.getCoreDescriptors(); } | /**
* Get the CoreDescriptors for all cores managed by this container
* @return a List of CoreDescriptors
*/ | Get the CoreDescriptors for all cores managed by this container | getCoreDescriptors | {
"repo_name": "pengzong1111/solr4",
"path": "solr/core/src/java/org/apache/solr/core/CoreContainer.java",
"license": "apache-2.0",
"size": 35446
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 488,583 |
public void close() {
for (Entry<String, OResourcePool<String, CH>> pool : pools.entrySet()) {
for (CH channel : pool.getValue().getResources()) {
channel.close();
}
}
}
| void function() { for (Entry<String, OResourcePool<String, CH>> pool : pools.entrySet()) { for (CH channel : pool.getValue().getResources()) { channel.close(); } } } | /**
* Closes all the channels.
*/ | Closes all the channels | close | {
"repo_name": "fedgehog/Orient",
"path": "client/src/main/java/com/orientechnologies/orient/client/remote/ONetworkConnectionPool.java",
"license": "apache-2.0",
"size": 3722
} | [
"com.orientechnologies.common.concur.resource.OResourcePool",
"java.util.Map"
] | import com.orientechnologies.common.concur.resource.OResourcePool; import java.util.Map; | import com.orientechnologies.common.concur.resource.*; import java.util.*; | [
"com.orientechnologies.common",
"java.util"
] | com.orientechnologies.common; java.util; | 1,070,415 |
RandomDataProviderStrategy removeAttributeStrategy(
Class<? extends Annotation> annotationClass); | RandomDataProviderStrategy removeAttributeStrategy( Class<? extends Annotation> annotationClass); | /**
* Remove binding of an annotation to attribute strategy
*
* @param annotationClass
* the annotation class to remove binding
* @return itself
*/ | Remove binding of an annotation to attribute strategy | removeAttributeStrategy | {
"repo_name": "daivanov/joinmo",
"path": "src/main/java/uk/co/jemos/podam/api/RandomDataProviderStrategy.java",
"license": "mit",
"size": 4584
} | [
"java.lang.annotation.Annotation"
] | import java.lang.annotation.Annotation; | import java.lang.annotation.*; | [
"java.lang"
] | java.lang; | 2,866,599 |
@ServiceMethod(returns = ReturnType.SINGLE)
public DataLakeDirectoryClient createDirectory(String directoryName, boolean overwrite) {
DataLakeRequestConditions requestConditions = new DataLakeRequestConditions();
if (!overwrite) {
requestConditions.setIfNoneMatch(Constants.HeaderCons... | @ServiceMethod(returns = ReturnType.SINGLE) DataLakeDirectoryClient function(String directoryName, boolean overwrite) { DataLakeRequestConditions requestConditions = new DataLakeRequestConditions(); if (!overwrite) { requestConditions.setIfNoneMatch(Constants.HeaderConstants.ETAG_WILDCARD); } return createDirectoryWith... | /**
* Creates a new directory within a file system. For more information, see the
* <a href="https://docs.microsoft.com/rest/api/storageservices/datalakestoragegen2/path/create">Azure Docs</a>.
*
* <p><strong>Code Samples</strong></p>
*
* <!-- src_embed com.azure.storage.file.datalake.Data... | Creates a new directory within a file system. For more information, see the Azure Docs. Code Samples <code> boolean overwrite = false; /* Default value. */ DataLakeDirectoryClient dClient = client.createDirectory(fileName, overwrite); </code> | createDirectory | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-datalake/src/main/java/com/azure/storage/file/datalake/DataLakeFileSystemClient.java",
"license": "mit",
"size": 69128
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.storage.common.implementation.Constants",
"com.azure.storage.file.datalake.models.DataLakeRequestConditions",
"com.azure.storage.file.datalake... | 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.storage.common.implementation.Constants; import com.azure.storage.file.datalake.models.DataLakeRequestConditions; import com.azure.s... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.storage.common.implementation.*; import com.azure.storage.file.datalake.models.*; import java.time.*; import java.util.*; | [
"com.azure.core",
"com.azure.storage",
"java.time",
"java.util"
] | com.azure.core; com.azure.storage; java.time; java.util; | 475,604 |
@Property(order = 1)
float getSymbolSize(); | @Property(order = 1) float getSymbolSize(); | /**
* Returns the size of the symbol draw in legend item.
* The default symbol size is <code>Float.NaN</code>, means the same size as the symbol size of XYGraph.
*
* @return the size of the symbol draw in legend
*/ | Returns the size of the symbol draw in legend item. The default symbol size is <code>Float.NaN</code>, means the same size as the symbol size of XYGraph | getSymbolSize | {
"repo_name": "jplot2d/jplot2d",
"path": "jplot2d-core/src/main/java/org/jplot2d/element/LegendItem.java",
"license": "lgpl-3.0",
"size": 2492
} | [
"org.jplot2d.annotation.Property"
] | import org.jplot2d.annotation.Property; | import org.jplot2d.annotation.*; | [
"org.jplot2d.annotation"
] | org.jplot2d.annotation; | 76,856 |
public void _setFirst() {
boolean result = true ;
oObj.setFirst(new Date((short)7, (short)12, (short)1972)) ;
Date date = oObj.getFirst();
result = date.Day == 7 && date.Month == 12 && date.Year == 1972;
if (!result) {
log.println("Set to " + 5118 + " but return... | void function() { boolean result = true ; oObj.setFirst(new Date((short)7, (short)12, (short)1972)) ; Date date = oObj.getFirst(); result = date.Day == 7 && date.Month == 12 && date.Year == 1972; if (!result) { log.println(STR + 5118 + STR + oObj.getFirst()) ; } tRes.tested(STR, result) ; } | /**
* Sets a new value and checks if it was correctly set. <p>
* Has <b> OK </b> status if set and get values are equal.
* The following method tests are to be completed successfully before :
* <ul>
* <li> <code> getFirst </code> </li>
* </ul>
*/ | Sets a new value and checks if it was correctly set. Has OK status if set and get values are equal. The following method tests are to be completed successfully before : <code> getFirst </code> | _setFirst | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/ifc/awt/_XDateField.java",
"license": "gpl-3.0",
"size": 9333
} | [
"com.sun.star.util.Date"
] | import com.sun.star.util.Date; | import com.sun.star.util.*; | [
"com.sun.star"
] | com.sun.star; | 967,003 |
public void testHashCode() {
ModuloAxis a1 = new ModuloAxis("Test", new Range(0.0, 1.0));
ModuloAxis a2 = new ModuloAxis("Test", new Range(0.0, 1.0));
assertTrue(a1.equals(a2));
int h1 = a1.hashCode();
int h2 = a2.hashCode();
assertEquals(h1, h2);
} | void function() { ModuloAxis a1 = new ModuloAxis("Test", new Range(0.0, 1.0)); ModuloAxis a2 = new ModuloAxis("Test", new Range(0.0, 1.0)); assertTrue(a1.equals(a2)); int h1 = a1.hashCode(); int h2 = a2.hashCode(); assertEquals(h1, h2); } | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashCode | {
"repo_name": "integrated/jfreechart",
"path": "tests/org/jfree/chart/axis/junit/ModuloAxisTests.java",
"license": "lgpl-2.1",
"size": 4435
} | [
"junit.framework.Test",
"org.jfree.chart.axis.ModuloAxis",
"org.jfree.data.Range"
] | import junit.framework.Test; import org.jfree.chart.axis.ModuloAxis; import org.jfree.data.Range; | import junit.framework.*; import org.jfree.chart.axis.*; import org.jfree.data.*; | [
"junit.framework",
"org.jfree.chart",
"org.jfree.data"
] | junit.framework; org.jfree.chart; org.jfree.data; | 113,217 |
@Override
public void customize(final Context<T,M,C> context, JPopupMenu menu) {
JMenuItem item;
final int[] indices;
indices = context.actualSelectedContainerIndices;
item = new JMenuItem("Update ID" + (indices.length > 1 ? "s" : ""));
item.setEnabled(indices.length > 0);
item.addActi... | void function(final Context<T,M,C> context, JPopupMenu menu) { JMenuItem item; final int[] indices; indices = context.actualSelectedContainerIndices; item = new JMenuItem(STR + (indices.length > 1 ? "s" : "")); item.setEnabled(indices.length > 0); item.addActionListener((ActionEvent e) -> update(context)); menu.add(ite... | /**
* Returns a popup menu for the table of the container list.
*
* @param context the context
* @param menu the popup menu to customize
*/ | Returns a popup menu for the table of the container list | customize | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/visualization/container/datacontainerpanel/containerlistpopup/UpdateID.java",
"license": "gpl-3.0",
"size": 4613
} | [
"java.awt.event.ActionEvent",
"javax.swing.JMenuItem",
"javax.swing.JPopupMenu"
] | import java.awt.event.ActionEvent; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,880,552 |
private void syncPackSizes()
{
CheckBoxNode node;
long bytes;
for (Pack pack : packsModel.getVisiblePacks())
{
bytes = pack.getSize();
if(pack.hasChildren())
{
for(String childPackName : pack.getChildren())
{
... | void function() { CheckBoxNode node; long bytes; for (Pack pack : packsModel.getVisiblePacks()) { bytes = pack.getSize(); if(pack.hasChildren()) { for(String childPackName : pack.getChildren()) { Pack childPack = packsModel.getPack(childPackName); int row = packsModel.getNameToRow().get(childPackName); if (packsModel.i... | /**
* Synchronize the sizes of the packs based on what is/isn't selected.
* This mainly effects any pack that has children.
*/ | Synchronize the sizes of the packs based on what is/isn't selected. This mainly effects any pack that has children | syncPackSizes | {
"repo_name": "mtjandra/izpack",
"path": "izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/TreePacksPanel.java",
"license": "apache-2.0",
"size": 26018
} | [
"com.izforge.izpack.api.data.Pack",
"java.awt.event.MouseAdapter",
"javax.swing.JCheckBox",
"javax.swing.JTree"
] | import com.izforge.izpack.api.data.Pack; import java.awt.event.MouseAdapter; import javax.swing.JCheckBox; import javax.swing.JTree; | import com.izforge.izpack.api.data.*; import java.awt.event.*; import javax.swing.*; | [
"com.izforge.izpack",
"java.awt",
"javax.swing"
] | com.izforge.izpack; java.awt; javax.swing; | 1,152,389 |
@SuppressWarnings("unchecked")
public Future<StackTraceSample> triggerStackTraceSample(
ExecutionVertex[] tasksToSample,
int numSamples,
Time delayBetweenSamples,
int maxStackTraceDepth) {
checkNotNull(tasksToSample, "Tasks to sample");
checkArgument(tasksToSample.length >= 1, "No tasks to sample")... | @SuppressWarnings(STR) Future<StackTraceSample> function( ExecutionVertex[] tasksToSample, int numSamples, Time delayBetweenSamples, int maxStackTraceDepth) { checkNotNull(tasksToSample, STR); checkArgument(tasksToSample.length >= 1, STR); checkArgument(numSamples >= 1, STR); checkArgument(maxStackTraceDepth >= 0, STR)... | /**
* Triggers a stack trace sample to all tasks.
*
* @param tasksToSample Tasks to sample.
* @param numSamples Number of stack trace samples to collect.
* @param delayBetweenSamples Delay between consecutive samples.
* @param maxStackTraceDepth Maximum depth of the stack trace. 0 indicates
... | Triggers a stack trace sample to all tasks | triggerStackTraceSample | {
"repo_name": "oscarceballos/flink-1.3.2",
"path": "flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/StackTraceSampleCoordinator.java",
"license": "apache-2.0",
"size": 12128
} | [
"org.apache.flink.api.common.time.Time",
"org.apache.flink.runtime.concurrent.Future",
"org.apache.flink.runtime.concurrent.impl.FlinkCompletableFuture",
"org.apache.flink.runtime.execution.ExecutionState",
"org.apache.flink.runtime.executiongraph.Execution",
"org.apache.flink.runtime.executiongraph.Execu... | import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.concurrent.Future; import org.apache.flink.runtime.concurrent.impl.FlinkCompletableFuture; import org.apache.flink.runtime.execution.ExecutionState; import org.apache.flink.runtime.executiongraph.Execution; import org.apache.flink.runtime.exe... | import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.concurrent.impl.*; import org.apache.flink.runtime.execution.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,426,553 |
public ImmutableMap<Path, String> getBasePathToAliasMap() {
ImmutableMap<String, String> aliases = config.get(ALIAS_SECTION_HEADER);
if (aliases == null) {
return ImmutableMap.of();
}
// Build up the Map with an ordinary HashMap because we need to be able to check whether the Map
// already... | ImmutableMap<Path, String> function() { ImmutableMap<String, String> aliases = config.get(ALIAS_SECTION_HEADER); if (aliases == null) { return ImmutableMap.of(); } Map<Path, String> basePathToAlias = new HashMap<>(); for (Map.Entry<String, BuildTarget> entry : aliasToBuildTargetMap.entries()) { String alias = entry.get... | /**
* Create a map of {@link BuildTarget} base paths to aliases. Note that there may be more than one
* alias to a base path, so the first one listed in the .buckconfig will be chosen.
*/ | Create a map of <code>BuildTarget</code> base paths to aliases. Note that there may be more than one alias to a base path, so the first one listed in the .buckconfig will be chosen | getBasePathToAliasMap | {
"repo_name": "clonetwin26/buck",
"path": "src/com/facebook/buck/config/BuckConfig.java",
"license": "apache-2.0",
"size": 38134
} | [
"com.facebook.buck.model.BuildTarget",
"com.google.common.collect.ImmutableMap",
"java.nio.file.Path",
"java.util.HashMap",
"java.util.Map"
] | import com.facebook.buck.model.BuildTarget; import com.google.common.collect.ImmutableMap; import java.nio.file.Path; import java.util.HashMap; import java.util.Map; | import com.facebook.buck.model.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*; | [
"com.facebook.buck",
"com.google.common",
"java.nio",
"java.util"
] | com.facebook.buck; com.google.common; java.nio; java.util; | 1,890,532 |
private static void positionFrameOnScreen( final Window frame, final double horizontalPercent, final double verticalPercent )
{
final Rectangle s = frame.getGraphicsConfiguration().getBounds();
final Dimension f = frame.getSize();
final int w = Math.max( s.width - f.width, 0 );
final int h = Math.max( s.he... | static void function( final Window frame, final double horizontalPercent, final double verticalPercent ) { final Rectangle s = frame.getGraphicsConfiguration().getBounds(); final Dimension f = frame.getSize(); final int w = Math.max( s.width - f.width, 0 ); final int h = Math.max( s.height - f.height, 0 ); final int x ... | /**
* Positions the specified frame at a relative position in the screen, where
* 50% is considered to be the center of the screen.
*
* @param frame
* the frame.
* @param horizontalPercent
* the relative horizontal position of the frame (0.0 to 1.0,
* where 0.5 is the ce... | Positions the specified frame at a relative position in the screen, where 50% is considered to be the center of the screen | positionFrameOnScreen | {
"repo_name": "bigdataviewer/SPIM_Registration",
"path": "src/main/java/spim/fiji/plugin/thinout/Histogram.java",
"license": "gpl-2.0",
"size": 6614
} | [
"java.awt.Dimension",
"java.awt.Rectangle",
"java.awt.Window"
] | import java.awt.Dimension; import java.awt.Rectangle; import java.awt.Window; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,264,377 |
public static void clearSubContexts(ContextSource contextSource, Name name) throws NamingException {
DirContext ctx = null;
try {
ctx = contextSource.getReadWriteContext();
clearSubContexts(ctx, name);
} finally {
try {
ctx.close();
... | static void function(ContextSource contextSource, Name name) throws NamingException { DirContext ctx = null; try { ctx = contextSource.getReadWriteContext(); clearSubContexts(ctx, name); } finally { try { ctx.close(); } catch (Exception e) { } } } | /**
* Clear the directory sub-tree starting with the node represented by the
* supplied distinguished name.
*
* @param contextSource the ContextSource to use for getting a DirContext.
* @param name the distinguished name of the root node.
* @throws NamingException if anything goes... | Clear the directory sub-tree starting with the node represented by the supplied distinguished name | clearSubContexts | {
"repo_name": "spring-projects/spring-ldap",
"path": "test-support/src/main/java/org/springframework/ldap/test/LdapTestUtils.java",
"license": "apache-2.0",
"size": 10965
} | [
"javax.naming.Name",
"javax.naming.NamingException",
"javax.naming.directory.DirContext",
"org.springframework.ldap.core.ContextSource"
] | import javax.naming.Name; import javax.naming.NamingException; import javax.naming.directory.DirContext; import org.springframework.ldap.core.ContextSource; | import javax.naming.*; import javax.naming.directory.*; import org.springframework.ldap.core.*; | [
"javax.naming",
"org.springframework.ldap"
] | javax.naming; org.springframework.ldap; | 1,663,991 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.