method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void setResolved(BigDecimal resolved) {
this.resolved = resolved;
} | void function(BigDecimal resolved) { this.resolved = resolved; } | /**
* Sets the value of the field <code>resolved</code>.
*
* @param resolved the resolved to set
*/ | Sets the value of the field <code>resolved</code> | setResolved | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/ejb/gov/opm/scrd/services/impl/reporting/SuspenseResolutionReportResponseItem.java",
"license": "apache-2.0",
"size": 5291
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,245,593 |
static public AbstractPlanNode removeCoordinatorSendReceivePair(AbstractPlanNode root) {
assert(root != null);
return removeCoordinatorSendReceivePairRecursive(root, root);
} | static AbstractPlanNode function(AbstractPlanNode root) { assert(root != null); return removeCoordinatorSendReceivePairRecursive(root, root); } | /**
* Remove the coordinator send/receive pair if any from the graph.
*
* @param root the complete plan node.
* @return the plan without the send/receive pair.
*/ | Remove the coordinator send/receive pair if any from the graph | removeCoordinatorSendReceivePair | {
"repo_name": "migue/voltdb",
"path": "src/frontend/org/voltdb/planner/PlanAssembler.java",
"license": "agpl-3.0",
"size": 138072
} | [
"org.voltdb.plannodes.AbstractPlanNode"
] | import org.voltdb.plannodes.AbstractPlanNode; | import org.voltdb.plannodes.*; | [
"org.voltdb.plannodes"
] | org.voltdb.plannodes; | 1,363,072 |
void insertAndReadDigest(Object key, Fingerprint digest, Fingerprint readTo) {
// Check if we have to resize the table first and do that under write lock
// We assume that we are going to insert an item. If we do not do this, multiple
// threads could race and all think they do not need to resize, then so... | void insertAndReadDigest(Object key, Fingerprint digest, Fingerprint readTo) { Table table = this.table; if (allocatedSlots.incrementAndGet() >= table.nextResize) { long resizeLock = readWriteLock.writeLock(); try { if (table == this.table) { resizeTableWriteLocked(); } } finally { readWriteLock.unlockWrite(resizeLock)... | /**
* Inserts a digest for the corresponding key, then immediately reads it into another fingerprint.
*
* <p>This is equivalent to <code>
* digestMap.insertDigest(key, digest.digestAndReset(); digestMap.readDigest(key, readTo); </code>
* but it will be faster.
*
* @param key The key to insert.
*... | Inserts a digest for the corresponding key, then immediately reads it into another fingerprint. This is equivalent to <code> digestMap.insertDigest(key, digest.digestAndReset(); digestMap.readDigest(key, readTo); </code> but it will be faster | insertAndReadDigest | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/collect/nestedset/DigestMap.java",
"license": "apache-2.0",
"size": 8676
} | [
"com.google.devtools.build.lib.util.Fingerprint"
] | import com.google.devtools.build.lib.util.Fingerprint; | import com.google.devtools.build.lib.util.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,121,929 |
public static Blob generateProxy(InputStream stream, long length) {
return ( Blob ) Proxy.newProxyInstance(
getProxyClassLoader(),
PROXY_INTERFACES,
new BlobProxy( stream, length )
);
} | static Blob function(InputStream stream, long length) { return ( Blob ) Proxy.newProxyInstance( getProxyClassLoader(), PROXY_INTERFACES, new BlobProxy( stream, length ) ); } | /**
* Generates a BlobImpl proxy using a given number of bytes from an InputStream.
*
* @param stream The input stream of bytes to be created as a Blob.
* @param length The number of bytes from stream to be written to the Blob.
*
* @return The generated proxy.
*/ | Generates a BlobImpl proxy using a given number of bytes from an InputStream | generateProxy | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/engine/jdbc/BlobProxy.java",
"license": "mit",
"size": 7513
} | [
"java.io.InputStream",
"java.lang.reflect.Proxy",
"java.sql.Blob"
] | import java.io.InputStream; import java.lang.reflect.Proxy; import java.sql.Blob; | import java.io.*; import java.lang.reflect.*; import java.sql.*; | [
"java.io",
"java.lang",
"java.sql"
] | java.io; java.lang; java.sql; | 1,127,839 |
public static void hasText(String text, Supplier<String> messageSupplier) {
if (!StringUtils.hasText(text)) {
throw new IllegalArgumentException(nullSafeGet(messageSupplier));
}
} | static void function(String text, Supplier<String> messageSupplier) { if (!StringUtils.hasText(text)) { throw new IllegalArgumentException(nullSafeGet(messageSupplier)); } } | /**
* Assert that the given String contains valid text content; that is, it must not
* be {@code null} and must contain at least one non-whitespace character.
* <pre class="code">
* Assert.hasText(name, () -> "Name for account '" + account.getId() + "' must not be empty");
* </pre>
* @param text the Stri... | Assert that the given String contains valid text content; that is, it must not be null and must contain at least one non-whitespace character. Assert.hasText(name, () -> "Name for account '" + account.getId() + "' must not be empty"); </code> | hasText | {
"repo_name": "nucleusbox/nucleus-project",
"path": "nucleus-project-core/src/main/java/org/nucleusbox/util/Assert.java",
"license": "apache-2.0",
"size": 22180
} | [
"java.util.function.Supplier"
] | import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,985,954 |
private void callDeviceAndLinkAdding(TopologyForDeviceAndLink topologyForDeviceAndLink) {
Map<String, DeviceInformation> deviceInformationMap = topologyForDeviceAndLink.deviceInformationMap();
Map<String, DeviceInformation> deviceInformationMapForPointToPoint =
topologyForDeviceAndLi... | void function(TopologyForDeviceAndLink topologyForDeviceAndLink) { Map<String, DeviceInformation> deviceInformationMap = topologyForDeviceAndLink.deviceInformationMap(); Map<String, DeviceInformation> deviceInformationMapForPointToPoint = topologyForDeviceAndLink.deviceInformationMapForPointToPoint(); Map<String, Devic... | /**
* Adds device and link.
*
* @param topologyForDeviceAndLink topology for device and link instance
*/ | Adds device and link | callDeviceAndLinkAdding | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfNbrImpl.java",
"license": "apache-2.0",
"size": 75644
} | [
"java.util.List",
"java.util.Map",
"org.onlab.packet.Ip4Address",
"org.onlab.util.Bandwidth",
"org.onosproject.ospf.controller.DeviceInformation",
"org.onosproject.ospf.controller.LinkInformation",
"org.onosproject.ospf.controller.OspfDeviceTed",
"org.onosproject.ospf.controller.OspfLinkTed",
"org.o... | import java.util.List; import java.util.Map; import org.onlab.packet.Ip4Address; import org.onlab.util.Bandwidth; import org.onosproject.ospf.controller.DeviceInformation; import org.onosproject.ospf.controller.LinkInformation; import org.onosproject.ospf.controller.OspfDeviceTed; import org.onosproject.ospf.controller... | import java.util.*; import org.onlab.packet.*; import org.onlab.util.*; import org.onosproject.ospf.controller.*; import org.onosproject.ospf.controller.area.*; | [
"java.util",
"org.onlab.packet",
"org.onlab.util",
"org.onosproject.ospf"
] | java.util; org.onlab.packet; org.onlab.util; org.onosproject.ospf; | 2,302,900 |
private AlarmEvent enable( AlarmPoint alarm )
{
AlarmStatus status = alarm.currentStatus();
if( status.name(null).equals( AlarmPoint.STATUS_DISABLED ) )
{
AlarmStatus newStatus = createStatus( AlarmPoint.STATUS_NORMAL );
return createEv... | AlarmEvent function( AlarmPoint alarm ) { AlarmStatus status = alarm.currentStatus(); if( status.name(null).equals( AlarmPoint.STATUS_DISABLED ) ) { AlarmStatus newStatus = createStatus( AlarmPoint.STATUS_NORMAL ); return createEvent( ( (Identity) alarm ), status, newStatus, AlarmPoint.EVENT_ENABLING ); } return null; ... | /**
* StateMachine change for unblock trigger.
*
* @param alarm the alarm that is being triggered.
*
* @return The event to be fired on acknowledge.
*/ | StateMachine change for unblock trigger | enable | {
"repo_name": "ramtej/Qi4j.Repo.4.Sync",
"path": "libraries/alarm/src/main/java/org/qi4j/library/alarm/ExtendedAlarmModelService.java",
"license": "apache-2.0",
"size": 17687
} | [
"org.qi4j.api.entity.Identity"
] | import org.qi4j.api.entity.Identity; | import org.qi4j.api.entity.*; | [
"org.qi4j.api"
] | org.qi4j.api; | 2,658,906 |
private PointF transformCoordTouchToBitmap(float x, float y, boolean clipToBitmap) {
matrix.getValues(m);
float origW = getDrawable().getIntrinsicWidth();
float origH = getDrawable().getIntrinsicHeight();
float transX = m[Matrix.MTRANS_X];
float transY = m[Matrix.MTRANS_... | PointF function(float x, float y, boolean clipToBitmap) { matrix.getValues(m); float origW = getDrawable().getIntrinsicWidth(); float origH = getDrawable().getIntrinsicHeight(); float transX = m[Matrix.MTRANS_X]; float transY = m[Matrix.MTRANS_Y]; float finalX = ((x - transX) * origW) / getImageWidth(); float finalY = ... | /**
* This function will transform the coordinates in the touch event to the coordinate
* system of the drawable that the imageview contain
* @param x x-coordinate of touch event
* @param y y-coordinate of touch event
* @param clipToBitmap Touch event may occur within view, but outside image c... | This function will transform the coordinates in the touch event to the coordinate system of the drawable that the imageview contain | transformCoordTouchToBitmap | {
"repo_name": "LSL-Git/ImageLabelerApp",
"path": "photo-selector/src/main/java/com/sleepyzzz/photo_selector/view/TouchImageView.java",
"license": "apache-2.0",
"size": 40804
} | [
"android.graphics.Matrix",
"android.graphics.PointF"
] | import android.graphics.Matrix; import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,325,947 |
@Test
void testMinifiedNameDetectMinInName()
{
class PRR extends PackageResourceReference
{
public PRR(String key) {
super(key);
} | void testMinifiedNameDetectMinInName() { class PRR extends PackageResourceReference { public PRR(String key) { super(key); } | /**
* see WICKET-5251 : Proper detection of already minified resources
*/ | see WICKET-5251 : Proper detection of already minified resources | testMinifiedNameDetectMinInName | {
"repo_name": "mosoft521/wicket",
"path": "wicket-core/src/test/java/org/apache/wicket/core/request/resource/PackageResourceReferenceTest.java",
"license": "apache-2.0",
"size": 14137
} | [
"org.apache.wicket.request.resource.PackageResourceReference"
] | import org.apache.wicket.request.resource.PackageResourceReference; | import org.apache.wicket.request.resource.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,648,911 |
EList<Income_Tax_Credit> getIncome_Tax_Credit();
| EList<Income_Tax_Credit> getIncome_Tax_Credit(); | /**
* Returns the value of the '<em><b>Income Tax Credit</b></em>' reference list.
* The list contents are of type {@link TaxationWithRoot.Income_Tax_Credit}.
* It is bidirectional and its opposite is '{@link TaxationWithRoot.Income_Tax_Credit#getTaxation_Frame <em>Taxation Frame</em>}'.
* <!-- begin-user-d... | Returns the value of the 'Income Tax Credit' reference list. The list contents are of type <code>TaxationWithRoot.Income_Tax_Credit</code>. It is bidirectional and its opposite is '<code>TaxationWithRoot.Income_Tax_Credit#getTaxation_Frame Taxation Frame</code>'. | getIncome_Tax_Credit | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/Tax_Card.java",
"license": "epl-1.0",
"size": 32017
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 752,808 |
public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) {
for (Entry<String, String> param : headerParams.entrySet()) {
reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
}
for (Entry<String, String> header : defaultHeade... | void function(Map<String, String> headerParams, Request.Builder reqBuilder) { for (Entry<String, String> param : headerParams.entrySet()) { reqBuilder.header(param.getKey(), parameterToString(param.getValue())); } for (Entry<String, String> header : defaultHeaderMap.entrySet()) { if (!headerParams.containsKey(header.ge... | /**
* Set header parameters to the request builder, including default headers.
*
* @param headerParams Header parameters in the ofrm of Map
* @param reqBuilder Reqeust.Builder
*/ | Set header parameters to the request builder, including default headers | processHeaderParams | {
"repo_name": "fbmattos/temp",
"path": "java/src/main/java/io/swagger/client/ApiClient.java",
"license": "apache-2.0",
"size": 46499
} | [
"com.squareup.okhttp.Request",
"java.util.Map"
] | import com.squareup.okhttp.Request; import java.util.Map; | import com.squareup.okhttp.*; import java.util.*; | [
"com.squareup.okhttp",
"java.util"
] | com.squareup.okhttp; java.util; | 42,556 |
public long connectionDelay(Node node, long now);
/**
* Check if the connection of the node has failed, based on the connection state. Such connection failure are
* usually transient and can be resumed in the next {@link #ready(org.apache.kafka.common.Node, long)} } | long function(Node node, long now); /** * Check if the connection of the node has failed, based on the connection state. Such connection failure are * usually transient and can be resumed in the next {@link #ready(org.apache.kafka.common.Node, long)} } | /**
* Returns the number of milliseconds to wait, based on the connection state, before attempting to send data. When
* disconnected, this respects the reconnect backoff time. When connecting or connected, this handles slow/stalled
* connections.
*
* @param node The node to check
* @param... | Returns the number of milliseconds to wait, based on the connection state, before attempting to send data. When disconnected, this respects the reconnect backoff time. When connecting or connected, this handles slow/stalled connections | connectionDelay | {
"repo_name": "reiseburo/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/KafkaClient.java",
"license": "apache-2.0",
"size": 5443
} | [
"org.apache.kafka.common.Node"
] | import org.apache.kafka.common.Node; | import org.apache.kafka.common.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,997,861 |
public void testQueryDeadlineOrder01() throws Exception {
final long now = System.currentTimeMillis();
final int startId = 1;
final PipelineOp query1 = new StartOp(new BOp[] {}, NV
.asMap(new NV[] {//
new NV(Predicate.Annotations.BOP_ID, startId),//... | void function() throws Exception { final long now = System.currentTimeMillis(); final int startId = 1; final PipelineOp query1 = new StartOp(new BOp[] {}, NV .asMap(new NV[] { new NV(SliceOp.Annotations.EVALUATION_CONTEXT, BOpEvaluationContext.CONTROLLER), final PipelineOp query2 = new StartOp(new BOp[] {}, NV .asMap(n... | /**
* Verify the semantics of {@link QueryDeadline#compareTo(QueryDeadline)}.
*
* @throws Exception
*/ | Verify the semantics of <code>QueryDeadline#compareTo(QueryDeadline)</code> | testQueryDeadlineOrder01 | {
"repo_name": "blazegraph/database",
"path": "bigdata-core-test/bigdata/src/test/com/bigdata/bop/engine/TestQueryDeadlineOrder.java",
"license": "gpl-2.0",
"size": 6094
} | [
"com.bigdata.bop.BOp",
"com.bigdata.bop.BOpEvaluationContext",
"com.bigdata.bop.PipelineOp",
"com.bigdata.bop.bindingSet.ListBindingSet",
"com.bigdata.bop.bset.StartOp",
"com.bigdata.bop.solutions.SliceOp",
"java.util.UUID",
"java.util.concurrent.TimeUnit"
] | import com.bigdata.bop.BOp; import com.bigdata.bop.BOpEvaluationContext; import com.bigdata.bop.PipelineOp; import com.bigdata.bop.bindingSet.ListBindingSet; import com.bigdata.bop.bset.StartOp; import com.bigdata.bop.solutions.SliceOp; import java.util.UUID; import java.util.concurrent.TimeUnit; | import com.bigdata.bop.*; import com.bigdata.bop.bset.*; import com.bigdata.bop.solutions.*; import java.util.*; import java.util.concurrent.*; | [
"com.bigdata.bop",
"java.util"
] | com.bigdata.bop; java.util; | 296,090 |
public User getUser( long userId ) {
String where = User.ID_KEY + "=" + userId;
Cursor cursor = database.query( USER_TABLE_NAME,
new String[] { User.ID_KEY, User.USERNAME_KEY,
User.SAVED_GAME_ID_KEY },
where, null, null, null, null );
... | User function( long userId ) { String where = User.ID_KEY + "=" + userId; Cursor cursor = database.query( USER_TABLE_NAME, new String[] { User.ID_KEY, User.USERNAME_KEY, User.SAVED_GAME_ID_KEY }, where, null, null, null, null ); if ( cursor.getCount() > 0 ) { cursor.moveToNext(); } else { return null; } User user = new... | /**
* Retrieves the user with the specified ID. This method <b>will</b>
* cascade to retrieve the user's current game.
*
* @param userId the ID of the user to retrieve from the database
*
* @return the user with the specified ID
*/ | Retrieves the user with the specified ID. This method will cascade to retrieve the user's current game | getUser | {
"repo_name": "EricMountain/droid-atomix",
"path": "src/edu/rit/poe/atomix/db/AtomixDbAdapter.java",
"license": "gpl-2.0",
"size": 21709
} | [
"android.database.Cursor",
"edu.rit.poe.atomix.util.Point",
"java.util.Calendar"
] | import android.database.Cursor; import edu.rit.poe.atomix.util.Point; import java.util.Calendar; | import android.database.*; import edu.rit.poe.atomix.util.*; import java.util.*; | [
"android.database",
"edu.rit.poe",
"java.util"
] | android.database; edu.rit.poe; java.util; | 1,771,015 |
private boolean isAllowedToManageTutorials() {
if (userService.hasCourseRole(user, Role.LECTURER, course)) {
return true;
}
if (userService.hasCourseRole(user, Role.PRIVILEGED_USER, course)) {
PrivilegedUser pu = courseService.findPrivileged(course, user.getEmail());... | boolean function() { if (userService.hasCourseRole(user, Role.LECTURER, course)) { return true; } if (userService.hasCourseRole(user, Role.PRIVILEGED_USER, course)) { PrivilegedUser pu = courseService.findPrivileged(course, user.getEmail()); if (pu == null) { return false; } return pu.hasPrivilege(Privilege.ManageTutor... | /**
* Whether or not the current user is allowed to mange tutorials.
*
* @return True if he is, false otherwise.
*/ | Whether or not the current user is allowed to mange tutorials | isAllowedToManageTutorials | {
"repo_name": "stefanoberdoerfer/exmatrikulator",
"path": "src/main/java/de/unibremen/opensores/controller/tutorial/TutorialController.java",
"license": "agpl-3.0",
"size": 25618
} | [
"de.unibremen.opensores.model.Privilege",
"de.unibremen.opensores.model.PrivilegedUser",
"de.unibremen.opensores.model.Role"
] | import de.unibremen.opensores.model.Privilege; import de.unibremen.opensores.model.PrivilegedUser; import de.unibremen.opensores.model.Role; | import de.unibremen.opensores.model.*; | [
"de.unibremen.opensores"
] | de.unibremen.opensores; | 1,576,080 |
void prepareForActionExecution() {
checkState(!executionMode.getAndSet(true), "Already in execution mode");
store.clear();
} | void prepareForActionExecution() { checkState(!executionMode.getAndSet(true), STR); store.clear(); } | /**
* Informs this handler that the action is about to be executed.
*
* <p>Any stale metadata cached in the underlying {@link OutputStore} from action cache checking
* is cleared.
*/ | Informs this handler that the action is about to be executed. Any stale metadata cached in the underlying <code>OutputStore</code> from action cache checking is cleared | prepareForActionExecution | {
"repo_name": "safarmer/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/ActionMetadataHandler.java",
"license": "apache-2.0",
"size": 27739
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,811,146 |
public Bitmap.Config getBitmapConfig() {
return mBitmapConfig;
} | Bitmap.Config function() { return mBitmapConfig; } | /**
* Gets which config image will be decode with;
*
* @return which config image will be decode with
*/ | Gets which config image will be decode with | getBitmapConfig | {
"repo_name": "facebook/fresco",
"path": "imagepipeline-base/src/main/java/com/facebook/imagepipeline/common/ImageDecodeOptionsBuilder.java",
"license": "mit",
"size": 9313
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,472,434 |
public List<Record> getAllRecordsFromTableOrView(final String tableOrViewName, final String sortField, Boolean sortAsc) {
String sql = "SELECT * FROM " + tableOrViewName;
if (null != sortField) {
sql = sql + " ORDER BY " + sortField + " " + (null == sortAsc || sortAsc ? getAscKeyword() :... | List<Record> function(final String tableOrViewName, final String sortField, Boolean sortAsc) { String sql = STR + tableOrViewName; if (null != sortField) { sql = sql + STR + sortField + " " + (null == sortAsc sortAsc ? getAscKeyword() : getDescKeyword()); } return prepare(sql); } | /**
* reads all records from table or view "tableOrViewName"
*
* @param tableOrViewName name of table of view to read from
* @return list of all records
*/ | reads all records from table or view "tableOrViewName" | getAllRecordsFromTableOrView | {
"repo_name": "BrickworkVentures/boilersuit-core",
"path": "src/main/java/ch/brickwork/bsuit/database/AbstractSQLDatabase.java",
"license": "mit",
"size": 30127
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,934,797 |
Element element(Element e, String name); | Element element(Element e, String name); | /**
* Get a element by name
*
* @param e A current XML element
* @param name The child node name
* @return A XML element
*/ | Get a element by name | element | {
"repo_name": "hypercube1024/firefly",
"path": "firefly-slf4j/src/main/java/com/fireflysource/log/internal/utils/xml/Dom.java",
"license": "apache-2.0",
"size": 1918
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,304,652 |
void setFill(FillTimingAttrsType value); | void setFill(FillTimingAttrsType value); | /**
* Sets the value of the '{@link org.w3._2001.smil20.language.AnimateType#getFill <em>Fill</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Fill</em>' attribute.
* @see org.w3._2001.smil20.FillTimingAttrsType
* @see #isSetFill(... | Sets the value of the '<code>org.w3._2001.smil20.language.AnimateType#getFill Fill</code>' attribute. | setFill | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wmts/src/org/w3/_2001/smil20/language/AnimateType.java",
"license": "lgpl-2.1",
"size": 42171
} | [
"org.w3._2001.smil20.FillTimingAttrsType"
] | import org.w3._2001.smil20.FillTimingAttrsType; | import org.w3.*; | [
"org.w3"
] | org.w3; | 2,631,442 |
protected static final String formatUsingFormat(Long value,
DateTimeFormat fmt) {
if (value == null) {
return "";
} else {
// midnight GMT
Date date = new Date(0);
// offset by timezone and value
... | static final String function(Long value, DateTimeFormat fmt) { if (value == null) { return ""; } else { Date date = new Date(0); date.setTime(UTCDateBox.timezoneOffsetMillis(date) + value.longValue()); return fmt.format(date); } } | /**
* Formats the value provided with the specified DateTimeFormat
*/ | Formats the value provided with the specified DateTimeFormat | formatUsingFormat | {
"repo_name": "etirelli/jbpm-console-ng",
"path": "jbpm-wb-common/jbpm-wb-common-client/src/main/java/org/jbpm/workbench/common/client/util/UTCTimeBoxImplShared.java",
"license": "apache-2.0",
"size": 6427
} | [
"com.google.gwt.i18n.client.DateTimeFormat",
"java.util.Date"
] | import com.google.gwt.i18n.client.DateTimeFormat; import java.util.Date; | import com.google.gwt.i18n.client.*; import java.util.*; | [
"com.google.gwt",
"java.util"
] | com.google.gwt; java.util; | 1,352,056 |
public final MetaProperty<Boolean> protectFromStartOfDay() {
return _protectFromStartOfDay;
} | final MetaProperty<Boolean> function() { return _protectFromStartOfDay; } | /**
* The meta-property for the {@code protectFromStartOfDay} property.
* @return the meta-property, not null
*/ | The meta-property for the protectFromStartOfDay property | protectFromStartOfDay | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/convention/IsdaCreditCurveConvention.java",
"license": "apache-2.0",
"size": 25827
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,751,660 |
void store(OrganizationDistributedResourcesImpl distributedResources) throws ServerException; | void store(OrganizationDistributedResourcesImpl distributedResources) throws ServerException; | /**
* Stores (creates or updated) distributed resources for suborganization.
*
* @param distributedResources distributed resources to store
* @throws NullPointerException when either {@code distributedResources} is null
* @throws ServerException when any other error occurs
*/ | Stores (creates or updated) distributed resources for suborganization | store | {
"repo_name": "sleshchenko/che",
"path": "multiuser/api/che-multiuser-api-organization/src/main/java/org/eclipse/che/multiuser/organization/spi/OrganizationDistributedResourcesDao.java",
"license": "epl-1.0",
"size": 2592
} | [
"org.eclipse.che.api.core.ServerException",
"org.eclipse.che.multiuser.organization.spi.impl.OrganizationDistributedResourcesImpl"
] | import org.eclipse.che.api.core.ServerException; import org.eclipse.che.multiuser.organization.spi.impl.OrganizationDistributedResourcesImpl; | import org.eclipse.che.api.core.*; import org.eclipse.che.multiuser.organization.spi.impl.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,127,083 |
@RequestCache
public boolean canPrincipalManage(IAuthorizationPrincipal principal, String portletDefinitionId)
throws AuthorizationException
{
String owner = IPermission.PORTAL_PUBLISH;
String target = IPermission.PORTLET_PREFIX + portletDefinitionId;
// retrieve the indicated channel from the channel ... | boolean function(IAuthorizationPrincipal principal, String portletDefinitionId) throws AuthorizationException { String owner = IPermission.PORTAL_PUBLISH; String target = IPermission.PORTLET_PREFIX + portletDefinitionId; IPortletDefinition portlet = this.portletDefinitionRegistry.getPortletDefinition(portletDefinitionI... | /**
* Answers if the principal has permission to MANAGE this Channel.
* @return boolean
* @param principal IAuthorizationPrincipal
* @param channelPublishId int
* @exception AuthorizationException indicates authorization information could not be retrieved.
*/ | Answers if the principal has permission to MANAGE this Channel | canPrincipalManage | {
"repo_name": "pspaude/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/security/provider/AuthorizationImpl.java",
"license": "apache-2.0",
"size": 38152
} | [
"org.jasig.portal.AuthorizationException",
"org.jasig.portal.portlet.om.IPortletDefinition",
"org.jasig.portal.portlet.om.PortletLifecycleState",
"org.jasig.portal.security.IAuthorizationPrincipal",
"org.jasig.portal.security.IPermission"
] | import org.jasig.portal.AuthorizationException; import org.jasig.portal.portlet.om.IPortletDefinition; import org.jasig.portal.portlet.om.PortletLifecycleState; import org.jasig.portal.security.IAuthorizationPrincipal; import org.jasig.portal.security.IPermission; | import org.jasig.portal.*; import org.jasig.portal.portlet.om.*; import org.jasig.portal.security.*; | [
"org.jasig.portal"
] | org.jasig.portal; | 1,298,931 |
@SuppressWarnings({"unchecked"})
@Override protected void body() {
evtLsnr.onTaskStarted(this);
try {
// Use either user task or deployed one.
if (task == null) {
assert taskCls != null;
assert ComputeTask.class.isAssignableFrom(taskCls);
... | @SuppressWarnings({STR}) @Override void function() { evtLsnr.onTaskStarted(this); try { if (task == null) { assert taskCls != null; assert ComputeTask.class.isAssignableFrom(taskCls); try { task = newTask((Class<? extends ComputeTask<T, R>>)taskCls); } catch (IgniteCheckedException e) { internal = dep.internalTask(null... | /**
* Maps this task's jobs to nodes and sends them out.
*/ | Maps this task's jobs to nodes and sends them out | body | {
"repo_name": "agura/incubator-ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskWorker.java",
"license": "apache-2.0",
"size": 52943
} | [
"java.util.Collections",
"java.util.List",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.compute.ComputeLoadBalancer",
"org.apache.ignite.compute.ComputeTask",
"org.apache.ignite.resources.TaskContinuousMapperResource"
] | import java.util.Collections; import java.util.List; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.compute.ComputeLoadBalancer; import org.apache.ignite.compute.ComputeTask; import org.apache.ignite.resources.TaskContinuousMapperResource; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.compute.*; import org.apache.ignite.resources.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 997,370 |
@RequiresApi(api = Build.VERSION_CODES.O)
public static boolean removeShortcuts(@NonNull Context context, List<String> ids) {
try {
getShortcutManager(context).removeDynamicShortcuts(ids);
return true;
} catch (Exception e){
e.printStackTrace();
return false;
}
}
| @RequiresApi(api = Build.VERSION_CODES.O) static boolean function(@NonNull Context context, List<String> ids) { try { getShortcutManager(context).removeDynamicShortcuts(ids); return true; } catch (Exception e){ e.printStackTrace(); return false; } } | /**
* Remove multiple shortcuts
* @param context
* @param ids IDs of the shortcuts
* @return true if they were successfully removed, false if not.
*/ | Remove multiple shortcuts | removeShortcuts | {
"repo_name": "PGMacDesign/PGMacUtilities",
"path": "library/src/main/java/com/pgmacdesign/pgmactips/utilities/ShortcutManagerUtilities.java",
"license": "apache-2.0",
"size": 23604
} | [
"android.content.Context",
"android.os.Build",
"androidx.annotation.NonNull",
"androidx.annotation.RequiresApi",
"java.util.List"
] | import android.content.Context; import android.os.Build; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import java.util.List; | import android.content.*; import android.os.*; import androidx.annotation.*; import java.util.*; | [
"android.content",
"android.os",
"androidx.annotation",
"java.util"
] | android.content; android.os; androidx.annotation; java.util; | 583,699 |
private Collection<RedisCommand<K, V, ?>> shiftCommands(Queue<RedisCommand<K, V, ?>> source) {
synchronized (stateLock) {
try {
lockWritersExclusive();
return drainCommands(source);
} finally {
unlockWritersExclusive();
... | Collection<RedisCommand<K, V, ?>> function(Queue<RedisCommand<K, V, ?>> source) { synchronized (stateLock) { try { lockWritersExclusive(); return drainCommands(source); } finally { unlockWritersExclusive(); } } } | /**
* Retrieve commands within a lock to prevent concurrent modification
*/ | Retrieve commands within a lock to prevent concurrent modification | shiftCommands | {
"repo_name": "CiNC0/Cartier",
"path": "cartier-redis/src/main/java/com/lambdaworks/redis/cluster/ClusterNodeCommandHandler.java",
"license": "apache-2.0",
"size": 5037
} | [
"com.lambdaworks.redis.protocol.RedisCommand",
"java.util.Collection",
"java.util.Queue"
] | import com.lambdaworks.redis.protocol.RedisCommand; import java.util.Collection; import java.util.Queue; | import com.lambdaworks.redis.protocol.*; import java.util.*; | [
"com.lambdaworks.redis",
"java.util"
] | com.lambdaworks.redis; java.util; | 1,514,886 |
public boolean hasOwner() {
return Base.has(this.model, this.getResource(), OWNER);
} | boolean function() { return Base.has(this.model, this.getResource(), OWNER); } | /**
* Check if org.ontoware.rdfreactor.generator.java.JProperty@759bade4 has at
* least one value set
*
* @return true if this property has at least one value
*
* [Generated from RDFReactor template rule #get0has-dynamic]
*/ | Check if org.ontoware.rdfreactor.generator.java.JProperty@759bade4 has at least one value set | hasOwner | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,083,921 |
public static String fromXml(String p) {
Set<Entry<String, String>> entries = FROM_XML_CHARS.entrySet();
for (Entry<String, String> e: entries) {
String key = e.getKey();
String value = e.getValue();
p = p.replaceAll(key, value);
}
return p;
}
| static String function(String p) { Set<Entry<String, String>> entries = FROM_XML_CHARS.entrySet(); for (Entry<String, String> e: entries) { String key = e.getKey(); String value = e.getValue(); p = p.replaceAll(key, value); } return p; } | /**
* a thread safe method to transform text to xml
* ie "a&b" would become "a&b"
* @param p
* @return
*/ | a thread safe method to transform text to xml ie "a&b" would become "a&b" | fromXml | {
"repo_name": "adligo/tests4j.adligo.org",
"path": "src/org/adligo/tests4j/shared/xml/XML_Chars.java",
"license": "apache-2.0",
"size": 2406
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 338,741 |
@NotNull
PsiComment createCommentFromText(@NotNull String text, PsiElement context) throws IncorrectOperationException; | PsiComment createCommentFromText(@NotNull String text, PsiElement context) throws IncorrectOperationException; | /**
* Creates a Java comment from the specified text.
*
* @param text the text of the comment to create.
* @param context the PSI element used as context for resolving references from the comment.
* @return the created comment instance.
* @throws com.intellij.util.IncorrectOperationException if the... | Creates a Java comment from the specified text | createCommentFromText | {
"repo_name": "jexp/idea2",
"path": "java/openapi/src/com/intellij/psi/PsiJavaParserFacade.java",
"license": "apache-2.0",
"size": 9079
} | [
"com.intellij.util.IncorrectOperationException",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; | import com.intellij.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.util",
"org.jetbrains.annotations"
] | com.intellij.util; org.jetbrains.annotations; | 2,566,851 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String id = request.getParameter("id");
String password = request.getParameter("password");
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); String id = request.getParameter("id"); String password = request.getParameter(STR); try (PrintWriter out = response.getWriter()) { Connection conn = null; PreparedStatement ps = ... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "chechiachang/blue-villa",
"path": "src/main/java/com/ccc/bm/action/EditUserPasswordAction.java",
"license": "mit",
"size": 4177
} | [
"com.ccc.bm.entity.JdbcConn",
"java.io.IOException",
"java.io.PrintWriter",
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import com.ccc.bm.entity.JdbcConn; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet... | import com.ccc.bm.entity.*; import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; | [
"com.ccc.bm",
"java.io",
"java.sql",
"javax.servlet"
] | com.ccc.bm; java.io; java.sql; javax.servlet; | 2,520,796 |
protected void populateDimensions(List<VariableDefinition> vs,
QueryCoordinateSystem csys) throws IOException,
QueryConfigurationException {
if (vs == null)
return;
for (VariableDefinition vardef : vs) {
String dim = vardef.dimensions;
Array array;
if (!dim.equals("time")) {
GridProjected... | void function(List<VariableDefinition> vs, QueryCoordinateSystem csys) throws IOException, QueryConfigurationException { if (vs == null) return; for (VariableDefinition vardef : vs) { String dim = vardef.dimensions; Array array; if (!dim.equals("time")) { GridProjected grid = csys.getGrid(); int di = getVectorIndex(gri... | /**
* Copy data from variables in existing datasets into the output.
*
* @param csys
*/ | Copy data from variables in existing datasets into the output | populateDimensions | {
"repo_name": "VPAC/rsa",
"path": "src/rsaquery/src/org/vpac/ndg/query/DatasetOutput.java",
"license": "gpl-3.0",
"size": 23056
} | [
"java.io.IOException",
"java.util.List",
"org.vpac.ndg.query.QueryDefinition",
"org.vpac.ndg.query.coordinates.GridProjected",
"org.vpac.ndg.query.coordinates.QueryCoordinateSystem",
"org.vpac.ndg.query.coordinates.TimeAxis"
] | import java.io.IOException; import java.util.List; import org.vpac.ndg.query.QueryDefinition; import org.vpac.ndg.query.coordinates.GridProjected; import org.vpac.ndg.query.coordinates.QueryCoordinateSystem; import org.vpac.ndg.query.coordinates.TimeAxis; | import java.io.*; import java.util.*; import org.vpac.ndg.query.*; import org.vpac.ndg.query.coordinates.*; | [
"java.io",
"java.util",
"org.vpac.ndg"
] | java.io; java.util; org.vpac.ndg; | 1,449,663 |
public void setExcludedFulfillmentOptions(List<FulfillmentOption> excludedFulfillmentOptions); | void function(List<FulfillmentOption> excludedFulfillmentOptions); | /**
* Sets the {@link FulfillmentOption}s that this Sku should be excluded from being apart of
*
* @param excludedFulfillmentOptions
*/ | Sets the <code>FulfillmentOption</code>s that this Sku should be excluded from being apart of | setExcludedFulfillmentOptions | {
"repo_name": "sanlingdd/broadleaf",
"path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/catalog/domain/Sku.java",
"license": "apache-2.0",
"size": 22073
} | [
"java.util.List",
"org.broadleafcommerce.core.order.domain.FulfillmentOption"
] | import java.util.List; import org.broadleafcommerce.core.order.domain.FulfillmentOption; | import java.util.*; import org.broadleafcommerce.core.order.domain.*; | [
"java.util",
"org.broadleafcommerce.core"
] | java.util; org.broadleafcommerce.core; | 1,217,680 |
public static boolean executeQuery(final String query) {
log.trace("Executing query: " + query);
Statement stmt = null;
try {
stmt = connection.createStatement();
final ResultSet rs = stmt.executeQuery(query);
} catch (SQLException e) {
log.warn(" ... | static boolean function(final String query) { log.trace(STR + query); Statement stmt = null; try { stmt = connection.createStatement(); final ResultSet rs = stmt.executeQuery(query); } catch (SQLException e) { log.warn(STR, e); return false; } finally { if (stmt != null) { try { stmt.close(); } catch (SQLException ex) ... | /**
* Execute the given query, return true if passed, false otherwise.
*/ | Execute the given query, return true if passed, false otherwise | executeQuery | {
"repo_name": "adbms-benchmark/storage",
"path": "src/system/sciql/SciQLConnection.java",
"license": "mit",
"size": 5678
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,840,279 |
public DatabaseConnection getDatabaseConnection() {
return (DatabaseConnection)connectionsCombo.getSelectedItem();
} | DatabaseConnection function() { return (DatabaseConnection)connectionsCombo.getSelectedItem(); } | /**
* Returns the selected database connection properties object.
*
* @return the connection properties object
*/ | Returns the selected database connection properties object | getDatabaseConnection | {
"repo_name": "takisd123/executequery",
"path": "src/org/executequery/gui/scriptgenerators/GenerateScriptsPanelOne.java",
"license": "gpl-3.0",
"size": 3870
} | [
"org.executequery.databasemediators.DatabaseConnection"
] | import org.executequery.databasemediators.DatabaseConnection; | import org.executequery.databasemediators.*; | [
"org.executequery.databasemediators"
] | org.executequery.databasemediators; | 2,282,550 |
public void execute( String[] arguments ) throws KettleException {
prepareExecution( arguments );
startThreads();
} | void function( String[] arguments ) throws KettleException { prepareExecution( arguments ); startThreads(); } | /**
* Executes the transformation. This method will prepare the transformation for execution and then start all the
* threads associated with the transformation and its steps.
*
* @param arguments
* the arguments
* @throws KettleException
* if the transformation could not be prep... | Executes the transformation. This method will prepare the transformation for execution and then start all the threads associated with the transformation and its steps | execute | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 197880
} | [
"org.pentaho.di.core.exception.KettleException"
] | import org.pentaho.di.core.exception.KettleException; | import org.pentaho.di.core.exception.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,578,052 |
public int hashCode() {
int result = 193;
result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
result = 37 * result + this.gradientPaintTransformer.hashCode();
return result;
} | int function() { int result = 193; result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.gradientPaintTransformer.hashCode(); return result; } | /**
* Returns a hash code for this instance.
*
* @return The hash code.
*/ | Returns a hash code for this instance | hashCode | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/plot/dial/DialBackground.java",
"license": "mit",
"size": 8396
} | [
"org.jfree.chart.HashUtilities"
] | import org.jfree.chart.HashUtilities; | import org.jfree.chart.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,674,573 |
EClass getBlock(); | EClass getBlock(); | /**
* Returns the meta object for class '{@link br.ufpe.ines.decode.decode.artifacts.questionnaire.Block <em>Block</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Block</em>'.
* @see br.ufpe.ines.decode.decode.artifacts.questionnaire.Block
* @generated
*/ | Returns the meta object for class '<code>br.ufpe.ines.decode.decode.artifacts.questionnaire.Block Block</code>'. | getBlock | {
"repo_name": "netuh/DecodePlatformPlugin",
"path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model/src/br/ufpe/ines/decode/decode/artifacts/questionnaire/QuestionnairePackage.java",
"license": "gpl-3.0",
"size": 38583
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,290,519 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<AzureFirewallInner>> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
"Parameter this.client.ge... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<AzureFirewallInner>> function() { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String apiV... | /**
* Gets all the Azure Firewalls in a subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all the Azure Firewalls in a subscription.
*/ | Gets all the Azure Firewalls in a subscription | listSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java",
"license": "mit",
"size": 72271
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.network.fluent.models.AzureFirewallInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.network.fluent.models.AzureFirewallInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,294,368 |
public X509Store getCRLs(
String type,
Provider provider)
throws NoSuchStoreException, CMSException
{
if (crlStore == null)
{
crlStore = HELPER.createCRLsStore(type, provider, signedData.getCRLs());
}
return crlStore;
} | X509Store function( String type, Provider provider) throws NoSuchStoreException, CMSException { if (crlStore == null) { crlStore = HELPER.createCRLsStore(type, provider, signedData.getCRLs()); } return crlStore; } | /**
* return a X509Store containing CRLs, if any, contained
* in this message.
*
* @param type type of store to create
* @param provider provider to use
* @return a store of CRLs
* @exception NoSuchStoreException if the store type isn't available.
* @exception CMSException if a g... | return a X509Store containing CRLs, if any, contained in this message | getCRLs | {
"repo_name": "sake/bouncycastle-java",
"path": "jdk1.1/org/bouncycastle/cms/CMSSignedData.java",
"license": "mit",
"size": 24725
} | [
"java.security.Provider",
"org.bouncycastle.x509.NoSuchStoreException",
"org.bouncycastle.x509.X509Store"
] | import java.security.Provider; import org.bouncycastle.x509.NoSuchStoreException; import org.bouncycastle.x509.X509Store; | import java.security.*; import org.bouncycastle.x509.*; | [
"java.security",
"org.bouncycastle.x509"
] | java.security; org.bouncycastle.x509; | 2,393,276 |
public Object getDataArray(int b) {
Object dataArray = null;
switch(getDataType()) {
case DataBuffer.TYPE_BYTE:
dataArray = getByteDataArray(b);
break;
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_USHORT:
dataArray = getShortD... | Object function(int b) { Object dataArray = null; switch(getDataType()) { case DataBuffer.TYPE_BYTE: dataArray = getByteDataArray(b); break; case DataBuffer.TYPE_SHORT: case DataBuffer.TYPE_USHORT: dataArray = getShortDataArray(b); break; case DataBuffer.TYPE_INT: dataArray = getIntDataArray(b); break; case DataBuffer.... | /**
* Returns the image data as an Object for a specific band.
*
* @param b The index of the image band of interest.
*/ | Returns the image data as an Object for a specific band | getDataArray | {
"repo_name": "RoProducts/rastertheque",
"path": "JAILibrary/src/javax/media/jai/RasterAccessor.java",
"license": "gpl-2.0",
"size": 59338
} | [
"java.awt.image.DataBuffer"
] | import java.awt.image.DataBuffer; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,710,157 |
CharacterEncodingFilter filter = new CharacterEncodingFilter();
filter.setEncoding("UTF-8");
filter.setForceEncoding(true);
http.addFilterBefore(filter,CsrfFilter.class);
if(!onHeroku) {
http.requiresChannel().anyRequest().requiresSecure();
}
http
.csrf().disab... | CharacterEncodingFilter filter = new CharacterEncodingFilter(); filter.setEncoding("UTF-8"); filter.setForceEncoding(true); http.addFilterBefore(filter,CsrfFilter.class); if(!onHeroku) { http.requiresChannel().anyRequest().requiresSecure(); } http .csrf().disable() .authorizeRequests() .antMatchers(HttpMethod.GET, STR ... | /**
* HTTP security configuration
*/ | HTTP security configuration | configure | {
"repo_name": "colitman/MyExpence",
"path": "src/main/java/ua/hobbydev/webapp/expense/config/SecurityConfig.java",
"license": "mit",
"size": 3292
} | [
"org.springframework.http.HttpMethod",
"org.springframework.security.web.csrf.CsrfFilter",
"org.springframework.security.web.util.matcher.AntPathRequestMatcher",
"org.springframework.web.filter.CharacterEncodingFilter"
] | import org.springframework.http.HttpMethod; import org.springframework.security.web.csrf.CsrfFilter; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.web.filter.CharacterEncodingFilter; | import org.springframework.http.*; import org.springframework.security.web.csrf.*; import org.springframework.security.web.util.matcher.*; import org.springframework.web.filter.*; | [
"org.springframework.http",
"org.springframework.security",
"org.springframework.web"
] | org.springframework.http; org.springframework.security; org.springframework.web; | 48,366 |
void changeTitle(String id, String title) {
BossBar bar = barMap.get(id);
if (bar != null) {
bar.setTitle(title);
barMap.put(id, bar);
}
} | void changeTitle(String id, String title) { BossBar bar = barMap.get(id); if (bar != null) { bar.setTitle(title); barMap.put(id, bar); } } | /**
* Changed the title of a bossbar from the BossBarManager through the stored ID.
*
* @param id The ID text for the bossbar.
* @param title The new title for the bossbar with color codes.
*/ | Changed the title of a bossbar from the BossBarManager through the stored ID | changeTitle | {
"repo_name": "eyesniper2/skRayFall",
"path": "src/main/java/net/rayfall/eyesniper2/skrayfall/bossbar/BossBarManager.java",
"license": "gpl-3.0",
"size": 6326
} | [
"org.bukkit.boss.BossBar"
] | import org.bukkit.boss.BossBar; | import org.bukkit.boss.*; | [
"org.bukkit.boss"
] | org.bukkit.boss; | 908,003 |
public String doDeleteAllAttachments (String rd_idseq)
{
PreparedStatement pstmt = null;
msg = "";
String DelObjSQL = "delete from sbr.REFERENCE_BLOBS_VIEW where RD_IDSEQ = ?";
try {
pstmt = m_servlet.getConn().prepareStatement(DelObjSQL);
pstmt.setString(1, rd_idseq);
pstmt.execu... | String function (String rd_idseq) { PreparedStatement pstmt = null; msg = STRdelete from sbr.REFERENCE_BLOBS_VIEW where RD_IDSEQ = ?STRError - doDeleteAllAttachments: STRUnable to delete all the Attachments from the database for the selected Reference Document."; }finally{ pstmt = SQLHelper.closePreparedStatement(pstmt... | /**
* removes all the attachments for the selected RD called while removing RD.
* @param rd_idseq
* @return String of error message
*/ | removes all the attachments for the selected RD called while removing RD | doDeleteAllAttachments | {
"repo_name": "NCIP/cadsr-cdecurate",
"path": "src/gov/nih/nci/cadsr/cdecurate/tool/RefDocAttachment.java",
"license": "bsd-3-clause",
"size": 21655
} | [
"gov.nih.nci.cadsr.cdecurate.database.SQLHelper",
"java.sql.PreparedStatement"
] | import gov.nih.nci.cadsr.cdecurate.database.SQLHelper; import java.sql.PreparedStatement; | import gov.nih.nci.cadsr.cdecurate.database.*; import java.sql.*; | [
"gov.nih.nci",
"java.sql"
] | gov.nih.nci; java.sql; | 156,142 |
public Map<ItemConfiguration, String> getTr064Values(Collection<ItemConfiguration> itemConfigurations) {
Map<ItemConfiguration, String> values = new HashMap<>();
for (ItemConfiguration itemConfiguration : itemConfigurations) {
String itemCommand = itemConfiguration.getItemCommand();
... | Map<ItemConfiguration, String> function(Collection<ItemConfiguration> itemConfigurations) { Map<ItemConfiguration, String> values = new HashMap<>(); for (ItemConfiguration itemConfiguration : itemConfigurations) { String itemCommand = itemConfiguration.getItemCommand(); if (values.containsKey(itemConfiguration)) { cont... | /**
* Fetches the values for the given item configurations from the FritzBox. Calls
* the FritzBox SOAP services delivering the values for the item configurations.
* The resulting map contains the values of all item configurations returned by
* the invoked services. This can be more items than were ... | Fetches the values for the given item configurations from the FritzBox. Calls the FritzBox SOAP services delivering the values for the item configurations. The resulting map contains the values of all item configurations returned by the invoked services. This can be more items than were given as parameter | getTr064Values | {
"repo_name": "ssalonen/openhab",
"path": "bundles/binding/org.openhab.binding.fritzboxtr064/src/main/java/org/openhab/binding/fritzboxtr064/internal/Tr064Comm.java",
"license": "epl-1.0",
"size": 44201
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"javax.xml.namespace.QName",
"javax.xml.soap.MessageFactory",
"javax.xml.soap.SOAPBody",
"javax.xml.soap.SOAPBodyElement",
"javax.xml.soap.SOAPElement",
"javax.xml.soap.SOAPMessage"
] | import java.util.Collection; import java.util.HashMap; import java.util.Map; import javax.xml.namespace.QName; import javax.xml.soap.MessageFactory; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPBodyElement; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPMessage; | import java.util.*; import javax.xml.namespace.*; import javax.xml.soap.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 2,821,400 |
public static <T> T toPojo (InputStream jsonInputStream, Class<T> pojoClass) throws JsonParseException, JsonMappingException, IOException {
return objectMapper.readValue(jsonInputStream, pojoClass);
} | static <T> T function (InputStream jsonInputStream, Class<T> pojoClass) throws JsonParseException, JsonMappingException, IOException { return objectMapper.readValue(jsonInputStream, pojoClass); } | /**
* Converts the input JSON InputStream, to a POJO of the class specified as pojoClass.
*
* @param <T> the type of the POJO
* @param jsonInputStream the input stream to the JSON object
* @param pojoClass the class to deserialize into
* @return the instance of the pojoClass with member v... | Converts the input JSON InputStream, to a POJO of the class specified as pojoClass | toPojo | {
"repo_name": "heremaps/here-aaa-java-sdk",
"path": "here-oauth-client/src/main/java/com/here/account/util/JsonSerializer.java",
"license": "apache-2.0",
"size": 4697
} | [
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.databind.JsonMappingException",
"java.io.IOException",
"java.io.InputStream"
] | import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import java.io.IOException; import java.io.InputStream; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.io.*; | [
"com.fasterxml.jackson",
"java.io"
] | com.fasterxml.jackson; java.io; | 307,537 |
if (obj instanceof Expression) { | if (obj instanceof Expression) { | /**
* Creates a new mapping from an {@code MapCSS} object.
* In case of an {@link Expression}, that is evaluated on the matched {@link OsmPrimitive}.
* In case of a {@link String}, that is "compiled" to a {@link Tag} instance.
*/ | Creates a new mapping from an MapCSS object. In case of an <code>Expression</code>, that is evaluated on the matched <code>OsmPrimitive</code>. In case of a <code>String</code>, that is "compiled" to a <code>Tag</code> instance | ofMapCSSObject | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java",
"license": "gpl-3.0",
"size": 19827
} | [
"org.openstreetmap.josm.gui.mappaint.mapcss.Expression"
] | import org.openstreetmap.josm.gui.mappaint.mapcss.Expression; | import org.openstreetmap.josm.gui.mappaint.mapcss.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 31,924 |
public io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest> streamingDetectIntent(
io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse> responseObserver) {
return asyncBidiStreamingCall(
getChannel().newCall(getStreamin... | io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest> function( io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse> responseObserver) { return asyncBidiStreamingCall( getChannel().newCall(getStreamingDetectIntentMethodHelper(), getCallOptions()), ... | /**
* <pre>
* Processes a natural language query in audio format in a streaming fashion
* and returns structured, actionable data as a result. This method is only
* available via the gRPC API (not REST).
* </pre>
*/ | <code> Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST). </code> | streamingDetectIntent | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionsGrpc.java",
"license": "bsd-3-clause",
"size": 18643
} | [
"io.grpc.stub.ClientCalls",
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 853,754 |
public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
return this;
} | PrivateEndpointConnectionProperties function( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } | /**
* Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
* between service consumer and provider.
*
* @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
* @return the PrivateEndpointConnecti... | Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection between service consumer and provider | withPrivateLinkServiceConnectionState | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/PrivateEndpointConnectionProperties.java",
"license": "mit",
"size": 3882
} | [
"com.azure.resourcemanager.containerregistry.models.PrivateLinkServiceConnectionState"
] | import com.azure.resourcemanager.containerregistry.models.PrivateLinkServiceConnectionState; | import com.azure.resourcemanager.containerregistry.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,665,956 |
private List<FilesystemTreeNode> calculateChildrenNodes() {
if (file == null) {
return Collections.emptyList();
}
if (!file.isDirectory()) {
return Collections.emptyList();
}
File[] files = file.listFiles();
if (files == null) {
return Collections.emptyList();
}
boolean snd = false;
boo... | List<FilesystemTreeNode> function() { if (file == null) { return Collections.emptyList(); } if (!file.isDirectory()) { return Collections.emptyList(); } File[] files = file.listFiles(); if (files == null) { return Collections.emptyList(); } boolean snd = false; boolean gfx = false; List<FilesystemTreeNode> list = new A... | /**
* Calculates the children and returns them.
*
* @return
*/ | Calculates the children and returns them | calculateChildrenNodes | {
"repo_name": "JKatzwinkel/settlers-remake",
"path": "jsettlers.main.swing/src/jsettlers/main/swing/foldertree/FilesystemTreeNode.java",
"license": "mit",
"size": 5989
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,537,421 |
private static String getPass(String name)
{
if(name.length() == 0)
return "";
File file = new File("world" + File.separator +
"craftbook" + File.separator +
"mcx121.txt");
if (!file.exists())
return null;
FileInputStream fs = null;
BufferedReader br = null;
String pas... | static String function(String name) { if(name.length() == 0) return STRworldSTRcraftbookSTRmcx121.txtSTRSTR:STRSTR"; } finally { try { if(br != null) br.close(); } catch(IOException e) { } } return pass; } | /** Gets password from file. Using file instead of storing in memory because I
* do not believe this feature will be used too often.
*
* @param name
* @return Returns password, empty string if no password was found, or null if
* file was not found.
*/ | Gets password from file. Using file instead of storing in memory because I do not believe this feature will be used too often | getPass | {
"repo_name": "14mRh4X0r/craftbook",
"path": "src/MCX121Pass.java",
"license": "gpl-3.0",
"size": 7094
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 215,386 |
@RequiresPermissions(PAYMENT_CAN_TRIGGER_PAYMENT)
public Payment createCapture(Account account, UUID paymentId, BigDecimal amount, Currency currency, DateTime effectiveDate,
String paymentTransactionExternalKey, Iterable<PluginProperty> properties,
... | @RequiresPermissions(PAYMENT_CAN_TRIGGER_PAYMENT) Payment function(Account account, UUID paymentId, BigDecimal amount, Currency currency, DateTime effectiveDate, String paymentTransactionExternalKey, Iterable<PluginProperty> properties, CallContext context) throws PaymentApiException; | /**
* Capture a previously authorized payment.
*
* @param account the account
* @param amount the amount to pay
* @param currency the amount currency
* @param effectiveDate the effectiveDate... | Capture a previously authorized payment | createCapture | {
"repo_name": "killbill/killbill-api",
"path": "src/main/java/org/killbill/billing/payment/api/PaymentApi.java",
"license": "apache-2.0",
"size": 39831
} | [
"java.math.BigDecimal",
"org.joda.time.DateTime",
"org.killbill.billing.account.api.Account",
"org.killbill.billing.catalog.api.Currency",
"org.killbill.billing.security.RequiresPermissions",
"org.killbill.billing.util.callcontext.CallContext"
] | import java.math.BigDecimal; import org.joda.time.DateTime; import org.killbill.billing.account.api.Account; import org.killbill.billing.catalog.api.Currency; import org.killbill.billing.security.RequiresPermissions; import org.killbill.billing.util.callcontext.CallContext; | import java.math.*; import org.joda.time.*; import org.killbill.billing.account.api.*; import org.killbill.billing.catalog.api.*; import org.killbill.billing.security.*; import org.killbill.billing.util.callcontext.*; | [
"java.math",
"org.joda.time",
"org.killbill.billing"
] | java.math; org.joda.time; org.killbill.billing; | 1,141,848 |
int index = getIndex(dataSet);
File file = new File(path, "/results/" + extDir + "/" + (simIndex + 1) + "/graph." + index + ".txt");
System.out.println(file.getAbsolutePath());
Graph graph = GraphUtils.loadGraphTxt(file);
GraphUtils.circleLayout(graph, 225, 200, 150);
return grap... | int index = getIndex(dataSet); File file = new File(path, STR + extDir + "/" + (simIndex + 1) + STR + index + ".txt"); System.out.println(file.getAbsolutePath()); Graph graph = GraphUtils.loadGraphTxt(file); GraphUtils.circleLayout(graph, 225, 200, 150); return graph; } | /**
* Reads in the relevant graph from the file and returns it.
*/ | Reads in the relevant graph from the file and returns it | search | {
"repo_name": "bd2kccd/tetradR",
"path": "java/edu/cmu/tetrad/algcomparison/algorithm/external/ExternalAlgorithmTetrad.java",
"license": "gpl-3.0",
"size": 3571
} | [
"edu.cmu.tetrad.graph.Graph",
"edu.cmu.tetrad.graph.GraphUtils",
"java.io.File"
] | import edu.cmu.tetrad.graph.Graph; import edu.cmu.tetrad.graph.GraphUtils; import java.io.File; | import edu.cmu.tetrad.graph.*; import java.io.*; | [
"edu.cmu.tetrad",
"java.io"
] | edu.cmu.tetrad; java.io; | 2,112,810 |
public static void copyArchiveEntries(File srcFile, AbstractArchiver archiver, Map<String, String> entries) throws IOException {
ArchiveUtils.copyArchiveEntries(ArchiveUtils.getUnArchiver(srcFile), archiver, entries);
} | static void function(File srcFile, AbstractArchiver archiver, Map<String, String> entries) throws IOException { ArchiveUtils.copyArchiveEntries(ArchiveUtils.getUnArchiver(srcFile), archiver, entries); } | /**
* Copy entries from one archive to another
*
* @param java.io.File srcFile
* @param org.codehaus.plexus.archiver.AbstractArchiver archiver
* @param java.util.Map<String, String> entries
*/ | Copy entries from one archive to another | copyArchiveEntries | {
"repo_name": "xp-forge/xp-maven-plugin",
"path": "src/main/java/net/xp_forge/maven/plugins/xp/util/ArchiveUtils.java",
"license": "bsd-3-clause",
"size": 6223
} | [
"java.io.File",
"java.io.IOException",
"java.util.Map",
"org.codehaus.plexus.archiver.AbstractArchiver"
] | import java.io.File; import java.io.IOException; import java.util.Map; import org.codehaus.plexus.archiver.AbstractArchiver; | import java.io.*; import java.util.*; import org.codehaus.plexus.archiver.*; | [
"java.io",
"java.util",
"org.codehaus.plexus"
] | java.io; java.util; org.codehaus.plexus; | 535,860 |
@Schema(description = "Modification date")
public DateTime getUpdatedAt() {
return updatedAt;
} | @Schema(description = STR) DateTime function() { return updatedAt; } | /**
* Modification date
* @return updatedAt
**/ | Modification date | getUpdatedAt | {
"repo_name": "iterate-ch/cyberduck",
"path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/Group.java",
"license": "gpl-3.0",
"size": 7176
} | [
"io.swagger.v3.oas.annotations.media.Schema",
"org.joda.time.DateTime"
] | import io.swagger.v3.oas.annotations.media.Schema; import org.joda.time.DateTime; | import io.swagger.v3.oas.annotations.media.*; import org.joda.time.*; | [
"io.swagger.v3",
"org.joda.time"
] | io.swagger.v3; org.joda.time; | 935,590 |
@ServiceMethod(returns = ReturnType.SINGLE)
void objectLevelWorm(String resourceGroupName, String accountName, String containerName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) void objectLevelWorm(String resourceGroupName, String accountName, String containerName, Context context); | /**
* This operation migrates a blob container from container level WORM to object level immutability enabled
* container. Prerequisites require a container level immutability policy either in locked or unlocked state,
* Account level versioning must be enabled and there should be no Legal hold on the co... | This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container | objectLevelWorm | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/BlobContainersClient.java",
"license": "mit",
"size": 104918
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 32,815 |
protected void onRequestCommitted() throws IOException
{
} | void function() throws IOException { } | /**
* Callback called when the request headers have been sent to the server. This implementation does nothing.
*
* @throws IOException
* allowed to be thrown by overriding code
*/ | Callback called when the request headers have been sent to the server. This implementation does nothing | onRequestCommitted | {
"repo_name": "thomasbecker/jetty-spdy",
"path": "jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java",
"license": "apache-2.0",
"size": 38272
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,775,108 |
private void insertCollationKey(long rawContactId, long dataId, int tokenCount) {
mStringBuilder.setLength(0);
for (int i = 0; i < tokenCount; i++) {
mStringBuilder.append(mNames[i]);
}
insertNameLookup(rawContactId, dataId, NameLookupType.NAME_COLLATION_KEY,
... | void function(long rawContactId, long dataId, int tokenCount) { mStringBuilder.setLength(0); for (int i = 0; i < tokenCount; i++) { mStringBuilder.append(mNames[i]); } insertNameLookup(rawContactId, dataId, NameLookupType.NAME_COLLATION_KEY, mStringBuilder.toString()); } | /**
* Inserts a collation key for the current contents of {@link #mNames}.
*/ | Inserts a collation key for the current contents of <code>#mNames</code> | insertCollationKey | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/providers/ContactsProvider/src/com/android/providers/contacts/NameLookupBuilder.java",
"license": "gpl-3.0",
"size": 13210
} | [
"com.android.providers.contacts.ContactsDatabaseHelper"
] | import com.android.providers.contacts.ContactsDatabaseHelper; | import com.android.providers.contacts.*; | [
"com.android.providers"
] | com.android.providers; | 1,619,355 |
protected Size2D arrangeRR(BlockContainer container, Graphics2D g2,
RectangleConstraint constraint) {
Size2D size1 = arrange(container, g2, RectangleConstraint.NONE);
if (constraint.getWidthRange().contains(size1.getWidth())) {
if (constraint.getHeightRan... | Size2D function(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { Size2D size1 = arrange(container, g2, RectangleConstraint.NONE); if (constraint.getWidthRange().contains(size1.getWidth())) { if (constraint.getHeightRange().contains(size1.getHeight())) { return size1; } else { double h = constr... | /**
* Arrange with ranges for both the width and height constraints.
*
* @param container the container.
* @param constraint the constraint.
* @param g2 the graphics device.
*
* @return The size of the arrangement.
*/ | Arrange with ranges for both the width and height constraints | arrangeRR | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/block/GridArrangement.java",
"license": "mit",
"size": 15780
} | [
"java.awt.Graphics2D",
"org.jfree.ui.Size2D"
] | import java.awt.Graphics2D; import org.jfree.ui.Size2D; | import java.awt.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.ui"
] | java.awt; org.jfree.ui; | 2,144,940 |
static boolean checkBit(int pos, ByteBuff bloomBuf, int bloomOffset) {
int bytePos = pos >> 3; //pos / 8
int bitPos = pos & 0x7; //pos % 8
byte curByte = bloomBuf.get(bloomOffset + bytePos);
curByte &= bitvals[bitPos];
return (curByte != 0);
} | static boolean checkBit(int pos, ByteBuff bloomBuf, int bloomOffset) { int bytePos = pos >> 3; int bitPos = pos & 0x7; byte curByte = bloomBuf.get(bloomOffset + bytePos); curByte &= bitvals[bitPos]; return (curByte != 0); } | /**
* Check if bit at specified index is 1.
*
* @param pos index of bit
* @return true if bit at specified index is 1, false if 0.
*/ | Check if bit at specified index is 1 | checkBit | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/BloomFilterUtil.java",
"license": "apache-2.0",
"size": 9250
} | [
"org.apache.hadoop.hbase.nio.ByteBuff"
] | import org.apache.hadoop.hbase.nio.ByteBuff; | import org.apache.hadoop.hbase.nio.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 920,154 |
private JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getMainPanel(), BorderLayout.CENTER);
}
return jContentPane;
} | JPanel function() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getMainPanel(), BorderLayout.CENTER); } return jContentPane; } | /**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/ | This method initializes jContentPane | getJContentPane | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gridgrouper/selector/GroupSelector.java",
"license": "bsd-3-clause",
"size": 9481
} | [
"java.awt.BorderLayout",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,603,493 |
Map<String, String> optionalContext(); | Map<String, String> optionalContext(); | /**
* Specifies a context of optional parameters that if exist should have the given values. This
* enables further disambiguating if there are multiple factories that meet the {@link
* #requiredContext()} and {@link #supportedProperties()}.
*
* <p><b>NOTE:</b> All the property keys should be i... | Specifies a context of optional parameters that if exist should have the given values. This enables further disambiguating if there are multiple factories that meet the <code>#requiredContext()</code> and <code>#supportedProperties()</code> | optionalContext | {
"repo_name": "rmetzger/flink",
"path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/ComponentFactory.java",
"license": "apache-2.0",
"size": 1921
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 29,891 |
public IndexWriterConfig setCodec(Codec codec) {
if (codec == null) {
throw new IllegalArgumentException("codec must not be null");
}
this.codec = codec;
return this;
} | IndexWriterConfig function(Codec codec) { if (codec == null) { throw new IllegalArgumentException(STR); } this.codec = codec; return this; } | /**
* Set the {@link Codec}.
*
* <p>
* Only takes effect when IndexWriter is first created.
*/ | Set the <code>Codec</code>. Only takes effect when IndexWriter is first created | setCodec | {
"repo_name": "visouza/solr-5.0.0",
"path": "lucene/core/src/java/org/apache/lucene/index/IndexWriterConfig.java",
"license": "apache-2.0",
"size": 17219
} | [
"org.apache.lucene.codecs.Codec"
] | import org.apache.lucene.codecs.Codec; | import org.apache.lucene.codecs.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 2,685,443 |
Collection<Integer> apply(@Nullable PartitionClientContext cliCtx, Object... args) throws IgniteCheckedException; | Collection<Integer> apply(@Nullable PartitionClientContext cliCtx, Object... args) throws IgniteCheckedException; | /**
* Get partitions.
*
* @param cliCtx Thin client context (optional).
* @param args Query arguments.
* @return Partitions.
* @throws IgniteCheckedException If failed.
*/ | Get partitions | apply | {
"repo_name": "ptupitsyn/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/sql/optimizer/affinity/PartitionNode.java",
"license": "apache-2.0",
"size": 1696
} | [
"java.util.Collection",
"org.apache.ignite.IgniteCheckedException",
"org.jetbrains.annotations.Nullable"
] | import java.util.Collection; import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable; | import java.util.*; import org.apache.ignite.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.util; org.apache.ignite; org.jetbrains.annotations; | 1,651,064 |
private void resetKeyComparator() {
if (btreeComparator instanceof DatabaseComparator) {
((DatabaseComparator) btreeComparator).initialize
(envImpl.getClassLoader());
}
if (duplicateComparator instanceof DatabaseComparator) {
((DatabaseCompar... | void function() { if (btreeComparator instanceof DatabaseComparator) { ((DatabaseComparator) btreeComparator).initialize (envImpl.getClassLoader()); } if (duplicateComparator instanceof DatabaseComparator) { ((DatabaseComparator) duplicateComparator).initialize (envImpl.getClassLoader()); } if (getSortedDuplicates()) {... | /**
* Key comparator is derived from the duplicate and btree comparator
*/ | Key comparator is derived from the duplicate and btree comparator | resetKeyComparator | {
"repo_name": "prat0318/dbms",
"path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/dbi/DatabaseImpl.java",
"license": "mit",
"size": 99095
} | [
"com.sleepycat.je.DatabaseComparator"
] | import com.sleepycat.je.DatabaseComparator; | import com.sleepycat.je.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 682,026 |
@Override
public boolean isEnabled() {
init();
final Goals currentGoals = Lookup.getDefault().lookup(MixR.class).getGoalManager().getCurrentGoals();
if (currentGoals == null || !(currentGoals.getOwner() instanceof GoalAcceptingReasoner)) {
return false;
}
re... | boolean function() { init(); final Goals currentGoals = Lookup.getDefault().lookup(MixR.class).getGoalManager().getCurrentGoals(); if (currentGoals == null !(currentGoals.getOwner() instanceof GoalAcceptingReasoner)) { return false; } return lookupInfo != null && !lookupInfo.allInstances().isEmpty(); } | /**
* Inference rules are enabled only if the goal-providing reasoner is able
* to accept transformed goals and if the user actually selected a
* transformation target
*
* @return {@code true} if this action should be enabled.
*/ | Inference rules are enabled only if the goal-providing reasoner is able to accept transformed goals and if the user actually selected a transformation target | isEnabled | {
"repo_name": "urbas/mixr",
"path": "devel/MixR/src/mixr/ui/actions/ApplyInferenceRuleAction.java",
"license": "mit",
"size": 10642
} | [
"org.openide.util.Lookup"
] | import org.openide.util.Lookup; | import org.openide.util.*; | [
"org.openide.util"
] | org.openide.util; | 1,814,623 |
public void setSecondaryMenu(View v) {
mViewBehind.setSecondaryContent(v);
// mViewBehind.invalidate();
} | void function(View v) { mViewBehind.setSecondaryContent(v); } | /**
* Set the secondary behind view (right menu) content to the given View.
*
* @param view The desired content to display.
*/ | Set the secondary behind view (right menu) content to the given View | setSecondaryMenu | {
"repo_name": "tassadar2002/ouser",
"path": "src/com/slidingmenu/lib/SlidingMenu.java",
"license": "gpl-3.0",
"size": 27642
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 578,400 |
@Test
public void testMarshallRoleMembershipBean() throws Exception {
RoleMembershipBean bean = createBean(RoleMembershipBean.class);
XContentBuilder builder = EsMarshalling.marshall(bean);
Assert.assertEquals("{\"id\":17,\"organizationId\":\"ORGANIZATIONID\",\"roleId\":\"ROLEID\",\"user... | void function() throws Exception { RoleMembershipBean bean = createBean(RoleMembershipBean.class); XContentBuilder builder = EsMarshalling.marshall(bean); Assert.assertEquals("{\"id\":17,\"organizationId\":\"ORGANIZATIONID\",\"roleId\":\"ROLEID\",\"userId\":\"USERID\",\"createdOn\":1}", builder.string()); } | /**
* Test method for {@link io.apiman.manager.api.es.EsMarshalling#marshall(io.apiman.manager.api.beans.idm.RoleMembershipBean)}.
*/ | Test method for <code>io.apiman.manager.api.es.EsMarshalling#marshall(io.apiman.manager.api.beans.idm.RoleMembershipBean)</code> | testMarshallRoleMembershipBean | {
"repo_name": "cmoulliard/apiman",
"path": "manager/api/es/src/test/java/io/apiman/manager/api/es/EsMarshallingTest.java",
"license": "apache-2.0",
"size": 19931
} | [
"io.apiman.manager.api.beans.idm.RoleMembershipBean",
"io.apiman.manager.api.es.util.XContentBuilder",
"org.junit.Assert"
] | import io.apiman.manager.api.beans.idm.RoleMembershipBean; import io.apiman.manager.api.es.util.XContentBuilder; import org.junit.Assert; | import io.apiman.manager.api.beans.idm.*; import io.apiman.manager.api.es.util.*; import org.junit.*; | [
"io.apiman.manager",
"org.junit"
] | io.apiman.manager; org.junit; | 2,277,202 |
public void setValue(String value, String language) throws FormException {
} | void function(String value, String language) throws FormException { } | /**
* Does nothing since a group reference can't be computed from a group name.
*/ | Does nothing since a group reference can't be computed from a group name | setValue | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/silverpeas/form/fieldType/GroupField.java",
"license": "agpl-3.0",
"size": 6765
} | [
"com.silverpeas.form.FormException"
] | import com.silverpeas.form.FormException; | import com.silverpeas.form.*; | [
"com.silverpeas.form"
] | com.silverpeas.form; | 1,817,562 |
public void actionPerformed(ActionEvent e)
{
if (e.getSource() instanceof JComboBox) {
handleSavingTypesSelection();
return;
}
int index = Integer.parseInt(e.getActionCommand());
switch (index) {
case CANCEL:
chooser.cancelSelection();
break;
case SAVE:
chooser.approveSelection();
... | void function(ActionEvent e) { if (e.getSource() instanceof JComboBox) { handleSavingTypesSelection(); return; } int index = Integer.parseInt(e.getActionCommand()); switch (index) { case CANCEL: chooser.cancelSelection(); break; case SAVE: chooser.approveSelection(); break; case PREVIEW: chooser.previewSelection(); bre... | /**
* Reacts to click on the button replacing the ones usually provided by the
* file chooser.
* @see ActionListener#actionPerformed(ActionEvent)
*/ | Reacts to click on the button replacing the ones usually provided by the file chooser | actionPerformed | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/util/saver/ImgSaverUI.java",
"license": "gpl-2.0",
"size": 17182
} | [
"java.awt.event.ActionEvent",
"javax.swing.JComboBox",
"org.openmicroscopy.shoola.util.ui.UIUtilities",
"org.openmicroscopy.shoola.util.ui.filechooser.CreateFolderDialog"
] | import java.awt.event.ActionEvent; import javax.swing.JComboBox; import org.openmicroscopy.shoola.util.ui.UIUtilities; import org.openmicroscopy.shoola.util.ui.filechooser.CreateFolderDialog; | import java.awt.event.*; import javax.swing.*; import org.openmicroscopy.shoola.util.ui.*; import org.openmicroscopy.shoola.util.ui.filechooser.*; | [
"java.awt",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.awt; javax.swing; org.openmicroscopy.shoola; | 1,010,869 |
public java.util.Collection ejbFindByLastName(String lastName)
throws javax.ejb.FinderException{
java.util.Vector keys = new java.util.Vector();
try {
InitialContext jndiContext = new InitialContext( );
DataSource ds = (DataSource)jndiContext.lookup("java:comp/env/jdbc/b... | java.util.Collection function(String lastName) throws javax.ejb.FinderException{ java.util.Vector keys = new java.util.Vector(); try { InitialContext jndiContext = new InitialContext( ); DataSource ds = (DataSource)jndiContext.lookup(STR); Connection con = ds.getConnection(); try { PreparedStatement stmt = con.prepareS... | /**
* Maps to BasicBmpHome.findByPrimaryKey
*
* @param lastName
* @return
* @exception javax.ejb.FinderException
* @see BasicBmpHome#sum
*/ | Maps to BasicBmpHome.findByPrimaryKey | ejbFindByLastName | {
"repo_name": "apache/openejb",
"path": "itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/entity/bmp/BasicBmpBean.java",
"license": "apache-2.0",
"size": 17286
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"javax.ejb.FinderException",
"javax.naming.InitialContext",
"javax.sql.DataSource"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.ejb.FinderException; import javax.naming.InitialContext; import javax.sql.DataSource; | import java.sql.*; import javax.ejb.*; import javax.naming.*; import javax.sql.*; | [
"java.sql",
"javax.ejb",
"javax.naming",
"javax.sql"
] | java.sql; javax.ejb; javax.naming; javax.sql; | 1,335,520 |
public void enter(GameContainer container, StateBasedGame game) throws SlickException {
_bouton_son.setText(container.getMusicVolume() > 0 ? "Désactiver son" : "activer son");
_bouton_fullScreen.setText(container.isFullscreen() ? "Fenêtré" : "Plein écran");
} | void function(GameContainer container, StateBasedGame game) throws SlickException { _bouton_son.setText(container.getMusicVolume() > 0 ? STR : STR); _bouton_fullScreen.setText(container.isFullscreen() ? STR : STR); } | /**
* Notification que l'on entre dans cette boucle de jeu.
* @param container Le contexte dans lequels les composants sont crées et affichés.
* @param game Le contrôleur des différentes boucles de jeu.
*/ | Notification que l'on entre dans cette boucle de jeu | enter | {
"repo_name": "Shadsa/PLA-Project",
"path": "src/graphique/MainScreenGameState.java",
"license": "gpl-3.0",
"size": 6176
} | [
"org.newdawn.slick.GameContainer",
"org.newdawn.slick.SlickException",
"org.newdawn.slick.state.StateBasedGame"
] | import org.newdawn.slick.GameContainer; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; | import org.newdawn.slick.*; import org.newdawn.slick.state.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 2,373,593 |
private ArrayList<Deferred<Object>> atomicGetAndRemoveWaiters() {
synchronized (this) {
try {
return deferred_rootregion;
} finally {
deferred_rootregion = null;
}
}
} | ArrayList<Deferred<Object>> function() { synchronized (this) { try { return deferred_rootregion; } finally { deferred_rootregion = null; } } } | /**
* Atomically returns and {@code null}s out the current list of
* Deferreds waiting for the -ROOT- region.
*/ | Atomically returns and nulls out the current list of Deferreds waiting for the -ROOT- region | atomicGetAndRemoveWaiters | {
"repo_name": "Flipboard/asynchbase",
"path": "src/HBaseClient.java",
"license": "bsd-3-clause",
"size": 144376
} | [
"com.stumbleupon.async.Deferred",
"java.util.ArrayList"
] | import com.stumbleupon.async.Deferred; import java.util.ArrayList; | import com.stumbleupon.async.*; import java.util.*; | [
"com.stumbleupon.async",
"java.util"
] | com.stumbleupon.async; java.util; | 2,502,601 |
private void testForEdgeDirection(LogicalGraph graph, EdgeDirection direction) throws Exception {
Set<String> cities = new HashSet<>(Arrays.asList("Dresden", "Berlin", "Leipzig"));
Set<String> persons = new HashSet<>(Arrays.asList("Eve", "Alice", "Frank", "Dave", "Bob", "Carol"));
UnaryGraphToGraphOperat... | void function(LogicalGraph graph, EdgeDirection direction) throws Exception { Set<String> cities = new HashSet<>(Arrays.asList(STR, STR, STR)); Set<String> persons = new HashSet<>(Arrays.asList("Eve", "Alice", "Frank", "Dave", "Bob", "Carol")); UnaryGraphToGraphOperator extract = new ExtractPropertyFromVertex(STR, "cit... | /**
* A private convenience method for easier testing of different setups in the edge creation process.
*
* @param graph The input graph for the tests.
* @param direction The edge direction the graph is tested for.
* @throws Exception Is thrown if the process cant be executed properly.
*/ | A private convenience method for easier testing of different setups in the edge creation process | testForEdgeDirection | {
"repo_name": "rostam/gradoop",
"path": "gradoop-data-integration/src/test/java/org/gradoop/dataintegration/transformation/impl/ExtractPropertyFromVertexTest.java",
"license": "apache-2.0",
"size": 9498
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.HashMap",
"java.util.HashSet",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.apache.flink.api.java.io.LocalCollectionOutputFormat",
"org.gradoop.common.model.impl.id.GradoopId",
"org.gradoop.common.model.impl.pojo.Edge",
"org.grado... | import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.flink.api.java.io.LocalCollectionOutputFormat; import org.gradoop.common.model.impl.id.GradoopId; import org.gradoop.common.model.... | import java.util.*; import org.apache.flink.api.java.io.*; import org.gradoop.common.model.impl.id.*; import org.gradoop.common.model.impl.pojo.*; import org.gradoop.dataintegration.transformation.impl.config.*; import org.gradoop.flink.model.api.operators.*; import org.gradoop.flink.model.impl.epgm.*; import org.grado... | [
"java.util",
"org.apache.flink",
"org.gradoop.common",
"org.gradoop.dataintegration",
"org.gradoop.flink",
"org.junit"
] | java.util; org.apache.flink; org.gradoop.common; org.gradoop.dataintegration; org.gradoop.flink; org.junit; | 358,297 |
Stream<VarAdmin> getInnerVars(); | Stream<VarAdmin> getInnerVars(); | /**
* Get a stream of any inner {@link VarAdmin} within this `VarProperty`.
*/ | Get a stream of any inner <code>VarAdmin</code> within this `VarProperty` | getInnerVars | {
"repo_name": "aelred/grakn",
"path": "grakn-core/src/main/java/ai/grakn/graql/admin/VarProperty.java",
"license": "gpl-3.0",
"size": 2365
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 413,118 |
private void maybeAddFunction(Function fn, JSModule module) {
String name = fn.getName();
FunctionState fs = getOrCreateFunctionState(name);
// TODO(johnlenz): Maybe "smarten" FunctionState by adding this logic
// to it?
// If the function has multiple definitions, don't inline it.
if (fs.ha... | void function(Function fn, JSModule module) { String name = fn.getName(); FunctionState fs = getOrCreateFunctionState(name); if (fs.hasExistingFunctionDefinition()) { fs.setInline(false); } else { if (fs.canInline()) { fs.setFn(fn); if (injector.isDirectCallNodeReplacementPossible( fn.getFunctionNode())) { fs.inlineDir... | /**
* Updates the FunctionState object for the given function. Checks if the
* given function matches the criteria for an inlinable function.
*/ | Updates the FunctionState object for the given function. Checks if the given function matches the criteria for an inlinable function | maybeAddFunction | {
"repo_name": "abdullah38rcc/closure-compiler",
"path": "src/com/google/javascript/jscomp/InlineFunctions.java",
"license": "apache-2.0",
"size": 34916
} | [
"com.google.javascript.rhino.Node",
"java.util.Set"
] | import com.google.javascript.rhino.Node; import java.util.Set; | import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 982,722 |
public Observable<ServiceResponseWithHeaders<String, RunbookDraftReplaceContentHeaders>> replaceContentWithServiceResponseAsync(String resourceGroupName, String automationAccountName, String runbookName, String runbookContent) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgume... | Observable<ServiceResponseWithHeaders<String, RunbookDraftReplaceContentHeaders>> function(String resourceGroupName, String automationAccountName, String runbookName, String runbookContent) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw ne... | /**
* Replaces the runbook draft content.
*
* @param resourceGroupName Name of an Azure Resource group.
* @param automationAccountName The name of the automation account.
* @param runbookName The runbook name.
* @param runbookContent The runbook draft content.
* @throws IllegalArgumen... | Replaces the runbook draft content | replaceContentWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/automation/mgmt-v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/RunbookDraftsInner.java",
"license": "mit",
"size": 43467
} | [
"com.google.common.reflect.TypeToken",
"com.microsoft.azure.management.automation.v2015_10_31.RunbookDraftReplaceContentHeaders",
"com.microsoft.rest.ServiceResponseWithHeaders"
] | import com.google.common.reflect.TypeToken; import com.microsoft.azure.management.automation.v2015_10_31.RunbookDraftReplaceContentHeaders; import com.microsoft.rest.ServiceResponseWithHeaders; | import com.google.common.reflect.*; import com.microsoft.azure.management.automation.v2015_10_31.*; import com.microsoft.rest.*; | [
"com.google.common",
"com.microsoft.azure",
"com.microsoft.rest"
] | com.google.common; com.microsoft.azure; com.microsoft.rest; | 1,905,077 |
ListenableFuture<MemcacheStatus> replace(String key, V value, int ttl); | ListenableFuture<MemcacheStatus> replace(String key, V value, int ttl); | /**
* Replace a key in memcache with the provided value, with the specified TTL. Key must exist
* in memcache
* @param key The key, must not be null
* @param value The value, must not be null
* @param ttl The TTL in seconds
* @return A future representing completion of the request
*/ | Replace a key in memcache with the provided value, with the specified TTL. Key must exist in memcache | replace | {
"repo_name": "CiNC0/Cartier",
"path": "cartier-mcd/src/main/java/com/spotify/folsom/MemcacheClient.java",
"license": "apache-2.0",
"size": 4657
} | [
"com.google.common.util.concurrent.ListenableFuture"
] | import com.google.common.util.concurrent.ListenableFuture; | import com.google.common.util.concurrent.*; | [
"com.google.common"
] | com.google.common; | 39,884 |
protected double estimateMaximumTickLabelHeight(Graphics2D g2) {
Insets tickLabelInsets = getTickLabelInsets();
double result = tickLabelInsets.top + tickLabelInsets.bottom;
Font tickLabelFont = getTickLabelFont();
FontRenderContext frc = g2.getFontRenderContext();
... | double function(Graphics2D g2) { Insets tickLabelInsets = getTickLabelInsets(); double result = tickLabelInsets.top + tickLabelInsets.bottom; Font tickLabelFont = getTickLabelFont(); FontRenderContext frc = g2.getFontRenderContext(); result += tickLabelFont.getLineMetrics("123", frc).getHeight(); return result; } | /**
* Estimates the maximum tick label height.
*
* @param g2 the graphics device.
*
* @return The maximum height.
*/ | Estimates the maximum tick label height | estimateMaximumTickLabelHeight | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/axis/NumberAxis.java",
"license": "lgpl-3.0",
"size": 51205
} | [
"java.awt.Font",
"java.awt.Graphics2D",
"java.awt.Insets",
"java.awt.font.FontRenderContext"
] | import java.awt.Font; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.font.FontRenderContext; | import java.awt.*; import java.awt.font.*; | [
"java.awt"
] | java.awt; | 1,888,705 |
public static HttpURLConnection getProperties(final URI uri, final RequestOptions options, UriQueryBuilder builder,
final OperationContext opContext) throws IOException, URISyntaxException, StorageException {
if (builder == null) {
builder = new UriQueryBuilder();
}
... | static HttpURLConnection function(final URI uri, final RequestOptions options, UriQueryBuilder builder, final OperationContext opContext) throws IOException, URISyntaxException, StorageException { if (builder == null) { builder = new UriQueryBuilder(); } final HttpURLConnection retConnection = createURLConnection(uri, ... | /**
* Gets the properties. Sign with no length specified.
*
* @param uri
* The Uri to query.
* @param timeout
* The timeout.
* @param builder
* The builder.
* @param opContext
* an object used to track the execution of the op... | Gets the properties. Sign with no length specified | getProperties | {
"repo_name": "iterate-ch/azure-storage-java",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/core/BaseRequest.java",
"license": "apache-2.0",
"size": 20758
} | [
"com.microsoft.azure.storage.Constants",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.RequestOptions",
"com.microsoft.azure.storage.StorageException",
"java.io.IOException",
"java.net.HttpURLConnection",
"java.net.URISyntaxException"
] | import com.microsoft.azure.storage.Constants; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.RequestOptions; import com.microsoft.azure.storage.StorageException; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URISyntaxException; | import com.microsoft.azure.storage.*; import java.io.*; import java.net.*; | [
"com.microsoft.azure",
"java.io",
"java.net"
] | com.microsoft.azure; java.io; java.net; | 728,081 |
public SizeValue getAsSize(String setting, SizeValue defaultValue) throws SettingsException {
return parseSizeValue(get(setting), defaultValue);
} | SizeValue function(String setting, SizeValue defaultValue) throws SettingsException { return parseSizeValue(get(setting), defaultValue); } | /**
* Returns the setting value (as size) associated with the setting key. If it does not exists,
* returns the default value provided.
*/ | Returns the setting value (as size) associated with the setting key. If it does not exists, returns the default value provided | getAsSize | {
"repo_name": "winstonewert/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/settings/Settings.java",
"license": "apache-2.0",
"size": 51802
} | [
"org.elasticsearch.common.unit.SizeValue"
] | import org.elasticsearch.common.unit.SizeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,456,228 |
void enterTypeParameter(@NotNull JavaParser.TypeParameterContext ctx);
void exitTypeParameter(@NotNull JavaParser.TypeParameterContext ctx); | void enterTypeParameter(@NotNull JavaParser.TypeParameterContext ctx); void exitTypeParameter(@NotNull JavaParser.TypeParameterContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#typeParameter}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#typeParameter</code> | exitTypeParameter | {
"repo_name": "hgkmail/HelloJava",
"path": "src/cn/hgk/hellojava/JavaListener.java",
"license": "gpl-2.0",
"size": 38976
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,615,745 |
protected Criteria buildCriteriaFromMap(Map fieldValues, Balance balance, Collection<String> encumbranceBalanceTypes) {
Map localFieldValues = new HashMap();
localFieldValues.putAll(fieldValues);
Criteria criteria = new Criteria();
// handle encumbrance balance type
String ... | Criteria function(Map fieldValues, Balance balance, Collection<String> encumbranceBalanceTypes) { Map localFieldValues = new HashMap(); localFieldValues.putAll(fieldValues); Criteria criteria = new Criteria(); String propertyName = KFSPropertyConstants.BALANCE_TYPE_CODE; if (localFieldValues.containsKey(propertyName)) ... | /**
* This method builds the query criteria based on the input field map
*
* @param fieldValues Map of keys to use for the query
* @param balance this really usen't used in the method
* @return a query criteria
*/ | This method builds the query criteria based on the input field map | buildCriteriaFromMap | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/gl/dataaccess/impl/BalanceDaoOjb.java",
"license": "agpl-3.0",
"size": 46351
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"org.apache.ojb.broker.query.Criteria",
"org.kuali.kfs.gl.OJBUtility",
"org.kuali.kfs.gl.businessobject.Balance",
"org.kuali.kfs.sys.KFSConstants",
"org.kuali.kfs.sys.KFSPropertyConstants"
] | import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.ojb.broker.query.Criteria; import org.kuali.kfs.gl.OJBUtility; import org.kuali.kfs.gl.businessobject.Balance; import org.kuali.kfs.sys.KFSConstants; import org.kuali.kfs.sys.KFSPropertyConstants; | import java.util.*; import org.apache.ojb.broker.query.*; import org.kuali.kfs.gl.*; import org.kuali.kfs.gl.businessobject.*; import org.kuali.kfs.sys.*; | [
"java.util",
"org.apache.ojb",
"org.kuali.kfs"
] | java.util; org.apache.ojb; org.kuali.kfs; | 1,248,992 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<AttestationInner>, AttestationInner> beginCreateOrUpdateAtSubscription(
String attestationName, AttestationInner parameters, Context context) {
return beginCreateOrUpdateAtSubscriptionAsync(attestationName, ... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<AttestationInner>, AttestationInner> function( String attestationName, AttestationInner parameters, Context context) { return beginCreateOrUpdateAtSubscriptionAsync(attestationName, parameters, context).getSyncPoller(); } | /**
* Creates or updates an attestation at subscription scope.
*
* @param attestationName The name of the attestation.
* @param parameters The attestation parameters.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail... | Creates or updates an attestation at subscription scope | beginCreateOrUpdateAtSubscription | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/policyinsights/azure-resourcemanager-policyinsights/src/main/java/com/azure/resourcemanager/policyinsights/implementation/AttestationsClientImpl.java",
"license": "mit",
"size": 124635
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.policyinsights.fluent.models.AttestationInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.policyinsights.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 82,799 |
protected void switchApplet() throws Exception {
setState(STATE_SWITCHING_APPLET);
percentage = 100;
debug_sleep(2000);
// set correct context classloader for lwjgl applet
Thread.currentThread().setContextClassLoader(classLoader);
Class appletClass = classLoader.loadClass(getParameter("al_main"))... | void function() throws Exception { setState(STATE_SWITCHING_APPLET); percentage = 100; debug_sleep(2000); Thread.currentThread().setContextClassLoader(classLoader); Class appletClass = classLoader.loadClass(getParameter(STR)); lwjglApplet = (Applet) appletClass.newInstance(); lwjglApplet.setStub(this); lwjglApplet.setS... | /**
* replace the current applet with the lwjgl applet
* using AppletStub and initialise and start it
*/ | replace the current applet with the lwjgl applet using AppletStub and initialise and start it | switchApplet | {
"repo_name": "eriqadams/computer-graphics",
"path": "lib/lwjgl-2.9.1/lwjgl-source-2.9.1/src/java/org/lwjgl/util/applet/AppletLoader.java",
"license": "mit",
"size": 68898
} | [
"java.applet.Applet",
"java.awt.BorderLayout"
] | import java.applet.Applet; import java.awt.BorderLayout; | import java.applet.*; import java.awt.*; | [
"java.applet",
"java.awt"
] | java.applet; java.awt; | 542,852 |
public void removeResourceLink(String resourceLinkName) {
resourceLinkName = URLDecoder.decode(resourceLinkName);
NamingResources nresources = (NamingResources) this.resource;
if (nresources == null) {
return;
}
ContextResourceLink resourceLink =
... | void function(String resourceLinkName) { resourceLinkName = URLDecoder.decode(resourceLinkName); NamingResources nresources = (NamingResources) this.resource; if (nresources == null) { return; } ContextResourceLink resourceLink = nresources.findResourceLink(resourceLinkName); if (resourceLink == null) { throw new Illeg... | /**
* Remove any resource link reference with the specified name.
*
* @param resourceLinkName Name of the resource link reference to remove
*/ | Remove any resource link reference with the specified name | removeResourceLink | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/NamingResourcesMBean.java",
"license": "apache-2.0",
"size": 13315
} | [
"java.net.URLDecoder",
"org.apache.catalina.deploy.ContextResourceLink",
"org.apache.catalina.deploy.NamingResources"
] | import java.net.URLDecoder; import org.apache.catalina.deploy.ContextResourceLink; import org.apache.catalina.deploy.NamingResources; | import java.net.*; import org.apache.catalina.deploy.*; | [
"java.net",
"org.apache.catalina"
] | java.net; org.apache.catalina; | 810,976 |
public synchronized void downloadKeyPlain() {
if (("icprmartins".equalsIgnoreCase(acSelecionada.getName()) ||
"acrmartins".equalsIgnoreCase(acSelecionada.getName())) &&
JBossUtil.TCC_FIAP_RESTRICT_USER_CHANGES) {
FacesUtil.addFacesMessage(
"Fun\u00E7\u00E3o n\u00E3o dispon\u00EDvel nesta inst... | synchronized void function() { if ((STR.equalsIgnoreCase(acSelecionada.getName()) STR.equalsIgnoreCase(acSelecionada.getName())) && JBossUtil.TCC_FIAP_RESTRICT_USER_CHANGES) { FacesUtil.addFacesMessage( STR, null, FacesMessage.SEVERITY_WARN); } else { try { Certificado cert = CertificadoDAO.getCertfromListById(listaCer... | /**
* Action para realizar download de uma chave privada descriptografada.
*/ | Action para realizar download de uma chave privada descriptografada | downloadKeyPlain | {
"repo_name": "robsonsmartins/fiap-mba-java-projects",
"path": "source/tcc.fiap.jboss7/ICPAdmin/src/icp/web/controller/IcpBrasilMB.java",
"license": "gpl-3.0",
"size": 31341
} | [
"com.robsonmartins.fiap.tcc.util.FacesUtil",
"com.robsonmartins.fiap.tcc.util.JBossUtil",
"javax.faces.application.FacesMessage"
] | import com.robsonmartins.fiap.tcc.util.FacesUtil; import com.robsonmartins.fiap.tcc.util.JBossUtil; import javax.faces.application.FacesMessage; | import com.robsonmartins.fiap.tcc.util.*; import javax.faces.application.*; | [
"com.robsonmartins.fiap",
"javax.faces"
] | com.robsonmartins.fiap; javax.faces; | 2,640,686 |
public void updateApis(ApiDirectoryListing apiDirectoryListing) {
for (ManagedApi api : getManagedApis()) {
updateApi(apiDirectoryListing, api);
}
} | void function(ApiDirectoryListing apiDirectoryListing) { for (ManagedApi api : getManagedApis()) { updateApi(apiDirectoryListing, api); } } | /**
* Update the state of Managed APIs in the current project. This type takes an
* ApiDirectoryListing (a list of APIs from a directory) and flags APIs as
* having an update available if the version has changed.
*
* Note: this method is threadsafe.
*/ | Update the state of Managed APIs in the current project. This type takes an ApiDirectoryListing (a list of APIs from a directory) and flags APIs as having an update available if the version has changed. Note: this method is threadsafe | updateApis | {
"repo_name": "pruebasetichat/google-plugin-for-eclipse",
"path": "plugins/com.google.gdt.eclipse.managedapis/src/com/google/gdt/eclipse/managedapis/impl/ManagedApiProjectImpl.java",
"license": "epl-1.0",
"size": 27893
} | [
"com.google.gdt.eclipse.managedapis.ManagedApi",
"com.google.gdt.googleapi.core.ApiDirectoryListing"
] | import com.google.gdt.eclipse.managedapis.ManagedApi; import com.google.gdt.googleapi.core.ApiDirectoryListing; | import com.google.gdt.eclipse.managedapis.*; import com.google.gdt.googleapi.core.*; | [
"com.google.gdt"
] | com.google.gdt; | 2,041,793 |
public View setLogo(@DrawableRes int resId, @CustomColumnPosition int position) {
ViewGroup column = mCustomColumnList.get(position);
ImageView imageView = null;
if (mLogoView != null) {
ViewParent parent = mLogoView.getParent();
if (parent != null && parent instanc... | View function(@DrawableRes int resId, @CustomColumnPosition int position) { ViewGroup column = mCustomColumnList.get(position); ImageView imageView = null; if (mLogoView != null) { ViewParent parent = mLogoView.getParent(); if (parent != null && parent instanceof ViewGroup) { ((ViewGroup) (parent)).removeView(mLogoView... | /**
* To set logo at specific position.
*
* @param resId the logo icon res id.
* @param position this position to set up logo.
*/ | To set logo at specific position | setLogo | {
"repo_name": "b95505017/StraaS-android-sdk-sample",
"path": "MediaCore/src/main/java/io/straas/android/media/demo/widget/StraasPlayerView.java",
"license": "apache-2.0",
"size": 52213
} | [
"android.support.annotation.DrawableRes",
"android.support.v7.widget.AppCompatImageView",
"android.view.View",
"android.view.ViewGroup",
"android.view.ViewParent",
"android.widget.ImageView"
] | import android.support.annotation.DrawableRes; import android.support.v7.widget.AppCompatImageView; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import android.widget.ImageView; | import android.support.annotation.*; import android.support.v7.widget.*; import android.view.*; import android.widget.*; | [
"android.support",
"android.view",
"android.widget"
] | android.support; android.view; android.widget; | 2,557,458 |
public void setDeactivateBearerPageFailValue(String deactivateBearerPageFailValue)
throws JNCException {
setDeactivateBearerPageFailValue(new YangEnumeration(deactivateBearerPageFailValue, new String[] {
"enable",
"disable",
}));
} | void function(String deactivateBearerPageFailValue) throws JNCException { setDeactivateBearerPageFailValue(new YangEnumeration(deactivateBearerPageFailValue, new String[] { STR, STR, })); } | /**
* Sets the value for child leaf "deactivate-bearer-page-fail",
* using a String value.
* @param deactivateBearerPageFailValue used during instantiation.
*/ | Sets the value for child leaf "deactivate-bearer-page-fail", using a String value | setDeactivateBearerPageFailValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/interface_/nas/MmeNasSm.java",
"license": "apache-2.0",
"size": 46144
} | [
"com.tailf.jnc.YangEnumeration"
] | import com.tailf.jnc.YangEnumeration; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 1,014,255 |
public PresentationObject getEmailList(IWContext iwc, MailingList mlist) {
DataTable dTable = new DataTable();
dTable.setWidth(Table.HUNDRED_PERCENT);
dTable.setTitlesHorizontal(true);
dTable.addTitle(localize("emails", "Emails"));
int row = 1;
dTable.add(getHeader(localize("email_address", "Email addres... | PresentationObject function(IWContext iwc, MailingList mlist) { DataTable dTable = new DataTable(); dTable.setWidth(Table.HUNDRED_PERCENT); dTable.setTitlesHorizontal(true); dTable.addTitle(localize(STR, STR)); int row = 1; dTable.add(getHeader(localize(STR, STR)), 1, row); row++; Collection emails = null; try { emails... | /**
* Gets the emailList of the Emailer object
*
* @param mlist Description of the Parameter
* @return The email list value
*/ | Gets the emailList of the Emailer object | getEmailList | {
"repo_name": "idega/platform2",
"path": "src/is/idega/idegaweb/campus/block/mailinglist/presentation/Emailer.java",
"license": "gpl-3.0",
"size": 24450
} | [
"com.idega.core.contact.data.Email",
"com.idega.presentation.IWContext",
"com.idega.presentation.PresentationObject",
"com.idega.presentation.Table",
"com.idega.presentation.ui.DataTable",
"com.idega.presentation.ui.HiddenInput",
"com.idega.presentation.ui.SubmitButton",
"com.idega.presentation.ui.Tex... | import com.idega.core.contact.data.Email; import com.idega.presentation.IWContext; import com.idega.presentation.PresentationObject; import com.idega.presentation.Table; import com.idega.presentation.ui.DataTable; import com.idega.presentation.ui.HiddenInput; import com.idega.presentation.ui.SubmitButton; import com.id... | import com.idega.core.contact.data.*; import com.idega.presentation.*; import com.idega.presentation.ui.*; import com.idega.presentation.util.*; import is.idega.idegaweb.campus.block.mailinglist.data.*; import java.rmi.*; import java.util.*; | [
"com.idega.core",
"com.idega.presentation",
"is.idega.idegaweb",
"java.rmi",
"java.util"
] | com.idega.core; com.idega.presentation; is.idega.idegaweb; java.rmi; java.util; | 458,886 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<RoleDefinitionInner>> getWithResponseAsync(
String scope, String roleDefinitionId, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgument... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<RoleDefinitionInner>> function( String scope, String roleDefinitionId, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (scope == null) { return Mono.error(new IllegalArgumentException(STR)... | /**
* Get role definition by name (GUID).
*
* @param scope The scope of the role definition.
* @param roleDefinitionId The ID of the role definition.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Get role definition by name (GUID) | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleDefinitionsClientImpl.java",
"license": "mit",
"size": 42857
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.authorization.fluent.models.RoleDefinitionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.RoleDefinitionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,227,772 |
public void setRandomInsertArgs(PreparedStatement stmt, long id) throws SQLException {
stmt.setLong(1, id);
ThreadLocalRandom rnd = ThreadLocalRandom.current();
for (int vi = 1; vi <= valFieldsCnt; vi++) {
// vi is value index (among all values), but we also have "id" which is p... | void function(PreparedStatement stmt, long id) throws SQLException { stmt.setLong(1, id); ThreadLocalRandom rnd = ThreadLocalRandom.current(); for (int vi = 1; vi <= valFieldsCnt; vi++) { int qryIdx = vi + 1; long nextVal = rnd.nextLong(); if (vi % 2 == 1) stmt.setLong(qryIdx, nextVal); else stmt.setString(qryIdx, Stri... | /**
* Fills specified prepared statement with random values and specified id (primary key).
*
* @param stmt prepared statement, built from {@link #insert} query.
* @param id id in the test table.
* @throws SQLException if statement is not correct.
*/ | Fills specified prepared statement with random values and specified id (primary key) | setRandomInsertArgs | {
"repo_name": "amirakhmedov/ignite",
"path": "modules/yardstick/src/main/java/org/apache/ignite/yardstick/upload/model/QueryFactory.java",
"license": "apache-2.0",
"size": 7281
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.concurrent.ThreadLocalRandom"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.concurrent.ThreadLocalRandom; | import java.sql.*; import java.util.concurrent.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 500,916 |
public Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> query(
InetSocketAddress nameServerAddr, DnsQuestion question,
Iterable<DnsRecord> additionals,
Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise) {
return query0(nameServerAddr, ... | Future<AddressedEnvelope<DnsResponse, InetSocketAddress>> function( InetSocketAddress nameServerAddr, DnsQuestion question, Iterable<DnsRecord> additionals, Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise) { return query0(nameServerAddr, question, toArray(additionals, false), true, ch.newPr... | /**
* Sends a DNS query with the specified question with additional records using the specified name server list.
*/ | Sends a DNS query with the specified question with additional records using the specified name server list | query | {
"repo_name": "Squarespace/netty",
"path": "resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java",
"license": "apache-2.0",
"size": 54052
} | [
"io.netty.channel.AddressedEnvelope",
"io.netty.handler.codec.dns.DnsQuestion",
"io.netty.handler.codec.dns.DnsRecord",
"io.netty.handler.codec.dns.DnsResponse",
"io.netty.util.concurrent.Future",
"io.netty.util.concurrent.Promise",
"java.net.InetSocketAddress"
] | import io.netty.channel.AddressedEnvelope; import io.netty.handler.codec.dns.DnsQuestion; import io.netty.handler.codec.dns.DnsRecord; import io.netty.handler.codec.dns.DnsResponse; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.Promise; import java.net.InetSocketAddress; | import io.netty.channel.*; import io.netty.handler.codec.dns.*; import io.netty.util.concurrent.*; import java.net.*; | [
"io.netty.channel",
"io.netty.handler",
"io.netty.util",
"java.net"
] | io.netty.channel; io.netty.handler; io.netty.util; java.net; | 1,654,820 |
public Attributes getCurrentAttributes() {
return currentAtts;
}
private StringBuffer text = new StringBuffer();
private NGCCEventReceiver currentHandler; | Attributes function() { return currentAtts; } private StringBuffer text = new StringBuffer(); private NGCCEventReceiver currentHandler; | /**
* Attributes that belong to the current element.
* <p>
* It's generally not recommended for applications to use
* this method. RelaxNGCC internally removes processed attributes,
* so this doesn't correctly reflect all the attributes an element
* carries.
*/ | Attributes that belong to the current element. It's generally not recommended for applications to use this method. RelaxNGCC internally removes processed attributes, so this doesn't correctly reflect all the attributes an element carries | getCurrentAttributes | {
"repo_name": "FauxFaux/jdk9-jaxws",
"path": "src/jdk.xml.bind/share/classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java",
"license": "gpl-2.0",
"size": 18257
} | [
"org.xml.sax.Attributes"
] | import org.xml.sax.Attributes; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 732,958 |
public static Set<TableName> getDisabledTables(ZooKeeperWatcher zkw)
throws KeeperException, InterruptedException {
Set<TableName> disabledTables = new HashSet<TableName>();
List<String> children =
ZKUtil.listChildrenNoWatch(zkw, zkw.tableZNode);
for (String child: children) {
TableName ... | static Set<TableName> function(ZooKeeperWatcher zkw) throws KeeperException, InterruptedException { Set<TableName> disabledTables = new HashSet<TableName>(); List<String> children = ZKUtil.listChildrenNoWatch(zkw, zkw.tableZNode); for (String child: children) { TableName tableName = TableName.valueOf(child); ZooKeeperP... | /**
* Gets a list of all the tables set as disabled in zookeeper.
* @return Set of disabled tables, empty Set if none
* @throws KeeperException
*/ | Gets a list of all the tables set as disabled in zookeeper | getDisabledTables | {
"repo_name": "grokcoder/pbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTableStateClientSideReader.java",
"license": "apache-2.0",
"size": 7875
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos",
"org.apache.zookeeper.KeeperException"
] | import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.protobuf.generated.ZooKeeperProtos; import org.apache.zookeeper.KeeperException; | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.zookeeper.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper"
] | java.util; org.apache.hadoop; org.apache.zookeeper; | 1,763,997 |
public static void bindThread(DirContext dirContext) {
threadBindings.put(Thread.currentThread(), dirContext);
}
| static void function(DirContext dirContext) { threadBindings.put(Thread.currentThread(), dirContext); } | /**
* Binds a directory context to a thread.
*/ | Binds a directory context to a thread | bindThread | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/DirContextURLStreamHandler.java",
"license": "mit",
"size": 7136
} | [
"javax.naming.directory.DirContext"
] | import javax.naming.directory.DirContext; | import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 793,481 |
public int getFetchDirection() throws SQLException {
checkClosed();
return FETCH_FORWARD;
} | int function() throws SQLException { checkClosed(); return FETCH_FORWARD; } | /**
* <!-- start generic documentation -->
* Retrieves the fetch direction for this
* <code>ResultSet</code> object.
* <!-- end generic documentation -->
*
* <!-- start release-specific documentation -->
* <div class="ReleaseSpecificDocumentation">
* <h3>HSQLDB-Specific Informati... | Retrieves the fetch direction for this <code>ResultSet</code> object. HSQLDB-Specific Information: HSQLDB does not depend on fetch direction and always returns <code>FETCH_FORWARD</code>, but the value has no real meaning. | getFetchDirection | {
"repo_name": "apavlo/h-store",
"path": "src/hsqldb19b3/org/hsqldb/jdbc/JDBCResultSet.java",
"license": "gpl-3.0",
"size": 304688
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,170,930 |
public OVXFlowMod deleteFlowMod(final Long cookie) {
return this.flowTable.deleteFlowMod(cookie);
} | OVXFlowMod function(final Long cookie) { return this.flowTable.deleteFlowMod(cookie); } | /**
* Removes an entry in the mapping.
*
* @param cookie
* @return The deleted FlowMod
*/ | Removes an entry in the mapping | deleteFlowMod | {
"repo_name": "ndsc-mimic/MimicNOS",
"path": "src/main/java/net/onrc/openvirtex/elements/datapath/OVXSwitch.java",
"license": "apache-2.0",
"size": 22826
} | [
"net.onrc.openvirtex.messages.OVXFlowMod"
] | import net.onrc.openvirtex.messages.OVXFlowMod; | import net.onrc.openvirtex.messages.*; | [
"net.onrc.openvirtex"
] | net.onrc.openvirtex; | 2,786,684 |
private TraceSizeReport getReport() {
// build the trace size information
TraceSizeReport traceSize = TraceFactory.eINSTANCE.createTraceSizeReport();
traceSize.setNetwork(network);
// collect action successors and create actor successors
long firings = 0;
HashMultiset<Actor> actorsFirings = HashMultiset... | TraceSizeReport function() { TraceSizeReport traceSize = TraceFactory.eINSTANCE.createTraceSizeReport(); traceSize.setNetwork(network); long firings = 0; HashMultiset<Actor> actorsFirings = HashMultiset.create(); for (Entry<Action> e : actionsFirings.entrySet()) { Action action = e.getElement(); int count = e.getCount(... | /**
* Create the trace size report
*
* @return
*/ | Create the trace size report | getReport | {
"repo_name": "turnus/turnus",
"path": "turnus.analysis/src/turnus/analysis/profiler/dynamic/trace/TraceEvaluator.java",
"license": "gpl-3.0",
"size": 14106
} | [
"com.google.common.collect.HashMultiset",
"com.google.common.collect.Multiset"
] | import com.google.common.collect.HashMultiset; import com.google.common.collect.Multiset; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 905,657 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.