method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
cleanup();
} | void function(ChannelHandlerContext ctx) throws Exception { cleanup(); } | /**
* Releases the {@code clientPrefaceString}. Any active streams will be left in the open.
*/ | Releases the clientPrefaceString. Any active streams will be left in the open | handlerRemoved | {
"repo_name": "mx657649013/netty",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java",
"license": "apache-2.0",
"size": 32271
} | [
"io.netty.channel.ChannelHandlerContext"
] | import io.netty.channel.ChannelHandlerContext; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 2,884,097 |
//------------------------- AUTOGENERATED START -------------------------
///CLOVER:OFF
public static NoMatchingRuleId.Meta meta() {
return NoMatchingRuleId.Meta.INSTANCE;
}
static {
JodaBeanUtils.registerMetaBean(NoMatchingRuleId.Meta.INSTANCE);
}
private static final long serialVersionUID ... | static NoMatchingRuleId.Meta function() { return NoMatchingRuleId.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(NoMatchingRuleId.Meta.INSTANCE); } private static final long serialVersionUID = 1L; private NoMatchingRuleId( MarketDataKey<?> key) { JodaBeanUtils.notNull(key, "key"); this.key = key; } | /**
* The meta-bean for {@code NoMatchingRuleId}.
* @return the meta-bean, not null
*/ | The meta-bean for NoMatchingRuleId | meta | {
"repo_name": "nssales/Strata",
"path": "modules/engine/src/main/java/com/opengamma/strata/engine/calculation/NoMatchingRuleId.java",
"license": "apache-2.0",
"size": 8484
} | [
"com.opengamma.strata.basics.market.MarketDataKey",
"org.joda.beans.JodaBeanUtils"
] | import com.opengamma.strata.basics.market.MarketDataKey; import org.joda.beans.JodaBeanUtils; | import com.opengamma.strata.basics.market.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 99,501 |
private void addCORSOriginsToCache(CORSOrigin[] corsOrigins, int applicationId, int tenantId) {
CORSOriginByAppIdCacheKey cacheKey = new CORSOriginByAppIdCacheKey(applicationId);
CORSOriginByAppIdCacheEntry cacheEntry = new CORSOriginByAppIdCacheEntry(corsOrigins);
if (log.isDebugEnabled())... | void function(CORSOrigin[] corsOrigins, int applicationId, int tenantId) { CORSOriginByAppIdCacheKey cacheKey = new CORSOriginByAppIdCacheKey(applicationId); CORSOriginByAppIdCacheEntry cacheEntry = new CORSOriginByAppIdCacheEntry(corsOrigins); if (log.isDebugEnabled()) { log.debug(STR + applicationId + STR + tenantId)... | /**
* Add CORS origins of a particular application to the CORSOriginByAppId cache.
*
* @param corsOrigins The origins that should be added to the cache.
* @param applicationId The id of the application.
* @param tenantId The tenant domain specific to the cache entry.
*/ | Add CORS origins of a particular application to the CORSOriginByAppId cache | addCORSOriginsToCache | {
"repo_name": "omindu/carbon-identity-framework",
"path": "components/cors-mgt/org.wso2.carbon.identity.cors.mgt.core/src/main/java/org/wso2/carbon/identity/cors/mgt/core/dao/impl/CacheBackedCORSOriginDAO.java",
"license": "apache-2.0",
"size": 9413
} | [
"org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCache",
"org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCacheEntry",
"org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCacheKey",
"org.wso2.carbon.identity.cors.mgt.core.model.CORSOrigin"
] | import org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCache; import org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCacheEntry; import org.wso2.carbon.identity.cors.mgt.core.internal.cache.CORSOriginByAppIdCacheKey; import org.wso2.carbon.identity.cors.mgt.core.model.CORSO... | import org.wso2.carbon.identity.cors.mgt.core.internal.cache.*; import org.wso2.carbon.identity.cors.mgt.core.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,600,702 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
} | void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.edit/src/org/obeonetwork/dsl/east_adl/structure/platform_model/provider/MWCompositeSoftwareFunctionItemProvider.java",
"license": "epl-1.0",
"size": 3997
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 861,425 |
public int createApplication(ServiceProvider serviceProvider)
throws IdentityApplicationManagementException {
applicationMgtService = ApplicationManagementService.getInstance();
return applicationMgtService.createApplication(serviceProvider, getTenantDomain(), getUsername());
} | int function(ServiceProvider serviceProvider) throws IdentityApplicationManagementException { applicationMgtService = ApplicationManagementService.getInstance(); return applicationMgtService.createApplication(serviceProvider, getTenantDomain(), getUsername()); } | /**
* Creates a service provider with basic information.First we need to create
* a role with the
* application name. Only the users in this role will be able to edit/update
* the application.The
* user will assigned to the created role.Internal roles used.
*
* @param serviceProvider ... | Creates a service provider with basic information.First we need to create a role with the application name. Only the users in this role will be able to edit/update the application.The user will assigned to the created role.Internal roles used | createApplication | {
"repo_name": "laki88/carbon-identity",
"path": "components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementAdminService.java",
"license": "apache-2.0",
"size": 8512
} | [
"org.wso2.carbon.identity.application.common.IdentityApplicationManagementException",
"org.wso2.carbon.identity.application.common.model.ServiceProvider"
] | import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; import org.wso2.carbon.identity.application.common.model.ServiceProvider; | import org.wso2.carbon.identity.application.common.*; import org.wso2.carbon.identity.application.common.model.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,506,490 |
return sendAsync(HttpMethod.POST, body);
} | return sendAsync(HttpMethod.POST, body); } | /**
* Invokes the method and returns a future with the result
* @return a future with the result
*/ | Invokes the method and returns a future with the result | postAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsLenbRequest.java",
"license": "mit",
"size": 2956
} | [
"com.microsoft.graph.http.HttpMethod"
] | import com.microsoft.graph.http.HttpMethod; | import com.microsoft.graph.http.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,848,643 |
public String getNetworkCountryIso() {
return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY);
}
public static final int NETWORK_TYPE_UNKNOWN = 0;
public static final int NETWORK_TYPE_GPRS = 1;
public static final int NETWORK_TYPE_EDGE = 2;
pu... | String function() { return SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY); } public static final int NETWORK_TYPE_UNKNOWN = 0; public static final int NETWORK_TYPE_GPRS = 1; public static final int NETWORK_TYPE_EDGE = 2; public static final int NETWORK_TYPE_UMTS = 3; public static final int NET... | /**
* Returns the ISO country code equivalent of the current registered
* operator's MCC (Mobile Country Code).
* <p>
* Availability: Only when user is registered to a network. Result may be
* unreliable on CDMA networks (use {@link #getPhoneType()} to determine if
* on a CDMA network).
... | Returns the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code). Availability: Only when user is registered to a network. Result may be unreliable on CDMA networks (use <code>#getPhoneType()</code> to determine if on a CDMA network) | getNetworkCountryIso | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/telephony/java/android/telephony/TelephonyManager.java",
"license": "gpl-3.0",
"size": 38219
} | [
"android.os.SystemProperties",
"com.android.internal.telephony.TelephonyProperties"
] | import android.os.SystemProperties; import com.android.internal.telephony.TelephonyProperties; | import android.os.*; import com.android.internal.telephony.*; | [
"android.os",
"com.android.internal"
] | android.os; com.android.internal; | 1,674,928 |
List<AwardSyncLog> getLogsFromSaveErrors(AwardSyncStatus awardStatus); | List<AwardSyncLog> getLogsFromSaveErrors(AwardSyncStatus awardStatus); | /**
*
* Parse the message map and grab error messages out expanding the error key for the status
* message.
* @param awardStatus
* @return
*/ | Parse the message map and grab error messages out expanding the error key for the status message | getLogsFromSaveErrors | {
"repo_name": "sanjupolus/KC6.oLatest",
"path": "coeus-impl/src/main/java/org/kuali/kra/award/awardhierarchy/sync/service/AwardSyncUtilityService.java",
"license": "agpl-3.0",
"size": 3308
} | [
"java.util.List",
"org.kuali.kra.award.awardhierarchy.sync.AwardSyncLog",
"org.kuali.kra.award.awardhierarchy.sync.AwardSyncStatus"
] | import java.util.List; import org.kuali.kra.award.awardhierarchy.sync.AwardSyncLog; import org.kuali.kra.award.awardhierarchy.sync.AwardSyncStatus; | import java.util.*; import org.kuali.kra.award.awardhierarchy.sync.*; | [
"java.util",
"org.kuali.kra"
] | java.util; org.kuali.kra; | 1,881,976 |
@Override
protected int[] doFindColumns(SpreadSheet data) {
TIntArrayList result;
int i;
result = new TIntArrayList();
i = 0;
while (i < data.getColumnCount()) {
result.add(i);
i += m_NthColumn;
}
return result.toArray();
} | int[] function(SpreadSheet data) { TIntArrayList result; int i; result = new TIntArrayList(); i = 0; while (i < data.getColumnCount()) { result.add(i); i += m_NthColumn; } return result.toArray(); } | /**
* Returns the columns of interest in the spreadsheet.
*
* @param data the spreadsheet to inspect
* @return the columns of interest
*/ | Returns the columns of interest in the spreadsheet | doFindColumns | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-spreadsheet/src/main/java/adams/data/spreadsheet/columnfinder/DownSample.java",
"license": "gpl-3.0",
"size": 3053
} | [
"gnu.trove.list.array.TIntArrayList"
] | import gnu.trove.list.array.TIntArrayList; | import gnu.trove.list.array.*; | [
"gnu.trove.list"
] | gnu.trove.list; | 1,661,217 |
public void addUndoableEdit(UndoableEdit edit) {
}
// protected members
protected TokenMarker tokenMarker; | void function(UndoableEdit edit) { } protected TokenMarker tokenMarker; | /**
* Adds an undoable edit to this document's undo list. The edit should be ignored if something is currently being undone.
*
* @param edit
* The undoable edit
*
* @since jEdit 2.2pre1
*/ | Adds an undoable edit to this document's undo list. The edit should be ignored if something is currently being undone | addUndoableEdit | {
"repo_name": "openflexo-team/gina",
"path": "flexographicutils/src/main/java/org/openflexo/jedit/SyntaxDocument.java",
"license": "gpl-3.0",
"size": 5114
} | [
"javax.swing.undo.UndoableEdit"
] | import javax.swing.undo.UndoableEdit; | import javax.swing.undo.*; | [
"javax.swing"
] | javax.swing; | 2,196,034 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
request.setCharacterEncoding("UTF-8");
String name = request.getParameter("name");
try (Pri... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); request.setCharacterEncoding("UTF-8"); String name = request.getParameter("name"); try (PrintWriter out = response.getWriter()) { Connection conn = null; PreparedStatement ps = nu... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "chechiachang/blue-villa",
"path": "src/main/java/com/ccc/bm/action/CheckUserNameAction.java",
"license": "mit",
"size": 4632
} | [
"com.ccc.bm.entity.JdbcConn",
"java.io.IOException",
"java.io.PrintWriter",
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http... | import com.ccc.bm.entity.JdbcConn; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRe... | import com.ccc.bm.entity.*; import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import org.json.*; | [
"com.ccc.bm",
"java.io",
"java.sql",
"javax.servlet",
"org.json"
] | com.ccc.bm; java.io; java.sql; javax.servlet; org.json; | 2,327,094 |
@Test
public void testInMemoryConnection() throws Exception {
String serverUri = SSL_ENABLED_P4D_SERVER + "?socketPoolSize=10&testKey1=testVal1";
server = ServerFactory.getOptionsServer(serverUri, serverProps);
assertNotNull(server);
// Register callback
server.registerC... | void function() throws Exception { String serverUri = SSL_ENABLED_P4D_SERVER + STR; server = ServerFactory.getOptionsServer(serverUri, serverProps); assertNotNull(server); server.registerCallback(createCommandCallback()); try { server.addTrust(new TrustOptions().setAutoAccept(true)); server.connect(); } catch (P4JavaEx... | /**
* Test in-memory fingerprints - connecting to the server.
*/ | Test in-memory fingerprints - connecting to the server | testInMemoryConnection | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/r18-1/src/test/java/com/perforce/p4java/tests/dev/unit/features123/InMemoryFingerprintsTest.java",
"license": "apache-2.0",
"size": 9268
} | [
"com.perforce.p4java.exception.P4JavaException",
"com.perforce.p4java.exception.TrustException",
"com.perforce.p4java.option.server.LoginOptions",
"com.perforce.p4java.option.server.TrustOptions",
"com.perforce.p4java.server.IServerInfo",
"com.perforce.p4java.server.ServerFactory",
"org.junit.Assert"
] | import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.exception.TrustException; import com.perforce.p4java.option.server.LoginOptions; import com.perforce.p4java.option.server.TrustOptions; import com.perforce.p4java.server.IServerInfo; import com.perforce.p4java.server.ServerFactory; import ... | import com.perforce.p4java.exception.*; import com.perforce.p4java.option.server.*; import com.perforce.p4java.server.*; import org.junit.*; | [
"com.perforce.p4java",
"org.junit"
] | com.perforce.p4java; org.junit; | 858,030 |
private Value wrap(Object val, int type) {
try {
return H2Utils.wrap(desc.indexing().objectContext(), val, type);
}
catch (IgniteCheckedException e) {
throw new IgniteException("Failed to wrap object into H2 Value.", e);
}
} | Value function(Object val, int type) { try { return H2Utils.wrap(desc.indexing().objectContext(), val, type); } catch (IgniteCheckedException e) { throw new IgniteException(STR, e); } } | /**
* Wrap the given object into H2 value.
*
* @param val Value.
* @param type Type.
* @return wrapped value.
*/ | Wrap the given object into H2 value | wrap | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/H2CacheRow.java",
"license": "apache-2.0",
"size": 8855
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.IgniteException",
"org.apache.ignite.internal.processors.query.h2.H2Utils",
"org.h2.value.Value"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.internal.processors.query.h2.H2Utils; import org.h2.value.Value; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.query.h2.*; import org.h2.value.*; | [
"org.apache.ignite",
"org.h2.value"
] | org.apache.ignite; org.h2.value; | 188,750 |
public CRLInfo retrieveInfo(InputStream s) throws IOException {
if (!s.markSupported()) {
throw new IllegalArgumentException("The InputStream MUST support mark/reset methods !");
}
CRLInfo infos = new CRLInfo();
// Skip CertificateList Sequence info
consumeTagIntro(s);
// Read TBSCertList Sequence... | CRLInfo function(InputStream s) throws IOException { if (!s.markSupported()) { throw new IllegalArgumentException(STR); } CRLInfo infos = new CRLInfo(); consumeTagIntro(s); consumeTagIntro(s); int tag = DERUtil.readTag(s); int tagNo = DERUtil.readTagNumber(s, tag); int length = DERUtil.readLength(s); if (tagNo == BERTa... | /**
* This method allows to retrieve common CRL informations (thisUpdate, nextUpdate, signatureAlgorithm,
* signatureValue, extensions,...). It voluntary doesn't parse the revokedCertificates sequence.
*
* @param s
* an instance of InputStream with the CRL. The InputStream MUST support mark()/rese... | This method allows to retrieve common CRL informations (thisUpdate, nextUpdate, signatureAlgorithm, signatureValue, extensions,...). It voluntary doesn't parse the revokedCertificates sequence | retrieveInfo | {
"repo_name": "zsoltii/dss",
"path": "dss-crl-parser-stream/src/main/java/eu/europa/esig/dss/crl/CRLParser.java",
"license": "lgpl-2.1",
"size": 13638
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.security.auth.x500.X500Principal",
"org.bouncycastle.asn1.ASN1ObjectIdentifier",
"org.bouncycastle.asn1.ASN1Sequence",
"org.bouncycastle.asn1.BERTags",
"org.bouncycastle.asn1.x509.Time",
"org.bouncycastle.util.encoders.Hex"
] | import java.io.IOException; import java.io.InputStream; import javax.security.auth.x500.X500Principal; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.BERTags; import org.bouncycastle.asn1.x509.Time; import org.bouncycastle.util.encoders.Hex; | import java.io.*; import javax.security.auth.x500.*; import org.bouncycastle.asn1.*; import org.bouncycastle.asn1.x509.*; import org.bouncycastle.util.encoders.*; | [
"java.io",
"javax.security",
"org.bouncycastle.asn1",
"org.bouncycastle.util"
] | java.io; javax.security; org.bouncycastle.asn1; org.bouncycastle.util; | 2,451,016 |
@Override public Collection<V> values() {
return super.values();
}
@VisibleForTesting
final class ValueSet extends Sets.ImprovedAbstractSet<V> implements ValueSetLink<K, V> {
private final K key;
@VisibleForTesting ValueEntry<K, V>[] hashTable;
private int size = 0;
private int modCoun... | @Override Collection<V> function() { return super.values(); } final class ValueSet extends Sets.ImprovedAbstractSet<V> implements ValueSetLink<K, V> { private final K key; @VisibleForTesting ValueEntry<K, V>[] hashTable; private int size = 0; private int modCount = 0; private ValueSetLink<K, V> firstEntry; private Valu... | /**
* Returns a collection of all values in the multimap. Changes to the returned
* collection will update the underlying multimap, and vice versa.
*
* <p>The iterator generated by the returned collection traverses the values
* in the order they were added to the multimap.
*/ | Returns a collection of all values in the multimap. Changes to the returned collection will update the underlying multimap, and vice versa. The iterator generated by the returned collection traverses the values in the order they were added to the multimap | values | {
"repo_name": "sensui/guava-libraries",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/LinkedHashMultimap.java",
"license": "apache-2.0",
"size": 17747
} | [
"com.google.common.annotations.VisibleForTesting",
"java.util.Collection"
] | import com.google.common.annotations.VisibleForTesting; import java.util.Collection; | import com.google.common.annotations.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,255,566 |
@SuppressWarnings("unchecked")
public List<ApplicationVersion> searchAllApplicationsVersions(int libid) {
Query query = sessionFactory.getCurrentSession().
createQuery("select lib.versions FROM Library as lib where lib.id=:libid");
query.setParameter("libid", libid);
fin... | @SuppressWarnings(STR) List<ApplicationVersion> function(int libid) { Query query = sessionFactory.getCurrentSession(). createQuery(STR); query.setParameter("libid", libid); final List<LibraryVersion> libver = query.list(); query = sessionFactory.getCurrentSession(). createQuery(STR); query.setParameterList(STR, libver... | /**
* Returns a List of ApplicationVersions that have a dependency on the specified Library ID.
*
* @param libid The ID of the Library to search on
* @return a List of ApplicationVersion objects
*/ | Returns a List of ApplicationVersions that have a dependency on the specified Library ID | searchAllApplicationsVersions | {
"repo_name": "janaroj/dependency-track",
"path": "src/main/java/org/owasp/dependencytrack/dao/ApplicationDao.java",
"license": "gpl-3.0",
"size": 13545
} | [
"java.util.ArrayList",
"java.util.List",
"org.hibernate.Query",
"org.owasp.dependencytrack.model.ApplicationDependency",
"org.owasp.dependencytrack.model.ApplicationVersion",
"org.owasp.dependencytrack.model.LibraryVersion"
] | import java.util.ArrayList; import java.util.List; import org.hibernate.Query; import org.owasp.dependencytrack.model.ApplicationDependency; import org.owasp.dependencytrack.model.ApplicationVersion; import org.owasp.dependencytrack.model.LibraryVersion; | import java.util.*; import org.hibernate.*; import org.owasp.dependencytrack.model.*; | [
"java.util",
"org.hibernate",
"org.owasp.dependencytrack"
] | java.util; org.hibernate; org.owasp.dependencytrack; | 608,311 |
public void setSystemClock(final long millis) throws TimeoutException,
FailedExecuteCommand, IOException {
withWritePermissions("/dev/alarm", new WithPermissions() { | void function(final long millis) throws TimeoutException, FailedExecuteCommand, IOException { withWritePermissions(STR, new WithPermissions() { | /**
* Sets system clock using /dev/alarm
*
* @param millis
* @throws BrokenBusyboxException
* @throws TimeoutException
* @throws IOException
*/ | Sets system clock using /dev/alarm | setSystemClock | {
"repo_name": "DsLNeXuS/AOSPBrowserInstaller",
"path": "root-commands/src/main/java/org/sufficientlysecure/rootcommands/Toolbox.java",
"license": "gpl-3.0",
"size": 26637
} | [
"java.io.IOException",
"java.util.concurrent.TimeoutException",
"org.sufficientlysecure.rootcommands.util.FailedExecuteCommand"
] | import java.io.IOException; import java.util.concurrent.TimeoutException; import org.sufficientlysecure.rootcommands.util.FailedExecuteCommand; | import java.io.*; import java.util.concurrent.*; import org.sufficientlysecure.rootcommands.util.*; | [
"java.io",
"java.util",
"org.sufficientlysecure.rootcommands"
] | java.io; java.util; org.sufficientlysecure.rootcommands; | 1,676,559 |
public static void removeMacro(Player player, int macroOrder) {
if (player.getMacroList().removeMacro(macroOrder)) {
DAOManager.getDAO(PlayerMacrossesDAO.class).deleteMacro(player.getObjectId(), macroOrder);
}
}
| static void function(Player player, int macroOrder) { if (player.getMacroList().removeMacro(macroOrder)) { DAOManager.getDAO(PlayerMacrossesDAO.class).deleteMacro(player.getObjectId(), macroOrder); } } | /**
* Remove macro with specified index from specified player
*
* @param player Player
* @param macroOrder Macro order index
*/ | Remove macro with specified index from specified player | removeMacro | {
"repo_name": "GiGatR00n/Aion-Core-v4.7.5",
"path": "AC-Game/src/com/aionemu/gameserver/services/player/PlayerService.java",
"license": "gpl-2.0",
"size": 24935
} | [
"com.aionemu.commons.database.dao.DAOManager",
"com.aionemu.gameserver.dao.PlayerMacrossesDAO",
"com.aionemu.gameserver.model.gameobjects.player.Player"
] | import com.aionemu.commons.database.dao.DAOManager; import com.aionemu.gameserver.dao.PlayerMacrossesDAO; import com.aionemu.gameserver.model.gameobjects.player.Player; | import com.aionemu.commons.database.dao.*; import com.aionemu.gameserver.dao.*; import com.aionemu.gameserver.model.gameobjects.player.*; | [
"com.aionemu.commons",
"com.aionemu.gameserver"
] | com.aionemu.commons; com.aionemu.gameserver; | 1,515,137 |
public void setStatisticByDayPersistence(
StatisticByDayPersistence statisticByDayPersistence) {
this.statisticByDayPersistence = statisticByDayPersistence;
} | void function( StatisticByDayPersistence statisticByDayPersistence) { this.statisticByDayPersistence = statisticByDayPersistence; } | /**
* Sets the statistic by day persistence.
*
* @param statisticByDayPersistence the statistic by day persistence
*/ | Sets the statistic by day persistence | setStatisticByDayPersistence | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-dossier-portlet/docroot/WEB-INF/src/org/oep/dossiermgt/service/base/DossierTagServiceBaseImpl.java",
"license": "apache-2.0",
"size": 49313
} | [
"org.oep.dossiermgt.service.persistence.StatisticByDayPersistence"
] | import org.oep.dossiermgt.service.persistence.StatisticByDayPersistence; | import org.oep.dossiermgt.service.persistence.*; | [
"org.oep.dossiermgt"
] | org.oep.dossiermgt; | 112,507 |
void tryEnactKill(VertexTerminationCause trigger,
TaskTerminationCause taskterminationCause) {
// In most cases the dag is shutting down due to some error
TaskAttemptTerminationCause errCause = TaskAttemptTerminationCause.TERMINATED_AT_SHUTDOWN;
if (taskterminationCause == TaskTerminationCause.DAG_K... | void tryEnactKill(VertexTerminationCause trigger, TaskTerminationCause taskterminationCause) { TaskAttemptTerminationCause errCause = TaskAttemptTerminationCause.TERMINATED_AT_SHUTDOWN; if (taskterminationCause == TaskTerminationCause.DAG_KILL) { errCause = TaskAttemptTerminationCause.TERMINATED_BY_CLIENT; } if(trySetT... | /**
* Set the terminationCause and send a kill-message to all tasks.
* The task-kill messages are only sent once.
*/ | Set the terminationCause and send a kill-message to all tasks. The task-kill messages are only sent once | tryEnactKill | {
"repo_name": "amirsojoodi/tez",
"path": "tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java",
"license": "apache-2.0",
"size": 194595
} | [
"org.apache.tez.dag.app.dag.Task",
"org.apache.tez.dag.app.dag.TaskTerminationCause",
"org.apache.tez.dag.app.dag.VertexTerminationCause",
"org.apache.tez.dag.app.dag.event.TaskEventTermination",
"org.apache.tez.dag.records.TaskAttemptTerminationCause"
] | import org.apache.tez.dag.app.dag.Task; import org.apache.tez.dag.app.dag.TaskTerminationCause; import org.apache.tez.dag.app.dag.VertexTerminationCause; import org.apache.tez.dag.app.dag.event.TaskEventTermination; import org.apache.tez.dag.records.TaskAttemptTerminationCause; | import org.apache.tez.dag.app.dag.*; import org.apache.tez.dag.app.dag.event.*; import org.apache.tez.dag.records.*; | [
"org.apache.tez"
] | org.apache.tez; | 1,375,278 |
manager
.webPubSubs()
.define("myWebPubSubService")
.withRegion("eastus")
.withExistingResourceGroup("myResourceGroup")
.withTags(mapOf("key1", "value1"))
.withSku(new ResourceSku().withName("Standard_S1").withTier(WebPubSubSkuTier.STANDARD).withCa... | manager .webPubSubs() .define(STR) .withRegion(STR) .withExistingResourceGroup(STR) .withTags(mapOf("key1", STR)) .withSku(new ResourceSku().withName(STR).withTier(WebPubSubSkuTier.STANDARD).withCapacity(1)) .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)) .withTls(new WebPubSubTlsSett... | /**
* Sample code: WebPubSub_CreateOrUpdate.
*
* @param manager Entry point to WebPubSubManager.
*/ | Sample code: WebPubSub_CreateOrUpdate | webPubSubCreateOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/webpubsub/azure-resourcemanager-webpubsub/src/samples/java/com/azure/resourcemanager/webpubsub/generated/WebPubSubCreateOrUpdateSamples.java",
"license": "mit",
"size": 3562
} | [
"com.azure.resourcemanager.webpubsub.models.AclAction",
"com.azure.resourcemanager.webpubsub.models.LiveTraceCategory",
"com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration",
"com.azure.resourcemanager.webpubsub.models.ManagedIdentity",
"com.azure.resourcemanager.webpubsub.models.ManagedIdenti... | import com.azure.resourcemanager.webpubsub.models.AclAction; import com.azure.resourcemanager.webpubsub.models.LiveTraceCategory; import com.azure.resourcemanager.webpubsub.models.LiveTraceConfiguration; import com.azure.resourcemanager.webpubsub.models.ManagedIdentity; import com.azure.resourcemanager.webpubsub.models... | import com.azure.resourcemanager.webpubsub.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 1,218,217 |
public List<LmsPrefs> findAll() throws SystemException {
return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
} | List<LmsPrefs> function() throws SystemException { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } | /**
* Returns all the lms prefses.
*
* @return the lms prefses
* @throws SystemException if a system exception occurred
*/ | Returns all the lms prefses | findAll | {
"repo_name": "TelefonicaED/liferaylms-portlet",
"path": "docroot/WEB-INF/src/com/liferay/lms/service/persistence/LmsPrefsPersistenceImpl.java",
"license": "agpl-3.0",
"size": 23281
} | [
"com.liferay.lms.model.LmsPrefs",
"com.liferay.portal.kernel.dao.orm.QueryUtil",
"com.liferay.portal.kernel.exception.SystemException",
"java.util.List"
] | import com.liferay.lms.model.LmsPrefs; import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.exception.SystemException; import java.util.List; | import com.liferay.lms.model.*; import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import java.util.*; | [
"com.liferay.lms",
"com.liferay.portal",
"java.util"
] | com.liferay.lms; com.liferay.portal; java.util; | 2,287,134 |
public void getPeer(final PeerConfig config, final OnGetPeerCallback callback) {
if (config == null) {
throw new NullPointerException("config is null.");
}
if (callback == null) {
throw new NullPointerException("callback is null.");
} | void function(final PeerConfig config, final OnGetPeerCallback callback) { if (config == null) { throw new NullPointerException(STR); } if (callback == null) { throw new NullPointerException(STR); } | /**
* Gets the peer corresponding to the config.
* @param config Instance of PeerConfig
* @param callback Callback to notify the Peer
*/ | Gets the peer corresponding to the config | getPeer | {
"repo_name": "Onuzimoyr/dAndroid",
"path": "dConnectDevicePlugin/dConnectDeviceWebRTC/app/src/main/java/org/deviceconnect/android/deviceplugin/webrtc/WebRTCApplication.java",
"license": "mit",
"size": 4765
} | [
"org.deviceconnect.android.deviceplugin.webrtc.core.PeerConfig"
] | import org.deviceconnect.android.deviceplugin.webrtc.core.PeerConfig; | import org.deviceconnect.android.deviceplugin.webrtc.core.*; | [
"org.deviceconnect.android"
] | org.deviceconnect.android; | 2,420,691 |
void syncWithDataSource() throws IOException {
int blocksUsed = 0;
for (BATBlock sbat : _sbat_blocks) {
ByteBuffer block = _filesystem.getBlockAt(sbat.getOurBlockIndex());
sbat.writeData(block);
if (!sbat.hasFreeSectors()) {
blocksUsed += _filesys... | void syncWithDataSource() throws IOException { int blocksUsed = 0; for (BATBlock sbat : _sbat_blocks) { ByteBuffer block = _filesystem.getBlockAt(sbat.getOurBlockIndex()); sbat.writeData(block); if (!sbat.hasFreeSectors()) { blocksUsed += _filesystem.getBigBlockSizeDetails().getBATEntriesPerBlock(); } else { blocksUsed... | /**
* Writes the SBATs to their backing blocks, and updates
* the mini-stream size in the properties. Stream size is
* based on full blocks used, not the data within the streams
*/ | Writes the SBATs to their backing blocks, and updates the mini-stream size in the properties. Stream size is based on full blocks used, not the data within the streams | syncWithDataSource | {
"repo_name": "neolord0/hwplib",
"path": "src/main/java/kr/dogfoot/hwplib/org/apache/poi/poifs/filesystem/POIFSMiniStore.java",
"license": "apache-2.0",
"size": 9553
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"kr.dogfoot.hwplib.org.apache.poi.poifs.storage.BATBlock"
] | import java.io.IOException; import java.nio.ByteBuffer; import kr.dogfoot.hwplib.org.apache.poi.poifs.storage.BATBlock; | import java.io.*; import java.nio.*; import kr.dogfoot.hwplib.org.apache.poi.poifs.storage.*; | [
"java.io",
"java.nio",
"kr.dogfoot.hwplib"
] | java.io; java.nio; kr.dogfoot.hwplib; | 1,995,118 |
UserResponse user2 = getUserResponse1("jroe");
user2.setFirstname("Jane");
user2.setLastname("Roe");
user2.setEdited(createNewTimestamp());
user2.setCreated(createOldTimestamp());
user2.setEmailAddress("j.roe@nowhere.com");
user2.setAdmin(true);
user2.getGroups().add(new GroupReference().setName("webcli... | UserResponse user2 = getUserResponse1("jroe"); user2.setFirstname("Jane"); user2.setLastname("Roe"); user2.setEdited(createNewTimestamp()); user2.setCreated(createOldTimestamp()); user2.setEmailAddress(STR); user2.setAdmin(true); user2.getGroups().add(new GroupReference().setName(STR).setUuid(USER_WEBCLIENT_UUID)); use... | /**
* Return a user response with user jane roe.
*
* @return
*/ | Return a user response with user jane roe | getUserResponse2 | {
"repo_name": "gentics/mesh",
"path": "mdm/common/src/main/java/com/gentics/mesh/example/UserExamples.java",
"license": "apache-2.0",
"size": 4617
} | [
"com.gentics.mesh.core.rest.group.GroupReference",
"com.gentics.mesh.core.rest.user.UserResponse"
] | import com.gentics.mesh.core.rest.group.GroupReference; import com.gentics.mesh.core.rest.user.UserResponse; | import com.gentics.mesh.core.rest.group.*; import com.gentics.mesh.core.rest.user.*; | [
"com.gentics.mesh"
] | com.gentics.mesh; | 1,942,430 |
public static List<TreeNode> MenuList2TreeNodeList(List<Menu> entityList) {
if (entityList == null)
throw new NullPointerException();
// 按seq排序
MenuComparator mc = new MenuComparator();
Collections.sort(entityList, mc);
List<TreeNode> list = new ArrayList<TreeNode>();
for (Menu entity : entityList)... | static List<TreeNode> function(List<Menu> entityList) { if (entityList == null) throw new NullPointerException(); MenuComparator mc = new MenuComparator(); Collections.sort(entityList, mc); List<TreeNode> list = new ArrayList<TreeNode>(); for (Menu entity : entityList) { TreeNode node = Menu2TreeNode(entity); list.add(... | /**
*
* MenuList to treeNodeList
*
* @param entityList
* a list of menu
* @return
*/ | MenuList to treeNodeList | MenuList2TreeNodeList | {
"repo_name": "LiuJun0108/liujun_pro",
"path": "ryinghome/rying-mgr/src/main/java/com/rying/service/MenuConverter.java",
"license": "epl-1.0",
"size": 3277
} | [
"com.rying.easyui.model.TreeNode",
"com.rying.entity.Menu",
"com.rying.service.comparator.MenuComparator",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import com.rying.easyui.model.TreeNode; import com.rying.entity.Menu; import com.rying.service.comparator.MenuComparator; import java.util.ArrayList; import java.util.Collections; import java.util.List; | import com.rying.easyui.model.*; import com.rying.entity.*; import com.rying.service.comparator.*; import java.util.*; | [
"com.rying.easyui",
"com.rying.entity",
"com.rying.service",
"java.util"
] | com.rying.easyui; com.rying.entity; com.rying.service; java.util; | 740,146 |
public void saveWebArchive(String basename, boolean autoname, ValueCallback<String> callback) {
checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "saveWebArchive(auto)=" + basename);
mProvider.saveWebArchive(basename, autoname, callback);
} | void function(String basename, boolean autoname, ValueCallback<String> callback) { checkThread(); if (DebugFlags.TRACE_API) Log.d(LOGTAG, STR + basename); mProvider.saveWebArchive(basename, autoname, callback); } | /**
* Saves the current view as a web archive.
*
* @param basename the filename where the archive should be placed
* @param autoname if false, takes basename to be a file. If true, basename
* is assumed to be a directory in which a filename will be
* chosen ... | Saves the current view as a web archive | saveWebArchive | {
"repo_name": "ambrosechua/unofficialxkcdviewer",
"path": "chromium_webview/src/com/mogoweb/chrome/WebView.java",
"license": "gpl-3.0",
"size": 72166
} | [
"android.util.Log",
"android.webkit.ValueCallback",
"com.mogoweb.chrome.impl.DebugFlags"
] | import android.util.Log; import android.webkit.ValueCallback; import com.mogoweb.chrome.impl.DebugFlags; | import android.util.*; import android.webkit.*; import com.mogoweb.chrome.impl.*; | [
"android.util",
"android.webkit",
"com.mogoweb.chrome"
] | android.util; android.webkit; com.mogoweb.chrome; | 516,347 |
public SafetyReportQueryResource getAddressedResource() throws Exception {
SafetyReportQueryResource thisResource;
thisResource = (SafetyReportQueryResource) ResourceContext.getResourceContext().getResource();
return thisResource;
}
| SafetyReportQueryResource function() throws Exception { SafetyReportQueryResource thisResource; thisResource = (SafetyReportQueryResource) ResourceContext.getResourceContext().getResource(); return thisResource; } | /**
* Get the resouce that is being addressed in this current context
*/ | Get the resouce that is being addressed in this current context | getAddressedResource | {
"repo_name": "NCIP/caaers",
"path": "caAERS/software/grid/introduce/SafetyReportingEnterpriseService/src/gov/nih/nci/ess/safetyreporting/qry/service/globus/resource/SafetyReportQueryResourceHome.java",
"license": "bsd-3-clause",
"size": 3948
} | [
"org.globus.wsrf.ResourceContext"
] | import org.globus.wsrf.ResourceContext; | import org.globus.wsrf.*; | [
"org.globus.wsrf"
] | org.globus.wsrf; | 920,609 |
public boolean addConstant(Sort sort, String... names) throws XmlRpcException, XPCException, JSONException {
JSONObject obj = new JSONObject();
obj.put(XPCEConstants.SORT, sort.getName());
obj.put(XPCEConstants.NAMES, new JSONArray(names));
return execute(XPCEConstants.XPCEADDCONSTANTS, obj).succeeded();... | boolean function(Sort sort, String... names) throws XmlRpcException, XPCException, JSONException { JSONObject obj = new JSONObject(); obj.put(XPCEConstants.SORT, sort.getName()); obj.put(XPCEConstants.NAMES, new JSONArray(names)); return execute(XPCEConstants.XPCEADDCONSTANTS, obj).succeeded(); } | /** Defines one or more new constants and adds them to xpce server.
* @param sort the sort of the new constant
* @param names the constant(s)
*/ | Defines one or more new constants and adds them to xpce server | addConstant | {
"repo_name": "SRI-CSL/pce",
"path": "xpce_client/src/java/com/sri/csl/xpce/xmlrpc/XpceClient.java",
"license": "lgpl-3.0",
"size": 9750
} | [
"com.sri.csl.exception.XPCException",
"com.sri.csl.xpce.json.XPCEConstants",
"com.sri.csl.xpce.object.Sort",
"org.apache.xmlrpc.XmlRpcException",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import com.sri.csl.exception.XPCException; import com.sri.csl.xpce.json.XPCEConstants; import com.sri.csl.xpce.object.Sort; import org.apache.xmlrpc.XmlRpcException; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import com.sri.csl.exception.*; import com.sri.csl.xpce.json.*; import com.sri.csl.xpce.object.*; import org.apache.xmlrpc.*; import org.json.*; | [
"com.sri.csl",
"org.apache.xmlrpc",
"org.json"
] | com.sri.csl; org.apache.xmlrpc; org.json; | 1,729,740 |
public static void removeBranch(SparkPartitionPruningSinkOperator op) {
Operator<?> child = op;
Operator<?> curr = op;
while (curr.getChildOperators().size() <= 1) {
child = curr;
if (curr.getParentOperators() == null || curr.getParentOperators().isEmpty()) {
return;
}
cur... | static void function(SparkPartitionPruningSinkOperator op) { Operator<?> child = op; Operator<?> curr = op; while (curr.getChildOperators().size() <= 1) { child = curr; if (curr.getParentOperators() == null curr.getParentOperators().isEmpty()) { return; } curr = curr.getParentOperators().get(0); } curr.removeChild(chil... | /**
* Remove the branch that contains the specified operator. Do nothing if there's no branching,
* i.e. all the upstream operators have only one child.
*/ | Remove the branch that contains the specified operator. Do nothing if there's no branching, i.e. all the upstream operators have only one child | removeBranch | {
"repo_name": "nishantmonu51/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java",
"license": "apache-2.0",
"size": 26621
} | [
"org.apache.hadoop.hive.ql.parse.spark.SparkPartitionPruningSinkOperator"
] | import org.apache.hadoop.hive.ql.parse.spark.SparkPartitionPruningSinkOperator; | import org.apache.hadoop.hive.ql.parse.spark.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,397,912 |
public List<ReviewRemarkComment> getComments() throws ReviewRemarkException {
final String text = this.marker.getMessage();
final String[] parts = text.split("\n\n");
final List<ReviewRemarkComment> ret = new ArrayList<>();
for (final String part : parts) {
final String[]... | List<ReviewRemarkComment> function() throws ReviewRemarkException { final String text = this.marker.getMessage(); final String[] parts = text.split("\n\n"); final List<ReviewRemarkComment> ret = new ArrayList<>(); for (final String part : parts) { final String[] userAndText = part.split(STR, 2); if (userAndText.length ... | /**
* Returns the comments on this review remark, including the initial remark.
*/ | Returns the comments on this review remark, including the initial remark | getComments | {
"repo_name": "tobiasbaum/reviewtool",
"path": "de.setsoftware.reviewtool.reviewdata/src/de/setsoftware/reviewtool/model/remarks/ReviewRemark.java",
"license": "epl-1.0",
"size": 8281
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 475,637 |
public void setReadOnly(boolean readOnly) throws SQLException {
checkClosed();
try {
this.mc.setReadOnly(readOnly);
} catch (SQLException sqlException) {
checkAndFireConnectionError(sqlException);
}
} | void function(boolean readOnly) throws SQLException { checkClosed(); try { this.mc.setReadOnly(readOnly); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } } | /**
* Passes call to method on physical connection instance. Notifies listeners
* of any caught exceptions before re-throwing to client.
*
* @see java.sql.Connection#setReadOnly()
*/ | Passes call to method on physical connection instance. Notifies listeners of any caught exceptions before re-throwing to client | setReadOnly | {
"repo_name": "slockhart/sql-app",
"path": "mysql-connector-java-5.1.34/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java",
"license": "gpl-2.0",
"size": 85410
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 63,744 |
public static void logExitGuiEvent( ActionEvent e ) {
long t1= System.currentTimeMillis();
getLogger("gui").log( Level.FINE, "handled \"{0}\" in (ms): {1}", new Object[]{ "actionEvent", t1-lastEventTime });
} | static void function( ActionEvent e ) { long t1= System.currentTimeMillis(); getLogger("gui").log( Level.FINE, STR{0}\STR, new Object[]{ STR, t1-lastEventTime }); } | /**
* call this at the end of the GUI event to measure time to respond.
* @param e the focus event.
*/ | call this at the end of the GUI event to measure time to respond | logExitGuiEvent | {
"repo_name": "autoplot/app",
"path": "dasCoreUtil/src/org/das2/util/LoggerManager.java",
"license": "gpl-2.0",
"size": 22856
} | [
"java.awt.event.ActionEvent",
"java.util.logging.Level"
] | import java.awt.event.ActionEvent; import java.util.logging.Level; | import java.awt.event.*; import java.util.logging.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,889,818 |
public ServiceFuture<USqlPackage> getPackageAsync(String accountName, String databaseName, String schemaName, String packageName, final ServiceCallback<USqlPackage> serviceCallback) {
return ServiceFuture.fromResponse(getPackageWithServiceResponseAsync(accountName, databaseName, schemaName, packageName), se... | ServiceFuture<USqlPackage> function(String accountName, String databaseName, String schemaName, String packageName, final ServiceCallback<USqlPackage> serviceCallback) { return ServiceFuture.fromResponse(getPackageWithServiceResponseAsync(accountName, databaseName, schemaName, packageName), serviceCallback); } | /**
* Retrieves the specified package from the Data Lake Analytics catalog.
*
* @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations.
* @param databaseName The name of the database containing the package.
* @param schemaName The name of the schema co... | Retrieves the specified package from the Data Lake Analytics catalog | getPackageAsync | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java",
"license": "mit",
"size": 683869
} | [
"com.microsoft.azure.management.datalake.analytics.models.USqlPackage",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.datalake.analytics.models.USqlPackage; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,801,243 |
public static boolean equals(CharSequence a, CharSequence b) {
return TextUtils.equals(a, b);
} | static boolean function(CharSequence a, CharSequence b) { return TextUtils.equals(a, b); } | /**
* Returns true if a and b are equal, including if they are both null.
*
* @param a
* @param b
* @return
*/ | Returns true if a and b are equal, including if they are both null | equals | {
"repo_name": "umeitime/common",
"path": "common-library/src/main/java/com/umeitime/common/tools/StringUtils.java",
"license": "epl-1.0",
"size": 5776
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,209,112 |
public ArrayList getSignatureNames() {
if (sigNames != null)
return new ArrayList(sigNames.keySet());
sigNames = new HashMap();
ArrayList sorter = new ArrayList();
for (Iterator it = fields.entrySet().iterator(); it.hasNext();) {
Map.Entry entry = (Map.Entry) it.next();
Item item = (Item) entry.getV... | ArrayList function() { if (sigNames != null) return new ArrayList(sigNames.keySet()); sigNames = new HashMap(); ArrayList sorter = new ArrayList(); for (Iterator it = fields.entrySet().iterator(); it.hasNext();) { Map.Entry entry = (Map.Entry) it.next(); Item item = (Item) entry.getValue(); PdfDictionary merged = item.... | /**
* Gets the field names that have signatures and are signed.
*
* @return the field names that have signatures and are signed
*/ | Gets the field names that have signatures and are signed | getSignatureNames | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/pdf/AcroFields.java",
"license": "lgpl-3.0",
"size": 84860
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map"
] | import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 338,689 |
public Integer getOtherTotalOriginalEffortPercent() {
Integer effortOrigOtherTotal = 0;
List<EffortCertificationDetail> detailLineList = this.getEffortCertificationDetailLines();
for (EffortCertificationDetail detailLine : detailLineList) {
if (!detailLine.isFederalOrFedera... | Integer function() { Integer effortOrigOtherTotal = 0; List<EffortCertificationDetail> detailLineList = this.getEffortCertificationDetailLines(); for (EffortCertificationDetail detailLine : detailLineList) { if (!detailLine.isFederalOrFederalPassThroughIndicator()) { effortOrigOtherTotal += detailLine.getEffortCertific... | /**
* Calculates the total original effor for non federal pass through detail lines
*
* @return original other total
*/ | Calculates the total original effor for non federal pass through detail lines | getOtherTotalOriginalEffortPercent | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ec/document/EffortCertificationDocument.java",
"license": "agpl-3.0",
"size": 30737
} | [
"java.util.List",
"org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail"
] | import java.util.List; import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail; | import java.util.*; import org.kuali.kfs.module.ec.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 1,330,164 |
EList<TrickyG2> getVals(); | EList<TrickyG2> getVals(); | /**
* Returns the value of the '<em><b>Vals</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG2}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Vals</em>' containment reference list isn't clear,
* ... | Returns the value of the 'Vals' containment reference list. The list contents are of type <code>org.eclipse.xtext.parsetree.reconstr.complexrewritetest.TrickyG2</code>. If the meaning of the 'Vals' containment reference list isn't clear, there really should be more of a description here... | getVals | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/complexrewritetest/TrickyG1.java",
"license": "epl-1.0",
"size": 1323
} | [
"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; | 573,802 |
public final void testEncryptedPrivateKeyInfobyteArray5() throws Exception {
byte[] enc = null;
try {
// 1: get valid encoding
enc = EncryptedPrivateKeyInfoData
.getValidEncryptedPrivateKeyInfoEncoding("DSA");
// ... and corrupt it (set... | final void function() throws Exception { byte[] enc = null; try { enc = EncryptedPrivateKeyInfoData .getValidEncryptedPrivateKeyInfoEncoding("DSA"); enc[9] = (byte) 6; new EncryptedPrivateKeyInfo(enc); fail(getName() + STR); } catch (IOException ok) { } try { enc = EncryptedPrivateKeyInfoData .getValidEncryptedPrivateK... | /**
* Test #5 for <code>EncryptedPrivateKeyInfo(byte[])</code> constructor
* <br>
* Assertion: <code>IOException</code> if encoding is wrong <br>
* Test preconditions: wrong encoding passed as a parameter <br>
* Expected: <code>IOException</code>
*/ | Test #5 for <code>EncryptedPrivateKeyInfo(byte[])</code> constructor Assertion: <code>IOException</code> if encoding is wrong Test preconditions: wrong encoding passed as a parameter Expected: <code>IOException</code> | testEncryptedPrivateKeyInfobyteArray5 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/EncryptedPrivateKeyInfoTest.java",
"license": "gpl-2.0",
"size": 87618
} | [
"java.io.IOException",
"javax.crypto.EncryptedPrivateKeyInfo",
"org.apache.harmony.crypto.tests.support.EncryptedPrivateKeyInfoData"
] | import java.io.IOException; import javax.crypto.EncryptedPrivateKeyInfo; import org.apache.harmony.crypto.tests.support.EncryptedPrivateKeyInfoData; | import java.io.*; import javax.crypto.*; import org.apache.harmony.crypto.tests.support.*; | [
"java.io",
"javax.crypto",
"org.apache.harmony"
] | java.io; javax.crypto; org.apache.harmony; | 1,913,366 |
private void validateNBF(JWTClaimsSet claimsSet, long currentTime, long skewTime) throws CibaAuthFailureException {
// Validation for nbf-time before signed request is acceptable. Mandatory parameter if signed.
if (claimsSet.getNotBeforeTime() == null) {
if (log.isDebugEnabled()) {
... | void function(JWTClaimsSet claimsSet, long currentTime, long skewTime) throws CibaAuthFailureException { if (claimsSet.getNotBeforeTime() == null) { if (log.isDebugEnabled()) { log.debug(STR + claimsSet.getIssuer() + STR); } throw new CibaAuthFailureException(OAuth2ErrorCodes.INVALID_REQUEST, STR); } long nbfTime = cla... | /**
* Checks whether the JWT-NBF is valid.
*
* @param claimsSet CIBA Authentication request as claim sets..
* @throws CibaAuthFailureException CIBA Authentication Failed Exception.
*/ | Checks whether the JWT-NBF is valid | validateNBF | {
"repo_name": "wso2-extensions/identity-inbound-auth-oauth",
"path": "components/org.wso2.carbon.identity.oauth.endpoint/src/main/java/org/wso2/carbon/identity/oauth/endpoint/ciba/CibaAuthRequestValidator.java",
"license": "apache-2.0",
"size": 35960
} | [
"com.nimbusds.jwt.JWTClaimsSet",
"org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes",
"org.wso2.carbon.identity.oauth.endpoint.exception.CibaAuthFailureException"
] | import com.nimbusds.jwt.JWTClaimsSet; import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth.endpoint.exception.CibaAuthFailureException; | import com.nimbusds.jwt.*; import org.wso2.carbon.identity.oauth.common.*; import org.wso2.carbon.identity.oauth.endpoint.exception.*; | [
"com.nimbusds.jwt",
"org.wso2.carbon"
] | com.nimbusds.jwt; org.wso2.carbon; | 2,206,065 |
private void ensureAttributesExist()
{
if (attributes == null)
{
attributes = new HashMap<String, Object>();
}
} | void function() { if (attributes == null) { attributes = new HashMap<String, Object>(); } } | /**
* Ensures that the map for the attributes exists. It is created on
* demand.
*/ | Ensures that the map for the attributes exists. It is created on demand | ensureAttributesExist | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java",
"license": "apache-2.0",
"size": 21305
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,205,409 |
public void testUpdateUoM() throws Exception {
System.out.println("updateUoM");
HashMap<String, Object> uomMap = new HashMap();
uomMap.put("uomid", "402880842b808f53012b808f5fd20002"); //change the id with any other id from the db
uomMap.put("uomname", "testdata1");
uomMap.pu... | void function() throws Exception { System.out.println(STR); HashMap<String, Object> uomMap = new HashMap(); uomMap.put("uomid", STR); uomMap.put(STR, STR); uomMap.put(STR, "LT"); uomMap.put(STR, 1); uomMap.put(STR, companyid); accUomImpl instance = new accUomImpl(); instance.setSessionFactory(sessionFactory); KwlReturn... | /**
* Test of updateUoM method, of class accUomImpl.
*/ | Test of updateUoM method, of class accUomImpl | testUpdateUoM | {
"repo_name": "vdt/Deskera-Accounting",
"path": "Maven_Accounting_Libs/mavenAccUOMModule/src/test/java/com/krawler/spring/accounting/uom/accUomImplTest.java",
"license": "gpl-3.0",
"size": 8384
} | [
"com.krawler.spring.common.KwlReturnObject",
"java.util.HashMap"
] | import com.krawler.spring.common.KwlReturnObject; import java.util.HashMap; | import com.krawler.spring.common.*; import java.util.*; | [
"com.krawler.spring",
"java.util"
] | com.krawler.spring; java.util; | 588,765 |
@Test
public void getCharactersCharacterIdStandingsTest() throws ApiException {
final List<CharacterStandingsResponse> response = api.getCharactersCharacterIdStandings(characterId, DATASOURCE, null, null);
assertThat(response, notNullValue());
assertThat(response.size(), greaterThan(0))... | void function() throws ApiException { final List<CharacterStandingsResponse> response = api.getCharactersCharacterIdStandings(characterId, DATASOURCE, null, null); assertThat(response, notNullValue()); assertThat(response.size(), greaterThan(0)); } | /**
* Get standings
*
* Return character standings from agents, NPC corporations, and factions --- This route is cached for up to 3600 seconds SSO Scope: esi-characters.read_standings.v1
*
* @throws ApiException
* if the Api call fails
*/ | Get standings Return character standings from agents, NPC corporations, and factions --- This route is cached for up to 3600 seconds SSO Scope: esi-characters.read_standings.v1 | getCharactersCharacterIdStandingsTest | {
"repo_name": "burberius/eve-esi",
"path": "src/test/java/net/troja/eve/esi/api/CharacterApiTest.java",
"license": "apache-2.0",
"size": 9718
} | [
"java.util.List",
"net.troja.eve.esi.ApiException",
"net.troja.eve.esi.model.CharacterStandingsResponse",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.util.List; import net.troja.eve.esi.ApiException; import net.troja.eve.esi.model.CharacterStandingsResponse; import org.hamcrest.Matchers; import org.junit.Assert; | import java.util.*; import net.troja.eve.esi.*; import net.troja.eve.esi.model.*; import org.hamcrest.*; import org.junit.*; | [
"java.util",
"net.troja.eve",
"org.hamcrest",
"org.junit"
] | java.util; net.troja.eve; org.hamcrest; org.junit; | 1,704,119 |
private void sendTextMessage(SharedDataItem sharedDataItem) {
CharSequence sequence = sharedDataItem.getText();
String htmlText = sharedDataItem.getHtmlText();
String text = null;
if (null == sequence) {
if (null != htmlText) {
text = Html.fromHtml(htmlTe... | void function(SharedDataItem sharedDataItem) { CharSequence sequence = sharedDataItem.getText(); String htmlText = sharedDataItem.getHtmlText(); String text = null; if (null == sequence) { if (null != htmlText) { text = Html.fromHtml(htmlText).toString(); } } else { text = sequence.toString(); } Log.d(LOG_TAG, STR + te... | /**
* Send a text message.
* @param sharedDataItem the media item.
*/ | Send a text message | sendTextMessage | {
"repo_name": "vt0r/vector-android",
"path": "vector/src/main/java/im/vector/util/VectorRoomMediasSender.java",
"license": "apache-2.0",
"size": 36775
} | [
"android.text.Html",
"android.util.Log"
] | import android.text.Html; import android.util.Log; | import android.text.*; import android.util.*; | [
"android.text",
"android.util"
] | android.text; android.util; | 821,053 |
public static MapredWork getMapRedWorkFromConf(HiveConf conf) {
MapredWork mrWork = new MapredWork();
MapWork work = mrWork.getMapWork();
boolean mapperCannotSpanPartns =
conf.getBoolVar(
HiveConf.ConfVars.HIVE_MAPPER_CANNOT_SPAN_MULTIPLE_PARTITIONS);
work.setMapperCannotSpanPartn... | static MapredWork function(HiveConf conf) { MapredWork mrWork = new MapredWork(); MapWork work = mrWork.getMapWork(); boolean mapperCannotSpanPartns = conf.getBoolVar( HiveConf.ConfVars.HIVE_MAPPER_CANNOT_SPAN_MULTIPLE_PARTITIONS); work.setMapperCannotSpanPartns(mapperCannotSpanPartns); work.setPathToAliases(new Linked... | /**
* create a new plan and return. The pan won't contain the name to split
* sample information in parse context.
*
* @return the new plan
*/ | create a new plan and return. The pan won't contain the name to split sample information in parse context | getMapRedWorkFromConf | {
"repo_name": "sankarh/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java",
"license": "apache-2.0",
"size": 87141
} | [
"java.util.LinkedHashMap",
"java.util.List",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.ql.exec.Operator",
"org.apache.hadoop.hive.ql.plan.MapWork",
"org.apache.hadoop.hive.ql.plan.MapredWork",
"org.apache.hadoop.hive.ql.plan.OperatorDesc",
"org.apac... | import java.util.LinkedHashMap; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.plan.MapWork; import org.apache.hadoop.hive.ql.plan.MapredWork; import org.apache.hadoop.hive.ql.plan.Ope... | import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.plan.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,687,928 |
public Object deploy(Artifact artifact) throws CarbonDeploymentException {
File artifactFile = artifact.getFile();
String artifactPath = artifactFile.getAbsolutePath();
if (isSupportedFile(artifactFile)) {
log.info("Deploying artifact: {}", artifactPath);
List<Object>... | Object function(Artifact artifact) throws CarbonDeploymentException { File artifactFile = artifact.getFile(); String artifactPath = artifactFile.getAbsolutePath(); if (isSupportedFile(artifactFile)) { log.info(STR, artifactPath); List<Object> resourcesList; try { resourcesList = new MSSJarProcessor().setArtifact(artifa... | /**
* Deploy and artifact in the netty-http service.
*
* @param artifact the artifact to be deployed
* @return A key to identify the deployed artifact
* @throws CarbonDeploymentException If deployment fails
*/ | Deploy and artifact in the netty-http service | deploy | {
"repo_name": "susinda/product-mss",
"path": "carbon-mss/components/org.wso2.carbon.mss/src/main/java/org/wso2/carbon/mss/internal/deployer/MSSDeployer.java",
"license": "apache-2.0",
"size": 6139
} | [
"java.io.File",
"java.util.List",
"org.wso2.carbon.kernel.deployment.Artifact",
"org.wso2.carbon.kernel.deployment.exception.CarbonDeploymentException",
"org.wso2.carbon.mss.internal.MicroservicesRegistry"
] | import java.io.File; import java.util.List; import org.wso2.carbon.kernel.deployment.Artifact; import org.wso2.carbon.kernel.deployment.exception.CarbonDeploymentException; import org.wso2.carbon.mss.internal.MicroservicesRegistry; | import java.io.*; import java.util.*; import org.wso2.carbon.kernel.deployment.*; import org.wso2.carbon.kernel.deployment.exception.*; import org.wso2.carbon.mss.internal.*; | [
"java.io",
"java.util",
"org.wso2.carbon"
] | java.io; java.util; org.wso2.carbon; | 2,564,078 |
private boolean noMatchForTagInAttributes(AttributeSet attr, HTML.Tag t, Object tagValue) {
if (attr != null && attr.isDefined(t)) {
Object newValue = attr.getAttribute(t);
if ((tagValue == null) ? (newValue == null) : (newValue != null && tagValue.equals(newValue))) {
... | boolean function(AttributeSet attr, HTML.Tag t, Object tagValue) { if (attr != null && attr.isDefined(t)) { Object newValue = attr.getAttribute(t); if ((tagValue == null) ? (newValue == null) : (newValue != null && tagValue.equals(newValue))) { return false; } } return true; } | /**
* Searches the attribute set for a tag, both of which
* are passed in as a parameter. Returns true if no match is found
* and false otherwise.
*/ | Searches the attribute set for a tag, both of which are passed in as a parameter. Returns true if no match is found and false otherwise | noMatchForTagInAttributes | {
"repo_name": "cst316/spring16project-Team-Boston",
"path": "src/net/sf/memoranda/ui/htmleditor/AltHTMLWriter.java",
"license": "gpl-2.0",
"size": 82104
} | [
"javax.swing.text.AttributeSet"
] | import javax.swing.text.AttributeSet; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 555,349 |
@Nullable
public AdminConsentRequestPolicy patch(@Nonnull final AdminConsentRequestPolicy sourceAdminConsentRequestPolicy) throws ClientException {
return send(HttpMethod.PATCH, sourceAdminConsentRequestPolicy);
} | AdminConsentRequestPolicy function(@Nonnull final AdminConsentRequestPolicy sourceAdminConsentRequestPolicy) throws ClientException { return send(HttpMethod.PATCH, sourceAdminConsentRequestPolicy); } | /**
* Patches this AdminConsentRequestPolicy with a source
*
* @param sourceAdminConsentRequestPolicy the source object with updates
* @return the updated AdminConsentRequestPolicy
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/ | Patches this AdminConsentRequestPolicy with a source | patch | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/AdminConsentRequestPolicyRequest.java",
"license": "mit",
"size": 6489
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.AdminConsentRequestPolicy",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.AdminConsentRequestPolicy; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 2,525,087 |
private Bitmap overlayChildBadgeOnUserPicture(Bitmap userPicture, Bitmap badge) {
Resources resources = getResources();
assert userPicture.getWidth()
== resources.getDimensionPixelSize(R.dimen.user_picture_size);
int borderSize = resources.getDimensionPixelOffset(R.dimen.badg... | Bitmap function(Bitmap userPicture, Bitmap badge) { Resources resources = getResources(); assert userPicture.getWidth() == resources.getDimensionPixelSize(R.dimen.user_picture_size); int borderSize = resources.getDimensionPixelOffset(R.dimen.badge_border_size); int badgeRadius = resources.getDimensionPixelOffset(R.dime... | /**
* Creates a new image with the picture overlaid by the badge.
* @param userPicture A bitmap to overlay on.
* @param badge A bitmap to overlay with.
* @return A bitmap with the badge overlaying the {@code userPicture}.
*/ | Creates a new image with the picture overlaid by the badge | overlayChildBadgeOnUserPicture | {
"repo_name": "sgraham/nope",
"path": "chrome/android/java/src/org/chromium/chrome/browser/signin/AccountManagementFragment.java",
"license": "bsd-3-clause",
"size": 30485
} | [
"android.content.res.Resources",
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Paint",
"android.graphics.PorterDuff",
"android.graphics.PorterDuffXfermode"
] | import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; | import android.content.res.*; import android.graphics.*; | [
"android.content",
"android.graphics"
] | android.content; android.graphics; | 1,616,846 |
EAttribute getSketch_ShortVar5(); | EAttribute getSketch_ShortVar5(); | /**
* Returns the meta object for the attribute '{@link com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getShortVar5 <em>Short Var5</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Short Var5</em>'.
* @see com.specmate.migration.test.bas... | Returns the meta object for the attribute '<code>com.specmate.migration.test.baseline.testmodel.artefact.Sketch#getShortVar5 Short Var5</code>'. | getSketch_ShortVar5 | {
"repo_name": "junkerm/specmate",
"path": "bundles/specmate-migration-test/src/com/specmate/migration/test/baseline/testmodel/artefact/ArtefactPackage.java",
"license": "apache-2.0",
"size": 47870
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,603,196 |
public int getApproximateLengthInBytes(DataTypeDescriptor dts){
switch(formatId){
case StoredFormatIds.BIT_TYPE_ID:
return (int)(Math.ceil(dts.getMaximumWidth()/8d));
case StoredFormatIds.CHAR_TYPE_ID:
return (2*dts.getMaximumWidth())+2;
... | int function(DataTypeDescriptor dts){ switch(formatId){ case StoredFormatIds.BIT_TYPE_ID: return (int)(Math.ceil(dts.getMaximumWidth()/8d)); case StoredFormatIds.CHAR_TYPE_ID: return (2*dts.getMaximumWidth())+2; case StoredFormatIds.DECIMAL_TYPE_ID: if(dts.getPrecision()==Integer.MAX_VALUE){ return 200; }else{ return 8... | /**
* Get the approximate length of this type in bytes.
* For most datatypes this is just going to be
* dts.getMaximumWidth(). Some types, such as
* bit, will override this.
*
* @param dts Data type descriptor that holds the
* length/precision etc. as necessary
* @ret... | Get the approximate length of this type in bytes. For most datatypes this is just going to be dts.getMaximumWidth(). Some types, such as bit, will override this | getApproximateLengthInBytes | {
"repo_name": "splicemachine/spliceengine",
"path": "db-engine/src/main/java/com/splicemachine/db/iapi/types/TypeId.java",
"license": "agpl-3.0",
"size": 67282
} | [
"com.splicemachine.db.iapi.services.io.StoredFormatIds"
] | import com.splicemachine.db.iapi.services.io.StoredFormatIds; | import com.splicemachine.db.iapi.services.io.*; | [
"com.splicemachine.db"
] | com.splicemachine.db; | 220,728 |
public static void update(JTextField[] aliasArray, JTextField[] textArray) {
try {
outFile = new PrintWriter( new BufferedWriter(new FileWriter(fileName)));
} catch (IOException ioe) {}
for (int i = 0; i < aliasArray.length; i++) {
outFile.println(aliasArray[i].getText() + "|" + textArray[i].getText... | static void function(JTextField[] aliasArray, JTextField[] textArray) { try { outFile = new PrintWriter( new BufferedWriter(new FileWriter(fileName))); } catch (IOException ioe) {} for (int i = 0; i < aliasArray.length; i++) { outFile.println(aliasArray[i].getText() + " " + textArray[i].getText()); outFile.flush(); } o... | /**
* Update the entire alias.txt file
*/ | Update the entire alias.txt file | update | {
"repo_name": "zajax/kilcli",
"path": "src/terris/kilcli/writer/AliasWriter.java",
"license": "bsd-3-clause",
"size": 3206
} | [
"java.io.BufferedWriter",
"java.io.FileWriter",
"java.io.IOException",
"java.io.PrintWriter",
"javax.swing.JTextField"
] | import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import javax.swing.JTextField; | import java.io.*; import javax.swing.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 2,769,798 |
private Color parseColor(String color) //throws Exception
{
if(color == null)
return new Color(0, 0, 0, 0);
try
{
if(color.length() == 6)
{
int r = Integer.parseInt(color.substring(0, 2), 16);
int g = Integer.pa... | Color function(String color) { if(color == null) return new Color(0, 0, 0, 0); try { if(color.length() == 6) { int r = Integer.parseInt(color.substring(0, 2), 16); int g = Integer.parseInt(color.substring(2, 4), 16); int b = Integer.parseInt(color.substring(4, 6), 16); return new Color(r, g, b); } else if(color.length(... | /**
* Parse a color from the syntax.properties file. It can have the format
* RRGGBB in hex or AARRGGBB (with alpha blending)
*
* @param color The color string
* @return A color object
*/ | Parse a color from the syntax.properties file. It can have the format RRGGBB in hex or AARRGGBB (with alpha blending) | parseColor | {
"repo_name": "VEDAGroup/SHEF",
"path": "src/net/atlanticbb/tantlinger/ui/text/SourceCodeEditor.java",
"license": "lgpl-2.1",
"size": 11745
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,759,807 |
void processMerge(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll); | void processMerge(List<PurchasingAccountsPayableItemAsset> mergeLines, List<PurchasingAccountsPayableActionHistory> actionsTakeHistory, boolean isMergeAll); | /**
* Merge line items.
*
* @param mergeLines
* @param purApLineSession
* @param isMergeAll
*/ | Merge line items | processMerge | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-cam/src/main/java/org/kuali/kfs/module/cab/document/service/PurApLineService.java",
"license": "agpl-3.0",
"size": 6744
} | [
"java.util.List",
"org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableActionHistory",
"org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset"
] | import java.util.List; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableActionHistory; import org.kuali.kfs.module.cab.businessobject.PurchasingAccountsPayableItemAsset; | import java.util.*; import org.kuali.kfs.module.cab.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 1,907,660 |
public static <T> ArrayList<T> asArrayList(TreeMap<String, ArrayList<T>> data) {
ArrayList<T> list = new ArrayList<>();
for (String s : data.keySet()) {
list.addAll(data.get(s));
}
return list;
} | static <T> ArrayList<T> function(TreeMap<String, ArrayList<T>> data) { ArrayList<T> list = new ArrayList<>(); for (String s : data.keySet()) { list.addAll(data.get(s)); } return list; } | /**
* Converts a map of String to ArrayList of E data to a summarized array of
* the E data.
*
* @param <T>
* The type of objects that the resulting ArrayList will contain.
* @param data
* - The map to extract data from.
* @return - A summarized ArrayList of data.
*/ | Converts a map of String to ArrayList of E data to a summarized array of the E data | asArrayList | {
"repo_name": "doughtnerd/POD",
"path": "src/com/doughtnerd/pod/excel/abstracts/ExcelReader.java",
"license": "gpl-3.0",
"size": 13097
} | [
"java.util.ArrayList",
"java.util.TreeMap"
] | import java.util.ArrayList; import java.util.TreeMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,128,158 |
public void setA_Purchase_Price (BigDecimal A_Purchase_Price)
{
set_Value (COLUMNNAME_A_Purchase_Price, A_Purchase_Price);
} | void function (BigDecimal A_Purchase_Price) { set_Value (COLUMNNAME_A_Purchase_Price, A_Purchase_Price); } | /** Set Purchase Price.
@param A_Purchase_Price Purchase Price */ | Set Purchase Price | setA_Purchase_Price | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/model/X_A_Asset_Info_Fin.java",
"license": "gpl-2.0",
"size": 10717
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,742,024 |
private static void parseCommandLine(String[] args) throws Exception {
CmdParseState state = CmdParseState.DEFAULT;
for (int count = 0; count < args.length; count++) {
String arg = args[count];
switch (state) {
case DEFAULT:
if (arg.equals("-ve... | static void function(String[] args) throws Exception { CmdParseState state = CmdParseState.DEFAULT; for (int count = 0; count < args.length; count++) { String arg = args[count]; switch (state) { case DEFAULT: if (arg.equals(STR) arg.equals("-v")) verboseMode = true; else if (arg.equals(STR)) { verboseMode = true; debug... | /**
* Process the command line arguments
* @param args the command line arguments
*/ | Process the command line arguments | parseCommandLine | {
"repo_name": "mlist/grails-openseadragon-plugin",
"path": "src/java/org/nanocan/io/DeepZoomConverter.java",
"license": "gpl-3.0",
"size": 16640
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 2,380,897 |
static TextLine obtain() {
TextLine tl;
synchronized (sCached) {
for (int i = sCached.length; --i >= 0;) {
if (sCached[i] != null) {
tl = sCached[i];
sCached[i] = null;
return tl;
}
}
... | static TextLine obtain() { TextLine tl; synchronized (sCached) { for (int i = sCached.length; --i >= 0;) { if (sCached[i] != null) { tl = sCached[i]; sCached[i] = null; return tl; } } } tl = new TextLine(); if (DEBUG) { Log.v("TLINE", STR + tl); } return tl; } | /**
* Returns a new TextLine from the shared pool.
*
* @return an uninitialized TextLine
*/ | Returns a new TextLine from the shared pool | obtain | {
"repo_name": "OmniEvo/android_frameworks_base",
"path": "core/java/android/text/TextLine.java",
"license": "gpl-3.0",
"size": 40813
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,331,911 |
public static float getOverridingStatementCompanyValue(){
float orCompVal = 0;
String getOvrValQuarry = "SELECT " +DataBaseConstant.COMPANY_COLUMN
+ " FROM " +DataBaseConstant.GPTW_STATEMENTS+ ";";
try {
ResultSet rs = dataBase.runQuarry(... | static float function(){ float orCompVal = 0; String getOvrValQuarry = STR +DataBaseConstant.COMPANY_COLUMN + STR +DataBaseConstant.GPTW_STATEMENTS+ ";"; try { ResultSet rs = dataBase.runQuarry(getOvrValQuarry); orCompVal = rs.getFloat(DataBaseConstant.COMPANY_COLUMN); rs.close(); } catch (SQLException e) { e.printStac... | /**
* Return Overriding statement company value
* */ | Return Overriding statement company value | getOverridingStatementCompanyValue | {
"repo_name": "thilina27/pptgen",
"path": "src/main/java/pptgen/data/DataStore.java",
"license": "unlicense",
"size": 8906
} | [
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,736,114 |
void applySettings(@NotNull S settings) throws RemoteException; | void applySettings(@NotNull S settings) throws RemoteException; | /**
* Asks remote external system process to apply given settings.
*
* @param settings settings to apply
* @throws RemoteException in case of unexpected I/O exception during processing
*/ | Asks remote external system process to apply given settings | applySettings | {
"repo_name": "asedunov/intellij-community",
"path": "platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/RemoteExternalSystemFacade.java",
"license": "apache-2.0",
"size": 4275
} | [
"java.rmi.RemoteException",
"org.jetbrains.annotations.NotNull"
] | import java.rmi.RemoteException; import org.jetbrains.annotations.NotNull; | import java.rmi.*; import org.jetbrains.annotations.*; | [
"java.rmi",
"org.jetbrains.annotations"
] | java.rmi; org.jetbrains.annotations; | 1,879,987 |
DatabaseEntry key = entry(GUID);
DatabaseEntry value = new DatabaseEntry();
OperationStatus status = attributes.get(storageManager.currentTransaction(), key, value, LockMode.RMW);
if (status == OperationStatus.SUCCESS) {
return asGuid(value);
}
Guid newGuid = Guid.ran... | DatabaseEntry key = entry(GUID); DatabaseEntry value = new DatabaseEntry(); OperationStatus status = attributes.get(storageManager.currentTransaction(), key, value, LockMode.RMW); if (status == OperationStatus.SUCCESS) { return asGuid(value); } Guid newGuid = Guid.random(); attributes.put(storageManager.currentTransact... | /**
* Provides the GUID of the local node. If it does not exists, it is randomly generated.
*
* @return A GUID instance.
*/ | Provides the GUID of the local node. If it does not exists, it is randomly generated | guid | {
"repo_name": "elasticlib/elasticlib",
"path": "elasticlib-node/src/main/java/org/elasticlib/node/dao/AttributesDao.java",
"license": "apache-2.0",
"size": 2247
} | [
"com.sleepycat.je.DatabaseEntry",
"com.sleepycat.je.LockMode",
"com.sleepycat.je.OperationStatus",
"org.elasticlib.common.hash.Guid",
"org.elasticlib.node.manager.storage.DatabaseEntries"
] | import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.LockMode; import com.sleepycat.je.OperationStatus; import org.elasticlib.common.hash.Guid; import org.elasticlib.node.manager.storage.DatabaseEntries; | import com.sleepycat.je.*; import org.elasticlib.common.hash.*; import org.elasticlib.node.manager.storage.*; | [
"com.sleepycat.je",
"org.elasticlib.common",
"org.elasticlib.node"
] | com.sleepycat.je; org.elasticlib.common; org.elasticlib.node; | 1,757,555 |
@Override
Iterator<Entry<AsciiString, String>> iterator(); | Iterator<Entry<AsciiString, String>> iterator(); | /**
* Returns an iterator over all HTTP/2 headers. The iteration order is as follows:
* 1. All pseudo headers (order not specified).
* 2. All non-pseudo headers (in insertion order).
*/ | Returns an iterator over all HTTP/2 headers. The iteration order is as follows: 1. All pseudo headers (order not specified). 2. All non-pseudo headers (in insertion order) | iterator | {
"repo_name": "jonefeewang/armeria",
"path": "core/src/main/java/com/linecorp/armeria/common/http/HttpHeaders.java",
"license": "apache-2.0",
"size": 5307
} | [
"io.netty.util.AsciiString",
"java.util.Iterator",
"java.util.Map"
] | import io.netty.util.AsciiString; import java.util.Iterator; import java.util.Map; | import io.netty.util.*; import java.util.*; | [
"io.netty.util",
"java.util"
] | io.netty.util; java.util; | 512,148 |
public SrfCrossCuttingIssue getSrfCrossCuttingIssueById(long srfCrossCuttingIssueID);
| SrfCrossCuttingIssue function(long srfCrossCuttingIssueID); | /**
* This method gets a srfCrossCuttingIssue object by a given srfCrossCuttingIssue identifier.
*
* @param srfCrossCuttingIssueID is the srfCrossCuttingIssue identifier.
* @return a SrfCrossCuttingIssue object.
*/ | This method gets a srfCrossCuttingIssue object by a given srfCrossCuttingIssue identifier | getSrfCrossCuttingIssueById | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/SrfCrossCuttingIssueManager.java",
"license": "gpl-3.0",
"size": 2845
} | [
"org.cgiar.ccafs.marlo.data.model.SrfCrossCuttingIssue"
] | import org.cgiar.ccafs.marlo.data.model.SrfCrossCuttingIssue; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 1,317,911 |
public static boolean equals(final AnyObjectId firstObjectId,
final AnyObjectId secondObjectId) {
if (firstObjectId == secondObjectId)
return true;
// We test word 2 first as odds are someone already used our
// word 1 as a hash code, and applying that came up with these
// two instances we are compar... | static boolean function(final AnyObjectId firstObjectId, final AnyObjectId secondObjectId) { if (firstObjectId == secondObjectId) return true; && firstObjectId.w3 == secondObjectId.w3 && firstObjectId.w4 == secondObjectId.w4 && firstObjectId.w5 == secondObjectId.w5 && firstObjectId.w1 == secondObjectId.w1; } int w1; in... | /**
* Compare to object identifier byte sequences for equality.
*
* @param firstObjectId
* the first identifier to compare. Must not be null.
* @param secondObjectId
* the second identifier to compare. Must not be null.
* @return true if the two identifiers are the same.
*/ | Compare to object identifier byte sequences for equality | equals | {
"repo_name": "forge/plugin-undo",
"path": "src/main/jgit/org/jboss/forge/jgit/lib/AnyObjectId.java",
"license": "epl-1.0",
"size": 15961
} | [
"org.jboss.forge.jgit.lib.AnyObjectId"
] | import org.jboss.forge.jgit.lib.AnyObjectId; | import org.jboss.forge.jgit.lib.*; | [
"org.jboss.forge"
] | org.jboss.forge; | 1,683,878 |
public URL getEndpointURL(final String endpointId) {
try {
return new URL(m_manager.getBaseURL(), endpointId);
}
catch (MalformedURLException e) {
throw new IllegalArgumentException("Invalid endpoint id", e);
}
} | URL function(final String endpointId) { try { return new URL(m_manager.getBaseURL(), endpointId); } catch (MalformedURLException e) { throw new IllegalArgumentException(STR, e); } } | /**
* Returns the runtime URL for a specified Endpoint ID.
*
* @param endpointId The Endpoint ID
* @return The URL
* @throws IllegalArgumentException If the Endpoint ID is not a valid URL path segment
*/ | Returns the runtime URL for a specified Endpoint ID | getEndpointURL | {
"repo_name": "INAETICS/secure-modular-services",
"path": "org.amdatu.remote/src/org/amdatu/remote/admin/http/avro/HttpAvroServerEndpointHandler.java",
"license": "apache-2.0",
"size": 8549
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 2,419,445 |
private void writeFile(ParquetTableMetadata_v3 parquetTableMetadata, Path p) throws IOException {
JsonFactory jsonFactory = new JsonFactory();
jsonFactory.configure(Feature.AUTO_CLOSE_TARGET, false);
jsonFactory.configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false);
ObjectMapper mapper = new ObjectMa... | void function(ParquetTableMetadata_v3 parquetTableMetadata, Path p) throws IOException { JsonFactory jsonFactory = new JsonFactory(); jsonFactory.configure(Feature.AUTO_CLOSE_TARGET, false); jsonFactory.configure(JsonParser.Feature.AUTO_CLOSE_SOURCE, false); ObjectMapper mapper = new ObjectMapper(jsonFactory); SimpleMo... | /**
* Serialize parquet metadata to json and write to a file
*
* @param parquetTableMetadata
* @param p
* @throws IOException
*/ | Serialize parquet metadata to json and write to a file | writeFile | {
"repo_name": "sindhurirayavaram/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java",
"license": "apache-2.0",
"size": 63654
} | [
"com.fasterxml.jackson.core.JsonFactory",
"com.fasterxml.jackson.core.JsonGenerator",
"com.fasterxml.jackson.core.JsonParser",
"com.fasterxml.jackson.databind.ObjectMapper",
"com.fasterxml.jackson.databind.module.SimpleModule",
"java.io.IOException",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apa... | import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import java.io.IOException; import org.apache.hadoop.fs.FSDataOutpu... | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.module.*; import java.io.*; import org.apache.hadoop.fs.*; | [
"com.fasterxml.jackson",
"java.io",
"org.apache.hadoop"
] | com.fasterxml.jackson; java.io; org.apache.hadoop; | 1,508,391 |
@Test
public void getAccept()
{
final PyFactory.PyObjectBuilder builder = getPyFactory()
.getPyObjectBuilder();
final PyObject testSubject = builder.build();
final PyVisitor visitor = new TestVisitor(testSubject);
testSubject.accept(visitor);
} | void function() { final PyFactory.PyObjectBuilder builder = getPyFactory() .getPyObjectBuilder(); final PyObject testSubject = builder.build(); final PyVisitor visitor = new TestVisitor(testSubject); testSubject.accept(visitor); } | /**
* Test method for {@link PyObject#accept(PyVisitor)}.
*/ | Test method for <code>PyObject#accept(PyVisitor)</code> | getAccept | {
"repo_name": "jevetools/unmarshal",
"path": "com.jevetools.unmarshal.python.api.impl.tests/src/com/jevetools/unmarshal/python/api/impl/test/PyObjectTest.java",
"license": "bsd-3-clause",
"size": 8159
} | [
"com.jevetools.unmarshal.python.api.PyFactory",
"com.jevetools.unmarshal.python.api.PyObject",
"com.jevetools.unmarshal.python.api.PyVisitor"
] | import com.jevetools.unmarshal.python.api.PyFactory; import com.jevetools.unmarshal.python.api.PyObject; import com.jevetools.unmarshal.python.api.PyVisitor; | import com.jevetools.unmarshal.python.api.*; | [
"com.jevetools.unmarshal"
] | com.jevetools.unmarshal; | 1,547,935 |
public void teleopPeriodic() {
Scheduler.getInstance().run();
updateStatus();
} | void function() { Scheduler.getInstance().run(); updateStatus(); } | /**
* This function is called periodically during operator control
*/ | This function is called periodically during operator control | teleopPeriodic | {
"repo_name": "Team3310/FRC-2012",
"path": "src/edu/rhhs/frc/main/RobotMain.java",
"license": "bsd-3-clause",
"size": 3332
} | [
"edu.wpi.first.wpilibj.command.Scheduler"
] | import edu.wpi.first.wpilibj.command.Scheduler; | import edu.wpi.first.wpilibj.command.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,621,244 |
public void setCouplingType(final CouplingType newValue) {
checkWritePermission();
couplingType = newValue;
} | void function(final CouplingType newValue) { checkWritePermission(); couplingType = newValue; } | /**
* Sets the type of coupling between service and associated data.
*
* @param newValue the new type of coupling between service and associated data.
*/ | Sets the type of coupling between service and associated data | setCouplingType | {
"repo_name": "Geomatys/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentification.java",
"license": "apache-2.0",
"size": 19876
} | [
"org.opengis.metadata.identification.CouplingType"
] | import org.opengis.metadata.identification.CouplingType; | import org.opengis.metadata.identification.*; | [
"org.opengis.metadata"
] | org.opengis.metadata; | 781,763 |
// get and set method are called from different threads
myFilterItems = new HashSet<>(filterItems);
} | myFilterItems = new HashSet<>(filterItems); } | /**
* Set file types
* @param filterItems a file types to set
*/ | Set file types | setFilterItems | {
"repo_name": "asedunov/intellij-community",
"path": "platform/lang-impl/src/com/intellij/ide/util/gotoByName/FilteringGotoByModel.java",
"license": "apache-2.0",
"size": 2094
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,884,796 |
public SubmissionStatus cancel(String submissionId, String userId,
Long timestamp, String etag); | SubmissionStatus function(String submissionId, String userId, Long timestamp, String etag); | /**
* Cancel a submission.
*
* @param submissionId
* @param userId
* @param timestamp
* @param etag
* @return
*/ | Cancel a submission | cancel | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "lib/jdomodels/src/main/java/org/sagebionetworks/repo/model/dbo/dao/dataaccess/SubmissionDAO.java",
"license": "apache-2.0",
"size": 3028
} | [
"org.sagebionetworks.repo.model.dataaccess.SubmissionStatus"
] | import org.sagebionetworks.repo.model.dataaccess.SubmissionStatus; | import org.sagebionetworks.repo.model.dataaccess.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 2,414,948 |
static int hashCodeAsciiSafe(byte[] bytes, int startPos, int length) {
int hash = HASH_CODE_ASCII_SEED;
final int remainingBytes = length & 7;
final int end = startPos + remainingBytes;
for (int i = startPos - 8 + length; i >= end; i -= 8) {
hash = PlatformDependent0.hash... | static int hashCodeAsciiSafe(byte[] bytes, int startPos, int length) { int hash = HASH_CODE_ASCII_SEED; final int remainingBytes = length & 7; final int end = startPos + remainingBytes; for (int i = startPos - 8 + length; i >= end; i -= 8) { hash = PlatformDependent0.hashCodeAsciiCompute(getLongSafe(bytes, i), hash); }... | /**
* Package private for testing purposes only!
*/ | Package private for testing purposes only | hashCodeAsciiSafe | {
"repo_name": "fengjiachun/netty",
"path": "common/src/main/java/io/netty/util/internal/PlatformDependent.java",
"license": "apache-2.0",
"size": 56602
} | [
"io.netty.util.internal.PlatformDependent0"
] | import io.netty.util.internal.PlatformDependent0; | import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 144,246 |
protected static Query optimise(Query query, Database database, QueryOptimiserContext context)
throws SQLException {
return optimise(query.toString(), query, database, null, context).getBestQuery();
} | static Query function(Query query, Database database, QueryOptimiserContext context) throws SQLException { return optimise(query.toString(), query, database, null, context).getBestQuery(); } | /**
* Runs the optimiser through the query, given the database.
*
* @param query the Query to optimise
* @param database the database to use to find precomputed tables
* @param context a QueryOptimiserContext, to alter settings
* @return the optimised Query
* @throws SQLException if a... | Runs the optimiser through the query, given the database | optimise | {
"repo_name": "tomck/intermine",
"path": "intermine/objectstore/main/src/org/intermine/sql/precompute/QueryOptimiser.java",
"license": "lgpl-2.1",
"size": 67813
} | [
"java.sql.SQLException",
"org.intermine.sql.Database",
"org.intermine.sql.query.Query"
] | import java.sql.SQLException; import org.intermine.sql.Database; import org.intermine.sql.query.Query; | import java.sql.*; import org.intermine.sql.*; import org.intermine.sql.query.*; | [
"java.sql",
"org.intermine.sql"
] | java.sql; org.intermine.sql; | 995,516 |
private java.util.Date getDateValue( String s, String attribute, XmlPullParser parser )
throws XmlPullParserException
{
return getDateValue( s, attribute, null, parser );
} //-- java.util.Date getDateValue( String, String, XmlPullParser ) | java.util.Date function( String s, String attribute, XmlPullParser parser ) throws XmlPullParserException { return getDateValue( s, attribute, null, parser ); } | /**
* Method getDateValue.
*
* @param s
* @param parser
* @param attribute
* @throws XmlPullParserException
* @return Date
*/ | Method getDateValue | getDateValue | {
"repo_name": "MRivas-XumaK/slingBuild",
"path": "tooling/maven/maven-launchpad-plugin/target/generated-sources/modello/org/apache/sling/maven/projectsupport/bundlelist/v1_0_0/io/xpp3/BundleListXpp3Reader.java",
"license": "apache-2.0",
"size": 38143
} | [
"org.codehaus.plexus.util.xml.pull.XmlPullParser",
"org.codehaus.plexus.util.xml.pull.XmlPullParserException"
] | import org.codehaus.plexus.util.xml.pull.XmlPullParser; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; | import org.codehaus.plexus.util.xml.pull.*; | [
"org.codehaus.plexus"
] | org.codehaus.plexus; | 324,674 |
@Test(expected = NullPointerException.class)
public void getThreadNotNullTargetNullName() {
final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().createDebugTarget();
target.setContext(DebugPackage.eINSTANCE.getDebugFactory().createVariable());
target.setName("target");
target.setState(DebugTa... | @Test(expected = NullPointerException.class) void function() { final DebugTarget target = DebugPackage.eINSTANCE.getDebugFactory().createDebugTarget(); target.setContext(DebugPackage.eINSTANCE.getDebugFactory().createVariable()); target.setName(STR); target.setState(DebugTargetState.CONNECTED); createThreads(target); D... | /**
* Tests {@link DebugTargetUtils#getThread(DebugTarget, String)} with a <code>null</code> name.
*/ | Tests <code>DebugTargetUtils#getThread(DebugTarget, String)</code> with a <code>null</code> name | getThreadNotNullTargetNullName | {
"repo_name": "SiriusLab/SiriusAnimator",
"path": "simulationmodelanimation/tests/org.eclipse.gemoc.dsl.debug.tests/src/org/eclipse/gemoc/dsl/debug/tests/DebugTargetUtilsTests.java",
"license": "epl-1.0",
"size": 40694
} | [
"org.eclipse.gemoc.dsl.debug.DebugPackage",
"org.eclipse.gemoc.dsl.debug.DebugTarget",
"org.eclipse.gemoc.dsl.debug.DebugTargetState",
"org.eclipse.gemoc.dsl.debug.DebugTargetUtils",
"org.junit.Test"
] | import org.eclipse.gemoc.dsl.debug.DebugPackage; import org.eclipse.gemoc.dsl.debug.DebugTarget; import org.eclipse.gemoc.dsl.debug.DebugTargetState; import org.eclipse.gemoc.dsl.debug.DebugTargetUtils; import org.junit.Test; | import org.eclipse.gemoc.dsl.debug.*; import org.junit.*; | [
"org.eclipse.gemoc",
"org.junit"
] | org.eclipse.gemoc; org.junit; | 1,911,330 |
@Test(expected = UnsupportedOperationException.class)
public void add() {
final ListIterator<SourceLocation> iterator = SOURCE_LOCATION_LIST.listIterator();
iterator.add(SOURCE_LOCATION_LIST.get(1));
} | @Test(expected = UnsupportedOperationException.class) void function() { final ListIterator<SourceLocation> iterator = SOURCE_LOCATION_LIST.listIterator(); iterator.add(SOURCE_LOCATION_LIST.get(1)); } | /**
* Asserts that {@link SourceLocationList.Itr#add(SourceLocation)} throws an {@link UnsupportedOperationException}.
*/ | Asserts that <code>SourceLocationList.Itr#add(SourceLocation)</code> throws an <code>UnsupportedOperationException</code> | add | {
"repo_name": "reasm/reasm-core",
"path": "src/test/java/org/reasm/source/SourceLocationListItrTest.java",
"license": "mit",
"size": 9273
} | [
"java.util.ListIterator",
"org.junit.Test"
] | import java.util.ListIterator; import org.junit.Test; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 830,771 |
protected void mapXmlReader(HashMap map, boolean packageIsKey) throws BuildException {
try {
loadMappingFromXMLReader(map, packageIsKey);
} catch ( Exception e ) {
throw new BuildException(e);
}
}
| void function(HashMap map, boolean packageIsKey) throws BuildException { try { loadMappingFromXMLReader(map, packageIsKey); } catch ( Exception e ) { throw new BuildException(e); } } | /**
* Load a mapping xml reader and save it to the map
* @param map target map file
* @param packageIsKey if the package is to be the key for the map
* @throws BuildException if an IOException needed swallowing
*/ | Load a mapping xml reader and save it to the map | mapXmlReader | {
"repo_name": "apache/axis2-java",
"path": "modules/tool/axis2-ant-plugin/src/main/java/org/apache/ws/java2wsdl/NamespaceMapping.java",
"license": "apache-2.0",
"size": 8963
} | [
"java.util.HashMap",
"org.apache.tools.ant.BuildException"
] | import java.util.HashMap; import org.apache.tools.ant.BuildException; | import java.util.*; import org.apache.tools.ant.*; | [
"java.util",
"org.apache.tools"
] | java.util; org.apache.tools; | 929,766 |
@Override public void done(RenderJob job) {
// It would be better to have an assertive check that
// this call is being made on the render thread, rather
// than on the FXT, but this is easier for now.
assert Thread.currentThread() != QuantumToolkit.getFxUserThread();
if (!(... | @Override void function(RenderJob job) { assert Thread.currentThread() != QuantumToolkit.getFxUserThread(); if (!(job instanceof PaintRenderJob)) { throw new IllegalArgumentException(STR); } final PaintRenderJob paintjob = (PaintRenderJob)job; final GlassScene scene = paintjob.getScene(); if (scene == null) { throw new... | /**
* This object is a CompletionListener is registered with every GlassScene,
* such that when the repaint has completed, this method is called.
* This method will decrement the count on the allWorkCompletedLatch.
*/ | This object is a CompletionListener is registered with every GlassScene, such that when the repaint has completed, this method is called. This method will decrement the count on the allWorkCompletedLatch | done | {
"repo_name": "lostdj/Jaklin-OpenJFX",
"path": "modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PaintCollector.java",
"license": "gpl-2.0",
"size": 18788
} | [
"com.sun.glass.ui.Application",
"com.sun.javafx.logging.PulseLogger",
"com.sun.javafx.tk.RenderJob"
] | import com.sun.glass.ui.Application; import com.sun.javafx.logging.PulseLogger; import com.sun.javafx.tk.RenderJob; | import com.sun.glass.ui.*; import com.sun.javafx.logging.*; import com.sun.javafx.tk.*; | [
"com.sun.glass",
"com.sun.javafx"
] | com.sun.glass; com.sun.javafx; | 1,866,250 |
FormatInformation readFormatInformation() throws ReaderException {
if (parsedFormatInfo != null) {
return parsedFormatInfo;
}
// Read top-left format info bits
int formatInfoBits = 0;
for (int j = 0; j < 6; j++) {
formatInfoBits = copyBit(8, j, formatInfoBits);
}
/... | FormatInformation readFormatInformation() throws ReaderException { if (parsedFormatInfo != null) { return parsedFormatInfo; } int formatInfoBits = 0; for (int j = 0; j < 6; j++) { formatInfoBits = copyBit(8, j, formatInfoBits); } formatInfoBits = copyBit(8, 7, formatInfoBits); formatInfoBits = copyBit(8, 8, formatInfoB... | /**
* <p>Reads format information from one of its two locations within the QR Code.</p>
*
* @return {@link FormatInformation} encapsulating the QR Code's format info
* @throws ReaderException if both format information locations cannot be parsed as
* the valid encoding of format information
*/ | Reads format information from one of its two locations within the QR Code | readFormatInformation | {
"repo_name": "mobilesec/openuat",
"path": "thirdparty/zxing/com/google/zxing/qrcode/decoder/BitMatrixParser.java",
"license": "lgpl-3.0",
"size": 7168
} | [
"com.google.zxing.ReaderException"
] | import com.google.zxing.ReaderException; | import com.google.zxing.*; | [
"com.google.zxing"
] | com.google.zxing; | 2,759,859 |
JSType getDeclaredType(JSDocInfo info, Node lValue, @Nullable Node rValue) {
if (info != null && info.hasType()) {
return getDeclaredTypeInAnnotation(lValue, info);
} else if (rValue != null
&& rValue.isFunction()
&& shouldUseFunctionLiteralType(
JSType.toMaybeF... | JSType getDeclaredType(JSDocInfo info, Node lValue, @Nullable Node rValue) { if (info != null && info.hasType()) { return getDeclaredTypeInAnnotation(lValue, info); } else if (rValue != null && rValue.isFunction() && shouldUseFunctionLiteralType( JSType.toMaybeFunctionType(rValue.getJSType()), info, lValue)) { return r... | /**
* Look for a type declaration on a property assignment
* (in an ASSIGN or an object literal key).
* @param info The doc info for this property.
* @param lValue The l-value node.
* @param rValue The node that {@code n} is being initialized to,
* or {@code null} if this is a stub dec... | Look for a type declaration on a property assignment (in an ASSIGN or an object literal key) | getDeclaredType | {
"repo_name": "tdelmas/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypedScopeCreator.java",
"license": "apache-2.0",
"size": 87731
} | [
"com.google.javascript.rhino.JSDocInfo",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.JSType",
"javax.annotation.Nullable"
] | import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType; import javax.annotation.Nullable; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; import javax.annotation.*; | [
"com.google.javascript",
"javax.annotation"
] | com.google.javascript; javax.annotation; | 305,034 |
public String getSQLStatementsString() throws KettleStepException {
String sql = ""; //$NON-NLS-1$
List<SQLStatement> stats = getSQLStatements();
for (int i = 0; i < stats.size(); i++) {
SQLStatement stat = stats.get(i);
if (!stat.hasError() && stat.hasSQL()) {
sql += stat.getSQL();
}
}
retur... | String function() throws KettleStepException { String sql = ""; List<SQLStatement> stats = getSQLStatements(); for (int i = 0; i < stats.size(); i++) { SQLStatement stat = stats.get(i); if (!stat.hasError() && stat.hasSQL()) { sql += stat.getSQL(); } } return sql; } | /**
* Get the SQL statements, needed to run this transformation, as one String.
*
* @return the SQL statements needed to run this transformation.
*/ | Get the SQL statements, needed to run this transformation, as one String | getSQLStatementsString | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/TransMeta.java",
"license": "gpl-2.0",
"size": 209743
} | [
"com.panet.imeta.core.SQLStatement",
"com.panet.imeta.core.exception.KettleStepException",
"java.util.List"
] | import com.panet.imeta.core.SQLStatement; import com.panet.imeta.core.exception.KettleStepException; import java.util.List; | import com.panet.imeta.core.*; import com.panet.imeta.core.exception.*; import java.util.*; | [
"com.panet.imeta",
"java.util"
] | com.panet.imeta; java.util; | 2,303,888 |
PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition); | PvmProcessInstance createSubProcessInstance(PvmProcessDefinition processDefinition); | /**
* creates a new sub process instance.
* The current execution will be the super execution of the created execution.
*
* @param processDefinition The {@link PvmProcessDefinition} of the subprocess.
*/ | creates a new sub process instance. The current execution will be the super execution of the created execution | createSubProcessInstance | {
"repo_name": "subhrajyotim/camunda-bpm-platform",
"path": "engine/src/main/java/org/camunda/bpm/engine/impl/pvm/delegate/ActivityExecution.java",
"license": "apache-2.0",
"size": 8522
} | [
"org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition",
"org.camunda.bpm.engine.impl.pvm.PvmProcessInstance"
] | import org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition; import org.camunda.bpm.engine.impl.pvm.PvmProcessInstance; | import org.camunda.bpm.engine.impl.pvm.*; | [
"org.camunda.bpm"
] | org.camunda.bpm; | 2,842,022 |
public Frame decorrelateRel(LogicalProject rel) {
//
// Rewrite logic:
//
// 1. Pass along any correlated variables coming from the input.
//
final RelNode oldInput = rel.getInput();
Frame frame = getInvoke(oldInput, rel);
if (frame == null) {
// If input has not been rewritten,... | Frame function(LogicalProject rel) { final RelNode oldInput = rel.getInput(); Frame frame = getInvoke(oldInput, rel); if (frame == null) { return null; } final List<RexNode> oldProjects = rel.getProjects(); final List<RelDataTypeField> relOutput = rel.getRowType().getFieldList(); final List<Pair<RexNode, String>> proje... | /**
* Rewrite LogicalProject.
*
* @param rel the project rel to rewrite
*/ | Rewrite LogicalProject | decorrelateRel | {
"repo_name": "arina-ielchiieva/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java",
"license": "apache-2.0",
"size": 99116
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.SortedMap",
"java.util.TreeMap",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.logical.LogicalProject",
"org.apache.calcite.rel.type.RelDataTypeField",
"org.apache.calcite.rex.RexInputRef",
"org... | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.logical.LogicalProject; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.cal... | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.logical.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,898,386 |
public static INDArray expi(INDArray toExp) {
INDArray flattened = toExp.ravel();
for (int i = 0; i < flattened.length(); i++)
flattened.put(i, Nd4j.scalar(Math.exp((double) flattened.getScalar(i).element())));
return flattened.reshape(toExp.shape());
} | static INDArray function(INDArray toExp) { INDArray flattened = toExp.ravel(); for (int i = 0; i < flattened.length(); i++) flattened.put(i, Nd4j.scalar(Math.exp((double) flattened.getScalar(i).element()))); return flattened.reshape(toExp.shape()); } | /**
* Returns an exponential version of this ndarray
*
* @param toExp the INDArray to convert
* @return the converted ndarray
*/ | Returns an exponential version of this ndarray | expi | {
"repo_name": "dongjoon-hyun/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayUtil.java",
"license": "apache-2.0",
"size": 45114
} | [
"org.nd4j.linalg.api.ndarray.INDArray",
"org.nd4j.linalg.factory.Nd4j"
] | import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; | import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.factory.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 81,607 |
Response<Void> deleteByIdWithResponse(String id, Context context); | Response<Void> deleteByIdWithResponse(String id, Context context); | /**
* Delete the connection type.
*
* @param id the resource ID.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the reque... | Delete the connection type | deleteByIdWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/models/ConnectionTypes.java",
"license": "mit",
"size": 7368
} | [
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 458,429 |
synchronized Future<Void> reconnectWithNewIp(InetAddressAndPort addr)
{
template = template.withConnectTo(addr);
return new FutureCombiner(
apply(c -> c.reconnectWith(template))
);
} | synchronized Future<Void> reconnectWithNewIp(InetAddressAndPort addr) { template = template.withConnectTo(addr); return new FutureCombiner( apply(c -> c.reconnectWith(template)) ); } | /**
* Reconnect to the peer using the given {@code addr}. Outstanding messages in each channel will be sent on the
* current channel. Typically this function is used for something like EC2 public IP addresses which need to be used
* for communication between EC2 regions.
*
* @param addr IP Addr... | Reconnect to the peer using the given addr. Outstanding messages in each channel will be sent on the current channel. Typically this function is used for something like EC2 public IP addresses which need to be used for communication between EC2 regions | reconnectWithNewIp | {
"repo_name": "driftx/cassandra",
"path": "src/java/org/apache/cassandra/net/OutboundConnections.java",
"license": "apache-2.0",
"size": 12378
} | [
"io.netty.util.concurrent.Future",
"org.apache.cassandra.locator.InetAddressAndPort"
] | import io.netty.util.concurrent.Future; import org.apache.cassandra.locator.InetAddressAndPort; | import io.netty.util.concurrent.*; import org.apache.cassandra.locator.*; | [
"io.netty.util",
"org.apache.cassandra"
] | io.netty.util; org.apache.cassandra; | 2,710,947 |
public void getPlainBounds(RectF outBounds) {
getHierarchy().getActualImageBounds(outBounds);
} | void function(RectF outBounds) { getHierarchy().getActualImageBounds(outBounds); } | /**
* Gets the bounds of the image, in view-absolute coordinates,
* but not including the effets of user gestures.
*/ | Gets the bounds of the image, in view-absolute coordinates, but not including the effets of user gestures | getPlainBounds | {
"repo_name": "275288698/fresco",
"path": "samples/zoomable/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java",
"license": "bsd-3-clause",
"size": 7723
} | [
"android.graphics.RectF"
] | import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,421,150 |
private boolean cancelDiscardScrollingAnimation() {
if (mOverviewAnimationType == OverviewAnimationType.DISCARD
|| mOverviewAnimationType == OverviewAnimationType.UNDISCARD
|| mOverviewAnimationType == OverviewAnimationType.DISCARD_ALL) {
mTabAnimations.cancel(nul... | boolean function() { if (mOverviewAnimationType == OverviewAnimationType.DISCARD mOverviewAnimationType == OverviewAnimationType.UNDISCARD mOverviewAnimationType == OverviewAnimationType.DISCARD_ALL) { mTabAnimations.cancel(null, StackTab.Property.SCROLL_OFFSET); return true; } return false; } | /**
* Cancel scrolling animation which is a part of discarding animation.
* @return true if the animation is canceled, false, if there is nothing to cancel.
*/ | Cancel scrolling animation which is a part of discarding animation | cancelDiscardScrollingAnimation | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java",
"license": "apache-2.0",
"size": 111945
} | [
"org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation"
] | import org.chromium.chrome.browser.compositor.layouts.phone.stack.StackAnimation; | import org.chromium.chrome.browser.compositor.layouts.phone.stack.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 1,543,417 |
public void testCategoryConflictAssign() throws Exception {
System.out.println("Testing the categories assignment when several repositories define the same category.");
CmsObject cms = getCmsObject();
// assert the starting situation
List<CmsCategory> cats = CmsCategoryService.getI... | void function() throws Exception { System.out.println(STR); CmsObject cms = getCmsObject(); List<CmsCategory> cats = CmsCategoryService.getInstance().readCategories(cms, null, true, STR); assertEquals(3, cats.size()); CmsCategory catA = cats.get(0); CmsCategory catAA = cats.get(1); CmsCategory catB2 = cats.get(2); asse... | /**
* Tests the categories assignment when several repositories define the same category.<p>
*
* @throws Exception if something goes wrong
*/ | Tests the categories assignment when several repositories define the same category | testCategoryConflictAssign | {
"repo_name": "alkacon/opencms-core",
"path": "test/org/opencms/relations/TestCategories.java",
"license": "lgpl-2.1",
"size": 54618
} | [
"java.util.List",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource"
] | import java.util.List; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; | import java.util.*; import org.opencms.file.*; | [
"java.util",
"org.opencms.file"
] | java.util; org.opencms.file; | 1,048,728 |
@Test
public void testUpdateStatusAfterResourceDeletedThrowsKubernetesClientException(VertxTestContext context) {
String resourceName = getResourceName(RESOURCE_NAME);
Checkpoint async = context.checkpoint();
String namespace = getNamespace();
CrdOperator<C, T, L> op = operator(... | void function(VertxTestContext context) { String resourceName = getResourceName(RESOURCE_NAME); Checkpoint async = context.checkpoint(); String namespace = getNamespace(); CrdOperator<C, T, L> op = operator(); AtomicReference<T> newStatus = new AtomicReference<>(); LOGGER.info(STR); PlatformFeaturesAvailability.create(... | /**
* Tests what happens when the resource is deleted while updating the status
*
* @param context
*/ | Tests what happens when the resource is deleted while updating the status | testUpdateStatusAfterResourceDeletedThrowsKubernetesClientException | {
"repo_name": "ppatierno/kaas",
"path": "operator-common/src/test/java/io/strimzi/operator/common/operator/resource/AbstractCustomResourceOperatorIT.java",
"license": "apache-2.0",
"size": 11743
} | [
"io.fabric8.kubernetes.client.KubernetesClientException",
"io.strimzi.operator.KubernetesVersion",
"io.strimzi.operator.PlatformFeaturesAvailability",
"io.strimzi.operator.common.Reconciliation",
"io.vertx.junit5.Checkpoint",
"io.vertx.junit5.VertxTestContext",
"java.util.concurrent.atomic.AtomicReferen... | import io.fabric8.kubernetes.client.KubernetesClientException; import io.strimzi.operator.KubernetesVersion; import io.strimzi.operator.PlatformFeaturesAvailability; import io.strimzi.operator.common.Reconciliation; import io.vertx.junit5.Checkpoint; import io.vertx.junit5.VertxTestContext; import java.util.concurrent.... | import io.fabric8.kubernetes.client.*; import io.strimzi.operator.*; import io.strimzi.operator.common.*; import io.vertx.junit5.*; import java.util.concurrent.atomic.*; import org.hamcrest.*; | [
"io.fabric8.kubernetes",
"io.strimzi.operator",
"io.vertx.junit5",
"java.util",
"org.hamcrest"
] | io.fabric8.kubernetes; io.strimzi.operator; io.vertx.junit5; java.util; org.hamcrest; | 2,515,167 |
public void export_to_file(final String file_name)
{
//1. prepare the text to export
StringBuffer sb = new StringBuffer();
sb.append(_vertex_num+"\n\n");
for(Pair<Integer, Integer> cur_edge_pair : _vertex_pair_weight_index.keySet())
{
int starting_pt_id = cur_edge_pair.first();
int ending_pt... | void function(final String file_name) { StringBuffer sb = new StringBuffer(); sb.append(_vertex_num+"\n\n"); for(Pair<Integer, Integer> cur_edge_pair : _vertex_pair_weight_index.keySet()) { int starting_pt_id = cur_edge_pair.first(); int ending_pt_id = cur_edge_pair.second(); double weight = _vertex_pair_weight_index.g... | /**
* Store the graph information into a file.
*
* @param file_name
*/ | Store the graph information into a file | export_to_file | {
"repo_name": "pduda/graphGenerator",
"path": "src/edu/asu/emit/qyan/alg/model/Graph.java",
"license": "mit",
"size": 10284
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileWriter",
"java.io.IOException",
"java.io.Writer"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 369,409 |
protected Supplier<Set<Image>> overrideImageSupplier(Injector injector,
Supplier<Set<Image>> originalSupplier) {
return originalSupplier;
} | Supplier<Set<Image>> function(Injector injector, Supplier<Set<Image>> originalSupplier) { return originalSupplier; } | /**
* Allows jclouds submodules to override the image supplier
*/ | Allows jclouds submodules to override the image supplier | overrideImageSupplier | {
"repo_name": "cloudiator/sword",
"path": "drivers/jclouds/src/main/java/de/uniulm/omi/cloudiator/sword/drivers/jclouds/config/JCloudsComputeModule.java",
"license": "apache-2.0",
"size": 10761
} | [
"com.google.common.base.Supplier",
"com.google.inject.Injector",
"de.uniulm.omi.cloudiator.sword.domain.Image",
"java.util.Set"
] | import com.google.common.base.Supplier; import com.google.inject.Injector; import de.uniulm.omi.cloudiator.sword.domain.Image; import java.util.Set; | import com.google.common.base.*; import com.google.inject.*; import de.uniulm.omi.cloudiator.sword.domain.*; import java.util.*; | [
"com.google.common",
"com.google.inject",
"de.uniulm.omi",
"java.util"
] | com.google.common; com.google.inject; de.uniulm.omi; java.util; | 749,454 |
private static long dateStringToTimestamp(final String date) {
// Abort if incoming date string is invalid
if (TextUtils.isEmpty(date))
return -1;
long timestamp = -1;
try {
// Hack to fix the "z" issue in Curah feeds ("Mon, 04 Aug 2014 20:37:43 z")
... | static long function(final String date) { if (TextUtils.isEmpty(date)) return -1; long timestamp = -1; try { String modifiedDateStr = date; final int length = date.length(); final char lastChar = date.charAt(length - 1); if ((lastChar == 'z') (lastChar == 'Z')) { modifiedDateStr = date.substring(0, length - 1) + "+0000... | /**
* Convert date string to timestamp.
*
* @param date
* @return
*/ | Convert date string to timestamp | dateStringToTimestamp | {
"repo_name": "subinkrishna/open-curah",
"path": "app/src/main/java/com/subinkrishna/curah/data/parser/RssFeedParser.java",
"license": "apache-2.0",
"size": 6752
} | [
"android.text.TextUtils",
"java.util.Date"
] | import android.text.TextUtils; import java.util.Date; | import android.text.*; import java.util.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 900,693 |
public JComponent getPresentationComponent()
{
return createDefaultTable(data);
} | JComponent function() { return createDefaultTable(data); } | /**
* Returns the presentation component for this demo. This component is shown before the real report generation is
* started. Ususally it contains a JTable with the demo data and/or input components, which allow to configure the
* report.
*
* @return the presentation component, never null.
*/ | Returns the presentation component for this demo. This component is shown before the real report generation is started. Ususally it contains a JTable with the demo data and/or input components, which allow to configure the report | getPresentationComponent | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/demo/src/main/java/org/pentaho/reporting/engine/classic/demo/elements/sparklines/SparklineXMLDemo.java",
"license": "lgpl-2.1",
"size": 4158
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,173,928 |
protected static void saveBounds(Component c, Map m) {
Rectangle r = c.getBounds();
m.put("x", String.valueOf(r.x));
m.put("y", String.valueOf(r.y));
m.put("w", String.valueOf(r.width));
m.put("h", String.valueOf(r.height));
} | static void function(Component c, Map m) { Rectangle r = c.getBounds(); m.put("x", String.valueOf(r.x)); m.put("y", String.valueOf(r.y)); m.put("w", String.valueOf(r.width)); m.put("h", String.valueOf(r.height)); } | /**
* Save the screen size and position for a component in a map object.
* @param c the component whose size and position are to be recorded in the map.
* @param m the map in which the information is to be recorded
* @see #restoreBounds
*/ | Save the screen size and position for a component in a map object | saveBounds | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/tool/DeskView.java",
"license": "gpl-2.0",
"size": 32114
} | [
"java.awt.Component",
"java.awt.Rectangle",
"java.util.Map"
] | import java.awt.Component; import java.awt.Rectangle; import java.util.Map; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 628,547 |
public void addKeyAgreementRecipient(
String agreementAlgorithm,
PrivateKey senderPrivateKey,
PublicKey senderPublicKey,
X509Certificate recipientCert,
String cekWrapAlgorithm,
String provider)
throws NoSuchProviderE... | void function( String agreementAlgorithm, PrivateKey senderPrivateKey, PublicKey senderPublicKey, X509Certificate recipientCert, String cekWrapAlgorithm, String provider) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException { this.addKeyAgreementRecipient(agreementAlgorithm, senderPrivateKey, s... | /**
* Add a key agreement based recipient.
*
* @param senderPrivateKey private key to initialise sender side of agreement with.
* @param senderPublicKey sender public key to include with message.
* @param recipientCert recipient's public key certificate.
* @param cekWrapAlgorithm OID for k... | Add a key agreement based recipient | addKeyAgreementRecipient | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/mail/smime/SMIMEEnvelopedGenerator.java",
"license": "mit",
"size": 21585
} | [
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.PrivateKey",
"java.security.PublicKey",
"java.security.cert.X509Certificate"
] | import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.X509Certificate; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 926,633 |
protected void checkSelectForCapitalAccountingLines(CapitalAccountingLinesFormBase calfb) {
CapitalAccountingLinesDocumentBase caldb = (CapitalAccountingLinesDocumentBase) calfb.getFinancialDocument();
List<CapitalAccountingLines> capitalAccountingLines = caldb.getCapitalAccountingLines();
... | void function(CapitalAccountingLinesFormBase calfb) { CapitalAccountingLinesDocumentBase caldb = (CapitalAccountingLinesDocumentBase) calfb.getFinancialDocument(); List<CapitalAccountingLines> capitalAccountingLines = caldb.getCapitalAccountingLines(); KualiAccountingDocumentFormBase kadfb = (KualiAccountingDocumentFor... | /**
* checks "select" check box on capital accounting lines if there are
* corresponding capital asset records.
*
* @param calfb
*/ | checks "select" check box on capital accounting lines if there are corresponding capital asset records | checkSelectForCapitalAccountingLines | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/web/struts/CapitalAssetInformationActionBase.java",
"license": "apache-2.0",
"size": 117732
} | [
"java.util.List",
"org.kuali.kfs.fp.businessobject.CapitalAccountingLines",
"org.kuali.kfs.fp.businessobject.CapitalAssetInformation",
"org.kuali.kfs.fp.document.CapitalAccountingLinesDocumentBase",
"org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase",
"org.kuali.rice.krad.util.ObjectUtils"
] | import java.util.List; import org.kuali.kfs.fp.businessobject.CapitalAccountingLines; import org.kuali.kfs.fp.businessobject.CapitalAssetInformation; import org.kuali.kfs.fp.document.CapitalAccountingLinesDocumentBase; import org.kuali.kfs.sys.web.struts.KualiAccountingDocumentFormBase; import org.kuali.rice.krad.util.... | import java.util.*; import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.sys.web.struts.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 128,964 |
public static LensSessionHandle valueOf(String sessionStr) {
try {
Unmarshaller unmarshaller = JAXB_CONTEXT.createUnmarshaller();
return (LensSessionHandle) unmarshaller.unmarshal(new StringReader(sessionStr));
} catch (JAXBException e) {
return null;
}
} | static LensSessionHandle function(String sessionStr) { try { Unmarshaller unmarshaller = JAXB_CONTEXT.createUnmarshaller(); return (LensSessionHandle) unmarshaller.unmarshal(new StringReader(sessionStr)); } catch (JAXBException e) { return null; } } | /**
* Value of.
*
* @param sessionStr
* the session str
* @return the lens session handle
*/ | Value of | valueOf | {
"repo_name": "prongs/grill",
"path": "lens-api/src/main/java/org/apache/lens/api/LensSessionHandle.java",
"license": "apache-2.0",
"size": 2846
} | [
"java.io.StringReader",
"javax.xml.bind.JAXBException",
"javax.xml.bind.Unmarshaller"
] | import java.io.StringReader; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,682,935 |
public CaseMarshallerFactory with(ObjectMarshallingStrategy custom) {
marshallers.add(custom);
this.toString.append(".with(new " + custom.getClass().getName() + "())");
return this;
} | CaseMarshallerFactory function(ObjectMarshallingStrategy custom) { marshallers.add(custom); this.toString.append(STR + custom.getClass().getName() + "())"); return this; } | /**
* Adds given custom marshalling strategy to be used by CaseFileMarshaller
* @param custom any marshalling strategy fully configured
* @return this factory instance
*/ | Adds given custom marshalling strategy to be used by CaseFileMarshaller | with | {
"repo_name": "droolsjbpm/jbpm",
"path": "jbpm-case-mgmt/jbpm-case-mgmt-impl/src/main/java/org/jbpm/casemgmt/impl/marshalling/CaseMarshallerFactory.java",
"license": "apache-2.0",
"size": 3955
} | [
"org.kie.api.marshalling.ObjectMarshallingStrategy"
] | import org.kie.api.marshalling.ObjectMarshallingStrategy; | import org.kie.api.marshalling.*; | [
"org.kie.api"
] | org.kie.api; | 111,680 |
@FIXVersion(introduced="4.2")
@TagNumRef(tagNum=TagNum.TradSesReqID)
public String getTradSesReqID() {
return tradSesReqID;
} | @FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.TradSesReqID) String function() { return tradSesReqID; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getTradSesReqID | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/TradingSessionStatusMsg.java",
"license": "gpl-3.0",
"size": 30000
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,701,151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.