method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Test public void testContendedAcrossCellsIncrement() throws IOException, InterruptedException { final HRegion region = getRegion(TEST_UTIL.getConfiguration(), TestIncrementsFromClientSide.filterStringSoTableNameSafe(this.name.getMethodName())); long startTime = System.currentTimeMillis(); try {...
void function() throws IOException, InterruptedException { final HRegion region = getRegion(TEST_UTIL.getConfiguration(), TestIncrementsFromClientSide.filterStringSoTableNameSafe(this.name.getMethodName())); long startTime = System.currentTimeMillis(); try { CrossRowCellIncrementer [] threads = new CrossRowCellIncremen...
/** * Have each thread update its own Cell. Avoid contention with another thread. */
Have each thread update its own Cell. Avoid contention with another thread
testContendedAcrossCellsIncrement
{ "repo_name": "francisliu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionIncrement.java", "license": "apache-2.0", "size": 8876 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.client.TestIncrementsFromClientSide", "org.apache.hadoop.hbase.util.Bytes", "org.junit.Assert" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.TestIncrementsFromClientSide; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
1,997,148
public FileSyncer getFileSyncer() { return this.fileSyncer; }
FileSyncer function() { return this.fileSyncer; }
/** * Get the file syncer which is propagating file changes * to other nodes in the network. * <b>Note</b>: This method may return null before the node is connected * * @return The File Syncer or null, if this peer is not yet connected */
Get the file syncer which is propagating file changes to other nodes in the network. Note: This method may return null before the node is connected
getFileSyncer
{ "repo_name": "p2p-sync/sync", "path": "src/main/java/org/rmatil/sync/core/Sync.java", "license": "apache-2.0", "size": 17999 }
[ "org.rmatil.sync.core.syncer.file.FileSyncer" ]
import org.rmatil.sync.core.syncer.file.FileSyncer;
import org.rmatil.sync.core.syncer.file.*;
[ "org.rmatil.sync" ]
org.rmatil.sync;
1,892,814
@Override protected ICacheElement<K, V> processGet(final K key) { if (!isAlive()) { log.error("{0}: No longer alive so returning null for key = {1}", logCacheName, key); return null; } log.debug("{0}: Trying to get from disk: {1}",...
ICacheElement<K, V> function(final K key) { if (!isAlive()) { log.error(STR, logCacheName, key); return null; } log.debug(STR, logCacheName, key); ICacheElement<K, V> object = null; try { storageLock.readLock().lock(); try { object = readElement(key); } finally { storageLock.readLock().unlock(); } if (object != null) {...
/** * Gets the key, then goes to disk to get the object. * <p> * * @param key * @return ICacheElement&lt;K, V&gt; or null * @see AbstractDiskCache#doGet */
Gets the key, then goes to disk to get the object.
processGet
{ "repo_name": "apache/commons-jcs", "path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/indexed/IndexedDiskCache.java", "license": "apache-2.0", "size": 51140 }
[ "java.io.IOException", "org.apache.commons.jcs3.engine.behavior.ICacheElement" ]
import java.io.IOException; import org.apache.commons.jcs3.engine.behavior.ICacheElement;
import java.io.*; import org.apache.commons.jcs3.engine.behavior.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
593,405
@Override @SubsribeEvent public void onUserEvent(UserEvent e) { super.onUserEvent(e); if (e.isCanceled()) { return; } if (e.getType() == UserEvent.DefaultType.EXIT) { checkExit(e); } if (e.getType() instanceof EventType) { switch ((EventType) e.getType())...
void function(UserEvent e) { super.onUserEvent(e); if (e.isCanceled()) { return; } if (e.getType() == UserEvent.DefaultType.EXIT) { checkExit(e); } if (e.getType() instanceof EventType) { switch ((EventType) e.getType()) { case NEW: newFile(); break; case EDIT_TREE: editTree(); break; case OPEN: open(null); break; case...
/** * Called when a UserEvent is fired. * * @param e the event */
Called when a UserEvent is fired
onUserEvent
{ "repo_name": "Darmo117/Jenealogio", "path": "src/main/java/net/darmo_creations/jenealogio/controllers/MainController.java", "license": "gpl-3.0", "size": 22361 }
[ "net.darmo_creations.gui_framework.ApplicationRegistry", "net.darmo_creations.gui_framework.events.UserEvent", "net.darmo_creations.jenealogio.events.CardEvent", "net.darmo_creations.jenealogio.events.EventType" ]
import net.darmo_creations.gui_framework.ApplicationRegistry; import net.darmo_creations.gui_framework.events.UserEvent; import net.darmo_creations.jenealogio.events.CardEvent; import net.darmo_creations.jenealogio.events.EventType;
import net.darmo_creations.gui_framework.*; import net.darmo_creations.gui_framework.events.*; import net.darmo_creations.jenealogio.events.*;
[ "net.darmo_creations.gui_framework", "net.darmo_creations.jenealogio" ]
net.darmo_creations.gui_framework; net.darmo_creations.jenealogio;
2,238,284
protected boolean checkIfUnmodifiedSince(HttpServletRequest request, HttpServletResponse response, ResourceAttributes resourceAttributes) throws IOException { try { long lastModified = resourceAttribute...
boolean function(HttpServletRequest request, HttpServletResponse response, ResourceAttributes resourceAttributes) throws IOException { try { long lastModified = resourceAttributes.getLastModified(); long headerValue = request.getDateHeader(STR); if (headerValue != -1) { if ( lastModified >= (headerValue + 1000)) { resp...
/** * Check if the if-unmodified-since condition is satisfied. * * @param request The servlet request we are processing * @param response The servlet response we are creating * @param resourceAttributes File object * @return boolean true if the resource meets the specified condition, ...
Check if the if-unmodified-since condition is satisfied
checkIfUnmodifiedSince
{ "repo_name": "deathspeeder/class-guard", "path": "apache-tomcat-7.0.53-src/java/org/apache/catalina/servlets/DefaultServlet.java", "license": "gpl-2.0", "size": 77933 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.naming.resources.ResourceAttributes" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.naming.resources.ResourceAttributes;
import java.io.*; import javax.servlet.http.*; import org.apache.naming.resources.*;
[ "java.io", "javax.servlet", "org.apache.naming" ]
java.io; javax.servlet; org.apache.naming;
1,926,779
EList<Variable> getVariable();
EList<Variable> getVariable();
/** * Returns the value of the '<em><b>Variable</b></em>' containment reference list. * The list contents are of type {@link org.muml.uppaal.declarations.Variable}. * It is bidirectional and its opposite is '{@link org.muml.uppaal.declarations.Variable#getContainer <em>Container</em>}'. * <!-- begin-user-do...
Returns the value of the 'Variable' containment reference list. The list contents are of type <code>org.muml.uppaal.declarations.Variable</code>. It is bidirectional and its opposite is '<code>org.muml.uppaal.declarations.Variable#getContainer Container</code>'. The contained variables.
getVariable
{ "repo_name": "uppaal-emf/uppaal", "path": "metamodel/org.muml.uppaal/src/org/muml/uppaal/declarations/VariableContainer.java", "license": "epl-1.0", "size": 3230 }
[ "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;
1,332,094
private static void setCurrentDialog(Dialog dialog) { sCurrentDialog = dialog; }
static void function(Dialog dialog) { sCurrentDialog = dialog; }
/** * Sets the currently displayed dialog in sCurrentDialog. This is required by findbugs, which * allows static fields only to be set from static methods. */
Sets the currently displayed dialog in sCurrentDialog. This is required by findbugs, which allows static fields only to be set from static methods
setCurrentDialog
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/RepostFormWarningDialog.java", "license": "gpl-3.0", "size": 2539 }
[ "android.app.Dialog" ]
import android.app.Dialog;
import android.app.*;
[ "android.app" ]
android.app;
194,707
protected static String generateRequestLine(HttpConnection connection, String name, String requestPath, String query, String version) { LOG.trace("enter HttpMethodBase.generateRequestLine(HttpConnection, " + "String, String, String, String)"); StringBuffer buf = new StringBuffer...
static String function(HttpConnection connection, String name, String requestPath, String query, String version) { LOG.trace(STR + STR); StringBuffer buf = new StringBuffer(); buf.append(name); buf.append(" "); if (!connection.isTransparent()) { Protocol protocol = connection.getProtocol(); buf.append(protocol.getSchem...
/** * Generates HTTP request line according to the specified attributes. * * @param connection the {@link HttpConnection connection} used to execute * this HTTP method * @param name the method name generate a request for * @param requestPath the path string for the request * @p...
Generates HTTP request line according to the specified attributes
generateRequestLine
{ "repo_name": "magneticmoon/httpclient3-ntml", "path": "src/java/org/apache/commons/httpclient/HttpMethodBase.java", "license": "apache-2.0", "size": 86671 }
[ "org.apache.commons.httpclient.protocol.Protocol" ]
import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.httpclient.protocol.*;
[ "org.apache.commons" ]
org.apache.commons;
2,839,491
@ServiceMethod(returns = ReturnType.SINGLE) public Response<LoadBalancingRuleInner> getWithResponse( String resourceGroupName, String loadBalancerName, String loadBalancingRuleName, Context context) { return getWithResponseAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName, context...
@ServiceMethod(returns = ReturnType.SINGLE) Response<LoadBalancingRuleInner> function( String resourceGroupName, String loadBalancerName, String loadBalancingRuleName, Context context) { return getWithResponseAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName, context).block(); }
/** * Gets the specified load balancer load balancing rule. * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the load balancer. * @param loadBalancingRuleName The name of the load balancing rule. * @param context The context to associate wi...
Gets the specified load balancer load balancing rule
getWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerLoadBalancingRulesClientImpl.java", "license": "mit", "size": 24247 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.LoadBalancingRuleInner" ]
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.network.fluent.models.LoadBalancingRuleInner;
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;
2,211,822
public void destroySpareWebContents() { ThreadUtils.assertOnUiThread(); if (mSpareWebContents == null) return; recordWebContentsStatus(WebContentsStatus.DESTROYED); destroySpareWebContentsInternal(); }
void function() { ThreadUtils.assertOnUiThread(); if (mSpareWebContents == null) return; recordWebContentsStatus(WebContentsStatus.DESTROYED); destroySpareWebContentsInternal(); }
/** * Destroys the spare WebContents if there is one. */
Destroys the spare WebContents if there is one
destroySpareWebContents
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java", "license": "bsd-3-clause", "size": 17721 }
[ "org.chromium.base.ThreadUtils" ]
import org.chromium.base.ThreadUtils;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
2,905,921
@Test public void testFactoryOfVarargsTwoExternalIds() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); assertEquals(test.size(), 2); assertEquals(Arrays.asList(ID_11, ID_12), test.getExternalIds()); }
void function() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); assertEquals(test.size(), 2); assertEquals(Arrays.asList(ID_11, ID_12), test.getExternalIds()); }
/** * Tests the static constructor that takes external ids. */
Tests the static constructor that takes external ids
testFactoryOfVarargsTwoExternalIds
{ "repo_name": "McLeodMoores/starling", "path": "projects/util/src/test/java/com/opengamma/id/ExternalIdBundleTest.java", "license": "apache-2.0", "size": 22614 }
[ "java.util.Arrays", "org.testng.Assert" ]
import java.util.Arrays; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
1,503,102
public void readSlaves(TransMeta transMeta, boolean overWriteShared) throws KettleException { try { ObjectId dbids[] = repository.getSlaveIDs(false); for (int i = 0; i < dbids.length; i++) { SlaveServer slaveServer = repository.loadSlaveServer(dbids[i], n...
void function(TransMeta transMeta, boolean overWriteShared) throws KettleException { try { ObjectId dbids[] = repository.getSlaveIDs(false); for (int i = 0; i < dbids.length; i++) { SlaveServer slaveServer = repository.loadSlaveServer(dbids[i], null); slaveServer.shareVariablesWith(transMeta); SlaveServer check = trans...
/** * Read the slave servers in the repository and add them to this transformation if they are not yet present. * @param TransMeta The transformation to load into. * @param overWriteShared if an object with the same name exists, overwrite * @throws KettleException */
Read the slave servers in the repository and add them to this transformation if they are not yet present
readSlaves
{ "repo_name": "jjeb/kettle-trunk", "path": "engine/src/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryTransDelegate.java", "license": "apache-2.0", "size": 76017 }
[ "org.pentaho.di.cluster.SlaveServer", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleDatabaseException", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.repository.ObjectId", "org.pentaho.di.trans.TransMeta" ]
import org.pentaho.di.cluster.SlaveServer; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleDatabaseException; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.trans.TransMeta;
import org.pentaho.di.cluster.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*; import org.pentaho.di.repository.*; import org.pentaho.di.trans.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,266,619
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<StreamingJobInner> listByResourceGroupAsync( String resourceGroupName, String expand, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), ...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<StreamingJobInner> function( String resourceGroupName, String expand, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));...
/** * Lists all of the streaming jobs in the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand The $expand OData query parameter. This is a comma-separated list of additional streaming job * properties to inc...
Lists all of the streaming jobs in the specified resource group
listByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/implementation/StreamingJobsClientImpl.java", "license": "mit", "size": 136736 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.streamanalytics.fluent.models.StreamingJobInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.streamanalytics.fluent.models.StreamingJobInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.streamanalytics.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,138,162
public int compareHours(Calendar value, Calendar compare) { return compareTime(value, compare, Calendar.HOUR_OF_DAY); }
int function(Calendar value, Calendar compare) { return compareTime(value, compare, Calendar.HOUR_OF_DAY); }
/** * <p>Compare Hours.</p> * * @param value The <code>Calendar</code> value to check. * @param compare The <code>Calendar</code> to compare the value to. * @return Zero if the hours are equal, -1 if first * parameter's hour is less than the seconds and +1 if the first * parameter's h...
Compare Hours
compareHours
{ "repo_name": "apache/commons-validator", "path": "src/main/java/org/apache/commons/validator/routines/TimeValidator.java", "license": "apache-2.0", "size": 12246 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
460,033
default void negate(Tuple2D<?> tuple) { assert tuple != null : AssertMessages.notNullParameter(); set(-tuple.getX(), -tuple.getY()); }
default void negate(Tuple2D<?> tuple) { assert tuple != null : AssertMessages.notNullParameter(); set(-tuple.getX(), -tuple.getY()); }
/** * Sets the value of this tuple to the negation of tuple t1. * @param tuple the source tuple */
Sets the value of this tuple to the negation of tuple t1
negate
{ "repo_name": "tpiotrow/afc", "path": "core/math/src/main/java/org/arakhne/afc/math/geometry/d2/Tuple2D.java", "license": "apache-2.0", "size": 18053 }
[ "org.arakhne.afc.vmutil.asserts.AssertMessages" ]
import org.arakhne.afc.vmutil.asserts.AssertMessages;
import org.arakhne.afc.vmutil.asserts.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
1,950,965
@VisibleForTesting ImmutableList<String> createRenderLinesAtTime(long currentTimeMillis) { ImmutableList.Builder<String> lines = ImmutableList.builder(); logEventPair( "Processing filesystem changes", Optional.empty(), currentTimeMillis, 0L, watchmanStarted, ...
ImmutableList<String> createRenderLinesAtTime(long currentTimeMillis) { ImmutableList.Builder<String> lines = ImmutableList.builder(); logEventPair( STR, Optional.empty(), currentTimeMillis, 0L, watchmanStarted, watchmanFinished, Optional.empty(), Optional.of(this.minimumDurationMillisecondsToShowWatchman), lines); log...
/** * Creates a list of lines to be rendered at a given time. * * @param currentTimeMillis The time in ms to use when computing elapsed times. */
Creates a list of lines to be rendered at a given time
createRenderLinesAtTime
{ "repo_name": "k21/buck", "path": "src/com/facebook/buck/event/listener/SuperConsoleEventBusListener.java", "license": "apache-2.0", "size": 37357 }
[ "com.facebook.buck.model.Pair", "com.facebook.buck.util.unit.SizeUnit", "com.google.common.collect.ImmutableList", "java.util.Collection", "java.util.Optional" ]
import com.facebook.buck.model.Pair; import com.facebook.buck.util.unit.SizeUnit; import com.google.common.collect.ImmutableList; import java.util.Collection; import java.util.Optional;
import com.facebook.buck.model.*; import com.facebook.buck.util.unit.*; import com.google.common.collect.*; import java.util.*;
[ "com.facebook.buck", "com.google.common", "java.util" ]
com.facebook.buck; com.google.common; java.util;
93,108
public static double deviation(Iterator<Tuple> tuples, String field) { return deviation(tuples, field, DataLib.mean(tuples, field)); }
static double function(Iterator<Tuple> tuples, String field) { return deviation(tuples, field, DataLib.mean(tuples, field)); }
/** * Get the standard deviation of a tuple data value. If any tuple does not * have the named field or the field is not a numeric data type, NaN will be * returned. * @param tuples an iterator over tuples * @param field the column / data field name * @return the standard deviation value, ...
Get the standard deviation of a tuple data value. If any tuple does not have the named field or the field is not a numeric data type, NaN will be returned
deviation
{ "repo_name": "dritanlatifi/AndroidPrefuse", "path": "src/prefuse/util/DataLib.java", "license": "bsd-3-clause", "size": 19826 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,260,457
@Override public OdfName getOdfName() { return ATTRIBUTE_NAME; }
OdfName function() { return ATTRIBUTE_NAME; }
/** * Returns the attribute name. * * @return the <code>OdfName</code> for {@odf.attribute text:time-value}. */
Returns the attribute name
getOdfName
{ "repo_name": "jbjonesjr/geoproponis", "path": "external/odfdom-java-0.8.10-incubating-sources/org/odftoolkit/odfdom/dom/attribute/text/TextTimeValueAttribute.java", "license": "gpl-2.0", "size": 2978 }
[ "org.odftoolkit.odfdom.pkg.OdfName" ]
import org.odftoolkit.odfdom.pkg.OdfName;
import org.odftoolkit.odfdom.pkg.*;
[ "org.odftoolkit.odfdom" ]
org.odftoolkit.odfdom;
1,289,279
public ServiceFuture<ExpressRouteCircuitsRoutesTableListResultInner> beginListRoutesTableAsync(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsRoutesTableListResultInner> serviceCallback) { return ServiceFuture.fromResponse(begin...
ServiceFuture<ExpressRouteCircuitsRoutesTableListResultInner> function(String resourceGroupName, String circuitName, String peeringName, String devicePath, final ServiceCallback<ExpressRouteCircuitsRoutesTableListResultInner> serviceCallback) { return ServiceFuture.fromResponse(beginListRoutesTableWithServiceResponseAs...
/** * Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param de...
Gets the currently advertised routes table associated with the express route circuit in a resource group
beginListRoutesTableAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitsInner.java", "license": "mit", "size": 125131 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,779,715
public void setColWidth(int colIndex, int w) { for (Widget row : renderedRows) { ((VScrollTableRow) row).setCellWidth(colIndex, w); } } private int cellExtraWidth = -1;
void function(int colIndex, int w) { for (Widget row : renderedRows) { ((VScrollTableRow) row).setCellWidth(colIndex, w); } } private int cellExtraWidth = -1;
/** * Sets the content width of a column. * * Due IE limitation, we must set the width to a wrapper elements inside * table cells (with overflow hidden, which does not work on td * elements). * * To get this work properly crossplatform, we will also set t...
Sets the content width of a column. Due IE limitation, we must set the width to a wrapper elements inside table cells (with overflow hidden, which does not work on td elements). To get this work properly crossplatform, we will also set the width of td
setColWidth
{ "repo_name": "jdahlstrom/vaadin.react", "path": "client/src/main/java/com/vaadin/client/ui/VScrollTable.java", "license": "apache-2.0", "size": 317883 }
[ "com.google.gwt.user.client.ui.Widget", "com.vaadin.client.ui.VScrollTable" ]
import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ui.VScrollTable;
import com.google.gwt.user.client.ui.*; import com.vaadin.client.ui.*;
[ "com.google.gwt", "com.vaadin.client" ]
com.google.gwt; com.vaadin.client;
1,105,770
void confirmPendingMutation(LogMutation pendingMutation, boolean isValid) throws Exception;
void confirmPendingMutation(LogMutation pendingMutation, boolean isValid) throws Exception;
/** * Confirm last logged mutation. * @param pendingMutation the log mutation to apply * @param isValid if the last logged mutation is applied to scheduler * properly. * @throws Exception if confirming mutation fails */
Confirm last logged mutation
confirmPendingMutation
{ "repo_name": "apurtell/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/MutableConfigurationProvider.java", "license": "apache-2.0", "size": 3536 }
[ "org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.YarnConfigurationStore" ]
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.YarnConfigurationStore;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,683,629
public boolean isNormalform(List<GenPolynomial<C>> Pp);
boolean function(List<GenPolynomial<C>> Pp);
/** * Is in Normalform. * @param Pp polynomial list. * @return true if each A in Pp is in normalform with respect to Pp\{A}. */
Is in Normalform
isNormalform
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/gb/Reduction.java", "license": "gpl-2.0", "size": 5206 }
[ "edu.jas.poly.GenPolynomial", "java.util.List" ]
import edu.jas.poly.GenPolynomial; import java.util.List;
import edu.jas.poly.*; import java.util.*;
[ "edu.jas.poly", "java.util" ]
edu.jas.poly; java.util;
1,718,800
@Test void testPushCast() { final String sql = "SELECT \"product_id\"\n" + "from \"foodmart\"\n" + "where \"product_id\" = cast(NULL as varchar)\n" + "group by \"product_id\" order by \"product_id\" limit 5"; final String plan = "EnumerableValues(tuples=[[]])"; sql(sql).explainCont...
@Test void testPushCast() { final String sql = STRproduct_id\"\n" + STRfoodmart\"\n" + STRproduct_id\STR + STRproduct_id\STRproduct_id\STR; final String plan = STR; sql(sql).explainContains(plan); }
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-1770">[CALCITE-1770] * Druid adapter: CAST(NULL AS ...) gives NPE</a>. */
Test case for [CALCITE-1770]
testPushCast
{ "repo_name": "apache/calcite", "path": "druid/src/test/java/org/apache/calcite/test/DruidAdapterIT.java", "license": "apache-2.0", "size": 235422 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
1,398,514
protected boolean parseBoolParam(@Nullable Map<String, Object> settings, String name, boolean defaultValue) throws ParseException { if (settings == null) { return defaultValue; } Object value = settings.get(name); if (value == null) { ...
boolean function(@Nullable Map<String, Object> settings, String name, boolean defaultValue) throws ParseException { if (settings == null) { return defaultValue; } Object value = settings.get(name); if (value == null) { return defaultValue; } else if (value instanceof Boolean) { return (Boolean)value; } throw new ParseE...
/** * Extracts a boolean from the settings map, otherwise throws an exception * * @param settings Map of settings provided to this model * @param name Name of parameter we are attempting to extract * @param defaultValue Default value to be used if value does n...
Extracts a boolean from the settings map, otherwise throws an exception
parseBoolParam
{ "repo_name": "golubev/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/aggregations/pipeline/movavg/models/MovAvgModel.java", "license": "apache-2.0", "size": 8754 }
[ "java.text.ParseException", "java.util.Map", "org.elasticsearch.common.Nullable" ]
import java.text.ParseException; import java.util.Map; import org.elasticsearch.common.Nullable;
import java.text.*; import java.util.*; import org.elasticsearch.common.*;
[ "java.text", "java.util", "org.elasticsearch.common" ]
java.text; java.util; org.elasticsearch.common;
2,627,601
public File resolveFile(String dirName) { return new File(getCurrentWorkingDirectory(), dirName); }
File function(String dirName) { return new File(getCurrentWorkingDirectory(), dirName); }
/** * Resolve the file with the given current working directory of the * shell. * * @param dirName * @return */
Resolve the file with the given current working directory of the shell
resolveFile
{ "repo_name": "sangupta/andruil", "path": "src/main/java/com/sangupta/andruil/commands/base/AbstractAndruilCommand.java", "license": "apache-2.0", "size": 1939 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
19,496
protected final void verifyFieldType(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog) { boolean isSupportedType = true; for (FieldMetadata field : fields) { if (!catalog.isSupportedStructFieldType(field.getJavaType())) { metadataErrors.a...
final void function(short id, String name, Collection<FieldMetadata> fields, ThriftCatalog catalog) { boolean isSupportedType = true; for (FieldMetadata field : fields) { if (!catalog.isSupportedStructFieldType(field.getJavaType())) { metadataErrors.addError(STR, structName, name, id, TypeToken.of(field.getJavaType()))...
/** * Verifies that the the fields all have a supported Java type and that all fields map to the * exact same ThriftType. */
Verifies that the the fields all have a supported Java type and that all fields map to the exact same ThriftType
verifyFieldType
{ "repo_name": "facebook/swift", "path": "swift-codec/src/main/java/com/facebook/swift/codec/metadata/AbstractThriftMetadataBuilder.java", "license": "apache-2.0", "size": 34573 }
[ "com.google.common.reflect.TypeToken", "java.util.Collection", "java.util.HashSet", "java.util.Set" ]
import com.google.common.reflect.TypeToken; import java.util.Collection; import java.util.HashSet; import java.util.Set;
import com.google.common.reflect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,859,248
private PluginResult start(String callbackId) { this.callbackId = callbackId; if (_rawDataChannel == null || !_rawDataChannel.isOpen()) { _rawDataChannel = AccelerometerSensor .openRawDataChannel(Application.getApplication()); Logger.log(LOG_TAG + "sensor ...
PluginResult function(String callbackId) { this.callbackId = callbackId; if (_rawDataChannel == null !_rawDataChannel.isOpen()) { _rawDataChannel = AccelerometerSensor .openRawDataChannel(Application.getApplication()); Logger.log(LOG_TAG + STR); initTime = System.currentTimeMillis(); state = STARTING; _rawDataChannel.s...
/** * Adds a SystemListener to listen for changes to the battery state. The * listener is only registered if one has not already been added. */
Adds a SystemListener to listen for changes to the battery state. The listener is only registered if one has not already been added
start
{ "repo_name": "OneMoreCheckin/mobile-app", "path": "phonegap/2.6.0/blackberry/framework/ext/src/org/apache/cordova/accelerometer/Accelerometer.java", "license": "mit", "size": 8432 }
[ "net.rim.device.api.system.AccelerometerSensor", "net.rim.device.api.system.Application", "org.apache.cordova.api.PluginResult", "org.apache.cordova.util.Logger" ]
import net.rim.device.api.system.AccelerometerSensor; import net.rim.device.api.system.Application; import org.apache.cordova.api.PluginResult; import org.apache.cordova.util.Logger;
import net.rim.device.api.system.*; import org.apache.cordova.api.*; import org.apache.cordova.util.*;
[ "net.rim.device", "org.apache.cordova" ]
net.rim.device; org.apache.cordova;
948,036
public static void l(String text) { File logFile = new File(logPath); if (!logFile.exists()) { try { logFile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } try { BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true)); if (includeTim...
static void function(String text) { File logFile = new File(logPath); if (!logFile.exists()) { try { logFile.createNewFile(); } catch (IOException e) { e.printStackTrace(); } } try { BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true)); if (includeTimestamps) { text = formatter.format(new GregorianCal...
/** * Append the text to the end of the log file. * * @param text */
Append the text to the end of the log file
l
{ "repo_name": "jorgebv/thesis_android", "path": "src/edu/arizona/jbv/thesis/utils/ThesisLog.java", "license": "mit", "size": 2369 }
[ "android.util.Log", "java.io.BufferedWriter", "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.util.GregorianCalendar" ]
import android.util.Log; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.GregorianCalendar;
import android.util.*; import java.io.*; import java.util.*;
[ "android.util", "java.io", "java.util" ]
android.util; java.io; java.util;
236,178
@Override public void onLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) { //Ref- https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html mScanResults.setVisibility(View.VISIBLE); // Filter Raspberry Pi Foundation OUI=B8, to reduce noise from other devic...
void function(BluetoothDevice device, int rssi, byte[] scanRecord) { mScanResults.setVisibility(View.VISIBLE); String macxFilter = "B8"; if(( macxFilter.length() == 0) device.getAddress().startsWith(macxFilter)) { fullDebugPrintScanRecord( device, rssi, scanRecord ); } }
/** * Called for every device that is found during the scan * * @param device The device that is found * @param rssi The received signal strength indication * @param scanRecord Extra data concerning the scanned device */
Called for every device that is found during the scan
onLeScan
{ "repo_name": "bencoman/siteBKNS", "path": "display.android/app/src/main/java/com/sitebkns/display/MainActivity.java", "license": "apache-2.0", "size": 7638 }
[ "android.bluetooth.BluetoothDevice", "android.view.View" ]
import android.bluetooth.BluetoothDevice; import android.view.View;
import android.bluetooth.*; import android.view.*;
[ "android.bluetooth", "android.view" ]
android.bluetooth; android.view;
1,623,115
@WebMethod(operationName = "GetGeoIP", action = "http://www.webservicex.net/GetGeoIP") @RequestWrapper(localName = "GetGeoIP", targetNamespace = "http://www.webservicex.net/", className = "net.webservicex.GetGeoIP") @ResponseWrapper(localName = "GetGeoIPResponse", targetNamespace = "http://www.webservicex.n...
@WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetGeoIPResponseSTRhttp: @WebResult(name = "GetGeoIPResultSTRhttp: net.webservicex.GeoIP function( @WebParam(name = "IPAddressSTRhttp: java.lang.String ipAddress );
/** * GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses */
GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses
getGeoIP
{ "repo_name": "olenasblv/java_training", "path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceSoap.java", "license": "apache-2.0", "size": 1955 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
1,000,686
public String readString(final int size) throws IOException { return readString(size, "UTF-8"); }
String function(final int size) throws IOException { return readString(size, "UTF-8"); }
/** * Reads the specified number of bytes, converts them into a UTF-8 string * and returns it. * * @param size * The number of bytes to read * @return The read string * @throws IOException * If read fails */
Reads the specified number of bytes, converts them into a UTF-8 string and returns it
readString
{ "repo_name": "kayahr/threedee", "path": "threedee-core/src/main/java/de/ailis/threedee/io/StreamReader.java", "license": "mit", "size": 12264 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,681,326
@Test public void testGetTruffleDataLogFolder() throws Exception { boolean fileExists = fileSystem.getTruffleDataLogFolder().exists(); assertEquals(fileExists, true); }
void function() throws Exception { boolean fileExists = fileSystem.getTruffleDataLogFolder().exists(); assertEquals(fileExists, true); }
/** * <p> * Tests if the truffle_data_log folder is created correctly. * </p> * * @throws Exception Passes any errors that occurred during the test on */
Tests if the truffle_data_log folder is created correctly.
testGetTruffleDataLogFolder
{ "repo_name": "TruffleHog/TruffleHog", "path": "src/test/java/edu/kit/trufflehog/model/FileSystemTest.java", "license": "gpl-2.0", "size": 3593 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
777,247
void onEntityCreate(Entity var1);
void onEntityCreate(Entity var1);
/** * Called on all IWorldAccesses when an entity is created or loaded. On client worlds, starts downloading any * necessary textures. On server worlds, adds the entity to the entity tracker. */
Called on all IWorldAccesses when an entity is created or loaded. On client worlds, starts downloading any necessary textures. On server worlds, adds the entity to the entity tracker
onEntityCreate
{ "repo_name": "DirectCodeGraveyard/Minetweak", "path": "src/main/java/net/minecraft/world/IWorldAccess.java", "license": "lgpl-3.0", "size": 2662 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,060,991
public OneResponse info() { OneResponse response = info(client, id); super.processInfo(response); return response; }
OneResponse function() { OneResponse response = info(client, id); super.processInfo(response); return response; }
/** * Loads the xml representation of the user. * The info is also stored internally. * * @see User#info(Client, int) */
Loads the xml representation of the user. The info is also stored internally
info
{ "repo_name": "fairchild/one-mirror", "path": "src/oca/java/src/org/opennebula/client/user/User.java", "license": "apache-2.0", "size": 3844 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,879,413
private String pullValue(Element e, String tag){ return pullField(e,tag).item(0).getNodeValue(); }
String function(Element e, String tag){ return pullField(e,tag).item(0).getNodeValue(); }
/** * pulls a free parameter by matching the parameter name with tag * * @param e the root element * @param tag the id to check * @param value the value to set * @return the value of the parameter */
pulls a free parameter by matching the parameter name with tag
pullValue
{ "repo_name": "brookssime/SLogo-CS308", "path": "XMLParser.java", "license": "mit", "size": 8698 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,206,445
@Override public Double f(Vector x) { this.tau = AbstractAlgorithm.get().getIterations(); return this.apply(this.tau, x); }
Double function(Vector x) { this.tau = AbstractAlgorithm.get().getIterations(); return this.apply(this.tau, x); }
/** * Evaluates the function. */
Evaluates the function
f
{ "repo_name": "krharrison/cilib", "path": "library/src/main/java/net/sourceforge/cilib/functions/continuous/dynamic/moo/hef8/HEF8_h.java", "license": "gpl-3.0", "size": 5361 }
[ "net.sourceforge.cilib.algorithm.AbstractAlgorithm", "net.sourceforge.cilib.type.types.container.Vector" ]
import net.sourceforge.cilib.algorithm.AbstractAlgorithm; import net.sourceforge.cilib.type.types.container.Vector;
import net.sourceforge.cilib.algorithm.*; import net.sourceforge.cilib.type.types.container.*;
[ "net.sourceforge.cilib" ]
net.sourceforge.cilib;
2,719,256
@Override public void serialEvent(SerialPortEvent event) { log.info(String.format("rxtx event on port %s", portName)); Integer newByte = -1; try { while (listening && ((newByte = read()) > -1)) { // listener.onByte(newByte); // <-- FIXME ?? onMsg() < ??? for (String key : listeners.keySet()) { ...
void function(SerialPortEvent event) { log.info(String.format(STR, portName)); Integer newByte = -1; try { while (listening && ((newByte = read()) > -1)) { for (String key : listeners.keySet()) { listeners.get(key).onByte(newByte); } ++stats.total; if (stats.total % stats.interval == 0) { stats.ts = System.currentTimeM...
/** * rxtxlib's "serial event handling" - would be more simple if they just * implemented InputStream correctly :P */
rxtxlib's "serial event handling" - would be more simple if they just implemented InputStream correctly :P
serialEvent
{ "repo_name": "lanchun/myrobotlab", "path": "src/org/myrobotlab/serial/PortRXTX.java", "license": "apache-2.0", "size": 7163 }
[ "gnu.io.SerialPortEvent", "org.myrobotlab.logging.Logging" ]
import gnu.io.SerialPortEvent; import org.myrobotlab.logging.Logging;
import gnu.io.*; import org.myrobotlab.logging.*;
[ "gnu.io", "org.myrobotlab.logging" ]
gnu.io; org.myrobotlab.logging;
2,139,854
ExternalUserDetails validate(final Object ticket) throws AuthenticationServiceException;
ExternalUserDetails validate(final Object ticket) throws AuthenticationServiceException;
/** * This method is called to validate SSO token * * @param ticket the ticket to validate. * @return Authentication with user details * @throws AuthenticationServiceException in case validation fails */
This method is called to validate SSO token
validate
{ "repo_name": "leocockroach/JasperServer5.6", "path": "jasperserver-api/externalAuth/src/main/java/com/jaspersoft/jasperserver/api/security/externalAuth/sso/SsoTicketValidator.java", "license": "gpl-2.0", "size": 1684 }
[ "com.jaspersoft.jasperserver.api.security.externalAuth.ExternalUserDetails", "org.springframework.security.AuthenticationServiceException" ]
import com.jaspersoft.jasperserver.api.security.externalAuth.ExternalUserDetails; import org.springframework.security.AuthenticationServiceException;
import com.jaspersoft.jasperserver.api.security.*; import org.springframework.security.*;
[ "com.jaspersoft.jasperserver", "org.springframework.security" ]
com.jaspersoft.jasperserver; org.springframework.security;
21,151
public Auction getPlayerAuction(Player player) { if (player == null) { return null; } AuctionScope auctionScope = this.auctionManager.getPlayerScope(player); if (auctionScope == null) { return null; } return auctionScope.getActiveAuction(); ...
Auction function(Player player) { if (player == null) { return null; } AuctionScope auctionScope = this.auctionManager.getPlayerScope(player); if (auctionScope == null) { return null; } return auctionScope.getActiveAuction(); }
/** * Gets the active auction instance from the scope where the player is. * * @param player player in reference * @return auction instance */
Gets the active auction instance from the scope where the player is
getPlayerAuction
{ "repo_name": "virustotalop/ObsidianAuctions", "path": "src/main/java/com/gmail/virustotalop/obsidianauctions/ObsidianAuctions.java", "license": "gpl-3.0", "size": 21069 }
[ "com.gmail.virustotalop.obsidianauctions.auction.Auction", "com.gmail.virustotalop.obsidianauctions.auction.AuctionScope", "org.bukkit.entity.Player" ]
import com.gmail.virustotalop.obsidianauctions.auction.Auction; import com.gmail.virustotalop.obsidianauctions.auction.AuctionScope; import org.bukkit.entity.Player;
import com.gmail.virustotalop.obsidianauctions.auction.*; import org.bukkit.entity.*;
[ "com.gmail.virustotalop", "org.bukkit.entity" ]
com.gmail.virustotalop; org.bukkit.entity;
1,836,979
@Deprecated public static File getUserRapidMinerDir() { return FileSystemService.getUserRapidMinerDir(); }
static File function() { return FileSystemService.getUserRapidMinerDir(); }
/** * Deprecated method. Remains only for compatibility. Please use * {@link FileSystemService#getUserRapidMinerDir()} instead. */
Deprecated method. Remains only for compatibility. Please use <code>FileSystemService#getUserRapidMinerDir()</code> instead
getUserRapidMinerDir
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/tools/ParameterService.java", "license": "agpl-3.0", "size": 22466 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,225,941
void onLost(Postcard postcard);
void onLost(Postcard postcard);
/** * Callback after lose your way. * * @param postcard meta */
Callback after lose your way
onLost
{ "repo_name": "alibaba/ARouter", "path": "arouter-api/src/main/java/com/alibaba/android/arouter/facade/callback/NavigationCallback.java", "license": "apache-2.0", "size": 807 }
[ "com.alibaba.android.arouter.facade.Postcard" ]
import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.*;
[ "com.alibaba.android" ]
com.alibaba.android;
643,277
public Root getIncludeDirectory() { return outputRoots.includeDirectory; }
Root function() { return outputRoots.includeDirectory; }
/** * Returns the include directory for this build configuration. */
Returns the include directory for this build configuration
getIncludeDirectory
{ "repo_name": "Krasnyanskiy/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java", "license": "apache-2.0", "size": 74047 }
[ "com.google.devtools.build.lib.actions.Root" ]
import com.google.devtools.build.lib.actions.Root;
import com.google.devtools.build.lib.actions.*;
[ "com.google.devtools" ]
com.google.devtools;
2,725,065
public static Map<String, String> parseKeyAndValueToMap(String source) { return parseKeyAndValueToMap(source, DEFAULT_KEY_AND_VALUE_SEPARATOR, DEFAULT_KEY_AND_VALUE_PAIR_SEPARATOR, true); }
static Map<String, String> function(String source) { return parseKeyAndValueToMap(source, DEFAULT_KEY_AND_VALUE_SEPARATOR, DEFAULT_KEY_AND_VALUE_PAIR_SEPARATOR, true); }
/** * parse key-value pairs to map, ignore empty key, ignore space at the begging or end of key and value * * @param source key-value pairs * @return * @see {@link com.goldav.goldavB2C.util.MapUtils#parseKeyAndValueToMap(String, String, String, boolean)}, keyAndValueSeparator is * {@link #...
parse key-value pairs to map, ignore empty key, ignore space at the begging or end of key and value
parseKeyAndValueToMap
{ "repo_name": "yuhuayi/HexExamples", "path": "newbee/src/main/java/app/newbee/lib/util/MapUtils.java", "license": "mit", "size": 9782 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,035,964
public void setDateModified(Date value) { setAttributeInternal(DATEMODIFIED, value); }
void function(Date value) { setAttributeInternal(DATEMODIFIED, value); }
/** * * Sets <code>value</code> as attribute value for DATE_MODIFIED using the alias name DateModified */
Sets <code>value</code> as attribute value for DATE_MODIFIED using the alias name DateModified
setDateModified
{ "repo_name": "CBIIT/cadsr-util", "path": "cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/bc4j/QcRecsExtViewRowImpl.java", "license": "bsd-3-clause", "size": 6483 }
[ "oracle.jbo.domain.Date" ]
import oracle.jbo.domain.Date;
import oracle.jbo.domain.*;
[ "oracle.jbo.domain" ]
oracle.jbo.domain;
371,313
public String getProcessId(ContainerId containerID) { String pid = null; Path pidFile = pidFiles.get(containerID); if (pidFile == null) { // This container isn't even launched yet. return pid; } try { pid = ProcessIdFileReader.getProcessId(pidFile); } catch (IOException e) { ...
String function(ContainerId containerID) { String pid = null; Path pidFile = pidFiles.get(containerID); if (pidFile == null) { return pid; } try { pid = ProcessIdFileReader.getProcessId(pidFile); } catch (IOException e) { LOG.error(STR + pidFile, e); } return pid; } public static class DelayedProcessKiller extends Thre...
/** * Get the process-identifier for the container * * @param containerID * @return the processid of the container if it has already launched, * otherwise return null */
Get the process-identifier for the container
getProcessId
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ContainerExecutor.java", "license": "apache-2.0", "size": 11110 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path", "org.apache.hadoop.yarn.api.records.ContainerId", "org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container", "org.apache.hadoop.yarn.server.nodemanager.util.ProcessIdFileReader" ]
import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container; import org.apache.hadoop.yarn.server.nodemanager.util.ProcessIdFileReader;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.*; import org.apache.hadoop.yarn.server.nodemanager.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,909,217
public void setPublicKey(PublicKey publicKey) { this.publicKey = publicKey; }
void function(PublicKey publicKey) { this.publicKey = publicKey; }
/** * Set the configured public key for use with Raw Public Key. */
Set the configured public key for use with Raw Public Key
setPublicKey
{ "repo_name": "pax95/camel", "path": "components/camel-coap/src/main/java/org/apache/camel/coap/CoAPEndpoint.java", "license": "apache-2.0", "size": 16550 }
[ "java.security.PublicKey" ]
import java.security.PublicKey;
import java.security.*;
[ "java.security" ]
java.security;
1,391,788
protected void initialize(SarlEvent source, JvmGenericType inferredJvmType) { // Issue #356: do not generate if the event has no name. assert source != null; assert inferredJvmType != null; if (Strings.isNullOrEmpty(source.getName())) { return; } // Create the generation context that is used by the ot...
void function(SarlEvent source, JvmGenericType inferredJvmType) { assert source != null; assert inferredJvmType != null; if (Strings.isNullOrEmpty(source.getName())) { return; } final GenerationContext context = openContext(source, inferredJvmType, Arrays.asList( SarlField.class, SarlConstructor.class)); try { this.typ...
/** Initialize the SARL event type. * * @param source the source. * @param inferredJvmType the JVM type. */
Initialize the SARL event type
initialize
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SARLJvmModelInferrer.java", "license": "apache-2.0", "size": 113698 }
[ "com.google.common.base.Strings", "io.sarl.lang.core.Address", "io.sarl.lang.core.Event", "io.sarl.lang.sarl.SarlConstructor", "io.sarl.lang.sarl.SarlEvent", "io.sarl.lang.sarl.SarlField", "io.sarl.lang.util.Utils", "java.text.MessageFormat", "java.util.Arrays", "org.eclipse.xtext.common.types.Jvm...
import com.google.common.base.Strings; import io.sarl.lang.core.Address; import io.sarl.lang.core.Event; import io.sarl.lang.sarl.SarlConstructor; import io.sarl.lang.sarl.SarlEvent; import io.sarl.lang.sarl.SarlField; import io.sarl.lang.util.Utils; import java.text.MessageFormat; import java.util.Arrays; import org.e...
import com.google.common.base.*; import io.sarl.lang.core.*; import io.sarl.lang.sarl.*; import io.sarl.lang.util.*; import java.text.*; import java.util.*; import org.eclipse.xtext.common.types.*;
[ "com.google.common", "io.sarl.lang", "java.text", "java.util", "org.eclipse.xtext" ]
com.google.common; io.sarl.lang; java.text; java.util; org.eclipse.xtext;
969,930
InsnList getPushParameters() { return pushParameters; }
InsnList getPushParameters() { return pushParameters; }
/** * Gets the push parameters. * * This is an instruction list preparing the stack to call *this* method. * * @return the push parameters */
Gets the push parameters. This is an instruction list preparing the stack to call *this* method
getPushParameters
{ "repo_name": "tookar/jBOP", "path": "src/main/java/de/tuberlin/uebb/jbop/optimizer/methodsplitter/Block.java", "license": "lgpl-3.0", "size": 16392 }
[ "org.objectweb.asm.tree.InsnList" ]
import org.objectweb.asm.tree.InsnList;
import org.objectweb.asm.tree.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
469,023
private void handleFeatureRepositories(ProfileBuilder builder, String[] repositories, Profile profile) { Map<String, String> conf = getConfigurationFromBuilder(builder, Constants.AGENT_PID); for (String repositoryURI : repositories) { if (set) { System.out.println("Adding...
void function(ProfileBuilder builder, String[] repositories, Profile profile) { Map<String, String> conf = getConfigurationFromBuilder(builder, Constants.AGENT_PID); for (String repositoryURI : repositories) { if (set) { System.out.println(STR + repositoryURI + STR + profile.getId() + STR + profile.getVersion()); } els...
/** * Adds or remove the specified feature repositories to the specified profile. */
Adds or remove the specified feature repositories to the specified profile
handleFeatureRepositories
{ "repo_name": "hekonsek/fabric8", "path": "sandbox/fabric/fabric-commands/src/main/java/io/fabric8/commands/ProfileEditAction.java", "license": "apache-2.0", "size": 30558 }
[ "io.fabric8.api.Constants", "io.fabric8.api.Profile", "io.fabric8.api.ProfileBuilder", "java.util.Map" ]
import io.fabric8.api.Constants; import io.fabric8.api.Profile; import io.fabric8.api.ProfileBuilder; import java.util.Map;
import io.fabric8.api.*; import java.util.*;
[ "io.fabric8.api", "java.util" ]
io.fabric8.api; java.util;
973,627
@ApiModelProperty(value = "The price of the sku, if available") public BigDecimal getPrice() { return price; }
@ApiModelProperty(value = STR) BigDecimal function() { return price; }
/** * The price of the sku, if available * @return price **/
The price of the sku, if available
getPrice
{ "repo_name": "knetikmedia/knetikcloud-java-client", "path": "src/main/java/com/knetikcloud/model/ActivityEntitlementResource.java", "license": "apache-2.0", "size": 4168 }
[ "io.swagger.annotations.ApiModelProperty", "java.math.BigDecimal" ]
import io.swagger.annotations.ApiModelProperty; import java.math.BigDecimal;
import io.swagger.annotations.*; import java.math.*;
[ "io.swagger.annotations", "java.math" ]
io.swagger.annotations; java.math;
1,221,416
public final OperationsClient getOperationsClient() { return operationsClient; } // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Performs synchronous speech recognition: receive results after all audio has been sent and * processed. * * <p>Sample code: * * <pre><code> * try (SpeechCli...
final OperationsClient function() { return operationsClient; } /** * Performs synchronous speech recognition: receive results after all audio has been sent and * processed. * * <p>Sample code: * * <pre><code> * try (SpeechClient speechClient = SpeechClient.create()) { * RecognitionConfig.AudioEncoding encoding = Recogn...
/** * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call
getOperationsClient
{ "repo_name": "mbrukman/gcloud-java", "path": "google-cloud-speech/src/main/java/com/google/cloud/speech/v1/SpeechClient.java", "license": "apache-2.0", "size": 18914 }
[ "com.google.longrunning.OperationsClient" ]
import com.google.longrunning.OperationsClient;
import com.google.longrunning.*;
[ "com.google.longrunning" ]
com.google.longrunning;
954,415
@Idempotent long rollEdits() throws IOException;
long rollEdits() throws IOException;
/** * Roll the edit log. * Requires superuser privileges. * * @throws org.apache.hadoop.security.AccessControlException if the superuser * privilege is violated * @throws IOException if log roll fails * @return the txid of the new segment */
Roll the edit log. Requires superuser privileges
rollEdits
{ "repo_name": "apurtell/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 71843 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,595,423
// Selecting strings between pair of "" : (\"[^\"]*\") // Selecting tableID.tableName or tableID.* : (\\w+(\\.(\w+)|\\*)) // The combined pattern is : (\"[^\"]*\")|(\\w+\\.((\\w+)|\\*)) Pattern pattern = Pattern.compile( "(\"[^\"]*\")|((\\w+)(\\.((\\w+)|\\*)))" , Pattern.CASE_INSENSITIVE ); Matcher matcher = ...
Pattern pattern = Pattern.compile( "(\"[^\"]*\") ((\\w+)(\\.((\\w+) \\*)))STRQuery rename needs case insensitive treemap.STR$4STR from STR from STR from STR where STR where STR\\s*(\\w+)\\s*STR STR(\"[^\"]*\STR , Pattern.CASE_INSENSITIVE );
/** * Table renaming, note that the renameMapping should be a tree map. This * method gets a sql query and changes the table names using the mappings * provided in the second argument.<br> * * @param query * @param renameMapping * @return */
Table renaming, note that the renameMapping should be a tree map. This method gets a sql query and changes the table names using the mappings provided in the second argument
newRewrite
{ "repo_name": "LSIR/gsn", "path": "gsn-core/src/main/java/ch/epfl/gsn/storage/SQLUtils.java", "license": "gpl-3.0", "size": 8388 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
919,474
public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
Builder function(String key, Object value) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.put(key, value); return this; }
/** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * QuoteListComputedUpfrontLineItemsParams#extraParams} for the field documentation. */
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>QuoteListComputedUpfrontLineItemsParams#extraParams</code> for the field documentation
putExtraParam
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/QuoteListComputedUpfrontLineItemsParams.java", "license": "mit", "size": 6061 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
338,271
public static boolean isDictionaryAvailable(Context context, Locale locale) { final Resources res = context.getResources(); final Locale saveLocale = LocaleUtils.setSystemLocale(res, locale); final int resourceId = Utils.getMainDictionaryResourceId(res); final AssetFileDescript...
static boolean function(Context context, Locale locale) { final Resources res = context.getResources(); final Locale saveLocale = LocaleUtils.setSystemLocale(res, locale); final int resourceId = Utils.getMainDictionaryResourceId(res); final AssetFileDescriptor afd = res.openRawResourceFd(resourceId); final boolean hasD...
/** * Find out whether a dictionary is available for this locale. * @param context the context on which to check resources. * @param locale the locale to check for. * @return whether a (non-placeholder) dictionary is available or not. */
Find out whether a dictionary is available for this locale
isDictionaryAvailable
{ "repo_name": "soeminnminn/LatinIME_ICS_ported", "path": "src/com/android/inputmethod/latin/DictionaryFactory.java", "license": "apache-2.0", "size": 9512 }
[ "android.content.Context", "android.content.res.AssetFileDescriptor", "android.content.res.Resources", "java.util.Locale" ]
import android.content.Context; import android.content.res.AssetFileDescriptor; import android.content.res.Resources; import java.util.Locale;
import android.content.*; import android.content.res.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
559,967
private static Multimap<String, Integer> prepareUnmodifiableTests( Multimap<String, Integer> multimap, boolean permitsDuplicates, @Nullable String nullKey, @Nullable Integer nullValue) { multimap.clear(); multimap.put("foo", 1); multimap.put("foo", 2); multimap.put("foo", 3); multimap....
static Multimap<String, Integer> function( Multimap<String, Integer> multimap, boolean permitsDuplicates, @Nullable String nullKey, @Nullable Integer nullValue) { multimap.clear(); multimap.put("foo", 1); multimap.put("foo", 2); multimap.put("foo", 3); multimap.put("bar", 5); multimap.put("bar", -1); multimap.put(nullK...
/** * Prepares the multimap for unmodifiable tests, returning an unmodifiable view * of the map. */
Prepares the multimap for unmodifiable tests, returning an unmodifiable view of the map
prepareUnmodifiableTests
{ "repo_name": "jakubmalek/guava", "path": "guava-tests/test/com/google/common/collect/MultimapsTest.java", "license": "apache-2.0", "size": 38230 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
507,587
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { // Si el resultado pertenece a la captura de imagen. if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) { if (resultCode == Activity.RESULT_OK) { // vista previa de imagen. ...
void function(int requestCode, int resultCode, Intent data) { if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) { if (resultCode == Activity.RESULT_OK) { previewCapturedImage(); } else if (resultCode == Activity.RESULT_CANCELED) { Toast.makeText(getActivity().getApplicationContext(), STR, Toast.LENGTH_SHORT) .show(...
/** * Pre: cierto. * Post: recibe el resultado de la actividad * (sera llamado tras cerrar la camara). */
Pre: cierto. Post: recibe el resultado de la actividad (sera llamado tras cerrar la camara)
onActivityResult
{ "repo_name": "piraces/Wallapet", "path": "app/src/main/java/com/hyenatechnologies/wallapet/pantallas/CrearModificarAnuncioFragment.java", "license": "gpl-3.0", "size": 35348 }
[ "android.app.Activity", "android.content.Intent", "android.widget.Toast" ]
import android.app.Activity; import android.content.Intent; import android.widget.Toast;
import android.app.*; import android.content.*; import android.widget.*;
[ "android.app", "android.content", "android.widget" ]
android.app; android.content; android.widget;
2,283,557
doc = (SBMLDocument) recurse(doc); return doc; }
doc = (SBMLDocument) recurse(doc); return doc; }
/** * A static method which add id information of each element to userObjects map which is an element * of AbstractTreeNode SBML class to store extra information * * @param doc */
A static method which add id information of each element to userObjects map which is an element of AbstractTreeNode SBML class to store extra information
putOrigId
{ "repo_name": "cogsys-tuebingen/SBSCL", "path": "src/main/java/org/simulator/sbml/AddMetaInfo.java", "license": "lgpl-3.0", "size": 2904 }
[ "org.sbml.jsbml.SBMLDocument" ]
import org.sbml.jsbml.SBMLDocument;
import org.sbml.jsbml.*;
[ "org.sbml.jsbml" ]
org.sbml.jsbml;
1,878,713
public Tool getDefaultTool() { if (defaultTool == null) defaultTool = new SelectionTool(); return defaultTool; }
Tool function() { if (defaultTool == null) defaultTool = new SelectionTool(); return defaultTool; }
/** * Returns the default tool for this edit domain. This will be a * {@link org.eclipse.gef.tools.SelectionTool} unless specifically replaced * using {@link #setDefaultTool(Tool)}. * * @return The default Tool for this domain */
Returns the default tool for this edit domain. This will be a <code>org.eclipse.gef.tools.SelectionTool</code> unless specifically replaced using <code>#setDefaultTool(Tool)</code>
getDefaultTool
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.gef/src/org/eclipse/gef/EditDomain.java", "license": "lgpl-2.1", "size": 13211 }
[ "org.eclipse.gef.tools.SelectionTool" ]
import org.eclipse.gef.tools.SelectionTool;
import org.eclipse.gef.tools.*;
[ "org.eclipse.gef" ]
org.eclipse.gef;
1,929,104
@Test public void testJobManagerMemoryPropertyWithConfigDefaultValue() throws Exception { int procMemory = 2048; final FlinkYarnSessionCli flinkYarnSessionCli = createFlinkYarnSessionCliWithJmAndTmTotalMemory(procMemory); final CommandLine commandLine = flinkYarnSessionCli.parseCommandLineOptions(new String[...
void function() throws Exception { int procMemory = 2048; final FlinkYarnSessionCli flinkYarnSessionCli = createFlinkYarnSessionCliWithJmAndTmTotalMemory(procMemory); final CommandLine commandLine = flinkYarnSessionCli.parseCommandLineOptions(new String[0], false); final Configuration executorConfig = flinkYarnSessionC...
/** * Tests the specifying job manager total process memory with config default value for job manager and task manager. */
Tests the specifying job manager total process memory with config default value for job manager and task manager
testJobManagerMemoryPropertyWithConfigDefaultValue
{ "repo_name": "tzulitai/flink", "path": "flink-yarn/src/test/java/org/apache/flink/yarn/FlinkYarnSessionCliTest.java", "license": "apache-2.0", "size": 25105 }
[ "org.apache.commons.cli.CommandLine", "org.apache.flink.client.deployment.ClusterClientFactory", "org.apache.flink.client.deployment.ClusterSpecification", "org.apache.flink.configuration.Configuration", "org.apache.flink.yarn.cli.FlinkYarnSessionCli", "org.apache.hadoop.yarn.api.records.ApplicationId", ...
import org.apache.commons.cli.CommandLine; import org.apache.flink.client.deployment.ClusterClientFactory; import org.apache.flink.client.deployment.ClusterSpecification; import org.apache.flink.configuration.Configuration; import org.apache.flink.yarn.cli.FlinkYarnSessionCli; import org.apache.hadoop.yarn.api.records....
import org.apache.commons.cli.*; import org.apache.flink.client.deployment.*; import org.apache.flink.configuration.*; import org.apache.flink.yarn.cli.*; import org.apache.hadoop.yarn.api.records.*; import org.hamcrest.*; import org.junit.*;
[ "org.apache.commons", "org.apache.flink", "org.apache.hadoop", "org.hamcrest", "org.junit" ]
org.apache.commons; org.apache.flink; org.apache.hadoop; org.hamcrest; org.junit;
1,276,961
interface WithInboundIpRules { WithCreate withInboundIpRules(List<InboundIpRule> inboundIpRules); }
interface WithInboundIpRules { WithCreate withInboundIpRules(List<InboundIpRule> inboundIpRules); }
/** * Specifies the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of * all IPs. Note: These are considered only if PublicNetworkAccess is enabled.. * * @param inboundIpRules This can be used to restrict traffic from specific I...
Specifies the inboundIpRules property: This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
withInboundIpRules
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java", "license": "mit", "size": 32244 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
448,806
public Object unmarshal(HierarchicalStreamReader reader) { return unmarshal(reader, null, null); }
Object function(HierarchicalStreamReader reader) { return unmarshal(reader, null, null); }
/** * Deserialize an object from a hierarchical data structure (such as XML). * @throws XStreamException if the object cannot be deserialized */
Deserialize an object from a hierarchical data structure (such as XML)
unmarshal
{ "repo_name": "fukata/xstream-for-android", "path": "xstream/src/java/com/thoughtworks/xstream/XStream.java", "license": "bsd-3-clause", "size": 68831 }
[ "com.thoughtworks.xstream.io.HierarchicalStreamReader" ]
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.*;
[ "com.thoughtworks.xstream" ]
com.thoughtworks.xstream;
2,651,595
public byte[] decrypt(final byte[] bytes) throws EncryptionCodecException { LOGGER.trace("decrypt() called..."); if (ArrayUtils.isEmpty(bytes)) { throw new IllegalArgumentException("The byte array to decrypt must not be null or empty."); } // Do all the work... ...
byte[] function(final byte[] bytes) throws EncryptionCodecException { LOGGER.trace(STR); if (ArrayUtils.isEmpty(bytes)) { throw new IllegalArgumentException(STR); } return inflateInternal(decryptInternal(decodeInternal(bytes))); }
/** * This method should firstly Base64 decode {@code bytes}, then decrypt it and finally inflate it. * @param bytes A Base64 encoded, encrypted and deflated array of bytes * @return The original unencrypted content as a byte array * @throws EncryptionCodecException if there was a problem during any...
This method should firstly Base64 decode bytes, then decrypt it and finally inflate it
decrypt
{ "repo_name": "hpe-idol/java-aci-api-ng", "path": "src/main/java/com/autonomy/aci/client/transport/impl/AbstractEncryptionCodec.java", "license": "mit", "size": 10350 }
[ "com.autonomy.aci.client.transport.EncryptionCodecException", "org.apache.commons.lang.ArrayUtils" ]
import com.autonomy.aci.client.transport.EncryptionCodecException; import org.apache.commons.lang.ArrayUtils;
import com.autonomy.aci.client.transport.*; import org.apache.commons.lang.*;
[ "com.autonomy.aci", "org.apache.commons" ]
com.autonomy.aci; org.apache.commons;
1,012,397
public boolean delete() throws IOException, InterruptedException { act(new Delete()); return true; }
boolean function() throws IOException, InterruptedException { act(new Delete()); return true; }
/** * Deletes this file. * @throws IOException if it exists but could not be successfully deleted * @return true, for a modicum of compatibility */
Deletes this file
delete
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 134702 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
556,330
private void sendNotification(String messageBody) { Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 , intent, PendingIntent.FLAG_ONE_SHOT); Uri defa...
void function(String messageBody) { Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 , intent, PendingIntent.FLAG_ONE_SHOT); Uri defaultSoundUri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIF...
/** * Create and show a simple notification containing the received FCM message. * * @param messageBody FCM message body received. */
Create and show a simple notification containing the received FCM message
sendNotification
{ "repo_name": "eurosecom/Attendance", "path": "app/src/main/java/com/eusecom/attendance/MyFirebaseMessagingService.java", "license": "apache-2.0", "size": 4334 }
[ "android.app.NotificationManager", "android.app.PendingIntent", "android.content.Context", "android.content.Intent", "android.media.RingtoneManager", "android.net.Uri", "android.support.v4.app.NotificationCompat" ]
import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat;
import android.app.*; import android.content.*; import android.media.*; import android.net.*; import android.support.v4.app.*;
[ "android.app", "android.content", "android.media", "android.net", "android.support" ]
android.app; android.content; android.media; android.net; android.support;
1,425,389
private static LogicalExpression createIsTruePredicate(LogicalExpression expr) { return new ParquetIsPredicate<Boolean>(expr, (exprStat, evaluator) -> //if max value is not true or if there are all nulls -> canDrop isAllNulls(exprStat, evaluator.getRowCount()) || exprStat.hasNonNullValue() && !((...
static LogicalExpression function(LogicalExpression expr) { return new ParquetIsPredicate<Boolean>(expr, (exprStat, evaluator) -> isAllNulls(exprStat, evaluator.getRowCount()) exprStat.hasNonNullValue() && !((BooleanStatistics) exprStat).getMax() ); }
/** * IS TRUE predicate. */
IS TRUE predicate
createIsTruePredicate
{ "repo_name": "ppadma/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/stat/ParquetIsPredicate.java", "license": "apache-2.0", "size": 6576 }
[ "org.apache.drill.common.expression.LogicalExpression", "org.apache.drill.exec.expr.stat.ParquetPredicatesHelper", "org.apache.parquet.column.statistics.BooleanStatistics" ]
import org.apache.drill.common.expression.LogicalExpression; import org.apache.drill.exec.expr.stat.ParquetPredicatesHelper; import org.apache.parquet.column.statistics.BooleanStatistics;
import org.apache.drill.common.expression.*; import org.apache.drill.exec.expr.stat.*; import org.apache.parquet.column.statistics.*;
[ "org.apache.drill", "org.apache.parquet" ]
org.apache.drill; org.apache.parquet;
1,614,401
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String usuario = (String) request.getSession().getAttribute("usuario"); if (usuario != null && !usuar...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); String usuario = (String) request.getSession().getAttribute(STR); if (usuario != null && !usuario.isEmpty()) { } String google = (String) request.getSession().getAttribute(STR); S...
/** * 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": "vroddon/tbx2rdfservice", "path": "web/src/java/tbx2rdfservice/servlets/AccountServlet.java", "license": "apache-2.0", "size": 3853 }
[ "java.io.BufferedInputStream", "java.io.IOException", "java.io.InputStream", "java.io.PrintWriter", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.io.IOUtils" ]
import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.io.*;
[ "java.io", "javax.servlet", "org.apache.commons" ]
java.io; javax.servlet; org.apache.commons;
814,655
public void test_20_checkConstraints() throws Exception { Connection conn = getConnection(); goodStatement ( conn, "create table remes\n" + "(\n" + " remesID int primary key generated always as identity,\n" + " n...
void function() throws Exception { Connection conn = getConnection(); goodStatement ( conn, STR + "(\n" + STR + STR + STR + STR + STR + ")\n" ); goodStatement ( conn, STR + STR + STR + STR ); assertResults ( conn, STR, new String[][] { { "1", STR, "false", "true" }, { "2", STR, "true", "false" }, }, false ); goodStatem...
/** * <p> * Verify booleans in check constraints. * </p> */
Verify booleans in check constraints.
test_20_checkConstraints
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/BooleanValuesTest.java", "license": "apache-2.0", "size": 73417 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
680,656
public synchronized void clear() { sLogger.trace("Clearing all datapoints from auto refresh scheduler"); mReadQueue.clear(); // Restarting schedule executor if (mScheduledExecutorService != null) { sLogger.debug("Schedule executor restart."); mScheduledExecut...
synchronized void function() { sLogger.trace(STR); mReadQueue.clear(); if (mScheduledExecutorService != null) { sLogger.debug(STR); mScheduledExecutorService.shutdown(); try { if (mScheduledExecutorService.awaitTermination( KNXConnection.getScheduledExecutorServiceShutdownTimeout(), TimeUnit.SECONDS)) { sLogger.debug(S...
/** * Clears all datapoints from the scheduler */
Clears all datapoints from the scheduler
clear
{ "repo_name": "cdjackson/openhab", "path": "bundles/binding/org.openhab.binding.knx/src/main/java/org/openhab/binding/knx/internal/bus/KNXBusReaderScheduler.java", "license": "epl-1.0", "size": 12333 }
[ "java.util.Iterator", "java.util.List", "java.util.concurrent.Executors", "java.util.concurrent.TimeUnit", "org.openhab.binding.knx.internal.connection.KNXConnection" ]
import java.util.Iterator; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import org.openhab.binding.knx.internal.connection.KNXConnection;
import java.util.*; import java.util.concurrent.*; import org.openhab.binding.knx.internal.connection.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
1,556,238
@Test public void testGetBrand() { Assert.assertEquals(this.brand, this.instance.getBrand()); }
void function() { Assert.assertEquals(this.brand, this.instance.getBrand()); }
/** * Test for {@link BaseballCard#getBrand}. */
Test for <code>BaseballCard#getBrand</code>
testGetBrand
{ "repo_name": "charanyaarvind/bbct", "path": "swing/test/bbct/common/data/BaseballCardNominalTest.java", "license": "gpl-3.0", "size": 5148 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,014,804
@Cacheable(value = CalendarEntryContract.CACHE_NAME, key = "'hrCalendarId=' + #p0 + '|' + 'asOfDate=' + #p1") public CalendarEntry getCurrentCalendarEntryByCalendarId(String hrCalendarId, DateTime asOfDate);
@Cacheable(value = CalendarEntryContract.CACHE_NAME, key = STR) CalendarEntry function(String hrCalendarId, DateTime asOfDate);
/** * Method to obtain the current CalendarEntry object based on the * indicated calendar and asOfDate. * * @param hrCalendarId The calendar to reference. * @param asOfDate The date reference point. * @return the current CalendarEntry effective by the asOfDate. */
Method to obtain the current CalendarEntry object based on the indicated calendar and asOfDate
getCurrentCalendarEntryByCalendarId
{ "repo_name": "kuali/kpme", "path": "core/api/src/main/java/org/kuali/kpme/core/api/calendar/entry/service/CalendarEntryService.java", "license": "apache-2.0", "size": 7299 }
[ "org.joda.time.DateTime", "org.kuali.kpme.core.api.calendar.entry.CalendarEntry", "org.kuali.kpme.core.api.calendar.entry.CalendarEntryContract", "org.springframework.cache.annotation.Cacheable" ]
import org.joda.time.DateTime; import org.kuali.kpme.core.api.calendar.entry.CalendarEntry; import org.kuali.kpme.core.api.calendar.entry.CalendarEntryContract; import org.springframework.cache.annotation.Cacheable;
import org.joda.time.*; import org.kuali.kpme.core.api.calendar.entry.*; import org.springframework.cache.annotation.*;
[ "org.joda.time", "org.kuali.kpme", "org.springframework.cache" ]
org.joda.time; org.kuali.kpme; org.springframework.cache;
2,530,250
@Override public void registerRecv(IConnectionCallback cb) { throw new UnsupportedOperationException("Client connection should not receive any messages"); }
void function(IConnectionCallback cb) { throw new UnsupportedOperationException(STR); }
/** * Receiving messages is not supported by a client. * * @throws java.lang.UnsupportedOperationException whenever this method is being called. */
Receiving messages is not supported by a client
registerRecv
{ "repo_name": "carl34/storm", "path": "storm-client/src/jvm/org/apache/storm/messaging/netty/Client.java", "license": "apache-2.0", "size": 23619 }
[ "org.apache.storm.messaging.IConnectionCallback" ]
import org.apache.storm.messaging.IConnectionCallback;
import org.apache.storm.messaging.*;
[ "org.apache.storm" ]
org.apache.storm;
1,058,892
public void testIO() { User org = new User().setId(20); RecentRepositories recent1 = new RecentRepositories(getContext(), org); long id = 1234; recent1.add(id); assertTrue(recent1.contains(id)); recent1.save(); RecentRepositories recent2 = new RecentRepositori...
void function() { User org = new User().setId(20); RecentRepositories recent1 = new RecentRepositories(getContext(), org); long id = 1234; recent1.add(id); assertTrue(recent1.contains(id)); recent1.save(); RecentRepositories recent2 = new RecentRepositories(getContext(), org); assertTrue(recent2.contains(id)); }
/** * Verify input/output to disk of {@link RecentRepositories} state */
Verify input/output to disk of <code>RecentRepositories</code> state
testIO
{ "repo_name": "DeLaSalleUniversity-Manila/forkhub-Janelaaa", "path": "app/src/androidTest/java/com/janela/mobile/tests/repo/RecentRepositoriesTest.java", "license": "apache-2.0", "size": 2984 }
[ "com.janela.mobile.ui.repo.RecentRepositories", "org.eclipse.egit.github.core.User" ]
import com.janela.mobile.ui.repo.RecentRepositories; import org.eclipse.egit.github.core.User;
import com.janela.mobile.ui.repo.*; import org.eclipse.egit.github.core.*;
[ "com.janela.mobile", "org.eclipse.egit" ]
com.janela.mobile; org.eclipse.egit;
638,886
public void helpTestStartAndEndIterator(Region region, Object startValue, boolean startInclusive, Object endValue, boolean endInclusive, int expectedSize) throws IMQException { addValues(region, numValues); CloseableIterator<IndexStoreEntry> iterator = indexDataStructure.iterator(startValue, sta...
void function(Region region, Object startValue, boolean startInclusive, Object endValue, boolean endInclusive, int expectedSize) throws IMQException { addValues(region, numValues); CloseableIterator<IndexStoreEntry> iterator = indexDataStructure.iterator(startValue, startInclusive, endValue, endInclusive, null); valida...
/** * Helper method to test index storage iterators */
Helper method to test index storage iterators
helpTestStartAndEndIterator
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/MapIndexStoreJUnitTest.java", "license": "apache-2.0", "size": 10751 }
[ "org.apache.geode.cache.Region", "org.apache.geode.cache.query.internal.index.IndexStore", "org.apache.geode.internal.cache.persistence.query.CloseableIterator" ]
import org.apache.geode.cache.Region; import org.apache.geode.cache.query.internal.index.IndexStore; import org.apache.geode.internal.cache.persistence.query.CloseableIterator;
import org.apache.geode.cache.*; import org.apache.geode.cache.query.internal.index.*; import org.apache.geode.internal.cache.persistence.query.*;
[ "org.apache.geode" ]
org.apache.geode;
42,937
protected IIOService getIOService() { return ioService; }
IIOService function() { return ioService; }
/** * This operation returns the IO service for subclasses without giving them * access to the private handle. * * @return The IOService instance */
This operation returns the IO service for subclasses without giving them access to the private handle
getIOService
{ "repo_name": "wo-amlangwang/ice", "path": "org.eclipse.ice.item/src/org/eclipse/ice/item/Item.java", "license": "epl-1.0", "size": 70513 }
[ "org.eclipse.ice.io.serializable.IIOService" ]
import org.eclipse.ice.io.serializable.IIOService;
import org.eclipse.ice.io.serializable.*;
[ "org.eclipse.ice" ]
org.eclipse.ice;
143,216
public String getBallotSubmitResponse() { if (this.getSpec() != null) { if (this.getSpec().has(VerifierFields.BallotGenerationVerifierSpec.BALLOT_SUBMIT_RESPONSE)) { try { return this.getSpec().getString(VerifierFields.BallotGenerationVerifierSpec.BALLOT_SUBMIT_RESPONSE); } catch (JSONException e) ...
String function() { if (this.getSpec() != null) { if (this.getSpec().has(VerifierFields.BallotGenerationVerifierSpec.BALLOT_SUBMIT_RESPONSE)) { try { return this.getSpec().getString(VerifierFields.BallotGenerationVerifierSpec.BALLOT_SUBMIT_RESPONSE); } catch (JSONException e) { logger.error(STR); } } } return null; }
/** * Getter for the name of the ballot submit response message * * @return spec.getString(BALLOT_SUBMIT_RESPONSE) */
Getter for the name of the ballot submit response message
getBallotSubmitResponse
{ "repo_name": "jerumble/vVoteVerifier", "path": "src/com/vvote/verifier/component/ballotGen/BallotGenerationVerifierSpec.java", "license": "gpl-3.0", "size": 4172 }
[ "com.vvote.thirdparty.json.orgjson.JSONException", "com.vvote.verifier.fields.VerifierFields" ]
import com.vvote.thirdparty.json.orgjson.JSONException; import com.vvote.verifier.fields.VerifierFields;
import com.vvote.thirdparty.json.orgjson.*; import com.vvote.verifier.fields.*;
[ "com.vvote.thirdparty", "com.vvote.verifier" ]
com.vvote.thirdparty; com.vvote.verifier;
2,423,340
public String getExecutedTournamentId() { Node metaNode = this.document.getElementsByTagName( "executed-tournament-id").item(0); if (metaNode != null) { return metaNode.getTextContent(); } else { return null; } }
String function() { Node metaNode = this.document.getElementsByTagName( STR).item(0); if (metaNode != null) { return metaNode.getTextContent(); } else { return null; } }
/** * Get the ID of the currently executed tournament in the represented event * * @return New executed tournament ID */
Get the ID of the currently executed tournament in the represented event
getExecutedTournamentId
{ "repo_name": "Novanoid/Tourney", "path": "Application/src/usspg31/tourney/model/filemanagement/MetaDocument.java", "license": "gpl-3.0", "size": 3960 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
357,595
private static boolean addToHiveFromClassLoader(Configuration conf, String name) { URL url = conf.getClassLoader().getResource(name); if (url == null) { return false; } if (LOG.isInfoEnabled()) { LOG.info("addToHiveFromClassLoader: Adding " + name + " at " + url + " to Conf...
static boolean function(Configuration conf, String name) { URL url = conf.getClassLoader().getResource(name); if (url == null) { return false; } if (LOG.isInfoEnabled()) { LOG.info(STR + name + STR + url + STR); } addToStringCollection(conf, STR, url.toString()); return true; }
/** * Add a file to Configuration tmpfiles from ClassLoader resource * * @param conf Configuration * @param name file name * @return true if file found in class loader, false otherwise */
Add a file to Configuration tmpfiles from ClassLoader resource
addToHiveFromClassLoader
{ "repo_name": "dcrankshaw/giraph", "path": "giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java", "license": "apache-2.0", "size": 12018 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,190,044
protected Iterable<Item> getAllItems(PersistenceConfiguration config) { // first check, if we should return them all for(EObject itemCfg : config.getItems()) { if (itemCfg instanceof AllConfig) { return itemRegistry.getItems(); } } // otherwise, go through the detailed definitions Set<Item> it...
Iterable<Item> function(PersistenceConfiguration config) { for(EObject itemCfg : config.getItems()) { if (itemCfg instanceof AllConfig) { return itemRegistry.getItems(); } } Set<Item> items = new HashSet<Item>(); for(EObject itemCfg : config.getItems()) { if (itemCfg instanceof ItemConfig) { ItemConfig singleItemConfig...
/** * Retrieves all items for which the persistence configuration applies to. * * @param config the persistence configuration entry * @return all items that this configuration applies to */
Retrieves all items for which the persistence configuration applies to
getAllItems
{ "repo_name": "noushadali/openhab", "path": "bundles/core/org.openhab.core.persistence/src/main/java/org/openhab/core/persistence/internal/PersistenceManager.java", "license": "gpl-3.0", "size": 17527 }
[ "java.util.HashSet", "java.util.Set", "org.eclipse.emf.ecore.EObject", "org.openhab.core.items.GroupItem", "org.openhab.core.items.Item", "org.openhab.core.items.ItemNotFoundException", "org.openhab.model.persistence.persistence.AllConfig", "org.openhab.model.persistence.persistence.GroupConfig", "o...
import java.util.HashSet; import java.util.Set; import org.eclipse.emf.ecore.EObject; import org.openhab.core.items.GroupItem; import org.openhab.core.items.Item; import org.openhab.core.items.ItemNotFoundException; import org.openhab.model.persistence.persistence.AllConfig; import org.openhab.model.persistence.persist...
import java.util.*; import org.eclipse.emf.ecore.*; import org.openhab.core.items.*; import org.openhab.model.persistence.persistence.*;
[ "java.util", "org.eclipse.emf", "org.openhab.core", "org.openhab.model" ]
java.util; org.eclipse.emf; org.openhab.core; org.openhab.model;
205,852
public void writeNodes(PortableRawWriterEx writer, Collection<ClusterNode> nodes);
void function(PortableRawWriterEx writer, Collection<ClusterNode> nodes);
/** * Writes multiple node ids to a stream and sends node info to native platform, if necessary. * * @param writer Writer. * @param nodes Nodes. */
Writes multiple node ids to a stream and sends node info to native platform, if necessary
writeNodes
{ "repo_name": "agoncharuk/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformContext.java", "license": "apache-2.0", "size": 8172 }
[ "java.util.Collection", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.portable.PortableRawWriterEx" ]
import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.portable.PortableRawWriterEx;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.portable.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
858,518
public void writeVLong(long i) throws IOException { while ((i & ~0x7F) != 0) { writeByte((byte)((i & 0x7f) | 0x80)); i >>>= 7; } writeByte((byte)i); }
void function(long i) throws IOException { while ((i & ~0x7F) != 0) { writeByte((byte)((i & 0x7f) 0x80)); i >>>= 7; } writeByte((byte)i); }
/** Writes an long in a variable-length format. Writes between one and five * bytes. Smaller values take fewer bytes. Negative numbers are not * supported. * @see IndexInput#readVLong() */
Writes an long in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported
writeVLong
{ "repo_name": "nimisha-srinivasa/RTP", "path": "src/archive_lucene/archive_lucene/src/org/apache/lucene/store/IndexOutput.java", "license": "apache-2.0", "size": 7464 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,562,255
StringifiedAccumulatorResult[] getUserAccumulatorsStringified();
StringifiedAccumulatorResult[] getUserAccumulatorsStringified();
/** * Returns the user-defined accumulators as strings. * * @return user-defined accumulators as strings. */
Returns the user-defined accumulators as strings
getUserAccumulatorsStringified
{ "repo_name": "aljoscha/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/AccessExecution.java", "license": "apache-2.0", "size": 2986 }
[ "org.apache.flink.runtime.accumulators.StringifiedAccumulatorResult" ]
import org.apache.flink.runtime.accumulators.StringifiedAccumulatorResult;
import org.apache.flink.runtime.accumulators.*;
[ "org.apache.flink" ]
org.apache.flink;
1,146,895
public EntityIdentifier[] searchForEntities(String query, int method, Class type) throws GroupsException;
EntityIdentifier[] function(String query, int method, Class type) throws GroupsException;
/** * Find EntityIdentifiers for entities whose name matches the query string * according to the specified method and is of the specified type */
Find EntityIdentifiers for entities whose name matches the query string according to the specified method and is of the specified type
searchForEntities
{ "repo_name": "vbonamy/esup-uportal", "path": "uportal-war/src/main/java/org/jasig/portal/groups/IGroupService.java", "license": "apache-2.0", "size": 4961 }
[ "org.jasig.portal.EntityIdentifier" ]
import org.jasig.portal.EntityIdentifier;
import org.jasig.portal.*;
[ "org.jasig.portal" ]
org.jasig.portal;
78,092
public boolean canAttackClass(Class p_70686_1_) { return this.isPlayerCreated() && EntityPlayer.class.isAssignableFrom(p_70686_1_) ? false : super.canAttackClass(p_70686_1_); }
boolean function(Class p_70686_1_) { return this.isPlayerCreated() && EntityPlayer.class.isAssignableFrom(p_70686_1_) ? false : super.canAttackClass(p_70686_1_); }
/** * Returns true if this entity can attack entities of the specified class. */
Returns true if this entity can attack entities of the specified class
canAttackClass
{ "repo_name": "jtrent238/jtrent238FoodMod", "path": "src/main/java/com/jtrent238/foodmod/EntityCandyGolem.java", "license": "lgpl-2.1", "size": 10204 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,738,120
public static <E> SortedSet<E> unmodifiableSortedSet(final SortedSet<E> set) { return UnmodifiableSortedSet.unmodifiableSortedSet(set); } private SetUtils() {}
static <E> SortedSet<E> function(final SortedSet<E> set) { return UnmodifiableSortedSet.unmodifiableSortedSet(set); } private SetUtils() {}
/** * Returns an unmodifiable sorted set backed by the given sorted set. * <p> * This method uses the implementation in the decorators subpackage. * * @param <E> the element type * @param set the sorted set to make unmodifiable, must not be null * @return an unmodifiable set backed b...
Returns an unmodifiable sorted set backed by the given sorted set. This method uses the implementation in the decorators subpackage
unmodifiableSortedSet
{ "repo_name": "apache/commons-collections", "path": "src/main/java/org/apache/commons/collections4/SetUtils.java", "license": "apache-2.0", "size": 24909 }
[ "java.util.SortedSet", "org.apache.commons.collections4.set.UnmodifiableSortedSet" ]
import java.util.SortedSet; import org.apache.commons.collections4.set.UnmodifiableSortedSet;
import java.util.*; import org.apache.commons.collections4.set.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
1,515,451
@WebMethod List<TdbAuWsResult> queryTdbAus( @WebParam(name = "tdbAuQuery") String tdbAuQuery) throws LockssWebServicesFault;
List<TdbAuWsResult> queryTdbAus( @WebParam(name = STR) String tdbAuQuery) throws LockssWebServicesFault;
/** * Provides the selected properties of selected title database archival units. * * @param tdbAuQuery * A String with the * <a href="package-summary.html#SQL-Like_Query">SQL-like query</a> * used to specify what properties to retrieve from which title * databa...
Provides the selected properties of selected title database archival units
queryTdbAus
{ "repo_name": "edina/lockss-daemon", "path": "src/org/lockss/ws/status/DaemonStatusService.java", "license": "bsd-3-clause", "size": 10290 }
[ "java.util.List", "javax.jws.WebParam", "org.lockss.ws.entities.LockssWebServicesFault", "org.lockss.ws.entities.TdbAuWsResult" ]
import java.util.List; import javax.jws.WebParam; import org.lockss.ws.entities.LockssWebServicesFault; import org.lockss.ws.entities.TdbAuWsResult;
import java.util.*; import javax.jws.*; import org.lockss.ws.entities.*;
[ "java.util", "javax.jws", "org.lockss.ws" ]
java.util; javax.jws; org.lockss.ws;
146,892
EReference getProperty_InitialValue();
EReference getProperty_InitialValue();
/** * Returns the meta object for the containment reference '{@link org.yakindu.base.types.Property#getInitialValue <em>Initial Value</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Initial Value</em>'. * @see org.yakindu.base.types.Proper...
Returns the meta object for the containment reference '<code>org.yakindu.base.types.Property#getInitialValue Initial Value</code>'.
getProperty_InitialValue
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java", "license": "epl-1.0", "size": 91972 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
722,081
EAttribute getnRICH_NO_Name();
EAttribute getnRICH_NO_Name();
/** * Returns the meta object for the attribute '{@link sc.ndt.editor.turbsimtbs.nRICH_NO#getName <em>Name</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Name</em>'. * @see sc.ndt.editor.turbsimtbs.nRICH_NO#getName() * @see #getnRICH_NO() ...
Returns the meta object for the attribute '<code>sc.ndt.editor.turbsimtbs.nRICH_NO#getName Name</code>'.
getnRICH_NO_Name
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.turbsim.tbs/src-gen/sc/ndt/editor/turbsimtbs/TurbsimtbsPackage.java", "license": "gpl-3.0", "size": 204585 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
786,215
public Path getTempDirForFinalJobPath(Path path) { return getExtTmpPathRelTo(path); }
Path function(Path path) { return getExtTmpPathRelTo(path); }
/** * Create a temporary directory depending of the path specified. * - If path is an Object store filesystem, then use the default MR scratch directory (HDFS) * - If path is on HDFS, then create a staging directory inside the path * * @param path Path used to verify the Filesystem to use for temporary d...
Create a temporary directory depending of the path specified. - If path is an Object store filesystem, then use the default MR scratch directory (HDFS) - If path is on HDFS, then create a staging directory inside the path
getTempDirForFinalJobPath
{ "repo_name": "jcamachor/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/Context.java", "license": "apache-2.0", "size": 43612 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,362,508
private boolean hasLegalFragmentName( Class<?> configurationFragment, ConfigurationTransition transition) { StarlarkBuiltin fragmentModule = StarlarkInterfaceUtils.getStarlarkBuiltin(configurationFragment); return fragmentModule != null && starlarkRequiredConfigurationFragments.contains...
boolean function( Class<?> configurationFragment, ConfigurationTransition transition) { StarlarkBuiltin fragmentModule = StarlarkInterfaceUtils.getStarlarkBuiltin(configurationFragment); return fragmentModule != null && starlarkRequiredConfigurationFragments.containsEntry(transition, fragmentModule.name()); }
/** * Checks whether the name of the given fragment class was declared as required in the * specified configuration (target or host). */
Checks whether the name of the given fragment class was declared as required in the specified configuration (target or host)
hasLegalFragmentName
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java", "license": "apache-2.0", "size": 11731 }
[ "com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition", "com.google.devtools.build.lib.skylarkinterface.StarlarkBuiltin", "com.google.devtools.build.lib.skylarkinterface.StarlarkInterfaceUtils" ]
import com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition; import com.google.devtools.build.lib.skylarkinterface.StarlarkBuiltin; import com.google.devtools.build.lib.skylarkinterface.StarlarkInterfaceUtils;
import com.google.devtools.build.lib.analysis.config.transitions.*; import com.google.devtools.build.lib.skylarkinterface.*;
[ "com.google.devtools" ]
com.google.devtools;
602,131
@Override protected void initViews(Bundle savedInstanceState) { ButterKnife.bind(this); }
@Override void function(Bundle savedInstanceState) { ButterKnife.bind(this); }
/** * Initialize the view in the layout * * @param savedInstanceState savedInstanceState */
Initialize the view in the layout
initViews
{ "repo_name": "CaMnter/AndroidLife", "path": "app/src/main/java/com/camnter/newlife/ui/activity/classloader/ClassLoaderActivity.java", "license": "apache-2.0", "size": 2198 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
60,388
assertNotNull(assertContext.getText("Assignments should exist."), expected); assertThat(assertContext.getText("Assignments size assertion error: "), actual.getAssignments().size(), is(expected.getAssignments().size())); int count = 0; for (AssignmentSegment each : actual.getAssignments()) { ...
assertNotNull(assertContext.getText(STR), expected); assertThat(assertContext.getText(STR), actual.getAssignments().size(), is(expected.getAssignments().size())); int count = 0; for (AssignmentSegment each : actual.getAssignments()) { AssignmentAssert.assertIs(assertContext, each, expected.getAssignments().get(count));...
/** * Assert actual set assignment segment is correct with expected set assignment. * * @param assertContext assert context * @param actual actual set assignment segment * @param expected expected set clause */
Assert actual set assignment segment is correct with expected set assignment
assertIs
{ "repo_name": "apache/incubator-shardingsphere", "path": "shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/asserts/segment/set/SetClauseAssert.java", "license": "apache-2.0", "size": 2737 }
[ "org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.AssignmentSegment", "org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.SQLSegmentAssert", "org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.assignment.AssignmentAssert", "org.hamcrest.CoreMatch...
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.AssignmentSegment; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.SQLSegmentAssert; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.assignment.AssignmentAssert; import org.hamcres...
import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.*; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.*; import org.apache.shardingsphere.test.sql.parser.parameterized.asserts.segment.assignment.*; import org.hamcrest.*; import org.junit.*;
[ "org.apache.shardingsphere", "org.hamcrest", "org.junit" ]
org.apache.shardingsphere; org.hamcrest; org.junit;
570,318
public String geocoder(String appId, GeocoderParam param) { Validate.checkStringNotEmpty(appId, DuMapValidateMsg.VALIDATE_MESSAGE_APP_ID); Validate.checkStringNotEmpty(param.getAddress(), DuMapValidateMsg.VALIDATE_MESSAGE_ADDRESS); if (StringUtils.isBlank(param.getOutput())) { pa...
String function(String appId, GeocoderParam param) { Validate.checkStringNotEmpty(appId, DuMapValidateMsg.VALIDATE_MESSAGE_APP_ID); Validate.checkStringNotEmpty(param.getAddress(), DuMapValidateMsg.VALIDATE_MESSAGE_ADDRESS); if (StringUtils.isBlank(param.getOutput())) { param.setOutput(DEFAULT_OUTPUT); } return callDuM...
/** * Geocode some place. * * @param appId app id * @param param GeocoderParam * * @return Json string / Xml string * * @See <a href=https://cloud.baidu.com/doc/DUMAP/Geocoder-API.html#.E6.8E.A5.E5.8F.A3.E6.96.87.E6.A1.A3>https * ://cloud.baidu.com/doc/DUMAP/Geocoder-API.htm...
Geocode some place
geocoder
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/dumap/DuMapClient.java", "license": "apache-2.0", "size": 13027 }
[ "com.baidubce.http.HttpMethodName", "com.baidubce.services.dumap.model.GeocoderParam", "com.baidubce.util.Validate", "org.apache.commons.lang3.StringUtils" ]
import com.baidubce.http.HttpMethodName; import com.baidubce.services.dumap.model.GeocoderParam; import com.baidubce.util.Validate; import org.apache.commons.lang3.StringUtils;
import com.baidubce.http.*; import com.baidubce.services.dumap.model.*; import com.baidubce.util.*; import org.apache.commons.lang3.*;
[ "com.baidubce.http", "com.baidubce.services", "com.baidubce.util", "org.apache.commons" ]
com.baidubce.http; com.baidubce.services; com.baidubce.util; org.apache.commons;
1,141,466
private static void initApp(){ //==============================Logger configuration======================================== PropertyConfigurator.configure("log4j.configuration"); logger.info("App initializing.."); // =============================Load global settings=============================...
static void function(){ PropertyConfigurator.configure(STR); logger.info(STR); logger.info(STR); TelemetrySettings.getInstance().load(SETTINGS_FILE); logger.debug(STR); String protocolSchema = TelemetrySettings.getInstance().getSetting(STR); String protocolXML = TelemetrySettings.getInstance().getSetting(STR); Protocol...
/**r * Initialise all information and thread for this app * XML, Acquisition, gui, persistance, etc */
r Initialise all information and thread for this app XML, Acquisition, gui, persistance, etc
initApp
{ "repo_name": "EclipseETS/eclipse-telemetry", "path": "src/eclipse/controller/app/EclipseTelemetry.java", "license": "gpl-2.0", "size": 4574 }
[ "eclipse.controller.acqui.DataAcquisition", "eclipse.controller.acqui.DesencapsulatorE8Serial", "eclipse.controller.acqui.handlers.SimpleSerialHandler", "eclipse.controller.acqui.handlers.TCPHandler", "eclipse.controller.util.TelemetrySettings", "eclipse.model.xml.ProtocolLoader", "eclipse.model.xml.Pro...
import eclipse.controller.acqui.DataAcquisition; import eclipse.controller.acqui.DesencapsulatorE8Serial; import eclipse.controller.acqui.handlers.SimpleSerialHandler; import eclipse.controller.acqui.handlers.TCPHandler; import eclipse.controller.util.TelemetrySettings; import eclipse.model.xml.ProtocolLoader; import e...
import eclipse.controller.acqui.*; import eclipse.controller.acqui.handlers.*; import eclipse.controller.util.*; import eclipse.model.xml.*; import eclipse.model.xml8.*; import eclipse.view.gui.*; import org.apache.log4j.*;
[ "eclipse.controller.acqui", "eclipse.controller.util", "eclipse.model.xml", "eclipse.model.xml8", "eclipse.view.gui", "org.apache.log4j" ]
eclipse.controller.acqui; eclipse.controller.util; eclipse.model.xml; eclipse.model.xml8; eclipse.view.gui; org.apache.log4j;
1,261,945
public final void save(final User user) { userDao.save(user); }
final void function(final User user) { userDao.save(user); }
/** * Save user. * * @param user User. */
Save user
save
{ "repo_name": "aistomin/musicist", "path": "src/main/java/com/github/aistomin/musicist/services/UserService.java", "license": "apache-2.0", "size": 926 }
[ "com.github.aistomin.musicist.model.entites.User" ]
import com.github.aistomin.musicist.model.entites.User;
import com.github.aistomin.musicist.model.entites.*;
[ "com.github.aistomin" ]
com.github.aistomin;
2,444,063
public boolean isSigned(int column) throws SQLException { return metaData.isSigned(originalColumnIndex(column)); }
boolean function(int column) throws SQLException { return metaData.isSigned(originalColumnIndex(column)); }
/** * Indicates whether values in the designated column are signed numbers. * * @param column the first column is 1, the second is 2, ... * @return <code>true</code> if so; <code>false</code> otherwise. * @throws SQLException if a database access error occurs. */
Indicates whether values in the designated column are signed numbers
isSigned
{ "repo_name": "hannoman/xxl", "path": "src/xxl/core/relational/metaData/WrappedResultSetMetaData.java", "license": "lgpl-3.0", "size": 18083 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,540,741
public byte[] getOriginDigest() throws SincerityException { try { if( ( originDigest == null ) && ( originUrl != null ) ) originDigest = DigestUtil.getDigest( originUrl, "SHA-1" ); return originDigest; } catch( IOException x ) { throw new UnpackingException( "Could not calculate origin digest...
byte[] function() throws SincerityException { try { if( ( originDigest == null ) && ( originUrl != null ) ) originDigest = DigestUtil.getDigest( originUrl, "SHA-1" ); return originDigest; } catch( IOException x ) { throw new UnpackingException( STR + originUrl + STR + x.getMessage(), x ); } }
/** * The cached digest for the origin. * * @return The digest * @throws SincerityException * In case of an error */
The cached digest for the origin
getOriginDigest
{ "repo_name": "tliron/sincerity", "path": "components/sincerity/source/com/threecrickets/sincerity/packaging/Artifact.java", "license": "lgpl-3.0", "size": 6757 }
[ "com.threecrickets.creel.util.DigestUtil", "com.threecrickets.sincerity.exception.SincerityException", "com.threecrickets.sincerity.exception.UnpackingException", "java.io.IOException" ]
import com.threecrickets.creel.util.DigestUtil; import com.threecrickets.sincerity.exception.SincerityException; import com.threecrickets.sincerity.exception.UnpackingException; import java.io.IOException;
import com.threecrickets.creel.util.*; import com.threecrickets.sincerity.exception.*; import java.io.*;
[ "com.threecrickets.creel", "com.threecrickets.sincerity", "java.io" ]
com.threecrickets.creel; com.threecrickets.sincerity; java.io;
2,813,617
Optional<String> getArchiveLocation();
Optional<String> getArchiveLocation();
/** * Get the location where the job was archived. * * @return The archive location */
Get the location where the job was archived
getArchiveLocation
{ "repo_name": "Netflix/genie", "path": "genie-web/src/main/java/com/netflix/genie/web/data/services/impl/jpa/queries/projections/v4/FinishedJobProjection.java", "license": "apache-2.0", "size": 5296 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,577,544
public AnalysisModule.AnalysisProvider<TokenFilterFactory> getTokenFilterProvider(String tokenFilter) { return tokenFilters.getOrDefault(tokenFilter, this.prebuiltAnalysis.getTokenFilterFactory(tokenFilter)); }
AnalysisModule.AnalysisProvider<TokenFilterFactory> function(String tokenFilter) { return tokenFilters.getOrDefault(tokenFilter, this.prebuiltAnalysis.getTokenFilterFactory(tokenFilter)); }
/** * Returns a registered {@link TokenFilterFactory} provider by name or <code>null</code> if the token filter was not registered */
Returns a registered <code>TokenFilterFactory</code> provider by name or <code>null</code> if the token filter was not registered
getTokenFilterProvider
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/analysis/AnalysisRegistry.java", "license": "apache-2.0", "size": 28800 }
[ "org.elasticsearch.indices.analysis.AnalysisModule" ]
import org.elasticsearch.indices.analysis.AnalysisModule;
import org.elasticsearch.indices.analysis.*;
[ "org.elasticsearch.indices" ]
org.elasticsearch.indices;
200,746
@Override public boolean equals(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != getClass()) return false; NamedType other = (NamedType)o; return (_class == other._class) && Objects.equals(_name, other._name); } ...
boolean function(Object o) { if (o == this) return true; if (o == null) return false; if (o.getClass() != getClass()) return false; NamedType other = (NamedType)o; return (_class == other._class) && Objects.equals(_name, other._name); } public int hashCode() { return _hashCode; }
/** * Equality is defined based on class and name */
Equality is defined based on class and name
equals
{ "repo_name": "FasterXML/jackson-databind", "path": "src/main/java/com/fasterxml/jackson/databind/jsontype/NamedType.java", "license": "apache-2.0", "size": 1518 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
972,283