method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void testChangeInstanceId() throws Exception {
Connection con = getConnection().getConnection();
PublicationPK pk = new PublicationPK("100", "kmelia200");
PublicationDetail detail = PublicationDAO.loadRow(con, pk);
assertEquals(pk, detail.getPK());
assertEquals("Homer Simpson", detail.getAu... | void function() throws Exception { Connection con = getConnection().getConnection(); PublicationPK pk = new PublicationPK("100", STR); PublicationDetail detail = PublicationDAO.loadRow(con, pk); assertEquals(pk, detail.getPK()); assertEquals(STR, detail.getAuthor()); assertEquals(STR, DateUtil.formatDate(detail.getBegi... | /**
* Test of changeInstanceId method, of class PublicationDAO.
*/ | Test of changeInstanceId method, of class PublicationDAO | testChangeInstanceId | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "ejb-core/publication/src/test/java/com/stratelia/webactiv/util/publication/ejb/PublicationDAOTest.java",
"license": "agpl-3.0",
"size": 46290
} | [
"com.silverpeas.jcrutil.RandomGenerator",
"com.stratelia.webactiv.util.DateUtil",
"com.stratelia.webactiv.util.publication.model.PublicationDetail",
"com.stratelia.webactiv.util.publication.model.PublicationPK",
"java.sql.Connection"
] | import com.silverpeas.jcrutil.RandomGenerator; import com.stratelia.webactiv.util.DateUtil; import com.stratelia.webactiv.util.publication.model.PublicationDetail; import com.stratelia.webactiv.util.publication.model.PublicationPK; import java.sql.Connection; | import com.silverpeas.jcrutil.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.publication.model.*; import java.sql.*; | [
"com.silverpeas.jcrutil",
"com.stratelia.webactiv",
"java.sql"
] | com.silverpeas.jcrutil; com.stratelia.webactiv; java.sql; | 313,373 |
public static BigDecimal add(final BigDecimal start, final BigDecimal... values) {
BigDecimal total = start != null ? start : BigDecimal.ZERO;
if (values != null) {
for (final BigDecimal v : values) {
total = doAdd(total, v);
}
}
return ... | static BigDecimal function(final BigDecimal start, final BigDecimal... values) { BigDecimal total = start != null ? start : BigDecimal.ZERO; if (values != null) { for (final BigDecimal v : values) { total = doAdd(total, v); } } return total; } | /**
* Add n BigDecimal safely (i.e. handles nulls)
*/ | Add n BigDecimal safely (i.e. handles nulls) | add | {
"repo_name": "mattxia/unique-web",
"path": "src/main/java/org/unique/plugin/image/util/BigDecimalUtil.java",
"license": "apache-2.0",
"size": 23659
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,980,989 |
public void setStroke(Stroke stroke) {
Args.nullNotPermitted(stroke, "stroke");
this.stroke = stroke;
notifyListeners(new MarkerChangeEvent(this));
}
| void function(Stroke stroke) { Args.nullNotPermitted(stroke, STR); this.stroke = stroke; notifyListeners(new MarkerChangeEvent(this)); } | /**
* Sets the stroke and sends a {@link MarkerChangeEvent} to all registered
* listeners.
*
* @param stroke the stroke ({@code null}not permitted).
*
* @see #getStroke()
*/ | Sets the stroke and sends a <code>MarkerChangeEvent</code> to all registered listeners | setStroke | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/plot/Marker.java",
"license": "lgpl-2.1",
"size": 20289
} | [
"java.awt.Stroke",
"org.jfree.chart.event.MarkerChangeEvent",
"org.jfree.chart.internal.Args"
] | import java.awt.Stroke; import org.jfree.chart.event.MarkerChangeEvent; import org.jfree.chart.internal.Args; | import java.awt.*; import org.jfree.chart.event.*; import org.jfree.chart.internal.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 473,784 |
@IgniteSpiConfiguration(optional = true)
public TcpDiscoverySpi setForceServerMode(boolean forceSrvMode) {
this.forceSrvMode = forceSrvMode;
return this;
} | @IgniteSpiConfiguration(optional = true) TcpDiscoverySpi function(boolean forceSrvMode) { this.forceSrvMode = forceSrvMode; return this; } | /**
* Sets force server mode flag.
* <p>
* If {@code true} TcpDiscoverySpi is started in server mode regardless
* of {@link IgniteConfiguration#isClientMode()}.
*
* @param forceSrvMode forceServerMode flag.
* @return {@code this} for chaining.
*/ | Sets force server mode flag. If true TcpDiscoverySpi is started in server mode regardless of <code>IgniteConfiguration#isClientMode()</code> | setForceServerMode | {
"repo_name": "vadopolski/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java",
"license": "apache-2.0",
"size": 76666
} | [
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import org.apache.ignite.spi.IgniteSpiConfiguration; | import org.apache.ignite.spi.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,260,276 |
double getF10B(AbsoluteDate date); | double getF10B(AbsoluteDate date); | /** Get the value of the mean solar flux.
* Averaged 81-day centered F10.7 B index on the input time.
* @param date the current date
* @return the mean solar flux F10.7B index
*/ | Get the value of the mean solar flux. Averaged 81-day centered F10.7 B index on the input time | getF10B | {
"repo_name": "haisamido/SFDaaS",
"path": "src/org/orekit/forces/drag/JB2006InputParameters.java",
"license": "lgpl-3.0",
"size": 2948
} | [
"org.orekit.time.AbsoluteDate"
] | import org.orekit.time.AbsoluteDate; | import org.orekit.time.*; | [
"org.orekit.time"
] | org.orekit.time; | 606,297 |
// max retries default changed to 2 in v2.0. switching back to infinite retries by default for back compat.
RetryPolicy failSafePolicy = new RetryPolicy().withMaxRetries(-1);
switch (policy.getBackoffType()) {
case NONE:
break;
case FIXED:
failSafePolicy.withDelay(policy.getSleepTi... | RetryPolicy failSafePolicy = new RetryPolicy().withMaxRetries(-1); switch (policy.getBackoffType()) { case NONE: break; case FIXED: failSafePolicy.withDelay(policy.getSleepTime()); break; case RANDOM: failSafePolicy.withDelay(policy.getRandomMin().toMillis(), policy.getRandomMax().toMillis(), ChronoUnit.MILLIS); break;... | /**
* Convert the {@link TableRetryPolicy} to failsafe {@link RetryPolicy}.
* @return this policy instance
*/ | Convert the <code>TableRetryPolicy</code> to failsafe <code>RetryPolicy</code> | valueOf | {
"repo_name": "prateekm/samza",
"path": "samza-core/src/main/java/org/apache/samza/table/retry/FailsafeAdapter.java",
"license": "apache-2.0",
"size": 3830
} | [
"java.time.temporal.ChronoUnit",
"net.jodah.failsafe.RetryPolicy",
"org.apache.samza.SamzaException"
] | import java.time.temporal.ChronoUnit; import net.jodah.failsafe.RetryPolicy; import org.apache.samza.SamzaException; | import java.time.temporal.*; import net.jodah.failsafe.*; import org.apache.samza.*; | [
"java.time",
"net.jodah.failsafe",
"org.apache.samza"
] | java.time; net.jodah.failsafe; org.apache.samza; | 2,753,890 |
void cleanup() throws IOException {
serverSocket.close();
try {
downlink.close();
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
} | void cleanup() throws IOException { serverSocket.close(); try { downlink.close(); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } } | /**
* Clean up the child procress and socket.
*
* @throws IOException
*/ | Clean up the child procress and socket | cleanup | {
"repo_name": "dongpf/hadoop-0.19.1",
"path": "src/mapred/org/apache/hadoop/mapred/pipes/Application.java",
"license": "apache-2.0",
"size": 6974
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,056,859 |
public void addNewFontWizard() {
AddResourceDialog addResource = new AddResourceDialog(loadedResources, AddResourceDialog.FONT);
if(JOptionPane.OK_OPTION ==
JOptionPane.showConfirmDialog(mainPanel, addResource, "Add Font", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE... | void function() { AddResourceDialog addResource = new AddResourceDialog(loadedResources, AddResourceDialog.FONT); if(JOptionPane.OK_OPTION == JOptionPane.showConfirmDialog(mainPanel, addResource, STR, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE)) { if(addResource.checkName(loadedResources)) { JOptionPane.sh... | /**
* Invoked by the "..." button in the add theme entry dialog, allows us to add
* a font on the fly while working on a theme
*/ | Invoked by the "..." button in the add theme entry dialog, allows us to add a font on the fly while working on a theme | addNewFontWizard | {
"repo_name": "Pmovil/CodenameOne",
"path": "CodenameOneDesigner/src/com/codename1/designer/ResourceEditorView.java",
"license": "gpl-2.0",
"size": 234023
} | [
"com.codename1.ui.EditorFont",
"com.codename1.ui.Font",
"java.awt.RenderingHints",
"javax.swing.JOptionPane"
] | import com.codename1.ui.EditorFont; import com.codename1.ui.Font; import java.awt.RenderingHints; import javax.swing.JOptionPane; | import com.codename1.ui.*; import java.awt.*; import javax.swing.*; | [
"com.codename1.ui",
"java.awt",
"javax.swing"
] | com.codename1.ui; java.awt; javax.swing; | 2,415,195 |
//----------------------------------------------------------------------
public List<TopicDTO> findByForum(Integer forumId, String ifModifiedSince, Integer offset, Integer limit) throws SQLException {
List<TopicDTO> topics = new ArrayList<TopicDTO>();
TopicDTO topic = null;
try {
// The basic SELECT is... | List<TopicDTO> function(Integer forumId, String ifModifiedSince, Integer offset, Integer limit) throws SQLException { List<TopicDTO> topics = new ArrayList<TopicDTO>(); TopicDTO topic = null; try { String sql = SQL_SELECT_LIST; if (offset != null) sql += SQL_ORDER_BY_ROWNUM; if (ifModifiedSince != null) sql += STR; els... | /**
* List topics by forum
* @param ifModifiedSince
* @param forumId
* @param offset
* @param limit
* @return the bean found or null if not found
*/ | List topics by forum | findByForum | {
"repo_name": "vasttrafik/wso2-community-api",
"path": "java/src/main/java/org/vasttrafik/wso2/carbon/community/api/dao/impl/jdbc/TopicDAOImpl.java",
"license": "mit",
"size": 22307
} | [
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List",
"org.vasttrafik.wso2.carbon.community.api.model.TopicDTO"
] | import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.vasttrafik.wso2.carbon.community.api.model.TopicDTO; | import java.sql.*; import java.util.*; import org.vasttrafik.wso2.carbon.community.api.model.*; | [
"java.sql",
"java.util",
"org.vasttrafik.wso2"
] | java.sql; java.util; org.vasttrafik.wso2; | 1,877,766 |
private synchronized void makeRulesChallengeRequest() {
if (rulesChallenge != null) {
return;
}
byte[] initial = new byte[] { (byte) 0xFF, (byte) 0xFF, (byte) 0xFF,
(byte) 0xFF };
ByteBuffer recvData = makeRequest('V', 'A', initial);
rulesChallenge = recvData.array();
} | synchronized void function() { if (rulesChallenge != null) { return; } byte[] initial = new byte[] { (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF }; ByteBuffer recvData = makeRequest('V', 'A', initial); rulesChallenge = recvData.array(); } | /**
* Makes a player challenge request.
*/ | Makes a player challenge request | makeRulesChallengeRequest | {
"repo_name": "SiphonSquirrel/jepperscore",
"path": "scrapers/scraper-common/src/main/java/jepperscore/scraper/common/query/sourceengine/SourceEngineQueryClient.java",
"license": "apache-2.0",
"size": 9044
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,872,697 |
public void apply(GroovyClassLoader loader,
GroovyCompilerConfiguration configuration, GeneratorContext generatorContext,
SourceUnit source, ClassNode classNode) throws CompilationFailedException {
} | void function(GroovyClassLoader loader, GroovyCompilerConfiguration configuration, GeneratorContext generatorContext, SourceUnit source, ClassNode classNode) throws CompilationFailedException { } | /**
* Apply any additional configuration.
*/ | Apply any additional configuration | apply | {
"repo_name": "10045125/spring-boot",
"path": "spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/CompilerAutoConfiguration.java",
"license": "apache-2.0",
"size": 2996
} | [
"groovy.lang.GroovyClassLoader",
"org.codehaus.groovy.ast.ClassNode",
"org.codehaus.groovy.classgen.GeneratorContext",
"org.codehaus.groovy.control.CompilationFailedException",
"org.codehaus.groovy.control.SourceUnit"
] | import groovy.lang.GroovyClassLoader; import org.codehaus.groovy.ast.ClassNode; import org.codehaus.groovy.classgen.GeneratorContext; import org.codehaus.groovy.control.CompilationFailedException; import org.codehaus.groovy.control.SourceUnit; | import groovy.lang.*; import org.codehaus.groovy.ast.*; import org.codehaus.groovy.classgen.*; import org.codehaus.groovy.control.*; | [
"groovy.lang",
"org.codehaus.groovy"
] | groovy.lang; org.codehaus.groovy; | 174,565 |
protected void drawAllPicture(final Graphics2D g2BoxPicture,
final TileManager pictureCache, final MessageConf conf) {
// Draw picture
for (ImagesConf ic : conf.getImages()) {
drawOneTile(pictureCache, ic.getTileset(), ic.getTile(), ic.getX(),
ic.getY... | void function(final Graphics2D g2BoxPicture, final TileManager pictureCache, final MessageConf conf) { for (ImagesConf ic : conf.getImages()) { drawOneTile(pictureCache, ic.getTileset(), ic.getTile(), ic.getX(), ic.getY(), g2BoxPicture); } } | /**
* Draw all picture in configuration.
*
* @param g2BoxPicture Graphic 2D
* @param pictureCache picture cache
* @param conf current config
*/ | Draw all picture in configuration | drawAllPicture | {
"repo_name": "bubulemaster/openjill",
"path": "openjill-core/src/main/java/org/jill/game/gui/AbstractMessageBox.java",
"license": "mpl-2.0",
"size": 2641
} | [
"java.awt.Graphics2D",
"org.jill.game.gui.conf.MessageConf",
"org.jill.game.screen.conf.ImagesConf",
"org.jill.openjill.core.api.manager.TileManager"
] | import java.awt.Graphics2D; import org.jill.game.gui.conf.MessageConf; import org.jill.game.screen.conf.ImagesConf; import org.jill.openjill.core.api.manager.TileManager; | import java.awt.*; import org.jill.game.gui.conf.*; import org.jill.game.screen.conf.*; import org.jill.openjill.core.api.manager.*; | [
"java.awt",
"org.jill.game",
"org.jill.openjill"
] | java.awt; org.jill.game; org.jill.openjill; | 2,140,887 |
public void removeProperty(final long id)
{
for (final Iterator i = preprops.iterator(); i.hasNext();)
if (((Property) i.next()).getID() == id)
{
i.remove();
break;
}
dirty = true;
} | void function(final long id) { for (final Iterator i = preprops.iterator(); i.hasNext();) if (((Property) i.next()).getID() == id) { i.remove(); break; } dirty = true; } | /**
* <p>Removes a property.</p>
*
* @param id The ID of the property to be removed
*/ | Removes a property | removeProperty | {
"repo_name": "ximenesuk/bioformats",
"path": "components/forks/poi/src/loci/poi/hpsf/MutableSection.java",
"license": "gpl-2.0",
"size": 23408
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,457,480 |
public String getMessage(String topic) {
ZooKeeperNode zookeeper = cluster.getZooKeeper();
Properties props = new Properties();
props.put("zk.connect", String.format("%s:%d", zookeeper.getAttribute(Attributes.HOSTNAME), zookeeper.getZookeeperPort()));
props.put("zk.connectiontimeout.... | String function(String topic) { ZooKeeperNode zookeeper = cluster.getZooKeeper(); Properties props = new Properties(); props.put(STR, String.format("%s:%d", zookeeper.getAttribute(Attributes.HOSTNAME), zookeeper.getZookeeperPort())); props.put(STR, STR); props.put(STR, STR); ConsumerConfig consumerConfig = new Consumer... | /**
* Retrieve the next message on the given topic from the {@link KafkaCluster}.
*/ | Retrieve the next message on the given topic from the <code>KafkaCluster</code> | getMessage | {
"repo_name": "rhodgin/brooklyn",
"path": "software/messaging/src/test/java/brooklyn/entity/messaging/kafka/KafkaSupport.java",
"license": "apache-2.0",
"size": 3425
} | [
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.Iterables",
"java.nio.ByteBuffer",
"java.util.List",
"java.util.Properties",
"org.testng.Assert"
] | import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import java.nio.ByteBuffer; import java.util.List; import java.util.Properties; import org.testng.Assert; | import com.google.common.collect.*; import java.nio.*; import java.util.*; import org.testng.*; | [
"com.google.common",
"java.nio",
"java.util",
"org.testng"
] | com.google.common; java.nio; java.util; org.testng; | 2,255,940 |
public int prepare(Xid xid) throws XAException { // public interface for prepare
// just call prepareX with the recursion flag set to true
exceptionsOnXA = null;
if (conn_.agent_.loggingEnabled()) {
conn_.agent_.logWriter_.traceEntry(this, "prepare", xid);
}
if (... | int function(Xid xid) throws XAException { exceptionsOnXA = null; if (conn_.agent_.loggingEnabled()) { conn_.agent_.logWriter_.traceEntry(this, STR, xid); } if (conn_.isPhysicalConnClosed()) { connectionClosedFailure(); } NetAgent netAgent = conn_.netAgent_; int rc = XAResource.XA_OK; NetXACallInfo callInfo = callInfoA... | /**
* Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
*
* @param xid A global transaction identifier
*
* @return A value indicating the resource manager's vote on the outcome of the transaction. The possible values
* are: XA_RDONLY ... | Ask the resource manager to prepare for a transaction commit of the transaction specified in xid | prepare | {
"repo_name": "splicemachine/spliceengine",
"path": "db-client/src/main/java/com/splicemachine/db/client/net/NetXAResource.java",
"license": "agpl-3.0",
"size": 40296
} | [
"com.splicemachine.db.client.am.SqlException",
"javax.transaction.xa.XAException",
"javax.transaction.xa.XAResource",
"javax.transaction.xa.Xid"
] | import com.splicemachine.db.client.am.SqlException; import javax.transaction.xa.XAException; import javax.transaction.xa.XAResource; import javax.transaction.xa.Xid; | import com.splicemachine.db.client.am.*; import javax.transaction.xa.*; | [
"com.splicemachine.db",
"javax.transaction"
] | com.splicemachine.db; javax.transaction; | 1,785,319 |
public List<HospitalBean> getAssignedHospitals(String midString) throws iTrustException {
try {
long mid = Long.valueOf(midString);
return personnelDAO.getHospitals(mid);
} catch (NumberFormatException e) {
throw new iTrustException("HCP's MID not a number");
}
} | List<HospitalBean> function(String midString) throws iTrustException { try { long mid = Long.valueOf(midString); return personnelDAO.getHospitals(mid); } catch (NumberFormatException e) { throw new iTrustException(STR); } } | /**
* Returns a list of hospitals to which the given mid is currently assigned
*
* @param midString
* @return list of HosptialBeans
* @throws iTrustException
*/ | Returns a list of hospitals to which the given mid is currently assigned | getAssignedHospitals | {
"repo_name": "ModelWriter/Demonstrations",
"path": "eu.modelwriter.datasets.traceability/CoEST Datasets/iTrust-NASA (!)/itrust_v10_code/iTrust/src/edu/ncsu/csc/itrust/action/ManageHospitalAssignmentsAction.java",
"license": "epl-1.0",
"size": 5275
} | [
"edu.ncsu.csc.itrust.beans.HospitalBean",
"edu.ncsu.csc.itrust.exception.iTrustException",
"java.util.List"
] | import edu.ncsu.csc.itrust.beans.HospitalBean; import edu.ncsu.csc.itrust.exception.iTrustException; import java.util.List; | import edu.ncsu.csc.itrust.beans.*; import edu.ncsu.csc.itrust.exception.*; import java.util.*; | [
"edu.ncsu.csc",
"java.util"
] | edu.ncsu.csc; java.util; | 1,822,243 |
public static void i(String tag, String msg) {
if (sIsLogEnabled) {
Log.i(tag, getContent(getCurrentStackTraceElement()) + ">" + msg);
}
} | static void function(String tag, String msg) { if (sIsLogEnabled) { Log.i(tag, getContent(getCurrentStackTraceElement()) + ">" + msg); } } | /**
* Send an INFO log message.
*
* @param tag
* @param msg
*/ | Send an INFO log message | i | {
"repo_name": "shuhonglin/LostAndFound",
"path": "ultimaterecyclerview/src/main/java/com/marshalchen/ultimaterecyclerview/URLogs.java",
"license": "apache-2.0",
"size": 7011
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,891,651 |
@Test
public void intValues() {
for (Direction dir : Direction.values()) {
Direction dir2 = Direction.fromInt(dir.intValue());
Assert.assertSame(dir2, dir);
}
} | void function() { for (Direction dir : Direction.values()) { Direction dir2 = Direction.fromInt(dir.intValue()); Assert.assertSame(dir2, dir); } } | /**
* Each direction constant has an associated integer. Check that those integers are unique and the mapping
* is symmetrical.
*/ | Each direction constant has an associated integer. Check that those integers are unique and the mapping is symmetrical | intValues | {
"repo_name": "anonl/nvlist",
"path": "api/src/test/java/nl/weeaboo/vn/core/DirectionTest.java",
"license": "apache-2.0",
"size": 2869
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 960,492 |
@org.junit.Test
public void testCloseFrameWithoutReasonBody() throws Exception {
final int code = 1000;
final AtomicReference<CloseReason> reason = new AtomicReference<>();
ByteBuffer payload = ByteBuffer.allocate(2);
payload.putShort((short) code);
payload.flip();
... | @org.junit.Test void function() throws Exception { final int code = 1000; final AtomicReference<CloseReason> reason = new AtomicReference<>(); ByteBuffer payload = ByteBuffer.allocate(2); payload.putShort((short) code); payload.flip(); final AtomicBoolean connected = new AtomicBoolean(false); final FutureResult latch =... | /**
* Section 5.5.1 of RFC 6455 says the reason body is optional
*/ | Section 5.5.1 of RFC 6455 says the reason body is optional | testCloseFrameWithoutReasonBody | {
"repo_name": "rogerchina/undertow",
"path": "websockets-jsr/src/test/java/io/undertow/websockets/jsr/test/JsrWebSocketServer07Test.java",
"license": "apache-2.0",
"size": 34995
} | [
"java.nio.ByteBuffer",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.atomic.AtomicBoolean",
"java.util.concurrent.atomic.AtomicInteger",
"java.util.concurrent.atomic.AtomicReference",
"javax.websocket.CloseReason",
"org.junit.Test",
"org.xnio.FutureResult"
] | import java.nio.ByteBuffer; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import javax.websocket.CloseReason; import org.junit.Test; import org.xnio.FutureResult; | import java.nio.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import javax.websocket.*; import org.junit.*; import org.xnio.*; | [
"java.nio",
"java.util",
"javax.websocket",
"org.junit",
"org.xnio"
] | java.nio; java.util; javax.websocket; org.junit; org.xnio; | 1,723,684 |
@Nullable
public static String expandSystemProperties (@Nullable final String sValue)
{
return expandProperties (sValue, SystemProperties::getPropertyValue);
} | static String function (@Nullable final String sValue) { return expandProperties (sValue, SystemProperties::getPropertyValue); } | /**
* Copy of Oracle internal PropertyExpander.expand method
*
* @param sValue
* Source value. May be <code>null</code>.
* @return <code>null</code> if source is <code>null</code>.
* @see #expandProperties(String, Function)
*/ | Copy of Oracle internal PropertyExpander.expand method | expandSystemProperties | {
"repo_name": "phax/ph-commons",
"path": "ph-commons/src/main/java/com/helger/commons/lang/PropertiesHelper.java",
"license": "apache-2.0",
"size": 7792
} | [
"com.helger.commons.system.SystemProperties",
"javax.annotation.Nullable"
] | import com.helger.commons.system.SystemProperties; import javax.annotation.Nullable; | import com.helger.commons.system.*; import javax.annotation.*; | [
"com.helger.commons",
"javax.annotation"
] | com.helger.commons; javax.annotation; | 112,758 |
JList list = new JList(model);
list.setMaximumSize(new Dimension(width, 20));
list.setPreferredSize(new Dimension(width, 20));
list.setMinimumSize(new Dimension(width, 20));
return list;
}
| JList list = new JList(model); list.setMaximumSize(new Dimension(width, 20)); list.setPreferredSize(new Dimension(width, 20)); list.setMinimumSize(new Dimension(width, 20)); return list; } | /**
* crea un jList con el modelo <code>model</code> y
* ancho <code>width</code>
* @param model
* @param width
* @return
*/ | crea un jList con el modelo <code>model</code> y ancho <code>width</code> | getJList | {
"repo_name": "iriber/miGestionSwing",
"path": "src/main/java/com/migestion/swing/factories/JListFactory.java",
"license": "gpl-2.0",
"size": 1163
} | [
"java.awt.Dimension",
"javax.swing.JList"
] | import java.awt.Dimension; import javax.swing.JList; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,500,070 |
Request getActiveFor(Holding holding); | Request getActiveFor(Holding holding); | /**
* Returns the active request with which this holding is associated.
*
* @param holding The Holding to get the active reservation of.
* @return The active request, or null if no active request exists.
*/ | Returns the active request with which this holding is associated | getActiveFor | {
"repo_name": "IISH/delivery",
"path": "src/main/java/org/socialhistoryservices/delivery/request/service/RequestService.java",
"license": "gpl-3.0",
"size": 606
} | [
"org.socialhistoryservices.delivery.record.entity.Holding",
"org.socialhistoryservices.delivery.request.entity.Request"
] | import org.socialhistoryservices.delivery.record.entity.Holding; import org.socialhistoryservices.delivery.request.entity.Request; | import org.socialhistoryservices.delivery.record.entity.*; import org.socialhistoryservices.delivery.request.entity.*; | [
"org.socialhistoryservices.delivery"
] | org.socialhistoryservices.delivery; | 2,743,807 |
public Observable<ServiceResponse<Page<VirtualNetworkTapInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<VirtualNetworkTapInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all the VirtualNetworkTaps in a subscription.
*
ServiceResponse<PageImpl<VirtualNetworkTapInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList... | Gets all the VirtualNetworkTaps in a subscription | listByResourceGroupNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/VirtualNetworkTapsInner.java",
"license": "mit",
"size": 64262
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 983,029 |
protected int execute(String... args) {
return execute(new ArrayList<>(asList(args)));
} | int function(String... args) { return execute(new ArrayList<>(asList(args))); } | /**
* Before command executed {@link #testOut} reset.
*
* @param args Arguments.
* @return Result of execution.
*/ | Before command executed <code>#testOut</code> reset | execute | {
"repo_name": "nizhikov/ignite",
"path": "modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java",
"license": "apache-2.0",
"size": 14912
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,648,919 |
public void setTime( String timestamp, boolean inMilliseconds ) {
Calendar calendar = Calendar.getInstance();
// parse the date
if (inMilliseconds) {
try {
calendar.setTimeInMillis(Long.parseLong(timestamp));
} catch (NumberFormatException e) {
... | void function( String timestamp, boolean inMilliseconds ) { Calendar calendar = Calendar.getInstance(); if (inMilliseconds) { try { calendar.setTimeInMillis(Long.parseLong(timestamp)); } catch (NumberFormatException e) { throw new SystemOperationException(STR + timestamp + STR); } } else { SimpleDateFormat dateFormat =... | /**
* Set the system time
*
* @param timestamp the timestamp
* @param inMilliseconds whether the timestamp is in milliseconds or a formatted date string
*/ | Set the system time | setTime | {
"repo_name": "Axway/ats-framework",
"path": "corelibrary/src/main/java/com/axway/ats/core/system/LocalSystemOperations.java",
"license": "apache-2.0",
"size": 22874
} | [
"com.axway.ats.common.system.OperatingSystemType",
"com.axway.ats.common.system.SystemOperationException",
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Date"
] | import com.axway.ats.common.system.OperatingSystemType; import com.axway.ats.common.system.SystemOperationException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; | import com.axway.ats.common.system.*; import java.text.*; import java.util.*; | [
"com.axway.ats",
"java.text",
"java.util"
] | com.axway.ats; java.text; java.util; | 620,228 |
void removeItem(String name) throws RepositoryException; | void removeItem(String name) throws RepositoryException; | /**
* Removes an item from a document.
*
* @param name the item name
* @throws RepositoryException
*/ | Removes an item from a document | removeItem | {
"repo_name": "googlegsa/notes.v3",
"path": "projects/notes-core/source/java/com/google/enterprise/connector/notes/client/NotesDocument.java",
"license": "apache-2.0",
"size": 6531
} | [
"com.google.enterprise.connector.spi.RepositoryException"
] | import com.google.enterprise.connector.spi.RepositoryException; | import com.google.enterprise.connector.spi.*; | [
"com.google.enterprise"
] | com.google.enterprise; | 2,673,460 |
public static String toName(CommandSender sender) {
return ChatColor.stripColor(toColoredName(sender, null));
} | static String function(CommandSender sender) { return ChatColor.stripColor(toColoredName(sender, null)); } | /**
* Gets the name of a command sender. This may be a display name.
*
* @param sender
* @return
*/ | Gets the name of a command sender. This may be a display name | toName | {
"repo_name": "elBukkit/commandbook",
"path": "src/main/java/com/sk89q/commandbook/util/ChatUtil.java",
"license": "lgpl-3.0",
"size": 7099
} | [
"org.bukkit.ChatColor",
"org.bukkit.command.CommandSender"
] | import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; | import org.bukkit.*; import org.bukkit.command.*; | [
"org.bukkit",
"org.bukkit.command"
] | org.bukkit; org.bukkit.command; | 1,507,244 |
public AsyncResult<Void> setTags(@Nonnull String addressId, @Nonnull Tag... tags) throws CloudException,
InternalException; | AsyncResult<Void> function(@Nonnull String addressId, @Nonnull Tag... tags) throws CloudException, InternalException; | /**
* Set meta-data for a IP address. Remove any tags that were not provided by
* the incoming tags, and add or overwrite any new or pre-existing tags.
*
* @param addressId
* the IP address to update
* @param tags
* the meta-data tags to set
* @throws CloudException
* @throws Int... | Set meta-data for a IP address. Remove any tags that were not provided by the incoming tags, and add or overwrite any new or pre-existing tags | setTags | {
"repo_name": "infinitiessoft/skyport-api",
"path": "src/main/java/com/infinities/skyport/async/service/network/AsyncIpAddressSupport.java",
"license": "apache-2.0",
"size": 24718
} | [
"com.infinities.skyport.async.AsyncResult",
"javax.annotation.Nonnull",
"org.dasein.cloud.CloudException",
"org.dasein.cloud.InternalException",
"org.dasein.cloud.Tag"
] | import com.infinities.skyport.async.AsyncResult; import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException; import org.dasein.cloud.Tag; | import com.infinities.skyport.async.*; import javax.annotation.*; import org.dasein.cloud.*; | [
"com.infinities.skyport",
"javax.annotation",
"org.dasein.cloud"
] | com.infinities.skyport; javax.annotation; org.dasein.cloud; | 1,847,237 |
public Vector2 stageToScreenCoordinates (Vector2 stageCoords) {
viewport.project(stageCoords);
stageCoords.y = viewport.getScreenHeight() - stageCoords.y;
return stageCoords;
} | Vector2 function (Vector2 stageCoords) { viewport.project(stageCoords); stageCoords.y = viewport.getScreenHeight() - stageCoords.y; return stageCoords; } | /** Transforms the stage coordinates to screen coordinates.
* @param stageCoords Input stage coordinates and output for resulting screen coordinates. */ | Transforms the stage coordinates to screen coordinates | stageToScreenCoordinates | {
"repo_name": "czyzby/libgdx",
"path": "gdx/src/com/badlogic/gdx/scenes/scene2d/Stage.java",
"license": "apache-2.0",
"size": 32028
} | [
"com.badlogic.gdx.math.Vector2"
] | import com.badlogic.gdx.math.Vector2; | import com.badlogic.gdx.math.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,220,573 |
double[] value(double x) throws MathUserException; | double[] value(double x) throws MathUserException; | /**
* Compute the value for the function.
* @param x the point for which the function value should be computed
* @return the value
* @throws MathUserException if the function evaluation fails
*/ | Compute the value for the function | value | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_50v2/src/main/java/org/apache/commons/math/analysis/UnivariateVectorialFunction.java",
"license": "gpl-2.0",
"size": 1341
} | [
"org.apache.commons.math.exception.MathUserException"
] | import org.apache.commons.math.exception.MathUserException; | import org.apache.commons.math.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,431,121 |
protected Document createDOMDocumentForTestCase() {
String coreClassName = makeJavaClassName(axisService.getName());
Document doc = getEmptyDocument();
Element rootElement = doc.createElement("class");
addAttribute(doc, "package", codeGenConfiguration.getPackageName(), rootElement);... | Document function() { String coreClassName = makeJavaClassName(axisService.getName()); Document doc = getEmptyDocument(); Element rootElement = doc.createElement("class"); addAttribute(doc, STR, codeGenConfiguration.getPackageName(), rootElement); if (this.axisService.getEndpoints().size() > 1) { addAttribute(doc, "nam... | /**
* Creates the XML Model for the test case
*
* @return DOM document
*/ | Creates the XML Model for the test case | createDOMDocumentForTestCase | {
"repo_name": "arunasujith/wso2-axis2",
"path": "modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java",
"license": "apache-2.0",
"size": 144631
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,329,183 |
public java.lang.Class getJavaClass(
) {
return org.ralasafe.db.sql.xml.ExpressionGroup.class;
} | java.lang.Class function( ) { return org.ralasafe.db.sql.xml.ExpressionGroup.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "colddew/ralasafe",
"path": "ralasafe-engine/src/main/java/org/ralasafe/db/sql/xml/descriptors/ExpressionGroupDescriptor.java",
"license": "mit",
"size": 3654
} | [
"org.ralasafe.db.sql.xml.ExpressionGroup"
] | import org.ralasafe.db.sql.xml.ExpressionGroup; | import org.ralasafe.db.sql.xml.*; | [
"org.ralasafe.db"
] | org.ralasafe.db; | 1,603,726 |
public static void logSelectionEstablished() {
RecordUserAction.record("ContextualSearch.SelectionEstablished");
} | static void function() { RecordUserAction.record(STR); } | /**
* Logs that the user established a new selection when Contextual Search is active.
*/ | Logs that the user established a new selection when Contextual Search is active | logSelectionEstablished | {
"repo_name": "chromium/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java",
"license": "bsd-3-clause",
"size": 83424
} | [
"org.chromium.base.metrics.RecordUserAction"
] | import org.chromium.base.metrics.RecordUserAction; | import org.chromium.base.metrics.*; | [
"org.chromium.base"
] | org.chromium.base; | 369,153 |
List<ColumnName> result = new ArrayList<ColumnName>();
for (String column: Arrays.asList(commaSeparated.split(","))) {
result.add(Microsyntax.parseColumn(column.trim()));
}
return result;
}
| List<ColumnName> result = new ArrayList<ColumnName>(); for (String column: Arrays.asList(commaSeparated.split(","))) { result.add(Microsyntax.parseColumn(column.trim())); } return result; } | /**
* Parses a comma-separated list of column names, e.g., for d2rq:bNodeIdColumns
*/ | Parses a comma-separated list of column names, e.g., for d2rq:bNodeIdColumns | parseColumnList | {
"repo_name": "d2rq/r2rml-kit",
"path": "src/main/java/org/d2rq/lang/Microsyntax.java",
"license": "apache-2.0",
"size": 11905
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.d2rq.db.schema.ColumnName"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.d2rq.db.schema.ColumnName; | import java.util.*; import org.d2rq.db.schema.*; | [
"java.util",
"org.d2rq.db"
] | java.util; org.d2rq.db; | 466,977 |
public Builder post() {
this.httpMethod = new PostMethod(url);
return this;
} | Builder function() { this.httpMethod = new PostMethod(url); return this; } | /**
* HTTP POST
* <br>
*
* @return
* @since NFVO 0.5
*/ | HTTP POST | post | {
"repo_name": "open-o/nfvo",
"path": "drivers/vnfm/svnfm/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/openo/nfvo/vnfmadapter/service/csm/connect/HttpRequests.java",
"license": "apache-2.0",
"size": 11650
} | [
"org.apache.commons.httpclient.methods.PostMethod"
] | import org.apache.commons.httpclient.methods.PostMethod; | import org.apache.commons.httpclient.methods.*; | [
"org.apache.commons"
] | org.apache.commons; | 547,498 |
@SuppressWarnings("unused")
public static void setEmitStackTraces(boolean emitStackTraces) {
StackTraceResponseContext.emitStackTraces = emitStackTraces;
}
public StackTraceResponseContext(Exception e) {
this.e = e;
if (e instanceof AuthorizationFailedException) {
... | @SuppressWarnings(STR) static void function(boolean emitStackTraces) { StackTraceResponseContext.emitStackTraces = emitStackTraces; } public StackTraceResponseContext(Exception e) { this.e = e; if (e instanceof AuthorizationFailedException) { setStatus(HttpURLConnection.HTTP_UNAUTHORIZED); setHeader(STR, STRWSO2-Regist... | /**
* Method to set whether stack traces must be emitted.
*
* @param emitStackTraces whether stack traces must be emitted.
*/ | Method to set whether stack traces must be emitted | setEmitStackTraces | {
"repo_name": "maheshika/carbon4-kernel",
"path": "core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/app/StackTraceResponseContext.java",
"license": "apache-2.0",
"size": 2869
} | [
"java.net.HttpURLConnection",
"org.wso2.carbon.registry.core.secure.AuthorizationFailedException"
] | import java.net.HttpURLConnection; import org.wso2.carbon.registry.core.secure.AuthorizationFailedException; | import java.net.*; import org.wso2.carbon.registry.core.secure.*; | [
"java.net",
"org.wso2.carbon"
] | java.net; org.wso2.carbon; | 2,453,324 |
public Stream<Discussion> getCommitDiscussionsStream(Object projectIdOrPath, String commitSha) throws GitLabApiException {
Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitSha, getDefaultPerPage());
return (pager.stream());
} | Stream<Discussion> function(Object projectIdOrPath, String commitSha) throws GitLabApiException { Pager<Discussion> pager = getCommitDiscussionsPager(projectIdOrPath, commitSha, getDefaultPerPage()); return (pager.stream()); } | /**
* Get a Stream of Discussion instances for the specified commit.
*
* <pre><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></pre>
*
* @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
... | Get a Stream of Discussion instances for the specified commit. <code><code>GitLab Endpoint: GET /projects/:id/repository/commits/:commit_sha/discussions</code></code> | getCommitDiscussionsStream | {
"repo_name": "gmessner/gitlab4j-api",
"path": "src/main/java/org/gitlab4j/api/DiscussionsApi.java",
"license": "mit",
"size": 42208
} | [
"java.util.stream.Stream",
"org.gitlab4j.api.models.Discussion"
] | import java.util.stream.Stream; import org.gitlab4j.api.models.Discussion; | import java.util.stream.*; import org.gitlab4j.api.models.*; | [
"java.util",
"org.gitlab4j.api"
] | java.util; org.gitlab4j.api; | 1,261,319 |
public void changeFieldPosition(Form pForm, int fieldPos, int destPos, boolean groupWithPrevious, boolean nextFieldGrouped) throws Exception {
synchronized (pForm.getSynchronizationObject()) {
final List<Field> fields = new ArrayList(pForm.getFormFields());
Collections.sort(fields, ... | void function(Form pForm, int fieldPos, int destPos, boolean groupWithPrevious, boolean nextFieldGrouped) throws Exception { synchronized (pForm.getSynchronizationObject()) { final List<Field> fields = new ArrayList(pForm.getFormFields()); Collections.sort(fields, new Field.Comparator()); boolean promote = destPos < fi... | /**
* Moves a field to the specified position
*
* @param pForm form to modify
* @param fieldPos original field position
* @param destPos destination position
* @param groupWithPrevious determines that the field must be grouped with the previous field
* @... | Moves a field to the specified position | changeFieldPosition | {
"repo_name": "baldimir/jbpm-form-modeler",
"path": "jbpm-form-modeler-core/jbpm-form-modeler-service/jbpm-form-modeler-service-core/src/main/java/org/jbpm/formModeler/core/config/FormManagerImpl.java",
"license": "apache-2.0",
"size": 22600
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.jbpm.formModeler.api.model.Field",
"org.jbpm.formModeler.api.model.Form"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.jbpm.formModeler.api.model.Field; import org.jbpm.formModeler.api.model.Form; | import java.util.*; import org.jbpm.*; | [
"java.util",
"org.jbpm"
] | java.util; org.jbpm; | 886,892 |
EClass getIntegerValue(); | EClass getIntegerValue(); | /**
* Returns the meta object for class '{@link org.gemoc.activitydiagram.concurrent.xactivitydiagrammt.activitydiagram.IntegerValue <em>Integer Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Integer Value</em>'.
* @see org.gemoc.activitydiagram.concur... | Returns the meta object for class '<code>org.gemoc.activitydiagram.concurrent.xactivitydiagrammt.activitydiagram.IntegerValue Integer Value</code>'. | getIntegerValue | {
"repo_name": "gemoc/activitydiagram",
"path": "dev/gemoc_concurrent/language_workbench/org.gemoc.activitydiagram.concurrent/src-gen/org/gemoc/activitydiagram/concurrent/xactivitydiagrammt/activitydiagram/ActivitydiagramPackage.java",
"license": "epl-1.0",
"size": 147901
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 544,030 |
class UpdateDataCallback implements ResultCallback<SparseArray<Object>> {
@SuppressWarnings("unchecked")
@Override
public void onResult(SparseArray<Object> result) {
claim = (Claim) result.get(MULTI_CLAIM_KEY);
adapter.rebuildList(
(Collec... | class UpdateDataCallback implements ResultCallback<SparseArray<Object>> { @SuppressWarnings(STR) void function(SparseArray<Object> result) { claim = (Claim) result.get(MULTI_CLAIM_KEY); adapter.rebuildList( (Collection<Item>) result.get(MULTI_ITEMS_KEY), claimID); ExpenseItemsListActivity.this.changeUI(); } | /**
* Saves the claim, requests an adapter update,
* and then a UI change.
*
* @param result The request result.
*/ | Saves the claim, requests an adapter update, and then a UI change | onResult | {
"repo_name": "CMPUT301W15T07/TravelTracker",
"path": "src/cmput301w15t07/TravelTracker/activity/ExpenseItemsListActivity.java",
"license": "apache-2.0",
"size": 10990
} | [
"android.util.SparseArray",
"java.util.Collection"
] | import android.util.SparseArray; import java.util.Collection; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,139,146 |
EAttribute getMatch_Location();
| EAttribute getMatch_Location(); | /**
* Returns the meta object for the attribute '{@link model.Match#getLocation <em>Location</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Location</em>'.
* @see model.Match#getLocation()
* @see #getMatch()
* @generated
*/ | Returns the meta object for the attribute '<code>model.Match#getLocation Location</code>'. | getMatch_Location | {
"repo_name": "reedcourty/denafutsal",
"path": "hu.bme.mit.inf.mdsd.1.model/src/model/ModelPackage.java",
"license": "mit",
"size": 49421
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,540,050 |
@Override
public void write(byte[] theBytes, int off, int len) throws IOException {
// Encoding suspended?
if (suspendEncoding) {
super.out.write(theBytes, off, len);
return;
} // end if: supsended
for (int i = 0; i < len; i++) {
write(theBytes[off + i]);
} // end for: each byte writt... | void function(byte[] theBytes, int off, int len) throws IOException { if (suspendEncoding) { super.out.write(theBytes, off, len); return; } for (int i = 0; i < len; i++) { write(theBytes[off + i]); } } | /**
* Calls {@link #write(int)} repeatedly until <var>len</var> bytes are
* written.
*
* @param theBytes array from which to read bytes
* @param off offset for array
* @param len max number of bytes to read into array
* @since 1.3
*/ | Calls <code>#write(int)</code> repeatedly until len bytes are written | write | {
"repo_name": "evertrue/commoncrawl_utils",
"path": "src/main/java/org/commoncrawl/util/shared/Base64.java",
"license": "mit",
"size": 53376
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,392,183 |
@Test
public void testSynchronousIncrements() throws InterruptedException {
// getCache().setLockTimeout(getCache().getLockTimeout() * 2);
final String name = this.getUniqueName();
final Object key = "KEY";
// final Object value = "VALUE";
Host host = Host.getHost(0);
final int vmCount = ... | void function() throws InterruptedException { final String name = this.getUniqueName(); final Object key = "KEY"; Host host = Host.getHost(0); final int vmCount = host.getVMCount(); final int threadsPerVM = 3; final int incrementsPerThread = 10; | /**
* Tests that a bunch of threads in a bunch of VMs all atomically incrementing the value of an
* entry get the right value.
*/ | Tests that a bunch of threads in a bunch of VMs all atomically incrementing the value of an entry get the right value | testSynchronousIncrements | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache30/GlobalRegionDUnitTest.java",
"license": "apache-2.0",
"size": 13956
} | [
"org.apache.geode.test.dunit.Host"
] | import org.apache.geode.test.dunit.Host; | import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,028,818 |
@JsMethod
public static native TransformFunction getTransform(Projection source, Projection destination);
// ol.proj.setProj4(proj4) | static native TransformFunction function(Projection source, Projection destination); | /**
* Given the projection-like objects, searches for a transformation function to convert a coordinates array
* from the source projection to the destination projection.
* @param source Source.
* @param destination Destination.
* @return Transform function.
*/ | Given the projection-like objects, searches for a transformation function to convert a coordinates array from the source projection to the destination projection | getTransform | {
"repo_name": "iSergio/gwt-ol",
"path": "ol4gwt-main/src/main/java/org/openlayers/ol/proj/ProjectionUtils.java",
"license": "apache-2.0",
"size": 8950
} | [
"org.openlayers.ol.TransformFunction"
] | import org.openlayers.ol.TransformFunction; | import org.openlayers.ol.*; | [
"org.openlayers.ol"
] | org.openlayers.ol; | 928,605 |
private static void add(BooleanQuery q, String name, String value) {
q.add(new BooleanClause(new TermQuery(new Term(name, value)), BooleanClause.Occur.SHOULD));
} | static void function(BooleanQuery q, String name, String value) { q.add(new BooleanClause(new TermQuery(new Term(name, value)), BooleanClause.Occur.SHOULD)); } | /**
* Add a clause to a boolean query.
*/ | Add a clause to a boolean query | add | {
"repo_name": "zhangdian/solr4.6.0",
"path": "lucene/suggest/src/java/org/apache/lucene/search/spell/SpellChecker.java",
"license": "apache-2.0",
"size": 24789
} | [
"org.apache.lucene.index.Term",
"org.apache.lucene.search.BooleanClause",
"org.apache.lucene.search.BooleanQuery",
"org.apache.lucene.search.TermQuery"
] | import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.TermQuery; | import org.apache.lucene.index.*; import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,758,736 |
public void removeMatches(Match[] matches) {
Collection existing = new ArrayList();
synchronized (fElementsToMatches) {
for (int i = 0; i < matches.length; i++) {
if (doRemoveMatch(matches[i]))
existing.add(matches[i]); // no duplicate matches at this point
}
}
}
| void function(Match[] matches) { Collection existing = new ArrayList(); synchronized (fElementsToMatches) { for (int i = 0; i < matches.length; i++) { if (doRemoveMatch(matches[i])) existing.add(matches[i]); } } } | /**
* Removes the given matches from this search result. This method has no effect for matches that
* are not found
* <p>
* Subclasses may extend this method.
* </p>
*
* @param matches the matches to remove
*/ | Removes the given matches from this search result. This method has no effect for matches that are not found Subclasses may extend this method. | removeMatches | {
"repo_name": "iteratec/logan",
"path": "de.iteratec.logan.search/src/de/iteratec/logan/search/TextSearchResult.java",
"license": "apache-2.0",
"size": 9937
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.eclipse.search.ui.text.Match"
] | import java.util.ArrayList; import java.util.Collection; import org.eclipse.search.ui.text.Match; | import java.util.*; import org.eclipse.search.ui.text.*; | [
"java.util",
"org.eclipse.search"
] | java.util; org.eclipse.search; | 2,908,165 |
@Override
public OverworldContext onSelect(ClientOverworldStage stage, OverworldContext context, Zone z, Unit unit) {
return new net.fe.overworldStage.context.SmiteTarget(stage, context, z, unit);
}
| OverworldContext function(ClientOverworldStage stage, OverworldContext context, Zone z, Unit unit) { return new net.fe.overworldStage.context.SmiteTarget(stage, context, z, unit); } | /**
* Returns the context to start when this command is selected
*/ | Returns the context to start when this command is selected | onSelect | {
"repo_name": "eliatlarge/FEMultiPlayer-V2",
"path": "src/net/fe/overworldStage/fieldskill/Smite.java",
"license": "gpl-3.0",
"size": 3563
} | [
"net.fe.overworldStage.ClientOverworldStage",
"net.fe.overworldStage.OverworldContext",
"net.fe.overworldStage.Zone",
"net.fe.unit.Unit"
] | import net.fe.overworldStage.ClientOverworldStage; import net.fe.overworldStage.OverworldContext; import net.fe.overworldStage.Zone; import net.fe.unit.Unit; | import net.fe.*; import net.fe.unit.*; | [
"net.fe",
"net.fe.unit"
] | net.fe; net.fe.unit; | 2,557,262 |
public List<SubResource> loadBalancingRules() {
return this.loadBalancingRules;
} | List<SubResource> function() { return this.loadBalancingRules; } | /**
* Get an array of references to load balancing rules that use this backend address pool.
*
* @return the loadBalancingRules value
*/ | Get an array of references to load balancing rules that use this backend address pool | loadBalancingRules | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/BackendAddressPoolInner.java",
"license": "mit",
"size": 4923
} | [
"com.microsoft.azure.SubResource",
"java.util.List"
] | import com.microsoft.azure.SubResource; import java.util.List; | import com.microsoft.azure.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,484,714 |
@Override
public void writeTo(int sourceStartPos, int numSourceElems, ImageOutputStream destination) throws IOException {
destination.writeInts(_array, sourceStartPos, numSourceElems);
} | void function(int sourceStartPos, int numSourceElems, ImageOutputStream destination) throws IOException { destination.writeInts(_array, sourceStartPos, numSourceElems); } | /**
* Please refer to {@link ProductData#writeTo(int, int, ImageOutputStream)}.
*/ | Please refer to <code>ProductData#writeTo(int, int, ImageOutputStream)</code> | writeTo | {
"repo_name": "seadas/beam",
"path": "beam-core/src/main/java/org/esa/beam/framework/datamodel/ProductData.java",
"license": "gpl-3.0",
"size": 100346
} | [
"java.io.IOException",
"javax.imageio.stream.ImageOutputStream"
] | import java.io.IOException; import javax.imageio.stream.ImageOutputStream; | import java.io.*; import javax.imageio.stream.*; | [
"java.io",
"javax.imageio"
] | java.io; javax.imageio; | 2,682,737 |
protected String getLabel(String typeName) {
try {
return OdataEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
}
catch(MissingResourceException mre) {
OdataEditorPlugin.INSTANCE.log(mre);
}
return typeName;
}
| String function(String typeName) { try { return OdataEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); } catch(MissingResourceException mre) { OdataEditorPlugin.INSTANCE.log(mre); } return typeName; } | /**
* Returns the label for the specified type name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns the label for the specified type name. | getLabel | {
"repo_name": "SOM-Research/odata-generator",
"path": "metamodel/som.odata.metamodel.editor/src/edm/presentation/EdmModelWizard.java",
"license": "epl-1.0",
"size": 18115
} | [
"java.util.MissingResourceException"
] | import java.util.MissingResourceException; | import java.util.*; | [
"java.util"
] | java.util; | 1,771,529 |
protected void paintMarker(Graphics g, MapMarker marker) {
Point p = getMapPosition(marker.getLat(), marker.getLon());
if (p != null) {
marker.paint(g, p);
}
} | void function(Graphics g, MapMarker marker) { Point p = getMapPosition(marker.getLat(), marker.getLon()); if (p != null) { marker.paint(g, p); } } | /**
* Paint a single marker.
*/ | Paint a single marker | paintMarker | {
"repo_name": "ifellows/DeducerSpatial",
"path": "JMapViewer/org/org/openstreetmap/gui/jmapviewer/JMapViewer.java",
"license": "gpl-2.0",
"size": 26390
} | [
"java.awt.Graphics",
"java.awt.Point",
"org.openstreetmap.gui.jmapviewer.interfaces.MapMarker"
] | import java.awt.Graphics; import java.awt.Point; import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker; | import java.awt.*; import org.openstreetmap.gui.jmapviewer.interfaces.*; | [
"java.awt",
"org.openstreetmap.gui"
] | java.awt; org.openstreetmap.gui; | 2,851,827 |
@Test public void testInQueryWithComma() {
check(
"select * from emp where deptno in (select deptno from dept group by 1, 2)",
"SELECT *\n"
+ "FROM `EMP`\n"
+ "WHERE (`DEPTNO` IN (SELECT `DEPTNO`\n"
+ "FROM `DEPT`\n"
+ "GROUP BY 1, 2))");
} | @Test void function() { check( STR, STR + STR + STR + STR + STR); } | /**
* Tricky for the parser - looks like "IN (scalar, scalar)" but isn't.
*/ | Tricky for the parser - looks like "IN (scalar, scalar)" but isn't | testInQueryWithComma | {
"repo_name": "yeongwei/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java",
"license": "apache-2.0",
"size": 253807
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,442,106 |
private void createAFileWithCorruptedBlockReplicas(Path filePath, short repl,
int corruptBlockCount) throws IOException, AccessControlException,
FileNotFoundException, UnresolvedLinkException, InterruptedException, TimeoutException {
DFSTestUtil.createFile(dfs, filePath, BLOCK_SIZE, repl, 0);
DFST... | void function(Path filePath, short repl, int corruptBlockCount) throws IOException, AccessControlException, FileNotFoundException, UnresolvedLinkException, InterruptedException, TimeoutException { DFSTestUtil.createFile(dfs, filePath, BLOCK_SIZE, repl, 0); DFSTestUtil.waitReplication(dfs, filePath, repl); final Located... | /**
* Create a file with one block and corrupt some/all of the block replicas.
*/ | Create a file with one block and corrupt some/all of the block replicas | createAFileWithCorruptedBlockReplicas | {
"repo_name": "messi49/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java",
"license": "apache-2.0",
"size": 14173
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.concurrent.TimeoutException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.hdfs.protocol.DatanodeInfo",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.protoco... | import java.io.FileNotFoundException; import java.io.IOException; import java.util.concurrent.TimeoutException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apa... | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.security.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 2,879,272 |
@Test
@MediumTest
@Feature({"OverlayPanelBase"})
@UiThreadTest
public void testNegativeHeightClosesPanel() {
final float belowPeek = MOCK_PEEKED_HEIGHT - 1000;
@PanelState
int nextState = mExpandPanel.findNearestPanelStateFromHeight(belowPeek, DOWNWARD_VELOCITY);
Ass... | @Feature({STR}) void function() { final float belowPeek = MOCK_PEEKED_HEIGHT - 1000; int nextState = mExpandPanel.findNearestPanelStateFromHeight(belowPeek, DOWNWARD_VELOCITY); Assert.assertTrue(nextState == PanelState.CLOSED); nextState = mNoExpandPanel.findNearestPanelStateFromHeight(belowPeek, DOWNWARD_VELOCITY); As... | /**
* Tests that a panel will be closed if the desired height is negative.
*/ | Tests that a panel will be closed if the desired height is negative | testNegativeHeightClosesPanel | {
"repo_name": "chromium/chromium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBaseTest.java",
"license": "bsd-3-clause",
"size": 13535
} | [
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.browser.compositor.bottombar.OverlayPanel",
"org.junit.Assert"
] | import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel; import org.junit.Assert; | import org.chromium.base.test.util.*; import org.chromium.chrome.browser.compositor.bottombar.*; import org.junit.*; | [
"org.chromium.base",
"org.chromium.chrome",
"org.junit"
] | org.chromium.base; org.chromium.chrome; org.junit; | 1,903,045 |
public void setFormatMap(HashMap<String, String> formatMap) {
this.formatMap = formatMap;
}
| void function(HashMap<String, String> formatMap) { this.formatMap = formatMap; } | /**
* Sets map of format extension (e.g. jpg) to mimetype mappings (e.g. image/jpeg)
* @param formatMap extension to mimetype mappings
*/ | Sets map of format extension (e.g. jpg) to mimetype mappings (e.g. image/jpeg) | setFormatMap | {
"repo_name": "cbeer/adore-djatoka-mirror",
"path": "src/gov/lanl/adore/djatoka/openurl/DjatokaImageMigrator.java",
"license": "lgpl-2.1",
"size": 7430
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,155,625 |
private void visitBooleanOp(VisitOp op, Occur occur) {
op.visitf1(this, null);
if (occur == Occur.MUST_NOT) {
proxBuilder.addConnector(Occur.MUST);
} else {
proxBuilder.addConnector(occur);
}
proxBuilder.addConnector(occur);
if (op.isF2Present()) {
proxBuilder.... | void function(VisitOp op, Occur occur) { op.visitf1(this, null); if (occur == Occur.MUST_NOT) { proxBuilder.addConnector(Occur.MUST); } else { proxBuilder.addConnector(occur); } proxBuilder.addConnector(occur); if (op.isF2Present()) { proxBuilder.addParentConnector(occur); op.visitf2(this, null); } proxBuilder.endGroup... | /**
* f1 -> CheckNextSearch() f2 -> ( CurrentSearch() )?
*/ | f1 -> CheckNextSearch() f2 -> ( CurrentSearch() ) | visitBooleanOp | {
"repo_name": "markrmiller/qsol",
"path": "src/java/com/mhs/qsol/proximity/ProximityVisitor.java",
"license": "apache-2.0",
"size": 21688
} | [
"com.mhs.qsol.abstractnode.VisitOp",
"org.apache.lucene.search.BooleanClause"
] | import com.mhs.qsol.abstractnode.VisitOp; import org.apache.lucene.search.BooleanClause; | import com.mhs.qsol.abstractnode.*; import org.apache.lucene.search.*; | [
"com.mhs.qsol",
"org.apache.lucene"
] | com.mhs.qsol; org.apache.lucene; | 2,328,111 |
public static String getIdentifier( List<NameableObject> column, List<NameableObject> row )
{
List<String> ids = new ArrayList<>();
List<NameableObject> dimensions = new ArrayList<>();
dimensions.addAll( column != null ? column : new ArrayList<>() );
dimensions.addAll( row != nu... | static String function( List<NameableObject> column, List<NameableObject> row ) { List<String> ids = new ArrayList<>(); List<NameableObject> dimensions = new ArrayList<>(); dimensions.addAll( column != null ? column : new ArrayList<>() ); dimensions.addAll( row != null ? row : new ArrayList<>() ); for ( NameableObject ... | /**
* Generates an identifier based on the given lists of NameableObjects. Uses
* the UIDs for each NameableObject, sorts them and writes them out as a key.
*/ | Generates an identifier based on the given lists of NameableObjects. Uses the UIDs for each NameableObject, sorts them and writes them out as a key | getIdentifier | {
"repo_name": "steffeli/inf5750-tracker-capture",
"path": "dhis-api/src/main/java/org/hisp/dhis/common/BaseAnalyticalObject.java",
"license": "bsd-3-clause",
"size": 46903
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.hisp.dhis.dataelement.DataElementOperand"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.dataelement.DataElementOperand; | import java.util.*; import org.apache.commons.lang3.*; import org.hisp.dhis.dataelement.*; | [
"java.util",
"org.apache.commons",
"org.hisp.dhis"
] | java.util; org.apache.commons; org.hisp.dhis; | 728,458 |
@Test
@MediumTest
@Feature({"RenderTest"})
public void testShowConnectionInfoSubpageExpiredCert() throws IOException {
mTestServerRule.setCertificateType(ServerCertificate.CERT_EXPIRED);
loadUrlAndOpenPageInfo(mTestServerRule.getServer().getURL(sSimpleHtml));
onView(withId(R.id.p... | @Feature({STR}) void function() throws IOException { mTestServerRule.setCertificateType(ServerCertificate.CERT_EXPIRED); loadUrlAndOpenPageInfo(mTestServerRule.getServer().getURL(sSimpleHtml)); onView(withId(R.id.page_info_connection_row)).perform(click()); onViewWaiting(allOf( withText(containsString(STR)), isDisplaye... | /**
* Tests the connection info page of the PageInfo UI - expired certificate.
*/ | Tests the connection info page of the PageInfo UI - expired certificate | testShowConnectionInfoSubpageExpiredCert | {
"repo_name": "chromium/chromium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java",
"license": "bsd-3-clause",
"size": 36581
} | [
"androidx.test.espresso.Espresso",
"androidx.test.espresso.matcher.ViewMatchers",
"java.io.IOException",
"org.chromium.base.test.util.Feature",
"org.chromium.net.test.ServerCertificate",
"org.chromium.ui.test.util.ViewUtils"
] | import androidx.test.espresso.Espresso; import androidx.test.espresso.matcher.ViewMatchers; import java.io.IOException; import org.chromium.base.test.util.Feature; import org.chromium.net.test.ServerCertificate; import org.chromium.ui.test.util.ViewUtils; | import androidx.test.espresso.*; import androidx.test.espresso.matcher.*; import java.io.*; import org.chromium.base.test.util.*; import org.chromium.net.test.*; import org.chromium.ui.test.util.*; | [
"androidx.test",
"java.io",
"org.chromium.base",
"org.chromium.net",
"org.chromium.ui"
] | androidx.test; java.io; org.chromium.base; org.chromium.net; org.chromium.ui; | 2,626,552 |
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return this.func_180578_a((EntityZombie)p_110775_1_);
} | ResourceLocation function(Entity p_110775_1_) { return this.func_180578_a((EntityZombie)p_110775_1_); } | /**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/ | Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture | getEntityTexture | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/client/renderer/entity/RenderZombie.java",
"license": "mit",
"size": 6708
} | [
"net.minecraft.entity.Entity",
"net.minecraft.entity.monster.EntityZombie",
"net.minecraft.util.ResourceLocation"
] | import net.minecraft.entity.Entity; import net.minecraft.entity.monster.EntityZombie; import net.minecraft.util.ResourceLocation; | import net.minecraft.entity.*; import net.minecraft.entity.monster.*; import net.minecraft.util.*; | [
"net.minecraft.entity",
"net.minecraft.util"
] | net.minecraft.entity; net.minecraft.util; | 573,536 |
@Override
public Map<String, Object> getAllPaginatedAPIsByStatus(String tenantDomain,
int start, int end, final String[] apiStatus, boolean returnAPITags) throws APIManagementException {
Map<String, Object> result = new HashMap<String, Object>(... | Map<String, Object> function(String tenantDomain, int start, int end, final String[] apiStatus, boolean returnAPITags) throws APIManagementException { Map<String, Object> result = new HashMap<String, Object>(); SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator()); SortedSet<API> apiVersionsSortedSet ... | /**
* The method to get APIs in any of the given LC status array
*
* @return Map<String, Object> API result set with pagination information
* @throws APIManagementException
*/ | The method to get APIs in any of the given LC status array | getAllPaginatedAPIsByStatus | {
"repo_name": "pubudu538/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java",
"license": "apache-2.0",
"size": 278305
} | [
"java.util.ArrayList",
"java.util.Comparator",
"java.util.HashMap",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"java.util.Set",
"java.util.SortedSet",
"java.util.TreeSet",
"org.wso2.carbon.CarbonConstants",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apim... | import java.util.ArrayList; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; import org.wso2.carbon.CarbonConstants; import org.wso2.carbon.apimgt.api.APIManagementExc... | import java.util.*; import org.wso2.carbon.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.governance.api.common.dataobjects.*; import org.wso2.carbon.governance.api.generic.*; import org.wso2.carbon.governance.api.uti... | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,516,587 |
@Override
public void writeMessageBegin(TMessage tMessage) throws TException {
if (tMessage.type == TMessageType.CALL || tMessage.type == TMessageType.ONEWAY) {
super.writeMessageBegin(
new TMessage(SERVICE_NAME + SEPARATOR + tMessage.name, tMessage.type, tMessage.seqid));
} else {
sup... | void function(TMessage tMessage) throws TException { if (tMessage.type == TMessageType.CALL tMessage.type == TMessageType.ONEWAY) { super.writeMessageBegin( new TMessage(SERVICE_NAME + SEPARATOR + tMessage.name, tMessage.type, tMessage.seqid)); } else { super.writeMessageBegin(tMessage); } } | /**
* Prepends the service name to the function name, separated by TMultiplexedProtocol.SEPARATOR.
*
* @param tMessage The original message.
* @throws TException Passed through from wrapped <code>TProtocol</code> instance.
*/ | Prepends the service name to the function name, separated by TMultiplexedProtocol.SEPARATOR | writeMessageBegin | {
"repo_name": "facebook/fbthrift",
"path": "thrift/lib/javadeprecated/src/main/java/com/facebook/thrift/protocol/TMultiplexedProtocol.java",
"license": "apache-2.0",
"size": 3361
} | [
"com.facebook.thrift.TException"
] | import com.facebook.thrift.TException; | import com.facebook.thrift.*; | [
"com.facebook.thrift"
] | com.facebook.thrift; | 1,216,796 |
public void quit() throws RemoteException {
LOG.entering("TesterImpl", "quit()");
assert coord != null : "Null coordinator";
coord.quit(remoteTester);
this.cleanUp();
LOG.exiting("TesterImpl", "quit()");
} | void function() throws RemoteException { LOG.entering(STR, STR); assert coord != null : STR; coord.quit(remoteTester); this.cleanUp(); LOG.exiting(STR, STR); } | /**
* Used to interrupt actions's execution.
* Cleans the action list and asks coordinator to quit.
*/ | Used to interrupt actions's execution. Cleans the action list and asks coordinator to quit | quit | {
"repo_name": "sunye/Macaw",
"path": "horda-commons/src/main/java/org/atlanmod/commons/tester/TesterImpl.java",
"license": "gpl-3.0",
"size": 10850
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 2,893,289 |
public List<NodeFiltersTask> validateRequirementFilters(Topology topology) {
List<NodeFiltersTask> toReturnTaskList = Lists.newArrayList();
Map<String, NodeTemplate> nodeTemplates = topology.getNodeTemplates();
Map<String, IndexedNodeType> nodeTypes = topologyServiceCore.getIndexedNodeTypesF... | List<NodeFiltersTask> function(Topology topology) { List<NodeFiltersTask> toReturnTaskList = Lists.newArrayList(); Map<String, NodeTemplate> nodeTemplates = topology.getNodeTemplates(); Map<String, IndexedNodeType> nodeTypes = topologyServiceCore.getIndexedNodeTypesFromTopology(topology, false, true); Map<String, Index... | /**
* Performs validation of the node filters to check that relationships targets the filter requirements.
*/ | Performs validation of the node filters to check that relationships targets the filter requirements | validateRequirementFilters | {
"repo_name": "xdegenne/alien4cloud",
"path": "alien4cloud-core/src/main/java/alien4cloud/topology/validation/NodeFilterValidationService.java",
"license": "apache-2.0",
"size": 11279
} | [
"com.google.common.collect.Lists",
"java.util.List",
"java.util.Map"
] | import com.google.common.collect.Lists; import java.util.List; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 224,237 |
@ServiceMethod(returns = ReturnType.SINGLE)
VirtualMachineExtensionInner update(
String resourceGroupName,
String vmName,
String vmExtensionName,
VirtualMachineExtensionUpdate extensionParameters); | @ServiceMethod(returns = ReturnType.SINGLE) VirtualMachineExtensionInner update( String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionUpdate extensionParameters); | /**
* The operation to update the extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine where the extension should be updated.
* @param vmExtensionName The name of the virtual machine extension.
* @param extensionParameters ... | The operation to update the extension | update | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineExtensionsClient.java",
"license": "mit",
"size": 29609
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner",
"com.azure.resourcemanager.compute.models.VirtualMachineExtensionUpdate"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionInner; import com.azure.resourcemanager.compute.models.VirtualMachineExtensionUpdate; | import com.azure.core.annotation.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,178,470 |
private URI getRedirectUrl(String domainName)
throws EWSHttpException, XMLStreamException, IOException, ServiceLocalException, URISyntaxException {
String url = String.format(AutodiscoverLegacyHttpUrl, "autodiscover." + domainName);
traceMessage(TraceFlags.AutodiscoverConfiguration,
St... | URI function(String domainName) throws EWSHttpException, XMLStreamException, IOException, ServiceLocalException, URISyntaxException { String url = String.format(AutodiscoverLegacyHttpUrl, STR + domainName); traceMessage(TraceFlags.AutodiscoverConfiguration, String.format(STR, url)); HttpWebRequest request = null; try {... | /**
* Gets a redirection URL to an SSL-enabled Autodiscover service from the
* standard non-SSL Autodiscover URL.
*
* @param domainName the domain name
* @return A valid SSL-enabled redirection URL. (May be null)
* @throws EWSHttpException the EWS http exception
* @throws XMLStreamException the XML... | Gets a redirection URL to an SSL-enabled Autodiscover service from the standard non-SSL Autodiscover URL | getRedirectUrl | {
"repo_name": "candrews/ews-java-api",
"path": "src/main/java/microsoft/exchange/webservices/data/autodiscover/AutodiscoverService.java",
"license": "mit",
"size": 75844
} | [
"java.io.IOException",
"java.net.MalformedURLException",
"java.net.URI",
"java.net.URISyntaxException",
"javax.xml.stream.XMLStreamException"
] | import java.io.IOException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import javax.xml.stream.XMLStreamException; | import java.io.*; import java.net.*; import javax.xml.stream.*; | [
"java.io",
"java.net",
"javax.xml"
] | java.io; java.net; javax.xml; | 1,169,378 |
public void write(OutputStream oStream) throws IOException {
byte[] array = toByteArray();
oStream.write(array);
} | void function(OutputStream oStream) throws IOException { byte[] array = toByteArray(); oStream.write(array); } | /**
* Write the class file to the OutputStream.
*
* @param oStream the stream to write to
* @throws IOException if writing to the stream produces an exception
*/ | Write the class file to the OutputStream | write | {
"repo_name": "tuchida/rhino",
"path": "src/org/mozilla/classfile/ClassFileWriter.java",
"license": "mpl-2.0",
"size": 171073
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,373,454 |
public Node updateDate(Node node) {
log.debug("Request to update Node Date: {}", node);
ZonedDateTime now = DateToZonedDateTimeConverter.INSTANCE.convert(new Date());
node.setDate(now);
Node result = nodeRepository.save(node);
return result;
} | Node function(Node node) { log.debug(STR, node); ZonedDateTime now = DateToZonedDateTimeConverter.INSTANCE.convert(new Date()); node.setDate(now); Node result = nodeRepository.save(node); return result; } | /**
* Updates a node's date.
* @return the persisted entity
*/ | Updates a node's date | updateDate | {
"repo_name": "CloudWorkers/cloudworker",
"path": "server/src/main/java/com/cloudworkers/cloudworker/service/NodeService.java",
"license": "apache-2.0",
"size": 4024
} | [
"com.cloudworkers.cloudworker.domain.Node",
"com.cloudworkers.cloudworker.domain.util.JSR310DateConverters",
"java.time.ZonedDateTime",
"java.util.Date"
] | import com.cloudworkers.cloudworker.domain.Node; import com.cloudworkers.cloudworker.domain.util.JSR310DateConverters; import java.time.ZonedDateTime; import java.util.Date; | import com.cloudworkers.cloudworker.domain.*; import com.cloudworkers.cloudworker.domain.util.*; import java.time.*; import java.util.*; | [
"com.cloudworkers.cloudworker",
"java.time",
"java.util"
] | com.cloudworkers.cloudworker; java.time; java.util; | 77,544 |
public Variable[] findLocalArrays() {
List<Variable> arrays= new ArrayList<Variable>();
for (ListIterator<Variable> iterator= fLocalVariables.listIterator(fLocalVariables.size()); iterator.hasPrevious();) {
Variable localVariable= iterator.previous();
if (localVariable.isArray())
arrays.add(localVari... | Variable[] function() { List<Variable> arrays= new ArrayList<Variable>(); for (ListIterator<Variable> iterator= fLocalVariables.listIterator(fLocalVariables.size()); iterator.hasPrevious();) { Variable localVariable= iterator.previous(); if (localVariable.isArray()) arrays.add(localVariable); } return arrays.toArray(ne... | /**
* Returns all local arrays in the order that they appear.
*
* @return all local arrays
*/ | Returns all local arrays in the order that they appear | findLocalArrays | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/template/java/CompilationUnitCompletion.java",
"license": "mit",
"size": 30908
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.ListIterator"
] | import java.util.ArrayList; import java.util.List; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 646,564 |
public void setInvoiceDueDate(Date invoiceDueDate) {
this.invoiceDueDate = invoiceDueDate;
} | void function(Date invoiceDueDate) { this.invoiceDueDate = invoiceDueDate; } | /**
* Sets the invoiceDueDate attribute value.
*
* @param invoiceDueDate The invoiceDueDate to set.
*/ | Sets the invoiceDueDate attribute value | setInvoiceDueDate | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/report/ContractsGrantsInvoiceReportDetailDataHolder.java",
"license": "agpl-3.0",
"size": 8908
} | [
"java.sql.Date"
] | import java.sql.Date; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,479,331 |
public void addListener(InputListener c){
listeners.add(c);
} | void function(InputListener c){ listeners.add(c); } | /**
* Register that the component is attached to the screen.
* @param c
*/ | Register that the component is attached to the screen | addListener | {
"repo_name": "GeoYS/rEvolution",
"path": "revolution/src/revolution/ui/Screen.java",
"license": "gpl-3.0",
"size": 3790
} | [
"org.newdawn.slick.InputListener"
] | import org.newdawn.slick.InputListener; | import org.newdawn.slick.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 2,034,144 |
public static Class getClassForName(String classname, ClassLoader loader) {
try {
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
return AccessController.doPrivileged(new PrivilegedClassForName(classname, true, loader));
} catch ... | static Class function(String classname, ClassLoader loader) { try { if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){ try { return AccessController.doPrivileged(new PrivilegedClassForName(classname, true, loader)); } catch (PrivilegedActionException exception) { throw ValidationException.unableToLoadClass(classn... | /**
* INTERNAL:
* Load a class from a given class name. (XMLEntityMappings calls this one)
*/ | Load a class from a given class name. (XMLEntityMappings calls this one) | getClassForName | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/MetadataHelper.java",
"license": "epl-1.0",
"size": 10250
} | [
"java.security.AccessController",
"java.security.PrivilegedActionException",
"org.eclipse.persistence.exceptions.ValidationException",
"org.eclipse.persistence.internal.security.PrivilegedAccessHelper",
"org.eclipse.persistence.internal.security.PrivilegedClassForName"
] | import java.security.AccessController; import java.security.PrivilegedActionException; import org.eclipse.persistence.exceptions.ValidationException; import org.eclipse.persistence.internal.security.PrivilegedAccessHelper; import org.eclipse.persistence.internal.security.PrivilegedClassForName; | import java.security.*; import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.security.*; | [
"java.security",
"org.eclipse.persistence"
] | java.security; org.eclipse.persistence; | 319,446 |
void setTypeIds(List<String> typeIds) throws RepositoryException; | void setTypeIds(List<String> typeIds) throws RepositoryException; | /**
* Defines which connection type ids are installed at this remote repository @param typeIds the type ids
*
* @param typeIds the type ids
* @throws RepositoryException the repository exception
*/ | Defines which connection type ids are installed at this remote repository @param typeIds the type ids | setTypeIds | {
"repo_name": "cm-is-dog/rapidminer-studio-core",
"path": "src/main/java/com/rapidminer/repository/internal/remote/RemoteRepository.java",
"license": "agpl-3.0",
"size": 8343
} | [
"com.rapidminer.repository.RepositoryException",
"java.util.List"
] | import com.rapidminer.repository.RepositoryException; import java.util.List; | import com.rapidminer.repository.*; import java.util.*; | [
"com.rapidminer.repository",
"java.util"
] | com.rapidminer.repository; java.util; | 656,625 |
public Map<String, Object> buildProducerProperties() {
Map<String, Object> properties = buildCommonProperties();
properties.putAll(this.producer.buildProperties());
return properties;
} | Map<String, Object> function() { Map<String, Object> properties = buildCommonProperties(); properties.putAll(this.producer.buildProperties()); return properties; } | /**
* Create an initial map of producer properties from the state of this instance.
* <p>
* This allows you to add additional properties, if necessary, and override the
* default kafkaProducerFactory bean.
* @return the producer properties initialized with the customizations defined on this
* instance
*/ | Create an initial map of producer properties from the state of this instance. This allows you to add additional properties, if necessary, and override the default kafkaProducerFactory bean | buildProducerProperties | {
"repo_name": "philwebb/spring-boot",
"path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.java",
"license": "apache-2.0",
"size": 33864
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,581,804 |
public OffsetDateTime getLastModified() {
if (this.lastModified == null) {
return null;
}
return this.lastModified.getDateTime();
} | OffsetDateTime function() { if (this.lastModified == null) { return null; } return this.lastModified.getDateTime(); } | /**
* Get the lastModified property: The Last-Modified property.
*
* @return the lastModified value.
*/ | Get the lastModified property: The Last-Modified property | getLastModified | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/ContainersReleaseLeaseHeaders.java",
"license": "mit",
"size": 5186
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 359,491 |
@Override
public void consultationCall(String consultedDevice) {
OriginateAction action = new OriginateAction();
action.setChannel(sipPhone.getTechnology() + "/" + sipPhone.getDeviceId().toString());
action.setContext(config.getConfigurationValue("cti_outbound_context"));
action.... | void function(String consultedDevice) { OriginateAction action = new OriginateAction(); action.setChannel(sipPhone.getTechnology() + "/" + sipPhone.getDeviceId().toString()); action.setContext(config.getConfigurationValue(STR)); action.setExten(consultedDevice); action.setPriority(1); Log.d(TAG, action.toString()); ast... | /**
* Consultation calls will be "Call Waiting" calls on the originating device.
* @param consultedDevice the device to consult
*/ | Consultation calls will be "Call Waiting" calls on the originating device | consultationCall | {
"repo_name": "jonas-koeritz/asterisk-csp",
"path": "src/main/java/opencsp/uacontroller/asterisk/AMIController.java",
"license": "mit",
"size": 2662
} | [
"org.asteriskjava.manager.action.OriginateAction"
] | import org.asteriskjava.manager.action.OriginateAction; | import org.asteriskjava.manager.action.*; | [
"org.asteriskjava.manager"
] | org.asteriskjava.manager; | 1,343,510 |
public synchronized void setRoot( int id, long rowid )
throws IOException
{
checkIfClosed();
_pageman.getFileHeader().setRoot( id, rowid );
}
| synchronized void function( int id, long rowid ) throws IOException { checkIfClosed(); _pageman.getFileHeader().setRoot( id, rowid ); } | /**
* Sets the indicated root rowid.
*
* @see #getRootCount
*/ | Sets the indicated root rowid | setRoot | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Jdbm/src/jdbm/recman/BaseRecordManager.java",
"license": "mit",
"size": 14840
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,411,625 |
private void checkDefaultHeader(ByteArrayOutputStream bos)
throws IOException
{
ByteArrayInputStream in = new ByteArrayInputStream(bos.toByteArray());
stream = new MpegStream(in);
AudioFrame header = stream.nextFrame();
assertNotNull("No header found", header);
... | void function(ByteArrayOutputStream bos) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(bos.toByteArray()); stream = new MpegStream(in); AudioFrame header = stream.nextFrame(); assertNotNull(STR, header); assertEquals(STR, AudioFrame.MPEG_V2, header.getVersionCode()); assertEquals(STR, AudioFra... | /**
* Tests whether the default test header can be found in a stream.
*
* @param bos the stream
* @throws IOException if an error occurs
*/ | Tests whether the default test header can be found in a stream | checkDefaultHeader | {
"repo_name": "zamattiac/tika",
"path": "tika-parsers/src/test/java/org/apache/tika/parser/mp3/MpegStreamTest.java",
"license": "apache-2.0",
"size": 5265
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"org.junit.Assert"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 1,413,399 |
public void generateEndLocation(JspJavaWriter out)
throws IOException
{
out.setLocation(_filename, _endLine);
} | void function(JspJavaWriter out) throws IOException { out.setLocation(_filename, _endLine); } | /**
* Generates the start location.
*/ | Generates the start location | generateEndLocation | {
"repo_name": "christianchristensen/resin",
"path": "modules/resin/src/com/caucho/jsp/java/JspNode.java",
"license": "gpl-2.0",
"size": 51239
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,937,319 |
@PublicEvolving
public static JobExecutionResult executeRemotely(StreamExecutionEnvironment streamExecutionEnvironment,
List<URL> jarFiles,
String host,
int port,
Configuration clientConfiguration,
List<URL> globalClasspaths,
String jobName,
SavepointRestoreSettings savepointRestoreSettings
) throws ... | static JobExecutionResult function(StreamExecutionEnvironment streamExecutionEnvironment, List<URL> jarFiles, String host, int port, Configuration clientConfiguration, List<URL> globalClasspaths, String jobName, SavepointRestoreSettings savepointRestoreSettings ) throws ProgramInvocationException { StreamGraph streamGr... | /**
* Executes the job remotely.
*
* <p>This method can be used independent of the {@link StreamExecutionEnvironment} type.
* @return The result of the job execution, containing elapsed time and accumulators.
*/ | Executes the job remotely. This method can be used independent of the <code>StreamExecutionEnvironment</code> type | executeRemotely | {
"repo_name": "fhueske/flink",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java",
"license": "apache-2.0",
"size": 13355
} | [
"java.util.List",
"org.apache.flink.api.common.JobExecutionResult",
"org.apache.flink.client.program.ProgramInvocationException",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.runtime.jobgraph.SavepointRestoreSettings",
"org.apache.flink.streaming.api.graph.StreamGraph"
] | import java.util.List; import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.client.program.ProgramInvocationException; import org.apache.flink.configuration.Configuration; import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings; import org.apache.flink.streaming.api.graph.StreamGraph... | import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.client.program.*; import org.apache.flink.configuration.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.streaming.api.graph.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,922,753 |
public boolean isVisible() {
if (overlayPanel == null) {
return false;
}
return (overlayPanel.getVisibility() == View.VISIBLE);
} | boolean function() { if (overlayPanel == null) { return false; } return (overlayPanel.getVisibility() == View.VISIBLE); } | /**
* Checks if this instance is actively handling a search.
*
* @return {@code true} if there is an active search, or {@code false} otherwise.
*/ | Checks if this instance is actively handling a search | isVisible | {
"repo_name": "google/talkback",
"path": "talkback/src/main/java/com/google/android/accessibility/talkback/actor/search/SearchScreenOverlay.java",
"license": "apache-2.0",
"size": 42388
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,421,925 |
public synchronized void setNumElements(int i) {
// If index is negative thrown an error
if (i < 0) {
throw new MathIllegalArgumentException(
LocalizedFormats.INDEX_NOT_POSITIVE,
i);
}
// Test the new num elements, check to see if... | synchronized void function(int i) { if (i < 0) { throw new MathIllegalArgumentException( LocalizedFormats.INDEX_NOT_POSITIVE, i); } if ((startIndex + i) > internalArray.length) { expandTo(startIndex + i); } numElements = i; } | /**
* This function allows you to control the number of elements contained
* in this array, and can be used to "throw out" the last n values in an
* array. This function will also expand the internal array as needed.
*
* @param i a new number of elements
* @throws IllegalArgumentException ... | This function allows you to control the number of elements contained in this array, and can be used to "throw out" the last n values in an array. This function will also expand the internal array as needed | setNumElements | {
"repo_name": "scptest/scpb",
"path": "org/apache/commons/math3/util/ResizableDoubleArray.java",
"license": "gpl-3.0",
"size": 35797
} | [
"org.apache.commons.math3.exception.MathIllegalArgumentException",
"org.apache.commons.math3.exception.util.LocalizedFormats"
] | import org.apache.commons.math3.exception.MathIllegalArgumentException; import org.apache.commons.math3.exception.util.LocalizedFormats; | import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,784,710 |
@Api(1.3)
public static Halo halo() {
return Halo.instance();
} | @Api(1.3) static Halo function() { return Halo.instance(); } | /**
* Provides the HALO instance stored in the application.
*
* @return The halo instance.
*/ | Provides the HALO instance stored in the application | halo | {
"repo_name": "mobgen/halo-android",
"path": "sdk/halo-sdk/src/main/java/com/mobgen/halo/android/sdk/api/HaloApplication.java",
"license": "apache-2.0",
"size": 2178
} | [
"com.mobgen.halo.android.framework.common.annotations.Api"
] | import com.mobgen.halo.android.framework.common.annotations.Api; | import com.mobgen.halo.android.framework.common.annotations.*; | [
"com.mobgen.halo"
] | com.mobgen.halo; | 1,384,438 |
public FunctionInfo getFunction(String name) {
if (functions == null || functions.length == 0) {
System.err.println("No functions");
return null;
}
for (int i=0; i < functions.length; i++) {
if (functions[i].getName().equals(name)) {
retu... | FunctionInfo function(String name) { if (functions == null functions.length == 0) { System.err.println(STR); return null; } for (int i=0; i < functions.length; i++) { if (functions[i].getName().equals(name)) { return functions[i]; } } return null; } protected String prefix; protected String uri; protected TagInfo[] tag... | /**
* Get the FunctionInfo for a given function name, looking through all the
* functions in this tag library.
*
* @param name The name (no prefix) of the function
* @return the FunctionInfo for the function with the given name, or null
* if no such function exists
* @since 2.... | Get the FunctionInfo for a given function name, looking through all the functions in this tag library | getFunction | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java",
"license": "apache-2.0",
"size": 9644
} | [
"javax.servlet.jsp.tagext.TagFileInfo",
"javax.servlet.jsp.tagext.TagInfo"
] | import javax.servlet.jsp.tagext.TagFileInfo; import javax.servlet.jsp.tagext.TagInfo; | import javax.servlet.jsp.tagext.*; | [
"javax.servlet"
] | javax.servlet; | 2,051,302 |
public void testSetup() {
new AdvancedTableCreator().replaceTables(JUnitTestCase.getServerSession("fieldaccess"));
EmployeePopulator employeePopulator = new EmployeePopulator();
employeePopulator.buildExamples();
//Persist the examples in the database
employeePopulator.persis... | void function() { new AdvancedTableCreator().replaceTables(JUnitTestCase.getServerSession(STR)); EmployeePopulator employeePopulator = new EmployeePopulator(); employeePopulator.buildExamples(); employeePopulator.persistExample(getServerSession(STR)); clearCache(STR); } | /**
* The setup is done as a test, both to record its failure, and to allow execution in the server.
*/ | The setup is done as a test, both to record its failure, and to allow execution in the server | testSetup | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/eclipselink.jpa.test/src/org/eclipse/persistence/testing/tests/jpa/fieldaccess/advanced/SQLResultSetMappingTestSuite.java",
"license": "epl-1.0",
"size": 17539
} | [
"org.eclipse.persistence.testing.framework.junit.JUnitTestCase",
"org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.AdvancedTableCreator",
"org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.EmployeePopulator"
] | import org.eclipse.persistence.testing.framework.junit.JUnitTestCase; import org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.AdvancedTableCreator; import org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.EmployeePopulator; | import org.eclipse.persistence.testing.framework.junit.*; import org.eclipse.persistence.testing.models.jpa.fieldaccess.advanced.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,665,731 |
public static OpenOrders adaptOpenOrders(final RippleAccountOrders rippleOrders, final int scale) {
final List<LimitOrder> list = new ArrayList<LimitOrder>(rippleOrders.getOrders().size());
for (final RippleAccountOrdersBody order : rippleOrders.getOrders()) {
final OrderType orderType;
final Ri... | static OpenOrders function(final RippleAccountOrders rippleOrders, final int scale) { final List<LimitOrder> list = new ArrayList<LimitOrder>(rippleOrders.getOrders().size()); for (final RippleAccountOrdersBody order : rippleOrders.getOrders()) { final OrderType orderType; final RippleAmount baseAmount; final RippleAmo... | /**
* Adapts a Ripple Account Orders object to an XChange OpenOrders object
* <p>
* Counterparties set in additional data since there is no other way of the application receiving this information.
*/ | Adapts a Ripple Account Orders object to an XChange OpenOrders object Counterparties set in additional data since there is no other way of the application receiving this information | adaptOpenOrders | {
"repo_name": "mmithril/XChange",
"path": "xchange-ripple/src/main/java/org/knowm/xchange/ripple/RippleAdapters.java",
"license": "mit",
"size": 17555
} | [
"java.math.BigDecimal",
"java.math.RoundingMode",
"java.util.ArrayList",
"java.util.List",
"org.knowm.xchange.currency.CurrencyPair",
"org.knowm.xchange.dto.Order",
"org.knowm.xchange.dto.trade.LimitOrder",
"org.knowm.xchange.dto.trade.OpenOrders",
"org.knowm.xchange.ripple.dto.RippleAmount",
"org... | import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.LimitOrder; import org.knowm.xchange.dto.trade.OpenOrders; import org.knowm.xchange.ripple... | import java.math.*; import java.util.*; import org.knowm.xchange.currency.*; import org.knowm.xchange.dto.*; import org.knowm.xchange.dto.trade.*; import org.knowm.xchange.ripple.dto.*; import org.knowm.xchange.ripple.dto.trade.*; | [
"java.math",
"java.util",
"org.knowm.xchange"
] | java.math; java.util; org.knowm.xchange; | 2,218,392 |
public jsx3.gui.Form setKeyBinding(String strSequence)
{
String extension = "setKeyBinding(\"" + strSequence + "\").";
try
{
java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class.getConstructor(Context.class, String.class);
return ctor.newInstanc... | jsx3.gui.Form function(String strSequence) { String extension = STRSTR\")."; try { java.lang.reflect.Constructor<jsx3.gui.Form> ctor = jsx3.gui.Form.class.getConstructor(Context.class, String.class); return ctor.newInstance(this, extension); } catch (Exception ex) { throw new IllegalArgumentException(STR + jsx3.gui.For... | /**
* Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE)
event for this control.
* @param strSequence plus-delimited (e.g.,'+') key sequence such as ctrl+s or ctrl+shift+alt+h or shift+a, etc
* @return this object.
*/ | Sets the key binding that when keyed will fire the bound execute (jsx3.gui.Interactive.EXECUTE) | setKeyBinding | {
"repo_name": "burris/dwr",
"path": "ui/gi/generated/java/jsx3/gui/Tree.java",
"license": "apache-2.0",
"size": 87147
} | [
"org.directwebremoting.io.Context"
] | import org.directwebremoting.io.Context; | import org.directwebremoting.io.*; | [
"org.directwebremoting.io"
] | org.directwebremoting.io; | 1,788,908 |
Connection connection = null;
PreparedStatement prepStmt = null;
String query = SQLConstants.ADD_WORKFLOW_REQUEST_QUERY;
try {
Timestamp createdDateStamp = new Timestamp(System.currentTimeMillis());
connection = IdentityDatabaseUtil.getDBConnection();
prepStmt... | Connection connection = null; PreparedStatement prepStmt = null; String query = SQLConstants.ADD_WORKFLOW_REQUEST_QUERY; try { Timestamp createdDateStamp = new Timestamp(System.currentTimeMillis()); connection = IdentityDatabaseUtil.getDBConnection(); prepStmt = connection.prepareStatement(query); prepStmt.setString(1,... | /**
* Persists WorkflowRequest to be used when workflow is completed
*
* @param workflow The workflow object to be persisted
* @param currentUser Currently logged in user
* @param tenantId Tenant ID of the currently Logged user.
* @throws WorkflowException
*/ | Persists WorkflowRequest to be used when workflow is completed | addWorkflowEntry | {
"repo_name": "JKAUSHALYA/carbon-identity",
"path": "components/workflow-mgt/org.wso2.carbon.identity.workflow.mgt/src/main/java/org/wso2/carbon/identity/workflow/mgt/dao/WorkflowRequestDAO.java",
"license": "apache-2.0",
"size": 20177
} | [
"java.io.IOException",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Timestamp",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.identity.core.util.IdentityDatabaseUtil",
"org.wso2.carbon.identity.workflow.mgt.exception.InternalWorkflowExce... | import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Timestamp; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.core.util.IdentityDatabaseUtil; import org.wso2.carbon.identity.workflow.mgt.excepti... | import java.io.*; import java.sql.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.workflow.mgt.exception.*; import org.wso2.carbon.identity.workflow.mgt.util.*; | [
"java.io",
"java.sql",
"org.wso2.carbon"
] | java.io; java.sql; org.wso2.carbon; | 63,622 |
EReference getDocumentRoot_DataOutput(); | EReference getDocumentRoot_DataOutput(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.DocumentRoot#getDataOutput <em>Data Output</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Data Output</em>'.
* @see org.eclipse.bpmn2.DocumentRoot#getDa... | Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.DocumentRoot#getDataOutput Data Output</code>'. | getDocumentRoot_DataOutput | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,123,971 |
void setPersonalImage(byte[] personalImage) throws CantSetImageException; | void setPersonalImage(byte[] personalImage) throws CantSetImageException; | /**
* This method let the user set his personal image
*
* @param personalImage the image to ser
*/ | This method let the user set his personal image | setPersonalImage | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "fermat-pip-api/src/main/java/com/bitdubai/fermat_pip_api/layer/pip_user/device_user/interfaces/DeviceUserManager.java",
"license": "mit",
"size": 3799
} | [
"com.bitdubai.fermat_pip_api.layer.pip_user.device_user.exceptions.CantSetImageException"
] | import com.bitdubai.fermat_pip_api.layer.pip_user.device_user.exceptions.CantSetImageException; | import com.bitdubai.fermat_pip_api.layer.pip_user.device_user.exceptions.*; | [
"com.bitdubai.fermat_pip_api"
] | com.bitdubai.fermat_pip_api; | 2,036,944 |
public void createOrMigrateSchemaDirectory(String schemaDirectory,
boolean createTableAndFamilies) {
List<String> schemaStrings;
if (schemaDirectory.startsWith(CLASSPATH_PREFIX)) {
URL dirURL = getClass().getClassLoader().getResource(
schemaDirectory.substring(CLASSPATH_PREFIX.length()))... | void function(String schemaDirectory, boolean createTableAndFamilies) { List<String> schemaStrings; if (schemaDirectory.startsWith(CLASSPATH_PREFIX)) { URL dirURL = getClass().getClassLoader().getResource( schemaDirectory.substring(CLASSPATH_PREFIX.length())); if (dirURL != null && dirURL.getProtocol().equals("file")) ... | /**
* Scans the schemaDirectory for avro schemas, and creates or migrates HBase
* Common managed schemas managed by this instances entity manager.
*
* @param schemaDirectory
* The directory to recursively scan for avro schema files. This
* directory can be a directory on the classpa... | Scans the schemaDirectory for avro schemas, and creates or migrates HBase Common managed schemas managed by this instances entity manager | createOrMigrateSchemaDirectory | {
"repo_name": "cloudera/cdk",
"path": "cdk-data/cdk-data-hbase/src/main/java/com/cloudera/cdk/data/hbase/tool/SchemaTool.java",
"license": "apache-2.0",
"size": 16277
} | [
"com.cloudera.cdk.data.DatasetException",
"com.cloudera.cdk.data.SchemaValidationException",
"java.io.File",
"java.net.URISyntaxException",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.cloudera.cdk.data.DatasetException; import com.cloudera.cdk.data.SchemaValidationException; import java.io.File; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.cloudera.cdk.data.*; import java.io.*; import java.net.*; import java.util.*; | [
"com.cloudera.cdk",
"java.io",
"java.net",
"java.util"
] | com.cloudera.cdk; java.io; java.net; java.util; | 990,640 |
public XYItemRendererState initialise(Graphics2D g2, Rectangle2D dataArea,
XYPlot plot, XYDataset dataset, PlotRenderingInfo info) {
State state = new State(info);
state.seriesPath = new GeneralPath();
state.setProcessVisibleItemsOnly(false);
return state;
}
| XYItemRendererState function(Graphics2D g2, Rectangle2D dataArea, XYPlot plot, XYDataset dataset, PlotRenderingInfo info) { State state = new State(info); state.seriesPath = new GeneralPath(); state.setProcessVisibleItemsOnly(false); return state; } | /**
* Initialises and returns a state object that can be passed to each
* invocation of the {@link #drawItem} method.
*
* @param g2 the graphics target.
* @param dataArea the data area.
* @param plot the plot.
* @param dataset the dataset.
* @param info the plot rend... | Initialises and returns a state object that can be passed to each invocation of the <code>#drawItem</code> method | initialise | {
"repo_name": "linuxuser586/jfreechart",
"path": "source/org/jfree/chart/renderer/xy/DeviationRenderer.java",
"license": "lgpl-2.1",
"size": 13232
} | [
"java.awt.Graphics2D",
"java.awt.geom.GeneralPath",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.plot.PlotRenderingInfo",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.xy.XYDataset"
] | import java.awt.Graphics2D; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.PlotRenderingInfo; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 2,193,065 |
public ProcessWrapper launch(
File workDir,
OutputStream stdout,
OutputStream stderr,
String... args) throws IOException
{
final InputOutputStreamPump outP = new InputOutputStreamPump(null, stdout);
final InputOutputStreamPump errP = new InputOutputStreamPump(null, stderr);
return launc... | ProcessWrapper function( File workDir, OutputStream stdout, OutputStream stderr, String... args) throws IOException { final InputOutputStreamPump outP = new InputOutputStreamPump(null, stdout); final InputOutputStreamPump errP = new InputOutputStreamPump(null, stderr); return launch(null, outP, errP, args); } | /**
* Launches a process.
*
* @param workDir the process' working directory
* @param stdout the stream where the process' STDOUT is redirected
* @param stderr the stream where the process' STDERR is redirected
* @param args the command-line arguments
*
* @throws IOException if the process fails ... | Launches a process | launch | {
"repo_name": "fifa0329/vassal",
"path": "src/VASSAL/tools/io/ProcessLauncher.java",
"license": "lgpl-2.1",
"size": 3435
} | [
"java.io.File",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.File; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 655,599 |
public static List<Map.Entry<String,String>> getHeaders()
{
List<Map.Entry<String,String>> headers;
headers = new ArrayList<Map.Entry<String,String>>();
HttpServletRequest http = getHttpServletRequest();
if(http != null)
{
for(Enumeration n=http.getH... | static List<Map.Entry<String,String>> function() { List<Map.Entry<String,String>> headers; headers = new ArrayList<Map.Entry<String,String>>(); HttpServletRequest http = getHttpServletRequest(); if(http != null) { for(Enumeration n=http.getHeaderNames(); n.hasMoreElements();) { String name = (String) n.nextElement(); f... | /**
* Returns all HTTP headers as key-value pairs. Since headers can be listed
* more than once, it is possible that a header key can have multiple
* values. The resulting List may be empty, but never {@code null}.
*/ | Returns all HTTP headers as key-value pairs. Since headers can be listed more than once, it is possible that a header key can have multiple values. The resulting List may be empty, but never null | getHeaders | {
"repo_name": "55minutes/fiftyfive-wicket-2.x",
"path": "src/main/java/fiftyfive/wicket/util/HttpUtils.java",
"license": "apache-2.0",
"size": 5961
} | [
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List",
"java.util.Map",
"javax.servlet.http.HttpServletRequest"
] | import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; | import java.util.*; import javax.servlet.http.*; | [
"java.util",
"javax.servlet"
] | java.util; javax.servlet; | 2,426,139 |
private void updateVisibility(DifferenceOverlay overlay, BiMap<DifferenceOverlay, View> overlayToViewMap,
Map<DifferenceOverlay, OverlayVisibility> visibilityCache) {
OverlayVisibility overlayVisibility = calculateOverlayVisibility(overlay, visibilityCache,
new HashSet<DifferenceOverlay>());
View view =... | void function(DifferenceOverlay overlay, BiMap<DifferenceOverlay, View> overlayToViewMap, Map<DifferenceOverlay, OverlayVisibility> visibilityCache) { OverlayVisibility overlayVisibility = calculateOverlayVisibility(overlay, visibilityCache, new HashSet<DifferenceOverlay>()); View view = overlayToViewMap.get(overlay); ... | /**
* updates the visibility if the given overlay with respect to the overlays
* it depends on.
*
* @param overlay
* the overlay to update.
* @param overlayToViewMap
* the index used to map an overlay to a view.
* @param visibilityCache
* a cache to containing the alr... | updates the visibility if the given overlay with respect to the overlays it depends on | updateVisibility | {
"repo_name": "theArchonius/mervin",
"path": "plugins/at.bitandart.zoubek.mervin/src/at/bitandart/zoubek/mervin/diagram/diff/ApplyOverlayVisibilityStateCommand.java",
"license": "epl-1.0",
"size": 8393
} | [
"at.bitandart.zoubek.mervin.model.modelreview.DifferenceOverlay",
"com.google.common.collect.BiMap",
"java.util.HashSet",
"java.util.Map",
"org.eclipse.gmf.runtime.notation.View"
] | import at.bitandart.zoubek.mervin.model.modelreview.DifferenceOverlay; import com.google.common.collect.BiMap; import java.util.HashSet; import java.util.Map; import org.eclipse.gmf.runtime.notation.View; | import at.bitandart.zoubek.mervin.model.modelreview.*; import com.google.common.collect.*; import java.util.*; import org.eclipse.gmf.runtime.notation.*; | [
"at.bitandart.zoubek",
"com.google.common",
"java.util",
"org.eclipse.gmf"
] | at.bitandart.zoubek; com.google.common; java.util; org.eclipse.gmf; | 971,658 |
public double getRotation() {
return this.rotation;
}
public Tower(TowerType type, double x, double y) {
this.baseType = this.type = type;
this.x = x;
this.y = y;
this.gun = new Gun(type.projectiles, type.range, x + 0.5 * type.width, y + 0.5 * type.height);
this.appliedUpgrades = new ArrayL... | double function() { return this.rotation; } public Tower(TowerType type, double x, double y) { this.baseType = this.type = type; this.x = x; this.y = y; this.gun = new Gun(type.projectiles, type.range, x + 0.5 * type.width, y + 0.5 * type.height); this.appliedUpgrades = new ArrayList<>(); } public Tower(TowerType type,... | /**
* <ul>
* <li><b><i>getRotation</i></b><br>
* <br>
* {@code double getRotation()}<br>
* <br>
* @return this tower's rotation in radians.
* </ul>
*/ | getRotation double getRotation() | getRotation | {
"repo_name": "ricky3350/Terrain-TD",
"path": "src/terraintd/object/Tower.java",
"license": "mit",
"size": 2687
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,138,703 |
public static String biToHex(final BigInteger bigInteger) {
return HexString.bufferToHex(bigInteger.toByteArray());
} | static String function(final BigInteger bigInteger) { return HexString.bufferToHex(bigInteger.toByteArray()); } | /**
* Returns a string containing the hexadecimal representation of the input BigInteger. Each byte in the input array is converted to a two-digit hexadecimal value. Thus the
* returned string is twice the length of the input byte array. The output hex characters are upper case.
*
* @param bigIntege... | Returns a string containing the hexadecimal representation of the input BigInteger. Each byte in the input array is converted to a two-digit hexadecimal value. Thus the returned string is twice the length of the input byte array. The output hex characters are upper case | biToHex | {
"repo_name": "jurgendl/jhaws",
"path": "jhaws/media/src/main/java/org/jhaws/common/io/media/images/HexString.java",
"license": "mit",
"size": 15635
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,438,135 |
private static String urlEncode(final String text) throws UnsupportedEncodingException {
return URLEncoder.encode(text, "UTF-8");
}
public static class Graph {
private final String name;
private final Set<Plotter> plotters = new LinkedHashSet<Plotter>();
... | static String function(final String text) throws UnsupportedEncodingException { return URLEncoder.encode(text, "UTF-8"); } public static class Graph { private final String name; private final Set<Plotter> plotters = new LinkedHashSet<Plotter>(); private Graph(final String name) { this.name = name; } | /**
* Encode text as UTF-8
*
* @param text the text to encode
* @return the encoded text, as UTF-8
*/ | Encode text as UTF-8 | urlEncode | {
"repo_name": "GravityCraftMC/Core",
"path": "src/main/java/com/gravitymc/core/utils/Metrics.java",
"license": "gpl-3.0",
"size": 25683
} | [
"java.io.UnsupportedEncodingException",
"java.net.URLEncoder",
"java.util.LinkedHashSet",
"java.util.Set"
] | import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.LinkedHashSet; import java.util.Set; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 2,242,860 |
@Test
public final void fetchesPath() throws Exception {
final Content content = Mockito.mock(Content.class);
final String path = "this is some path";
Mockito.doReturn(path).when(content).path();
MatcherAssert.assertThat(
new Content.Smart(content).path(),
... | final void function() throws Exception { final Content content = Mockito.mock(Content.class); final String path = STR; Mockito.doReturn(path).when(content).path(); MatcherAssert.assertThat( new Content.Smart(content).path(), Matchers.is(path) ); } | /**
* Content.Smart can fetch path property from Content.
* @throws Exception If some problem inside
*/ | Content.Smart can fetch path property from Content | fetchesPath | {
"repo_name": "cvrebert/typed-github",
"path": "src/test/java/com/jcabi/github/ContentTest.java",
"license": "bsd-3-clause",
"size": 8686
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.mockito.Mockito"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.mockito.Mockito; | import org.hamcrest.*; import org.mockito.*; | [
"org.hamcrest",
"org.mockito"
] | org.hamcrest; org.mockito; | 1,508,539 |
public RoundedTransformationBuilder cornerRadiusDp(float radius) {
return cornerRadius(
TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, radius, mDisplayMetrics));
} | RoundedTransformationBuilder function(float radius) { return cornerRadius( TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, radius, mDisplayMetrics)); } | /**
* Set corner radius for all corners in density independent pixels.
*
* @param radius the radius in density independent pixels.
* @return the builder for chaining.
*/ | Set corner radius for all corners in density independent pixels | cornerRadiusDp | {
"repo_name": "hanqiongly/JCMusicPlayer",
"path": "app/src/main/java/com/jack/music/widgets/roundedimageview/RoundedTransformationBuilder.java",
"license": "apache-2.0",
"size": 5324
} | [
"android.util.TypedValue"
] | import android.util.TypedValue; | import android.util.*; | [
"android.util"
] | android.util; | 1,781,358 |
if (image == null) return null; // no image available
ImageIcon icon = new ImageIcon(image);
return new JLabel(icon);
} | if (image == null) return null; ImageIcon icon = new ImageIcon(image); return new JLabel(icon); } | /**
* Returns a JLabel containing this picture, for embedding in a JPanel,
* JFrame or other GUI widget.
*
* @return the <tt>JLabel</tt>
*/ | Returns a JLabel containing this picture, for embedding in a JPanel, JFrame or other GUI widget | getJLabel | {
"repo_name": "gjgj821/fortress",
"path": "src/main/java/stdlib/Picture.java",
"license": "mit",
"size": 12484
} | [
"javax.swing.ImageIcon",
"javax.swing.JLabel"
] | import javax.swing.ImageIcon; import javax.swing.JLabel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,522,931 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.