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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Entry getShk() {
return shk;
} | Entry function() { return shk; } | /**
* Returns the highest snow-height.
*
* @return The entry with the highest snow-height.
*/ | Returns the highest snow-height | getShk | {
"repo_name": "nunull/WeatherStats",
"path": "src/de/szut/weather/stats/WeatherStats.java",
"license": "mit",
"size": 4399
} | [
"de.szut.weather.models.Entry"
] | import de.szut.weather.models.Entry; | import de.szut.weather.models.*; | [
"de.szut.weather"
] | de.szut.weather; | 272,501 |
public void willBeDisplayed() {
// Do what you want here, for example animate the content
if (getView() != null) {
Animation fadeIn = AnimationUtils.loadAnimation(getActivity(), R.anim.fade_in);
getView().startAnimation(fadeIn);
}
} | void function() { if (getView() != null) { Animation fadeIn = AnimationUtils.loadAnimation(getActivity(), R.anim.fade_in); getView().startAnimation(fadeIn); } } | /**
* Called when a fragment will be displayed
*/ | Called when a fragment will be displayed | willBeDisplayed | {
"repo_name": "RunziiMo/grooo_android_client",
"path": "grooo/src/main/java/com/wenym/grooo/ui/base/BaseFragment.java",
"license": "mit",
"size": 6488
} | [
"android.view.animation.Animation",
"android.view.animation.AnimationUtils"
] | import android.view.animation.Animation; import android.view.animation.AnimationUtils; | import android.view.animation.*; | [
"android.view"
] | android.view; | 402,789 |
@RequestMapping("/topics/unanswered")
public ModelAndView unansweredTopicsPage(@RequestParam(value = PAGE, defaultValue = "1", required = false)
Integer page) {
JCUser currentUser = securityService.getCurrentUser();
List<Topic> topics = topicService.g... | @RequestMapping(STR) ModelAndView function(@RequestParam(value = PAGE, defaultValue = "1", required = false) Integer page) { JCUser currentUser = securityService.getCurrentUser(); List<Topic> topics = topicService.getUnansweredTopics(); topics = lastReadPostService.fillLastReadPostForTopics(topics); Pagination paginati... | /**
* Displays to user a list of topics without answers(topics which has only 1 post added during topic creation).
*
* @param page page
* @return {@code ModelAndView} with topics list and vars for pagination
*/ | Displays to user a list of topics without answers(topics which has only 1 post added during topic creation) | unansweredTopicsPage | {
"repo_name": "duffdodger/jcomm",
"path": "jcommune-view/jcommune-web-controller/src/main/java/org/jtalks/jcommune/web/controller/BranchController.java",
"license": "lgpl-2.1",
"size": 9109
} | [
"java.util.List",
"org.jtalks.jcommune.model.entity.JCUser",
"org.jtalks.jcommune.model.entity.Topic",
"org.jtalks.jcommune.web.util.Pagination",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestParam",
"org.springframework.web.servlet.ModelAndVie... | import java.util.List; import org.jtalks.jcommune.model.entity.JCUser; import org.jtalks.jcommune.model.entity.Topic; import org.jtalks.jcommune.web.util.Pagination; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web... | import java.util.*; import org.jtalks.jcommune.model.entity.*; import org.jtalks.jcommune.web.util.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; | [
"java.util",
"org.jtalks.jcommune",
"org.springframework.web"
] | java.util; org.jtalks.jcommune; org.springframework.web; | 580,747 |
public java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI> getSubterm_integers_ModuloHLAPI(){
java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI>();
for (Term elemnt : getSubterm()) {... | java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.integers.hlapi.ModuloHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move... | /**
* This accessor return a list of encapsulated subelement, only of ModuloHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of ModuloHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_integers_ModuloHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/finiteIntRanges/hlapi/GreaterThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 90341
} | [
"fr.lip6.move.pnml.symmetricnet.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 529,904 |
public SysLog log (String source, String type, int severity,
String summary, String detail, String trace)
{
SysLog evt = new SysLog ();
try {
evt.setDate (new Date());
evt.setSource (source);
evt.setType (type);
evt.setSeverity (severity);
... | SysLog function (String source, String type, int severity, String summary, String detail, String trace) { SysLog evt = new SysLog (); try { evt.setDate (new Date()); evt.setSource (source); evt.setType (type); evt.setSeverity (severity); evt.setSummary (summary); evt.setDetail (detail); evt.setTrace (trace); boolean au... | /**
* Create a SysLogEvent and add it to the DB.
* If auto commit is on, then the operation is performed
* within a transaction, otherwise, it's up to the user
* to commit or flush the session.
* @param source this log event source
* @param type application specific event type (i.e. INFO, ... | Create a SysLogEvent and add it to the DB. If auto commit is on, then the operation is performed within a transaction, otherwise, it's up to the user to commit or flush the session | log | {
"repo_name": "phamthaithinh/jposee",
"path": "modules/syslog/src/main/java/org/jpos/ee/SysLogManager.java",
"license": "agpl-3.0",
"size": 5581
} | [
"java.util.Date",
"org.hibernate.Transaction"
] | import java.util.Date; import org.hibernate.Transaction; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 1,592,856 |
public void initializeReceipientDSIds(List<Integer> originalGatewaysReceivers) {
this.receipientDSIds = new IntOpenHashSet(2);
for (Integer id : originalGatewaysReceivers) {
this.receipientDSIds.add(id);
}
} | void function(List<Integer> originalGatewaysReceivers) { this.receipientDSIds = new IntOpenHashSet(2); for (Integer id : originalGatewaysReceivers) { this.receipientDSIds.add(id); } } | /**
* Initialize the original set of recipient <code>Gateway</code>s.
*
* @param originalGatewaysReceivers The original recipient <code>Gateway</code>s.
*/ | Initialize the original set of recipient <code>Gateway</code>s | initializeReceipientDSIds | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventCallbackArgument.java",
"license": "apache-2.0",
"size": 6750
} | [
"it.unimi.dsi.fastutil.ints.IntOpenHashSet",
"java.util.List"
] | import it.unimi.dsi.fastutil.ints.IntOpenHashSet; import java.util.List; | import it.unimi.dsi.fastutil.ints.*; import java.util.*; | [
"it.unimi.dsi",
"java.util"
] | it.unimi.dsi; java.util; | 810,093 |
boolean authenticate(URL reqUrl, HttpClient client) throws HttpClientException; | boolean authenticate(URL reqUrl, HttpClient client) throws HttpClientException; | /**
* Authenticate the client http state so that the colony requests can be made.
*
* @param reqUrl URL requested for colony
* @param client HttpClient instance
*
* @return true if authentication succeeded.
*
* @throws HttpClientException on error
*/ | Authenticate the client http state so that the colony requests can be made | authenticate | {
"repo_name": "variacode95/rundeck",
"path": "core/src/main/java/com/dtolabs/client/utils/HttpAuthenticator.java",
"license": "apache-2.0",
"size": 2042
} | [
"org.apache.commons.httpclient.HttpClient"
] | import org.apache.commons.httpclient.HttpClient; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,395,292 |
@DatabaseAgnosticCandidate
private Integer getRequestId(Connection connection) throws CommDatabaseException {
PreparedStatement pstmtSeq = null;
ResultSet rs = null;
Integer requestId = 0;
try {
pstmtSeq = connection.prepareStatement(PRE_GET_REQUEST_ID);
rs = pstmtSeq.executeQuery();
rs.next();
... | Integer function(Connection connection) throws CommDatabaseException { PreparedStatement pstmtSeq = null; ResultSet rs = null; Integer requestId = 0; try { pstmtSeq = connection.prepareStatement(PRE_GET_REQUEST_ID); rs = pstmtSeq.executeQuery(); rs.next(); requestId = rs.getInt(1); return requestId; } catch (SQLExcepti... | /**
* Fetch the request
*
* @param connection
* connection object
*
* @return The Process Request ID
* @throws CommDatabaseException
* Any database related I/O exception
*/ | Fetch the request | getRequestId | {
"repo_name": "MastekLtd/JBEAM",
"path": "supporting_libraries/jbeam-plugins/jbeam-core-comm-oracle/src/main/java/com/stgmastek/core/comm/server/dao/impl/BatchDAO.java",
"license": "lgpl-3.0",
"size": 43501
} | [
"com.stgmastek.core.comm.exception.CommDatabaseException",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException"
] | import com.stgmastek.core.comm.exception.CommDatabaseException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; | import com.stgmastek.core.comm.exception.*; import java.sql.*; | [
"com.stgmastek.core",
"java.sql"
] | com.stgmastek.core; java.sql; | 1,181,714 |
protected AwardAccount getPrimaryAwardAccount(String chartOfAccountsCode, String accountNumber) {
AwardAccount primaryAwardAccount = null;
long highestProposalNumber = 0;
Map<String, Object> accountKeyValues = new HashMap<String, Object>();
accountKeyValues.put(KFSPropertyConst... | AwardAccount function(String chartOfAccountsCode, String accountNumber) { AwardAccount primaryAwardAccount = null; long highestProposalNumber = 0; Map<String, Object> accountKeyValues = new HashMap<String, Object>(); accountKeyValues.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, chartOfAccountsCode); accountKeyValue... | /**
* get the primary award account for the given account
*
* @param account the given account
* @return the primary award account for the given account
*/ | get the primary award account for the given account | getPrimaryAwardAccount | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/cg/service/impl/ContractsAndGrantsModuleServiceImpl.java",
"license": "agpl-3.0",
"size": 9431
} | [
"java.util.HashMap",
"java.util.Map",
"org.kuali.kfs.module.cg.businessobject.AwardAccount",
"org.kuali.kfs.sys.KFSPropertyConstants"
] | import java.util.HashMap; import java.util.Map; import org.kuali.kfs.module.cg.businessobject.AwardAccount; import org.kuali.kfs.sys.KFSPropertyConstants; | import java.util.*; import org.kuali.kfs.module.cg.businessobject.*; import org.kuali.kfs.sys.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 143,562 |
Map<String, Channel> getChannels(); | Map<String, Channel> getChannels(); | /**
* Returns a map with all registered channels.
*
* @return
*/ | Returns a map with all registered channels | getChannels | {
"repo_name": "sotty/droolsjbpm-knowledge",
"path": "kie-api/src/main/java/org/kie/api/runtime/StatelessKieSession.java",
"license": "apache-2.0",
"size": 6231
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 256,294 |
@Test
public void test_try_cast_for_all_data_types() {
for (DataType<?> dataType : DataTypes.PRIMITIVE_TYPES) {
DataType<?> randomType = randomType();
Literal<?> val = Literal.ofUnchecked(randomType, getDataGenerator(randomType).get());
assertEvaluate(
... | void function() { for (DataType<?> dataType : DataTypes.PRIMITIVE_TYPES) { DataType<?> randomType = randomType(); Literal<?> val = Literal.ofUnchecked(randomType, getDataGenerator(randomType).get()); assertEvaluate( STR + val.toString(Style.QUALIFIED) + STR + dataType.getName() + ")", anyOf(notNullValue(), nullValue())... | /**
* Only {@link io.crate.exceptions.ConversionException} are caught on try_cast, cast will only convert
* {@link ClassCastException} and {@link IllegalArgumentException}.
* Ensure that this works as expected by try_cast random values for all primitive types.
*/ | Only <code>io.crate.exceptions.ConversionException</code> are caught on try_cast, cast will only convert <code>ClassCastException</code> and <code>IllegalArgumentException</code>. Ensure that this works as expected by try_cast random values for all primitive types | test_try_cast_for_all_data_types | {
"repo_name": "crate/crate",
"path": "server/src/test/java/io/crate/expression/scalar/cast/CastFunctionTest.java",
"license": "apache-2.0",
"size": 11668
} | [
"io.crate.expression.symbol.Literal",
"io.crate.expression.symbol.format.Style",
"io.crate.testing.DataTypeTesting",
"io.crate.types.DataType",
"io.crate.types.DataTypes",
"org.hamcrest.Matchers"
] | import io.crate.expression.symbol.Literal; import io.crate.expression.symbol.format.Style; import io.crate.testing.DataTypeTesting; import io.crate.types.DataType; import io.crate.types.DataTypes; import org.hamcrest.Matchers; | import io.crate.expression.symbol.*; import io.crate.expression.symbol.format.*; import io.crate.testing.*; import io.crate.types.*; import org.hamcrest.*; | [
"io.crate.expression",
"io.crate.testing",
"io.crate.types",
"org.hamcrest"
] | io.crate.expression; io.crate.testing; io.crate.types; org.hamcrest; | 1,532,540 |
public void readPacketData(PacketBuffer buf) throws IOException
{
this.entityId = buf.readVarIntFromBuffer();
this.yaw = buf.readByte();
} | void function(PacketBuffer buf) throws IOException { this.entityId = buf.readVarIntFromBuffer(); this.yaw = buf.readByte(); } | /**
* Reads the raw packet data from the data stream.
*/ | Reads the raw packet data from the data stream | readPacketData | {
"repo_name": "seblund/Dissolvable",
"path": "build/tmp/recompileMc/sources/net/minecraft/network/play/server/SPacketEntityHeadLook.java",
"license": "gpl-3.0",
"size": 1597
} | [
"java.io.IOException",
"net.minecraft.network.PacketBuffer"
] | import java.io.IOException; import net.minecraft.network.PacketBuffer; | import java.io.*; import net.minecraft.network.*; | [
"java.io",
"net.minecraft.network"
] | java.io; net.minecraft.network; | 2,835,594 |
private static void updateAPIWithThumbnail(File imageFile, API importedApi, APIProvider apiProvider) {
APIIdentifier apiIdentifier = importedApi.getId();
String mimeType = URLConnection.guessContentTypeFromName(imageFile.getName());
try (FileInputStream inputStream = new FileInputStream(ima... | static void function(File imageFile, API importedApi, APIProvider apiProvider) { APIIdentifier apiIdentifier = importedApi.getId(); String mimeType = URLConnection.guessContentTypeFromName(imageFile.getName()); try (FileInputStream inputStream = new FileInputStream(imageFile.getAbsolutePath())) { ResourceFile apiImage ... | /**
* This method update the API with the thumbnail image from imported API.
*
* @param imageFile Image file
* @param importedApi API to update
* @param apiProvider API Provider
*/ | This method update the API with the thumbnail image from imported API | updateAPIWithThumbnail | {
"repo_name": "pubudu538/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/importexport/utils/APIImportUtil.java",
"license": "apache-2.0",
"size": 45409
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.net.URLConnection",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.FaultGatewaysException",
"org.wso2.carbon.apimgt.api... | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.net.URLConnection; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.FaultGatewaysException; import ... | import java.io.*; import java.net.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.io",
"java.net",
"org.wso2.carbon"
] | java.io; java.net; org.wso2.carbon; | 1,591,188 |
private Multimap<InetAddress, Range<Token>> getNewSourceRanges(String keyspaceName, Set<Range<Token>> ranges)
{
InetAddress myAddress = FBUtilities.getBroadcastAddress();
Multimap<Range<Token>, InetAddress> rangeAddresses = Keyspace.open(keyspaceName).getReplicationStrategy().getRangeAddresses(t... | Multimap<InetAddress, Range<Token>> function(String keyspaceName, Set<Range<Token>> ranges) { InetAddress myAddress = FBUtilities.getBroadcastAddress(); Multimap<Range<Token>, InetAddress> rangeAddresses = Keyspace.open(keyspaceName).getReplicationStrategy().getRangeAddresses(tokenMetadata.cloneOnlyTokenMap()); Multima... | /**
* Finds living endpoints responsible for the given ranges
*
* @param keyspaceName the keyspace ranges belong to
* @param ranges the ranges to find sources for
* @return multimap of addresses to ranges the address is responsible for
*/ | Finds living endpoints responsible for the given ranges | getNewSourceRanges | {
"repo_name": "tjake/cassandra",
"path": "src/java/org/apache/cassandra/service/StorageService.java",
"license": "apache-2.0",
"size": 199183
} | [
"com.google.common.collect.HashMultimap",
"com.google.common.collect.Multimap",
"java.net.InetAddress",
"java.util.Collection",
"java.util.List",
"java.util.Set",
"org.apache.cassandra.config.DatabaseDescriptor",
"org.apache.cassandra.db.Keyspace",
"org.apache.cassandra.dht.Range",
"org.apache.cas... | import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import java.net.InetAddress; import java.util.Collection; import java.util.List; import java.util.Set; import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.db.Keyspace; import org.apache.cassandra.dht... | import com.google.common.collect.*; import java.net.*; import java.util.*; import org.apache.cassandra.config.*; import org.apache.cassandra.db.*; import org.apache.cassandra.dht.*; import org.apache.cassandra.gms.*; import org.apache.cassandra.locator.*; import org.apache.cassandra.utils.*; | [
"com.google.common",
"java.net",
"java.util",
"org.apache.cassandra"
] | com.google.common; java.net; java.util; org.apache.cassandra; | 736,342 |
public void openThriftWriter(String filePath) throws IOException {
// create thrift writer instance
thriftWriter = new ThriftWriter(filePath, true);
// open the file stream
thriftWriter.open();
} | void function(String filePath) throws IOException { thriftWriter = new ThriftWriter(filePath, true); thriftWriter.open(); } | /**
* Below method will be used to open the thrift writer
*
* @param filePath file path where data need to be written
* @throws IOException throws io exception in case of any failure
*/ | Below method will be used to open the thrift writer | openThriftWriter | {
"repo_name": "ksimar/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/writer/CarbonIndexFileWriter.java",
"license": "apache-2.0",
"size": 1839
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,782,440 |
public synchronized Filter addKeys(Set<String> keys) {
for(String key : keys) {
this.keys.add(key);
}
return this;
} | synchronized Filter function(Set<String> keys) { for(String key : keys) { this.keys.add(key); } return this; } | /**
* Adds a set of keys to the filter.
*
* @param keys The set of keys to add.
* @return This filter
* @since 1.0.0
*/ | Adds a set of keys to the filter | addKeys | {
"repo_name": "jcc333/tempoiq-java",
"path": "src/main/java/com/tempoiq/Filter.java",
"license": "mit",
"size": 4372
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,556,047 |
public ServiceFuture<EntityRole> getClosedListEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, final ServiceCallback<EntityRole> serviceCallback) {
return ServiceFuture.fromResponse(getClosedListEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId), serviceCallback)... | ServiceFuture<EntityRole> function(UUID appId, String versionId, UUID entityId, UUID roleId, final ServiceCallback<EntityRole> serviceCallback) { return ServiceFuture.fromResponse(getClosedListEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId), serviceCallback); } | /**
* Get one role for a given list entity in a version of the application.
*
* @param appId The application ID.
* @param versionId The version ID.
* @param entityId entity ID.
* @param roleId entity role ID.
* @param serviceCallback the async ServiceCallback to handle successful and ... | Get one role for a given list entity in a version of the application | getClosedListEntityRoleAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java",
"license": "mit",
"size": 818917
} | [
"com.microsoft.azure.cognitiveservices.language.luis.authoring.models.EntityRole",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.EntityRole; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,213,549 |
public List<Role> loadRolesForUser(String userId) throws DotDataException;
| List<Role> function(String userId) throws DotDataException; | /**
* Retrieves all roles assigned to the user including the roles implicitly inherited
* @param userId
* @param user
* @param respectFrontEndRoles
* @return
* @throws DotDataException
*/ | Retrieves all roles assigned to the user including the roles implicitly inherited | loadRolesForUser | {
"repo_name": "ggonzales/ksl",
"path": "src/com/dotmarketing/business/RoleAPI.java",
"license": "gpl-3.0",
"size": 8907
} | [
"com.dotmarketing.exception.DotDataException",
"java.util.List"
] | import com.dotmarketing.exception.DotDataException; import java.util.List; | import com.dotmarketing.exception.*; import java.util.*; | [
"com.dotmarketing.exception",
"java.util"
] | com.dotmarketing.exception; java.util; | 387,701 |
protected void handlePendingCallResult(RTMPConnection conn, Invoke invoke) {
final IServiceCall call = invoke.getCall();
final IPendingServiceCall pendingCall = conn.retrievePendingCall(invoke.getTransactionId());
if (pendingCall != null) {
// The client sent a response to a ... | void function(RTMPConnection conn, Invoke invoke) { final IServiceCall call = invoke.getCall(); final IPendingServiceCall pendingCall = conn.retrievePendingCall(invoke.getTransactionId()); if (pendingCall != null) { Object[] args = call.getArguments(); if (args != null && args.length > 0) { pendingCall.setResult(args[0... | /**
* Handler for pending call result. Dispatches results to all pending call handlers.
*
* @param conn
* Connection
* @param invoke
* Pending call result event context
*/ | Handler for pending call result. Dispatches results to all pending call handlers | handlePendingCallResult | {
"repo_name": "bigbluebutton/red5-server-common",
"path": "src/main/java/org/red5/server/net/rtmp/BaseRTMPHandler.java",
"license": "apache-2.0",
"size": 14463
} | [
"java.util.HashSet",
"java.util.Set",
"org.red5.server.api.service.IPendingServiceCall",
"org.red5.server.api.service.IPendingServiceCallback",
"org.red5.server.api.service.IServiceCall",
"org.red5.server.net.rtmp.event.Invoke"
] | import java.util.HashSet; import java.util.Set; import org.red5.server.api.service.IPendingServiceCall; import org.red5.server.api.service.IPendingServiceCallback; import org.red5.server.api.service.IServiceCall; import org.red5.server.net.rtmp.event.Invoke; | import java.util.*; import org.red5.server.api.service.*; import org.red5.server.net.rtmp.event.*; | [
"java.util",
"org.red5.server"
] | java.util; org.red5.server; | 2,685,175 |
public TimePeriod getValidTime() {
return validTime;
} | TimePeriod function() { return validTime; } | /**
* Get valid time
*
* @return the validTime
*/ | Get valid time | getValidTime | {
"repo_name": "USGS-CIDA/SOS",
"path": "core/api/src/main/java/org/n52/sos/ogc/om/OmObservation.java",
"license": "gpl-2.0",
"size": 14724
} | [
"org.n52.sos.ogc.gml.time.TimePeriod"
] | import org.n52.sos.ogc.gml.time.TimePeriod; | import org.n52.sos.ogc.gml.time.*; | [
"org.n52.sos"
] | org.n52.sos; | 1,074,172 |
static boolean getShardsTolerantAsBool(SolrParams params) {
String shardsTolerantValue = params.get(SHARDS_TOLERANT);
if (null == shardsTolerantValue || shardsTolerantValue.equals(REQUIRE_ZK_CONNECTED)) {
return false;
} else {
return StrUtils.parseBool(shardsTolerantValue); // throw an except... | static boolean getShardsTolerantAsBool(SolrParams params) { String shardsTolerantValue = params.get(SHARDS_TOLERANT); if (null == shardsTolerantValue shardsTolerantValue.equals(REQUIRE_ZK_CONNECTED)) { return false; } else { return StrUtils.parseBool(shardsTolerantValue); } } | /**
* Parse the {@value #SHARDS_TOLERANT} param from <code>params</code> as a boolean; accepts
* {@value #REQUIRE_ZK_CONNECTED} as a valid value indicating <code>false</code>.
*
* <p>By default, returns <code>false</code> when {@value #SHARDS_TOLERANT} is not set in <code>
* params</code>.
*/ | Parse the #SHARDS_TOLERANT param from <code>params</code> as a boolean; accepts #REQUIRE_ZK_CONNECTED as a valid value indicating <code>false</code>. By default, returns <code>false</code> when #SHARDS_TOLERANT is not set in <code> params</code> | getShardsTolerantAsBool | {
"repo_name": "apache/solr",
"path": "solr/solrj/src/java/org/apache/solr/common/params/ShardParams.java",
"license": "apache-2.0",
"size": 4162
} | [
"org.apache.solr.common.util.StrUtils"
] | import org.apache.solr.common.util.StrUtils; | import org.apache.solr.common.util.*; | [
"org.apache.solr"
] | org.apache.solr; | 2,346,381 |
public void setFont(Object component, String key, ThingleFont font) {
Object[] definition = getDefinition(getClass(component), key, "font");
if (set(component, definition[1], font)) {
update(component, definition[2]);
}
}
| void function(Object component, String key, ThingleFont font) { Object[] definition = getDefinition(getClass(component), key, "font"); if (set(component, definition[1], font)) { update(component, definition[2]); } } | /**
* Set custom font on a component
*
* @param component component to use the custom font
* @param font custom font to use, or null to reset component to use default font
*/ | Set custom font on a component | setFont | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/trunk/thingle/src/org/newdawn/slick/thingle/internal/Thinlet.java",
"license": "bsd-2-clause",
"size": 256587
} | [
"org.newdawn.slick.thingle.spi.ThingleFont"
] | import org.newdawn.slick.thingle.spi.ThingleFont; | import org.newdawn.slick.thingle.spi.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 2,040,923 |
static NormalParDoFn of(
PipelineOptions options,
DoFnInfo<?, ?> doFnInfo,
SideInputReader sideInputReader,
List<String> outputTags,
String stepName,
DataflowExecutionContext executionContext,
CounterSet.AddCounterMutator addCounterMutator) {
return new NormalParDoFn(
... | static NormalParDoFn of( PipelineOptions options, DoFnInfo<?, ?> doFnInfo, SideInputReader sideInputReader, List<String> outputTags, String stepName, DataflowExecutionContext executionContext, CounterSet.AddCounterMutator addCounterMutator) { return new NormalParDoFn( options, doFnInfo, sideInputReader, outputTags, ste... | /**
* Create a {@link NormalParDoFn}.
*/ | Create a <code>NormalParDoFn</code> | of | {
"repo_name": "nagachika/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/worker/NormalParDoFn.java",
"license": "apache-2.0",
"size": 6866
} | [
"com.google.cloud.dataflow.sdk.options.PipelineOptions",
"com.google.cloud.dataflow.sdk.util.DoFnInfo",
"com.google.cloud.dataflow.sdk.util.SideInputReader",
"com.google.cloud.dataflow.sdk.util.common.CounterSet",
"java.util.List"
] | import com.google.cloud.dataflow.sdk.options.PipelineOptions; import com.google.cloud.dataflow.sdk.util.DoFnInfo; import com.google.cloud.dataflow.sdk.util.SideInputReader; import com.google.cloud.dataflow.sdk.util.common.CounterSet; import java.util.List; | import com.google.cloud.dataflow.sdk.options.*; import com.google.cloud.dataflow.sdk.util.*; import com.google.cloud.dataflow.sdk.util.common.*; import java.util.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 2,113,730 |
public boolean mkdirs(Path f, FsPermission permission) throws IOException {
throw new IOException("Har: mkdirs not allowed");
} | boolean function(Path f, FsPermission permission) throws IOException { throw new IOException(STR); } | /**
* not implemented.
*/ | not implemented | mkdirs | {
"repo_name": "shot/hadoop-source-reading",
"path": "src/core/org/apache/hadoop/fs/HarFileSystem.java",
"license": "apache-2.0",
"size": 25955
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,155,925 |
@SuppressWarnings("deprecation")
public final EventLoopGroup group() {
return bootstrap.group();
} | @SuppressWarnings(STR) final EventLoopGroup function() { return bootstrap.group(); } | /**
* Returns the configured {@link EventLoopGroup} or {@code null} if non is configured yet.
*/ | Returns the configured <code>EventLoopGroup</code> or null if non is configured yet | group | {
"repo_name": "gerdriesselmann/netty",
"path": "transport/src/main/java/io/netty/bootstrap/AbstractBootstrapConfig.java",
"license": "apache-2.0",
"size": 4287
} | [
"io.netty.channel.EventLoopGroup"
] | import io.netty.channel.EventLoopGroup; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,063,876 |
public RexNode makeCorrel(
RelDataType type,
String name) {
return new RexCorrelVariable(name, type);
} | RexNode function( RelDataType type, String name) { return new RexCorrelVariable(name, type); } | /**
* Creates an expression referencing a correlation variable.
*
* @param type Type of variable
* @param name Name of variable
* @return Correlation variable
*/ | Creates an expression referencing a correlation variable | makeCorrel | {
"repo_name": "mehant/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java",
"license": "apache-2.0",
"size": 42908
} | [
"org.apache.calcite.rel.type.RelDataType"
] | import org.apache.calcite.rel.type.RelDataType; | import org.apache.calcite.rel.type.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,643,900 |
private void ensureDirectoryFor(File targetFile) throws BuildException {
File directory = targetFile.getParentFile();
if (!directory.exists()) {
if (!directory.mkdirs()) {
handleError("Unable to create directory: "
+ directory.getAbsolutePath()... | void function(File targetFile) throws BuildException { File directory = targetFile.getParentFile(); if (!directory.exists()) { if (!directory.mkdirs()) { handleError(STR + directory.getAbsolutePath()); } } } | /**
* Ensure the directory exists for a given file
*
* @param targetFile the file for which the directories are required.
* @exception BuildException if the directories cannot be created.
*/ | Ensure the directory exists for a given file | ensureDirectoryFor | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java",
"license": "mit",
"size": 54033
} | [
"java.io.File",
"org.apache.tools.ant.BuildException"
] | import java.io.File; import org.apache.tools.ant.BuildException; | import java.io.*; import org.apache.tools.ant.*; | [
"java.io",
"org.apache.tools"
] | java.io; org.apache.tools; | 2,347,123 |
public Protocol getProtocol() {
return protocolInUse;
} | Protocol function() { return protocolInUse; } | /**
* Returns the protocol used to establish the connection.
* @return The protocol
*/ | Returns the protocol used to establish the connection | getProtocol | {
"repo_name": "meitar/zaproxy",
"path": "zap/src/main/java/org/apache/commons/httpclient/HttpConnection.java",
"license": "apache-2.0",
"size": 48146
} | [
"org.apache.commons.httpclient.protocol.Protocol"
] | import org.apache.commons.httpclient.protocol.Protocol; | import org.apache.commons.httpclient.protocol.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,234,274 |
private void insertEpisodesForPodcast(Podcast podcast){
int i=0;
if(null!=podcast.getPodcastFeed()){
for(SyndEntry entry: (List<SyndEntry>)podcast.getPodcastFeed().getEntries()){
Episode episode = new Episode();
episode.setPodcastId(podcast.getPodcastId());
//because there is an insertion opera... | void function(Podcast podcast){ int i=0; if(null!=podcast.getPodcastFeed()){ for(SyndEntry entry: (List<SyndEntry>)podcast.getPodcastFeed().getEntries()){ Episode episode = new Episode(); episode.setPodcastId(podcast.getPodcastId()); episode.setEpisodeId(i); podcastAndEpisodeAttributesService.setEpisodeAttributes(episo... | /**
* Inserts the episodes of a given podcast in the database
*
* @param podcast
*/ | Inserts the episodes of a given podcast in the database | insertEpisodesForPodcast | {
"repo_name": "radut/podcastpedia",
"path": "admin/src/main/java/org/podcastpedia/admin/insert/InsertServiceImpl.java",
"license": "mit",
"size": 10186
} | [
"com.rometools.rome.feed.synd.SyndEntry",
"java.util.List",
"org.apache.http.HttpStatus",
"org.podcastpedia.common.domain.Episode",
"org.podcastpedia.common.domain.Podcast"
] | import com.rometools.rome.feed.synd.SyndEntry; import java.util.List; import org.apache.http.HttpStatus; import org.podcastpedia.common.domain.Episode; import org.podcastpedia.common.domain.Podcast; | import com.rometools.rome.feed.synd.*; import java.util.*; import org.apache.http.*; import org.podcastpedia.common.domain.*; | [
"com.rometools.rome",
"java.util",
"org.apache.http",
"org.podcastpedia.common"
] | com.rometools.rome; java.util; org.apache.http; org.podcastpedia.common; | 1,188,161 |
public static void main(String[] args) throws Exception {
try {
// args: <train dataset>, <test dataset>, Wsize , Psize, Asize, Strategy
consoleLogger.info("processing parameters: " + Arrays.toString(args));
WINDOW_SIZE = Integer.valueOf(args[2]);
PAA_SIZE = Integer.valueOf(args[3]);
... | static void function(String[] args) throws Exception { try { consoleLogger.info(STR + Arrays.toString(args)); WINDOW_SIZE = Integer.valueOf(args[2]); PAA_SIZE = Integer.valueOf(args[3]); ALPHABET_SIZE = Integer.valueOf(args[4]); STRATEGY = NumerosityReductionStrategy.valueOf(args[5].toUpperCase()); if (args.length > 6)... | /**
* Main CLI runnable.
*
* @param args the command line args.
* @throws Exception if error occurs.
*/ | Main CLI runnable | main | {
"repo_name": "jMotif/sax-vsm-g",
"path": "src/main/java/net/seninp/saxvsm/direct/SAXVSMGrammarClassifier2.java",
"license": "gpl-2.0",
"size": 5097
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"net.seninp.jmotif.sax.NumerosityReductionStrategy",
"net.seninp.jmotif.sax.alphabet.NormalAlphabet",
"net.seninp.saxvsm.gi.repair.BagConstructionStrategy",
"net.seninp.saxvsm.gi.repair.RePairFactory",
"net.seninp.saxvsm.tex... | import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import net.seninp.jmotif.sax.NumerosityReductionStrategy; import net.seninp.jmotif.sax.alphabet.NormalAlphabet; import net.seninp.saxvsm.gi.repair.BagConstructionStrategy; import net.seninp.saxvsm.gi.repair.RePairFactory; im... | import java.util.*; import net.seninp.jmotif.sax.*; import net.seninp.jmotif.sax.alphabet.*; import net.seninp.saxvsm.gi.repair.*; import net.seninp.saxvsm.text.*; import net.seninp.saxvsm.util.*; | [
"java.util",
"net.seninp.jmotif",
"net.seninp.saxvsm"
] | java.util; net.seninp.jmotif; net.seninp.saxvsm; | 2,689,137 |
@GET
@Path("/flows/")
@Produces(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8)
public Set<TimelineEntity> getFlows(
@Context HttpServletRequest req,
@Context HttpServletResponse res,
@QueryParam("limit") String limit,
@QueryParam("daterange") String dateRange,
@QueryParam("f... | @Path(STR) @Produces(MediaType.APPLICATION_JSON + STR + JettyUtils.UTF_8) Set<TimelineEntity> function( @Context HttpServletRequest req, @Context HttpServletResponse res, @QueryParam("limit") String limit, @QueryParam(STR) String dateRange, @QueryParam(STR) String fromId) { return getFlows(req, res, null, limit, dateRa... | /**
* Return a list of active flows. Cluster ID is not provided by client so
* default cluster ID has to be taken.
*
* @param req Servlet request.
* @param res Servlet response.
* @param limit If specified, defines the number of flows to return. The
* maximum possible value for limit can be {@l... | Return a list of active flows. Cluster ID is not provided by client so default cluster ID has to be taken | getFlows | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java",
"license": "apache-2.0",
"size": 187717
} | [
"java.util.Set",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"org.apache.hadoop.http.JettyUtils",
"org.apache.hadoop.yarn.api.recor... | import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.apache.hadoop.http.JettyUtils; import org... | import java.util.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.http.*; import org.apache.hadoop.yarn.api.records.timelineservice.*; | [
"java.util",
"javax.servlet",
"javax.ws",
"org.apache.hadoop"
] | java.util; javax.servlet; javax.ws; org.apache.hadoop; | 627,504 |
public static void main(String[] args) throws UnknownHostException {
SpringApplication app = new SpringApplication(ConfigServerApp.class);
DefaultProfileUtil.addDefaultProfile(app);
Environment env = app.run(args).getEnvironment();
log.info("\n----------------------------------------... | static void function(String[] args) throws UnknownHostException { SpringApplication app = new SpringApplication(ConfigServerApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); log.info(STR + STR + STRExternal: \thttp: env.getProperty(STR), env.getProperty(STR), InetA... | /**
* Main method, used to run the application.
*
* @param args the command line arguments
* @throws UnknownHostException if the local host name could not be resolved into an address
*/ | Main method, used to run the application | main | {
"repo_name": "OlegDokuka/spring-cloud-starter",
"path": "jHipster/configserver/src/main/java/com/mycompany/myapp/ConfigServerApp.java",
"license": "mit",
"size": 4125
} | [
"com.mycompany.myapp.config.DefaultProfileUtil",
"java.net.InetAddress",
"java.net.UnknownHostException",
"org.springframework.boot.SpringApplication",
"org.springframework.core.env.Environment"
] | import com.mycompany.myapp.config.DefaultProfileUtil; import java.net.InetAddress; import java.net.UnknownHostException; import org.springframework.boot.SpringApplication; import org.springframework.core.env.Environment; | import com.mycompany.myapp.config.*; import java.net.*; import org.springframework.boot.*; import org.springframework.core.env.*; | [
"com.mycompany.myapp",
"java.net",
"org.springframework.boot",
"org.springframework.core"
] | com.mycompany.myapp; java.net; org.springframework.boot; org.springframework.core; | 347,002 |
public static ImagePipelineConfig getOkHttpImagePipelineConfig(Context context) {
if (sOkHttpImagePipelineConfig == null) {
OkHttpClient okHttpClient = new OkHttpClient();
ImagePipelineConfig.Builder configBuilder =
OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient);
conf... | static ImagePipelineConfig function(Context context) { if (sOkHttpImagePipelineConfig == null) { OkHttpClient okHttpClient = new OkHttpClient(); ImagePipelineConfig.Builder configBuilder = OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient); configureCaches(configBuilder, context); sOkHttpImagePipelineCo... | /**
* Creates config using OkHttp as network backed.
*/ | Creates config using OkHttp as network backed | getOkHttpImagePipelineConfig | {
"repo_name": "MichaelEvans/fresco",
"path": "sample/src/main/java/com/facebook/fresco/sample/configs/imagepipeline/ImagePipelineConfigFactory.java",
"license": "bsd-3-clause",
"size": 3610
} | [
"android.content.Context",
"com.facebook.imagepipeline.backends.okhttp.OkHttpImagePipelineConfigFactory",
"com.facebook.imagepipeline.core.ImagePipelineConfig",
"com.squareup.okhttp.OkHttpClient"
] | import android.content.Context; import com.facebook.imagepipeline.backends.okhttp.OkHttpImagePipelineConfigFactory; import com.facebook.imagepipeline.core.ImagePipelineConfig; import com.squareup.okhttp.OkHttpClient; | import android.content.*; import com.facebook.imagepipeline.backends.okhttp.*; import com.facebook.imagepipeline.core.*; import com.squareup.okhttp.*; | [
"android.content",
"com.facebook.imagepipeline",
"com.squareup.okhttp"
] | android.content; com.facebook.imagepipeline; com.squareup.okhttp; | 616,962 |
public ForeignKey<T> constraintMode(ConstraintMode constraintMode)
{
childNode.attribute("constraint-mode", constraintMode);
return this;
} | ForeignKey<T> function(ConstraintMode constraintMode) { childNode.attribute(STR, constraintMode); return this; } | /**
* Sets the <code>constraint-mode</code> attribute
* @param constraintMode the value for the attribute <code>constraint-mode</code>
* @return the current instance of <code>ForeignKey<T></code>
*/ | Sets the <code>constraint-mode</code> attribute | constraintMode | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm21/ForeignKeyImpl.java",
"license": "epl-1.0",
"size": 7124
} | [
"org.jboss.shrinkwrap.descriptor.api.orm21.ConstraintMode",
"org.jboss.shrinkwrap.descriptor.api.orm21.ForeignKey"
] | import org.jboss.shrinkwrap.descriptor.api.orm21.ConstraintMode; import org.jboss.shrinkwrap.descriptor.api.orm21.ForeignKey; | import org.jboss.shrinkwrap.descriptor.api.orm21.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,714,956 |
public static boolean isValidMapFile(final Uri filePath) {
return getAttributionIfValidFor(filePath) != null;
} | static boolean function(final Uri filePath) { return getAttributionIfValidFor(filePath) != null; } | /**
* checks whether the given Uri is a valid map file.
* Thie methos uses cached results from previous checks
* Note: this method MUST be static because it is indirectly used in MapsforgeMapProvider-constructur
*/ | checks whether the given Uri is a valid map file. Thie methos uses cached results from previous checks Note: this method MUST be static because it is indirectly used in MapsforgeMapProvider-constructur | isValidMapFile | {
"repo_name": "S-Bartfast/cgeo",
"path": "main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java",
"license": "apache-2.0",
"size": 14876
} | [
"android.net.Uri"
] | import android.net.Uri; | import android.net.*; | [
"android.net"
] | android.net; | 2,883,386 |
public JSONObject put(String key, Map value) throws JSONException {
put(key, new JSONObject(value));
return this;
} | JSONObject function(String key, Map value) throws JSONException { put(key, new JSONObject(value)); return this; } | /**
* Put a key/value pair in the JSONObject, where the value will be a
* JSONObject which is produced from a Map.
* @param key A key string.
* @param value A Map value.
* @return this.
* @throws JSONException
*/ | Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map | put | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/util/json/JSONObject.java",
"license": "gpl-3.0",
"size": 52777
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 295,047 |
private JPanel getModifyTab()
{
JPanel panel = new JPanel();
GridBagLayout layout = new GridBagLayout();
GridBagConstraints gbc = null;
panel.setLayout(((LayoutManager)layout));
panel.setBorder(((Border)new EmptyBorder(10, 10, 10, 10)));
... | JPanel function() { JPanel panel = new JPanel(); GridBagLayout layout = new GridBagLayout(); GridBagConstraints gbc = null; panel.setLayout(((LayoutManager)layout)); panel.setBorder(((Border)new EmptyBorder(10, 10, 10, 10))); gbc = new GridBagConstraints(); gbc.ipady = 3; VUtilities.constrain(new JLabel(valueName_+STR)... | /**
* Returns the tabbed panel component.
*
**/ | Returns the tabbed panel component | getModifyTab | {
"repo_name": "devjunix/libjt400-java",
"path": "src/com/ibm/as400/vaccess/VSysvalArrayDialog.java",
"license": "epl-1.0",
"size": 19631
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"java.awt.LayoutManager",
"javax.swing.JButton",
"javax.swing.JLabel",
"javax.swing.JList",
"javax.swing.JPanel",
"javax.swing.JScrollPane",
"javax.swing.JTextField",
"javax.swing.ListSelectionModel",
"javax.swing.bord... | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.LayoutManager; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ListSele... | import java.awt.*; import javax.swing.*; import javax.swing.border.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,838,260 |
public static IAST Expand(final IExpr expr, final IExpr pattern) {
return new AST2(Expand, expr, pattern);
} | static IAST function(final IExpr expr, final IExpr pattern) { return new AST2(Expand, expr, pattern); } | /**
* Expands out positive rational powers and products of sums in <code>expr</code>.
*
* <p>
* See: <a href=
* "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/Expand.md">Expand</a>
*
* @param expr
* @param pattern
* @return
*/ | Expands out positive rational powers and products of sums in <code>expr</code>. See: Expand | Expand | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
} | [
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 140,783 |
public static BufferedInputStream newInputStream(URL url) throws MalformedURLException, IOException {
return new BufferedInputStream(configuredInputStream(null, url));
} | static BufferedInputStream function(URL url) throws MalformedURLException, IOException { return new BufferedInputStream(configuredInputStream(null, url)); } | /**
* Creates a buffered input stream for this URL.
*
* @param url a URL
* @return a BufferedInputStream for the URL
* @throws MalformedURLException is thrown if the URL is not well formed
* @throws IOException if an I/O error occurs while creating the input stream
* @since ... | Creates a buffered input stream for this URL | newInputStream | {
"repo_name": "paulk-asert/groovy",
"path": "src/main/java/org/codehaus/groovy/runtime/ResourceGroovyMethods.java",
"license": "apache-2.0",
"size": 119457
} | [
"java.io.BufferedInputStream",
"java.io.IOException",
"java.net.MalformedURLException"
] | import java.io.BufferedInputStream; import java.io.IOException; import java.net.MalformedURLException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,598,848 |
public void init(
Map<String, JRFillParameter> parametersMap,
Map<String, JRFillField> fieldsMap,
Map<String, JRFillVariable> variablesMap,
WhenResourceMissingTypeEnum resourceMissingType,
boolean ignoreNPE
) throws JRException
{
whenResourceMissingType = resourceMissingType;
this.ignoreNPE... | void function( Map<String, JRFillParameter> parametersMap, Map<String, JRFillField> fieldsMap, Map<String, JRFillVariable> variablesMap, WhenResourceMissingTypeEnum resourceMissingType, boolean ignoreNPE ) throws JRException { whenResourceMissingType = resourceMissingType; this.ignoreNPE = ignoreNPE; resourceBundle = p... | /**
* Initializes the evaluator by setting the parameter, field and variable objects.
*
* @param parametersMap the parameters indexed by name
* @param fieldsMap the fields indexed by name
* @param variablesMap the variables indexed by name
* @param resourceMissingType the resource missing type
* @throws ... | Initializes the evaluator by setting the parameter, field and variable objects | init | {
"repo_name": "aleatorio12/ProVentasConnector",
"path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/fill/JREvaluator.java",
"license": "gpl-3.0",
"size": 13442
} | [
"java.util.HashMap",
"java.util.Map",
"net.sf.jasperreports.engine.JRException",
"net.sf.jasperreports.engine.JRParameter",
"net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum",
"net.sf.jasperreports.functions.FunctionSupport"
] | import java.util.HashMap; import java.util.Map; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRParameter; import net.sf.jasperreports.engine.type.WhenResourceMissingTypeEnum; import net.sf.jasperreports.functions.FunctionSupport; | import java.util.*; import net.sf.jasperreports.engine.*; import net.sf.jasperreports.engine.type.*; import net.sf.jasperreports.functions.*; | [
"java.util",
"net.sf.jasperreports"
] | java.util; net.sf.jasperreports; | 1,754,745 |
private void getAccelData(SensorEvent event) {
float magnitude = 0;
for (int i = 0; i < (ACCEL_METRICS - 1); i++) {
values[i] = event.values[i];
magnitude += event.values[i] * event.values[i];
}
values[ACCEL_METRICS - 1] = FloatMath.sqrt(magnitude);
performUpdates();
} | void function(SensorEvent event) { float magnitude = 0; for (int i = 0; i < (ACCEL_METRICS - 1); i++) { values[i] = event.values[i]; magnitude += event.values[i] * event.values[i]; } values[ACCEL_METRICS - 1] = FloatMath.sqrt(magnitude); performUpdates(); } | /**
* Process SensorEvent data obtained from onSensorChanged() event.
*
* @param event accelerometer data received from onSensorChanged() event
*/ | Process SensorEvent data obtained from onSensorChanged() event | getAccelData | {
"repo_name": "Sean1988/CIMON_Android",
"path": "src/edu/nd/darts/cimon/LinearAccelService.java",
"license": "gpl-3.0",
"size": 6124
} | [
"android.hardware.SensorEvent",
"android.util.FloatMath"
] | import android.hardware.SensorEvent; import android.util.FloatMath; | import android.hardware.*; import android.util.*; | [
"android.hardware",
"android.util"
] | android.hardware; android.util; | 2,595,969 |
public final TableEntry getTableBasedOnNullaryFunction(String tableName,
boolean caseSensitive) {
for (Map.Entry<String, FunctionEntry> entry
: nullaryFunctionMap.range(tableName, caseSensitive).entrySet()) {
final Function function = entry.getValue().getFunction();
if (function instance... | final TableEntry function(String tableName, boolean caseSensitive) { for (Map.Entry<String, FunctionEntry> entry : nullaryFunctionMap.range(tableName, caseSensitive).entrySet()) { final Function function = entry.getValue().getFunction(); if (function instanceof TableMacro) { assert function.getParameters().isEmpty(); f... | /** Returns a tables derived from explicit and implicit functions
* that take zero parameters. */ | Returns a tables derived from explicit and implicit functions | getTableBasedOnNullaryFunction | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java",
"license": "apache-2.0",
"size": 28594
} | [
"com.google.common.collect.ImmutableList",
"java.util.Map",
"org.apache.calcite.schema.Function",
"org.apache.calcite.schema.Table",
"org.apache.calcite.schema.TableMacro"
] | import com.google.common.collect.ImmutableList; import java.util.Map; import org.apache.calcite.schema.Function; import org.apache.calcite.schema.Table; import org.apache.calcite.schema.TableMacro; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.schema.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 202,670 |
public String getLocaleDate(Locale locale, int format) {
DateFormat dateFormat = DateFormat.getDateInstance(format, locale);
return dateFormat.format(getTime());
} | String function(Locale locale, int format) { DateFormat dateFormat = DateFormat.getDateInstance(format, locale); return dateFormat.format(getTime()); } | /**
* Get a date string for the locale
* @param locale The locale to use to format the current date
* @param format The format of the date string
* @return String
*/ | Get a date string for the locale | getLocaleDate | {
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/util/IWTimestamp.java",
"license": "gpl-3.0",
"size": 39740
} | [
"java.text.DateFormat",
"java.util.Locale"
] | import java.text.DateFormat; import java.util.Locale; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 1,831,904 |
@Override
protected LDAPEntry[] getChildGroupsEntry(String lds, String parentId, String extraFilter) throws
AdminException {
if (StringUtil.isDefined(parentId)) { // ALL ROOT GROUPS
return ArrayUtil.EMPTY_LDAP_ENTRY_ARRAY;
} else {
LDAPEntry[] theEntries = null;
String theFilter = dr... | LDAPEntry[] function(String lds, String parentId, String extraFilter) throws AdminException { if (StringUtil.isDefined(parentId)) { return ArrayUtil.EMPTY_LDAP_ENTRY_ARRAY; } else { LDAPEntry[] theEntries = null; String theFilter = driverSettings.getGroupsFullFilter(); if (StringUtil.isDefined(extraFilter)) { theFilter... | /**
* Method declaration THIS FUNCTION THROW EXCEPTION ONLY WHEN NO SYNCHRO IS RUNNING
*
* @param lds
* @param parentId
* @return
* @throws AdminException
* @see
*/ | Method declaration THIS FUNCTION THROW EXCEPTION ONLY WHEN NO SYNCHRO IS RUNNING | getChildGroupsEntry | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "lib-core/src/main/java/com/stratelia/silverpeas/domains/ldapdriver/LDAPGroupAllRoot.java",
"license": "agpl-3.0",
"size": 14150
} | [
"com.novell.ldap.LDAPEntry",
"com.silverpeas.util.ArrayUtil",
"com.silverpeas.util.StringUtil",
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.webactiv.beans.admin.AdminException",
"com.stratelia.webactiv.beans.admin.SynchroReport"
] | import com.novell.ldap.LDAPEntry; import com.silverpeas.util.ArrayUtil; import com.silverpeas.util.StringUtil; import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.beans.admin.AdminException; import com.stratelia.webactiv.beans.admin.SynchroReport; | import com.novell.ldap.*; import com.silverpeas.util.*; import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.beans.admin.*; | [
"com.novell.ldap",
"com.silverpeas.util",
"com.stratelia.silverpeas",
"com.stratelia.webactiv"
] | com.novell.ldap; com.silverpeas.util; com.stratelia.silverpeas; com.stratelia.webactiv; | 1,150,507 |
@SuppressWarnings("rawtypes")
public ParameterSet addParameters(Object bean) {
Class c = bean.getClass();
for (Field field : c.getDeclaredFields()) {
if (field.isAnnotationPresent(ParameterField.class)) {
ParameterField annotation = field.getAnnotation(ParameterField.class);
if (!conta... | @SuppressWarnings(STR) ParameterSet function(Object bean) { Class c = bean.getClass(); for (Field field : c.getDeclaredFields()) { if (field.isAnnotationPresent(ParameterField.class)) { ParameterField annotation = field.getAnnotation(ParameterField.class); if (!containsKey(field.getName())) { String label = annotation.... | /**
* Adds parameters to this set which correspond to any fields of the class of the given object
* annotated as {@link ParameterField}s.
* @param bean The object whose class may have {@link ParameterField} attributes.
* @return A reference to this set.
*/ | Adds parameters to this set which correspond to any fields of the class of the given object annotated as <code>ParameterField</code>s | addParameters | {
"repo_name": "nzilbb/ag",
"path": "ag/src/main/java/nzilbb/configure/ParameterSet.java",
"license": "gpl-3.0",
"size": 4462
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,561,595 |
public WallGetByIdQueryWithLegacy getByIdLegacy(ServiceActor actor, List<String> posts) {
return new WallGetByIdQueryWithLegacy(getClient(), actor, posts);
} | WallGetByIdQueryWithLegacy function(ServiceActor actor, List<String> posts) { return new WallGetByIdQueryWithLegacy(getClient(), actor, posts); } | /**
* Returns a list of posts from user or community walls by their IDs.
*
* @param actor vk actor
* @param posts User or community IDs and post IDs, separated by underscores. Use a negative value to designate a community ID. Example: "93388_21539,93388_20904,2943_4276,-1_1"
* @return query
... | Returns a list of posts from user or community walls by their IDs | getByIdLegacy | {
"repo_name": "VKCOM/vk-java-sdk",
"path": "sdk/src/main/java/com/vk/api/sdk/actions/Wall.java",
"license": "mit",
"size": 17618
} | [
"com.vk.api.sdk.client.actors.ServiceActor",
"com.vk.api.sdk.queries.wall.WallGetByIdQueryWithLegacy",
"java.util.List"
] | import com.vk.api.sdk.client.actors.ServiceActor; import com.vk.api.sdk.queries.wall.WallGetByIdQueryWithLegacy; import java.util.List; | import com.vk.api.sdk.client.actors.*; import com.vk.api.sdk.queries.wall.*; import java.util.*; | [
"com.vk.api",
"java.util"
] | com.vk.api; java.util; | 1,433,511 |
@Nullable
public BuildConfiguration getConfiguration() {
return configuration;
} | BuildConfiguration function() { return configuration; } | /**
* Returns the configuration for this target. This may return null if the target is supposed to be
* configuration-independent (like an input file, or a visibility rule). However, this is
* guaranteed to be non-null for rules and for output files.
*/ | Returns the configuration for this target. This may return null if the target is supposed to be configuration-independent (like an input file, or a visibility rule). However, this is guaranteed to be non-null for rules and for output files | getConfiguration | {
"repo_name": "hhclam/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/TargetContext.java",
"license": "apache-2.0",
"size": 3459
} | [
"com.google.devtools.build.lib.analysis.config.BuildConfiguration"
] | import com.google.devtools.build.lib.analysis.config.BuildConfiguration; | import com.google.devtools.build.lib.analysis.config.*; | [
"com.google.devtools"
] | com.google.devtools; | 319,002 |
public static java.util.Set extractBedSpaceStateSet(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.BedSpaceStateListVoCollection voCollection)
{
return extractBedSpaceStateSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.BedSpaceStateListVoCollection voCollection) { return extractBedSpaceStateSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.admin.pas.domain.objects.BedSpaceState set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.admin.pas.domain.objects.BedSpaceState set from the value object collection | extractBedSpaceStateSet | {
"repo_name": "IMS-MAXIMS/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/BedSpaceStateListVoAssembler.java",
"license": "agpl-3.0",
"size": 18774
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,901,391 |
public ReportDownloadResponse downloadReport(ReportDefinition reportDefinition)
throws ReportException, ReportDownloadResponseException {
return handleResponse(adHocReportDownloadHelper.downloadReport(toXml(reportDefinition)));
} | ReportDownloadResponse function(ReportDefinition reportDefinition) throws ReportException, ReportDownloadResponseException { return handleResponse(adHocReportDownloadHelper.downloadReport(toXml(reportDefinition))); } | /**
* Downloads a report and returns a ReportDownloadResponse with the results.
*
* @param reportDefinition to download a report for.
* @return {@link ReportDownloadResponse} When HTTP request completes. On
* success, the outputStream will be flushed and closed.
* @throws ReportException If we... | Downloads a report and returns a ReportDownloadResponse with the results | downloadReport | {
"repo_name": "nafae/developer",
"path": "modules/ads_lib/src/main/java/com/google/api/ads/adwords/lib/utils/v201406/ReportDownloader.java",
"license": "apache-2.0",
"size": 6631
} | [
"com.google.api.ads.adwords.lib.jaxb.v201406.ReportDefinition",
"com.google.api.ads.adwords.lib.utils.ReportDownloadResponse",
"com.google.api.ads.adwords.lib.utils.ReportDownloadResponseException",
"com.google.api.ads.adwords.lib.utils.ReportException"
] | import com.google.api.ads.adwords.lib.jaxb.v201406.ReportDefinition; import com.google.api.ads.adwords.lib.utils.ReportDownloadResponse; import com.google.api.ads.adwords.lib.utils.ReportDownloadResponseException; import com.google.api.ads.adwords.lib.utils.ReportException; | import com.google.api.ads.adwords.lib.jaxb.v201406.*; import com.google.api.ads.adwords.lib.utils.*; | [
"com.google.api"
] | com.google.api; | 1,858,544 |
public boolean checkVLCsupport() {
InputStream output = null;
//InputStream stderr = null;
boolean check = false;
String[] cmd = {"/bin/sh", "-c", "vlc --list | grep ccn"};
try {
Process p = Runtime.getRuntime().exec(cmd);
output = p.getInputStream();
//stderr = p.getErrorStream();
String l... | boolean function() { InputStream output = null; boolean check = false; String[] cmd = {STR, "-c", STR}; try { Process p = Runtime.getRuntime().exec(cmd); output = p.getInputStream(); String line = null; BufferedReader brCleanUp = new BufferedReader (new InputStreamReader (output)); while ((line = brCleanUp.readLine ())... | /**
* Method to check for CCN Plugin for VLC. Returns true if the ccn plugin is
* installed for VLC. If it is not found, the "Play File" option is disabled
* for files.
*
* Currently not tested on non-linux platforms.
*
* @return boolean True if the text ccn is found in the vlc --list output.
*/ | Method to check for CCN Plugin for VLC. Returns true if the ccn plugin is installed for VLC. If it is not found, the "Play File" option is disabled for files. Currently not tested on non-linux platforms | checkVLCsupport | {
"repo_name": "ryanrhymes/mobiccnx",
"path": "javasrc/src/org/ccnx/ccn/utils/explorer/ContentExplorer.java",
"license": "lgpl-2.1",
"size": 39125
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"org.ccnx.ccn.impl.support.Log"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import org.ccnx.ccn.impl.support.Log; | import java.io.*; import org.ccnx.ccn.impl.support.*; | [
"java.io",
"org.ccnx.ccn"
] | java.io; org.ccnx.ccn; | 574,118 |
@Override
public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int oldVersion, int newVersion) {
try {
Log.i(DatabaseHelper1.class.getName(), "onUpgrade");
TableUtils.dropTable(connectionSource, SimpleData.class, true);
// after we drop the old databases, we create the new ones
... | void function(SQLiteDatabase db, ConnectionSource connectionSource, int oldVersion, int newVersion) { try { Log.i(DatabaseHelper1.class.getName(), STR); TableUtils.dropTable(connectionSource, SimpleData.class, true); onCreate(db, connectionSource); } catch (SQLException e) { Log.e(DatabaseHelper1.class.getName(), STR, ... | /**
* This is called when your application is upgraded and it has a higher version number. This allows you to adjust
* the various data to match the new version number.
*/ | This is called when your application is upgraded and it has a higher version number. This allows you to adjust the various data to match the new version number | onUpgrade | {
"repo_name": "aopi1125/OrmTest",
"path": "OrmDemo/ormlite/src/main/java/com/harbor/ormlite/twodb/DatabaseHelper1.java",
"license": "gpl-3.0",
"size": 4130
} | [
"android.database.sqlite.SQLiteDatabase",
"android.util.Log",
"com.harbor.ormlite.SimpleData",
"com.j256.ormlite.support.ConnectionSource",
"com.j256.ormlite.table.TableUtils",
"java.sql.SQLException"
] | import android.database.sqlite.SQLiteDatabase; import android.util.Log; import com.harbor.ormlite.SimpleData; import com.j256.ormlite.support.ConnectionSource; import com.j256.ormlite.table.TableUtils; import java.sql.SQLException; | import android.database.sqlite.*; import android.util.*; import com.harbor.ormlite.*; import com.j256.ormlite.support.*; import com.j256.ormlite.table.*; import java.sql.*; | [
"android.database",
"android.util",
"com.harbor.ormlite",
"com.j256.ormlite",
"java.sql"
] | android.database; android.util; com.harbor.ormlite; com.j256.ormlite; java.sql; | 1,269,230 |
@Test
public void verifyAnnotationWithoutTransformer() {
TestNG tng = create(AnnotationTransformerSampleTest.class);
tng.setPreserveOrder(true);
TestListenerAdapter tla = new TestListenerAdapter();
tng.addListener(tla);
tng.run();
assertThat(tla.getPassedTests()).extracting(NAME_EXTRACTOR... | void function() { TestNG tng = create(AnnotationTransformerSampleTest.class); tng.setPreserveOrder(true); TestListenerAdapter tla = new TestListenerAdapter(); tng.addListener(tla); tng.run(); assertThat(tla.getPassedTests()).extracting(NAME_EXTRACTOR) .containsExactly( "five", "four", "four", "four", "four", "four", "t... | /**
* Make sure that without a transformer in place, a class-level
* annotation invocationCount is correctly used.
*/ | Make sure that without a transformer in place, a class-level annotation invocationCount is correctly used | verifyAnnotationWithoutTransformer | {
"repo_name": "6ft-invsbl-rbbt/testng",
"path": "src/test/java/test/annotationtransformer/AnnotationTransformerTest.java",
"license": "apache-2.0",
"size": 7190
} | [
"org.assertj.core.api.Assertions",
"org.testng.TestListenerAdapter",
"org.testng.TestNG"
] | import org.assertj.core.api.Assertions; import org.testng.TestListenerAdapter; import org.testng.TestNG; | import org.assertj.core.api.*; import org.testng.*; | [
"org.assertj.core",
"org.testng"
] | org.assertj.core; org.testng; | 1,824,362 |
protected static void handleSelections(iListHandler comp, ItemAttributes at) {
if (at == null) {
return;
}
int index;
if (at.select != null) {
index = comp.indexOf(at.select);
if (index != -1) {
comp.setSelectedIndex(index);
}
}
ArrayList<RenderableDataItem>... | static void function(iListHandler comp, ItemAttributes at) { if (at == null) { return; } int index; if (at.select != null) { index = comp.indexOf(at.select); if (index != -1) { comp.setSelectedIndex(index); } } ArrayList<RenderableDataItem> list = at.selected; int len = (list == null) ? 0 : list.size(); for (int i = 0;... | /**
* Static method to handle items that were flagged as selected during parsing
*
* @param comp
* the list component the selections are for
* @param at
* the set of items
*/ | Static method to handle items that were flagged as selected during parsing | handleSelections | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/widget/aWidget.java",
"license": "gpl-3.0",
"size": 150848
} | [
"com.appnativa.rare.ui.RenderableDataItem",
"java.util.ArrayList"
] | import com.appnativa.rare.ui.RenderableDataItem; import java.util.ArrayList; | import com.appnativa.rare.ui.*; import java.util.*; | [
"com.appnativa.rare",
"java.util"
] | com.appnativa.rare; java.util; | 1,640,474 |
public InetAddress getBindAddress() {
return this.bindAddress;
} | InetAddress function() { return this.bindAddress; } | /**
* Returns the IP address to which this locator's listening socket is bound.
*/ | Returns the IP address to which this locator's listening socket is bound | getBindAddress | {
"repo_name": "pivotal-amurmann/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/Locator.java",
"license": "apache-2.0",
"size": 19029
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,354,769 |
public UserModel setLastLogin(Date lastLogin) {
this.lastLogin = lastLogin;
return this;
}
public Date getCustomWelcomeScreenViewed() { return customWelcomeScreenViewed; } | UserModel function(Date lastLogin) { this.lastLogin = lastLogin; return this; } public Date getCustomWelcomeScreenViewed() { return customWelcomeScreenViewed; } | /** Sets the lastLogin date
*
* @param lastLogin the new lastLogin date
* @return the UserModel
*/ | Sets the lastLogin date | setLastLogin | {
"repo_name": "smartsheet-platform/smartsheet-java-sdk",
"path": "src/main/java/com/smartsheet/api/models/UserModel.java",
"license": "apache-2.0",
"size": 10466
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,046,138 |
@Test
@Override
public void verifyInitialTerms() {
verifyInitialTerms(Arrays.asList(0L, 1L, 6L, 15L, 28L, 45L, 66L, 91L,
120L, 153L, 190L, 231L));
} | void function() { verifyInitialTerms(Arrays.asList(0L, 1L, 6L, 15L, 28L, 45L, 66L, 91L, 120L, 153L, 190L, 231L)); } | /**
* Verify initial terms.
*/ | Verify initial terms | verifyInitialTerms | {
"repo_name": "beargiles/projecteuler",
"path": "src/test/java/com/invariantproperties/projecteuler/figurate/HexagonalNumberTest.java",
"license": "apache-2.0",
"size": 1928
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,018,699 |
protected TableColumnModel getColumnModel() {
return columnModel;
}
| TableColumnModel function() { return columnModel; } | /**
* Gives the {@link TableColumnWeightModel} that is currently used to render the table headers.
*
* @return The {@link TableColumnModel} which is currently used.
*/ | Gives the <code>TableColumnWeightModel</code> that is currently used to render the table headers | getColumnModel | {
"repo_name": "ISchwarz23/SortableTableView",
"path": "tableview/src/main/java/de/codecrafters/tableview/TableHeaderAdapter.java",
"license": "apache-2.0",
"size": 5572
} | [
"de.codecrafters.tableview.model.TableColumnModel"
] | import de.codecrafters.tableview.model.TableColumnModel; | import de.codecrafters.tableview.model.*; | [
"de.codecrafters.tableview"
] | de.codecrafters.tableview; | 1,379,950 |
if (m_instance == null)
m_instance = new ConfigServiceImpl();
return (ConfigService) m_instance;
}
private ConfigServiceImpl() {
super();
TAG = "ioe" + ConfigClientImpl.class.getSimpleName();
} | if (m_instance == null) m_instance = new ConfigServiceImpl(); return (ConfigService) m_instance; } private ConfigServiceImpl() { super(); TAG = "ioe" + ConfigClientImpl.class.getSimpleName(); } | /**
* A singleton ConfigService instance
*
* @return {@link ConfigService} instance
*/ | A singleton ConfigService instance | getInstance | {
"repo_name": "octoblu/alljoyn",
"path": "alljoyn/services/config/java/src/org/alljoyn/config/ConfigServiceImpl.java",
"license": "isc",
"size": 10363
} | [
"org.alljoyn.config.client.ConfigClientImpl"
] | import org.alljoyn.config.client.ConfigClientImpl; | import org.alljoyn.config.client.*; | [
"org.alljoyn.config"
] | org.alljoyn.config; | 947,846 |
public List<String> groupIds() {
return this.groupIds;
} | List<String> function() { return this.groupIds; } | /**
* Get the ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to.
*
* @return the groupIds value
*/ | Get the ID(s) of the group(s) obtained from the remote resource that this private endpoint should connect to | groupIds | {
"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/PrivateLinkServiceConnection.java",
"license": "mit",
"size": 6432
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,686,259 |
public GenericEntry createMailboxDumpRequest(MailBoxDumpRequest mailBoxDumpRequest)
throws AppsForYourDomainException, MalformedURLException, IOException, ServiceException {
String user = mailBoxDumpRequest.getUserEmailAddress().split("@")[0];
URL url = new URL(BASE_URL + "mail/export/" + domain + "/" +... | GenericEntry function(MailBoxDumpRequest mailBoxDumpRequest) throws AppsForYourDomainException, MalformedURLException, IOException, ServiceException { String user = mailBoxDumpRequest.getUserEmailAddress().split("@")[0]; URL url = new URL(BASE_URL + STR + domain + "/" + user); return insert(url, mailBoxDumpRequest.toGe... | /**
* Creates a new request for obtaining a user mailbox dump. The mailbox files
* are encrypted using the key uploaded {@code uploadPublicKey} and are
* available in <a href="http://en.wikipedia.org/wiki/Mbox">mbox format</a>
*
* @param mailBoxDumpRequest a POJO with request details.
* @return the i... | Creates a new request for obtaining a user mailbox dump. The mailbox files are encrypted using the key uploaded uploadPublicKey and are available in mbox format | createMailboxDumpRequest | {
"repo_name": "simonrrr/gdata-java-client",
"path": "java/src/com/google/gdata/client/appsforyourdomain/audit/AuditService.java",
"license": "apache-2.0",
"size": 17077
} | [
"com.google.gdata.data.appsforyourdomain.AppsForYourDomainException",
"com.google.gdata.data.appsforyourdomain.generic.GenericEntry",
"com.google.gdata.util.ServiceException",
"java.io.IOException",
"java.net.MalformedURLException"
] | import com.google.gdata.data.appsforyourdomain.AppsForYourDomainException; import com.google.gdata.data.appsforyourdomain.generic.GenericEntry; import com.google.gdata.util.ServiceException; import java.io.IOException; import java.net.MalformedURLException; | import com.google.gdata.data.appsforyourdomain.*; import com.google.gdata.data.appsforyourdomain.generic.*; import com.google.gdata.util.*; import java.io.*; import java.net.*; | [
"com.google.gdata",
"java.io",
"java.net"
] | com.google.gdata; java.io; java.net; | 338,048 |
protected boolean isItemInViewport(final GeoItem item) {
BoundingBox curBounds = getCurBounds();
return curBounds != null && curBounds.contains(item.getLatLong());
} | boolean function(final GeoItem item) { BoundingBox curBounds = getCurBounds(); return curBounds != null && curBounds.contains(item.getLatLong()); } | /**
* check if the item is within current viewport.
*
* @return true if item is within viewport.
*/ | check if the item is within current viewport | isItemInViewport | {
"repo_name": "muZZkat/mapsforge",
"path": "mapsforge-samples-android/src/main/java/org/mapsforge/samples/android/cluster/ClusterManager.java",
"license": "lgpl-3.0",
"size": 18617
} | [
"org.mapsforge.core.model.BoundingBox"
] | import org.mapsforge.core.model.BoundingBox; | import org.mapsforge.core.model.*; | [
"org.mapsforge.core"
] | org.mapsforge.core; | 2,197,183 |
public void setThrowableHeading(double par1, double par3, double par5, float par7, float par8)
{
float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
par1 /= (double)f2;
par3 /= (double)f2;
par5 /= (double)f2;
par1 += this.rand.nextGaussian() * (dou... | void function(double par1, double par3, double par5, float par7, float par8) { float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5); par1 /= (double)f2; par3 /= (double)f2; par5 /= (double)f2; par1 += this.rand.nextGaussian() * (double)(this.rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (... | /**
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
*/ | Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction | setThrowableHeading | {
"repo_name": "DrSideburns/Modjam-3-Winter-Warfare-Mod",
"path": "src/Dr_Sideburns/winterWarMod/entity/EntityLaunchedSnowball.java",
"license": "mit",
"size": 22532
} | [
"net.minecraft.util.MathHelper"
] | import net.minecraft.util.MathHelper; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,819,811 |
public final DebVersion analyzeFile(final String suite, final InputStream input) throws IOException {
final DebVersion result = new DebVersion();
final Map<String, StringBuilder> data = new HashMap<>();
StringBuilder lastData = null; // NOPMD - init
final BufferedRe... | final DebVersion function(final String suite, final InputStream input) throws IOException { final DebVersion result = new DebVersion(); final Map<String, StringBuilder> data = new HashMap<>(); StringBuilder lastData = null; final BufferedReader reader = new BufferedReader(new InputStreamReader(input, Charsets.UTF_8)); ... | /**
* Read method for "Packages" file.
*
* @param input
* InputStream on the text file
* @return The object populated with the content of the file.
* @throws IOException
* I/O error.
*/ | Read method for "Packages" file | analyzeFile | {
"repo_name": "charlesfendt/dederem",
"path": "repo-common/src/main/java/org/dederem/common/service/VersionAnalyseService.java",
"license": "lgpl-3.0",
"size": 6580
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.HashMap",
"java.util.Map",
"org.apache.commons.io.Charsets",
"org.apache.commons.lang3.StringUtils",
"org.dederem.common.bean.DebPackageDesc",
"org.dederem.common.bean.DebVersion"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; import org.apache.commons.io.Charsets; import org.apache.commons.lang3.StringUtils; import org.dederem.common.bean.DebPackageDesc; import org.dederem.c... | import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.apache.commons.lang3.*; import org.dederem.common.bean.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.dederem.common"
] | java.io; java.util; org.apache.commons; org.dederem.common; | 372,559 |
public ContextualityLevel getLabelContextualityLevel(String pLabel)
throws ExInternal {
if (!existsContext(pLabel)) {
throw new IllegalArgumentException(pLabel + " is not defined on this ContextUElem");
}
ContextualityLevel lContextualityLevel = getStackContextualityLevelForLabel(pLabel);
if... | ContextualityLevel function(String pLabel) throws ExInternal { if (!existsContext(pLabel)) { throw new IllegalArgumentException(pLabel + STR); } ContextualityLevel lContextualityLevel = getStackContextualityLevelForLabel(pLabel); if (lContextualityLevel != null) { return lContextualityLevel; } else if (mLabelToDOMHandl... | /**
* Get the ContextualityLevel for the label specified by pLabel. If a custom label has been defined or the ContextualityLevel
* of a built-in label has been overridden, the custom value is returned. Otherwise if the label is built-in it is used
* to look up the default.
*
* @param pLabel Label name to... | Get the ContextualityLevel for the label specified by pLabel. If a custom label has been defined or the ContextualityLevel of a built-in label has been overridden, the custom value is returned. Otherwise if the label is built-in it is used to look up the default | getLabelContextualityLevel | {
"repo_name": "Fivium/FOXopen",
"path": "src/main/java/net/foxopen/fox/ContextUElem.java",
"license": "gpl-3.0",
"size": 67132
} | [
"net.foxopen.fox.dom.xpath.ContextualityLevel",
"net.foxopen.fox.ex.ExInternal"
] | import net.foxopen.fox.dom.xpath.ContextualityLevel; import net.foxopen.fox.ex.ExInternal; | import net.foxopen.fox.dom.xpath.*; import net.foxopen.fox.ex.*; | [
"net.foxopen.fox"
] | net.foxopen.fox; | 2,177,870 |
private void prepareStanding(ArrayList<Standing> standings, Team team, int goalsFor, int goalsAgainst) {
int teamIndex;
Standing stand;
if ((teamIndex = getIndexOfTeam(standings, team)) != -1) {
//Message.addMessageToContext("Total indeces: "+(standings.size()-1)+" teamIndex.... | void function(ArrayList<Standing> standings, Team team, int goalsFor, int goalsAgainst) { int teamIndex; Standing stand; if ((teamIndex = getIndexOfTeam(standings, team)) != -1) { stand = standings.get(teamIndex); } else { stand = new Standing(team); standings.add(stand); } if (goalsFor == -1 goalsAgainst == -1) { retu... | /**
* Skapar eller uppdaterar Standing-objekt,
*
* @param standings
* @param team
* @param goalsFor
* @param goalsAgainst
*/ | Skapar eller uppdaterar Standing-objekt | prepareStanding | {
"repo_name": "Althox/ik2011-inl1",
"path": "ik2011-inl1/src/java/controller/LeagueBean.java",
"license": "gpl-2.0",
"size": 8778
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,119,224 |
public final UserInterfaceContext getContext()
{
return rContext;
} | final UserInterfaceContext function() { return rContext; } | /***************************************
* Returns the user interface context of this table.
*
* @return The user interface context
*/ | Returns the user interface context of this table | getContext | {
"repo_name": "esoco/gewt",
"path": "src/main/java/de/esoco/ewt/impl/gwt/table/GwtTable.java",
"license": "apache-2.0",
"size": 48655
} | [
"de.esoco.ewt.UserInterfaceContext"
] | import de.esoco.ewt.UserInterfaceContext; | import de.esoco.ewt.*; | [
"de.esoco.ewt"
] | de.esoco.ewt; | 1,202,824 |
public boolean checkIndexExists( String schemaName, String tableName, String[] idx_fields )
throws KettleDatabaseException {
String tablename = databaseMeta.getQuotedSchemaTableCombination( schemaName, tableName );
if ( !checkTableExists( tablename ) ) {
return false;
}
if ( log.isDebug() )... | boolean function( String schemaName, String tableName, String[] idx_fields ) throws KettleDatabaseException { String tablename = databaseMeta.getQuotedSchemaTableCombination( schemaName, tableName ); if ( !checkTableExists( tablename ) ) { return false; } if ( log.isDebug() ) { log.logDebug( STR + tablename + STR + dat... | /**
* Check if an index on certain fields in a table exists.
*
* @param tablename The table on which the index is checked
* @param idx_fields The fields on which the indexe is checked
* @return True if the index exists
*/ | Check if an index on certain fields in a table exists | checkIndexExists | {
"repo_name": "kurtwalker/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/Database.java",
"license": "apache-2.0",
"size": 180922
} | [
"org.pentaho.di.core.exception.KettleDatabaseException"
] | import org.pentaho.di.core.exception.KettleDatabaseException; | import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,655,442 |
private void configureSsl(SocketChannel ch) {
ch.pipeline().addLast(sslCtx.newHandler(ch.alloc()), new Http2OrHttpHandler());
} | void function(SocketChannel ch) { ch.pipeline().addLast(sslCtx.newHandler(ch.alloc()), new Http2OrHttpHandler()); } | /**
* Configure the pipeline for TLS NPN negotiation to HTTP/2.
*/ | Configure the pipeline for TLS NPN negotiation to HTTP/2 | configureSsl | {
"repo_name": "wangcy6/storm_app",
"path": "frame/java/netty-4.1/example/src/main/java/io/netty/example/http2/helloworld/server/Http2ServerInitializer.java",
"license": "apache-2.0",
"size": 5291
} | [
"io.netty.channel.socket.SocketChannel"
] | import io.netty.channel.socket.SocketChannel; | import io.netty.channel.socket.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,060,162 |
synchronized void log(String eventType, Object... params) {
try {
if (logDisabled)
return;
StringBuffer buffer = new StringBuffer();
buffer.append(eventType);
for (Object param: params) {
buffer.append("\t");
buffer.append(param);
}
String message = buff... | synchronized void log(String eventType, Object... params) { try { if (logDisabled) return; StringBuffer buffer = new StringBuffer(); buffer.append(eventType); for (Object param: params) { buffer.append("\t"); buffer.append(param); } String message = buffer.toString(); Logger logger = Logger.getLogger(getClass()); appen... | /**
* Log an event, writing a line in the log file of the form
* <pre>
* DATE EVENT_TYPE PARAM_1 PARAM_2 ...
* </pre>
*/ | Log an event, writing a line in the log file of the form <code> DATE EVENT_TYPE PARAM_1 PARAM_2 ... </code> | log | {
"repo_name": "CodingCat/LongTermFairScheduler",
"path": "src/contrib/creditscheduler/src/java/org/apache/hadoop/mapred/CreditSchedulerEventLog.java",
"license": "apache-2.0",
"size": 4999
} | [
"org.apache.log4j.Logger",
"org.apache.log4j.spi.LoggingEvent"
] | import org.apache.log4j.Logger; import org.apache.log4j.spi.LoggingEvent; | import org.apache.log4j.*; import org.apache.log4j.spi.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 2,818,442 |
public boolean startsWith(String prefix) {
if (prefix == null || prefix.length() == 0)
return true;
TrieNode cur = head;
for (char c : prefix.toCharArray()) {
if (cur.nodes[c - 'a'] == null)
return false;
cur = cur.nodes[c - 'a'];
}
return true;
// return checkAnyChild(cur);
} | boolean function(String prefix) { if (prefix == null prefix.length() == 0) return true; TrieNode cur = head; for (char c : prefix.toCharArray()) { if (cur.nodes[c - 'a'] == null) return false; cur = cur.nodes[c - 'a']; } return true; } | /**
* Returns if there is any word in the trie that starts with the given prefix.
*/ | Returns if there is any word in the trie that starts with the given prefix | startsWith | {
"repo_name": "balajiboggaram/algorithms",
"path": "src/me/learn/personal/month1/Trie.java",
"license": "apache-2.0",
"size": 2193
} | [
"me.learn.utli.TrieNode"
] | import me.learn.utli.TrieNode; | import me.learn.utli.*; | [
"me.learn.utli"
] | me.learn.utli; | 1,840,520 |
@Test
public void testGetNonExistingExecutionVertexWillThrowException() throws Exception {
final JobVertex jobVertex = ExecutionGraphTestUtils.createNoOpVertex(1);
final ExecutionGraph eg = ExecutionGraphTestUtils.createSimpleTestGraph(new JobID(), jobVertex);
final ExecutionGraphToInputsLocationsRetrieverAd... | void function() throws Exception { final JobVertex jobVertex = ExecutionGraphTestUtils.createNoOpVertex(1); final ExecutionGraph eg = ExecutionGraphTestUtils.createSimpleTestGraph(new JobID(), jobVertex); final ExecutionGraphToInputsLocationsRetrieverAdapter inputsLocationsRetriever = new ExecutionGraphToInputsLocation... | /**
* Tests that it will throw exception when getting the task manager location of a non existing execution.
*/ | Tests that it will throw exception when getting the task manager location of a non existing execution | testGetNonExistingExecutionVertexWillThrowException | {
"repo_name": "fhueske/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/ExecutionGraphToInputsLocationsRetrieverAdapterTest.java",
"license": "apache-2.0",
"size": 7097
} | [
"org.apache.flink.api.common.JobID",
"org.apache.flink.runtime.executiongraph.ExecutionGraph",
"org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils",
"org.apache.flink.runtime.jobgraph.JobVertex",
"org.apache.flink.runtime.jobgraph.JobVertexID",
"org.apache.flink.runtime.scheduler.strategy.Exe... | import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.executiongraph.ExecutionGraph; import org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils; import org.apache.flink.runtime.jobgraph.JobVertex; import org.apache.flink.runtime.jobgraph.JobVertexID; import org.apache.flink.runtime.sched... | import org.apache.flink.api.common.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.scheduler.strategy.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 58,939 |
public synchronized void resetChecksum() {
for (Checksum chk : chkDMap.values()) chk.reset();
for (Checksum chk : chkCMap.values()) chk.reset();
} | synchronized void function() { for (Checksum chk : chkDMap.values()) chk.reset(); for (Checksum chk : chkCMap.values()) chk.reset(); } | /**
* Reset all checksums registered for this decompressor instance.
*/ | Reset all checksums registered for this decompressor instance | resetChecksum | {
"repo_name": "omalley/hadoop-gpl-compression",
"path": "src/java/com/hadoop/compression/lzo/LzopCodec.java",
"license": "gpl-3.0",
"size": 17957
} | [
"java.util.zip.Checksum"
] | import java.util.zip.Checksum; | import java.util.zip.*; | [
"java.util"
] | java.util; | 759,963 |
@VisibleForTesting
public static Module testModule(KeyFactory keyFactory, Optional<Module> taskStoreModule) {
return new DbModule(
keyFactory,
taskStoreModule.isPresent() ? taskStoreModule.get() : getTaskStoreModule(keyFactory),
"testdb-" + UUID.randomUUID().toString(),
// A non-... | static Module function(KeyFactory keyFactory, Optional<Module> taskStoreModule) { return new DbModule( keyFactory, taskStoreModule.isPresent() ? taskStoreModule.get() : getTaskStoreModule(keyFactory), STR + UUID.randomUUID().toString(), ImmutableMap.of(STR, "5")); } | /**
* Creates a module that will prepare a private in-memory database, using a specific task store
* implementation bound within the key factory and provided module.
*
* @param keyFactory Key factory to use.
* @param taskStoreModule Module providing task store bindings.
* @return A new database module... | Creates a module that will prepare a private in-memory database, using a specific task store implementation bound within the key factory and provided module | testModule | {
"repo_name": "kidaa/aurora",
"path": "src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java",
"license": "apache-2.0",
"size": 11459
} | [
"com.google.common.base.Optional",
"com.google.common.collect.ImmutableMap",
"com.google.inject.Module",
"com.twitter.common.inject.Bindings",
"java.util.UUID"
] | import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import com.google.inject.Module; import com.twitter.common.inject.Bindings; import java.util.UUID; | import com.google.common.base.*; import com.google.common.collect.*; import com.google.inject.*; import com.twitter.common.inject.*; import java.util.*; | [
"com.google.common",
"com.google.inject",
"com.twitter.common",
"java.util"
] | com.google.common; com.google.inject; com.twitter.common; java.util; | 2,185,619 |
protected TRecurrencePattern copyInto(TRecurrencePattern copyObj, boolean deepcopy) throws TorqueException
{
copyObj.setObjectID(objectID);
copyObj.setRecurrencePeriod(recurrencePeriod);
copyObj.setParam1(param1);
copyObj.setParam2(param2);
copyObj.setParam3(param3);
... | TRecurrencePattern function(TRecurrencePattern copyObj, boolean deepcopy) throws TorqueException { copyObj.setObjectID(objectID); copyObj.setRecurrencePeriod(recurrencePeriod); copyObj.setParam1(param1); copyObj.setParam2(param2); copyObj.setParam3(param3); copyObj.setDays(days); copyObj.setDateIsAbsolute(dateIsAbsolut... | /**
* Fills the copyObj with the contents of this object.
* If deepcopy is true, The associated objects are also copied
* and treated as new objects.
*
* @param copyObj the object to fill.
* @param deepcopy whether the associated objects should be copied.
*/ | Fills the copyObj with the contents of this object. If deepcopy is true, The associated objects are also copied and treated as new objects | copyInto | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTRecurrencePattern.java",
"license": "gpl-3.0",
"size": 50226
} | [
"java.util.List",
"org.apache.torque.TorqueException"
] | import java.util.List; import org.apache.torque.TorqueException; | import java.util.*; import org.apache.torque.*; | [
"java.util",
"org.apache.torque"
] | java.util; org.apache.torque; | 847,506 |
Contact createOrUpdateContact(Contact contact) throws WebServiceException; | Contact createOrUpdateContact(Contact contact) throws WebServiceException; | /**
* Creates a new contact or updates an existing contact. If the dto has a value for UUID, the contact will be
* updated. Otherwise, it will create a new contact with those fields.
*
* @param contact A representation of a Contact
* @return {@link Contact} The body of the response from RapidPr... | Creates a new contact or updates an existing contact. If the dto has a value for UUID, the contact will be updated. Otherwise, it will create a new contact with those fields | createOrUpdateContact | {
"repo_name": "martokarski/modules",
"path": "rapidpro/src/main/java/org/motechproject/rapidpro/webservice/ContactWebService.java",
"license": "bsd-3-clause",
"size": 1592
} | [
"org.motechproject.rapidpro.exception.WebServiceException",
"org.motechproject.rapidpro.webservice.dto.Contact"
] | import org.motechproject.rapidpro.exception.WebServiceException; import org.motechproject.rapidpro.webservice.dto.Contact; | import org.motechproject.rapidpro.exception.*; import org.motechproject.rapidpro.webservice.dto.*; | [
"org.motechproject.rapidpro"
] | org.motechproject.rapidpro; | 2,070,851 |
public List<String> getStringArrayAsList(@NonNull String key) {
throwIfAbsent(stringArrays, key);
return Arrays.asList(stringArrays.get(key));
} | List<String> function(@NonNull String key) { throwIfAbsent(stringArrays, key); return Arrays.asList(stringArrays.get(key)); } | /**
* Helper method for {@link #getStringArray(String)} that returns the value as a list.
*/ | Helper method for <code>#getStringArray(String)</code> that returns the value as a list | getStringArrayAsList | {
"repo_name": "WhisperSystems/TextSecure",
"path": "app/src/main/java/org/thoughtcrime/securesms/jobmanager/Data.java",
"license": "gpl-3.0",
"size": 10900
} | [
"androidx.annotation.NonNull",
"java.util.Arrays",
"java.util.List"
] | import androidx.annotation.NonNull; import java.util.Arrays; import java.util.List; | import androidx.annotation.*; import java.util.*; | [
"androidx.annotation",
"java.util"
] | androidx.annotation; java.util; | 1,597,306 |
protected Icon getIcon( final Object value ) {
return null;
}
| Icon function( final Object value ) { return null; } | /**
* Returns the icon for the specified value.<br>
* This implementation always returns <code>null</code>.
* @param value value whose icon to be returned
* @return the icon for the specified value
*/ | Returns the icon for the specified value. This implementation always returns <code>null</code> | getIcon | {
"repo_name": "icza/sc2gears",
"path": "src/hu/belicza/andras/sc2gears/ui/moduls/replaysearch/searchfieldimpl/ComboBoxSearchField.java",
"license": "apache-2.0",
"size": 5062
} | [
"javax.swing.Icon"
] | import javax.swing.Icon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,450,014 |
public void setValues(Object[] objects) {
values = objects;
sources = new HashMap(values.length * 2 + 1);
if (values.length == 0) {
editValue = null;
} else {
// set the first value object as the entry's value
Object newValue = values[0];
// see if we should convert the value to an editable val... | void function(Object[] objects) { values = objects; sources = new HashMap(values.length * 2 + 1); if (values.length == 0) { editValue = null; } else { Object newValue = values[0]; IPropertySource source = getPropertySource(newValue); if (source != null) { newValue = source.getEditableValue(); } editValue = newValue; } ... | /**
* The <code>PropertySheetEntry</code> implmentation of this method declared
* on<code>IPropertySheetEntry</code> will obtain an editable value for the
* given objects and update the child entries.
* <p>
* Updating the child entries will typically call this method on the child
* entries and thus the enti... | The <code>PropertySheetEntry</code> implmentation of this method declared on<code>IPropertySheetEntry</code> will obtain an editable value for the given objects and update the child entries. Updating the child entries will typically call this method on the child entries and thus the entire entry tree is updated | setValues | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/ui/views/properties/PropertySheetEntry.java",
"license": "epl-1.0",
"size": 21706
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 640,554 |
public boolean checkTableWithoutDuplicates()
{
List<WebElement> elements = getDriver().findElements(By.tagName("table"));
if (elements == null || elements.isEmpty())
{
throw new CheckFailedException("Unable to find any static Compatible table element");
}
for... | boolean function() { List<WebElement> elements = getDriver().findElements(By.tagName("table")); if (elements == null elements.isEmpty()) { throw new CheckFailedException(STR); } for (WebElement element : elements) { Set<String> foundClasses = new HashSet<>(); List<WebElement> rowElements = element.findElements(By.xpath... | /**
* Checks that a sis listed with the given name and technology
*/ | Checks that a sis listed with the given name and technology | checkTableWithoutDuplicates | {
"repo_name": "OndraZizka/windup",
"path": "test-util/src/main/java/org/jboss/windup/testutil/html/TestCompatibleReportUtil.java",
"license": "epl-1.0",
"size": 2360
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.openqa.selenium.By",
"org.openqa.selenium.WebElement"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; | import java.util.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 2,109,795 |
protected CSVPrinter createPrinter(Exchange exchange, OutputStream outputStream) throws IOException {
org.apache.camel.util.ObjectHelper.notNull(exchange, "Exchange");
org.apache.camel.util.ObjectHelper.notNull(outputStream, "Output stream");
return new CSVPrinter(new OutputStreamWriter(outp... | CSVPrinter function(Exchange exchange, OutputStream outputStream) throws IOException { org.apache.camel.util.ObjectHelper.notNull(exchange, STR); org.apache.camel.util.ObjectHelper.notNull(outputStream, STR); return new CSVPrinter(new OutputStreamWriter(outputStream, ExchangeHelper.getCharsetName(exchange)), format); } | /**
* Creates and returns a {@link CSVPrinter}.
*
* @param exchange Exchange (used for access to type conversion). Could NOT be <code>null</code>.
* @param outputStream Output stream of the CSV. Could NOT be <code>null</code>.
* @return a new {@link CSVPrinter}. Never <code>n... | Creates and returns a <code>CSVPrinter</code> | createPrinter | {
"repo_name": "pax95/camel",
"path": "components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvMarshaller.java",
"license": "apache-2.0",
"size": 6336
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"org.apache.camel.Exchange",
"org.apache.camel.support.ExchangeHelper",
"org.apache.camel.support.ObjectHelper",
"org.apache.commons.csv.CSVPrinter"
] | import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import org.apache.camel.Exchange; import org.apache.camel.support.ExchangeHelper; import org.apache.camel.support.ObjectHelper; import org.apache.commons.csv.CSVPrinter; | import java.io.*; import org.apache.camel.*; import org.apache.camel.support.*; import org.apache.commons.csv.*; | [
"java.io",
"org.apache.camel",
"org.apache.commons"
] | java.io; org.apache.camel; org.apache.commons; | 1,064,439 |
public static void writeOutput(String filename, int [][] realClass, int [][] prediction, Attribute inputs[], Attribute output, String relation) {
String text = "";
text += "@relation "+ relation +"\n";
for (int i=0; i<inputs.length; i++) {
text += "@attribute "+ inpu... | static void function(String filename, int [][] realClass, int [][] prediction, Attribute inputs[], Attribute output, String relation) { String text = STR@relation STR\nSTR@attribute STR STR{STR, STR}\nSTRintegerSTRrealSTR [STR, STR]\nSTR@attribute STR STR{STR, STR}\nSTRinteger [STR, STR]\nSTR@data\nSTRSTRSTR STRSTR STR... | /**
* Prints output files.
*
* @param filename Name of output file
* @param realClass Real output of instances
* @param prediction Predicted output for instances
* @param inputs Inputs attributes
* @param output Output attribute
* @param relation String relation
*/ | Prints output files | writeOutput | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/Algorithms/Decision_Trees/C45_Binarization/KNN.java",
"license": "gpl-3.0",
"size": 33129
} | [
"org.core.Files"
] | import org.core.Files; | import org.core.*; | [
"org.core"
] | org.core; | 2,607,375 |
public GiraphClasses setVertexResolverClass(
Class<? extends VertexResolver<I, V, E>> vertexResolverClass) {
this.vertexResolverClass = vertexResolverClass;
return this;
} | GiraphClasses function( Class<? extends VertexResolver<I, V, E>> vertexResolverClass) { this.vertexResolverClass = vertexResolverClass; return this; } | /**
* Set VertexResolver used
*
* @param vertexResolverClass VertexResolver to set
* @return this
*/ | Set VertexResolver used | setVertexResolverClass | {
"repo_name": "KidEinstein/giraph",
"path": "giraph-core/src/main/java/org/apache/giraph/conf/GiraphClasses.java",
"license": "apache-2.0",
"size": 21677
} | [
"org.apache.giraph.graph.VertexResolver"
] | import org.apache.giraph.graph.VertexResolver; | import org.apache.giraph.graph.*; | [
"org.apache.giraph"
] | org.apache.giraph; | 500,754 |
public QueryBuilder postFilter() {
return postQueryBuilder;
} | QueryBuilder function() { return postQueryBuilder; } | /**
* Gets the post filter for this request
*/ | Gets the post filter for this request | postFilter | {
"repo_name": "jimczi/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 58393
} | [
"org.elasticsearch.index.query.QueryBuilder"
] | import org.elasticsearch.index.query.QueryBuilder; | import org.elasticsearch.index.query.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 2,654,848 |
protected void setStagingFileGroup()
throws IOException {
Preconditions.checkArgument(this.fs.exists(this.stagingFile),
String.format("Staging output file %s does not exist", this.stagingFile));
if (this.group.isPresent()) {
HadoopUtils.setGroup(this.fs, this.stagingFile, this.group.get())... | void function() throws IOException { Preconditions.checkArgument(this.fs.exists(this.stagingFile), String.format(STR, this.stagingFile)); if (this.group.isPresent()) { HadoopUtils.setGroup(this.fs, this.stagingFile, this.group.get()); } } | /**
* Set the group name of the staging output file.
*
* @throws IOException if it fails to set the group name
*/ | Set the group name of the staging output file | setStagingFileGroup | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-core/src/main/java/org/apache/gobblin/writer/FsDataWriter.java",
"license": "apache-2.0",
"size": 14504
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"org.apache.gobblin.util.HadoopUtils"
] | import com.google.common.base.Preconditions; import java.io.IOException; import org.apache.gobblin.util.HadoopUtils; | import com.google.common.base.*; import java.io.*; import org.apache.gobblin.util.*; | [
"com.google.common",
"java.io",
"org.apache.gobblin"
] | com.google.common; java.io; org.apache.gobblin; | 481,315 |
int w = viewCam.getWidth();
int h = viewCam.getHeight();
points[0].set(viewCam.getWorldCoordinates(new Vector2f(0, 0), 0));
points[1].set(viewCam.getWorldCoordinates(new Vector2f(0, h), 0));
points[2].set(viewCam.getWorldCoordinates(new Vector2f(w, h), 0));
points[3].set(v... | int w = viewCam.getWidth(); int h = viewCam.getHeight(); points[0].set(viewCam.getWorldCoordinates(new Vector2f(0, 0), 0)); points[1].set(viewCam.getWorldCoordinates(new Vector2f(0, h), 0)); points[2].set(viewCam.getWorldCoordinates(new Vector2f(w, h), 0)); points[3].set(viewCam.getWorldCoordinates(new Vector2f(w, 0), ... | /**
* Updates a points arrays with the frustum corners of the provided camera.
*
* @param viewCam
* @param points
*/ | Updates a points arrays with the frustum corners of the provided camera | updateFrustumPoints2 | {
"repo_name": "atomixnmc/jmonkeyengine",
"path": "jme3-core/src/main/java/com/jme3/shadow/ShadowUtil.java",
"license": "bsd-3-clause",
"size": 32004
} | [
"com.jme3.math.Vector2f"
] | import com.jme3.math.Vector2f; | import com.jme3.math.*; | [
"com.jme3.math"
] | com.jme3.math; | 1,816,003 |
private HashMap<InetAddress, Long> pingNode(Node node, NodeSet nodes) {
try {
logger.debug("Launching ping process on node " + node.getNodeInformation().getURL());
long timeStamp = System.currentTimeMillis();
Pinger pinger = PAActiveObject.newActive(pingerClass, null, n... | HashMap<InetAddress, Long> function(Node node, NodeSet nodes) { try { logger.debug(STR + node.getNodeInformation().getURL()); long timeStamp = System.currentTimeMillis(); Pinger pinger = PAActiveObject.newActive(pingerClass, null, node); HashMap<InetAddress, Long> result = pinger.ping(nodes); PAFuture.waitFor(result); ... | /**
* Launches the pinging process from new host. It will ping all other hosts
* according to the pinger logic.
*/ | Launches the pinging process from new host. It will ping all other hosts according to the pinger logic | pingNode | {
"repo_name": "marcocast/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/selection/topology/TopologyManager.java",
"license": "agpl-3.0",
"size": 29862
} | [
"java.net.InetAddress",
"java.util.HashMap",
"org.objectweb.proactive.ActiveObjectCreationException",
"org.objectweb.proactive.api.PAActiveObject",
"org.objectweb.proactive.api.PAFuture",
"org.objectweb.proactive.core.node.Node",
"org.objectweb.proactive.core.node.NodeException",
"org.ow2.proactive.re... | import java.net.InetAddress; import java.util.HashMap; import org.objectweb.proactive.ActiveObjectCreationException; import org.objectweb.proactive.api.PAActiveObject; import org.objectweb.proactive.api.PAFuture; import org.objectweb.proactive.core.node.Node; import org.objectweb.proactive.core.node.NodeException; impo... | import java.net.*; import java.util.*; import org.objectweb.proactive.*; import org.objectweb.proactive.api.*; import org.objectweb.proactive.core.node.*; import org.ow2.proactive.resourcemanager.frontend.topology.pinging.*; import org.ow2.proactive.utils.*; | [
"java.net",
"java.util",
"org.objectweb.proactive",
"org.ow2.proactive"
] | java.net; java.util; org.objectweb.proactive; org.ow2.proactive; | 777,987 |
public void setDestination(Destination dest)
{
this.dest = dest;
} | void function(Destination dest) { this.dest = dest; } | /**
* Sets the destination attribute of the MediaDescriptionImpl object
*
* @param dest The new destination value
*/ | Sets the destination attribute of the MediaDescriptionImpl object | setDestination | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4JBOSS_2_5_3/src/java/org/dcm4cheri/auditlog/MediaDescriptionImpl.java",
"license": "apache-2.0",
"size": 4702
} | [
"org.dcm4che.auditlog.Destination"
] | import org.dcm4che.auditlog.Destination; | import org.dcm4che.auditlog.*; | [
"org.dcm4che.auditlog"
] | org.dcm4che.auditlog; | 2,694,003 |
@Test
public void getIndex()
{
final TreeNode root = createTree();
{
final int i = 0;
final TreeNode child = root.getChildAt(i);
assertThat(child.getName(), is("node1_1"));
assertThat(root.getIndex(child), is(i));
}
{
... | void function() { final TreeNode root = createTree(); { final int i = 0; final TreeNode child = root.getChildAt(i); assertThat(child.getName(), is(STR)); assertThat(root.getIndex(child), is(i)); } { final int i = 1; final TreeNode child = root.getChildAt(i); assertThat(child.getName(), is(STR)); assertThat(root.getInde... | /**
* Test the <code>getIndex()</code> method.
*/ | Test the <code>getIndex()</code> method | getIndex | {
"repo_name": "jmthompson2015/vizzini",
"path": "game/illyriad/src/test/java/org/vizzini/illyriad/robot/market/MarketDataTreeNodeTest.java",
"license": "mit",
"size": 10561
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,085,629 |
public void test_owlSameAs3() throws Exception {
AbstractTripleStore store = getStore();
try {
URI A = new URIImpl("http://www.foo.org/A");
URI Z = new URIImpl("http://www.foo.org/Z");
URI X = new URIImpl("http://www.foo.org/X");
URI Y = new URIImpl... | void function() throws Exception { AbstractTripleStore store = getStore(); try { URI A = new URIImpl(STRhttp: URI X = new URIImpl(STRhttp: { IStatementBuffer buffer = new StatementBuffer(store, 100); buffer.add(X, OWL.SAMEAS, Y); buffer.add(Z, A, X); buffer.flush(); } assertTrue(store.hasStatement(X, OWL.SAMEAS, Y)); a... | /**
* Test where the data satisifies the rule exactly once.
* <p>
* Note: This also verifies that we correctly filter out entailments where
* <code>a == owl:sameAs</code>.
*
* <pre>
* owl:sameAs3: (x owl:sameAs y), (z a x) -> (z a y).
* </pre>
* @throws Exception
*... | Test where the data satisifies the rule exactly once. Note: This also verifies that we correctly filter out entailments where <code>a == owl:sameAs</code>. <code> owl:sameAs3: (x owl:sameAs y), (z a x) -> (z a y). </code> | test_owlSameAs3 | {
"repo_name": "blazegraph/database",
"path": "bigdata-rdf-test/src/test/java/com/bigdata/rdf/rules/TestRuleOwlSameAs.java",
"license": "gpl-2.0",
"size": 9251
} | [
"com.bigdata.rdf.rio.IStatementBuffer",
"com.bigdata.rdf.rio.StatementBuffer",
"com.bigdata.rdf.store.AbstractTripleStore",
"com.bigdata.rdf.vocab.Vocabulary",
"com.bigdata.relation.rule.Rule",
"org.openrdf.model.impl.URIImpl"
] | import com.bigdata.rdf.rio.IStatementBuffer; import com.bigdata.rdf.rio.StatementBuffer; import com.bigdata.rdf.store.AbstractTripleStore; import com.bigdata.rdf.vocab.Vocabulary; import com.bigdata.relation.rule.Rule; import org.openrdf.model.impl.URIImpl; | import com.bigdata.rdf.rio.*; import com.bigdata.rdf.store.*; import com.bigdata.rdf.vocab.*; import com.bigdata.relation.rule.*; import org.openrdf.model.impl.*; | [
"com.bigdata.rdf",
"com.bigdata.relation",
"org.openrdf.model"
] | com.bigdata.rdf; com.bigdata.relation; org.openrdf.model; | 1,883,963 |
private void addDefinitionParameters(NabuccoQuery<TaskItem> query, WorkflowDefinitionSearchParameter wdsp)
throws PersistenceException {
query.setParameter(WorkflowDefinitionSearchParameter.DEFINITION, wdsp.getDefinition());
this.addStateParameter(query, wdsp);
} | void function(NabuccoQuery<TaskItem> query, WorkflowDefinitionSearchParameter wdsp) throws PersistenceException { query.setParameter(WorkflowDefinitionSearchParameter.DEFINITION, wdsp.getDefinition()); this.addStateParameter(query, wdsp); } | /**
* Add the workflow definition search parameters to the query.
*
* @param query
* the query to add the parameters
* @param param
* the workflow definition search parameter
*
* @throws PersistenceException
* when the parameters cannot be... | Add the workflow definition search parameters to the query | addDefinitionParameters | {
"repo_name": "NABUCCO/org.nabucco.framework.workflow",
"path": "org.nabucco.framework.workflow.impl.service/src/main/man/org/nabucco/framework/workflow/impl/service/datatype/search/SearchTasksServiceHandlerImpl.java",
"license": "epl-1.0",
"size": 12089
} | [
"org.nabucco.framework.base.facade.exception.persistence.PersistenceException",
"org.nabucco.framework.base.impl.service.maintain.NabuccoQuery",
"org.nabucco.framework.workflow.facade.datatype.definition.search.WorkflowDefinitionSearchParameter",
"org.nabucco.framework.workflow.facade.datatype.task.TaskItem"
... | import org.nabucco.framework.base.facade.exception.persistence.PersistenceException; import org.nabucco.framework.base.impl.service.maintain.NabuccoQuery; import org.nabucco.framework.workflow.facade.datatype.definition.search.WorkflowDefinitionSearchParameter; import org.nabucco.framework.workflow.facade.datatype.task... | import org.nabucco.framework.base.facade.exception.persistence.*; import org.nabucco.framework.base.impl.service.maintain.*; import org.nabucco.framework.workflow.facade.datatype.definition.search.*; import org.nabucco.framework.workflow.facade.datatype.task.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,147,376 |
public View getHeaderView(RecyclerView parent, int position) {
return mHeaderProvider.getHeader(parent, position);
} | View function(RecyclerView parent, int position) { return mHeaderProvider.getHeader(parent, position); } | /**
* Gets the header view for the associated position. If it doesn't exist yet, it will be
* created, measured, and laid out.
*
* @param parent
* @param position
* @return Header view
*/ | Gets the header view for the associated position. If it doesn't exist yet, it will be created, measured, and laid out | getHeaderView | {
"repo_name": "my519820363/sticky-headers-recyclerview",
"path": "library/src/main/java/com/timehop/stickyheadersrecyclerview/StickyRecyclerHeadersDecoration.java",
"license": "apache-2.0",
"size": 6197
} | [
"android.support.v7.widget.RecyclerView",
"android.view.View"
] | import android.support.v7.widget.RecyclerView; import android.view.View; | import android.support.v7.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,112,277 |
Optional<T> find(final RegistryHolder... holders);
interface Factory { | Optional<T> find(final RegistryHolder... holders); interface Factory { | /**
* Gets the value from the {@link RegistryHolder holders}.
*
* <p>Behavior wise, the first holder that has a type of {@link Registry registry} within
* will be queried for this reference. If the registry is present, no additional holders will be
* queried.</p>
*
* @param holders Th... | Gets the value from the <code>RegistryHolder holders</code>. Behavior wise, the first holder that has a type of <code>Registry registry</code> within will be queried for this reference. If the registry is present, no additional holders will be queried | find | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/registry/RegistryReference.java",
"license": "mit",
"size": 3310
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,642,780 |
@Override
public Void sum(final IGASState<BFS.VS, BFS.ES, Void> state,
final Void left, final Void right) {
throw new UnsupportedOperationException();
} | Void function(final IGASState<BFS.VS, BFS.ES, Void> state, final Void left, final Void right) { throw new UnsupportedOperationException(); } | /**
* Not used.
*/ | Not used | sum | {
"repo_name": "blazegraph/database",
"path": "bigdata-gas/src/main/java/com/bigdata/rdf/graph/analytics/BFS.java",
"license": "gpl-2.0",
"size": 14417
} | [
"com.bigdata.rdf.graph.IGASState"
] | import com.bigdata.rdf.graph.IGASState; | import com.bigdata.rdf.graph.*; | [
"com.bigdata.rdf"
] | com.bigdata.rdf; | 117,797 |
public SearchRequestBuilder setSource(BytesReference source) {
request.source(source, false);
return this;
} | SearchRequestBuilder function(BytesReference source) { request.source(source, false); return this; } | /**
* Sets the source of the request as a json string. Note, settings anything other
* than the search type will cause this source to be overridden, consider using
* {@link #setExtraSource(BytesReference)}.
*/ | Sets the source of the request as a json string. Note, settings anything other than the search type will cause this source to be overridden, consider using <code>#setExtraSource(BytesReference)</code> | setSource | {
"repo_name": "zuoyebushiwo/elasticsearch-1.5.0",
"path": "src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java",
"license": "apache-2.0",
"size": 38769
} | [
"org.elasticsearch.common.bytes.BytesReference"
] | import org.elasticsearch.common.bytes.BytesReference; | import org.elasticsearch.common.bytes.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,300,223 |
private void sendAsyncRequest(EndpointReference epr, MessageContext msgContext) throws AxisFault {
try {
URL url = new URL(epr.getAddress());
String scheme = url.getProtocol() != null ? url.getProtocol() : "http";
String hostname = url.getHost();
int port = ur... | void function(EndpointReference epr, MessageContext msgContext) throws AxisFault { try { URL url = new URL(epr.getAddress()); String scheme = url.getProtocol() != null ? url.getProtocol() : "http"; String hostname = url.getHost(); int port = url.getPort(); if (port == -1) { if ("http".equals(scheme)) { port = 80; } els... | /**
* Send the request message asynchronously to the given EPR
* @param epr the destination EPR for the message
* @param msgContext the message being sent
* @throws AxisFault on error
*/ | Send the request message asynchronously to the given EPR | sendAsyncRequest | {
"repo_name": "susinda/carbon-apimgt",
"path": "dependencies/synapse/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/HttpCoreNIOSender.java",
"license": "apache-2.0",
"size": 38083
} | [
"java.net.InetSocketAddress",
"java.net.MalformedURLException",
"org.apache.axis2.AxisFault",
"org.apache.axis2.addressing.EndpointReference",
"org.apache.axis2.context.MessageContext",
"org.apache.http.ConnectionClosedException",
"org.apache.http.HttpHost",
"org.apache.http.conn.routing.HttpRoute",
... | import java.net.InetSocketAddress; import java.net.MalformedURLException; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.MessageContext; import org.apache.http.ConnectionClosedException; import org.apache.http.HttpHost; import org.apache.http.con... | import java.net.*; import org.apache.axis2.*; import org.apache.axis2.addressing.*; import org.apache.axis2.context.*; import org.apache.http.*; import org.apache.http.conn.routing.*; import org.apache.http.nio.*; import org.apache.synapse.transport.nhttp.debug.*; | [
"java.net",
"org.apache.axis2",
"org.apache.http",
"org.apache.synapse"
] | java.net; org.apache.axis2; org.apache.http; org.apache.synapse; | 795,273 |
public void doRollback(@NotNull GridNearTxLocal tx) throws IgniteCheckedException {
try {
tx.rollback();
}
finally {
closeTx(tx);
}
} | void function(@NotNull GridNearTxLocal tx) throws IgniteCheckedException { try { tx.rollback(); } finally { closeTx(tx); } } | /**
* Rollback and properly close transaction.
* @param tx Transaction.
* @throws IgniteCheckedException if failed.
*/ | Rollback and properly close transaction | doRollback | {
"repo_name": "ptupitsyn/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/CommandProcessor.java",
"license": "apache-2.0",
"size": 37612
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal",
"org.jetbrains.annotations.NotNull"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; import org.jetbrains.annotations.NotNull; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 339,378 |
public static void zipAndEncryptAll(File inZipFile, File outFile, String password, AESEncrypter encrypter) throws IOException {
AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter);
try {
enc.addAll(inZipFile, password);
} finally {
enc.close();
}
}
| static void function(File inZipFile, File outFile, String password, AESEncrypter encrypter) throws IOException { AesZipFileEncrypter enc = new AesZipFileEncrypter(outFile,encrypter); try { enc.addAll(inZipFile, password); } finally { enc.close(); } } | /**
* Encrypt all files from an existing zip to one new "zipOutFile" using "password".
*/ | Encrypt all files from an existing zip to one new "zipOutFile" using "password" | zipAndEncryptAll | {
"repo_name": "Git-tl/appcan-plugin-zip-android",
"path": "uexZip/src/org/zywx/wbpalmstar/plugin/uexzip/de/idyl/winzipaes/AesZipFileEncrypter.java",
"license": "lgpl-3.0",
"size": 10303
} | [
"java.io.File",
"java.io.IOException",
"org.zywx.wbpalmstar.plugin.uexzip.de.idyl.winzipaes.impl.AESEncrypter"
] | import java.io.File; import java.io.IOException; import org.zywx.wbpalmstar.plugin.uexzip.de.idyl.winzipaes.impl.AESEncrypter; | import java.io.*; import org.zywx.wbpalmstar.plugin.uexzip.de.idyl.winzipaes.impl.*; | [
"java.io",
"org.zywx.wbpalmstar"
] | java.io; org.zywx.wbpalmstar; | 135,935 |
@Override
public void addChangeListener(ChangeListener pChangeListener) {
mChangeListeners.add(pChangeListener);
} | void function(ChangeListener pChangeListener) { mChangeListeners.add(pChangeListener); } | /**
* Adds a change listener, that will be notified when the text in the text
* field is changed. The ChangeEvent that will be passed to registered
* listeners will contain this object as the source, allowing the new text
* to be extracted using the {@link #getText() getText} method.
*
* @... | Adds a change listener, that will be notified when the text in the text field is changed. The ChangeEvent that will be passed to registered listeners will contain this object as the source, allowing the new text to be extracted using the <code>#getText() getText</code> method | addChangeListener | {
"repo_name": "apache/jmeter",
"path": "src/jorphan/src/main/java/org/apache/jorphan/gui/JLabeledTextArea.java",
"license": "apache-2.0",
"size": 8046
} | [
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 989,562 |
void clearNodeSelection(String componentName) throws QTasteException; | void clearNodeSelection(String componentName) throws QTasteException; | /**
* Clear the JTree selection.
*
* @param componentName an identifier of the JTree component.
* @throws QTasteException
*/ | Clear the JTree selection | clearNodeSelection | {
"repo_name": "qspin/qtaste",
"path": "plugins_src/javagui/src/main/java/com/qspin/qtaste/javagui/JavaGUI.java",
"license": "lgpl-3.0",
"size": 21383
} | [
"com.qspin.qtaste.testsuite.QTasteException"
] | import com.qspin.qtaste.testsuite.QTasteException; | import com.qspin.qtaste.testsuite.*; | [
"com.qspin.qtaste"
] | com.qspin.qtaste; | 99,300 |
EList<MCommonPackageVersionedItem> getVersionedItems(); | EList<MCommonPackageVersionedItem> getVersionedItems(); | /**
* Returns the list of versions of the same item installed in the library.
* @return the list of versions of the same item installed in the library.
* @see es.uah.aut.srg.micobs.common.commonPackage#getMCommonPackageItem_VersionedItems()
* @model containment="true"
* @generated
*/ | Returns the list of versions of the same item installed in the library | getVersionedItems | {
"repo_name": "parraman/micobs",
"path": "common/es.uah.aut.srg.micobs/src/es/uah/aut/srg/micobs/common/MCommonPackageItem.java",
"license": "epl-1.0",
"size": 2141
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,235,743 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.