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 IV addTerm(Value value);
IV function(Value value);
/** * Add a term into the term:id index and the id:term index, returning the * assigned term identifier (non-batch API). * <p> * Note: This method delegates to the batch API, but it is extremely * inefficient for scale-out as it does one RMI per request! * * @param value * ...
Add a term into the term:id index and the id:term index, returning the assigned term identifier (non-batch API). Note: This method delegates to the batch API, but it is extremely inefficient for scale-out as it does one RMI per request
addTerm
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata-rdf/src/java/com/bigdata/rdf/store/IRawTripleStore.java", "license": "gpl-2.0", "size": 11815 }
[ "org.openrdf.model.Value" ]
import org.openrdf.model.Value;
import org.openrdf.model.*;
[ "org.openrdf.model" ]
org.openrdf.model;
1,838,121
public static SamlMetadataUIInfo locateMetadataUserInterfaceForEntityId(final MetadataResolverAdapter metadataAdapter, final String entityId, final RegisteredServic...
static SamlMetadataUIInfo function(final MetadataResolverAdapter metadataAdapter, final String entityId, final RegisteredService registeredService) { final EntityDescriptor entityDescriptor = metadataAdapter.getEntityDescriptorForEntityId(entityId); return locateMetadataUserInterfaceForEntityId(entityDescriptor, entity...
/** * Locate MDUI for entity id simple metadata ui info. * * @param metadataAdapter the metadata adapter * @param entityId the entity id * @param registeredService the registered service * @return the simple metadata ui info */
Locate MDUI for entity id simple metadata ui info
locateMetadataUserInterfaceForEntityId
{ "repo_name": "mrluo735/cas-5.1.0", "path": "support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/MetadataUIUtils.java", "license": "apache-2.0", "size": 4498 }
[ "org.apereo.cas.services.RegisteredService", "org.opensaml.saml.saml2.metadata.EntityDescriptor" ]
import org.apereo.cas.services.RegisteredService; import org.opensaml.saml.saml2.metadata.EntityDescriptor;
import org.apereo.cas.services.*; import org.opensaml.saml.saml2.metadata.*;
[ "org.apereo.cas", "org.opensaml.saml" ]
org.apereo.cas; org.opensaml.saml;
760,323
public static ExpressionRoleMapping parse(String name, BytesReference source, XContentType xContentType) throws IOException { final NamedXContentRegistry registry = NamedXContentRegistry.EMPTY; try (InputStream stream = source.streamInput(); XContentParser parser = xContentType.xContent...
static ExpressionRoleMapping function(String name, BytesReference source, XContentType xContentType) throws IOException { final NamedXContentRegistry registry = NamedXContentRegistry.EMPTY; try (InputStream stream = source.streamInput(); XContentParser parser = xContentType.xContent() .createParser(registry, LoggingDep...
/** * Parse an {@link ExpressionRoleMapping} from the provided <em>XContent</em> */
Parse an <code>ExpressionRoleMapping</code> from the provided XContent
parse
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authc/support/mapper/ExpressionRoleMapping.java", "license": "apache-2.0", "size": 13056 }
[ "java.io.IOException", "java.io.InputStream", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.xcontent.LoggingDeprecationHandler", "org.elasticsearch.common.xcontent.NamedXContentRegistry", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.common.xcontent....
import java.io.IOException; import java.io.InputStream; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsea...
import java.io.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
837,769
public void onSort(MenuItem item) { }
void function(MenuItem item) { }
/** * This method is declared in the menu. */
This method is declared in the menu
onSort
{ "repo_name": "luoqii/ApkLauncher_legacy", "path": "sample/ApiDemos/src/com/example/android/apis/view/VideoPlayerActivity.java", "license": "apache-2.0", "size": 9952 }
[ "android.view.MenuItem" ]
import android.view.MenuItem;
import android.view.*;
[ "android.view" ]
android.view;
1,837,614
@ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String hostGroupName, String hostname);
@ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String hostGroupName, String hostname);
/** * Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is * running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource * Health Center in the Azure Portal. Please refer to * https://docs.mi...
Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to HREF for more details
restart
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/DedicatedHostsClient.java", "license": "mit", "size": 36147 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,914,470
public ConfigurableApplicationContext context() { return this.context; }
ConfigurableApplicationContext function() { return this.context; }
/** * Accessor for the current application context. * @return the current application context (or null if not yet running) */
Accessor for the current application context
context
{ "repo_name": "minmay/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java", "license": "apache-2.0", "size": 17333 }
[ "org.springframework.context.ConfigurableApplicationContext" ]
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
1,081,386
void mergeFrom(@NotNull GitPushRepoResult repoResult) { for (Map.Entry<GitBranch, GitPushBranchResult> entry : repoResult.myBranchResults.entrySet()) { GitBranch branch = entry.getKey(); GitPushBranchResult branchResult = entry.getValue(); if (!myBranchResults.containsKey(branch)) { // otherwi...
void mergeFrom(@NotNull GitPushRepoResult repoResult) { for (Map.Entry<GitBranch, GitPushBranchResult> entry : repoResult.myBranchResults.entrySet()) { GitBranch branch = entry.getKey(); GitPushBranchResult branchResult = entry.getValue(); if (!myBranchResults.containsKey(branch)) { myBranchResults.put(branch, branchRe...
/** * Merges the given results to this result. * In the case of conflict (i.e. different results for a branch), current result is preferred over the previous one. */
Merges the given results to this result. In the case of conflict (i.e. different results for a branch), current result is preferred over the previous one
mergeFrom
{ "repo_name": "IllusionRom-deprecated/android_platform_tools_idea", "path": "plugins/git4idea/src/git4idea/push/GitPushRepoResult.java", "license": "apache-2.0", "size": 5195 }
[ "java.util.Map", "org.jetbrains.annotations.NotNull" ]
import java.util.Map; import org.jetbrains.annotations.NotNull;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
819,060
public void remove(String className) { checkEmpty(className, EMPTY_STRING_MSG); String internalTableName = TABLE_PREFIX + className; checkHasTable(className, "Cannot remove class because it is not in this Realm: " + className); Table table = getTable(className); if (table.has...
void function(String className) { checkEmpty(className, EMPTY_STRING_MSG); String internalTableName = TABLE_PREFIX + className; checkHasTable(className, STR + className); Table table = getTable(className); if (table.hasPrimaryKey()) { table.setPrimaryKey(null); } transaction.removeTable(internalTableName); }
/** * Removes a class from the Realm. All data will be removed. Removing a class while other classes point * to it will throw an {@link IllegalStateException}. Remove those classes or fields first. * * @param className name of the class to remove. */
Removes a class from the Realm. All data will be removed. Removing a class while other classes point to it will throw an <code>IllegalStateException</code>. Remove those classes or fields first
remove
{ "repo_name": "ShikaSD/realm-java", "path": "realm/realm-library/src/main/java/io/realm/RealmSchema.java", "license": "apache-2.0", "size": 11077 }
[ "io.realm.internal.Table" ]
import io.realm.internal.Table;
import io.realm.internal.*;
[ "io.realm.internal" ]
io.realm.internal;
660,066
public List<Anecdote> getAnecdotes() { return mAnecdotes; }
List<Anecdote> function() { return mAnecdotes; }
/** * Return the list of anecdotes already loaded by the service * * @return list of anecdote */
Return the list of anecdotes already loaded by the service
getAnecdotes
{ "repo_name": "HugoGresse/Anecdote", "path": "app/src/main/java/io/gresse/hugo/anecdote/anecdote/service/AnecdoteService.java", "license": "apache-2.0", "size": 4444 }
[ "io.gresse.hugo.anecdote.anecdote.model.Anecdote", "java.util.List" ]
import io.gresse.hugo.anecdote.anecdote.model.Anecdote; import java.util.List;
import io.gresse.hugo.anecdote.anecdote.model.*; import java.util.*;
[ "io.gresse.hugo", "java.util" ]
io.gresse.hugo; java.util;
110,270
public boolean setValue(InternalContextAdapter context, Object value) throws MethodInvocationException { if (jjtGetNumChildren() == 0) { context.put(rootString, value); return true; } Object result = getVariableValue(context, rootS...
boolean function(InternalContextAdapter context, Object value) throws MethodInvocationException { if (jjtGetNumChildren() == 0) { context.put(rootString, value); return true; } Object result = getVariableValue(context, rootString); if (result == null) { String msg = STR + Log.formatFileString(uberInfo); log.error(msg);...
/** * Sets the value of a complex reference (something like $foo.bar) * Currently used by ASTSetReference() * * @see ASTSetDirective * * @param context context object containing this reference * @param value Object to set as value * @return true if successful, false...
Sets the value of a complex reference (something like $foo.bar) Currently used by ASTSetReference()
setValue
{ "repo_name": "VISTALL/apache.velocity-engine", "path": "velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTReference.java", "license": "apache-2.0", "size": 34664 }
[ "java.lang.reflect.InvocationTargetException", "org.apache.velocity.context.InternalContextAdapter", "org.apache.velocity.exception.MethodInvocationException", "org.apache.velocity.exception.VelocityException", "org.apache.velocity.runtime.log.Log", "org.apache.velocity.util.ClassUtils", "org.apache.vel...
import java.lang.reflect.InvocationTargetException; import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.VelocityException; import org.apache.velocity.runtime.log.Log; import org.apache.velocity.util.ClassUtils; i...
import java.lang.reflect.*; import org.apache.velocity.context.*; import org.apache.velocity.exception.*; import org.apache.velocity.runtime.log.*; import org.apache.velocity.util.*; import org.apache.velocity.util.introspection.*;
[ "java.lang", "org.apache.velocity" ]
java.lang; org.apache.velocity;
241,413
protected void initializeEditingDomain() { // Create an adapter factory that yields item providers. // adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapt...
void function() { adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new WebpageItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new ReflectiveItemPr...
/** * This sets up the editing domain for the model editor. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets up the editing domain for the model editor.
initializeEditingDomain
{ "repo_name": "hosny1993/vogella", "path": "de.vogella.emf.webpage.model.editor/src/de/vogella/emf/webpage/model/webpage/presentation/WebpageEditor.java", "license": "epl-1.0", "size": 55492 }
[ "de.vogella.emf.webpage.model.webpage.provider.WebpageItemProviderAdapterFactory", "org.eclipse.emf.common.command.BasicCommandStack", "org.eclipse.emf.edit.provider.ComposedAdapterFactory", "org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory", "org.eclipse.emf.edit.provider.resource.Resourc...
import de.vogella.emf.webpage.model.webpage.provider.WebpageItemProviderAdapterFactory; import org.eclipse.emf.common.command.BasicCommandStack; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.re...
import de.vogella.emf.webpage.model.webpage.provider.*; import org.eclipse.emf.common.command.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.edit.provider.resource.*;
[ "de.vogella.emf", "org.eclipse.emf" ]
de.vogella.emf; org.eclipse.emf;
1,188,292
public void onGpsStatusChanged(GpsStatus status, int satsInView, int satsUsed, Iterable<GpsSatellite> sats) { if (satsUsed == 0) { Location location = providerLocations.get(LocationManager.GPS_PROVIDER); if (location != null) markLocationAsStale(location); applyLocationProviderStyle(this.getContext(),...
void function(GpsStatus status, int satsInView, int satsUsed, Iterable<GpsSatellite> sats) { if (satsUsed == 0) { Location location = providerLocations.get(LocationManager.GPS_PROVIDER); if (location != null) markLocationAsStale(location); applyLocationProviderStyle(this.getContext(), LocationManager.GPS_PROVIDER, LOCA...
/** * Called by {@link MainActivity} when the status of the GPS changes. Updates GPS display. */
Called by <code>MainActivity</code> when the status of the GPS changes. Updates GPS display
onGpsStatusChanged
{ "repo_name": "andree182/satstat", "path": "src/com/vonglasow/michael/satstat/MapSectionFragment.java", "license": "gpl-3.0", "size": 26374 }
[ "android.location.GpsSatellite", "android.location.GpsStatus", "android.location.Location", "android.location.LocationManager" ]
import android.location.GpsSatellite; import android.location.GpsStatus; import android.location.Location; import android.location.LocationManager;
import android.location.*;
[ "android.location" ]
android.location;
2,003,594
public boolean writeTo(ByteBuffer dst) { if (!headerComplete) { if (dst.remaining() < HEADER_SIZE) { return false; } dst.put(VERSION); dst.putChar(flags); dst.putInt(partitionId); size = totalSize(); dst.put...
boolean function(ByteBuffer dst) { if (!headerComplete) { if (dst.remaining() < HEADER_SIZE) { return false; } dst.put(VERSION); dst.putChar(flags); dst.putInt(partitionId); size = totalSize(); dst.putInt(size); headerComplete = true; } return writeValue(dst); }
/** * Writes the packet data to the supplied {@code ByteBuffer}, up to the buffer's limit. If it returns {@code false}, * it should be called again to write the remaining data. * @param dst the destination byte buffer * @return {@code true} if all the packet's data is now written out; {@code false} ...
Writes the packet data to the supplied ByteBuffer, up to the buffer's limit. If it returns false, it should be called again to write the remaining data
writeTo
{ "repo_name": "emrahkocaman/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/nio/Packet.java", "license": "apache-2.0", "size": 14765 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
787,312
public Optional<String> getBqOpt() { return getAnnotationStringOpt("BQ"); }
Optional<String> function() { return getAnnotationStringOpt("BQ"); }
/** * Return an optional Type=Z value for the reserved key <code>BQ</code> * as a string. * * @return an optional Type=Z value for the reserved key <code>BQ</code> * as a string */
Return an optional Type=Z value for the reserved key <code>BQ</code> as a string
getBqOpt
{ "repo_name": "heuermh/dishevelled-bio", "path": "alignment/src/main/java/org/dishevelled/bio/alignment/sam/SamRecord.java", "license": "lgpl-3.0", "size": 61001 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,145,442
Cursor c = db.query(false, USER_TABLE, null, "id_user=?", new String[] { id }, null, null, null, null); return getUserFromCursor(c); }
Cursor c = db.query(false, USER_TABLE, null, STR, new String[] { id }, null, null, null, null); return getUserFromCursor(c); }
/** * Find a user by his id * @param id * @return user */
Find a user by his id
findUserById
{ "repo_name": "Anparejo/DAM", "path": "MathGame/src/com/project/mathgame/model/UserDAO.java", "license": "gpl-2.0", "size": 4880 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,745,923
@Test(groups="his.lab.test" ,dependsOnMethods={"addNewLabTestRequestTestCase","addSpecimenInfoTestCase","getSpecimenByRequestIDTestCase", "getSpecimenIDByRequestIDTestCase"}) public void getAllSpecimenTypeTestCase() throws IOException { ArrayList<String> resArrayList = getHTTPResponse( properties.getPrope...
@Test(groups=STR ,dependsOnMethods={STR,STR,STR, STR}) void function() throws IOException { ArrayList<String> resArrayList = getHTTPResponse( properties.getProperty(TestCaseConstants.URL_APPEND_GET_ALL_SPECIMEN_TYPES), TestCaseConstants.HTTP_GET, null); Assert.assertEquals(Integer.parseInt(resArrayList.get(1)),SUCCESS_...
/** * This is get all speciment type Specimen Test Case. * * @throws IOException * Signals that an I/O exception of some sort has occurred. This * class is the general class of exceptions produced by failed * or interrupted I/O operations. * @throws JSONException * ...
This is get all speciment type Specimen Test Case
getAllSpecimenTypeTestCase
{ "repo_name": "SLIIT-FacultyOfComputing/Digital-Pulz-for-Hospitals", "path": "HIS_Latest_Project_29-07-2016/TestCases/HIS/src/LabTestRequestTestCase.java", "license": "apache-2.0", "size": 11592 }
[ "java.io.IOException", "java.util.ArrayList", "org.testng.Assert", "org.testng.annotations.Test" ]
import java.io.IOException; import java.util.ArrayList; import org.testng.Assert; import org.testng.annotations.Test;
import java.io.*; import java.util.*; import org.testng.*; import org.testng.annotations.*;
[ "java.io", "java.util", "org.testng", "org.testng.annotations" ]
java.io; java.util; org.testng; org.testng.annotations;
691,739
void setBodyWidget( final Widget w );
void setBodyWidget( final Widget w );
/** * Set the Widget to display in the body panel of the generic Wizard * @param w */
Set the Widget to display in the body panel of the generic Wizard
setBodyWidget
{ "repo_name": "wmedvede/uberfire-extensions", "path": "uberfire-widgets/uberfire-widgets-core/uberfire-widgets-core-client/src/main/java/org/uberfire/ext/widgets/core/client/wizards/WizardView.java", "license": "apache-2.0", "size": 2183 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,705,317
@GwtIncompatible("To be supported") CacheBuilder<K, V> lenientParsing() { strictParsing = false; return this; }
@GwtIncompatible(STR) CacheBuilder<K, V> lenientParsing() { strictParsing = false; return this; }
/** * Enables lenient parsing. Useful for tests and spec parsing. */
Enables lenient parsing. Useful for tests and spec parsing
lenientParsing
{ "repo_name": "eoneil1942/voltdb-4.7fix", "path": "third_party/java/src/com/google_voltpatches/common/cache/CacheBuilder.java", "license": "agpl-3.0", "size": 38141 }
[ "com.google_voltpatches.common.annotations.GwtIncompatible" ]
import com.google_voltpatches.common.annotations.GwtIncompatible;
import com.google_voltpatches.common.annotations.*;
[ "com.google_voltpatches.common" ]
com.google_voltpatches.common;
2,838,432
public void setSectionPaint(Comparable key, Paint paint) { // null argument check delegated... this.sectionPaintMap.put(key, paint); notifyListeners(new PlotChangeEvent(this)); }
void function(Comparable key, Paint paint) { this.sectionPaintMap.put(key, paint); notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the paint associated with the specified key, and sends a * {@link PlotChangeEvent} to all registered listeners. * * @param key the key (<code>null</code> not permitted). * @param paint the paint. * * @throws IllegalArgumentException if <code>key</code> is * <...
Sets the paint associated with the specified key, and sends a <code>PlotChangeEvent</code> to all registered listeners
setSectionPaint
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/plot/PiePlot.java", "license": "mit", "size": 116475 }
[ "java.awt.Paint", "org.jfree.chart.event.PlotChangeEvent" ]
import java.awt.Paint; import org.jfree.chart.event.PlotChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
982,035
@Override protected void dispatchDraw(Canvas canvas) { super.dispatchDraw(canvas); // After draw child, we do the following things: // +1, Draw the center rectangle. // +2, Draw the shadows on the top and bottom. // drawCenterRect(canvas); // drawShadows(canvas); ...
void function(Canvas canvas) { super.dispatchDraw(canvas); }
/** * Called by draw to draw the child views. This may be overridden by derived classes to gain * control just before its children are drawn (but after its own view has been drawn). */
Called by draw to draw the child views. This may be overridden by derived classes to gain control just before its children are drawn (but after its own view has been drawn)
dispatchDraw
{ "repo_name": "liangchenhe55/konkeWatch", "path": "mobile/src/main/java/cc/chenhe/konke/watch/ui/wheel/WheelView.java", "license": "gpl-2.0", "size": 4854 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
816,147
private Object joinTransaction(EntityManager em) { boolean newTx = false; UserTransaction ut = null; if (isJTA) { try { em.joinTransaction(); } catch (TransactionRequiredException e) { ut = findUserTransaction(); try { if( ut != null && ut.getStatus(...
Object function(EntityManager em) { boolean newTx = false; UserTransaction ut = null; if (isJTA) { try { em.joinTransaction(); } catch (TransactionRequiredException e) { ut = findUserTransaction(); try { if( ut != null && ut.getStatus() == Status.STATUS_NO_TRANSACTION ) { ut.begin(); newTx = true; em.joinTransaction();...
/** * This method opens a new transaction, if none is currently running, and joins the entity manager/persistence context * to that transaction. * @param em The entity manager we're using. * @return {@link UserTransaction} If we've started a new transaction, then we return it so that it can be clo...
This method opens a new transaction, if none is currently running, and joins the entity manager/persistence context to that transaction
joinTransaction
{ "repo_name": "mrietveld/jbpm", "path": "jbpm-audit/src/main/java/org/jbpm/process/audit/JPAWorkingMemoryDbLogger.java", "license": "apache-2.0", "size": 12028 }
[ "javax.persistence.EntityManager", "javax.persistence.TransactionRequiredException", "javax.transaction.Status", "javax.transaction.UserTransaction" ]
import javax.persistence.EntityManager; import javax.persistence.TransactionRequiredException; import javax.transaction.Status; import javax.transaction.UserTransaction;
import javax.persistence.*; import javax.transaction.*;
[ "javax.persistence", "javax.transaction" ]
javax.persistence; javax.transaction;
501,408
private void initializeInternalCacheNames() { FileSystemConfiguration[] igfsCfgs = ctx.grid().configuration().getFileSystemConfiguration(); if (igfsCfgs != null) { for (FileSystemConfiguration igfsCfg : igfsCfgs) { internalCaches.add(igfsCfg.getMetaCacheConfiguration().g...
void function() { FileSystemConfiguration[] igfsCfgs = ctx.grid().configuration().getFileSystemConfiguration(); if (igfsCfgs != null) { for (FileSystemConfiguration igfsCfg : igfsCfgs) { internalCaches.add(igfsCfg.getMetaCacheConfiguration().getName()); internalCaches.add(igfsCfg.getDataCacheConfiguration().getName());...
/** * Initialize internal cache names */
Initialize internal cache names
initializeInternalCacheNames
{ "repo_name": "endian675/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java", "license": "apache-2.0", "size": 172471 }
[ "org.apache.ignite.configuration.FileSystemConfiguration", "org.apache.ignite.internal.IgniteComponentType" ]
import org.apache.ignite.configuration.FileSystemConfiguration; import org.apache.ignite.internal.IgniteComponentType;
import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
177,688
public Element addMarkerRect(double x1, double width) { return svgp.svgRect(x1, 0, width, plotheight); }
Element function(double x1, double width) { return svgp.svgRect(x1, 0, width, plotheight); }
/** * Create a rectangle as marker (Marker higher than plot!) * * @param x1 X-Value for the marker * @param width Width of an entry * @return SVG-Element svg-rectangle */
Create a rectangle as marker (Marker higher than plot!)
addMarkerRect
{ "repo_name": "elki-project/elki", "path": "addons/batikvis/src/main/java/elki/visualization/visualizers/optics/OPTICSPlotSelectionVisualization.java", "license": "agpl-3.0", "size": 11204 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,094,948
public LexicalHandler getLexicalHandler() { return lexhandler; }
LexicalHandler function() { return lexhandler; }
/** * Get a SAX2 {@link org.xml.sax.ext.LexicalHandler} for the output. * * @return A <code>LexicalHandler</code>, or null. */
Get a SAX2 <code>org.xml.sax.ext.LexicalHandler</code> for the output
getLexicalHandler
{ "repo_name": "AlexBrowneP/xerces-for-android", "path": "src/mf/javax/xml/transform/sax/SAXResult.java", "license": "apache-2.0", "size": 5363 }
[ "org.xml.sax.ext.LexicalHandler" ]
import org.xml.sax.ext.LexicalHandler;
import org.xml.sax.ext.*;
[ "org.xml.sax" ]
org.xml.sax;
2,705,439
private String executeScriptGetValueRequest(String openCpuSessionKey) throws IOException { URI scriptGetValueResponseUri = getScriptGetValueResponseUri(openCpuSessionKey); HttpGet httpGet = new HttpGet(scriptGetValueResponseUri); String responseValue; try (CloseableHttpResponse response = httpClient.execute...
String function(String openCpuSessionKey) throws IOException { URI scriptGetValueResponseUri = getScriptGetValueResponseUri(openCpuSessionKey); HttpGet httpGet = new HttpGet(scriptGetValueResponseUri); String responseValue; try (CloseableHttpResponse response = httpClient.execute(httpGet)) { int statusCode = response.g...
/** * Retrieve and return R script STDOUT response using OpenCPU * * @param openCpuSessionKey OpenCPU session key * @return R script STDOUT * @throws IOException if error occured during script response retrieval */
Retrieve and return R script STDOUT response using OpenCPU
executeScriptGetValueRequest
{ "repo_name": "ChaoPang/molgenis", "path": "molgenis-r/src/main/java/org/molgenis/r/RScriptExecutor.java", "license": "lgpl-3.0", "size": 7979 }
[ "java.io.IOException", "org.apache.http.HttpEntity", "org.apache.http.client.ClientProtocolException", "org.apache.http.client.methods.CloseableHttpResponse", "org.apache.http.client.methods.HttpGet", "org.apache.http.util.EntityUtils" ]
import java.io.IOException; import org.apache.http.HttpEntity; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.util.EntityUtils;
import java.io.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.util.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
483,873
public static synchronized void reload() throws IOException, MarshalException, ValidationException { init(); getInstance().update(); }
static synchronized void function() throws IOException, MarshalException, ValidationException { init(); getInstance().update(); }
/** * Reload the config from the default config file * * @exception java.io.IOException * Thrown if the specified config file cannot be read/loaded * @exception org.exolab.castor.xml.MarshalException * Thrown if the file does not conform to the schema. * ...
Reload the config from the default config file
reload
{ "repo_name": "tdefilip/opennms", "path": "integrations/opennms-map-provisioning-adapter/src/main/java/org/opennms/netmgt/config/MapsAdapterConfigFactory.java", "license": "agpl-3.0", "size": 8172 }
[ "java.io.IOException", "org.exolab.castor.xml.MarshalException", "org.exolab.castor.xml.ValidationException" ]
import java.io.IOException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException;
import java.io.*; import org.exolab.castor.xml.*;
[ "java.io", "org.exolab.castor" ]
java.io; org.exolab.castor;
1,385,157
public void logSummary( StepInterface si ) { log .logBasic( si.getStepname(), BaseMessages .getString( PKG, "Trans.Log.FinishedProcessing", String.valueOf( si.getLinesInput() ), String.valueOf( si .getLinesOutput() ), String.valueOf( si.getLine...
void function( StepInterface si ) { log .logBasic( si.getStepname(), BaseMessages .getString( PKG, STR, String.valueOf( si.getLinesInput() ), String.valueOf( si .getLinesOutput() ), String.valueOf( si.getLinesRead() ) ) + BaseMessages.getString( PKG, STR, String.valueOf( si.getLinesWritten() ), String.valueOf( si .getL...
/** * Logs a summary message for the specified step. * * @param si * the step interface */
Logs a summary message for the specified step
logSummary
{ "repo_name": "EcoleKeine/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 194675 }
[ "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.trans.step.StepInterface" ]
import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.trans.step.StepInterface;
import org.pentaho.di.i18n.*; import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,891,831
public ServiceFuture<DomainOwnershipIdentifierInner> createOrUpdateOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, final ServiceCallback<DomainOwnershipIdentifierInner> serviceCallback) { return ServiceFuture.fromRe...
ServiceFuture<DomainOwnershipIdentifierInner> function(String resourceGroupName, String domainName, String name, DomainOwnershipIdentifierInner domainOwnershipIdentifier, final ServiceCallback<DomainOwnershipIdentifierInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateOwnershipIdentifierWithServi...
/** * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. * Creates an ownership identifier for a domain or updates identifier details for an existing identifer. * * @param resourceGroupName Name of the resource group to which the resource belongs. ...
Creates an ownership identifier for a domain or updates identifier details for an existing identifer. Creates an ownership identifier for a domain or updates identifier details for an existing identifer
createOrUpdateOwnershipIdentifierAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DomainsInner.java", "license": "mit", "size": 139463 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,340,432
public long sleep(long time) { final long start = System.currentTimeMillis(); try { Thread.sleep(time); } catch (InterruptedException e) { this.commonCore.report(MessageType.EXCEPTION, "Sleep interrupted"); return time - (System.currentTimeMillis() - start...
long function(long time) { final long start = System.currentTimeMillis(); try { Thread.sleep(time); } catch (InterruptedException e) { this.commonCore.report(MessageType.EXCEPTION, STR); return time - (System.currentTimeMillis() - start); } return 0; }
/** * Puts the current thread to sleep for some time, without the need for any try/catch block. * * @param time The time to sleep. * @return A value of <code>0</code> if the sleep was successful, or else the amount * of milliseconds which we woke up too early. */
Puts the current thread to sleep for some time, without the need for any try/catch block
sleep
{ "repo_name": "ubicity-devs/jcores", "path": "src/main/java/net/jcores/jre/cores/commons/CommonSys.java", "license": "agpl-3.0", "size": 7828 }
[ "net.jcores.jre.options.MessageType" ]
import net.jcores.jre.options.MessageType;
import net.jcores.jre.options.*;
[ "net.jcores.jre" ]
net.jcores.jre;
1,806,231
protected void setupTest() throws IOException { UnderFileSystem ufs = UnderFileSystem.Factory.createForRoot(); String underfsAddress = Configuration.get(PropertyKey.MASTER_MOUNT_TABLE_ROOT_UFS); // Deletes the ufs dir for this test from to avoid permission problems UnderFileSystemUtils.deleteDirIfExi...
void function() throws IOException { UnderFileSystem ufs = UnderFileSystem.Factory.createForRoot(); String underfsAddress = Configuration.get(PropertyKey.MASTER_MOUNT_TABLE_ROOT_UFS); UnderFileSystemUtils.deleteDirIfExists(ufs, underfsAddress); UnderFileSystemUtils.mkdirIfNotExists(ufs, underfsAddress); int numLevel = ...
/** * Sets up corresponding directories for tests. */
Sets up corresponding directories for tests
setupTest
{ "repo_name": "aaudiber/alluxio", "path": "minicluster/src/main/java/alluxio/master/AbstractLocalAlluxioCluster.java", "license": "apache-2.0", "size": 9716 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,838,225
public static Map<String, String> getLatestPartSpec(Map<String, String> partSpec, String partCol) { Map<String, String> latestSpec = new HashMap<String, String>(); latestSpec.putAll(partSpec); latestSpec.put(partCol, LATEST_PARTITION_VALUE); return latestSpec; }
static Map<String, String> function(Map<String, String> partSpec, String partCol) { Map<String, String> latestSpec = new HashMap<String, String>(); latestSpec.putAll(partSpec); latestSpec.put(partCol, LATEST_PARTITION_VALUE); return latestSpec; }
/** * Get the partition spec for latest partition * * @param The * partition column for latest spec * * @return latest partition spec as Map from String to String */
Get the partition spec for latest partition
getLatestPartSpec
{ "repo_name": "rajubairishetti/lens", "path": "lens-cube/src/main/java/org/apache/lens/cube/metadata/StorageConstants.java", "license": "apache-2.0", "size": 2214 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,775,105
EAttribute getSayTeamMessage_UserTeam();
EAttribute getSayTeamMessage_UserTeam();
/** * Returns the meta object for the attribute '{@link MessagesModel.SayTeamMessage#getUserTeam <em>User Team</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>User Team</em>'. * @see MessagesModel.SayTeamMessage#getUserTeam() * @see #getSayTeamMessa...
Returns the meta object for the attribute '<code>MessagesModel.SayTeamMessage#getUserTeam User Team</code>'.
getSayTeamMessage_UserTeam
{ "repo_name": "Hu3bl/statsbot", "path": "statsbot-parent/statsbot-module.messages.model/src/main/java/MessagesModel/ModelPackage.java", "license": "mit", "size": 147130 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
773,151
List<ProjectionSeed> result = new ArrayList<ProjectionSeed>(); ExternalProjectionColumns ann = clazz.getAnnotation(ExternalProjectionColumns.class); if ((ann != null) && ClassDescriptor.isInRequiredGroup(requiredGroups, ann.groups())) { ExternalProjectionColumn[] pcs = ann.value(); if (StringUtils.isEmpt...
List<ProjectionSeed> result = new ArrayList<ProjectionSeed>(); ExternalProjectionColumns ann = clazz.getAnnotation(ExternalProjectionColumns.class); if ((ann != null) && ClassDescriptor.isInRequiredGroup(requiredGroups, ann.groups())) { ExternalProjectionColumn[] pcs = ann.value(); if (StringUtils.isEmpty(ann.fieldName...
/** * JAVADOC Method Level Comments * * @param clazz JAVADOC. * @return JAVADOC. */
JAVADOC Method Level Comments
getProjections
{ "repo_name": "cucina/opencucina", "path": "search/src/main/java/org/cucina/search/model/ProjectionSeed.java", "license": "apache-2.0", "size": 5297 }
[ "java.beans.PropertyDescriptor", "java.lang.reflect.Method", "java.util.ArrayList", "java.util.List", "org.apache.commons.beanutils.PropertyUtils", "org.apache.commons.lang3.StringUtils", "org.cucina.core.model.projection.ExternalProjectionColumn", "org.cucina.core.model.projection.ExternalProjectionC...
import java.beans.PropertyDescriptor; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.apache.commons.beanutils.PropertyUtils; import org.apache.commons.lang3.StringUtils; import org.cucina.core.model.projection.ExternalProjectionColumn; import org.cucina.core.model.project...
import java.beans.*; import java.lang.reflect.*; import java.util.*; import org.apache.commons.beanutils.*; import org.apache.commons.lang3.*; import org.cucina.core.model.projection.*; import org.cucina.core.utils.*;
[ "java.beans", "java.lang", "java.util", "org.apache.commons", "org.cucina.core" ]
java.beans; java.lang; java.util; org.apache.commons; org.cucina.core;
2,460,239
synchronized int getNumberOfFiles() throws DatabaseException { assert cachePopulated; return fileSummaryMap.size(); }
synchronized int getNumberOfFiles() throws DatabaseException { assert cachePopulated; return fileSummaryMap.size(); }
/** * Returns the number of files in the profile. */
Returns the number of files in the profile
getNumberOfFiles
{ "repo_name": "ckaestne/CIDE", "path": "CIDE_Samples/cide_samples/Berkeley DB JE/src/com/sleepycat/je/cleaner/UtilizationProfile.java", "license": "gpl-3.0", "size": 47270 }
[ "com.sleepycat.je.DatabaseException" ]
import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
1,466,419
protected JButton createDecreaseButton(int orientation) { if (orientation == NORTH) { this.decreaseButton = new JButton(new ImageIcon(getClass().getResource("up.png"))); } else { this.decreaseButton = new JButton(new ImageIcon(getClass().getResource("left.png")));...
JButton function(int orientation) { if (orientation == NORTH) { this.decreaseButton = new JButton(new ImageIcon(getClass().getResource(STR))); } else { this.decreaseButton = new JButton(new ImageIcon(getClass().getResource(STR))); } this.decreaseButton.setBorder(null); return this.decreaseButton; }
/** * Creates the decrease button of the scrollbar. * * @param orientation The button's orientation. * @return The created button. */
Creates the decrease button of the scrollbar
createDecreaseButton
{ "repo_name": "eric-lemesre/OpenConcerto", "path": "OpenConcerto/src/org/openconcerto/laf/IScrollBarUI.java", "license": "gpl-3.0", "size": 9544 }
[ "javax.swing.ImageIcon", "javax.swing.JButton" ]
import javax.swing.ImageIcon; import javax.swing.JButton;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,223,490
public static String eventTypeGet(Long eventID, Context context) { String events = WriteRead.read(ADVERSEINFOFILE, context); String eventType = ""; try { JSONArray jsonarray = new JSONArray(events); for (int i = 0; i < jsonarray.length(); i++) { JSONOb...
static String function(Long eventID, Context context) { String events = WriteRead.read(ADVERSEINFOFILE, context); String eventType = STRidSTRSTRnameSTRunsuccessful"); } return eventType; }
/** * reads event information from file saved on device * @param eventID * @param context * @return */
reads event information from file saved on device
eventTypeGet
{ "repo_name": "thandile/msf_communique", "path": "app/src/main/java/com/example/msf/msf/Utils/DataAdapter.java", "license": "mit", "size": 18193 }
[ "android.content.Context", "com.example.msf.msf.Utils" ]
import android.content.Context; import com.example.msf.msf.Utils;
import android.content.*; import com.example.msf.msf.*;
[ "android.content", "com.example.msf" ]
android.content; com.example.msf;
735,299
public int getNumberOfOutputParameters() { if (numberOfOutputValues == -1) { COSArray rangeValues = getRangeValues(); numberOfOutputValues = rangeValues.size() / 2; } return numberOfOutputValues; }
int function() { if (numberOfOutputValues == -1) { COSArray rangeValues = getRangeValues(); numberOfOutputValues = rangeValues.size() / 2; } return numberOfOutputValues; }
/** * This will get the number of output parameters that * have a range specified. A range for output parameters * is optional so this may return zero for a function * that does have output parameters, this will simply return the * number that have the range specified. * * @return Th...
This will get the number of output parameters that have a range specified. A range for output parameters is optional so this may return zero for a function that does have output parameters, this will simply return the number that have the range specified
getNumberOfOutputParameters
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/PDFunction.java", "license": "apache-2.0", "size": 10573 }
[ "org.apache.pdfbox.cos.COSArray" ]
import org.apache.pdfbox.cos.COSArray;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
133,625
EReference getHLAnnotation_Structure();
EReference getHLAnnotation_Structure();
/** * Returns the meta object for the containment reference '{@link fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLAnnotation#getStructure <em>Structure</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Structure</em>'. * @see fr.lip6.move...
Returns the meta object for the containment reference '<code>fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLAnnotation#getStructure Structure</code>'.
getHLAnnotation_Structure
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/HlcorestructurePackage.java", "license": "epl-1.0", "size": 178846 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
30,655
public EnumJvmMemoryGCVerboseLevel getJvmMemoryGCVerboseLevel() throws SnmpStatusException { if (ManagementFactory.getMemoryMXBean().isVerbose()) return JvmMemoryGCVerboseLevelVerbose; else return JvmMemoryGCVerboseLevelSilent; }
EnumJvmMemoryGCVerboseLevel function() throws SnmpStatusException { if (ManagementFactory.getMemoryMXBean().isVerbose()) return JvmMemoryGCVerboseLevelVerbose; else return JvmMemoryGCVerboseLevelSilent; }
/** * Getter for the "JvmMemoryGCVerboseLevel" variable. */
Getter for the "JvmMemoryGCVerboseLevel" variable
getJvmMemoryGCVerboseLevel
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmMemoryImpl.java", "license": "mit", "size": 13562 }
[ "com.sun.jmx.snmp.SnmpStatusException", "java.lang.management.ManagementFactory" ]
import com.sun.jmx.snmp.SnmpStatusException; import java.lang.management.ManagementFactory;
import com.sun.jmx.snmp.*; import java.lang.management.*;
[ "com.sun.jmx", "java.lang" ]
com.sun.jmx; java.lang;
1,662,686
GenericCriteria setLockMode(String alias, LockMode lockMode);
GenericCriteria setLockMode(String alias, LockMode lockMode);
/** * Set the lock mode of the aliased entity * * @param alias * The previously assigned alias representing the entity to which the given * lock mode should apply. * @param lockMode * The lock mode to be applied * @return this (for method chaining) */
Set the lock mode of the aliased entity
setLockMode
{ "repo_name": "openfurther/further-open-core", "path": "core/core-data/src/main/java/edu/utah/further/core/data/hibernate/adapter/GenericCriteria.java", "license": "apache-2.0", "size": 11573 }
[ "org.hibernate.LockMode" ]
import org.hibernate.LockMode;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
888,608
public void copyComponents(ArrayList<Component> source) { for (Component c : source) { components.add(c.copy()); } }
void function(ArrayList<Component> source) { for (Component c : source) { components.add(c.copy()); } }
/** * Copy the components from the source array into this class * * @param source */
Copy the components from the source array into this class
copyComponents
{ "repo_name": "rsahlin/graphics-by-opengl", "path": "graphics-by-opengl-j2se/src/main/java/com/nucleus/scene/ComponentNode.java", "license": "apache-2.0", "size": 5922 }
[ "com.nucleus.component.Component", "java.util.ArrayList" ]
import com.nucleus.component.Component; import java.util.ArrayList;
import com.nucleus.component.*; import java.util.*;
[ "com.nucleus.component", "java.util" ]
com.nucleus.component; java.util;
1,976,768
if (req == null) throw new NullPointerException("the request cannot be null"); // init the context try { RequestData.context.set(new Context(req)); } catch (C5CException e) { throw new RuntimeException("Couldn't initialize the context.", e); } String referer = req.getHeader("referer"); if(S...
if (req == null) throw new NullPointerException(STR); try { RequestData.context.set(new Context(req)); } catch (C5CException e) { throw new RuntimeException(STR, e); } String referer = req.getHeader(STR); if(StringUtils.isNullOrEmptyOrBlank(referer)) locale.set(req.getLocale()); try { URL url = new URL(referer); Map<St...
/** * Initializes the current request cycle. * * @param req * current user request instance */
Initializes the current request cycle
beginRequest
{ "repo_name": "th-schwarz/C5Connector.Java", "path": "src/main/java/codes/thischwa/c5c/requestcycle/RequestData.java", "license": "mpl-2.0", "size": 3231 }
[ "codes.thischwa.c5c.PropertiesLoader", "codes.thischwa.c5c.exception.C5CException", "codes.thischwa.c5c.util.StringUtils", "java.util.Locale", "java.util.Map" ]
import codes.thischwa.c5c.PropertiesLoader; import codes.thischwa.c5c.exception.C5CException; import codes.thischwa.c5c.util.StringUtils; import java.util.Locale; import java.util.Map;
import codes.thischwa.c5c.*; import codes.thischwa.c5c.exception.*; import codes.thischwa.c5c.util.*; import java.util.*;
[ "codes.thischwa.c5c", "java.util" ]
codes.thischwa.c5c; java.util;
2,663,024
public void invoke(String[] args, PrintStream out) { Shell<MessageCounter> stdioShell = this.init(args, null, out, false); }
void function(String[] args, PrintStream out) { Shell<MessageCounter> stdioShell = this.init(args, null, out, false); }
/** * Implements {@link EmulatorControllable#invoke(String[], PrintStream) * EmulatorControllableApplication#start}. */
Implements <code>EmulatorControllable#invoke(String[], PrintStream) EmulatorControllableApplication#start</code>
invoke
{ "repo_name": "shudo/overlayweaver", "path": "src/ow/tool/msgcounter/Main.java", "license": "apache-2.0", "size": 6030 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
2,765,092
private void prepareEmptySources(ReadFilter readFilter) throws IOException, InterruptedException { Iterator<StreamEventSource> iterator = emptySources.iterator(); while (iterator.hasNext()) { StreamEventSource source = iterator.next(); int len = source.prepare(readFilter); if (len != 0) { ...
void function(ReadFilter readFilter) throws IOException, InterruptedException { Iterator<StreamEventSource> iterator = emptySources.iterator(); while (iterator.hasNext()) { StreamEventSource source = iterator.next(); int len = source.prepare(readFilter); if (len != 0) { iterator.remove(); if (len > 0) { eventSources.en...
/** * For all sources that doesn't have any event buffered, try to read an event and put it in the priority queue * if event is available. */
For all sources that doesn't have any event buffered, try to read an event and put it in the priority queue if event is available
prepareEmptySources
{ "repo_name": "chtyim/cdap", "path": "cdap-data-fabric/src/main/java/co/cask/cdap/data/stream/MultiLiveStreamFileReader.java", "license": "apache-2.0", "size": 8312 }
[ "co.cask.cdap.data.file.ReadFilter", "java.io.IOException", "java.util.Iterator" ]
import co.cask.cdap.data.file.ReadFilter; import java.io.IOException; import java.util.Iterator;
import co.cask.cdap.data.file.*; import java.io.*; import java.util.*;
[ "co.cask.cdap", "java.io", "java.util" ]
co.cask.cdap; java.io; java.util;
2,868,584
public boolean dispatchMediaButtonEvent(KeyEvent keyEvent) { if (keyEvent == null) { throw new IllegalArgumentException("KeyEvent may not be null"); } return mImpl.dispatchMediaButtonEvent(keyEvent); }
boolean function(KeyEvent keyEvent) { if (keyEvent == null) { throw new IllegalArgumentException(STR); } return mImpl.dispatchMediaButtonEvent(keyEvent); }
/** * Sends the specified media button event to the session. Only media keys can * be sent by this method, other keys will be ignored. * * @param keyEvent The media button event to dispatch. * @return true if the event was sent to the session, false otherwise. */
Sends the specified media button event to the session. Only media keys can be sent by this method, other keys will be ignored
dispatchMediaButtonEvent
{ "repo_name": "AndroidX/androidx", "path": "media/media/src/main/java/android/support/v4/media/session/MediaControllerCompat.java", "license": "apache-2.0", "size": 97769 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
645,941
public boolean isStatic() { return Modifier.isStatic(this.modifier); }
boolean function() { return Modifier.isStatic(this.modifier); }
/** * Checks if method is static. * * @return true if method is static, false otherwise */
Checks if method is static
isStatic
{ "repo_name": "mschoettle/ecse429-fall15-project", "path": "ca.mcgill.sel.ram.gui/src/ca/mcgill/sel/ram/ui/views/structural/wrappers/MethodWrapper.java", "license": "gpl-2.0", "size": 2075 }
[ "java.lang.reflect.Modifier" ]
import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
823,025
@Override public NotificationHubCreateOrUpdateResponse createOrUpdate(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParameters parameters) throws IOException, ServiceException { // Validate if (resourceGroupName == null) { th...
NotificationHubCreateOrUpdateResponse function(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParameters parameters) throws IOException, ServiceException { if (resourceGroupName == null) { throw new NullPointerException(STR); } if (namespaceName == null) { throw...
/** * Creates a new NotificationHub in a namespace. (see * http://msdn.microsoft.com/en-us/library/windowsazure/jj856303.aspx for * more information) * * @param resourceGroupName Required. The name of the resource group. * @param namespaceName Required. The namespace name. * @param notifica...
Creates a new NotificationHub in a namespace. (see HREF for more information)
createOrUpdate
{ "repo_name": "flydream2046/azure-sdk-for-java", "path": "service-management/azure-svc-mgmt-notificationhubs/src/main/java/com/microsoft/azure/management/notificationhubs/NotificationHubOperationsImpl.java", "license": "apache-2.0", "size": 120338 }
[ "com.microsoft.azure.management.notificationhubs.models.NotificationHubCreateOrUpdateParameters", "com.microsoft.azure.management.notificationhubs.models.NotificationHubCreateOrUpdateResponse", "com.microsoft.windowsazure.exception.ServiceException", "com.microsoft.windowsazure.tracing.CloudTracing", "java....
import com.microsoft.azure.management.notificationhubs.models.NotificationHubCreateOrUpdateParameters; import com.microsoft.azure.management.notificationhubs.models.NotificationHubCreateOrUpdateResponse; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.CloudTracing...
import com.microsoft.azure.management.notificationhubs.models.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*;
[ "com.microsoft.azure", "com.microsoft.windowsazure", "java.io", "java.util" ]
com.microsoft.azure; com.microsoft.windowsazure; java.io; java.util;
2,140,043
public state_lkp getstate_lkp(long state_id) throws PortalException, SystemException { return state_lkpPersistence.findByPrimaryKey(state_id); }
state_lkp function(long state_id) throws PortalException, SystemException { return state_lkpPersistence.findByPrimaryKey(state_id); }
/** * Returns the state_lkp with the primary key. * * @param state_id the primary key of the state_lkp * @return the state_lkp * @throws PortalException if a state_lkp with the primary key could not be found * @throws SystemException if a system exception occurred */
Returns the state_lkp with the primary key
getstate_lkp
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/state_lkpLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 174889 }
[ "com.liferay.portal.kernel.exception.PortalException", "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
1,787,533
@Override public synchronized void receiveAck(int blockIndex) { rejoinLog.trace("Received block ack for index " + blockIndex); m_outstandingWorkCount.decrementAndGet(); SendWork work = m_outstandingWork.remove(blockIndex); // releases the BBContainers and cleans up if (...
synchronized void function(int blockIndex) { rejoinLog.trace(STR + blockIndex); m_outstandingWorkCount.decrementAndGet(); SendWork work = m_outstandingWork.remove(blockIndex); if (work != null) { work.discard(); } else { rejoinLog.warn(STR + blockIndex); } } public static class SnapshotSender implements Runnable { priv...
/** * Synchronized method to handle the arrival of an Ack. * @param blockIndex The index of the block that is being acked. */
Synchronized method to handle the arrival of an Ack
receiveAck
{ "repo_name": "simonzhangsm/voltdb", "path": "src/frontend/org/voltdb/rejoin/StreamSnapshotDataTarget.java", "license": "agpl-3.0", "size": 23610 }
[ "com.google_voltpatches.common.base.Preconditions", "java.util.Collections", "java.util.HashMap", "java.util.Map", "java.util.concurrent.LinkedBlockingQueue", "java.util.concurrent.atomic.AtomicInteger", "java.util.concurrent.atomic.AtomicLong", "org.voltcore.messaging.Mailbox" ]
import com.google_voltpatches.common.base.Preconditions; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import org.voltcore.messaging.Mailbox;
import com.google_voltpatches.common.base.*; import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.voltcore.messaging.*;
[ "com.google_voltpatches.common", "java.util", "org.voltcore.messaging" ]
com.google_voltpatches.common; java.util; org.voltcore.messaging;
390,629
@Test public void testUpdateUsingContentStringWithInvalidSite() throws Exception { // Setup mock object doThrow(ErrorManager.createError(StudioImplErrorCode.INVALID_SITE, "Unit test")).when(contentManagerMock) .write(Mockito.any(Context.class), Mockito.anyString(), Mockito.any(ItemId...
void function() throws Exception { doThrow(ErrorManager.createError(StudioImplErrorCode.INVALID_SITE, STR)).when(contentManagerMock) .write(Mockito.any(Context.class), Mockito.anyString(), Mockito.any(ItemId.class), Mockito.any(LockHandle.class), Mockito.any(InputStream.class)); when(securityServiceMock.validate(Mockit...
/** * Use case 35: * Test update method with string content using invalid site. * * @throws Exception */
Use case 35: Test update method with string content using invalid site
testUpdateUsingContentStringWithInvalidSite
{ "repo_name": "craftercms/studio3", "path": "impl/src/test/java/org/craftercms/studio/impl/content/AssetServiceImplTest.java", "license": "gpl-3.0", "size": 78760 }
[ "java.io.InputStream", "java.util.HashMap", "java.util.Map", "java.util.UUID", "org.apache.commons.lang.RandomStringUtils", "org.craftercms.studio.commons.dto.Context", "org.craftercms.studio.commons.dto.Item", "org.craftercms.studio.commons.dto.ItemId", "org.craftercms.studio.commons.dto.LockHandle...
import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.UUID; import org.apache.commons.lang.RandomStringUtils; import org.craftercms.studio.commons.dto.Context; import org.craftercms.studio.commons.dto.Item; import org.craftercms.studio.commons.dto.ItemId; import org.craftercms.stu...
import java.io.*; import java.util.*; import org.apache.commons.lang.*; import org.craftercms.studio.commons.dto.*; import org.craftercms.studio.commons.exception.*; import org.craftercms.studio.impl.exception.*; import org.junit.*; import org.mockito.*;
[ "java.io", "java.util", "org.apache.commons", "org.craftercms.studio", "org.junit", "org.mockito" ]
java.io; java.util; org.apache.commons; org.craftercms.studio; org.junit; org.mockito;
720,153
private void genMethodTypeSignature(IMethodBinding method) { genOptFormalTypeParameters(method.getTypeParameters()); sb.append('('); for (ITypeBinding param : method.getParameterTypes()) { genTypeSignature(param); } sb.append(')'); genReturnType(method.getReturnType()); ITypeBinding[...
void function(IMethodBinding method) { genOptFormalTypeParameters(method.getTypeParameters()); sb.append('('); for (ITypeBinding param : method.getParameterTypes()) { genTypeSignature(param); } sb.append(')'); genReturnType(method.getReturnType()); ITypeBinding[] exceptionTypes = method.getExceptionTypes(); boolean has...
/** * MethodTypeSignature ::= [FormalTypeParameters] * "(" {TypeSignature} ")" ReturnType {ThrowsSignature}. */
MethodTypeSignature ::= [FormalTypeParameters] "(" {TypeSignature} ")" ReturnType {ThrowsSignature}
genMethodTypeSignature
{ "repo_name": "halfhp/j2objc", "path": "translator/src/main/java/com/google/devtools/j2objc/gen/SignatureGenerator.java", "license": "apache-2.0", "size": 8767 }
[ "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.ITypeBinding" ]
import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,277,084
public String getAddColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon) { return "ALTER TABLE "+tablename+" ADD "+getFieldDefinition(v, tk, pk, use_autoinc, true, false); }
String function(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon) { return STR+tablename+STR+getFieldDefinition(v, tk, pk, use_autoinc, true, false); }
/** * Generates the SQL statement to add a column to the specified table * For this generic type, i set it to the most common possibility. * * @param tablename The table to add * @param v The column defined as a value * @param tk the name of the technical key field * @param use_autoinc whether or not thi...
Generates the SQL statement to add a column to the specified table For this generic type, i set it to the most common possibility
getAddColumnStatement
{ "repo_name": "yintaoxue/read-open-source-code", "path": "kettle4.3/src/org/pentaho/di/core/database/GenericDatabaseMeta.java", "license": "apache-2.0", "size": 7445 }
[ "org.pentaho.di.core.row.ValueMetaInterface" ]
import org.pentaho.di.core.row.ValueMetaInterface;
import org.pentaho.di.core.row.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,361,424
@Test void encodeAndExpectServiceException() { LdaptivePasswordEncoder encoder = new LdaptivePasswordEncoder("FOO", "BAR"); assertThrows(ServiceException.class, () -> encoder.encode("HelloWorld")); }
void encodeAndExpectServiceException() { LdaptivePasswordEncoder encoder = new LdaptivePasswordEncoder("FOO", "BAR"); assertThrows(ServiceException.class, () -> encoder.encode(STR)); }
/** * Encode and expect service exception. */
Encode and expect service exception
encodeAndExpectServiceException
{ "repo_name": "bremersee/common", "path": "common-base-ldaptive-security/src/test/java/org/bremersee/security/core/userdetails/LdaptivePasswordEncoderTest.java", "license": "apache-2.0", "size": 3956 }
[ "org.bremersee.exception.ServiceException", "org.junit.jupiter.api.Assertions" ]
import org.bremersee.exception.ServiceException; import org.junit.jupiter.api.Assertions;
import org.bremersee.exception.*; import org.junit.jupiter.api.*;
[ "org.bremersee.exception", "org.junit.jupiter" ]
org.bremersee.exception; org.junit.jupiter;
552,408
public void setResourcePattern(String resourcePattern) { Assert.notNull(resourcePattern, "'resourcePattern' must not be null"); this.resourcePattern = resourcePattern; }
void function(String resourcePattern) { Assert.notNull(resourcePattern, STR); this.resourcePattern = resourcePattern; }
/** * Set the resource pattern to use when scanning the classpath. * This value will be appended to each base package name. * @see #findTypesToRegister() * @see #DEFAULT_RESOURCE_PATTERN */
Set the resource pattern to use when scanning the classpath. This value will be appended to each base package name
setResourcePattern
{ "repo_name": "azureplus/spring-flex", "path": "spring-flex-core/src/main/java/org/springframework/flex/core/io/ClassPathScanningAmfConversionServiceConfigProcessor.java", "license": "apache-2.0", "size": 12251 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
1,088,319
public void onUpdatedChannels(List<ChannelData> channels) { model.updateChannels(channels); view.showChannelData(); }
void function(List<ChannelData> channels) { model.updateChannels(channels); view.showChannelData(); }
/** * Implemented as specified by the {@link Editor} interface. * @see Editor#onUpdatedChannels(List) */
Implemented as specified by the <code>Editor</code> interface
onUpdatedChannels
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorComponent.java", "license": "gpl-2.0", "size": 35936 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,642,754
@Override public void setHeaders(Stub stub, DfpUser user) throws ServiceException { try { if (user.getRegisteredAuthToken() == null) { user.setAuthToken(new AuthToken(user.getEmail(), user.getPassword()).getAuthToken()); } Class<?> clientLoginClass = Class.fo...
void function(Stub stub, DfpUser user) throws ServiceException { try { if (user.getRegisteredAuthToken() == null) { user.setAuthToken(new AuthToken(user.getEmail(), user.getPassword()).getAuthToken()); } Class<?> clientLoginClass = Class.forName(packagePrefix + this.toString() + "." + STR); Class<?> authenticationClass...
/** * See {@link DfpVersion#setHeaders(Stub, DfpUser)}. */
See <code>DfpVersion#setHeaders(Stub, DfpUser)</code>
setHeaders
{ "repo_name": "google-code-export/google-api-dfp-java", "path": "src/com/google/api/ads/dfp/lib/DfpVersion.java", "license": "apache-2.0", "size": 26030 }
[ "java.lang.reflect.InvocationTargetException", "javax.xml.rpc.ServiceException", "org.apache.axis.client.Stub" ]
import java.lang.reflect.InvocationTargetException; import javax.xml.rpc.ServiceException; import org.apache.axis.client.Stub;
import java.lang.reflect.*; import javax.xml.rpc.*; import org.apache.axis.client.*;
[ "java.lang", "javax.xml", "org.apache.axis" ]
java.lang; javax.xml; org.apache.axis;
1,212,073
MkdirsOptions options = MkdirsOptions.defaults(); // Verify the default createParent is true. assertTrue(options.getCreateParent()); // Verify that the owner and group are not set. assertEquals("", options.getOwner()); assertEquals("", options.getGroup()); assertEquals(Mode.defaults().applyDire...
MkdirsOptions options = MkdirsOptions.defaults(); assertTrue(options.getCreateParent()); assertEquals(STR", options.getGroup()); assertEquals(Mode.defaults().applyDirectoryUMask(), options.getMode()); }
/** * Tests for default {@link MkdirsOptions}. */
Tests for default <code>MkdirsOptions</code>
defaults
{ "repo_name": "riversand963/alluxio", "path": "core/common/src/test/java/alluxio/underfs/options/MkdirsOptionsTest.java", "license": "apache-2.0", "size": 3299 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,912,262
public static Label findLabel(Container cont, ComponentChooser chooser) { return findLabel(cont, chooser, 0); }
static Label function(Container cont, ComponentChooser chooser) { return findLabel(cont, chooser, 0); }
/** * Searches Label in container. * * @param cont Container to search component in. * @param chooser a component chooser specifying searching criteria. * @return Label instance or null if component was not found. */
Searches Label in container
findLabel
{ "repo_name": "md-5/jdk10", "path": "test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/LabelOperator.java", "license": "gpl-2.0", "size": 12364 }
[ "java.awt.Container", "java.awt.Label", "org.netbeans.jemmy.ComponentChooser" ]
import java.awt.Container; import java.awt.Label; import org.netbeans.jemmy.ComponentChooser;
import java.awt.*; import org.netbeans.jemmy.*;
[ "java.awt", "org.netbeans.jemmy" ]
java.awt; org.netbeans.jemmy;
2,382,500
@Override public Enumeration<String> getHeaderNames() { return coyoteRequest.getMimeHeaders().names(); }
Enumeration<String> function() { return coyoteRequest.getMimeHeaders().names(); }
/** * Return the names of all headers received with this request. */
Return the names of all headers received with this request
getHeaderNames
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/connector/Request.java", "license": "apache-2.0", "size": 101815 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,193,541
public static void createBlockPath(String path) throws IOException { try { createStorageDirPath(PathUtils.getParent(path)); } catch (InvalidPathException e) { throw new IOException("Failed to create block path, get parent path of " + path + "failed", e); } catch (IOException e) { ...
static void function(String path) throws IOException { try { createStorageDirPath(PathUtils.getParent(path)); } catch (InvalidPathException e) { throw new IOException(STR + path + STR, e); } catch (IOException e) { throw new IOException(STR + path, e); } }
/** * Creates the local block path and all the parent directories. Also, sets the appropriate * permissions. * * @param path the path of the block * @throws IOException when fails to create block path and parent directories with appropriate * permissions. */
Creates the local block path and all the parent directories. Also, sets the appropriate permissions
createBlockPath
{ "repo_name": "bit-zyl/Alluxio-Nvdimm", "path": "core/common/src/main/java/alluxio/util/io/FileUtils.java", "license": "apache-2.0", "size": 10994 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
315,974
public void addItems(Collection<Long> items) { this.items.addAll(items); }
void function(Collection<Long> items) { this.items.addAll(items); }
/** * Adds all items of a given collection to this inventory. * * @param items */
Adds all items of a given collection to this inventory
addItems
{ "repo_name": "kosmonet/neon", "path": "src/neon/common/entity/components/Inventory.java", "license": "gpl-3.0", "size": 2683 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,200,953
EClass getTransitionRoot();
EClass getTransitionRoot();
/** * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.TransitionRoot <em>Transition Root</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Transition Root</em>'. * @see org.yakindu.sct.model.stext.stext.TransitionRoot * @generated ...
Returns the meta object for class '<code>org.yakindu.sct.model.stext.stext.TransitionRoot Transition Root</code>'.
getTransitionRoot
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextPackage.java", "license": "epl-1.0", "size": 92325 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,525,132
public static synchronized DefaultBandwidthMeter getSingletonInstance(Context context) { if (singletonInstance == null) { singletonInstance = new DefaultBandwidthMeter.Builder(context).build(); } return singletonInstance; } private static final int ELAPSED_MILLIS_FOR_ESTIMATE = 2000; private ...
static synchronized DefaultBandwidthMeter function(Context context) { if (singletonInstance == null) { singletonInstance = new DefaultBandwidthMeter.Builder(context).build(); } return singletonInstance; } private static final int ELAPSED_MILLIS_FOR_ESTIMATE = 2000; private static final int BYTES_TRANSFERRED_FOR_ESTIMAT...
/** * Returns a singleton instance of a {@link DefaultBandwidthMeter} with default configuration. * * @param context A {@link Context}. * @return The singleton instance. */
Returns a singleton instance of a <code>DefaultBandwidthMeter</code> with default configuration
getSingletonInstance
{ "repo_name": "tkpb/Telegram", "path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java", "license": "gpl-2.0", "size": 33738 }
[ "android.content.Context", "android.util.SparseArray", "androidx.annotation.Nullable", "com.google.android.exoplayer2.util.Clock", "com.google.android.exoplayer2.util.EventDispatcher", "com.google.android.exoplayer2.util.SlidingPercentile", "com.google.android.exoplayer2.util.Util" ]
import android.content.Context; import android.util.SparseArray; import androidx.annotation.Nullable; import com.google.android.exoplayer2.util.Clock; import com.google.android.exoplayer2.util.EventDispatcher; import com.google.android.exoplayer2.util.SlidingPercentile; import com.google.android.exoplayer2.util.Util;
import android.content.*; import android.util.*; import androidx.annotation.*; import com.google.android.exoplayer2.util.*;
[ "android.content", "android.util", "androidx.annotation", "com.google.android" ]
android.content; android.util; androidx.annotation; com.google.android;
808,862
private DataLakeAnalyticsUsqlActivityTypeProperties innerTypeProperties() { return this.innerTypeProperties; }
DataLakeAnalyticsUsqlActivityTypeProperties function() { return this.innerTypeProperties; }
/** * Get the innerTypeProperties property: Data Lake Analytics U-SQL activity properties. * * @return the innerTypeProperties value. */
Get the innerTypeProperties property: Data Lake Analytics U-SQL activity properties
innerTypeProperties
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/DataLakeAnalyticsUsqlActivity.java", "license": "mit", "size": 10435 }
[ "com.azure.resourcemanager.datafactory.fluent.models.DataLakeAnalyticsUsqlActivityTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.DataLakeAnalyticsUsqlActivityTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,068,300
@Override protected void initialize() { super.initialize(); m_Containers = new ArrayList<>(); }
void function() { super.initialize(); m_Containers = new ArrayList<>(); }
/** * Initializes the members. */
Initializes the members
initialize
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-weka/src/main/java/weka/classifiers/MultiLevelSplitGenerator.java", "license": "gpl-3.0", "size": 14525 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,901,414
@FIXVersion(introduced="5.0SP1") public ApplicationSequenceControl getApplicationSequenceControl() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced=STR) ApplicationSequenceControl function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Message field getter. * @return field value */
Message field getter
getApplicationSequenceControl
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/DerivativeSecurityListMsg.java", "license": "gpl-3.0", "size": 23172 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.comp.ApplicationSequenceControl" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.comp.ApplicationSequenceControl;
import net.hades.fix.message.anno.*; import net.hades.fix.message.comp.*;
[ "net.hades.fix" ]
net.hades.fix;
1,604,096
@Nonnull public static <T> BooleanExpression neq(final SelectListItem<T> col, @Nullable final T value) { return new Not( new ColumnEquals<T>( col, value)); }
static <T> BooleanExpression function(final SelectListItem<T> col, @Nullable final T value) { return new Not( new ColumnEquals<T>( col, value)); }
/** * This method creates a condition filtering only those rows whose value in column col does not equal the parameter value. */
This method creates a condition filtering only those rows whose value in column col does not equal the parameter value
neq
{ "repo_name": "freiheit-com/sqlapi4j", "path": "core/src/main/java/com/freiheit/sqlapi4j/query/Sql.java", "license": "apache-2.0", "size": 26009 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,532,664
public void printStats( int seconds ) { log.logBasic( " " ); if ( steps == null ) { return; } for ( int i = 0; i < steps.size(); i++ ) { StepMetaDataCombi sid = steps.get( i ); StepInterface step = sid.step; long proc = step.getProcessed(); if ( seconds != 0 ) { ...
void function( int seconds ) { log.logBasic( " " ); if ( steps == null ) { return; } for ( int i = 0; i < steps.size(); i++ ) { StepMetaDataCombi sid = steps.get( i ); StepInterface step = sid.step; long proc = step.getProcessed(); if ( seconds != 0 ) { if ( step.getErrors() == 0 ) { log .logBasic( BaseMessages .getStr...
/** * Logs the execution statistics for the transformation for the specified time interval. If the total length of * execution is supplied as the interval, then the statistics represent the average throughput (lines * read/written/updated/rejected/etc. per second) for the entire execution. * * @param sec...
Logs the execution statistics for the transformation for the specified time interval. If the total length of execution is supplied as the interval, then the statistics represent the average throughput (lines read/written/updated/rejected/etc. per second) for the entire execution
printStats
{ "repo_name": "EcoleKeine/pentaho-kettle", "path": "engine/src/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 194675 }
[ "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.trans.step.StepInterface", "org.pentaho.di.trans.step.StepMetaDataCombi" ]
import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.trans.step.StepInterface; import org.pentaho.di.trans.step.StepMetaDataCombi;
import org.pentaho.di.i18n.*; import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,891,837
@Override public int bind(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException { TypedValue typedValue = qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typed...
int function(PreparedStatement statement, QueryParameters qp, SessionImplementor session, int position) throws SQLException { TypedValue typedValue = qp.getNamedParameters().get( name ); typedValue.getType().nullSafeSet( statement, typedValue.getValue(), position, session ); return typedValue.getType().getColumnSpan( s...
/** * Bind the appropriate value into the given statement at the specified position. * * @param statement The statement into which the value should be bound. * @param qp The defined values for the current query execution. * @param session The session against which the current execution is occuring. * @param...
Bind the appropriate value into the given statement at the specified position
bind
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/param/NamedParameterSpecification.java", "license": "lgpl-2.1", "size": 2984 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "org.hibernate.engine.spi.QueryParameters", "org.hibernate.engine.spi.SessionImplementor", "org.hibernate.engine.spi.TypedValue" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import org.hibernate.engine.spi.QueryParameters; import org.hibernate.engine.spi.SessionImplementor; import org.hibernate.engine.spi.TypedValue;
import java.sql.*; import org.hibernate.engine.spi.*;
[ "java.sql", "org.hibernate.engine" ]
java.sql; org.hibernate.engine;
640,964
public XMLSignatureInput resolve(Attr uri, String baseURI, boolean secureValidation) throws ResourceResolverException { ResourceResolverContext context = new ResourceResolverContext(uri, baseURI, secureValidation); return resolverSpi.engineResolveURI(context); }
XMLSignatureInput function(Attr uri, String baseURI, boolean secureValidation) throws ResourceResolverException { ResourceResolverContext context = new ResourceResolverContext(uri, baseURI, secureValidation); return resolverSpi.engineResolveURI(context); }
/** * Method resolve * * @param uri * @param baseURI * @return the resource * * @throws ResourceResolverException */
Method resolve
resolve
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java", "license": "apache-2.0", "size": 13904 }
[ "com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput", "org.w3c.dom.Attr" ]
import com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput; import org.w3c.dom.Attr;
import com.sun.org.apache.xml.internal.security.signature.*; import org.w3c.dom.*;
[ "com.sun.org", "org.w3c.dom" ]
com.sun.org; org.w3c.dom;
2,807,941
public static void toFile(String fileName, String txt) throws IOException { PrintWriter pw = new PrintWriter(new FileWriter(fileName)); pw.print(txt); pw.close(); }
static void function(String fileName, String txt) throws IOException { PrintWriter pw = new PrintWriter(new FileWriter(fileName)); pw.print(txt); pw.close(); }
/** * Write string to file * @param fileName file name * @param txt string to write to file * @throws IOException */
Write string to file
toFile
{ "repo_name": "RomanHargrave/jsigner", "path": "jsigner-modsl-core/src/main/java/org/modsl/core/util/Utils.java", "license": "apache-2.0", "size": 2779 }
[ "java.io.FileWriter", "java.io.IOException", "java.io.PrintWriter" ]
import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,580,726
ActivityCheck popupScreen(PopupActivity popup);
ActivityCheck popupScreen(PopupActivity popup);
/** * Creates a brand new instance for checking actions over {@link PopupActivity} instances. */
Creates a brand new instance for checking actions over <code>PopupActivity</code> instances
popupScreen
{ "repo_name": "karreiro/uberfire", "path": "uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/authz/WorkbenchController.java", "license": "apache-2.0", "size": 4002 }
[ "org.uberfire.client.mvp.PopupActivity" ]
import org.uberfire.client.mvp.PopupActivity;
import org.uberfire.client.mvp.*;
[ "org.uberfire.client" ]
org.uberfire.client;
1,946,317
public static final <T extends Comparable<? super T>> int compare(final List<T> left, final List<T> right) { if (left == null && right == null) { return 0; } else if (left == null) { return -1; } else if (right == null) { return 1; } else { int l = left.size(); int r = right.size(); if (l ...
static final <T extends Comparable<? super T>> int function(final List<T> left, final List<T> right) { if (left == null && right == null) { return 0; } else if (left == null) { return -1; } else if (right == null) { return 1; } else { int l = left.size(); int r = right.size(); if (l != r) { return l - r; } for (int i =...
/** * Compares two lists -- account for <code>null</code>. The lists must * contain comparable objects. * * @param left * The left list to compare; may be <code>null</code>. This * list must only contain instances of <code>Comparable</code>. * @param right * The right li...
Compares two lists -- account for <code>null</code>. The lists must contain comparable objects
compare
{ "repo_name": "ControlSystemStudio/org.csstudio.iter", "path": "plugins/org.eclipse.jface/src/org/eclipse/jface/util/Util.java", "license": "epl-1.0", "size": 17775 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,825,602
private static void writeSchemaColumns(TupleMetadata schema, BaseWriter.MapWriter fieldWriter, boolean allTextMode) { for (ColumnMetadata columnMetadata : schema) { writeSingleOrArrayColumn(columnMetadata, fieldWriter, allTextMode); } }
static void function(TupleMetadata schema, BaseWriter.MapWriter fieldWriter, boolean allTextMode) { for (ColumnMetadata columnMetadata : schema) { writeSingleOrArrayColumn(columnMetadata, fieldWriter, allTextMode); } }
/** * Creates writers for all columns taken from {@code TupleMetadata schema}. * * @param schema table or map schema * @param fieldWriter parent writer for writers to create * @param allTextMode whether all primitive writers should be of varchar type */
Creates writers for all columns taken from TupleMetadata schema
writeSchemaColumns
{ "repo_name": "Ben-Zvi/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReaderUtils.java", "license": "apache-2.0", "size": 10066 }
[ "org.apache.drill.exec.record.metadata.ColumnMetadata", "org.apache.drill.exec.record.metadata.TupleMetadata", "org.apache.drill.exec.vector.complex.writer.BaseWriter" ]
import org.apache.drill.exec.record.metadata.ColumnMetadata; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.apache.drill.exec.vector.complex.writer.BaseWriter;
import org.apache.drill.exec.record.metadata.*; import org.apache.drill.exec.vector.complex.writer.*;
[ "org.apache.drill" ]
org.apache.drill;
1,609,654
void removeContainerPortMapping( Host host, Protocol protocol, String containerIp, int containerPort, int rhPort ) throws NetworkManagerException;
void removeContainerPortMapping( Host host, Protocol protocol, String containerIp, int containerPort, int rhPort ) throws NetworkManagerException;
/** * Removes specified container port mapping * * @param host RH host * @param protocol protocol * @param containerIp ip of container * @param containerPort container port * @param rhPort RH port */
Removes specified container port mapping
removeContainerPortMapping
{ "repo_name": "subutai-io/Subutai", "path": "management/server/core/network-manager/network-manager-api/src/main/java/io/subutai/core/network/api/NetworkManager.java", "license": "apache-2.0", "size": 5792 }
[ "io.subutai.common.peer.Host", "io.subutai.common.protocol.Protocol" ]
import io.subutai.common.peer.Host; import io.subutai.common.protocol.Protocol;
import io.subutai.common.peer.*; import io.subutai.common.protocol.*;
[ "io.subutai.common" ]
io.subutai.common;
2,262,769
private static void addPreviousLayer(List<List<SpikingNeuron>> layers, List<SpikingNeuron> sourceLayer, List<SpikingNeuron> layerToCheck) { // Stop adding layers when the number of layers exceeds this. Here // to prevent infinite recursions that result when invalid networks // a...
static void function(List<List<SpikingNeuron>> layers, List<SpikingNeuron> sourceLayer, List<SpikingNeuron> layerToCheck) { final int MAXLAYERS = 100; Set<SpikingNeuron> newLayerTemp = new HashSet<SpikingNeuron>(); boolean theNextLayerIsTheSourceLayer = false; for (SpikingNeuron neuron : layerToCheck) { for (SpikingSyn...
/** * Helper method for getIntermedateLayers. Add the "next layer down" in the * hierarchy. * * @param layers the current set of layers * @param sourceLayer the source layer * @param layerToCheck the current layer. Look for previous layers and if * one is found add it to th...
Helper method for getIntermedateLayers. Add the "next layer down" in the hierarchy
addPreviousLayer
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/neural/spiking/util/SimnetUtils.java", "license": "agpl-3.0", "size": 11862 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,485,342
public InetSocketAddress localControl() { return localControl; } private UdpChannel(final Context context) { this.remoteData = context.remoteData; this.localData = context.localData; this.remoteControl = context.remoteControl; this.localControl = context.loca...
InetSocketAddress function() { return localControl; } private UdpChannel(final Context context) { this.remoteData = context.remoteData; this.localData = context.localData; this.remoteControl = context.remoteControl; this.localControl = context.localControl; this.uriStr = context.uriStr; this.canonicalForm = context.can...
/** * Local control address information * * @return local control address information */
Local control address information
localControl
{ "repo_name": "qed-/Aeron", "path": "aeron-driver/src/main/java/uk/co/real_logic/aeron/driver/UdpChannel.java", "license": "apache-2.0", "size": 15984 }
[ "java.net.InetSocketAddress" ]
import java.net.InetSocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,820,829
@Nonnull public Fido2AuthenticationMethodRequestBuilder fido2Methods(@Nonnull final String id) { return new Fido2AuthenticationMethodRequestBuilder(getRequestUrlWithAdditionalSegment("fido2Methods") + "/" + id, getClient(), null); }
Fido2AuthenticationMethodRequestBuilder function(@Nonnull final String id) { return new Fido2AuthenticationMethodRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); }
/** * Gets a request builder for the Fido2AuthenticationMethod item * * @return the request builder * @param id the item identifier */
Gets a request builder for the Fido2AuthenticationMethod item
fido2Methods
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/AuthenticationRequestBuilder.java", "license": "mit", "size": 6575 }
[ "com.microsoft.graph.requests.Fido2AuthenticationMethodRequestBuilder", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.Fido2AuthenticationMethodRequestBuilder; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,183,719
public SubnetInner withResourceNavigationLinks(List<ResourceNavigationLinkInner> resourceNavigationLinks) { this.resourceNavigationLinks = resourceNavigationLinks; return this; }
SubnetInner function(List<ResourceNavigationLinkInner> resourceNavigationLinks) { this.resourceNavigationLinks = resourceNavigationLinks; return this; }
/** * Set the resourceNavigationLinks value. * * @param resourceNavigationLinks the resourceNavigationLinks value to set * @return the SubnetInner object itself. */
Set the resourceNavigationLinks value
withResourceNavigationLinks
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java", "license": "mit", "size": 5694 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,435,425
public List<ByteBuf> decompose(int offset, int length) { checkIndex(offset, length); if (length == 0) { return Collections.emptyList(); } int componentId = toComponentIndex(offset); List<ByteBuf> slice = new ArrayList<ByteBuf>(components.size()); // The ...
List<ByteBuf> function(int offset, int length) { checkIndex(offset, length); if (length == 0) { return Collections.emptyList(); } int componentId = toComponentIndex(offset); List<ByteBuf> slice = new ArrayList<ByteBuf>(components.size()); Component firstC = components.get(componentId); ByteBuf first = firstC.buf.duplic...
/** * Same with {@link #slice(int, int)} except that this method returns a list. */
Same with <code>#slice(int, int)</code> except that this method returns a list
decompose
{ "repo_name": "kaustubh-walokar/grpc-poll-service", "path": "lib/netty/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java", "license": "bsd-3-clause", "size": 51801 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
524,364
public static void writeChartAsJPEG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException { if (chart == null) { throw new IllegalArgumentException("Null 'chart' argument."); } BufferedImage image = ...
static void function(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException { if (chart == null) { throw new IllegalArgumentException(STR); } BufferedImage image = chart.createBufferedImage(width, height, BufferedImage.TYPE_INT_RGB, info); EncoderUtil.writeBufferedImage(i...
/** * Writes a chart to an output stream in JPEG format. This method allows * you to pass in a {@link ChartRenderingInfo} object, to collect * information about the chart dimensions/entities. You will need this * info if you want to create an HTML image map. * * @param out the outp...
Writes a chart to an output stream in JPEG format. This method allows you to pass in a <code>ChartRenderingInfo</code> object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map
writeChartAsJPEG
{ "repo_name": "linuxuser586/jfreechart", "path": "source/org/jfree/chart/ChartUtilities.java", "license": "lgpl-2.1", "size": 30510 }
[ "java.awt.image.BufferedImage", "java.io.IOException", "java.io.OutputStream", "org.jfree.chart.encoders.EncoderUtil", "org.jfree.chart.encoders.ImageFormat" ]
import java.awt.image.BufferedImage; import java.io.IOException; import java.io.OutputStream; import org.jfree.chart.encoders.EncoderUtil; import org.jfree.chart.encoders.ImageFormat;
import java.awt.image.*; import java.io.*; import org.jfree.chart.encoders.*;
[ "java.awt", "java.io", "org.jfree.chart" ]
java.awt; java.io; org.jfree.chart;
548,845
public boolean isResourcePresent(LocalizedResource rsrc) { boolean ret = true; if (rsrc.getState() == ResourceState.LOCALIZED) { File file = new File(rsrc.getLocalPath().toUri().getRawPath(). toString()); if (!file.exists()) { ret = false; } } return ret; }
boolean function(LocalizedResource rsrc) { boolean ret = true; if (rsrc.getState() == ResourceState.LOCALIZED) { File file = new File(rsrc.getLocalPath().toUri().getRawPath(). toString()); if (!file.exists()) { ret = false; } } return ret; }
/** * This module checks if the resource which was localized is already present * or not * * @param rsrc * @return true/false based on resource is present or not */
This module checks if the resource which was localized is already present or not
isResourcePresent
{ "repo_name": "JuntaoZhang/myhadoop-2.2.0", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/LocalResourcesTrackerImpl.java", "license": "apache-2.0", "size": 11483 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,987,102
public Class<?>[] findSignatureClasses(String signature[], ClassLoader loader) throws ReflectionException { if (signature == null) return null; final ClassLoader aLoader = loader; final int length= signature.length; final Class<?> t...
Class<?>[] function(String signature[], ClassLoader loader) throws ReflectionException { if (signature == null) return null; final ClassLoader aLoader = loader; final int length= signature.length; final Class<?> tab[]=new Class<?>[length]; if (length == 0) return tab; try { for (int i= 0; i < length; i++) { final Class...
/** * Return an array of Class corresponding to the given signature, using * the specified class loader. */
Return an array of Class corresponding to the given signature, using the specified class loader
findSignatureClasses
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/jmx/mbeanserver/MBeanInstantiator.java", "license": "apache-2.0", "size": 27711 }
[ "java.util.logging.Level", "javax.management.ReflectionException" ]
import java.util.logging.Level; import javax.management.ReflectionException;
import java.util.logging.*; import javax.management.*;
[ "java.util", "javax.management" ]
java.util; javax.management;
1,051,315
public void init(ServiceOperatorRepository serviceOperatorRepository, EncoderRepository encoderRepository) { this.serviceOperatorRepository = Objects.requireNonNull(serviceOperatorRepository); this.encoderRepository = Objects.requireNonNull(encoderRepository); generateProcedur...
void function(ServiceOperatorRepository serviceOperatorRepository, EncoderRepository encoderRepository) { this.serviceOperatorRepository = Objects.requireNonNull(serviceOperatorRepository); this.encoderRepository = Objects.requireNonNull(encoderRepository); generateProcedureDescriptionFormatMaps(); }
/** * This class does not implement {@link Constructable} due to some circular dependencies that can lead to an * incorrect initialization order; instead {@link ProcedureDescriptionFormatRepositoryInitializer} does this for us. * * @param serviceOperatorRepository the service operator respository ...
This class does not implement <code>Constructable</code> due to some circular dependencies that can lead to an incorrect initialization order; instead <code>ProcedureDescriptionFormatRepositoryInitializer</code> does this for us
init
{ "repo_name": "autermann/SOS", "path": "core/api/src/main/java/org/n52/sos/coding/encode/ProcedureDescriptionFormatRepository.java", "license": "gpl-2.0", "size": 11208 }
[ "java.util.Objects", "org.n52.iceland.service.operator.ServiceOperatorRepository", "org.n52.svalbard.encode.EncoderRepository" ]
import java.util.Objects; import org.n52.iceland.service.operator.ServiceOperatorRepository; import org.n52.svalbard.encode.EncoderRepository;
import java.util.*; import org.n52.iceland.service.operator.*; import org.n52.svalbard.encode.*;
[ "java.util", "org.n52.iceland", "org.n52.svalbard" ]
java.util; org.n52.iceland; org.n52.svalbard;
128,417
public NestedSet<Artifact> getRootMergeZips() { return rootMergeZips; }
NestedSet<Artifact> function() { return rootMergeZips; }
/** * Returns all zip files whose contents should be merged into final ipa and outside the * main bundle. For instance, if a merge zip contains files dir1/file1, then the resulting * bundling would have additional files at: * <ul> * <li>dir1/file1 * <li>{bundleDir}/other_files * </ul> */
Returns all zip files whose contents should be merged into final ipa and outside the main bundle. For instance, if a merge zip contains files dir1/file1, then the resulting bundling would have additional files at: dir1/file1 {bundleDir}/other_files
getRootMergeZips
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/objc/Bundling.java", "license": "apache-2.0", "size": 25418 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
281,060
public static boolean hasTokenInformation(Bundle bundle) { if (bundle == null) { return false; } String token = bundle.getString(TOKEN_KEY); if ((token == null) || (token.length() == 0)) { return false; } long expiresMilliseconds = bundle.get...
static boolean function(Bundle bundle) { if (bundle == null) { return false; } String token = bundle.getString(TOKEN_KEY); if ((token == null) (token.length() == 0)) { return false; } long expiresMilliseconds = bundle.getLong(EXPIRATION_DATE_KEY, 0L); if (expiresMilliseconds == 0L) { return false; } return true; }
/** * Returns a boolean indicating whether a Bundle contains properties that * could be a valid saved token. * * @param bundle * A Bundle to check for token information. * @return a boolean indicating whether a Bundle contains properties that * could be a valid save...
Returns a boolean indicating whether a Bundle contains properties that could be a valid saved token
hasTokenInformation
{ "repo_name": "greenhalolabs/facebooklogin", "path": "facebooklogin/src/main/java/com/greenhalolabs/facebooklogin/TokenCachingStrategy.java", "license": "mit", "size": 11864 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
71,522
public boolean isCurrentlyPaused() { return isPlaying() && ((PlaybackPreferences.getCurrentPlayerStatus() == PlaybackPreferences.PLAYER_STATUS_PAUSED)); }
boolean function() { return isPlaying() && ((PlaybackPreferences.getCurrentPlayerStatus() == PlaybackPreferences.PLAYER_STATUS_PAUSED)); }
/** * Reads playback preferences to determine whether this FeedMedia object is * currently being played and the current player status is paused. */
Reads playback preferences to determine whether this FeedMedia object is currently being played and the current player status is paused
isCurrentlyPaused
{ "repo_name": "jimulabs/AntennaPod-mirror", "path": "core/src/main/java/de/danoeh/antennapod/core/feed/FeedMedia.java", "license": "mit", "size": 13015 }
[ "de.danoeh.antennapod.core.preferences.PlaybackPreferences" ]
import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
import de.danoeh.antennapod.core.preferences.*;
[ "de.danoeh.antennapod" ]
de.danoeh.antennapod;
993,669
protected void setPermission(FsPermission permission) { this.permission = (permission == null) ? FsPermission.getFileDefault() : permission; }
void function(FsPermission permission) { this.permission = (permission == null) ? FsPermission.getFileDefault() : permission; }
/** * Sets permission. * @param permission if permission is null, default value is set */
Sets permission
setPermission
{ "repo_name": "odpi/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java", "license": "apache-2.0", "size": 11757 }
[ "org.apache.hadoop.fs.permission.FsPermission" ]
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.fs.permission.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,750,439
public Boolean getUsesNativeSQL() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesNativeSQL()); }
Boolean function() { if (!(getSession().getDatasourceLogin().getDatasourcePlatform() instanceof DatabasePlatform)) { return Boolean.FALSE; } return Boolean.valueOf(getSession().getDatasourceLogin().getPlatform().usesNativeSQL()); }
/** * Shows if native SQL is being used */
Shows if native SQL is being used
getUsesNativeSQL
{ "repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/services/RuntimeServices.java", "license": "epl-1.0", "size": 71544 }
[ "org.eclipse.persistence.internal.databaseaccess.DatabasePlatform" ]
import org.eclipse.persistence.internal.databaseaccess.DatabasePlatform;
import org.eclipse.persistence.internal.databaseaccess.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,306,089
private void extractInput(String[] args) throws MPIException { try { InputFile = args[0]; K = Integer.parseInt(args[1]); Epsilon = Double.parseDouble(args[2]); } catch (Exception e) { if (MyRank == MASTER_ID) { System.out.printf("Arguments: <InputFile> <#Clusters> <...
void function(String[] args) throws MPIException { try { InputFile = args[0]; K = Integer.parseInt(args[1]); Epsilon = Double.parseDouble(args[2]); } catch (Exception e) { if (MyRank == MASTER_ID) { System.out.printf(STR); } MPI.Finalize(); System.exit(0); } List<Double> xList = new ArrayList<Double>(); List<Double> yL...
/** * Loads input parameters and data from user. (Used by All) * * @param args Command-line arguments from user * @throws MPIException MPI-related exceptions during execution. */
Loads input parameters and data from user. (Used by All)
extractInput
{ "repo_name": "ymzong/dsf14", "path": "OpenMPIKMeans/src/com/yzong/dsf14/openMPIKMeans/euclidean/EuclideanParallel.java", "license": "mit", "size": 11804 }
[ "java.io.BufferedReader", "java.io.FileReader", "java.io.IOException", "java.util.ArrayList", "java.util.List" ]
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,951,672
public List<NetworkInterfaceTapConfigurationInner> networkInterfaceTapConfigurations() { return this.networkInterfaceTapConfigurations; }
List<NetworkInterfaceTapConfigurationInner> function() { return this.networkInterfaceTapConfigurations; }
/** * Get specifies the list of resource IDs for the network interface IP configuration that needs to be tapped. * * @return the networkInterfaceTapConfigurations value */
Get specifies the list of resource IDs for the network interface IP configuration that needs to be tapped
networkInterfaceTapConfigurations
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/VirtualNetworkTapInner.java", "license": "mit", "size": 6638 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,527,086
void injectKeytab(ExecutionCommand ec, String command, String targetHost) throws AmbariException { String dataDir = ec.getCommandParams().get(KerberosServerAction.DATA_DIRECTORY); if(dataDir != null) { KerberosIdentityDataFileReader reader = null; List<Map<String, String>> kcp = ec.getKerberosCom...
void injectKeytab(ExecutionCommand ec, String command, String targetHost) throws AmbariException { String dataDir = ec.getCommandParams().get(KerberosServerAction.DATA_DIRECTORY); if(dataDir != null) { KerberosIdentityDataFileReader reader = null; List<Map<String, String>> kcp = ec.getKerberosCommandParams(); try { rea...
/** * Insert Kerberos keytab details into the ExecutionCommand for the SET_KEYTAB custom command if * any keytab details and associated data exists for the target host. * * @param ec the ExecutionCommand to update * @param command a name of the relevant keytab command * @param targetHost a name of the...
Insert Kerberos keytab details into the ExecutionCommand for the SET_KEYTAB custom command if any keytab details and associated data exists for the target host
injectKeytab
{ "repo_name": "alexryndin/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java", "license": "apache-2.0", "size": 29141 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.ambari.server.AmbariException", "org.apache.ambari.server.serveraction.kerberos.KerberosIdentityDataFileReader", "org.apache.ambari.s...
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.serveraction.kerberos.KerberosIdentityDataFileReade...
import java.io.*; import java.util.*; import org.apache.ambari.server.*; import org.apache.ambari.server.serveraction.kerberos.*; import org.apache.commons.codec.binary.*; import org.apache.commons.codec.digest.*; import org.apache.commons.io.*;
[ "java.io", "java.util", "org.apache.ambari", "org.apache.commons" ]
java.io; java.util; org.apache.ambari; org.apache.commons;
289,167
private void displaySplashScreen() { m_connect.setVisibility(View.GONE); m_scanner.setVisibility(View.GONE); m_title_bar.setVisibility(View.GONE); m_upgrade.setVisibility(View.GONE); m_splash.setVisibility(View.VISIBLE); }
void function() { m_connect.setVisibility(View.GONE); m_scanner.setVisibility(View.GONE); m_title_bar.setVisibility(View.GONE); m_upgrade.setVisibility(View.GONE); m_splash.setVisibility(View.VISIBLE); }
/** * Displays No3g splash screen */
Displays No3g splash screen
displaySplashScreen
{ "repo_name": "virtualabs/Youspot", "path": "src/com/youspot/No3g.java", "license": "gpl-2.0", "size": 28315 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,055,653
final ConnectedComponentInterface getRightCComponent() { return rightHandSideComponent; }
final ConnectedComponentInterface getRightCComponent() { return rightHandSideComponent; }
/** * This method returns connected component from right handSide rule, which * this action should be applied to (may be "null"). */
This method returns connected component from right handSide rule, which this action should be applied to (may be "null")
getRightCComponent
{ "repo_name": "kappamodeler/jkappa", "path": "src/main/com/plectix/simulator/simulationclasses/action/Action.java", "license": "lgpl-3.0", "size": 7790 }
[ "com.plectix.simulator.interfaces.ConnectedComponentInterface" ]
import com.plectix.simulator.interfaces.ConnectedComponentInterface;
import com.plectix.simulator.interfaces.*;
[ "com.plectix.simulator" ]
com.plectix.simulator;
868,404
@TestOnly public boolean selectSingle(Editor editor, PsiFile file, String annotationShortName) { if (mySingleMode) { throw new IllegalStateException(); } mySingleMode = true; final PsiModifierListOwner owner = AddAnnotationPsiFix.getContainer(file, editor.getCaretModel().getOffset()); if (...
boolean function(Editor editor, PsiFile file, String annotationShortName) { if (mySingleMode) { throw new IllegalStateException(); } mySingleMode = true; final PsiModifierListOwner owner = AddAnnotationPsiFix.getContainer(file, editor.getCaretModel().getOffset()); if (owner == null owner.getModifierList() == null !Exte...
/** * Configure the intention to annotate an element at caret in the editor with concrete annotation * * @param editor an editor * @param file a file * @param annotationShortName a short name of the annotation to add * @return true if specified annotation is provided and could be added to the element ...
Configure the intention to annotate an element at caret in the editor with concrete annotation
selectSingle
{ "repo_name": "goodwinnk/intellij-community", "path": "java/java-impl/src/com/intellij/codeInsight/intention/impl/AnnotateIntentionAction.java", "license": "apache-2.0", "size": 6245 }
[ "com.intellij.codeInsight.ExternalAnnotationsManagerImpl", "com.intellij.codeInsight.externalAnnotation.AnnotationProvider", "com.intellij.codeInsight.intention.AddAnnotationPsiFix", "com.intellij.openapi.editor.Editor", "com.intellij.openapi.util.text.StringUtil", "com.intellij.psi.PsiFile", "com.intel...
import com.intellij.codeInsight.ExternalAnnotationsManagerImpl; import com.intellij.codeInsight.externalAnnotation.AnnotationProvider; import com.intellij.codeInsight.intention.AddAnnotationPsiFix; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiFi...
import com.intellij.*; import com.intellij.openapi.editor.*; import com.intellij.openapi.util.text.*; import com.intellij.psi.*; import java.util.*; import one.util.streamex.*;
[ "com.intellij", "com.intellij.openapi", "com.intellij.psi", "java.util", "one.util.streamex" ]
com.intellij; com.intellij.openapi; com.intellij.psi; java.util; one.util.streamex;
568,292
public void setParameters(List<?> parameters) { this.parameters = parameters; }
void function(List<?> parameters) { this.parameters = parameters; }
/** * Set the parameters * * @param parameters the parameters */
Set the parameters
setParameters
{ "repo_name": "JoeCarlson/intermine", "path": "intermine/objectstore/main/src/org/intermine/objectstore/query/iql/IqlQuery.java", "license": "lgpl-2.1", "size": 38394 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,777,712
@ServiceMethod(returns = ReturnType.SINGLE) public GeoBackupPolicyInner get( String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName) { return getAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) GeoBackupPolicyInner function( String resourceGroupName, String serverName, String databaseName, GeoBackupPolicyName geoBackupPolicyName) { return getAsync(resourceGroupName, serverName, databaseName, geoBackupPolicyName).block(); }
/** * Gets a geo backup policy. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the datab...
Gets a geo backup policy
get
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/GeoBackupPoliciesClientImpl.java", "license": "mit", "size": 34806 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner", "com.azure.resourcemanager.sql.models.GeoBackupPolicyName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.fluent.models.GeoBackupPolicyInner; import com.azure.resourcemanager.sql.models.GeoBackupPolicyName;
import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.fluent.models.*; import com.azure.resourcemanager.sql.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,047,965
private ITypeTerm processFunctionCallExpression(FunctionCall fc) { return findOrCreateFunctionCallTerm(fc); }
ITypeTerm function(FunctionCall fc) { return findOrCreateFunctionCallTerm(fc); }
/** * for function calls, return a constraint variable that corresponds to the * callee's return type. The generation of constraints that require the type of each actual * parameter to be a subtype of the type of the corresponding formal parameter happens * in processFunctionCallParams */
for function calls, return a constraint variable that corresponds to the callee's return type. The generation of constraints that require the type of each actual parameter to be a subtype of the type of the corresponding formal parameter happens in processFunctionCallParams
processFunctionCallExpression
{ "repo_name": "csgordon/SJS", "path": "sjsc/src/main/java/com/samsung/sjs/constraintgenerator/ConstraintVisitor.java", "license": "apache-2.0", "size": 70132 }
[ "com.samsung.sjs.typeconstraints.ITypeTerm", "org.mozilla.javascript.ast.FunctionCall" ]
import com.samsung.sjs.typeconstraints.ITypeTerm; import org.mozilla.javascript.ast.FunctionCall;
import com.samsung.sjs.typeconstraints.*; import org.mozilla.javascript.ast.*;
[ "com.samsung.sjs", "org.mozilla.javascript" ]
com.samsung.sjs; org.mozilla.javascript;
1,509,624
public TibcoInstallation.DescriptorImpl getToolDescriptor() { return ToolInstallation.all().get( TibcoInstallation.DescriptorImpl.class); }
TibcoInstallation.DescriptorImpl function() { return ToolInstallation.all().get( TibcoInstallation.DescriptorImpl.class); }
/** * Obtains the {@link TibcoInstallation.DescriptorImpl} instance. */
Obtains the <code>TibcoInstallation.DescriptorImpl</code> instance
getToolDescriptor
{ "repo_name": "federicopastore/TibcoBuilder", "path": "src/main/java/org/jenkinsci/plugins/tibco/AmxEclipseAntBuilder.java", "license": "mit", "size": 12964 }
[ "hudson.tools.ToolInstallation", "org.jenkinsci.plugins.tibco.installation.TibcoInstallation" ]
import hudson.tools.ToolInstallation; import org.jenkinsci.plugins.tibco.installation.TibcoInstallation;
import hudson.tools.*; import org.jenkinsci.plugins.tibco.installation.*;
[ "hudson.tools", "org.jenkinsci.plugins" ]
hudson.tools; org.jenkinsci.plugins;
2,149,423
@Test public void testDelete() throws Exception { long size = countArticles(); EntityManager em = emf.createEntityManager(); String[] ids = new String[]{"132"}; // insert all items for (String id : ids) { // item should not be in the db Query query = em.createQuery(new StringBuilder().append("S...
void function() throws Exception { long size = countArticles(); EntityManager em = emf.createEntityManager(); String[] ids = new String[]{"132"}; for (String id : ids) { Query query = em.createQuery(new StringBuilder().append(STR).append(id).toString()); assertEquals(0, query.getResultList().size()); String content = g...
/** * Test delete. * * @throws Exception the exception */
Test delete
testDelete
{ "repo_name": "e-Spirit/uxbridge-samples", "path": "newsDrillDown/adapter/hibernate/src/test/java/com/espirit/moddev/examples/uxbridge/newsdrilldown/test/CommandITCase.java", "license": "apache-2.0", "size": 14283 }
[ "javax.persistence.EntityManager", "javax.persistence.Query" ]
import javax.persistence.EntityManager; import javax.persistence.Query;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
297,923