method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void getInterestForRegion()
{
Region region1 = cache.getRegion(Region.SEPARATOR + REGION_NAME);
boolean exceptionOccured = false;
// test getInterestList()
try {
region1.getInterestList();
}
catch (UnsupportedOperationException e) {
exceptionOccured = true;
}
... | static void function() { Region region1 = cache.getRegion(Region.SEPARATOR + REGION_NAME); boolean exceptionOccured = false; try { region1.getInterestList(); } catch (UnsupportedOperationException e) { exceptionOccured = true; } finally { if (!exceptionOccured) fail(STR); } exceptionOccured = false; try { region1.getIn... | /**
* This method invokes all the getter API's for interest-list on the
* test-region and verifies that <code>UnsupportedOperationException</code> is thrown
* in all the cases since test-region does not have bridge-server or
* bridge-client.
*
* @see Region#getInterestList()
* @see Region#getInter... | This method invokes all the getter API's for interest-list on the test-region and verifies that <code>UnsupportedOperationException</code> is thrown in all the cases since test-region does not have bridge-server or bridge-client | getInterestForRegion | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/NewRegionAttributesDUnitTest.java",
"license": "apache-2.0",
"size": 15943
} | [
"com.gemstone.gemfire.cache.Region"
] | import com.gemstone.gemfire.cache.Region; | import com.gemstone.gemfire.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,499,074 |
@RequestMapping(value = MAPPING_1_0_0 + "/{layerId}@{crs}/{styleKey}/{tileLevel}/{xIndex}/{yIndex}.{imageFormat}",
method = RequestMethod.GET)
public void getTile(@PathVariable String layerId, @PathVariable String styleKey, @PathVariable String crs,
@PathVariable Integer tileLevel, @PathVariable Integer xInd... | @RequestMapping(value = MAPPING_1_0_0 + STR, method = RequestMethod.GET) void function(@PathVariable String layerId, @PathVariable String styleKey, @PathVariable String crs, @PathVariable Integer tileLevel, @PathVariable Integer xIndex, @PathVariable Integer yIndex, @RequestParam(required = false) Double resolution, @R... | /**
* Publishes a single tile.
*
* @param response
* @throws GeomajasException
* @throws IOException
*/ | Publishes a single tile | getTile | {
"repo_name": "geomajas/geomajas-project-server",
"path": "plugin/rasterizing/rasterizing/src/main/java/org/geomajas/plugin/rasterizing/mvc/TmsController.java",
"license": "agpl-3.0",
"size": 20253
} | [
"javax.servlet.http.HttpServletResponse",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.bind.annotation.RequestParam"
] | import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; | import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 2,666,314 |
protected void initMouseWheelListener() {
cloud.addMouseWheelListener(new MouseWheelListener() {
| void function() { cloud.addMouseWheelListener(new MouseWheelListener() { | /**
* Initialize the mouse wheel listener to support
* zooming in and out.
*/ | Initialize the mouse wheel listener to support zooming in and out | initMouseWheelListener | {
"repo_name": "bdaum/zoraPD",
"path": "com.bdaum.zoom.zest.cloudio/src/org/eclipse/zest/cloudio/TagCloudViewer.java",
"license": "gpl-2.0",
"size": 10739
} | [
"org.eclipse.swt.events.MouseWheelListener"
] | import org.eclipse.swt.events.MouseWheelListener; | import org.eclipse.swt.events.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 347,863 |
public synchronized Properties loadMeta() throws Exception {
File metaFile = new File(META_FILE_NAME);
if (!metaFile.exists() && !metaFile.getParentFile().mkdirs() && !metaFile.createNewFile()) {
throw new IllegalStateException("failed to create meta file: " + metaFile.getAbsolutePath())... | synchronized Properties function() throws Exception { File metaFile = new File(META_FILE_NAME); if (!metaFile.exists() && !metaFile.getParentFile().mkdirs() && !metaFile.createNewFile()) { throw new IllegalStateException(STR + metaFile.getAbsolutePath()); } try (FileInputStream inStream = new FileInputStream(metaFile))... | /**
* Load Metadata from cache file.
*
* @return metadata
* @throws Exception any exception during load
*/ | Load Metadata from cache file | loadMeta | {
"repo_name": "alibaba/nacos",
"path": "naming/src/main/java/com/alibaba/nacos/naming/consistency/persistent/raft/RaftStore.java",
"license": "apache-2.0",
"size": 13600
} | [
"java.io.File",
"java.io.FileInputStream",
"java.util.Properties"
] | import java.io.File; import java.io.FileInputStream; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,514,502 |
public BusinessObjectDataKey createBusinessObjectDataKeyFromEntity(BusinessObjectDataEntity businessObjectDataEntity)
{
BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey();
businessObjectDataKey.setNamespace(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObje... | BusinessObjectDataKey function(BusinessObjectDataEntity businessObjectDataEntity) { BusinessObjectDataKey businessObjectDataKey = new BusinessObjectDataKey(); businessObjectDataKey.setNamespace(businessObjectDataEntity.getBusinessObjectFormat().getBusinessObjectDefinition().getNamespace().getCode()); businessObjectData... | /**
* Creates a business object data key from a business object data entity.
*
* @param businessObjectDataEntity the business object data entity.
*
* @return the business object data key.
*/ | Creates a business object data key from a business object data entity | createBusinessObjectDataKeyFromEntity | {
"repo_name": "kusid/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/BusinessObjectDataHelper.java",
"license": "apache-2.0",
"size": 38521
} | [
"org.finra.herd.model.api.xml.BusinessObjectDataKey",
"org.finra.herd.model.jpa.BusinessObjectDataEntity"
] | import org.finra.herd.model.api.xml.BusinessObjectDataKey; import org.finra.herd.model.jpa.BusinessObjectDataEntity; | import org.finra.herd.model.api.xml.*; import org.finra.herd.model.jpa.*; | [
"org.finra.herd"
] | org.finra.herd; | 110,694 |
private JCheckBoxMenuItem makeCheckBoxMenuItem(String name, String cmd,
boolean sel) {
JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(name, sel);
menuItem.setActionCommand(cmd);
menuItem.addActionListener(this);
return menuItem;
} | JCheckBoxMenuItem function(String name, String cmd, boolean sel) { JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(name, sel); menuItem.setActionCommand(cmd); menuItem.addActionListener(this); return menuItem; } | /**
* Make individual menu item.
*
* @param name the menu item name
* @param cmd the command string
* @param sel the selected state
* @return the instance of <code>MenuItem</code>
*/ | Make individual menu item | makeCheckBoxMenuItem | {
"repo_name": "halayudha/bearded-octo-bugfixes",
"path": "BestPeerDevelop/sg/edu/nus/gui/bootstrap/MenuBar.java",
"license": "gpl-3.0",
"size": 11827
} | [
"javax.swing.JCheckBoxMenuItem"
] | import javax.swing.JCheckBoxMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,031,189 |
public Location getLocationAtEntry() {
InstructionHandle handle = getEntry().getFirstInstruction();
assert handle != null;
return new Location(handle, getEntry());
} | Location function() { InstructionHandle handle = getEntry().getFirstInstruction(); assert handle != null; return new Location(handle, getEntry()); } | /**
* Get the Location representing the entry to the CFG. Note that this is a
* "fake" Location, and shouldn't be relied on to yield source line
* information.
*
* @return Location at entry to CFG
*/ | Get the Location representing the entry to the CFG. Note that this is a "fake" Location, and shouldn't be relied on to yield source line information | getLocationAtEntry | {
"repo_name": "spotbugs/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/CFG.java",
"license": "lgpl-2.1",
"size": 19933
} | [
"org.apache.bcel.generic.InstructionHandle"
] | import org.apache.bcel.generic.InstructionHandle; | import org.apache.bcel.generic.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 1,764,768 |
Actor findActor(String name); | Actor findActor(String name); | /**
* Returns the first actor found with the specified name. Note this
* recursively compares the name of every actor in the GUI.
*
* @return The actor if it exists, null otherwise.
**/ | Returns the first actor found with the specified name. Note this recursively compares the name of every actor in the GUI | findActor | {
"repo_name": "ari-zah/gaiasky",
"path": "core/src/gaia/cu9/ari/gaiaorbit/interfce/IGui.java",
"license": "lgpl-3.0",
"size": 2633
} | [
"com.badlogic.gdx.scenes.scene2d.Actor"
] | import com.badlogic.gdx.scenes.scene2d.Actor; | import com.badlogic.gdx.scenes.scene2d.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,485,386 |
@Nullable
protected ResourceBundle retrieveSystemPropertyBundle(
@NotNull final String systemProperty,
@NotNull final Locale locale,
@NotNull final ClassLoader classLoader)
{
@Nullable ResourceBundle result = getCachedBundle();
if (result == null)
{
... | ResourceBundle function( @NotNull final String systemProperty, @NotNull final Locale locale, @NotNull final ClassLoader classLoader) { @Nullable ResourceBundle result = getCachedBundle(); if (result == null) { result = super.retrieveSystemPropertyBundle( systemProperty, locale, classLoader); if (result != null) { cache... | /**
* Retrieves the bundle from the environment using given information.
* @param locale the locale.
* @param systemProperty the system property.
* @param classLoader the class loader.
* @return the bundle.
*/ | Retrieves the bundle from the environment using given information | retrieveSystemPropertyBundle | {
"repo_name": "rydnr/java-commons",
"path": "src/main/java/org/acmsl/commons/CachingBundleI14able.java",
"license": "gpl-2.0",
"size": 16572
} | [
"java.util.Locale",
"java.util.ResourceBundle",
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable"
] | import java.util.Locale; import java.util.ResourceBundle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 372,238 |
public int selectInTree(JTreeOperator tree, String node) throws Exception {
tree.expandRow(0);
int c = tree.getRowCount();
TreePath foundPath = null;
for (int i = 0; i < c; i++) {
TreePath path = tree.getPathForRow(i);
System.out.println("Path: " + path);
Object[] pathElements = path.getPath();
... | int function(JTreeOperator tree, String node) throws Exception { tree.expandRow(0); int c = tree.getRowCount(); TreePath foundPath = null; for (int i = 0; i < c; i++) { TreePath path = tree.getPathForRow(i); System.out.println(STR + path); Object[] pathElements = path.getPath(); if (pathElements == null pathElements.le... | /**
* expand a tree node and select it
*
* @param tree the tree operator to choose in
* @param node the Tree node NAME to choose
* @return
* @throws Exception
*/ | expand a tree node and select it | selectInTree | {
"repo_name": "Top-Q/jsystem-regression",
"path": "src/com/aqua/jsystemobject/JemmySupport.java",
"license": "apache-2.0",
"size": 36457
} | [
"javax.swing.tree.TreePath",
"org.netbeans.jemmy.operators.JTreeOperator"
] | import javax.swing.tree.TreePath; import org.netbeans.jemmy.operators.JTreeOperator; | import javax.swing.tree.*; import org.netbeans.jemmy.operators.*; | [
"javax.swing",
"org.netbeans.jemmy"
] | javax.swing; org.netbeans.jemmy; | 253,729 |
@Override public void exitExpressionLogicNot(@NotNull BigDataScriptParser.ExpressionLogicNotContext ctx) { } | @Override public void exitExpressionLogicNot(@NotNull BigDataScriptParser.ExpressionLogicNotContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterExpressionLogicNot | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptBaseListener.java",
"license": "apache-2.0",
"size": 36363
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 449,829 |
private void prepareEncoder(int width, int height, int bitRate) {
mBufferInfo = new MediaCodec.BufferInfo();
MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, width, height);
// Set some properties. Failing to specify some of these can cause the MediaCodec
// configure... | void function(int width, int height, int bitRate) { mBufferInfo = new MediaCodec.BufferInfo(); MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, width, height); format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface); format.setInteger(MediaFormat.KEY_BIT_RATE, ... | /**
* Configures encoder and muxer state, and prepares the input Surface. Initializes
* mEncoder, mMuxer, mInputSurface, mBufferInfo, mTrackIndex, and mMuxerStarted.
*/ | Configures encoder and muxer state, and prepares the input Surface. Initializes mEncoder, mMuxer, mInputSurface, mBufferInfo, mTrackIndex, and mMuxerStarted | prepareEncoder | {
"repo_name": "PhilLab/Android-MediaCodec-Examples",
"path": "CameraToMpegTest.java",
"license": "apache-2.0",
"size": 39345
} | [
"android.media.MediaCodec",
"android.media.MediaCodecInfo",
"android.media.MediaFormat",
"android.media.MediaMuxer",
"android.util.Log",
"java.io.File",
"java.io.IOException"
] | import android.media.MediaCodec; import android.media.MediaCodecInfo; import android.media.MediaFormat; import android.media.MediaMuxer; import android.util.Log; import java.io.File; import java.io.IOException; | import android.media.*; import android.util.*; import java.io.*; | [
"android.media",
"android.util",
"java.io"
] | android.media; android.util; java.io; | 1,189,503 |
azure
.privateDnsZones()
.manager()
.serviceClient()
.getPrivateZones()
.createOrUpdate(
"resourceGroup1",
"privatezone1.com",
new PrivateZoneInner().withLocation("Global").withTags(mapOf("key1", "value1")),
... | azure .privateDnsZones() .manager() .serviceClient() .getPrivateZones() .createOrUpdate( STR, STR, new PrivateZoneInner().withLocation(STR).withTags(mapOf("key1", STR)), null, null, Context.NONE); } | /**
* Sample code: PUT Private DNS Zone.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/ | Sample code: PUT Private DNS Zone | pUTPrivateDNSZone | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/privatedns/generated/PrivateZonesCreateOrUpdateSamples.java",
"license": "mit",
"size": 1635
} | [
"com.azure.core.util.Context",
"com.azure.resourcemanager.privatedns.fluent.models.PrivateZoneInner"
] | import com.azure.core.util.Context; import com.azure.resourcemanager.privatedns.fluent.models.PrivateZoneInner; | import com.azure.core.util.*; import com.azure.resourcemanager.privatedns.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 793,437 |
CompletableFuture<Void> throttle() {
if (this.isSuspended.get()) {
// Temporarily disabled. Do not throttle.
log.debug("{}: Throttler suspended.", this.traceObjectId);
return CompletableFuture.completedFuture(null);
}
val delay = new AtomicReference<>(thi... | CompletableFuture<Void> throttle() { if (this.isSuspended.get()) { log.debug(STR, this.traceObjectId); return CompletableFuture.completedFuture(null); } val delay = new AtomicReference<>(this.throttlerCalculator.getThrottlingDelay()); if (!delay.get().isMaximum()) { val existingDelay = this.currentDelay.get(); if (exis... | /**
* Throttles if necessary using the {@link ThrottlerCalculator} passed to this class' constructor as input.
*
* @return A CompletableFuture that is either already completed (if no throttling is required) or will complete at
* some time in the future based on the throttling delay value returned by... | Throttles if necessary using the <code>ThrottlerCalculator</code> passed to this class' constructor as input | throttle | {
"repo_name": "pravega/pravega",
"path": "segmentstore/server/src/main/java/io/pravega/segmentstore/server/logs/Throttler.java",
"license": "apache-2.0",
"size": 10012
} | [
"io.pravega.common.concurrent.Futures",
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.atomic.AtomicReference"
] | import io.pravega.common.concurrent.Futures; import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicReference; | import io.pravega.common.concurrent.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; | [
"io.pravega.common",
"java.util"
] | io.pravega.common; java.util; | 1,540,890 |
EAttribute getDynamicDemand_Kind(); | EAttribute getDynamicDemand_Kind(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61968.Metering.DynamicDemand#getKind <em>Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Kind</em>'.
* @see CIM.IEC61968.Metering.DynamicDemand#getKind()
* @see #getDynamicDemand()
... | Returns the meta object for the attribute '<code>CIM.IEC61968.Metering.DynamicDemand#getKind Kind</code>'. | getDynamicDemand_Kind | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Metering/MeteringPackage.java",
"license": "mit",
"size": 264485
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 660,811 |
public ClassDescriptor getTypeQualifierClassDescriptor() {
return typeQualifier;
} | ClassDescriptor function() { return typeQualifier; } | /**
* Get the ClassDescriptor which specifies the type qualifier annotation.
*
* @return ClassDescriptor which specifies the type qualifier annotation
*/ | Get the ClassDescriptor which specifies the type qualifier annotation | getTypeQualifierClassDescriptor | {
"repo_name": "jesusaplsoft/FindAllBugs",
"path": "findbugs/src/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierValue.java",
"license": "gpl-2.0",
"size": 16375
} | [
"edu.umd.cs.findbugs.classfile.ClassDescriptor"
] | import edu.umd.cs.findbugs.classfile.ClassDescriptor; | import edu.umd.cs.findbugs.classfile.*; | [
"edu.umd.cs"
] | edu.umd.cs; | 2,879,905 |
public static AnnotateImagesFromBytesWithContext annotateImagesFromBytesWithContext(
List<Feature> features, long batchSize) {
return annotateImagesFromBytesWithContext(features, batchSize, DEFAULT_PARALLELISM);
} | static AnnotateImagesFromBytesWithContext function( List<Feature> features, long batchSize) { return annotateImagesFromBytesWithContext(features, batchSize, DEFAULT_PARALLELISM); } | /**
* Creates a {@link org.apache.beam.sdk.transforms.PTransform} that annotates images from KVs of
* their GCS addresses in Strings and {@link ImageContext} for each image. Uses a default value 5
* for desiredRequestParallelism.
*
* @param features annotation features that should be passed to the API
... | Creates a <code>org.apache.beam.sdk.transforms.PTransform</code> that annotates images from KVs of their GCS addresses in Strings and <code>ImageContext</code> for each image. Uses a default value 5 for desiredRequestParallelism | annotateImagesFromBytesWithContext | {
"repo_name": "lukecwik/incubator-beam",
"path": "sdks/java/extensions/ml/src/main/java/org/apache/beam/sdk/extensions/ml/CloudVision.java",
"license": "apache-2.0",
"size": 13588
} | [
"com.google.cloud.vision.v1.Feature",
"java.util.List"
] | import com.google.cloud.vision.v1.Feature; import java.util.List; | import com.google.cloud.vision.v1.*; import java.util.*; | [
"com.google.cloud",
"java.util"
] | com.google.cloud; java.util; | 699,807 |
public void testRetryZero(PrintWriter out) throws Exception {
RetryCallable task = new RetryCallable();
TaskStatus<Void> status = scheduler.schedule(task, DEFAULT_SCHEDULING_DELAY, TimeUnit.MILLISECONDS);
for (long start = System.nanoTime(); !status.hasResult() && System.nanoTime() - start < TIM... | void function(PrintWriter out) throws Exception { RetryCallable task = new RetryCallable(); TaskStatus<Void> status = scheduler.schedule(task, DEFAULT_SCHEDULING_DELAY, TimeUnit.MILLISECONDS); for (long start = System.nanoTime(); !status.hasResult() && System.nanoTime() - start < TIMEOUT_NS; Thread.sleep(POLL_INTERVAL)... | /**
* Schedule a task that fails all execution attempts, and see that it is not retried.
*/ | Schedule a task that fails all execution attempts, and see that it is not retried | testRetryZero | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat_retry/test-applications/retrytest/src/web/PersistentRetryTestServlet.java",
"license": "epl-1.0",
"size": 23436
} | [
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.PrintWriter",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.TimeUnit"
] | import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*; | [
"com.ibm.websphere",
"java.io",
"java.util"
] | com.ibm.websphere; java.io; java.util; | 652,789 |
public Crypto loadSignatureCrypto(RequestData reqData)
throws WSSecurityException {
Crypto crypto = null;
String sigPropFile =
getString(WSHandlerConstants.SIG_PROP_FILE, reqData.getMsgContext());
if (sigPropFile != null) {
crypto = (Crypto) cryptos... | Crypto function(RequestData reqData) throws WSSecurityException { Crypto crypto = null; String sigPropFile = getString(WSHandlerConstants.SIG_PROP_FILE, reqData.getMsgContext()); if (sigPropFile != null) { crypto = (Crypto) cryptos.get(sigPropFile); if (crypto == null) { crypto = CryptoFactory.getInstance( sigPropFile,... | /**
* Hook to allow subclasses to load their Signature Crypto however they see
* fit.
*/ | Hook to allow subclasses to load their Signature Crypto however they see fit | loadSignatureCrypto | {
"repo_name": "madurangasiriwardena/wso2-wss4j",
"path": "modules/wss4j/src/org/apache/ws/security/handler/WSHandler.java",
"license": "apache-2.0",
"size": 57565
} | [
"java.util.Properties",
"org.apache.ws.security.WSSecurityException",
"org.apache.ws.security.components.crypto.Crypto",
"org.apache.ws.security.components.crypto.CryptoFactory"
] | import java.util.Properties; import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.components.crypto.Crypto; import org.apache.ws.security.components.crypto.CryptoFactory; | import java.util.*; import org.apache.ws.security.*; import org.apache.ws.security.components.crypto.*; | [
"java.util",
"org.apache.ws"
] | java.util; org.apache.ws; | 2,880,531 |
private static CarData loadCarData(Path directory) throws IOException {
Properties p = new Properties();
Path info = Paths.get(directory.toString(), infoFileName);
if (info == null || !Files.exists(info)) {
throw new IOException("Failed to load CarData from info.properties in t... | static CarData function(Path directory) throws IOException { Properties p = new Properties(); Path info = Paths.get(directory.toString(), infoFileName); if (info == null !Files.exists(info)) { throw new IOException(STR); } p.load(new FileInputStream(info.toFile())); String latitude = p.getProperty(STR); String longitud... | /**
* Loads the CarData from the {@value #infoFileName} in <code>directory</code>.
*
* @param directory from which to load CarData
* @return a new CarData object from the directory properties
* @throws IOException if an error during loading occurs
*/ | Loads the CarData from the #infoFileName in <code>directory</code> | loadCarData | {
"repo_name": "sk413025/carcv",
"path": "carcv-core/src/main/java/org/carcv/core/io/DirectoryLoader.java",
"license": "apache-2.0",
"size": 4543
} | [
"java.io.FileInputStream",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.nio.file.Paths",
"java.util.Date",
"java.util.Properties",
"org.carcv.core.model.Address",
"org.carcv.core.model.CarData"
] | import java.io.FileInputStream; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Date; import java.util.Properties; import org.carcv.core.model.Address; import org.carcv.core.model.CarData; | import java.io.*; import java.nio.file.*; import java.util.*; import org.carcv.core.model.*; | [
"java.io",
"java.nio",
"java.util",
"org.carcv.core"
] | java.io; java.nio; java.util; org.carcv.core; | 1,687,946 |
@Override
protected boolean checkCulling(Camera viewCam) {
return true;
} | boolean function(Camera viewCam) { return true; } | /**
* Directional light are always in the view frustum
* @param viewCam
* @return
*/ | Directional light are always in the view frustum | checkCulling | {
"repo_name": "atomixnmc/jmonkeyengine",
"path": "jme3-core/src/main/java/com/jme3/shadow/DirectionalLightShadowRenderer.java",
"license": "bsd-3-clause",
"size": 11486
} | [
"com.jme3.renderer.Camera"
] | import com.jme3.renderer.Camera; | import com.jme3.renderer.*; | [
"com.jme3.renderer"
] | com.jme3.renderer; | 316,153 |
private int getPageEndIndex() {
int startOffset = getCurrentPageNumber() * pageSize;
if (startOffset < 0) {
startOffset = 0;
}
int endOffset = startOffset + pageSize;
if (endOffset > dataset.size()) {
endOffset = dataset.size();
}
List... | int function() { int startOffset = getCurrentPageNumber() * pageSize; if (startOffset < 0) { startOffset = 0; } int endOffset = startOffset + pageSize; if (endOffset > dataset.size()) { endOffset = dataset.size(); } List parentList = dataset.subList(0, endOffset); List data = expand(parentList); if (!parentIsAnElement)... | /**
* Returns the ending element index for a page (1 based)
* @return int
*/ | Returns the ending element index for a page (1 based) | getPageEndIndex | {
"repo_name": "hustodemon/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java",
"license": "gpl-2.0",
"size": 19148
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,891,296 |
public static IGroupMember getGroupMember(String key, Class<?> type) throws GroupsException
{
LOGGER.trace("Invoking getEntity for key='{}', type='{}'", key, type);
return instance().igetGroupMember(key, type);
} | static IGroupMember function(String key, Class<?> type) throws GroupsException { LOGGER.trace(STR, key, type); return instance().igetGroupMember(key, type); } | /**
* Returns an <code> IGroupMember </code> representing either a group or a
* portal entity. If the parm <code> type </code> is the group type, the
* <code> IGroupMember </code> is an <code> IEntityGroup </code> else it is
* an <code> IEntity </code> .
*/ | Returns an <code> IGroupMember </code> representing either a group or a portal entity. If the parm <code> type </code> is the group type, the <code> IGroupMember </code> is an <code> IEntityGroup </code> else it is an <code> IEntity </code> | getGroupMember | {
"repo_name": "apetro/uPortal",
"path": "uportal-war/src/main/java/org/apereo/portal/services/GroupService.java",
"license": "apache-2.0",
"size": 16926
} | [
"org.apereo.portal.groups.GroupsException",
"org.apereo.portal.groups.IGroupMember"
] | import org.apereo.portal.groups.GroupsException; import org.apereo.portal.groups.IGroupMember; | import org.apereo.portal.groups.*; | [
"org.apereo.portal"
] | org.apereo.portal; | 2,283,676 |
public static boolean copyFile(String sourceFilePath, String destFilePath) {
InputStream inputStream = null;
try {
inputStream = new FileInputStream(sourceFilePath);
} catch (FileNotFoundException e) {
throw new RuntimeException("FileNotFoundException occurred. ", e);... | static boolean function(String sourceFilePath, String destFilePath) { InputStream inputStream = null; try { inputStream = new FileInputStream(sourceFilePath); } catch (FileNotFoundException e) { throw new RuntimeException(STR, e); } return writeFile(destFilePath, inputStream); } /** * read file to string list, a elemen... | /**
* copy file
*
* @param sourceFilePath
* @param destFilePath
* @return
* @throws RuntimeException if an error occurs while operator FileOutputStream
*/ | copy file | copyFile | {
"repo_name": "zhengjiong/JieSeHelper",
"path": "app/src/main/java/namofo/org/jiesehelper/util/FileUtils.java",
"license": "apache-2.0",
"size": 19207
} | [
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.InputStream"
] | import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,176,832 |
public static void disconnect(MongoClient mongo) {
if (mongo != null) {
mongo.close();
}
} | static void function(MongoClient mongo) { if (mongo != null) { mongo.close(); } } | /**
* Disconnect from Mongo
*/ | Disconnect from Mongo | disconnect | {
"repo_name": "mkambol/pentaho-mongodb-plugin",
"path": "src/org/pentaho/di/trans/steps/mongodboutput/MongoDbOutputData.java",
"license": "apache-2.0",
"size": 40206
} | [
"com.mongodb.MongoClient"
] | import com.mongodb.MongoClient; | import com.mongodb.*; | [
"com.mongodb"
] | com.mongodb; | 2,718,301 |
@ApiModelProperty(example = "null", value = "")
public CardExpiryPeriod getExpiryPeriod() {
return expiryPeriod;
} | @ApiModelProperty(example = "null", value = "") CardExpiryPeriod function() { return expiryPeriod; } | /**
* Get expiryPeriod
* @return expiryPeriod
**/ | Get expiryPeriod | getExpiryPeriod | {
"repo_name": "ixaris/ope-applicationclients",
"path": "java-client/src/main/java/com/ixaris/ope/applications/client/model/ManagedCard.java",
"license": "mit",
"size": 29097
} | [
"com.ixaris.ope.applications.client.model.CardExpiryPeriod",
"io.swagger.annotations.ApiModelProperty"
] | import com.ixaris.ope.applications.client.model.CardExpiryPeriod; import io.swagger.annotations.ApiModelProperty; | import com.ixaris.ope.applications.client.model.*; import io.swagger.annotations.*; | [
"com.ixaris.ope",
"io.swagger.annotations"
] | com.ixaris.ope; io.swagger.annotations; | 2,487,133 |
public void oldDispatch(Remote obj, RemoteCall call, int op)
throws IOException
{
long hash; // hash for matching stub with skeleton
try {
// read remote call header
ObjectInput in;
try {
in = call.getInputStream();
... | void function(Remote obj, RemoteCall call, int op) throws IOException { long hash; try { ObjectInput in; try { in = call.getInputStream(); try { Class<?> clazz = Class.forName(STR); if (clazz.isAssignableFrom(skel.getClass())) { ((MarshalInputStream)in).useCodebaseOnly(); } } catch (ClassNotFoundException ignore) { } h... | /**
* Handle server-side dispatch using the RMI 1.1 stub/skeleton
* protocol, given a non-negative operation number that has
* already been read from the call stream.
*
* @param obj the target remote object for the call
* @param call the "remote call" from which operation and
* method... | Handle server-side dispatch using the RMI 1.1 stub/skeleton protocol, given a non-negative operation number that has already been read from the call stream | oldDispatch | {
"repo_name": "tuxjdk/jdk8u",
"path": "jdk/src/share/classes/sun/rmi/server/UnicastServerRef.java",
"license": "gpl-2.0",
"size": 24325
} | [
"java.io.IOException",
"java.io.ObjectInput",
"java.io.ObjectOutput",
"java.rmi.Remote",
"java.rmi.RemoteException",
"java.rmi.ServerError",
"java.rmi.ServerException",
"java.rmi.UnmarshalException",
"java.rmi.server.RemoteCall"
] | import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.ServerError; import java.rmi.ServerException; import java.rmi.UnmarshalException; import java.rmi.server.RemoteCall; | import java.io.*; import java.rmi.*; import java.rmi.server.*; | [
"java.io",
"java.rmi"
] | java.io; java.rmi; | 597,632 |
public Color getIconColor ()
{
return _iconColor;
} | Color function () { return _iconColor; } | /**
* Returns the color in which to render the event icons.
*/ | Returns the color in which to render the event icons | getIconColor | {
"repo_name": "samskivert/jikan",
"path": "src/java/com/samskivert/jikan/JikanConfig.java",
"license": "gpl-2.0",
"size": 5943
} | [
"org.eclipse.swt.graphics.Color"
] | import org.eclipse.swt.graphics.Color; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 154,871 |
private String doInitSubscrListRequest(HttpServletRequest request,
PdcSubscriptionSessionController pdcSC, List<PdcSubscription> subscriptions)
throws Exception {
request.setAttribute("subscriptionList", subscriptions);
List pathContext = new ArrayList();
for (PdcSubscription subscription : su... | String function(HttpServletRequest request, PdcSubscriptionSessionController pdcSC, List<PdcSubscription> subscriptions) throws Exception { request.setAttribute(STR, subscriptions); List pathContext = new ArrayList(); for (PdcSubscription subscription : subscriptions) { pathContext.add(pdcSC.getPathCriterias(subscripti... | /**
* Performs
* <code>Request</code> initialization for furure use in subscriptionList.jsp
*
* @param request a <code>HttpServletRequest</code> to be forwarded
* @param subscriptions a list of loaded PdcSubscription to be shown
* @return jsp name
*/ | Performs <code>Request</code> initialization for furure use in subscriptionList.jsp | doInitSubscrListRequest | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-war/src/main/java/org/silverpeas/web/pdcsubscription/servlets/PdcSubscriptionPeasRequestRouter.java",
"license": "agpl-3.0",
"size": 9706
} | [
"java.util.ArrayList",
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"org.silverpeas.core.pdc.subscription.model.PdcSubscription",
"org.silverpeas.web.pdcsubscription.control.PdcSubscriptionSessionController"
] | import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.silverpeas.core.pdc.subscription.model.PdcSubscription; import org.silverpeas.web.pdcsubscription.control.PdcSubscriptionSessionController; | import java.util.*; import javax.servlet.http.*; import org.silverpeas.core.pdc.subscription.model.*; import org.silverpeas.web.pdcsubscription.control.*; | [
"java.util",
"javax.servlet",
"org.silverpeas.core",
"org.silverpeas.web"
] | java.util; javax.servlet; org.silverpeas.core; org.silverpeas.web; | 1,937,653 |
public void sort(Comparator<? super LogLine> comparator) {
this.mComparator = comparator;
Collections.sort(mObjects, comparator);
if (mNotifyOnChange) notifyDataSetChanged();
}
/**
* {@inheritDoc} | void function(Comparator<? super LogLine> comparator) { this.mComparator = comparator; Collections.sort(mObjects, comparator); if (mNotifyOnChange) notifyDataSetChanged(); } /** * {@inheritDoc} | /**
* Sorts the content of this adapter using the specified comparator.
*
* @param comparator The comparator used to sort the objects contained
* in this adapter.
*/ | Sorts the content of this adapter using the specified comparator | sort | {
"repo_name": "aceqott/HCTControl",
"path": "app/src/main/java/com/hctrom/romcontrol/logcat/data/LogLineAdapter.java",
"license": "apache-2.0",
"size": 20451
} | [
"java.util.Collections",
"java.util.Comparator"
] | import java.util.Collections; import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,003,498 |
@Test
public void parseFileHeaderAndPreambleWithoutNewLine() throws IOException {
ParserResult result = parser
.parse(new StringReader("% Encoding: US-ASCII@preamble{some text and \\latex}"));
assertFalse(result.hasWarnings());
assertEquals(Optional.of("some text and \\... | void function() throws IOException { ParserResult result = parser .parse(new StringReader(STR)); assertFalse(result.hasWarnings()); assertEquals(Optional.of(STR), result.getDatabase().getPreamble()); } | /**
* Test for #669
*/ | Test for #669 | parseFileHeaderAndPreambleWithoutNewLine | {
"repo_name": "bartsch-dev/jabref",
"path": "src/test/java/org/jabref/logic/importer/fileformat/BibtexParserTest.java",
"license": "mit",
"size": 72424
} | [
"java.io.IOException",
"java.io.StringReader",
"java.util.Optional",
"org.jabref.logic.importer.ParserResult",
"org.junit.Assert"
] | import java.io.IOException; import java.io.StringReader; import java.util.Optional; import org.jabref.logic.importer.ParserResult; import org.junit.Assert; | import java.io.*; import java.util.*; import org.jabref.logic.importer.*; import org.junit.*; | [
"java.io",
"java.util",
"org.jabref.logic",
"org.junit"
] | java.io; java.util; org.jabref.logic; org.junit; | 149,906 |
public SOAPHeaderElement[] getHeaders() {
SOAPHeaderElement[] array = new SOAPHeaderElement[headers.size()];
headers.copyInto(array);
return array;
} | SOAPHeaderElement[] function() { SOAPHeaderElement[] array = new SOAPHeaderElement[headers.size()]; headers.copyInto(array); return array; } | /**
* Get the array of header elements
*/ | Get the array of header elements | getHeaders | {
"repo_name": "hugosato/apache-axis",
"path": "src/org/apache/axis/client/Stub.java",
"license": "apache-2.0",
"size": 14444
} | [
"org.apache.axis.message.SOAPHeaderElement"
] | import org.apache.axis.message.SOAPHeaderElement; | import org.apache.axis.message.*; | [
"org.apache.axis"
] | org.apache.axis; | 1,062,092 |
private boolean summarizeTool(Map m, Site site, String toolIdentifier)
{
if (site == null) return false;
setTemporaryPlacement(site);
Map newMap = null;
// offer to all EntityProducers
for (Iterator i = EntityManager.getEntityProducers().iterator(); i.hasNext();)
{
EntityProducer ep = (EntityPro... | boolean function(Map m, Site site, String toolIdentifier) { if (site == null) return false; setTemporaryPlacement(site); Map newMap = null; for (Iterator i = EntityManager.getEntityProducers().iterator(); i.hasNext();) { EntityProducer ep = (EntityProducer) i.next(); if (ep instanceof EntitySummary) { try { EntitySumma... | /**
* There must be a better way of doing this as this hard codes the services
* in surely there should be some whay of looking up the serivce and making
* the getSummary part of an interface. TODO: Add an interface beside
* EntityProducer to generate summaries Make this discoverable
*
* @param m
* @para... | There must be a better way of doing this as this hard codes the services in surely there should be some whay of looking up the serivce and making EntityProducer to generate summaries Make this discoverable | summarizeTool | {
"repo_name": "OpenCollabZA/sakai",
"path": "portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/site/PortalSiteHelperImpl.java",
"license": "apache-2.0",
"size": 45708
} | [
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Iterator",
"java.util.Map",
"org.sakaiproject.entity.api.EntityProducer",
"org.sakaiproject.entity.api.EntitySummary",
"org.sakaiproject.entity.api.Summary",
"org.sakaiproject.entity.cover.EntityManager",
"org.sakaiproject.site.api.Site",
... | import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; import java.util.Map; import org.sakaiproject.entity.api.EntityProducer; import org.sakaiproject.entity.api.EntitySummary; import org.sakaiproject.entity.api.Summary; import org.sakaiproject.entity.cover.EntityManager; import org.sakai... | import java.text.*; import java.util.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.entity.cover.*; import org.sakaiproject.site.api.*; import org.sakaiproject.util.*; | [
"java.text",
"java.util",
"org.sakaiproject.entity",
"org.sakaiproject.site",
"org.sakaiproject.util"
] | java.text; java.util; org.sakaiproject.entity; org.sakaiproject.site; org.sakaiproject.util; | 2,324,306 |
// <--------------------------------------------------------------------------->
@Security.Authenticated(Secured.class)
public static Result adminUsers( int page ) {
if (!Secured.isMemberOf(Roles.ADMIN)) {
return forbidden();
}
List<User> users = User.find.orderBy("fir... | @Security.Authenticated(Secured.class) static Result function( int page ) { if (!Secured.isMemberOf(Roles.ADMIN)) { return forbidden(); } List<User> users = User.find.orderBy(STR).findList(); int userPerPage = Integer.parseInt(Application.conf(STR)); int modulo = users.size() % userPerPage; int pageNumWithoutRest = (in... | /**
* This action redirect on the users administration view
*
* @return the users administration view
*/ | This action redirect on the users administration view | adminUsers | {
"repo_name": "sqlilabs/WorkshopManager",
"path": "app/controllers/Administration.java",
"license": "apache-2.0",
"size": 4879
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,840,895 |
private void renameKeys() throws DataStoreException {
long startTime = System.currentTimeMillis();
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
long count = 0;
try {
Thread.currentThread().setContextClassLoader(
getClass... | void function() throws DataStoreException { long startTime = System.currentTimeMillis(); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); long count = 0; try { Thread.currentThread().setContextClassLoader( getClass().getClassLoader()); ObjectListing prevObjectListing = s3service.listObje... | /**
* This method rename object keys in S3 concurrently. The number of
* concurrent threads is defined by 'maxConnections' property in
* aws.properties. As S3 doesn't have "move" command, this method simulate
* move as copy object object to new key and then delete older key.
*/ | This method rename object keys in S3 concurrently. The number of concurrent threads is defined by 'maxConnections' property in aws.properties. As S3 doesn't have "move" command, this method simulate move as copy object object to new key and then delete older key | renameKeys | {
"repo_name": "kwin/jackrabbit-oak",
"path": "oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3Backend.java",
"license": "apache-2.0",
"size": 50713
} | [
"com.amazonaws.services.s3.model.DeleteObjectsRequest",
"com.amazonaws.services.s3.model.DeleteObjectsResult",
"com.amazonaws.services.s3.model.ObjectListing",
"com.amazonaws.services.s3.model.S3ObjectSummary",
"java.lang.Thread",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"ja... | import com.amazonaws.services.s3.model.DeleteObjectsRequest; import com.amazonaws.services.s3.model.DeleteObjectsResult; import com.amazonaws.services.s3.model.ObjectListing; import com.amazonaws.services.s3.model.S3ObjectSummary; import java.lang.Thread; import java.util.ArrayList; import java.util.Collections; import... | import com.amazonaws.services.s3.model.*; import java.lang.*; import java.util.*; import java.util.concurrent.*; import org.apache.jackrabbit.core.data.*; import org.apache.jackrabbit.core.data.util.*; | [
"com.amazonaws.services",
"java.lang",
"java.util",
"org.apache.jackrabbit"
] | com.amazonaws.services; java.lang; java.util; org.apache.jackrabbit; | 2,152,407 |
@Override
public boolean equals(Object other) {
if (other instanceof List<?>)
return equals(this, (List<?>) other);
if (other instanceof java.util.List<?>) {
List<A> t = this;
Iterator<?> oIter = ((java.util.List<?>) other).iterator();
while (t.tail != null && oIter.hasNext()) {
... | boolean function(Object other) { if (other instanceof List<?>) return equals(this, (List<?>) other); if (other instanceof java.util.List<?>) { List<A> t = this; Iterator<?> oIter = ((java.util.List<?>) other).iterator(); while (t.tail != null && oIter.hasNext()) { Object o = oIter.next(); if (!(t.head == null ? o == nu... | /**
* Is this list the same as other list?
*
* @see java.util.List#equals
*/ | Is this list the same as other list | equals | {
"repo_name": "w7cook/batch-javac",
"path": "src/share/classes/com/sun/tools/javac/util/List.java",
"license": "gpl-2.0",
"size": 13097
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 872,173 |
private String getEntityLinkBase() {
StringBuilder base = new StringBuilder();
base.append(sakaiProxy.getServerUrl());
base.append(ProfileConstants.ENTITY_BROKER_PREFIX);
base.append(ProfileConstants.LINK_ENTITY_PREFIX);
return base.toString();
}
@Setter
private SakaiProxy sakaiProxy;
| String function() { StringBuilder base = new StringBuilder(); base.append(sakaiProxy.getServerUrl()); base.append(ProfileConstants.ENTITY_BROKER_PREFIX); base.append(ProfileConstants.LINK_ENTITY_PREFIX); return base.toString(); } private SakaiProxy sakaiProxy; | /**
* Helper method to create the link base. We then append more onto it to get the full link.
* @return
*/ | Helper method to create the link base. We then append more onto it to get the full link | getEntityLinkBase | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "profile2/impl/src/java/org/sakaiproject/profile2/logic/ProfileLinkLogicImpl.java",
"license": "apache-2.0",
"size": 7628
} | [
"org.sakaiproject.profile2.util.ProfileConstants"
] | import org.sakaiproject.profile2.util.ProfileConstants; | import org.sakaiproject.profile2.util.*; | [
"org.sakaiproject.profile2"
] | org.sakaiproject.profile2; | 1,378,579 |
public void expectedPropertyReceived(final String name, final Object value) {
if (expectedPropertyValues == null) {
expectedPropertyValues = new ConcurrentHashMap<String, Object>();
}
if (value != null) {
// ConcurrentHashMap cannot store null values
expec... | void function(final String name, final Object value) { if (expectedPropertyValues == null) { expectedPropertyValues = new ConcurrentHashMap<String, Object>(); } if (value != null) { expectedPropertyValues.put(name, value); } | /**
* Sets an expectation that the given property name & value are received by this endpoint
* <p/>
* You can set multiple expectations for different property names.
* If you set a value of <tt>null</tt> that means we accept either the property is absent, or its value is <tt>null</tt>
*/ | Sets an expectation that the given property name & value are received by this endpoint You can set multiple expectations for different property names. If you set a value of null that means we accept either the property is absent, or its value is null | expectedPropertyReceived | {
"repo_name": "logzio/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java",
"license": "apache-2.0",
"size": 55338
} | [
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.concurrent.ConcurrentHashMap; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,739,120 |
public List<RegionInfo> createMultiRegionsInMeta(final Configuration conf,
final TableDescriptor htd, byte[][] startKeys) throws IOException {
try (Table meta = getConnection().getTable(TableName.META_TABLE_NAME)) {
Arrays.sort(startKeys, Bytes.BYTES_COMPARATOR);
List<RegionInfo> newRegions = new ... | List<RegionInfo> function(final Configuration conf, final TableDescriptor htd, byte[][] startKeys) throws IOException { try (Table meta = getConnection().getTable(TableName.META_TABLE_NAME)) { Arrays.sort(startKeys, Bytes.BYTES_COMPARATOR); List<RegionInfo> newRegions = new ArrayList<>(startKeys.length); MetaTableAcces... | /**
* Create rows in hbase:meta for regions of the specified table with the specified start keys. The
* first startKey should be a 0 length byte array if you want to form a proper range of regions.
* @return list of region info for regions added to meta
*/ | Create rows in hbase:meta for regions of the specified table with the specified start keys. The first startKey should be a 0 length byte array if you want to form a proper range of regions | createMultiRegionsInMeta | {
"repo_name": "ndimiduk/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java",
"license": "apache-2.0",
"size": 151074
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.RegionInfo",
"org.apache.hadoop.hbase.client.RegionInfoBuilder",
"org.apache.hadoop.hbase.client.Table",
"org.apache.... | import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.RegionInfo; import org.apache.hadoop.hbase.client.RegionInfoBuilder; import org.apache.hadoop.hbase.cli... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 756,870 |
public void prependToHeader(WSSecHeader secHeader) {
Element element = null;
try {
element = (Element) saml.toDOM(document);
} catch (SAMLException ex) {
throw new RuntimeException(ex.toString(), ex);
}
WSSecurityUtil.prependChildEleme... | void function(WSSecHeader secHeader) { Element element = null; try { element = (Element) saml.toDOM(document); } catch (SAMLException ex) { throw new RuntimeException(ex.toString(), ex); } WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), element); } | /**
* Prepends the SAML Assertion to the elements already in the
* Security header.
*
* The method can be called any time after <code>prepare()</code>.
* This allows to insert the SAML assertion at any position in the
* Security header.
*
* @param secHeader
* Th... | Prepends the SAML Assertion to the elements already in the Security header. The method can be called any time after <code>prepare()</code>. This allows to insert the SAML assertion at any position in the Security header | prependToHeader | {
"repo_name": "madurangasiriwardena/wso2-wss4j",
"path": "modules/wss4j/src/org/apache/ws/security/message/WSSecSAMLToken.java",
"license": "apache-2.0",
"size": 3901
} | [
"org.apache.ws.security.util.WSSecurityUtil",
"org.opensaml.SAMLException",
"org.w3c.dom.Element"
] | import org.apache.ws.security.util.WSSecurityUtil; import org.opensaml.SAMLException; import org.w3c.dom.Element; | import org.apache.ws.security.util.*; import org.opensaml.*; import org.w3c.dom.*; | [
"org.apache.ws",
"org.opensaml",
"org.w3c.dom"
] | org.apache.ws; org.opensaml; org.w3c.dom; | 1,003,747 |
private static void addCQLNamesToListBox(ListBox listBox,
String currentSelectedCQLUuid, boolean isDefinition) {
Set<Entry<String, Node>> cqlNodes = PopulationWorkSpaceConstants
.cqlDefinitionLookupNode.entrySet();
Map<String, String> cqlNodesMap = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER... | static void function(ListBox listBox, String currentSelectedCQLUuid, boolean isDefinition) { Set<Entry<String, Node>> cqlNodes = PopulationWorkSpaceConstants .cqlDefinitionLookupNode.entrySet(); Map<String, String> cqlNodesMap = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER); if(!isDefinition){ cqlNodes = P... | /**
* Adds the SubTree names to list box.
*
* @param listBox the list box
* @param currentSelectedCQLUuid the current selected CQL uuid
* @param isDefinition the is definition
*/ | Adds the SubTree names to list box | addCQLNamesToListBox | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/main/java/mat/client/clause/clauseworkspace/view/CQLArtifactsDialogBox.java",
"license": "cc0-1.0",
"size": 15437
} | [
"com.google.gwt.dom.client.OptionElement",
"com.google.gwt.dom.client.SelectElement",
"com.google.gwt.user.client.ui.ListBox",
"com.google.gwt.xml.client.Node",
"java.util.Map",
"java.util.Set",
"java.util.TreeMap"
] | import com.google.gwt.dom.client.OptionElement; import com.google.gwt.dom.client.SelectElement; import com.google.gwt.user.client.ui.ListBox; import com.google.gwt.xml.client.Node; import java.util.Map; import java.util.Set; import java.util.TreeMap; | import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*; import com.google.gwt.xml.client.*; import java.util.*; | [
"com.google.gwt",
"java.util"
] | com.google.gwt; java.util; | 1,349,728 |
private void extractFromStationFeatures() throws Exception {
int stationIdIndex = -1;
int stationElevIndex = -1;
pm.beginTask("Filling the elevation and id arrays for the stations, ordering them in ascending elevation order.",
stationCoordinates.size());
for( int i = ... | void function() throws Exception { int stationIdIndex = -1; int stationElevIndex = -1; pm.beginTask(STR, stationCoordinates.size()); for( int i = 0; i < stationCoordinates.size(); i++ ) { pm.worked(1); SimpleFeature stationF = stationFeatures.get(i); Coordinate stationCoord = stationCoordinates.get(i); if (stationIdInd... | /**
* Fills the elevation and id arrays for the stations, ordering in ascending
* elevation order.
*
* @throws Exception
* in the case the sorting gives problems.
*/ | Fills the elevation and id arrays for the stations, ordering in ascending elevation order | extractFromStationFeatures | {
"repo_name": "silviafranceschi/jgrasstools",
"path": "hortonmachine/src/main/java/org/jgrasstools/hortonmachine/modules/statistics/jami/OmsJami.java",
"license": "gpl-3.0",
"size": 53676
} | [
"com.vividsolutions.jts.geom.Coordinate",
"org.jgrasstools.gears.utils.sorting.QuickSortAlgorithm",
"org.opengis.feature.simple.SimpleFeature",
"org.opengis.feature.simple.SimpleFeatureType"
] | import com.vividsolutions.jts.geom.Coordinate; import org.jgrasstools.gears.utils.sorting.QuickSortAlgorithm; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; | import com.vividsolutions.jts.geom.*; import org.jgrasstools.gears.utils.sorting.*; import org.opengis.feature.simple.*; | [
"com.vividsolutions.jts",
"org.jgrasstools.gears",
"org.opengis.feature"
] | com.vividsolutions.jts; org.jgrasstools.gears; org.opengis.feature; | 492,907 |
public ListAdapter getListAdapter() {
return mAdapter;
} | ListAdapter function() { return mAdapter; } | /**
* Get the ListAdapter associated with this activity's ListView.
*/ | Get the ListAdapter associated with this activity's ListView | getListAdapter | {
"repo_name": "eric-stanley/cgeo",
"path": "main/thirdparty/android/support/v4/app/FragmentListActivity.java",
"license": "apache-2.0",
"size": 11788
} | [
"android.widget.ListAdapter"
] | import android.widget.ListAdapter; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,704,405 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<Void> moveAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> moveAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); | /**
* Description for Move resources between resource groups.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param moveResourceEnvelope Object with a list of the resources that need to be moved and the resource group they
* should be moved to.
... | Description for Move resources between resource groups | moveAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java",
"license": "mit",
"size": 46577
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.appservice.models.CsmMoveResourceEnvelope"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.appservice.models.CsmMoveResourceEnvelope; | import com.azure.core.annotation.*; import com.azure.resourcemanager.appservice.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,824,573 |
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
} | Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } | /**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/ | Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods | applyToAllUnaryMethods | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-speech/src/main/java/com/google/cloud/speech/v1/stub/SpeechStubSettings.java",
"license": "apache-2.0",
"size": 15887
} | [
"com.google.api.core.ApiFunction",
"com.google.api.gax.rpc.UnaryCallSettings"
] | import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings; | import com.google.api.core.*; import com.google.api.gax.rpc.*; | [
"com.google.api"
] | com.google.api; | 1,631,989 |
@RetrySemantics.Idempotent
public void performTimeOuts() {
Connection dbConn = null;
Statement stmt = null;
ResultSet rs = null;
try {
dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
//We currently commit after selecting the TXNS to abort. So whether SERIALIZABLE
//READ... | @RetrySemantics.Idempotent void function() { Connection dbConn = null; Statement stmt = null; ResultSet rs = null; try { dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED); timeOutLocks(dbConn); while(true) { stmt = dbConn.createStatement(); String s = STRTXN_ID\STRTXNS\STRTXN_STATE\STR + TxnStatus.OPEN + STR + ... | /**
* Isolation Level Notes
* Plain: RC is OK
* This will find transactions that have timed out and abort them.
* Will also delete locks which are not associated with a transaction and have timed out
* Tries to keep transactions (against metastore db) small to reduce lock contention.
*/ | Isolation Level Notes Plain: RC is OK This will find transactions that have timed out and abort them. Will also delete locks which are not associated with a transaction and have timed out Tries to keep transactions (against metastore db) small to reduce lock contention | performTimeOuts | {
"repo_name": "jcamachor/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java",
"license": "apache-2.0",
"size": 263787
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hive.common.classification.RetrySemantics",
"org.apache.hadoop.hive.metastore.api.MetaException",
"org.apache.hadoop.hive... | import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.hadoop.hive.common.classification.RetrySemantics; import org.apache.hadoop.hive.metastore.api.MetaException; ... | import java.sql.*; import java.util.*; import org.apache.hadoop.hive.common.classification.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.conf.*; import org.apache.hadoop.hive.metastore.metrics.*; import org.apache.hadoop.hive.metastore.txn.*; | [
"java.sql",
"java.util",
"org.apache.hadoop"
] | java.sql; java.util; org.apache.hadoop; | 962,736 |
FileStatus getFileStatus() {
return this.fstatus;
} | FileStatus getFileStatus() { return this.fstatus; } | /**
* the filestatus of this object
* @return the filestatus of this object
*/ | the filestatus of this object | getFileStatus | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-tools/hadoop-archives/src/main/java/org/apache/hadoop/tools/HadoopArchives.java",
"license": "apache-2.0",
"size": 31710
} | [
"org.apache.hadoop.fs.FileStatus"
] | import org.apache.hadoop.fs.FileStatus; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 411,518 |
@Override
JSType resolveInternal(ErrorReporter t, StaticScope<JSType> enclosing) {
return registry.createFromTypeNodes(typeExpr, sourceName, enclosing);
} | JSType resolveInternal(ErrorReporter t, StaticScope<JSType> enclosing) { return registry.createFromTypeNodes(typeExpr, sourceName, enclosing); } | /**
* Resolve the referenced type within the enclosing scope.
*/ | Resolve the referenced type within the enclosing scope | resolveInternal | {
"repo_name": "abdullah38rcc/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/UnresolvedTypeExpression.java",
"license": "apache-2.0",
"size": 2990
} | [
"com.google.javascript.rhino.ErrorReporter"
] | import com.google.javascript.rhino.ErrorReporter; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,642,290 |
@Test
@SuppressWarnings("deprecation")
public void testIncludedFileRelative1() throws SetUpException {
Configuration config = new Configuration(new File("testdata/configs/including_file_relative1.properties"));
assertThat(config.getProperty("a"), is("b")); // from including_file_rel... | @SuppressWarnings(STR) void function() throws SetUpException { Configuration config = new Configuration(new File(STR)); assertThat(config.getProperty("a"), is("b")); assertThat(config.getProperty("v"), is("g")); } | /**
* Tests that included config files work correctly if relative paths to a sub-folder are given.
*
* @throws SetUpException unwanted.
*/ | Tests that included config files work correctly if relative paths to a sub-folder are given | testIncludedFileRelative1 | {
"repo_name": "KernelHaven/KernelHaven",
"path": "test/net/ssehub/kernel_haven/config/ConfigurationTest.java",
"license": "apache-2.0",
"size": 31348
} | [
"java.io.File",
"net.ssehub.kernel_haven.SetUpException",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import java.io.File; import net.ssehub.kernel_haven.SetUpException; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import java.io.*; import net.ssehub.kernel_haven.*; import org.hamcrest.*; import org.junit.*; | [
"java.io",
"net.ssehub.kernel_haven",
"org.hamcrest",
"org.junit"
] | java.io; net.ssehub.kernel_haven; org.hamcrest; org.junit; | 951,738 |
public static Uri getImageUri(MediaInfo info, int level) {
MediaMetadata mm = info.getMetadata();
if (null != mm && mm.getImages().size() > level) {
return mm.getImages().get(level).getUrl();
}
return null;
} | static Uri function(MediaInfo info, int level) { MediaMetadata mm = info.getMetadata(); if (null != mm && mm.getImages().size() > level) { return mm.getImages().get(level).getUrl(); } return null; } | /**
* Returns the {@code Uri} address of an image for the {@link MediaInformation} at the given
* level. Level should be a number between 0 and <code>n - 1</code> where <code>n</code> is the
* number of images for that given item.
*
* @param info
* @param level
* @return
*/ | Returns the Uri address of an image for the <code>MediaInformation</code> at the given level. Level should be a number between 0 and <code>n - 1</code> where <code>n</code> is the number of images for that given item | getImageUri | {
"repo_name": "leonelfolmer/CastAndroid",
"path": "CastCompanionLibrary/src/com/google/sample/castcompanionlibrary/utils/Utils.java",
"license": "mit",
"size": 19913
} | [
"android.net.Uri",
"com.google.android.gms.cast.MediaInfo",
"com.google.android.gms.cast.MediaMetadata"
] | import android.net.Uri; import com.google.android.gms.cast.MediaInfo; import com.google.android.gms.cast.MediaMetadata; | import android.net.*; import com.google.android.gms.cast.*; | [
"android.net",
"com.google.android"
] | android.net; com.google.android; | 2,691,151 |
public static List<String> getRegions() {
return regions;
} | static List<String> function() { return regions; } | /**
* Gets the current value of regions
* @return Current value of regions
*/ | Gets the current value of regions | getRegions | {
"repo_name": "joshforester/rdboard",
"path": "src/java/com/myrunning/leaderboard/global/LocaleUtils.java",
"license": "mit",
"size": 3048
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 397,756 |
public void onDestroy() {
if (this.receiver != null && this.registered) {
try {
this.cordova.getActivity().unregisterReceiver(this.receiver);
this.registered = false;
} catch (Exception e) {
Log.e(LOG_TAG, "Error unregistering net... | void function() { if (this.receiver != null && this.registered) { try { this.cordova.getActivity().unregisterReceiver(this.receiver); this.registered = false; } catch (Exception e) { Log.e(LOG_TAG, STR + e.getMessage(), e); } } } | /**
* Stop network receiver.
*/ | Stop network receiver | onDestroy | {
"repo_name": "Ramanujakalyan/Inherit",
"path": "ui/plugins/org.apache.cordova.network-information/src/android/NetworkManager.java",
"license": "unlicense",
"size": 10554
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,446,535 |
@After
public void reset() {
Whitebox.setInternalState(TinylogLogger.class, ProviderRegistry.getLoggingProvider());
} | void function() { Whitebox.setInternalState(TinylogLogger.class, ProviderRegistry.getLoggingProvider()); } | /**
* Resets the underlying logging provider.
*/ | Resets the underlying logging provider | reset | {
"repo_name": "pmwmedia/tinylog",
"path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java",
"license": "apache-2.0",
"size": 189291
} | [
"org.powermock.reflect.Whitebox",
"org.tinylog.provider.ProviderRegistry"
] | import org.powermock.reflect.Whitebox; import org.tinylog.provider.ProviderRegistry; | import org.powermock.reflect.*; import org.tinylog.provider.*; | [
"org.powermock.reflect",
"org.tinylog.provider"
] | org.powermock.reflect; org.tinylog.provider; | 1,061,069 |
public ArrayList<OvhUrl> serviceName_output_elasticsearch_alias_aliasId_url_GET(String serviceName, String aliasId) throws IOException {
String qPath = "/dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId}/url";
StringBuilder sb = path(qPath, serviceName, aliasId);
String resp = exec(qPath, "GET", sb... | ArrayList<OvhUrl> function(String serviceName, String aliasId) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName, aliasId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t3); } | /**
* Returns the list of urls of specified graylog stream
*
* REST: GET /dbaas/logs/{serviceName}/output/elasticsearch/alias/{aliasId}/url
* @param serviceName [required] Service name
* @param aliasId [required] Alias ID
*/ | Returns the list of urls of specified graylog stream | serviceName_output_elasticsearch_alias_aliasId_url_GET | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java",
"license": "bsd-3-clause",
"size": 82370
} | [
"java.io.IOException",
"java.util.ArrayList",
"net.minidev.ovh.api.dbaas.logs.OvhUrl"
] | import java.io.IOException; import java.util.ArrayList; import net.minidev.ovh.api.dbaas.logs.OvhUrl; | import java.io.*; import java.util.*; import net.minidev.ovh.api.dbaas.logs.*; | [
"java.io",
"java.util",
"net.minidev.ovh"
] | java.io; java.util; net.minidev.ovh; | 754,062 |
QueueConnection connection = activeMQConnectionFactory.createQueueConnection();
QueueSession session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE );
TextMessage message = session.createTextMessage();
message.setText("ping");
QueueSender sender = session.createSender(sess... | QueueConnection connection = activeMQConnectionFactory.createQueueConnection(); QueueSession session = connection.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE ); TextMessage message = session.createTextMessage(); message.setText("ping"); QueueSender sender = session.createSender(session.createQueue("pong"));... | /**
* Verifies that the embedded ActiveMQ broker bootstraps successfully
* and is accessible using the provided connection factory.
*/ | Verifies that the embedded ActiveMQ broker bootstraps successfully and is accessible using the provided connection factory | canUseEmbeddedActiveMQBroker | {
"repo_name": "aihua/opennms",
"path": "core/daemon/src/test/java/org/opennms/netmgt/daemon/DaemonContextIT.java",
"license": "agpl-3.0",
"size": 2823
} | [
"javax.jms.QueueConnection",
"javax.jms.QueueSender",
"javax.jms.QueueSession",
"javax.jms.TextMessage"
] | import javax.jms.QueueConnection; import javax.jms.QueueSender; import javax.jms.QueueSession; import javax.jms.TextMessage; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,843,437 |
private void expandAll(TreePath parentPath, boolean expand) {
// Expansion or collapsing must be done from the bottom-up.
// Traverse children first.
TreeNode parentNode = (TreeNode)parentPath.getLastPathComponent();
for (Enumeration<TreeNode> e = UnsafeCast.unsafeCast(parentNode... | void function(TreePath parentPath, boolean expand) { TreeNode parentNode = (TreeNode)parentPath.getLastPathComponent(); for (Enumeration<TreeNode> e = UnsafeCast.unsafeCast(parentNode.children()); e.hasMoreElements(); ) { TreeNode nextChildNode = e.nextElement(); TreePath childPath = parentPath.pathByAddingChild(nextCh... | /**
* Expand or collapse all nodes under a given path.
* @param parentPath the path to the node under which nodes will be expanded or collapsed.
* @param expand true to expand, false to collapse.
*/ | Expand or collapse all nodes under a given path | expandAll | {
"repo_name": "levans/Open-Quark",
"path": "src/Quark_Gems/src/org/openquark/gems/client/ArgumentTree.java",
"license": "bsd-3-clause",
"size": 47118
} | [
"java.util.Enumeration",
"javax.swing.tree.TreeNode",
"javax.swing.tree.TreePath",
"org.openquark.util.UnsafeCast"
] | import java.util.Enumeration; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; import org.openquark.util.UnsafeCast; | import java.util.*; import javax.swing.tree.*; import org.openquark.util.*; | [
"java.util",
"javax.swing",
"org.openquark.util"
] | java.util; javax.swing; org.openquark.util; | 2,264,771 |
public void setBaseSectionOutlineStroke(Stroke stroke) {
ParamChecks.nullNotPermitted(stroke, "stroke");
this.baseSectionOutlineStroke = stroke;
fireChangeEvent();
}
/**
* Returns the flag that controls whether or not the section outline stroke
* is auto-populated by the {... | void function(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, STR); this.baseSectionOutlineStroke = stroke; fireChangeEvent(); } /** * Returns the flag that controls whether or not the section outline stroke * is auto-populated by the {@link #lookupSectionOutlinePaint(Comparable)} | /**
* Sets the base section stroke.
*
* @param stroke the stroke (<code>null</code> not permitted).
*
* @see #getBaseSectionOutlineStroke()
*/ | Sets the base section stroke | setBaseSectionOutlineStroke | {
"repo_name": "ceabie/jfreechart",
"path": "source/org/jfree/chart/plot/PiePlot.java",
"license": "lgpl-2.1",
"size": 130851
} | [
"java.awt.Stroke",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Stroke; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,667,719 |
public static Bitmap getThumbnail(Context context, File file) {
return getThumbnail(context, getUri(file), getMimeType(file));
} | static Bitmap function(Context context, File file) { return getThumbnail(context, getUri(file), getMimeType(file)); } | /**
* Attempt to retrieve the thumbnail of given File from the MediaStore. This
* should not be called on the UI thread.
*
* @param context
* @param file
* @return
* @author paulburke
*/ | Attempt to retrieve the thumbnail of given File from the MediaStore. This should not be called on the UI thread | getThumbnail | {
"repo_name": "takyonxxx/AndroidSdrRtlTuner",
"path": "app/src/main/java/com/sdrtuner/FileUtils.java",
"license": "gpl-2.0",
"size": 13287
} | [
"android.content.Context",
"android.graphics.Bitmap",
"java.io.File"
] | import android.content.Context; import android.graphics.Bitmap; import java.io.File; | import android.content.*; import android.graphics.*; import java.io.*; | [
"android.content",
"android.graphics",
"java.io"
] | android.content; android.graphics; java.io; | 658,741 |
public void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams) {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) throw new RuntimeException("Authentication undefined: " + authNam... | void function(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams) { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) throw new RuntimeException(STR + authName); auth.applyToParams(queryParams, headerParams); } } | /**
* Update query and header parameters based on authentication settings.
*
* @param authNames The authentications to apply
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
*/ | Update query and header parameters based on authentication settings | updateParamsForAuth | {
"repo_name": "mes5k/nextflow",
"path": "plugins/nf-ga4gh/src/main/nextflow/ga4gh/tes/client/ApiClient.java",
"license": "gpl-3.0",
"size": 48172
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,868,611 |
EReference getActivity_LoopCharacteristics(); | EReference getActivity_LoopCharacteristics(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.Activity#getLoopCharacteristics <em>Loop Characteristics</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Loop Characteristics</em>'.
* @see org.eclipse.b... | Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.Activity#getLoopCharacteristics Loop Characteristics</code>'. | getActivity_LoopCharacteristics | {
"repo_name": "Rikkola/kie-wb-common",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 929298
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,124,071 |
public static ims.scheduling.domain.objects.Booking_Appointment extractBooking_Appointment(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.AcuteTheatreListBookingAppointmentVo valueObject)
{
return extractBooking_Appointment(domainFactory, valueObject, new HashMap());
}
| static ims.scheduling.domain.objects.Booking_Appointment function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.AcuteTheatreListBookingAppointmentVo valueObject) { return extractBooking_Appointment(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 | extractBooking_Appointment | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/AcuteTheatreListBookingAppointmentVoAssembler.java",
"license": "agpl-3.0",
"size": 24327
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 479,269 |
// Create title page with index of modules
// Copy resources to local location folder structure
// For each module, create documentation
for (Module module : customer.getModules()) {
renderModule(customer, module, out);
}
} | for (Module module : customer.getModules()) { renderModule(customer, module, out); } } | /**
* Renders all modules for the customer.
* <p>
*
* @param config
* - the documentation configuration
* @param customer
* @param out
* - the print stream
* @throws Exception
*/ | Renders all modules for the customer. | renderCustomer | {
"repo_name": "skyvers/wildcat",
"path": "skyve-tools/src/org/skyve/impl/tools/javadoc/doctor/DoctorUtil.java",
"license": "lgpl-2.1",
"size": 26139
} | [
"org.skyve.metadata.module.Module"
] | import org.skyve.metadata.module.Module; | import org.skyve.metadata.module.*; | [
"org.skyve.metadata"
] | org.skyve.metadata; | 2,668,491 |
public void testGetIndexInfoUsingInfoSchema() throws Exception {
if (versionMeetsMinimum(5, 0, 7)) {
createTable("t1", "(c1 int(1))");
this.stmt.executeUpdate("CREATE INDEX index1 ON t1 (c1)");
Connection conn1 = null;
try {
conn1 = ... | void function() throws Exception { if (versionMeetsMinimum(5, 0, 7)) { createTable("t1", STR); this.stmt.executeUpdate(STR); Connection conn1 = null; try { conn1 = getConnectionWithProps(STR); DatabaseMetaData metaData = conn1.getMetaData(); this.rs = metaData.getIndexInfo(conn1.getCatalog(), null, "t1", false, true); ... | /**
* Tests the implementation of Information Schema for index info.
*/ | Tests the implementation of Information Schema for index info | testGetIndexInfoUsingInfoSchema | {
"repo_name": "spullara/mysql-connector-java",
"path": "src/test/java/testsuite/simple/MetadataTest.java",
"license": "gpl-2.0",
"size": 29199
} | [
"java.sql.Connection",
"java.sql.DatabaseMetaData"
] | import java.sql.Connection; import java.sql.DatabaseMetaData; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,345,752 |
@XmlElement(name = "port_number")
public Integer getPortNumber() {
return portNumber;
}
| @XmlElement(name = STR) Integer function() { return portNumber; } | /**
* The vCenter server management port
*
* @return the the vCenter server management port
*/ | The vCenter server management port | getPortNumber | {
"repo_name": "emcvipr/controller-client-java",
"path": "models/src/main/java/com/emc/storageos/model/host/vcenter/VcenterRestRep.java",
"license": "apache-2.0",
"size": 3702
} | [
"javax.xml.bind.annotation.XmlElement"
] | import javax.xml.bind.annotation.XmlElement; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 2,860,962 |
@SuppressWarnings("unchecked")
protected GenericFileProcessStrategy<T> createGenericFileStrategy() {
Class<?> factory = null;
try {
FactoryFinder finder = getCamelContext().getFactoryFinder("META-INF/services/org/apache/camel/component/");
log.trace("Using FactoryFinder: ... | @SuppressWarnings(STR) GenericFileProcessStrategy<T> function() { Class<?> factory = null; try { FactoryFinder finder = getCamelContext().getFactoryFinder(STR); log.trace(STR, finder); factory = finder.findClass(getScheme(), STR, CamelContext.class); } catch (ClassNotFoundException e) { log.trace(STR, e); } catch (IOEx... | /**
* A strategy method to lazily create the file strategy
*/ | A strategy method to lazily create the file strategy | createGenericFileStrategy | {
"repo_name": "JYBESSON/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java",
"license": "apache-2.0",
"size": 58782
} | [
"java.io.IOException",
"java.lang.reflect.Method",
"java.util.Map",
"org.apache.camel.CamelContext",
"org.apache.camel.spi.FactoryFinder",
"org.apache.camel.util.ObjectHelper"
] | import java.io.IOException; import java.lang.reflect.Method; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.spi.FactoryFinder; import org.apache.camel.util.ObjectHelper; | import java.io.*; import java.lang.reflect.*; import java.util.*; import org.apache.camel.*; import org.apache.camel.spi.*; import org.apache.camel.util.*; | [
"java.io",
"java.lang",
"java.util",
"org.apache.camel"
] | java.io; java.lang; java.util; org.apache.camel; | 77,443 |
public boolean canPlaceBlockOnSide(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
return p_149707_5_ == 0 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_ + 1, p_149707_4_).isNormalCube() ? true : (p_149707_5_ == 1 && World.doesBlockHaveSolidTopSurface(p_149707_... | boolean function(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_) { return p_149707_5_ == 0 && p_149707_1_.getBlock(p_149707_2_, p_149707_3_ + 1, p_149707_4_).isNormalCube() ? true : (p_149707_5_ == 1 && World.doesBlockHaveSolidTopSurface(p_149707_1_, p_149707_2_, p_149707_3_ - 1, ... | /**
* checks to see if you can place this block can be placed on that side of a block: BlockLever overrides
*/ | checks to see if you can place this block can be placed on that side of a block: BlockLever overrides | canPlaceBlockOnSide | {
"repo_name": "Myrninvollo/Server",
"path": "src/net/minecraft/block/BlockLever.java",
"license": "gpl-2.0",
"size": 14394
} | [
"net.minecraft.world.World"
] | import net.minecraft.world.World; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 1,388,853 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ContentItemContractInner> listByService(
String resourceGroupName, String serviceName, String contentTypeId, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ContentItemContractInner> listByService( String resourceGroupName, String serviceName, String contentTypeId, Context context); | /**
* Lists developer portal's content items specified by the provided content type.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param contentTypeId Content type identifier.
* @param context The context to ass... | Lists developer portal's content items specified by the provided content type | listByService | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ContentItemsClient.java",
"license": "mit",
"size": 10529
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.apimanagement.fluent.models.ContentItemContractInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.ContentItemContractInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,487,061 |
private void clearRepositoryMetadataCache(String repositoryName) {
repositorySizeCache.remove(repositoryName);
repositoryMetricsCache.remove(repositoryName);
CommitCache.instance().clear(repositoryName);
} | void function(String repositoryName) { repositorySizeCache.remove(repositoryName); repositoryMetricsCache.remove(repositoryName); CommitCache.instance().clear(repositoryName); } | /**
* Clears all the cached metadata for the specified repository.
*
* @param repositoryName
*/ | Clears all the cached metadata for the specified repository | clearRepositoryMetadataCache | {
"repo_name": "cesarmarinhorj/gitblit",
"path": "src/main/java/com/gitblit/manager/RepositoryManager.java",
"license": "apache-2.0",
"size": 69799
} | [
"com.gitblit.utils.CommitCache"
] | import com.gitblit.utils.CommitCache; | import com.gitblit.utils.*; | [
"com.gitblit.utils"
] | com.gitblit.utils; | 2,276,870 |
private String getGeoProperty() {
final Map<String, FeatureServiceAttribute> attributes = getFeatureServiceAttributes();
for (final String key : attributes.keySet()) {
final FeatureServiceAttribute attr = attributes.get(key);
if (attr.isGeometry()) {
return ... | String function() { final Map<String, FeatureServiceAttribute> attributes = getFeatureServiceAttributes(); for (final String key : attributes.keySet()) { final FeatureServiceAttribute attr = attributes.get(key); if (attr.isGeometry()) { return key; } } return "geom"; } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getGeoProperty | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/featureservice/AbstractFeatureService.java",
"license": "lgpl-3.0",
"size": 82123
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,557,291 |
@Test
public void testInstallAutoFeatureServerXml() throws Exception {
final String METHOD_NAME = "testInstallAutoFeatureServerXml";
Log.entering(c, METHOD_NAME);
replaceWlpProperties("21.0.0.4");
copyFileToMinifiedRoot("etc", "../../publish/propertyFiles/publishRepoOverrideProps... | void function() throws Exception { final String METHOD_NAME = STR; Log.entering(c, METHOD_NAME); replaceWlpProperties(STR); copyFileToMinifiedRoot("etc", STR); copyFileToMinifiedRoot(STR, STR); copyFileToMinifiedRoot(STR, STR); copyFileToMinifiedRoot(STR, STR); copyFileToMinifiedRoot(STR, STR); copyFileToMinifiedRoot(S... | /**
* Install osgiConsole-1.0 on its own first, then install a server.xml with osgiConsole-1.0 and eventLogging-1.0. The autofeature osgiConsole-1.0-eventLogging-1.0 should be installed along with the other features.
* @throws Exception
*/ | Install osgiConsole-1.0 on its own first, then install a server.xml with osgiConsole-1.0 and eventLogging-1.0. The autofeature osgiConsole-1.0-eventLogging-1.0 should be installed along with the other features | testInstallAutoFeatureServerXml | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.install.featureUtility_fat/fat/src/com/ibm/ws/install/featureUtility/fat/InstallServerTest.java",
"license": "epl-1.0",
"size": 10400
} | [
"com.ibm.websphere.simplicity.ProgramOutput",
"com.ibm.websphere.simplicity.log.Log",
"org.junit.Assert"
] | import com.ibm.websphere.simplicity.ProgramOutput; import com.ibm.websphere.simplicity.log.Log; import org.junit.Assert; | import com.ibm.websphere.simplicity.*; import com.ibm.websphere.simplicity.log.*; import org.junit.*; | [
"com.ibm.websphere",
"org.junit"
] | com.ibm.websphere; org.junit; | 279,325 |
public List<Structure> fetchData() throws BlenderFileException {
if (oldMemoryAddress == 0) {
throw new NullPointerException("The pointer points to nothing!");
}
List<Structure> structures = null;
FileBlockHeader dataFileBlock = blenderContext.getFileBlock(oldMemoryAddres... | List<Structure> function() throws BlenderFileException { if (oldMemoryAddress == 0) { throw new NullPointerException(STR); } List<Structure> structures = null; FileBlockHeader dataFileBlock = blenderContext.getFileBlock(oldMemoryAddress); if (dataFileBlock == null) { throw new BlenderFileException(STR + oldMemoryAddres... | /**
* This method fetches the data stored under the given address.
* @return the data read from the file
* @throws BlenderFileException
* this exception is thrown when the blend file structure is somehow invalid or corrupted
*/ | This method fetches the data stored under the given address | fetchData | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "trunk/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/Pointer.java",
"license": "apache-2.0",
"size": 7529
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,342,790 |
@Test
public void testDefaultDeserializationFilter_readOnClient() {
JavaSerializationFilterConfig filterConfig = new JavaSerializationFilterConfig();
Config config = new Config();
config.getSerializationConfig().setJavaSerializationFilterConfig(filterConfig);
HazelcastInstance me... | void function() { JavaSerializationFilterConfig filterConfig = new JavaSerializationFilterConfig(); Config config = new Config(); config.getSerializationConfig().setJavaSerializationFilterConfig(filterConfig); HazelcastInstance member = hazelcastFactory.newInstances(config, 1)[0]; ClientConfig clientConfig = new Client... | /**
* <pre>
* When: An untrusted serialized object is stored by member and read from client, the default Whitelist is used.
* Then: Deserialization fails.
* </pre>
*/ | <code> When: An untrusted serialized object is stored by member and read from client, the default Whitelist is used. Then: Deserialization fails. </code> | testDefaultDeserializationFilter_readOnClient | {
"repo_name": "Donnerbart/hazelcast",
"path": "hazelcast-client/src/test/java/com/hazelcast/client/serialization/ClientDeserializationProtectionTest.java",
"license": "apache-2.0",
"size": 7487
} | [
"com.hazelcast.client.config.ClientConfig",
"com.hazelcast.config.Config",
"com.hazelcast.config.JavaSerializationFilterConfig",
"com.hazelcast.core.HazelcastInstance",
"com.hazelcast.nio.serialization.HazelcastSerializationException",
"org.junit.Assert"
] | import com.hazelcast.client.config.ClientConfig; import com.hazelcast.config.Config; import com.hazelcast.config.JavaSerializationFilterConfig; import com.hazelcast.core.HazelcastInstance; import com.hazelcast.nio.serialization.HazelcastSerializationException; import org.junit.Assert; | import com.hazelcast.client.config.*; import com.hazelcast.config.*; import com.hazelcast.core.*; import com.hazelcast.nio.serialization.*; import org.junit.*; | [
"com.hazelcast.client",
"com.hazelcast.config",
"com.hazelcast.core",
"com.hazelcast.nio",
"org.junit"
] | com.hazelcast.client; com.hazelcast.config; com.hazelcast.core; com.hazelcast.nio; org.junit; | 251,731 |
public RestorePointCollectionsClient getRestorePointCollections() {
return this.restorePointCollections;
}
private final RestorePointsClient restorePoints; | RestorePointCollectionsClient function() { return this.restorePointCollections; } private final RestorePointsClient restorePoints; | /**
* Gets the RestorePointCollectionsClient object to access its operations.
*
* @return the RestorePointCollectionsClient object.
*/ | Gets the RestorePointCollectionsClient object to access its operations | getRestorePointCollections | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/ComputeManagementClientImpl.java",
"license": "mit",
"size": 31289
} | [
"com.azure.resourcemanager.compute.fluent.RestorePointCollectionsClient",
"com.azure.resourcemanager.compute.fluent.RestorePointsClient"
] | import com.azure.resourcemanager.compute.fluent.RestorePointCollectionsClient; import com.azure.resourcemanager.compute.fluent.RestorePointsClient; | import com.azure.resourcemanager.compute.fluent.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 719,649 |
public File[] getFiles(String mkey)
{
File last;
int i = 0;
ArrayList v = new ArrayList();
while (true) {
last = getFile(mkey+i);
i++;
if (last == null)
break;
v.add(last);
}
if (v.size() != 0) {
... | File[] function(String mkey) { File last; int i = 0; ArrayList v = new ArrayList(); while (true) { last = getFile(mkey+i); i++; if (last == null) break; v.add(last); } if (v.size() != 0) { File[] path = new File[v.size()]; return (File[])v.toArray(path); } else { return (File[])getDefault(mkey); } } | /**
* Returns an array of Files preference.
*/ | Returns an array of Files preference | getFiles | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "sources/org/apache/batik/util/PreferenceManager.java",
"license": "apache-2.0",
"size": 24867
} | [
"java.io.File",
"java.util.ArrayList"
] | import java.io.File; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,305,625 |
public void updateContent(InputStream content) throws ForbiddenException, ServerException {
getVirtualFile().updateContent(content, null);
} | void function(InputStream content) throws ForbiddenException, ServerException { getVirtualFile().updateContent(content, null); } | /**
* Updates content of file.
*
* @param content
* new content
* @throws ForbiddenException
* if update operation is forbidden
* @throws ServerException
* if other error occurs
*/ | Updates content of file | updateContent | {
"repo_name": "Ori-Libhaber/che-core",
"path": "platform-api/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/FileEntry.java",
"license": "epl-1.0",
"size": 7498
} | [
"java.io.InputStream",
"org.eclipse.che.api.core.ForbiddenException",
"org.eclipse.che.api.core.ServerException"
] | import java.io.InputStream; import org.eclipse.che.api.core.ForbiddenException; 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,095,109 |
@Test
public void testForwardsRecycleBuffer1() {
ReadOnlySlicedNetworkBuffer slice = buffer.readOnlySlice();
assertFalse(slice.isRecycled());
slice.recycleBuffer();
assertTrue(slice.isRecycled());
assertTrue(buffer.isRecycled());
} | void function() { ReadOnlySlicedNetworkBuffer slice = buffer.readOnlySlice(); assertFalse(slice.isRecycled()); slice.recycleBuffer(); assertTrue(slice.isRecycled()); assertTrue(buffer.isRecycled()); } | /**
* Tests forwarding of both {@link ReadOnlySlicedNetworkBuffer#recycleBuffer()} and
* {@link ReadOnlySlicedNetworkBuffer#isRecycled()}.
*/ | Tests forwarding of both <code>ReadOnlySlicedNetworkBuffer#recycleBuffer()</code> and <code>ReadOnlySlicedNetworkBuffer#isRecycled()</code> | testForwardsRecycleBuffer1 | {
"repo_name": "bowenli86/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/ReadOnlySlicedBufferTest.java",
"license": "apache-2.0",
"size": 12748
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 688,612 |
@NotNull
public static String extractPath(@NotNull String url){
int index = url.indexOf("://");
if (index < 0) return url;
return url.substring(index + "://".length());
} | static String function(@NotNull String url){ int index = url.indexOf(STR: } | /**
* Extracts path from the given URL. Path is a substring from "://" till the end of URL. If there is no "://" URL
* itself is returned.
*
* @param url the URL
* @return path
*/ | Extracts path from the given URL. Path is a substring from "://" till the end of URL. If there is no "://" URL itself is returned | extractPath | {
"repo_name": "joewalnes/idea-community",
"path": "platform/platform-api/src/com/intellij/openapi/vfs/VirtualFileManager.java",
"license": "apache-2.0",
"size": 6423
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,847,559 |
public static VistaSession getVistaSession(URL url, Site site, String requiredVersion)
throws IOException, ConnectionException, MethodException, InvalidVistaVistaRadVersionException, SecurityCredentialsExpiredException
{
VistaSession session = VistaSession.getOrCreate(url, site, requiredVersion);
... | static VistaSession function(URL url, Site site, String requiredVersion) throws IOException, ConnectionException, MethodException, InvalidVistaVistaRadVersionException, SecurityCredentialsExpiredException { VistaSession session = VistaSession.getOrCreate(url, site, requiredVersion); boolean connectionFailed = false; if... | /**
* Retrieves a VistaSession from the cache or creates one if necessary. If the session has not
* been logged in for VistARad, the login is attempted
* @param url
* @param site
* @param requiredVersion
* @return
* @throws IOException
* @throws ConnectionException
* @throws MethodException
* @thro... | Retrieves a VistaSession from the cache or creates one if necessary. If the session has not been logged in for VistARad, the login is attempted | getVistaSession | {
"repo_name": "VHAINNOVATIONS/Telepathology",
"path": "Source/Java/VistaImagingDataSourceProvider/main/src/java/gov/va/med/imaging/vistaimagingdatasource/common/VistaImagingVistaRadCommonUtilities.java",
"license": "apache-2.0",
"size": 11671
} | [
"gov.va.med.imaging.core.interfaces.exceptions.ConnectionException",
"gov.va.med.imaging.core.interfaces.exceptions.MethodException",
"gov.va.med.imaging.core.interfaces.exceptions.SecurityCredentialsExpiredException",
"gov.va.med.imaging.datasource.exceptions.InvalidCredentialsException",
"gov.va.med.imagi... | import gov.va.med.imaging.core.interfaces.exceptions.ConnectionException; import gov.va.med.imaging.core.interfaces.exceptions.MethodException; import gov.va.med.imaging.core.interfaces.exceptions.SecurityCredentialsExpiredException; import gov.va.med.imaging.datasource.exceptions.InvalidCredentialsException; import go... | import gov.va.med.imaging.core.interfaces.exceptions.*; import gov.va.med.imaging.datasource.exceptions.*; import gov.va.med.imaging.exchange.business.*; import gov.va.med.imaging.protocol.vista.exceptions.*; import gov.va.med.imaging.url.vista.exceptions.*; import gov.va.med.imaging.vistadatasource.session.*; import j... | [
"gov.va.med",
"java.io"
] | gov.va.med; java.io; | 1,397,957 |
public int pushLimit(int byteLimit) throws IOException {
if (byteLimit < 0) {
throw new IOException(ENCOUNTERED_A_NEGATIVE_SIZE);
}
byteLimit += pos;
int oldLimit = currentLimit;
if (byteLimit > oldLimit) {
throw new EOFException(INPUT_ENDED_UNEXPECTEDLY);
}
currentLimit = byte... | int function(int byteLimit) throws IOException { if (byteLimit < 0) { throw new IOException(ENCOUNTERED_A_NEGATIVE_SIZE); } byteLimit += pos; int oldLimit = currentLimit; if (byteLimit > oldLimit) { throw new EOFException(INPUT_ENDED_UNEXPECTEDLY); } currentLimit = byteLimit; return oldLimit; } | /**
* Sets {@code currentLimit} to (current position) + {@code byteLimit}. This
* is called when descending into a length-delimited embedded message.
*
* @return the old limit.
*/ | Sets currentLimit to (current position) + byteLimit. This is called when descending into a length-delimited embedded message | pushLimit | {
"repo_name": "wakandan/wire",
"path": "wire-runtime/src/main/java/com/squareup/wire/WireInput.java",
"license": "apache-2.0",
"size": 11446
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 956,368 |
@Override
public final List<Pe> getPeList() {
return peList;
} | final List<Pe> function() { return peList; } | /**
* Gets the pe list.
*
* @return the pe list
*/ | Gets the pe list | getPeList | {
"repo_name": "thejotta/CloudSimPlusModificado",
"path": "cloudsim-plus/src/main/java/org/cloudbus/cloudsim/schedulers/VmSchedulerAbstract.java",
"license": "gpl-3.0",
"size": 8080
} | [
"java.util.List",
"org.cloudbus.cloudsim.resources.Pe"
] | import java.util.List; import org.cloudbus.cloudsim.resources.Pe; | import java.util.*; import org.cloudbus.cloudsim.resources.*; | [
"java.util",
"org.cloudbus.cloudsim"
] | java.util; org.cloudbus.cloudsim; | 236,746 |
@Test
public void testEmptySheetQuery() throws RpcException {
String sql = "SELECT * " + "FROM table(cp.`excel/test_data.xlsx` (type => 'excel', sheetName => 'emptySheet'))";
RowSet results = client.queryBuilder().sql(sql).rowSet();
assertNull(results);
} | void function() throws RpcException { String sql = STR + STR; RowSet results = client.queryBuilder().sql(sql).rowSet(); assertNull(results); } | /**
* This tests to what happens if you attempt to query a completely empty sheet
* The result should be an empty data set.
*
* @throws RpcException Throws exception if unable to connect to Drill cluster.
*/ | This tests to what happens if you attempt to query a completely empty sheet The result should be an empty data set | testEmptySheetQuery | {
"repo_name": "Ben-Zvi/drill",
"path": "contrib/format-excel/src/test/java/org/apache/drill/exec/store/excel/TestExcelFormat.java",
"license": "apache-2.0",
"size": 20759
} | [
"org.apache.drill.exec.physical.rowSet.RowSet",
"org.apache.drill.exec.rpc.RpcException",
"org.junit.Assert"
] | import org.apache.drill.exec.physical.rowSet.RowSet; import org.apache.drill.exec.rpc.RpcException; import org.junit.Assert; | import org.apache.drill.exec.physical.*; import org.apache.drill.exec.rpc.*; import org.junit.*; | [
"org.apache.drill",
"org.junit"
] | org.apache.drill; org.junit; | 119,571 |
void open() throws FileNotFoundException; | void open() throws FileNotFoundException; | /**
* To be called by a client to start the callback and allocate the underlying output stream.
* In case of a shared stream it might be that the stream is reused
*/ | To be called by a client to start the callback and allocate the underlying output stream. In case of a shared stream it might be that the stream is reused | open | {
"repo_name": "mattbetzel/docker-maven-plugin",
"path": "src/main/java/io/fabric8/maven/docker/access/log/LogCallback.java",
"license": "apache-2.0",
"size": 2085
} | [
"java.io.FileNotFoundException"
] | import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 1,475,535 |
public Instant getStartTime() {
return startTime;
}
/////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("unused") // For AvroCoder
private CounterMark() {
this.lastEmitted = 0L;
this.startTime = Instant.now();
}
@Overri... | Instant function() { return startTime; } @SuppressWarnings(STR) private CounterMark() { this.lastEmitted = 0L; this.startTime = Instant.now(); } public void finalizeCheckpoint() throws IOException {} | /**
* Returns the time the reader was started.
*/ | Returns the time the reader was started | getStartTime | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/CountingSource.java",
"license": "apache-2.0",
"size": 17782
} | [
"java.io.IOException",
"org.joda.time.Instant"
] | import java.io.IOException; import org.joda.time.Instant; | import java.io.*; import org.joda.time.*; | [
"java.io",
"org.joda.time"
] | java.io; org.joda.time; | 1,371,067 |
public void dump(CuratorFramework client) throws Exception {
ConfigurationsUtils.dumpConfigs(System.out, client);
} | void function(CuratorFramework client) throws Exception { ConfigurationsUtils.dumpConfigs(System.out, client); } | /**
* Dumps all config.
* @param client The ZooKeeper client for configs
* @throws Exception If there's an error retrieving configs
*/ | Dumps all config | dump | {
"repo_name": "JonZeolla/metron",
"path": "metron-platform/metron-common/src/main/java/org/apache/metron/common/cli/ConfigurationManager.java",
"license": "apache-2.0",
"size": 16251
} | [
"org.apache.curator.framework.CuratorFramework",
"org.apache.metron.common.configuration.ConfigurationsUtils"
] | import org.apache.curator.framework.CuratorFramework; import org.apache.metron.common.configuration.ConfigurationsUtils; | import org.apache.curator.framework.*; import org.apache.metron.common.configuration.*; | [
"org.apache.curator",
"org.apache.metron"
] | org.apache.curator; org.apache.metron; | 64,284 |
@Override
public int write(String str, String wrap) throws IOException {
int n = writeWrap(wrap);
return n + write(str);
} | int function(String str, String wrap) throws IOException { int n = writeWrap(wrap); return n + write(str); } | /**
* Write out a string literal or attribute expression or expression element.
* <p>
* If doing line wrap, then check {@code wrap} before emitting {@code str}.
* If at or beyond desired line width then emit a {@link #newline} and any
* indentation before spitting out {@code str}.</p>
*/ | Write out a string literal or attribute expression or expression element. If doing line wrap, then check wrap before emitting str. If at or beyond desired line width then emit a <code>#newline</code> and any indentation before spitting out str | write | {
"repo_name": "MTDdk/stringtemplate4",
"path": "src/org/stringtemplate/v4/AutoIndentWriter.java",
"license": "bsd-3-clause",
"size": 7482
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,766,070 |
public static boolean isAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.getContext();
Collection<? extends GrantedAuthority> authorities = securityContext.getAuthentication().getAuthorities();
if (authorities != null) {
for (GrantedAuthority authority : ... | static boolean function() { SecurityContext securityContext = SecurityContextHolder.getContext(); Collection<? extends GrantedAuthority> authorities = securityContext.getAuthentication().getAuthorities(); if (authorities != null) { for (GrantedAuthority authority : authorities) { if (authority.getAuthority().equals(Aut... | /**
* Check if a user is authenticated.
*
* @return true if the user is authenticated, false otherwise
*/ | Check if a user is authenticated | isAuthenticated | {
"repo_name": "rblazquez/prevegest",
"path": "src/main/java/com/blacar/apps/preveges/security/SecurityUtils.java",
"license": "apache-2.0",
"size": 2674
} | [
"java.util.Collection",
"org.springframework.security.core.GrantedAuthority",
"org.springframework.security.core.context.SecurityContext",
"org.springframework.security.core.context.SecurityContextHolder"
] | import java.util.Collection; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; | import java.util.*; import org.springframework.security.core.*; import org.springframework.security.core.context.*; | [
"java.util",
"org.springframework.security"
] | java.util; org.springframework.security; | 2,417,820 |
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
// Look up the components we will... | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if (mserver == null) { mserver = ((ApplicationServlet) getServlet()).getServer(); } if (resources == null) { resources = getServlet().getResources(); } HttpSess... | /**
* Process the specified HTTP request, and create the corresponding HTTP
* response (or forward to another web component that will create it).
* Return an <code>ActionForward</code> instance describing where and how
* control should be forwarded, or <code>null</code> if the response has
* al... | Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it). Return an <code>ActionForward</code> instance describing where and how control should be forwarded, or <code>null</code> if the response has already been completed | perform | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-4.1.12-src/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/users/ListGroupsAction.java",
"license": "apache-2.0",
"size": 6965
} | [
"java.io.IOException",
"java.net.URLDecoder",
"java.util.Locale",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.apache.struts.action.Action",
"org.apache.struts.action.ActionForm",
"org.ap... | import java.io.IOException; import java.net.URLDecoder; import java.util.Locale; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.struts.action.Action; import org.apache.struts.act... | import java.io.*; import java.net.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.struts.action.*; import org.apache.webapp.admin.*; | [
"java.io",
"java.net",
"java.util",
"javax.servlet",
"org.apache.struts",
"org.apache.webapp"
] | java.io; java.net; java.util; javax.servlet; org.apache.struts; org.apache.webapp; | 519,366 |
@Test
public void testMinByComparison() {
SelectByMinFunction<Tuple5<Integer, Long, String, Long, Integer>> minByTuple = new SelectByMinFunction<Tuple5<Integer, Long, String, Long, Integer>>(tupleTypeInfo, new int[] {0});
try {
Assert.assertSame("SelectByMin must return smaller tuple", smaller, minByTuple... | void function() { SelectByMinFunction<Tuple5<Integer, Long, String, Long, Integer>> minByTuple = new SelectByMinFunction<Tuple5<Integer, Long, String, Long, Integer>>(tupleTypeInfo, new int[] {0}); try { Assert.assertSame(STR, smaller, minByTuple.reduce(smaller, bigger)); Assert.assertSame(STR, smaller, minByTuple.redu... | /**
* This test validates whether the order of tuples has any impact on the outcome and if the smaller tuple is returned.
*/ | This test validates whether the order of tuples has any impact on the outcome and if the smaller tuple is returned | testMinByComparison | {
"repo_name": "hongyuhong/flink",
"path": "flink-java/src/test/java/org/apache/flink/api/java/functions/SelectByFunctionsTest.java",
"license": "apache-2.0",
"size": 8895
} | [
"org.apache.flink.api.java.tuple.Tuple5",
"org.junit.Assert"
] | import org.apache.flink.api.java.tuple.Tuple5; import org.junit.Assert; | import org.apache.flink.api.java.tuple.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 2,100,394 |
return Arrays.asList(this.fieldTypes.clone());
} | return Arrays.asList(this.fieldTypes.clone()); } | /**
* Get the {@link FieldType}s associated with this instance.
*
* @return unmodifiable list of {@link FieldType}s
*/ | Get the <code>FieldType</code>s associated with this instance | getFieldTypes | {
"repo_name": "tempbottle/jsimpledb",
"path": "src/java/org/jsimpledb/core/FieldTypesFilter.java",
"license": "apache-2.0",
"size": 9963
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,744,822 |
public ArrayList<Claim> toArrayList() {
return this.claimList;
} | ArrayList<Claim> function() { return this.claimList; } | /**
* Returns an arraylist of claims from ClaimList.
* @return a ArrayList of claims
*/ | Returns an arraylist of claims from ClaimList | toArrayList | {
"repo_name": "CMPUT301W15T15/TravelClaimsApp",
"path": "TravelClaimsApp/src/com/cmput301w15t15/travelclaimsapp/model/ClaimList.java",
"license": "gpl-3.0",
"size": 4054
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 807,309 |
protected static boolean isHashCodeMethod(Method method)
{
return method.getReturnType() == int.class && method.getParameterTypes().length == 0 &&
method.getName().equals("hashCode");
} | static boolean function(Method method) { return method.getReturnType() == int.class && method.getParameterTypes().length == 0 && method.getName().equals(STR); } | /**
* Checks if the method is derived from Object.hashCode()
*
* @param method
* method being tested
* @return true if the method is defined from Object.hashCode(), false otherwise
*/ | Checks if the method is derived from Object.hashCode() | isHashCodeMethod | {
"repo_name": "Servoy/wicket",
"path": "wicket-ioc/src/main/java/org/apache/wicket/proxy/LazyInitProxyFactory.java",
"license": "apache-2.0",
"size": 14150
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 176,084 |
@Override
public void releaseSavepoint(Object savepoint) throws TransactionException {
ConnectionHolder conHolder = getConnectionHolderForSavepoint();
try {
conHolder.getConnection().releaseSavepoint((Savepoint) savepoint);
}
catch (Throwable ex) {
logger.debug("Could not explicitly release JDBC savep... | void function(Object savepoint) throws TransactionException { ConnectionHolder conHolder = getConnectionHolderForSavepoint(); try { conHolder.getConnection().releaseSavepoint((Savepoint) savepoint); } catch (Throwable ex) { logger.debug(STR, ex); } } | /**
* This implementation releases the given JDBC 3.0 Savepoint.
* @see java.sql.Connection#releaseSavepoint
*/ | This implementation releases the given JDBC 3.0 Savepoint | releaseSavepoint | {
"repo_name": "lingcreative/play-dbx",
"path": "src/main/java/dbx/jdbc/JdbcTransactionObjectSupport.java",
"license": "apache-2.0",
"size": 5288
} | [
"java.sql.Savepoint"
] | import java.sql.Savepoint; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,019,930 |
public static String getRandomDungeonMob(Random rand)
{
DungeonMob mob = (DungeonMob)WeightedRandom.getRandomItem(rand, dungeonMobs);
if (mob == null)
{
return "";
}
return mob.type;
}
public static class DungeonMob extends WeightedRandom.Item
{
... | static String function(Random rand) { DungeonMob mob = (DungeonMob)WeightedRandom.getRandomItem(rand, dungeonMobs); if (mob == null) { return ""; } return mob.type; } public static class DungeonMob extends WeightedRandom.Item { public String type; public DungeonMob(int weight, String type) { super(weight); this.type = ... | /**
* Gets a random mob name from the list.
* @param rand World generation random number generator
* @return The mob name
*/ | Gets a random mob name from the list | getRandomDungeonMob | {
"repo_name": "Scrik/Cauldron-1",
"path": "eclipse/cauldron/src/main/java/net/minecraftforge/common/DungeonHooks.java",
"license": "gpl-3.0",
"size": 2843
} | [
"java.util.Random",
"net.minecraft.util.WeightedRandom"
] | import java.util.Random; import net.minecraft.util.WeightedRandom; | import java.util.*; import net.minecraft.util.*; | [
"java.util",
"net.minecraft.util"
] | java.util; net.minecraft.util; | 799,830 |
public void deleteChannelMessages(ChatChannel channel) throws PermissionException; | void function(ChatChannel channel) throws PermissionException; | /**
* delete all Chat Messages in a given channel
* @param ChatChannel the channel to delete all messages from
*/ | delete all Chat Messages in a given channel | deleteChannelMessages | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "chat/chat-api/api/src/java/org/sakaiproject/chat2/model/ChatManager.java",
"license": "apache-2.0",
"size": 9820
} | [
"org.sakaiproject.exception.PermissionException"
] | import org.sakaiproject.exception.PermissionException; | import org.sakaiproject.exception.*; | [
"org.sakaiproject.exception"
] | org.sakaiproject.exception; | 1,229,456 |
public void addServiceDiscoveryConfigurations(ServiceCallServiceDiscoveryConfiguration serviceDiscoveryConfiguration) {
if (serviceDiscoveryConfigurations == null) {
serviceDiscoveryConfigurations = new ArrayList<>();
}
serviceDiscoveryConfigurations.add(serviceDiscoveryConfigur... | void function(ServiceCallServiceDiscoveryConfiguration serviceDiscoveryConfiguration) { if (serviceDiscoveryConfigurations == null) { serviceDiscoveryConfigurations = new ArrayList<>(); } serviceDiscoveryConfigurations.add(serviceDiscoveryConfiguration); } | /**
* Add a ServiceDiscovery configuration
*/ | Add a ServiceDiscovery configuration | addServiceDiscoveryConfigurations | {
"repo_name": "RohanHart/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/cloud/ChainedServiceCallServiceDiscoveryConfiguration.java",
"license": "apache-2.0",
"size": 7349
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,394,178 |
HttpResponse executeHttpUriRequest(final HttpUriRequest httpRequest) throws IOException {
final HttpClient httpClient = getAbstractFileSystem().getHttpClient();
final HttpClientContext httpClientContext = getAbstractFileSystem().getHttpClientContext();
return httpClient.execute(httpRequest, ... | HttpResponse executeHttpUriRequest(final HttpUriRequest httpRequest) throws IOException { final HttpClient httpClient = getAbstractFileSystem().getHttpClient(); final HttpClientContext httpClientContext = getAbstractFileSystem().getHttpClientContext(); return httpClient.execute(httpRequest, httpClientContext); } | /**
* Execute the request using the given {@code httpRequest} and return a <code>HttpResponse</code> from the execution.
* @param httpRequest <code>HttpUriRequest</code> object
* @return <code>HttpResponse</code> from the execution
* @throws IOException if IO error occurs
*/ | Execute the request using the given httpRequest and return a <code>HttpResponse</code> from the execution | executeHttpUriRequest | {
"repo_name": "svn2github/commons-vfs2",
"path": "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileObject.java",
"license": "apache-2.0",
"size": 8497
} | [
"java.io.IOException",
"org.apache.http.HttpResponse",
"org.apache.http.client.HttpClient",
"org.apache.http.client.methods.HttpUriRequest",
"org.apache.http.client.protocol.HttpClientContext"
] | import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.client.protocol.HttpClientContext; | import java.io.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.client.protocol.*; | [
"java.io",
"org.apache.http"
] | java.io; org.apache.http; | 2,852,225 |
@Override
public void init(String jsonString) throws StorageException {
try {
systemConfig = new JsonSimpleConfig(jsonString);
BlobStoreClient.init(jsonString);
init();
} catch (IOException ioe) {
throw new StorageException("Failed to read string configuration!", ioe);
}
} | void function(String jsonString) throws StorageException { try { systemConfig = new JsonSimpleConfig(jsonString); BlobStoreClient.init(jsonString); init(); } catch (IOException ioe) { throw new StorageException(STR, ioe); } } | /**
* Public init method for String based configuration.
*
* @param jsonString
* The String containing JSON configuration
* @throws StorageException
* if any errors occur
*/ | Public init method for String based configuration | init | {
"repo_name": "the-fascinator-contrib/plugin-storage-blobstore",
"path": "src/main/java/com/googlecode/fascinator/storage/jclouds/BlobStoreStorage.java",
"license": "gpl-3.0",
"size": 9426
} | [
"com.googlecode.fascinator.api.storage.StorageException",
"com.googlecode.fascinator.common.JsonSimpleConfig",
"java.io.IOException"
] | import com.googlecode.fascinator.api.storage.StorageException; import com.googlecode.fascinator.common.JsonSimpleConfig; import java.io.IOException; | import com.googlecode.fascinator.api.storage.*; import com.googlecode.fascinator.common.*; import java.io.*; | [
"com.googlecode.fascinator",
"java.io"
] | com.googlecode.fascinator; java.io; | 2,729,141 |
//-----------------------------------------------------------------------
@Override
public String toString() {
return DateTimeFormatter.ISO_INSTANT.format(this);
} | String function() { return DateTimeFormatter.ISO_INSTANT.format(this); } | /**
* A string representation of this instant using ISO-8601 representation.
* <p>
* The format used is the same as {@link DateTimeFormatter#ISO_INSTANT}.
*
* @return an ISO-8601 representation of this instant, not null
*/ | A string representation of this instant using ISO-8601 representation. The format used is the same as <code>DateTimeFormatter#ISO_INSTANT</code> | toString | {
"repo_name": "karianna/jdk8_tl",
"path": "jdk/src/share/classes/java/time/Instant.java",
"license": "gpl-2.0",
"size": 58654
} | [
"java.time.format.DateTimeFormatter"
] | import java.time.format.DateTimeFormatter; | import java.time.format.*; | [
"java.time"
] | java.time; | 61,957 |
public static void testMetaInfExport() throws Exception {
Properties base = new Properties();
base.put(Analyzer.EXPORT_PACKAGE, "*");
Builder analyzer = new Builder();
try {
analyzer.setClasspath(new File[] {
IO.getFile("jar/asm.jar")
});
analyzer.setProperties(base);
analyzer.build();
as... | static void function() throws Exception { Properties base = new Properties(); base.put(Analyzer.EXPORT_PACKAGE, "*"); Builder analyzer = new Builder(); try { analyzer.setClasspath(new File[] { IO.getFile(STR) }); analyzer.setProperties(base); analyzer.build(); assertTrue(analyzer.check()); assertFalse(analyzer.getExpor... | /**
* Check if we export META-INF when we export the complete classpath.
*/ | Check if we export META-INF when we export the complete classpath | testMetaInfExport | {
"repo_name": "magnet/bnd",
"path": "biz.aQute.bndlib.tests/src/test/BuilderTest.java",
"license": "apache-2.0",
"size": 95973
} | [
"java.io.File",
"java.util.Properties"
] | import java.io.File; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,337,041 |
void copy(INDArray x,INDArray y); | void copy(INDArray x,INDArray y); | /**
* copy a vector to another vector.
* @param x
* @param y
*/ | copy a vector to another vector | copy | {
"repo_name": "drlebedev/nd4j",
"path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/Level1.java",
"license": "apache-2.0",
"size": 6432
} | [
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,589,388 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.