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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
void onSourceInfoRefreshed(long durationUs, boolean isSeekable, boolean isLive);
}
private static final long DEFAULT_LAST_SAMPLE_DURATION_US = 10000;
private static final Map<String, String> ICY_METADATA_HEADERS = createIcyMetadataHeaders();
private static final Format ICY_FORMAT =
Format.create... | void onSourceInfoRefreshed(long durationUs, boolean isSeekable, boolean isLive); } private static final long DEFAULT_LAST_SAMPLE_DURATION_US = 10000; private static final Map<String, String> ICY_METADATA_HEADERS = createIcyMetadataHeaders(); private static final Format ICY_FORMAT = Format.createSampleFormat("icy", Mime... | /**
* Called when the duration, the ability to seek within the period, or the categorization as
* live stream changes.
*
* @param durationUs The duration of the period, or {@link C#TIME_UNSET}.
* @param isSeekable Whether the period is seekable.
* @param isLive Whether the period is live.
... | Called when the duration, the ability to seek within the period, or the categorization as live stream changes | onSourceInfoRefreshed | {
"repo_name": "superbderrick/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java",
"license": "apache-2.0",
"size": 42922
} | [
"android.net.Uri",
"android.os.Handler",
"androidx.annotation.Nullable",
"com.google.android.exoplayer2.Format",
"com.google.android.exoplayer2.drm.DrmSessionManager",
"com.google.android.exoplayer2.extractor.Extractor",
"com.google.android.exoplayer2.extractor.SeekMap",
"com.google.android.exoplayer2... | import android.net.Uri; import android.os.Handler; import androidx.annotation.Nullable; import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.drm.DrmSessionManager; import com.google.android.exoplayer2.extractor.Extractor; import com.google.android.exoplayer2.extractor.SeekMap; import com.go... | import android.net.*; import android.os.*; import androidx.annotation.*; import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.drm.*; import com.google.android.exoplayer2.extractor.*; import com.google.android.exoplayer2.metadata.icy.*; import com.google.android.exoplayer2.source.*; import com.go... | [
"android.net",
"android.os",
"androidx.annotation",
"com.google.android",
"java.util"
] | android.net; android.os; androidx.annotation; com.google.android; java.util; | 2,451,169 |
void findUnknownTables(String catName, String dbName, List<String> tables, CheckResult result)
throws IOException, MetaException, TException {
Set<Path> dbPaths = new HashSet<>();
Set<String> tableNames = new HashSet<>(tables);
for (String tableName : tables) {
Table table = getMsc().getTabl... | void findUnknownTables(String catName, String dbName, List<String> tables, CheckResult result) throws IOException, MetaException, TException { Set<Path> dbPaths = new HashSet<>(); Set<String> tableNames = new HashSet<>(tables); for (String tableName : tables) { Table table = getMsc().getTable(catName, dbName, tableName... | /**
* Check for table directories that aren't in the metastore.
*
* @param catName
* name of the catalog, if not specified default catalog will be used.
* @param dbName
* Name of the database
* @param tables
* List of table names
* @param result
* Add an... | Check for table directories that aren't in the metastore | findUnknownTables | {
"repo_name": "sankarh/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreChecker.java",
"license": "apache-2.0",
"size": 28341
} | [
"java.io.IOException",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.metastore.api.MetaException",
"org.apache.hadoop.hive.metastore.api.Table",
"org.apache.hadoop.h... | import java.io.IOException; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.metastore.api.MetaException; import org.apache.hadoop.hive.metastore.api.Tabl... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.utils.*; import org.apache.thrift.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.thrift"
] | java.io; java.util; org.apache.hadoop; org.apache.thrift; | 587,144 |
private static String attributeToNative(String oldName, Location loc, boolean isLateBound)
throws EvalException {
if (oldName.isEmpty()) {
throw new EvalException(loc, "Attribute name cannot be empty");
}
if (isLateBound) {
if (oldName.charAt(0) != '_') {
throw new EvalException(... | static String function(String oldName, Location loc, boolean isLateBound) throws EvalException { if (oldName.isEmpty()) { throw new EvalException(loc, STR); } if (isLateBound) { if (oldName.charAt(0) != '_') { throw new EvalException(loc, STR + STR); } return ":" + oldName.substring(1); } if (oldName.charAt(0) == '_') ... | /**
* In native code, private values start with $.
* In Skylark, private values start with _, because of the grammar.
*/ | In native code, private values start with $. In Skylark, private values start with _, because of the grammar | attributeToNative | {
"repo_name": "rhuss/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java",
"license": "apache-2.0",
"size": 25357
} | [
"com.google.devtools.build.lib.events.Location",
"com.google.devtools.build.lib.syntax.EvalException"
] | import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.syntax.EvalException; | import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.syntax.*; | [
"com.google.devtools"
] | com.google.devtools; | 427,114 |
//-------------------------------------------------------------------------
public static SinglePayment of(Currency currency, double amount, LocalDate paymentDate) {
return new SinglePayment(CurrencyAmount.of(currency, amount), paymentDate);
} | static SinglePayment function(Currency currency, double amount, LocalDate paymentDate) { return new SinglePayment(CurrencyAmount.of(currency, amount), paymentDate); } | /**
* Creates an instance.
*
* @param currency the currency
* @param amount the amount
* @param paymentDate the payment date
* @return the payment instance
*/ | Creates an instance | of | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/main/java/com/opengamma/strata/finance/credit/SinglePayment.java",
"license": "apache-2.0",
"size": 11885
} | [
"com.opengamma.strata.basics.currency.Currency",
"com.opengamma.strata.basics.currency.CurrencyAmount",
"java.time.LocalDate"
] | import com.opengamma.strata.basics.currency.Currency; import com.opengamma.strata.basics.currency.CurrencyAmount; import java.time.LocalDate; | import com.opengamma.strata.basics.currency.*; import java.time.*; | [
"com.opengamma.strata",
"java.time"
] | com.opengamma.strata; java.time; | 2,407,538 |
public Observable<ServiceResponse<Page<DedicatedHostGroupInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<DedicatedHostGroupInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.
*
ServiceResponse<PageImpl1<DedicatedHostGroupInner>> * @param nextPageLink The NextLink from the previous successful call to List operatio... | Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups | listByResourceGroupNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/implementation/DedicatedHostGroupsInner.java",
"license": "mit",
"size": 54449
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 370,852 |
public Iterator getFooterSnippets() {
return getSnippets(REGION_FOOTER);
}
private class PageRegionIterator extends IteratorFilter {
int region;
public PageRegionIterator(int region) {
super(snippets.iterator());
this.region = region;
init();
... | Iterator function() { return getSnippets(REGION_FOOTER); } private class PageRegionIterator extends IteratorFilter { int region; public PageRegionIterator(int region) { super(snippets.iterator()); this.region = region; init(); } | /** Return an iterator containing the snippets in the content region of
* the page. */ | Return an iterator containing the snippets in the content region of | getFooterSnippets | {
"repo_name": "superzadeh/processdash",
"path": "src/net/sourceforge/processdash/net/cms/PageContentTO.java",
"license": "gpl-3.0",
"size": 4838
} | [
"java.util.Iterator",
"net.sourceforge.processdash.util.IteratorFilter"
] | import java.util.Iterator; import net.sourceforge.processdash.util.IteratorFilter; | import java.util.*; import net.sourceforge.processdash.util.*; | [
"java.util",
"net.sourceforge.processdash"
] | java.util; net.sourceforge.processdash; | 470,121 |
public void mouseMoved(MouseEvent e) {
int x = e.getX();
int y = e.getY();
// Don't show anything out of the plot region.
if ((x > border.left) && (x < border.left + width) && (y > border.top) && (y < border.top + height)) {
// Convert the X to an index on the histogram.
x = (x - border.left) / binWidt... | void function(MouseEvent e) { int x = e.getX(); int y = e.getY(); if ((x > border.left) && (x < border.left + width) && (y > border.top) && (y < border.top + height)) { x = (x - border.left) / binWidth; y = counts[x]; setToolTipText((indexMultiplier * x) + STR + y); } else { setToolTipText(null); } } | /**
* This method will be called when the mouse is moved over the component. It
* will set the tooltip text on the component to show the histogram data.
*/ | This method will be called when the mouse is moved over the component. It will set the tooltip text on the component to show the histogram data | mouseMoved | {
"repo_name": "JGeraldoLima/projetoIA2015_2",
"path": "ProcessamentoImagens/src/com/util/DisplayGrayHistogram.java",
"license": "mit",
"size": 8434
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,965,087 |
public AxisLocation getDomainAxisLocation(int index) {
AxisLocation result = null;
if (index < this.domainAxisLocations.size()) {
result = (AxisLocation) this.domainAxisLocations.get(index);
}
if (result == null) {
result = AxisLocation.getOpposite(getDomainAx... | AxisLocation function(int index) { AxisLocation result = null; if (index < this.domainAxisLocations.size()) { result = (AxisLocation) this.domainAxisLocations.get(index); } if (result == null) { result = AxisLocation.getOpposite(getDomainAxisLocation()); } return result; } /** * Sets the location for a domain axis and ... | /**
* Returns the location for a domain axis. If this hasn't been set
* explicitly, the method returns the location that is opposite to the
* primary domain axis location.
*
* @param index the axis index.
*
* @return The location (never <code>null</code>).
*/ | Returns the location for a domain axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary domain axis location | getDomainAxisLocation | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/XYPlot.java",
"license": "lgpl-2.1",
"size": 137931
} | [
"org.jfree.chart.axis.AxisLocation",
"org.jfree.chart.event.PlotChangeEvent"
] | import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.event.PlotChangeEvent; | import org.jfree.chart.axis.*; import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,480,533 |
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
} | ComposeableAdapterFactory function() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } | /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the root adapter factory that contains this factory. | getRootAdapterFactory | {
"repo_name": "TristanFAURE/query2Table",
"path": "plugins/org.topcased.model2doc.query2table.edit/src/org/topcased/model2doc/query2table/provider/Query2tableItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 11163
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,138,491 |
public Accessible getAccessibleChild(int i)
{
return null;
} | Accessible function(int i) { return null; } | /**
* Returns <code>null</code> since list children don't have children
* themselves.
*
* @return <code>null</code>
*/ | Returns <code>null</code> since list children don't have children themselves | getAccessibleChild | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/JList.java",
"license": "gpl-2.0",
"size": 78269
} | [
"javax.accessibility.Accessible"
] | import javax.accessibility.Accessible; | import javax.accessibility.*; | [
"javax.accessibility"
] | javax.accessibility; | 315,034 |
private void sendPlaybackStartedEvent(AvsItem item){
alexaManager.sendPlaybackStartedEvent(item, 0, null);
Log.i(TAG, "Sending SpeechStartedEvent");
} | void function(AvsItem item){ alexaManager.sendPlaybackStartedEvent(item, 0, null); Log.i(TAG, STR); } | /**
* Send an event back to Alexa that we're starting a speech event
* https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/audioplayer#PlaybackNearlyFinished Event
*/ | Send an event back to Alexa that we're starting a speech event HREF Event | sendPlaybackStartedEvent | {
"repo_name": "thebayesianconspiracy/gringottsApp",
"path": "app/src/main/java/com/willblaschko/android/alexavoicelibrary/BaseActivity.java",
"license": "gpl-2.0",
"size": 19806
} | [
"android.util.Log",
"com.willblaschko.android.alexa.interfaces.AvsItem"
] | import android.util.Log; import com.willblaschko.android.alexa.interfaces.AvsItem; | import android.util.*; import com.willblaschko.android.alexa.interfaces.*; | [
"android.util",
"com.willblaschko.android"
] | android.util; com.willblaschko.android; | 2,598,012 |
public static <K,V> Object getByPath(Map<K,V> receiver, String path) {
return getByPathDispatch(receiver, splitPath(path), 0, throwCantFindValue(path));
} | static <K,V> Object function(Map<K,V> receiver, String path) { return getByPathDispatch(receiver, splitPath(path), 0, throwCantFindValue(path)); } | /**
* Same as {@link #getByPath(List, String)}, but for Map.
*/ | Same as <code>#getByPath(List, String)</code>, but for Map | getByPath | {
"repo_name": "nknize/elasticsearch",
"path": "modules/lang-painless/src/main/java/org/elasticsearch/painless/api/Augmentation.java",
"license": "apache-2.0",
"size": 28336
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,020,113 |
public ViewGroup.LayoutParams getChildLayoutParams(WXComponent child, View childView, int width, int height, int left, int right, int top, int bottom) {
ViewGroup.LayoutParams lp = null;
if (childView != null) {
lp = childView.getLayoutParams();
}
if(lp == null) {
lp = new ViewGroup.Layou... | ViewGroup.LayoutParams function(WXComponent child, View childView, int width, int height, int left, int right, int top, int bottom) { ViewGroup.LayoutParams lp = null; if (childView != null) { lp = childView.getLayoutParams(); } if(lp == null) { lp = new ViewGroup.LayoutParams(width,height); }else{ lp.width = width; lp... | /**
* Get or generate new layout parameter for child view
*/ | Get or generate new layout parameter for child view | getChildLayoutParams | {
"repo_name": "cxfeng1/incubator-weex",
"path": "android/sdk/src/main/java/com/taobao/weex/ui/component/WXVContainer.java",
"license": "apache-2.0",
"size": 17320
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 2,892,060 |
public static String getSHA1Checksum(File file) throws IOException, NoSuchAlgorithmException {
byte[] b = getChecksum("SHA1", file);
return getHex(b);
}
private static final String HEXES = "0123456789ABCDEF"; | static String function(File file) throws IOException, NoSuchAlgorithmException { byte[] b = getChecksum("SHA1", file); return getHex(b); } private static final String HEXES = STR; | /**
* Calculates the SHA1 checksum of a specified file.
*
* @param file the file to generate the MD5 checksum
* @return the hex representation of the SHA1 hash
* @throws IOException when the file passed in does not exist
* @throws NoSuchAlgorithmException when the SHA1 algorithm is not ava... | Calculates the SHA1 checksum of a specified file | getSHA1Checksum | {
"repo_name": "simon-eastwood/DependencyCheckCM",
"path": "dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Checksum.java",
"license": "apache-2.0",
"size": 5353
} | [
"java.io.File",
"java.io.IOException",
"java.security.NoSuchAlgorithmException"
] | import java.io.File; import java.io.IOException; import java.security.NoSuchAlgorithmException; | import java.io.*; import java.security.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 2,125,693 |
public static String formatToHtml(Map<String, String> infos, Type type) {
final StringBuilder res = new StringBuilder();
final String[] fields;
final String[] fieldsGetConfig = { "bytecode_revision", "wifi_ssid", "wifi_crypt", "net_dhcp", "net_ip", "net_mask", "net_gateway", "net_dns", "server_url", "login", "... | static String function(Map<String, String> infos, Type type) { final StringBuilder res = new StringBuilder(); final String[] fields; final String[] fieldsGetConfig = { STR, STR, STR, STR, STR, STR, STR, STR, STR, "login", STR, STR, STR }; final String[] fieldsGetRunningState = { STR, STR, STR, STR, STR, STR, STR, STR, ... | /**
* Fonction utilitaire pour permettre d'afficher un paquet sous forme HTML
*
* @return la représentation du paquet en html
*/ | Fonction utilitaire pour permettre d'afficher un paquet sous forme HTML | formatToHtml | {
"repo_name": "sebastienhouzet/nabaztag-source-code",
"path": "server/OS/net/violet/platform/xmpp/packet/IQCommandPacket.java",
"license": "mit",
"size": 5121
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,485,355 |
public static java.util.List getCategoryGroups(java.lang.String param0)
{
org.sakaiproject.component.api.ServerConfigurationService service = getInstance();
if (service == null) return null;
return service.getCategoryGroups(param0);
} | static java.util.List function(java.lang.String param0) { org.sakaiproject.component.api.ServerConfigurationService service = getInstance(); if (service == null) return null; return service.getCategoryGroups(param0); } | /**
* Access the list of groups by category (site type)
*
* @param category
* The tool category
* @return An ordered list of tool ids (String) indicating the desired tool display order, or an empty list if there are none for this category.
*/ | Access the list of groups by category (site type) | getCategoryGroups | {
"repo_name": "harfalm/Sakai-10.1",
"path": "kernel/component-manager/src/main/java/org/sakaiproject/component/cover/ServerConfigurationService.java",
"license": "apache-2.0",
"size": 10764
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,783,497 |
public void testAddVirtualMachine()
{
VirtualMachineMetaData virtualMachine = new VirtualMachineMetaData();
virtualMachine.getVirtualMachineLocation().setVirtualMachineId("test-vm");
virtualMachine.getVirtualMachineLocation().setGroupManagerId("gm1");
virtualMachine.getVirtualMac... | void function() { VirtualMachineMetaData virtualMachine = new VirtualMachineMetaData(); virtualMachine.getVirtualMachineLocation().setVirtualMachineId(STR); virtualMachine.getVirtualMachineLocation().setGroupManagerId("gm1"); virtualMachine.getVirtualMachineLocation().setLocalControllerId("lc1"); repository_.addVirtual... | /**
* Adds a virtual machine.
*/ | Adds a virtual machine | testAddVirtualMachine | {
"repo_name": "snoozesoftware/snoozenode",
"path": "src/test/java/org/inria/myriads/snoozenode/database/api/impl/cassandra/TestGroupManagerCassandraRepository.java",
"license": "gpl-2.0",
"size": 39999
} | [
"me.prettyprint.cassandra.serializers.StringSerializer",
"me.prettyprint.cassandra.service.HColumnFamilyImpl",
"me.prettyprint.hector.api.HColumnFamily",
"org.inria.myriads.snoozecommon.communication.virtualcluster.VirtualMachineMetaData",
"org.inria.myriads.snoozecommon.communication.virtualcluster.status.... | import me.prettyprint.cassandra.serializers.StringSerializer; import me.prettyprint.cassandra.service.HColumnFamilyImpl; import me.prettyprint.hector.api.HColumnFamily; import org.inria.myriads.snoozecommon.communication.virtualcluster.VirtualMachineMetaData; import org.inria.myriads.snoozecommon.communication.virtualc... | import me.prettyprint.cassandra.serializers.*; import me.prettyprint.cassandra.service.*; import me.prettyprint.hector.api.*; import org.inria.myriads.snoozecommon.communication.virtualcluster.*; import org.inria.myriads.snoozecommon.communication.virtualcluster.status.*; import org.inria.myriads.snoozecommon.globals.*... | [
"me.prettyprint.cassandra",
"me.prettyprint.hector",
"org.inria.myriads"
] | me.prettyprint.cassandra; me.prettyprint.hector; org.inria.myriads; | 1,947,105 |
EReference getODSchema_EntityContainer();
| EReference getODSchema_EntityContainer(); | /**
* Returns the meta object for the containment reference '{@link edm.ODSchema#getEntityContainer <em>Entity Container</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Entity Container</em>'.
* @see edm.ODSchema#getEntityContainer()
... | Returns the meta object for the containment reference '<code>edm.ODSchema#getEntityContainer Entity Container</code>'. | getODSchema_EntityContainer | {
"repo_name": "SOM-Research/odata-generator",
"path": "metamodel/som.odata.metamodel/src/edm/EdmPackage.java",
"license": "epl-1.0",
"size": 93631
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,599,327 |
public static void setViewValues(DirectionStep step, ImageView image,
TextView text, TextView distance) {
if (step != null) {
image.setImageResource(
Constants.BEARINGS[step.rel_direction].getImageId());
try {
text.setT... | static void function(DirectionStep step, ImageView image, TextView text, TextView distance) { if (step != null) { image.setImageResource( Constants.BEARINGS[step.rel_direction].getImageId()); try { text.setText(Html.fromHtml(step.text())); } catch (NullPointerException e) { if (Constants.DEBUG) { Log.e(STR, STR); } } d... | /**
* Populates the given views with the direction step information.
* @param step the direction step used to populate the view
* @param image view that will hold the direction icon
* @param text text view that will show the direction text
* @param distance text view that will show the directio... | Populates the given views with the direction step information | setViewValues | {
"repo_name": "lbouma/Cyclopath",
"path": "android/src/org/cyclopath/android/DirectionAdapter.java",
"license": "apache-2.0",
"size": 2958
} | [
"android.text.Html",
"android.util.Log",
"android.widget.ImageView",
"android.widget.TextView",
"org.cyclopath.android.conf.Constants",
"org.cyclopath.android.items.DirectionStep"
] | import android.text.Html; import android.util.Log; import android.widget.ImageView; import android.widget.TextView; import org.cyclopath.android.conf.Constants; import org.cyclopath.android.items.DirectionStep; | import android.text.*; import android.util.*; import android.widget.*; import org.cyclopath.android.conf.*; import org.cyclopath.android.items.*; | [
"android.text",
"android.util",
"android.widget",
"org.cyclopath.android"
] | android.text; android.util; android.widget; org.cyclopath.android; | 1,844,905 |
public void load(String file) throws FileNotFoundException, IOException, InvalidConfigurationException {
Preconditions.checkNotNull(file, "File cannot be null");
load(new File(file));
} | void function(String file) throws FileNotFoundException, IOException, InvalidConfigurationException { Preconditions.checkNotNull(file, STR); load(new File(file)); } | /**
* Loads this {@link FileConfiguration} from the specified location.
* <p />
* All the values contained within this configuration will be removed, leaving only settings and defaults, and the new values will be loaded from the given file.
* <p />
* If the file cannot be loaded for any reason, an exception w... | Loads this <code>FileConfiguration</code> from the specified location. All the values contained within this configuration will be removed, leaving only settings and defaults, and the new values will be loaded from the given file. If the file cannot be loaded for any reason, an exception will be thrown | load | {
"repo_name": "HexogenDev/CyanWool-Platform",
"path": "src/main/java/net/cyanwool/platform/configuration/file/FileConfiguration.java",
"license": "mit",
"size": 7469
} | [
"com.google.common.base.Preconditions",
"java.io.File",
"java.io.FileNotFoundException",
"java.io.IOException",
"net.cyanwool.platform.configuration.InvalidConfigurationException"
] | import com.google.common.base.Preconditions; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import net.cyanwool.platform.configuration.InvalidConfigurationException; | import com.google.common.base.*; import java.io.*; import net.cyanwool.platform.configuration.*; | [
"com.google.common",
"java.io",
"net.cyanwool.platform"
] | com.google.common; java.io; net.cyanwool.platform; | 1,231,804 |
@SuppressWarnings("unchecked")
public void removeEffect(String iEffect, IEffectConsumer consumer, IEffectSourceProvider effectSource) {
IEffectContainer effect = consumer.getEffect(iEffect);
if (effect != null) {
Iterator<IEffect> iterator = effect.getEffects().iterator();
IEffect e;
while (iterator.ha... | @SuppressWarnings(STR) void function(String iEffect, IEffectConsumer consumer, IEffectSourceProvider effectSource) { IEffectContainer effect = consumer.getEffect(iEffect); if (effect != null) { Iterator<IEffect> iterator = effect.getEffects().iterator(); IEffect e; while (iterator.hasNext()) { e = iterator.next(); if (... | /**
* Removes and stops the effect previously applied as item enchantement
*
* @param iEffect
* @param consumer
*/ | Removes and stops the effect previously applied as item enchantement | removeEffect | {
"repo_name": "NeumimTo/NT-RPG",
"path": "Plugin/src/main/java/cz/neumimto/rpg/effects/EffectService.java",
"license": "gpl-2.0",
"size": 13324
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,169,646 |
public void accept(PrintComponentVisitor visitor) {
visitor.visit(this);
} | void function(PrintComponentVisitor visitor) { visitor.visit(this); } | /**
* Call back visitor.
*
* @param visitor
*/ | Call back visitor | accept | {
"repo_name": "lat-lon/geomajas",
"path": "plugin/geomajas-plugin-printing/printing/src/main/java/org/geomajas/plugin/printing/component/impl/AbstractLegendComponentImpl.java",
"license": "agpl-3.0",
"size": 5780
} | [
"org.geomajas.plugin.printing.component.PrintComponentVisitor"
] | import org.geomajas.plugin.printing.component.PrintComponentVisitor; | import org.geomajas.plugin.printing.component.*; | [
"org.geomajas.plugin"
] | org.geomajas.plugin; | 1,006,775 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<QueryTextInner> listByServer(
String resourceGroupName, String serverName, List<String> queryIds) {
return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, queryIds));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<QueryTextInner> function( String resourceGroupName, String serverName, List<String> queryIds) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, queryIds)); } | /**
* Retrieve the Query-Store query texts for specified queryIds.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serverName The name of the server.
* @param queryIds The query identifiers.
* @throws IllegalArgumentException thrown if pa... | Retrieve the Query-Store query texts for specified queryIds | listByServer | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/QueryTextsClientImpl.java",
"license": "mit",
"size": 25663
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.mariadb.fluent.models.QueryTextInner",
"java.util.List"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.mariadb.fluent.models.QueryTextInner; import java.util.List; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.mariadb.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 163,375 |
public void testSkipRunFailsOnOnlyExecutionAttemptNoAutoPurge(HttpServletRequest request, PrintWriter out) throws Exception {
SharedCounterTask.counter.set(0);
NonSerializableTaskAndResult task = new NonSerializableTaskAndResult();
ImmediateSkippingTrigger trigger = new ImmediateSkippingTri... | void function(HttpServletRequest request, PrintWriter out) throws Exception { SharedCounterTask.counter.set(0); NonSerializableTaskAndResult task = new NonSerializableTaskAndResult(); ImmediateSkippingTrigger trigger = new ImmediateSkippingTrigger(1); trigger.skipExecutionAttemptsWithFailure.add(1); TaskStatus<?> statu... | /**
* Trigger.skipRun fails causing the only execution attempt to be skipped.
* Verify that the task entry remains in the persistent store because we disabled autopurge.
*/ | Trigger.skipRun fails causing the only execution attempt to be skipped. Verify that the task entry remains in the persistent store because we disabled autopurge | testSkipRunFailsOnOnlyExecutionAttemptNoAutoPurge | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat_errorpaths/test-applications/persistenterrtest/src/web/PersistentErrorTestServlet.java",
"license": "epl-1.0",
"size": 67702
} | [
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.PrintWriter",
"javax.enterprise.concurrent.SkippedException",
"javax.servlet.http.HttpServletRequest"
] | import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import javax.enterprise.concurrent.SkippedException; import javax.servlet.http.HttpServletRequest; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import javax.enterprise.concurrent.*; import javax.servlet.http.*; | [
"com.ibm.websphere",
"java.io",
"javax.enterprise",
"javax.servlet"
] | com.ibm.websphere; java.io; javax.enterprise; javax.servlet; | 2,838,175 |
public ServerId getServerId() {
return serverId;
} | ServerId function() { return serverId; } | /**
* Returns the serverId.
*/ | Returns the serverId | getServerId | {
"repo_name": "lewie/openhab",
"path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/common/HomematicContext.java",
"license": "epl-1.0",
"size": 3362
} | [
"org.openhab.binding.homematic.internal.communicator.client.ServerId"
] | import org.openhab.binding.homematic.internal.communicator.client.ServerId; | import org.openhab.binding.homematic.internal.communicator.client.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,472,004 |
public int readBit() throws IOException {
if (iIs == null) {
throw new IOException("Already closed");
}
if (iNextBit == 8) {
iBuffer = iIs.read();
if (iBuffer == -1) {
throw new EOFException();
}
iNextBit = 0;
}
int bit = iBuffer & (1 << iNextBit);
iNextBit++;
bi... | int function() throws IOException { if (iIs == null) { throw new IOException(STR); } if (iNextBit == 8) { iBuffer = iIs.read(); if (iBuffer == -1) { throw new EOFException(); } iNextBit = 0; } int bit = iBuffer & (1 << iNextBit); iNextBit++; bit = (bit == 0) ? 0 : 1; return bit; } | /**
* Read the next bit from the stream.
*
* @return 0 if the bit is 0, 1 if the bit is 1.
* @throws IOException if the underlying stream throws it
*/ | Read the next bit from the stream | readBit | {
"repo_name": "p-smith/open-ig",
"path": "src/hu/openig/utils/BitInputStream.java",
"license": "lgpl-3.0",
"size": 2832
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,376,326 |
public IBlockState getHeldBlockState()
{
return Block.getStateById(this.dataWatcher.getWatchableObjectShort(16) & 65535);
} | IBlockState function() { return Block.getStateById(this.dataWatcher.getWatchableObjectShort(16) & 65535); } | /**
* Gets this enderman's held block state
*/ | Gets this enderman's held block state | getHeldBlockState | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/entity/monster/EntityEnderman.java",
"license": "mit",
"size": 22044
} | [
"net.minecraft.block.Block",
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; | import net.minecraft.block.*; import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 1,387,459 |
public void testAdvanced8(){
String v="hello ${ext+word}";
String correct="hello ";
Map<String,String> map=new HashMap<String, String>();
map.put("word", "file");
assertEquals(correct, TemplateUtils.createAdvancedText(v,map));
}
| void function(){ String v=STR; String correct=STR; Map<String,String> map=new HashMap<String, String>(); map.put("word", "file"); assertEquals(correct, TemplateUtils.createAdvancedText(v,map)); } | /**
* file-extension,but not have extension
*/ | file-extension,but not have extension | testAdvanced8 | {
"repo_name": "akjava/akjava_gwtlib",
"path": "test/test/utils/TemplateUtilsTest.java",
"license": "apache-2.0",
"size": 5974
} | [
"com.akjava.lib.common.utils.TemplateUtils",
"java.util.HashMap",
"java.util.Map"
] | import com.akjava.lib.common.utils.TemplateUtils; import java.util.HashMap; import java.util.Map; | import com.akjava.lib.common.utils.*; import java.util.*; | [
"com.akjava.lib",
"java.util"
] | com.akjava.lib; java.util; | 1,458,653 |
private static TesterRequirements buildTesterRequirements(
Annotation testerAnnotation)
throws ConflictingRequirementsException {
Class<? extends Annotation> annotationClass = testerAnnotation.annotationType();
final Feature<?>[] presentFeatures;
final Feature<?>[] absentFeatures;
try {
... | static TesterRequirements function( Annotation testerAnnotation) throws ConflictingRequirementsException { Class<? extends Annotation> annotationClass = testerAnnotation.annotationType(); final Feature<?>[] presentFeatures; final Feature<?>[] absentFeatures; try { presentFeatures = (Feature[]) annotationClass.getMethod... | /**
* Find all the constraints explicitly or implicitly specified by a single
* tester annotation.
* @param testerAnnotation a tester annotation
* @return the requirements specified by the annotation
* @throws ConflictingRequirementsException if the requirements are mutually
* inconsistent.
... | Find all the constraints explicitly or implicitly specified by a single tester annotation | buildTesterRequirements | {
"repo_name": "aiyanbo/guava",
"path": "guava-testlib/src/com/google/common/collect/testing/features/FeatureUtil.java",
"license": "apache-2.0",
"size": 12603
} | [
"com.google.common.collect.testing.Helpers",
"java.lang.annotation.Annotation",
"java.util.Set"
] | import com.google.common.collect.testing.Helpers; import java.lang.annotation.Annotation; import java.util.Set; | import com.google.common.collect.testing.*; import java.lang.annotation.*; import java.util.*; | [
"com.google.common",
"java.lang",
"java.util"
] | com.google.common; java.lang; java.util; | 2,870,079 |
public Color getOuterRadiusColor() {
return r1Color;
} | Color function() { return r1Color; } | /**
* Get the color used to draw the lens' outer radius.
*
* @return color of the boundary (null if border is not drawn)
*/ | Get the color used to draw the lens' outer radius | getOuterRadiusColor | {
"repo_name": "sharwell/zgrnbviewer",
"path": "org-tvl-netbeans-zgrviewer/src/fr/inria/zvtm/lens/FixedSizeLens.java",
"license": "lgpl-3.0",
"size": 22880
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,015,173 |
public static boolean sameSet(Object[] a, Vector b) {
if (a == null || b == null || a.length != b.size()) {
return false;
}
if (a.length == 0) {
return true;
}
// Convert the array into a set
Hashtable t = new Hashtable();
for (int i = ... | static boolean function(Object[] a, Vector b) { if (a == null b == null a.length != b.size()) { return false; } if (a.length == 0) { return true; } Hashtable t = new Hashtable(); for (int i = 0; i < a.length; i++) { t.put(a[i], a[i]); } for (int i = 0; i < b.size(); i++) { Object o = b.elementAt(i); if (t.remove(o) == ... | /**
* Compares the contents of an array and a Vector for set equality. Assumes
* input array and vector are sets (i.e. no duplicate entries)
*/ | Compares the contents of an array and a Vector for set equality. Assumes input array and vector are sets (i.e. no duplicate entries) | sameSet | {
"repo_name": "flax3lbs/cpptasks-parallel",
"path": "src/main/java/net/sf/antcontrib/cpptasks/CUtil.java",
"license": "apache-2.0",
"size": 19108
} | [
"java.util.Hashtable",
"java.util.Vector"
] | import java.util.Hashtable; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 494,178 |
private PortletCategoryBean filterCategoryFavoritesOnly(
PortletCategoryBean category, Set<IPortletDefinition> favoritePortlets) {
// Subcategories
final Set<PortletCategoryBean> subcategories = new HashSet<>();
category.getSubcategories()
.forEach(
... | PortletCategoryBean function( PortletCategoryBean category, Set<IPortletDefinition> favoritePortlets) { final Set<PortletCategoryBean> subcategories = new HashSet<>(); category.getSubcategories() .forEach( sub -> { final PortletCategoryBean filteredBean = filterCategoryFavoritesOnly(sub, favoritePortlets); if (filtered... | /**
* Returns the filtered category, or <code>null</code> if there is no content remaining in the
* category.
*/ | Returns the filtered category, or <code>null</code> if there is no content remaining in the category | filterCategoryFavoritesOnly | {
"repo_name": "GIP-RECIA/esup-uportal",
"path": "uPortal-api/uPortal-api-rest/src/main/java/org/apereo/portal/layout/dlm/remoting/ChannelListController.java",
"license": "apache-2.0",
"size": 28627
} | [
"java.util.HashSet",
"java.util.Set",
"org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean",
"org.apereo.portal.layout.dlm.remoting.registry.v43.PortletDefinitionBean",
"org.apereo.portal.portlet.om.IPortletDefinition"
] | import java.util.HashSet; import java.util.Set; import org.apereo.portal.layout.dlm.remoting.registry.v43.PortletCategoryBean; import org.apereo.portal.layout.dlm.remoting.registry.v43.PortletDefinitionBean; import org.apereo.portal.portlet.om.IPortletDefinition; | import java.util.*; import org.apereo.portal.layout.dlm.remoting.registry.v43.*; import org.apereo.portal.portlet.om.*; | [
"java.util",
"org.apereo.portal"
] | java.util; org.apereo.portal; | 108,875 |
public void setFixedParameters(Map<Parameter, Object> parameters) {
if (parameters == null) throw new IllegalArgumentException("fixedParameters can't be set to null");
fixedParameters = parameters;
}
| void function(Map<Parameter, Object> parameters) { if (parameters == null) throw new IllegalArgumentException(STR); fixedParameters = parameters; } | /**
* Set a subset of parameters to be fixed, i.e. they don't have to be considered
* in neighbourhood calculation. Their values will be set to null in the resulting configurations.
* @param parameters
*/ | Set a subset of parameters to be fixed, i.e. they don't have to be considered in neighbourhood calculation. Their values will be set to null in the resulting configurations | setFixedParameters | {
"repo_name": "EDACC/edacc_api",
"path": "src/edacc/parameterspace/graph/ParameterGraph.java",
"license": "mit",
"size": 45114
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,601,409 |
public void setEnvFiles(File[] files) {
qEnvFiles.setValue(files);
} | void function(File[] files) { qEnvFiles.setValue(files); } | /**
* Set the environment files for the interview.
* @param files the environment files for the interview
* @see #getEnvFiles
*/ | Set the environment files for the interview | setEnvFiles | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/interview/EnvironmentInterview.java",
"license": "gpl-2.0",
"size": 12830
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,762,413 |
@Override
protected void onPostExecute(String result) {
Log.i(LOG_TAG, "Query result " + result);
if (result == null) {
result = errorMessage;
}
dialog.dismiss();
GotResult(result);
}
}
| void function(String result) { Log.i(LOG_TAG, STR + result); if (result == null) { result = errorMessage; } dialog.dismiss(); GotResult(result); } } | /**
* Fires the AppInventor GotResult() method
*/ | Fires the AppInventor GotResult() method | onPostExecute | {
"repo_name": "be1be1/appinventor-polyu",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/FusiontablesControl.java",
"license": "apache-2.0",
"size": 39787
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,111,824 |
public void updateFloat(int columnIndex, float x) throws SQLException {
resultSet.updateFloat(columnIndex, x);
} | void function(int columnIndex, float x) throws SQLException { resultSet.updateFloat(columnIndex, x); } | /**
* Updates the designated column with a <code>float</code> value. The
* updater methods are used to update column values in the current row or
* the insert row. The updater methods do not update the underlying
* database; instead the <code>updateRow</code> or <code>insertRow</code>
* methods are called to ... | Updates the designated column with a <code>float</code> value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the <code>updateRow</code> or <code>insertRow</code> methods are called to update the database | updateFloat | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/relational/resultSets/DecoratorResultSet.java",
"license": "lgpl-3.0",
"size": 169497
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,780,858 |
protected java.sql.NClob getNativeNClob(int columnIndex) throws SQLException {
String stringVal = getStringForNClob(columnIndex);
if (stringVal == null) {
return null;
}
return getNClobFromString(stringVal, columnIndex);
} | java.sql.NClob function(int columnIndex) throws SQLException { String stringVal = getStringForNClob(columnIndex); if (stringVal == null) { return null; } return getNClobFromString(stringVal, columnIndex); } | /**
* JDBC 4.0 Get a NCLOB column.
*
* @param columnIndex
* the first column is 1, the second is 2, ...
*
* @return an object representing a NCLOB
*
* @throws SQLException
* if an error occurs
*/ | JDBC 4.0 Get a NCLOB column | getNativeNClob | {
"repo_name": "swankjesse/mysql-connector-j",
"path": "src/com/mysql/jdbc/JDBC4UpdatableResultSet.java",
"license": "gpl-2.0",
"size": 21195
} | [
"java.sql.NClob",
"java.sql.SQLException"
] | import java.sql.NClob; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,633,106 |
public static void restrainedRePack(Window win) {
Dimension orig = win.getSize();
Dimension max = new Dimension((int) (orig.width * 1.1), (int) (orig.height * 1.1));
Dimension min = new Dimension((int) (orig.width / 1.1), (int) (orig.height / 1.1));
win.pack();
// If... | static void function(Window win) { Dimension orig = win.getSize(); Dimension max = new Dimension((int) (orig.width * 1.1), (int) (orig.height * 1.1)); Dimension min = new Dimension((int) (orig.width / 1.1), (int) (orig.height / 1.1)); win.pack(); if (win.getSize().width > max.width) { win.setSize(max.width, win.getSize... | /**
* A more restricted version of pack() for component responding to live
* component tweaks. Assuming that the window already has a sensible on
* screen size, do a pack, but don't let the window grow or shrink by more
* than 10%.
*
* @param win
* The window to be ... | A more restricted version of pack() for component responding to live component tweaks. Assuming that the window already has a sensible on screen size, do a pack, but don't let the window grow or shrink by more than 10% | restrainedRePack | {
"repo_name": "truhanen/JSana",
"path": "JSana/src_others/org/crosswire/common/swing/GuiUtil.java",
"license": "gpl-2.0",
"size": 20415
} | [
"java.awt.Dimension",
"java.awt.Toolkit",
"java.awt.Window"
] | import java.awt.Dimension; import java.awt.Toolkit; import java.awt.Window; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,131,794 |
private static int log(final int level, final String tag, final String msg,
final Object[] args, final Throwable tr) {
// try String.format first
if (msg.contains("%")) {
try {
return log(level, tag, String.format(msg, args), tr);
} catch (IllegalF... | static int function(final int level, final String tag, final String msg, final Object[] args, final Throwable tr) { if (msg.contains("%")) { try { return log(level, tag, String.format(msg, args), tr); } catch (IllegalFormatException e) { } } StringBuilder sb = new StringBuilder(msg); for (Object a : args) { sb.append(a... | /**
* Send a formatted log message.
*
* @param level Logging level
* @param tag Used to identify the source of a log message. It usually identifies the class
* or activity where the log call occurs.
* @param msg The message you would like logged.
* @param args Argum... | Send a formatted log message | log | {
"repo_name": "felixb/ub0rlogg0r",
"path": "logg0r/src/main/java/de/ub0r/android/logg0r/Log.java",
"license": "apache-2.0",
"size": 13227
} | [
"java.util.IllegalFormatException"
] | import java.util.IllegalFormatException; | import java.util.*; | [
"java.util"
] | java.util; | 2,210,454 |
private synchronized ExtendedBlock popNextSuspectBlock() {
Iterator<ExtendedBlock> iter = suspectBlocks.iterator();
if (!iter.hasNext()) {
return null;
}
ExtendedBlock block = iter.next();
iter.remove();
return block;
} | synchronized ExtendedBlock function() { Iterator<ExtendedBlock> iter = suspectBlocks.iterator(); if (!iter.hasNext()) { return null; } ExtendedBlock block = iter.next(); iter.remove(); return block; } | /**
* If there are elements in the suspectBlocks list, removes
* and returns the first one. Otherwise, returns null.
*/ | If there are elements in the suspectBlocks list, removes and returns the first one. Otherwise, returns null | popNextSuspectBlock | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java",
"license": "apache-2.0",
"size": 25752
} | [
"java.util.Iterator",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 252,068 |
@Pure
default int getIdistanceLinf(Point2D<?, ?> point) {
assert point != null : AssertMessages.notNullParameter();
return Math.max(Math.abs(ix() - point.ix()), Math.abs(iy() - point.iy()));
} | default int getIdistanceLinf(Point2D<?, ?> point) { assert point != null : AssertMessages.notNullParameter(); return Math.max(Math.abs(ix() - point.ix()), Math.abs(iy() - point.iy())); } | /**
* Computes the L-infinite distance between this point and
* point p1. The L-infinite distance is equal to
* MAX[abs(x1-x2), abs(y1-y2)].
* @param point the other point
* @return the distance.
*/ | Computes the L-infinite distance between this point and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)] | getIdistanceLinf | {
"repo_name": "tpiotrow/afc",
"path": "core/math/src/main/java/org/arakhne/afc/math/geometry/d2/Point2D.java",
"license": "apache-2.0",
"size": 32880
} | [
"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; | 2,243,967 |
protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) {
ResourceBundle rb = null;
if (rbBaseName == null) {
return null;
}
try {
if (resourceBundleLocale != null) {
rb = Reso... | ResourceBundle function(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) { ResourceBundle rb = null; if (rbBaseName == null) { return null; } try { if (resourceBundleLocale != null) { rb = ResourceBundle.getBundle(rbBaseName, resourceBundleLocale); } else { rb = ResourceBundle.getBundle(r... | /**
* Override this to use a ResourceBundle.Control in Java 6
*
* @param rbBaseName The base name of the resource bundle, a fully qualified class name.
* @param resourceBundleLocale The locale to use when formatting the message.
* @param loop If true the key will be treated as a package or cla... | Override this to use a ResourceBundle.Control in Java 6 | getResourceBundle | {
"repo_name": "dotCMS/log4j",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java",
"license": "apache-2.0",
"size": 10397
} | [
"java.util.Locale",
"java.util.MissingResourceException",
"java.util.ResourceBundle"
] | import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 499,819 |
public String postProcess( MsgObject msg, String currentName )
{
boolean value1Empty = nameValues.getValue( "Value1" )[0].equals(Config.EMPTY_STR);
boolean value2Empty = nameValues.getValue( "Value2" )[0].equals(Config.EMPTY_STR);
String op1 = nameValues.getValue( "Operator1" )[0];
... | String function( MsgObject msg, String currentName ) { boolean value1Empty = nameValues.getValue( STR )[0].equals(Config.EMPTY_STR); boolean value2Empty = nameValues.getValue( STR )[0].equals(Config.EMPTY_STR); String op1 = nameValues.getValue( STR )[0]; String op2 = nameValues.getValue( STR )[0]; String[] values = nam... | /**
* This element is invalid if there are no Values associated with it.
* Therefore in the postprocessing we check to make sure we have a valid
* Value. If there isn't one, set this element's isActive to false.
* (unless, of course, the operator is IS NULL or IS NOT NULL)
*
*@param m... | This element is invalid if there are no Values associated with it. Therefore in the postprocessing we check to make sure we have a valid Value. If there isn't one, set this element's isActive to false. (unless, of course, the operator is IS NULL or IS NOT NULL) | postProcess | {
"repo_name": "jchoyt/mrald-lite",
"path": "src/org/mitre/mrald/query/OrFilterElement.java",
"license": "apache-2.0",
"size": 16231
} | [
"org.mitre.mrald.control.MsgObject",
"org.mitre.mrald.util.Config",
"org.mitre.mrald.util.FormTags"
] | import org.mitre.mrald.control.MsgObject; import org.mitre.mrald.util.Config; import org.mitre.mrald.util.FormTags; | import org.mitre.mrald.control.*; import org.mitre.mrald.util.*; | [
"org.mitre.mrald"
] | org.mitre.mrald; | 382,211 |
public boolean isLast() throws SQLException {
synchronized (checkClosed().getConnectionMutex()) {
return this.rowData.isLast();
}
} | boolean function() throws SQLException { synchronized (checkClosed().getConnectionMutex()) { return this.rowData.isLast(); } } | /**
* JDBC 2.0
*
* <p>
* Determine if the cursor is on the last row of the result set. Note:
* Calling isLast() may be expensive since the JDBC driver might need to
* fetch ahead one row in order to determine whether the current row is the
* last row in the result set.
* </p>
*
* @return true if o... | JDBC 2.0 Determine if the cursor is on the last row of the result set. Note: Calling isLast() may be expensive since the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set. | isLast | {
"repo_name": "shubhanshu-gupta/Apache-Solr",
"path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "apache-2.0",
"size": 247329
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 545,765 |
@VisibleForTesting
public static ScanLevelProjection build(List<SchemaPath> projectionList,
List<ScanProjectionParser> parsers,
TupleMetadata outputSchema) {
return new Builder()
.projection(projectionList)
.parsers(parsers)
.providedSchema(outputSchema)
.build();
} | static ScanLevelProjection function(List<SchemaPath> projectionList, List<ScanProjectionParser> parsers, TupleMetadata outputSchema) { return new Builder() .projection(projectionList) .parsers(parsers) .providedSchema(outputSchema) .build(); } | /**
* Builder shortcut, primarily for tests.
*/ | Builder shortcut, primarily for tests | build | {
"repo_name": "johnnywale/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/project/ScanLevelProjection.java",
"license": "apache-2.0",
"size": 22109
} | [
"java.util.List",
"org.apache.drill.common.expression.SchemaPath",
"org.apache.drill.exec.record.metadata.TupleMetadata"
] | import java.util.List; import org.apache.drill.common.expression.SchemaPath; import org.apache.drill.exec.record.metadata.TupleMetadata; | import java.util.*; import org.apache.drill.common.expression.*; import org.apache.drill.exec.record.metadata.*; | [
"java.util",
"org.apache.drill"
] | java.util; org.apache.drill; | 448,435 |
public void readSpawnData(ByteBuf additionalData); | void function(ByteBuf additionalData); | /**
* Called by the client when it receives a Entity spawn packet.
* Data should be read out of the stream in the same way as it was written.
*
* @param data The packet data stream
*/ | Called by the client when it receives a Entity spawn packet. Data should be read out of the stream in the same way as it was written | readSpawnData | {
"repo_name": "Scrik/Cauldron-1",
"path": "eclipse/cauldron/src/main/java/cpw/mods/fml/common/registry/IEntityAdditionalSpawnData.java",
"license": "gpl-3.0",
"size": 1127
} | [
"io.netty.buffer.ByteBuf"
] | import io.netty.buffer.ByteBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 2,276,935 |
public int getSortedColumnIndex() {
RowSorter<?> controller = getRowSorter();
if (controller != null) {
SortKey sortKey = SortUtils.getFirstSortingKey(controller.getSortKeys());
if (sortKey != null) {
return convertColumnIndexToView(sortKey.getColumn());
... | int function() { RowSorter<?> controller = getRowSorter(); if (controller != null) { SortKey sortKey = SortUtils.getFirstSortingKey(controller.getSortKeys()); if (sortKey != null) { return convertColumnIndexToView(sortKey.getColumn()); } } return -1; } | /**
* Returns the view column index of the primary sort column.
*
* @return the view column index of the primary sort column or -1 if nothing
* sorted or the primary sort column not visible.
*/ | Returns the view column index of the primary sort column | getSortedColumnIndex | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java",
"license": "lgpl-2.1",
"size": 163674
} | [
"javax.swing.RowSorter",
"org.jdesktop.swingx.sort.SortUtils"
] | import javax.swing.RowSorter; import org.jdesktop.swingx.sort.SortUtils; | import javax.swing.*; import org.jdesktop.swingx.sort.*; | [
"javax.swing",
"org.jdesktop.swingx"
] | javax.swing; org.jdesktop.swingx; | 195,365 |
void rollLog() throws IOException;
boolean append(TxnHeader hdr, Record r) throws IOException; | void rollLog() throws IOException; boolean append(TxnHeader hdr, Record r) throws IOException; | /**
* Append a request to the transaction log
* @param hdr the transaction header
* @param r the transaction itself
* returns true iff something appended, otw false
* @throws IOException
*/ | Append a request to the transaction log | append | {
"repo_name": "joyent/zookeeper",
"path": "src/java/main/org/apache/zookeeper/server/persistence/TxnLog.java",
"license": "apache-2.0",
"size": 3685
} | [
"java.io.IOException",
"org.apache.jute.Record",
"org.apache.zookeeper.txn.TxnHeader"
] | import java.io.IOException; import org.apache.jute.Record; import org.apache.zookeeper.txn.TxnHeader; | import java.io.*; import org.apache.jute.*; import org.apache.zookeeper.txn.*; | [
"java.io",
"org.apache.jute",
"org.apache.zookeeper"
] | java.io; org.apache.jute; org.apache.zookeeper; | 2,885,672 |
Boolean isColStClsSupported() {
return ValuePool.getBoolean(type == Types.NULL ? true
: getColStClsName()
!= null);
} | Boolean isColStClsSupported() { return ValuePool.getBoolean(type == Types.NULL ? true : getColStClsName() != null); } | /**
* Retrieves whether, under the current release, class path and hosting
* JVM, HSQLDB supports storing this type in table columns. <p>
*
* This value also typically represents whether HSQLDB supports retrieving
* values of this type in the columns of ResultSets.
* @return whether, under... | Retrieves whether, under the current release, class path and hosting JVM, HSQLDB supports storing this type in table columns. This value also typically represents whether HSQLDB supports retrieving values of this type in the columns of ResultSets | isColStClsSupported | {
"repo_name": "ckaestne/LEADT",
"path": "workspace/hsqldb/src/org/hsqldb/DITypeInfo.java",
"license": "gpl-3.0",
"size": 36588
} | [
"org.hsqldb.store.ValuePool"
] | import org.hsqldb.store.ValuePool; | import org.hsqldb.store.*; | [
"org.hsqldb.store"
] | org.hsqldb.store; | 1,710,380 |
public CommandLine getCommandLine ()
{
return commandLine;
} | CommandLine function () { return commandLine; } | /**
* Get the command line parameters.
*
* @return The command line paramters.
*/ | Get the command line parameters | getCommandLine | {
"repo_name": "grappendorf/openmetix",
"path": "src/java/de/iritgo/openmetix/framework/IritgoEngine.java",
"license": "gpl-2.0",
"size": 15691
} | [
"org.apache.commons.cli.CommandLine"
] | import org.apache.commons.cli.CommandLine; | import org.apache.commons.cli.*; | [
"org.apache.commons"
] | org.apache.commons; | 299,677 |
public void setPasswordPolicy(String code, String data) {
ComponentName demoDeviceAdmin = new ComponentName(context, AgentDeviceAdminReceiver.class);
int attempts, length, history, specialChars;
String alphanumeric, complex;
boolean isAlphanumeric, isComplex;
long timout;
resultBuilder.build(code);
... | void function(String code, String data) { ComponentName demoDeviceAdmin = new ComponentName(context, AgentDeviceAdminReceiver.class); int attempts, length, history, specialChars; String alphanumeric, complex; boolean isAlphanumeric, isComplex; long timout; resultBuilder.build(code); try { JSONObject policyData = new JS... | /**
* Set device password policy.
* @param code - Operation code.
* @param data - Data required (Password policy parameters).
* @param requestMode - Request mode(Normal mode or policy bundle mode).
*/ | Set device password policy | setPasswordPolicy | {
"repo_name": "ayyoob/product-iot-server",
"path": "modules/tools/mdm-android-agent-archetype/src/main/resources/archetype-resources/src/main/java/org/wso2/mdm/agent/services/Operation.java",
"license": "apache-2.0",
"size": 31674
} | [
"android.app.admin.DevicePolicyManager",
"android.content.ComponentName",
"android.util.Log"
] | import android.app.admin.DevicePolicyManager; import android.content.ComponentName; import android.util.Log; | import android.app.admin.*; import android.content.*; import android.util.*; | [
"android.app",
"android.content",
"android.util"
] | android.app; android.content; android.util; | 403,465 |
public TermsFacetBuilder param(String name, Object value) {
if (params == null) {
params = Maps.newHashMap();
}
params.put(name, value);
return this;
} | TermsFacetBuilder function(String name, Object value) { if (params == null) { params = Maps.newHashMap(); } params.put(name, value); return this; } | /**
* A parameter that will be passed to the script.
*
* @param name The name of the script parameter.
* @param value The value of the script parameter.
*/ | A parameter that will be passed to the script | param | {
"repo_name": "corochoone/elasticsearch",
"path": "src/main/java/org/elasticsearch/search/facet/terms/TermsFacetBuilder.java",
"license": "apache-2.0",
"size": 8332
} | [
"com.google.common.collect.Maps"
] | import com.google.common.collect.Maps; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 865,681 |
public static final FileSystem getFileSystem() throws IOException {
if (isHadoopAvailable()) {
return FileSystem.newInstance(getHadoopConfig());
} else {
return FileSystem.newInstanceLocal(new Configuration()).getRaw();
}
} | static final FileSystem function() throws IOException { if (isHadoopAvailable()) { return FileSystem.newInstance(getHadoopConfig()); } else { return FileSystem.newInstanceLocal(new Configuration()).getRaw(); } } | /**
* Returns the {@link FileSystem}.
*
* @return the file system.
* @throws IOException
* if an I/O error occurs.
*/ | Returns the <code>FileSystem</code> | getFileSystem | {
"repo_name": "SHAF-WORK/shaf",
"path": "core/src/main/java/org/shaf/core/util/IOUtils.java",
"license": "apache-2.0",
"size": 10457
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,033,370 |
@Test
public void testCalculateMedian() {
// check null list
assertTrue(Double.isNaN(Statistics.calculateMedian(null, false)));
assertTrue(Double.isNaN(Statistics.calculateMedian(null, true)));
// check empty list
List <Number>list = new ArrayList<Number>();
... | void function() { assertTrue(Double.isNaN(Statistics.calculateMedian(null, false))); assertTrue(Double.isNaN(Statistics.calculateMedian(null, true))); List <Number>list = new ArrayList<Number>(); assertTrue(Double.isNaN(Statistics.calculateMedian(list, false))); assertTrue(Double.isNaN(Statistics.calculateMedian(list, ... | /**
* Some checks for the calculateMedian(List, boolean) method.
*/ | Some checks for the calculateMedian(List, boolean) method | testCalculateMedian | {
"repo_name": "greearb/jfreechart-fse-ct",
"path": "src/test/java/org/jfree/data/statistics/StatisticsTest.java",
"license": "lgpl-2.1",
"size": 15191
} | [
"java.util.ArrayList",
"java.util.List",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,238,428 |
public void setMonthViewSelectedStyle(Style s) {
mv.setSelectedStyle(s);
} | void function(Style s) { mv.setSelectedStyle(s); } | /**
* Sets the selected style of the month view component within the calendar
*
* @param s style for the month view
*/ | Sets the selected style of the month view component within the calendar | setMonthViewSelectedStyle | {
"repo_name": "diamonddevgroup/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Calendar.java",
"license": "gpl-2.0",
"size": 49055
} | [
"com.codename1.ui.plaf.Style"
] | import com.codename1.ui.plaf.Style; | import com.codename1.ui.plaf.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,913,403 |
try(ByteArrayOutputStream baos = new ByteArrayOutputStream()){
ImageIO.write(bufferedImage, IMAGE_FORMAT, baos);
baos.flush();
byte[] imageInByte = baos.toByteArray();
return imageInByte;
}
}
/**
* Convert array of bytes into {@link Buffered... | try(ByteArrayOutputStream baos = new ByteArrayOutputStream()){ ImageIO.write(bufferedImage, IMAGE_FORMAT, baos); baos.flush(); byte[] imageInByte = baos.toByteArray(); return imageInByte; } } /** * Convert array of bytes into {@link BufferedImage} | /**
* Convert {@link BufferedImage} into array of bytes
*
* @param bufferedImage
* @return
* @throws IOException
*/ | Convert <code>BufferedImage</code> into array of bytes | bufferedImageToByteArray | {
"repo_name": "pajikos/ssc",
"path": "src/main/java/cz/vse/kit/ssc/utils/DataConvertUtils.java",
"license": "lgpl-3.0",
"size": 1357
} | [
"java.awt.image.BufferedImage",
"java.io.ByteArrayOutputStream",
"javax.imageio.ImageIO"
] | import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import javax.imageio.ImageIO; | import java.awt.image.*; import java.io.*; import javax.imageio.*; | [
"java.awt",
"java.io",
"javax.imageio"
] | java.awt; java.io; javax.imageio; | 2,092,791 |
private void setRetryAfterHeader(MessageContext messageContext) {
Object timestampOb = messageContext.getProperty(APIThrottleConstants.THROTTLED_NEXT_ACCESS_TIMESTAMP);
if (timestampOb != null) {
long timestamp = (Long) timestampOb;
SimpleDateFormat dateFormat = new SimpleDat... | void function(MessageContext messageContext) { Object timestampOb = messageContext.getProperty(APIThrottleConstants.THROTTLED_NEXT_ACCESS_TIMESTAMP); if (timestampOb != null) { long timestamp = (Long) timestampOb; SimpleDateFormat dateFormat = new SimpleDateFormat(STR); dateFormat.setTimeZone(TimeZone.getTimeZone(APITh... | /**
* When sent with a 429 (Too Many Requests) response, this indicates how long to wait before making a new request.
* Retry-After: <http-date> format header will be set. ex: Retry-After: Fri, 31 Dec 1999 23:59:59 GMT
* @param messageContext
*/ | When sent with a 429 (Too Many Requests) response, this indicates how long to wait before making a new request. Retry-After: format header will be set. ex: Retry-After: Fri, 31 Dec 1999 23:59:59 GMT | setRetryAfterHeader | {
"repo_name": "jaadds/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/handlers/throttling/ThrottleHandler.java",
"license": "apache-2.0",
"size": 63176
} | [
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Map",
"java.util.TimeZone",
"org.apache.synapse.MessageContext",
"org.apache.synapse.core.axis2.Axis2MessageContext"
] | import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import java.util.TimeZone; import org.apache.synapse.MessageContext; import org.apache.synapse.core.axis2.Axis2MessageContext; | import java.text.*; import java.util.*; import org.apache.synapse.*; import org.apache.synapse.core.axis2.*; | [
"java.text",
"java.util",
"org.apache.synapse"
] | java.text; java.util; org.apache.synapse; | 904,412 |
boolean append(List<HistoryCell> lasts, List<HistoryCell> os) {
if (lasts == null) {
return false;
}
boolean ret = false;
if (os.size() == 1) {
HistoryCell o = os.get(0);
HistoryCell last = lasts.get(lasts.size() - 1);
if (o.canAppend(last)) {
lasts.add(o);
ret = true;
}
}
return r... | boolean append(List<HistoryCell> lasts, List<HistoryCell> os) { if (lasts == null) { return false; } boolean ret = false; if (os.size() == 1) { HistoryCell o = os.get(0); HistoryCell last = lasts.get(lasts.size() - 1); if (o.canAppend(last)) { lasts.add(o); ret = true; } } return ret; } | /**
* try to append this change to the last ones
*/ | try to append this change to the last ones | append | {
"repo_name": "adamd/z",
"path": "src/neoe/ne/History.java",
"license": "bsd-2-clause",
"size": 2336
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 162,757 |
public void setLayeredPane(JLayeredPane f)
{
if (f == null)
throw new IllegalComponentStateException();
if (layeredPane != null)
remove(layeredPane);
layeredPane = f;
add(f, -1);
}
public JRootPane()
{
setLayout(createRootLayout());
getGlassPane();
getLaye... | void function(JLayeredPane f) { if (f == null) throw new IllegalComponentStateException(); if (layeredPane != null) remove(layeredPane); layeredPane = f; add(f, -1); } public JRootPane() { setLayout(createRootLayout()); getGlassPane(); getLayeredPane(); getContentPane(); setOpaque(true); updateUI(); } | /**
* Set the layered pane for the root pane.
*
* @param f The JLayeredPane to be used.
*
* @throws IllegalComponentStateException if JLayeredPane
* parameter is null.
*/ | Set the layered pane for the root pane | setLayeredPane | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/swing/JRootPane.java",
"license": "gpl-2.0",
"size": 17752
} | [
"java.awt.IllegalComponentStateException"
] | import java.awt.IllegalComponentStateException; | import java.awt.*; | [
"java.awt"
] | java.awt; | 851,541 |
public BillingProfileStatusReasonCode billingProfileStatusReasonCode() {
return this.billingProfileStatusReasonCode;
} | BillingProfileStatusReasonCode function() { return this.billingProfileStatusReasonCode; } | /**
* Get the billingProfileStatusReasonCode property: Reason for the specified billing profile status.
*
* @return the billingProfileStatusReasonCode value.
*/ | Get the billingProfileStatusReasonCode property: Reason for the specified billing profile status | billingProfileStatusReasonCode | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/BillingPropertyProperties.java",
"license": "mit",
"size": 9344
} | [
"com.azure.resourcemanager.billing.models.BillingProfileStatusReasonCode"
] | import com.azure.resourcemanager.billing.models.BillingProfileStatusReasonCode; | import com.azure.resourcemanager.billing.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 57,664 |
EClass getDataOutputAssociation(); | EClass getDataOutputAssociation(); | /**
* Returns the meta object for class '{@link org.eclipse.bpmn2.DataOutputAssociation <em>Data Output Association</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Data Output Association</em>'.
* @see org.eclipse.bpmn2.DataOutputAssociation
... | Returns the meta object for class '<code>org.eclipse.bpmn2.DataOutputAssociation Data Output Association</code>'. | getDataOutputAssociation | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,408,075 |
public static Clustering createSingletonClustering (InstanceList instances) {
int[] labels = new int[instances.size()];
for (int i = 0; i < labels.length; i++)
labels[i] = i;
return new Clustering(instances,
labels.length,
labels);
} | static Clustering function (InstanceList instances) { int[] labels = new int[instances.size()]; for (int i = 0; i < labels.length; i++) labels[i] = i; return new Clustering(instances, labels.length, labels); } | /**
* Initializes Clustering to one Instance per cluster.
* @param instances
* @return Singleton Clustering.
*/ | Initializes Clustering to one Instance per cluster | createSingletonClustering | {
"repo_name": "shalomeir/tctm",
"path": "src/cc/mallet/cluster/util/ClusterUtils.java",
"license": "epl-1.0",
"size": 6874
} | [
"cc.mallet.cluster.Clustering",
"cc.mallet.types.InstanceList"
] | import cc.mallet.cluster.Clustering; import cc.mallet.types.InstanceList; | import cc.mallet.cluster.*; import cc.mallet.types.*; | [
"cc.mallet.cluster",
"cc.mallet.types"
] | cc.mallet.cluster; cc.mallet.types; | 215,186 |
public ISarlFieldBuilder addSarlField(String name) {
return this.addVarSarlField(name);
}
@Inject
private Provider<ISarlClassBuilder> iSarlClassBuilderProvider; | ISarlFieldBuilder function(String name) { return this.addVarSarlField(name); } private Provider<ISarlClassBuilder> iSarlClassBuilderProvider; | /** Create a SarlField. *
* <p>This function is equivalent to {@link #addVarSarlField}.
* @param name - the name of the SarlField.
* @return the builder.
*/ | Create a SarlField. This function is equivalent to <code>#addVarSarlField</code> | addSarlField | {
"repo_name": "jgfoster/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/builders/SarlAnnotationTypeBuilderImpl.java",
"license": "apache-2.0",
"size": 7024
} | [
"javax.inject.Provider"
] | import javax.inject.Provider; | import javax.inject.*; | [
"javax.inject"
] | javax.inject; | 461,684 |
public void start() throws AxisFault {
try {
embedded = new SimpleHttpServer(httpFactory, port);
embedded.init();
embedded.start();
} catch (IOException e) {
log.error(e.getMessage(), e);
throw AxisFault.makeFault(e);
}
} | void function() throws AxisFault { try { embedded = new SimpleHttpServer(httpFactory, port); embedded.init(); embedded.start(); } catch (IOException e) { log.error(e.getMessage(), e); throw AxisFault.makeFault(e); } } | /**
* Start this server as a NON-daemon.
*/ | Start this server as a NON-daemon | start | {
"repo_name": "apache/axis2-java",
"path": "modules/transport/http/src/org/apache/axis2/transport/http/SimpleHTTPServer.java",
"license": "apache-2.0",
"size": 11212
} | [
"java.io.IOException",
"org.apache.axis2.AxisFault",
"org.apache.axis2.transport.http.server.SimpleHttpServer"
] | import java.io.IOException; import org.apache.axis2.AxisFault; import org.apache.axis2.transport.http.server.SimpleHttpServer; | import java.io.*; import org.apache.axis2.*; import org.apache.axis2.transport.http.server.*; | [
"java.io",
"org.apache.axis2"
] | java.io; org.apache.axis2; | 1,586,836 |
public ArrayList<DataNode> getDataNodes() {
ArrayList<DataNode> list = new ArrayList<DataNode>();
for (int i = 0; i < dataNodes.size(); i++) {
DataNode node = dataNodes.get(i).datanode;
list.add(node);
}
return list;
} | ArrayList<DataNode> function() { ArrayList<DataNode> list = new ArrayList<DataNode>(); for (int i = 0; i < dataNodes.size(); i++) { DataNode node = dataNodes.get(i).datanode; list.add(node); } return list; } | /**
* Gets a list of the started DataNodes. May be empty.
*/ | Gets a list of the started DataNodes. May be empty | getDataNodes | {
"repo_name": "vlajos/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java",
"license": "apache-2.0",
"size": 105726
} | [
"java.util.ArrayList",
"org.apache.hadoop.hdfs.server.datanode.DataNode"
] | import java.util.ArrayList; import org.apache.hadoop.hdfs.server.datanode.DataNode; | import java.util.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 952,916 |
public CcLibraryHelper addDefines(Iterable<String> defines) {
Iterables.addAll(this.defines, defines);
return this;
} | CcLibraryHelper function(Iterable<String> defines) { Iterables.addAll(this.defines, defines); return this; } | /**
* Adds the given defines to the compiler command line.
*/ | Adds the given defines to the compiler command line | addDefines | {
"repo_name": "hermione521/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 61939
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,686,163 |
@Test
public void testXmlTransient() throws Exception {
Logger.getLogger(getClass()).debug("TEST " + name.getMethodName());
object.setNode(descriptor1);
String xml = ConfigUtility.getStringForGraph(object);
assertTrue(xml.contains("<nodeId>"));
assertTrue(xml.contains("<nodeName>"));
assert... | void function() throws Exception { Logger.getLogger(getClass()).debug(STR + name.getMethodName()); object.setNode(descriptor1); String xml = ConfigUtility.getStringForGraph(object); assertTrue(xml.contains(STR)); assertTrue(xml.contains(STR)); assertTrue(xml.contains(STR)); assertTrue(xml.contains(STR)); assertTrue(xml... | /**
* Test xml transient fields
*
* @throws Exception the exception
*/ | Test xml transient fields | testXmlTransient | {
"repo_name": "WestCoastInformatics/UMLS-Terminology-Server",
"path": "jpa-model/src/test/java/com/wci/umls/server/jpa/test/content/DescriptorTreePositionJpaUnitTest.java",
"license": "apache-2.0",
"size": 7036
} | [
"com.wci.umls.server.helpers.ConfigUtility",
"org.apache.log4j.Logger",
"org.junit.Assert"
] | import com.wci.umls.server.helpers.ConfigUtility; import org.apache.log4j.Logger; import org.junit.Assert; | import com.wci.umls.server.helpers.*; import org.apache.log4j.*; import org.junit.*; | [
"com.wci.umls",
"org.apache.log4j",
"org.junit"
] | com.wci.umls; org.apache.log4j; org.junit; | 79,275 |
protected boolean setLog(ComponentStateLog log) {
current = true;
LogType newType = getType(log);
this.log = log;
stringValue = convertToString(newType);
boolean changed = type != newType || stringValue.length() > maxWidth;
if (stringValue.length() > maxWidth) {
maxWidth = stringValue.length(... | boolean function(ComponentStateLog log) { current = true; LogType newType = getType(log); this.log = log; stringValue = convertToString(newType); boolean changed = type != newType stringValue.length() > maxWidth; if (stringValue.length() > maxWidth) { maxWidth = stringValue.length(); } this.type = newType; return chang... | /**
* Returns true iff the given log has a different type to the previous type or requires a larger width.
*/ | Returns true iff the given log has a different type to the previous type or requires a larger width | setLog | {
"repo_name": "OliverColeman/europa",
"path": "src/main/java/com/ojcoleman/europa/monitor/OverviewMonitor.java",
"license": "gpl-3.0",
"size": 11872
} | [
"com.ojcoleman.europa.configurable.ComponentStateLog"
] | import com.ojcoleman.europa.configurable.ComponentStateLog; | import com.ojcoleman.europa.configurable.*; | [
"com.ojcoleman.europa"
] | com.ojcoleman.europa; | 568,969 |
public void output(ItemStack stack, World world, int x, int y, int z, int direction); | void function(ItemStack stack, World world, int x, int y, int z, int direction); | /**
* Output an item.
*
* Do not null the passed stack, keep it at stack size 0 instead.
*
* @param stack Item to output
* @param world World the interactive sorter is in
* @param position Position of the interactive sorter
* @param direction Direction the item is being OUTPUT from
*/ | Output an item. Do not null the passed stack, keep it at stack size 0 instead | output | {
"repo_name": "Vexatos/PeripheralsPlusPlus",
"path": "src/api/resources/reference/miscperipherals/api/IInteractiveSorterOutput.java",
"license": "gpl-2.0",
"size": 824
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.world.World"
] | import net.minecraft.item.ItemStack; import net.minecraft.world.World; | import net.minecraft.item.*; import net.minecraft.world.*; | [
"net.minecraft.item",
"net.minecraft.world"
] | net.minecraft.item; net.minecraft.world; | 1,378,108 |
@Override
public void handle(Callback callbacks[])
throws IOException, UnsupportedCallbackException {
for (int i = 0; i < callbacks.length; i++) {
if (callbacks[i] instanceof NameCallback) {
if (realm.getContainer().getLogger().isTraceEnabled())
... | void function(Callback callbacks[]) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { if (realm.getContainer().getLogger().isTraceEnabled()) realm.getContainer().getLogger().trace(sm.getString(STR, username)); ((NameCallback) call... | /**
* Retrieve the information requested in the provided <code>Callbacks</code>.
* This implementation only recognizes {@link NameCallback},
* {@link PasswordCallback} and {@link TextInputCallback}.
* {@link TextInputCallback} is used to pass the various additional
* parameters required fo... | Retrieve the information requested in the provided <code>Callbacks</code>. This implementation only recognizes <code>NameCallback</code>, <code>PasswordCallback</code> and <code>TextInputCallback</code>. <code>TextInputCallback</code> is used to pass the various additional parameters required for DIGEST authentication | handle | {
"repo_name": "pistolove/sourcecode4junit",
"path": "Source4Tomcat/src/org/apache/catalina/realm/JAASCallbackHandler.java",
"license": "apache-2.0",
"size": 8278
} | [
"java.io.IOException",
"javax.security.auth.callback.Callback",
"javax.security.auth.callback.NameCallback",
"javax.security.auth.callback.PasswordCallback",
"javax.security.auth.callback.TextInputCallback",
"javax.security.auth.callback.UnsupportedCallbackException"
] | import java.io.IOException; import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.TextInputCallback; import javax.security.auth.callback.UnsupportedCallbackException; | import java.io.*; import javax.security.auth.callback.*; | [
"java.io",
"javax.security"
] | java.io; javax.security; | 921,918 |
@Nullable public static <T> T newInstance(Class<T> cls) throws IgniteCheckedException {
boolean set = false;
Constructor<T> ctor = null;
try {
ctor = cls.getDeclaredConstructor();
if (ctor == null)
return null;
if (!ctor.isAccessible())... | @Nullable static <T> T function(Class<T> cls) throws IgniteCheckedException { boolean set = false; Constructor<T> ctor = null; try { ctor = cls.getDeclaredConstructor(); if (ctor == null) return null; if (!ctor.isAccessible()) { ctor.setAccessible(true); set = true; } return ctor.newInstance(); } catch (NoSuchMethodExc... | /**
* Creates new instance of a class only if it has an empty constructor (can be non-public).
*
* @param cls Class to instantiate.
* @return New instance of the class or {@code null} if empty constructor could not be assigned.
* @throws IgniteCheckedException If failed.
*/ | Creates new instance of a class only if it has an empty constructor (can be non-public) | newInstance | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 325083
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.InvocationTargetException",
"org.apache.ignite.IgniteCheckedException",
"org.jetbrains.annotations.Nullable"
] | import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import org.apache.ignite.IgniteCheckedException; import org.jetbrains.annotations.Nullable; | import java.lang.reflect.*; import org.apache.ignite.*; import org.jetbrains.annotations.*; | [
"java.lang",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.lang; org.apache.ignite; org.jetbrains.annotations; | 1,202,584 |
@Override
public void characters(char[] ch, int start, int length) throws SAXException {
if (currentElement == null) {
throw new SAXException("misformed XML");
}
else {
currentValue += new String(ch, start, length);
}
} | void function(char[] ch, int start, int length) throws SAXException { if (currentElement == null) { throw new SAXException(STR); } else { currentValue += new String(ch, start, length); } } | /** Function to handle the characters that have been passed to this object from the main
* GenericXMLParser; The element these characters belong to has been set by the previous startElement
* event
*
* @param ch The character array containing the characters
* @param start The position where t... | Function to handle the characters that have been passed to this object from the main GenericXMLParser; The element these characters belong to has been set by the previous startElement event | characters | {
"repo_name": "BiosemanticsDotOrg/GeneDiseasePaper",
"path": "java/DataImport/src/org/erasmusmc/dataimport/Medline/xmlparsers/NodeHandler.java",
"license": "agpl-3.0",
"size": 15807
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,026,190 |
public Indication getIndication(final String tokenId) {
XmlToken token = getTokenById(tokenId);
if (token != null) {
return token.getIndication();
}
return null;
} | Indication function(final String tokenId) { XmlToken token = getTokenById(tokenId); if (token != null) { return token.getIndication(); } return null; } | /**
* This method returns the indication obtained after the validation of a token.
*
* @param tokenId
* DSS unique identifier of the token
* @return the indication for the given token Id
*/ | This method returns the indication obtained after the validation of a token | getIndication | {
"repo_name": "openlimit-signcubes/dss",
"path": "dss-simple-report-jaxb/src/main/java/eu/europa/esig/dss/simplereport/SimpleReport.java",
"license": "lgpl-2.1",
"size": 12053
} | [
"eu.europa.esig.dss.enumerations.Indication",
"eu.europa.esig.dss.simplereport.jaxb.XmlToken"
] | import eu.europa.esig.dss.enumerations.Indication; import eu.europa.esig.dss.simplereport.jaxb.XmlToken; | import eu.europa.esig.dss.enumerations.*; import eu.europa.esig.dss.simplereport.jaxb.*; | [
"eu.europa.esig"
] | eu.europa.esig; | 706,344 |
public ServiceResponse<SubProductInner> putSubResource(SubProductInner product) throws CloudException, IOException, InterruptedException {
return putSubResourceAsync(product).toBlocking().last();
} | ServiceResponse<SubProductInner> function(SubProductInner product) throws CloudException, IOException, InterruptedException { return putSubResourceAsync(product).toBlocking().last(); } | /**
* Long running put request with sub resource.
*
* @param product Sub Product to put
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws InterruptedException exception thrown when long running opera... | Long running put request with sub resource | putSubResource | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROsInner.java",
"license": "mit",
"size": 313853
} | [
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] | com.microsoft.azure; com.microsoft.rest; java.io; | 2,482,504 |
// /////////////////////////////////////////////////////////
public void setFormatter(final int col, final Format formatter) {
getTableColumn(col).setFormatter(formatter);
}
| void function(final int col, final Format formatter) { getTableColumn(col).setFormatter(formatter); } | /**
* Sets the formatter.
*
* @param col the col
* @param formatter the formatter
*/ | Sets the formatter | setFormatter | {
"repo_name": "kiswanij/jk-util",
"path": "src/main/java/com/jk/util/model/table/JKTableModel.java",
"license": "mit",
"size": 27674
} | [
"java.text.Format"
] | import java.text.Format; | import java.text.*; | [
"java.text"
] | java.text; | 1,076,775 |
public void sendSlotContents(Container containerToSend, int slotInd, ItemStack stack)
{
if (slotInd == 0)
{
this.nameField.setText(stack == null ? "" : stack.getDisplayName());
this.nameField.setEnabled(stack != null);
if (stack != null)
{
... | void function(Container containerToSend, int slotInd, ItemStack stack) { if (slotInd == 0) { this.nameField.setText(stack == null ? "" : stack.getDisplayName()); this.nameField.setEnabled(stack != null); if (stack != null) { this.renameItem(); } } } | /**
* Sends the contents of an inventory slot to the client-side Container. This doesn't have to match the actual
* contents of that slot. Args: Container, slot number, slot contents
*/ | Sends the contents of an inventory slot to the client-side Container. This doesn't have to match the actual contents of that slot. Args: Container, slot number, slot contents | sendSlotContents | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/client/gui/GuiRepair.java",
"license": "gpl-2.0",
"size": 8373
} | [
"net.minecraft.inventory.Container",
"net.minecraft.item.ItemStack"
] | import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; | import net.minecraft.inventory.*; import net.minecraft.item.*; | [
"net.minecraft.inventory",
"net.minecraft.item"
] | net.minecraft.inventory; net.minecraft.item; | 1,602,706 |
public void setWebApp(WebApp webApp) {
if (c_logger.isTraceDebugEnabled()) {
c_logger.traceDebug(this, "setWebApp"," setWebApp = " + webApp);
}
if(this._webApp == null) {
this._webApp = webApp;
}
} | void function(WebApp webApp) { if (c_logger.isTraceDebugEnabled()) { c_logger.traceDebug(this, STR,STR + webApp); } if(this._webApp == null) { this._webApp = webApp; } } | /**
* Set the WebApp for this application
* @param webApp
*/ | Set the WebApp for this application | setWebApp | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.sipcontainer/src/com/ibm/ws/sip/container/parser/SipAppDesc.java",
"license": "epl-1.0",
"size": 54998
} | [
"com.ibm.ws.webcontainer.webapp.WebApp"
] | import com.ibm.ws.webcontainer.webapp.WebApp; | import com.ibm.ws.webcontainer.webapp.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,046,507 |
public void accept(final MethodVisitor mv) {
AbstractInsnNode insn = first;
while (insn != null) {
insn.accept(mv);
insn = insn.next;
}
} | void function(final MethodVisitor mv) { AbstractInsnNode insn = first; while (insn != null) { insn.accept(mv); insn = insn.next; } } | /**
* Makes the given visitor visit all of the instructions in this list.
*
* @param mv the method visitor that must visit the instructions.
*/ | Makes the given visitor visit all of the instructions in this list | accept | {
"repo_name": "nxmatic/objectweb-asm-4.0",
"path": "src/org/objectweb/asm/tree/InsnList.java",
"license": "bsd-3-clause",
"size": 17746
} | [
"org.objectweb.asm.MethodVisitor"
] | import org.objectweb.asm.MethodVisitor; | import org.objectweb.asm.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 12,777 |
@Override
public void concat(Path trg, Path [] psrcs) throws IOException {
statistics.incrementWriteOps(1);
storageStatistics.incrementOpCounter(OpType.CONCAT);
// Make target absolute
Path absF = fixRelativePart(trg);
// Make all srcs absolute
Path[] srcs = new Path[psrcs.length];
for (... | void function(Path trg, Path [] psrcs) throws IOException { statistics.incrementWriteOps(1); storageStatistics.incrementOpCounter(OpType.CONCAT); Path absF = fixRelativePart(trg); Path[] srcs = new Path[psrcs.length]; for (int i=0; i<psrcs.length; i++) { srcs[i] = fixRelativePart(psrcs[i]); } String[] srcsStr = new Str... | /**
* Move blocks from srcs to trg and delete srcs afterwards.
* The file block sizes must be the same.
*
* @param trg existing file to append to
* @param psrcs list of files (same block size, same replication)
* @throws IOException
*/ | Move blocks from srcs to trg and delete srcs afterwards. The file block sizes must be the same | concat | {
"repo_name": "wenxinhe/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java",
"license": "apache-2.0",
"size": 105324
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.hdfs.DFSOpsCountStatistics"
] | import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.hdfs.DFSOpsCountStatistics; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,409,859 |
@DoesServiceRequest
public void upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition,
FileRequestOptions options, OperationContext opContext) throws StorageException, IOException {
if (opContext == null) {
opContext = new OperationContex... | void function(final InputStream sourceStream, final long length, final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, IOException { if (opContext == null) { opContext = new OperationContext(); } options = FileRequestOptions.applyDefaults(options, this.f... | /**
* Uploads the source stream data to the file using the specified access condition, request options, and operation
* context.
*
* @param sourceStream
* An {@link IntputStream} object to read from.
* @param length
* A <code>long</code> which represents the len... | Uploads the source stream data to the file using the specified access condition, request options, and operation context | upload | {
"repo_name": "peterhoeltschi/AzureStorage",
"path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java",
"license": "apache-2.0",
"size": 119971
} | [
"com.microsoft.azure.storage.AccessCondition",
"com.microsoft.azure.storage.Constants",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"java.io.IOException",
"java.io.InputStream"
] | import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.Constants; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import java.io.IOException; import java.io.InputStream; | import com.microsoft.azure.storage.*; import java.io.*; | [
"com.microsoft.azure",
"java.io"
] | com.microsoft.azure; java.io; | 2,774,558 |
public IncomeVerificationPrecheckMilitaryInfo getUsMilitaryInfo() {
return usMilitaryInfo;
} | IncomeVerificationPrecheckMilitaryInfo function() { return usMilitaryInfo; } | /**
* Get usMilitaryInfo
* @return usMilitaryInfo
**/ | Get usMilitaryInfo | getUsMilitaryInfo | {
"repo_name": "plaid/plaid-java",
"path": "src/main/java/com/plaid/client/model/IncomeVerificationPrecheckRequest.java",
"license": "mit",
"size": 9709
} | [
"com.plaid.client.model.IncomeVerificationPrecheckMilitaryInfo"
] | import com.plaid.client.model.IncomeVerificationPrecheckMilitaryInfo; | import com.plaid.client.model.*; | [
"com.plaid.client"
] | com.plaid.client; | 1,350,706 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.channels.ChannelGroup> updateChannelGroupClient(com.mozu.api.contracts.commerceruntime.channels.ChannelGroup channelGroup, String code, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.ChannelGroupUrl.updateChannelGr... | static MozuClient<com.mozu.api.contracts.commerceruntime.channels.ChannelGroup> function(com.mozu.api.contracts.commerceruntime.channels.ChannelGroup channelGroup, String code, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ChannelGroupUrl.updateChannelGroupUrl(code, responseFields);... | /**
* Updates one or more properties of a defined channel group.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.channels.ChannelGroup> mozuClient=UpdateChannelGroupClient( channelGroup, code, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* ChannelGroup cha... | Updates one or more properties of a defined channel group. <code><code> MozuClient mozuClient=UpdateChannelGroupClient( channelGroup, code, responseFields); client.setBaseAddress(url); client.executeRequest(); ChannelGroup channelGroup = client.Result(); </code></code> | updateChannelGroupClient | {
"repo_name": "eileenzhuang1/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/ChannelGroupClient.java",
"license": "mit",
"size": 11623
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,681,800 |
public void updateForm() {
if (!(getSyncSource() instanceof PIMCalendarSyncSource)) {
notifyError(
new AdminException("This is not a PIMCalendarSyncSource! "
+ "Unable to process SyncSource values."
)
);
... | void function() { if (!(getSyncSource() instanceof PIMCalendarSyncSource)) { notifyError( new AdminException(STR + STR ) ); return; } super.updateForm(); updateEntityTypeCheckBoxes(); } | /**
* Updates the form
*/ | Updates the form | updateForm | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/foundation/foundation-core/src/main/java/com/funambol/foundation/admin/PIMCalendarSyncSourceConfigPanel.java",
"license": "agpl-3.0",
"size": 11618
} | [
"com.funambol.admin.AdminException",
"com.funambol.foundation.engine.source.PIMCalendarSyncSource"
] | import com.funambol.admin.AdminException; import com.funambol.foundation.engine.source.PIMCalendarSyncSource; | import com.funambol.admin.*; import com.funambol.foundation.engine.source.*; | [
"com.funambol.admin",
"com.funambol.foundation"
] | com.funambol.admin; com.funambol.foundation; | 769,564 |
@Override
public ChannelFuture writeRstStream(ChannelHandlerContext ctx, int streamId, long errorCode,
ChannelPromise promise) {
Http2Stream stream = connection().stream(streamId);
ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise);
ctx.flu... | ChannelFuture function(ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise) { Http2Stream stream = connection().stream(streamId); ChannelFuture future = frameWriter().writeRstStream(ctx, streamId, errorCode, promise); ctx.flush(); if (stream != null) { stream.resetSent(); closeStream(stream,... | /**
* Writes a {@code RST_STREAM} frame to the remote endpoint and updates the connection state appropriately.
*/ | Writes a RST_STREAM frame to the remote endpoint and updates the connection state appropriately | writeRstStream | {
"repo_name": "meghana0507/grpc-java-poll",
"path": "lib/netty/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java",
"license": "bsd-3-clause",
"size": 20151
} | [
"io.netty.channel.ChannelFuture",
"io.netty.channel.ChannelHandlerContext",
"io.netty.channel.ChannelPromise"
] | import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 744,060 |
public Node getXblFirstChild() {
return xblManager.getXblFirstChild(this);
} | Node function() { return xblManager.getXblFirstChild(this); } | /**
* Get the first child node of this node in the fully flattened tree.
*/ | Get the first child node of this node in the fully flattened tree | getXblFirstChild | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/AbstractDocument.java",
"license": "apache-2.0",
"size": 95361
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,813,084 |
checkNotNull(from);
checkNotNull(to);
CharBuffer buf = CharBuffer.allocate(BUF_SIZE);
long total = 0;
while (from.read(buf) != -1) {
buf.flip();
to.append(buf);
total += buf.remaining();
buf.clear();
}
return total;
} | checkNotNull(from); checkNotNull(to); CharBuffer buf = CharBuffer.allocate(BUF_SIZE); long total = 0; while (from.read(buf) != -1) { buf.flip(); to.append(buf); total += buf.remaining(); buf.clear(); } return total; } | /**
* Copies all characters between the {@link Readable} and {@link Appendable}
* objects. Does not close or flush either object.
*
* @param from the object to read from
* @param to the object to write to
* @return the number of characters copied
* @throws IOException if an I/O error occurs
*/ | Copies all characters between the <code>Readable</code> and <code>Appendable</code> objects. Does not close or flush either object | copy | {
"repo_name": "privatemousse/guava",
"path": "guava/src/com/google/common/io/CharStreams.java",
"license": "mit",
"size": 7412
} | [
"com.google.common.base.Preconditions",
"java.nio.CharBuffer"
] | import com.google.common.base.Preconditions; import java.nio.CharBuffer; | import com.google.common.base.*; import java.nio.*; | [
"com.google.common",
"java.nio"
] | com.google.common; java.nio; | 1,898,705 |
@Generated("This method was generated using jOOQ-tools")
static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Seq<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> crossJoin(Stream<T1> s1, Stream<T2> s2, Stream<T3> s3, Stream<T4> s4, Stream<T5> s5, Stream<T6> s6, Stream<T7> s7, Stream<T8> s8, Stream<T9> s9) {
return c... | @Generated(STR) static <T1, T2, T3, T4, T5, T6, T7, T8, T9> Seq<Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9>> crossJoin(Stream<T1> s1, Stream<T2> s2, Stream<T3> s3, Stream<T4> s4, Stream<T5> s5, Stream<T6> s6, Stream<T7> s7, Stream<T8> s8, Stream<T9> s9) { return crossJoin(seq(s1), seq(s2), seq(s3), seq(s4), seq(s5), seq... | /**
* Cross join 9 streams into one.
* <p>
* <code><pre>
* // (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b"))
* Seq.of(1, 2).crossJoin(Seq.of("a", "b"))
* </pre></code>
*/ | Cross join 9 streams into one. <code><code> (tuple(1, "a"), tuple(1, "b"), tuple(2, "a"), tuple(2, "b")) Seq.of(1, 2).crossJoin(Seq.of("a", "b")) </code></code> | crossJoin | {
"repo_name": "stephenh/jOOL",
"path": "src/main/java/org/jooq/lambda/Seq.java",
"license": "apache-2.0",
"size": 198501
} | [
"java.util.stream.Stream",
"javax.annotation.Generated",
"org.jooq.lambda.tuple.Tuple9"
] | import java.util.stream.Stream; import javax.annotation.Generated; import org.jooq.lambda.tuple.Tuple9; | import java.util.stream.*; import javax.annotation.*; import org.jooq.lambda.tuple.*; | [
"java.util",
"javax.annotation",
"org.jooq.lambda"
] | java.util; javax.annotation; org.jooq.lambda; | 424,281 |
@Override
public Map getForcedReadOnlyFields() {
Map map = super.getForcedReadOnlyFields();
map.put(KFSPropertyConstants.AMOUNT, Boolean.TRUE);
map.put("invoiceItemTaxAmount", Boolean.TRUE);
map.put("openAmount", Boolean.TRUE);
return map;
} | Map function() { Map map = super.getForcedReadOnlyFields(); map.put(KFSPropertyConstants.AMOUNT, Boolean.TRUE); map.put(STR, Boolean.TRUE); map.put(STR, Boolean.TRUE); return map; } | /**
* Make amount and sales tax read only
*
* @see org.kuali.rice.kns.web.struts.form.KualiTransactionalDocumentFormBase#getForcedReadOnlyFields()
*/ | Make amount and sales tax read only | getForcedReadOnlyFields | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/web/struts/CustomerInvoiceForm.java",
"license": "agpl-3.0",
"size": 9944
} | [
"java.util.Map",
"org.kuali.kfs.sys.KFSPropertyConstants"
] | import java.util.Map; import org.kuali.kfs.sys.KFSPropertyConstants; | import java.util.*; import org.kuali.kfs.sys.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 978,909 |
protected AuthenticationSession getAuthenticationSession() {
return getPersistenceSession().getServicesInjector().lookupService(AuthenticationSessionProvider.class).getAuthenticationSession();
} | AuthenticationSession function() { return getPersistenceSession().getServicesInjector().lookupService(AuthenticationSessionProvider.class).getAuthenticationSession(); } | /**
* Default implementation looks up from singleton, but can be overridden for
* testing.
*/ | Default implementation looks up from singleton, but can be overridden for testing | getAuthenticationSession | {
"repo_name": "sanderginn/isis",
"path": "core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java",
"license": "apache-2.0",
"size": 45612
} | [
"org.apache.isis.core.commons.authentication.AuthenticationSession",
"org.apache.isis.core.commons.authentication.AuthenticationSessionProvider"
] | import org.apache.isis.core.commons.authentication.AuthenticationSession; import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider; | import org.apache.isis.core.commons.authentication.*; | [
"org.apache.isis"
] | org.apache.isis; | 467,435 |
private static String parseName(final SimpleParser parser) {
final StringBuilder result = new StringBuilder();
parser.eatWhiteSpace();
while (parser.isIdentifier()) {
result.append(parser.readChar());
}
return result.toString();
} | static String function(final SimpleParser parser) { final StringBuilder result = new StringBuilder(); parser.eatWhiteSpace(); while (parser.isIdentifier()) { result.append(parser.readChar()); } return result.toString(); } | /**
* Parse a name.
* @param parser The parser to use.
* @return The name.
*/ | Parse a name | parseName | {
"repo_name": "larhoy/SentimentProjectV2",
"path": "SentimentAnalysisV2/encog-core-3.1.0/src/main/java/org/encog/ml/factory/parse/ArchitectureParse.java",
"license": "mit",
"size": 5436
} | [
"org.encog.util.SimpleParser"
] | import org.encog.util.SimpleParser; | import org.encog.util.*; | [
"org.encog.util"
] | org.encog.util; | 2,382,650 |
public static void unload(){
// Inform:
SagaLogger.info("Unloading wars.");
save();
instance = null;
}
| static void function(){ SagaLogger.info(STR); save(); instance = null; } | /**
* Unloads the manager.
*
*/ | Unloads the manager | unload | {
"repo_name": "andfRa/Saga",
"path": "src/org/saga/factions/WarManager.java",
"license": "gpl-3.0",
"size": 10291
} | [
"org.saga.SagaLogger"
] | import org.saga.SagaLogger; | import org.saga.*; | [
"org.saga"
] | org.saga; | 1,764,519 |
public static List<VirtualFile> getSuitableIgnoreFiles(@NotNull Project project, @NotNull IgnoreFileType fileType, @NotNull VirtualFile file)
throws ExternalFileException {
List<VirtualFile> files = ContainerUtil.newArrayList();
if (file.getCanonicalPath() == null || project.getBaseDir()... | static List<VirtualFile> function(@NotNull Project project, @NotNull IgnoreFileType fileType, @NotNull VirtualFile file) throws ExternalFileException { List<VirtualFile> files = ContainerUtil.newArrayList(); if (file.getCanonicalPath() == null project.getBaseDir() == null !VfsUtilCore.isAncestor(project.getBaseDir(), f... | /**
* Returns all Ignore files in given {@link Project} that can match current passed file.
*
* @param project current project
* @param file current file
* @return collection of suitable Ignore files
* @throws ExternalFileException
*/ | Returns all Ignore files in given <code>Project</code> that can match current passed file | getSuitableIgnoreFiles | {
"repo_name": "bedla/idea-gitignore",
"path": "src/mobi/hsz/idea/gitignore/util/Utils.java",
"license": "mit",
"size": 15562
} | [
"com.intellij.openapi.project.Project",
"com.intellij.openapi.vfs.VfsUtilCore",
"com.intellij.openapi.vfs.VirtualFile",
"com.intellij.util.containers.ContainerUtil",
"java.util.List",
"mobi.hsz.idea.gitignore.file.type.IgnoreFileType",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.ContainerUtil; import java.util.List; import mobi.hsz.idea.gitignore.file.type.IgnoreFileType; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.project.*; import com.intellij.openapi.vfs.*; import com.intellij.util.containers.*; import java.util.*; import mobi.hsz.idea.gitignore.file.type.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"com.intellij.util",
"java.util",
"mobi.hsz.idea",
"org.jetbrains.annotations"
] | com.intellij.openapi; com.intellij.util; java.util; mobi.hsz.idea; org.jetbrains.annotations; | 359,269 |
private CourseInfoModel srtStream(String url, boolean preferCache) throws Exception {
Bundle p = new Bundle();
p.putString("format", "json");
String json = null;
if (NetworkUtil.isConnected(context) && !preferCache) {
// get data from server
String urlWithApp... | CourseInfoModel function(String url, boolean preferCache) throws Exception { Bundle p = new Bundle(); p.putString(STR, "json"); String json = null; if (NetworkUtil.isConnected(context) && !preferCache) { String urlWithAppendedParams = HttpManager.toGetUrl(url, p); logger.debug(STR+urlWithAppendedParams); json = http.ge... | /**
* Returns Stream object from the given URL.
* @param url
* @param preferCache
* @return
* @throws Exception
*/ | Returns Stream object from the given URL | srtStream | {
"repo_name": "miptliot/edx-app-android",
"path": "VideoLocker/src/main/java/org/edx/mobile/http/Api.java",
"license": "apache-2.0",
"size": 44937
} | [
"android.os.Bundle",
"com.google.gson.Gson",
"com.google.gson.GsonBuilder",
"org.edx.mobile.model.api.CourseInfoModel",
"org.edx.mobile.util.NetworkUtil"
] | import android.os.Bundle; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.edx.mobile.model.api.CourseInfoModel; import org.edx.mobile.util.NetworkUtil; | import android.os.*; import com.google.gson.*; import org.edx.mobile.model.api.*; import org.edx.mobile.util.*; | [
"android.os",
"com.google.gson",
"org.edx.mobile"
] | android.os; com.google.gson; org.edx.mobile; | 235,746 |
void remoteFailure(ErrorExplanation explanation); | void remoteFailure(ErrorExplanation explanation); | /**
* Indicates that the remote participant has failed to answer the query.
*
* @param explanation an explanation of failure, provided by the remote participant
*/ | Indicates that the remote participant has failed to answer the query | remoteFailure | {
"repo_name": "joshsh/rdfagents",
"path": "rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/subscribe/old/SubscriberOld.java",
"license": "mit",
"size": 3654
} | [
"net.fortytwo.rdfagents.model.ErrorExplanation"
] | import net.fortytwo.rdfagents.model.ErrorExplanation; | import net.fortytwo.rdfagents.model.*; | [
"net.fortytwo.rdfagents"
] | net.fortytwo.rdfagents; | 619,326 |
private long getRate(OFType type) {
return (long) rateMeterMap.get(type).getOneMinuteRate();
} | long function(OFType type) { return (long) rateMeterMap.get(type).getOneMinuteRate(); } | /**
* Returns the average meter rate within recent 1 minute.
*
* @param type OpenFlow message type
* @return rate value
*/ | Returns the average meter rate within recent 1 minute | getRate | {
"repo_name": "sonu283304/onos",
"path": "providers/openflow/message/src/main/java/org/onosproject/provider/of/message/impl/OpenFlowControlMessageAggregator.java",
"license": "apache-2.0",
"size": 5474
} | [
"org.projectfloodlight.openflow.protocol.OFType"
] | import org.projectfloodlight.openflow.protocol.OFType; | import org.projectfloodlight.openflow.protocol.*; | [
"org.projectfloodlight.openflow"
] | org.projectfloodlight.openflow; | 1,182,232 |
public void removeRoute(IpPrefix spfx, IpPrefix gpfx) {
McastRouteGroup group = findMcastGroup(gpfx);
if (group == null) {
// The group does not exist, we can't remove it.
return;
}
if (spfx.prefixLength() > 0) {
group.removeSou... | void function(IpPrefix spfx, IpPrefix gpfx) { McastRouteGroup group = findMcastGroup(gpfx); if (group == null) { return; } if (spfx.prefixLength() > 0) { group.removeSource(spfx); if (group.getSources().size() == 0 && group.getEgressPoints().size() == 0) { removeGroup(group); } } else { group.removeSources(); group.wit... | /**
* Remove a multicast route.
*
* @param spfx the source prefix
* @param gpfx the group prefix
*/ | Remove a multicast route | removeRoute | {
"repo_name": "packet-tracker/onos-1.4.0-custom-build",
"path": "apps/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteTable.java",
"license": "apache-2.0",
"size": 11479
} | [
"org.onlab.packet.IpPrefix"
] | import org.onlab.packet.IpPrefix; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 1,603,208 |
private void clearAllocationNodes(AllocationNode fromNode) {
if (!fromNode.wasInitialized) {
return;
}
// Bulk release allocations for performance (it's significantly faster when using
// DefaultAllocator because the allocator's lock only needs to be acquired and released once)
// [Internal:... | void function(AllocationNode fromNode) { if (!fromNode.wasInitialized) { return; } int allocationCount = (writeAllocationNode.wasInitialized ? 1 : 0) + ((int) (writeAllocationNode.startPosition - fromNode.startPosition) / allocationLength); Allocation[] allocationsToRelease = new Allocation[allocationCount]; Allocation... | /**
* Clears allocation nodes starting from {@code fromNode}.
*
* @param fromNode The node from which to clear.
*/ | Clears allocation nodes starting from fromNode | clearAllocationNodes | {
"repo_name": "amzn/exoplayer-amazon-port",
"path": "library/core/src/main/java/com/google/android/exoplayer2/source/SampleDataQueue.java",
"license": "apache-2.0",
"size": 20405
} | [
"com.google.android.exoplayer2.upstream.Allocation"
] | import com.google.android.exoplayer2.upstream.Allocation; | import com.google.android.exoplayer2.upstream.*; | [
"com.google.android"
] | com.google.android; | 680,699 |
public static void assertEquals(List expecteds, List actuals) {
assertEquals(null, expecteds, actuals);
} | static void function(List expecteds, List actuals) { assertEquals(null, expecteds, actuals); } | /**
* Asserts that two Lists are equal.<br>
*
* @param expecteds
* @param actuals
*/ | Asserts that two Lists are equal | assertEquals | {
"repo_name": "aalmiray/ezmorph",
"path": "subprojects/ezmorph-core/src/main/java/org/kordamp/ezmorph/test/ArrayAssertions.java",
"license": "apache-2.0",
"size": 49243
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 370,451 |
@Override
public CriteriaTemplate fetchBycategoryIdAndTypeId(
int criteria_category_id, int criteria_type_id,
boolean retrieveFromCache) {
Object[] finderArgs = new Object[] {
criteria_category_id, criteria_type_id
};
Object result = null;
if (retrieveFromCache) {
result = finderCache.getResul... | CriteriaTemplate function( int criteria_category_id, int criteria_type_id, boolean retrieveFromCache) { Object[] finderArgs = new Object[] { criteria_category_id, criteria_type_id }; Object result = null; if (retrieveFromCache) { result = finderCache.getResult(FINDER_PATH_FETCH_BY_CATEGORYIDANDTYPEID, finderArgs, this)... | /**
* Returns the criteria template where criteria_category_id = ? and criteria_type_id = ? or returns <code>null</code> if it could not be found, optionally using the finder cache.
*
* @param criteria_category_id the criteria_category_id
* @param criteria_type_id the criteria_type_id
* @param retriev... | Returns the criteria template where criteria_category_id = ? and criteria_type_id = ? or returns <code>null</code> if it could not be found, optionally using the finder cache | fetchBycategoryIdAndTypeId | {
"repo_name": "falko0000/moduleEProc",
"path": "Criterias/Criterias-service/src/main/java/tj/criterias/service/persistence/impl/CriteriaTemplatePersistenceImpl.java",
"license": "lgpl-2.1",
"size": 74582
} | [
"com.liferay.portal.kernel.dao.orm.Query",
"com.liferay.portal.kernel.dao.orm.QueryPos",
"com.liferay.portal.kernel.dao.orm.Session",
"com.liferay.portal.kernel.util.StringBundler",
"com.liferay.portal.kernel.util.StringUtil",
"java.util.Collections",
"java.util.List"
] | import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringUtil; import java.util.Collections; import java.util.List; | import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.util.*; import java.util.*; | [
"com.liferay.portal",
"java.util"
] | com.liferay.portal; java.util; | 1,236,329 |
@Test
public void whenDrinkCofeeThenDrink() {
Engeneer eng = new Engeneer();
assertThat(eng.drinkCofee(), is("Woooow"));
} | void function() { Engeneer eng = new Engeneer(); assertThat(eng.drinkCofee(), is(STR)); } | /**
* DrinkCofee method test.
*/ | DrinkCofee method test | whenDrinkCofeeThenDrink | {
"repo_name": "helycopternicht/elazarev",
"path": "chapter_002/Professions/src/test/java/ru/elazarev/EngeneerTest.java",
"license": "apache-2.0",
"size": 1600
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 35,434 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.