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 Map<MavenModule,List<MavenBuild>> getModuleBuilds() { Collection<MavenModule> mods = getParent().getModules(); // identify the build number range. [start,end) MavenModuleSetBuild nb = getNextBuild(); int end = nb!=null ? nb.getNumber() : Integer.MAX_VALUE; // preserv...
Map<MavenModule,List<MavenBuild>> function() { Collection<MavenModule> mods = getParent().getModules(); MavenModuleSetBuild nb = getNextBuild(); int end = nb!=null ? nb.getNumber() : Integer.MAX_VALUE; Map<MavenModule,List<MavenBuild>> r = new LinkedHashMap<MavenModule,List<MavenBuild>>(mods.size()); for (MavenModule m...
/** * Computes the module builds that correspond to this build. * <p> * A module may be built multiple times (by the user action), * so the value is a list. */
Computes the module builds that correspond to this build. A module may be built multiple times (by the user action), so the value is a list
getModuleBuilds
{ "repo_name": "rwaldron/jenkins", "path": "maven-plugin/src/main/java/hudson/maven/MavenModuleSetBuild.java", "license": "mit", "size": 71041 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
380,508
MarshalledInstance iface = null;
MarshalledInstance iface = null;
/** * Obtain the initial service proxy in the context of the server subject. * The proxy is (arbitrarily) created with the flags set to AS_IS. * * @return a serialized copy of service proxy */
Obtain the initial service proxy in the context of the server subject. The proxy is (arbitrarily) created with the flags set to AS_IS
getProxy
{ "repo_name": "pfirmstone/river-internet", "path": "qa/src/org/apache/river/test/impl/end2end/e2etest/SecureServer.java", "license": "apache-2.0", "size": 8749 }
[ "net.jini.io.MarshalledInstance" ]
import net.jini.io.MarshalledInstance;
import net.jini.io.*;
[ "net.jini.io" ]
net.jini.io;
800,929
public void setDesiredPerformance(TString value) { this.desiredPerformance = value; }
void function(TString value) { this.desiredPerformance = value; }
/** * Set the desired effectiveness of the service request. Example: the minimum * percentage of known enemy command and control nodes that must be rendered * inoperable for successful mission accomplishment.. * <p> * @param value the DesiredPerformance value in a {@link TString} data type * @since 3....
Set the desired effectiveness of the service request. Example: the minimum percentage of known enemy command and control nodes that must be rendered inoperable for successful mission accomplishment..
setDesiredPerformance
{ "repo_name": "KeyBridge/lib-openssrf", "path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/radiationplan/JammingPerformance.java", "license": "apache-2.0", "size": 11288 }
[ "us.gov.dod.standard.ssrf._3_1.metadata.domains.TString" ]
import us.gov.dod.standard.ssrf._3_1.metadata.domains.TString;
import us.gov.dod.standard.ssrf.*;
[ "us.gov.dod" ]
us.gov.dod;
1,892,464
private static CountDownLatch blockIndexing(Ignite node) { UUID nodeId = ((IgniteEx)node).localNode().id(); return blockIndexing(nodeId); }
static CountDownLatch function(Ignite node) { UUID nodeId = ((IgniteEx)node).localNode().id(); return blockIndexing(nodeId); }
/** * Block indexing. * * @param node Node. */
Block indexing
blockIndexing
{ "repo_name": "shroman/ignite", "path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java", "license": "apache-2.0", "size": 40629 }
[ "java.util.concurrent.CountDownLatch", "org.apache.ignite.Ignite", "org.apache.ignite.internal.IgniteEx" ]
import java.util.concurrent.CountDownLatch; import org.apache.ignite.Ignite; import org.apache.ignite.internal.IgniteEx;
import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.internal.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,517,815
public static void store(RhnSet set) { if (set == null) { return; } RhnSetFactory.save(set); }
static void function(RhnSet set) { if (set == null) { return; } RhnSetFactory.save(set); }
/** * Stores the RhnSet in the db * Replaces old set if one exists. * @param set The set to store/save. */
Stores the RhnSet in the db Replaces old set if one exists
store
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/rhnset/RhnSetManager.java", "license": "gpl-2.0", "size": 2865 }
[ "com.redhat.rhn.domain.rhnset.RhnSet", "com.redhat.rhn.domain.rhnset.RhnSetFactory" ]
import com.redhat.rhn.domain.rhnset.RhnSet; import com.redhat.rhn.domain.rhnset.RhnSetFactory;
import com.redhat.rhn.domain.rhnset.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
201,130
private static String postProcessingAnswer(String ans, SeqClassifierFlags flags) { if (flags.useHk) { //logger.info("Using HK post processing."); return postProcessingAnswerHK(ans); } else if (flags.useAs) { //logger.info("Using AS post processing."); return postProcessingAnswerAS(ans)...
static String function(String ans, SeqClassifierFlags flags) { if (flags.useHk) { return postProcessingAnswerHK(ans); } else if (flags.useAs) { return postProcessingAnswerAS(ans); } else if (flags.usePk) { return postProcessingAnswerPK(ans,flags.keepAllWhitespaces); } else if (flags.useMsr) { return postProcessingAnswe...
/** * post process the answer to be output * these post processing are not dependent on original input */
post process the answer to be output these post processing are not dependent on original input
postProcessingAnswer
{ "repo_name": "hbbpb/stanford-corenlp-gv", "path": "src/edu/stanford/nlp/wordseg/ChineseStringUtils.java", "license": "gpl-2.0", "size": 21265 }
[ "edu.stanford.nlp.sequences.SeqClassifierFlags", "java.util.regex.Pattern" ]
import edu.stanford.nlp.sequences.SeqClassifierFlags; import java.util.regex.Pattern;
import edu.stanford.nlp.sequences.*; import java.util.regex.*;
[ "edu.stanford.nlp", "java.util" ]
edu.stanford.nlp; java.util;
282,767
protected void onChildVisibilityChanged(View child, int oldVisibility, int newVisibility) { if (mTransition != null) { if (newVisibility == VISIBLE) { mTransition.showChild(this, child, oldVisibility); } else { mTransition.hideChild(this, child, newVis...
void function(View child, int oldVisibility, int newVisibility) { if (mTransition != null) { if (newVisibility == VISIBLE) { mTransition.showChild(this, child, oldVisibility); } else { mTransition.hideChild(this, child, newVisibility); if (mTransitioningViews != null && mTransitioningViews.contains(child)) { if (mVisib...
/** * Called when a view's visibility has changed. Notify the parent to take any appropriate * action. * * @param child The view whose visibility has changed * @param oldVisibility The previous visibility value (GONE, INVISIBLE, or VISIBLE). * @param newVisibility The new visibility value ...
Called when a view's visibility has changed. Notify the parent to take any appropriate action
onChildVisibilityChanged
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/core/java/android/view/ViewGroup.java", "license": "gpl-2.0", "size": 240480 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
712,962
public void setInetAddress(final String address) { try { this.inetAddress = InetAddress.getByName(address); } catch (final UnknownHostException e) { throw new RuntimeException("Invalid address " + address); } }
void function(final String address) { try { this.inetAddress = InetAddress.getByName(address); } catch (final UnknownHostException e) { throw new RuntimeException(STR + address); } }
/** * RADIUS server network address. * * @param address Network address as a string. */
RADIUS server network address
setInetAddress
{ "repo_name": "keshvari/cas", "path": "cas-server-support-radius/src/main/java/org/jasig/cas/adaptors/radius/RadiusClientFactory.java", "license": "apache-2.0", "size": 3527 }
[ "java.net.InetAddress", "java.net.UnknownHostException" ]
import java.net.InetAddress; import java.net.UnknownHostException;
import java.net.*;
[ "java.net" ]
java.net;
2,005,343
public boolean eliminar(BaseDeDados mail) { boolean ok = false; try { recMails.deleteRecord(mail.getId()); ok = true; } catch (RecordStoreNotOpenException ex) { ex.printStackTrace(); } catch (InvalidRecordIDException ex) { ex.p...
boolean function(BaseDeDados mail) { boolean ok = false; try { recMails.deleteRecord(mail.getId()); ok = true; } catch (RecordStoreNotOpenException ex) { ex.printStackTrace(); } catch (InvalidRecordIDException ex) { ex.printStackTrace(); } catch (RecordStoreException ex) { ex.printStackTrace(); } return ok; }
/** * elimina o registo do mail passado como parametro do RMS. * * PARA MELHORAR: * - utilizar constantes de retorno de erros e sucesso! * @param mail objecto da classe BaseDeDados de onde vao ser extraida id do record a eliminar * @return 'true' se foi bem sucedido. * 'false' se houv...
elimina o registo do mail passado como parametro do RMS. - utilizar constantes de retorno de erros e sucesso
eliminar
{ "repo_name": "rvelhote/university", "path": "bluetooth/bluetooth.cliente.midlet/src/bluetooth/cliente/RMS.java", "license": "unlicense", "size": 10886 }
[ "javax.microedition.rms.InvalidRecordIDException", "javax.microedition.rms.RecordStoreException", "javax.microedition.rms.RecordStoreNotOpenException" ]
import javax.microedition.rms.InvalidRecordIDException; import javax.microedition.rms.RecordStoreException; import javax.microedition.rms.RecordStoreNotOpenException;
import javax.microedition.rms.*;
[ "javax.microedition" ]
javax.microedition;
2,586,706
@Before public void setUp() throws Exception { MockServiceCollector.setDelegate(null); MockLogAppender.setupLogging(); m_rrdStrategy = new JRobinRrdStrategy(); m_resourceStorageDao = new FilesystemResourceStorageDao(); File snmpRrdDirectory = (File)m_context.getAttribut...
void function() throws Exception { MockServiceCollector.setDelegate(null); MockLogAppender.setupLogging(); m_rrdStrategy = new JRobinRrdStrategy(); m_resourceStorageDao = new FilesystemResourceStorageDao(); File snmpRrdDirectory = (File)m_context.getAttribute(STR); m_resourceStorageDao.setRrdDirectory(snmpRrdDirectory....
/** * Sets up the test. * * @throws Exception the exception */
Sets up the test
setUp
{ "repo_name": "jeffgdotorg/opennms", "path": "opennms-services/src/test/java/org/opennms/netmgt/collectd/SnmpCollectorWithPointerLikeExtendedPropertiesIT.java", "license": "gpl-2.0", "size": 11476 }
[ "java.io.File", "java.net.InetAddress", "java.util.Collection", "java.util.Set", "org.junit.Assert", "org.opennms.core.test.MockLogAppender", "org.opennms.core.utils.InetAddressUtils", "org.opennms.netmgt.collection.test.api.CollectorTestUtils", "org.opennms.netmgt.config.SnmpPeerFactory", "org.op...
import java.io.File; import java.net.InetAddress; import java.util.Collection; import java.util.Set; import org.junit.Assert; import org.opennms.core.test.MockLogAppender; import org.opennms.core.utils.InetAddressUtils; import org.opennms.netmgt.collection.test.api.CollectorTestUtils; import org.opennms.netmgt.config.S...
import java.io.*; import java.net.*; import java.util.*; import org.junit.*; import org.opennms.core.test.*; import org.opennms.core.utils.*; import org.opennms.netmgt.collection.test.api.*; import org.opennms.netmgt.config.*; import org.opennms.netmgt.dao.support.*; import org.opennms.netmgt.model.*; import org.opennm...
[ "java.io", "java.net", "java.util", "org.junit", "org.opennms.core", "org.opennms.netmgt" ]
java.io; java.net; java.util; org.junit; org.opennms.core; org.opennms.netmgt;
2,342,226
@RequirePOST public synchronized HttpResponse doConfigSubmit( StaplerRequest req) throws IOException, ServletException, FormException { //[Erik] commit is taking care of the close BulkChange bc = new BulkChange(MONITORS_OWNER); //NOSONAR try { Jenkins.get().checkPermission(Je...
synchronized HttpResponse function( StaplerRequest req) throws IOException, ServletException, FormException { BulkChange bc = new BulkChange(MONITORS_OWNER); try { Jenkins.get().checkPermission(Jenkins.ADMINISTER); monitors.rebuild(req,req.getSubmittedForm(),getNodeMonitorDescriptors()); for (Descriptor<NodeMonitor> d ...
/** * Accepts submission from the configuration page. */
Accepts submission from the configuration page
doConfigSubmit
{ "repo_name": "ErikVerheul/jenkins", "path": "core/src/main/java/hudson/model/ComputerSet.java", "license": "mit", "size": 16353 }
[ "hudson.model.Descriptor", "hudson.node_monitors.NodeMonitor", "hudson.util.FormApply", "java.io.IOException", "javax.servlet.ServletException", "org.kohsuke.stapler.HttpResponse", "org.kohsuke.stapler.StaplerRequest" ]
import hudson.model.Descriptor; import hudson.node_monitors.NodeMonitor; import hudson.util.FormApply; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.StaplerRequest;
import hudson.model.*; import hudson.node_monitors.*; import hudson.util.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "hudson.model", "hudson.node_monitors", "hudson.util", "java.io", "javax.servlet", "org.kohsuke.stapler" ]
hudson.model; hudson.node_monitors; hudson.util; java.io; javax.servlet; org.kohsuke.stapler;
1,738,346
public static void init(int nofRows) { //allowed nofRows 2..4 if(nofRows < 2){ nofRows = 2; }else if(nofRows > 4){ nofRows = 4; } lcdMaxRows = nofRows; done = true; lcdDone = true; lcdStatus = lcdIdle; lcdCmdBuffOut = 0; lcdCmdBuffLen = 0; cursPos = 0; adrCntOfRow[0] =...
static void function(int nofRows) { if(nofRows < 2){ nofRows = 2; }else if(nofRows > 4){ nofRows = 4; } lcdMaxRows = nofRows; done = true; lcdDone = true; lcdStatus = lcdIdle; lcdCmdBuffOut = 0; lcdCmdBuffLen = 0; cursPos = 0; adrCntOfRow[0] = 0x80; adrCntOfRow[1] = 0xC0; adrCntOfRow[2] = 0x90; adrCntOfRow[3] = 0xD0; U...
/** * Initialisation of the display.<br> * To use this driver, this method must be called mandatory. * */
Initialisation of the display. To use this driver, this method must be called mandatory
init
{ "repo_name": "AaronLeander/runtime-library", "path": "src/ch/ntb/inf/deep/runtime/mpc555/driver/HD44780U.java", "license": "apache-2.0", "size": 8736 }
[ "ch.ntb.inf.deep.runtime.ppc32.Task", "ch.ntb.inf.deep.unsafe.US" ]
import ch.ntb.inf.deep.runtime.ppc32.Task; import ch.ntb.inf.deep.unsafe.US;
import ch.ntb.inf.deep.runtime.ppc32.*; import ch.ntb.inf.deep.unsafe.*;
[ "ch.ntb.inf" ]
ch.ntb.inf;
1,057,583
StringBuilder result = new StringBuilder(); long totalmem = Runtime.getRuntime().totalMemory(); long freemem = Runtime.getRuntime().freeMemory(); WingsStatistics stats = WingsStatistics.getStatistics(); result.append(System.currentTimeMillis()).append(' ') .append(stats...
StringBuilder result = new StringBuilder(); long totalmem = Runtime.getRuntime().totalMemory(); long freemem = Runtime.getRuntime().freeMemory(); WingsStatistics stats = WingsStatistics.getStatistics(); result.append(System.currentTimeMillis()).append(' ') .append(stats.getUptime()).append(' ') .append(stats.getOverall...
/** * Do not call this method directly. Used by Timer. */
Do not call this method directly. Used by Timer
run
{ "repo_name": "dheid/wings3", "path": "wings-demos/demo-wingset/src/main/java/wingset/StatisticsTimerTask.java", "license": "lgpl-2.1", "size": 3969 }
[ "org.wings.session.WingsStatistics" ]
import org.wings.session.WingsStatistics;
import org.wings.session.*;
[ "org.wings.session" ]
org.wings.session;
1,157,644
@Override public synchronized CorrelationCase newCase(CorrelationCase eamCase) throws EamDbException { // check if there is already an existing CorrelationCase for this Case CorrelationCase cRCase = getCaseByUUID(eamCase.getCaseUUID()); if (cRCase != null) { return c...
synchronized CorrelationCase function(CorrelationCase eamCase) throws EamDbException { CorrelationCase cRCase = getCaseByUUID(eamCase.getCaseUUID()); if (cRCase != null) { return cRCase; } Connection conn = connect(); PreparedStatement preparedStatement = null; String sql = STR + STR + STR + getConflictClause(); try { ...
/** * Creates new Case in the database * * Expects the Organization for this case to already exist in the database. * * @param eamCase The case to add * @returns New Case class with populated database ID */
Creates new Case in the database Expects the Organization for this case to already exist in the database
newCase
{ "repo_name": "APriestman/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java", "license": "apache-2.0", "size": 98929 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.Types" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,165,918
public void setTileType() { for (County county : counties) { Point point = county.getGridPoint(tileMap); int populationRating = (int) Math .floor(county.populationDensity / 1000.0); Generation.generateCity(tileMap, point, populationRating); if (populationRating == 0) { for (int i = 0; i < 1...
void function() { for (County county : counties) { Point point = county.getGridPoint(tileMap); int populationRating = (int) Math .floor(county.populationDensity / 1000.0); Generation.generateCity(tileMap, point, populationRating); if (populationRating == 0) { for (int i = 0; i < 15; i++) { Point randPoint = new Point(p...
/** * Populates them map with cities, towns, villages and farms. */
Populates them map with cities, towns, villages and farms
setTileType
{ "repo_name": "YRSNorwich/Datamon", "path": "server/java_source/main/java/com/hoolean/statstomaps/StatsToMaps.java", "license": "mit", "size": 15454 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,516,148
static JSModule[] createModuleBush(String ... inputs) { Preconditions.checkState(inputs.length > 2); JSModule[] modules = createModules(inputs); for (int i = 1; i < modules.length; i++) { modules[i].addDependency(modules[i == 1 ? 0 : 1]); } return modules; }
static JSModule[] createModuleBush(String ... inputs) { Preconditions.checkState(inputs.length > 2); JSModule[] modules = createModules(inputs); for (int i = 1; i < modules.length; i++) { modules[i].addDependency(modules[i == 1 ? 0 : 1]); } return modules; }
/** * Generates a list of modules from a list of inputs, such that modules * form a bush formation. In a bush formation, module 2 depends * on module 1, and all other modules depend on module 2. */
Generates a list of modules from a list of inputs, such that modules form a bush formation. In a bush formation, module 2 depends on module 1, and all other modules depend on module 2
createModuleBush
{ "repo_name": "JonathanWalsh/Granule-Closure-Compiler", "path": "test/com/google/javascript/jscomp/CompilerTestCase.java", "license": "apache-2.0", "size": 36057 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,025,898
public void setValue(Serializable value, PropertyTypeConverter converter) { if (value == null) { this.persistedType = ORDINAL_NULL; this.persistedTypeEnum = PersistedType.NULL; this.longValue = LONG_ZERO; } else { ...
void function(Serializable value, PropertyTypeConverter converter) { if (value == null) { this.persistedType = ORDINAL_NULL; this.persistedTypeEnum = PersistedType.NULL; this.longValue = LONG_ZERO; } else { persistedTypeEnum = converter.getPersistentType(value); persistedType = persistedTypeEnum.getOrdinalNumber(); swi...
/** * Shortcut method to set the value. It will be converted as required and the necessary fields * will be populated. * * @param value the value to persist (may be <tt>null</tt>) * @param converter the converter that will perform and type conversion */
Shortcut method to set the value. It will be converted as required and the necessary fields will be populated
setValue
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/domain/propval/PropertyValueEntity.java", "license": "lgpl-3.0", "size": 14745 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,533,244
public SearchRequestBuilder addSort(String field, SortOrder order) { sourceBuilder().sort(field, order); return this; }
SearchRequestBuilder function(String field, SortOrder order) { sourceBuilder().sort(field, order); return this; }
/** * Adds a sort against the given field name and the sort ordering. * * @param field The name of the field * @param order The sort ordering */
Adds a sort against the given field name and the sort ordering
addSort
{ "repo_name": "speedplane/elasticsearch", "path": "src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java", "license": "apache-2.0", "size": 27105 }
[ "org.elasticsearch.search.sort.SortOrder" ]
import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.search.sort.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
32,242
public OFMatch setDataLayerSource(String mac) { byte bytes[] = HexString.fromHexString(mac); if (bytes.length != 6) throw new IllegalArgumentException( "expected string with 6 octets, got '" ...
OFMatch function(String mac) { byte bytes[] = HexString.fromHexString(mac); if (bytes.length != 6) throw new IllegalArgumentException( STR + mac + "'"); this.dataLayerSource = bytes; return this; }
/** * Set dl_src, but first translate to byte[] using HexString * * @param mac * A colon separated string of 6 pairs of octets, e..g., * "00:17:42:EF:CD:8D" */
Set dl_src, but first translate to byte[] using HexString
setDataLayerSource
{ "repo_name": "yeasy/floodlight-lc", "path": "src/main/java/org/openflow/protocol/OFMatch.java", "license": "apache-2.0", "size": 37985 }
[ "org.openflow.util.HexString" ]
import org.openflow.util.HexString;
import org.openflow.util.*;
[ "org.openflow.util" ]
org.openflow.util;
832,472
@Test public void testIdentifierBETWEEN() { try { receiver = receiverSession.createReceiver(receiverQueue, "BETWEEN > 0"); Assert.fail("BETWEEN is not a valid identifier"); } catch (JMSException e) { } }
void function() { try { receiver = receiverSession.createReceiver(receiverQueue, STR); Assert.fail(STR); } catch (JMSException e) { } }
/** * Test that identifiers can't be <code>BETWEEN</code>. */
Test that identifiers can't be <code>BETWEEN</code>
testIdentifierBETWEEN
{ "repo_name": "jbertram/activemq-artemis-old", "path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/selector/SelectorSyntaxTest.java", "license": "apache-2.0", "size": 11466 }
[ "javax.jms.JMSException", "org.junit.Assert" ]
import javax.jms.JMSException; import org.junit.Assert;
import javax.jms.*; import org.junit.*;
[ "javax.jms", "org.junit" ]
javax.jms; org.junit;
153,098
protected void removeInvalidChildren() { if (getLoadState() == LoadState.LOADED) { List<CmsSitemapTreeItem> toDelete = new ArrayList<CmsSitemapTreeItem>(); for (int i = 0; i < getChildCount(); i++) { CmsSitemapTreeItem item = (CmsSitemapTreeItem)getChild(i); ...
void function() { if (getLoadState() == LoadState.LOADED) { List<CmsSitemapTreeItem> toDelete = new ArrayList<CmsSitemapTreeItem>(); for (int i = 0; i < getChildCount(); i++) { CmsSitemapTreeItem item = (CmsSitemapTreeItem)getChild(i); CmsUUID id = item.getEntryId(); if ((id != null) && (CmsSitemapView.getInstance().ge...
/** * Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry. */
Helper method to remove invalid children that don't have a corresponding CmsSitemapClientEntry
removeInvalidChildren
{ "repo_name": "ggiudetti/opencms-core", "path": "src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java", "license": "lgpl-2.1", "size": 33400 }
[ "java.util.ArrayList", "java.util.List", "org.opencms.util.CmsUUID" ]
import java.util.ArrayList; import java.util.List; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.util.*;
[ "java.util", "org.opencms.util" ]
java.util; org.opencms.util;
1,463,981
@Permission(ServiceOperation.ACCOUNT_DETAILS) @WebMethod AccountHistoryResultPage searchAccountHistory(@WebParam(name = "params") AccountHistorySearchParameters params);
@Permission(ServiceOperation.ACCOUNT_DETAILS) AccountHistoryResultPage searchAccountHistory(@WebParam(name = STR) AccountHistorySearchParameters params);
/** * Searches for transfers and return the status for a given member account */
Searches for transfers and return the status for a given member account
searchAccountHistory
{ "repo_name": "BitcoinReserve/java-client-api", "path": "src/nl/strohalm/cyclos/webservices/accounts/AccountWebService.java", "license": "gpl-2.0", "size": 2249 }
[ "javax.jws.WebParam", "nl.strohalm.cyclos.webservices.Permission", "nl.strohalm.cyclos.webservices.ServiceOperation" ]
import javax.jws.WebParam; import nl.strohalm.cyclos.webservices.Permission; import nl.strohalm.cyclos.webservices.ServiceOperation;
import javax.jws.*; import nl.strohalm.cyclos.webservices.*;
[ "javax.jws", "nl.strohalm.cyclos" ]
javax.jws; nl.strohalm.cyclos;
87,566
public static <T extends TransactionalProtocolClient.Operation> TransactionalProtocolClient.PreparedOperation<T> create(final T operation, final String failureDescription) { final ModelNode failedResult = new ModelNode(); failedResult.get(ModelDescriptionConstants.OUTCOME).set(ModelDescr...
static <T extends TransactionalProtocolClient.Operation> TransactionalProtocolClient.PreparedOperation<T> function(final T operation, final String failureDescription) { final ModelNode failedResult = new ModelNode(); failedResult.get(ModelDescriptionConstants.OUTCOME).set(ModelDescriptionConstants.FAILED); failedResult...
/** * Create a failed operation. * * @param operation the operation * @param failureDescription the failure description * @param <T> the operation type * @return the failed operation */
Create a failed operation
create
{ "repo_name": "jamezp/wildfly-core", "path": "controller/src/main/java/org/jboss/as/controller/remote/BlockingQueueOperationListener.java", "license": "lgpl-2.1", "size": 9561 }
[ "org.jboss.as.controller.descriptions.ModelDescriptionConstants", "org.jboss.dmr.ModelNode" ]
import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.dmr.ModelNode;
import org.jboss.as.controller.descriptions.*; import org.jboss.dmr.*;
[ "org.jboss.as", "org.jboss.dmr" ]
org.jboss.as; org.jboss.dmr;
1,001,552
public Set<SQLIdentifier> getKeyColumns( TableName table ) { return tableToKeyColumns.get( table ); }
Set<SQLIdentifier> function( TableName table ) { return tableToKeyColumns.get( table ); }
/** * Returns the columns that are used as keys in the given table. * * @param table * name of the table, must not be <code>null</code> * @return columns that are used as keys, can be <code>null</code> (no autogenerated columns) */
Returns the columns that are used as keys in the given table
getKeyColumns
{ "repo_name": "deegree/deegree3", "path": "deegree-datastores/deegree-featurestores/deegree-featurestore-sql/src/main/java/org/deegree/feature/persistence/sql/id/TableDependencies.java", "license": "lgpl-2.1", "size": 13526 }
[ "java.util.Set", "org.deegree.commons.jdbc.SQLIdentifier", "org.deegree.commons.jdbc.TableName" ]
import java.util.Set; import org.deegree.commons.jdbc.SQLIdentifier; import org.deegree.commons.jdbc.TableName;
import java.util.*; import org.deegree.commons.jdbc.*;
[ "java.util", "org.deegree.commons" ]
java.util; org.deegree.commons;
2,694,784
protected Object convertToObject(String target) { Object result = target; if (target instanceof String) { String message = (String) target; if (StringUtils.equals(message, INTERIM_MSG)) { result = INTERIM_CD; } else if (Strin...
Object function(String target) { Object result = target; if (target instanceof String) { String message = (String) target; if (StringUtils.equals(message, INTERIM_MSG)) { result = INTERIM_CD; } else if (StringUtils.equals(message, FINAL_MSG)) { result = FINAL_CD; } } return result; }
/** * Converts the given statusCode into a status message. */
Converts the given statusCode into a status message
convertToObject
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/fp/businessobject/format/CashReceiptDepositTypeFormatter.java", "license": "agpl-3.0", "size": 2981 }
[ "org.apache.commons.lang.StringUtils" ]
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
1,220,936
public void setUrlAttribute(String name, String value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof UrlAttribute)) { throw new IllegalStateException("Cannot set url value on attribute with different type, " + attribute.getClass().getName() + " setting value " + value); ...
void function(String name, String value) { Attribute attribute = getAttributes().get(name); if (!(attribute instanceof UrlAttribute)) { throw new IllegalStateException(STR + attribute.getClass().getName() + STR + value); } ((UrlAttribute) attribute).setValue(value); }
/** * Set attribute value of given type. * * @param name attribute name * @param value attribute value */
Set attribute value of given type
setUrlAttribute
{ "repo_name": "geomajas/geomajas-project-client-gwt", "path": "client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java", "license": "agpl-3.0", "size": 16672 }
[ "org.geomajas.layer.feature.Attribute", "org.geomajas.layer.feature.attribute.UrlAttribute" ]
import org.geomajas.layer.feature.Attribute; import org.geomajas.layer.feature.attribute.UrlAttribute;
import org.geomajas.layer.feature.*; import org.geomajas.layer.feature.attribute.*;
[ "org.geomajas.layer" ]
org.geomajas.layer;
1,483,680
CompletableFuture<Double> getCarbonDioxidePeakLevel();
CompletableFuture<Double> getCarbonDioxidePeakLevel();
/** * Retrieves the carbon dioxide peak level * * @return a future that will contain the carbon dioxide level as a value between 0 and 100000 */
Retrieves the carbon dioxide peak level
getCarbonDioxidePeakLevel
{ "repo_name": "beowulfe/HAP-Java", "path": "src/main/java/io/github/hapjava/accessories/optionalcharacteristic/AccessoryWithCarbonDioxideLevel.java", "license": "mit", "size": 3341 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,520,734
public NotificationBaseResponse deleteNotification(String name) { NotificationBaseRequest deleteRequest = NotificationBaseRequest.of(name); return deleteNotification(deleteRequest); }
NotificationBaseResponse function(String name) { NotificationBaseRequest deleteRequest = NotificationBaseRequest.of(name); return deleteNotification(deleteRequest); }
/** * Delete notification with specified notification name. * * @param name The notification name * @return A deleting notification response */
Delete notification with specified notification name
deleteNotification
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/bvw/BvwClient.java", "license": "apache-2.0", "size": 39847 }
[ "com.baidubce.services.bvw.model.notification.NotificationBaseRequest", "com.baidubce.services.bvw.model.notification.NotificationBaseResponse" ]
import com.baidubce.services.bvw.model.notification.NotificationBaseRequest; import com.baidubce.services.bvw.model.notification.NotificationBaseResponse;
import com.baidubce.services.bvw.model.notification.*;
[ "com.baidubce.services" ]
com.baidubce.services;
903,913
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String circuitName, String authorizationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String circuitName, String authorizationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName), serviceCallback); }
/** * Deletes the specified authorization from the specified express route circuit. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. * @param serviceCallback th...
Deletes the specified authorization from the specified express route circuit
beginDeleteAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitAuthorizationsInner.java", "license": "mit", "size": 48736 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,335,603
public static boolean requestedQopContainsPrivacy( Map<String, String> saslProps) { Set<String> requestedQop = ImmutableSet.copyOf(Arrays.asList( saslProps.get(Sasl.QOP).split(","))); return requestedQop.contains("auth-conf"); }
static boolean function( Map<String, String> saslProps) { Set<String> requestedQop = ImmutableSet.copyOf(Arrays.asList( saslProps.get(Sasl.QOP).split(","))); return requestedQop.contains(STR); }
/** * Check whether requested SASL Qop contains privacy. * * @param saslProps properties of SASL negotiation * @return boolean true if privacy exists */
Check whether requested SASL Qop contains privacy
requestedQopContainsPrivacy
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/sasl/DataTransferSaslUtil.java", "license": "apache-2.0", "size": 22893 }
[ "java.util.Arrays", "java.util.Map", "java.util.Set", "javax.security.sasl.Sasl", "org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableSet" ]
import java.util.Arrays; import java.util.Map; import java.util.Set; import javax.security.sasl.Sasl; import org.apache.hadoop.thirdparty.com.google.common.collect.ImmutableSet;
import java.util.*; import javax.security.sasl.*; import org.apache.hadoop.thirdparty.com.google.common.collect.*;
[ "java.util", "javax.security", "org.apache.hadoop" ]
java.util; javax.security; org.apache.hadoop;
91,653
public top.zbeboy.isy.domain.tables.pojos.DefenseGroup fetchOneByDefenseGroupId(String value) { return fetchOne(DefenseGroup.DEFENSE_GROUP.DEFENSE_GROUP_ID, value); }
top.zbeboy.isy.domain.tables.pojos.DefenseGroup function(String value) { return fetchOne(DefenseGroup.DEFENSE_GROUP.DEFENSE_GROUP_ID, value); }
/** * Fetch a unique record that has <code>defense_group_id = value</code> */
Fetch a unique record that has <code>defense_group_id = value</code>
fetchOneByDefenseGroupId
{ "repo_name": "zbeboy/ISY", "path": "src/main/java/top/zbeboy/isy/domain/tables/daos/DefenseGroupDao.java", "license": "mit", "size": 3962 }
[ "top.zbeboy.isy.domain.tables.DefenseGroup" ]
import top.zbeboy.isy.domain.tables.DefenseGroup;
import top.zbeboy.isy.domain.tables.*;
[ "top.zbeboy.isy" ]
top.zbeboy.isy;
1,071,970
public Assertion channelClosedAssertion(ParsedProperties testProps) { throw new RuntimeException("Not implemented."); }
Assertion function(ParsedProperties testProps) { throw new RuntimeException(STR); }
/** * Provides an assertion that the AMQP channel was forcibly closed by an error condition. * * @param testProps The test configuration properties. * @return An assertion that the AMQP channel was forcibly closed by an error condition. */
Provides an assertion that the AMQP channel was forcibly closed by an error condition
channelClosedAssertion
{ "repo_name": "madhawa-gunasekara/andes", "path": "modules/andes-core/systests/src/main/java/org/wso2/andes/test/framework/distributedcircuit/DistributedReceiverImpl.java", "license": "apache-2.0", "size": 3529 }
[ "org.wso2.andes.junit.extensions.util.ParsedProperties", "org.wso2.andes.test.framework.Assertion" ]
import org.wso2.andes.junit.extensions.util.ParsedProperties; import org.wso2.andes.test.framework.Assertion;
import org.wso2.andes.junit.extensions.util.*; import org.wso2.andes.test.framework.*;
[ "org.wso2.andes" ]
org.wso2.andes;
180,913
public String encryptToHexa(int keyLength, String text, char[] password, byte[] salt) throws Exception { Objects.requireNonNull(text, "text cannot be null!"); Objects.requireNonNull(password, "password cannot be null!"); ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes("UTF...
String function(int keyLength, String text, char[] password, byte[] salt) throws Exception { Objects.requireNonNull(text, STR); Objects.requireNonNull(password, STR); ByteArrayInputStream in = new ByteArrayInputStream(text.getBytes("UTF-8")); ByteArrayOutputStream out = new ByteArrayOutputStream(); AES.encrypt(keyLengt...
/** * * Encrypt a string into a an hexa format using the specified keyLength * value * * @param keyLength the keyLength must be 128, 192 or 256. * @param text the string to encrypt or Decrypt. if to decrypt: string must * be Hex encoded * @param password the password to use ...
Encrypt a string into a an hexa format using the specified keyLength value
encryptToHexa
{ "repo_name": "kawansoft/aceql-http-gui", "path": "src/main/java/com/kawansoft/app/util/crypto/PbeAes.java", "license": "apache-2.0", "size": 6734 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.util.Objects", "org.apache.commons.codec.binary.Hex" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.util.Objects; import org.apache.commons.codec.binary.Hex;
import java.io.*; import java.util.*; import org.apache.commons.codec.binary.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
1,137,369
private List<String> sanitizeSplitOrder(List<String> dimensionsSplitOrder, Set<String> skipMaterializationForDimensions) { List<String> validatedSplitOrder = new ArrayList<String>(); for (String dimension : dimensionsSplitOrder) { if (skipMaterializationForDimensions == null || !skipMaterializatio...
List<String> function(List<String> dimensionsSplitOrder, Set<String> skipMaterializationForDimensions) { List<String> validatedSplitOrder = new ArrayList<String>(); for (String dimension : dimensionsSplitOrder) { if (skipMaterializationForDimensions == null !skipMaterializationForDimensions.contains(dimension)) { LOG.i...
/** * Validate the split order by removing any dimensions that may be part of the skip materialization list. * @param dimensionsSplitOrder * @param skipMaterializationForDimensions * @return */
Validate the split order by removing any dimensions that may be part of the skip materialization list
sanitizeSplitOrder
{ "repo_name": "tkao1000/pinot", "path": "pinot-core/src/main/java/com/linkedin/pinot/core/startree/OffHeapStarTreeBuilder.java", "license": "apache-2.0", "size": 28902 }
[ "java.util.ArrayList", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,285,036
public static TagObject stringToTagObject( String jsonString ) throws JSONException { JSONObject jsonObject = new JSONObject(jsonString); String shortname = jsonObject.getString(TAG_SHORTNAME); String longname = jsonObject.getString(TAG_LONGNAME); TagObject tag = new TagObject(); ...
static TagObject function( String jsonString ) throws JSONException { JSONObject jsonObject = new JSONObject(jsonString); String shortname = jsonObject.getString(TAG_SHORTNAME); String longname = jsonObject.getString(TAG_LONGNAME); TagObject tag = new TagObject(); tag.shortName = shortname; tag.longName = longname; if ...
/** * Convert a string to a {@link TagObject}. * * @param jsonString the string. * @return the object. * @throws JSONException if something goes wrong. */
Convert a string to a <code>TagObject</code>
stringToTagObject
{ "repo_name": "gabrielmancilla/mtisig", "path": "geopaparazzilibrary/src/eu/geopaparazzi/library/forms/TagsManager.java", "license": "gpl-3.0", "size": 12572 }
[ "org.json.JSONException", "org.json.JSONObject" ]
import org.json.JSONException; import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,863,620
private static double findSumOfSimilarityScore(String targetUser, ArrayList<String> candidateUsers, HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimes) { double similarityScoreValue = 0d; Set<Integer> targetUserHashtag; Set<Integer> candidateUserHashtag; Set<...
static double function(String targetUser, ArrayList<String> candidateUsers, HashMap<String, HashMap<Integer, ArrayList<Long>>> userTagTimes) { double similarityScoreValue = 0d; Set<Integer> targetUserHashtag; Set<Integer> candidateUserHashtag; Set<Integer> intersection; for (String candidateUser : candidateUsers) { tar...
/** * Sum of similarity score in case of personalised recommendation. * * @param targetUser * @param candidateUsers * @return */
Sum of similarity score in case of personalised recommendation
findSumOfSimilarityScore
{ "repo_name": "learning-layers/TagRec", "path": "src/processing/hashtag/baseline/PersonalisedSimilarityCalculator.java", "license": "agpl-3.0", "size": 2973 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.Set" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,519,031
final String serviceUrl = "http://example/url"; final String holeIdentifier = "holeIdentifier"; final String responseString = ResourceUtil.loadResourceAsString("org/auscope/portal/nvcl/NVCL_GetDatasetCollectionResponse.xml"); final ByteArrayInputStream responseStream = new ByteArrayInputStrea...
final String serviceUrl = STRholeIdentifierSTRorg/auscope/portal/nvcl/NVCL_GetDatasetCollectionResponse.xmlSTR6dd70215-fe38-457c-be42-3b165fd98c7STRWTB5STRhttp: Assert.assertEquals(STR, response.get(1).getDatasetId()); Assert.assertEquals(STR, response.get(1).getDatasetName()); Assert.assertEquals("http: }
/** * Tests parsing of a getDatasetCollectionResponse * @throws Exception */
Tests parsing of a getDatasetCollectionResponse
testGetDatasetCollection
{ "repo_name": "AuScope/EOI-TCP", "path": "src/test/java/org/auscope/portal/server/web/service/TestNVCLDataService.java", "license": "gpl-3.0", "size": 23271 }
[ "org.auscope.portal.server.domain.nvcldataservice.GetDatasetCollectionResponse", "org.junit.Assert" ]
import org.auscope.portal.server.domain.nvcldataservice.GetDatasetCollectionResponse; import org.junit.Assert;
import org.auscope.portal.server.domain.nvcldataservice.*; import org.junit.*;
[ "org.auscope.portal", "org.junit" ]
org.auscope.portal; org.junit;
2,065,055
PathQuery getPathQuery();
PathQuery getPathQuery();
/** * Get the PathQuery associated with this WebTable * @return the PathQuery */
Get the PathQuery associated with this WebTable
getPathQuery
{ "repo_name": "drhee/toxoMine", "path": "intermine/api/main/src/org/intermine/api/results/WebTable.java", "license": "lgpl-2.1", "size": 2654 }
[ "org.intermine.pathquery.PathQuery" ]
import org.intermine.pathquery.PathQuery;
import org.intermine.pathquery.*;
[ "org.intermine.pathquery" ]
org.intermine.pathquery;
2,845,979
public GlyphSequence.CharAssociation getAssociation ( int offset ) throws IndexOutOfBoundsException { int i = index + offset; if ( ( i >= 0 ) && ( i < indexLast ) ) { return igs.getAssociation ( i ); } else { throw new IndexOutOfBoundsException ( "attempting index at ...
GlyphSequence.CharAssociation function ( int offset ) throws IndexOutOfBoundsException { int i = index + offset; if ( ( i >= 0 ) && ( i < indexLast ) ) { return igs.getAssociation ( i ); } else { throw new IndexOutOfBoundsException ( STR + i ); } }
/** * Obtain character association of glyph at specified offset from current position. * @param offset from current position * @return character association of glyph at current position * @throws IndexOutOfBoundsException if offset results in an invalid index into input glyph sequence */
Obtain character association of glyph at specified offset from current position
getAssociation
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/complexscripts/fonts/GlyphProcessingState.java", "license": "apache-2.0", "size": 45993 }
[ "org.apache.fop.complexscripts.util.GlyphSequence" ]
import org.apache.fop.complexscripts.util.GlyphSequence;
import org.apache.fop.complexscripts.util.*;
[ "org.apache.fop" ]
org.apache.fop;
2,479,168
public int doStartTag() throws JspException { return SKIP_BODY; }
int function() throws JspException { return SKIP_BODY; }
/** * Default processing of the start tag, returning SKIP_BODY. * * @return SKIP_BODY * @throws JspException if an error occurs while processing this tag * * @see Tag#doStartTag() */
Default processing of the start tag, returning SKIP_BODY
doStartTag
{ "repo_name": "napcs/qedserver", "path": "jetty/modules/jsp-api-2.0/src/main/java/javax/servlet/jsp/tagext/TagSupport.java", "license": "mit", "size": 7464 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
1,770,428
public boolean removeStatistics( ByteArrayId adapterId, ByteArrayId statisticsId, String... authorizations );
boolean function( ByteArrayId adapterId, ByteArrayId statisticsId, String... authorizations );
/** * Remove a statistic from the store * * @param adapterId * @param statisticsId * @return a flag indicating whether a statistic had existed with the given * IDs and was successfully deleted. */
Remove a statistic from the store
removeStatistics
{ "repo_name": "ruks/geowave", "path": "core/store/src/main/java/mil/nga/giat/geowave/core/store/adapter/statistics/DataStatisticsStore.java", "license": "apache-2.0", "size": 2402 }
[ "mil.nga.giat.geowave.core.index.ByteArrayId" ]
import mil.nga.giat.geowave.core.index.ByteArrayId;
import mil.nga.giat.geowave.core.index.*;
[ "mil.nga.giat" ]
mil.nga.giat;
2,672,152
public String uploadItem(JSONSyncItem item, String remoteUri, SyncListener listener, long fromByte) throws SapiException { //FIXME //attempt, what is its use? Does it really need? int attempt = 0; do { try { // Get ready to perform twice if we have...
String function(JSONSyncItem item, String remoteUri, SyncListener listener, long fromByte) throws SapiException { int attempt = 0; do { try { return uploadItemHelper(item, remoteUri, listener, fromByte); } catch (NotAuthorizedCallException nae) { if (attempt < 2) { if (Log.isLoggable(Log.INFO)) { Log.info(TAG_LOG, STR)...
/** * Upload the given item to the server (and possibly resume it) * @return the remote item key * @param item the item to be uploaded. It is mandatory that this item has * its guid filled with a valid token returned by the server. A valid token * can be obtained by invoking prepareItemUpload ...
Upload the given item to the server (and possibly resume it)
uploadItem
{ "repo_name": "zhangdakun/funasyn", "path": "externals/java-sdk/sapisync/src/main/java/com/funambol/sapisync/SapiSyncHandler.java", "license": "agpl-3.0", "size": 42409 }
[ "com.funambol.sapisync.source.JSONSyncItem", "com.funambol.sync.SyncListener", "com.funambol.util.Log" ]
import com.funambol.sapisync.source.JSONSyncItem; import com.funambol.sync.SyncListener; import com.funambol.util.Log;
import com.funambol.sapisync.source.*; import com.funambol.sync.*; import com.funambol.util.*;
[ "com.funambol.sapisync", "com.funambol.sync", "com.funambol.util" ]
com.funambol.sapisync; com.funambol.sync; com.funambol.util;
2,021,905
public Methods filter(Predicate<Method> predicate) { checkNotNull(predicate); return new Methods(this.storage.filter(candidate -> predicate.test(candidate))); } /** * {@inheritDoc}
Methods function(Predicate<Method> predicate) { checkNotNull(predicate); return new Methods(this.storage.filter(candidate -> predicate.test(candidate))); } /** * {@inheritDoc}
/** * Applies a filter {@link Predicate}. * * @param predicate is the {@link Predicate} to use as the filter. * @return a new {@link Methods} collection containing only the items matched in the * {@link Predicate}. */
Applies a filter <code>Predicate</code>
filter
{ "repo_name": "meerware/meerware-framework", "path": "meerware-reflect/src/main/java/com/meerware/reflect/Methods.java", "license": "mit", "size": 6076 }
[ "com.google.common.base.Preconditions", "java.lang.reflect.Method", "java.util.function.Predicate" ]
import com.google.common.base.Preconditions; import java.lang.reflect.Method; import java.util.function.Predicate;
import com.google.common.base.*; import java.lang.reflect.*; import java.util.function.*;
[ "com.google.common", "java.lang", "java.util" ]
com.google.common; java.lang; java.util;
1,850,655
public void addCaptureBuffer(ByteBuffer buffer) throws IOException;
void function(ByteBuffer buffer) throws IOException;
/** * Add a ByteBuffer that will receive a copy of all the data appended to * this ByteBuffer. */
Add a ByteBuffer that will receive a copy of all the data appended to this ByteBuffer
addCaptureBuffer
{ "repo_name": "teatrove/teatrove", "path": "trove/src/main/java/org/teatrove/trove/io/ByteBuffer.java", "license": "apache-2.0", "size": 2160 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,409,520
public void registerRepeatingJob(Class<? extends Job> jobClass, int intervalInSeconds) throws SchedulerException { JobDetail job = newJob(jobClass) .withIdentity(jobClass.getSimpleName(), DEFAULT_JOB_GROUP) .build(); Trigger trigger = newTrigger() ...
void function(Class<? extends Job> jobClass, int intervalInSeconds) throws SchedulerException { JobDetail job = newJob(jobClass) .withIdentity(jobClass.getSimpleName(), DEFAULT_JOB_GROUP) .build(); Trigger trigger = newTrigger() .withIdentity(jobClass.getSimpleName(), DEFAULT_JOB_GROUP) .withSchedule(simpleSchedule() ....
/** * Registers a repeating job with the specified repeat interval. * @param jobClass class of the job that needs to be repeated * @param intervalInSeconds repeat interval of the job * @throws SchedulerException if the Job or Trigger cannot be added to the Scheduler, * or there is an internal S...
Registers a repeating job with the specified repeat interval
registerRepeatingJob
{ "repo_name": "ria-ee/X-Road", "path": "src/common-util/src/main/java/ee/ria/xroad/common/util/JobManager.java", "license": "mit", "size": 5720 }
[ "org.quartz.Job", "org.quartz.JobBuilder", "org.quartz.JobDetail", "org.quartz.SchedulerException", "org.quartz.Trigger", "org.quartz.TriggerBuilder" ]
import org.quartz.Job; import org.quartz.JobBuilder; import org.quartz.JobDetail; import org.quartz.SchedulerException; import org.quartz.Trigger; import org.quartz.TriggerBuilder;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
1,113,988
if ( !(context instanceof WebSubjectContext) ) { return super.createSubject( context ); } WebSubjectContext wsc = (WebSubjectContext) context; SecurityManager securityManager = wsc.resolveSecurityManager(); Session session = wsc.resolveSession(); boolean sessionEnabled = wsc.isSessionCreationEnabled(); ...
if ( !(context instanceof WebSubjectContext) ) { return super.createSubject( context ); } WebSubjectContext wsc = (WebSubjectContext) context; SecurityManager securityManager = wsc.resolveSecurityManager(); Session session = wsc.resolveSession(); boolean sessionEnabled = wsc.isSessionCreationEnabled(); PrincipalCollect...
/** * {@inheritDoc} <br /> * Original code taken from {@link DefaultWebSubjectFactory} and modified * in order to return {@link SodaWebDelegatingSubject} instances. */
Original code taken from <code>DefaultWebSubjectFactory</code> and modified in order to return <code>SodaWebDelegatingSubject</code> instances
createSubject
{ "repo_name": "PE-INTERNATIONAL/soda4lca", "path": "Node/src/main/java/de/iai/ilcd/security/SodaSubjectFactory.java", "license": "gpl-3.0", "size": 1697 }
[ "javax.servlet.ServletRequest", "javax.servlet.ServletResponse", "org.apache.shiro.mgt.SecurityManager", "org.apache.shiro.session.Session", "org.apache.shiro.subject.PrincipalCollection", "org.apache.shiro.web.subject.WebSubjectContext" ]
import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.web.subject.WebSubjectContext;
import javax.servlet.*; import org.apache.shiro.mgt.*; import org.apache.shiro.session.*; import org.apache.shiro.subject.*; import org.apache.shiro.web.subject.*;
[ "javax.servlet", "org.apache.shiro" ]
javax.servlet; org.apache.shiro;
1,679,651
private void truncatePartitions(UpdatePeriod updatePeriod) { Iterator<Map.Entry<TimeRange, Set<FactPartition>>> rangeItr = rangeToPartitions.entrySet().iterator(); while (rangeItr.hasNext()) { Map.Entry<TimeRange, Set<FactPartition>> rangeEntry = rangeItr.next(); rangeEntry.getValue().removeIf(fac...
void function(UpdatePeriod updatePeriod) { Iterator<Map.Entry<TimeRange, Set<FactPartition>>> rangeItr = rangeToPartitions.entrySet().iterator(); while (rangeItr.hasNext()) { Map.Entry<TimeRange, Set<FactPartition>> rangeEntry = rangeItr.next(); rangeEntry.getValue().removeIf(factPartition -> !factPartition.getPeriod()...
/** * Truncates partitions in {@link #rangeToPartitions} such that only partitions belonging to * the passed undatePeriod are retained. * @param updatePeriod */
Truncates partitions in <code>#rangeToPartitions</code> such that only partitions belonging to the passed undatePeriod are retained
truncatePartitions
{ "repo_name": "sushrutikhar/grill", "path": "lens-cube/src/main/java/org/apache/lens/cube/parse/StorageCandidate.java", "license": "apache-2.0", "size": 41977 }
[ "java.util.Iterator", "java.util.Map", "java.util.Set", "org.apache.lens.cube.metadata.FactPartition", "org.apache.lens.cube.metadata.TimeRange", "org.apache.lens.cube.metadata.UpdatePeriod" ]
import java.util.Iterator; import java.util.Map; import java.util.Set; import org.apache.lens.cube.metadata.FactPartition; import org.apache.lens.cube.metadata.TimeRange; import org.apache.lens.cube.metadata.UpdatePeriod;
import java.util.*; import org.apache.lens.cube.metadata.*;
[ "java.util", "org.apache.lens" ]
java.util; org.apache.lens;
796,342
private void processSample(SampleResult s, Counter c) { saveSample(s, c.num++); SampleResult[] sampleResults = s.getSubResults(); for (SampleResult sampleResult : sampleResults) { processSample(sampleResult, c); } }
void function(SampleResult s, Counter c) { saveSample(s, c.num++); SampleResult[] sampleResults = s.getSubResults(); for (SampleResult sampleResult : sampleResults) { processSample(sampleResult, c); } }
/** * Recurse the whole (sub)result hierarchy. * * @param s Sample result * @param c sample counter */
Recurse the whole (sub)result hierarchy
processSample
{ "repo_name": "ra0077/jmeter", "path": "src/core/org/apache/jmeter/reporters/ResultSaver.java", "license": "apache-2.0", "size": 9772 }
[ "org.apache.jmeter.samplers.SampleResult" ]
import org.apache.jmeter.samplers.SampleResult;
import org.apache.jmeter.samplers.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
889,166
private void determineFootnoteHeading(TableCandidate tc) { int maxColumnNum = 0; for (int i = 0; i < tc.getFootnoteBeginRow(); i++) { TableRow row = tc.getRows().get(i); if (row.getCells().size() > maxColumnNum) { maxColumnNum = row.getCells().size(); } } tc.setMaxColumnNumber(maxColu...
void function(TableCandidate tc) { int maxColumnNum = 0; for (int i = 0; i < tc.getFootnoteBeginRow(); i++) { TableRow row = tc.getRows().get(i); if (row.getCells().size() > maxColumnNum) { maxColumnNum = row.getCells().size(); } } tc.setMaxColumnNumber(maxColumnNum); int headingLineNumber = 0; for (int i = 0; i < tc.g...
/** * Adjusts the table heading rows and footnote rows * * @param tc * the object of the table candidate */
Adjusts the table heading rows and footnote rows
determineFootnoteHeading
{ "repo_name": "BlueBrain/bluima", "path": "modules/bluima_pdf/src/main/java/edu/psu/seersuite/extractors/tableextractor/extraction/TableExtractor.java", "license": "apache-2.0", "size": 84991 }
[ "edu.psu.seersuite.extractors.tableextractor.model.TableCandidate", "edu.psu.seersuite.extractors.tableextractor.model.TableRow" ]
import edu.psu.seersuite.extractors.tableextractor.model.TableCandidate; import edu.psu.seersuite.extractors.tableextractor.model.TableRow;
import edu.psu.seersuite.extractors.tableextractor.model.*;
[ "edu.psu.seersuite" ]
edu.psu.seersuite;
951,371
public void setPrimaryAddr(IpAddress primaryAddr) { this.primaryAddr = primaryAddr; }
void function(IpAddress primaryAddr) { this.primaryAddr = primaryAddr; }
/** * Set the primary address of this neighbor. * * @param primaryAddr the address we'll use when sending hello messages */
Set the primary address of this neighbor
setPrimaryAddr
{ "repo_name": "kkkane/ONOS", "path": "apps/pim/src/main/java/org/onosproject/pim/impl/PIMNeighbor.java", "license": "apache-2.0", "size": 9820 }
[ "org.onlab.packet.IpAddress" ]
import org.onlab.packet.IpAddress;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
1,426,333
IncidentRepository incidentRepository = alertingPlugin.getIncidentRepository(); if (incidentRepository != null) { Map<String, Object> incidents = new HashMap<String, Object>(2, 1); Collection<Incident> allIncidents = incidentRepository.getAllIncidents(); incidents.put("incidents", allIncidents); inciden...
IncidentRepository incidentRepository = alertingPlugin.getIncidentRepository(); if (incidentRepository != null) { Map<String, Object> incidents = new HashMap<String, Object>(2, 1); Collection<Incident> allIncidents = incidentRepository.getAllIncidents(); incidents.put(STR, allIncidents); incidents.put(STR, Incident.get...
/** * GET /stagemonitor/incidents * * Returns all current incidents */
GET /stagemonitor/incidents Returns all current incidents
doGet
{ "repo_name": "trampi/stagemonitor", "path": "stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/IncidentServlet.java", "license": "apache-2.0", "size": 1653 }
[ "java.util.Collection", "java.util.Collections", "java.util.HashMap", "java.util.Map", "org.stagemonitor.alerting.incident.Incident", "org.stagemonitor.alerting.incident.IncidentRepository", "org.stagemonitor.core.util.JsonUtils" ]
import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.stagemonitor.alerting.incident.Incident; import org.stagemonitor.alerting.incident.IncidentRepository; import org.stagemonitor.core.util.JsonUtils;
import java.util.*; import org.stagemonitor.alerting.incident.*; import org.stagemonitor.core.util.*;
[ "java.util", "org.stagemonitor.alerting", "org.stagemonitor.core" ]
java.util; org.stagemonitor.alerting; org.stagemonitor.core;
1,199,445
private void initIcon() { if (download.getFileToSaveTo() == null) { return; } String extensionOfDownload = download.getFileToSaveTo().getName().trim(); final String extensionOfIcon = small ? "_16.png" : "_32.png"; if ((extensionOfDownload == null) || (extensionO...
void function() { if (download.getFileToSaveTo() == null) { return; } String extensionOfDownload = download.getFileToSaveTo().getName().trim(); final String extensionOfIcon = small ? STR : STR; if ((extensionOfDownload == null) (extensionOfDownload.lastIndexOf('.') < 0)) { return; } extensionOfDownload = extensionOfDow...
/** * Initiates the icon. According to the file extension of the download, an appropriate icon will be shown. */
Initiates the icon. According to the file extension of the download, an appropriate icon will be shown
initIcon
{ "repo_name": "cismet/cismet-gui-commons", "path": "src/main/java/de/cismet/tools/gui/downloadmanager/DownloadPanel.java", "license": "lgpl-3.0", "size": 23455 }
[ "javax.swing.ImageIcon" ]
import javax.swing.ImageIcon;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,507,302
public com.mozu.api.contracts.productadmin.LocationInventory getLocationInventory(String productCode, String locationCode, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.LocationInventory> client = com.mozu.api.clients.commerce.catalog.admin.products.LocationInventoryClie...
com.mozu.api.contracts.productadmin.LocationInventory function(String productCode, String locationCode, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.LocationInventory> client = com.mozu.api.clients.commerce.catalog.admin.products.LocationInventoryClient.getLocationInventoryCl...
/** * Retrieves the details of the inventory of the product in the location specified in the request. * <p><pre><code> * LocationInventory locationinventory = new LocationInventory(); * LocationInventory locationInventory = locationinventory.getLocationInventory( productCode, locationCode, responseFields); ...
Retrieves the details of the inventory of the product in the location specified in the request. <code><code> LocationInventory locationinventory = new LocationInventory(); LocationInventory locationInventory = locationinventory.getLocationInventory( productCode, locationCode, responseFields); </code></code>
getLocationInventory
{ "repo_name": "eileenzhuang1/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/products/LocationInventoryResource.java", "license": "mit", "size": 12213 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,385,517
protected T getUniqueRow(String query, String[] params) throws UtilException { ResultSet rs = null; PreparedStatement select = null; try { select = schema.getStatement(query); synchronized (select) { for (int i = 0; i < params.length; i++) { select.setString(i + 1, par...
T function(String query, String[] params) throws UtilException { ResultSet rs = null; PreparedStatement select = null; try { select = schema.getStatement(query); synchronized (select) { for (int i = 0; i < params.length; i++) { select.setString(i + 1, params[i]); } rs = select.executeQuery(); return getUniqueRow(rs); }...
/** * Returns the unique row referenced by the given query and String[] params. Returns null if no * rows match the id. Throws a UtilException if more then one row match the id. * @return the requiered row or null. * @param query the sql query string must be like "select * from ... where ... col1=? ... coln...
Returns the unique row referenced by the given query and String[] params. Returns null if no rows match the id. Throws a UtilException if more then one row match the id
getUniqueRow
{ "repo_name": "ebonnet/Silverpeas-Core", "path": "core-api/src/main/java/org/silverpeas/core/persistence/jdbc/AbstractTable.java", "license": "agpl-3.0", "size": 18601 }
[ "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "org.silverpeas.core.exception.UtilException" ]
import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.silverpeas.core.exception.UtilException;
import java.sql.*; import org.silverpeas.core.exception.*;
[ "java.sql", "org.silverpeas.core" ]
java.sql; org.silverpeas.core;
2,470,848
WorkspaceImpl get(String name, String namespace) throws NotFoundException, ServerException;
WorkspaceImpl get(String name, String namespace) throws NotFoundException, ServerException;
/** * Gets workspace by name in namespace. * * @param namespace namespace of workspace * @param name workspace identifier * @return workspace instance, never null * @throws NullPointerException when {@code name} or {@code owner} is null * @throws NotFoundException when workspace with given name & o...
Gets workspace by name in namespace
get
{ "repo_name": "codenvy/che", "path": "wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/workspace/server/spi/WorkspaceDao.java", "license": "epl-1.0", "size": 5630 }
[ "org.eclipse.che.api.core.NotFoundException", "org.eclipse.che.api.core.ServerException", "org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl" ]
import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; import org.eclipse.che.api.workspace.server.model.impl.WorkspaceImpl;
import org.eclipse.che.api.core.*; import org.eclipse.che.api.workspace.server.model.impl.*;
[ "org.eclipse.che" ]
org.eclipse.che;
825,980
public Optional<Path> getCoreFolderPath() { return coreFolderPath; }
Optional<Path> function() { return coreFolderPath; }
/** * <p> * Getter for the field <code>coreFolderPath</code>. * </p> * * @return the coreFolderPath */
Getter for the field <code>coreFolderPath</code>.
getCoreFolderPath
{ "repo_name": "intranda/goobi-viewer-core", "path": "goobi-viewer-core/src/main/java/io/goobi/viewer/model/cms/CMSTemplateManager.java", "license": "gpl-2.0", "size": 20759 }
[ "java.nio.file.Path", "java.util.Optional" ]
import java.nio.file.Path; import java.util.Optional;
import java.nio.file.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
1,975,837
private DeploymentManager getDeploymentManager() { if(deploymentManager == null) { deploymentManager = new DeploymentManager(); } return deploymentManager; }
DeploymentManager function() { if(deploymentManager == null) { deploymentManager = new DeploymentManager(); } return deploymentManager; }
/** * Return the deployment manager. * @return The deployment manager. */
Return the deployment manager
getDeploymentManager
{ "repo_name": "OpenWIS/openwis", "path": "openwis-metadataportal/openwis-portal/src/main/java/org/openwis/metadataportal/kernel/group/GroupManager.java", "license": "gpl-3.0", "size": 16630 }
[ "org.openwis.metadataportal.kernel.deployment.DeploymentManager" ]
import org.openwis.metadataportal.kernel.deployment.DeploymentManager;
import org.openwis.metadataportal.kernel.deployment.*;
[ "org.openwis.metadataportal" ]
org.openwis.metadataportal;
1,205,627
public boolean isCheckAndShowAssessmentStatusInformation() throws RemoteException;
boolean function() throws RemoteException;
/** * Get attribute checkAndShowAssessmentStatusInformation. If this is set to true, an overview * table is added to the report, showing all assessments with their status (e.g. stable, in * progress, new, ...) * * @return get attribute checkAndShowAssessmentStatusInformation * * @throws Re...
Get attribute checkAndShowAssessmentStatusInformation. If this is set to true, an overview table is added to the report, showing all assessments with their status (e.g. stable, in progress, new, ...)
isCheckAndShowAssessmentStatusInformation
{ "repo_name": "jenkinsci/piketec-tpt-plugin", "path": "src/main/java/com/piketec/tpt/api/AdvancedReportSettings.java", "license": "mit", "size": 27649 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
427,819
private static VertexParallelismStore computeVertexParallelismStore( JobGraph jobGraph, SchedulerExecutionMode executionMode) { if (executionMode == SchedulerExecutionMode.REACTIVE) { return computeReactiveModeVertexParallelismStore( jobGraph.getVertices(), Schedu...
static VertexParallelismStore function( JobGraph jobGraph, SchedulerExecutionMode executionMode) { if (executionMode == SchedulerExecutionMode.REACTIVE) { return computeReactiveModeVertexParallelismStore( jobGraph.getVertices(), SchedulerBase::getDefaultMaxParallelism, true); } return SchedulerBase.computeVertexParalle...
/** * Creates the parallelism store that should be used for determining scheduling requirements, * which may choose different parallelisms than set in the {@link JobGraph} depending on the * execution mode. * * @param jobGraph The job graph for execution. * @param executionMode The mode of...
Creates the parallelism store that should be used for determining scheduling requirements, which may choose different parallelisms than set in the <code>JobGraph</code> depending on the execution mode
computeVertexParallelismStore
{ "repo_name": "StephanEwen/incubator-flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveScheduler.java", "license": "apache-2.0", "size": 50713 }
[ "org.apache.flink.configuration.SchedulerExecutionMode", "org.apache.flink.runtime.jobgraph.JobGraph", "org.apache.flink.runtime.scheduler.SchedulerBase", "org.apache.flink.runtime.scheduler.VertexParallelismStore" ]
import org.apache.flink.configuration.SchedulerExecutionMode; import org.apache.flink.runtime.jobgraph.JobGraph; import org.apache.flink.runtime.scheduler.SchedulerBase; import org.apache.flink.runtime.scheduler.VertexParallelismStore;
import org.apache.flink.configuration.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.scheduler.*;
[ "org.apache.flink" ]
org.apache.flink;
1,174,649
@Override public boolean process(Packet p, S2SIOService serv, Queue<Packet> results) { return false; } @Override public void serviceStarted(S2SIOService serv) {}
boolean function(Packet p, S2SIOService serv, Queue<Packet> results) { return false; } public void serviceStarted(S2SIOService serv) {}
/** * Method description * * * @param p * @param serv * @param results * * */
Method description
process
{ "repo_name": "DanielYao/tigase-server", "path": "src/main/java/tigase/server/xmppserver/proc/S2SAbstractProcessor.java", "license": "agpl-3.0", "size": 7323 }
[ "java.util.Queue" ]
import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
2,132,080
public void startGroup(Augmentations augmentations) throws XNIException { }
void function(Augmentations augmentations) throws XNIException { }
/** * A start of either a mixed or children content model. A mixed * content model will immediately be followed by a call to the * <code>pcdata()</code> method. A children content model will * contain additional groups and/or elements. * * @param augmentations Additional information that m...
A start of either a mixed or children content model. A mixed content model will immediately be followed by a call to the <code>pcdata()</code> method. A children content model will contain additional groups and/or elements
startGroup
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xerces/internal/impl/xs/opti/DefaultXMLDocumentHandler.java", "license": "apache-2.0", "size": 32090 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
1,806,746
public List<Object[]> getOperationInputPermutations(Object[] selection) { List<Object[]> result = new ArrayList<Object[]>(); result.add(selection); return result; }
List<Object[]> function(Object[] selection) { List<Object[]> result = new ArrayList<Object[]>(); result.add(selection); return result; }
/** * Returns the input selection as is */
Returns the input selection as is
getOperationInputPermutations
{ "repo_name": "debrief/limpet_ops", "path": "sampleModel/src/samplemodel/NoInputPermutations.java", "license": "epl-1.0", "size": 502 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
689,071
private void readInputFromFile(File f) { try { Scanner scan = new Scanner(f); int numberOfPeriodicTasks = Integer.parseInt(scan.nextLine()); for (int i = 0; i < numberOfPeriodicTasks; i++) { input.add(parsePeriodicTask(scan.nextLine())); } ...
void function(File f) { try { Scanner scan = new Scanner(f); int numberOfPeriodicTasks = Integer.parseInt(scan.nextLine()); for (int i = 0; i < numberOfPeriodicTasks; i++) { input.add(parsePeriodicTask(scan.nextLine())); } endOfTimePeriod = scan.nextInt(); } catch (FileNotFoundException ex) { Logger.getLogger(Main.clas...
/** * Reads a file and populates input and activationTime * * @param f file which is parsed */
Reads a file and populates input and activationTime
readInputFromFile
{ "repo_name": "nikolaradovic85/rateMonotonicSimulator", "path": "src/TaskSchedulingSimulator/Simulation.java", "license": "mit", "size": 14112 }
[ "java.io.File", "java.io.FileNotFoundException", "java.util.InputMismatchException", "java.util.Scanner", "java.util.logging.Level", "java.util.logging.Logger" ]
import java.io.File; import java.io.FileNotFoundException; import java.util.InputMismatchException; import java.util.Scanner; import java.util.logging.Level; import java.util.logging.Logger;
import java.io.*; import java.util.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
529,733
public ActionForward notify(ActionMapping mapping, ActionForm formIn, HttpServletRequest request, HttpServletResponse response) { //forward to notify page with eid return getStrutsDelegate().forwardParam(...
ActionForward function(ActionMapping mapping, ActionForm formIn, HttpServletRequest request, HttpServletResponse response) { return getStrutsDelegate().forwardParam(mapping.findForward(STR), "eid", request.getParameter("eid")); }
/** * Sends a notification * @param mapping Action mapping * @param formIn Form * @param request The request * @param response The response * @return Returns an ActionForward for either notified or failure */
Sends a notification
notify
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/action/errata/EditAction.java", "license": "gpl-2.0", "size": 17592 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping;
import javax.servlet.http.*; import org.apache.struts.action.*;
[ "javax.servlet", "org.apache.struts" ]
javax.servlet; org.apache.struts;
1,959,223
SVGDocument getBrokenLinkDocument(Element e, String url, String message);
SVGDocument getBrokenLinkDocument(Element e, String url, String message);
/** * This method should return an image to be displayed when an image * can't be loaded. If it returns 'null' then a BridgeException will * be thrown. * * @param e The &lt;image&gt; element that can't be loaded. * @param url The resolved url that can't be loaded. * @param message ...
This method should return an image to be displayed when an image can't be loaded. If it returns 'null' then a BridgeException will be thrown
getBrokenLinkDocument
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/UserAgent.java", "license": "apache-2.0", "size": 9206 }
[ "org.w3c.dom.Element", "org.w3c.dom.svg.SVGDocument" ]
import org.w3c.dom.Element; import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.*; import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,610,042
public static void validateConvolutionModePadding(ConvolutionMode mode, int padding) { if (mode == ConvolutionMode.Same) { boolean nullPadding = true; if (padding != 0) nullPadding = false; if (!nullPadding) throw new IllegalArgumentException("Padding cann...
static void function(ConvolutionMode mode, int padding) { if (mode == ConvolutionMode.Same) { boolean nullPadding = true; if (padding != 0) nullPadding = false; if (!nullPadding) throw new IllegalArgumentException(STR); } }
/** * Check that the convolution mode is consistent with the padding specification */
Check that the convolution mode is consistent with the padding specification
validateConvolutionModePadding
{ "repo_name": "RobAltena/deeplearning4j", "path": "deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/Convolution1DUtils.java", "license": "apache-2.0", "size": 11507 }
[ "org.deeplearning4j.nn.conf.ConvolutionMode" ]
import org.deeplearning4j.nn.conf.ConvolutionMode;
import org.deeplearning4j.nn.conf.*;
[ "org.deeplearning4j.nn" ]
org.deeplearning4j.nn;
2,024,397
public void onInterest (Name prefix, Interest interest, Face face, long interestFilterId, InterestFilter filter) { long maxSegment = 2; if (segment_ >= maxSegment) // We have already called onFinished_.exec(). return; System.out.println("Got interest " + interest....
void function (Name prefix, Interest interest, Face face, long interestFilterId, InterestFilter filter) { long maxSegment = 2; if (segment_ >= maxSegment) return; System.out.println(STR + interest.toUri()); segment_ += 1; Data data = new Data(new Name(prefix).appendSegment(segment_)); String content = STR + segment_; d...
/** * This is the onInterest callback to append the next segment number to the * prefix and send a new data packet. If the last packet is sent, then call * onFinished_.exec(). */
This is the onInterest callback to append the next segment number to the prefix and send a new data packet. If the last packet is sent, then call onFinished_.exec()
onInterest
{ "repo_name": "zhehaowang/ndnfit", "path": "app/src/main/java/ucla/remap/ndnfit/network/WatchedInsertion.java", "license": "lgpl-3.0", "size": 25024 }
[ "java.io.IOException", "net.named_data.jndn.Data", "net.named_data.jndn.Face", "net.named_data.jndn.Interest", "net.named_data.jndn.InterestFilter", "net.named_data.jndn.Name", "net.named_data.jndn.security.KeyChain", "net.named_data.jndn.security.SecurityException", "net.named_data.jndn.util.Blob" ...
import java.io.IOException; import net.named_data.jndn.Data; import net.named_data.jndn.Face; import net.named_data.jndn.Interest; import net.named_data.jndn.InterestFilter; import net.named_data.jndn.Name; import net.named_data.jndn.security.KeyChain; import net.named_data.jndn.security.SecurityException; import net.n...
import java.io.*; import net.named_data.jndn.*; import net.named_data.jndn.security.*; import net.named_data.jndn.util.*;
[ "java.io", "net.named_data.jndn" ]
java.io; net.named_data.jndn;
2,366,896
private interface IntBiPredicate { boolean apply(int targetVal, int nextVal); } public static class GroupAllocationTracker implements AllocatedPageTracker { private final LongAdder totalAllocatedPages = new LongAdder(); private final AllocatedPageTra...
interface IntBiPredicate { boolean function(int targetVal, int nextVal); } public static class GroupAllocationTracker implements AllocatedPageTracker { private final LongAdder totalAllocatedPages = new LongAdder(); private final AllocatedPageTracker delegate; public GroupAllocationTracker(AllocatedPageTracker delegate)...
/** * Predicate body. * * @param targetVal Target value. * @param nextVal Next comparable value. */
Predicate body
apply
{ "repo_name": "amirakhmedov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupMetricsMXBeanImpl.java", "license": "apache-2.0", "size": 11488 }
[ "java.util.concurrent.atomic.LongAdder", "org.apache.ignite.internal.processors.cache.persistence.AllocatedPageTracker" ]
import java.util.concurrent.atomic.LongAdder; import org.apache.ignite.internal.processors.cache.persistence.AllocatedPageTracker;
import java.util.concurrent.atomic.*; import org.apache.ignite.internal.processors.cache.persistence.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,233,969
private void setMinMax(T value) { if (canValue instanceof DoubleValue) { DoubleValue dv = (DoubleValue) canValue; if (dv.getMax() != null) getMax().setValue((T) dv.getMax()); if (dv.getAvg() != null) getAvg().setValue((T) dv.getAvg()); } if (canValue instanceof IntegerVal...
void function(T value) { if (canValue instanceof DoubleValue) { DoubleValue dv = (DoubleValue) canValue; if (dv.getMax() != null) getMax().setValue((T) dv.getMax()); if (dv.getAvg() != null) getAvg().setValue((T) dv.getAvg()); } if (canValue instanceof IntegerValue) { IntegerValue iv = (IntegerValue) canValue; if (iv.g...
/** * sets the minimum and maximum Value as well as the update count * * @param value */
sets the minimum and maximum Value as well as the update count
setMinMax
{ "repo_name": "BITPlan/can4eve", "path": "can4eve/src/main/java/com/bitplan/can4eve/gui/javafx/CANProperty.java", "license": "apache-2.0", "size": 7978 }
[ "com.bitplan.can4eve.CANValue" ]
import com.bitplan.can4eve.CANValue;
import com.bitplan.can4eve.*;
[ "com.bitplan.can4eve" ]
com.bitplan.can4eve;
1,767,585
@Incubating public interface JvmBinaryTasks extends DomainObjectSet<Task> { Task getBuild();
interface JvmBinaryTasks extends DomainObjectSet<Task> { Task function();
/** * The 'lifecycle' task, that can be used to construct this binary. */
The 'lifecycle' task, that can be used to construct this binary
getBuild
{ "repo_name": "tkmnet/RCRS-ADF", "path": "gradle/gradle-2.1/src/language-jvm/org/gradle/runtime/jvm/JvmBinaryTasks.java", "license": "bsd-2-clause", "size": 1149 }
[ "org.gradle.api.DomainObjectSet", "org.gradle.api.Task" ]
import org.gradle.api.DomainObjectSet; import org.gradle.api.Task;
import org.gradle.api.*;
[ "org.gradle.api" ]
org.gradle.api;
1,865,265
private void updateDiscipline() { if(currentDisc == null) { ActionHandler.get().showErrorDialog("No discipline selected", "You have not chosen a discipline."); return; } PacketDiscipline pd = new PacketDiscipline(); pd.name = name.getText(); if(pd.name == null || pd.name.equals("")) { ActionHandle...
void function() { if(currentDisc == null) { ActionHandler.get().showErrorDialog(STR, STR); return; } PacketDiscipline pd = new PacketDiscipline(); pd.name = name.getText(); if(pd.name == null pd.name.equals(STRField errorSTRAn invalid discipline name selected. Please enter a name for the discipline.STRDiscipline update...
/** * Handler called by the update button. * Provides basic checks and if successful, starts an update task. */
Handler called by the update button. Provides basic checks and if successful, starts an update task
updateDiscipline
{ "repo_name": "Salmelu/Contests", "path": "src/cz/salmelu/contests/client/EditDiscipline.java", "license": "mit", "size": 6391 }
[ "cz.salmelu.contests.net.PacketDiscipline" ]
import cz.salmelu.contests.net.PacketDiscipline;
import cz.salmelu.contests.net.*;
[ "cz.salmelu.contests" ]
cz.salmelu.contests;
2,858,286
private Object handleGetGroupInfo(Object info) throws OperationFailedException, CacheException, LockingException, GeneralFailureException, StateTransferException { Object result; OperationContext operationContext = null; Object[] args = (Object[]) info; if (args.length > 1) { ...
Object function(Object info) throws OperationFailedException, CacheException, LockingException, GeneralFailureException, StateTransferException { Object result; OperationContext operationContext = null; Object[] args = (Object[]) info; if (args.length > 1) { operationContext = (OperationContext) ((args[1] instanceof Op...
/** * Handles the request for data group of the item * * @param info Key(s) of the item(s) * @return Data group info of the item(s) */
Handles the request for data group of the item
handleGetGroupInfo
{ "repo_name": "Alachisoft/TayzGrid", "path": "src/tgcache/src/com/alachisoft/tayzgrid/caching/topologies/clustered/PartitionedServerCache.java", "license": "apache-2.0", "size": 225795 }
[ "com.alachisoft.tayzgrid.caching.OperationContext", "com.alachisoft.tayzgrid.caching.exceptions.StateTransferException", "com.alachisoft.tayzgrid.runtime.exceptions.CacheException", "com.alachisoft.tayzgrid.runtime.exceptions.GeneralFailureException", "com.alachisoft.tayzgrid.runtime.exceptions.LockingExcep...
import com.alachisoft.tayzgrid.caching.OperationContext; import com.alachisoft.tayzgrid.caching.exceptions.StateTransferException; import com.alachisoft.tayzgrid.runtime.exceptions.CacheException; import com.alachisoft.tayzgrid.runtime.exceptions.GeneralFailureException; import com.alachisoft.tayzgrid.runtime.exception...
import com.alachisoft.tayzgrid.caching.*; import com.alachisoft.tayzgrid.caching.exceptions.*; import com.alachisoft.tayzgrid.runtime.exceptions.*;
[ "com.alachisoft.tayzgrid" ]
com.alachisoft.tayzgrid;
1,650,975
private static byte[] generateSeed() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBuf...
static byte[] function() { try { ByteArrayOutputStream seedBuffer = new ByteArrayOutputStream(); DataOutputStream seedBufferOut = new DataOutputStream(seedBuffer); seedBufferOut.writeLong(System.currentTimeMillis()); seedBufferOut.writeLong(System.nanoTime()); seedBufferOut.writeInt(Process.myPid()); seedBufferOut.writ...
/** * Generates a device- and invocation-specific seed to be mixed into the * Linux PRNG. */
Generates a device- and invocation-specific seed to be mixed into the Linux PRNG
generateSeed
{ "repo_name": "pablo-co/insight-android-base-library", "path": "app/src/main/java/edu/mit/lastmite/insight_library/security/AesCbcWithIntegrity.java", "license": "mit", "size": 36792 }
[ "android.os.Process", "java.io.ByteArrayOutputStream", "java.io.DataOutputStream", "java.io.IOException" ]
import android.os.Process; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException;
import android.os.*; import java.io.*;
[ "android.os", "java.io" ]
android.os; java.io;
991,469
@Override public String getDataSetName(MapWritable mw) { return "numbersDS"; }
String function(MapWritable mw) { return STR; }
/** * Get the name of the data set based on the contents of the MapWritable (you could have more than one type of * dataset in the datasource) * * @return the name of the data set, typically just an explicit string, but if there is more than one dataset in the * datasource, you may want...
Get the name of the data set based on the contents of the MapWritable (you could have more than one type of dataset in the datasource)
getDataSetName
{ "repo_name": "ezbake/ezbake-old-batch", "path": "amino-impl/dataloader/number/src/main/java/ezbake/amino/impl/dataloader/WarehausNumberLoader.java", "license": "apache-2.0", "size": 3861 }
[ "org.apache.hadoop.io.MapWritable" ]
import org.apache.hadoop.io.MapWritable;
import org.apache.hadoop.io.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,508,864
private void redistributeRouteToBgpRib( RouteAdvertisement<? extends AnnotatedRoute<AbstractRoute>> routeAdv, RoutingPolicy policy, OriginMechanism originMechanism) { AbstractRouteDecorator route = routeAdv.getRoute(); if (route.getAbstractRoute() instanceof BgpRoute<?, ?>) { // Do not...
void function( RouteAdvertisement<? extends AnnotatedRoute<AbstractRoute>> routeAdv, RoutingPolicy policy, OriginMechanism originMechanism) { AbstractRouteDecorator route = routeAdv.getRoute(); if (route.getAbstractRoute() instanceof BgpRoute<?, ?>) { return; } Bgpv4Route.Builder bgpBuilder = BgpProtocolHelper.convertN...
/** * Convert the advertised main RIB route to a BGP route and run it through the provided policy. If * it passes, apply the advertisement to the BGP RIB (i.e. merge or withdraw the route) and update * BGP delta builders. */
Convert the advertised main RIB route to a BGP route and run it through the provided policy. If it passes, apply the advertisement to the BGP RIB (i.e. merge or withdraw the route) and update BGP delta builders
redistributeRouteToBgpRib
{ "repo_name": "batfish/batfish", "path": "projects/batfish/src/main/java/org/batfish/dataplane/ibdp/BgpRoutingProcess.java", "license": "apache-2.0", "size": 110274 }
[ "org.batfish.datamodel.AbstractRoute", "org.batfish.datamodel.AbstractRouteDecorator", "org.batfish.datamodel.AnnotatedRoute", "org.batfish.datamodel.BgpRoute", "org.batfish.datamodel.Bgpv4Route", "org.batfish.datamodel.OriginMechanism", "org.batfish.datamodel.RoutingProtocol", "org.batfish.datamodel....
import org.batfish.datamodel.AbstractRoute; import org.batfish.datamodel.AbstractRouteDecorator; import org.batfish.datamodel.AnnotatedRoute; import org.batfish.datamodel.BgpRoute; import org.batfish.datamodel.Bgpv4Route; import org.batfish.datamodel.OriginMechanism; import org.batfish.datamodel.RoutingProtocol; import...
import org.batfish.datamodel.*; import org.batfish.datamodel.routing_policy.*; import org.batfish.dataplane.protocols.*; import org.batfish.dataplane.rib.*;
[ "org.batfish.datamodel", "org.batfish.dataplane" ]
org.batfish.datamodel; org.batfish.dataplane;
1,423,722
private static void assertCreateTable(Element changeSet) { final Element createTable = getFirstElement(changeSet, "createTable"); assertThat(createTable.getAttribute("catalogName")).isEqualTo("TEST-DB"); assertThat(createTable.getAttribute("schemaName")).isEqualTo("PUBLIC"); assertT...
static void function(Element changeSet) { final Element createTable = getFirstElement(changeSet, STR); assertThat(createTable.getAttribute(STR)).isEqualTo(STR); assertThat(createTable.getAttribute(STR)).isEqualTo(STR); assertThat(createTable.getAttribute(STR)).isEqualTo(STR); final NodeList columns = createTable.getEle...
/** * Assert correctness of a change set with creation of a table * * @param changeSet actual XML element */
Assert correctness of a change set with creation of a table
assertCreateTable
{ "repo_name": "patrox/dropwizard", "path": "dropwizard-migrations/src/test/java/io/dropwizard/migrations/DbDumpCommandTest.java", "license": "apache-2.0", "size": 11979 }
[ "org.assertj.core.api.Assertions", "org.w3c.dom.Element", "org.w3c.dom.NodeList" ]
import org.assertj.core.api.Assertions; import org.w3c.dom.Element; import org.w3c.dom.NodeList;
import org.assertj.core.api.*; import org.w3c.dom.*;
[ "org.assertj.core", "org.w3c.dom" ]
org.assertj.core; org.w3c.dom;
2,770,553
Map<String, Object> mergeFeedProperties(Feed.ID feedId, Map<String, Object> properties);
Map<String, Object> mergeFeedProperties(Feed.ID feedId, Map<String, Object> properties);
/** * Merge properties and return the newly merged properties */
Merge properties and return the newly merged properties
mergeFeedProperties
{ "repo_name": "rashidaligee/kylo", "path": "metadata/metadata-api/src/main/java/com/thinkbiganalytics/metadata/api/feed/FeedProvider.java", "license": "apache-2.0", "size": 4391 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
954,824
List<MessageToUserAndBody> createStateChangeNotification(long verificationSubmissionId, VerificationState newState, String notificationUnsubscribeEndpoint);
List<MessageToUserAndBody> createStateChangeNotification(long verificationSubmissionId, VerificationState newState, String notificationUnsubscribeEndpoint);
/** * Create a message to the user requesting verification that the ACT has acted, accepting, rejecting, or * suspending the verification. * * @param verificationSubmissionId * @param newState * @param notificationUnsubscribeEndpoint * @return */
Create a message to the user requesting verification that the ACT has acted, accepting, rejecting, or suspending the verification
createStateChangeNotification
{ "repo_name": "hhu94/Synapse-Repository-Services", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/VerificationManager.java", "license": "apache-2.0", "size": 2366 }
[ "java.util.List", "org.sagebionetworks.repo.model.verification.VerificationState" ]
import java.util.List; import org.sagebionetworks.repo.model.verification.VerificationState;
import java.util.*; import org.sagebionetworks.repo.model.verification.*;
[ "java.util", "org.sagebionetworks.repo" ]
java.util; org.sagebionetworks.repo;
903,555
Name makeUnquotedName(String ident) { return names().fromString(ident); }
Name makeUnquotedName(String ident) { return names().fromString(ident); }
/** * Makes an <strong>unquoted</strong> simple name * @param ident The identifier * @return The name */
Makes an unquoted simple name
makeUnquotedName
{ "repo_name": "lucaswerkmeister/ceylon-compiler", "path": "src/com/redhat/ceylon/compiler/java/codegen/Naming.java", "license": "gpl-2.0", "size": 76714 }
[ "com.sun.tools.javac.util.Name" ]
import com.sun.tools.javac.util.Name;
import com.sun.tools.javac.util.*;
[ "com.sun.tools" ]
com.sun.tools;
2,628,999
public void plotTrainingData() { Graphics2D osg = (Graphics2D) m_osi.getGraphics(); Graphics g = m_plotPanel.getGraphics(); osg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); double xval = 0; double yval = 0; for (int i = 0; i < m_trainingData.num...
void function() { Graphics2D osg = (Graphics2D) m_osi.getGraphics(); Graphics g = m_plotPanel.getGraphics(); osg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); double xval = 0; double yval = 0; for (int i = 0; i < m_trainingData.numInstances(); i++) { if (!m_trainingData.instance(...
/** * Render the training points on-screen. */
Render the training points on-screen
plotTrainingData
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/gui/boundaryvisualizer/BoundaryPanel.java", "license": "epl-1.0", "size": 38996 }
[ "java.awt.Color", "java.awt.Graphics", "java.awt.Graphics2D", "java.awt.RenderingHints" ]
import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints;
import java.awt.*;
[ "java.awt" ]
java.awt;
268,067
public void close() throws NamingException { // do nothing right now }
void function() throws NamingException { }
/** * Frees all resources obtained by the current context. * * @see Context#close() */
Frees all resources obtained by the current context
close
{ "repo_name": "nextopio/nextop-client", "path": "org.apache-jarjar/src/main/java/org/apache/harmony/jndi/provider/dns/DNSContext.java", "license": "apache-2.0", "size": 80073 }
[ "javax.naming.NamingException" ]
import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
1,986,116
@NotNull Project getProject();
Project getProject();
/** * Returns the project to which this module belongs. * * @return the project instance. */
Returns the project to which this module belongs
getProject
{ "repo_name": "ernestp/consulo", "path": "platform/core-api/src/com/intellij/openapi/module/Module.java", "license": "apache-2.0", "size": 4196 }
[ "com.intellij.openapi.project.Project" ]
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.*;
[ "com.intellij.openapi" ]
com.intellij.openapi;
1,447,464
@Override public String getName() { return CharacterMarkerSymbolKeys.CHARACTER_MARKER_SYMBOL; }
String function() { return CharacterMarkerSymbolKeys.CHARACTER_MARKER_SYMBOL; }
/** * Gets the name. * * @return the name */
Gets the name
getName
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/import/export-sld/src/main/java/com/sldeditor/exportdata/esri/symbols/CharacterMarkerSymbol.java", "license": "gpl-3.0", "size": 4561 }
[ "com.sldeditor.exportdata.esri.keys.symbols.CharacterMarkerSymbolKeys" ]
import com.sldeditor.exportdata.esri.keys.symbols.CharacterMarkerSymbolKeys;
import com.sldeditor.exportdata.esri.keys.symbols.*;
[ "com.sldeditor.exportdata" ]
com.sldeditor.exportdata;
834
private int showTableStatus(Hive db, ShowTableStatusDesc showTblStatus) throws HiveException { // get the tables for the desired pattern - populate the output stream List<Table> tbls = new ArrayList<Table>(); Map<String, String> part = showTblStatus.getPartSpec(); Partition par = null; if (part !=...
int function(Hive db, ShowTableStatusDesc showTblStatus) throws HiveException { List<Table> tbls = new ArrayList<Table>(); Map<String, String> part = showTblStatus.getPartSpec(); Partition par = null; if (part != null) { Table tbl = db.getTable(showTblStatus.getDbName(), showTblStatus.getPattern()); par = db.getPartiti...
/** * Write the status of tables to a file. * * @param db * The database in question. * @param showTblStatus * tables we are interested in * @return Return 0 when execution succeeds and above 0 if it fails. */
Write the status of tables to a file
showTableStatus
{ "repo_name": "BUPTAnderson/apache-hive-2.1.1-src", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java", "license": "apache-2.0", "size": 173241 }
[ "java.io.DataOutputStream", "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.Map", "java.util.SortedSet", "java.util.TreeSet", "org.apache.hadoop.hive.ql.ErrorMsg", "org.apache.hadoop.hive.ql.metadata.Hive", "org.apache.hadoop.hive.ql.metadata.HiveException", "org.apache...
import java.io.DataOutputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; import org.apache.hadoop.hive.ql.ErrorMsg; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata....
import java.io.*; import java.util.*; import org.apache.hadoop.hive.ql.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.ql.plan.*; import org.apache.hadoop.io.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,392,739
SetQuantifier getSetQuantifier();
SetQuantifier getSetQuantifier();
/** * Returns the set quantifier for the set operation. * * @return The set quantifier for the set operation. * @see SetQuantifier */
Returns the set quantifier for the set operation
getSetQuantifier
{ "repo_name": "Qi4j/qi4j-sdk", "path": "libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/query/QueryExpressionBodyBinary.java", "license": "apache-2.0", "size": 2202 }
[ "org.apache.polygene.library.sql.generator.grammar.common.SetQuantifier" ]
import org.apache.polygene.library.sql.generator.grammar.common.SetQuantifier;
import org.apache.polygene.library.sql.generator.grammar.common.*;
[ "org.apache.polygene" ]
org.apache.polygene;
613,474
protected Edge findClosestEdge(List<Vector2> simplex, int winding) { // get the current size of the simplex int size = simplex.size(); // create an edge Edge edge = new Edge(); // set edge's distance to the max double value edge.distance = Double.MAX_VALUE; edge.normal = new Vector2(); // cre...
Edge function(List<Vector2> simplex, int winding) { int size = simplex.size(); Edge edge = new Edge(); edge.distance = Double.MAX_VALUE; edge.normal = new Vector2(); Vector2 normal = new Vector2(); for (int i = 0; i < size; i++) { int j = i + 1 == size ? 0 : i + 1; Vector2 a = simplex.get(i); Vector2 b = simplex.get(j)...
/** * Returns the edge on the simplex that is closest to the origin. * @param simplex the simplex * @param winding the simplex winding * @return {@link Edge} the closest edge to the origin */
Returns the edge on the simplex that is closest to the origin
findClosestEdge
{ "repo_name": "yuripourre/etyllica-physics", "path": "src/main/java/org/dyn4j/collision/narrowphase/Epa.java", "license": "bsd-3-clause", "size": 10968 }
[ "java.util.List", "org.dyn4j.geometry.Vector2" ]
import java.util.List; import org.dyn4j.geometry.Vector2;
import java.util.*; import org.dyn4j.geometry.*;
[ "java.util", "org.dyn4j.geometry" ]
java.util; org.dyn4j.geometry;
2,088,959
public static IAST LessEqual(final IExpr x, final IExpr y) { return new B2.LessEqual(x, y); }
static IAST function(final IExpr x, final IExpr y) { return new B2.LessEqual(x, y); }
/** * Yields {@link S#True} if <code>x</code> is known to be less equal than <code>y</code>. * * <p> * See: <a href= * "https://raw.githubusercontent.com/axkr/symja_android_library/master/symja_android_library/doc/functions/LessEqual.md">LessEqual</a> * * @param x * @param y * @return */
Yields <code>S#True</code> if <code>x</code> is known to be less equal than <code>y</code>. See: LessEqual
LessEqual
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java", "license": "gpl-3.0", "size": 283472 }
[ "org.matheclipse.core.interfaces.IExpr" ]
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.*;
[ "org.matheclipse.core" ]
org.matheclipse.core;
140,823
public Iterator iterator() { return children.iterator(); }
public Iterator iterator() { return children.iterator(); }
/** * Gets the array of children affected by this event. * @return the array of children affected */
Gets the array of children affected by this event
toArray
{ "repo_name": "haikuowuya/android_system_code", "path": "src/java/beans/beancontext/BeanContextMembershipEvent.java", "license": "apache-2.0", "size": 3497 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,728,265
protected void createFile(Path path, byte[] sourceData) throws IOException { FSDataOutputStream out = fs.create(path); out.write(sourceData, 0, sourceData.length); out.close(); }
void function(Path path, byte[] sourceData) throws IOException { FSDataOutputStream out = fs.create(path); out.write(sourceData, 0, sourceData.length); out.close(); }
/** * Create a file with the given data. * * @param path path to write * @param sourceData source dataset * @throws IOException on any problem */
Create a file with the given data
createFile
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-tools/hadoop-openstack/src/test/java/org/apache/hadoop/fs/swift/SwiftFileSystemBaseTest.java", "license": "apache-2.0", "size": 12260 }
[ "java.io.IOException", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,085,586
public final List<FullyQualifiedJavaType> getCheckedExceptions() { configure(); return checkedExceptions; }
final List<FullyQualifiedJavaType> function() { configure(); return checkedExceptions; }
/** * Gets the checked exceptions. * * @return the checked exceptions */
Gets the checked exceptions
getCheckedExceptions
{ "repo_name": "littleJava/mybatis-maven-generator", "path": "src/main/java/org/mybatis/generator/codegen/ibatis2/dao/templates/AbstractDAOTemplate.java", "license": "apache-2.0", "size": 20854 }
[ "java.util.List", "org.mybatis.generator.api.dom.java.FullyQualifiedJavaType" ]
import java.util.List; import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import java.util.*; import org.mybatis.generator.api.dom.java.*;
[ "java.util", "org.mybatis.generator" ]
java.util; org.mybatis.generator;
2,165,985
return RpkitPaymentGroupMemberRecord.class; } public final TableField<RpkitPaymentGroupMemberRecord, Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER.nullable(false).identity(true), this, ""); public final TableField<RpkitPaymentGroupMemberRecord, Integer> PAYMENT_GROUP_ID = cre...
return RpkitPaymentGroupMemberRecord.class; } public final TableField<RpkitPaymentGroupMemberRecord, Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER.nullable(false).identity(true), this, STRpayment_group_idSTRSTRcharacter_idSTRSTRrpkit_payment_group_memberSTR"); } /** * {@inheritDoc}
/** * The class holding records for this type */
The class holding records for this type
getRecordType
{ "repo_name": "seventhroot/elysium", "path": "bukkit/rpk-payments-bukkit/src/main/java/com/rpkit/payments/bukkit/database/jooq/rpkit/tables/RpkitPaymentGroupMember.java", "license": "apache-2.0", "size": 4867 }
[ "com.rpkit.payments.bukkit.database.jooq.rpkit.tables.records.RpkitPaymentGroupMemberRecord", "org.jooq.TableField" ]
import com.rpkit.payments.bukkit.database.jooq.rpkit.tables.records.RpkitPaymentGroupMemberRecord; import org.jooq.TableField;
import com.rpkit.payments.bukkit.database.jooq.rpkit.tables.records.*; import org.jooq.*;
[ "com.rpkit.payments", "org.jooq" ]
com.rpkit.payments; org.jooq;
866,460
public void setTransceiver (Transceiver transceiver) { this.transceiver = transceiver; }
void function (Transceiver transceiver) { this.transceiver = transceiver; }
/** * Set the transceiver for this action. * * @param transceiver The new transceiver. */
Set the transceiver for this action
setTransceiver
{ "repo_name": "grappendorf/openmetix", "path": "src/java/de/iritgo/openmetix/core/action/Action.java", "license": "gpl-2.0", "size": 3227 }
[ "de.iritgo.openmetix.core.base.Transceiver" ]
import de.iritgo.openmetix.core.base.Transceiver;
import de.iritgo.openmetix.core.base.*;
[ "de.iritgo.openmetix" ]
de.iritgo.openmetix;
2,122,341
public void setArea(short a) { RecastJNI.dtPoly_setArea(swigCPtr, this, a); }
void function(short a) { RecastJNI.dtPoly_setArea(swigCPtr, this, a); }
/** * Sets the user defined area id. [Limit: less than DT_MAX_AREAS]. * * @param a */
Sets the user defined area id. [Limit: less than DT_MAX_AREAS]
setArea
{ "repo_name": "QuietOne/jNavigation", "path": "src/com/jme3/ai/navigation/detour/Poly.java", "license": "bsd-3-clause", "size": 5264 }
[ "com.jme3.ai.navigation.utils.RecastJNI" ]
import com.jme3.ai.navigation.utils.RecastJNI;
import com.jme3.ai.navigation.utils.*;
[ "com.jme3.ai" ]
com.jme3.ai;
2,260,228
public AvailabilitySetProperties withVirtualMachines(List<SubResource> virtualMachines) { this.virtualMachines = virtualMachines; return this; }
AvailabilitySetProperties function(List<SubResource> virtualMachines) { this.virtualMachines = virtualMachines; return this; }
/** * Set the virtualMachines property: A list of references to all virtual machines in the availability set. * * @param virtualMachines the virtualMachines value to set. * @return the AvailabilitySetProperties object itself. */
Set the virtualMachines property: A list of references to all virtual machines in the availability set
withVirtualMachines
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/AvailabilitySetProperties.java", "license": "mit", "size": 4989 }
[ "com.azure.core.management.SubResource", "java.util.List" ]
import com.azure.core.management.SubResource; import java.util.List;
import com.azure.core.management.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
2,764,261
@TransactionAttribute(TransactionAttributeType.NEVER) @SuppressWarnings("unchecked") public List<Customer> listCustomers() { return entityManager.createQuery("select c from Customer c").getResultList(); }
@TransactionAttribute(TransactionAttributeType.NEVER) @SuppressWarnings(STR) List<Customer> function() { return entityManager.createQuery(STR).getResultList(); }
/** * List all the customers. * * @return * @throws NamingException * @throws NotSupportedException * @throws SystemException * @throws SecurityException * @throws IllegalStateException * @throws RollbackException * @throws HeuristicMixedException * @throws Heuris...
List all the customers
listCustomers
{ "repo_name": "jgisler/jboss-eap-quickstarts", "path": "cmt/src/main/java/org/jboss/as/quickstarts/cmt/ejb/CustomerManagerEJB.java", "license": "apache-2.0", "size": 3141 }
[ "java.util.List", "javax.ejb.TransactionAttribute", "javax.ejb.TransactionAttributeType", "org.jboss.as.quickstarts.cmt.model.Customer" ]
import java.util.List; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import org.jboss.as.quickstarts.cmt.model.Customer;
import java.util.*; import javax.ejb.*; import org.jboss.as.quickstarts.cmt.model.*;
[ "java.util", "javax.ejb", "org.jboss.as" ]
java.util; javax.ejb; org.jboss.as;
43,510
public JSONObject put(String key, Collection value) throws JSONException { put(key, new JSONArray(value)); return this; }
JSONObject function(String key, Collection value) throws JSONException { put(key, new JSONArray(value)); return this; }
/** * Put a key/value pair in the JSONObject, where the value will be a * JSONArray which is produced from a Collection. * @param key A key string. * @param value A Collection value. * @return this. * @throws JSONException */
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection
put
{ "repo_name": "zenwalk/atlasmapper", "path": "src/main/java/org/json/JSONObject.java", "license": "gpl-3.0", "size": 55770 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
59,830
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<CheckNameResultInner>> checkNameAvailabilityWithResponseAsync( String location, KustoPoolCheckNameRequest kustoPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<CheckNameResultInner>> function( String location, KustoPoolCheckNameRequest kustoPoolName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { retur...
/** * Checks that the kusto pool name is valid and is not already in use. * * @param location The name of Azure region. * @param kustoPoolName The name of the cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fai...
Checks that the kusto pool name is valid and is not already in use
checkNameAvailabilityWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java", "license": "mit", "size": 205878 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner", "com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameReques...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.synapse.fluent.models.*; import com.azure.resourcemanager.synapse.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,472,232
public static void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params) { throw fail(); }
static void function(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params) { throw fail(); }
/** * Log a message at the given level. * * @param loggerFqcn the logger class name * @param level the level * @param t the throwable cause * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor * @param params the message par...
Log a message at the given level
logf
{ "repo_name": "quarkusio/quarkus", "path": "core/runtime/src/main/java/io/quarkus/logging/Log.java", "license": "apache-2.0", "size": 75484 }
[ "org.jboss.logging.Logger" ]
import org.jboss.logging.Logger;
import org.jboss.logging.*;
[ "org.jboss.logging" ]
org.jboss.logging;
2,448,679
public static void waitFor(String description, Function<Void, Boolean> condition, WaitForOptions options) { long start = System.currentTimeMillis(); int interval = options.getInterval(); int timeout = options.getTimeout(); while (!condition.apply(null)) { if (timeout != WaitForOptions.NEVE...
static void function(String description, Function<Void, Boolean> condition, WaitForOptions options) { long start = System.currentTimeMillis(); int interval = options.getInterval(); int timeout = options.getTimeout(); while (!condition.apply(null)) { if (timeout != WaitForOptions.NEVER && System.currentTimeMillis() - st...
/** * Waits for a condition to be satisfied. * * @param description a description of what causes condition to evaluation to true * @param condition the condition to wait on * @param options the options to use */
Waits for a condition to be satisfied
waitFor
{ "repo_name": "yuluo-ding/alluxio", "path": "core/common/src/main/java/alluxio/util/CommonUtils.java", "license": "apache-2.0", "size": 12567 }
[ "com.google.common.base.Function" ]
import com.google.common.base.Function;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,555,648
private ResultSecurity removeTokensFromColumns(EntityInstance deletor, String tableName, AttributeClass[] columns, List<EntityInstance> tokens) { System.out.println("\n\n========================= Remove Tokens (Default tokens) from Columns (all columns of test table) =========================\n\n"); deletor =...
ResultSecurity function(EntityInstance deletor, String tableName, AttributeClass[] columns, List<EntityInstance> tokens) { System.out.println(STR); deletor = ec.readUser(ROOTNAME, ROOTPASS); EntityClass entityClass = ec.getEntityClass(ec.getDatabaseConnection(), TESTTABLE_TABLENAME, false); tableName = entityClass.getN...
/** * This method shows how to remove a list of tokens from a list of columns. * */
This method shows how to remove a list of tokens from a list of columns
removeTokensFromColumns
{ "repo_name": "unsw-cse-soc/CoreDB", "path": "src/CoreDB-Relational Pluggin/Library/src/coredb/main/SampleCodeWithSecurityColumnRow.java", "license": "apache-2.0", "size": 26720 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
591,090