method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void shutDown() {
for (ITmmModule module : modules) {
if (module.isEnabled()) {
try {
module.shutDown();
}
catch (Exception e) {
LOGGER.error("problem shutting down " + module.getModuleTitle() + ": " + e.getMessage());
}
}
}
try {
... | void function() { for (ITmmModule module : modules) { if (module.isEnabled()) { try { module.shutDown(); } catch (Exception e) { LOGGER.error(STR + module.getModuleTitle() + STR + e.getMessage()); } } } try { EntityManagerFactory emf = entityManager.getEntityManagerFactory(); entityManager.close(); emf.close(); } catch... | /**
* shutdown tmm - forces all registered modules to shut down
*/ | shutdown tmm - forces all registered modules to shut down | shutDown | {
"repo_name": "mlaggner/tinyMediaManager",
"path": "src/org/tinymediamanager/core/TmmModuleManager.java",
"license": "apache-2.0",
"size": 4089
} | [
"javax.persistence.EntityManagerFactory"
] | import javax.persistence.EntityManagerFactory; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 847,952 |
public ScriptEngine getSharedScriptEngine() {
return this.sharedScriptEngine;
}
| ScriptEngine function() { return this.sharedScriptEngine; } | /**
* ScriptEngines can be used multithreaded, except that they should not share Bindings
*
* @return the sharedScriptEngine
*/ | ScriptEngines can be used multithreaded, except that they should not share Bindings | getSharedScriptEngine | {
"repo_name": "WesGilster/Photonic3D",
"path": "host/src/main/java/org/area515/resinprinter/server/HostProperties.java",
"license": "gpl-3.0",
"size": 40557
} | [
"javax.script.ScriptEngine"
] | import javax.script.ScriptEngine; | import javax.script.*; | [
"javax.script"
] | javax.script; | 2,871,685 |
@Test
public void flappingTest() throws Exception
{
final CuratorFramework client =
CuratorFrameworkFactory.builder()
.connectString(server.getConnectString())
.retryPolicy(new RetryNTimes(1, 500))
.sessionTimeoutMs(30000)
.... | void function() throws Exception { final CuratorFramework client = CuratorFrameworkFactory.builder() .connectString(server.getConnectString()) .retryPolicy(new RetryNTimes(1, 500)) .sessionTimeoutMs(30000) .build(); final TestLeaderSelectorListener listener = new TestLeaderSelectorListener(); LeaderSelector leaderSelec... | /**
* Create a LeaderSelector but close the connection right after the "lock" znode
* has been created.
*
* @throws Exception
*/ | Create a LeaderSelector but close the connection right after the "lock" znode has been created | flappingTest | {
"repo_name": "mosoft521/curator",
"path": "curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorEdges.java",
"license": "apache-2.0",
"size": 9767
} | [
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"org.apache.curator.framework.CuratorFramework",
"org.apache.curator.framework.CuratorFrameworkFactory",
"org.apache.curator.retry.RetryNTimes",
"org.junit.jupiter.api.Assertions"
] | import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.RetryNTimes; import org.junit.jupiter.api.Assertions; | import java.util.concurrent.*; import org.apache.curator.framework.*; import org.apache.curator.retry.*; import org.junit.jupiter.api.*; | [
"java.util",
"org.apache.curator",
"org.junit.jupiter"
] | java.util; org.apache.curator; org.junit.jupiter; | 821,151 |
private void writeIfNotNull(@Nullable String value) throws IOException {
if (value != null) {
writeLine(value);
}
} | void function(@Nullable String value) throws IOException { if (value != null) { writeLine(value); } } | /**
* Writes {@code value} followed by a newline character if {@code value} is not null.
*/ | Writes value followed by a newline character if value is not null | writeIfNotNull | {
"repo_name": "chamikaramj/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/TextIO.java",
"license": "apache-2.0",
"size": 41618
} | [
"java.io.IOException",
"javax.annotation.Nullable"
] | import java.io.IOException; import javax.annotation.Nullable; | import java.io.*; import javax.annotation.*; | [
"java.io",
"javax.annotation"
] | java.io; javax.annotation; | 2,224,566 |
public static FunctionInfo of(Signature signature, List<DataType<?>> argumentTypes, DataType<?> returnType) {
return new FunctionInfo(
new FunctionIdent(signature.getName(), argumentTypes),
returnType,
signature.getKind(),
signature.getFeatures()
);
... | static FunctionInfo function(Signature signature, List<DataType<?>> argumentTypes, DataType<?> returnType) { return new FunctionInfo( new FunctionIdent(signature.getName(), argumentTypes), returnType, signature.getKind(), signature.getFeatures() ); } public FunctionInfo(FunctionIdent ident, DataType<?> returnType, Func... | /**
* Create FunctionInfo based on a declared signature which may contain type variable constraints.
* Thus concrete argument types and return type arguments are needed.
*/ | Create FunctionInfo based on a declared signature which may contain type variable constraints. Thus concrete argument types and return type arguments are needed | of | {
"repo_name": "EvilMcJerkface/crate",
"path": "server/src/main/java/io/crate/metadata/FunctionInfo.java",
"license": "apache-2.0",
"size": 5120
} | [
"io.crate.metadata.functions.Signature",
"io.crate.types.DataType",
"java.util.List",
"java.util.Set"
] | import io.crate.metadata.functions.Signature; import io.crate.types.DataType; import java.util.List; import java.util.Set; | import io.crate.metadata.functions.*; import io.crate.types.*; import java.util.*; | [
"io.crate.metadata",
"io.crate.types",
"java.util"
] | io.crate.metadata; io.crate.types; java.util; | 1,742,037 |
public Language getHmiDisplayLanguageDesired() {
return (Language) getObject(Language.class, KEY_HMI_DISPLAY_LANGUAGE_DESIRED);
}
| Language function() { return (Language) getObject(Language.class, KEY_HMI_DISPLAY_LANGUAGE_DESIRED); } | /**
* Gets an enumeration indicating what language the application intends to
* use for user interaction ( Display)
*
* @return Language - a Language value representing an enumeration
* indicating what language the application intends to use for user
* interaction ( Display)
* ... | Gets an enumeration indicating what language the application intends to use for user interaction ( Display) | getHmiDisplayLanguageDesired | {
"repo_name": "smartdevicelink/sdl_android",
"path": "base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java",
"license": "bsd-3-clause",
"size": 34039
} | [
"com.smartdevicelink.proxy.rpc.enums.Language"
] | import com.smartdevicelink.proxy.rpc.enums.Language; | import com.smartdevicelink.proxy.rpc.enums.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 2,806,414 |
@Override
public void visitNewArrayFunctionRef(ENewArrayFunctionRef userNewArrayFunctionRefNode, SemanticScope semanticScope) {
String canonicalTypeName = userNewArrayFunctionRefNode.getCanonicalTypeName();
if (semanticScope.getCondition(userNewArrayFunctionRefNode, Write.class)) {
... | void function(ENewArrayFunctionRef userNewArrayFunctionRefNode, SemanticScope semanticScope) { String canonicalTypeName = userNewArrayFunctionRefNode.getCanonicalTypeName(); if (semanticScope.getCondition(userNewArrayFunctionRefNode, Write.class)) { throw userNewArrayFunctionRefNode.createError(new IllegalArgumentExcep... | /**
* Visits a new array function ref expression which covers only a new array function reference
* and generates an internal method to define the new array.
* Checks: type validation
*/ | Visits a new array function ref expression which covers only a new array function reference and generates an internal method to define the new array. Checks: type validation | visitNewArrayFunctionRef | {
"repo_name": "nknize/elasticsearch",
"path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultSemanticAnalysisPhase.java",
"license": "apache-2.0",
"size": 149793
} | [
"java.util.Collections",
"org.elasticsearch.painless.FunctionRef",
"org.elasticsearch.painless.node.ENewArrayFunctionRef",
"org.elasticsearch.painless.symbol.Decorations",
"org.elasticsearch.painless.symbol.ScriptScope",
"org.elasticsearch.painless.symbol.SemanticScope"
] | import java.util.Collections; import org.elasticsearch.painless.FunctionRef; import org.elasticsearch.painless.node.ENewArrayFunctionRef; import org.elasticsearch.painless.symbol.Decorations; import org.elasticsearch.painless.symbol.ScriptScope; import org.elasticsearch.painless.symbol.SemanticScope; | import java.util.*; import org.elasticsearch.painless.*; import org.elasticsearch.painless.node.*; import org.elasticsearch.painless.symbol.*; | [
"java.util",
"org.elasticsearch.painless"
] | java.util; org.elasticsearch.painless; | 470,076 |
protected String checkContentType(RIDRequestObject reqObj, String[] types) {
List allowed = reqObj.getAllowedContentTypes();
String s;
if ( log.isDebugEnabled() ) log.debug(" check against:"+allowed);
for ( int i = 0, len = types.length ; i < len ; i++ ) {
s = types[i];
if ( log.isDebugEnabled() ) log.... | String function(RIDRequestObject reqObj, String[] types) { List allowed = reqObj.getAllowedContentTypes(); String s; if ( log.isDebugEnabled() ) log.debug(STR+allowed); for ( int i = 0, len = types.length ; i < len ; i++ ) { s = types[i]; if ( log.isDebugEnabled() ) log.debug(STR+s+":"+allowed.contains( s )+STR+s.subst... | /**
* Checks if one of the given content types are allowed.
* <p>
*
*
* @param reqObj The RID request object.
* @param types Array of content types that can be used.
*
* @return The content type that is allowed by the request or null.
*/ | Checks if one of the given content types are allowed. | checkContentType | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4JBOSS_2_4_7/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/RIDSupport.java",
"license": "apache-2.0",
"size": 26825
} | [
"java.util.List",
"org.dcm4chex.wado.common.RIDRequestObject"
] | import java.util.List; import org.dcm4chex.wado.common.RIDRequestObject; | import java.util.*; import org.dcm4chex.wado.common.*; | [
"java.util",
"org.dcm4chex.wado"
] | java.util; org.dcm4chex.wado; | 2,463,123 |
public Serializable context_getEJBLocalObject() throws RemoteException; | Serializable function() throws RemoteException; | /**
* Insert the method's description here.
* Creation date: (08/07/2002)
*/ | Insert the method's description here. Creation date: (08/07/2002) | context_getEJBLocalObject | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XSFRemoteSpecEJB.jar/src/com/ibm/ejb2x/base/spec/sfr/ejb/SFRa.java",
"license": "epl-1.0",
"size": 10102
} | [
"java.io.Serializable",
"java.rmi.RemoteException"
] | import java.io.Serializable; import java.rmi.RemoteException; | import java.io.*; import java.rmi.*; | [
"java.io",
"java.rmi"
] | java.io; java.rmi; | 2,204,146 |
public static final String getQueryString(Map params) {
if(params == null) {
return null;
}
StringBuffer queryString = new StringBuffer();
for(Iterator keys = params.keySet().iterator(); keys.hasNext();) {
String key = (String) keys.... | static final String function(Map params) { if(params == null) { return null; } StringBuffer queryString = new StringBuffer(); for(Iterator keys = params.keySet().iterator(); keys.hasNext();) { String key = (String) keys.next(); String value = (String) params.get(key); if (queryString.length() == 0) { queryString.append... | /**
* Compose a map of key=value params into a query string.
*/ | Compose a map of key=value params into a query string | getQueryString | {
"repo_name": "paulnguyen/cmpe279",
"path": "eclipse/Roller/src/org/apache/roller/util/URLUtilities.java",
"license": "apache-2.0",
"size": 13040
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 12,261 |
@Test
public void testStatementWritesVariable() throws Exception {
VPMGraph graph = TestUtil.prepareVPMGraph(BASE_PATH_EXTENDED + "StatementWritesVariable/");
VPMAnalyzerResult result = analyzer.analyze(graph);
assertNodeCount(graph, 4);
assertDependency(result, DependencyType.... | void function() throws Exception { VPMGraph graph = TestUtil.prepareVPMGraph(BASE_PATH_EXTENDED + STR); VPMAnalyzerResult result = analyzer.analyze(graph); assertNodeCount(graph, 4); assertDependency(result, DependencyType.StatementWritesVariable, 2); } | /**
* Test method writing a new value to a variable.
*
* @throws Exception
* Identifies a failed diffing.
*/ | Test method writing a new value to a variable | testStatementWritesVariable | {
"repo_name": "kopl/SPLevo",
"path": "JaMoPPCartridge/org.splevo.jamopp.vpm.analyzer.programdependency.tests/src/org/splevo/jamopp/vpm/analyzer/programdependency/tests/RobillardExtendedSelectorTest.java",
"license": "epl-1.0",
"size": 22481
} | [
"org.splevo.jamopp.vpm.analyzer.programdependency.references.DependencyType",
"org.splevo.jamopp.vpm.analyzer.programdependency.tests.TestUtil",
"org.splevo.vpm.analyzer.VPMAnalyzerResult",
"org.splevo.vpm.analyzer.graph.VPMGraph"
] | import org.splevo.jamopp.vpm.analyzer.programdependency.references.DependencyType; import org.splevo.jamopp.vpm.analyzer.programdependency.tests.TestUtil; import org.splevo.vpm.analyzer.VPMAnalyzerResult; import org.splevo.vpm.analyzer.graph.VPMGraph; | import org.splevo.jamopp.vpm.analyzer.programdependency.references.*; import org.splevo.jamopp.vpm.analyzer.programdependency.tests.*; import org.splevo.vpm.analyzer.*; import org.splevo.vpm.analyzer.graph.*; | [
"org.splevo.jamopp",
"org.splevo.vpm"
] | org.splevo.jamopp; org.splevo.vpm; | 2,268,156 |
@Test
public void updateSearchIndexTest() throws Exception {
final SearchIndexer searchIndexer = Mockito.mock(SearchIndexer.class);
final JobContextHolderImpl jobContextHolderImpl = new JobContextHolderImpl(null,searchIndexer,null,null);
jobContextHolderImpl.updateSearchIndex();
Mockito.verify(searchIndexer... | void function() throws Exception { final SearchIndexer searchIndexer = Mockito.mock(SearchIndexer.class); final JobContextHolderImpl jobContextHolderImpl = new JobContextHolderImpl(null,searchIndexer,null,null); jobContextHolderImpl.updateSearchIndex(); Mockito.verify(searchIndexer,Mockito.only()).updateSearchIndex(); ... | /**
* Update search index test.
*
* @throws Exception the exception
*/ | Update search index test | updateSearchIndexTest | {
"repo_name": "Hack23/cia",
"path": "service.impl/src/test/java/com/hack23/cia/service/impl/task/JobContextHolderImplTest.java",
"license": "apache-2.0",
"size": 2806
} | [
"com.hack23.cia.service.data.api.SearchIndexer",
"org.mockito.Mockito"
] | import com.hack23.cia.service.data.api.SearchIndexer; import org.mockito.Mockito; | import com.hack23.cia.service.data.api.*; import org.mockito.*; | [
"com.hack23.cia",
"org.mockito"
] | com.hack23.cia; org.mockito; | 2,386,318 |
private final void setDefaultAntiAliasingState() {
// Most accurate technique, but not available on all OSes.
aaHints = RSyntaxUtilities.getDesktopAntiAliasHints();
if (aaHints==null) {
Map<RenderingHints.Key, Object> temp =
new HashMap<RenderingHints.Key, Object>();
// In Java 6+, you can figure... | final void function() { aaHints = RSyntaxUtilities.getDesktopAntiAliasHints(); if (aaHints==null) { Map<RenderingHints.Key, Object> temp = new HashMap<RenderingHints.Key, Object>(); JLabel label = new JLabel(); FontMetrics fm = label.getFontMetrics(label.getFont()); Object hint = null; try { Method m = FontMetrics.clas... | /**
* Sets anti-aliasing to whatever the user's desktop value is.
*
* @see #getAntiAliasingEnabled()
*/ | Sets anti-aliasing to whatever the user's desktop value is | setDefaultAntiAliasingState | {
"repo_name": "buffis/ESPlorer",
"path": "ESPlorer/src/org/fife/ui/rsyntaxtextarea/RSyntaxTextArea.java",
"license": "gpl-2.0",
"size": 92142
} | [
"java.awt.FontMetrics",
"java.awt.RenderingHints",
"java.awt.font.FontRenderContext",
"java.lang.reflect.Method",
"java.util.HashMap",
"java.util.Map",
"javax.swing.JLabel"
] | import java.awt.FontMetrics; import java.awt.RenderingHints; import java.awt.font.FontRenderContext; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import javax.swing.JLabel; | import java.awt.*; import java.awt.font.*; import java.lang.reflect.*; import java.util.*; import javax.swing.*; | [
"java.awt",
"java.lang",
"java.util",
"javax.swing"
] | java.awt; java.lang; java.util; javax.swing; | 269,566 |
public static OneResponse delVnet(Client client, int id, int zoneId, int vnetId)
{
return client.call(DELVNET, id, zoneId, vnetId);
} | static OneResponse function(Client client, int id, int zoneId, int vnetId) { return client.call(DELVNET, id, zoneId, vnetId); } | /**
* Deletes a vnet from this VDC
*
* @param client XML-RPC Client.
* @param id The vdc id of the target vdc
* @param zoneId The vnet's zone
* @param vnetId The vnet to delete
* @return If an error occurs the error message contains the reason.
*/ | Deletes a vnet from this VDC | delVnet | {
"repo_name": "baby-gnu/one",
"path": "src/oca/java/src/org/opennebula/client/vdc/Vdc.java",
"license": "apache-2.0",
"size": 14690
} | [
"org.opennebula.client.Client",
"org.opennebula.client.OneResponse"
] | import org.opennebula.client.Client; import org.opennebula.client.OneResponse; | import org.opennebula.client.*; | [
"org.opennebula.client"
] | org.opennebula.client; | 2,532,451 |
@Test
public void testIsAroundOK() {
try {
final Calendar calendar1 = Calendar.getInstance();
final Calendar calendar2 = Calendar.getInstance();
calendar1.set(2016, 05, 29, 5, 5, 6);
calendar2.set(2016, 05, 29, 5, 5, 5);
LocalDateTim... | void function() { try { final Calendar calendar1 = Calendar.getInstance(); final Calendar calendar2 = Calendar.getInstance(); calendar1.set(2016, 05, 29, 5, 5, 6); calendar2.set(2016, 05, 29, 5, 5, 5); LocalDateTime localDateTime1 = DateUtils.getLocalDateTime(calendar1); final LocalDateTime localDateTime2 = DateUtils.g... | /**
* Test method for {@link AssertCalendar#isAround}.
*/ | Test method for <code>AssertCalendar#isAround</code> | testIsAroundOK | {
"repo_name": "Gilandel/utils-assertor",
"path": "src/test/java/fr/landel/utils/assertor/predicate/PredicateAssertorTemporalTest.java",
"license": "apache-2.0",
"size": 31319
} | [
"fr.landel.utils.assertor.Assertor",
"fr.landel.utils.commons.DateUtils",
"java.time.Duration",
"java.time.LocalDateTime",
"java.time.chrono.ChronoLocalDateTime",
"java.time.temporal.ChronoUnit",
"java.util.Calendar",
"org.junit.Assert"
] | import fr.landel.utils.assertor.Assertor; import fr.landel.utils.commons.DateUtils; import java.time.Duration; import java.time.LocalDateTime; import java.time.chrono.ChronoLocalDateTime; import java.time.temporal.ChronoUnit; import java.util.Calendar; import org.junit.Assert; | import fr.landel.utils.assertor.*; import fr.landel.utils.commons.*; import java.time.*; import java.time.chrono.*; import java.time.temporal.*; import java.util.*; import org.junit.*; | [
"fr.landel.utils",
"java.time",
"java.util",
"org.junit"
] | fr.landel.utils; java.time; java.util; org.junit; | 2,832,222 |
@Override
public void uid(Field uid) {
this.uid = uid;
} | void function(Field uid) { this.uid = uid; } | /**
* Really, just the uid mapper should set this.
*/ | Really, just the uid mapper should set this | uid | {
"repo_name": "jpountz/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/mapper/ParseContext.java",
"license": "apache-2.0",
"size": 22520
} | [
"org.apache.lucene.document.Field"
] | import org.apache.lucene.document.Field; | import org.apache.lucene.document.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 448,274 |
public List getAll() throws Exception
{
log.trace("In OrganManagerImpl.getAll");
return super.getAll(Organ.class);
} | List function() throws Exception { log.trace(STR); return super.getAll(Organ.class); } | /**
* Get all Organ objects
*
*
* @return the matching Organ objects, or null if not found.
*
* @exception Exception
* when anything goes wrong.
*/ | Get all Organ objects | getAll | {
"repo_name": "NCIP/camod",
"path": "software/camod/src/gov/nih/nci/camod/service/impl/OrganManagerImpl.java",
"license": "bsd-3-clause",
"size": 5248
} | [
"gov.nih.nci.camod.domain.Organ",
"java.util.List"
] | import gov.nih.nci.camod.domain.Organ; import java.util.List; | import gov.nih.nci.camod.domain.*; import java.util.*; | [
"gov.nih.nci",
"java.util"
] | gov.nih.nci; java.util; | 1,662,022 |
void setDefaultBacklogDebugger(InterceptStrategy backlogDebugger); | void setDefaultBacklogDebugger(InterceptStrategy backlogDebugger); | /**
* Sets a custom backlog debugger to be used as the default backlog debugger.
* <p/>
* <b>Note:</b> This must be set before any routes are created,
* changing the default backlog debugger for existing routes is not supported.
*
* @param backlogDebugger the custom debugger to use as defa... | Sets a custom backlog debugger to be used as the default backlog debugger. Note: This must be set before any routes are created, changing the default backlog debugger for existing routes is not supported | setDefaultBacklogDebugger | {
"repo_name": "ssharma/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 72840
} | [
"org.apache.camel.spi.InterceptStrategy"
] | import org.apache.camel.spi.InterceptStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,641,449 |
public Entity getEntity(World world) {
return handle.getEntityModifier(world).read(0);
} | Entity function(World world) { return handle.getEntityModifier(world).read(0); } | /**
* Retrieve the entity.
* @param world - the current world of the entity.
* @return The entity.
*/ | Retrieve the entity | getEntity | {
"repo_name": "codebucketdev/HoloAPI",
"path": "src/com/comphenix/packetwrapper/WrapperPlayServerUpdateAttributes.java",
"license": "gpl-3.0",
"size": 2069
} | [
"org.bukkit.World",
"org.bukkit.entity.Entity"
] | import org.bukkit.World; import org.bukkit.entity.Entity; | import org.bukkit.*; import org.bukkit.entity.*; | [
"org.bukkit",
"org.bukkit.entity"
] | org.bukkit; org.bukkit.entity; | 2,197,157 |
public boolean result(final Object iRecord) {
final ORecordAbstract<?> record = (ORecordAbstract<?>) iRecord;
if (record.getIdentity().isValid()) {
// RESET VERSION TO DISABLE MVCC AVOIDING THE CONCURRENT EXCEPTION IF LOCAL CACHE IS NOT UPDATED
record.getRecordVersion().disable();
record.de... | boolean function(final Object iRecord) { final ORecordAbstract<?> record = (ORecordAbstract<?>) iRecord; if (record.getIdentity().isValid()) { record.getRecordVersion().disable(); record.delete(); recordCount++; return true; } return false; } | /**
* Delete the current record.
*/ | Delete the current record | result | {
"repo_name": "delebash/orientdb-parent",
"path": "core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLDelete.java",
"license": "apache-2.0",
"size": 7950
} | [
"com.orientechnologies.orient.core.record.ORecordAbstract"
] | import com.orientechnologies.orient.core.record.ORecordAbstract; | import com.orientechnologies.orient.core.record.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 946,860 |
@Test
public void testRpcValues() {
// Test Values
ButtonName testButtonName = ((SubscribeButton) msg).getButtonName();
// Valid Tests
assertEquals("Data didn't match input data.", TestValues.GENERAL_BUTTONNAME, testButtonName);
// Invalid/Null Tests
SubscribeBu... | void function() { ButtonName testButtonName = ((SubscribeButton) msg).getButtonName(); assertEquals(STR, TestValues.GENERAL_BUTTONNAME, testButtonName); SubscribeButton msg = new SubscribeButton(); assertNotNull(TestValues.NOT_NULL, msg); testNullBase(msg); assertNull(TestValues.NULL, msg.getButtonName()); } | /**
* Tests the expected values of the RPC message.
*/ | Tests the expected values of the RPC message | testRpcValues | {
"repo_name": "smartdevicelink/sdl_android",
"path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java",
"license": "bsd-3-clause",
"size": 3763
} | [
"com.smartdevicelink.proxy.rpc.SubscribeButton",
"com.smartdevicelink.proxy.rpc.enums.ButtonName",
"com.smartdevicelink.test.TestValues",
"junit.framework.TestCase"
] | import com.smartdevicelink.proxy.rpc.SubscribeButton; import com.smartdevicelink.proxy.rpc.enums.ButtonName; import com.smartdevicelink.test.TestValues; import junit.framework.TestCase; | import com.smartdevicelink.proxy.rpc.*; import com.smartdevicelink.proxy.rpc.enums.*; import com.smartdevicelink.test.*; import junit.framework.*; | [
"com.smartdevicelink.proxy",
"com.smartdevicelink.test",
"junit.framework"
] | com.smartdevicelink.proxy; com.smartdevicelink.test; junit.framework; | 2,422,005 |
private static SearchResults doUnfilteredSearch(SearchTarget target, SearchRepository userRepo)
{
LOG.info("unfiltered search");
Map<String, WebSearchable> wsMap = new HashMap<String, WebSearchable>();
Map<WebSearchable, Float> hitMap = new HashMap<WebSearchable, Float>();
Map<We... | static SearchResults function(SearchTarget target, SearchRepository userRepo) { LOG.info(STR); Map<String, WebSearchable> wsMap = new HashMap<String, WebSearchable>(); Map<WebSearchable, Float> hitMap = new HashMap<WebSearchable, Float>(); Map<WebSearchable, String> descs = new HashMap<WebSearchable, String>(); Map<Web... | /**
* Return all the available objects in the requested scope in a set of search results.
* @param target a parameter object containing information about the scope of the search.
* @param userRepo The current user's search repository.
* @return A set of search results.
*/ | Return all the available objects in the requested scope in a set of search results | doUnfilteredSearch | {
"repo_name": "zebrafishmine/intermine",
"path": "intermine/api/main/src/org/intermine/api/search/SearchResults.java",
"license": "lgpl-2.1",
"size": 15662
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.intermine.api.profile.TagManager",
"org.intermine.api.profile.TagManagerFactory"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.intermine.api.profile.TagManager; import org.intermine.api.profile.TagManagerFactory; | import java.util.*; import org.intermine.api.profile.*; | [
"java.util",
"org.intermine.api"
] | java.util; org.intermine.api; | 1,467,000 |
public PDFileSpecification getFile() throws IOException {
return PDFileSpecification.createFS(fdf.getDictionaryObject(COSName.F));
} | PDFileSpecification function() throws IOException { return PDFileSpecification.createFS(fdf.getDictionaryObject(COSName.F)); } | /**
* The source file or target file: the PDF document file that this FDF file was exported from or is intended to be
* imported into.
*
* @return The F entry of the FDF dictionary.
* @throws IOException If there is an error creating the file spec.
*/ | The source file or target file: the PDF document file that this FDF file was exported from or is intended to be imported into | getFile | {
"repo_name": "gavanx/pdflearn",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDictionary.java",
"license": "apache-2.0",
"size": 15646
} | [
"java.io.IOException",
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification"
] | import java.io.IOException; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification; | import java.io.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.filespecification.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 2,814,025 |
public static GemFireCacheImpl getForPdx(String reason) {
GemFireCacheImpl result = pdxInstance;
if (result == null) {
throw new CacheClosedException(reason);
}
return result;
} | static GemFireCacheImpl function(String reason) { GemFireCacheImpl result = pdxInstance; if (result == null) { throw new CacheClosedException(reason); } return result; } | /**
* Pdx is allowed to obtain the cache even while it is being closed
*/ | Pdx is allowed to obtain the cache even while it is being closed | getForPdx | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java",
"license": "apache-2.0",
"size": 186222
} | [
"org.apache.geode.cache.CacheClosedException"
] | import org.apache.geode.cache.CacheClosedException; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,073,245 |
return new BracePair[] {
new BracePair(CourierTypes.OPEN_BRACE, CourierTypes.CLOSE_BRACE, true),
new BracePair(CourierTypes.OPEN_BRACKET, CourierTypes.CLOSE_BRACKET, false),
new BracePair(CourierTypes.OPEN_PAREN, CourierTypes.CLOSE_PAREN, false)
//new BracePair(SchemadocTypes.DOC_COMMENT_START, ... | return new BracePair[] { new BracePair(CourierTypes.OPEN_BRACE, CourierTypes.CLOSE_BRACE, true), new BracePair(CourierTypes.OPEN_BRACKET, CourierTypes.CLOSE_BRACKET, false), new BracePair(CourierTypes.OPEN_PAREN, CourierTypes.CLOSE_PAREN, false) }; } | /**
* Returns the array of definitions for brace pairs that need to be matched when
* editing code in the language.
*
* @return the array of brace pair definitions.
*/ | Returns the array of definitions for brace pairs that need to be matched when editing code in the language | getPairs | {
"repo_name": "coursera/courier",
"path": "idea-plugin/src/org/coursera/courier/CourierBraceMatcher.java",
"license": "apache-2.0",
"size": 2195
} | [
"com.intellij.lang.BracePair",
"org.coursera.courier.psi.CourierTypes"
] | import com.intellij.lang.BracePair; import org.coursera.courier.psi.CourierTypes; | import com.intellij.lang.*; import org.coursera.courier.psi.*; | [
"com.intellij.lang",
"org.coursera.courier"
] | com.intellij.lang; org.coursera.courier; | 1,511,777 |
public Timestamp getCreated();
public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR; | /** Get Created.
* Date this record was created
*/ | Get Created. Date this record was created | getCreated | {
"repo_name": "pplatek/adempiere",
"path": "base/src/org/compiere/model/I_PA_Report.java",
"license": "gpl-2.0",
"size": 9202
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,272,507 |
public Object decode(Object pObject) throws DecoderException {
if (pObject instanceof byte[]) {
return decode((byte[]) pObject);
} else if (pObject instanceof String) {
return decode((String) pObject);
} else {
throw new DecoderException("Par... | Object function(Object pObject) throws DecoderException { if (pObject instanceof byte[]) { return decode((byte[]) pObject); } else if (pObject instanceof String) { return decode((String) pObject); } else { throw new DecoderException(STR); } } | /**
* Decodes an Object using the base64 algorithm. This method is provided in order to satisfy the requirements of the
* Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String.
*
* @param pObject
* Object to decode
* @... | Decodes an Object using the base64 algorithm. This method is provided in order to satisfy the requirements of the Decoder interface, and will throw a DecoderException if the supplied object is not of type byte[] or String | decode | {
"repo_name": "jdgiotta/braintree_java",
"path": "src/main/java/com/braintreegateway/org/apache/commons/codec/binary/Base64.java",
"license": "mit",
"size": 41863
} | [
"com.braintreegateway.org.apache.commons.codec.DecoderException"
] | import com.braintreegateway.org.apache.commons.codec.DecoderException; | import com.braintreegateway.org.apache.commons.codec.*; | [
"com.braintreegateway.org"
] | com.braintreegateway.org; | 1,013,258 |
private String defaultLookAndFeel() {
return (System.getProperty("os.name", "").toLowerCase().indexOf("linux") != -1) ?
UIManager.getCrossPlatformLookAndFeelClassName()
:
UIManager.getSystemLookAndFeelClassName();
}
| String function() { return (System.getProperty(STR, STRlinux") != -1) ? UIManager.getCrossPlatformLookAndFeelClassName() : UIManager.getSystemLookAndFeelClassName(); } | /**
* Returns the default LAF. Under Linux, GTK+ is the default but because it
* has too many problems, the Metal LAF is used instead.
*/ | Returns the default LAF. Under Linux, GTK+ is the default but because it has too many problems, the Metal LAF is used instead | defaultLookAndFeel | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/FrameworkApplication.java",
"license": "epl-1.0",
"size": 35396
} | [
"javax.swing.UIManager"
] | import javax.swing.UIManager; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,547,697 |
public final BatchRequest batch() {
return batch(null);
} | final BatchRequest function() { return batch(null); } | /**
* Create an {@link BatchRequest} object from this Google API client instance.
*
* <p>Sample usage:
*
* <pre>{@code
* client.batch()
* .queue(...)
* .queue(...)
* .execute();
* }</pre>
*
* @return newly created Batch request
*/ | Create an <code>BatchRequest</code> object from this Google API client instance. Sample usage: <code>client.batch() .queue(...) .queue(...) .execute(); </code> | batch | {
"repo_name": "googleapis/google-api-java-client",
"path": "google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClient.java",
"license": "apache-2.0",
"size": 17451
} | [
"com.google.api.client.googleapis.batch.BatchRequest"
] | import com.google.api.client.googleapis.batch.BatchRequest; | import com.google.api.client.googleapis.batch.*; | [
"com.google.api"
] | com.google.api; | 2,311,353 |
public Intent offerSuperUser(Activity activity, int requestCode) {
RootTools.log("Launching Market for SuperUser");
Intent i = new Intent(Intent.ACTION_VIEW,
Uri.parse("market://details?id=com.noshufou.android.su"));
activity.startActivityForResult(i, requestCode);
re... | Intent function(Activity activity, int requestCode) { RootTools.log(STR); Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("market: activity.startActivityForResult(i, requestCode); return i; } | /**
* This will launch the Android market looking for SuperUser, but will return the intent fired
* and starts the activity with startActivityForResult
*
* @param activity pass in your Activity
* @param requestCode pass in the request code
* @return intent fired
*/ | This will launch the Android market looking for SuperUser, but will return the intent fired and starts the activity with startActivityForResult | offerSuperUser | {
"repo_name": "Morlunk/Mountie",
"path": "app/src/main/java/com/stericson/RootTools/internal/RootToolsInternalMethods.java",
"license": "gpl-3.0",
"size": 54666
} | [
"android.app.Activity",
"android.content.Intent",
"android.net.Uri",
"com.stericson.RootTools"
] | import android.app.Activity; import android.content.Intent; import android.net.Uri; import com.stericson.RootTools; | import android.app.*; import android.content.*; import android.net.*; import com.stericson.*; | [
"android.app",
"android.content",
"android.net",
"com.stericson"
] | android.app; android.content; android.net; com.stericson; | 2,009,177 |
public Observable<ServiceResponse<Void>> beginRestartWithServiceResponseAsync(String resourceGroupName, String serverName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String serverName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serverName == null) { throw new IllegalArgumentException(STR); ... | /**
* Restarts a server.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @throws IllegalArgumentException thrown if parameters fail ... | Restarts a server | beginRestartWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/postgresql/mgmt-v2017_12_01/src/main/java/com/microsoft/azure/management/postgresql/v2017_12_01/implementation/ServersInner.java",
"license": "mit",
"size": 61570
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,886,040 |
public Map<String,ProteinData> getProteins(String ref, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(ref);
TypeReference<List<Map<String,ProteinData>>> retType = new TypeReference<List<Map<String,ProteinData>>>()... | Map<String,ProteinData> function(String ref, RpcContext... jsonRpcContext) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ref); TypeReference<List<Map<String,ProteinData>>> retType = new TypeReference<List<Map<String,ProteinData>>>() {}; List<Map<String,ProteinData>> res... | /**
* <p>Original spec-file function name: get_proteins</p>
* <pre>
* *
* * Retrieve Protein data available in this GenomeAnnotation.
* *
* </pre>
* @param ref instance of original type "ObjectReference"
* @return instance of mapping from String to type {@link us.kbase.geno... | Original spec-file function name: get_proteins <code> Retrieve Protein data available in this GenomeAnnotation. </code> | getProteins | {
"repo_name": "scanon/data_api2",
"path": "lib/src/us/kbase/genomeannotaitonapi/GenomeAnnotaitonApiClient.java",
"license": "mit",
"size": 24864
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.RpcContext"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.RpcContext; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 733,194 |
ServiceResponse<Void> updatePetWithForm(String petId) throws ServiceException, IOException, IllegalArgumentException; | ServiceResponse<Void> updatePetWithForm(String petId) throws ServiceException, IOException, IllegalArgumentException; | /**
* Updates a pet in the store with form data.
*
* @param petId ID of pet that needs to be updated
* @throws ServiceException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from... | Updates a pet in the store with form data | updatePetWithForm | {
"repo_name": "xingwu1/autorest",
"path": "Samples/petstore/Java/SwaggerPetstore.java",
"license": "mit",
"size": 35698
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,510,970 |
public static JButton button(String name, Action action) {
JButton ret = button(name);
ret.setAction(action);
return ret;
} | static JButton function(String name, Action action) { JButton ret = button(name); ret.setAction(action); return ret; } | /**
* A convenience method to initialize a button with an action
*
* @param name
* @param action
* @return
*/ | A convenience method to initialize a button with an action | button | {
"repo_name": "SteppingStone/sstone-dat",
"path": "src/main/java/org/edc/sstone/dat/util/SAFUtil.java",
"license": "gpl-3.0",
"size": 5005
} | [
"javax.swing.Action",
"javax.swing.JButton"
] | import javax.swing.Action; import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,502,575 |
private void upload (GBFile file) throws ClientException, IOException {
// If the file is a folder
if (file.isDirectory()) {
// Create the folder in the storage
client.createDirectory(file);
// And create enw works, to upload each file
for (GBFile c... | void function (GBFile file) throws ClientException, IOException { if (file.isDirectory()) { client.createDirectory(file); for (GBFile child : file.getChildren()) { manager.addWork(new Work(child, Work.WorkKind.UPLOAD)); } return; } client.uploadFile(file); } | /**
* Download the file if a file, schedule multiple upload if a folder
* @param file File to upload
* @throws ClientException
* @throws IOException
*/ | Download the file if a file, schedule multiple upload if a folder | upload | {
"repo_name": "simonedegiacomi/goboxclient",
"path": "src/main/java/it/simonedegiacomi/sync/Employee.java",
"license": "gpl-2.0",
"size": 4909
} | [
"it.simonedegiacomi.goboxapi.GBFile",
"it.simonedegiacomi.goboxapi.client.ClientException",
"java.io.IOException"
] | import it.simonedegiacomi.goboxapi.GBFile; import it.simonedegiacomi.goboxapi.client.ClientException; import java.io.IOException; | import it.simonedegiacomi.goboxapi.*; import it.simonedegiacomi.goboxapi.client.*; import java.io.*; | [
"it.simonedegiacomi.goboxapi",
"java.io"
] | it.simonedegiacomi.goboxapi; java.io; | 2,414,143 |
protected String getXMLPropertySet(String message) {
if (saveable) {
try {
saveToFile();
} catch (IOException e) {
}
}
String xml;
if (message == null) {
xml = getXMLPropertySetInit();
} else {
xml = getXMLPropertySetInit(message);
}
List<INDIElemen... | String function(String message) { if (saveable) { try { saveToFile(); } catch (IOException e) { } } String xml; if (message == null) { xml = getXMLPropertySetInit(); } else { xml = getXMLPropertySetInit(message); } List<INDIElement> elem = getElementsAsList(); for (int i = 0 ; i < elem.size() ; i++) { xml += elem.get(i... | /**
* Gets the XML code to set the values of the property with a
* <code>message</code>. Should not usually be called by the Drivers.
*
* @param message An message to be sent to the client when setting the values
* of the property.
* @return The XML code to set the values of the property.
*/ | Gets the XML code to set the values of the property with a <code>message</code>. Should not usually be called by the Drivers | getXMLPropertySet | {
"repo_name": "farom57/AstroidDriver",
"path": "src/laazotea/indi/driver/INDIProperty.java",
"license": "gpl-2.0",
"size": 17304
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 275,408 |
public static ims.core.clinical.domain.objects.PatientAllergy extractPatientAllergy(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientAllergyForSummaryOverviewVo valueObject)
{
return extractPatientAllergy(domainFactory, valueObject, new HashMap());
}
| static ims.core.clinical.domain.objects.PatientAllergy function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientAllergyForSummaryOverviewVo valueObject) { return extractPatientAllergy(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractPatientAllergy | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientAllergyForSummaryOverviewVoAssembler.java",
"license": "agpl-3.0",
"size": 17259
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,676,230 |
@Override
protected void postSetUpdate(StreamWindowEvent<Tuple> event,
Object partition, LinkedList<I> tuples) throws Exception {
switch (event.getType()) {
case INSERTION:
aggregate(partition, tuples);
break;
default:
break;
}
... | void function(StreamWindowEvent<Tuple> event, Object partition, LinkedList<I> tuples) throws Exception { switch (event.getType()) { case INSERTION: aggregate(partition, tuples); break; default: break; } } | /**
* For a count based window, the eviction precedes the
* insertion, but should be seen as a single action,
* so the eviction does not result in calling the function.
* It will be immediately followed by the INSERTION
*which will result in the call back.
*/ | For a count based window, the eviction precedes the insertion, but should be seen as a single action, so the eviction does not result in calling the function. It will be immediately followed by the INSERTION which will result in the call back | postSetUpdate | {
"repo_name": "ibmkendrick/streamsx.topology",
"path": "java/src/com/ibm/streamsx/topology/internal/functional/window/ContinuousAggregatorCountEvict.java",
"license": "apache-2.0",
"size": 1508
} | [
"com.ibm.streams.operator.Tuple",
"com.ibm.streams.operator.window.StreamWindowEvent",
"java.util.LinkedList"
] | import com.ibm.streams.operator.Tuple; import com.ibm.streams.operator.window.StreamWindowEvent; import java.util.LinkedList; | import com.ibm.streams.operator.*; import com.ibm.streams.operator.window.*; import java.util.*; | [
"com.ibm.streams",
"java.util"
] | com.ibm.streams; java.util; | 2,433,987 |
private void sendSensorStopListeningIntent() {
Intent i = new Intent(Sensor.Intents.SENSOR_UNREGISTER_LISTENER_INTENT);
i.putExtra(Sensor.Intents.EXTRA_SENSOR_ID, mSensorId);
sendToHostApp(i);
} | void function() { Intent i = new Intent(Sensor.Intents.SENSOR_UNREGISTER_LISTENER_INTENT); i.putExtra(Sensor.Intents.EXTRA_SENSOR_ID, mSensorId); sendToHostApp(i); } | /**
* Send stop listening intent to host application
*
* @see Sensor.Intents#SENSOR_UNREGISTER_LISTENER_INTENT
*/ | Send stop listening intent to host application | sendSensorStopListeningIntent | {
"repo_name": "einvalentin/buildwatch",
"path": "3rdParty/SmartExtensionUtils/src/com/sonyericsson/extras/liveware/extension/util/sensor/AccessorySensor.java",
"license": "apache-2.0",
"size": 12739
} | [
"android.content.Intent",
"com.sonyericsson.extras.liveware.aef.sensor.Sensor"
] | import android.content.Intent; import com.sonyericsson.extras.liveware.aef.sensor.Sensor; | import android.content.*; import com.sonyericsson.extras.liveware.aef.sensor.*; | [
"android.content",
"com.sonyericsson.extras"
] | android.content; com.sonyericsson.extras; | 1,427,993 |
public T caseAssociation(Association object) {
return null;
} | T function(Association object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Association</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of int... | Returns the result of interpreting the object as an instance of 'Association'. This implementation returns null; returning a non-null result will terminate the switch. | caseAssociation | {
"repo_name": "romartin/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/util/Bpmn2Switch.java",
"license": "apache-2.0",
"size": 144865
} | [
"org.eclipse.bpmn2.Association"
] | import org.eclipse.bpmn2.Association; | import org.eclipse.bpmn2.*; | [
"org.eclipse.bpmn2"
] | org.eclipse.bpmn2; | 1,340,527 |
public boolean isNativeImplementation() {
return false;
}
private static final AtomicReference<CommandLine> sCommandLine =
new AtomicReference<CommandLine>(); | boolean function() { return false; } private static final AtomicReference<CommandLine> sCommandLine = new AtomicReference<CommandLine>(); | /**
* Determine if the command line is bound to the native (JNI) implementation.
* @return true if the underlying implementation is delegating to the native command line.
*/ | Determine if the command line is bound to the native (JNI) implementation | isNativeImplementation | {
"repo_name": "michaelforfxhelp/fxhelprepo",
"path": "third_party/chromium/base/android/java/src/org/chromium/base/CommandLine.java",
"license": "mpl-2.0",
"size": 14814
} | [
"java.util.concurrent.atomic.AtomicReference"
] | import java.util.concurrent.atomic.AtomicReference; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 1,265,963 |
public LayoutElementParcelable generateLayoutElement(@NonNull Context c, boolean showThumbs) {
switch (mode) {
case FILE:
case ROOT:
File file = getFile();
LayoutElementParcelable layoutElement;
if (isDirectory()) {
layoutElement =
new LayoutElementParc... | LayoutElementParcelable function(@NonNull Context c, boolean showThumbs) { switch (mode) { case FILE: case ROOT: File file = getFile(); LayoutElementParcelable layoutElement; if (isDirectory()) { layoutElement = new LayoutElementParcelable( c, path, RootHelper.parseFilePermission(file), STRSTRSTRSTR", false, showThumbs... | /**
* Generates a {@link LayoutElementParcelable} adapted compatible element. Currently supports only
* local filesystem
*/ | Generates a <code>LayoutElementParcelable</code> adapted compatible element. Currently supports only local filesystem | generateLayoutElement | {
"repo_name": "TeamAmaze/AmazeFileManager",
"path": "app/src/main/java/com/amaze/filemanager/filesystem/HybridFile.java",
"license": "gpl-3.0",
"size": 48290
} | [
"android.content.Context",
"androidx.annotation.NonNull",
"com.amaze.filemanager.adapters.data.LayoutElementParcelable",
"java.io.File"
] | import android.content.Context; import androidx.annotation.NonNull; import com.amaze.filemanager.adapters.data.LayoutElementParcelable; import java.io.File; | import android.content.*; import androidx.annotation.*; import com.amaze.filemanager.adapters.data.*; import java.io.*; | [
"android.content",
"androidx.annotation",
"com.amaze.filemanager",
"java.io"
] | android.content; androidx.annotation; com.amaze.filemanager; java.io; | 2,041,104 |
System.out.println("\nRunning sample: " + Sample.class);
// Parse the command line arguments.
//
String homeDir = "./tmp";
for (int i = 0; i < args.length; i += 1) {
if (args[i].equals("-h") && i < args.length - 1) {
i += 1;
homeDir = ... | System.out.println(STR + Sample.class); for (int i = 0; i < args.length; i += 1) { if (args[i].equals("-h") && i < args.length - 1) { i += 1; homeDir = args[i]; } else { System.err.println(STR + Sample.class.getName() + STR); System.exit(2); } } try { sample = new Sample(homeDir); sample.run(); } catch (Exception e) { ... | /**
* Run the sample program.
*/ | Run the sample program | main | {
"repo_name": "malin1993ml/h-store",
"path": "third_party/cpp/berkeleydb/examples/java/src/collections/ship/entity/Sample.java",
"license": "gpl-3.0",
"size": 7903
} | [
"com.sleepycat.db.DatabaseException",
"java.io.FileNotFoundException"
] | import com.sleepycat.db.DatabaseException; import java.io.FileNotFoundException; | import com.sleepycat.db.*; import java.io.*; | [
"com.sleepycat.db",
"java.io"
] | com.sleepycat.db; java.io; | 154,121 |
private Object[] compressIndexArrays(
long[] indexCIDS,
IndexRowGenerator[] irgs)
{
long[] workSpace = new long[indexCIDS.length];
int j = 0, k = indexCIDS.length - 1;
for (int i = 0; i < indexCIDS.length; i++)
{
int m;
for (m = 0; m < j; m++) // look up our unique set
{
if ... | Object[] function( long[] indexCIDS, IndexRowGenerator[] irgs) { long[] workSpace = new long[indexCIDS.length]; int j = 0, k = indexCIDS.length - 1; for (int i = 0; i < indexCIDS.length; i++) { int m; for (m = 0; m < j; m++) { if (indexCIDS[i] == workSpace[m]) { workSpace[k--] = i; break; } } if (m == j) workSpace[j++]... | /**
* Get rid of duplicates from a set of index conglomerate numbers and
* index descriptors.
*
* @param indexCIDS array of index conglomerate numbers
* @param irgs array of index row generaters
*
* @return value: If no duplicates, returns NULL; otherwise,
* a size-3 array of objects, first eleme... | Get rid of duplicates from a set of index conglomerate numbers and index descriptors | compressIndexArrays | {
"repo_name": "trejkaz/derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java",
"license": "apache-2.0",
"size": 131348
} | [
"org.apache.derby.iapi.sql.dictionary.IndexRowGenerator"
] | import org.apache.derby.iapi.sql.dictionary.IndexRowGenerator; | import org.apache.derby.iapi.sql.dictionary.*; | [
"org.apache.derby"
] | org.apache.derby; | 332,079 |
@Test( expected = NotRoutableException.class )
public final void testInvokeCountFoo3()
{
fooRouter.proxy()
.count( "foo3", TEST );
fail( "testInvokeCountFoo3()" );
} | @Test( expected = NotRoutableException.class ) final void function() { fooRouter.proxy() .count( "foo3", TEST ); fail( STR ); } | /**
* Test invoking count forward to Foo3 (non-existant path)
*/ | Test invoking count forward to Foo3 (non-existant path) | testInvokeCountFoo3 | {
"repo_name": "caveman-frak/java-core",
"path": "core-model/src/test/java/uk/co/bluegecko/core/service/base/router/RouterTest.java",
"license": "apache-2.0",
"size": 1559
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 981,410 |
boolean removeMutation(ItemStack result); | boolean removeMutation(ItemStack result); | /**
* Removes all mutations that give this stack as a result
* @param result
* @return True if successful
*/ | Removes all mutations that give this stack as a result | removeMutation | {
"repo_name": "HenryLoenwind/AgriCraft",
"path": "src/main/java/com/InfinityRaider/AgriCraft/api/v1/APIv1.java",
"license": "mit",
"size": 17453
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,110,144 |
@Override
public boolean processNoteContent(NoteRenderContext context, NoteData item)
throws NoteRenderingPreProcessorException {
item.setContent(processContent(item.getContent()));
item.setShortContent(processContent(item.getShortContent()));
return true;
} | boolean function(NoteRenderContext context, NoteData item) throws NoteRenderingPreProcessorException { item.setContent(processContent(item.getContent())); item.setShortContent(processContent(item.getShortContent())); return true; } | /**
* Processes a note for a specific render context. This method will only be called if the
* processor supports the mode given by the render context.
*
* @param context
* holds details about the render context to allow specific processing in different
* situations
... | Processes a note for a specific render context. This method will only be called if the processor supports the mode given by the render context | processNoteContent | {
"repo_name": "Communote/communote-server",
"path": "communote/plugins/communote-smileys-plugin/src/main/java/com/communote/plugins/smileys/SmileysNoteRenderingPreProcessor.java",
"license": "apache-2.0",
"size": 6270
} | [
"com.communote.server.api.core.note.NoteData",
"com.communote.server.api.core.note.NoteRenderContext",
"com.communote.server.api.core.note.processor.NoteRenderingPreProcessorException"
] | import com.communote.server.api.core.note.NoteData; import com.communote.server.api.core.note.NoteRenderContext; import com.communote.server.api.core.note.processor.NoteRenderingPreProcessorException; | import com.communote.server.api.core.note.*; import com.communote.server.api.core.note.processor.*; | [
"com.communote.server"
] | com.communote.server; | 808,070 |
public void setFields(Strings fields) {
this.fields = fields;
} | void function(Strings fields) { this.fields = fields; } | /**
* The Fields
*/ | The Fields | setFields | {
"repo_name": "ullgren/camel",
"path": "components/camel-gora/src/main/java/org/apache/camel/component/gora/GoraConfiguration.java",
"license": "apache-2.0",
"size": 6871
} | [
"com.google.common.base.Strings"
] | import com.google.common.base.Strings; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,802,784 |
public void resetStyleTables( View view ) {
try {
SpatialDatabasesManager dbManager = SpatialDatabasesManager.getInstance();
List<AbstractSpatialDatabaseHandler> spatialDatabaseHandlers = dbManager.getSpatialDatabaseHandlers();
for( AbstractSpatialDatabaseHandler iSpatial... | void function( View view ) { try { SpatialDatabasesManager dbManager = SpatialDatabasesManager.getInstance(); List<AbstractSpatialDatabaseHandler> spatialDatabaseHandlers = dbManager.getSpatialDatabaseHandlers(); for( AbstractSpatialDatabaseHandler iSpatialDatabaseHandler : spatialDatabaseHandlers ) { if (iSpatialDatab... | /**
* Reset style tables.
*
* @param view parent.
*/ | Reset style tables | resetStyleTables | {
"repo_name": "kristina-hager/geopaparazzi",
"path": "geopaparazzi.app/src/eu/hydrologis/geopaparazzi/util/SecretActivity.java",
"license": "gpl-3.0",
"size": 8226
} | [
"android.view.View",
"eu.geopaparazzi.library.database.GPLog",
"eu.geopaparazzi.library.util.Utilities",
"eu.geopaparazzi.spatialite.database.spatial.SpatialDatabasesManager",
"eu.geopaparazzi.spatialite.database.spatial.core.databasehandlers.AbstractSpatialDatabaseHandler",
"eu.geopaparazzi.spatialite.da... | import android.view.View; import eu.geopaparazzi.library.database.GPLog; import eu.geopaparazzi.library.util.Utilities; import eu.geopaparazzi.spatialite.database.spatial.SpatialDatabasesManager; import eu.geopaparazzi.spatialite.database.spatial.core.databasehandlers.AbstractSpatialDatabaseHandler; import eu.geopapara... | import android.view.*; import eu.geopaparazzi.library.database.*; import eu.geopaparazzi.library.util.*; import eu.geopaparazzi.spatialite.database.spatial.*; import eu.geopaparazzi.spatialite.database.spatial.core.databasehandlers.*; import java.util.*; | [
"android.view",
"eu.geopaparazzi.library",
"eu.geopaparazzi.spatialite",
"java.util"
] | android.view; eu.geopaparazzi.library; eu.geopaparazzi.spatialite; java.util; | 745,606 |
public void parseDetails( final byte[] data ) {
final Details details = replay.details = new Details();
setWrapper( data, ByteOrder.LITTLE_ENDIAN );
final Object[] dtls = (Object[]) readStructure();
//printStructure( dtls, "" );
final Object[] playersArr = (Object[]) dtls[ 0 ];
final in... | void function( final byte[] data ) { final Details details = replay.details = new Details(); setWrapper( data, ByteOrder.LITTLE_ENDIAN ); final Object[] dtls = (Object[]) readStructure(); final Object[] playersArr = (Object[]) dtls[ 0 ]; final int playersCount = playersArr.length; final List< Player > playerList = new ... | /**
* Parses replay details from the given data.
* @param data data of the replay details
*/ | Parses replay details from the given data | parseDetails | {
"repo_name": "icza/sc2gears",
"path": "zprj-Sc2gears-parsing-engine/src/hu/belicza/andras/sc2gears/sc2replay/ReplayParser.java",
"license": "apache-2.0",
"size": 48410
} | [
"hu.belicza.andras.sc2gears.sc2replay.model.Details",
"hu.belicza.andras.sc2gearspluginapi.api.sc2replay.ReplayConsts",
"java.io.UnsupportedEncodingException",
"java.nio.ByteOrder",
"java.util.ArrayList",
"java.util.List"
] | import hu.belicza.andras.sc2gears.sc2replay.model.Details; import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.ReplayConsts; import java.io.UnsupportedEncodingException; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; | import hu.belicza.andras.sc2gears.sc2replay.model.*; import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.*; import java.io.*; import java.nio.*; import java.util.*; | [
"hu.belicza.andras",
"java.io",
"java.nio",
"java.util"
] | hu.belicza.andras; java.io; java.nio; java.util; | 1,618,853 |
public void modelSnapshots(String jobId, int from, int size, Consumer<QueryPage<ModelSnapshot>> handler,
Consumer<Exception> errorHandler) {
modelSnapshots(jobId, from, size, null, true, QueryBuilders.matchAllQuery(), handler, errorHandler);
} | void function(String jobId, int from, int size, Consumer<QueryPage<ModelSnapshot>> handler, Consumer<Exception> errorHandler) { modelSnapshots(jobId, from, size, null, true, QueryBuilders.matchAllQuery(), handler, errorHandler); } | /**
* Get model snapshots for the job ordered by descending timestamp (newest first).
*
* @param jobId the job id
* @param from number of snapshots to from
* @param size number of snapshots to retrieve
*/ | Get model snapshots for the job ordered by descending timestamp (newest first) | modelSnapshots | {
"repo_name": "coding0011/elasticsearch",
"path": "x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/job/persistence/JobResultsProvider.java",
"license": "apache-2.0",
"size": 86050
} | [
"java.util.function.Consumer",
"org.elasticsearch.index.query.QueryBuilders",
"org.elasticsearch.xpack.core.action.util.QueryPage",
"org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot"
] | import java.util.function.Consumer; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.xpack.core.action.util.QueryPage; import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot; | import java.util.function.*; import org.elasticsearch.index.query.*; import org.elasticsearch.xpack.core.action.util.*; import org.elasticsearch.xpack.core.ml.job.process.autodetect.state.*; | [
"java.util",
"org.elasticsearch.index",
"org.elasticsearch.xpack"
] | java.util; org.elasticsearch.index; org.elasticsearch.xpack; | 1,862,945 |
public static IllegalStateException newIllegalContextPoppingException(
RequestContext currentCtx, RequestContext contextInStorage) {
requireNonNull(currentCtx, "currentCtx");
requireNonNull(contextInStorage, "contextInStorage");
final IllegalStateException ex = new IllegalStateEx... | static IllegalStateException function( RequestContext currentCtx, RequestContext contextInStorage) { requireNonNull(currentCtx, STR); requireNonNull(contextInStorage, STR); final IllegalStateException ex = new IllegalStateException( STR + currentCtx + STR + contextInStorage + STR + STR); if (REPORTED_THREADS.add(Thread... | /**
* Returns an {@link IllegalStateException} which is raised when popping a context from
* the unexpected thread or forgetting to close the previous context.
*/ | Returns an <code>IllegalStateException</code> which is raised when popping a context from the unexpected thread or forgetting to close the previous context | newIllegalContextPoppingException | {
"repo_name": "anuraaga/armeria",
"path": "core/src/main/java/com/linecorp/armeria/internal/common/RequestContextUtil.java",
"license": "apache-2.0",
"size": 8620
} | [
"com.linecorp.armeria.common.RequestContext",
"java.util.Objects"
] | import com.linecorp.armeria.common.RequestContext; import java.util.Objects; | import com.linecorp.armeria.common.*; import java.util.*; | [
"com.linecorp.armeria",
"java.util"
] | com.linecorp.armeria; java.util; | 485,386 |
public int getSize(){
return this.size;
}
private XMLEncoder encode;
private int size; | int function(){ return this.size; } private XMLEncoder encode; private int size; | /**
* Get total number of object store in the file
* @retunr integer count of object written in the file
*/ | Get total number of object store in the file | getSize | {
"repo_name": "pramod-rana7/algorithm",
"path": "com/oops/rana/cache/cacheWrite.java",
"license": "apache-2.0",
"size": 1449
} | [
"java.beans.XMLEncoder"
] | import java.beans.XMLEncoder; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,509,850 |
@Override
protected String getOutputExtension()
{
return ConstantsCommon.STRING_DOT + ConstantsOutput.EXTENSION_HTML;
}
| String function() { return ConstantsCommon.STRING_DOT + ConstantsOutput.EXTENSION_HTML; } | /**
* We have to redefine the output extension because it is not a Angular2 file.
* It is a HTML file.
*/ | We have to redefine the output extension because it is not a Angular2 file. It is a HTML file | getOutputExtension | {
"repo_name": "BBVA-CIB/APIRestGenerator",
"path": "generator.client.angular2/src/main/java/com/bbva/kltt/apirest/generator/client/angular2/velocity/example/ExampleLauncherClientAngular2Generator.java",
"license": "apache-2.0",
"size": 5826
} | [
"com.bbva.kltt.apirest.core.util.ConstantsCommon",
"com.bbva.kltt.apirest.core.util.ConstantsOutput"
] | import com.bbva.kltt.apirest.core.util.ConstantsCommon; import com.bbva.kltt.apirest.core.util.ConstantsOutput; | import com.bbva.kltt.apirest.core.util.*; | [
"com.bbva.kltt"
] | com.bbva.kltt; | 275,979 |
protected void basicProcess(final DistributionManager dm, final boolean waitForGrantor) {
final boolean isDebugEnabled_DLS = logger.isTraceEnabled(LogMarker.DLS);
if (isDebugEnabled_DLS) {
logger.trace(LogMarker.DLS, "[basicProcess] {}", this);
}
final DLockQueryReplyMessage replyMsg... | void function(final DistributionManager dm, final boolean waitForGrantor) { final boolean isDebugEnabled_DLS = logger.isTraceEnabled(LogMarker.DLS); if (isDebugEnabled_DLS) { logger.trace(LogMarker.DLS, STR, this); } final DLockQueryReplyMessage replyMsg = new DLockQueryReplyMessage(); replyMsg.setProcessorId(this.proc... | /**
* Perform basic processing of this message.
* <p>
* this.svc and this.grantor must be set before calling this method.
*/ | Perform basic processing of this message. this.svc and this.grantor must be set before calling this method | basicProcess | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockQueryProcessor.java",
"license": "apache-2.0",
"size": 16670
} | [
"org.apache.geode.SystemFailure",
"org.apache.geode.distributed.LockServiceDestroyedException",
"org.apache.geode.distributed.internal.DistributionManager",
"org.apache.geode.distributed.internal.ReplyException",
"org.apache.geode.distributed.internal.locks.DLockGrantor",
"org.apache.geode.internal.loggin... | import org.apache.geode.SystemFailure; import org.apache.geode.distributed.LockServiceDestroyedException; import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.ReplyException; import org.apache.geode.distributed.internal.locks.DLockGrantor; import org.apache.geod... | import org.apache.geode.*; import org.apache.geode.distributed.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.locks.*; import org.apache.geode.internal.logging.log4j.*; | [
"org.apache.geode"
] | org.apache.geode; | 755,959 |
public static Field<Object> gCubeDecompress(Object __1) {
GCubeDecompress f = new GCubeDecompress();
f.set__1(__1);
return f.asField();
} | static Field<Object> function(Object __1) { GCubeDecompress f = new GCubeDecompress(); f.set__1(__1); return f.asField(); } | /**
* Get <code>public.g_cube_decompress</code> as a field.
*/ | Get <code>public.g_cube_decompress</code> as a field | gCubeDecompress | {
"repo_name": "Remper/sociallink",
"path": "alignments/src/main/java/eu/fbk/fm/alignments/index/db/Routines.java",
"license": "apache-2.0",
"size": 37686
} | [
"eu.fbk.fm.alignments.index.db.routines.GCubeDecompress",
"org.jooq.Field"
] | import eu.fbk.fm.alignments.index.db.routines.GCubeDecompress; import org.jooq.Field; | import eu.fbk.fm.alignments.index.db.routines.*; import org.jooq.*; | [
"eu.fbk.fm",
"org.jooq"
] | eu.fbk.fm; org.jooq; | 2,219,555 |
public void infoSeeLine(Line line, double distance, double direction, double distChange, double dirChange,
double bodyFacingDirection, double headFacingDirection); | void function(Line line, double distance, double direction, double distChange, double dirChange, double bodyFacingDirection, double headFacingDirection); | /**
* The controller is informed that one of the pitch lines are in sight.
*
* @param line a {@link com.github.robocup_atan.atan.model.enums.Line} object.
* @param distance The distance to the line.
* @param direction The direction of the line.
* @param distChange a double.
* @param d... | The controller is informed that one of the pitch lines are in sight | infoSeeLine | {
"repo_name": "robocup-atan/atan",
"path": "src/main/java/com/github/robocup_atan/atan/model/ControllerPlayer.java",
"license": "mit",
"size": 19961
} | [
"com.github.robocup_atan.atan.model.enums.Line"
] | import com.github.robocup_atan.atan.model.enums.Line; | import com.github.robocup_atan.atan.model.enums.*; | [
"com.github.robocup_atan"
] | com.github.robocup_atan; | 1,110,322 |
public Transaction get(String transactionId)throws Exception
{
String urlString = url+"/"+transactionId;
String response = ZohoHTTPClient.get(urlString, getQueryMap());
Transaction transaction = bankTransactionParser.getTransaction(response);
return transaction;
}
| Transaction function(String transactionId)throws Exception { String urlString = url+"/"+transactionId; String response = ZohoHTTPClient.get(urlString, getQueryMap()); Transaction transaction = bankTransactionParser.getTransaction(response); return transaction; } | /**
* Fetch the details of a transaction by specifying the transaction_id.
* Pass the transactionId to get the details of a transaction.
* It returns the Transaction object.
* @param transactionId ID of the transaction.
* @return Returns the Transaction object.
*/ | Fetch the details of a transaction by specifying the transaction_id. Pass the transactionId to get the details of a transaction. It returns the Transaction object | get | {
"repo_name": "zoho/books-java-wrappers",
"path": "source/com/zoho/books/api/BankTransactionsApi.java",
"license": "mit",
"size": 18879
} | [
"com.zoho.books.model.Transaction",
"com.zoho.books.util.ZohoHTTPClient"
] | import com.zoho.books.model.Transaction; import com.zoho.books.util.ZohoHTTPClient; | import com.zoho.books.model.*; import com.zoho.books.util.*; | [
"com.zoho.books"
] | com.zoho.books; | 2,493,574 |
@Test()
public void testExplodeDNValidMultipleComponentWithMultivaluedNoExclude()
throws Exception
{
String[] s =
LDAPDN.explodeDN("givenName=Test+sn=User , dc=example, dc=com", false);
assertNotNull(s);
assertEquals(s.length, 3);
assertEquals(s[0], "givenName=Test+sn=User");
... | @Test() void function() throws Exception { String[] s = LDAPDN.explodeDN(STR, false); assertNotNull(s); assertEquals(s.length, 3); assertEquals(s[0], STR); assertEquals(s[1], STR); assertEquals(s[2], STR); } | /**
* Tests the {@code explodeDN} method for a valid DN with multiple components
* including a multivalued RDN and not excluding types.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the explodeDN method for a valid DN with multiple components including a multivalued RDN and not excluding types | testExplodeDNValidMultipleComponentWithMultivaluedNoExclude | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/migrate/ldapjdk/LDAPDNTestCase.java",
"license": "gpl-2.0",
"size": 9791
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 206,309 |
public double stringwidth(String string, @NotNull PDFFont font, double size)
{
if (font == null)
return 0;
return size * font.stringWidth(string) / 1000.0;
} | double function(String string, @NotNull PDFFont font, double size) { if (font == null) return 0; return size * font.stringWidth(string) / 1000.0; } | /**
* Returns the length of a string for a font.
*/ | Returns the length of a string for a font | stringwidth | {
"repo_name": "dlitz/resin",
"path": "modules/quercus/src/com/caucho/quercus/lib/pdf/PDF.java",
"license": "gpl-2.0",
"size": 21718
} | [
"com.caucho.quercus.annotation.NotNull"
] | import com.caucho.quercus.annotation.NotNull; | import com.caucho.quercus.annotation.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,627,141 |
public boolean matchesAllIssues(Collection<Issue> issues, List<String> messages) {
Collection<Issue> issueCopy = new LinkedList<>(issues);
Collection<IssueMatcher> matcherCopy = new LinkedList<>(issueMatchers);
performMatching(issueCopy, matcherCopy, messages);
if (inverted) {
if (issueCopy.isEmpty()) {
... | boolean function(Collection<Issue> issues, List<String> messages) { Collection<Issue> issueCopy = new LinkedList<>(issues); Collection<IssueMatcher> matcherCopy = new LinkedList<>(issueMatchers); performMatching(issueCopy, matcherCopy, messages); if (inverted) { if (issueCopy.isEmpty()) { explainIssues(issues, messages... | /**
* Matches the expectations in the added issues matchers against the given issues.
*
* @param issues
* the issues to match the expectations against
* @param messages
* if this parameter is not <code>null</code>, this method will add an explanatory message for each
* mis... | Matches the expectations in the added issues matchers against the given issues | matchesAllIssues | {
"repo_name": "lbeurerkellner/n4js",
"path": "testhelpers/org.eclipse.n4js.tests.helper/src/org/eclipse/n4js/tests/issues/IssueExpectations.java",
"license": "epl-1.0",
"size": 6420
} | [
"java.util.Collection",
"java.util.LinkedList",
"java.util.List",
"org.eclipse.xtext.validation.Issue"
] | import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.eclipse.xtext.validation.Issue; | import java.util.*; import org.eclipse.xtext.validation.*; | [
"java.util",
"org.eclipse.xtext"
] | java.util; org.eclipse.xtext; | 1,809,987 |
private boolean isNullAddress(InetAddress addr) {
final byte a[] = addr.getAddress();
for (int i = 0; i < a.length; i++)
if (a[i] != 0)
return false;
return true;
} | boolean function(InetAddress addr) { final byte a[] = addr.getAddress(); for (int i = 0; i < a.length; i++) if (a[i] != 0) return false; return true; } | /**
* Determine, whether the given address ist actually the null address
* "0.0.0.0".
*
* @param relayAgentAddress
* @return
*/ | Determine, whether the given address ist actually the null address "0.0.0.0" | isNullAddress | {
"repo_name": "openthinclient/openthinclient-manager",
"path": "thirdparty/apacheds-protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java",
"license": "gpl-2.0",
"size": 5663
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,871,169 |
T visitCoverageExpressionOverlayLabel(@NotNull wcpsParser.CoverageExpressionOverlayLabelContext ctx); | T visitCoverageExpressionOverlayLabel(@NotNull wcpsParser.CoverageExpressionOverlayLabelContext ctx); | /**
* Visit a parse tree produced by {@link wcpsParser#CoverageExpressionOverlayLabel}.
*
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>wcpsParser#CoverageExpressionOverlayLabel</code> | visitCoverageExpressionOverlayLabel | {
"repo_name": "diogo-andrade/DataHubSystem",
"path": "petascope/src/main/java/petascope/wcps2/parser/wcpsVisitor.java",
"license": "agpl-3.0",
"size": 28497
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,329,860 |
public MockForm getForm() {
return form;
} | MockForm function() { return form; } | /**
* Returns the form associated with this YaFormEditor.
*
* @return a MockForm
*/ | Returns the form associated with this YaFormEditor | getForm | {
"repo_name": "E-Hon/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaFormEditor.java",
"license": "apache-2.0",
"size": 28241
} | [
"com.google.appinventor.client.editor.simple.components.MockForm"
] | import com.google.appinventor.client.editor.simple.components.MockForm; | import com.google.appinventor.client.editor.simple.components.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 196,570 |
@Test public void originServerSends407() throws Exception {
server.enqueue(new MockResponse().setResponseCode(407));
HttpURLConnection conn = factory.open(server.url("/").url());
try {
conn.getResponseCode();
fail();
} catch (IOException ignored) {
}
} | @Test void function() throws Exception { server.enqueue(new MockResponse().setResponseCode(407)); HttpURLConnection conn = factory.open(server.url("/").url()); try { conn.getResponseCode(); fail(); } catch (IOException ignored) { } } | /**
* Response code 407 should only come from proxy servers. Android's client throws if it is sent by
* an origin server.
*/ | Response code 407 should only come from proxy servers. Android's client throws if it is sent by an origin server | originServerSends407 | {
"repo_name": "Synix/okhttp",
"path": "okhttp-urlconnection/src/test/java/okhttp3/OkUrlFactoryTest.java",
"license": "apache-2.0",
"size": 8545
} | [
"java.io.IOException",
"java.net.HttpURLConnection",
"org.junit.Assert",
"org.junit.Test"
] | import java.io.IOException; import java.net.HttpURLConnection; import org.junit.Assert; import org.junit.Test; | import java.io.*; import java.net.*; import org.junit.*; | [
"java.io",
"java.net",
"org.junit"
] | java.io; java.net; org.junit; | 860,566 |
@Generated
@Selector("opaque")
public native boolean opaque(); | @Selector(STR) native boolean function(); | /**
* indicates the bitmap context will draw fully opaque. The preferredFormat sets this to NO.
*/ | indicates the bitmap context will draw fully opaque. The preferredFormat sets this to NO | opaque | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIGraphicsImageRendererFormat.java",
"license": "apache-2.0",
"size": 7352
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 271,071 |
Map<String, String> get(); | Map<String, String> get(); | /**
* Retrieves all cookies
*
* @see #get(String)
*/ | Retrieves all cookies | get | {
"repo_name": "sumit784/java-cookie",
"path": "src/main/java/com/github/jscookie/javacookie/CookiesDefinition.java",
"license": "mit",
"size": 5053
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 515,024 |
private long obtainHeuristicValue(ArrayList<DiscreteVariable> linkedVars,
Type orderingType)
{
ProbabilityVariable probVar;
long value = 0;
if (orderingType == Type.MINIMUM_WEIGHT)
{
long weight = 1;
for (Dis... | long function(ArrayList<DiscreteVariable> linkedVars, Type orderingType) { ProbabilityVariable probVar; long value = 0; if (orderingType == Type.MINIMUM_WEIGHT) { long weight = 1; for (DiscreteVariable discrVar : linkedVars) { probVar = (ProbabilityVariable) discrVar; weight *= probVar.numberValues(); } value = weight;... | /**
* Obtain the heuristic value of eliminating a variable, represented by the
* list of variables linked to it.
*
* @param linkedVars list of variables that are linked to the variable in
* question
* @param orderingType indicates which heuristic to use in the e... | Obtain the heuristic value of eliminating a variable, represented by the list of variables linked to it | obtainHeuristicValue | {
"repo_name": "kingkybel/JavaBayes",
"path": "src/BayesianInferences/Ordering.java",
"license": "gpl-3.0",
"size": 21904
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,878,828 |
EObject getExtendedCapabilities(); | EObject getExtendedCapabilities(); | /**
* Returns the value of the '<em><b>Extended Capabilities</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Individual software vendors and servers can use this element to provide metadata about any additional server abilities.
* <!-- ... | Returns the value of the 'Extended Capabilities' containment reference. Individual software vendors and servers can use this element to provide metadata about any additional server abilities. | getExtendedCapabilities | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.ows/src/net/opengis/ows11/DocumentRoot.java",
"license": "lgpl-2.1",
"size": 76894
} | [
"org.eclipse.emf.ecore.EObject"
] | import org.eclipse.emf.ecore.EObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,004,812 |
public Collection<AbstractInputSource> getRegisteredInputSources(){
return this.registeredInputSources;
}
| Collection<AbstractInputSource> function(){ return this.registeredInputSources; } | /**
* Gets the registered input sources.
*
* @return the registered input sources
* @deprecated use getInputSources() instead
*/ | Gets the registered input sources | getRegisteredInputSources | {
"repo_name": "rogiermars/mt4j-core",
"path": "src/org/mt4j/input/InputManager.java",
"license": "gpl-2.0",
"size": 9221
} | [
"java.util.Collection",
"org.mt4j.input.inputSources.AbstractInputSource"
] | import java.util.Collection; import org.mt4j.input.inputSources.AbstractInputSource; | import java.util.*; import org.mt4j.input.*; | [
"java.util",
"org.mt4j.input"
] | java.util; org.mt4j.input; | 2,776,006 |
protected static UpdateOperation getUpdateOperation(Collection<URI> repositories,
IProgressMonitor progressMonitor) throws InstallerException
{
final ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI();
ProvisioningSession session = provisioningUI.getSession();
... | static UpdateOperation function(Collection<URI> repositories, IProgressMonitor progressMonitor) throws InstallerException { final ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI(); ProvisioningSession session = provisioningUI.getSession(); final UpdateOperation op = new UpdateOperation(session); final boole... | /**
* Retrieves the UpdateOperation that is necessary to update available IUS on the current Profile.
*
* @param repositories where the update should be searched
* @param progressMonitor
* @return
* @throws InstallerException
*/ | Retrieves the UpdateOperation that is necessary to update available IUS on the current Profile | getUpdateOperation | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/installer/src/com/motorola/studio/android/installer/utilities/P2Utilities.java",
"license": "gpl-2.0",
"size": 30284
} | [
"com.motorola.studio.android.installer.InstallerException",
"com.motorola.studio.android.installer.i18n.InstallerNLS",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"org.eclipse.core.runtime.IProgressMonitor",
"org.eclipse.core.runtime.OperationCanceledException",
"org.eclipse.c... | import com.motorola.studio.android.installer.InstallerException; import com.motorola.studio.android.installer.i18n.InstallerNLS; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledExceptio... | import com.motorola.studio.android.installer.*; import com.motorola.studio.android.installer.i18n.*; import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.equinox.p2.operations.*; import org.eclipse.equinox.p2.repository.*; import org.eclipse.equinox.p2.repository.metadata.*; import org.eclipse.equi... | [
"com.motorola.studio",
"java.util",
"org.eclipse.core",
"org.eclipse.equinox"
] | com.motorola.studio; java.util; org.eclipse.core; org.eclipse.equinox; | 1,510,406 |
InvalidParameterSpecException tE = new InvalidParameterSpecException();
assertNull("getMessage() must return null.", tE.getMessage());
assertNull("getCause() must return null", tE.getCause());
} | InvalidParameterSpecException tE = new InvalidParameterSpecException(); assertNull(STR, tE.getMessage()); assertNull(STR, tE.getCause()); } | /**
* Test for <code>InvalidParameterSpecException()</code> constructor
* Assertion: constructs InvalidParameterSpecException with no detail
* message
*/ | Test for <code>InvalidParameterSpecException()</code> constructor Assertion: constructs InvalidParameterSpecException with no detail message | testInvalidParameterSpecException01 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "luni/src/test/java/tests/security/spec/InvalidParameterSpecExceptionTest.java",
"license": "gpl-2.0",
"size": 3040
} | [
"java.security.spec.InvalidParameterSpecException"
] | import java.security.spec.InvalidParameterSpecException; | import java.security.spec.*; | [
"java.security"
] | java.security; | 2,574,476 |
@Override
public void generateFinally(JavaWriter out)
throws IOException
{
_next.generateFinally(out);
} | void function(JavaWriter out) throws IOException { _next.generateFinally(out); } | /**
* Generates finally code for the method
*/ | Generates finally code for the method | generateFinally | {
"repo_name": "christianchristensen/resin",
"path": "modules/kernel/src/com/caucho/config/gen/AbstractCallChain.java",
"license": "gpl-2.0",
"size": 7992
} | [
"com.caucho.java.JavaWriter",
"java.io.IOException"
] | import com.caucho.java.JavaWriter; import java.io.IOException; | import com.caucho.java.*; import java.io.*; | [
"com.caucho.java",
"java.io"
] | com.caucho.java; java.io; | 663,425 |
@ApiModelProperty(example = "null", required = true, value = "ID of the squad the member is in. If not applicable, will be set to -1")
public Long getSquadId() {
return squadId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Long function() { return squadId; } | /**
* ID of the squad the member is in. If not applicable, will be set to -1
*
* @return squadId
**/ | ID of the squad the member is in. If not applicable, will be set to -1 | getSquadId | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/FleetMembersResponse.java",
"license": "apache-2.0",
"size": 9772
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 611,082 |
public void doJoin(RunData data)
{
SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());
// read the group ids to join
String id = data.getParameters().getString("itemReference");
if (id != null)
{
try
{
// bjones86 - SAK-24423 - joinable s... | void function(RunData data) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); String id = data.getParameters().getString(STR); if (id != null) { try { if( JoinableSiteSettings.doJoinForMembership( id ) ) { addAlert( state, rb.getString( STR ) + " " + SiteServ... | /**
* Handle the eventSubmit_doJoin command to have the user join one or more sites.
*/ | Handle the eventSubmit_doJoin command to have the user join one or more sites | doJoin | {
"repo_name": "whumph/sakai",
"path": "site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/MembershipAction.java",
"license": "apache-2.0",
"size": 19183
} | [
"java.util.ArrayList",
"java.util.List",
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.exception.InUseException",
"org.sakaiproject.exception.PermissionExcep... | import java.util.ArrayList; import java.util.List; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.exception.InUseException; import org.sakaiproject.ex... | import java.util.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.site.cover.*; | [
"java.util",
"org.sakaiproject.cheftool",
"org.sakaiproject.event",
"org.sakaiproject.exception",
"org.sakaiproject.site"
] | java.util; org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.site; | 2,777,544 |
public void setUser(Person user) {
this.user = user;
} | void function(Person user) { this.user = user; } | /**
* Sets the user attribute.
*
* @param user The user to set.
*/ | Sets the user attribute | setUser | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/businessobject/CollectionEvent.java",
"license": "agpl-3.0",
"size": 8911
} | [
"org.kuali.rice.kim.api.identity.Person"
] | import org.kuali.rice.kim.api.identity.Person; | import org.kuali.rice.kim.api.identity.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,312,722 |
public void removeNamespaceBinding(String prefix) throws XBRLException; | void function(String prefix) throws XBRLException; | /**
* This should not need to be called but is available if the number of mappings
* in the namepace mapping table grows innefficiently large.
* @param prefix the prefix to remove the namespace binding for
* @throws XBRLException
*/ | This should not need to be called but is available if the number of mappings in the namepace mapping table grows innefficiently large | removeNamespaceBinding | {
"repo_name": "martinggww/Programming",
"path": "XBRL/xbrl-api/module-api/src/main/java/org/xbrlapi/data/Store.java",
"license": "gpl-2.0",
"size": 59248
} | [
"org.xbrlapi.utilities.XBRLException"
] | import org.xbrlapi.utilities.XBRLException; | import org.xbrlapi.utilities.*; | [
"org.xbrlapi.utilities"
] | org.xbrlapi.utilities; | 1,919,420 |
EAttribute getRuleWithPattern_IsAbstract(); | EAttribute getRuleWithPattern_IsAbstract(); | /**
* Returns the meta object for the attribute '{@link anatlyzer.atlext.ATL.RuleWithPattern#isIsAbstract <em>Is Abstract</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Is Abstract</em>'.
* @see anatlyzer.atlext.ATL.RuleWithPattern#isIsAbstract()
*... | Returns the meta object for the attribute '<code>anatlyzer.atlext.ATL.RuleWithPattern#isIsAbstract Is Abstract</code>'. | getRuleWithPattern_IsAbstract | {
"repo_name": "jesusc/anatlyzer",
"path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/ATL/ATLPackage.java",
"license": "epl-1.0",
"size": 222096
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 570,042 |
public Observable<ServiceResponse<List<WorkspaceInner>>> listByResourceGroupWithServiceResponseAsync(String resourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (this.client.s... | Observable<ServiceResponse<List<WorkspaceInner>>> function(String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw new IllegalArgumentExcep... | /**
* Gets workspaces in a resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @return the observable to the List<WorkspaceInner> object
*/ | Gets workspaces in a resource group | listByResourceGroupWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/loganalytics/mgmt-v2020_08_01/src/main/java/com/microsoft/azure/management/loganalytics/v2020_08_01/implementation/WorkspacesInner.java",
"license": "mit",
"size": 57374
} | [
"com.microsoft.rest.ServiceResponse",
"java.util.List"
] | import com.microsoft.rest.ServiceResponse; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,103,188 |
return new TypeSafeMatcher<Table>() { | return new TypeSafeMatcher<Table>() { | /**
* Returns whether the {@link Table table} has a certain number of
* {@link TableRow rows}.
*
* @param count the expected number of Rows
* @return whether the table has the expected number of rows
* @since 0.9.7
*/ | Returns whether the <code>Table table</code> has a certain number of <code>TableRow rows</code> | hasNumberOfRows | {
"repo_name": "testIT-WebTester/webtester-core",
"path": "webtester-support-hamcrest/src/main/java/info/novatec/testit/webtester/support/hamcrest/TableMatcher.java",
"license": "apache-2.0",
"size": 1450
} | [
"info.novatec.testit.webtester.pageobjects.Table",
"org.hamcrest.TypeSafeMatcher"
] | import info.novatec.testit.webtester.pageobjects.Table; import org.hamcrest.TypeSafeMatcher; | import info.novatec.testit.webtester.pageobjects.*; import org.hamcrest.*; | [
"info.novatec.testit",
"org.hamcrest"
] | info.novatec.testit; org.hamcrest; | 1,867,664 |
Map<String, ?> getProperties(T service); | Map<String, ?> getProperties(T service); | /**
* Retrieve the metadata associated to a registered service.
*
* @param service the service for which to retrieve metadata
* @return the metadata associated with the service
*/ | Retrieve the metadata associated to a registered service | getProperties | {
"repo_name": "apache/servicemix4-nmr",
"path": "nmr/api/src/main/java/org/apache/servicemix/nmr/api/service/ServiceRegistry.java",
"license": "apache-2.0",
"size": 1966
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,530,746 |
@Override
public UrlMatch match(final String url) {
final Matcher matcher = compiledUrl.matcher(url);
if (matcher.matches()) {
return new UrlMatch(extractParameters(matcher));
}
return null;
} | UrlMatch function(final String url) { final Matcher matcher = compiledUrl.matcher(url); if (matcher.matches()) { return new UrlMatch(extractParameters(matcher)); } return null; } | /**
* Test the given URL against the underlying pattern to determine if it
* matches, returning the results in a UrlMatch instance. If the URL
* matches, parse any applicable parameters from it, placing those also in
* the UrlMatch instance accessible by their parameter names.
*
* @param url
* ... | Test the given URL against the underlying pattern to determine if it matches, returning the results in a UrlMatch instance. If the URL matches, parse any applicable parameters from it, placing those also in the UrlMatch instance accessible by their parameter names | match | {
"repo_name": "geronimo-iia/restexpress",
"path": "restexpress-core/src/main/java/org/restexpress/url/UrlPattern.java",
"license": "apache-2.0",
"size": 8239
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,816,244 |
public static NBTTagCompound getNBT(ItemStack stack) {
initNBT(stack);
return stack.getTagCompound();
}
// SETTERS /////////////////////////////////////////////////////////////////// | static NBTTagCompound function(ItemStack stack) { initNBT(stack); return stack.getTagCompound(); } | /** Gets the NBTTagCompound in an ItemStack. Tries to init it
* previously in case there isn't one present **/ | Gets the NBTTagCompound in an ItemStack. Tries to init it | getNBT | {
"repo_name": "bafomdad/realfilingcabinet",
"path": "com/bafomdad/realfilingcabinet/utils/NBTUtils.java",
"license": "mit",
"size": 5196
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.item.*; import net.minecraft.nbt.*; | [
"net.minecraft.item",
"net.minecraft.nbt"
] | net.minecraft.item; net.minecraft.nbt; | 600,821 |
@SuppressWarnings("TooManyParameters")
static <T, U, V, W, X, Y> Attributes of(
AttributeKey<T> key1,
T value1,
AttributeKey<U> key2,
U value2,
AttributeKey<V> key3,
V value3,
AttributeKey<W> key4,
W value4,
AttributeKey<X> key5,
X value5,
AttributeK... | @SuppressWarnings(STR) static <T, U, V, W, X, Y> Attributes of( AttributeKey<T> key1, T value1, AttributeKey<U> key2, U value2, AttributeKey<V> key3, V value3, AttributeKey<W> key4, W value4, AttributeKey<X> key5, X value5, AttributeKey<Y> key6, Y value6) { return sortAndFilterToAttributes( key1, value1, key2, value2, ... | /**
* Returns a {@link Attributes} instance with the given key-value pairs. Order of the keys is not
* preserved. Duplicate keys will be removed.
*/ | Returns a <code>Attributes</code> instance with the given key-value pairs. Order of the keys is not preserved. Duplicate keys will be removed | of | {
"repo_name": "open-telemetry/opentelemetry-java",
"path": "api/all/src/main/java/io/opentelemetry/api/common/Attributes.java",
"license": "apache-2.0",
"size": 5542
} | [
"io.opentelemetry.api.common.ArrayBackedAttributes"
] | import io.opentelemetry.api.common.ArrayBackedAttributes; | import io.opentelemetry.api.common.*; | [
"io.opentelemetry.api"
] | io.opentelemetry.api; | 157,938 |
@Ignore
@Test
public void testExternalJDBCDriverUsage() throws InitializationException, SQLException {
final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class);
final DBCPConnectionPool service = new DBCPConnectionPool();
runner.addControllerService("test-external-jar... | void function() throws InitializationException, SQLException { final TestRunner runner = TestRunners.newTestRunner(TestProcessor.class); final DBCPConnectionPool service = new DBCPConnectionPool(); runner.addControllerService(STR, service); runner.setProperty(service, DBCPConnectionPool.DATABASE_URL, STRorg.mariadb.jdb... | /**
* NB!!!! Prerequisite: file should be present in /var/tmp/mariadb-java-client-1.1.7.jar Prerequisite: access to running MariaDb database server
*
* Test database connection using external JDBC jar located by URL. Connect, create table, insert, select, drop table.
*
*/ | NB!!!! Prerequisite: file should be present in /var/tmp/mariadb-java-client-1.1.7.jar Prerequisite: access to running MariaDb database server Test database connection using external JDBC jar located by URL. Connect, create table, insert, select, drop table | testExternalJDBCDriverUsage | {
"repo_name": "mcgilman/nifi",
"path": "nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/test/java/org/apache/nifi/dbcp/DBCPServiceTest.java",
"license": "apache-2.0",
"size": 28145
} | [
"java.sql.Connection",
"java.sql.SQLException",
"org.apache.nifi.reporting.InitializationException",
"org.apache.nifi.util.TestRunner",
"org.apache.nifi.util.TestRunners",
"org.junit.Assert",
"org.junit.rules.ExpectedException"
] | import java.sql.Connection; import java.sql.SQLException; import org.apache.nifi.reporting.InitializationException; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; import org.junit.Assert; import org.junit.rules.ExpectedException; | import java.sql.*; import org.apache.nifi.reporting.*; import org.apache.nifi.util.*; import org.junit.*; import org.junit.rules.*; | [
"java.sql",
"org.apache.nifi",
"org.junit",
"org.junit.rules"
] | java.sql; org.apache.nifi; org.junit; org.junit.rules; | 1,230,346 |
public void initialize() throws Exception {
logger.info("Attempting to initialize resource.");
Resource resource = find(null);
if (resource == null) {
logger.error("Unable to initialize resource!");
} else {
logger.info("Successfully initialized resource.");
}
}
| void function() throws Exception { logger.info(STR); Resource resource = find(null); if (resource == null) { logger.error(STR); } else { logger.info(STR); } } | /**
* Initialze the singleton resource, when the home is initialized.
*/ | Initialze the singleton resource, when the home is initialized | initialize | {
"repo_name": "NCIP/cagrid-grid-incubation",
"path": "grid-incubation/incubator/projects/mdr/projects/mdrQuery/src/org/cagrid/mdrq/service/globus/resource/MDRQueryResourceHome.java",
"license": "bsd-3-clause",
"size": 3548
} | [
"org.globus.wsrf.Resource"
] | import org.globus.wsrf.Resource; | import org.globus.wsrf.*; | [
"org.globus.wsrf"
] | org.globus.wsrf; | 1,207,879 |
@Test
public void writeAndReadHeader_WithCompressionAndEncryption() throws IOException
{
CommitLogDescriptor descriptor = new CommitLogDescriptor(CommitLogDescriptor.current_version, 1, compression, enabledEncryption);
ByteBuffer buffer = ByteBuffer.allocate(16 * 1024);
CommitLogDesc... | void function() throws IOException { CommitLogDescriptor descriptor = new CommitLogDescriptor(CommitLogDescriptor.current_version, 1, compression, enabledEncryption); ByteBuffer buffer = ByteBuffer.allocate(16 * 1024); CommitLogDescriptor.writeHeader(buffer, descriptor); buffer.flip(); FileSegmentInputStream dataInput ... | /**
* Shouldn't happen in the real world (should only have either compression or enabledTdeOptions), but the header
* functionality should be correct
*/ | Shouldn't happen in the real world (should only have either compression or enabledTdeOptions), but the header functionality should be correct | writeAndReadHeader_WithCompressionAndEncryption | {
"repo_name": "jrwest/cassandra",
"path": "test/unit/org/apache/cassandra/db/commitlog/CommitLogDescriptorTest.java",
"license": "apache-2.0",
"size": 16541
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"org.apache.cassandra.io.util.FileSegmentInputStream",
"org.junit.Assert"
] | import java.io.IOException; import java.nio.ByteBuffer; import org.apache.cassandra.io.util.FileSegmentInputStream; import org.junit.Assert; | import java.io.*; import java.nio.*; import org.apache.cassandra.io.util.*; import org.junit.*; | [
"java.io",
"java.nio",
"org.apache.cassandra",
"org.junit"
] | java.io; java.nio; org.apache.cassandra; org.junit; | 2,560,144 |
private RelationalStorageAttributesDto getRelationalStorageAttributes(StorageEntity storageEntity)
{
// Get JDBC URL for this storage. This storage attribute is required and must have a non-blank value.
String jdbcUrl = storageHelper
.getStorageAttributeValueByName(configurationHelpe... | RelationalStorageAttributesDto function(StorageEntity storageEntity) { String jdbcUrl = storageHelper .getStorageAttributeValueByName(configurationHelper.getProperty(ConfigurationValue.STORAGE_ATTRIBUTE_NAME_JDBC_URL), storageEntity, true, true); String jdbcUsername = storageHelper .getStorageAttributeValueByName(confi... | /**
* Returns storage attributes required to access relation table schema.
*
* @param storageEntity the storage entity
*
* @return the relational storage attributes DTO
*/ | Returns storage attributes required to access relation table schema | getRelationalStorageAttributes | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/RelationalTableRegistrationHelperServiceImpl.java",
"license": "apache-2.0",
"size": 36953
} | [
"org.finra.herd.model.dto.ConfigurationValue",
"org.finra.herd.model.dto.RelationalStorageAttributesDto",
"org.finra.herd.model.jpa.StorageEntity"
] | import org.finra.herd.model.dto.ConfigurationValue; import org.finra.herd.model.dto.RelationalStorageAttributesDto; import org.finra.herd.model.jpa.StorageEntity; | import org.finra.herd.model.dto.*; import org.finra.herd.model.jpa.*; | [
"org.finra.herd"
] | org.finra.herd; | 2,325,839 |
public PageImpl<T> setItems(List<T> items) {
this.items = items;
return this;
} | PageImpl<T> function(List<T> items) { this.items = items; return this; } | /**
* Sets the list of items.
*
* @param items the list of items in {@link List}.
* @return this Page object itself.
*/ | Sets the list of items | setItems | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storagecache/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_11_01/implementation/PageImpl.java",
"license": "mit",
"size": 1762
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,671,489 |
@Test
public void virtualizePacket() {
Ethernet eth = new Ethernet();
eth.setSourceMACAddress(SRC_MAC_ADDR);
eth.setDestinationMACAddress(DST_MAC_ADDR);
eth.setVlanID((short) 1);
eth.setPayload(null);
InboundPacket pInPacket =
new DefaultInboundPa... | void function() { Ethernet eth = new Ethernet(); eth.setSourceMACAddress(SRC_MAC_ADDR); eth.setDestinationMACAddress(DST_MAC_ADDR); eth.setVlanID((short) 1); eth.setPayload(null); InboundPacket pInPacket = new DefaultInboundPacket(CP22, eth, ByteBuffer.wrap(eth.serialize())); PacketContext pContext = new TestPacketCont... | /** Test the physical packet context is delivered to a proper (physical)
* virtual network and device.
*/ | Test the physical packet context is delivered to a proper (physical) virtual network and device | virtualizePacket | {
"repo_name": "gkatsikas/onos",
"path": "apps/virtual/app/src/test/java/org/onosproject/incubator/net/virtual/impl/provider/DefaultVirtualPacketProviderTest.java",
"license": "apache-2.0",
"size": 12712
} | [
"java.nio.ByteBuffer",
"org.junit.Assert",
"org.onlab.packet.Ethernet",
"org.onlab.packet.VlanId",
"org.onosproject.net.packet.DefaultInboundPacket",
"org.onosproject.net.packet.DefaultPacketContext",
"org.onosproject.net.packet.InboundPacket",
"org.onosproject.net.packet.OutboundPacket",
"org.onosp... | import java.nio.ByteBuffer; import org.junit.Assert; import org.onlab.packet.Ethernet; import org.onlab.packet.VlanId; import org.onosproject.net.packet.DefaultInboundPacket; import org.onosproject.net.packet.DefaultPacketContext; import org.onosproject.net.packet.InboundPacket; import org.onosproject.net.packet.Outbou... | import java.nio.*; import org.junit.*; import org.onlab.packet.*; import org.onosproject.net.packet.*; | [
"java.nio",
"org.junit",
"org.onlab.packet",
"org.onosproject.net"
] | java.nio; org.junit; org.onlab.packet; org.onosproject.net; | 1,546,303 |
protected SourceInfo determineSourceType(File sourceDir) throws IOException {
Properties props = new Properties();
File propsFile = new File(sourceDir, SOURCE_PROPERTY_FILENAME);
Reader reader = new FileReader(propsFile);
try {
props.load(reader);
} finally {
... | SourceInfo function(File sourceDir) throws IOException { Properties props = new Properties(); File propsFile = new File(sourceDir, SOURCE_PROPERTY_FILENAME); Reader reader = new FileReader(propsFile); try { props.load(reader); } finally { reader.close(); } for (String antTaskName : derivatedSources.keySet()) { boolean ... | /**
* For a candidate data source directory, check whether its
* <code>project.properties</code> file indicates what type of standard source
* it was derived from and return that parent source if possible.
*
* @param sourceDir The data source directory.
*
* @return The SourceInfo fo... | For a candidate data source directory, check whether its <code>project.properties</code> file indicates what type of standard source it was derived from and return that parent source if possible | determineSourceType | {
"repo_name": "drhee/toxoMine",
"path": "intermine/MineManager/installer/src/main/java/org/intermine/install/project/source/SourceInfoLoader.java",
"license": "lgpl-2.1",
"size": 12185
} | [
"java.io.File",
"java.io.FileFilter",
"java.io.FileReader",
"java.io.IOException",
"java.io.Reader",
"java.util.Properties"
] | import java.io.File; import java.io.FileFilter; import java.io.FileReader; import java.io.IOException; import java.io.Reader; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,228,957 |
public static <T> PCollection<T> createPrimitiveOutputInternal(
Pipeline pipeline,
WindowingStrategy<?, ?> windowingStrategy,
IsBounded isBounded) {
return new PCollection<T>(pipeline)
.setWindowingStrategyInternal(windowingStrategy)
.setIsBoundedInternal(isBounded);
} | static <T> PCollection<T> function( Pipeline pipeline, WindowingStrategy<?, ?> windowingStrategy, IsBounded isBounded) { return new PCollection<T>(pipeline) .setWindowingStrategyInternal(windowingStrategy) .setIsBoundedInternal(isBounded); } | /**
* Creates and returns a new {@link PCollection} for a primitive output.
*
* <p>For use by primitive transformations only.
*/ | Creates and returns a new <code>PCollection</code> for a primitive output. For use by primitive transformations only | createPrimitiveOutputInternal | {
"repo_name": "shakamunyi/beam",
"path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/values/PCollection.java",
"license": "apache-2.0",
"size": 9264
} | [
"com.google.cloud.dataflow.sdk.Pipeline",
"com.google.cloud.dataflow.sdk.util.WindowingStrategy"
] | import com.google.cloud.dataflow.sdk.Pipeline; import com.google.cloud.dataflow.sdk.util.WindowingStrategy; | import com.google.cloud.dataflow.sdk.*; import com.google.cloud.dataflow.sdk.util.*; | [
"com.google.cloud"
] | com.google.cloud; | 1,193,572 |
@Test
public void testCopyAssetsToDirectory_validArgs() throws Exception {
AssetsHelper.copyAssetsToDirectory(context.getAssets(), OUTPUT_DIR, ASSETS_TO_COPY);
// Get the Files in the output directory as an ArrayList for ease of use (compared to array)
final List<File> filesInOutputDir = new ArrayList<>(Arra... | void function() throws Exception { AssetsHelper.copyAssetsToDirectory(context.getAssets(), OUTPUT_DIR, ASSETS_TO_COPY); final List<File> filesInOutputDir = new ArrayList<>(Arrays.asList(OUTPUT_DIR.listFiles())); for (final String assetName : ASSETS_TO_COPY) { final File potentialOutputFile = new File(OUTPUT_DIR, assetN... | /**
* Test to verify that the
* {@link AssetsHelper#copyAssetsToDirectory(AssetManager, File, String...)} method functions
* correctly when provided with valid arguments.
*
* @throws Exception
* the method under test may throw this exception if some operation fails
*/ | Test to verify that the <code>AssetsHelper#copyAssetsToDirectory(AssetManager, File, String...)</code> method functions correctly when provided with valid arguments | testCopyAssetsToDirectory_validArgs | {
"repo_name": "MatthewTamlin/AndroidUtilities",
"path": "testing/src/androidTest/java/com/matthewtamlin/android_utilities/testing/TestAssetsHelper.java",
"license": "apache-2.0",
"size": 5190
} | [
"com.matthewtamlin.android_utilities.library.helpers.AssetsHelper",
"java.io.File",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.hamcrest.MatcherAssert"
] | import com.matthewtamlin.android_utilities.library.helpers.AssetsHelper; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.hamcrest.MatcherAssert; | import com.matthewtamlin.android_utilities.library.helpers.*; import java.io.*; import java.util.*; import org.hamcrest.*; | [
"com.matthewtamlin.android_utilities",
"java.io",
"java.util",
"org.hamcrest"
] | com.matthewtamlin.android_utilities; java.io; java.util; org.hamcrest; | 1,602,137 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<GenericResourceExpandedInner>> listByResourceGroupSinglePageAsync(
String resourceGroupName, String filter, String expand, Integer top, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<GenericResourceExpandedInner>> function( String resourceGroupName, String filter, String expand, Integer top, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == nul... | /**
* Get all the resources for a resource group.
*
* @param resourceGroupName The resource group with the resources to get.
* @param filter The filter to apply on the operation.<br><br>The properties you can use for eq (equals)
* or ne (not equals) are: location, resourceType, ... | Get all the resources for a resource group | listByResourceGroupSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java",
"license": "mit",
"size": 224761
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.resources.fluent.models.GenericResourceExpandedInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.resources.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,613,147 |
protected final void procTrans2FindNext(SrvTransactBuffer tbuf, SMBSrvPacket smbPkt)
throws IOException, SMBSrvException {
// Get the virtual circuit for the request
VirtualCircuit vc = m_sess.findVirtualCircuit(smbPkt.getUserId());
if ( vc == null) {
m_sess.sendErrorResponseSMB( smbPkt, SMBStatus.NTInv... | final void function(SrvTransactBuffer tbuf, SMBSrvPacket smbPkt) throws IOException, SMBSrvException { VirtualCircuit vc = m_sess.findVirtualCircuit(smbPkt.getUserId()); if ( vc == null) { m_sess.sendErrorResponseSMB( smbPkt, SMBStatus.NTInvalidParameter, SMBStatus.SRVNonSpecificError, SMBStatus.ErrSrv); return; } int ... | /**
* Process a transact2 file search continue request.
*
* @param tbuf Transaction request details
* @param smbPkt SMBSrvPacket
* @exception IOException
* @exception SMBSrvException
*/ | Process a transact2 file search continue request | procTrans2FindNext | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/smb/server/LanManProtocolHandler.java",
"license": "gpl-3.0",
"size": 104127
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"org.alfresco.jlan.debug.Debug",
"org.alfresco.jlan.server.core.InvalidDeviceInterfaceException",
"org.alfresco.jlan.server.filesys.DiskInterface",
"org.alfresco.jlan.server.filesys.FileInfo",
"org.alfresco.jlan.server.filesys.SearchContext",
"or... | import java.io.FileNotFoundException; import java.io.IOException; import org.alfresco.jlan.debug.Debug; import org.alfresco.jlan.server.core.InvalidDeviceInterfaceException; import org.alfresco.jlan.server.filesys.DiskInterface; import org.alfresco.jlan.server.filesys.FileInfo; import org.alfresco.jlan.server.filesys.S... | import java.io.*; import org.alfresco.jlan.debug.*; import org.alfresco.jlan.server.core.*; import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.smb.*; import org.alfresco.jlan.util.*; | [
"java.io",
"org.alfresco.jlan"
] | java.io; org.alfresco.jlan; | 1,039,626 |
public void removeEmitter(ConfigurableEmitter emitter) {
emitters.remove(emitter);
system.removeEmitter(emitter);
}
| void function(ConfigurableEmitter emitter) { emitters.remove(emitter); system.removeEmitter(emitter); } | /**
* Remove an emitter from the system held here
*
* @param emitter The emitter to be removed
*/ | Remove an emitter from the system held here | removeEmitter | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/tags/Slick0.19/tools/org/newdawn/slick/tools/peditor/ParticleCanvas.java",
"license": "bsd-2-clause",
"size": 8518
} | [
"org.newdawn.slick.particles.ConfigurableEmitter"
] | import org.newdawn.slick.particles.ConfigurableEmitter; | import org.newdawn.slick.particles.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 1,950,549 |
public static Map<String, String> getDbToHumanReadableMap() {
Map<String, String> dbAliasToNameMap = new HashMap<String, String>();
try {
AnnotationFormat[] afs = ProjectController.getInstance().getCurrentAnnotationFormats();
for (AnnotationFormat af : afs) {
for (CustomField field : af.getCustomField... | static Map<String, String> function() { Map<String, String> dbAliasToNameMap = new HashMap<String, String>(); try { AnnotationFormat[] afs = ProjectController.getInstance().getCurrentAnnotationFormats(); for (AnnotationFormat af : afs) { for (CustomField field : af.getCustomFields()) { dbAliasToNameMap.put(field.getAli... | /**
* Get the header for the table using the column aliases.
* @return a map of the column aliases to column names.
*/ | Get the header for the table using the column aliases | getDbToHumanReadableMap | {
"repo_name": "ronammar/pharmacogenomics",
"path": "src/pgx/PGXAnalysis.java",
"license": "lgpl-3.0",
"size": 17710
} | [
"java.util.HashMap",
"java.util.Map",
"org.ut.biolab.medsavant.client.project.ProjectController",
"org.ut.biolab.medsavant.shared.format.AnnotationFormat",
"org.ut.biolab.medsavant.shared.format.CustomField"
] | import java.util.HashMap; import java.util.Map; import org.ut.biolab.medsavant.client.project.ProjectController; import org.ut.biolab.medsavant.shared.format.AnnotationFormat; import org.ut.biolab.medsavant.shared.format.CustomField; | import java.util.*; import org.ut.biolab.medsavant.client.project.*; import org.ut.biolab.medsavant.shared.format.*; | [
"java.util",
"org.ut.biolab"
] | java.util; org.ut.biolab; | 1,960,692 |
WeekTO getWeekByDates( WeekTO weekTO ); | WeekTO getWeekByDates( WeekTO weekTO ); | /**
* Find Week by start date and final date.
*
* @param start
* @param end
* @return
*/ | Find Week by start date and final date | getWeekByDates | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-persistence/src/main/java/mx/com/cinepolis/digital/booking/persistence/dao/WeekDAO.java",
"license": "epl-1.0",
"size": 2602
} | [
"mx.com.cinepolis.digital.booking.commons.to.WeekTO"
] | import mx.com.cinepolis.digital.booking.commons.to.WeekTO; | import mx.com.cinepolis.digital.booking.commons.to.*; | [
"mx.com.cinepolis"
] | mx.com.cinepolis; | 2,675,083 |
boolean isAnnotationToDelete(AnnotationData annotation)
{
if (toDelete == null || toDelete.size() == 0) return false;
Iterator<AnnotationData> i = toDelete.iterator();
AnnotationData data;
while (i.hasNext()) {
data = i.next();
if (data.getId() == annotation.getId())
return true;
... | boolean isAnnotationToDelete(AnnotationData annotation) { if (toDelete == null toDelete.size() == 0) return false; Iterator<AnnotationData> i = toDelete.iterator(); AnnotationData data; while (i.hasNext()) { data = i.next(); if (data.getId() == annotation.getId()) return true; } return false; } | /**
* Returns <code>true</code> if the passed annotation has to be
* deleted, <code>false</code> otherwise.
*
* @param annotation The annotation to handle.
* @return See above.
*/ | Returns <code>true</code> if the passed annotation has to be deleted, <code>false</code> otherwise | isAnnotationToDelete | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java",
"license": "gpl-2.0",
"size": 130987
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,735,800 |
public static ExoPlaybackException createForRemote(String message) {
return new ExoPlaybackException(TYPE_REMOTE, message);
}
private ExoPlaybackException(@Type int type, Throwable cause) {
this(
type,
cause,
null,
null,
C.INDEX_UNSET,
null,
C.... | static ExoPlaybackException function(String message) { return new ExoPlaybackException(TYPE_REMOTE, message); } private ExoPlaybackException(@Type int type, Throwable cause) { this( type, cause, null, null, C.INDEX_UNSET, null, C.FORMAT_HANDLED, false); } private ExoPlaybackException(@Type int type, String message) { t... | /**
* Creates an instance of type {@link #TYPE_REMOTE}.
*
* @param message The message associated with the error.
* @return The created instance.
*/ | Creates an instance of type <code>#TYPE_REMOTE</code> | createForRemote | {
"repo_name": "amzn/exoplayer-amazon-port",
"path": "library/common/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java",
"license": "apache-2.0",
"size": 12776
} | [
"android.os.SystemClock",
"androidx.annotation.Nullable",
"com.google.android.exoplayer2.C",
"com.google.android.exoplayer2.source.MediaPeriodId"
] | import android.os.SystemClock; import androidx.annotation.Nullable; import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.source.MediaPeriodId; | import android.os.*; import androidx.annotation.*; import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.source.*; | [
"android.os",
"androidx.annotation",
"com.google.android"
] | android.os; androidx.annotation; com.google.android; | 2,845,590 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.