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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
GridLayout gridLayout = (GridLayout) container.getLayout();
gridLayout.numColumns = 2;
Label lblCommand = new Label(container, SWT.NONE);
lblCommand.setLayoutData(new GridDat... | Control function(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); GridLayout gridLayout = (GridLayout) container.getLayout(); gridLayout.numColumns = 2; Label lblCommand = new Label(container, SWT.NONE); lblCommand.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1)... | /**
* Create contents of the dialog.
*
* @param parent
*/ | Create contents of the dialog | createDialogArea | {
"repo_name": "briandealwis/eclipse-wbspies",
"path": "ca.mt.wb.devtools.commands/src/ca/mt/wb/devtools/commands/OpenCommandHandlerDialog.java",
"license": "unlicense",
"size": 11013
} | [
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Control",
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 175,923 |
protected void stopMasters() {
try {
LOG.info("Stopping all masters.");
mRegistry.stop();
LOG.info("All masters stopped.");
} catch (IOException e) {
throw new RuntimeException(e);
}
} | void function() { try { LOG.info(STR); mRegistry.stop(); LOG.info(STR); } catch (IOException e) { throw new RuntimeException(e); } } | /**
* Stops all masters, including block master, fileSystem master and additional masters.
*/ | Stops all masters, including block master, fileSystem master and additional masters | stopMasters | {
"repo_name": "maobaolong/alluxio",
"path": "core/server/master/src/main/java/alluxio/master/AlluxioMasterProcess.java",
"license": "apache-2.0",
"size": 15610
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 315,997 |
@CanIgnoreReturnValue
public static <T> T checkNotNull(@CheckForNull T obj, String errorMessageTemplate, int p1) {
if (obj == null) {
throw new NullPointerException(lenientFormat(errorMessageTemplate, p1));
}
return obj;
} | static <T> T function(@CheckForNull T obj, String errorMessageTemplate, int p1) { if (obj == null) { throw new NullPointerException(lenientFormat(errorMessageTemplate, p1)); } return obj; } | /**
* Ensures that an object reference passed as a parameter to the calling method is not null.
*
* <p>See {@link #checkNotNull(Object, String, Object...)} for details.
*
* @since 20.0 (varargs overload since 2.0)
*/ | Ensures that an object reference passed as a parameter to the calling method is not null. See <code>#checkNotNull(Object, String, Object...)</code> for details | checkNotNull | {
"repo_name": "mosoft521/guava",
"path": "guava/src/com/google/common/base/Preconditions.java",
"license": "apache-2.0",
"size": 52784
} | [
"javax.annotation.CheckForNull"
] | import javax.annotation.CheckForNull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 458,117 |
public void remove(OsmPrimitive my) {
Iterator<Conflict<?>> it = iterator();
while(it.hasNext()) {
if (it.next().isMatchingMy(my)) {
it.remove();
}
}
fireConflictRemoved();
} | void function(OsmPrimitive my) { Iterator<Conflict<?>> it = iterator(); while(it.hasNext()) { if (it.next().isMatchingMy(my)) { it.remove(); } } fireConflictRemoved(); } | /**
* removes the conflict registered for {@link OsmPrimitive} <code>my</code> if any
*
* @param my the primitive
*/ | removes the conflict registered for <code>OsmPrimitive</code> <code>my</code> if any | remove | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/data/conflict/ConflictCollection.java",
"license": "gpl-2.0",
"size": 9904
} | [
"java.util.Iterator",
"org.openstreetmap.josm.data.osm.OsmPrimitive"
] | import java.util.Iterator; import org.openstreetmap.josm.data.osm.OsmPrimitive; | import java.util.*; import org.openstreetmap.josm.data.osm.*; | [
"java.util",
"org.openstreetmap.josm"
] | java.util; org.openstreetmap.josm; | 1,978,307 |
public static List<FeedbackParticipantType> getParticipantListFromCommaSeparatedValues(
String commaSeparatedValues) {
List<FeedbackParticipantType> participantList = new ArrayList<FeedbackParticipantType>();
if (commaSeparatedValues == null || commaSeparatedValues.isEmpty()) {
... | static List<FeedbackParticipantType> function( String commaSeparatedValues) { List<FeedbackParticipantType> participantList = new ArrayList<FeedbackParticipantType>(); if (commaSeparatedValues == null commaSeparatedValues.isEmpty()) { return participantList; } for (String str : commaSeparatedValues.split(",")) { partic... | /**
* Returns A list of {@link FeedbackParticipantType} objects corresponding to the supplied parameter.
*/ | Returns A list of <code>FeedbackParticipantType</code> objects corresponding to the supplied parameter | getParticipantListFromCommaSeparatedValues | {
"repo_name": "malayaleecoder/teammates",
"path": "src/main/java/teammates/common/datatransfer/FeedbackParticipantType.java",
"license": "gpl-2.0",
"size": 5922
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,474,824 |
public boolean usesLocalFiles() throws SQLException {
return false;
} | boolean function() throws SQLException { return false; } | /**
* Does the database store tables in a local file? No - it stores them in a file on the server.
*
* @return true if so
* @throws SQLException if a database access error occurs
*/ | Does the database store tables in a local file? No - it stores them in a file on the server | usesLocalFiles | {
"repo_name": "zapov/pgjdbc",
"path": "pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java",
"license": "bsd-2-clause",
"size": 96932
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,832,427 |
void setDependenciesJPA(List<ImportConfigurationLink> dependencies) {
if ((this.dependencies == null)) {
this.dependencies = new NabuccoListImpl<ImportConfigurationLink>(NabuccoCollectionState.EAGER);
}
((NabuccoListImpl<ImportConfigurationLink>) this.dependencies).setDelegate(de... | void setDependenciesJPA(List<ImportConfigurationLink> dependencies) { if ((this.dependencies == null)) { this.dependencies = new NabuccoListImpl<ImportConfigurationLink>(NabuccoCollectionState.EAGER); } ((NabuccoListImpl<ImportConfigurationLink>) this.dependencies).setDelegate(dependencies); } | /**
* Setter for the DependenciesJPA.
*
* @param dependencies the List<ImportConfigurationLink>.
*/ | Setter for the DependenciesJPA | setDependenciesJPA | {
"repo_name": "NABUCCO/org.nabucco.framework.importing",
"path": "org.nabucco.framework.importing.facade.datatype/src/main/gen/org/nabucco/framework/importing/facade/datatype/ImportConfiguration.java",
"license": "epl-1.0",
"size": 15928
} | [
"java.util.List",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl"
] | import java.util.List; import org.nabucco.framework.base.facade.datatype.collection.NabuccoCollectionState; import org.nabucco.framework.base.facade.datatype.collection.NabuccoListImpl; | import java.util.*; import org.nabucco.framework.base.facade.datatype.collection.*; | [
"java.util",
"org.nabucco.framework"
] | java.util; org.nabucco.framework; | 1,173,974 |
public String[] getAllPolicyIds() throws EntitlementException {
String path = null;
Collection collection = null;
List<String> resources = new ArrayList<String>();
String[] children = null;
if (log.isDebugEnabled()) {
log.debug("Retrieving all entitlement policie... | String[] function() throws EntitlementException { String path = null; Collection collection = null; List<String> resources = new ArrayList<String>(); String[] children = null; if (log.isDebugEnabled()) { log.debug(STR); } try { path = PDPConstants.ENTITLEMENT_POLICY_PAP; if (!registry.resourceExists(path)) { if (log.is... | /**
* This returns all the policy ids as String list. Here we assume registry resource name as
* the policy id.
*
* @return policy ids as String[]
* @throws EntitlementException throws if fails
*/ | This returns all the policy ids as String list. Here we assume registry resource name as the policy id | getAllPolicyIds | {
"repo_name": "godwinamila/carbon-identity",
"path": "components/entitlement/org.wso2.carbon.identity.entitlement/src/main/java/org/wso2/carbon/identity/entitlement/pap/store/PAPPolicyStore.java",
"license": "apache-2.0",
"size": 15219
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.identity.entitlement.EntitlementException",
"org.wso2.carbon.identity.entitlement.PDPConstants",
"org.wso2.carbon.registry.core.Collection",
"org.wso2.carbon.registry.core.exceptions.RegistryException"
] | import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.entitlement.EntitlementException; import org.wso2.carbon.identity.entitlement.PDPConstants; import org.wso2.carbon.registry.core.Collection; import org.wso2.carbon.registry.core.exceptions.RegistryException; | import java.util.*; import org.wso2.carbon.identity.entitlement.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.core.exceptions.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 598,517 |
@Nonnull
public EducationSubmissionCollectionRequest filter(@Nonnull final String value) {
addFilterOption(value);
return this;
} | EducationSubmissionCollectionRequest function(@Nonnull final String value) { addFilterOption(value); return this; } | /**
* Sets the filter clause for the request
*
* @param value the filter clause
* @return the updated request
*/ | Sets the filter clause for the request | filter | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/EducationSubmissionCollectionRequest.java",
"license": "mit",
"size": 6035
} | [
"com.microsoft.graph.requests.EducationSubmissionCollectionRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.EducationSubmissionCollectionRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,868,043 |
ResolvedStatement analyze(String sql) {
AnalyzerOptions options = initAnalyzerOptions(builder.queryParams);
List<List<String>> tables = Analyzer.extractTableNamesFromStatement(sql);
SimpleCatalog catalog =
createPopulatedCatalog(builder.topLevelSchema.getName(), options, tables);
return Analy... | ResolvedStatement analyze(String sql) { AnalyzerOptions options = initAnalyzerOptions(builder.queryParams); List<List<String>> tables = Analyzer.extractTableNamesFromStatement(sql); SimpleCatalog catalog = createPopulatedCatalog(builder.topLevelSchema.getName(), options, tables); return Analyzer.analyzeStatement(sql, o... | /**
* Accepts the SQL string, returns the resolved AST.
*
* <p>Initializes query parameters, populates the catalog based on Calcite's schema and table name
* resolution strategy set in the context.
*/ | Accepts the SQL string, returns the resolved AST. Initializes query parameters, populates the catalog based on Calcite's schema and table name resolution strategy set in the context | analyze | {
"repo_name": "markflyhigh/incubator-beam",
"path": "sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/SqlAnalyzer.java",
"license": "apache-2.0",
"size": 11174
} | [
"com.google.zetasql.Analyzer",
"com.google.zetasql.AnalyzerOptions",
"com.google.zetasql.SimpleCatalog",
"com.google.zetasql.resolvedast.ResolvedNodes",
"java.util.List"
] | import com.google.zetasql.Analyzer; import com.google.zetasql.AnalyzerOptions; import com.google.zetasql.SimpleCatalog; import com.google.zetasql.resolvedast.ResolvedNodes; import java.util.List; | import com.google.zetasql.*; import com.google.zetasql.resolvedast.*; import java.util.*; | [
"com.google.zetasql",
"java.util"
] | com.google.zetasql; java.util; | 459,488 |
// TODO show example of calling resize after a transform in the javadoc
public RequestCreator transform(@NonNull Transformation transformation) {
data.transform(transformation);
return this;
} | RequestCreator function(@NonNull Transformation transformation) { data.transform(transformation); return this; } | /**
* Add a custom transformation to be applied to the image.
* <p>
* Custom transformations will always be run after the built-in transformations.
*/ | Add a custom transformation to be applied to the image. Custom transformations will always be run after the built-in transformations | transform | {
"repo_name": "laysionqet/picasso",
"path": "picasso/src/main/java/com/squareup/picasso/RequestCreator.java",
"license": "apache-2.0",
"size": 27025
} | [
"android.support.annotation.NonNull"
] | import android.support.annotation.NonNull; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 812,728 |
public static String resolveIpAddress(String ip) {
try {
InetAddress address = InetAddress.getByName(ip);
return address.getHostName();
} catch (UnknownHostException e) {
return ip;
}
} | static String function(String ip) { try { InetAddress address = InetAddress.getByName(ip); return address.getHostName(); } catch (UnknownHostException e) { return ip; } } | /**
* Attempts to resolve domain name for specified IP address
*
* @param ip IP address
* @return Resolved domain name or original IP address
*/ | Attempts to resolve domain name for specified IP address | resolveIpAddress | {
"repo_name": "kubac65/CIT_AOT1",
"path": "src/main/java/aot1/analyzer/utils/AnalyzerUtils.java",
"license": "mit",
"size": 2645
} | [
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 844,825 |
@Override
protected void serviceStart() throws Exception {
setupSecurity();
FileTxnSnapLog ftxn = new FileTxnSnapLog(dataDir, dataDir);
ZooKeeperServer zkServer = new ZooKeeperServer(ftxn, tickTime, "");
LOG.info("Starting Local Zookeeper service");
factory = ServerCnxnFactory.createFactory()... | void function() throws Exception { setupSecurity(); FileTxnSnapLog ftxn = new FileTxnSnapLog(dataDir, dataDir); ZooKeeperServer zkServer = new ZooKeeperServer(ftxn, tickTime, STRStarting Local Zookeeper serviceSTRIn memory ZK started at {}\nSTRZooKeeper config:\nSTR reachable at \STR\""; addDiagnostics(binding.descript... | /**
* Startup: start ZK. It is only after this that
* the binding information is valid.
* @throws Exception
*/ | Startup: start ZK. It is only after this that the binding information is valid | serviceStart | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/server/services/MicroZookeeperService.java",
"license": "apache-2.0",
"size": 10118
} | [
"org.apache.zookeeper.server.ZooKeeperServer",
"org.apache.zookeeper.server.persistence.FileTxnSnapLog"
] | import org.apache.zookeeper.server.ZooKeeperServer; import org.apache.zookeeper.server.persistence.FileTxnSnapLog; | import org.apache.zookeeper.server.*; import org.apache.zookeeper.server.persistence.*; | [
"org.apache.zookeeper"
] | org.apache.zookeeper; | 1,596,643 |
public TypeHLAPI getContainerTypeHLAPI() {
if (item.getContainerType() == null)
return null;
return new TypeHLAPI(item.getContainerType());
} | TypeHLAPI function() { if (item.getContainerType() == null) return null; return new TypeHLAPI(item.getContainerType()); } | /**
* This accessor automatically encapsulate an element of the current object.
* WARNING : this creates a new object in memory.
*
* @return : null if the element is null
*/ | This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory | getContainerTypeHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/terms/hlapi/UserSortHLAPI.java",
"license": "epl-1.0",
"size": 15235
} | [
"fr.lip6.move.pnml.pthlpng.hlcorestructure.hlapi.TypeHLAPI"
] | import fr.lip6.move.pnml.pthlpng.hlcorestructure.hlapi.TypeHLAPI; | import fr.lip6.move.pnml.pthlpng.hlcorestructure.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,270,354 |
public String getStringValue()
throws DOMException; | String function() throws DOMException; | /**
* This method is used to get the string value. If the CSS value doesn't
* contain a string value, a <code>DOMException</code> is raised. Some
* properties (like 'font-family' or 'voice-family') convert a
* whitespace separated list of idents to a string.
* @return The string value in... | This method is used to get the string value. If the CSS value doesn't contain a string value, a <code>DOMException</code> is raised. Some properties (like 'font-family' or 'voice-family') convert a whitespace separated list of idents to a string | getStringValue | {
"repo_name": "step21/inkscape-osx-packaging-native",
"path": "src/bind/java/org/w3c/dom/css/CSSPrimitiveValue.java",
"license": "lgpl-2.1",
"size": 13236
} | [
"org.w3c.dom.DOMException"
] | import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,116,992 |
public boolean login(String username, String password) throws IOException
{
user(username);
if (FTPReply.isPositiveCompletion(getReplyCode()))
return true;
// If we get here, we either have an error code, or an intermmediate
// reply requesting password.
if ... | boolean function(String username, String password) throws IOException { user(username); if (FTPReply.isPositiveCompletion(getReplyCode())) return true; if (!FTPReply.isPositiveIntermediate(getReplyCode())) return false; return FTPReply.isPositiveCompletion(pass(password)); } | /***
* Login to the FTP server using the provided username and password.
* <p>
* @param username The username to login under.
* @param password The password to use.
* @return True if successfully completed, false if not.
* @exception FTPConnectionClosedException
* If the FTP serv... | Login to the FTP server using the provided username and password. | login | {
"repo_name": "kkllwww007/anthelion",
"path": "src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Client.java",
"license": "apache-2.0",
"size": 21550
} | [
"java.io.IOException",
"org.apache.commons.net.ftp.FTPReply"
] | import java.io.IOException; import org.apache.commons.net.ftp.FTPReply; | import java.io.*; import org.apache.commons.net.ftp.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 460,597 |
@FIXVersion(introduced = "4.2", retired = "4.3")
@TagNumRef(tagNum = TagNum.Symbol, required=true)
public void setSymbol(String symbol) {
getSafeInstrument().setSymbol(symbol);
} | @FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.Symbol, required=true) void function(String symbol) { getSafeInstrument().setSymbol(symbol); } | /**
* Message field setter.
* @param symbol field value
*/ | Message field setter | setSymbol | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/SecurityStatusRequestMsg.java",
"license": "gpl-3.0",
"size": 43886
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 165,985 |
protected void setCorporateBondPerCountryInfo(final Country country) {
final BondInfo i = new BondInfo();
i.setCurveExposureName("model/bond/corp", "Corp Bond Exposures");
i.setBondType("model/bond/corp", BondType.CORPORATE.name());
setCorporateBondPerCountryInfo(country, i);
} | void function(final Country country) { final BondInfo i = new BondInfo(); i.setCurveExposureName(STR, STR); i.setBondType(STR, BondType.CORPORATE.name()); setCorporateBondPerCountryInfo(country, i); } | /**
* Creates defaults for corporate bonds.
*
* @param country
* the country
*/ | Creates defaults for corporate bonds | setCorporateBondPerCountryInfo | {
"repo_name": "McLeodMoores/starling",
"path": "examples/examples-simulated/src/main/java/com/mcleodmoores/examples/simulated/function/ExamplesSimulatedFunctionConfiguration.java",
"license": "apache-2.0",
"size": 9154
} | [
"com.mcleodmoores.financial.function.defaults.BondPerCountryDefaults",
"com.opengamma.util.i18n.Country"
] | import com.mcleodmoores.financial.function.defaults.BondPerCountryDefaults; import com.opengamma.util.i18n.Country; | import com.mcleodmoores.financial.function.defaults.*; import com.opengamma.util.i18n.*; | [
"com.mcleodmoores.financial",
"com.opengamma.util"
] | com.mcleodmoores.financial; com.opengamma.util; | 42,089 |
public static FeatureTableMetadata createTyped(String dataType,
GeometryColumns geometryColumns, String idColumnName,
boolean autoincrement) {
return new FeatureTableMetadata(dataType, geometryColumns, idColumnName,
autoincrement, null, null);
} | static FeatureTableMetadata function(String dataType, GeometryColumns geometryColumns, String idColumnName, boolean autoincrement) { return new FeatureTableMetadata(dataType, geometryColumns, idColumnName, autoincrement, null, null); } | /**
* Create metadata
*
* @param dataType
* data type
* @param geometryColumns
* geometry columns
* @param idColumnName
* id column name
* @param autoincrement
* autoincrement ids
* @return metadata
*/ | Create metadata | createTyped | {
"repo_name": "ngageoint/geopackage-core-java",
"path": "src/main/java/mil/nga/geopackage/features/user/FeatureTableMetadata.java",
"license": "mit",
"size": 27581
} | [
"mil.nga.geopackage.features.columns.GeometryColumns"
] | import mil.nga.geopackage.features.columns.GeometryColumns; | import mil.nga.geopackage.features.columns.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 132,562 |
public void cleanInterceptableFleetList() {
interceptableFleets = new ArrayList<>();
} | void function() { interceptableFleets = new ArrayList<>(); } | /**
* Initialized interceptable fleet list.
*/ | Initialized interceptable fleet list | cleanInterceptableFleetList | {
"repo_name": "tuomount/Open-Realms-of-Stars",
"path": "src/main/java/org/openRealmOfStars/player/PlayerInfo.java",
"license": "gpl-2.0",
"size": 78043
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,780,373 |
String example = "NO_EVENT";
EmergencyEventType enumEventType = EmergencyEventType.valueForString(example);
example = "FRONTAL";
EmergencyEventType enumFrontal = EmergencyEventType.valueForString(example);
example = "SIDE";
EmergencyEventType enumSide = EmergencyEventType.valueFo... | String example = STR; EmergencyEventType enumEventType = EmergencyEventType.valueForString(example); example = STR; EmergencyEventType enumFrontal = EmergencyEventType.valueForString(example); example = "SIDE"; EmergencyEventType enumSide = EmergencyEventType.valueForString(example); example = "REAR"; EmergencyEventTyp... | /**
* Verifies that the enum values are not null upon valid assignment.
*/ | Verifies that the enum values are not null upon valid assignment | testValidEnums | {
"repo_name": "smartdevicelink/sdl_android",
"path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/EmergencyEventTypeTests.java",
"license": "bsd-3-clause",
"size": 3517
} | [
"com.smartdevicelink.proxy.rpc.enums.EmergencyEventType"
] | import com.smartdevicelink.proxy.rpc.enums.EmergencyEventType; | import com.smartdevicelink.proxy.rpc.enums.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 1,337,739 |
@SmallTest
public void testMoveOk() throws Exception {
try {
CommandHelper.createFile(getContext(), PATH_FILE_SRC, getConsole());
boolean ret =
CommandHelper.move(getContext(), PATH_FILE_SRC, PATH_FILE_DST, getConsole());
assertTrue("response==fals... | void function() throws Exception { try { CommandHelper.createFile(getContext(), PATH_FILE_SRC, getConsole()); boolean ret = CommandHelper.move(getContext(), PATH_FILE_SRC, PATH_FILE_DST, getConsole()); assertTrue(STR, ret); } finally { try { CommandHelper.deleteFile(getContext(), PATH_FILE_SRC, getConsole()); } catch (... | /**
* Method that performs a test to move a file.
*
* @throws Exception If test failed
*/ | Method that performs a test to move a file | testMoveOk | {
"repo_name": "AnimeROM/android_package_AnimeManager",
"path": "tests/src/com/animerom/filemanager/commands/shell/MoveCommandTest.java",
"license": "apache-2.0",
"size": 1615
} | [
"com.animerom.filemanager.util.CommandHelper"
] | import com.animerom.filemanager.util.CommandHelper; | import com.animerom.filemanager.util.*; | [
"com.animerom.filemanager"
] | com.animerom.filemanager; | 334,692 |
public static void log(String S)
{
S = (new Date(System.currentTimeMillis())).toString() + ": " + S;
switch (loggingStyle)
{
case NOLOG: break; // do nothing
case CONSOLEANDFILE: // log file and console...
case FILE: try ... | static void function(String S) { S = (new Date(System.currentTimeMillis())).toString() + STR + S; switch (loggingStyle) { case NOLOG: break; case CONSOLEANDFILE: case FILE: try { logfile.write(S + "\n"); logfile.flush(); } catch (Exception e) { CBUtility.log(STR + e + "\n"+S); loggingStyle = CONSOLE; } if (loggingStyle... | /**
* Simple logging utility. Writes log data to a file or console,
* or ignores it, depending on the value of the logging and logfile
* property (defaults set in JXplorer.java, user sets in dxconfig.txt)
*/ | Simple logging utility. Writes log data to a file or console, or ignores it, depending on the value of the logging and logfile property (defaults set in JXplorer.java, user sets in dxconfig.txt) | log | {
"repo_name": "idega/platform2",
"path": "src/com/idega/core/ldap/client/cbutil/CBUtility.java",
"license": "gpl-3.0",
"size": 45284
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,657,499 |
@Override
public void delete(Integer objectID) {
Connection con = null;
try{
con = Transaction.begin(DATABASE_NAME);
deleteChildren(objectID, con);
doDelete(SimpleKey.keyFor(objectID),con);
Transaction.commit(con);
} catch (TorqueException e) {
Transaction.safeRollback(con);
LOGGER.error("Dele... | void function(Integer objectID) { Connection con = null; try{ con = Transaction.begin(DATABASE_NAME); deleteChildren(objectID, con); doDelete(SimpleKey.keyFor(objectID),con); Transaction.commit(con); } catch (TorqueException e) { Transaction.safeRollback(con); LOGGER.error(STR + objectID + STR + e); } } | /**
* Deletes a screen by primary key
* Is deletable should return true before calling this method
* @param objectID
*/ | Deletes a screen by primary key Is deletable should return true before calling this method | delete | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/TDashboardScreenPeer.java",
"license": "gpl-3.0",
"size": 10077
} | [
"java.sql.Connection",
"org.apache.torque.TorqueException",
"org.apache.torque.om.SimpleKey",
"org.apache.torque.util.Transaction"
] | import java.sql.Connection; import org.apache.torque.TorqueException; import org.apache.torque.om.SimpleKey; import org.apache.torque.util.Transaction; | import java.sql.*; import org.apache.torque.*; import org.apache.torque.om.*; import org.apache.torque.util.*; | [
"java.sql",
"org.apache.torque"
] | java.sql; org.apache.torque; | 1,086,814 |
return value;
}
/**
* Sets the value of the value property.
*
* @param value allowed object is {@link BigInteger } | return value; } /** * Sets the value of the value property. * * @param value allowed object is {@link BigInteger } | /**
* Gets the value of the value property.
*
* @return possible object is {@link BigInteger }
*
*/ | Gets the value of the value property | getValue | {
"repo_name": "phelpdh/smi-lib-wsman-client",
"path": "src/main/generated/org/dmtf/schemas/wbem/wsman/_1/wsman/AttributablePositiveInteger.java",
"license": "apache-2.0",
"size": 2767
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,087,260 |
private static final DatabaseInterface findDatabaseInterface( String databaseTypeDesc ) throws KettleDatabaseException {
PluginRegistry registry = PluginRegistry.getInstance();
PluginInterface plugin = registry.getPlugin( DatabasePluginType.class, databaseTypeDesc );
if ( plugin == null ) {
plugin =... | static final DatabaseInterface function( String databaseTypeDesc ) throws KettleDatabaseException { PluginRegistry registry = PluginRegistry.getInstance(); PluginInterface plugin = registry.getPlugin( DatabasePluginType.class, databaseTypeDesc ); if ( plugin == null ) { plugin = registry.findPluginWithName( DatabasePlu... | /**
* Search for the right type of DatabaseInterface object and return it.
*
* @param databaseTypeDesc
* the type of DatabaseInterface to look for (id or description)
* @return The requested DatabaseInterface
*
* @throws KettleDatabaseException
* when the type could not be fou... | Search for the right type of DatabaseInterface object and return it | findDatabaseInterface | {
"repo_name": "gretchiemoran/pentaho-kettle",
"path": "core/src/org/pentaho/di/core/database/DatabaseMeta.java",
"license": "apache-2.0",
"size": 89846
} | [
"org.pentaho.di.core.exception.KettleDatabaseException",
"org.pentaho.di.core.plugins.DatabasePluginType",
"org.pentaho.di.core.plugins.PluginInterface",
"org.pentaho.di.core.plugins.PluginRegistry"
] | import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.plugins.DatabasePluginType; import org.pentaho.di.core.plugins.PluginInterface; import org.pentaho.di.core.plugins.PluginRegistry; | import org.pentaho.di.core.exception.*; import org.pentaho.di.core.plugins.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 491,036 |
public static BigDecimal bigDecimalFrom(BigDecimal otherTime, int timeScale)
{
TimeScaleData data = getTimeScaleData(timeScale);
BigDecimal units = new BigDecimal(data.units);
BigDecimal epochOffset = new BigDecimal(data.epochOffset);
return otherTime.add(epochO... | static BigDecimal function(BigDecimal otherTime, int timeScale) { TimeScaleData data = getTimeScaleData(timeScale); BigDecimal units = new BigDecimal(data.units); BigDecimal epochOffset = new BigDecimal(data.epochOffset); return otherTime.add(epochOffset).multiply(units); } | /**
* Convert a <code>BigDecimal</code> datetime from the given time scale to the universal time scale.
* All calculations are done using <code>BigDecimal</code> to guarantee that the value
* does not go out of range.
*
* @param otherTime The <code>BigDecimal</code> datetime
* @param timeS... | Convert a <code>BigDecimal</code> datetime from the given time scale to the universal time scale. All calculations are done using <code>BigDecimal</code> to guarantee that the value does not go out of range | bigDecimalFrom | {
"repo_name": "abhijitvalluri/fitnotifications",
"path": "icu4j/src/main/java/com/ibm/icu/util/UniversalTimeScale.java",
"license": "apache-2.0",
"size": 22534
} | [
"com.ibm.icu.math.BigDecimal"
] | import com.ibm.icu.math.BigDecimal; | import com.ibm.icu.math.*; | [
"com.ibm.icu"
] | com.ibm.icu; | 1,986,686 |
private void validatePythonVersionAttr() {
AttributeMap attrs = ruleContext.attributes();
if (!attrs.has(PYTHON_VERSION_ATTRIBUTE, Type.STRING)) {
return;
}
String attrValue = attrs.get(PYTHON_VERSION_ATTRIBUTE, Type.STRING);
try {
PythonVersion.parseTargetOrSentinelValue(attrValue);
... | void function() { AttributeMap attrs = ruleContext.attributes(); if (!attrs.has(PYTHON_VERSION_ATTRIBUTE, Type.STRING)) { return; } String attrValue = attrs.get(PYTHON_VERSION_ATTRIBUTE, Type.STRING); try { PythonVersion.parseTargetOrSentinelValue(attrValue); } catch (IllegalArgumentException ex) { ruleContext.attribut... | /**
* Reports an attribute error if {@code python_version} cannot be parsed as {@code PY2}, {@code
* PY3}, or the sentinel value.
*
* <p>This *should* be enforced by rule attribute validation ({@link
* Attribute.Builder.allowedValues}), but this check is here to fail-fast just in case.
*/ | Reports an attribute error if python_version cannot be parsed as PY2, PY3, or the sentinel value. This *should* be enforced by rule attribute validation (<code>Attribute.Builder.allowedValues</code>), but this check is here to fail-fast just in case | validatePythonVersionAttr | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java",
"license": "apache-2.0",
"size": 44514
} | [
"com.google.devtools.build.lib.packages.AttributeMap",
"com.google.devtools.build.lib.packages.Type"
] | import com.google.devtools.build.lib.packages.AttributeMap; import com.google.devtools.build.lib.packages.Type; | import com.google.devtools.build.lib.packages.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,278,236 |
public MatrixSeries<S> getSeries(int seriesIndex) {
Args.requireInRange(seriesIndex, "seriesIndex", 0, this.seriesList.size() - 1);
MatrixSeries<S> series = this.seriesList.get(seriesIndex);
return series;
}
| MatrixSeries<S> function(int seriesIndex) { Args.requireInRange(seriesIndex, STR, 0, this.seriesList.size() - 1); MatrixSeries<S> series = this.seriesList.get(seriesIndex); return series; } | /**
* Returns the series having the specified index.
*
* @param seriesIndex zero-based series index.
*
* @return The series.
*/ | Returns the series having the specified index | getSeries | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/data/xy/MatrixSeriesCollection.java",
"license": "lgpl-2.1",
"size": 9312
} | [
"org.jfree.chart.internal.Args"
] | import org.jfree.chart.internal.Args; | import org.jfree.chart.internal.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,056,183 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(AssociationPackage.Literals.GRAPH_NODE__NODE_ENTITY);
}
return childrenFeatures;
} | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(AssociationPackage.Literals.GRAPH_NODE__NODE_ENTITY); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "drbgfc/mdht",
"path": "cts2/plugins/org.openhealthtools.mdht.cts2.core.edit/src/org/openhealthtools/mdht/cts2/association/provider/GraphNodeItemProvider.java",
"license": "epl-1.0",
"size": 8744
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.openhealthtools.mdht.cts2.association.AssociationPackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.openhealthtools.mdht.cts2.association.AssociationPackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.openhealthtools.mdht.cts2.association.*; | [
"java.util",
"org.eclipse.emf",
"org.openhealthtools.mdht"
] | java.util; org.eclipse.emf; org.openhealthtools.mdht; | 1,550,543 |
public SocketAddress getAddress();
| SocketAddress function(); | /**
* Gets the player's SocketAddress.
* @return The player's SocketAddress.
*/ | Gets the player's SocketAddress | getAddress | {
"repo_name": "OpenClassic/OpenClassicAPI",
"path": "src/main/java/org/spacehq/openclassic/api/player/Player.java",
"license": "mit",
"size": 4616
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,149,301 |
void setTestDependencies(
LongPressDetector longPressDetector, GestureDetector gestureDetector,
OnGestureListener listener) {
mLongPressDetector = longPressDetector;
mGestureDetector = gestureDetector;
mListener = listener;
} | void setTestDependencies( LongPressDetector longPressDetector, GestureDetector gestureDetector, OnGestureListener listener) { mLongPressDetector = longPressDetector; mGestureDetector = gestureDetector; mListener = listener; } | /**
* Used to override the default long press detector, gesture detector and listener.
* This is used for testing only.
* @param longPressDetector The new LongPressDetector to be assigned.
* @param gestureDetector The new GestureDetector to be assigned.
* @param listener The new onGestureListen... | Used to override the default long press detector, gesture detector and listener. This is used for testing only | setTestDependencies | {
"repo_name": "leiferikb/bitpop-private",
"path": "content/public/android/java/src/org/chromium/content/browser/ContentViewGestureHandler.java",
"license": "bsd-3-clause",
"size": 38956
} | [
"org.chromium.content.browser.third_party.GestureDetector"
] | import org.chromium.content.browser.third_party.GestureDetector; | import org.chromium.content.browser.third_party.*; | [
"org.chromium.content"
] | org.chromium.content; | 2,581,373 |
public void assign(final double a,
final Complex b,
final double d) {
assign(a, b.re, b.im, d);
} | void function(final double a, final Complex b, final double d) { assign(a, b.re, b.im, d); } | /**
* Assign hermitian matrix by diagonal and upper right elements.
*
* @param a a <code>double</code>: the real upper left entry
* @param b a {@link Field.Complex}: the complex upper right entry
* @param d a <code>double</code>: the real lower right entry
*/ | Assign hermitian matrix by diagonal and upper right elements | assign | {
"repo_name": "jupsal/schmies-jTEM",
"path": "libUnzipped/de/jtem/mfc/matrix/HermitianComplex2By2.java",
"license": "bsd-2-clause",
"size": 9012
} | [
"de.jtem.mfc.field.Complex"
] | import de.jtem.mfc.field.Complex; | import de.jtem.mfc.field.*; | [
"de.jtem.mfc"
] | de.jtem.mfc; | 1,205,493 |
public Collection<? extends Integer> getMatchingComponents() {
ArrayList<Integer> temp = new ArrayList<>(this.nids.size());
for (Entry<Float, Integer> x : this.nids)
{
temp.add(x.getValue());
}
return temp;
} | Collection<? extends Integer> function() { ArrayList<Integer> temp = new ArrayList<>(this.nids.size()); for (Entry<Float, Integer> x : this.nids) { temp.add(x.getValue()); } return temp; } | /**
* Gets the matching components, in a collection that is ranked from best score to worst.
*
* @return the matching components
*/ | Gets the matching components, in a collection that is ranked from best score to worst | getMatchingComponents | {
"repo_name": "OSEHRA/ISAAC",
"path": "core/api/src/main/java/sh/isaac/api/index/ConceptSearchResult.java",
"license": "apache-2.0",
"size": 6688
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Map"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,853,573 |
void handleBeforeAttributeName() {
if (tryCreateTagEnd()) {
return;
}
if (consumeWhitespace()) {
// if we consumed whitespace, return and keep going.
// we don't necessarily expect whitespace, but it is ok if there is extra whitespace here
// this can happen:
... | void handleBeforeAttributeName() { if (tryCreateTagEnd()) { return; } if (consumeWhitespace()) { return; } RawTextNode identifier = consumeHtmlIdentifier(EXPECTED_ATTRIBUTE_NAME); if (identifier == null) { context.resetAttribute(); advance(); return; } else { validateIdentifier(identifier, ATTRIBUTE_NAME, BAD_ATTRIBUTE... | /**
* Handle the state where we are right before an attribute.
*
* <p>This state is kind of confusing, it just means we are in the middle of a tag and are
* definitely after some whitespace.
*/ | Handle the state where we are right before an attribute. This state is kind of confusing, it just means we are in the middle of a tag and are definitely after some whitespace | handleBeforeAttributeName | {
"repo_name": "yext/closure-templates",
"path": "java/src/com/google/template/soy/soyparse/HtmlRewriter.java",
"license": "apache-2.0",
"size": 103310
} | [
"com.google.template.soy.soytree.RawTextNode"
] | import com.google.template.soy.soytree.RawTextNode; | import com.google.template.soy.soytree.*; | [
"com.google.template"
] | com.google.template; | 2,038,432 |
private static String toSource(Node root, Format outputFormat,
CompilerOptions options, SourceMap sourceMap, boolean tagAsStrict, boolean lineBreak,
CodeGeneratorFactory codeGeneratorFactory) {
Preconditions.checkState(options.sourceMapDetailLevel != null);
boolean createSourceMap = (sourceMap !=... | static String function(Node root, Format outputFormat, CompilerOptions options, SourceMap sourceMap, boolean tagAsStrict, boolean lineBreak, CodeGeneratorFactory codeGeneratorFactory) { Preconditions.checkState(options.sourceMapDetailLevel != null); boolean createSourceMap = (sourceMap != null); MappedCodePrinter mcp =... | /**
* Converts a tree to JS code
*/ | Converts a tree to JS code | toSource | {
"repo_name": "ralic/closure-compiler",
"path": "src/com/google/javascript/jscomp/CodePrinter.java",
"license": "apache-2.0",
"size": 22274
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.jscomp.CodePrinter",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.jscomp.CodePrinter; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,355,504 |
public List<T> findAll();
| List<T> function(); | /**
* Method that return the List of Entities.
*
* @return list of samples.
*/ | Method that return the List of Entities | findAll | {
"repo_name": "tuliobraga/tech-gallery",
"path": "src/main/java/com/ciandt/techgallery/sample/service/Service.java",
"license": "apache-2.0",
"size": 864
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 466,054 |
public BigDecimal getDue31_Plus ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_Plus);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Due31_Plus); if (bd == null) return Env.ZERO; return bd; } | /** Get Due > 31.
@return Due > 31 */ | Get Due > 31 | getDue31_Plus | {
"repo_name": "armenrz/adempiere",
"path": "base/src/org/compiere/model/X_T_Aging.java",
"license": "gpl-2.0",
"size": 23515
} | [
"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; | 427,235 |
Map<String, Object> getAdditionalInfo();
} | Map<String, Object> getAdditionalInfo(); } | /**
* Returns any additional info provided in the activation key.
*
* @return any additional info provided in the activation key.
*/ | Returns any additional info provided in the activation key | getAdditionalInfo | {
"repo_name": "rockmkd/datacollector",
"path": "container-common/src/main/java/com/streamsets/datacollector/activation/Activation.java",
"license": "apache-2.0",
"size": 2967
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,634,953 |
@Override
public void setColor(Color c) {
if (c == null) {
return;
}
this.awtColor = c;
this.paint = c;
javafx.scene.paint.Color fxcolor = awtColorToJavaFX(c);
this.gc.setFill(fxcolor);
this.gc.setStroke(fxcolor);
} | void function(Color c) { if (c == null) { return; } this.awtColor = c; this.paint = c; javafx.scene.paint.Color fxcolor = awtColorToJavaFX(c); this.gc.setFill(fxcolor); this.gc.setStroke(fxcolor); } | /**
* Sets the foreground color. This method exists for backwards
* compatibility in AWT, you should use the
* {@link #setPaint(java.awt.Paint)} method.
*
* @param c the color ({@code null} permitted but ignored).
* @see #setPaint(java.awt.Paint)
*/ | Sets the foreground color. This method exists for backwards compatibility in AWT, you should use the <code>#setPaint(java.awt.Paint)</code> method | setColor | {
"repo_name": "informatik-mannheim/Moduro-Toolbox",
"path": "src/main/java/de/hs/mannheim/modUro/controller/diagram/fx/FXGraphics2D.java",
"license": "apache-2.0",
"size": 60103
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,997,044 |
public Entity<T> removePostRemove()
{
childNode.removeChildren("post-remove");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: Entity ElementName: orm:pre-update ElementType : pre-update
// MaxOcc... | Entity<T> function() { childNode.removeChildren(STR); return this; } | /**
* Removes the <code>post-remove</code> element
* @return the current instance of <code>Entity<T></code>
*/ | Removes the <code>post-remove</code> element | removePostRemove | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm20/EntityImpl.java",
"license": "epl-1.0",
"size": 48316
} | [
"org.jboss.shrinkwrap.descriptor.api.orm20.Entity"
] | import org.jboss.shrinkwrap.descriptor.api.orm20.Entity; | import org.jboss.shrinkwrap.descriptor.api.orm20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,411,481 |
public Type getType() {
return type;
} | Type function() { return type; } | /**
* Gets the static type of the expression that this Expression
* represents.
*/ | Gets the static type of the expression that this Expression represents | getType | {
"repo_name": "glimpseio/incubator-calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/tree/AbstractNode.java",
"license": "apache-2.0",
"size": 2797
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,180,532 |
private Map<StepMeta, Boolean> updateFillStepMap(
Map<StepMeta, List<StepMeta>> previousCache,
Map<StepMeta, Map<StepMeta, Boolean>> beforeCache,
StepMeta originStepMeta, StepMeta previousStepMeta) {
// See if we have a hash map to store step occurrence (located before
// the step)
//
Map<StepMeta,... | Map<StepMeta, Boolean> function( Map<StepMeta, List<StepMeta>> previousCache, Map<StepMeta, Map<StepMeta, Boolean>> beforeCache, StepMeta originStepMeta, StepMeta previousStepMeta) { if (beforeMap == null) { beforeMap = new HashMap<StepMeta, Boolean>(); } else { return beforeMap; } List<StepMeta> prevSteps = previousCa... | /**
* Fill the
*
* @param stepMap
* @param previousCache
* @param beforeCache
* @param originStepMeta
* @param previousStepMeta
*/ | Fill the | updateFillStepMap | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/TransMeta.java",
"license": "gpl-2.0",
"size": 209743
} | [
"com.panet.imeta.trans.step.StepMeta",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.panet.imeta.trans.step.StepMeta; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.panet.imeta.trans.step.*; import java.util.*; | [
"com.panet.imeta",
"java.util"
] | com.panet.imeta; java.util; | 2,303,882 |
private synchronized boolean invalidateCacheOnIncludeChange(Iterable<String> includes) {
List<String> includesList = Lists.newArrayList(includes);
if (!includesList.equals(this.cacheDefaultIncludes)) {
LOG.debug("Parser invalidating entire cache on default include change.");
invalidateCa... | synchronized boolean function(Iterable<String> includes) { List<String> includesList = Lists.newArrayList(includes); if (!includesList.equals(this.cacheDefaultIncludes)) { LOG.debug(STR); invalidateCache(); this.cacheDefaultIncludes = includesList; return true; } return false; } | /**
* Invalidates the cached build rules if {@code includes} have changed since the last call.
* If the cache is invalidated the new {@code includes} used to build the new cache are stored.
*
* @param includes the files to include before executing the build file.
* @return true if the cache was... | Invalidates the cached build rules if includes have changed since the last call. If the cache is invalidated the new includes used to build the new cache are stored | invalidateCacheOnIncludeChange | {
"repo_name": "mnuessler/buck",
"path": "src/com/facebook/buck/parser/Parser.java",
"license": "apache-2.0",
"size": 52742
} | [
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,481,467 |
private void handleAnnotatedEvent(AnnotatedEvent evt)
{
DataBrowserFactory.onAnnotated(evt.getData(), evt.getCount());
} | void function(AnnotatedEvent evt) { DataBrowserFactory.onAnnotated(evt.getData(), evt.getCount()); } | /**
* Indicates that some objects have been annotated.
*
* @param evt The event to handle.
*/ | Indicates that some objects have been annotated | handleAnnotatedEvent | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/DataBrowserAgent.java",
"license": "gpl-2.0",
"size": 10827
} | [
"org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory",
"org.openmicroscopy.shoola.agents.events.metadata.AnnotatedEvent"
] | import org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory; import org.openmicroscopy.shoola.agents.events.metadata.AnnotatedEvent; | import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.agents.events.metadata.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,326,872 |
private void processPingRequest() {
TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId());
res.client(true);
sockWriter.sendMessage(res);
} | void function() { TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId()); res.client(true); sockWriter.sendMessage(res); } | /**
* Router want to ping this client.
*/ | Router want to ping this client | processPingRequest | {
"repo_name": "murador/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java",
"license": "apache-2.0",
"size": 76048
} | [
"org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse"
] | import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse; | import org.apache.ignite.spi.discovery.tcp.messages.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 622,127 |
public void testConstructor4() {
try {
Integer[] ints = new Integer[SIZE];
new TreeSet(Arrays.asList(ints));
shouldThrow();
} catch (NullPointerException success) {}
} | void function() { try { Integer[] ints = new Integer[SIZE]; new TreeSet(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} } | /**
* Initializing from Collection of null elements throws NPE
*/ | Initializing from Collection of null elements throws NPE | testConstructor4 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/TreeSetTest.java",
"license": "gpl-2.0",
"size": 29478
} | [
"java.util.Arrays",
"java.util.TreeSet"
] | import java.util.Arrays; import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,212,604 |
public static ValueExpression createValueExpression(String p_expression, Class<?> expectedType) {
FacesContext context = FacesContext.getCurrentInstance();
ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
ELContext elContext = context.getELContext();
if (null == expected... | static ValueExpression function(String p_expression, Class<?> expectedType) { FacesContext context = FacesContext.getCurrentInstance(); ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory(); ELContext elContext = context.getELContext(); if (null == expectedType) { LOGGER.severe(STR + p_e... | /**
* Utility method to create a JSF Value expression from p_expression with exprectedType class as return
* @param p_expression
* @param expectedType
* @return
*/ | Utility method to create a JSF Value expression from p_expression with exprectedType class as return | createValueExpression | {
"repo_name": "asterd/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/beans/ELTools.java",
"license": "apache-2.0",
"size": 12302
} | [
"javax.el.ELContext",
"javax.el.ExpressionFactory",
"javax.el.ValueExpression",
"javax.faces.context.FacesContext"
] | import javax.el.ELContext; import javax.el.ExpressionFactory; import javax.el.ValueExpression; import javax.faces.context.FacesContext; | import javax.el.*; import javax.faces.context.*; | [
"javax.el",
"javax.faces"
] | javax.el; javax.faces; | 790,063 |
private void upload(byte[] bytes, int off, int len) throws IOException {
try (ByteArrayInputStream is = new ByteArrayInputStream(bytes, off, len)) {
try {
doUpload(getBlobStore(), getBucketName(), getBlobName(), is, len, isServerSideEncryption());
} catch (AmazonClien... | void function(byte[] bytes, int off, int len) throws IOException { try (ByteArrayInputStream is = new ByteArrayInputStream(bytes, off, len)) { try { doUpload(getBlobStore(), getBucketName(), getBlobName(), is, len, isServerSideEncryption()); } catch (AmazonClientException e) { throw new IOException(STR + getBlobName(),... | /**
* Upload data using a single request.
*/ | Upload data using a single request | upload | {
"repo_name": "winstonewert/elasticsearch",
"path": "plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/DefaultS3OutputStream.java",
"license": "apache-2.0",
"size": 9748
} | [
"com.amazonaws.AmazonClientException",
"java.io.ByteArrayInputStream",
"java.io.IOException"
] | import com.amazonaws.AmazonClientException; import java.io.ByteArrayInputStream; import java.io.IOException; | import com.amazonaws.*; import java.io.*; | [
"com.amazonaws",
"java.io"
] | com.amazonaws; java.io; | 936,988 |
private Deque<Flow> processSplitFlow(LabelledTaskNode node, Deque<Flow> resultFlowDeque) {
TaskParser taskParser = new TaskParser("split_flow" + UUID.randomUUID().toString(), node.stringify(),
false, true);
ComposedRunnerVisitor splitElementVisitor = new ComposedRunnerVisitor();
taskParser.parse().accept(s... | Deque<Flow> function(LabelledTaskNode node, Deque<Flow> resultFlowDeque) { TaskParser taskParser = new TaskParser(STR + UUID.randomUUID().toString(), node.stringify(), false, true); ComposedRunnerVisitor splitElementVisitor = new ComposedRunnerVisitor(); taskParser.parse().accept(splitElementVisitor); Deque splitElemen... | /**
* Processes each node in split as a DSL Flow.
* @param node represents a single node in the split.
* @return Deque of Job Flows that was obtained from the Node.
*/ | Processes each node in split as a DSL Flow | processSplitFlow | {
"repo_name": "markpollack/spring-cloud-dataflow",
"path": "spring-cloud-dataflow-composed-task-runner/src/main/java/org/springframework/cloud/dataflow/composedtaskrunner/ComposedRunnerJobFactory.java",
"license": "apache-2.0",
"size": 11711
} | [
"java.util.Deque",
"java.util.LinkedList",
"java.util.UUID",
"org.springframework.batch.core.job.flow.Flow",
"org.springframework.cloud.dataflow.core.dsl.FlowNode",
"org.springframework.cloud.dataflow.core.dsl.LabelledTaskNode",
"org.springframework.cloud.dataflow.core.dsl.SplitNode",
"org.springframe... | import java.util.Deque; import java.util.LinkedList; import java.util.UUID; import org.springframework.batch.core.job.flow.Flow; import org.springframework.cloud.dataflow.core.dsl.FlowNode; import org.springframework.cloud.dataflow.core.dsl.LabelledTaskNode; import org.springframework.cloud.dataflow.core.dsl.SplitNode;... | import java.util.*; import org.springframework.batch.core.job.flow.*; import org.springframework.cloud.dataflow.core.dsl.*; | [
"java.util",
"org.springframework.batch",
"org.springframework.cloud"
] | java.util; org.springframework.batch; org.springframework.cloud; | 910,979 |
public static <T extends ComponentFactory> T find(
Class<T> factoryClass, Map<String, String> propertyMap) {
List<T> all = TableFactoryService.findAll(factoryClass, propertyMap);
List<T> filtered =
all.stream()
.filter(
... | static <T extends ComponentFactory> T function( Class<T> factoryClass, Map<String, String> propertyMap) { List<T> all = TableFactoryService.findAll(factoryClass, propertyMap); List<T> filtered = all.stream() .filter( factory -> { Map<String, String> optionalContext = factory.optionalContext(); return optionalContext.en... | /**
* Finds a table factory of the given class and property map. This method enables disambiguating
* multiple matching {@link ComponentFactory}s based on additional optional context provided via
* {@link ComponentFactory#optionalContext()}.
*
* @param factoryClass desired factory class
* ... | Finds a table factory of the given class and property map. This method enables disambiguating multiple matching <code>ComponentFactory</code>s based on additional optional context provided via <code>ComponentFactory#optionalContext()</code> | find | {
"repo_name": "rmetzger/flink",
"path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/ComponentFactoryService.java",
"license": "apache-2.0",
"size": 3802
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.stream.Collectors",
"org.apache.flink.table.api.AmbiguousTableFactoryException",
"org.apache.flink.table.api.NoMatchingTableFactoryException"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import org.apache.flink.table.api.AmbiguousTableFactoryException; import org.apache.flink.table.api.NoMatchingTableFactoryException; | import java.util.*; import java.util.stream.*; import org.apache.flink.table.api.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 189,815 |
@Test
public void testSetPartialDate() {
WPartialDateField partialDateField = new WPartialDateField();
Integer day = null;
Integer month = null;
Integer year = null;
partialDateField.setPartialDate(day, month, year);
Assert.assertNull("date should be null", partialDateField.getDate());
Assert.assertN... | void function() { WPartialDateField partialDateField = new WPartialDateField(); Integer day = null; Integer month = null; Integer year = null; partialDateField.setPartialDate(day, month, year); Assert.assertNull(STR, partialDateField.getDate()); Assert.assertNull(STR, partialDateField.getValueAsString()); day = null; m... | /**
* test setPartialDate - with Integer inputs.
*/ | test setPartialDate - with Integer inputs | testSetPartialDate | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-core/src/test/java/com/github/bordertech/wcomponents/WPartialDateField_Test.java",
"license": "gpl-3.0",
"size": 40537
} | [
"com.github.bordertech.wcomponents.util.DateUtilities",
"java.util.Date",
"junit.framework.Assert"
] | import com.github.bordertech.wcomponents.util.DateUtilities; import java.util.Date; import junit.framework.Assert; | import com.github.bordertech.wcomponents.util.*; import java.util.*; import junit.framework.*; | [
"com.github.bordertech",
"java.util",
"junit.framework"
] | com.github.bordertech; java.util; junit.framework; | 1,400,978 |
private static void writeEventType(BinaryRawWriterEx writer, EventType evtType) {
switch (evtType){
case CREATED: writer.writeByte((byte) 0); break;
case UPDATED: writer.writeByte((byte) 1); break;
case REMOVED: writer.writeByte((byte) 2); break;
case EXPIRED:... | static void function(BinaryRawWriterEx writer, EventType evtType) { switch (evtType){ case CREATED: writer.writeByte((byte) 0); break; case UPDATED: writer.writeByte((byte) 1); break; case REMOVED: writer.writeByte((byte) 2); break; case EXPIRED: writer.writeByte((byte) 3); break; default: throw new IllegalArgumentExce... | /**
* Write event type to the writer.
* @param writer Writer.
* @param evtType Type of event.
*/ | Write event type to the writer | writeEventType | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java",
"license": "apache-2.0",
"size": 39937
} | [
"javax.cache.event.EventType",
"org.apache.ignite.internal.binary.BinaryRawWriterEx"
] | import javax.cache.event.EventType; import org.apache.ignite.internal.binary.BinaryRawWriterEx; | import javax.cache.event.*; import org.apache.ignite.internal.binary.*; | [
"javax.cache",
"org.apache.ignite"
] | javax.cache; org.apache.ignite; | 1,781,585 |
public static void copyHeaders(Message source, Message target, boolean override) {
if (!source.hasHeaders()) {
return;
}
for (Map.Entry<String, Object> entry : source.getHeaders().entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();... | static void function(Message source, Message target, boolean override) { if (!source.hasHeaders()) { return; } for (Map.Entry<String, Object> entry : source.getHeaders().entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); if (target.getHeader(key) == null override) { target.setHeader(key, value)... | /**
* Copies the headers from the source to the target message.
*
* @param source the source message
* @param target the target message
* @param override whether to override existing headers
*/ | Copies the headers from the source to the target message | copyHeaders | {
"repo_name": "logzio/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/MessageHelper.java",
"license": "apache-2.0",
"size": 21141
} | [
"java.util.Map",
"org.apache.camel.Message"
] | import java.util.Map; import org.apache.camel.Message; | import java.util.*; import org.apache.camel.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 43,230 |
public void addDiscoveredAnnotations(List<DiscoveredAnnotation> annotations)
{
if (annotations == null)
return;
for (DiscoveredAnnotation a:annotations)
{
Resource r = a.getResource();
if (r == null || !_webInfJars.contains(r))
_annotat... | void function(List<DiscoveredAnnotation> annotations) { if (annotations == null) return; for (DiscoveredAnnotation a:annotations) { Resource r = a.getResource(); if (r == null !_webInfJars.contains(r)) _annotations.add(a); else addDiscoveredAnnotation(a.getResource(), a); } } | /**
* Annotations not associated with a WEB-INF/lib fragment jar.
* These are from WEB-INF/classes or the ??container path??
* @param annotations
*/ | Annotations not associated with a WEB-INF/lib fragment jar. These are from WEB-INF/classes or the ??container path? | addDiscoveredAnnotations | {
"repo_name": "geekboxzone/mmallow_external_jetty",
"path": "src/java/org/eclipse/jetty/webapp/MetaData.java",
"license": "apache-2.0",
"size": 17700
} | [
"java.util.List",
"org.eclipse.jetty.util.resource.Resource"
] | import java.util.List; import org.eclipse.jetty.util.resource.Resource; | import java.util.*; import org.eclipse.jetty.util.resource.*; | [
"java.util",
"org.eclipse.jetty"
] | java.util; org.eclipse.jetty; | 1,680,984 |
public List selectList(String sql){
List<List> rows = new ArrayList();
try {
Statement statement = connection.createStatement();
statement.setQueryTimeout(30); // set timeout to 30 sec.
ResultSet rs = statement.executeQuery(sql);
ResultSetMetaData rsM... | List function(String sql){ List<List> rows = new ArrayList(); try { Statement statement = connection.createStatement(); statement.setQueryTimeout(30); ResultSet rs = statement.executeQuery(sql); ResultSetMetaData rsMetaData = rs.getMetaData(); int numberOfColumns = rsMetaData.getColumnCount(); while(rs.next()){ List<Ob... | /**
* Returns a list of results from a given query
* @param sql query to be executed against the database
* @return list containing results from query.
*/ | Returns a list of results from a given query | selectList | {
"repo_name": "jenkinsci/coverage-ratcheting-plugin",
"path": "src/main/java/com/mattersight/ratchet/Database.java",
"license": "bsd-2-clause",
"size": 7984
} | [
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.ArrayList",
"java.util.List",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; | import java.sql.*; import java.util.*; import java.util.logging.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,541,775 |
public void testIncludeParseCaching ()
throws Exception
{
VelocityEngine ve = new VelocityEngine();
ve.setProperty("file.resource.loader.cache", "true");
ve.setProperty("file.resource.loader.path", FILE_RESOURCE_LOADER_PATH);
ve.init();
Template template = ... | void function () throws Exception { VelocityEngine ve = new VelocityEngine(); ve.setProperty(STR, "true"); ve.setProperty(STR, FILE_RESOURCE_LOADER_PATH); ve.init(); Template template = ve.getTemplate(STR); Writer writer = new StringWriter(); VelocityContext context = new VelocityContext(); template.merge(context, writ... | /**
* Tests for fix of bug VELOCITY-98 where a #include followed by #parse
* of the same file throws ClassCastException when caching is on.
* @throws Exception
*/ | Tests for fix of bug VELOCITY-98 where a #include followed by #parse of the same file throws ClassCastException when caching is on | testIncludeParseCaching | {
"repo_name": "mashuai/Open-Source-Research",
"path": "Velocity/src/test/org/apache/velocity/test/ResourceCachingTestCase.java",
"license": "apache-2.0",
"size": 2695
} | [
"java.io.StringWriter",
"java.io.Writer",
"org.apache.velocity.Template",
"org.apache.velocity.VelocityContext",
"org.apache.velocity.app.VelocityEngine"
] | import java.io.StringWriter; import java.io.Writer; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; | import java.io.*; import org.apache.velocity.*; import org.apache.velocity.app.*; | [
"java.io",
"org.apache.velocity"
] | java.io; org.apache.velocity; | 1,321,687 |
private boolean checkTaskCanceledOrFailed() {
if (isCanceled() || !TaskStatus.FINISHED.equals(currentTask.getStatus())) {
setStatus(currentTask.getStatus());
setErrorMessage(currentTask.getErrorMessage());
return true;
}
return false;
} | boolean function() { if (isCanceled() !TaskStatus.FINISHED.equals(currentTask.getStatus())) { setStatus(currentTask.getStatus()); setErrorMessage(currentTask.getErrorMessage()); return true; } return false; } | /**
* Check if the current task finished successfully.
*
* @return true if task is cancelled or failed
*/ | Check if the current task finished successfully | checkTaskCanceledOrFailed | {
"repo_name": "mzmine/mzmine3",
"path": "src/main/java/io/github/mzmine/modules/io/export_features_gnps/fbmn/GnpsFbmnExportAndSubmitTask.java",
"license": "gpl-2.0",
"size": 12111
} | [
"io.github.mzmine.taskcontrol.TaskStatus"
] | import io.github.mzmine.taskcontrol.TaskStatus; | import io.github.mzmine.taskcontrol.*; | [
"io.github.mzmine"
] | io.github.mzmine; | 313,166 |
public List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups() {
return this.sourceApplicationSecurityGroups;
} | List<ApplicationSecurityGroupInner> function() { return this.sourceApplicationSecurityGroups; } | /**
* Get the application security group specified as source.
*
* @return the sourceApplicationSecurityGroups value
*/ | Get the application security group specified as source | sourceApplicationSecurityGroups | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/SecurityRuleInner.java",
"license": "mit",
"size": 16948
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 863,598 |
public void setType( ReadPairType readPairType ) {
this.type = readPairType;
} | void function( ReadPairType readPairType ) { this.type = readPairType; } | /**
* Update the read pair type, if it changes.
* <p>
* @param readPairType the new read pair type
*/ | Update the read pair type, if it changes. | setType | {
"repo_name": "rhilker/ReadXplorer",
"path": "readxplorer-tools-readpairclassifier/src/main/java/de/cebitec/readxplorer/readpairclassifier/ReadPair.java",
"license": "gpl-3.0",
"size": 2876
} | [
"de.cebitec.readxplorer.api.enums.ReadPairType"
] | import de.cebitec.readxplorer.api.enums.ReadPairType; | import de.cebitec.readxplorer.api.enums.*; | [
"de.cebitec.readxplorer"
] | de.cebitec.readxplorer; | 2,795,283 |
public void setAggregatedContainersUtilization(
ResourceUtilization containersUtilization) {
this.containersUtilization = containersUtilization;
} | void function( ResourceUtilization containersUtilization) { this.containersUtilization = containersUtilization; } | /**
* Set the resource utilization of the containers in the node.
* @param containersUtilization Resource utilization of the containers.
*/ | Set the resource utilization of the containers in the node | setAggregatedContainersUtilization | {
"repo_name": "soumabrata-chakraborty/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/SchedulerNode.java",
"license": "apache-2.0",
"size": 14958
} | [
"org.apache.hadoop.yarn.api.records.ResourceUtilization"
] | import org.apache.hadoop.yarn.api.records.ResourceUtilization; | import org.apache.hadoop.yarn.api.records.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 415,547 |
public Axis getXAxis(String id) throws AxisNotFoundException {
if(!xAxis_.isEmpty()) {
Axis ax;
for(Enumeration it = xAxis_.elements(); it.hasMoreElements();) {
ax = (Axis)it.nextElement();
if(ax.getId() == id) return ax;
}
throw new AxisNotFoundException();
} else {
... | Axis function(String id) throws AxisNotFoundException { if(!xAxis_.isEmpty()) { Axis ax; for(Enumeration it = xAxis_.elements(); it.hasMoreElements();) { ax = (Axis)it.nextElement(); if(ax.getId() == id) return ax; } throw new AxisNotFoundException(); } else { throw new AxisNotFoundException(); } } | /**
* Get a reference to an X axis.
*
* @param id axis identifier
* @return axis found
* @exception AxisNotFoundException An axis was not found with the correct identifier.
* @see Axis
* @see PlainAxis
*/ | Get a reference to an X axis | getXAxis | {
"repo_name": "luttero/Maud",
"path": "src/gov/noaa/pmel/sgt/CartesianGraph.java",
"license": "bsd-3-clause",
"size": 28021
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,323,913 |
public String writeZipFile(File directoryToZip, List<File> fileList) {
String zipFileName =
directoryToZip.getName() + "_" + UUID.randomUUID() + ".zip";
try {
FileOutputStream fos = new FileOutputStream(
zipFileName);
ZipOutputStream zos = new ZipOutputStream(fos);
for (File file : fileList) {... | String function(File directoryToZip, List<File> fileList) { String zipFileName = directoryToZip.getName() + "_" + UUID.randomUUID() + ".zip"; try { FileOutputStream fos = new FileOutputStream( zipFileName); ZipOutputStream zos = new ZipOutputStream(fos); for (File file : fileList) { if (!file.isDirectory()) { addToZip(... | /**
* This function helps you create zip file from list of files
* @param directoryToZip -Enter location of the directory you want to zip
* @param fileList -Enter list of files you want to zip from that directory
* @return -Returns location of zip file.
*/ | This function helps you create zip file from list of files | writeZipFile | {
"repo_name": "selenium-webdriver-software-testing/kspl-selenium-helper",
"path": "src/main/java/in/mayurshah/util/ZipUtil.java",
"license": "gpl-3.0",
"size": 2682
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.List",
"java.util.UUID",
"java.util.zip.ZipOutputStream"
] | import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; import java.util.UUID; import java.util.zip.ZipOutputStream; | import java.io.*; import java.util.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,378,446 |
CompletableFuture<Collection<V>> replaceValues(K key, Iterable<V> values); | CompletableFuture<Collection<V>> replaceValues(K key, Iterable<V> values); | /**
* Stores all the values in values associated with the key specified,
* removes all preexisting values and returns a collection of the removed
* values which may be empty if the entry did not exist.
* @param key the key for all entries to be added
* @param values the values to be associated ... | Stores all the values in values associated with the key specified, removes all preexisting values and returns a collection of the removed values which may be empty if the entry did not exist | replaceValues | {
"repo_name": "lsinfo3/onos",
"path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java",
"license": "apache-2.0",
"size": 8818
} | [
"java.util.Collection",
"java.util.concurrent.CompletableFuture"
] | import java.util.Collection; import java.util.concurrent.CompletableFuture; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 614,201 |
public TipoCliente actualizarTipoCliente(TipoCliente tipoCliente) {
return tipoClienteEJB.actualizarTipoCliente(tipoCliente);
} | TipoCliente function(TipoCliente tipoCliente) { return tipoClienteEJB.actualizarTipoCliente(tipoCliente); } | /**
* Metodo que permite actualizar un Tipo Cliente
*
* @param tipoCliente
* TipoCliente a ser actualizado
* @return El TipoCliente actualizar, o null en caso de que no se haya
* podido registrar
*/ | Metodo que permite actualizar un Tipo Cliente | actualizarTipoCliente | {
"repo_name": "uniquindiogaso/suturno",
"path": "suturno-desktop/src/main/java/co/edu/uniquindio/ingesis/suturno/desktop/delegados/TipoClienteDelegate.java",
"license": "apache-2.0",
"size": 2948
} | [
"co.edu.uniquindio.ingesis.suturno.entidades.TipoCliente"
] | import co.edu.uniquindio.ingesis.suturno.entidades.TipoCliente; | import co.edu.uniquindio.ingesis.suturno.entidades.*; | [
"co.edu.uniquindio"
] | co.edu.uniquindio; | 2,015,599 |
public static Object deserialize(String fileName) throws IOException, ClassNotFoundException {
FileInputStream fis = new FileInputStream(fileName);
ObjectInputStream ois = new ObjectInputStream(fis);
Object obj = ois.readObject(); //TODO recast as some concrete Model!
ois.close();
... | static Object function(String fileName) throws IOException, ClassNotFoundException { FileInputStream fis = new FileInputStream(fileName); ObjectInputStream ois = new ObjectInputStream(fis); Object obj = ois.readObject(); ois.close(); return obj; } | /**
* Untested
*
* Read a previous Model in from file and make it accessible.
*
* @param fileName
* @return
* @throws IOException
* @throws ClassNotFoundException
*/ | Untested Read a previous Model in from file and make it accessible | deserialize | {
"repo_name": "optimusmoose/miniML",
"path": "src/main/java/backend/WekaInvoker.java",
"license": "gpl-3.0",
"size": 6174
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,994,658 |
public void calculateShipCost() {
//Calculates regular shipping cost
shippingCost = (SHIPPING_RATE.multiply(BigDecimal.valueOf(weight))).multiply(BigDecimal.valueOf(quantity));
//If premium shipping requested, add %20
if (isPremium)
shippingCost.add(shippingCost.mu... | void function() { shippingCost = (SHIPPING_RATE.multiply(BigDecimal.valueOf(weight))).multiply(BigDecimal.valueOf(quantity)); if (isPremium) shippingCost.add(shippingCost.multiply(PREMIUM_RATE)); } | /**
* Calculates this item's shipping cost.
*/ | Calculates this item's shipping cost | calculateShipCost | {
"repo_name": "craterink/422C",
"path": "shoppingcart/PurchaseItem.java",
"license": "mit",
"size": 3819
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 185,578 |
Tokenizer tokenizer = Tokenizer.getExpressionTokenizer();
tokenizer.tokenize(expression);
LinkedList<Token> tokens = tokenizer.getTokens();
return parse(tokens);
} | Tokenizer tokenizer = Tokenizer.getExpressionTokenizer(); tokenizer.tokenize(expression); LinkedList<Token> tokens = tokenizer.getTokens(); return parse(tokens); } | /**
* Parse a mathematical expression in a string and return an ExpressionNode.
* This is a convenience method that first converts the string into a linked
* list of tokens using the expression tokenizer provided by the Tokenizer
* class.
*
* @param expression the string holding the input
... | Parse a mathematical expression in a string and return an ExpressionNode. This is a convenience method that first converts the string into a linked list of tokens using the expression tokenizer provided by the Tokenizer class | parse | {
"repo_name": "cleberecht/singa",
"path": "singa-simulation/src/main/java/uk/co/cogitolearning/cogpar/ExpressionParser.java",
"license": "gpl-3.0",
"size": 10071
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,778,570 |
public static void exposeRequestAttributes(ServletRequest request, Map<String, ?> attributes) {
Assert.notNull(request, "Request must not be null");
Assert.notNull(attributes, "Attributes Map must not be null");
for (Map.Entry<String, ?> entry : attributes.entrySet()) {
request.setAttribute(entry.getKey(), ... | static void function(ServletRequest request, Map<String, ?> attributes) { Assert.notNull(request, STR); Assert.notNull(attributes, STR); for (Map.Entry<String, ?> entry : attributes.entrySet()) { request.setAttribute(entry.getKey(), entry.getValue()); } } | /**
* Expose the given Map as request attributes, using the keys as attribute names
* and the values as corresponding attribute values. Keys need to be Strings.
* @param request current HTTP request
* @param attributes the attributes Map
*/ | Expose the given Map as request attributes, using the keys as attribute names and the values as corresponding attribute values. Keys need to be Strings | exposeRequestAttributes | {
"repo_name": "jhstatewide/jruby-rack",
"path": "src/spec/java/org/jruby/rack/mock/WebUtils.java",
"license": "mit",
"size": 30744
} | [
"java.util.Map",
"javax.servlet.ServletRequest",
"org.springframework.util.Assert"
] | import java.util.Map; import javax.servlet.ServletRequest; import org.springframework.util.Assert; | import java.util.*; import javax.servlet.*; import org.springframework.util.*; | [
"java.util",
"javax.servlet",
"org.springframework.util"
] | java.util; javax.servlet; org.springframework.util; | 2,317,096 |
log.debug("getMainClassName()");
File mf = new File(file, "META-INF/MANIFEST.MF");
FileInputStream fis = null;
try {
if (mf.exists() && mf.canRead()) {
fis = new FileInputStream(mf);
Manifest manif = new Manifest(fis);
Attributes attr = manif.getMainAttributes();
return attr != null ... | log.debug(STR); File mf = new File(file, STR); FileInputStream fis = null; try { if (mf.exists() && mf.canRead()) { fis = new FileInputStream(mf); Manifest manif = new Manifest(fis); Attributes attr = manif.getMainAttributes(); return attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null; } } finally { IOUtil... | /**
* Get main class name
*/ | Get main class name | getMainClassName | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/util/cl/FilesystemClassLoader.java",
"license": "gpl-3.0",
"size": 3397
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.jar.Attributes",
"java.util.jar.Manifest",
"org.apache.commons.io.IOUtils"
] | import java.io.File; import java.io.FileInputStream; import java.util.jar.Attributes; import java.util.jar.Manifest; import org.apache.commons.io.IOUtils; | import java.io.*; import java.util.jar.*; import org.apache.commons.io.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 1,451,681 |
public final Property<String> classifier() {
return metaBean().classifier().createProperty(this);
} | final Property<String> function() { return metaBean().classifier().createProperty(this); } | /**
* Gets the the {@code classifier} property.
* @return the property, not null
*/ | Gets the the classifier property | classifier | {
"repo_name": "McLeodMoores/starling",
"path": "projects/starling-client/src/main/java/com/mcleodmoores/starling/client/component/BasicDbHolidayMasterComponentFactory.java",
"license": "apache-2.0",
"size": 19878
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 629,112 |
void setBirdEyeView(BufferedImage result, boolean scaled);
| void setBirdEyeView(BufferedImage result, boolean scaled); | /**
* Sets the image displayed in the bird eye view.
*
* @param result The value to set.
* @param scaled Indicates if the result is a scaled image
*/ | Sets the image displayed in the bird eye view | setBirdEyeView | {
"repo_name": "will-moore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewer.java",
"license": "gpl-2.0",
"size": 35755
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,023,994 |
@SuppressWarnings("unchecked")
private long doMerge(UpdatePlan plan, Iterable<List<?>> cursor, int pageSize) throws IgniteCheckedException {
GridCacheContext cctx = plan.cacheContext();
// If we have just one item to put, just do so
if (plan.rowCount() == 1) {
IgniteBiTuple ... | @SuppressWarnings(STR) long function(UpdatePlan plan, Iterable<List<?>> cursor, int pageSize) throws IgniteCheckedException { GridCacheContext cctx = plan.cacheContext(); if (plan.rowCount() == 1) { IgniteBiTuple t = plan.processRow(cursor.iterator().next()); cctx.cache().put(t.getKey(), t.getValue()); return 1; } else... | /**
* Execute MERGE statement plan.
* @param cursor Cursor to take inserted data from.
* @param pageSize Batch size to stream data from {@code cursor}, anything <= 0 for single page operations.
* @return Number of items affected.
* @throws IgniteCheckedException if failed.
*/ | Execute MERGE statement plan | doMerge | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/DmlStatementsProcessor.java",
"license": "apache-2.0",
"size": 43564
} | [
"java.util.Iterator",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.GridCacheContext",
"org.apache.ignite.internal.processors.query.h2.dml.UpdatePlan",
"org.apache.ignite.lang.IgniteBiTuple"
] | import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.GridCacheContext; import org.apache.ignite.internal.processors.query.h2.dml.UpdatePlan; import org.apache.ignite.lan... | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.query.h2.dml.*; import org.apache.ignite.lang.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,442,711 |
public void setCreditorId(String creditorId) {
if (!new CreditorId(creditorId).isValid()) {
throw new IllegalArgumentException("\"" + creditorId + "\" is no valid creditor id.");
}
this.creditorId = creditorId.replaceAll(" ", "");
} | void function(String creditorId) { if (!new CreditorId(creditorId).isValid()) { throw new IllegalArgumentException("\"STR\STR); } this.creditorId = creditorId.replaceAll(" ", ""); } | /**
* Sets a new truster id.
*
* @param creditorId The new truster id.
*/ | Sets a new truster id | setCreditorId | {
"repo_name": "TrackerSB/Green2",
"path": "Green2/Programs/MemberManagement/src/main/java/bayern/steinbrecher/green2/memberManagement/people/Originator.java",
"license": "gpl-3.0",
"size": 10153
} | [
"bayern.steinbrecher.sepaxmlgenerator.CreditorId"
] | import bayern.steinbrecher.sepaxmlgenerator.CreditorId; | import bayern.steinbrecher.sepaxmlgenerator.*; | [
"bayern.steinbrecher.sepaxmlgenerator"
] | bayern.steinbrecher.sepaxmlgenerator; | 525,311 |
public void addIsPartOf(Thing value) {
Base.add(this.model, this.getResource(), ISPARTOF, value);
} | void function(Thing value) { Base.add(this.model, this.getResource(), ISPARTOF, value); } | /**
* Adds a value to property IsPartOf from an instance of Thing
*
* [Generated from RDFReactor template rule #add4dynamic]
*/ | Adds a value to property IsPartOf from an instance of Thing [Generated from RDFReactor template rule #add4dynamic] | addIsPartOf | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,084,185 |
private List<MappedPosition> generateCoordsWithCRS(
int numberOfVertices,
CoordinateReferenceSystem crs,
long seed,
boolean includeAccuracy) {
List<MappedPosition> vert = new ArrayList<>();
Random randomCoord = new Random(seed);
for (int i = 0;... | List<MappedPosition> function( int numberOfVertices, CoordinateReferenceSystem crs, long seed, boolean includeAccuracy) { List<MappedPosition> vert = new ArrayList<>(); Random randomCoord = new Random(seed); for (int i = 0; i < numberOfVertices; i++) { double xs = randomCoord.nextDouble() * 1000; double ys = randomCoor... | /**
* Coordinates List generator.
*
* @param numberOfVertices count of generated points
* @param crs Coordinate Reference System of generated points
* @param seed seed for generate random numbers
* @param includeAccuracy set true to generate points with accuracy.
*/ | Coordinates List generator | generateCoordsWithCRS | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/test/java/org/geotools/referencing/operation/builder/MathTransformBuilderTest.java",
"license": "lgpl-2.1",
"size": 10133
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Random",
"org.geotools.geometry.DirectPosition2D",
"org.opengis.referencing.crs.CoordinateReferenceSystem"
] | import java.util.ArrayList; import java.util.List; import java.util.Random; import org.geotools.geometry.DirectPosition2D; import org.opengis.referencing.crs.CoordinateReferenceSystem; | import java.util.*; import org.geotools.geometry.*; import org.opengis.referencing.crs.*; | [
"java.util",
"org.geotools.geometry",
"org.opengis.referencing"
] | java.util; org.geotools.geometry; org.opengis.referencing; | 168,426 |
private void handleException(final Call call, final IOException ioe, final Callback callback) {
if (call.isCanceled()) {
callback.onCancellation();
} else {
callback.onFailure(ioe);
}
} | void function(final Call call, final IOException ioe, final Callback callback) { if (call.isCanceled()) { callback.onCancellation(); } else { callback.onFailure(ioe); } } | /**
* Handles IOExceptions.
*
* <p> OkHttp notifies callers of cancellations via an IOException. If IOException is caught
* after request cancellation, then the exception is interpreted as successful cancellation
* and onCancellation is called. Otherwise onFailure is called.
*/ | Handles IOExceptions. OkHttp notifies callers of cancellations via an IOException. If IOException is caught after request cancellation, then the exception is interpreted as successful cancellation and onCancellation is called. Otherwise onFailure is called | handleException | {
"repo_name": "kaoree/fresco",
"path": "imagepipeline-backends/imagepipeline-okhttp/src/main/java/com/facebook/imagepipeline/backends/okhttp/OkHttpNetworkFetcher.java",
"license": "bsd-3-clause",
"size": 5706
} | [
"com.squareup.okhttp.Call",
"java.io.IOException"
] | import com.squareup.okhttp.Call; import java.io.IOException; | import com.squareup.okhttp.*; import java.io.*; | [
"com.squareup.okhttp",
"java.io"
] | com.squareup.okhttp; java.io; | 2,875,597 |
public void setRejectedPolicy(ThreadPoolRejectedPolicy rejectedPolicy) {
this.rejectedPolicy = rejectedPolicy;
} | void function(ThreadPoolRejectedPolicy rejectedPolicy) { this.rejectedPolicy = rejectedPolicy; } | /**
* Sets the handler for tasks which cannot be executed by the thread pool.
*/ | Sets the handler for tasks which cannot be executed by the thread pool | setRejectedPolicy | {
"repo_name": "kevinearls/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java",
"license": "apache-2.0",
"size": 6491
} | [
"org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy"
] | import org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy; | import org.apache.camel.util.concurrent.*; | [
"org.apache.camel"
] | org.apache.camel; | 119,162 |
@Test
public void testUpdate() throws SQLException {
MetadataUtils.testUpdate(geoPackage);
} | void function() throws SQLException { MetadataUtils.testUpdate(geoPackage); } | /**
* Test updating
*
* @throws SQLException
*/ | Test updating | testUpdate | {
"repo_name": "restjohn/geopackage-java",
"path": "src/test/java/mil/nga/geopackage/test/metadata/MetadataCreateTest.java",
"license": "mit",
"size": 1267
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,070,076 |
public static List<GeometryLinkDescriptor> getOutgoingLinks(View view) {
switch (GeometryVisualIDRegistry.getVisualID(view)) {
case ConnectorEditPart.VISUAL_ID:
return getConnector_2001OutgoingLinks(view);
case InputPointEditPart.VISUAL_ID:
return getInputPoint_2002OutgoingLinks(view);
case LineE... | static List<GeometryLinkDescriptor> function(View view) { switch (GeometryVisualIDRegistry.getVisualID(view)) { case ConnectorEditPart.VISUAL_ID: return getConnector_2001OutgoingLinks(view); case InputPointEditPart.VISUAL_ID: return getInputPoint_2002OutgoingLinks(view); case LineEditPart.VISUAL_ID: return getLine_4001... | /**
* Gets the outgoing links.
*
* @param view the view
* @return the outgoing links
* @generated
*/ | Gets the outgoing links | getOutgoingLinks | {
"repo_name": "albertfdp/petrinet",
"path": "src/dk.dtu.se2.geometry.diagram/src/geometry/diagram/part/GeometryDiagramUpdater.java",
"license": "mit",
"size": 12698
} | [
"java.util.Collections",
"java.util.List",
"org.eclipse.gmf.runtime.notation.View"
] | import java.util.Collections; import java.util.List; import org.eclipse.gmf.runtime.notation.View; | import java.util.*; import org.eclipse.gmf.runtime.notation.*; | [
"java.util",
"org.eclipse.gmf"
] | java.util; org.eclipse.gmf; | 851,619 |
public void setRenderer(int index, XYItemRenderer renderer) {
setRenderer(index, renderer, true);
}
| void function(int index, XYItemRenderer renderer) { setRenderer(index, renderer, true); } | /**
* Sets a renderer and sends a {@link PlotChangeEvent} to all
* registered listeners.
*
* @param index the index.
* @param renderer the renderer.
*
* @see #getRenderer(int)
*/ | Sets a renderer and sends a <code>PlotChangeEvent</code> to all registered listeners | setRenderer | {
"repo_name": "SOCR/HTML5_WebSite",
"path": "SOCR2.8/src/jfreechart/org/jfree/chart/plot/XYPlot.java",
"license": "lgpl-3.0",
"size": 181916
} | [
"org.jfree.chart.renderer.xy.XYItemRenderer"
] | import org.jfree.chart.renderer.xy.XYItemRenderer; | import org.jfree.chart.renderer.xy.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,701,505 |
private void cleanSession(HttpServletRequest request) {
request.getSession(true).removeAttribute(ERROR_MESSAGE);
request.getSession().removeAttribute("childs");
} | void function(HttpServletRequest request) { request.getSession(true).removeAttribute(ERROR_MESSAGE); request.getSession().removeAttribute(STR); } | /**
* Cleans errors stored in session scope.
*
* @param request http request
*/ | Cleans errors stored in session scope | cleanSession | {
"repo_name": "stemig62/modeshape-examples",
"path": "modeshape-jca-example/src/main/java/org/modeshape/example/jca/Controller.java",
"license": "apache-2.0",
"size": 4348
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 448,101 |
@SuppressWarnings("unchecked")
public static <I extends WritableComparable, V extends Writable,
E extends Writable> void writeVertexToDataOutput(
DataOutput output,
Vertex<I, V, E> vertex,
ImmutableClassesGiraphConfiguration<I, V, E> conf)
throws IOException {
vertex.getId().write(output... | @SuppressWarnings(STR) static <I extends WritableComparable, V extends Writable, E extends Writable> void function( DataOutput output, Vertex<I, V, E> vertex, ImmutableClassesGiraphConfiguration<I, V, E> conf) throws IOException { vertex.getId().write(output); vertex.getValue().write(output); ((OutEdges<I, E>) vertex.g... | /**
* Writes Vertex data to output stream.
*
* @param output the output stream
* @param vertex The vertex to serialize
* @param conf Configuration
* @param <I> Vertex id
* @param <V> Vertex value
* @param <E> Edge value
* @throws IOException
*/ | Writes Vertex data to output stream | writeVertexToDataOutput | {
"repo_name": "dcrankshaw/giraph",
"path": "giraph-core/src/main/java/org/apache/giraph/utils/WritableUtils.java",
"license": "apache-2.0",
"size": 20289
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.giraph.conf.ImmutableClassesGiraphConfiguration",
"org.apache.giraph.edge.OutEdges",
"org.apache.giraph.graph.Vertex",
"org.apache.hadoop.io.Writable",
"org.apache.hadoop.io.WritableComparable"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration; import org.apache.giraph.edge.OutEdges; import org.apache.giraph.graph.Vertex; import org.apache.hadoop.io.Writable; import org.apache.hadoop.io.WritableComparable; | import java.io.*; import org.apache.giraph.conf.*; import org.apache.giraph.edge.*; import org.apache.giraph.graph.*; import org.apache.hadoop.io.*; | [
"java.io",
"org.apache.giraph",
"org.apache.hadoop"
] | java.io; org.apache.giraph; org.apache.hadoop; | 597,944 |
private Pair<String,String> matchProgress(String message) {
Matcher m = progressPattern.matcher(message);
if (m.find()) {
return Pair.of(message.substring(0, m.end()), message.substring(m.end()));
} else {
return null;
}
} | Pair<String,String> function(String message) { Matcher m = progressPattern.matcher(message); if (m.find()) { return Pair.of(message.substring(0, m.end()), message.substring(m.end())); } else { return null; } } | /**
* Try to match a message against the "progress message" pattern. If it
* matches, return the progress percentage, and the rest of the message.
* @param message the message to match
* @return a pair containing the progress percentage, and the rest of the
* progress message, or null if the message i... | Try to match a message against the "progress message" pattern. If it matches, return the progress percentage, and the rest of the message | matchProgress | {
"repo_name": "Digas29/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/FancyTerminalEventHandler.java",
"license": "apache-2.0",
"size": 16104
} | [
"com.google.devtools.build.lib.util.Pair",
"java.util.regex.Matcher"
] | import com.google.devtools.build.lib.util.Pair; import java.util.regex.Matcher; | import com.google.devtools.build.lib.util.*; import java.util.regex.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,007,264 |
public static void stringToFile(final String string, final Path file, final Charset charset) {
try {
if (Files.isRegularFile(file)) {
FileUtil.deleteFile(file);
}
Files.createDirectories(file.getParent());
Files.write(file, string.getBytes(char... | static void function(final String string, final Path file, final Charset charset) { try { if (Files.isRegularFile(file)) { FileUtil.deleteFile(file); } Files.createDirectories(file.getParent()); Files.write(file, string.getBytes(charset)); } catch (final IOException ioEx) { throw new RuntimeException(ioEx); } } | /**
* Takes a string and writes it to a file.
*/ | Takes a string and writes it to a file | stringToFile | {
"repo_name": "gchq/stroom",
"path": "stroom-legacy/stroom-legacy-model_6_1/src/main/java/stroom/legacy/model_6_1/StreamUtil.java",
"license": "apache-2.0",
"size": 13406
} | [
"java.io.IOException",
"java.nio.charset.Charset",
"java.nio.file.Files",
"java.nio.file.Path"
] | import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; | import java.io.*; import java.nio.charset.*; import java.nio.file.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 492,208 |
public boolean pipelineObservableCombinationIsNotExisting(Table treeViewerColorChooser, String pipParent,
String name, String observableName) {
boolean toReturn = false;
for (int i = 0; i < treeViewerColorChooser.getItemCount(); i++) {
TableItem item = treeViewerColorChooser.... | boolean function(Table treeViewerColorChooser, String pipParent, String name, String observableName) { boolean toReturn = false; for (int i = 0; i < treeViewerColorChooser.getItemCount(); i++) { TableItem item = treeViewerColorChooser.getItem(i); String existingItemText = item.getText(0); if (existingItemText.contains(... | /**
* Check whether the combination of pipeline and observable is already exiting in the table.
* @param treeViewerColorChooser table which holds the items and colors.
* @param pipParent parent of the new item.
* @param name name of the new item.
* @param observableName observable of the new it... | Check whether the combination of pipeline and observable is already exiting in the table | pipelineObservableCombinationIsNotExisting | {
"repo_name": "QualiMaster/QM-IConf",
"path": "QualiMasterApplication/src/de/uni_hildesheim/sse/qmApp/pipelineUtils/PipelinesRuntimeUtils.java",
"license": "apache-2.0",
"size": 10344
} | [
"org.eclipse.swt.widgets.Table",
"org.eclipse.swt.widgets.TableItem"
] | import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,564,270 |
private JSONWriter append(String s) throws JSONException {
if (s == null) {
throw new JSONException("Null pointer");
}
if (this.mode == 'o' || this.mode == 'a') {
try {
if (this.comma && this.mode == 'a') {
this.writer.write(',');
... | JSONWriter function(String s) throws JSONException { if (s == null) { throw new JSONException(STR); } if (this.mode == 'o' this.mode == 'a') { try { if (this.comma && this.mode == 'a') { this.writer.write(','); } this.writer.write(s); } catch (IOException e) { throw new JSONException(e); } if (this.mode == 'o') { this.... | /**
* Append a value.
* @param s A string value.
* @return this
* @throws JSONException If the value is out of sequence.
*/ | Append a value | append | {
"repo_name": "VysakhV/eeplat-social-api",
"path": "source/weibo/weibo4j/org/json/JSONWriter.java",
"license": "mit",
"size": 10325
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,593,482 |
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_initialize_user);
final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
controller = new InitializeUs... | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_initialize_user); final Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); controller = new InitializeUserController(getApplicationContext()); userNameEditText = (EditText) ... | /**
* set on click listeners and members relating to the view elements. Gets called on acitvity
* startup.
*
* @param savedInstanceState
*/ | set on click listeners and members relating to the view elements. Gets called on acitvity startup | onCreate | {
"repo_name": "CMPUT301F15T03/301p",
"path": "T03/app/src/main/java/ca/ualberta/cmput301/t03/user/InitializeUserActivity.java",
"license": "gpl-3.0",
"size": 6649
} | [
"android.os.Bundle",
"android.support.v7.widget.Toolbar",
"android.widget.Button",
"android.widget.EditText"
] | import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.widget.Button; import android.widget.EditText; | import android.os.*; import android.support.v7.widget.*; import android.widget.*; | [
"android.os",
"android.support",
"android.widget"
] | android.os; android.support; android.widget; | 2,318,278 |
protected static X500Principal getEncodedIssuerPrincipal(
Object cert)
{
if (cert instanceof X509Certificate)
{
return ((X509Certificate)cert).getIssuerX500Principal();
}
else
{
return (X500Principal)((X509AttributeCertificate)cert).getIssu... | static X500Principal function( Object cert) { if (cert instanceof X509Certificate) { return ((X509Certificate)cert).getIssuerX500Principal(); } else { return (X500Principal)((X509AttributeCertificate)cert).getIssuer().getPrincipals()[0]; } } | /**
* Returns the issuer of an attribute certificate or certificate.
*
* @param cert The attribute certificate or certificate.
* @return The issuer as <code>X500Principal</code>.
*/ | Returns the issuer of an attribute certificate or certificate | getEncodedIssuerPrincipal | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/CertPathValidatorUtilities.java",
"license": "apache-2.0",
"size": 50306
} | [
"java.security.cert.X509Certificate",
"javax.security.auth.x500.X500Principal",
"org.bouncycastle.x509.X509AttributeCertificate"
] | import java.security.cert.X509Certificate; import javax.security.auth.x500.X500Principal; import org.bouncycastle.x509.X509AttributeCertificate; | import java.security.cert.*; import javax.security.auth.x500.*; import org.bouncycastle.x509.*; | [
"java.security",
"javax.security",
"org.bouncycastle.x509"
] | java.security; javax.security; org.bouncycastle.x509; | 1,696,981 |
public static boolean saveSshSessionAndChannel(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) {
final SSHConnection sshConnection;
if (channel != null) {
sshConnection = new SSHConnection(session, channel);
} else... | static boolean function(Session session, Channel channel, GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId) { final SSHConnection sshConnection; if (channel != null) { sshConnection = new SSHConnection(session, channel); } else { sshConnection = new SSHConnection(session); } if (sessionPar... | /**
* Save the SSH session and the channel in the cache.
*
* @param session The SSH session.
* @param channel The SSH channel.
* @param sessionParam The cache: GlobalSessionObject or SessionObject.
*/ | Save the SSH session and the channel in the cache | saveSshSessionAndChannel | {
"repo_name": "CloudSlang/cs-actions",
"path": "cs-ssh/src/main/java/io/cloudslang/content/ssh/utils/CacheUtils.java",
"license": "apache-2.0",
"size": 4722
} | [
"com.hp.oo.sdk.content.plugin.GlobalSessionObject",
"com.jcraft.jsch.Channel",
"com.jcraft.jsch.Session",
"io.cloudslang.content.ssh.entities.SSHConnection",
"java.util.HashMap",
"java.util.Map"
] | import com.hp.oo.sdk.content.plugin.GlobalSessionObject; import com.jcraft.jsch.Channel; import com.jcraft.jsch.Session; import io.cloudslang.content.ssh.entities.SSHConnection; import java.util.HashMap; import java.util.Map; | import com.hp.oo.sdk.content.plugin.*; import com.jcraft.jsch.*; import io.cloudslang.content.ssh.entities.*; import java.util.*; | [
"com.hp.oo",
"com.jcraft.jsch",
"io.cloudslang.content",
"java.util"
] | com.hp.oo; com.jcraft.jsch; io.cloudslang.content; java.util; | 1,966,648 |
public static Dimension getDefaultLargeDialogDimension() {
return scale(new Dimension(
getInteger("DefaultLargeDialog.Width", 1000),
getInteger("DefaultLargeDialog.Height", 800)));
} | static Dimension function() { return scale(new Dimension( getInteger(STR, 1000), getInteger(STR, 800))); } | /**
* Returns the default dimensions for a large dialog.
*
* @return the default
*/ | Returns the default dimensions for a large dialog | getDefaultLargeDialogDimension | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/core/GUIHelper.java",
"license": "gpl-3.0",
"size": 88762
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 245,515 |
public InstanceGroupManager instanceGroupManager() {
String instanceTemplateUrl = InstanceTemplateUrl.from(project(), INSTANCE_TEMPLATE_NAME).getUrl();
String instanceGroupUrl = InstanceGroupUrl
.managedRegional(project(), region(), provisioningTemplate().getInstanceGroup()).getUrl(... | InstanceGroupManager function() { String instanceTemplateUrl = InstanceTemplateUrl.from(project(), INSTANCE_TEMPLATE_NAME).getUrl(); String instanceGroupUrl = InstanceGroupUrl .managedRegional(project(), region(), provisioningTemplate().getInstanceGroup()).getUrl(); return new InstanceGroupManager().setName(provisionin... | /**
* Returns (fake) metadata about the instance group (manager).
* <p/>
* Note: only a subset of the group attributes are set (the ones needed by
* the {@link GoogleComputeEnginePoolDriver}.
*
* @return
*/ | Returns (fake) metadata about the instance group (manager). Note: only a subset of the group attributes are set (the ones needed by the <code>GoogleComputeEnginePoolDriver</code> | instanceGroupManager | {
"repo_name": "Eeemil/scale.cloudpool",
"path": "google/compute/src/test/java/com/elastisys/scale/cloudpool/google/compute/driver/FakeMultiZoneInstanceGroup.java",
"license": "apache-2.0",
"size": 6541
} | [
"com.elastisys.scale.cloudpool.google.commons.utils.InstanceGroupUrl",
"com.elastisys.scale.cloudpool.google.commons.utils.InstanceTemplateUrl",
"com.google.api.services.compute.model.InstanceGroupManager"
] | import com.elastisys.scale.cloudpool.google.commons.utils.InstanceGroupUrl; import com.elastisys.scale.cloudpool.google.commons.utils.InstanceTemplateUrl; import com.google.api.services.compute.model.InstanceGroupManager; | import com.elastisys.scale.cloudpool.google.commons.utils.*; import com.google.api.services.compute.model.*; | [
"com.elastisys.scale",
"com.google.api"
] | com.elastisys.scale; com.google.api; | 1,641,346 |
@Test
public void ALF_4994()
{
testName = getTestName();
String testUser = getUserNameFreeDomain(testName);
String searchText = "house";
Map<String, String> keyWordSearchText = new HashMap<String, String>();
List<String> searchInfo = Array... | void function() { testName = getTestName(); String testUser = getUserNameFreeDomain(testName); String searchText = "house"; Map<String, String> keyWordSearchText = new HashMap<String, String>(); List<String> searchInfo = Arrays.asList(ADV_FOLDER_SEARCH, STR); try { ShareUser.login(drone, testUser, testPassword); keyWor... | /**
* Test - ALF-4994: Name & Description Search (Folder type)
* <ul>
* <li>Login</li>
* <li>From My Dashboard access the Advance Search Folder form</li>
* <li>In the Description and Name, enter "house"</li>
* <li>click on search</li>
* <li>Validate the search results are retur... | Test - ALF-4994: Name & Description Search (Folder type) Login From My Dashboard access the Advance Search Folder form In the Description and Name, enter "house" click on search Validate the search results are returned as expected | ALF_4994 | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/qa-share/src/test/java/org/alfresco/share/search/AdvanceSearchTest.java",
"license": "lgpl-3.0",
"size": 123894
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.alfresco.share.util.ShareUser",
"org.alfresco.share.util.ShareUserSearchPage",
"org.testng.Assert"
] | import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.alfresco.share.util.ShareUser; import org.alfresco.share.util.ShareUserSearchPage; import org.testng.Assert; | import java.util.*; import org.alfresco.share.util.*; import org.testng.*; | [
"java.util",
"org.alfresco.share",
"org.testng"
] | java.util; org.alfresco.share; org.testng; | 2,122,810 |
private void paintUpperThumb(Graphics g) {
Rectangle knobBounds = upperThumbRect;
int w = knobBounds.width;
int h = knobBounds.height;
// Create graphics copy.
Graphics2D g2d = (Graphics2D) g.create();
// Create default thumb shape.
Shape thumbShape = create... | void function(Graphics g) { Rectangle knobBounds = upperThumbRect; int w = knobBounds.width; int h = knobBounds.height; Graphics2D g2d = (Graphics2D) g.create(); Shape thumbShape = createThumbShape(w - 1, h - 1); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.translate(kno... | /**
* Paints the thumb for the upper value using the specified graphics object.
*/ | Paints the thumb for the upper value using the specified graphics object | paintUpperThumb | {
"repo_name": "jurgendl/jhaws",
"path": "jhaws/swing/src/main/java/org/swingeasy/slider/RangeSliderUI.java",
"license": "mit",
"size": 20494
} | [
"java.awt.Color",
"java.awt.Graphics",
"java.awt.Graphics2D",
"java.awt.Rectangle",
"java.awt.RenderingHints",
"java.awt.Shape"
] | import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,142,546 |
@Override
protected BeanDefinitionReader createBeanDefinitionReader(GenericApplicationContext context) {
throw new UnsupportedOperationException(
"AnnotationConfigContextLoader does not support the createBeanDefinitionReader(GenericApplicationContext) method");
} | BeanDefinitionReader function(GenericApplicationContext context) { throw new UnsupportedOperationException( STR); } | /**
* {@code AnnotationConfigContextLoader} should be used as a
* {@link org.springframework.test.context.SmartContextLoader SmartContextLoader},
* not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}.
* Consequently, this method is not supported.
*
* @see #loadBeanDefinition... | AnnotationConfigContextLoader should be used as a <code>org.springframework.test.context.SmartContextLoader SmartContextLoader</code>, not as a legacy <code>org.springframework.test.context.ContextLoader ContextLoader</code>. Consequently, this method is not supported | createBeanDefinitionReader | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-test-4.0/org/springframework/test/context/support/AnnotationConfigContextLoader.java",
"license": "apache-2.0",
"size": 9275
} | [
"org.springframework.beans.factory.support.BeanDefinitionReader",
"org.springframework.context.support.GenericApplicationContext"
] | import org.springframework.beans.factory.support.BeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; | import org.springframework.beans.factory.support.*; import org.springframework.context.support.*; | [
"org.springframework.beans",
"org.springframework.context"
] | org.springframework.beans; org.springframework.context; | 1,963,739 |
public static ObjectAdapterMemento createPersistent(final RootOid rootOid) {
return new ObjectAdapterMemento(rootOid);
} | static ObjectAdapterMemento function(final RootOid rootOid) { return new ObjectAdapterMemento(rootOid); } | /**
* Factory method
*/ | Factory method | createPersistent | {
"repo_name": "oscarbou/isis",
"path": "core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java",
"license": "apache-2.0",
"size": 26220
} | [
"org.apache.isis.core.metamodel.adapter.oid.RootOid"
] | import org.apache.isis.core.metamodel.adapter.oid.RootOid; | import org.apache.isis.core.metamodel.adapter.oid.*; | [
"org.apache.isis"
] | org.apache.isis; | 1,463,803 |
public static Pair<ZooKeeperServerShim, Integer> runZookeeperOnAnyPort(File zkDir) throws Exception {
return runZookeeperOnAnyPort((int) (Math.random() * 10000 + 7000), zkDir);
} | static Pair<ZooKeeperServerShim, Integer> function(File zkDir) throws Exception { return runZookeeperOnAnyPort((int) (Math.random() * 10000 + 7000), zkDir); } | /**
* Try to start zookkeeper locally on any port.
*/ | Try to start zookkeeper locally on any port | runZookeeperOnAnyPort | {
"repo_name": "sijie/bookkeeper",
"path": "stream/distributedlog/core/src/main/java/org/apache/distributedlog/LocalDLMEmulator.java",
"license": "apache-2.0",
"size": 13286
} | [
"java.io.File",
"org.apache.bookkeeper.shims.zk.ZooKeeperServerShim",
"org.apache.commons.lang3.tuple.Pair"
] | import java.io.File; import org.apache.bookkeeper.shims.zk.ZooKeeperServerShim; import org.apache.commons.lang3.tuple.Pair; | import java.io.*; import org.apache.bookkeeper.shims.zk.*; import org.apache.commons.lang3.tuple.*; | [
"java.io",
"org.apache.bookkeeper",
"org.apache.commons"
] | java.io; org.apache.bookkeeper; org.apache.commons; | 88,064 |
final IPageManager internalGetPageManager()
{
if (pageManager == null)
{
synchronized (this)
{
if (pageManager == null)
{
pageManager = pageManagerProvider.get(getPageManagerContext());
}
}
}
return pageManager;
} | final IPageManager internalGetPageManager() { if (pageManager == null) { synchronized (this) { if (pageManager == null) { pageManager = pageManagerProvider.get(getPageManagerContext()); } } } return pageManager; } | /**
* Returns an unsynchronized version of page manager
*
* @return the page manager
*/ | Returns an unsynchronized version of page manager | internalGetPageManager | {
"repo_name": "afiantara/apache-wicket-1.5.7",
"path": "src/wicket-core/src/main/java/org/apache/wicket/Application.java",
"license": "apache-2.0",
"size": 49077
} | [
"org.apache.wicket.page.IPageManager"
] | import org.apache.wicket.page.IPageManager; | import org.apache.wicket.page.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,650,081 |
@Override
public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException {
boolean trace = log.isTraceEnabled();
info = getInfo(info);
if (trace)
log.trace("connection request info: " + info);
JmsCred cred = Jm... | ManagedConnection function(Subject subject, ConnectionRequestInfo info) throws ResourceException { boolean trace = log.isTraceEnabled(); info = getInfo(info); if (trace) log.trace(STR + info); JmsCred cred = JmsCred.getJmsCred(this, subject, info); if (trace) log.trace(STR + cred); JmsManagedConnection mc = new JmsMana... | /**
* Create a new connection to manage in pool
*/ | Create a new connection to manage in pool | createManagedConnection | {
"repo_name": "benjamin-cartereau/generic-jms-ra",
"path": "generic-jms-ra-jar/src/main/java/org/jboss/resource/adapter/jms/JmsManagedConnectionFactory.java",
"license": "lgpl-2.1",
"size": 10114
} | [
"javax.resource.ResourceException",
"javax.resource.spi.ConnectionRequestInfo",
"javax.resource.spi.ManagedConnection",
"javax.security.auth.Subject"
] | import javax.resource.ResourceException; import javax.resource.spi.ConnectionRequestInfo; import javax.resource.spi.ManagedConnection; import javax.security.auth.Subject; | import javax.resource.*; import javax.resource.spi.*; import javax.security.auth.*; | [
"javax.resource",
"javax.security"
] | javax.resource; javax.security; | 956,009 |
public static Step addStep(ExecutionContext context, StepEnum stepName, String description) {
return addStep(context, stepName, description, false);
} | static Step function(ExecutionContext context, StepEnum stepName, String description) { return addStep(context, stepName, description, false); } | /**
* Adds a {@link Step} entity by the provided context. A {@link Step} will not be created if
* {@code ExecutionContext.isMonitored()} returns false.
*
* @param context
* The context of the execution which defines visibility and execution method.
* @param stepName
* ... | Adds a <code>Step</code> entity by the provided context. A <code>Step</code> will not be created if ExecutionContext.isMonitored() returns false | addStep | {
"repo_name": "yapengsong/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/job/ExecutionHandler.java",
"license": "apache-2.0",
"size": 36877
} | [
"org.ovirt.engine.core.common.job.Step",
"org.ovirt.engine.core.common.job.StepEnum"
] | import org.ovirt.engine.core.common.job.Step; import org.ovirt.engine.core.common.job.StepEnum; | import org.ovirt.engine.core.common.job.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 387,663 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.