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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testCloning() throws CloneNotSupportedException {
LineAndShapeRenderer r1 = new LineAndShapeRenderer();
LineAndShapeRenderer r2 = (LineAndShapeRenderer) r1.clone();
assertNotSame(r1, r2);
assertSame(r1.getClass(), r2.getClass());
assertEquals(r1, r2);
... | void function() throws CloneNotSupportedException { LineAndShapeRenderer r1 = new LineAndShapeRenderer(); LineAndShapeRenderer r2 = (LineAndShapeRenderer) r1.clone(); assertNotSame(r1, r2); assertSame(r1.getClass(), r2.getClass()); assertEquals(r1, r2); assertTrue(checkIndependence(r1, r2)); } | /**
* Confirm that cloning works.
*/ | Confirm that cloning works | testCloning | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/test/java/org/jfree/chart/renderer/category/LineAndShapeRendererTest.java",
"license": "gpl-3.0",
"size": 10135
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,820,022 |
public void handleServerPing(Packet254ServerPing par1Packet254ServerPing)
{
if (this.getSocket() == null) // MCPC+ - remove myTCPConnection
{
return; // CraftBukkit - fix NPE when a client queries a server that is unable to handle it.
}
try
{
S... | void function(Packet254ServerPing par1Packet254ServerPing) { if (this.getSocket() == null) { return; } try { ServerConfigurationManager serverconfigurationmanager = this.mcServer.getConfigurationManager(); String s = null; org.bukkit.event.server.ServerListPingEvent pingEvent = org.bukkit.craftbukkit.event.CraftEventFa... | /**
* Handle a server ping packet.
*/ | Handle a server ping packet | handleServerPing | {
"repo_name": "wildex999/stjerncraft_mcpc",
"path": "src/minecraft/net/minecraft/network/NetLoginHandler.java",
"license": "gpl-3.0",
"size": 14110
} | [
"java.net.InetAddress",
"net.minecraft.network.packet.Packet254ServerPing",
"net.minecraft.network.packet.Packet255KickDisconnect",
"net.minecraft.server.dedicated.DedicatedServerListenThread",
"net.minecraft.server.management.ServerConfigurationManager",
"net.minecraft.util.StringUtils"
] | import java.net.InetAddress; import net.minecraft.network.packet.Packet254ServerPing; import net.minecraft.network.packet.Packet255KickDisconnect; import net.minecraft.server.dedicated.DedicatedServerListenThread; import net.minecraft.server.management.ServerConfigurationManager; import net.minecraft.util.StringUtils; | import java.net.*; import net.minecraft.network.packet.*; import net.minecraft.server.dedicated.*; import net.minecraft.server.management.*; import net.minecraft.util.*; | [
"java.net",
"net.minecraft.network",
"net.minecraft.server",
"net.minecraft.util"
] | java.net; net.minecraft.network; net.minecraft.server; net.minecraft.util; | 761,735 |
BatchTrans startBatchTrans() throws KrbException; | BatchTrans startBatchTrans() throws KrbException; | /**
* Start a transaction.
* @return xtrans The batch trans
* @throws KrbException e
*/ | Start a transaction | startBatchTrans | {
"repo_name": "plusplusjiajia/directory-kerby",
"path": "kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/IdentityService.java",
"license": "apache-2.0",
"size": 3198
} | [
"org.apache.kerby.kerberos.kerb.KrbException"
] | import org.apache.kerby.kerberos.kerb.KrbException; | import org.apache.kerby.kerberos.kerb.*; | [
"org.apache.kerby"
] | org.apache.kerby; | 2,344,086 |
@ObjectiveCName("generateRSA1024KeyPair")
CryptoKeyPair generateRSA1024KeyPair(); | @ObjectiveCName(STR) CryptoKeyPair generateRSA1024KeyPair(); | /**
* Generation of RSA 1024 bit key pair
*
* @return generated key pair
*/ | Generation of RSA 1024 bit key pair | generateRSA1024KeyPair | {
"repo_name": "dsaved/africhat-platform-0.1",
"path": "actor-apps/runtime/src/main/java/im/AfriChat/runtime/CryptoRuntime.java",
"license": "mit",
"size": 2058
} | [
"com.google.j2objc.annotations.ObjectiveCName"
] | import com.google.j2objc.annotations.ObjectiveCName; | import com.google.j2objc.annotations.*; | [
"com.google.j2objc"
] | com.google.j2objc; | 1,925,982 |
public boolean isValid() {
try {
validate();
} catch (ValidationException vex) {
return false;
}
return true;
} | boolean function() { try { validate(); } catch (ValidationException vex) { return false; } return true; } | /**
* Method isValid.
*
* @return true if this object is valid according to the schema
*/ | Method isValid | isValid | {
"repo_name": "rdkgit/opennms",
"path": "opennms-correlation/drools-correlation-engine/src/main/java/org/opennms/netmgt/correlation/drools/config/EngineConfiguration.java",
"license": "agpl-3.0",
"size": 11459
} | [
"org.exolab.castor.xml.ValidationException"
] | import org.exolab.castor.xml.ValidationException; | import org.exolab.castor.xml.*; | [
"org.exolab.castor"
] | org.exolab.castor; | 750,054 |
public List<Patch> patchMake(String text1, Deque<Diff> diffs) {
if (text1 == null || diffs == null) {
throw new IllegalArgumentException("Null inputs. (patch_make)");
}
List<Patch> patches = new LinkedList<>();
if (diffs.isEmpty()) {
return patches; // Get r... | List<Patch> function(String text1, Deque<Diff> diffs) { if (text1 == null diffs == null) { throw new IllegalArgumentException(STR); } List<Patch> patches = new LinkedList<>(); if (diffs.isEmpty()) { return patches; } Patch patch = new Patch(); int charCount1 = 0; int charCount2 = 0; String prepatchText = text1; String ... | /**
* Compute a list of patches to turn text1 into text2.
* text2 is not provided, diffs are the delta between text1 and text2.
* @param text1 Old text.
* @param diffs Array of Diff objects for text1 to text2.
* @return Deque of Patch objects.
*/ | Compute a list of patches to turn text1 into text2. text2 is not provided, diffs are the delta between text1 and text2 | patchMake | {
"repo_name": "ron190/jsql-injection",
"path": "model/src/main/java/com/jsql/model/injection/strategy/blind/patch/DiffMatchPatch.java",
"license": "gpl-2.0",
"size": 99358
} | [
"java.util.Deque",
"java.util.LinkedList",
"java.util.List"
] | import java.util.Deque; import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,167,398 |
HttpParams httpClientParams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpClientParams, config.getConnectionTimeout());
HttpConnectionParams.setSoTimeout(httpClientParams, config.getSocketTimeout());
HttpConnectionParams.setStaleCheckingEnabled(httpClientParams, ... | HttpParams httpClientParams = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(httpClientParams, config.getConnectionTimeout()); HttpConnectionParams.setSoTimeout(httpClientParams, config.getSocketTimeout()); HttpConnectionParams.setStaleCheckingEnabled(httpClientParams, true); HttpConnectionParams.setT... | /**
* Creates a new HttpClient object using the specified AWS
* ClientConfiguration to configure the client.
*
* @param config
* Client configuration options (ex: proxy settings, connection
* limits, etc).
*
* @return The new, configured HttpClient.
*/ | Creates a new HttpClient object using the specified AWS ClientConfiguration to configure the client | createHttpClient | {
"repo_name": "sdole/aws-sdk-java",
"path": "aws-java-sdk-core/src/main/java/com/amazonaws/http/HttpClientFactory.java",
"license": "apache-2.0",
"size": 15435
} | [
"com.amazonaws.http.conn.SdkConnectionKeepAliveStrategy",
"com.amazonaws.http.conn.ssl.SdkTLSSocketFactory",
"com.amazonaws.http.impl.client.HttpRequestNoRetryHandler",
"com.amazonaws.http.impl.client.SdkHttpClient",
"javax.net.ssl.SSLContext",
"org.apache.http.HttpHost",
"org.apache.http.HttpRequestInt... | import com.amazonaws.http.conn.SdkConnectionKeepAliveStrategy; import com.amazonaws.http.conn.ssl.SdkTLSSocketFactory; import com.amazonaws.http.impl.client.HttpRequestNoRetryHandler; import com.amazonaws.http.impl.client.SdkHttpClient; import javax.net.ssl.SSLContext; import org.apache.http.HttpHost; import org.apache... | import com.amazonaws.http.conn.*; import com.amazonaws.http.conn.ssl.*; import com.amazonaws.http.impl.client.*; import javax.net.ssl.*; import org.apache.http.*; import org.apache.http.auth.*; import org.apache.http.conn.params.*; import org.apache.http.conn.scheme.*; import org.apache.http.conn.ssl.*; import org.apac... | [
"com.amazonaws.http",
"javax.net",
"org.apache.http"
] | com.amazonaws.http; javax.net; org.apache.http; | 1,884,058 |
@Endpoint(
describeByClass = true
)
public static <T extends TType> RestoreSlice<T> create(Scope scope, Operand<TString> filePattern,
Operand<TString> tensorName, Operand<TString> shapeAndSlice, Class<T> dt,
Options... options) {
OperationBuilder opBuilder = scope.opBuilder(OP_NAME, "Restore... | @Endpoint( describeByClass = true ) static <T extends TType> RestoreSlice<T> function(Scope scope, Operand<TString> filePattern, Operand<TString> tensorName, Operand<TString> shapeAndSlice, Class<T> dt, Options... options) { OperationBuilder opBuilder = scope.opBuilder(OP_NAME, STR); opBuilder.addInput(filePattern.asOu... | /**
* Factory method to create a class wrapping a new RestoreSlice operation.
*
* @param scope current scope
* @param filePattern Must have a single element. The pattern of the files from
* which we read the tensor.
* @param tensorName Must have a single element. The name of the tensor to be
* rest... | Factory method to create a class wrapping a new RestoreSlice operation | create | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/train/RestoreSlice.java",
"license": "apache-2.0",
"size": 6315
} | [
"org.tensorflow.Operand",
"org.tensorflow.OperationBuilder",
"org.tensorflow.op.Operands",
"org.tensorflow.op.Scope",
"org.tensorflow.op.annotation.Endpoint",
"org.tensorflow.types.TString",
"org.tensorflow.types.family.TType"
] | import org.tensorflow.Operand; import org.tensorflow.OperationBuilder; import org.tensorflow.op.Operands; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.types.TString; import org.tensorflow.types.family.TType; | import org.tensorflow.*; import org.tensorflow.op.*; import org.tensorflow.op.annotation.*; import org.tensorflow.types.*; import org.tensorflow.types.family.*; | [
"org.tensorflow",
"org.tensorflow.op",
"org.tensorflow.types"
] | org.tensorflow; org.tensorflow.op; org.tensorflow.types; | 1,216,375 |
public void resizeRange(double percent, double anchorValue) {
if (percent > 0.0) {
double halfLength = this.range.getLength() * percent / 2;
Range adjusted = new Range(anchorValue - halfLength,
anchorValue + halfLength);
setRange(adjusted);
}
... | void function(double percent, double anchorValue) { if (percent > 0.0) { double halfLength = this.range.getLength() * percent / 2; Range adjusted = new Range(anchorValue - halfLength, anchorValue + halfLength); setRange(adjusted); } else { setAutoRange(true); } } | /**
* Increases or decreases the axis range by the specified percentage about
* the specified anchor value and sends an {@link AxisChangeEvent} to all
* registered listeners.
* <P>
* To double the length of the axis range, use 200% (2.0).
* To halve the length of the axis range, use 50% (0... | Increases or decreases the axis range by the specified percentage about the specified anchor value and sends an <code>AxisChangeEvent</code> to all registered listeners. To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5) | resizeRange | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/chart/axis/ValueAxis.java",
"license": "gpl-3.0",
"size": 58096
} | [
"org.jfree.data.Range"
] | import org.jfree.data.Range; | import org.jfree.data.*; | [
"org.jfree.data"
] | org.jfree.data; | 701,864 |
@Test
void testCustomDistandceComputer()
{
assertThrows(() -> attacker.setAttackDistanceComputer(null), "Unexpected null argument !");
canAttack.set(true);
attacker.setAttackChecker(t -> canAttack.get());
final Transformable target = new TransformableModel(services,... | void testCustomDistandceComputer() { assertThrows(() -> attacker.setAttackDistanceComputer(null), STR); canAttack.set(true); attacker.setAttackChecker(t -> canAttack.get()); final Transformable target = new TransformableModel(services, setup); target.teleport(1, 1); attacker.setAttackDistanceComputer((s, t) -> 5); atta... | /**
* Test the custom distance computer.
*/ | Test the custom distance computer | testCustomDistandceComputer | {
"repo_name": "b3dgs/lionengine",
"path": "lionengine-game/src/test/java/com/b3dgs/lionengine/game/feature/attackable/AttackerModelTest.java",
"license": "gpl-3.0",
"size": 13911
} | [
"com.b3dgs.lionengine.UtilAssert",
"com.b3dgs.lionengine.game.feature.Transformable",
"com.b3dgs.lionengine.game.feature.TransformableModel"
] | import com.b3dgs.lionengine.UtilAssert; import com.b3dgs.lionengine.game.feature.Transformable; import com.b3dgs.lionengine.game.feature.TransformableModel; | import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.game.feature.*; | [
"com.b3dgs.lionengine"
] | com.b3dgs.lionengine; | 1,427,448 |
void store() {
boolean needsRestart = (cbJoinAutoIngestCluster.isSelected() != AutoIngestUserPreferences.getJoinAutoModeCluster());
AutoIngestUserPreferences.setJoinAutoModeCluster(cbJoinAutoIngestCluster.isSelected());
if (!cbJoinAutoIngestCluster.isSelected()) {
UserPr... | void store() { boolean needsRestart = (cbJoinAutoIngestCluster.isSelected() != AutoIngestUserPreferences.getJoinAutoModeCluster()); AutoIngestUserPreferences.setJoinAutoModeCluster(cbJoinAutoIngestCluster.isSelected()); if (!cbJoinAutoIngestCluster.isSelected()) { UserPreferences.setMode(UserPreferences.SelectedMode.ST... | /**
* Save mode to persistent storage.
*/ | Save mode to persistent storage | store | {
"repo_name": "dgrove727/autopsy",
"path": "Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java",
"license": "apache-2.0",
"size": 62205
} | [
"javax.swing.JOptionPane",
"javax.swing.SwingUtilities",
"org.openide.util.NbBundle",
"org.sleuthkit.autopsy.core.UserPreferences"
] | import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.core.UserPreferences; | import javax.swing.*; import org.openide.util.*; import org.sleuthkit.autopsy.core.*; | [
"javax.swing",
"org.openide.util",
"org.sleuthkit.autopsy"
] | javax.swing; org.openide.util; org.sleuthkit.autopsy; | 153,305 |
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "konto_id")
public KontoDO getKonto()
{
return konto;
} | @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = STR) KontoDO function() { return konto; } | /**
* This Datev account number is used for the exports of invoices. If not given then the account number assigned to the KundeDO is used instead (default).
* @return
*/ | This Datev account number is used for the exports of invoices. If not given then the account number assigned to the KundeDO is used instead (default) | getKonto | {
"repo_name": "micromata/projectforge-webapp",
"path": "src/main/java/org/projectforge/fibu/ProjektDO.java",
"license": "gpl-3.0",
"size": 7530
} | [
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,181,503 |
public void display(ParticleData data, Vector direction, float speed, Location center, double range) throws ParticleVersionException, ParticleDataException {
if (!isSupported()) {
throw new ParticleVersionException("The " + this + " particle effect is not supported by your server version " + Par... | void function(ParticleData data, Vector direction, float speed, Location center, double range) throws ParticleVersionException, ParticleDataException { if (!isSupported()) { throw new ParticleVersionException(STR + this + STR + ParticlePacket.getVersion()); } if (!requiresData) { throw new ParticleDataException(STR + t... | /**
* Displays a single particle which requires additional data that flies into a determined direction and is only visible for all players within a certain range in the world of @param center
*
* @param data Data of the effect
* @param direction Direction of the particle
* @param speed Display ... | Displays a single particle which requires additional data that flies into a determined direction and is only visible for all players within a certain range in the world of @param center | display | {
"repo_name": "axelrindle/ParticleEffectLib",
"path": "src/main/java/de/lalo5/particleeffectlib/util/ParticleEffect.java",
"license": "mit",
"size": 60607
} | [
"org.bukkit.Location",
"org.bukkit.util.Vector"
] | import org.bukkit.Location; import org.bukkit.util.Vector; | import org.bukkit.*; import org.bukkit.util.*; | [
"org.bukkit",
"org.bukkit.util"
] | org.bukkit; org.bukkit.util; | 1,750,543 |
private static int getEncryptedPacketLength(ChannelBuffer buffer) {
if (buffer.readableBytes() < 5) {
throw new IllegalArgumentException("buffer must have at least 5 readable bytes");
}
int packetLength = 0;
// SSLv3 or TLS - Check ContentType
boolean tls;
switch (buffer.getUnsignedByte(buffer.reade... | static int function(ChannelBuffer buffer) { if (buffer.readableBytes() < 5) { throw new IllegalArgumentException(STR); } int packetLength = 0; boolean tls; switch (buffer.getUnsignedByte(buffer.readerIndex())) { case 20: case 21: case 22: case 23: tls = true; break; default: tls = false; } if (tls) { int majorVersion =... | /**
* Return how much bytes can be read out of the encrypted data. Be aware
* that this method will not increase the readerIndex of the given
* {@link ChannelBuffer}.
*
* @param buffer
* The {@link ChannelBuffer} to read from. Be aware that it must
* have at least 5 bytes to read, o... | Return how much bytes can be read out of the encrypted data. Be aware that this method will not increase the readerIndex of the given <code>ChannelBuffer</code> | getEncryptedPacketLength | {
"repo_name": "infinitiessoft/skyport-websockify",
"path": "src/main/java/com/infinities/skyport/vnc/handler/SslHandler.java",
"license": "apache-2.0",
"size": 49068
} | [
"org.jboss.netty.buffer.ChannelBuffer"
] | import org.jboss.netty.buffer.ChannelBuffer; | import org.jboss.netty.buffer.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 2,795,510 |
public static long copy(Reader reader, Writer writer, int bufferSize) throws IOException {
final char[] buffer = new char[bufferSize];
long count = 0;
int n;
while ( -1 != ( n = reader.read( buffer ) ) ) {
writer.write( buffer, 0, n );
count += n;
}
return count;
}
private StreamUtils() {
} | static long function(Reader reader, Writer writer, int bufferSize) throws IOException { final char[] buffer = new char[bufferSize]; long count = 0; int n; while ( -1 != ( n = reader.read( buffer ) ) ) { writer.write( buffer, 0, n ); count += n; } return count; } private StreamUtils() { } | /**
* Copy the reader to the writer using a buffer of the specified size
*
* @param reader The reader to read from
* @param writer The writer to write to
* @param bufferSize The size of the buffer to use for reading
*
* @return The number of bytes read
*
* @throws IOException If a problem occurred acc... | Copy the reader to the writer using a buffer of the specified size | copy | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/engine/jdbc/StreamUtils.java",
"license": "lgpl-2.1",
"size": 3758
} | [
"java.io.IOException",
"java.io.Reader",
"java.io.Writer"
] | import java.io.IOException; import java.io.Reader; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,525,524 |
public static String getFailureDescriptionAsString(final ModelNode result)
{
if (isSuccessfulOutcome(result))
{
return "";
}
final String msg;
if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION))
{
if (result.hasDefined(ClientConstants.OP))
{
msg = String.format("Operation '%s' at ad... | static String function(final ModelNode result) { if (isSuccessfulOutcome(result)) { return STROperation '%s' at address '%s' failed: %sSTROperation failed: %sSTRAn unexpected response was found checking the deployment. Result: %s", result); } return msg; } | /**
* Parses the result and returns the failure description. If the result was successful, an empty
* string is returned.
*
* @param result the result of executing an operation
*
* @return the failure message or an empty string
*/ | Parses the result and returns the failure description. If the result was successful, an empty string is returned | getFailureDescriptionAsString | {
"repo_name": "gcvt/siebog",
"path": "siebog/src/org/wildfly/plugin/common/ServerOperations.java",
"license": "apache-2.0",
"size": 7104
} | [
"org.jboss.dmr.ModelNode"
] | import org.jboss.dmr.ModelNode; | import org.jboss.dmr.*; | [
"org.jboss.dmr"
] | org.jboss.dmr; | 1,794,525 |
void cleanupFiles() {
if (directory != null) {
deleteDirectory(directory);
}
for (Map<DirectoryHolder, Path> diskStoreDirToTempDirMap : diskStoreDirDirsByDiskStore
.values()) {
for (Path tempDir : diskStoreDirToTempDirMap.values()) {
deleteDirectory(tempDir);
}
}
} | void cleanupFiles() { if (directory != null) { deleteDirectory(directory); } for (Map<DirectoryHolder, Path> diskStoreDirToTempDirMap : diskStoreDirDirsByDiskStore .values()) { for (Path tempDir : diskStoreDirToTempDirMap.values()) { deleteDirectory(tempDir); } } } | /**
* Attempts to delete all temporary directories and their contents. An attempt will be made to
* delete each directory, regardless of the failure to delete any particular one.
*/ | Attempts to delete all temporary directories and their contents. An attempt will be made to delete each directory, regardless of the failure to delete any particular one | cleanupFiles | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/backup/TemporaryBackupFiles.java",
"license": "apache-2.0",
"size": 5584
} | [
"java.nio.file.Path",
"java.util.Map",
"org.apache.geode.internal.cache.DirectoryHolder"
] | import java.nio.file.Path; import java.util.Map; import org.apache.geode.internal.cache.DirectoryHolder; | import java.nio.file.*; import java.util.*; import org.apache.geode.internal.cache.*; | [
"java.nio",
"java.util",
"org.apache.geode"
] | java.nio; java.util; org.apache.geode; | 1,692,249 |
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
| void function(BigDecimal quantity) { this.quantity = quantity; } | /**
* Sets the quantity.
* @param quantity The quantity to set
*/ | Sets the quantity | setQuantity | {
"repo_name": "othmanelmoulat/jbilling-2.2-Extentions",
"path": "src/classes/com/sapienter/jbilling/client/order/OrderAddItemForm.java",
"license": "agpl-3.0",
"size": 2086
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 701,105 |
@Test(expected = IllegalArgumentException.class)
public void buildOslpMessageIncorrectSignature() throws IOException, NoSuchAlgorithmException,
InvalidKeySpecException, NoSuchProviderException {
final byte[] deviceId = new byte[] { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
final byte[] s... | @Test(expected = IllegalArgumentException.class) void function() throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchProviderException { final byte[] deviceId = new byte[] { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; final byte[] sequenceNumber = new byte[] { 0, 1 }; final Message message = this.bui... | /**
* Valid must fail when decryption fails using incorrect keys
*
* @throws IOException
* @throws NoSuchAlgorithmException
* @throws InvalidKeySpecException
* @throws NoSuchProviderException
*/ | Valid must fail when decryption fails using incorrect keys | buildOslpMessageIncorrectSignature | {
"repo_name": "OSGP/Protocol-Adapter-OSLP",
"path": "oslp/src/test/java/org/opensmartgridplatform/oslp/OslpEnvelopeRsaTest.java",
"license": "apache-2.0",
"size": 11953
} | [
"java.io.IOException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.spec.InvalidKeySpecException",
"org.junit.Test",
"org.opensmartgridplatform.oslp.Oslp",
"org.opensmartgridplatform.shared.security.CertificateHelper"
] | import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.spec.InvalidKeySpecException; import org.junit.Test; import org.opensmartgridplatform.oslp.Oslp; import org.opensmartgridplatform.shared.security.CertificateHelper; | import java.io.*; import java.security.*; import java.security.spec.*; import org.junit.*; import org.opensmartgridplatform.oslp.*; import org.opensmartgridplatform.shared.security.*; | [
"java.io",
"java.security",
"org.junit",
"org.opensmartgridplatform.oslp",
"org.opensmartgridplatform.shared"
] | java.io; java.security; org.junit; org.opensmartgridplatform.oslp; org.opensmartgridplatform.shared; | 2,476,067 |
public Object createObject(XMLControl control) {
return new DrawableShape(new GeneralPath(), 0, 0); // default shape is a path
} | Object function(XMLControl control) { return new DrawableShape(new GeneralPath(), 0, 0); } | /**
* Creates the DrawableShape containing a GeneralPath.
* @param control XMLControl
* @return Object
*/ | Creates the DrawableShape containing a GeneralPath | createObject | {
"repo_name": "OpenSourcePhysics/osp",
"path": "src/org/opensourcephysics/display/DrawableShapeLoader.java",
"license": "gpl-3.0",
"size": 3972
} | [
"java.awt.geom.GeneralPath",
"org.opensourcephysics.controls.XMLControl"
] | import java.awt.geom.GeneralPath; import org.opensourcephysics.controls.XMLControl; | import java.awt.geom.*; import org.opensourcephysics.controls.*; | [
"java.awt",
"org.opensourcephysics.controls"
] | java.awt; org.opensourcephysics.controls; | 666,925 |
public void setScope(String aFrom)
{
mScope = Scope.getInstance(aFrom);
} | void function(String aFrom) { mScope = Scope.getInstance(aFrom); } | /**
* Sets the scope to check.
* @param aFrom string to get the scope from
*/ | Sets the scope to check | setScope | {
"repo_name": "pbaranchikov/checkstyle",
"path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocVariableCheck.java",
"license": "lgpl-2.1",
"size": 3750
} | [
"com.puppycrawl.tools.checkstyle.api.Scope"
] | import com.puppycrawl.tools.checkstyle.api.Scope; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,115,327 |
@Test
public void simpleTest_shouldSave() throws FileNotFoundException, XMLStreamException, TransformerException {
File testCoverageFile = TestUtils.getResource("OpenCoverCoverageParser/coverage-report.xml");
new OpenCoverModuleSplitter(coverageModuleSaver,coverageHashes,log).splitCoverageFileInFilePerMod... | void function() throws FileNotFoundException, XMLStreamException, TransformerException { File testCoverageFile = TestUtils.getResource(STR); new OpenCoverModuleSplitter(coverageModuleSaver,coverageHashes,log).splitCoverageFileInFilePerModule(root, projectName, testCoverageFile); verify(coverageModuleSaver,times(34)).sa... | /**
* The sample file should lead to 34 save actions.
*
* @throws FileNotFoundException
* @throws XMLStreamException
* @throws TransformerException
*/ | The sample file should lead to 34 save actions | simpleTest_shouldSave | {
"repo_name": "peterstevens130561/sonar-mscover",
"path": "src/test/java/com/stevpet/sonar/plugins/dotnet/mscover/modulesaver/OpenCoverModuleSplitterTest.java",
"license": "gpl-2.0",
"size": 3828
} | [
"com.stevpet.sonar.plugins.dotnet.mscover.modulesaver.OpenCoverModuleSplitter",
"java.io.File",
"java.io.FileNotFoundException",
"javax.xml.stream.XMLStreamException",
"javax.xml.transform.TransformerException",
"org.mockito.Mockito",
"org.sonar.test.TestUtils"
] | import com.stevpet.sonar.plugins.dotnet.mscover.modulesaver.OpenCoverModuleSplitter; import java.io.File; import java.io.FileNotFoundException; import javax.xml.stream.XMLStreamException; import javax.xml.transform.TransformerException; import org.mockito.Mockito; import org.sonar.test.TestUtils; | import com.stevpet.sonar.plugins.dotnet.mscover.modulesaver.*; import java.io.*; import javax.xml.stream.*; import javax.xml.transform.*; import org.mockito.*; import org.sonar.test.*; | [
"com.stevpet.sonar",
"java.io",
"javax.xml",
"org.mockito",
"org.sonar.test"
] | com.stevpet.sonar; java.io; javax.xml; org.mockito; org.sonar.test; | 971,911 |
private boolean sendDateValue(String value, WebElement element) {
if (element != null && element.isDisplayed()) {
element.click();
element.sendKeys(value);
element.click();
return true;
} else {
return false;
}
} | boolean function(String value, WebElement element) { if (element != null && element.isDisplayed()) { element.click(); element.sendKeys(value); element.click(); return true; } else { return false; } } | /**
* Inserts a value into the date div element.
*
* @param value
* the value to insert
* @param element
* the date element (day, month or year field)
* @return {@code true} if {@code value} was insert successful,
* {@code false} otherwise
*/ | Inserts a value into the date div element | sendDateValue | {
"repo_name": "test-editor/fixtures",
"path": "web/src/main/java/org/testeditor/fixture/web/RapWebFixture.java",
"license": "epl-1.0",
"size": 38046
} | [
"org.openqa.selenium.WebElement"
] | import org.openqa.selenium.WebElement; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,176,158 |
@SuppressWarnings("unchecked")
public Property<Unit> getPropertyEx(final int fieldId) {
return (Property<Unit>) getPropertyEx(Property.generateKey(fieldId));
} | @SuppressWarnings(STR) Property<Unit> function(final int fieldId) { return (Property<Unit>) getPropertyEx(Property.generateKey(fieldId)); } | /**
* Returns the property identified by the specified ID. Does not search through the properties of the parent of
* this unit, if no matching property can be found.
*
* @param fieldId the property ID to look for.
* @return the property identified by the specified ID or <co... | Returns the property identified by the specified ID. Does not search through the properties of the parent of this unit, if no matching property can be found | getPropertyEx | {
"repo_name": "Deaod/ODE",
"path": "src/net/wc3c/w3o/W3UFile.java",
"license": "bsd-2-clause",
"size": 5951
} | [
"net.wc3c.w3o.W3UFile"
] | import net.wc3c.w3o.W3UFile; | import net.wc3c.w3o.*; | [
"net.wc3c.w3o"
] | net.wc3c.w3o; | 2,317,017 |
public java.util.List<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI> getInput_terms_ProductSortHLAPI(){
java.util.List<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI>();
for (Sort elemnt : getInput(... | java.util.List<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI> function(){ java.util.List<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI> retour = new ArrayList<fr.lip6.move.pnml.symmetricnet.terms.hlapi.ProductSortHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.... | /**
* This accessor return a list of encapsulated subelement, only of ProductSortHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of ProductSortHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_terms_ProductSortHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/hlapi/BooleanConstantHLAPI.java",
"license": "epl-1.0",
"size": 91863
} | [
"fr.lip6.move.pnml.symmetricnet.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,844,144 |
public Cullable getCullableParent()
{
return null;
}
//---------------------------------------------------------------
// Methods defined by Node
//--------------------------------------------------------------- | Cullable function() { return null; } | /**
* Get the parent cullable of this instance. If this node has multiple
* direct parents, then this should return null.
*
* @return The parent instance or null if none
*/ | Get the parent cullable of this instance. If this node has multiple direct parents, then this should return null | getCullableParent | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "aviatrix3d/src/java/org/j3d/aviatrix3d/SharedGroup.java",
"license": "gpl-2.0",
"size": 8951
} | [
"org.j3d.aviatrix3d.rendering.Cullable"
] | import org.j3d.aviatrix3d.rendering.Cullable; | import org.j3d.aviatrix3d.rendering.*; | [
"org.j3d.aviatrix3d"
] | org.j3d.aviatrix3d; | 1,736,181 |
private void readPreview() throws IOException {
previewData.clear();
final String location = comboLocation.getText();
final int sheetIndex = comboSheet.getSelectionIndex();
final boolean containsHeader = btnContainsHeader.getSelection();
... | void function() throws IOException { previewData.clear(); final String location = comboLocation.getText(); final int sheetIndex = comboSheet.getSelectionIndex(); final boolean containsHeader = btnContainsHeader.getSelection(); Sheet sheet = workbook.getSheetAt(sheetIndex); Iterator<Row> rowIterator = sheet.iterator(); ... | /**
* Reads in preview data
*
* This goes through up to {@link ImportWizardModel#PREVIEW_MAX_LINES} lines
* within the appropriate file and reads them in. It uses {@link ImportAdapter} in combination with {@link ImportConfigurationExcel} to actually read in the data.
*
* @throws IOE... | Reads in preview data This goes through up to <code>ImportWizardModel#PREVIEW_MAX_LINES</code> lines within the appropriate file and reads them in. It uses <code>ImportAdapter</code> in combination with <code>ImportConfigurationExcel</code> to actually read in the data | readPreview | {
"repo_name": "kentoa/arx",
"path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardPageExcel.java",
"license": "apache-2.0",
"size": 18560
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Iterator",
"org.apache.poi.ss.usermodel.Row",
"org.apache.poi.ss.usermodel.Sheet",
"org.deidentifier.arx.DataType",
"org.deidentifier.arx.gui.resources.Resources",
"org.deidentifier.arx.io.ImportAdapter",
"org.deidentifier.arx.io.ImportColumn"... | import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.deidentifier.arx.DataType; import org.deidentifier.arx.gui.resources.Resources; import org.deidentifier.arx.io.ImportAdapter; import org.deident... | import java.io.*; import java.util.*; import org.apache.poi.ss.usermodel.*; import org.deidentifier.arx.*; import org.deidentifier.arx.gui.resources.*; import org.deidentifier.arx.io.*; import org.eclipse.jface.viewers.*; import org.eclipse.jface.window.*; import org.eclipse.swt.widgets.*; | [
"java.io",
"java.util",
"org.apache.poi",
"org.deidentifier.arx",
"org.eclipse.jface",
"org.eclipse.swt"
] | java.io; java.util; org.apache.poi; org.deidentifier.arx; org.eclipse.jface; org.eclipse.swt; | 1,375,707 |
public FinanzFac getFinanzFac() throws EJBExceptionLP {
try {
if (finanzFac == null) {
finanzFac = (FinanzFac) context.lookup("lpserver/FinanzFacBean/remote");
}
} catch (Throwable t) {
throw new EJBExceptionLP(EJBExceptionLP.FEHLER, new Exception(t));
}
return finanzFac;
} | FinanzFac function() throws EJBExceptionLP { try { if (finanzFac == null) { finanzFac = (FinanzFac) context.lookup(STR); } } catch (Throwable t) { throw new EJBExceptionLP(EJBExceptionLP.FEHLER, new Exception(t)); } return finanzFac; } | /**
* SessionFacade fuer Finanz holen.
*
* @throws EJBExceptionLP
* @return ReservierungFac
*/ | SessionFacade fuer Finanz holen | getFinanzFac | {
"repo_name": "erdincay/ejb",
"path": "src/com/lp/server/util/FacadeBeauftragter.java",
"license": "agpl-3.0",
"size": 68042
} | [
"com.lp.server.finanz.service.FinanzFac",
"com.lp.util.EJBExceptionLP"
] | import com.lp.server.finanz.service.FinanzFac; import com.lp.util.EJBExceptionLP; | import com.lp.server.finanz.service.*; import com.lp.util.*; | [
"com.lp.server",
"com.lp.util"
] | com.lp.server; com.lp.util; | 457,509 |
OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH);
return generateSetupTestWrapper(TestLiveConfig.class, "ade-config", "/");
}
| OpenCmsTestProperties.initialize(org.opencms.test.AllTests.TEST_PROPERTIES_PATH); return generateSetupTestWrapper(TestLiveConfig.class, STR, "/"); } | /**
* Returns the test suite.<p>
*
* @return the test suite
*/ | Returns the test suite | suite | {
"repo_name": "it-tavis/opencms-core",
"path": "test/org/opencms/ade/configuration/TestLiveConfig.java",
"license": "lgpl-2.1",
"size": 19519
} | [
"org.opencms.test.OpenCmsTestProperties"
] | import org.opencms.test.OpenCmsTestProperties; | import org.opencms.test.*; | [
"org.opencms.test"
] | org.opencms.test; | 2,128,137 |
@Test
public void testHashcode() {
OHLCSeriesCollection c1 = new OHLCSeriesCollection();
OHLCSeries s1 = new OHLCSeries("S");
s1.add(new Year(2009), 1.0, 4.0, 0.5, 2.0);
c1.addSeries(s1);
OHLCSeriesCollection c2 = new OHLCSeriesCollection();
OHLCSeries s2 = new OH... | void function() { OHLCSeriesCollection c1 = new OHLCSeriesCollection(); OHLCSeries s1 = new OHLCSeries("S"); s1.add(new Year(2009), 1.0, 4.0, 0.5, 2.0); c1.addSeries(s1); OHLCSeriesCollection c2 = new OHLCSeriesCollection(); OHLCSeries s2 = new OHLCSeries("S"); s2.add(new Year(2009), 1.0, 4.0, 0.5, 2.0); c2.addSeries(s... | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashcode | {
"repo_name": "simon04/jfreechart",
"path": "src/test/java/org/jfree/data/time/ohlc/OHLCSeriesCollectionTest.java",
"license": "lgpl-2.1",
"size": 8124
} | [
"org.jfree.data.time.Year",
"org.junit.Assert"
] | import org.jfree.data.time.Year; import org.junit.Assert; | import org.jfree.data.time.*; import org.junit.*; | [
"org.jfree.data",
"org.junit"
] | org.jfree.data; org.junit; | 1,386,819 |
// p4ic4idea: add @Override
@Override
public String toString() {
int ord = this.ordinal();
if (ord >= names.length) {
throw new P4JavaError("name / ordinal mismatch in FileAction.toString; "
+ "ord: " + ord + "; names.length: " + names.length);
}
return names[ord];
} | int ord = this.ordinal(); if (ord >= names.length) { throw new P4JavaError(STR + STR + ord + STR + names.length); } return names[ord]; } | /**
* Provide a string representation that looks like the same actions
* seen through the p4 command interpreter rather than the raw enum.
*
* @see java.lang.Enum#toString()
*/ | Provide a string representation that looks like the same actions seen through the p4 command interpreter rather than the raw enum | toString | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/main/java/com/perforce/p4java/core/file/FileAction.java",
"license": "apache-2.0",
"size": 3043
} | [
"com.perforce.p4java.exception.P4JavaError"
] | import com.perforce.p4java.exception.P4JavaError; | import com.perforce.p4java.exception.*; | [
"com.perforce.p4java"
] | com.perforce.p4java; | 956,501 |
@Test(expected = ConstraintViolationException.class)
public void testUpdateCommandsForClusterNoId() throws GenieException {
this.service.setCommandsForCluster(null, new ArrayList<>());
} | @Test(expected = ConstraintViolationException.class) void function() throws GenieException { this.service.setCommandsForCluster(null, new ArrayList<>()); } | /**
* Test updating commands for the cluster.
*
* @throws GenieException For any problem
*/ | Test updating commands for the cluster | testUpdateCommandsForClusterNoId | {
"repo_name": "ajoymajumdar/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/jpa/services/JpaClusterServiceImplIntegrationTests.java",
"license": "apache-2.0",
"size": 42407
} | [
"com.netflix.genie.common.exceptions.GenieException",
"java.util.ArrayList",
"javax.validation.ConstraintViolationException",
"org.junit.Test"
] | import com.netflix.genie.common.exceptions.GenieException; import java.util.ArrayList; import javax.validation.ConstraintViolationException; import org.junit.Test; | import com.netflix.genie.common.exceptions.*; import java.util.*; import javax.validation.*; import org.junit.*; | [
"com.netflix.genie",
"java.util",
"javax.validation",
"org.junit"
] | com.netflix.genie; java.util; javax.validation; org.junit; | 1,170,405 |
public File getBlockFile() {
return (blockFile == null) ? null :
new File(basePath.getAbsolutePath(), blockFile);
} | File function() { return (blockFile == null) ? null : new File(basePath.getAbsolutePath(), blockFile); } | /**
* Returns the block data file.
*
* @return the block data file
*/ | Returns the block data file | getBlockFile | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsVolumeSpi.java",
"license": "apache-2.0",
"size": 14468
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,707,294 |
public int copy(int n, ConstPool dest, Map classnames) {
if (n == 0)
return 0;
ConstInfo info = getItem(n);
return info.copy(this, dest, classnames);
} | int function(int n, ConstPool dest, Map classnames) { if (n == 0) return 0; ConstInfo info = getItem(n); return info.copy(this, dest, classnames); } | /**
* Copies the n-th item in this ConstPool object into the destination
* ConstPool object.
* The class names that the item refers to are renamed according
* to the given map.
*
* @param n the <i>n</i>-th item
* @param dest destination constant pool table... | Copies the n-th item in this ConstPool object into the destination ConstPool object. The class names that the item refers to are renamed according to the given map | copy | {
"repo_name": "yuyupapa/OpenSource",
"path": "scouter.agent.java/src/scouter/javassist/bytecode/ConstPool.java",
"license": "apache-2.0",
"size": 60392
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,230,090 |
public void uninitialize()
throws NotImplementedException
{
super.uninitialize();
// TODO: What to do here?
} | void function() throws NotImplementedException { super.uninitialize(); } | /**
* Uninitializes the look and feel.
*/ | Uninitializes the look and feel | uninitialize | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java",
"license": "gpl-2.0",
"size": 7862
} | [
"gnu.classpath.NotImplementedException"
] | import gnu.classpath.NotImplementedException; | import gnu.classpath.*; | [
"gnu.classpath"
] | gnu.classpath; | 445,650 |
super.onActivityCreated(savedInstanceState);
// make sure it's the first time through
if (mObjectGraph == null) {
// expand the activity graph with the fragment-specific module(s)
ObjectGraph appGraph = ((Injector) getActivity()).getObjectGraph();
List<Object> fragme... | super.onActivityCreated(savedInstanceState); if (mObjectGraph == null) { ObjectGraph appGraph = ((Injector) getActivity()).getObjectGraph(); List<Object> fragmentModules = getModules(); mObjectGraph = appGraph.plus(fragmentModules.toArray()); inject(this); } } | /**
* Creates an object graph for this ListFragment by extending the hosting Activity's object graph with the modules
* returned by {@link #getModules()}.
* <p/>
* Injects this ListFragment using the created graph.
*/ | Creates an object graph for this ListFragment by extending the hosting Activity's object graph with the modules returned by <code>#getModules()</code>. Injects this ListFragment using the created graph | onActivityCreated | {
"repo_name": "peter-tackage/open-secret-santa",
"path": "libraries/dagger-injections/src/main/java/com/moac/android/inject/dagger/InjectingListFragment.java",
"license": "apache-2.0",
"size": 3554
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,053,136 |
public static List<String> scanPorts () {
// Return variable
//
List<String> names = new ArrayList<String>();
@SuppressWarnings("unchecked")
java.util.Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers();
// Go through all elements and add the detected ports
//
whi... | static List<String> function () { @SuppressWarnings(STR) java.util.Enumeration<CommPortIdentifier> portEnum = CommPortIdentifier.getPortIdentifiers(); CommPortIdentifier currPortId = portEnum.nextElement(); String portName = currPortId.getName(); names.add (portName); } return names; } | /**
* Scans for available serial ports
*
* @return a list of valid serial ports
*/ | Scans for available serial ports | scanPorts | {
"repo_name": "patximpatxam/capsulecorp",
"path": "Java/Swing/Application/DomoDuino/src/Dynatac/Bus/DynatacBusSerial.java",
"license": "gpl-2.0",
"size": 3986
} | [
"java.util.Enumeration",
"java.util.List"
] | import java.util.Enumeration; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,034,801 |
@Test
public void shouldUnmarshalAsMap() throws Exception {
template.sendBody("direct:map", join("A,B,C", "1,2,3", "one,two,three"));
result.expectedMessageCount(1);
result.assertIsSatisfied();
List<?> body = assertIsInstanceOf(List.class, result.getExchanges().get(0).ge... | void function() throws Exception { template.sendBody(STR, join("A,B,C", "1,2,3", STR)); result.expectedMessageCount(1); result.assertIsSatisfied(); List<?> body = assertIsInstanceOf(List.class, result.getExchanges().get(0).getIn().getBody()); assertEquals(2, body.size()); assertEquals(asMap("A", "1", "B", "2", "C", "3"... | /**
* Tests that we can unmarshal CSV and produce maps for each row
*/ | Tests that we can unmarshal CSV and produce maps for each row | shouldUnmarshalAsMap | {
"repo_name": "snadakuduru/camel",
"path": "components/camel-univocity-parsers/src/test/java/org/apache/camel/dataformat/univocity/UniVocityCsvDataFormatUnmarshalSpringTest.java",
"license": "apache-2.0",
"size": 6063
} | [
"java.util.List",
"org.apache.camel.dataformat.univocity.UniVocityTestHelper"
] | import java.util.List; import org.apache.camel.dataformat.univocity.UniVocityTestHelper; | import java.util.*; import org.apache.camel.dataformat.univocity.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,594,466 |
public void setReceiverObject(MailReceiverDTO receiverObject) {
this.receiverObject = receiverObject;
if(this.receiverObject != null){
this.receiverServer = this.receiverObject.getData() ;
}
} | void function(MailReceiverDTO receiverObject) { this.receiverObject = receiverObject; if(this.receiverObject != null){ this.receiverServer = this.receiverObject.getData() ; } } | /**
* Set mail receiver server object.
*
* @param receiverObject MailReceiverDTO - the given mail receiver object.
*/ | Set mail receiver server object | setReceiverObject | {
"repo_name": "inetcloud/iMail",
"path": "source/com.inet.mail/src/com/inet/mail/persistence/MailAcctConfigInfo.java",
"license": "gpl-2.0",
"size": 4642
} | [
"com.inet.mail.data.MailReceiverDTO"
] | import com.inet.mail.data.MailReceiverDTO; | import com.inet.mail.data.*; | [
"com.inet.mail"
] | com.inet.mail; | 1,882,755 |
public Observable<ServiceResponse<ExpressRouteCrossConnectionInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter res... | Observable<ServiceResponse<ExpressRouteCrossConnectionInner>> function(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (crossConnectionName == null) { throw new IllegalArgumentException(ST... | /**
* Update the specified ExpressRouteCrossConnection.
*
* @param resourceGroupName The name of the resource group.
* @param crossConnectionName The name of the ExpressRouteCrossConnection.
* @param parameters Parameters supplied to the update express route crossConnection operation.
* @t... | Update the specified ExpressRouteCrossConnection | beginCreateOrUpdateWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/ExpressRouteCrossConnectionsInner.java",
"license": "mit",
"size": 100923
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 670,256 |
if (type == ElementType.VERTEX) {
return new Text(Const.VERTEX_ID_PREFIX);
} else if (type == ElementType.EDGE) {
return new Text(Const.EDGE_ID_PREFIX);
} else {
throw new IllegalArgumentException("Unrecognized type");
}
}
| if (type == ElementType.VERTEX) { return new Text(Const.VERTEX_ID_PREFIX); } else if (type == ElementType.EDGE) { return new Text(Const.EDGE_ID_PREFIX); } else { throw new IllegalArgumentException(STR); } } | /**
* Return the appropriate id prefix for the given type.
* This can be used in range searches (e.g. for all vertices).
* @param type
* @return
*/ | Return the appropriate id prefix for the given type. This can be used in range searches (e.g. for all vertices) | toIdPrefix | {
"repo_name": "mikelieberman/blueprints-accumulo-graph",
"path": "src/main/java/accumulograph/AccumuloIdManager.java",
"license": "bsd-2-clause",
"size": 2250
} | [
"org.apache.hadoop.io.Text"
] | import org.apache.hadoop.io.Text; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,356,925 |
public static void delTree(File file) {
if ( file == null ) return;
if ( !file.isDirectory() ) return;
File[] files = file.listFiles();
for ( int i = 0, len = files.length ; i < len ; i++ ) {
if ( files[i].isFile() ) {
files[i].delete();
} else {
delTree( files[i] );
files[i].delete();
... | static void function(File file) { if ( file == null ) return; if ( !file.isDirectory() ) return; File[] files = file.listFiles(); for ( int i = 0, len = files.length ; i < len ; i++ ) { if ( files[i].isFile() ) { files[i].delete(); } else { delTree( files[i] ); files[i].delete(); } } } | /**
* Deletes all files in given directory.
* <p>
* Do nothing if <code>file</code> is not a directory or is <code>null</code>!
*
* @param file A directory.
*/ | Deletes all files in given directory. Do nothing if <code>file</code> is not a directory or is <code>null</code> | delTree | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4JBOSS_2_3/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/IconCacheImpl.java",
"license": "apache-2.0",
"size": 12451
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 98,513 |
public SearchRequest extraSource(BytesReference source) {
this.extraSource = source;
return this;
} | SearchRequest function(BytesReference source) { this.extraSource = source; return this; } | /**
* Allows to provide additional source that will be used as well.
*/ | Allows to provide additional source that will be used as well | extraSource | {
"repo_name": "anti-social/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/search/SearchRequest.java",
"license": "apache-2.0",
"size": 17530
} | [
"org.elasticsearch.common.bytes.BytesReference"
] | import org.elasticsearch.common.bytes.BytesReference; | import org.elasticsearch.common.bytes.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 508,507 |
private void bootstrapNode(K8sNode k8sNode) {
if (isCurrentStateDone(k8sNode)) {
setState(k8sNode, k8sNode.state().nextState());
} else {
log.trace("Processing {} state for {}", k8sNode.state(),
k8sNode.hostname());
k8sNode.state().process(this... | void function(K8sNode k8sNode) { if (isCurrentStateDone(k8sNode)) { setState(k8sNode, k8sNode.state().nextState()); } else { log.trace(STR, k8sNode.state(), k8sNode.hostname()); k8sNode.state().process(this, k8sNode); } } | /**
* Bootstraps a new kubernetes node.
*
* @param k8sNode kubernetes node
*/ | Bootstraps a new kubernetes node | bootstrapNode | {
"repo_name": "oplinkoms/onos",
"path": "apps/k8s-node/app/src/main/java/org/onosproject/k8snode/impl/DefaultK8sNodeHandler.java",
"license": "apache-2.0",
"size": 30108
} | [
"org.onosproject.k8snode.api.K8sNode"
] | import org.onosproject.k8snode.api.K8sNode; | import org.onosproject.k8snode.api.*; | [
"org.onosproject.k8snode"
] | org.onosproject.k8snode; | 1,138 |
public static PercentType getPercentTypeFromByte(int value) {
return new PercentType(BigDecimal
.valueOf(value)
.multiply(BigDecimal.valueOf(100))
.divide(BigDecimal.valueOf(DmxChannel.DMX_MAX_VALUE), 0,
BigDecimal.ROUND_UP).intValue());
} | static PercentType function(int value) { return new PercentType(BigDecimal .valueOf(value) .multiply(BigDecimal.valueOf(100)) .divide(BigDecimal.valueOf(DmxChannel.DMX_MAX_VALUE), 0, BigDecimal.ROUND_UP).intValue()); } | /**
* Convert a 0-255 scale value to a percent type.
*
* @param pt
* percent type to convert
* @return converted value 0-255
*/ | Convert a 0-255 scale value to a percent type | getPercentTypeFromByte | {
"repo_name": "noushadali/openhab",
"path": "bundles/binding/org.openhab.binding.dmx/src/main/java/org/openhab/binding/dmx/internal/core/DmxUtil.java",
"license": "gpl-3.0",
"size": 3838
} | [
"java.math.BigDecimal",
"org.openhab.core.library.types.PercentType"
] | import java.math.BigDecimal; import org.openhab.core.library.types.PercentType; | import java.math.*; import org.openhab.core.library.types.*; | [
"java.math",
"org.openhab.core"
] | java.math; org.openhab.core; | 2,467,632 |
public void propertyChange(PropertyChangeEvent event) {
String ev = event.getProperty();
if (ev.equals("wrapType")) {
if (!off) {
setType();
}
}
}
} | void function(PropertyChangeEvent event) { String ev = event.getProperty(); if (ev.equals(STR)) { if (!off) { setType(); } } } } | /**
* Changes between wrap types (soft <-> hard) if wrap toggle
* button is checked.
*/ | Changes between wrap types (soft hard) if wrap toggle button is checked | propertyChange | {
"repo_name": "kolovos/texlipse",
"path": "net.sourceforge.texlipse/src/net/sourceforge/texlipse/actions/TexWordWrapAction.java",
"license": "epl-1.0",
"size": 5020
} | [
"org.eclipse.jface.util.PropertyChangeEvent"
] | import org.eclipse.jface.util.PropertyChangeEvent; | import org.eclipse.jface.util.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,513,713 |
@NotNull
private Iterable<GroupAction> filterGroupActions() {
return Iterables.filter(actionProvider.getAuthorizableActions(securityProvider), GroupAction.class);
} | Iterable<GroupAction> function() { return Iterables.filter(actionProvider.getAuthorizableActions(securityProvider), GroupAction.class); } | /**
* Select only {@code GroupAction}s from the available {@code AuthorizableAction}s.
*
* @return A {@code List} of {@code GroupAction}s. List may be empty.
*/ | Select only GroupActions from the available AuthorizableActions | filterGroupActions | {
"repo_name": "trekawek/jackrabbit-oak",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserManagerImpl.java",
"license": "apache-2.0",
"size": 22428
} | [
"com.google.common.collect.Iterables",
"org.apache.jackrabbit.oak.spi.security.user.action.GroupAction"
] | import com.google.common.collect.Iterables; import org.apache.jackrabbit.oak.spi.security.user.action.GroupAction; | import com.google.common.collect.*; import org.apache.jackrabbit.oak.spi.security.user.action.*; | [
"com.google.common",
"org.apache.jackrabbit"
] | com.google.common; org.apache.jackrabbit; | 2,255,533 |
@Override
public void onQuestCompleted(Quest quest) {
// create a message string indicating that the quest was successfully completed
String message = "You successfully completed quest " + quest.getName();
// Print out message for debugging purposes.
Log.i(TAG, message);
... | void function(Quest quest) { String message = STR + quest.getName(); Log.i(TAG, message); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); Games.Quests.claim( mGoogleApiClient, quest.getQuestId(), quest.getCurrentMilestone().getMilestoneId()) .setResultCallback(mClaimMilestoneResultCallback); } | /**
* Event handler for when Quests are completed.
*
* @param quest The quest that has been completed.
*/ | Event handler for when Quests are completed | onQuestCompleted | {
"repo_name": "JumSSang/android-basic-samples",
"path": "BasicSamples/TrivialQuest2/src/main/java/com/google/example/games/tq2/MainActivity.java",
"license": "apache-2.0",
"size": 15495
} | [
"android.util.Log",
"android.widget.Toast",
"com.google.android.gms.games.Games",
"com.google.android.gms.games.quest.Quest",
"com.google.android.gms.games.quest.Quests"
] | import android.util.Log; import android.widget.Toast; import com.google.android.gms.games.Games; import com.google.android.gms.games.quest.Quest; import com.google.android.gms.games.quest.Quests; | import android.util.*; import android.widget.*; import com.google.android.gms.games.*; import com.google.android.gms.games.quest.*; | [
"android.util",
"android.widget",
"com.google.android"
] | android.util; android.widget; com.google.android; | 1,721,541 |
public static SimpleZippedAnimation getSimpleZippedAnimation(final String key, final float scale) {
final SZAResource r = getSZAResource(key);
return (r != null) ? r.getSimpleZippedAnimation(scale) : null;
} | static SimpleZippedAnimation function(final String key, final float scale) { final SZAResource r = getSZAResource(key); return (r != null) ? r.getSimpleZippedAnimation(scale) : null; } | /**
* Returns the animation specified by the given name.
*
* @param key The name of the resource to return.
* @param scale The size of the requested animation (with 1
* being normal size, 2 twice the size, 0.5 half the
* size etc). Rescaling will be performed unless using 1.
... | Returns the animation specified by the given name | getSimpleZippedAnimation | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "src/net/sf/freecol/common/resources/ResourceManager.java",
"license": "gpl-2.0",
"size": 22462
} | [
"net.sf.freecol.common.io.sza.SimpleZippedAnimation"
] | import net.sf.freecol.common.io.sza.SimpleZippedAnimation; | import net.sf.freecol.common.io.sza.*; | [
"net.sf.freecol"
] | net.sf.freecol; | 736 |
@CommandRoute(command = "roulette")
public boolean rouletteCommand(User user, Arguments arguments) {
boolean isFatal = MathUtils.randChoice();
String message;
if (isFatal) {
message = configService.getRandomLost();
if (settings.isTimeoutOnDeathEnabled() && !user... | @CommandRoute(command = STR) boolean function(User user, Arguments arguments) { boolean isFatal = MathUtils.randChoice(); String message; if (isFatal) { message = configService.getRandomLost(); if (settings.isTimeoutOnDeathEnabled() && !user.isCaster() && !user.isModerator()) { chat.timeoutUser(user.getUsername(), sett... | /**
* Play the roulette game
* Usage: !roulette
*/ | Play the roulette game Usage: !roulette | rouletteCommand | {
"repo_name": "Juraji/Biliomi",
"path": "packages/games/roulette/src/main/java/nl/juraji/biliomi/components/games/roulette/RouletteComponent.java",
"license": "gpl-3.0",
"size": 6038
} | [
"nl.juraji.biliomi.model.core.User",
"nl.juraji.biliomi.model.internal.events.bot.AchievementEvent",
"nl.juraji.biliomi.utility.calculate.MathUtils",
"nl.juraji.biliomi.utility.commandrouters.annotations.CommandRoute",
"nl.juraji.biliomi.utility.commandrouters.types.Arguments",
"nl.juraji.biliomi.utility.... | import nl.juraji.biliomi.model.core.User; import nl.juraji.biliomi.model.internal.events.bot.AchievementEvent; import nl.juraji.biliomi.utility.calculate.MathUtils; import nl.juraji.biliomi.utility.commandrouters.annotations.CommandRoute; import nl.juraji.biliomi.utility.commandrouters.types.Arguments; import nl.juraji... | import nl.juraji.biliomi.model.core.*; import nl.juraji.biliomi.model.internal.events.bot.*; import nl.juraji.biliomi.utility.calculate.*; import nl.juraji.biliomi.utility.commandrouters.annotations.*; import nl.juraji.biliomi.utility.commandrouters.types.*; import nl.juraji.biliomi.utility.types.*; | [
"nl.juraji.biliomi"
] | nl.juraji.biliomi; | 2,363,731 |
private String computeTropics(Astrolabe myAstrolabe){
// draws the circles for the tropics and equator
String out = "";
out += "\n" + "%% ================ Draw Tropics =================";
out += "\n" + "0 0 " + myAstrolabe.getCapricornRadius() + " 0 360 arc stroke";
out += "\... | String function(Astrolabe myAstrolabe){ String out = STR\nSTR%% ================ Draw Tropics =================STR\nSTR0 0 STR 0 360 arc strokeSTR\nSTR0 0 STR 0 360 arc strokeSTR\nSTR0 0 STR 0 360 arc strokeSTR\nSTR%% ================ End Tropics ================="; return out; } | /**
* computes the circles for the tropics and equator
* given the diameter of the plate
*
* @param myAstrolabe the astrolabe object
* @return returns the ps code for drawing the tropics
*
*/ | computes the circles for the tropics and equator given the diameter of the plate | computeTropics | {
"repo_name": "wymarc/astrolabe-generator",
"path": "src/main/java/com/wymarc/astrolabe/generator/printengines/postscript/FrontPrintEngine.java",
"license": "gpl-3.0",
"size": 49747
} | [
"com.wymarc.astrolabe.Astrolabe"
] | import com.wymarc.astrolabe.Astrolabe; | import com.wymarc.astrolabe.*; | [
"com.wymarc.astrolabe"
] | com.wymarc.astrolabe; | 1,752,340 |
public void drawingMouseDragged(MouseEvent e, CoordinateModel dragged); | void function(MouseEvent e, CoordinateModel dragged); | /**
* Method for handling dragging on pane. Send mouse event and object that is being dragged is any.
*
* @param e mouse event for this method
* @param dragged object that is being dragged on pane if is any.
*/ | Method for handling dragging on pane. Send mouse event and object that is being dragged is any | drawingMouseDragged | {
"repo_name": "karelhala/bachelor_thesis",
"path": "source/BT/src/BT/interfaces/DrawingClicks.java",
"license": "gpl-2.0",
"size": 1651
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,204,502 |
@Test
public void testTransactionsWithLabel() throws Exception {
try (IgniteEx ignite = (IgniteEx)Ignition.start(Config.getServerConfiguration());
IgniteClient client = Ignition.startClient(getClientConfiguration())
) {
ClientCache<Integer, String> cache = client.createC... | void function() throws Exception { try (IgniteEx ignite = (IgniteEx)Ignition.start(Config.getServerConfiguration()); IgniteClient client = Ignition.startClient(getClientConfiguration()) ) { ClientCache<Integer, String> cache = client.createCache(new ClientCacheConfiguration() .setName("cache") .setAtomicityMode(CacheAt... | /**
* Test transactions with label.
*/ | Test transactions with label | testTransactionsWithLabel | {
"repo_name": "nizhikov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/client/FunctionalTest.java",
"license": "apache-2.0",
"size": 49664
} | [
"java.util.concurrent.BrokenBarrierException",
"java.util.concurrent.CyclicBarrier",
"org.apache.ignite.Ignition",
"org.apache.ignite.cache.CacheAtomicityMode",
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.util.typedef.F",
"org.a... | import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; import org.apache.ignite.Ignition; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.... | import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.spi.systemview.view.*; import org.apache.ignite.testframework.*; import org.junit.*; | [
"java.util",
"org.apache.ignite",
"org.junit"
] | java.util; org.apache.ignite; org.junit; | 2,509,775 |
public static Collection<Class<?>> annotatedWith(Class<? extends Annotation> theAnnotation) {
Instrumentation aInst = instrumentation();
if (aInst == null) {
return Sets.newHashSet();
}
Set<Class<?>> aClasses = Sets.newHashSet();
for (Class<?> aCls : aInst.getAllLoadedClasses()) {
if (aCls.getAnnot... | static Collection<Class<?>> function(Class<? extends Annotation> theAnnotation) { Instrumentation aInst = instrumentation(); if (aInst == null) { return Sets.newHashSet(); } Set<Class<?>> aClasses = Sets.newHashSet(); for (Class<?> aCls : aInst.getAllLoadedClasses()) { if (aCls.getAnnotation(theAnnotation) != null) { a... | /**
* Return all the classes which have the given annotation applied to them
* @param theAnnotation the annotation
* @return the classes with the annotation. An empty collection will be returned if this java agent is not installed
*/ | Return all the classes which have the given annotation applied to them | annotatedWith | {
"repo_name": "mhgrove/Empire",
"path": "core/main/src/com/clarkparsia/empire/spi/Instrumentor.java",
"license": "apache-2.0",
"size": 3278
} | [
"com.google.common.collect.Sets",
"java.lang.annotation.Annotation",
"java.lang.instrument.Instrumentation",
"java.util.Collection",
"java.util.Set"
] | import com.google.common.collect.Sets; import java.lang.annotation.Annotation; import java.lang.instrument.Instrumentation; import java.util.Collection; import java.util.Set; | import com.google.common.collect.*; import java.lang.annotation.*; import java.lang.instrument.*; import java.util.*; | [
"com.google.common",
"java.lang",
"java.util"
] | com.google.common; java.lang; java.util; | 391,675 |
public static boolean addSelfJarFile(String jarFilePath)
throws IOException, SecurityException, IllegalArgumentException,
NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
return ExtendsJarScanner.addSelfJarFile(jarFilePath);
} | static boolean function(String jarFilePath) throws IOException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { return ExtendsJarScanner.addSelfJarFile(jarFilePath); } | /**
* scan Jar File
*
* @param jarFilePath
* @param isRefresh
* @return
* @throws IOException
* @throws InvocationTargetException
* @throws IllegalAccessException
* @throws NoSuchMethodException
* @throws IllegalArgumentException
* @throws SecurityException
*/ | scan Jar File | addSelfJarFile | {
"repo_name": "suhuanzheng7784877/ParallelExecute",
"path": "project/ParallelExecute/src/main/java/org/para/util/jar/ExtendsClassLoaderFacade.java",
"license": "apache-2.0",
"size": 2142
} | [
"java.io.IOException",
"java.lang.reflect.InvocationTargetException"
] | import java.io.IOException; import java.lang.reflect.InvocationTargetException; | import java.io.*; import java.lang.reflect.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 2,451,475 |
public Builder setExecutors(Executor httpExecutor, Executor callbackExecutor) {
if (httpExecutor == null) {
throw new NullPointerException("HTTP executor may not be null.");
}
if (callbackExecutor == null) {
callbackExecutor = new Utils.SynchronousExecutor();
}
this.htt... | Builder function(Executor httpExecutor, Executor callbackExecutor) { if (httpExecutor == null) { throw new NullPointerException(STR); } if (callbackExecutor == null) { callbackExecutor = new Utils.SynchronousExecutor(); } this.httpExecutor = httpExecutor; this.callbackExecutor = callbackExecutor; return this; } | /**
* Executors used for asynchronous HTTP client downloads and callbacks.
*
* @param httpExecutor Executor on which HTTP client calls will be made.
* @param callbackExecutor Executor on which any {@link Callback} methods will be invoked. If
* this argument is {@code null} then callback methods... | Executors used for asynchronous HTTP client downloads and callbacks | setExecutors | {
"repo_name": "benoitdion/retrofit",
"path": "retrofit/src/main/java/retrofit/RestAdapter.java",
"license": "apache-2.0",
"size": 24614
} | [
"java.util.concurrent.Executor"
] | import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 559,852 |
public static ims.core.admin.pas.domain.objects.InpatientEpisode extractInpatientEpisode(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.InpatientEpisodeVo valueObject)
{
return extractInpatientEpisode(domainFactory, valueObject, new HashMap());
}
| static ims.core.admin.pas.domain.objects.InpatientEpisode function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.InpatientEpisodeVo valueObject) { return extractInpatientEpisode(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractInpatientEpisode | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/InpatientEpisodeVoAssembler.java",
"license": "agpl-3.0",
"size": 29850
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,639,296 |
protected WrapperFactory wrapperFactory() {
return scenarioExecution().wrapperFactory();
} | WrapperFactory function() { return scenarioExecution().wrapperFactory(); } | /**
* Convenience method
*/ | Convenience method | wrapperFactory | {
"repo_name": "howepeng/isis",
"path": "core/specsupport/src/main/java/org/apache/isis/core/specsupport/specs/CukeGlueAbstract.java",
"license": "apache-2.0",
"size": 11631
} | [
"org.apache.isis.applib.services.wrapper.WrapperFactory"
] | import org.apache.isis.applib.services.wrapper.WrapperFactory; | import org.apache.isis.applib.services.wrapper.*; | [
"org.apache.isis"
] | org.apache.isis; | 1,486,938 |
public static Test suite() {
return new TestSuite(BasePasswordTest.class);
} | static Test function() { return new TestSuite(BasePasswordTest.class); } | /**
* Returns a test suite.
*
* @return the test suite
*/ | Returns a test suite | suite | {
"repo_name": "automenta/adams-core",
"path": "src/test/java/adams/core/base/BasePasswordTest.java",
"license": "gpl-3.0",
"size": 4247
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 250,000 |
public static <T, TCollection, TResult> Queryable<TResult> selectMany(
Queryable<T> source,
FunctionExpression<Function2<T, Integer, Enumerable<TCollection>>>
collectionSelector,
FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) {
throw Extensions.todo();
} | static <T, TCollection, TResult> Queryable<TResult> function( Queryable<T> source, FunctionExpression<Function2<T, Integer, Enumerable<TCollection>>> collectionSelector, FunctionExpression<Function2<T, TCollection, TResult>> resultSelector) { throw Extensions.todo(); } | /**
* Projects each element of a sequence to an
* {@code Enumerable<T>} that incorporates the index of the source
* element that produced it. A result selector function is invoked
* on each element of each intermediate sequence, and the
* resulting values are combined into a single, one-dimensional
* ... | Projects each element of a sequence to an Enumerable that incorporates the index of the source element that produced it. A result selector function is invoked on each element of each intermediate sequence, and the resulting values are combined into a single, one-dimensional sequence and returned | selectMany | {
"repo_name": "b-slim/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/QueryableDefaults.java",
"license": "apache-2.0",
"size": 39975
} | [
"org.apache.calcite.linq4j.function.Function2",
"org.apache.calcite.linq4j.tree.FunctionExpression"
] | import org.apache.calcite.linq4j.function.Function2; import org.apache.calcite.linq4j.tree.FunctionExpression; | import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,716,393 |
private void logExceptionToFile(final IOException exception, final File masterFile, final String slaveFileName) {
FileOutputStream outputStream = null;
try {
outputStream = new FileOutputStream(masterFile);
print(outputStream,
"Copying the source file '%s'... | void function(final IOException exception, final File masterFile, final String slaveFileName) { FileOutputStream outputStream = null; try { outputStream = new FileOutputStream(masterFile); print(outputStream, STR, slaveFileName, masterFile.getAbsolutePath()); if (!slaveFileName.startsWith(SLASH) && !slaveFileName.conta... | /**
* Logs the specified exception in the specified file.
* @param exception
* the exception
* @param masterFile
* the file on the master
* @param slaveFileName
* the file name of the slave
*/ | Logs the specified exception in the specified file | logExceptionToFile | {
"repo_name": "kohsuke/analysis-core-plugin",
"path": "src/main/java/hudson/plugins/analysis/core/HealthAwarePublisher.java",
"license": "mit",
"size": 31784
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.PrintStream",
"org.apache.commons.io.IOUtils",
"org.apache.commons.lang.StringUtils"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; | import java.io.*; import org.apache.commons.io.*; import org.apache.commons.lang.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 1,656,308 |
ImmutableList<SchemaOrgType> getSaturatedFatContentList(); | ImmutableList<SchemaOrgType> getSaturatedFatContentList(); | /**
* Returns the value list of property saturatedFatContent. Empty list is returned if the property
* not set in current object.
*/ | Returns the value list of property saturatedFatContent. Empty list is returned if the property not set in current object | getSaturatedFatContentList | {
"repo_name": "google/schemaorg-java",
"path": "src/main/java/com/google/schemaorg/core/NutritionInformation.java",
"license": "apache-2.0",
"size": 11061
} | [
"com.google.common.collect.ImmutableList",
"com.google.schemaorg.SchemaOrgType"
] | import com.google.common.collect.ImmutableList; import com.google.schemaorg.SchemaOrgType; | import com.google.common.collect.*; import com.google.schemaorg.*; | [
"com.google.common",
"com.google.schemaorg"
] | com.google.common; com.google.schemaorg; | 2,106,316 |
public static List<Viewable> getViewables(Part part, List<Part> attachments) throws MessagingException {
List<Viewable> viewables = new ArrayList<Viewable>();
Body body = part.getBody();
if (body instanceof Multipart) {
Multipart multipart = (Multipart) body;
if (par... | static List<Viewable> function(Part part, List<Part> attachments) throws MessagingException { List<Viewable> viewables = new ArrayList<Viewable>(); Body body = part.getBody(); if (body instanceof Multipart) { Multipart multipart = (Multipart) body; if (part.getMimeType().equalsIgnoreCase(STR)) { List<Viewable> text = f... | /**
* Traverse the MIME tree of a message an extract viewable parts.
*
* @param part
* The message part to start from.
* @param attachments
* A list that will receive the parts that are considered attachments.
*
* @return A list of {@link Viewable}s.
*
*... | Traverse the MIME tree of a message an extract viewable parts | getViewables | {
"repo_name": "Valodim/k-9",
"path": "k9mail-library/src/main/java/com/fsck/k9/mail/internet/MessageExtractor.java",
"license": "bsd-3-clause",
"size": 18563
} | [
"com.fsck.k9.mail.Body",
"com.fsck.k9.mail.Message",
"com.fsck.k9.mail.MessagingException",
"com.fsck.k9.mail.Multipart",
"com.fsck.k9.mail.Part",
"com.fsck.k9.mail.internet.Viewable",
"java.util.ArrayList",
"java.util.List",
"java.util.Set"
] | import com.fsck.k9.mail.Body; import com.fsck.k9.mail.Message; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.Multipart; import com.fsck.k9.mail.Part; import com.fsck.k9.mail.internet.Viewable; import java.util.ArrayList; import java.util.List; import java.util.Set; | import com.fsck.k9.mail.*; import com.fsck.k9.mail.internet.*; import java.util.*; | [
"com.fsck.k9",
"java.util"
] | com.fsck.k9; java.util; | 1,501,138 |
public double getDouble(String columnLabel) throws SQLException {
return getDouble(findColumn(columnLabel));
} | double function(String columnLabel) throws SQLException { return getDouble(findColumn(columnLabel)); } | /**
* Returns the column value, or 0 if the value is SQL NULL.
*
* <p>
* To distinguish between 0 and SQL NULL, use either {@link #wasNull()} or {@link
* #getObject(String, Class)}.
*
* @param columnLabel case-insensitive column label
*/ | Returns the column value, or 0 if the value is SQL NULL. To distinguish between 0 and SQL NULL, use either <code>#wasNull()</code> or <code>#getObject(String, Class)</code> | getDouble | {
"repo_name": "mahak/vitess",
"path": "java/client/src/main/java/io/vitess/client/cursor/Row.java",
"license": "apache-2.0",
"size": 23697
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,768,466 |
protected Document createDOMDocumentForInterfaceImplementation() throws Exception {
String packageName = codeGenConfiguration.getPackageName();
String localPart = makeJavaClassName(axisService.getName());
String stubName = makeJavaClassName(axisService.getName() + axisService.getEndpointNam... | Document function() throws Exception { String packageName = codeGenConfiguration.getPackageName(); String localPart = makeJavaClassName(axisService.getName()); String stubName = makeJavaClassName(axisService.getName() + axisService.getEndpointName()) + STUB_SUFFIX; Document doc = getEmptyDocument(); Element rootElement... | /**
* Creates the DOM tree for implementations.
*/ | Creates the DOM tree for implementations | createDOMDocumentForInterfaceImplementation | {
"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,185 |
public String getCommitId(int buildId) throws IOException, ServerException {
String requestUrl = url + "/job/" + jobName + "/" + buildId + "/api/json";
String request = doRequest(GET, requestUrl, APPLICATION_XML, null);
//It is not possible to use Gson parser here because the given JSON cont... | String function(int buildId) throws IOException, ServerException { String requestUrl = url + "/job/" + jobName + "/" + buildId + STR; String request = doRequest(GET, requestUrl, APPLICATION_XML, null); return request.substring(request.indexOf("SHA1") + 7).substring(0, 40); } | /**
* Returns build's latest commit id.
*
* @param buildId
* id of the build
* @throws IOException
* if any i/o error occurs.
* @throws ServerException
* if any other error occurs.
*/ | Returns build's latest commit id | getCommitId | {
"repo_name": "R-Brain/codenvy",
"path": "plugins/plugin-jenkins/codenvy-plugin-jenkins-webhooks/src/main/java/com/codenvy/plugin/jenkins/webhooks/JenkinsConnector.java",
"license": "epl-1.0",
"size": 11678
} | [
"java.io.IOException",
"org.eclipse.che.api.core.ServerException"
] | import java.io.IOException; import org.eclipse.che.api.core.ServerException; | import java.io.*; import org.eclipse.che.api.core.*; | [
"java.io",
"org.eclipse.che"
] | java.io; org.eclipse.che; | 1,887,282 |
protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
{
return CertificateUtils.loadCRL(crlPath);
} | Collection<? extends CRL> function(String crlPath) throws Exception { return CertificateUtils.loadCRL(crlPath); } | /**
* Loads certificate revocation list (CRL) from a file.
*
* Required for integrations to be able to override the mechanism used to
* load CRL in order to provide their own implementation.
*
* @param crlPath path of certificate revocation list file
* @return Collection of CRL's
... | Loads certificate revocation list (CRL) from a file. Required for integrations to be able to override the mechanism used to load CRL in order to provide their own implementation | loadCRL | {
"repo_name": "knowledgecode/WebSocket-for-Android",
"path": "src/android/org/eclipse/jetty/util/ssl/SslContextFactory.java",
"license": "apache-2.0",
"size": 24084
} | [
"java.util.Collection",
"org.eclipse.jetty.util.security.CertificateUtils"
] | import java.util.Collection; import org.eclipse.jetty.util.security.CertificateUtils; | import java.util.*; import org.eclipse.jetty.util.security.*; | [
"java.util",
"org.eclipse.jetty"
] | java.util; org.eclipse.jetty; | 1,986,903 |
@Override // NameNodeMXBean
public String getDeadNodes() {
final Map<String, Map<String, Object>> info =
new HashMap<String, Map<String, Object>>();
final List<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>();
blockManager.getDatanodeManager().fetchDatanodes(null, dead, true);
f... | @Override String function() { final Map<String, Map<String, Object>> info = new HashMap<String, Map<String, Object>>(); final List<DatanodeDescriptor> dead = new ArrayList<DatanodeDescriptor>(); blockManager.getDatanodeManager().fetchDatanodes(null, dead, true); for (DatanodeDescriptor node : dead) { Map<String, Object... | /**
* Returned information is a JSON representation of map with host name as the
* key and value is a map of dead node attribute keys to its values
*/ | Returned information is a JSON representation of map with host name as the key and value is a map of dead node attribute keys to its values | getDeadNodes | {
"repo_name": "yncxcw/Yarn-SBlock",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 338725
} | [
"com.google.common.collect.ImmutableMap",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor",
"org.mortbay.util.ajax.JSON"
] | import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor; import org.mortbay.util.ajax.JSON; | import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.mortbay.util.ajax.*; | [
"com.google.common",
"java.util",
"org.apache.hadoop",
"org.mortbay.util"
] | com.google.common; java.util; org.apache.hadoop; org.mortbay.util; | 1,318,703 |
public void paintBarShadow(Graphics2D g2, XYBarRenderer renderer,
int row, int column, RectangularShape bar, RectangleEdge base,
boolean pegShadow);
| void function(Graphics2D g2, XYBarRenderer renderer, int row, int column, RectangularShape bar, RectangleEdge base, boolean pegShadow); | /**
* Paints the shadow for a single bar on behalf of a renderer.
*
* @param g2 the graphics target.
* @param renderer the renderer.
* @param row the row index for the item.
* @param column the column index for the item.
* @param bar the bounds for the bar.
* @param ... | Paints the shadow for a single bar on behalf of a renderer | paintBarShadow | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYBarPainter.java",
"license": "lgpl-3.0",
"size": 3422
} | [
"java.awt.Graphics2D",
"java.awt.geom.RectangularShape",
"org.jfree.ui.RectangleEdge"
] | import java.awt.Graphics2D; import java.awt.geom.RectangularShape; import org.jfree.ui.RectangleEdge; | import java.awt.*; import java.awt.geom.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.ui"
] | java.awt; org.jfree.ui; | 1,451,120 |
public void trimTranslog() {
verifyNotClosed();
final Engine engine = getEngine();
engine.trimUnreferencedTranslogFiles();
} | void function() { verifyNotClosed(); final Engine engine = getEngine(); engine.trimUnreferencedTranslogFiles(); } | /**
* checks and removes translog files that no longer need to be retained. See
* {@link org.elasticsearch.index.translog.TranslogDeletionPolicy} for details
*/ | checks and removes translog files that no longer need to be retained. See <code>org.elasticsearch.index.translog.TranslogDeletionPolicy</code> for details | trimTranslog | {
"repo_name": "scorpionvicky/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 175161
} | [
"org.elasticsearch.index.engine.Engine"
] | import org.elasticsearch.index.engine.Engine; | import org.elasticsearch.index.engine.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 720,780 |
private String getPreferenceKey() {
IPerspectiveDescriptor perspective= fPage.getPerspective();
String perspectiveID= perspective != null ? perspective.getId() : "<unknown>"; //$NON-NLS-1$
return JavaEditor.EDITOR_SHOW_BREADCRUMB + "." + perspectiveID; //$NON-NLS-1$
} | String function() { IPerspectiveDescriptor perspective= fPage.getPerspective(); String perspectiveID= perspective != null ? perspective.getId() : STR; return JavaEditor.EDITOR_SHOW_BREADCRUMB + "." + perspectiveID; } | /**
* Returns the preference key for the breadcrumb. The value depends on the current perspective.
*
* @return the preference key to use
*/ | Returns the preference key for the breadcrumb. The value depends on the current perspective | getPreferenceKey | {
"repo_name": "kumattau/JDTPatch",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/javaeditor/ToggleBreadcrumbAction.java",
"license": "epl-1.0",
"size": 4568
} | [
"org.eclipse.ui.IPerspectiveDescriptor"
] | import org.eclipse.ui.IPerspectiveDescriptor; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,463,823 |
public static String getRegion(EurekaClientConfig clientConfig) {
String region = clientConfig.getRegion();
if (region == null) {
region = DEFAULT_REGION;
}
region = region.trim().toLowerCase();
return region;
} | static String function(EurekaClientConfig clientConfig) { String region = clientConfig.getRegion(); if (region == null) { region = DEFAULT_REGION; } region = region.trim().toLowerCase(); return region; } | /**
* Get the region that this particular instance is in.
*
* @return - The region in which the particular instance belongs to.
*/ | Get the region that this particular instance is in | getRegion | {
"repo_name": "spencergibb/eureka",
"path": "eureka-client/src/main/java/com/netflix/discovery/endpoint/EndpointUtils.java",
"license": "apache-2.0",
"size": 16882
} | [
"com.netflix.discovery.EurekaClientConfig"
] | import com.netflix.discovery.EurekaClientConfig; | import com.netflix.discovery.*; | [
"com.netflix.discovery"
] | com.netflix.discovery; | 1,558,392 |
getSchedulerHelperService().registerScheduledCall("FinalizeAPlansEvent",
() -> eventManager.fire(new FinalizeAPlansEvent(DateTimeUtil.getCurrentDate().plusDays(1))), createInitialDelay(),
createIntervalPeriod());
} | getSchedulerHelperService().registerScheduledCall(STR, () -> eventManager.fire(new FinalizeAPlansEvent(DateTimeUtil.getCurrentDate().plusDays(1))), createInitialDelay(), createIntervalPeriod()); } | /**
* Register Finalize A-Plan trigger in the {@link SchedulerHelperService} to invoke the workflow every day at a certain time.
*/ | Register Finalize A-Plan trigger in the <code>SchedulerHelperService</code> to invoke the workflow every day at a certain time | registerTrigger | {
"repo_name": "USEF-Foundation/ri.usef.energy",
"path": "usef-build/usef-workflow/usef-brp/src/main/java/energy/usef/brp/workflow/plan/aplan/finalize/FinalizeAPlansEventTrigger.java",
"license": "apache-2.0",
"size": 2680
} | [
"energy.usef.core.util.DateTimeUtil"
] | import energy.usef.core.util.DateTimeUtil; | import energy.usef.core.util.*; | [
"energy.usef.core"
] | energy.usef.core; | 229,246 |
public void setRoutingAddr(InetAddress addr)
{
this.routingAddr = addr;
} | void function(InetAddress addr) { this.routingAddr = addr; } | /**
* Set the KNXnet/IP routing multicast {@link Inet4Address IPv4 address}.
* Devices that do not implement KNXnet/IP routing shall set this value to
* null
*/ | Set the KNXnet/IP routing multicast <code>Inet4Address IPv4 address</code>. Devices that do not implement KNXnet/IP routing shall set this value to null | setRoutingAddr | {
"repo_name": "selfbus/tools-libraries",
"path": "sbtools-knxcom/src/main/java/org/selfbus/sbtools/knxcom/link/netip/blocks/DeviceInfoBlock.java",
"license": "gpl-3.0",
"size": 6017
} | [
"java.net.InetAddress"
] | import java.net.InetAddress; | import java.net.*; | [
"java.net"
] | java.net; | 976,570 |
public void readTokenStorageStream(DataInputStream in) throws IOException {
byte[] magic = new byte[TOKEN_STORAGE_MAGIC.length];
in.readFully(magic);
if (!Arrays.equals(magic, TOKEN_STORAGE_MAGIC)) {
throw new IOException("Bad header found in token storage.");
}
byte version = in.readByte();... | void function(DataInputStream in) throws IOException { byte[] magic = new byte[TOKEN_STORAGE_MAGIC.length]; in.readFully(magic); if (!Arrays.equals(magic, TOKEN_STORAGE_MAGIC)) { throw new IOException(STR); } byte version = in.readByte(); if (version != TOKEN_STORAGE_VERSION) { throw new IOException(STR + version + STR... | /**
* Convenience method for reading a token storage file directly from a
* datainputstream
*/ | Convenience method for reading a token storage file directly from a datainputstream | readTokenStorageStream | {
"repo_name": "vierja/hadoop-per-mare",
"path": "src/core/org/apache/hadoop/security/Credentials.java",
"license": "apache-2.0",
"size": 7301
} | [
"java.io.DataInputStream",
"java.io.IOException",
"java.util.Arrays"
] | import java.io.DataInputStream; import java.io.IOException; import java.util.Arrays; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,113,724 |
protected GrpcConfiguration parseConfiguration(GrpcConfiguration configuration, String remaining, Map<String, Object> parameters) throws Exception {
configuration.parseURI(new URI(remaining), parameters, this);
return configuration;
} | GrpcConfiguration function(GrpcConfiguration configuration, String remaining, Map<String, Object> parameters) throws Exception { configuration.parseURI(new URI(remaining), parameters, this); return configuration; } | /**
* Parses the configuration
*
* @return the parsed and valid configuration to use
*/ | Parses the configuration | parseConfiguration | {
"repo_name": "objectiser/camel",
"path": "components/camel-grpc/src/main/java/org/apache/camel/component/grpc/GrpcComponent.java",
"license": "apache-2.0",
"size": 1953
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,509,307 |
public static void setOptimalHeaderWidth(JTable jtable) {
int i;
for (i = 0; i < jtable.getColumnModel().getColumnCount(); i++)
setOptimalHeaderWidth(jtable, i);
} | static void function(JTable jtable) { int i; for (i = 0; i < jtable.getColumnModel().getColumnCount(); i++) setOptimalHeaderWidth(jtable, i); } | /**
* sets the optimal header width for alls column if the given table
*/ | sets the optimal header width for alls column if the given table | setOptimalHeaderWidth | {
"repo_name": "paolopavan/cfr",
"path": "src/weka/gui/JTableHelper.java",
"license": "gpl-3.0",
"size": 7986
} | [
"javax.swing.JTable"
] | import javax.swing.JTable; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 250,153 |
protected ClientSession setupSession(ClientSessionFactory cf) throws Exception {
ClientSession result = null;
try {
result = ra.createSession(cf, spec.getAcknowledgeModeInt(), spec.getUser(), spec.getPassword(), ra.getPreAcknowledge(), ra.getDupsOKBatchSize(), ra.getTransactionBatchSize(), isDe... | ClientSession function(ClientSessionFactory cf) throws Exception { ClientSession result = null; try { result = ra.createSession(cf, spec.getAcknowledgeModeInt(), spec.getUser(), spec.getPassword(), ra.getPreAcknowledge(), ra.getDupsOKBatchSize(), ra.getTransactionBatchSize(), isDeliveryTransacted, spec.isUseLocalTx(), ... | /**
* Setup a session
*
* @param cf
* @return The connection
* @throws Exception Thrown if an error occurs
*/ | Setup a session | setupSession | {
"repo_name": "cshannon/activemq-artemis",
"path": "artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java",
"license": "apache-2.0",
"size": 25097
} | [
"org.apache.activemq.artemis.api.core.client.ClientSession",
"org.apache.activemq.artemis.api.core.client.ClientSessionFactory"
] | import org.apache.activemq.artemis.api.core.client.ClientSession; import org.apache.activemq.artemis.api.core.client.ClientSessionFactory; | import org.apache.activemq.artemis.api.core.client.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,603,544 |
void cacheId(ByteBuffer id, V value); | void cacheId(ByteBuffer id, V value); | /**
* Caches a given identifier and the corresponding value.
*
* @param id a value identifier.
* @param value the value.
*/ | Caches a given identifier and the corresponding value | cacheId | {
"repo_name": "cumulusrdf/cumulusrdf",
"path": "cumulusrdf-framework/src/main/java/edu/kit/aifb/cumulus/framework/domain/dictionary/ICacheStrategy.java",
"license": "apache-2.0",
"size": 644
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 741,434 |
// check for default value
MonomerStore combinedMonomerStore = monomerStore;
if (combinedMonomerStore == null) {
MonomerFactory factory = null;
try {
factory = MonomerFactory.getInstance();
} catch (Exception ex) {
Logger.getLogger(ComplexNotationParser.class.getName()).log(
Level.S... | MonomerStore combinedMonomerStore = monomerStore; if (combinedMonomerStore == null) { MonomerFactory factory = null; try { factory = MonomerFactory.getInstance(); } catch (Exception ex) { Logger.getLogger(ComplexNotationParser.class.getName()).log( Level.SEVERE, null, ex); return null; } combinedMonomerStore = factory.... | /**
* This function checks the given MonomerStore. It is returned unchanged,
* when it is neither null nor empty. Else a fresh MonomerStore is fetched
* from the MonomerFactory. The function is used to ensure a default value.
*
* @param monomerStore
* @return monomerStore or default store
*/ | This function checks the given MonomerStore. It is returned unchanged, when it is neither null nor empty. Else a fresh MonomerStore is fetched from the MonomerFactory. The function is used to ensure a default value | checkForMonomerStore | {
"repo_name": "PistoiaHELM/HELMNotationToolkit",
"path": "source/org/helm/notation/tools/ComplexNotationParser.java",
"license": "mit",
"size": 92945
} | [
"java.util.logging.Level",
"java.util.logging.Logger",
"org.helm.notation.MonomerFactory",
"org.helm.notation.MonomerStore"
] | import java.util.logging.Level; import java.util.logging.Logger; import org.helm.notation.MonomerFactory; import org.helm.notation.MonomerStore; | import java.util.logging.*; import org.helm.notation.*; | [
"java.util",
"org.helm.notation"
] | java.util; org.helm.notation; | 953,050 |
@Test
public void testPatchBinaryDescription() throws IOException {
final String id = getRandomUniqueId();
createDatastream(id, "x", "some content");
final String location = serverAddress + id + "/x/fcr:metadata";
final HttpPatch patch = new HttpPatch(location);
patch.ad... | void function() throws IOException { final String id = getRandomUniqueId(); createDatastream(id, "x", STR); final String location = serverAddress + id + STR; final HttpPatch patch = new HttpPatch(location); patch.addHeader(STR, STR); patch.setEntity(new StringEntity(STR + serverAddress + id + STR + "<http: assertEquals... | /**
* Descriptions of bitstreams contain triples about the described thing, so only triples with the described thing
* as their subject are legal.
*
* @throws IOException in case of IOException
*/ | Descriptions of bitstreams contain triples about the described thing, so only triples with the described thing as their subject are legal | testPatchBinaryDescription | {
"repo_name": "nianma/fcrepo4",
"path": "fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/FedoraLdpIT.java",
"license": "apache-2.0",
"size": 97175
} | [
"java.io.IOException",
"org.apache.http.client.methods.HttpPatch",
"org.apache.http.entity.StringEntity",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.http.client.methods.HttpPatch; import org.apache.http.entity.StringEntity; import org.junit.Assert; | import java.io.*; import org.apache.http.client.methods.*; import org.apache.http.entity.*; import org.junit.*; | [
"java.io",
"org.apache.http",
"org.junit"
] | java.io; org.apache.http; org.junit; | 1,326,918 |
private Point[] getBullEyeCornerPoints(Point pCenter) throws NotFoundException {
Point pina = pCenter;
Point pinb = pCenter;
Point pinc = pCenter;
Point pind = pCenter;
boolean color = true;
for (nbCenterLayers = 1; nbCenterLayers < 9; nbCenterLayers++) {
Point pouta = getFirs... | Point[] function(Point pCenter) throws NotFoundException { Point pina = pCenter; Point pinb = pCenter; Point pinc = pCenter; Point pind = pCenter; boolean color = true; for (nbCenterLayers = 1; nbCenterLayers < 9; nbCenterLayers++) { Point pouta = getFirstDifferent(pina, color, 1, -1); Point poutb = getFirstDifferent(p... | /**
*
* <p> Finds the corners of a bull-eye centered on the passed point </p>
*
* @param pCenter Center point
* @return The corners of the bull-eye
* @throws NotFoundException If no valid bull-eye can be found
*/ | Finds the corners of a bull-eye centered on the passed point | getBullEyeCornerPoints | {
"repo_name": "tempredirect/zxing",
"path": "core/src/com/google/zxing/aztec/detector/Detector.java",
"license": "apache-2.0",
"size": 18514
} | [
"com.google.zxing.NotFoundException"
] | import com.google.zxing.NotFoundException; | import com.google.zxing.*; | [
"com.google.zxing"
] | com.google.zxing; | 858,178 |
public static void testRead(GeoPackage geoPackage, Integer expectedResults)
throws SQLException {
SpatialReferenceSystemDao dao = geoPackage
.getSpatialReferenceSystemDao();
List<SpatialReferenceSystem> results = dao.queryForAll();
if (expectedResults != null) {
TestCase.assertEquals(
"Unexpect... | static void function(GeoPackage geoPackage, Integer expectedResults) throws SQLException { SpatialReferenceSystemDao dao = geoPackage .getSpatialReferenceSystemDao(); List<SpatialReferenceSystem> results = dao.queryForAll(); if (expectedResults != null) { TestCase.assertEquals( STR, expectedResults.intValue(), results.... | /**
* Test read
*
* @param geoPackage
* @param expectedResults
* @throws SQLException
*/ | Test read | testRead | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/test/java/mil/nga/geopackage/srs/SpatialReferenceSystemUtils.java",
"license": "mit",
"size": 17263
} | [
"java.sql.SQLException",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"junit.framework.TestCase",
"mil.nga.geopackage.GeoPackage"
] | import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import junit.framework.TestCase; import mil.nga.geopackage.GeoPackage; | import java.sql.*; import java.util.*; import junit.framework.*; import mil.nga.geopackage.*; | [
"java.sql",
"java.util",
"junit.framework",
"mil.nga.geopackage"
] | java.sql; java.util; junit.framework; mil.nga.geopackage; | 1,329,736 |
protected void doWriteBody(COSDocument doc) throws IOException
{
COSDictionary trailer = doc.getTrailer();
COSDictionary root = (COSDictionary)trailer.getDictionaryObject( COSName.ROOT );
COSDictionary info = (COSDictionary)trailer.getDictionaryObject( COSName.INFO );
COSDictiona... | void function(COSDocument doc) throws IOException { COSDictionary trailer = doc.getTrailer(); COSDictionary root = (COSDictionary)trailer.getDictionaryObject( COSName.ROOT ); COSDictionary info = (COSDictionary)trailer.getDictionaryObject( COSName.INFO ); COSDictionary encrypt = (COSDictionary)trailer.getDictionaryObje... | /**
* This will write the body of the document.
*
* @param doc The document to write the body for.
*
* @throws IOException If there is an error writing the data.
*/ | This will write the body of the document | doWriteBody | {
"repo_name": "joansmith/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/COSWriter.java",
"license": "apache-2.0",
"size": 47041
} | [
"java.io.IOException",
"org.apache.pdfbox.cos.COSBase",
"org.apache.pdfbox.cos.COSDictionary",
"org.apache.pdfbox.cos.COSDocument",
"org.apache.pdfbox.cos.COSName"
] | import java.io.IOException; import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSDictionary; import org.apache.pdfbox.cos.COSDocument; import org.apache.pdfbox.cos.COSName; | import java.io.*; import org.apache.pdfbox.cos.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 745,156 |
public Font getCurrentFont() {
return this.font;
} | Font function() { return this.font; } | /**
* Returns the current font in use.
* @return the current font or null if no font is currently active.
*/ | Returns the current font in use | getCurrentFont | {
"repo_name": "chunlinyao/fop",
"path": "fop-core/src/main/java/org/apache/fop/svg/PDFTextUtil.java",
"license": "apache-2.0",
"size": 3357
} | [
"org.apache.fop.fonts.Font"
] | import org.apache.fop.fonts.Font; | import org.apache.fop.fonts.*; | [
"org.apache.fop"
] | org.apache.fop; | 2,263,003 |
public static void count(Time at, double dx, String... tagBits) throws UnsupportedOperationException {
tagBits = check(tagBits);
dflt.count(at, dx, (Object[]) tagBits);
} | static void function(Time at, double dx, String... tagBits) throws UnsupportedOperationException { tagBits = check(tagBits); dflt.count(at, dx, (Object[]) tagBits); } | /**
* Count historical -- edit an old Stat entry.
* Optional method! Not all implementations support this.
*
* @param dx
* @param tags
*/ | Count historical -- edit an old Stat entry. Optional method! Not all implementations support this | count | {
"repo_name": "sodash/open-code",
"path": "winterwell.utils/src/com/winterwell/datalog/DataLog.java",
"license": "mit",
"size": 14409
} | [
"com.winterwell.utils.time.Time"
] | import com.winterwell.utils.time.Time; | import com.winterwell.utils.time.*; | [
"com.winterwell.utils"
] | com.winterwell.utils; | 2,131,522 |
protected void multithreaded(Callable<?> c, int threadNum, String threadName) throws Exception {
GridTestUtils.runMultiThreaded(c, threadNum, threadName);
} | void function(Callable<?> c, int threadNum, String threadName) throws Exception { GridTestUtils.runMultiThreaded(c, threadNum, threadName); } | /**
* Runs given code in multiple threads and synchronously waits for all threads to complete.
* If any thread failed, exception will be thrown out of this method.
*
* @param c Callable.
* @param threadNum Thread number.
* @param threadName Thread name.
* @throws Exception If failed.
... | Runs given code in multiple threads and synchronously waits for all threads to complete. If any thread failed, exception will be thrown out of this method | multithreaded | {
"repo_name": "nizhikov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java",
"license": "apache-2.0",
"size": 99617
} | [
"java.util.concurrent.Callable",
"org.apache.ignite.testframework.GridTestUtils"
] | import java.util.concurrent.Callable; import org.apache.ignite.testframework.GridTestUtils; | import java.util.concurrent.*; import org.apache.ignite.testframework.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,267,863 |
public static Intent makeIntent(Context context,
Uri uri,
Handler downloadHandler) {
// Create the Intent that's associated to the DownloadService
// class.
Intent intent = new Intent(context,
... | static Intent function(Context context, Uri uri, Handler downloadHandler) { Intent intent = new Intent(context, DownloadService.class); intent.setData(uri); intent.putExtra(STR, new Messenger(downloadHandler)); return intent; } private final class ServiceHandler extends Handler { public ServiceHandler(Looper looper) { ... | /**
* Factory method to make the desired Intent.
*/ | Factory method to make the desired Intent | makeIntent | {
"repo_name": "potlatch4u/potlatch4u",
"path": "code/potlatch4u/src/org/coursera/potlatch4u/service/DownloadService.java",
"license": "mit",
"size": 10556
} | [
"android.content.Context",
"android.content.Intent",
"android.net.Uri",
"android.os.Handler",
"android.os.Looper",
"android.os.Messenger"
] | import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.os.Looper; import android.os.Messenger; | import android.content.*; import android.net.*; import android.os.*; | [
"android.content",
"android.net",
"android.os"
] | android.content; android.net; android.os; | 477,945 |
private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
if (gdate == null) {
gdate = (BaseCalendar.Date) gcal.newCalendarDate(getZone());
cachedFixedDate = Long.MIN_VALUE;
}
setGreg... | void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); if (gdate == null) { gdate = (BaseCalendar.Date) gcal.newCalendarDate(getZone()); cachedFixedDate = Long.MIN_VALUE; } setGregorianChange(gregorianCutover); } | /**
* Updates internal state.
*/ | Updates internal state | readObject | {
"repo_name": "openjdk/jdk7u",
"path": "jdk/src/share/classes/java/util/GregorianCalendar.java",
"license": "gpl-2.0",
"size": 133445
} | [
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,914,694 |
@DoesServiceRequest
public ArrayList<FileRange> downloadFileRanges(final AccessCondition accessCondition, FileRequestOptions options,
OperationContext opContext) throws StorageException {
if (opContext == null) {
opContext = new OperationContext();
}
options = Fi... | ArrayList<FileRange> function(final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } options = FileRequestOptions.populateAndApplyDefaults(options, this.fileServiceClient); return ExecutionEn... | /**
* Returns a collection of file ranges and their starting and ending byte offsets using the specified request
* options and operation context.
*
* @param accessCondition
* An {@link AccessCondition} object which represents the access conditions for the file.
* @param options... | Returns a collection of file ranges and their starting and ending byte offsets using the specified request options and operation context | downloadFileRanges | {
"repo_name": "Azure/azure-storage-android",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java",
"license": "apache-2.0",
"size": 138711
} | [
"com.microsoft.azure.storage.AccessCondition",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"com.microsoft.azure.storage.core.ExecutionEngine",
"java.util.ArrayList"
] | import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine; import java.util.ArrayList; | import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,610,092 |
Optional<Long> getNumBlockOutputOperations(); | Optional<Long> getNumBlockOutputOperations(); | /**
* Returns the number of block output operations during the {@link Spawn}'s execution.
*
* @return the measurement, or empty in case of execution errors or when the measurement is not
* implemented for the current platform
*/ | Returns the number of block output operations during the <code>Spawn</code>'s execution | getNumBlockOutputOperations | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/SpawnResult.java",
"license": "apache-2.0",
"size": 19128
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,141,974 |
public GroupCapabilityTable<GroupCapability> getGroupCapabilityTable(); | GroupCapabilityTable<GroupCapability> function(); | /**
* Retrieves the GroupCapabilityTable table.
*
* see org.melati.poem.prepro.TableDef#generateTableAccessorJava
* @return the GroupCapabilityTable from this database
*/ | Retrieves the GroupCapabilityTable table. see org.melati.poem.prepro.TableDef#generateTableAccessorJava | getGroupCapabilityTable | {
"repo_name": "timp21337/Melati",
"path": "melati/src/test/java/org/melati/util/test/generated/TreeDatabaseTablesBase.java",
"license": "gpl-2.0",
"size": 3417
} | [
"org.melati.poem.GroupCapability",
"org.melati.poem.GroupCapabilityTable"
] | import org.melati.poem.GroupCapability; import org.melati.poem.GroupCapabilityTable; | import org.melati.poem.*; | [
"org.melati.poem"
] | org.melati.poem; | 126,156 |
@NotNull
public List<GitlabProject> fetchProjects() throws Exception {
final ResponseHandler<List<GitlabProject>> handler = new GsonMultipleObjectsDeserializer<GitlabProject>(GSON, LIST_OF_PROJECTS_TYPE);
final String projectUrl = getRestApiUrl("projects");
final List<GitlabProject> result = new ArrayLi... | List<GitlabProject> function() throws Exception { final ResponseHandler<List<GitlabProject>> handler = new GsonMultipleObjectsDeserializer<GitlabProject>(GSON, LIST_OF_PROJECTS_TYPE); final String projectUrl = getRestApiUrl(STR); final List<GitlabProject> result = new ArrayList<GitlabProject>(); int pageNum = 1; while ... | /**
* Always forcibly attempts do fetch new projects from server.
*/ | Always forcibly attempts do fetch new projects from server | fetchProjects | {
"repo_name": "pwoodworth/intellij-community",
"path": "plugins/tasks/tasks-core/src/com/intellij/tasks/gitlab/GitlabRepository.java",
"license": "apache-2.0",
"size": 8361
} | [
"com.intellij.tasks.gitlab.model.GitlabProject",
"com.intellij.tasks.impl.httpclient.TaskResponseUtil",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.http.client.ResponseHandler",
"org.apache.http.client.methods.HttpGet",
"org.apache.http.client.utils.URIBuilder"
] | import com.intellij.tasks.gitlab.model.GitlabProject; import com.intellij.tasks.impl.httpclient.TaskResponseUtil; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.u... | import com.intellij.tasks.gitlab.model.*; import com.intellij.tasks.impl.httpclient.*; import java.util.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.client.utils.*; | [
"com.intellij.tasks",
"java.util",
"org.apache.http"
] | com.intellij.tasks; java.util; org.apache.http; | 2,302,122 |
void readFully(Buffer sink, long byteCount) throws IOException; | void readFully(Buffer sink, long byteCount) throws IOException; | /**
* Removes exactly {@code byteCount} bytes from this and appends them to
* {@code sink}. Throws an {@link java.io.EOFException} if the requested
* number of bytes cannot be read.
*/ | Removes exactly byteCount bytes from this and appends them to sink. Throws an <code>java.io.EOFException</code> if the requested number of bytes cannot be read | readFully | {
"repo_name": "honeyqa/honeyqa-android",
"path": "honeyqa/client/src/main/java/io/honeyqa/client/network/okio/BufferedSource.java",
"license": "mit",
"size": 10291
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 361,660 |
@Nonnull
PsiDocComment createDocCommentFromText(@Nonnull String text); | PsiDocComment createDocCommentFromText(@Nonnull String text); | /**
* Creates doc comment from text
*/ | Creates doc comment from text | createDocCommentFromText | {
"repo_name": "consulo/consulo-java",
"path": "java-psi-api/src/main/java/com/intellij/psi/JVMElementFactory.java",
"license": "apache-2.0",
"size": 10990
} | [
"com.intellij.psi.javadoc.PsiDocComment",
"javax.annotation.Nonnull"
] | import com.intellij.psi.javadoc.PsiDocComment; import javax.annotation.Nonnull; | import com.intellij.psi.javadoc.*; import javax.annotation.*; | [
"com.intellij.psi",
"javax.annotation"
] | com.intellij.psi; javax.annotation; | 2,223,943 |
@Override
public ResourceCollection<SubscriptionDailyUsageRecord> get()
{
PartnerServiceProxy<SubscriptionDailyUsageRecord, ResourceCollection<SubscriptionDailyUsageRecord>> partnerServiceProxy =
new PartnerServiceProxy<SubscriptionDailyUsageRecord, ResourceCollection<SubscriptionDailyUs... | ResourceCollection<SubscriptionDailyUsageRecord> function() { PartnerServiceProxy<SubscriptionDailyUsageRecord, ResourceCollection<SubscriptionDailyUsageRecord>> partnerServiceProxy = new PartnerServiceProxy<SubscriptionDailyUsageRecord, ResourceCollection<SubscriptionDailyUsageRecord>>( new TypeReference<ResourceColle... | /**
* Retrieves the subscription daily usage records.
*
* @return Collection of subscription daily usage records.
*/ | Retrieves the subscription daily usage records | get | {
"repo_name": "iogav/Partner-Center-Java-SDK",
"path": "PartnerSdk/src/main/java/com/microsoft/store/partnercenter/usage/SubscriptionDailyUsageRecordCollectionOperations.java",
"license": "mit",
"size": 3167
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"com.microsoft.store.partnercenter.PartnerService",
"com.microsoft.store.partnercenter.models.ResourceCollection",
"com.microsoft.store.partnercenter.models.usage.SubscriptionDailyUsageRecord",
"com.microsoft.store.partnercenter.network.PartnerServiceProxy",
... | import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.store.partnercenter.PartnerService; import com.microsoft.store.partnercenter.models.ResourceCollection; import com.microsoft.store.partnercenter.models.usage.SubscriptionDailyUsageRecord; import com.microsoft.store.partnercenter.network.PartnerS... | import com.fasterxml.jackson.core.type.*; import com.microsoft.store.partnercenter.*; import com.microsoft.store.partnercenter.models.*; import com.microsoft.store.partnercenter.models.usage.*; import com.microsoft.store.partnercenter.network.*; import java.text.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.microsoft.store",
"java.text",
"java.util"
] | com.fasterxml.jackson; com.microsoft.store; java.text; java.util; | 1,288,025 |
@Deprecated
AdminService.BlockingInterface getAdmin(final ServerName serverName) throws IOException; | AdminService.BlockingInterface getAdmin(final ServerName serverName) throws IOException; | /**
* Establishes a connection to the region server at the specified address.
* @param serverName
* @return proxy for HRegionServer
* @throws IOException if a remote or network exception occurs
* @deprecated internal method, do not use thru HConnection */ | Establishes a connection to the region server at the specified address | getAdmin | {
"repo_name": "toshimasa-nasu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnection.java",
"license": "apache-2.0",
"size": 23295
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.protobuf.generated.AdminProtos"
] | import java.io.IOException; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.protobuf.generated.AdminProtos; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,304,609 |
private Map<String, String> getQueryParameters(HttpServletRequest request) {
Map<String, String> queryParameters = new HashMap<>();
String queryString = request.getQueryString();
if (StringUtils.isEmpty(queryString)) {
System.out
.println("ProcessStartActionHandler.getQueryParameters(): ERROR: query s... | Map<String, String> function(HttpServletRequest request) { Map<String, String> queryParameters = new HashMap<>(); String queryString = request.getQueryString(); if (StringUtils.isEmpty(queryString)) { System.out .println(STR); return null; } String[] parameters; if (queryString.contains("&")) { parameters = queryString... | /**
* getQueryParameters - map of query parameter to value
*
* @param request
* @return map of request parameters
*/ | getQueryParameters - map of query parameter to value | getQueryParameters | {
"repo_name": "shiveshpandey/StreamQuote",
"path": "src/main/java/com/streamquote/jettyhandler/ProcessStartActionHandler.java",
"license": "mit",
"size": 3927
} | [
"java.util.HashMap",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.lang3.StringUtils"
] | import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; | import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang3.*; | [
"java.util",
"javax.servlet",
"org.apache.commons"
] | java.util; javax.servlet; org.apache.commons; | 315,165 |
public Message createMessage() throws JMSException {
if (closed) {
throw (new JMSException("Publisher object has been closed"));
}
Message message = null;
message = session.createMessage();
return message;
} | Message function() throws JMSException { if (closed) { throw (new JMSException(STR)); } Message message = null; message = session.createMessage(); return message; } | /**
* Method createMessage
*
*
* @return Message
*
* @throws JMSException
*
*/ | Method createMessage | createMessage | {
"repo_name": "csrg-utfsm/acscb",
"path": "LGPL/CommonSoftware/ACSLaser/cmw-mom/src/cern/cmw/mom/pubsub/impl/DefaultPublisherImpl.java",
"license": "mit",
"size": 11070
} | [
"javax.jms.JMSException",
"javax.jms.Message"
] | import javax.jms.JMSException; import javax.jms.Message; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,560,609 |
public static Map<String, Object> makeExpMap(final ReadableVersion version, final String expTypeName) {
final String typeOfExp = expTypeName;
final Map<String, Object> expAttrMap = new java.util.HashMap<String, Object>();
//Need to get the dbId for the correct ExperimentType
fi... | static Map<String, Object> function(final ReadableVersion version, final String expTypeName) { final String typeOfExp = expTypeName; final Map<String, Object> expAttrMap = new java.util.HashMap<String, Object>(); final java.util.Set<ExperimentType> expTypeList = new java.util.HashSet<ExperimentType>(); SyntheticGeneMan... | /**
*
* SyntheticGeneManager.makeExpMap Prepares a Map to search for Experiments of a type
*
* @param version
* @return Map HashMap to find Experiments
*/ | SyntheticGeneManager.makeExpMap Prepares a Map to search for Experiments of a type | makeExpMap | {
"repo_name": "homiak/pims-lims",
"path": "src/presentation/org/pimslims/presentation/construct/SyntheticGeneManager.java",
"license": "bsd-2-clause",
"size": 19254
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.pimslims.dao.ReadableVersion",
"org.pimslims.model.reference.ExperimentType"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.pimslims.dao.ReadableVersion; import org.pimslims.model.reference.ExperimentType; | import java.util.*; import org.pimslims.dao.*; import org.pimslims.model.reference.*; | [
"java.util",
"org.pimslims.dao",
"org.pimslims.model"
] | java.util; org.pimslims.dao; org.pimslims.model; | 1,911,218 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.