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 SizeInt getSize() {
return glprovider.getClientAreaSize();
} | SizeInt function() { return glprovider.getClientAreaSize(); } | /**
* Get the client area size.
* @return
*/ | Get the client area size | getSize | {
"repo_name": "qgears/opensource-utils",
"path": "commons/hu.qgears.opengl.commons/src/hu/qgears/opengl/commons/AbstractOpenglApplication2.java",
"license": "epl-1.0",
"size": 9788
} | [
"hu.qgears.images.SizeInt"
] | import hu.qgears.images.SizeInt; | import hu.qgears.images.*; | [
"hu.qgears.images"
] | hu.qgears.images; | 971,639 |
void store() {
forModule(MavenPanel.class).put(DN_VERTX_VERSION, defaultVersionText.getText());
forModule(MavenPanel.class).put(DN_MVN_ARTIFACT_ID, artifactIDTextField.getText());
forModule(MavenPanel.class).put(DN_MVN_GROUP_ID, groupIDTextField.getText());
} | void store() { forModule(MavenPanel.class).put(DN_VERTX_VERSION, defaultVersionText.getText()); forModule(MavenPanel.class).put(DN_MVN_ARTIFACT_ID, artifactIDTextField.getText()); forModule(MavenPanel.class).put(DN_MVN_GROUP_ID, groupIDTextField.getText()); } | /**
* Store the option values.
*/ | Store the option values | store | {
"repo_name": "fafischer/te2m.de-netbeans",
"path": "de.te2m.tools.netbeans.vertx/src/main/java/de/te2m/tools/netbeans/vertx/options/MavenPanel.java",
"license": "gpl-2.0",
"size": 7913
} | [
"org.openide.util.NbPreferences"
] | import org.openide.util.NbPreferences; | import org.openide.util.*; | [
"org.openide.util"
] | org.openide.util; | 2,893,205 |
public boolean cmakeInstall(String buildFolder, String runFolder, String buildType, Object console) {
boolean ret_val = false;
try {
switch (this.CURR_OS) {
case WINDOWS:
ret_val = this.winCmd.cmakeInstall(buildFolder, runFolder, buildType, consol... | boolean function(String buildFolder, String runFolder, String buildType, Object console) { boolean ret_val = false; try { switch (this.CURR_OS) { case WINDOWS: ret_val = this.winCmd.cmakeInstall(buildFolder, runFolder, buildType, console); break; case UNIX: ret_val = this.unixCmd.cmakeInstall(buildFolder, runFolder, co... | /**
* Compile the configured cmake project from buildFolder.<br />
* NOTE: In GUI mode for Windows operating systems, the compiled binary
* need to be copied into installation folder separately
*
* @param buildFolder The String path to cmake build folder
* @param runFolder The String... | Compile the configured cmake project from buildFolder. need to be copied into installation folder separately | cmakeInstall | {
"repo_name": "Corsol/MaNGOSUI-Dev",
"path": "src/mangosui/CommandManager.java",
"license": "gpl-2.0",
"size": 73261
} | [
"java.io.IOException",
"java.util.concurrent.ExecutionException"
] | import java.io.IOException; import java.util.concurrent.ExecutionException; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,533,873 |
static private byte[] mapToByteArray(double v)
{
ByteBuffer bb = ByteBuffer.allocate(8);
bb.putDouble(v);
return bb.array();
} | static byte[] function(double v) { ByteBuffer bb = ByteBuffer.allocate(8); bb.putDouble(v); return bb.array(); } | /**
* Map the byte data to a byte value
* @param v see above.
* @return see above.
*/ | Map the byte data to a byte value | mapToByteArray | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/tools/OmeroJava/src/omerojava/util/GatewayUtils.java",
"license": "gpl-2.0",
"size": 15192
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,188,771 |
@Test
public void trainEcho()
{
final NeuralNetwork network = testData.createNeuralNetworkEcho();
network.randomizeWeights(0.1);
final List<Example> examples = testData.createExamplesEcho();
// Train
final double beta = 1.0;
final double alpha = 0.3;
... | void function() { final NeuralNetwork network = testData.createNeuralNetworkEcho(); network.randomizeWeights(0.1); final List<Example> examples = testData.createExamplesEcho(); final double beta = 1.0; final double alpha = 0.3; final NeuralNetworkTrainer trainer = new NeuralNetworkBatchTrainer(network, examples, IS_VER... | /**
* Test the <code>train()</code> method.
*/ | Test the <code>train()</code> method | trainEcho | {
"repo_name": "jmthompson2015/vizzini",
"path": "ai/src/test/java/org/vizzini/ai/neuralnetwork/NeuralNetworkBatchTrainerTest.java",
"license": "mit",
"size": 15019
} | [
"java.util.List",
"org.junit.Assert",
"org.vizzini.ai.neuralnetwork.Example",
"org.vizzini.ai.neuralnetwork.NeuralNetwork",
"org.vizzini.ai.neuralnetwork.NeuralNetworkBatchTrainer",
"org.vizzini.ai.neuralnetwork.NeuralNetworkTrainer"
] | import java.util.List; import org.junit.Assert; import org.vizzini.ai.neuralnetwork.Example; import org.vizzini.ai.neuralnetwork.NeuralNetwork; import org.vizzini.ai.neuralnetwork.NeuralNetworkBatchTrainer; import org.vizzini.ai.neuralnetwork.NeuralNetworkTrainer; | import java.util.*; import org.junit.*; import org.vizzini.ai.neuralnetwork.*; | [
"java.util",
"org.junit",
"org.vizzini.ai"
] | java.util; org.junit; org.vizzini.ai; | 465,434 |
public void validate(final NXroot root) throws NexusValidationException;
| void function(final NXroot root) throws NexusValidationException; | /**
* Validate the given nexus tree.
* @param root
* @throws NexusValidationException
*/ | Validate the given nexus tree | validate | {
"repo_name": "belkassaby/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/validation/NexusApplicationValidator.java",
"license": "epl-1.0",
"size": 1556
} | [
"org.eclipse.dawnsci.nexus.NXroot"
] | import org.eclipse.dawnsci.nexus.NXroot; | import org.eclipse.dawnsci.nexus.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 156,200 |
protected void resetFollowDistance(LivingEntity entity, MobType mobType)
{
AttributeInstance attribute = entity.getAttribute(Attribute.GENERIC_FOLLOW_RANGE);
attribute.setBaseValue(mobType.getDefaultFollowDistance());
}
| void function(LivingEntity entity, MobType mobType) { AttributeInstance attribute = entity.getAttribute(Attribute.GENERIC_FOLLOW_RANGE); attribute.setBaseValue(mobType.getDefaultFollowDistance()); } | /**
* Resets the follow distance of the given EntityInsentient back
* to its default follow distance.
* @param entity the entity whose follow distance you
* want to reset.
* @param mobType the mob type of the entity
*/ | Resets the follow distance of the given EntityInsentient back to its default follow distance | resetFollowDistance | {
"repo_name": "siege1313/DynamicDifficulty",
"path": "src/com/cjmcguire/bukkit/dynamic/controller/MobControllerListener.java",
"license": "gpl-3.0",
"size": 12986
} | [
"com.cjmcguire.bukkit.dynamic.playerdata.MobType",
"org.bukkit.attribute.Attribute",
"org.bukkit.attribute.AttributeInstance",
"org.bukkit.entity.LivingEntity"
] | import com.cjmcguire.bukkit.dynamic.playerdata.MobType; import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeInstance; import org.bukkit.entity.LivingEntity; | import com.cjmcguire.bukkit.dynamic.playerdata.*; import org.bukkit.attribute.*; import org.bukkit.entity.*; | [
"com.cjmcguire.bukkit",
"org.bukkit.attribute",
"org.bukkit.entity"
] | com.cjmcguire.bukkit; org.bukkit.attribute; org.bukkit.entity; | 532,549 |
StringBuffer buf = new StringBuffer();
for (Enumeration e = this.propertyNames(); e.hasMoreElements(); ) {
process(buf, e.nextElement());
}
return buf.toString();
} | StringBuffer buf = new StringBuffer(); for (Enumeration e = this.propertyNames(); e.hasMoreElements(); ) { process(buf, e.nextElement()); } return buf.toString(); } | /**
* The String representation of the contents.
* @return a String representation.
*/ | The String representation of the contents | toString | {
"repo_name": "bullda/DroidText",
"path": "src/core/com/lowagie/text/xml/xmp/XmpSchema.java",
"license": "lgpl-3.0",
"size": 5143
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,265,666 |
@Test
public void tagRouterRuleParseTest(){
String tagRouterRuleConfig = "---\n" +
"force: false\n" +
"runtime: true\n" +
"enabled: false\n" +
"priority: 1\n" +
"key: demo-provider\n" +
"tags:\n" +
... | void function(){ String tagRouterRuleConfig = "---\n" + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR30.5.120.37:20880\"]\n" + STR + STR + STR + STR + "..."; TagRouterRule tagRouterRule = TagRuleParser.parse(tagRouterRuleConfig); assert tagRouterRule.getTagNames().contains("tag1"); assert tagRouterRule.getT... | /**
* TagRouterRule parse test when the tags addresses is null
*
* <pre>
* ~ -> null
* null -> null
* </pre>
*/ | TagRouterRule parse test when the tags addresses is null <code> ~ -> null null -> null </code> | tagRouterRuleParseTest | {
"repo_name": "qtvbwfn/dubbo",
"path": "dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/router/TagRouterTest.java",
"license": "apache-2.0",
"size": 4301
} | [
"org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule",
"org.apache.dubbo.rpc.cluster.router.tag.model.TagRuleParser"
] | import org.apache.dubbo.rpc.cluster.router.tag.model.TagRouterRule; import org.apache.dubbo.rpc.cluster.router.tag.model.TagRuleParser; | import org.apache.dubbo.rpc.cluster.router.tag.model.*; | [
"org.apache.dubbo"
] | org.apache.dubbo; | 1,301,076 |
List<LogEntry> getLogEntries(String partitionCode, String identifier) throws ServiceException;
| List<LogEntry> getLogEntries(String partitionCode, String identifier) throws ServiceException; | /**
* Get a list of log entries for a particular identifier across domains and types.
*
* @param partitionCode The partition code.
* @param identifier
*
*/ | Get a list of log entries for a particular identifier across domains and types | getLogEntries | {
"repo_name": "sudduth/Aardin",
"path": "Logging/LoggingAPI/src/main/java/org/aardin/logging/api/ILoggingService.java",
"license": "agpl-3.0",
"size": 4625
} | [
"java.util.List",
"org.aardin.common.exceptions.ServiceException",
"org.aardin.logging.model.LogEntry"
] | import java.util.List; import org.aardin.common.exceptions.ServiceException; import org.aardin.logging.model.LogEntry; | import java.util.*; import org.aardin.common.exceptions.*; import org.aardin.logging.model.*; | [
"java.util",
"org.aardin.common",
"org.aardin.logging"
] | java.util; org.aardin.common; org.aardin.logging; | 2,790,658 |
@Override public void enterPinst(@NotNull PoCoParser.PinstContext ctx) { } | @Override public void enterPinst(@NotNull PoCoParser.PinstContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitPimports | {
"repo_name": "Corjuh/PoCo-Compiler",
"path": "Parser/gen/PoCoParserBaseListener.java",
"license": "lgpl-2.1",
"size": 18482
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 706,457 |
public void setTile(Tile tile, boolean done)
{
if (model.getState() == DISCARDED) return;
model.getBrowser().getUI().repaint();
view.removeComponentListener(controller);
if (done) {
view.addComponentListener(controller);
model.setState(READY);
fireStateChange();
}
}
| void function(Tile tile, boolean done) { if (model.getState() == DISCARDED) return; model.getBrowser().getUI().repaint(); view.removeComponentListener(controller); if (done) { view.addComponentListener(controller); model.setState(READY); fireStateChange(); } } | /**
* Implemented as specified by the {@link ImViewer} interface.
* @see ImViewer#setTile(Tile, boolean)
*/ | Implemented as specified by the <code>ImViewer</code> interface | setTile | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java",
"license": "gpl-2.0",
"size": 95777
} | [
"org.openmicroscopy.shoola.env.rnd.data.Tile"
] | import org.openmicroscopy.shoola.env.rnd.data.Tile; | import org.openmicroscopy.shoola.env.rnd.data.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,259,183 |
protected void doExpiry(ConsumerWorkingSet workingSet) {
long expiryTime = getExpiryBorder();
List<PartitionKey> expiredPartitions = new ArrayList<>();
List<PartitionKey> discardedPartitions = new ArrayList<>();
for (ConsumablePartition partition : workingSet.getPartitions()) {
if (partition.get... | void function(ConsumerWorkingSet workingSet) { long expiryTime = getExpiryBorder(); List<PartitionKey> expiredPartitions = new ArrayList<>(); List<PartitionKey> discardedPartitions = new ArrayList<>(); for (ConsumablePartition partition : workingSet.getPartitions()) { if (partition.getProcessState() == ProcessState.IN_... | /**
* Goes through all partitions. If any IN_PROGRESS partition is older than the configured timeout, reset its state
* to AVAILABLE, unless it has already been retried the configured number of times, in which case it is discarded.
*/ | Goes through all partitions. If any IN_PROGRESS partition is older than the configured timeout, reset its state to AVAILABLE, unless it has already been retried the configured number of times, in which case it is discarded | doExpiry | {
"repo_name": "caskdata/cdap",
"path": "cdap-api/src/main/java/co/cask/cdap/api/dataset/lib/partitioned/ConcurrentPartitionConsumer.java",
"license": "apache-2.0",
"size": 8422
} | [
"co.cask.cdap.api.dataset.lib.PartitionKey",
"java.util.ArrayList",
"java.util.List"
] | import co.cask.cdap.api.dataset.lib.PartitionKey; import java.util.ArrayList; import java.util.List; | import co.cask.cdap.api.dataset.lib.*; import java.util.*; | [
"co.cask.cdap",
"java.util"
] | co.cask.cdap; java.util; | 2,134,636 |
protected void stopService() throws Exception {
stopScheduler(scheduleMediaListenerID, scheduleMediaListener);
stopScheduler(updateMediaStatusListenerID, updateMediaStatusListener);
stopScheduler(burnMediaListenerID, burnMediaListener);
JMSDelegate.stopListening(QUEUE);
sup... | void function() throws Exception { stopScheduler(scheduleMediaListenerID, scheduleMediaListener); stopScheduler(updateMediaStatusListenerID, updateMediaStatusListener); stopScheduler(burnMediaListenerID, burnMediaListener); JMSDelegate.stopListening(QUEUE); super.stopService(); } | /**
* Stop listening to the JMS queue deined in <code>QUEUE</code>
*
*/ | Stop listening to the JMS queue deined in <code>QUEUE</code> | stopService | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4JBOSS_2_2_1/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mcmscu/MCMScuService.java",
"license": "apache-2.0",
"size": 37924
} | [
"org.dcm4chex.archive.util.JMSDelegate"
] | import org.dcm4chex.archive.util.JMSDelegate; | import org.dcm4chex.archive.util.*; | [
"org.dcm4chex.archive"
] | org.dcm4chex.archive; | 2,823,505 |
this.job = job;
//disable the auto increment of the counter. For pipes, no of processed
//records could be different(equal or less) than the no of records input.
SkipBadRecords.setAutoIncrMapperProcCount(job, false);
} | this.job = job; SkipBadRecords.setAutoIncrMapperProcCount(job, false); } | /**
* Get the new configuration.
* @param job the job's configuration
*/ | Get the new configuration | configure | {
"repo_name": "koichi626/hadoop-gpu",
"path": "hadoop-gpu-0.20.1/src/mapred/org/apache/hadoop/mapred/pipes/PipesGPUMapRunner.java",
"license": "apache-2.0",
"size": 4165
} | [
"org.apache.hadoop.mapred.SkipBadRecords"
] | import org.apache.hadoop.mapred.SkipBadRecords; | import org.apache.hadoop.mapred.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,236,508 |
@Override
public void render(OrthographicCamera camera, float deltaTime) {
batch.setProjectionMatrix(camera.combined);
batch.begin();
screenSprite.draw(batch);
batch.end();
} | void function(OrthographicCamera camera, float deltaTime) { batch.setProjectionMatrix(camera.combined); batch.begin(); screenSprite.draw(batch); batch.end(); } | /**
* Zeigt den Splashscreen an.
*
* @param camera die aktuelle Kamera
* @param deltaTime die vergangene Zeit seit dem letztem Frame
*/ | Zeigt den Splashscreen an | render | {
"repo_name": "Entwicklerpages/school-game",
"path": "core/src/de/entwicklerpages/java/schoolgame/menu/Splashscreen.java",
"license": "gpl-3.0",
"size": 3129
} | [
"com.badlogic.gdx.graphics.OrthographicCamera"
] | import com.badlogic.gdx.graphics.OrthographicCamera; | import com.badlogic.gdx.graphics.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,764,535 |
public void setOrientation(final HierarchicOrientation value) {
Preconditions.checkNotNull(value, "IE00879: Orientation argument can't be null");
if (value == getOrientation()) {
return;
}
if (m_type == null) {
m_orientation = value;
} else {
m_type.setHierarchicOrientation(val... | void function(final HierarchicOrientation value) { Preconditions.checkNotNull(value, STR); if (value == getOrientation()) { return; } if (m_type == null) { m_orientation = value; } else { m_type.setHierarchicOrientation(value.ordinal()); } } | /**
* Changes the current hierarchic orientation setting.
*
* @param value The new value of the hierarchic orientation setting.
*/ | Changes the current hierarchic orientation setting | setOrientation | {
"repo_name": "google/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/ZyGraph/Settings/ZyGraphHierarchicalSettings.java",
"license": "apache-2.0",
"size": 8891
} | [
"com.google.common.base.Preconditions",
"com.google.security.zynamics.zylib.gui.zygraph.layouters.HierarchicOrientation"
] | import com.google.common.base.Preconditions; import com.google.security.zynamics.zylib.gui.zygraph.layouters.HierarchicOrientation; | import com.google.common.base.*; import com.google.security.zynamics.zylib.gui.zygraph.layouters.*; | [
"com.google.common",
"com.google.security"
] | com.google.common; com.google.security; | 1,418,440 |
EAttribute getMultiplicity__Bound_1(); | EAttribute getMultiplicity__Bound_1(); | /**
* Returns the meta object for the attribute '{@link cruise.umple.umple.Multiplicity_#getBound_1 <em>Bound 1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Bound 1</em>'.
* @see cruise.umple.umple.Multiplicity_#getBound_1()
* @see #getMult... | Returns the meta object for the attribute '<code>cruise.umple.umple.Multiplicity_#getBound_1 Bound 1</code>'. | getMultiplicity__Bound_1 | {
"repo_name": "ahmedvc/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java",
"license": "mit",
"size": 485842
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 392,129 |
int updateByExampleSelective(@Param("record") Actvhh record, @Param("example") ActvhhExample example); | int updateByExampleSelective(@Param(STR) Actvhh record, @Param(STR) ActvhhExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ACTVHH
*
* @mbggenerated Wed Nov 12 10:29:21 CST 2014
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table ACTVHH | updateByExampleSelective | {
"repo_name": "rongshang/fbi-cbs2",
"path": "common/main/java/cbs/repository/account/maininfo/dao/ActvhhMapper.java",
"license": "unlicense",
"size": 3524
} | [
"org.apache.ibatis.annotations.Param"
] | import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.*; | [
"org.apache.ibatis"
] | org.apache.ibatis; | 97,002 |
Iterable<T> findAll(Sort sort); | Iterable<T> findAll(Sort sort); | /**
* Returns all entities sorted by the given options.
*
* @param sort
* @return all entities sorted by the given options
*/ | Returns all entities sorted by the given options | findAll | {
"repo_name": "jianghouwei/SunDay",
"path": "root-framework/src/main/java/com/org/framework/data/BaseService.java",
"license": "mit",
"size": 2434
} | [
"org.springframework.data.domain.Sort"
] | import org.springframework.data.domain.Sort; | import org.springframework.data.domain.*; | [
"org.springframework.data"
] | org.springframework.data; | 2,159,514 |
protected void copy(CacheEntry cacheEntry, ServletOutputStream ostream,
Iterator ranges, String contentType)
throws IOException {
IOException exception = null;
while ( (exception == null) && (ranges.hasNext()) ) {
InputStream resourceInputStream = cacheEn... | void function(CacheEntry cacheEntry, ServletOutputStream ostream, Iterator ranges, String contentType) throws IOException { IOException exception = null; while ( (exception == null) && (ranges.hasNext()) ) { InputStream resourceInputStream = cacheEntry.resource.streamContent(); InputStream istream = new BufferedInputSt... | /**
* Copy the contents of the specified input stream to the specified
* output stream, and ensure that both streams are closed before returning
* (even in the face of an exception).
*
* @param cacheEntry Cached version of requested resource
* @param ostream The output stream to write to
... | Copy the contents of the specified input stream to the specified output stream, and ensure that both streams are closed before returning (even in the face of an exception) | copy | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/DefaultServlet.java",
"license": "mit",
"size": 83061
} | [
"java.io.BufferedInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Iterator",
"javax.servlet.ServletOutputStream",
"org.apache.naming.resources.CacheEntry"
] | import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Iterator; import javax.servlet.ServletOutputStream; import org.apache.naming.resources.CacheEntry; | import java.io.*; import java.util.*; import javax.servlet.*; import org.apache.naming.resources.*; | [
"java.io",
"java.util",
"javax.servlet",
"org.apache.naming"
] | java.io; java.util; javax.servlet; org.apache.naming; | 1,176,031 |
@Override
public void createPartControl(Composite parent) {
// Create the tool bar buttons for the view.
createActions();
// Initialize the ListViewer. Disable multi-selection by specifying the
// default style bits except for SWT.MULTI.
fileTreeViewer = new TreeViewer(parent,
SWT.H_SCROLL | SWT.V_S... | void function(Composite parent) { createActions(); fileTreeViewer = new TreeViewer(parent, SWT.H_SCROLL SWT.V_SCROLL SWT.BORDER); fileTreeViewer.addSelectionChangedListener(this); initializeTreeViewer(fileTreeViewer); getSite().setSelectionProvider(fileTreeViewer); return; } | /**
* Creates the widgets and controls for the VizFileViewer. This includes
* {@link #fileTreeViewer}.
*
* @param parent
* The parent Composite that will contain this VizFileViewer.
*/ | Creates the widgets and controls for the VizFileViewer. This includes <code>#fileTreeViewer</code> | createPartControl | {
"repo_name": "eclipse/eavp",
"path": "org.eclipse.eavp.viz/src/org/eclipse/eavp/viz/VizFileViewer.java",
"license": "epl-1.0",
"size": 17606
} | [
"org.eclipse.jface.viewers.TreeViewer",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.widgets.Composite; | import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 1,745,211 |
private HttpNegotiateAuthenticator createWithoutNative(String accountType) {
HttpNegotiateAuthenticator authenticator =
spy(HttpNegotiateAuthenticator.create(accountType));
doNothing().when(authenticator).nativeSetResult(anyLong(), anyInt(), anyString());
doReturn(false)
... | HttpNegotiateAuthenticator function(String accountType) { HttpNegotiateAuthenticator authenticator = spy(HttpNegotiateAuthenticator.create(accountType)); doNothing().when(authenticator).nativeSetResult(anyLong(), anyInt(), anyString()); doReturn(false) .when(authenticator) .lacksPermission(any(Context.class), anyString... | /**
* Returns a new authenticator as a spy so that we can override and intercept the native method
* calls.
*/ | Returns a new authenticator as a spy so that we can override and intercept the native method calls | createWithoutNative | {
"repo_name": "axinging/chromium-crosswalk",
"path": "net/android/junit/src/org/chromium/net/HttpNegotiateAuthenticatorTest.java",
"license": "bsd-3-clause",
"size": 20022
} | [
"android.content.Context",
"org.mockito.Matchers",
"org.mockito.Mockito"
] | import android.content.Context; import org.mockito.Matchers; import org.mockito.Mockito; | import android.content.*; import org.mockito.*; | [
"android.content",
"org.mockito"
] | android.content; org.mockito; | 244,806 |
@Override
public void setByteProperty(final String name, final byte value) throws JMSException {
if (ActiveMQRAMessage.trace) {
ActiveMQRALogger.LOGGER.trace("setByteProperty(" + name + ", " + value + ")");
}
message.setByteProperty(name, value);
} | void function(final String name, final byte value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace(STR + name + STR + value + ")"); } message.setByteProperty(name, value); } | /**
* Set property
*
* @param name The name
* @param value The value
* @throws JMSException Thrown if an error occurs
*/ | Set property | setByteProperty | {
"repo_name": "franz1981/activemq-artemis",
"path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java",
"license": "apache-2.0",
"size": 21145
} | [
"javax.jms.JMSException"
] | import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 681,817 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<PrivateLinkResourceInner>> getWithResponseAsync(
String resourceGroupName, String serverName, String groupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<PrivateLinkResourceInner>> function( String resourceGroupName, String serverName, String groupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mon... | /**
* Gets a private link resource for PostgreSQL server.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param groupName The name of the private link resource.
* @param context The context to associa... | Gets a private link resource for PostgreSQL server | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/postgresql/azure-resourcemanager-postgresql/src/main/java/com/azure/resourcemanager/postgresql/implementation/PrivateLinkResourcesClientImpl.java",
"license": "mit",
"size": 25601
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.postgresql.fluent.models.PrivateLinkResourceInner"
] | 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.postgresql.fluent.models.PrivateLinkResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.postgresql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,346,227 |
public double[] getSortedValues() {
double[] sort = getValues();
Arrays.sort(sort);
return sort;
} | double[] function() { double[] sort = getValues(); Arrays.sort(sort); return sort; } | /**
* Returns the current set of values in an array of double primitives,
* sorted in ascending order. The returned array is a fresh
* copy of the underlying data -- i.e., it is not a reference to the
* stored data.
* @return returns the current set of
* numbers sorted in ascending ord... | Returns the current set of values in an array of double primitives, sorted in ascending order. The returned array is a fresh copy of the underlying data -- i.e., it is not a reference to the stored data | getSortedValues | {
"repo_name": "cacheonix/cacheonix-core",
"path": "3rdparty/commons-math-1.2-src/src/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java",
"license": "lgpl-2.1",
"size": 23222
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,475,663 |
public okhttp3.Call createNamespacedIngressAsync(
String namespace,
V1Ingress body,
String pretty,
String dryRun,
String fieldManager,
String fieldValidation,
final ApiCallback<V1Ingress> _callback)
throws ApiException {
okhttp3.Call localVarCall =
createNa... | okhttp3.Call function( String namespace, V1Ingress body, String pretty, String dryRun, String fieldManager, String fieldValidation, final ApiCallback<V1Ingress> _callback) throws ApiException { okhttp3.Call localVarCall = createNamespacedIngressValidateBeforeCall( namespace, body, pretty, dryRun, fieldManager, fieldVal... | /**
* (asynchronously) create an Ingress
*
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param body (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param dryRun When present, indicates that modifications shoul... | (asynchronously) create an Ingress | createNamespacedIngressAsync | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java",
"license": "apache-2.0",
"size": 477939
} | [
"com.google.gson.reflect.TypeToken",
"io.kubernetes.client.openapi.ApiCallback",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.models.V1Ingress",
"java.lang.reflect.Type"
] | import com.google.gson.reflect.TypeToken; import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.models.V1Ingress; import java.lang.reflect.Type; | import com.google.gson.reflect.*; import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.lang.reflect.*; | [
"com.google.gson",
"io.kubernetes.client",
"java.lang"
] | com.google.gson; io.kubernetes.client; java.lang; | 852,402 |
return (queue instanceof SynchronizedQueue) ?
queue :
new SynchronizedQueue<E>(queue, mutex);
}
private static class SynchronizedObject implements Serializable {
private static final long serialVersionUID = -4408866092364554628L;
final Object delegate;
final Object mutex;
SynchronizedObject(O... | return (queue instanceof SynchronizedQueue) ? queue : new SynchronizedQueue<E>(queue, mutex); } private static class SynchronizedObject implements Serializable { private static final long serialVersionUID = -4408866092364554628L; final Object delegate; final Object mutex; SynchronizedObject(Object delegate, @Nullable O... | /**
* Create a synchronized wrapper for the given queue.
* <p>
* This wrapper cannot synchronize the iterator(). Callers are expected
* to synchronize iterators manually.
* @param queue - the queue to synchronize.
* @param mutex - synchronization mutex, or NULL to use the queue.
* @return A synchronizati... | Create a synchronized wrapper for the given queue. This wrapper cannot synchronize the iterator(). Callers are expected to synchronize iterators manually | queue | {
"repo_name": "aadnk/ProtocolLib",
"path": "src/main/java/com/comphenix/protocol/async/Synchronization.java",
"license": "gpl-2.0",
"size": 5103
} | [
"com.google.common.base.Preconditions",
"java.io.Serializable",
"javax.annotation.Nullable"
] | import com.google.common.base.Preconditions; import java.io.Serializable; import javax.annotation.Nullable; | import com.google.common.base.*; import java.io.*; import javax.annotation.*; | [
"com.google.common",
"java.io",
"javax.annotation"
] | com.google.common; java.io; javax.annotation; | 251,862 |
public List<Integer> getInNeighbors(int v) {
List<Integer> inNeighbors = new ArrayList<Integer>();
for (int i = 0; i < getNumVertices(); i++) {
for (int j = 0; j < adjMatrix[i][v]; j++) {
inNeighbors.add(i);
}
}
return inNeighbors;
... | List<Integer> function(int v) { List<Integer> inNeighbors = new ArrayList<Integer>(); for (int i = 0; i < getNumVertices(); i++) { for (int j = 0; j < adjMatrix[i][v]; j++) { inNeighbors.add(i); } } return inNeighbors; } | /**
* Implement the abstract method for finding all in-neighbors of a vertex.
* If there are multiple edges from another vertex to this one, the neighbor
* appears once in the list for each of these edges.
*
* @param v the index of vertex.
* @return List<Integer> a list of indices of... | Implement the abstract method for finding all in-neighbors of a vertex. If there are multiple edges from another vertex to this one, the neighbor appears once in the list for each of these edges | getInNeighbors | {
"repo_name": "imdaz/UCSDGraphs",
"path": "src/basicgraph/GraphAdjMatrix.java",
"license": "apache-2.0",
"size": 5295
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 599,910 |
private QuadrantAnalysis computeQa(FitResult fitResult, Rectangle regionBounds,
final double[] residuals) {
if (residuals == null) {
final QuadrantAnalysis qa = new QuadrantAnalysis();
qa.score = -1; // Set so that any residuals threshold will be ignored.
return qa;
}
... | QuadrantAnalysis function(FitResult fitResult, Rectangle regionBounds, final double[] residuals) { if (residuals == null) { final QuadrantAnalysis qa = new QuadrantAnalysis(); qa.score = -1; return qa; } final double[] params = fitResult.getParameters(); final int width = regionBounds.width; final int height = regionBo... | /**
* Perform quadrant analysis on the residuals.
*
* <p>Perform quadrant analysis as per rapidSTORM to analyse if the residuals of the the fit are
* skewed around the single fit centre. This may indicate the result is actually two spots (a
* doublet).
*
* @param fitResult the fit res... | Perform quadrant analysis on the residuals. Perform quadrant analysis as per rapidSTORM to analyse if the residuals of the the fit are skewed around the single fit centre. This may indicate the result is actually two spots (a doublet) | computeQa | {
"repo_name": "aherbert/GDSC-SMLM",
"path": "src/main/java/uk/ac/sussex/gdsc/smlm/engine/FitWorker.java",
"license": "gpl-3.0",
"size": 191121
} | [
"java.awt.Rectangle",
"java.util.logging.Level",
"uk.ac.sussex.gdsc.core.logging.LoggerUtils",
"uk.ac.sussex.gdsc.smlm.fitting.FitResult",
"uk.ac.sussex.gdsc.smlm.function.gaussian.Gaussian2DFunction"
] | import java.awt.Rectangle; import java.util.logging.Level; import uk.ac.sussex.gdsc.core.logging.LoggerUtils; import uk.ac.sussex.gdsc.smlm.fitting.FitResult; import uk.ac.sussex.gdsc.smlm.function.gaussian.Gaussian2DFunction; | import java.awt.*; import java.util.logging.*; import uk.ac.sussex.gdsc.core.logging.*; import uk.ac.sussex.gdsc.smlm.fitting.*; import uk.ac.sussex.gdsc.smlm.function.gaussian.*; | [
"java.awt",
"java.util",
"uk.ac.sussex"
] | java.awt; java.util; uk.ac.sussex; | 1,729,553 |
Collection<File> getFolders(); | Collection<File> getFolders(); | /**
* This method returns the {@link java.util.Collection} of Folders
*
* @return a list of contained Folders
*/ | This method returns the <code>java.util.Collection</code> of Folders | getFolders | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.classloading/src/com/ibm/wsspi/library/Library.java",
"license": "epl-1.0",
"size": 2207
} | [
"java.io.File",
"java.util.Collection"
] | import java.io.File; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,716,060 |
public Builder setDeviceLostModeDate(Date deviceLostModeDate) {
this.deviceLostModeDate = deviceLostModeDate;
return this;
} | Builder function(Date deviceLostModeDate) { this.deviceLostModeDate = deviceLostModeDate; return this; } | /**
* Date this device was reported lost or stolen. Don't send if you don't have it.
*
* @param deviceLostModeDate time in ISO 8601 format "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
* @return this
*/ | Date this device was reported lost or stolen. Don't send if you don't have it | setDeviceLostModeDate | {
"repo_name": "fitpay/fitpay-android-sdk",
"path": "fitpay/src/main/java/com/fitpay/android/webview/models/IdVerification.java",
"license": "mit",
"size": 16757
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 453,906 |
void enterModifier(@NotNull JavaParser.ModifierContext ctx);
void exitModifier(@NotNull JavaParser.ModifierContext ctx); | void enterModifier(@NotNull JavaParser.ModifierContext ctx); void exitModifier(@NotNull JavaParser.ModifierContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#modifier}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#modifier</code> | exitModifier | {
"repo_name": "zmughal/oop-analysis",
"path": "src/generated-sources/JavaListener.java",
"license": "apache-2.0",
"size": 38949
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 798,783 |
@NotNull
public static PsiClassType getJavaLangThrowable(@NotNull PsiManager manager, @NotNull GlobalSearchScope resolveScope) {
return getTypeByName(CommonClassNames.JAVA_LANG_THROWABLE, manager.getProject(), resolveScope);
} | static PsiClassType function(@NotNull PsiManager manager, @NotNull GlobalSearchScope resolveScope) { return getTypeByName(CommonClassNames.JAVA_LANG_THROWABLE, manager.getProject(), resolveScope); } | /**
* Returns the class type for the java.lang.Throwable class.
*
* @param manager the PSI manager used to create the class type.
* @param resolveScope the scope in which the class is searched.
* @return the class instance.
*/ | Returns the class type for the java.lang.Throwable class | getJavaLangThrowable | {
"repo_name": "michaelgallacher/intellij-community",
"path": "java/java-psi-api/src/com/intellij/psi/PsiType.java",
"license": "apache-2.0",
"size": 12834
} | [
"com.intellij.psi.search.GlobalSearchScope",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.psi.search.GlobalSearchScope; import org.jetbrains.annotations.NotNull; | import com.intellij.psi.search.*; import org.jetbrains.annotations.*; | [
"com.intellij.psi",
"org.jetbrains.annotations"
] | com.intellij.psi; org.jetbrains.annotations; | 45,435 |
public void setFqeService(final FqeService fqeService)
{
this.fqeService = fqeService;
} | void function(final FqeService fqeService) { this.fqeService = fqeService; } | /**
* Set a new value for the fqeService property.
*
* @param fqeService
* the fqeService to set
*/ | Set a new value for the fqeService property | setFqeService | {
"repo_name": "openfurther/further-open-core",
"path": "fqe/fqe-ws/src/main/java/edu/utah/further/fqe/ws/FqeServiceRestImpl.java",
"license": "apache-2.0",
"size": 28626
} | [
"edu.utah.further.fqe.api.service.route.FqeService"
] | import edu.utah.further.fqe.api.service.route.FqeService; | import edu.utah.further.fqe.api.service.route.*; | [
"edu.utah.further"
] | edu.utah.further; | 585,827 |
WaterDisconnectionResponseDTO getConnectionsAvailableForDisConnection(
WaterDeconnectionRequestDTO requestDTO);
| WaterDisconnectionResponseDTO getConnectionsAvailableForDisConnection( WaterDeconnectionRequestDTO requestDTO); | /**
* Gets the connection details.
*
* @param requestDTO the request dto
* @return the connection details
*/ | Gets the connection details | getConnectionsAvailableForDisConnection | {
"repo_name": "abmindiarepomanager/ABMOpenMainet",
"path": "Mainet1.1/MainetServiceParent/MainetServiceWater/src/main/java/com/abm/mainet/water/service/WaterDisconnectionService.java",
"license": "gpl-3.0",
"size": 2796
} | [
"com.abm.mainet.water.dto.WaterDeconnectionRequestDTO",
"com.abm.mainet.water.dto.WaterDisconnectionResponseDTO"
] | import com.abm.mainet.water.dto.WaterDeconnectionRequestDTO; import com.abm.mainet.water.dto.WaterDisconnectionResponseDTO; | import com.abm.mainet.water.dto.*; | [
"com.abm.mainet"
] | com.abm.mainet; | 2,780,522 |
@Override
public List<String> listHosts() {
try {
// TODO (dano): only return hosts whose agents completed registration (i.e. has id nodes)
return provider.get("listHosts").getChildren(Paths.configHosts());
} catch (KeeperException.NoNodeException e) {
return emptyList();
} catch (Keep... | List<String> function() { try { return provider.get(STR).getChildren(Paths.configHosts()); } catch (KeeperException.NoNodeException e) { return emptyList(); } catch (KeeperException e) { throw new HeliosRuntimeException(STR, e); } } | /**
* Returns a list of the hosts/agents that have been registered.
*/ | Returns a list of the hosts/agents that have been registered | listHosts | {
"repo_name": "molindo/helios",
"path": "helios-services/src/main/java/com/spotify/helios/master/ZooKeeperMasterModel.java",
"license": "apache-2.0",
"size": 67415
} | [
"com.spotify.helios.common.HeliosRuntimeException",
"com.spotify.helios.servicescommon.coordination.Paths",
"java.util.Collections",
"java.util.List",
"org.apache.zookeeper.KeeperException"
] | import com.spotify.helios.common.HeliosRuntimeException; import com.spotify.helios.servicescommon.coordination.Paths; import java.util.Collections; import java.util.List; import org.apache.zookeeper.KeeperException; | import com.spotify.helios.common.*; import com.spotify.helios.servicescommon.coordination.*; import java.util.*; import org.apache.zookeeper.*; | [
"com.spotify.helios",
"java.util",
"org.apache.zookeeper"
] | com.spotify.helios; java.util; org.apache.zookeeper; | 1,458,983 |
DependencyConstraint platform(Object notation, Action<? super DependencyConstraint> configureAction); | DependencyConstraint platform(Object notation, Action<? super DependencyConstraint> configureAction); | /**
* Declares a constraint on a platform. If the target coordinates represent multiple
* potential components, the platform component will be selected, instead of the library.
*
* @param notation the coordinates of the platform
* @param configureAction the dependency configuration block
*... | Declares a constraint on a platform. If the target coordinates represent multiple potential components, the platform component will be selected, instead of the library | platform | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/dsl/DependencyConstraintHandler.java",
"license": "apache-2.0",
"size": 4384
} | [
"org.gradle.api.Action",
"org.gradle.api.artifacts.DependencyConstraint"
] | import org.gradle.api.Action; import org.gradle.api.artifacts.DependencyConstraint; | import org.gradle.api.*; import org.gradle.api.artifacts.*; | [
"org.gradle.api"
] | org.gradle.api; | 2,407,569 |
@SmallTest
public void testDidDeferAfterResponseStartedCalled() throws Throwable {
ContentShellActivity activity = launchContentShellWithUrl(URL_1);
waitForActiveShellToBeDoneLoading();
ContentViewCore contentViewCore = activity.getActiveContentViewCore();
TestCallbackHelperConta... | void function() throws Throwable { ContentShellActivity activity = launchContentShellWithUrl(URL_1); waitForActiveShellToBeDoneLoading(); ContentViewCore contentViewCore = activity.getActiveContentViewCore(); TestCallbackHelperContainer testCallbackHelperContainer = new TestCallbackHelperContainer(contentViewCore); con... | /**
* Tests that the listener recieves DidDeferAfterResponseStarted if we specify that
* the transition is handled.
*/ | Tests that the listener recieves DidDeferAfterResponseStarted if we specify that the transition is handled | testDidDeferAfterResponseStartedCalled | {
"repo_name": "hgl888/chromium-crosswalk-efl",
"path": "content/public/android/javatests/src/org/chromium/content/browser/TransitionTest.java",
"license": "bsd-3-clause",
"size": 13207
} | [
"org.chromium.content.browser.test.util.TestCallbackHelperContainer",
"org.chromium.content_public.browser.LoadUrlParams",
"org.chromium.content_shell_apk.ContentShellActivity"
] | import org.chromium.content.browser.test.util.TestCallbackHelperContainer; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_shell_apk.ContentShellActivity; | import org.chromium.content.browser.test.util.*; import org.chromium.content_public.browser.*; import org.chromium.content_shell_apk.*; | [
"org.chromium.content",
"org.chromium.content_public",
"org.chromium.content_shell_apk"
] | org.chromium.content; org.chromium.content_public; org.chromium.content_shell_apk; | 676,803 |
// begin method onAccountCreated
private static void onAccountCreated( Account newAccount, Activity activity ) {
Log.d( LOG_TAG, "onAccountCreated() called with: newAccount = [" + newAccount + "], activity = [" + activity + "]" );
// 0. configure the periodic sync
// 1. enable the period... | static void function( Account newAccount, Activity activity ) { Log.d( LOG_TAG, STR + newAccount + STR + activity + "]" ); MoviesSyncAdapter.configurePeriodicSync( activity, SYNC_INTERVAL, SYNC_FLEXTIME ); ContentResolver.setSyncAutomatically( newAccount, activity.getString( R.string.movies_provider_content_authority )... | /**
* Handles some things that need to be done after an account has been created.
*
* More specifically, after an account is created,
* a periodic sync should be configured, enabled, and started.
*
* @param newAccount The newly-created {@link Account}.
* @param activity The {@link Act... | Handles some things that need to be done after an account has been created. More specifically, after an account is created, a periodic sync should be configured, enabled, and started | onAccountCreated | {
"repo_name": "joshua-kairu/popmov-stage-2",
"path": "app/src/main/java/com/joslittho/popmov/sync/MoviesSyncAdapter.java",
"license": "gpl-3.0",
"size": 32877
} | [
"android.accounts.Account",
"android.app.Activity",
"android.content.ContentResolver",
"android.util.Log"
] | import android.accounts.Account; import android.app.Activity; import android.content.ContentResolver; import android.util.Log; | import android.accounts.*; import android.app.*; import android.content.*; import android.util.*; | [
"android.accounts",
"android.app",
"android.content",
"android.util"
] | android.accounts; android.app; android.content; android.util; | 2,536,213 |
@javax.annotation.Nullable
@ApiModelProperty(
value =
"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/si... | @javax.annotation.Nullable @ApiModelProperty( value = "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https: String function() { return kind; } | /**
* Kind is a string value representing the REST resource this object represents. Servers may infer
* this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More
* info:
* https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*
... | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: HREF | getKind | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java",
"license": "apache-2.0",
"size": 5717
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,537,007 |
void sendGlobalEvent(String event, GeckoBundle data); | void sendGlobalEvent(String event, GeckoBundle data); | /**
* Sends an event to the global EventDispatcher instance.
*
* @param event The event type
* @param data Data associated with the event
*/ | Sends an event to the global EventDispatcher instance | sendGlobalEvent | {
"repo_name": "Yukarumya/Yukarum-Redfoxes",
"path": "mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Actions.java",
"license": "mpl-2.0",
"size": 5977
} | [
"org.mozilla.gecko.util.GeckoBundle"
] | import org.mozilla.gecko.util.GeckoBundle; | import org.mozilla.gecko.util.*; | [
"org.mozilla.gecko"
] | org.mozilla.gecko; | 649,555 |
public Date getUpdated() {
return _updated;
} | Date function() { return _updated; } | /**
* Returns the updated
* <p>
* @return Returns the updated.
* @since Atom 1.0
*/ | Returns the updated | getUpdated | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "georss/rome-0.9/src/java/com/sun/syndication/feed/atom/Feed.java",
"license": "gpl-2.0",
"size": 12470
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,251,950 |
CassandraDriverConnection getConnection() throws ResourceException; | CassandraDriverConnection getConnection() throws ResourceException; | /**
* Get connection from factory
*
* @return CassandraDriverConnection instance
* @exception ResourceException Thrown if a connection can't be obtained
*/ | Get connection from factory | getConnection | {
"repo_name": "jpkrohling/cassandra-driver-ra",
"path": "resource-adapter/src/main/java/org/jboss/cassandra/ra/CassandraDriverConnectionFactory.java",
"license": "apache-2.0",
"size": 1595
} | [
"javax.resource.ResourceException"
] | import javax.resource.ResourceException; | import javax.resource.*; | [
"javax.resource"
] | javax.resource; | 340,913 |
public void testSetSubjectPublicKeyAlgID() throws Exception {
String pkaid1 = "1.2.840.113549.1.1.1"; // RSA (source: http://asn1.elibel.tm.fr)
String pkaid2 = "1.2.840.10040.4.1"; // DSA (source: http://asn1.elibel.tm.fr)
PublicKey pkey1 = new TestKeyPair("RSA").getPublic();
Public... | void function() throws Exception { String pkaid1 = STR; String pkaid2 = STR; PublicKey pkey1 = new TestKeyPair("RSA").getPublic(); PublicKey pkey2 = new TestKeyPair("DSA").getPublic(); TestCert cert_1 = new TestCert(pkey1); TestCert cert_2 = new TestCert(pkey2); X509CertSelector selector = new X509CertSelector(); selec... | /**
* setSubjectPublicKeyAlgID(String oid) method testing.
* Tests if any certificates match in the case of null criteria,
* if [not]proper certificates [do not]match
*/ | setSubjectPublicKeyAlgID(String oid) method testing. Tests if any certificates match in the case of null criteria, if [not]proper certificates [do not]match | testSetSubjectPublicKeyAlgID | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/security/src/test/impl/java.injected/java/security/cert/X509CertSelectorTest.java",
"license": "apache-2.0",
"size": 133766
} | [
"java.security.PublicKey",
"org.apache.harmony.security.tests.support.TestKeyPair"
] | import java.security.PublicKey; import org.apache.harmony.security.tests.support.TestKeyPair; | import java.security.*; import org.apache.harmony.security.tests.support.*; | [
"java.security",
"org.apache.harmony"
] | java.security; org.apache.harmony; | 2,637,228 |
@JsonProperty("uri")
public void setUri(final String uri) {
this.uri = uri;
} | @JsonProperty("uri") void function(final String uri) { this.uri = uri; } | /**
* Linked spending information
* <p>
* A URI pointing directly to a machine-readable record about this spending transaction.
*
* @param uri
* The uri
*/ | Linked spending information A URI pointing directly to a machine-readable record about this spending transaction | setUri | {
"repo_name": "devgateway/ocvn",
"path": "persistence-mongodb/src/main/java/org/devgateway/ocds/persistence/mongo/Transaction.java",
"license": "mit",
"size": 8164
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,662,044 |
public void loadContent()
{
// HUD: create the text content of the hud
fontTimeHUD = graphicDevice.createSpriteFont(null, 14); // font size of the time texts: 14px;
fontStartHUD = graphicDevice.createSpriteFont(null, 28); // font size of the start texts: 24px:
fontAccident = g... | void function() { fontTimeHUD = graphicDevice.createSpriteFont(null, 14); fontStartHUD = graphicDevice.createSpriteFont(null, 28); fontAccident = graphicDevice.createSpriteFont(null, 24); fontCrashHUD = graphicDevice.createSpriteFont(null, 18); textTimeHUD = new TextBuffer[] { graphicDevice.createTextBuffer(fontTimeHUD... | /**
* This method loads the required content of all kinds of huds in the game.
*/ | This method loads the required content of all kinds of huds in the game | loadContent | {
"repo_name": "Anntex/aCARdeRUN",
"path": "aCARdeRun/src/de/hdm/mib/dg041/game/HUD.java",
"license": "apache-2.0",
"size": 15416
} | [
"de.hdm.mib.dg041.graphics.TextBuffer"
] | import de.hdm.mib.dg041.graphics.TextBuffer; | import de.hdm.mib.dg041.graphics.*; | [
"de.hdm.mib"
] | de.hdm.mib; | 119,089 |
Optional<Fluid> drain(boolean doDrain); | Optional<Fluid> drain(boolean doDrain); | /**
* Attempt to drain the block. This method should be called by devices such as pumps.
*
* NOTE: The block is intended to handle its own state changes.
*
* @param doDrain If false, the drain will only be simulated.
* @return
*/ | Attempt to drain the block. This method should be called by devices such as pumps | drain | {
"repo_name": "halvors/NOVA-Fluid",
"path": "src/main/java/nova/fluid/FluidBlock.java",
"license": "lgpl-3.0",
"size": 540
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,490,460 |
public ProcessTerminator getOCRTimeoutTerminator() {
return ocrTimedTerminator;
} | ProcessTerminator function() { return ocrTimedTerminator; } | /**
* Returns a ProcessTerminator for timing out the OCR process.
*
* @return ProcessTerminator instance.
*/ | Returns a ProcessTerminator for timing out the OCR process | getOCRTimeoutTerminator | {
"repo_name": "eugene7646/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/textextractors/configs/ImageConfig.java",
"license": "apache-2.0",
"size": 2587
} | [
"org.sleuthkit.autopsy.coreutils.ExecUtil"
] | import org.sleuthkit.autopsy.coreutils.ExecUtil; | import org.sleuthkit.autopsy.coreutils.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 449,687 |
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletResponse httpResponse = (HttpServletResponse) response;
// Retrieve "username" session a... | void function(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; HttpServletResponse httpResponse = (HttpServletResponse) response; final Object usernameAtt = httpRequest.getSession().getAttribute(USE... | /**
* Filter requested url bind on /auth/*...
*
* @param request
* servlet request
* @param response
* servlet response
* @throws ServletException
* if a servlet-specific error occurs
* @throws IOException
* if an I/O error occurs
* @see Filter#doFilt... | Filter requested url bind on /auth/*.. | doFilter | {
"repo_name": "MrLowkos/3JVA-SupCommerce-3-4",
"path": "src/com/supinfo/supcommerce/filter/AuthenticateFilter.java",
"license": "mit",
"size": 2212
} | [
"java.io.IOException",
"javax.servlet.FilterChain",
"javax.servlet.ServletException",
"javax.servlet.ServletRequest",
"javax.servlet.ServletResponse",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 916,531 |
EReference getModelTurbsimtbs_WrADFF(); | EReference getModelTurbsimtbs_WrADFF(); | /**
* Returns the meta object for the containment reference '{@link sc.ndt.editor.turbsimtbs.ModelTurbsimtbs#getWrADFF <em>Wr ADFF</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Wr ADFF</em>'.
* @see sc.ndt.editor.turbsimtbs.ModelTur... | Returns the meta object for the containment reference '<code>sc.ndt.editor.turbsimtbs.ModelTurbsimtbs#getWrADFF Wr ADFF</code>'. | getModelTurbsimtbs_WrADFF | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.editor.turbsim.tbs/src-gen/sc/ndt/editor/turbsimtbs/TurbsimtbsPackage.java",
"license": "gpl-3.0",
"size": 204585
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 786,061 |
public Vertex addVertex(final Object id) {
final Vertex vertex = this.baseGraph.addVertex(id);
if (vertex == null) {
return null;
} else {
this.onVertexAdded(vertex);
return new EventVertex(vertex, this);
}
} | Vertex function(final Object id) { final Vertex vertex = this.baseGraph.addVertex(id); if (vertex == null) { return null; } else { this.onVertexAdded(vertex); return new EventVertex(vertex, this); } } | /**
* Raises a vertexAdded event.
*/ | Raises a vertexAdded event | addVertex | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/externals/tinkerpop/src/main/java/com/tinkerpop/blueprints/util/wrappers/event/EventGraph.java",
"license": "apache-2.0",
"size": 7475
} | [
"com.tinkerpop.blueprints.Vertex"
] | import com.tinkerpop.blueprints.Vertex; | import com.tinkerpop.blueprints.*; | [
"com.tinkerpop.blueprints"
] | com.tinkerpop.blueprints; | 1,496,010 |
@Test
public void testMsSqlServer3() {
Assert.assertEquals("A500", this.getStringEncoder().encode("Ann"));
Assert.assertEquals("A536", this.getStringEncoder().encode("Andrew"));
Assert.assertEquals("J530", this.getStringEncoder().encode("Janet"));
Assert.assertEquals("M626",... | void function() { Assert.assertEquals("A500", this.getStringEncoder().encode("Ann")); Assert.assertEquals("A536", this.getStringEncoder().encode(STR)); Assert.assertEquals("J530", this.getStringEncoder().encode("Janet")); Assert.assertEquals("M626", this.getStringEncoder().encode(STR)); Assert.assertEquals("S315", this... | /**
* Examples for MS SQLServer from http://databases.about.com/library/weekly/aa042901a.htm
*/ | Examples for MS SQLServer from HREF | testMsSqlServer3 | {
"repo_name": "886rs/commons-codec-1.10-src",
"path": "src/test/java/org/apache/commons/codec/language/SoundexTest.java",
"license": "apache-2.0",
"size": 15372
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 105,496 |
public Iterable<Artifact> getAdditionalHdrs() {
return additionalHdrs;
} | Iterable<Artifact> function() { return additionalHdrs; } | /**
* Returns the public headers that aren't included in the hdrs attribute.
*/ | Returns the public headers that aren't included in the hdrs attribute | getAdditionalHdrs | {
"repo_name": "Digas29/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/CompilationArtifacts.java",
"license": "apache-2.0",
"size": 5574
} | [
"com.google.devtools.build.lib.actions.Artifact"
] | import com.google.devtools.build.lib.actions.Artifact; | import com.google.devtools.build.lib.actions.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,714,435 |
public static LazyBinaryPrimitive<?, ?> createLazyBinaryPrimitiveClass(
PrimitiveObjectInspector oi) {
PrimitiveCategory p = oi.getPrimitiveCategory();
switch (p) {
case BOOLEAN:
return new LazyBinaryBoolean((WritableBooleanObjectInspector) oi);
case BYTE:
return new LazyBinaryByte((... | static LazyBinaryPrimitive<?, ?> function( PrimitiveObjectInspector oi) { PrimitiveCategory p = oi.getPrimitiveCategory(); switch (p) { case BOOLEAN: return new LazyBinaryBoolean((WritableBooleanObjectInspector) oi); case BYTE: return new LazyBinaryByte((WritableByteObjectInspector) oi); case SHORT: return new LazyBina... | /**
* Create a lazy binary primitive class given the type name.
*/ | Create a lazy binary primitive class given the type name | createLazyBinaryPrimitiveClass | {
"repo_name": "winningsix/hive",
"path": "serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryFactory.java",
"license": "apache-2.0",
"size": 6213
} | [
"org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBooleanObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.primitive.... | import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBinaryObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.WritableBooleanObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector... | import org.apache.hadoop.hive.serde2.objectinspector.*; import org.apache.hadoop.hive.serde2.objectinspector.primitive.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,670,096 |
public Map<String, Cvss> cvss() {
return this.cvss;
} | Map<String, Cvss> function() { return this.cvss; } | /**
* Get the cvss property: Dictionary from cvss version to cvss details object.
*
* @return the cvss value.
*/ | Get the cvss property: Dictionary from cvss version to cvss details object | cvss | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/security/azure-resourcemanager-security/src/main/java/com/azure/resourcemanager/security/models/ServerVulnerabilityProperties.java",
"license": "mit",
"size": 4323
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 480,129 |
@SuppressWarnings("unchecked")
public List<PersonalFile> getRootFiles(Long userId) {
Query q = hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery("getRootFiles");
q.setParameter("userId", userId);
return q.list();
}
| @SuppressWarnings(STR) List<PersonalFile> function(Long userId) { Query q = hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery(STR); q.setParameter(STR, userId); return q.list(); } | /**
* Get the root files - at the user level
*
* @param userId - id of the user to get the root files for
*
* @return the found files at the root user level
*/ | Get the root files - at the user level | getRootFiles | {
"repo_name": "nate-rcl/irplus",
"path": "ir_hibernate/src/edu/ur/hibernate/ir/user/db/HbPersonalFileDAO.java",
"license": "apache-2.0",
"size": 7275
} | [
"edu.ur.ir.user.PersonalFile",
"java.util.List",
"org.hibernate.Query"
] | import edu.ur.ir.user.PersonalFile; import java.util.List; import org.hibernate.Query; | import edu.ur.ir.user.*; import java.util.*; import org.hibernate.*; | [
"edu.ur.ir",
"java.util",
"org.hibernate"
] | edu.ur.ir; java.util; org.hibernate; | 2,613,155 |
@Test
public void moveToWaitDescriptionStatReply() throws Exception {
moveToWaitConfigReply();
connection.clearMessages();
OFGetConfigReply cr = factory.buildGetConfigReply()
.setMissSendLen(0xFFFF)
.build();
switchHandler.processOFMessage(cr);
OFMessage msg = connection.retrieveMessage();
as... | void function() throws Exception { moveToWaitConfigReply(); connection.clearMessages(); OFGetConfigReply cr = factory.buildGetConfigReply() .setMissSendLen(0xFFFF) .build(); switchHandler.processOFMessage(cr); OFMessage msg = connection.retrieveMessage(); assertEquals(OFType.STATS_REQUEST, msg.getType()); OFStatsReques... | /** Move the channel from scratch to WAIT_DESCRIPTION_STAT_REPLY state
* Builds on moveToWaitConfigReply()
* adds testing for WAIT_CONFIG_REPLY state
*/ | Move the channel from scratch to WAIT_DESCRIPTION_STAT_REPLY state Builds on moveToWaitConfigReply() adds testing for WAIT_CONFIG_REPLY state | moveToWaitDescriptionStatReply | {
"repo_name": "rizard/floodlight",
"path": "src/test/java/net/floodlightcontroller/core/internal/OFSwitchHandlerTestBase.java",
"license": "apache-2.0",
"size": 43149
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.projectfloodlight.openflow.protocol.OFGetConfigReply",
"org.projectfloodlight.openflow.protocol.OFMessage",
"org.projectfloodlight.openflow.protocol.OFStatsRequest",
"org.projectfloodlight.openflow.protocol.OFStatsType",
"org.projectfloodlight.openfl... | import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.projectfloodlight.openflow.protocol.OFGetConfigReply; import org.projectfloodlight.openflow.protocol.OFMessage; import org.projectfloodlight.openflow.protocol.OFStatsRequest; import org.projectfloodlight.openflow.protocol.OFStatsType; import org.proj... | import org.hamcrest.*; import org.junit.*; import org.projectfloodlight.openflow.protocol.*; | [
"org.hamcrest",
"org.junit",
"org.projectfloodlight.openflow"
] | org.hamcrest; org.junit; org.projectfloodlight.openflow; | 1,993,824 |
public static SecretKey generateAesKey() {
try {
return generateKey(AES_CIPHER_ALGORITHM);
} catch (NoSuchAlgorithmException e) {
// Should NEVER happen
throw new IllegalStateException("JVM doesn't support " + AES_CIPHER_ALGORITHM, e);
}
} | static SecretKey function() { try { return generateKey(AES_CIPHER_ALGORITHM); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(STR + AES_CIPHER_ALGORITHM, e); } } | /**
* Generates a random AES encryption key.
*
* @return the generated key
*/ | Generates a random AES encryption key | generateAesKey | {
"repo_name": "dejan-brkic/commons",
"path": "utilities/src/main/java/org/craftercms/commons/crypto/CryptoUtils.java",
"license": "gpl-3.0",
"size": 4814
} | [
"java.security.NoSuchAlgorithmException",
"javax.crypto.SecretKey"
] | import java.security.NoSuchAlgorithmException; import javax.crypto.SecretKey; | import java.security.*; import javax.crypto.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 1,441,508 |
public CompiledModel compile(TextureManager textureManager, String assetsRoot) {
HashMap<String, TextureEntry> texturesImages = m_resolvedTextures;
if (texturesImages == null) {
HashMap<String, String> textures = getTextures();
texturesImages = TextureResolver.resolveTextur... | CompiledModel function(TextureManager textureManager, String assetsRoot) { HashMap<String, TextureEntry> texturesImages = m_resolvedTextures; if (texturesImages == null) { HashMap<String, String> textures = getTextures(); texturesImages = TextureResolver.resolveTextures(m_name, m_mod, assetsRoot, textureManager, textur... | /**
* Render the model
*
* @param textureManager
* @param assetsRoot
* @return
*/ | Render the model | compile | {
"repo_name": "Techcable/MCPainter",
"path": "scrap/assets/assets/AssetsModel.java",
"license": "mit",
"size": 7311
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 213,028 |
public static long getDefaultBlockSize(final FileSystem fs, final Path path) throws IOException {
Method m = null;
Class<? extends FileSystem> cls = fs.getClass();
try {
m = cls.getMethod("getDefaultBlockSize", new Class<?>[] { Path.class });
} catch (NoSuchMethodException e) {
LOG.info("F... | static long function(final FileSystem fs, final Path path) throws IOException { Method m = null; Class<? extends FileSystem> cls = fs.getClass(); try { m = cls.getMethod(STR, new Class<?>[] { Path.class }); } catch (NoSuchMethodException e) { LOG.info(STR); } catch (SecurityException e) { LOG.info(STR, e); m = null; } ... | /**
* Return the number of bytes that large input files should be optimally
* be split into to minimize i/o time.
*
* use reflection to search for getDefaultBlockSize(Path f)
* if the method doesn't exist, fall back to using getDefaultBlockSize()
*
* @param fs filesystem object
* @return the def... | Return the number of bytes that large input files should be optimally be split into to minimize i/o time. use reflection to search for getDefaultBlockSize(Path f) if the method doesn't exist, fall back to using getDefaultBlockSize() | getDefaultBlockSize | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java",
"license": "apache-2.0",
"size": 67483
} | [
"java.io.IOException",
"java.lang.reflect.Method",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.lang.reflect.Method; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import java.lang.reflect.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.lang",
"org.apache.hadoop"
] | java.io; java.lang; org.apache.hadoop; | 124,547 |
public static void performWorldGenSpawning(World worldIn, BiomeGenBase biomeIn, int p_77191_2_, int p_77191_3_, int p_77191_4_, int p_77191_5_, Random randomIn)
{
List<BiomeGenBase.SpawnListEntry> list = biomeIn.getSpawnableList(EnumCreatureType.CREATURE);
if (!list.isEmpty())
{
... | static void function(World worldIn, BiomeGenBase biomeIn, int p_77191_2_, int p_77191_3_, int p_77191_4_, int p_77191_5_, Random randomIn) { List<BiomeGenBase.SpawnListEntry> list = biomeIn.getSpawnableList(EnumCreatureType.CREATURE); if (!list.isEmpty()) { while (randomIn.nextFloat() < biomeIn.getSpawningChance()) { B... | /**
* Called during chunk generation to spawn initial creatures.
*
* @param biomeIn The biome to use for the weighted entity list
* @param randomIn The random to use for mob spawning
*/ | Called during chunk generation to spawn initial creatures | performWorldGenSpawning | {
"repo_name": "dogjaw2233/tiu-s-mod",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/SpawnerAnimals.java",
"license": "lgpl-2.1",
"size": 14374
} | [
"java.util.List",
"java.util.Random",
"net.minecraft.entity.EntityLiving",
"net.minecraft.entity.EnumCreatureType",
"net.minecraft.entity.IEntityLivingData",
"net.minecraft.util.BlockPos",
"net.minecraft.util.WeightedRandom",
"net.minecraft.world.biome.BiomeGenBase"
] | import java.util.List; import java.util.Random; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.IEntityLivingData; import net.minecraft.util.BlockPos; import net.minecraft.util.WeightedRandom; import net.minecraft.world.biome.BiomeGenBase; | import java.util.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.world.biome.*; | [
"java.util",
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 872,450 |
public final TextEdit getResultingEdit() {
return fEdit;
} | final TextEdit function() { return fEdit; } | /**
* Returns the resulting text edit.
*
* @return the resulting text edit
*/ | Returns the resulting text edit | getResultingEdit | {
"repo_name": "riuvshin/che-plugins",
"path": "plugin-java/che-plugin-java-ext-java/src/main/java/org/eclipse/che/ide/ext/java/jdt/internal/corext/codemanipulation/AddGetterSetterOperation.java",
"license": "epl-1.0",
"size": 19693
} | [
"org.eclipse.che.ide.ext.java.jdt.text.edits.TextEdit"
] | import org.eclipse.che.ide.ext.java.jdt.text.edits.TextEdit; | import org.eclipse.che.ide.ext.java.jdt.text.edits.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 420,449 |
@Test
public void testAngleToValue() {
StandardDialScale s = new StandardDialScale();
assertEquals(0.0, s.angleToValue(175.0), EPSILON);
assertEquals(50.0, s.angleToValue(90.0), EPSILON);
assertEquals(100.0, s.angleToValue(5.0), EPSILON);
assertEquals(-10.0, s.angleToValu... | void function() { StandardDialScale s = new StandardDialScale(); assertEquals(0.0, s.angleToValue(175.0), EPSILON); assertEquals(50.0, s.angleToValue(90.0), EPSILON); assertEquals(100.0, s.angleToValue(5.0), EPSILON); assertEquals(-10.0, s.angleToValue(192.0), EPSILON); assertEquals(110.0, s.angleToValue(-12.0), EPSILO... | /**
* Some checks for the angleToValue() method.
*/ | Some checks for the angleToValue() method | testAngleToValue | {
"repo_name": "aaronc/jfreechart",
"path": "tests/org/jfree/chart/plot/dial/StandardDialScaleTest.java",
"license": "lgpl-2.1",
"size": 9407
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 821,519 |
@Nullable
public PropertyEditor findEditor(Class<?> valueClass) {
return (this.bindingResult != null ? this.bindingResult.findEditor(this.expression, valueClass) : null);
} | PropertyEditor function(Class<?> valueClass) { return (this.bindingResult != null ? this.bindingResult.findEditor(this.expression, valueClass) : null); } | /**
* Find a PropertyEditor for the given value class, associated with
* the property that this bound status is currently bound to.
* @param valueClass the value class that an editor is needed for
* @return the associated PropertyEditor, or {@code null} if none
*/ | Find a PropertyEditor for the given value class, associated with the property that this bound status is currently bound to | findEditor | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-webmvc/src/main/java/org/springframework/web/servlet/support/BindStatus.java",
"license": "apache-2.0",
"size": 11232
} | [
"java.beans.PropertyEditor"
] | import java.beans.PropertyEditor; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,153,945 |
@Basic
@Column(name = "RANK", precision = 20)
public long getRank() {
return rank;
} | @Column(name = "RANK", precision = 20) long function() { return rank; } | /**
* Gets the value of the rank property.
*
*/ | Gets the value of the rank property | getRank | {
"repo_name": "Hack23/cia",
"path": "model.internal.application.user.impl/src/main/java/com/hack23/cia/model/internal/application/data/impl/ViewApplicationActionEventPageElementWeeklySummary.java",
"license": "apache-2.0",
"size": 6264
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,064,765 |
Set<K8sTunnelBridge> tunBridges(); | Set<K8sTunnelBridge> tunBridges(); | /**
* Returns the set of tunnel bridges belong to the host.
*
* @return a set of tunnel bridges
*/ | Returns the set of tunnel bridges belong to the host | tunBridges | {
"repo_name": "gkatsikas/onos",
"path": "apps/k8s-node/api/src/main/java/org/onosproject/k8snode/api/K8sHost.java",
"license": "apache-2.0",
"size": 3667
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 499,326 |
public static String getSpnegoKeytabKey(Configuration conf, String defaultKey) {
String value =
conf.get(DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY);
return (value == null || value.isEmpty()) ?
defaultKey : DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY;
} | static String function(Configuration conf, String defaultKey) { String value = conf.get(DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY); return (value == null value.isEmpty()) ? defaultKey : DFSConfigKeys.DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY; } | /**
* Get SPNEGO keytab Key from configuration
*
* @param conf Configuration
* @param defaultKey default key to be used for config lookup
* @return DFS_WEB_AUTHENTICATION_KERBEROS_KEYTAB_KEY if the key is not empty
* else return defaultKey
*/ | Get SPNEGO keytab Key from configuration | getSpnegoKeytabKey | {
"repo_name": "an3m0na/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 70338
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 927,471 |
public static boolean isEqualsMethod(@Nullable Method method) {
if (method == null) {
return false;
}
if (method.getParameterCount() != 1) {
return false;
}
if (!method.getName().equals("equals")) {
return false;
}
return method.getParameterTypes()[0] == Object.class;
} | static boolean function(@Nullable Method method) { if (method == null) { return false; } if (method.getParameterCount() != 1) { return false; } if (!method.getName().equals(STR)) { return false; } return method.getParameterTypes()[0] == Object.class; } | /**
* Determine whether the given method is an "equals" method.
* @see java.lang.Object#equals(Object)
*/ | Determine whether the given method is an "equals" method | isEqualsMethod | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-core/src/main/java/org/springframework/util/ReflectionUtils.java",
"license": "apache-2.0",
"size": 31556
} | [
"java.lang.reflect.Method",
"org.springframework.lang.Nullable"
] | import java.lang.reflect.Method; import org.springframework.lang.Nullable; | import java.lang.reflect.*; import org.springframework.lang.*; | [
"java.lang",
"org.springframework.lang"
] | java.lang; org.springframework.lang; | 2,872,649 |
public static void notifyDefineClass(RVMType type) {
// NOTE: will need synchronization if allowing unregistering
if (!defineClassEnabled) return;
defineClassEnabled = false;
if (TRACE_DEFINECLASS) {
//VM.sysWrite(getThread(), false);
//VM.sysWrite(": ");
VM.sysWrite("invoking define... | static void function(RVMType type) { if (!defineClassEnabled) return; defineClassEnabled = false; if (TRACE_DEFINECLASS) { VM.sysWrite(STR); VM.sysWrite(type.getDescriptor()); VM.sysWrite("\n"); } for (CallbackList l = defineClassCallbacks; l != null; l = l.next) { if (TRACE_DEFINECLASS) { VM.sysWrite(" "); VM.sysWrite... | /**
* Notify the monitor that java.lang.Class.defineclass was called.
* @param type the type that will be returned
*/ | Notify the monitor that java.lang.Class.defineclass was called | notifyDefineClass | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/Callbacks.java",
"license": "bsd-3-clause",
"size": 37714
} | [
"org.jikesrvm.classloader.RVMType"
] | import org.jikesrvm.classloader.RVMType; | import org.jikesrvm.classloader.*; | [
"org.jikesrvm.classloader"
] | org.jikesrvm.classloader; | 1,735,064 |
public TResult queryInForChunk(boolean distinct, String[] columns,
String nestedSQL, String[] nestedArgs,
Map<String, Object> fieldValues, String orderBy, int limit,
long offset) {
return queryInForChunk(distinct, columns, nestedSQL, nestedArgs,
fieldValues, null, null, orderBy, limit, offset);
} | TResult function(boolean distinct, String[] columns, String nestedSQL, String[] nestedArgs, Map<String, Object> fieldValues, String orderBy, int limit, long offset) { return queryInForChunk(distinct, columns, nestedSQL, nestedArgs, fieldValues, null, null, orderBy, limit, offset); } | /**
* Query for ordered rows by ids in the nested SQL query, starting at the
* offset and returning no more than the limit.
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param nestedSQL
* nested SQL
* @param nestedArgs
* nested SQL a... | Query for ordered rows by ids in the nested SQL query, starting at the offset and returning no more than the limit | queryInForChunk | {
"repo_name": "ngageoint/geopackage-core-java",
"path": "src/main/java/mil/nga/geopackage/user/UserCoreDao.java",
"license": "mit",
"size": 287160
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,794,782 |
@Override
public IngestModuleIngestJobSettings getSettings() {
return new SampleModuleIngestJobSettings(skipKnownFilesCheckBox.isSelected());
} | IngestModuleIngestJobSettings function() { return new SampleModuleIngestJobSettings(skipKnownFilesCheckBox.isSelected()); } | /**
* Gets the ingest job settings for an ingest module.
*
* @return The ingest settings.
*/ | Gets the ingest job settings for an ingest module | getSettings | {
"repo_name": "millmanorama/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/examples/SampleIngestModuleIngestJobSettingsPanel.java",
"license": "apache-2.0",
"size": 4273
} | [
"org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings"
] | import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; | import org.sleuthkit.autopsy.ingest.*; | [
"org.sleuthkit.autopsy"
] | org.sleuthkit.autopsy; | 2,883,399 |
public ServiceFuture<EventHubResourceInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, String eventHubName, EventHubCreateOrUpdateParametersInner parameters, final ServiceCallback<EventHubResourceInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateWithServiceRe... | ServiceFuture<EventHubResourceInner> function(String resourceGroupName, String namespaceName, String eventHubName, EventHubCreateOrUpdateParametersInner parameters, final ServiceCallback<EventHubResourceInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName,... | /**
* Creates or updates a new Event Hub as a nested resource within a Namespace.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param eventHubName The Event Hub name
* @param parameters Parameters supplie... | Creates or updates a new Event Hub as a nested resource within a Namespace | createOrUpdateAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-eventhub/src/main/java/com/microsoft/azure/management/eventhub/implementation/EventHubsInner.java",
"license": "mit",
"size": 94388
} | [
"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; | 452,860 |
public static DXWorkflow getInstanceWithEnvironment(String workflowId, DXEnvironment env) {
return new DXWorkflow(workflowId, Preconditions.checkNotNull(env, "env may not be null"));
} | static DXWorkflow function(String workflowId, DXEnvironment env) { return new DXWorkflow(workflowId, Preconditions.checkNotNull(env, STR)); } | /**
* Returns a {@code DXWorkflow} associated with an existing workflow using the specified
* environment.
*
* @throws NullPointerException If {@code workflowId} is null
*/ | Returns a DXWorkflow associated with an existing workflow using the specified environment | getInstanceWithEnvironment | {
"repo_name": "andyshinn/dx-toolkit",
"path": "src/java/src/main/java/com/dnanexus/DXWorkflow.java",
"license": "apache-2.0",
"size": 7841
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,391,375 |
public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_)
{
p_77644_1_.damageItem(1, p_77644_3_);
return true;
} | boolean function(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_) { p_77644_1_.damageItem(1, p_77644_3_); return true; } | /**
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
* the damage on the stack.
*/ | Current implementations of this method in child classes do not use the entry argument beside ev. They just raise the damage on the stack | hitEntity | {
"repo_name": "TheHecticByte/BananaJ1.7.10Beta",
"path": "src/net/minecraft/Server1_7_10/item/ItemSword.java",
"license": "gpl-3.0",
"size": 4287
} | [
"net.minecraft.Server1_7_10"
] | import net.minecraft.Server1_7_10; | import net.minecraft.*; | [
"net.minecraft"
] | net.minecraft; | 28,246 |
public static Stroke createStroke( Color color, double width ) {
return createStroke( color, width, "round", "square" );
}
| static Stroke function( Color color, double width ) { return createStroke( color, width, "round", STR ); } | /**
* create a stroke with the passed width and color
*
* @param color
* the color of the line
* @param width
* the width of the line
*
* @return the created stroke
*/ | create a stroke with the passed width and color | createStroke | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/graphics/sld/StyleFactory.java",
"license": "lgpl-2.1",
"size": 72348
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,016,126 |
@RequestProcessing(value = "/apis/metaweblog", method = HTTPRequestMethod.POST)
public void metaWeblog(final HttpServletRequest request, final HttpServletResponse response, final HTTPRequestContext context) {
final TextXMLRenderer renderer = new TextXMLRenderer();
context.setRenderer(renderer... | @RequestProcessing(value = STR, method = HTTPRequestMethod.POST) void function(final HttpServletRequest request, final HttpServletResponse response, final HTTPRequestContext context) { final TextXMLRenderer renderer = new TextXMLRenderer(); context.setRenderer(renderer); String responseContent = null; try { final Servl... | /**
* MetaWeblog requests processing.
*
* @param request the specified http servlet request
* @param response the specified http servlet response
* @param context the specified http request context
*/ | MetaWeblog requests processing | metaWeblog | {
"repo_name": "cgm1521/b3log-solo",
"path": "core/src/main/java/org/b3log/solo/api/metaweblog/MetaWeblogAPI.java",
"license": "apache-2.0",
"size": 27177
} | [
"java.util.logging.Level",
"javax.servlet.ServletInputStream",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.commons.io.IOUtils",
"org.b3log.latke.Keys",
"org.b3log.latke.model.User",
"org.b3log.latke.servlet.HTTPRequestContext",
"org.b3log.latke.serv... | import java.util.logging.Level; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; import org.b3log.latke.Keys; import org.b3log.latke.model.User; import org.b3log.latke.servlet.HTTPRequestContext; i... | import java.util.logging.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.io.*; import org.b3log.latke.*; import org.b3log.latke.model.*; import org.b3log.latke.servlet.*; import org.b3log.latke.servlet.annotation.*; import org.b3log.latke.servlet.renderer.*; import org.b3log.solo.model... | [
"java.util",
"javax.servlet",
"org.apache.commons",
"org.b3log.latke",
"org.b3log.solo",
"org.json"
] | java.util; javax.servlet; org.apache.commons; org.b3log.latke; org.b3log.solo; org.json; | 2,386,293 |
public static final <T> String coll2string(final Collection<T> coll) {
return coll2string(coll, coll.size());
}
/**
* Converts a string of elements separated by comma to {@code Collection} | static final <T> String function(final Collection<T> coll) { return coll2string(coll, coll.size()); } /** * Converts a string of elements separated by comma to {@code Collection} | /**
* Converts the {@code Collection} of objects to string, where each
* collection element is separated by comma.
*
* @param coll
* the collection of objects which need to be converted to
* string.
* @return the string representation of the collection.
*/ | Converts the Collection of objects to string, where each collection element is separated by comma | coll2string | {
"repo_name": "SHAF-WORK/shaf",
"path": "core/src/main/java/org/shaf/core/util/StringUtils.java",
"license": "apache-2.0",
"size": 6711
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,995,173 |
public T hl7(boolean validate) {
HL7DataFormat hl7 = new HL7DataFormat();
hl7.setValidate(validate);
return dataFormat(hl7);
} | T function(boolean validate) { HL7DataFormat hl7 = new HL7DataFormat(); hl7.setValidate(validate); return dataFormat(hl7); } | /**
* Uses the HL7 data format
*/ | Uses the HL7 data format | hl7 | {
"repo_name": "kingargyle/turmeric-bot",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 11182
} | [
"org.apache.camel.model.dataformat.HL7DataFormat"
] | import org.apache.camel.model.dataformat.HL7DataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,314,180 |
RelationalDatabaseFactory getRelationalDatabaseFactory();
interface Literals {
EClass NAMED_ELEMENT = eINSTANCE.getNamedElement();
EAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name();
EAttribute NAMED_ELEMENT__DOCUMENTATION = eINSTANCE.getNamedElement_Documentation();
EClass ... | RelationalDatabaseFactory getRelationalDatabaseFactory(); interface Literals { EClass NAMED_ELEMENT = eINSTANCE.getNamedElement(); EAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name(); EAttribute NAMED_ELEMENT__DOCUMENTATION = eINSTANCE.getNamedElement_Documentation(); EClass DATABASE_MODEL = eINSTANCE.get... | /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getRelationalDatabaseFactory | {
"repo_name": "cadorca/rdb-designer",
"path": "com.dbdesigner.design/src/com/dbdesigner/model/relationaldatabase/RelationalDatabasePackage.java",
"license": "mit",
"size": 40573
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,208,887 |
private void build_districts()
{
images_district.clear();
Card c;
JLabel card;
String card_info;
List<PlayCard> dist = model.get_game().get_districts();
for(int i = 0; i < dist.size() ; i++)
{
c = dist.get(i);
... | void function() { images_district.clear(); Card c; JLabel card; String card_info; List<PlayCard> dist = model.get_game().get_districts(); for(int i = 0; i < dist.size() ; i++) { c = dist.get(i); ImageIcon image = new ImageIcon(cards.get_image_rotated(c.get_name()).getScaledInstance(table_cards_rotated_X, table_cards_ro... | /**
* Builds the hashmap with the image of the district and the index.
*/ | Builds the hashmap with the image of the district and the index | build_districts | {
"repo_name": "Tenza/Decktet-Magnate",
"path": "Decktet - Magnate/src/magnate/ui/graphics/Table.java",
"license": "gpl-3.0",
"size": 29302
} | [
"java.awt.Image",
"java.util.List",
"javax.swing.ImageIcon",
"javax.swing.JLabel"
] | import java.awt.Image; import java.util.List; import javax.swing.ImageIcon; import javax.swing.JLabel; | import java.awt.*; import java.util.*; import javax.swing.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 1,509,232 |
public void testDifferentModulesWithTheSamePath_Loop() throws Exception
{
final Module module1 = module("foo");
final Module module2 = module("bar");
final Module module3 = module("bar");
final Module module4 = module("bar");
final Module module5 = module("flux");
... | void function() throws Exception { final Module module1 = module("foo"); final Module module2 = module("bar"); final Module module3 = module("bar"); final Module module4 = module("bar"); final Module module5 = module("flux"); module3.setDependencies(new Module[]{module1, module2}); module2.setDependencies(new Module[]{... | /**
* <p>Test description: though discouraged using different instances of Module with the same path is allowed.
* SerialDependencyResolver must treat them as different modules.</p>
*/ | Test description: though discouraged using different instances of Module with the same path is allowed. SerialDependencyResolver must treat them as different modules | testDifferentModulesWithTheSamePath_Loop | {
"repo_name": "dzidzitop/ant_modular",
"path": "test/java/afc/ant/modular/ParallelDependencyResolver_SerialUse_ValidUseCasesTest.java",
"license": "bsd-2-clause",
"size": 30892
} | [
"java.util.Arrays",
"java.util.regex.Pattern"
] | import java.util.Arrays; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 1,028,272 |
BigInteger getBigInteger (String name);
| BigInteger getBigInteger (String name); | /**
* Returns the named value as a BigInteger.
*
* @param name the validation name
* @return the BigInteger value or null
*/ | Returns the named value as a BigInteger | getBigInteger | {
"repo_name": "leohinterlang/valFace",
"path": "src/main/java/com/fidelis/valface/ValFace.java",
"license": "apache-2.0",
"size": 1779
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 593,078 |
public SyncBeanDef<Activity> getActivity( final String id ) {
return activitiesById.get( id );
} | SyncBeanDef<Activity> function( final String id ) { return activitiesById.get( id ); } | /**
* Returns the activity with the given CDI bean name from this cache, or null if there is no such activity or the
* activity with the given name is not an activated bean.
*
* @param id
* the CDI name of the bean (see {@link Named}), or in the case of runtime plugins, the name the ... | Returns the activity with the given CDI bean name from this cache, or null if there is no such activity or the activity with the given name is not an activated bean | getActivity | {
"repo_name": "kiereleaseuser/uberfire",
"path": "uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/ActivityBeansCache.java",
"license": "apache-2.0",
"size": 10082
} | [
"org.jboss.errai.ioc.client.container.SyncBeanDef"
] | import org.jboss.errai.ioc.client.container.SyncBeanDef; | import org.jboss.errai.ioc.client.container.*; | [
"org.jboss.errai"
] | org.jboss.errai; | 753,926 |
public void setMethodInvocationExceptionTranslator(final InvocationExceptionTranslator invocationExceptionTranslator)
{
this.invocationExceptionTranslator = invocationExceptionTranslator;
}
| void function(final InvocationExceptionTranslator invocationExceptionTranslator) { this.invocationExceptionTranslator = invocationExceptionTranslator; } | /**
* Sets the exception translator that should be used to translate exceptions that occur duing method invocations.
*
* @param invocationExceptionTranslator the exception translator.
*
* @since 2.1
*/ | Sets the exception translator that should be used to translate exceptions that occur duing method invocations | setMethodInvocationExceptionTranslator | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/tcp/messaging/rpc/RpcHandler.java",
"license": "apache-2.0",
"size": 23520
} | [
"com.teletalk.jserver.util.exception.InvocationExceptionTranslator"
] | import com.teletalk.jserver.util.exception.InvocationExceptionTranslator; | import com.teletalk.jserver.util.exception.*; | [
"com.teletalk.jserver"
] | com.teletalk.jserver; | 1,133,249 |
public boolean createUser(String username, String email) {
ArrayList<String> users = null;
Deserializer deserializer = new Deserializer();
ElasticsearchController.GetUserByNameTask getUserByNameTask = new ElasticsearchController.GetUserByNameTask();
getUserByNameTask.execute(username... | boolean function(String username, String email) { ArrayList<String> users = null; Deserializer deserializer = new Deserializer(); ElasticsearchController.GetUserByNameTask getUserByNameTask = new ElasticsearchController.GetUserByNameTask(); getUserByNameTask.execute(username); try { users = getUserByNameTask.get(); } c... | /**
* Attempts to create a <code>User</code> with the supplied username and email
*
* @param username the username of the user
* @param email the email of the user
* @return true if created, or false if username already in use
* @see User
*/ | Attempts to create a <code>User</code> with the supplied username and email | createUser | {
"repo_name": "CMPUT301W16T08/scaling-pancake",
"path": "app/src/main/java/cmput301w16t08/scaling_pancake/controllers/Controller.java",
"license": "apache-2.0",
"size": 40858
} | [
"java.util.ArrayList",
"java.util.concurrent.ExecutionException"
] | import java.util.ArrayList; import java.util.concurrent.ExecutionException; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,999,493 |
public final Property<FxIndexRates> fxIndexRates() {
return metaBean().fxIndexRates().createProperty(this);
} | final Property<FxIndexRates> function() { return metaBean().fxIndexRates().createProperty(this); } | /**
* Gets the the {@code fxIndexRates} property.
* @return the property, not null
*/ | Gets the the fxIndexRates property | fxIndexRates | {
"repo_name": "nssales/Strata",
"path": "modules/pricer/src/test/java/com/opengamma/strata/pricer/rate/SimpleRatesProvider.java",
"license": "apache-2.0",
"size": 21778
} | [
"com.opengamma.strata.market.value.FxIndexRates",
"org.joda.beans.Property"
] | import com.opengamma.strata.market.value.FxIndexRates; import org.joda.beans.Property; | import com.opengamma.strata.market.value.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 706,938 |
public static <K, V> Multimap<K, V> prune(Multimap<K, V> map,
Predicate<? super Collection<V>> filterRule) {
Preconditions.checkNotNull(map);
Preconditions.checkNotNull(filterRule);
Multimap<K, V> pruned = ArrayListMultimap.create();
Iterator<Map.Entry<K, Collection<V>>> asMapItr = map.asMap().e... | static <K, V> Multimap<K, V> function(Multimap<K, V> map, Predicate<? super Collection<V>> filterRule) { Preconditions.checkNotNull(map); Preconditions.checkNotNull(filterRule); Multimap<K, V> pruned = ArrayListMultimap.create(); Iterator<Map.Entry<K, Collection<V>>> asMapItr = map.asMap().entrySet().iterator(); while ... | /**
* Prunes a multimap based on a predicate, returning the pruned values. The input map will be
* modified.
*
* @param map The multimap to prune.
* @param filterRule The pruning rule. When the predicate returns {@code false} for an entry, it
* will be pruned, otherwise it will be retained.
* ... | Prunes a multimap based on a predicate, returning the pruned values. The input map will be modified | prune | {
"repo_name": "Yasumoto/commons",
"path": "src/java/com/twitter/common/collections/Multimaps.java",
"license": "apache-2.0",
"size": 5150
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Predicate",
"com.google.common.collect.ArrayListMultimap",
"com.google.common.collect.Multimap",
"java.util.Collection",
"java.util.Iterator",
"java.util.Map"
] | import com.google.common.base.Preconditions; import com.google.common.base.Predicate; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; import java.util.Collection; import java.util.Iterator; import java.util.Map; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,110,126 |
public TableGenerator<T> valueColumnName(String valueColumnName)
{
childNode.attribute("value-column-name", valueColumnName);
return this;
} | TableGenerator<T> function(String valueColumnName) { childNode.attribute(STR, valueColumnName); return this; } | /**
* Sets the <code>value-column-name</code> attribute
* @param valueColumnName the value for the attribute <code>value-column-name</code>
* @return the current instance of <code>TableGenerator<T></code>
*/ | Sets the <code>value-column-name</code> attribute | valueColumnName | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/orm21/TableGeneratorImpl.java",
"license": "epl-1.0",
"size": 18732
} | [
"org.jboss.shrinkwrap.descriptor.api.orm21.TableGenerator"
] | import org.jboss.shrinkwrap.descriptor.api.orm21.TableGenerator; | import org.jboss.shrinkwrap.descriptor.api.orm21.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,425,450 |
public AzureFirewallNetworkRule withProtocols(List<AzureFirewallNetworkRuleProtocol> protocols) {
this.protocols = protocols;
return this;
} | AzureFirewallNetworkRule function(List<AzureFirewallNetworkRuleProtocol> protocols) { this.protocols = protocols; return this; } | /**
* Set array of AzureFirewallNetworkRuleProtocols.
*
* @param protocols the protocols value to set
* @return the AzureFirewallNetworkRule object itself.
*/ | Set array of AzureFirewallNetworkRuleProtocols | withProtocols | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AzureFirewallNetworkRule.java",
"license": "mit",
"size": 4494
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 300,476 |
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {
new MBeanNotificationInfo(
new String[] { AttributeChangeNotification.ATTRIBUTE_CHANGE },
AttributeChangeNotification.class.getName(),
"This notification is emitted whe... | MBeanNotificationInfo[] function() { return new MBeanNotificationInfo[] { new MBeanNotificationInfo( new String[] { AttributeChangeNotification.ATTRIBUTE_CHANGE }, AttributeChangeNotification.class.getName(), STR) }; } private String state = STR; private int nbChanges = 0; private int nbResets = 0; | /**
* Returns an array indicating, for each notification this MBean
* may send, the name of the Java class of the notification and
* the notification type.</p>
*
* @return the array of possible notifications.
*/ | Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type | getNotificationInfo | {
"repo_name": "linewx/Derecho",
"path": "jmx/src/main/java/com/cloudrain/dercho/jmx/Basic/SimpleStandard.java",
"license": "apache-2.0",
"size": 6300
} | [
"javax.management.AttributeChangeNotification",
"javax.management.MBeanNotificationInfo"
] | import javax.management.AttributeChangeNotification; import javax.management.MBeanNotificationInfo; | import javax.management.*; | [
"javax.management"
] | javax.management; | 729,656 |
public PointF mapImageToView(PointF imagePoint) {
float[] points = mTempValues;
points[0] = imagePoint.x;
points[1] = imagePoint.y;
mapRelativeToAbsolute(points, points, 1);
mActiveTransform.mapPoints(points, 0, points, 0, 1);
return new PointF(points[0], points[1]);
... | PointF function(PointF imagePoint) { float[] points = mTempValues; points[0] = imagePoint.x; points[1] = imagePoint.y; mapRelativeToAbsolute(points, points, 1); mActiveTransform.mapPoints(points, 0, points, 0, 1); return new PointF(points[0], points[1]); } | /**
* Maps point from image-relative to view-absolute coordinates. This takes into account the
* zoomable transformation.
*/ | Maps point from image-relative to view-absolute coordinates. This takes into account the zoomable transformation | mapImageToView | {
"repo_name": "commons-app/apps-android-commons",
"path": "app/src/main/java/fr/free/nrw/commons/media/zoomControllers/zoomable/DefaultZoomableController.java",
"license": "apache-2.0",
"size": 23912
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 137,474 |
public final String getMixOutputFolder() {
if (this.getSpec() != null) {
if (this.getSpec().has(VerifierFields.VotePackingVerifierSpec.MIX_OUTPUT)) {
try {
return this.getSpec().getString(VerifierFields.VotePackingVerifierSpec.MIX_OUTPUT);
} catch (JSONException e) {
logger.error("There was a... | final String function() { if (this.getSpec() != null) { if (this.getSpec().has(VerifierFields.VotePackingVerifierSpec.MIX_OUTPUT)) { try { return this.getSpec().getString(VerifierFields.VotePackingVerifierSpec.MIX_OUTPUT); } catch (JSONException e) { logger.error(STR); } } } return null; } | /**
* Getter for the location of the vote packing mix output folder
*
* @return spec.getString(MIX_OUTPUT)
*/ | Getter for the location of the vote packing mix output folder | getMixOutputFolder | {
"repo_name": "jerumble/vVoteVerifier",
"path": "src/com/vvote/verifier/component/votePacking/VotePackingVerifierSpec.java",
"license": "gpl-3.0",
"size": 4577
} | [
"com.vvote.thirdparty.json.orgjson.JSONException",
"com.vvote.verifier.fields.VerifierFields"
] | import com.vvote.thirdparty.json.orgjson.JSONException; import com.vvote.verifier.fields.VerifierFields; | import com.vvote.thirdparty.json.orgjson.*; import com.vvote.verifier.fields.*; | [
"com.vvote.thirdparty",
"com.vvote.verifier"
] | com.vvote.thirdparty; com.vvote.verifier; | 1,447,190 |
@WebMethod
@Path("/checkForUserInAuthzGroup")
@Produces("text/plain")
@GET
public boolean checkForUserInAuthzGroup(
@WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
@WebParam(name = "authzgroupid", partName = "authzgroupid") @Qu... | @Path(STR) @Produces(STR) boolean function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String authzgroupid, @WebParam(name = "eid", partName = "eid") @QueryParam("eid") String eid) { Session s = establishSession(sessionid); if (ADMIN_S... | /**
* Check if a user is in a particular authzgroup
*
* @param sessionid the id of a valid session, generally the admin user
* @param authzgroupid the id of the authzgroup or site you want to check (if site: /site/SITEID)
* @param eid the userid of the person you want to check
... | Check if a user is in a particular authzgroup | checkForUserInAuthzGroup | {
"repo_name": "rodriguezdevera/sakai",
"path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java",
"license": "apache-2.0",
"size": 213282
} | [
"java.util.Iterator",
"javax.jws.WebParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"org.sakaiproject.authz.api.AuthzGroup",
"org.sakaiproject.tool.api.Session",
"org.sakaiproject.user.api.User"
] | import java.util.Iterator; import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.tool.api.Session; import org.sakaiproject.user.api.User; | import java.util.*; import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.user.api.*; | [
"java.util",
"javax.jws",
"javax.ws",
"org.sakaiproject.authz",
"org.sakaiproject.tool",
"org.sakaiproject.user"
] | java.util; javax.jws; javax.ws; org.sakaiproject.authz; org.sakaiproject.tool; org.sakaiproject.user; | 2,016,063 |
@Override
@Generated(value = "com.sun.tools.xjc.Driver", date = "2014-09-19T03:09:21-06:00", comment = "JAXB RI v2.2.6")
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE);
} | @Generated(value = STR, date = STR, comment = STR) String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "angecab10/travelport-uapi-tutorial",
"path": "src/com/travelport/schema/common_v28_0/IndustryStandardSSR.java",
"license": "gpl-3.0",
"size": 3166
} | [
"javax.annotation.Generated",
"org.apache.commons.lang.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import javax.annotation.Generated; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import javax.annotation.*; import org.apache.commons.lang.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"javax.annotation",
"org.apache.commons",
"org.apache.cxf"
] | javax.annotation; org.apache.commons; org.apache.cxf; | 1,665,577 |
public void setOrganization(String organization) {
if ((this.organization == null)) {
if ((organization == null)) {
return;
}
this.organization = new Name();
}
this.organization.setValue(organization);
}
| void function(String organization) { if ((this.organization == null)) { if ((organization == null)) { return; } this.organization = new Name(); } this.organization.setValue(organization); } | /**
* Missing description at method setOrganization.
*
* @param organization the String.
*/ | Missing description at method setOrganization | setOrganization | {
"repo_name": "NABUCCO/org.nabucco.business.provision",
"path": "org.nabucco.business.provision.facade.datatype/src/main/gen/org/nabucco/business/provision/facade/datatype/WorkExperience.java",
"license": "epl-1.0",
"size": 25378
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,271,265 |
public void descheduleFile(File file) {
fileTaskCollector.removeFile(file);
}
| void function(File file) { fileTaskCollector.removeFile(file); } | /**
* Removes a {@link File} instance previously scheduled with the
* {@link Scheduler#scheduleFile(File)} method.
*
* @param file
* The {@link File} instance.
*/ | Removes a <code>File</code> instance previously scheduled with the <code>Scheduler#scheduleFile(File)</code> method | descheduleFile | {
"repo_name": "ieure/cron4j",
"path": "src/main/java/it/sauronsoftware/cron4j/Scheduler.java",
"license": "lgpl-2.1",
"size": 22883
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,010,823 |
public ServiceFuture<PolicyDefinitionInner> getBuiltInAsync(String policyDefinitionName, final ServiceCallback<PolicyDefinitionInner> serviceCallback) {
return ServiceFuture.fromResponse(getBuiltInWithServiceResponseAsync(policyDefinitionName), serviceCallback);
} | ServiceFuture<PolicyDefinitionInner> function(String policyDefinitionName, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getBuiltInWithServiceResponseAsync(policyDefinitionName), serviceCallback); } | /**
* Retrieves a built-in policy definition.
* This operation retrieves the built-in policy definition with the given name.
*
* @param policyDefinitionName The name of the built-in policy definition to get.
* @param serviceCallback the async ServiceCallback to handle successful and failed resp... | Retrieves a built-in policy definition. This operation retrieves the built-in policy definition with the given name | getBuiltInAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/policy/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/policy/v2019_09_01/implementation/PolicyDefinitionsInner.java",
"license": "mit",
"size": 83227
} | [
"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; | 2,194,857 |
private boolean filter(IonType ion, IonModification mod) {
IonModification add = ion.getAdduct();
// specific filters
boolean bad = (add.contains(IonModification.NH4) && mod.contains(IonModification.NH3));
return !bad;
} | boolean function(IonType ion, IonModification mod) { IonModification add = ion.getAdduct(); boolean bad = (add.contains(IonModification.NH4) && mod.contains(IonModification.NH3)); return !bad; } | /**
* Only true if no filter is negative. Filter out -NH3+NH4
*
* @param ion
* @param mod
* @return
*/ | Only true if no filter is negative. Filter out -NH3+NH4 | filter | {
"repo_name": "mzmine/mzmine3",
"path": "src/main/java/io/github/mzmine/modules/dataprocessing/id_ion_identity_networking/ionidnetworking/IonNetworkLibrary.java",
"license": "gpl-2.0",
"size": 13871
} | [
"io.github.mzmine.datamodel.identities.iontype.IonModification",
"io.github.mzmine.datamodel.identities.iontype.IonType"
] | import io.github.mzmine.datamodel.identities.iontype.IonModification; import io.github.mzmine.datamodel.identities.iontype.IonType; | import io.github.mzmine.datamodel.identities.iontype.*; | [
"io.github.mzmine"
] | io.github.mzmine; | 1,721,941 |
public void ignorableWhitespace(char ch[], int start, int len) throws SAXException {
super.contentHandler.ignorableWhitespace(ch, start, len);
this.serializer.ignorableWhitespace(ch, start, len);
} | void function(char ch[], int start, int len) throws SAXException { super.contentHandler.ignorableWhitespace(ch, start, len); this.serializer.ignorableWhitespace(ch, start, len); } | /**
* Receive notification of ignorable whitespace in element content.
*/ | Receive notification of ignorable whitespace in element content | ignorableWhitespace | {
"repo_name": "apache/cocoon",
"path": "core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/transformation/TeeTransformer.java",
"license": "apache-2.0",
"size": 11647
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 632,261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.