method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static final List<MustBeEqualTestBean> getWrongTestBeans() {
final List<MustBeEqualTestBean> wrongCases = new ArrayList<MustBeEqualTestBean>();
wrongCases.add(new MustBeEqualTestBean("old", null, "filled"));
wrongCases.add(new MustBeEqualTestBean("old", StringUtils.EMPTY, "filled"));
wrongCases... | static final List<MustBeEqualTestBean> function() { final List<MustBeEqualTestBean> wrongCases = new ArrayList<MustBeEqualTestBean>(); wrongCases.add(new MustBeEqualTestBean("old", null, STR)); wrongCases.add(new MustBeEqualTestBean("old", StringUtils.EMPTY, STR)); wrongCases.add(new MustBeEqualTestBean("old", STR, nul... | /**
* get wrong test beans.
*
* @return wrong test beans
*/ | get wrong test beans | getWrongTestBeans | {
"repo_name": "ManfredTremmel/mt-bean-validators",
"path": "src/test/java/de/knightsoftnet/validators/shared/testcases/MustBeEqualTestCases.java",
"license": "apache-2.0",
"size": 2551
} | [
"de.knightsoftnet.validators.shared.beans.MustBeEqualTestBean",
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.lang3.StringUtils"
] | import de.knightsoftnet.validators.shared.beans.MustBeEqualTestBean; import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; | import de.knightsoftnet.validators.shared.beans.*; import java.util.*; import org.apache.commons.lang3.*; | [
"de.knightsoftnet.validators",
"java.util",
"org.apache.commons"
] | de.knightsoftnet.validators; java.util; org.apache.commons; | 1,475,833 |
public static boolean doesPatternListContainPerkPatterns(NBTTagList patterns)
{
for (int i = 0; i < patterns.size(); i++)
{
NBTTagCompound pattern = patterns.get(i);
String patternType = pattern.getString("Pattern");
//cbo = Curly border, bri = Bricks
... | static boolean function(NBTTagList patterns) { for (int i = 0; i < patterns.size(); i++) { NBTTagCompound pattern = patterns.get(i); String patternType = pattern.getString(STR); if ("cbo".equals(patternType) "bri".equals(patternType)) return true; } return false; } | /**
* Check if list of patterns contains patterns reserved for subscribers
* @param patterns NBTTagList containing string patterns
*/ | Check if list of patterns contains patterns reserved for subscribers | doesPatternListContainPerkPatterns | {
"repo_name": "CoreNetwork/Cornel",
"path": "Core/src/main/java/us/core_network/cornel/custom/PerksUtil.java",
"license": "mit",
"size": 5463
} | [
"net.minecraft.server.v1_8_R3.NBTTagCompound",
"net.minecraft.server.v1_8_R3.NBTTagList"
] | import net.minecraft.server.v1_8_R3.NBTTagCompound; import net.minecraft.server.v1_8_R3.NBTTagList; | import net.minecraft.server.*; | [
"net.minecraft.server"
] | net.minecraft.server; | 551,266 |
try {
return ImmutableSet.copyOf(session.getNamespacePrefixes()).contains(FCREPO4_TX_ID);
} catch (final RepositoryException e) {
throw new RepositoryRuntimeException(e);
}
} | try { return ImmutableSet.copyOf(session.getNamespacePrefixes()).contains(FCREPO4_TX_ID); } catch (final RepositoryException e) { throw new RepositoryRuntimeException(e); } } | /**
* Check if a session is possibly within a transaction
* @param session the session
* @return whether the session is possibly within a transaction
*/ | Check if a session is possibly within a transaction | isInTransaction | {
"repo_name": "mohideen/fcrepo4",
"path": "fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/TransactionServiceImpl.java",
"license": "apache-2.0",
"size": 7602
} | [
"com.google.common.collect.ImmutableSet",
"javax.jcr.RepositoryException",
"org.fcrepo.kernel.api.exception.RepositoryRuntimeException"
] | import com.google.common.collect.ImmutableSet; import javax.jcr.RepositoryException; import org.fcrepo.kernel.api.exception.RepositoryRuntimeException; | import com.google.common.collect.*; import javax.jcr.*; import org.fcrepo.kernel.api.exception.*; | [
"com.google.common",
"javax.jcr",
"org.fcrepo.kernel"
] | com.google.common; javax.jcr; org.fcrepo.kernel; | 2,398,105 |
protected PurchaseOrderVendorQuote populateAddressForPOVendorQuote(VendorDetail newVendor, String documentNumber) {
PurchaseOrderVendorQuote newPOVendorQuote = new PurchaseOrderVendorQuote();
newPOVendorQuote.setVendorName(newVendor.getVendorName());
newPOVendorQuote.setVendorHeaderGenera... | PurchaseOrderVendorQuote function(VendorDetail newVendor, String documentNumber) { PurchaseOrderVendorQuote newPOVendorQuote = new PurchaseOrderVendorQuote(); newPOVendorQuote.setVendorName(newVendor.getVendorName()); newPOVendorQuote.setVendorHeaderGeneratedIdentifier(newVendor.getVendorHeaderGeneratedIdentifier()); n... | /**
* Creates the new PurchaseOrderVendorQuote and populate the address fields for it.
*
* @param newVendor The VendorDetail object from which we obtain the values for the address fields.
* @param documentNumber The documentNumber of the PurchaseOrderDocument containing the PurchaseOrderVendorQu... | Creates the new PurchaseOrderVendorQuote and populate the address fields for it | populateAddressForPOVendorQuote | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/purap/document/service/impl/PurchaseOrderServiceImpl.java",
"license": "agpl-3.0",
"size": 129962
} | [
"org.kuali.kfs.module.purap.businessobject.PurchaseOrderVendorQuote",
"org.kuali.kfs.vnd.VendorConstants",
"org.kuali.kfs.vnd.businessobject.VendorAddress",
"org.kuali.kfs.vnd.businessobject.VendorDetail"
] | import org.kuali.kfs.module.purap.businessobject.PurchaseOrderVendorQuote; import org.kuali.kfs.vnd.VendorConstants; import org.kuali.kfs.vnd.businessobject.VendorAddress; import org.kuali.kfs.vnd.businessobject.VendorDetail; | import org.kuali.kfs.module.purap.businessobject.*; import org.kuali.kfs.vnd.*; import org.kuali.kfs.vnd.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 232,269 |
@Test
public void testConfiguration() throws Throwable {
assertNotNull("CF1 not found", connectionFactory1);
assertNotNull("AO1 not found", adminObject1);
} | void function() throws Throwable { assertNotNull(STR, connectionFactory1); assertNotNull(STR, adminObject1); } | /**
* Test configuration
*
* @throws Throwable Thrown if case of an error
*/ | Test configuration | testConfiguration | {
"repo_name": "xasx/wildfly",
"path": "testsuite/integration/smoke/src/test/java/org/jboss/as/test/smoke/deployment/rar/tests/earpackage/EarPackagedDeploymentTestCase.java",
"license": "lgpl-2.1",
"size": 5615
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 342,268 |
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
toolBarManager.add(new Separator("activitydiagram-settings"));
toolBarManager.add(new Separator("activitydiagram-additions"));
} | void function(IToolBarManager toolBarManager) { toolBarManager.add(new Separator(STR)); toolBarManager.add(new Separator(STR)); } | /**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds Separators for editor additions to the tool bar. | contributeToToolBar | {
"repo_name": "gemoc/activitydiagram",
"path": "dev/gemoc_sequential/language_workbench/org.gemoc.activitydiagram.sequential.xactivitydiagram.editor/src/org/gemoc/activitydiagram/sequential/xactivitydiagram/activitydiagram/presentation/ActivitydiagramActionBarContributor.java",
"license": "epl-1.0",
"size": 14... | [
"org.eclipse.jface.action.IToolBarManager",
"org.eclipse.jface.action.Separator"
] | import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.Separator; | import org.eclipse.jface.action.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,844,654 |
protected synchronized void markUnresponsiveTasks() throws IOException {
long now = System.currentTimeMillis();
for (TaskInProgress tip: runningTasks.values()) {
if (tip.getRunState() == TaskStatus.State.RUNNING ||
tip.getRunState() == TaskStatus.State.COMMIT_PENDING ||
tip.isCleanin... | synchronized void function() throws IOException { long now = System.currentTimeMillis(); for (TaskInProgress tip: runningTasks.values()) { if (tip.getRunState() == TaskStatus.State.RUNNING tip.getRunState() == TaskStatus.State.COMMIT_PENDING tip.isCleaningup()) { long jobTaskTimeout = tip.getTaskTimeout(); if (jobTaskT... | /**
* Kill any tasks that have not reported progress in the last X seconds.
*/ | Kill any tasks that have not reported progress in the last X seconds | markUnresponsiveTasks | {
"repo_name": "rvadali/fb-raid-refactoring",
"path": "src/mapred/org/apache/hadoop/mapred/TaskTracker.java",
"license": "apache-2.0",
"size": 135755
} | [
"java.io.IOException",
"org.apache.hadoop.util.ReflectionUtils"
] | import java.io.IOException; import org.apache.hadoop.util.ReflectionUtils; | import java.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,677,836 |
public ShareServiceSasSignatureValues setStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
} | ShareServiceSasSignatureValues function(OffsetDateTime startTime) { this.startTime = startTime; return this; } | /**
* Sets when the SAS will take effect.
*
* @param startTime When the SAS takes effect
* @return the updated FileServiceSasSignatureValues object
*/ | Sets when the SAS will take effect | setStartTime | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/sas/ShareServiceSasSignatureValues.java",
"license": "mit",
"size": 18695
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 717,303 |
public Observable<ServiceResponse<IPAddressAvailabilityResultInner>> checkIPAddressAvailabilityWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String ipAddress) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is req... | Observable<ServiceResponse<IPAddressAvailabilityResultInner>> function(String resourceGroupName, String virtualNetworkName, String ipAddress) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (virtualNetworkName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscri... | /**
* Checks whether a private IP address is available for use.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkName The name of the virtual network.
* @param ipAddress The private IP address to be verified.
* @throws IllegalArgumentException thrown if p... | Checks whether a private IP address is available for use | checkIPAddressAvailabilityWithServiceResponseAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworksInner.java",
"license": "mit",
"size": 98691
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 368,100 |
public static void writeString(String stringToWrite, DataOutputStream data) throws IOException {
if (stringToWrite.length() > 32767) {
throw new IOException("String too big");
} else {
data.writeShort(stringToWrite.length());
data.writeChars(stringToWrite);
... | static void function(String stringToWrite, DataOutputStream data) throws IOException { if (stringToWrite.length() > 32767) { throw new IOException(STR); } else { data.writeShort(stringToWrite.length()); data.writeChars(stringToWrite); } } | /**
* Writes a String to the DataOutputStream
*/ | Writes a String to the DataOutputStream | writeString | {
"repo_name": "SlimeVoid/SlimevoidLibrary",
"path": "src/main/java/net/slimevoid/library/util/helpers/NBTHelper.java",
"license": "lgpl-3.0",
"size": 3611
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,162,810 |
public boolean similar(Object other) {
try {
if (!(other instanceof JSONObject)) {
return false;
}
if (!this.keySet().equals(((JSONObject)other).keySet())) {
return false;
}
for (final Entry<String,?> entry : this.en... | boolean function(Object other) { try { if (!(other instanceof JSONObject)) { return false; } if (!this.keySet().equals(((JSONObject)other).keySet())) { return false; } for (final Entry<String,?> entry : this.entrySet()) { String name = entry.getKey(); Object valueThis = entry.getValue(); Object valueOther = ((JSONObjec... | /**
* Determine if two JSONObjects are similar.
* They must contain the same set of names which must be associated with
* similar values.
*
* @param other The other JSONObject
* @return true if they are equal
*/ | Determine if two JSONObjects are similar. They must contain the same set of names which must be associated with similar values | similar | {
"repo_name": "uav-team-ut/Manual-Recognition-Station",
"path": "src/org/json/JSONObject.java",
"license": "gpl-3.0",
"size": 80740
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,513,874 |
@Override
public Object getValue(ELContext env,
Object base,
Object property)
{
String var;
if (base == null && property instanceof String)
var = (String) property;
else if (base == this && property instanceof String)
var = (String) pr... | Object function(ELContext env, Object base, Object property) { String var; if (base == null && property instanceof String) var = (String) property; else if (base == this && property instanceof String) var = (String) property; else return null; ConfigProperties properties = Config.getConfigProperties(); if (properties =... | /**
* Returns the named variable value.
*/ | Returns the named variable value | getValue | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/config/ConfigPropertiesResolver.java",
"license": "gpl-2.0",
"size": 2832
} | [
"com.caucho.config.Config",
"javax.el.ELContext"
] | import com.caucho.config.Config; import javax.el.ELContext; | import com.caucho.config.*; import javax.el.*; | [
"com.caucho.config",
"javax.el"
] | com.caucho.config; javax.el; | 2,312,895 |
void setDefaultCollation(String uri) throws XPathException; | void setDefaultCollation(String uri) throws XPathException; | /**
* Set the default collation to be used by all operators and functions on strings.
* Throws an exception if the collation is unknown or cannot be instantiated.
*
* @param uri the collation URI
* @throws XPathException
*/ | Set the default collation to be used by all operators and functions on strings. Throws an exception if the collation is unknown or cannot be instantiated | setDefaultCollation | {
"repo_name": "hungerburg/exist",
"path": "src/org/exist/interpreter/Context.java",
"license": "lgpl-2.1",
"size": 26301
} | [
"org.exist.xquery.XPathException"
] | import org.exist.xquery.XPathException; | import org.exist.xquery.*; | [
"org.exist.xquery"
] | org.exist.xquery; | 1,373,573 |
List<HostPathogen> getHostPathogens();
| List<HostPathogen> getHostPathogens(); | /**
* Gets the hosts.
*
* @return the hosts
*/ | Gets the hosts | getHostPathogens | {
"repo_name": "AAFC-MBB/hpdb",
"path": "src/main/java/ca/gc/agr/mbb/hostpathogen/web/service/HostPathogenManager.java",
"license": "mit",
"size": 1506
} | [
"ca.gc.agr.mbb.hostpathogen.web.model.HostPathogen",
"java.util.List"
] | import ca.gc.agr.mbb.hostpathogen.web.model.HostPathogen; import java.util.List; | import ca.gc.agr.mbb.hostpathogen.web.model.*; import java.util.*; | [
"ca.gc.agr",
"java.util"
] | ca.gc.agr; java.util; | 863,735 |
@Override
public ExampleCodegenOperation fromOperation(final String path, final String httpMethod, final Operation operation, final Map<String, Model> definitions, final Swagger swagger) {
final ExampleCodegenOperation op = new ExampleCodegenOperation();
final Set<String> imports = new HashSet<String>();
... | ExampleCodegenOperation function(final String path, final String httpMethod, final Operation operation, final Map<String, Model> definitions, final Swagger swagger) { final ExampleCodegenOperation op = new ExampleCodegenOperation(); final Set<String> imports = new HashSet<String>(); op.vendorExtensions = operation.getV... | /**
* Convert Swagger Operation object to Codegen Operation object
*
* @param path the path of the operation
* @param httpMethod HTTP method
* @param operation Swagger operation object
* @param definitions a map of Swagger models
* @param swagger a Swagger object representing the spec
* @return... | Convert Swagger Operation object to Codegen Operation object | fromOperation | {
"repo_name": "thlaegler/swagger-example",
"path": "swagger-generator/src/main/xtend-gen/com/laegler/swagger/generator/ExampleServerMainCodegen.java",
"license": "apache-2.0",
"size": 31193
} | [
"com.google.common.base.Objects",
"com.laegler.swagger.generator.ExampleCodegenOperation",
"io.swagger.codegen.CodegenModel",
"io.swagger.codegen.CodegenParameter",
"io.swagger.codegen.CodegenProperty",
"io.swagger.codegen.CodegenResponse",
"io.swagger.codegen.examples.ExampleGenerator",
"io.swagger.m... | import com.google.common.base.Objects; import com.laegler.swagger.generator.ExampleCodegenOperation; import io.swagger.codegen.CodegenModel; import io.swagger.codegen.CodegenParameter; import io.swagger.codegen.CodegenProperty; import io.swagger.codegen.CodegenResponse; import io.swagger.codegen.examples.ExampleGenerat... | import com.google.common.base.*; import com.laegler.swagger.generator.*; import io.swagger.codegen.*; import io.swagger.codegen.examples.*; import io.swagger.models.*; import io.swagger.models.parameters.*; import io.swagger.models.properties.*; import java.util.*; | [
"com.google.common",
"com.laegler.swagger",
"io.swagger.codegen",
"io.swagger.models",
"java.util"
] | com.google.common; com.laegler.swagger; io.swagger.codegen; io.swagger.models; java.util; | 317,789 |
public void insertValidProcedureTime(Procedure procedure, ProcedureDescriptionFormat procedureDescriptionFormat,
String xmlDescription, DateTime validStartTime, Session session) {
ValidProcedureTime vpd = new ValidProcedureTime();
vpd.setProcedure(procedure);
vpd.setProcedureDesc... | void function(Procedure procedure, ProcedureDescriptionFormat procedureDescriptionFormat, String xmlDescription, DateTime validStartTime, Session session) { ValidProcedureTime vpd = new ValidProcedureTime(); vpd.setProcedure(procedure); vpd.setProcedureDescriptionFormat(procedureDescriptionFormat); vpd.setDescriptionXm... | /**
* Insert valid procedure time for procedrue
*
* @param procedure
* Procedure object
* @param xmlDescription
* Procedure XML description
* @param validStartTime
* Valid start time
* @param session
* Hibernate session
... | Insert valid procedure time for procedrue | insertValidProcedureTime | {
"repo_name": "USGS-CIDA/SOS",
"path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/ValidProcedureTimeDAO.java",
"license": "gpl-2.0",
"size": 9012
} | [
"org.hibernate.Session",
"org.joda.time.DateTime",
"org.n52.sos.ds.hibernate.entities.Procedure",
"org.n52.sos.ds.hibernate.entities.ProcedureDescriptionFormat",
"org.n52.sos.ds.hibernate.entities.ValidProcedureTime"
] | import org.hibernate.Session; import org.joda.time.DateTime; import org.n52.sos.ds.hibernate.entities.Procedure; import org.n52.sos.ds.hibernate.entities.ProcedureDescriptionFormat; import org.n52.sos.ds.hibernate.entities.ValidProcedureTime; | import org.hibernate.*; import org.joda.time.*; import org.n52.sos.ds.hibernate.entities.*; | [
"org.hibernate",
"org.joda.time",
"org.n52.sos"
] | org.hibernate; org.joda.time; org.n52.sos; | 347,707 |
private void renderSingleFieldConstraint(final RuleModeller modeller,
final DirtyableFlexTable inner,
final int row,
final SingleFieldConstraint constraint,
... | void function(final RuleModeller modeller, final DirtyableFlexTable inner, final int row, final SingleFieldConstraint constraint, boolean showBinding, final int tabs) { final int col = 1; inner.setWidget( row, 0, new HTML( STR ) ); if ( constraint.getConstraintValueType() != SingleFieldConstraint.TYPE_PREDICATE ) { Hor... | /**
* Applies a single field constraint to the given table, and start row.
*/ | Applies a single field constraint to the given table, and start row | renderSingleFieldConstraint | {
"repo_name": "Rikkola/guvnor",
"path": "guvnor-webapp/src/main/java/org/drools/guvnor/client/modeldriven/ui/FactPatternWidget.java",
"license": "apache-2.0",
"size": 31652
} | [
"com.google.gwt.user.client.ui.HorizontalPanel",
"org.drools.guvnor.client.common.DirtyableFlexTable",
"org.drools.ide.common.client.modeldriven.brl.SingleFieldConstraint",
"org.drools.ide.common.client.modeldriven.brl.SingleFieldConstraintEBLeftSide"
] | import com.google.gwt.user.client.ui.HorizontalPanel; import org.drools.guvnor.client.common.DirtyableFlexTable; import org.drools.ide.common.client.modeldriven.brl.SingleFieldConstraint; import org.drools.ide.common.client.modeldriven.brl.SingleFieldConstraintEBLeftSide; | import com.google.gwt.user.client.ui.*; import org.drools.guvnor.client.common.*; import org.drools.ide.common.client.modeldriven.brl.*; | [
"com.google.gwt",
"org.drools.guvnor",
"org.drools.ide"
] | com.google.gwt; org.drools.guvnor; org.drools.ide; | 1,765,298 |
public Map<String, String> getShaders() {
return getInternal("shaders");
}
| Map<String, String> function() { return getInternal(STR); } | /**
* Get the Map of shader file paths specified by the resource library
* @return
*/ | Get the Map of shader file paths specified by the resource library | getShaders | {
"repo_name": "bwyap/java-engine-lwjgl",
"path": "src/com/bwyap/engine/resource/JSONResourceLibrary.java",
"license": "mit",
"size": 2610
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,127,843 |
public boolean isElementLoaded(Class clazz, WebDriver driver, Element obj){
this.driver = driver;
this.clazz = clazz;
int count = 0;
//set the timeout for looking for an element to 1 second as we are doing a loop and then refreshing the elements
driver.manage().timeouts().implicitlyWait(1, TimeUni... | boolean function(Class clazz, WebDriver driver, Element obj){ this.driver = driver; this.clazz = clazz; int count = 0; driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS); try{ while(!obj.elementWired()){ if (count == this.timeout){ break; }else{ count++; initialize(); } } }catch( NullPointerException NoSuch... | /**
* This waits for a specified element on the page to be found on the page by the driver
* Uses the default test time out set by WebDriverSetup
*
* @param class the class calling this method - used so can initialize the page class repeatedly
* @param driver The webDriver
* @param obj The element ... | This waits for a specified element on the page to be found on the page by the driver Uses the default test time out set by WebDriverSetup | isElementLoaded | {
"repo_name": "JohnDoll/Toyota",
"path": "src/main/java/com/orasi/utils/PageLoaded.java",
"license": "apache-2.0",
"size": 7760
} | [
"com.orasi.core.interfaces.Element",
"java.util.concurrent.TimeUnit",
"org.openqa.selenium.NoSuchElementException",
"org.openqa.selenium.StaleElementReferenceException",
"org.openqa.selenium.WebDriver"
] | import com.orasi.core.interfaces.Element; import java.util.concurrent.TimeUnit; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebDriver; | import com.orasi.core.interfaces.*; import java.util.concurrent.*; import org.openqa.selenium.*; | [
"com.orasi.core",
"java.util",
"org.openqa.selenium"
] | com.orasi.core; java.util; org.openqa.selenium; | 1,715,452 |
public boolean onCustomKeyDown(final int keyCode, final KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_UP: {
if (mMessageViewFragment != null && mDisplayMode != DisplayMode.MESSAGE_LIST &&
K9.useVolumeKeysForNavigationEnabled()) {
... | boolean function(final int keyCode, final KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP: { if (mMessageViewFragment != null && mDisplayMode != DisplayMode.MESSAGE_LIST && K9.useVolumeKeysForNavigationEnabled()) { showPreviousMessage(); return true; } else if (mDisplayMode != DisplayMode.MESSAGE_V... | /**
* Handle hotkeys
*
* <p>
* This method is called by {@link #dispatchKeyEvent(KeyEvent)} before any view had the chance
* to consume this key event.
* </p>
*
* @param keyCode
* The value in {@code event.getKeyCode()}.
* @param event
* Description... | Handle hotkeys This method is called by <code>#dispatchKeyEvent(KeyEvent)</code> before any view had the chance to consume this key event. | onCustomKeyDown | {
"repo_name": "jca02266/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/activity/MessageList.java",
"license": "apache-2.0",
"size": 59590
} | [
"android.view.KeyEvent",
"android.widget.Toast"
] | import android.view.KeyEvent; import android.widget.Toast; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 177,344 |
@Override
public Answer remove(Serializable primaryKey)
throws NoSuchAnswerException, SystemException {
Session session = null;
try {
session = openSession();
Answer answer = (Answer)session.get(AnswerImpl.class, primaryKey);
if (answer == null) {
if (_log.isWarnEnabled()) {
_log.warn(_NO... | Answer function(Serializable primaryKey) throws NoSuchAnswerException, SystemException { Session session = null; try { session = openSession(); Answer answer = (Answer)session.get(AnswerImpl.class, primaryKey); if (answer == null) { if (_log.isWarnEnabled()) { _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); }... | /**
* Removes the Answer with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param primaryKey the primary key of the Answer
* @return the Answer that was removed
* @throws it.gebhard.qa.NoSuchAnswerException if a Answer with the primary key could not be found
* @throw... | Removes the Answer with the primary key from the database. Also notifies the appropriate model listeners | remove | {
"repo_name": "p-gebhard/QuickAnswer",
"path": "docroot/WEB-INF/src/it/gebhard/qa/service/persistence/AnswerPersistenceImpl.java",
"license": "gpl-3.0",
"size": 68481
} | [
"com.liferay.portal.kernel.dao.orm.Session",
"com.liferay.portal.kernel.exception.SystemException",
"it.gebhard.qa.NoSuchAnswerException",
"it.gebhard.qa.model.Answer",
"it.gebhard.qa.model.impl.AnswerImpl",
"java.io.Serializable"
] | import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import it.gebhard.qa.NoSuchAnswerException; import it.gebhard.qa.model.Answer; import it.gebhard.qa.model.impl.AnswerImpl; import java.io.Serializable; | import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import it.gebhard.qa.*; import it.gebhard.qa.model.*; import it.gebhard.qa.model.impl.*; import java.io.*; | [
"com.liferay.portal",
"it.gebhard.qa",
"java.io"
] | com.liferay.portal; it.gebhard.qa; java.io; | 1,513,857 |
public static <T extends Number> T getNumericalHeader(Map<String, ?> args, String header, boolean required,
Function<String, T> converter) throws RestServiceException {
// if getHeader() is no longer called, tests for this function have to be changed.
String value = getHeader(args, header, required);
... | static <T extends Number> T function(Map<String, ?> args, String header, boolean required, Function<String, T> converter) throws RestServiceException { String value = getHeader(args, header, required); if (value != null) { try { return converter.apply(value); } catch (NumberFormatException e) { throw new RestServiceExc... | /**
* Gets the value of a header as a {@link Number}, using the provided converter function to parse the string.
* @param args a map of arguments to be used to look for {@code header}.
* @param header the name of the header.
* @param required if {@code true}, {@link RestServiceException} will be thrown if {... | Gets the value of a header as a <code>Number</code>, using the provided converter function to parse the string | getNumericalHeader | {
"repo_name": "linkedin/ambry",
"path": "ambry-api/src/main/java/com/github/ambry/rest/RestUtils.java",
"license": "apache-2.0",
"size": 54119
} | [
"java.util.Map",
"java.util.function.Function"
] | import java.util.Map; import java.util.function.Function; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,995,252 |
private String normalizeBusinessPath(String url) {
if (url == null) {
return null;
}
if (url.startsWith("ROOT")) {
url = url.substring(4, url.length());
}
final List<String> tokens = new ArrayList<String>();
for (final StringTokenizer tokenizer... | String function(String url) { if (url == null) { return null; } if (url.startsWith("ROOT")) { url = url.substring(4, url.length()); } final List<String> tokens = new ArrayList<String>(); for (final StringTokenizer tokenizer = new StringTokenizer(url, "[]"); tokenizer.hasMoreTokens();) { final String token = tokenizer.n... | /**
* Remove ROOT, remove identity context entry or duplicate,
*
* @param url
* @return
*/ | Remove ROOT, remove identity context entry or duplicate | normalizeBusinessPath | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/presentation/course/nodes/info/InfoRunController.java",
"license": "apache-2.0",
"size": 11595
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.StringTokenizer"
] | import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,014,413 |
azure
.networks()
.manager()
.serviceClient()
.getNetworkInterfaceTapConfigurations()
.getWithResponse("testrg", "mynic", "tapconfiguration1", Context.NONE);
} | azure .networks() .manager() .serviceClient() .getNetworkInterfaceTapConfigurations() .getWithResponse(STR, "mynic", STR, Context.NONE); } | /**
* Sample code: Get Network Interface Tap Configurations.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/ | Sample code: Get Network Interface Tap Configurations | getNetworkInterfaceTapConfigurations | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/network/generated/NetworkInterfaceTapConfigurationsGetSamples.java",
"license": "mit",
"size": 1058
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,422,972 |
public static PendingIntent getDeeplink(Context context, Bundle extras) {
Intent intentModulesActivity = ModulesActivity.getIntent(context);
Intent intentChatRoomActivity = ChatRoomActivity.getIntent(context);
intentChatRoomActivity.putExtras(extras);
return TaskStackBuilder.create(c... | static PendingIntent function(Context context, Bundle extras) { Intent intentModulesActivity = ModulesActivity.getIntent(context); Intent intentChatRoomActivity = ChatRoomActivity.getIntent(context); intentChatRoomActivity.putExtras(extras); return TaskStackBuilder.create(context) .addNextIntent(intentModulesActivity) ... | /**
* Provides the deeplink for chat rooms activity.
*
* @param context The context to start the activity.
* @param extras The extras.
*/ | Provides the deeplink for chat rooms activity | getDeeplink | {
"repo_name": "mobgen/halo-android",
"path": "sdk-samples/halo-demo/src/main/java/com/mobgen/halo/android/app/ui/chat/ChatRoomActivity.java",
"license": "apache-2.0",
"size": 20643
} | [
"android.app.PendingIntent",
"android.content.Context",
"android.content.Intent",
"android.os.Bundle",
"android.support.v4.app.TaskStackBuilder",
"com.mobgen.halo.android.app.ui.modules.partial.ModulesActivity"
] | import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.TaskStackBuilder; import com.mobgen.halo.android.app.ui.modules.partial.ModulesActivity; | import android.app.*; import android.content.*; import android.os.*; import android.support.v4.app.*; import com.mobgen.halo.android.app.ui.modules.partial.*; | [
"android.app",
"android.content",
"android.os",
"android.support",
"com.mobgen.halo"
] | android.app; android.content; android.os; android.support; com.mobgen.halo; | 2,407,122 |
Element readElement() throws IOException; | Element readElement() throws IOException; | /**
* Reads the next element.
* @return The next element or {@code null} if there are no more
* elements.
* @throws IOException if reading fails.
* @throws IllegalStateException if the stream is closed.
*/ | Reads the next element | readElement | {
"repo_name": "smurn/jPLY",
"path": "jply/src/main/java/org/smurn/jply/ElementReader.java",
"license": "apache-2.0",
"size": 1723
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,243,460 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<String> listRefRegisteredOwnersAsync(String deviceId); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<String> listRefRegisteredOwnersAsync(String deviceId); | /**
* Get ref of registeredOwners from devices.
*
* @param deviceId key: id of device.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if the request is
* rejecte... | Get ref of registeredOwners from devices | listRefRegisteredOwnersAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DevicesClient.java",
"license": "mit",
"size": 81714
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 448,662 |
public static MoveParticipant[] loadMoveParticipants(
RefactoringStatus status,
RefactoringProcessor processor,
Object element,
MoveArguments arguments,
String[] affectedNatures,
SharableParticipants shared) {
return loadMoveParticipants(
status, processor, element, arg... | static MoveParticipant[] function( RefactoringStatus status, RefactoringProcessor processor, Object element, MoveArguments arguments, String[] affectedNatures, SharableParticipants shared) { return loadMoveParticipants( status, processor, element, arguments, null, affectedNatures, shared); } | /**
* Loads the move participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while loading the
* participants
* @param processor the processor that will own the participants
* @param element the element to be moved
* @param arguments the ... | Loads the move participants for the given element | loadMoveParticipants | {
"repo_name": "TypeFox/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/src/main/java/org/eclipse/ltk/core/refactoring/participants/ParticipantManager.java",
"license": "epl-1.0",
"size": 14511
} | [
"org.eclipse.ltk.core.refactoring.RefactoringStatus"
] | import org.eclipse.ltk.core.refactoring.RefactoringStatus; | import org.eclipse.ltk.core.refactoring.*; | [
"org.eclipse.ltk"
] | org.eclipse.ltk; | 409,055 |
public static IncrementExecutionHint getIncrementExecutionHint(
ICubeQueryDefinition basedQuery, ICubeQueryDefinition newQuery ) throws DataException
{
if ( basedQuery.getFilterOption( ) != newQuery.getFilterOption( ) )
{
return null;
}
if ( !isEqualMeasures( basedQuery.getMeasures( ),
new... | static IncrementExecutionHint function( ICubeQueryDefinition basedQuery, ICubeQueryDefinition newQuery ) throws DataException { if ( basedQuery.getFilterOption( ) != newQuery.getFilterOption( ) ) { return null; } if ( !isEqualMeasures( basedQuery.getMeasures( ), newQuery.getMeasures( ))) { return null; } if ( !isEqualM... | /**
* Returns hint info about how newQuery can be executed based on the execution
* result of basedQuery.
* @param basedQuery
* @param newQuery
* @return null if the execution result of basedQuery is useless for newQuery
*/ | Returns hint info about how newQuery can be executed based on the execution result of basedQuery | getIncrementExecutionHint | {
"repo_name": "Charling-Huang/birt",
"path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/olap/impl/query/CubeQueryDefinitionUtil.java",
"license": "epl-1.0",
"size": 20424
} | [
"org.eclipse.birt.data.engine.api.IBinding",
"org.eclipse.birt.data.engine.api.IFilterDefinition",
"org.eclipse.birt.data.engine.api.ISortDefinition",
"org.eclipse.birt.data.engine.core.DataException",
"org.eclipse.birt.data.engine.olap.api.query.ICubeQueryDefinition"
] | import org.eclipse.birt.data.engine.api.IBinding; import org.eclipse.birt.data.engine.api.IFilterDefinition; import org.eclipse.birt.data.engine.api.ISortDefinition; import org.eclipse.birt.data.engine.core.DataException; import org.eclipse.birt.data.engine.olap.api.query.ICubeQueryDefinition; | import org.eclipse.birt.data.engine.api.*; import org.eclipse.birt.data.engine.core.*; import org.eclipse.birt.data.engine.olap.api.query.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,490,843 |
public List<Set<Integer>> getAggregates() {
return C;
} | List<Set<Integer>> function() { return C; } | /**
* Gets the aggregates
*/ | Gets the aggregates | getAggregates | {
"repo_name": "jpalves/matrix-toolkits-java",
"path": "src/main/java/no/uib/cipr/matrix/sparse/AMG.java",
"license": "lgpl-3.0",
"size": 28593
} | [
"java.util.List",
"java.util.Set"
] | import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 25,111 |
public interface JoinFactory {
RelNode createJoin(RelNode left, RelNode right, RexNode condition,
Set<CorrelationId> variablesSet, JoinRelType joinType,
boolean semiJoinDone); | interface JoinFactory { RelNode function(RelNode left, RelNode right, RexNode condition, Set<CorrelationId> variablesSet, JoinRelType joinType, boolean semiJoinDone); | /**
* Creates a join.
*
* @param left Left input
* @param right Right input
* @param condition Join condition
* @param variablesSet Set of variables that are set by the
* LHS and used by the RHS and are not available to
* ... | Creates a join | createJoin | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rel/core/RelFactories.java",
"license": "apache-2.0",
"size": 23059
} | [
"java.util.Set",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rex.RexNode"
] | import java.util.Set; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rex.RexNode; | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rex.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 254,996 |
public void read(DataInputStream in) throws IOException {
if (in.readInt() != FILE_VERSION) {
}
//
// Read the list of names
//
String[] names = new String[in.readShort()];
for (int i = 0; i < names.length; i++) {
names[i] = in.readUTF();
... | void function(DataInputStream in) throws IOException { if (in.readInt() != FILE_VERSION) { } for (int i = 0; i < names.length; i++) { names[i] = in.readUTF(); } for (int i = 0; i < num; i++) { short nameId = in.readShort(); int type = in.readByte(); String name = in.readUTF(); defEntity(names[nameId], type GENERAL, nam... | /**
* Recreates a DTD from an archived format.
* @param in the <code>DataInputStream</code> to read from
* @throws IOException if an I/O error occurs
*/ | Recreates a DTD from an archived format | read | {
"repo_name": "md-5/jdk10",
"path": "src/java.desktop/share/classes/javax/swing/text/html/parser/DTD.java",
"license": "gpl-2.0",
"size": 18749
} | [
"java.io.DataInputStream",
"java.io.IOException"
] | import java.io.DataInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,799,577 |
private void checkNotNull(Object value, String attribute) throws InvalidRegistryObjectException, CoreException {
if (value == null) {
Object[] args= { getId(), fElement.getContributor().getName(), attribute };
String message= Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_illegal_attri... | void function(Object value, String attribute) throws InvalidRegistryObjectException, CoreException { if (value == null) { Object[] args= { getId(), fElement.getContributor().getName(), attribute }; String message= Messages.format(JavaTextMessages.CompletionProposalComputerDescriptor_illegal_attribute_message, args); IS... | /**
* Checks that the given attribute value is not <code>null</code>.
*
* @param value the object to check if not null
* @param attribute the attribute
* @throws InvalidRegistryObjectException if the registry element is no longer valid
* @throws CoreException if <code>value</code> is <code>null</code>
*/ | Checks that the given attribute value is not <code>null</code> | checkNotNull | {
"repo_name": "kumattau/JDTPatch",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/text/java/CompletionProposalComputerDescriptor.java",
"license": "epl-1.0",
"size": 21577
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IStatus",
"org.eclipse.core.runtime.InvalidRegistryObjectException",
"org.eclipse.core.runtime.Status",
"org.eclipse.jdt.internal.corext.util.Messages",
"org.eclipse.jdt.internal.ui.JavaPlugin"
] | import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.InvalidRegistryObjectException; import org.eclipse.core.runtime.Status; import org.eclipse.jdt.internal.corext.util.Messages; import org.eclipse.jdt.internal.ui.JavaPlugin; | import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclipse.jdt.internal.ui.*; | [
"org.eclipse.core",
"org.eclipse.jdt"
] | org.eclipse.core; org.eclipse.jdt; | 684,082 |
private void startSearch(SearchParameters params) {
// we already have a search resource?
if(searchResource != null) {
// the parameters are the same? don't search again
if(searchResource.getSearchParameters().equals(params))
return;
// abort the current query, being careful to not do this if we... | void function(SearchParameters params) { if(searchResource != null) { if(searchResource.getSearchParameters().equals(params)) return; synchronized(this) { searchResource.removeResourceEventListener(this); searchResource.abortQuery(); searchResource = null; } } manager.notifySearchStarting(); synchronized(this) { search... | /**
* Start a search on the given parameters
* If one already exists, it is cancelled (unless it's the same search)
* @param params
*/ | Start a search on the given parameters If one already exists, it is cancelled (unless it's the same search) | startSearch | {
"repo_name": "petebrew/tellervo",
"path": "src/main/java/org/tellervo/desktop/gui/dbbrowse/StaticSearchPanel.java",
"license": "gpl-3.0",
"size": 11359
} | [
"org.tellervo.desktop.wsi.tellervo.SearchParameters",
"org.tellervo.desktop.wsi.tellervo.resources.SeriesSearchResource"
] | import org.tellervo.desktop.wsi.tellervo.SearchParameters; import org.tellervo.desktop.wsi.tellervo.resources.SeriesSearchResource; | import org.tellervo.desktop.wsi.tellervo.*; import org.tellervo.desktop.wsi.tellervo.resources.*; | [
"org.tellervo.desktop"
] | org.tellervo.desktop; | 872,244 |
public List<MenuItem> layoutMenuItems(List<MenuItem> menuItems, int width) {
Preconditions.checkNotNull(menuItems);
// Reserve space for the "open overflow" button.
final int toolbarWidth = width - getEstimatedOpenOverflowButtonWidth(mContext);
int availableWidt... | List<MenuItem> function(List<MenuItem> menuItems, int width) { Preconditions.checkNotNull(menuItems); final int toolbarWidth = width - getEstimatedOpenOverflowButtonWidth(mContext); int availableWidth = toolbarWidth; final LinkedList<MenuItem> remainingMenuItems = new LinkedList<MenuItem>(menuItems); mContentView.remov... | /**
* Fits as many menu items in the main panel and returns a list of the menu items that
* were not fit in.
*
* @return The menu items that are not included in this main panel.
*/ | Fits as many menu items in the main panel and returns a list of the menu items that were not fit in | layoutMenuItems | {
"repo_name": "OmniEvo/android_frameworks_base",
"path": "core/java/com/android/internal/widget/FloatingToolbar.java",
"license": "gpl-3.0",
"size": 65171
} | [
"android.view.MenuItem",
"android.view.View",
"com.android.internal.util.Preconditions",
"java.util.LinkedList",
"java.util.List"
] | import android.view.MenuItem; import android.view.View; import com.android.internal.util.Preconditions; import java.util.LinkedList; import java.util.List; | import android.view.*; import com.android.internal.util.*; import java.util.*; | [
"android.view",
"com.android.internal",
"java.util"
] | android.view; com.android.internal; java.util; | 238,884 |
public WebFacesPartialResponseDescriptor removeChanges()
{
model.removeChildren("changes");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: WebFacesPartialResponseDescriptor ElementName: javaee:partia... | WebFacesPartialResponseDescriptor function() { model.removeChildren(STR); return this; } | /**
* Removes the <code>changes</code> element
* @return the current instance of <code>WebFacesPartialResponseDescriptor</code>
*/ | Removes the <code>changes</code> element | removeChanges | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facespartialresponse20/WebFacesPartialResponseDescriptorImpl.java",
"license": "epl-1.0",
"size": 8875
} | [
"org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.WebFacesPartialResponseDescriptor"
] | import org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.WebFacesPartialResponseDescriptor; | import org.jboss.shrinkwrap.descriptor.api.facespartialresponse20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,184,674 |
public Integer getPid() {
if (mPid != null) {
return mPid;
}
String cmd = mShell.findCommand("pidof");
if (cmd != null) {
Result result = mShell.execute(cmd + " '" + mProcess + "'");
String pids = result.getLine();
if (pids != null) {
try {
return In... | Integer function() { if (mPid != null) { return mPid; } String cmd = mShell.findCommand("pidof"); if (cmd != null) { Result result = mShell.execute(cmd + STR + mProcess + "'"); String pids = result.getLine(); if (pids != null) { try { return Integer.parseInt(oPatternSpaceSearch.split(pids.trim())[0]); } catch (Throwabl... | /**
* Get the pid of the current process.
* If you initialized this object using a process id, this method will return that id.
* Otherwise it will return the first found pid in /proc.
*/ | Get the pid of the current process. If you initialized this object using a process id, this method will return that id. Otherwise it will return the first found pid in /proc | getPid | {
"repo_name": "esironal/turbo-editor",
"path": "libraries/sharedCode/src/main/java/com/spazedog/lib/rootfw4/utils/Device.java",
"license": "gpl-3.0",
"size": 13080
} | [
"android.util.Log",
"com.spazedog.lib.rootfw4.Shell"
] | import android.util.Log; import com.spazedog.lib.rootfw4.Shell; | import android.util.*; import com.spazedog.lib.rootfw4.*; | [
"android.util",
"com.spazedog.lib"
] | android.util; com.spazedog.lib; | 1,932,524 |
// ////////////////////////////////////////////////////////////////////////////
// Split test
// ////////////////////////////////////////////////////////////////////////////
@Test
public void testBasicSplit() throws Exception {
byte[][] families = { fam1, fam2, fam3 };
Configuration hc = initSplit()... | void function() throws Exception { byte[][] families = { fam1, fam2, fam3 }; Configuration hc = initSplit(); String method = this.getName(); this.region = initHRegion(tableName, method, hc, families); try { LOG.info(STRSplitRow: STRMade 4 regions"); int interval = (LAST_CHAR - FIRST_CHAR) / 3; byte[] b = Bytes.toBytes(... | /**
* Splits twice and verifies getting from each of the split regions.
*
* @throws Exception
*/ | Splits twice and verifies getting from each of the split regions | testBasicSplit | {
"repo_name": "ibmsoe/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java",
"license": "apache-2.0",
"size": 222810
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 578,787 |
private SoyData convertResult(String s) {
return StringData.forValue(s);
} | SoyData function(String s) { return StringData.forValue(s); } | /**
* Private helper to convert a string result.
* @param s The string to convert.
*/ | Private helper to convert a string result | convertResult | {
"repo_name": "pomack/closure-templates",
"path": "java/src/com/google/template/soy/sharedpasses/render/EvalVisitor.java",
"license": "apache-2.0",
"size": 22278
} | [
"com.google.template.soy.data.SoyData",
"com.google.template.soy.data.restricted.StringData"
] | import com.google.template.soy.data.SoyData; import com.google.template.soy.data.restricted.StringData; | import com.google.template.soy.data.*; import com.google.template.soy.data.restricted.*; | [
"com.google.template"
] | com.google.template; | 1,052,918 |
private static long getLocalTimeBestResolution() {
if (getLocalTimeMethod != null) {
try {
return ((Long) getLocalTimeMethod.invoke(null, (Object[])null))
.longValue();
} catch (IllegalArgumentException e) {
// ignore - we fall through to currentTimeMillis()
} catch (IllegalAccessExce... | static long function() { if (getLocalTimeMethod != null) { try { return ((Long) getLocalTimeMethod.invoke(null, (Object[])null)) .longValue(); } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } } return System.currentTimeMillis(); } | /**
* Returns best-resolution representation of local time, using nanoTime() if
* available, otherwise defaulting to currentTimeMillis().
*/ | Returns best-resolution representation of local time, using nanoTime() if available, otherwise defaulting to currentTimeMillis() | getLocalTimeBestResolution | {
"repo_name": "suthat/signal",
"path": "vendor/mysql-connector-java-5.1.26/src/com/mysql/jdbc/LoadBalancingConnectionProxy.java",
"license": "apache-2.0",
"size": 34395
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,594,935 |
public void addFilePart(String fieldName, File uploadFile)
throws IOException {
String fileName = uploadFile.getName();
writer.append("--" + boundary).append(LINE_FEED);
writer.append("Content-Disposition: form-data; name=\"" + fieldName
... | void function(String fieldName, File uploadFile) throws IOException { String fileName = uploadFile.getName(); writer.append("--" + boundary).append(LINE_FEED); writer.append(STRSTR\STRSTR\STRContent-Type: STRContent-Transfer-Encoding: binary").append(LINE_FEED); writer.append(LINE_FEED); writer.flush(); FileInputStream... | /**
* Adds a upload file section to the request
* @param fieldName name attribute in <input type="file" name="..." />
* @param uploadFile a File to be uploaded
* @throws IOException
*/ | Adds a upload file section to the request | addFilePart | {
"repo_name": "esdc-esac-esa-int/gaia",
"path": "libs/java/tags/gaia-tapplus-access-lib-0.1_20161202/src/esac/archive/gacs/cl/tapclient/connection/ConnectionWrapper.java",
"license": "lgpl-3.0",
"size": 11250
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 389,551 |
@NonNull
public EmailBuilder setRequireName(boolean requireName) {
getParams().putBoolean(ExtraConstants.REQUIRE_NAME, requireName);
return this;
}
/**
* Enables email link sign in instead of password based sign in. Once enabl... | EmailBuilder function(boolean requireName) { getParams().putBoolean(ExtraConstants.REQUIRE_NAME, requireName); return this; } /** * Enables email link sign in instead of password based sign in. Once enabled, you must * pass a valid {@link ActionCodeSettings} object using * {@link #setActionCodeSettings(ActionCodeSettin... | /**
* Configures the requirement for the user to enter first and last name in the email
* sign up flow.
* <p>
* Name is required by default.
*/ | Configures the requirement for the user to enter first and last name in the email sign up flow. Name is required by default | setRequireName | {
"repo_name": "firebase/FirebaseUI-Android",
"path": "auth/src/main/java/com/firebase/ui/auth/AuthUI.java",
"license": "apache-2.0",
"size": 64657
} | [
"com.firebase.ui.auth.util.ExtraConstants",
"com.google.firebase.auth.ActionCodeSettings"
] | import com.firebase.ui.auth.util.ExtraConstants; import com.google.firebase.auth.ActionCodeSettings; | import com.firebase.ui.auth.util.*; import com.google.firebase.auth.*; | [
"com.firebase.ui",
"com.google.firebase"
] | com.firebase.ui; com.google.firebase; | 1,588,428 |
private static void afficheSol(Jeu jeu, ArrayList<Action> action){
System.out.println(jeu);
for(Action act : action){
try {
jeu.deplacement(act);
} catch (IndexOutOfBoundsException e) {
//On ne rentre jamais dans ce cas car les actions a réaliser sont possible
} catch (MauvaiseTouche e) {
... | static void function(Jeu jeu, ArrayList<Action> action){ System.out.println(jeu); for(Action act : action){ try { jeu.deplacement(act); } catch (IndexOutOfBoundsException e) { } catch (MauvaiseTouche e) { System.out.println(STR); } System.out.println(jeu); } } | /**
* Lecture de l'algorithme
* @return
* Retourne un algorithme correspondant a l'algorithme precise dans les parametres du lancement
*/ | Lecture de l'algorithme | afficheSol | {
"repo_name": "wissame95/IF06-Projet",
"path": "TaquinFinal/src/main/Main.java",
"license": "gpl-2.0",
"size": 10588
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,737,930 |
public synchronized void setTraceOutputFile(File traceOuputFile) {
if (traceOuputFile == null) {
return;
}
if (!this.traceOutputFile.equals(traceOuputFile) && traceWriter != null) {
try {
traceWriter.close();
FileWriter fstream = new Fi... | synchronized void function(File traceOuputFile) { if (traceOuputFile == null) { return; } if (!this.traceOutputFile.equals(traceOuputFile) && traceWriter != null) { try { traceWriter.close(); FileWriter fstream = new FileWriter(traceOutputFile); traceWriter = new BufferedWriter(fstream); } catch (Exception e) { } } thi... | /**
* Sets the file in which profiler traces are written
*
* @param traceOuputFile The file in which profiler traces are written
*/ | Sets the file in which profiler traces are written | setTraceOutputFile | {
"repo_name": "actility/ong",
"path": "gscl/util/src/main/java/com/actility/m2m/util/Profiler.java",
"license": "gpl-2.0",
"size": 4654
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,766,621 |
public void testCZIons() {
MascotDatfileInf lMascotDatfile = new MascotDatfile_Index(TestCaseLM.getFullFilePath("F010983.dat"));
//QQMENYPK
PeptideHit lPeptideHit = lMascotDatfile.getQueryToPeptideMap().getPeptideHitOfOneQuery(263, 1);
PeptideHitAnnotation lPeptideHitAnnotation = lPe... | void function() { MascotDatfileInf lMascotDatfile = new MascotDatfile_Index(TestCaseLM.getFullFilePath(STR)); PeptideHit lPeptideHit = lMascotDatfile.getQueryToPeptideMap().getPeptideHitOfOneQuery(263, 1); PeptideHitAnnotation lPeptideHitAnnotation = lPeptideHit.getPeptideHitAnnotation(lMascotDatfile.getMasses(), lMasc... | /**
* This method tests the calculation of the ions minus NH3.
*/ | This method tests the calculation of the ions minus NH3 | testCZIons | {
"repo_name": "compomics/mascotdatfile",
"path": "src/test/java/com/compomics/mascotdatfile/util/mascot/index/TestPeptideHitAnnotation.java",
"license": "apache-2.0",
"size": 38801
} | [
"com.compomics.mascotdatfile.util.interfaces.FragmentIon",
"com.compomics.mascotdatfile.util.interfaces.MascotDatfileInf",
"com.compomics.mascotdatfile.util.mascot.PeptideHit",
"com.compomics.mascotdatfile.util.mascot.PeptideHitAnnotation",
"com.compomics.util.junit.TestCaseLM",
"junit.framework.Assert"
] | import com.compomics.mascotdatfile.util.interfaces.FragmentIon; import com.compomics.mascotdatfile.util.interfaces.MascotDatfileInf; import com.compomics.mascotdatfile.util.mascot.PeptideHit; import com.compomics.mascotdatfile.util.mascot.PeptideHitAnnotation; import com.compomics.util.junit.TestCaseLM; import junit.fr... | import com.compomics.mascotdatfile.util.interfaces.*; import com.compomics.mascotdatfile.util.mascot.*; import com.compomics.util.junit.*; import junit.framework.*; | [
"com.compomics.mascotdatfile",
"com.compomics.util",
"junit.framework"
] | com.compomics.mascotdatfile; com.compomics.util; junit.framework; | 373,213 |
public Collection<MagicMatcher> getMatchers()
{
return this.matchers;
}
@Override
public void startDocument() throws SAXException { }
| Collection<MagicMatcher> function() { return this.matchers; } public void startDocument() throws SAXException { } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getMatchers | {
"repo_name": "venanciolm/afirma-ui-miniapplet_x_x",
"path": "afirma_ui_miniapplet/src/main/java/net/sf/jmimemagic/MagicParser.java",
"license": "mit",
"size": 15042
} | [
"java.util.Collection",
"org.xml.sax.SAXException"
] | import java.util.Collection; import org.xml.sax.SAXException; | import java.util.*; import org.xml.sax.*; | [
"java.util",
"org.xml.sax"
] | java.util; org.xml.sax; | 480,202 |
//-----------------------------------------------------------------------
private static boolean dateByMonth(
DateTimeFormatterBuilder bld,
Collection<DateTimeFieldType> fields,
boolean extended,
boolean strictISO) {
boolean reducedPrec = false;
... | static boolean function( DateTimeFormatterBuilder bld, Collection<DateTimeFieldType> fields, boolean extended, boolean strictISO) { boolean reducedPrec = false; if (fields.remove(DateTimeFieldType.year())) { bld.append(Constants.ye); if (fields.remove(DateTimeFieldType.monthOfYear())) { if (fields.remove(DateTimeFieldT... | /**
* Creates a date using the calendar date format.
* Specification reference: 5.2.1.
*
* @param bld the builder
* @param fields the fields
* @param extended true to use extended format
* @param strictISO true to only allow ISO formats
* @return true if reduced preci... | Creates a date using the calendar date format. Specification reference: 5.2.1 | dateByMonth | {
"repo_name": "wspeirs/sop4j-base",
"path": "src/main/java/com/sop4j/base/joda/time/format/ISODateTimeFormat.java",
"license": "apache-2.0",
"size": 72954
} | [
"com.sop4j.base.joda.time.DateTimeFieldType",
"java.util.Collection"
] | import com.sop4j.base.joda.time.DateTimeFieldType; import java.util.Collection; | import com.sop4j.base.joda.time.*; import java.util.*; | [
"com.sop4j.base",
"java.util"
] | com.sop4j.base; java.util; | 2,167,716 |
private InspectContainerCmd executeInspectContainerRequest(DockerClient client, Message message) {
LOGGER.debug("Executing Docker Inspect Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
ObjectHe... | InspectContainerCmd function(DockerClient client, Message message) { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); ObjectHelper.notNull(containerId, STR); InspectContainerCmd inspectContainerCmd = client.inspectContainerCmd(c... | /**
* Produce a inspect container request
*
* @param client
* @param message
* @return
*/ | Produce a inspect container request | executeInspectContainerRequest | {
"repo_name": "ramonmaruko/camel",
"path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java",
"license": "apache-2.0",
"size": 51680
} | [
"com.github.dockerjava.api.DockerClient",
"com.github.dockerjava.api.command.InspectContainerCmd",
"org.apache.camel.Message",
"org.apache.camel.component.docker.DockerConstants",
"org.apache.camel.component.docker.DockerHelper",
"org.apache.camel.util.ObjectHelper"
] | import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.InspectContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.util.ObjectHelper; | import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.util.*; | [
"com.github.dockerjava",
"org.apache.camel"
] | com.github.dockerjava; org.apache.camel; | 2,455,461 |
public List<Expression> resolveExpanding(List<Expression> expressions) {
final Function<List<Expression>, List<Expression>> resolveFunction =
concatenateRules(getExpandingResolverRules());
return resolveFunction.apply(expressions);
} | List<Expression> function(List<Expression> expressions) { final Function<List<Expression>, List<Expression>> resolveFunction = concatenateRules(getExpandingResolverRules()); return resolveFunction.apply(expressions); } | /**
* Resolves given expressions with configured set of rules. All expressions of an operation
* should be given at once as some rules might assume the order of expressions.
*
* <p>After this method is applied the returned expressions might contain unresolved expression
* that can be used for f... | Resolves given expressions with configured set of rules. All expressions of an operation should be given at once as some rules might assume the order of expressions. After this method is applied the returned expressions might contain unresolved expression that can be used for further API transformations | resolveExpanding | {
"repo_name": "xccui/flink",
"path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/ExpressionResolver.java",
"license": "apache-2.0",
"size": 20186
} | [
"java.util.List",
"java.util.function.Function",
"org.apache.flink.table.expressions.Expression"
] | import java.util.List; import java.util.function.Function; import org.apache.flink.table.expressions.Expression; | import java.util.*; import java.util.function.*; import org.apache.flink.table.expressions.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,224,929 |
synchronized void garbageCollect() {
// Let the JobTracker know that a job is complete
jobtracker.getInstrumentation(
).decWaiting(getJobID(), pendingMaps() + pendingReduces());
jobtracker.storeCompletedJob(this);
jobtracker.finalizeJob(this);
try {
// Definitely remove the lo... | synchronized void garbageCollect() { jobtracker.getInstrumentation( ).decWaiting(getJobID(), pendingMaps() + pendingReduces()); jobtracker.storeCompletedJob(this); jobtracker.finalizeJob(this); try { if (localJobFile != null) { localFs.delete(localJobFile, true); localJobFile = null; } if (localJarFile != null) { local... | /**
* The job is dead. We're now GC'ing it, getting rid of the job
* from all tables. Be sure to remove all of this job's tasks
* from the various tables.
*/ | The job is dead. We're now GC'ing it, getting rid of the job from all tables. Be sure to remove all of this job's tasks from the various tables | garbageCollect | {
"repo_name": "woggle/mesos-old",
"path": "frameworks/hadoop-0.20.2/src/mapred/org/apache/hadoop/mapred/JobInProgress.java",
"license": "apache-2.0",
"size": 93028
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 828,427 |
public void addChild(View child) {
enforceNotSealed();
final int childAccessibilityViewId = child.getAccessibilityViewId();
final int index = mChildAccessibilityIds.size();
mChildAccessibilityIds.put(index, childAccessibilityViewId);
} | void function(View child) { enforceNotSealed(); final int childAccessibilityViewId = child.getAccessibilityViewId(); final int index = mChildAccessibilityIds.size(); mChildAccessibilityIds.put(index, childAccessibilityViewId); } | /**
* Adds a child.
* <p>
* <strong>Note:</strong> Cannot be called from an
* {@link android.accessibilityservice.AccessibilityService}.
* This class is made immutable before being delivered to an AccessibilityService.
* </p>
*
* @param child The child.
*
* @throw... | Adds a child. Note: Cannot be called from an <code>android.accessibilityservice.AccessibilityService</code>. This class is made immutable before being delivered to an AccessibilityService. | addChild | {
"repo_name": "lynnlyc/for-honeynet-reviewers",
"path": "CallbackDroid/android-environment/src/base/core/java/android/view/accessibility/AccessibilityNodeInfo.java",
"license": "gpl-3.0",
"size": 36634
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,914,129 |
public void setPrimaryCalendarEdit(CalendarEventEdit edit)
{
m_primaryCalendarEdit = edit;
} | void function(CalendarEventEdit edit) { m_primaryCalendarEdit = edit; } | /**
* Get edit The edit object
*/ | Get edit The edit object | setPrimaryCalendarEdit | {
"repo_name": "harfalm/Sakai-10.1",
"path": "calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/tool/CalendarActionState.java",
"license": "apache-2.0",
"size": 14564
} | [
"org.sakaiproject.calendar.api.CalendarEventEdit"
] | import org.sakaiproject.calendar.api.CalendarEventEdit; | import org.sakaiproject.calendar.api.*; | [
"org.sakaiproject.calendar"
] | org.sakaiproject.calendar; | 119,364 |
void setDescription(@NotNull String description); | void setDescription(@NotNull String description); | /**
* Sets description which will be displayed on tooltip.
*
* @param description
* description which need set
*/ | Sets description which will be displayed on tooltip | setDescription | {
"repo_name": "bartlomiej-laczkowski/che",
"path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/tooltip/TooltipWidget.java",
"license": "epl-1.0",
"size": 1417
} | [
"javax.validation.constraints.NotNull"
] | import javax.validation.constraints.NotNull; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 1,798,092 |
public boolean haveNotesChanged() {
if ( changedNotes ) {
return true;
}
for ( int i = 0; i < nrNotes(); i++ ) {
NotePadMeta note = getNote( i );
if ( note.hasChanged() ) {
return true;
}
}
return false;
} | boolean function() { if ( changedNotes ) { return true; } for ( int i = 0; i < nrNotes(); i++ ) { NotePadMeta note = getNote( i ); if ( note.hasChanged() ) { return true; } } return false; } | /**
* Checks whether or not any of the notes have been changed.
*
* @return true if the notes have been changed, false otherwise
*/ | Checks whether or not any of the notes have been changed | haveNotesChanged | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 57127
} | [
"org.pentaho.di.core.NotePadMeta"
] | import org.pentaho.di.core.NotePadMeta; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,751,238 |
private DiscoverySpi getInjectedDiscoverySpi() {
try {
inject();
}
catch (IgniteCheckedException e) {
throw new IgniteException("Failed to init consistent ID.", e);
}
return getSpi();
} | DiscoverySpi function() { try { inject(); } catch (IgniteCheckedException e) { throw new IgniteException(STR, e); } return getSpi(); } | /**
* Performs injection of discovery SPI if needed, then provides DiscoverySpi SPI.
* Manual injection is required because normal startup of SPI is done after processor started.
*
* @return Wrapped DiscoverySpi SPI.
*/ | Performs injection of discovery SPI if needed, then provides DiscoverySpi SPI. Manual injection is required because normal startup of SPI is done after processor started | getInjectedDiscoverySpi | {
"repo_name": "ntikhonov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 113733
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.IgniteException",
"org.apache.ignite.spi.discovery.DiscoverySpi"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.IgniteException; import org.apache.ignite.spi.discovery.DiscoverySpi; | import org.apache.ignite.*; import org.apache.ignite.spi.discovery.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,783,888 |
public Observable<ServiceResponse<USqlTablePartition>> getTablePartitionWithServiceResponseAsync(String accountName, String databaseName, String schemaName, String tableName, String partitionName) {
if (accountName == null) {
throw new IllegalArgumentException("Parameter accountName is required ... | Observable<ServiceResponse<USqlTablePartition>> function(String accountName, String databaseName, String schemaName, String tableName, String partitionName) { if (accountName == null) { throw new IllegalArgumentException(STR); } if (this.client.adlaCatalogDnsSuffix() == null) { throw new IllegalArgumentException(STR); ... | /**
* Retrieves the specified table partition from the Data Lake Analytics catalog.
*
* @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations.
* @param databaseName The name of the database containing the partition.
* @param schemaName The name of the... | Retrieves the specified table partition from the Data Lake Analytics catalog | getTablePartitionWithServiceResponseAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/implementation/CatalogsImpl.java",
"license": "mit",
"size": 687714
} | [
"com.microsoft.azure.management.datalake.analytics.models.USqlTablePartition",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.management.datalake.analytics.models.USqlTablePartition; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 396,720 |
public String getRunResults() {
StringBuilder buf = new StringBuilder();
buf.append(this.getClass().getCanonicalName()).append(" Execution Results --").append(NEWLINE);
buf.append("Command: ").append(getCommandString()).append(NEWLINE);
buf.append("System Return Code: ").append(getRc... | String function() { StringBuilder buf = new StringBuilder(); buf.append(this.getClass().getCanonicalName()).append(STR).append(NEWLINE); buf.append(STR).append(getCommandString()).append(NEWLINE); buf.append(STR).append(getRc()).append(NEWLINE); buf.append(STR).append(getStartTime()).append(NEWLINE); buf.append(STR).ap... | /**
* Gets complete run results as a string.
*
* @return run results as string
*/ | Gets complete run results as a string | getRunResults | {
"repo_name": "learncenter2014/firstbitgold",
"path": "src/util/SimpleProcessRunner.java",
"license": "apache-2.0",
"size": 9264
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,271,786 |
@ApiModelProperty(example = "null", value = "")
public Double getCountyTaxAmount() {
return countyTaxAmount;
} | @ApiModelProperty(example = "null", value = "") Double function() { return countyTaxAmount; } | /**
* Get countyTaxAmount
* @return countyTaxAmount
**/ | Get countyTaxAmount | getCountyTaxAmount | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/UseTax.java",
"license": "apache-2.0",
"size": 9862
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,409,897 |
public void mouseReleased(MouseEvent e) {
this.pressLocation = 0;
}
public void mouseMoved(MouseEvent e){} | void function(MouseEvent e) { this.pressLocation = 0; } public void mouseMoved(MouseEvent e){} | /**
* Drops the thumb
*/ | Drops the thumb | mouseReleased | {
"repo_name": "boubre/BayouBot",
"path": "Workspace/src/codeblockutil/CGlassScrollPane.java",
"license": "mit",
"size": 21632
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,502,222 |
@Override
public Dimension getMinimumSize(){
return getPreferredSize();
}
| Dimension function(){ return getPreferredSize(); } | /**
* This function tells the minimum size of the panel
*/ | This function tells the minimum size of the panel | getMinimumSize | {
"repo_name": "statalign/statalign",
"path": "src/statalign/postprocess/gui/DistanceGUI.java",
"license": "gpl-3.0",
"size": 3979
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 123,656 |
public CurrencyAmount vega(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) {
ArgumentChecker.notNull(option, "option");
ArgumentChecker.notNull(marketData, "marketData");
ArgumentChecker.isTrue(marketData.checkCurrencies(option.getCurrency1(), option.getCurrency2()),
... | CurrencyAmount function(final ForexOptionVanilla option, final BlackForexSmileProviderInterface marketData) { ArgumentChecker.notNull(option, STR); ArgumentChecker.notNull(marketData, STR); ArgumentChecker.isTrue(marketData.checkCurrencies(option.getCurrency1(), option.getCurrency2()), STR); final MulticurveProviderInt... | /**
* Computes the vega (1st order sensitivity of the option present value to the implied vol).
*
* @param option
* the Forex option, not null
* @param marketData
* the curve and smile data, not null
* @return the vega in the domestic currency
*/ | Computes the vega (1st order sensitivity of the option present value to the implied vol) | vega | {
"repo_name": "McLeodMoores/starling",
"path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/forex/provider/ForexOptionVanillaBlackSmileMethod.java",
"license": "apache-2.0",
"size": 44308
} | [
"com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla",
"com.opengamma.analytics.financial.model.volatility.BlackFormulaRepository",
"com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface",
"com.opengamma.analytics.financial.provider.description.interes... | import com.opengamma.analytics.financial.forex.derivative.ForexOptionVanilla; import com.opengamma.analytics.financial.model.volatility.BlackFormulaRepository; import com.opengamma.analytics.financial.provider.description.forex.BlackForexSmileProviderInterface; import com.opengamma.analytics.financial.provider.descript... | import com.opengamma.analytics.financial.forex.derivative.*; import com.opengamma.analytics.financial.model.volatility.*; import com.opengamma.analytics.financial.provider.description.forex.*; import com.opengamma.analytics.financial.provider.description.interestrate.*; import com.opengamma.util.*; import com.opengamma... | [
"com.opengamma.analytics",
"com.opengamma.util"
] | com.opengamma.analytics; com.opengamma.util; | 1,061,628 |
public static CIDVerificationStatus fromAttribute(String attVal) {
if (attVal == null)
return null;
return CIDVerificationStatus.valueOf(attVal.toUpperCase());
}
}
private int statusCode = -1;
private CIDVerificationStatus cidVerificationStatus =
CIDVerificationStatus.OFF;
private Str... | static CIDVerificationStatus function(String attVal) { if (attVal == null) return null; return CIDVerificationStatus.valueOf(attVal.toUpperCase()); } } private int statusCode = -1; private CIDVerificationStatus cidVerificationStatus = CIDVerificationStatus.OFF; private String statusMessage; private URI canonicalID; pri... | /**
* Get enum value from {@code cid} or {@code ceid} attribute value.
*
* @param attVal The attribute value as it appears in the XRD. Can be
* {@code null}.
*
* @return Corresponding enumeration value, or {@code null} if the
* {@code attVal} is {@code null}.
*/ | Get enum value from cid or ceid attribute value | fromAttribute | {
"repo_name": "boylesoftware/tomcat7-openidauth",
"path": "tomcat7/src/main/java/com/boylesoftware/misc/xrds/XRD.java",
"license": "apache-2.0",
"size": 11858
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 718,981 |
public void setMessage(String message)
{
((JLabel)content).setText(message);
}
| void function(String message) { ((JLabel)content).setText(message); } | /**
* Subclass may be override to implement itself logic.
*
* @param message
* @see #createContent()
*/ | Subclass may be override to implement itself logic | setMessage | {
"repo_name": "JackJiang2011/Swing9patch",
"path": "src_all/Swing9patch/src/org/jb2011/swing9patch/toast/ToastPane.java",
"license": "apache-2.0",
"size": 2097
} | [
"javax.swing.JLabel"
] | import javax.swing.JLabel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,010,273 |
public JobTerminateOptions withOcpDate(DateTime ocpDate) {
if (ocpDate == null) {
this.ocpDate = null;
} else {
this.ocpDate = new DateTimeRfc1123(ocpDate);
}
return this;
} | JobTerminateOptions function(DateTime ocpDate) { if (ocpDate == null) { this.ocpDate = null; } else { this.ocpDate = new DateTimeRfc1123(ocpDate); } return this; } | /**
* Set the ocpDate value.
*
* @param ocpDate the ocpDate value to set
* @return the JobTerminateOptions object itself.
*/ | Set the ocpDate value | withOcpDate | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobTerminateOptions.java",
"license": "mit",
"size": 6837
} | [
"com.microsoft.rest.DateTimeRfc1123",
"org.joda.time.DateTime"
] | import com.microsoft.rest.DateTimeRfc1123; import org.joda.time.DateTime; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 1,685,868 |
protected DynamicResultSet getResultSet(PersistencePackage persistencePackage, InspectHelper helper,
Map<String, FieldMetadata> metadata) throws ServiceException {
String entityName = persistencePackage.getCeilingEntityFullyQualifiedClassname();
try {
if (helper instanceof Pe... | DynamicResultSet function(PersistencePackage persistencePackage, InspectHelper helper, Map<String, FieldMetadata> metadata) throws ServiceException { String entityName = persistencePackage.getCeilingEntityFullyQualifiedClassname(); try { if (helper instanceof PersistenceManager) { Class<?>[] entities = ((PersistenceMan... | /**
* This is a helper method that can be invoked as the last step in a custom inspect phase. It will assemble the
* appropriate DynamicResultSet from the given parameters.
*/ | This is a helper method that can be invoked as the last step in a custom inspect phase. It will assemble the appropriate DynamicResultSet from the given parameters | getResultSet | {
"repo_name": "sitexa/BroadleafCommerce",
"path": "admin/broadleaf-open-admin-platform/src/main/java/org/broadleafcommerce/openadmin/server/service/handler/CustomPersistenceHandlerAdapter.java",
"license": "apache-2.0",
"size": 5802
} | [
"java.util.HashMap",
"java.util.Map",
"org.broadleafcommerce.common.exception.ServiceException",
"org.broadleafcommerce.openadmin.dto.ClassMetadata",
"org.broadleafcommerce.openadmin.dto.DynamicResultSet",
"org.broadleafcommerce.openadmin.dto.FieldMetadata",
"org.broadleafcommerce.openadmin.dto.MergedPr... | import java.util.HashMap; import java.util.Map; import org.broadleafcommerce.common.exception.ServiceException; import org.broadleafcommerce.openadmin.dto.ClassMetadata; import org.broadleafcommerce.openadmin.dto.DynamicResultSet; import org.broadleafcommerce.openadmin.dto.FieldMetadata; import org.broadleafcommerce.op... | import java.util.*; import org.broadleafcommerce.common.exception.*; import org.broadleafcommerce.openadmin.dto.*; import org.broadleafcommerce.openadmin.server.service.persistence.*; import org.broadleafcommerce.openadmin.server.service.persistence.module.*; | [
"java.util",
"org.broadleafcommerce.common",
"org.broadleafcommerce.openadmin"
] | java.util; org.broadleafcommerce.common; org.broadleafcommerce.openadmin; | 1,266,010 |
@RequestMapping("/editItemInit")
private String editItemInit(@ModelAttribute ResourceItemForm resourceItemForm, HttpServletRequest request) {
SessionMap<String, Object> sessionMap = getSessionMap(request);
int itemIdx = NumberUtils.stringToInt(request.getParameter(ResourceConstants.PARAM_ITEM_INDEX), -1);
R... | @RequestMapping(STR) String function(@ModelAttribute ResourceItemForm resourceItemForm, HttpServletRequest request) { SessionMap<String, Object> sessionMap = getSessionMap(request); int itemIdx = NumberUtils.stringToInt(request.getParameter(ResourceConstants.PARAM_ITEM_INDEX), -1); ResourceItem item = null; if (itemIdx... | /**
* Display edit page for existed resource item.
*
* @param resourceItemForm
* @param request
* @return
*/ | Display edit page for existed resource item | editItemInit | {
"repo_name": "lamsfoundation/lams",
"path": "lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/controller/AuthoringController.java",
"license": "gpl-2.0",
"size": 26868
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.SortedSet",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.lang.math.NumberUtils",
"org.lamsfoundation.lams.tool.rsrc.ResourceConstants",
"org.lamsfoundation.lams.tool.rsrc.model.ResourceItem",
"org.lamsfoundation.lams.tool.rsrc.web.for... | import java.util.ArrayList; import java.util.List; import java.util.SortedSet; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.math.NumberUtils; import org.lamsfoundation.lams.tool.rsrc.ResourceConstants; import org.lamsfoundation.lams.tool.rsrc.model.ResourceItem; import org.lamsfoundation... | import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang.math.*; import org.lamsfoundation.lams.tool.rsrc.*; import org.lamsfoundation.lams.tool.rsrc.model.*; import org.lamsfoundation.lams.tool.rsrc.web.form.*; import org.lamsfoundation.lams.util.*; import org.lamsfoundation.lams.web.util.*; imp... | [
"java.util",
"javax.servlet",
"org.apache.commons",
"org.lamsfoundation.lams",
"org.springframework.web"
] | java.util; javax.servlet; org.apache.commons; org.lamsfoundation.lams; org.springframework.web; | 107,554 |
@Test
@Tag("slow")
@Tag("unstable")
public void testPEROLD() {
CuteNetlibCase.doTest("PEROLD.SIF", "1234567890", "1234567890", NumberContext.of(7, 4));
} | @Tag("slow") @Tag(STR) void function() { CuteNetlibCase.doTest(STR, STR, STR, NumberContext.of(7, 4)); } | /**
* <pre>
* 2019-02-13: Tagged as slow since too large for promotional/community version of CPLEX
* 2019-02-14: Tagged as unstable since ojAlgo takes too long or fails validation
* </pre>
*/ | <code> 2019-02-13: Tagged as slow since too large for promotional/community version of CPLEX 2019-02-14: Tagged as unstable since ojAlgo takes too long or fails validation </code> | testPEROLD | {
"repo_name": "optimatika/ojAlgo",
"path": "src/test/java/org/ojalgo/optimisation/linear/CuteNetlibCase.java",
"license": "mit",
"size": 42381
} | [
"org.junit.jupiter.api.Tag",
"org.ojalgo.type.context.NumberContext"
] | import org.junit.jupiter.api.Tag; import org.ojalgo.type.context.NumberContext; | import org.junit.jupiter.api.*; import org.ojalgo.type.context.*; | [
"org.junit.jupiter",
"org.ojalgo.type"
] | org.junit.jupiter; org.ojalgo.type; | 1,383,511 |
return GapicTestBase.createTestedConfigs(
MainGapicProviderFactory.NODEJS,
new String[] {"nodejs_gapic.yaml", "library_gapic.yaml"},
"library_pkg.yaml");
}
// Tests
// ===== | return GapicTestBase.createTestedConfigs( MainGapicProviderFactory.NODEJS, new String[] {STR, STR}, STR); } | /**
* Declares test parameters, each one an array of values passed to the constructor, with the
* first element a name, the second a config of this name.
*/ | Declares test parameters, each one an array of values passed to the constructor, with the first element a name, the second a config of this name | testedConfigs | {
"repo_name": "saicheems/toolkit",
"path": "src/test/java/com/google/api/codegen/NodeJSCodeGeneratorTest.java",
"license": "apache-2.0",
"size": 4231
} | [
"com.google.api.codegen.gapic.MainGapicProviderFactory"
] | import com.google.api.codegen.gapic.MainGapicProviderFactory; | import com.google.api.codegen.gapic.*; | [
"com.google.api"
] | com.google.api; | 2,208,919 |
@Override
public final @Nonnull S requireText(@Nullable String expected) {
driver().requireText(target(), expected);
return myself();
} | final @Nonnull S function(@Nullable String expected) { driver().requireText(target(), expected); return myself(); } | /**
* Asserts that the text of this fixture's {@link AbstractButton} matches the specified value.
*
* @param expected the text to match. It can be a regular expression.
* @return this fixture.
* @throws AssertionError if the text of the target {@code AbstractButton} does not match the given one.
*/ | Asserts that the text of this fixture's <code>AbstractButton</code> matches the specified value | requireText | {
"repo_name": "google/fest",
"path": "third_party/fest-swing/src/main/java/org/fest/swing/fixture/AbstractButtonFixture.java",
"license": "apache-2.0",
"size": 4405
} | [
"javax.annotation.Nonnull",
"javax.annotation.Nullable"
] | import javax.annotation.Nonnull; import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,963,777 |
public BigDecimal getA_Replace_Cost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Replace_Cost);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Replace_Cost); if (bd == null) return Env.ZERO; return bd; } | /** Get Asset Replace Cost.
@return Asset Replace Cost */ | Get Asset Replace Cost | getA_Replace_Cost | {
"repo_name": "sumairsh/adempiere",
"path": "base/src/org/compiere/model/X_A_Asset_Info_Ins.java",
"license": "gpl-2.0",
"size": 6654
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 811,119 |
public static Handle getBootstrap(UpdateExpression.Operator update) {
switch (update) {
case POST_DEC:
case PRE_DEC:
case POST_INC:
case PRE_INC:
return BOOTSTRAP;
default:
throw new UnsupportedOperationException(update.toString());
}
... | static Handle function(UpdateExpression.Operator update) { switch (update) { case POST_DEC: case PRE_DEC: case POST_INC: case PRE_INC: return BOOTSTRAP; default: throw new UnsupportedOperationException(update.toString()); } } | /**
* Returns the bootstrapping handle for the given update operator.
*
* @param update
* the update operator
* @return the bootstrapping handle
*/ | Returns the bootstrapping handle for the given update operator | getBootstrap | {
"repo_name": "anba/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/internal/Bootstrap.java",
"license": "mit",
"size": 98059
} | [
"com.github.anba.es6draft.ast.UpdateExpression",
"com.github.anba.es6draft.compiler.assembler.Handle"
] | import com.github.anba.es6draft.ast.UpdateExpression; import com.github.anba.es6draft.compiler.assembler.Handle; | import com.github.anba.es6draft.ast.*; import com.github.anba.es6draft.compiler.assembler.*; | [
"com.github.anba"
] | com.github.anba; | 363,995 |
String mapping = getInitParameter("mapping");
if (mapping != null) {
mappings = RecipientRewriteTableUtil.getXMLMappings(mapping);
}
} | String mapping = getInitParameter(STR); if (mapping != null) { mappings = RecipientRewriteTableUtil.getXMLMappings(mapping); } } | /**
* Initialize the mailet
*/ | Initialize the mailet | init | {
"repo_name": "imatin/James",
"path": "mailets/src/main/java/org/apache/james/transport/mailets/XMLRecipientRewriteTable.java",
"license": "apache-2.0",
"size": 4248
} | [
"org.apache.james.rrt.lib.RecipientRewriteTableUtil"
] | import org.apache.james.rrt.lib.RecipientRewriteTableUtil; | import org.apache.james.rrt.lib.*; | [
"org.apache.james"
] | org.apache.james; | 931,318 |
public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) {
if (adjacencySids == null) {
object.remove(ADJSIDS);
} else {
ArrayNode adjacencySidsNode = mapper.createArrayNode();
adjacencySids.forEach((sid, ports) -> {
... | SegmentRoutingDeviceConfig function(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJS... | /**
* Sets the adjacency SIDs of the router.
*
* @param adjacencySids adjacency SIDs of the router.
* @return the config of the router.
*/ | Sets the adjacency SIDs of the router | setAdjacencySids | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/config/SegmentRoutingDeviceConfig.java",
"license": "apache-2.0",
"size": 10641
} | [
"com.fasterxml.jackson.databind.node.ArrayNode",
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.util.Map",
"java.util.Set"
] | import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import java.util.Map; import java.util.Set; | import com.fasterxml.jackson.databind.node.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 2,773,961 |
public static final Shape renderConnectionRemovalIcon(OutputPort from, boolean enableTrashSymbol, final Graphics2D g2,
ProcessRendererModel model) {
// no icon when dragging is in progress
if (model.isDragStarted() || model.isImportDragged()) {
return null;
}
if (from == null) {
return null;
}
... | static final Shape function(OutputPort from, boolean enableTrashSymbol, final Graphics2D g2, ProcessRendererModel model) { if (model.isDragStarted() model.isImportDragged()) { return null; } if (from == null) { return null; } Port to = from.getDestination(); if (to == null) { return null; } Point2D fromPoint = ProcessD... | /**
* Renders a trash icon in the middle of a connection.
*
* @param from
* the port from which the connection starts
* @param enableTrashSymbol
* if {@code true} the black trash icon is used, otherwise the gray one
* @param g2
* the graphics for rendering
* @param mod... | Renders a trash icon in the middle of a connection | renderConnectionRemovalIcon | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/flow/processrendering/connections/ConnectionDrawUtils.java",
"license": "agpl-3.0",
"size": 5071
} | [
"com.rapidminer.gui.flow.processrendering.draw.ProcessDrawUtils",
"com.rapidminer.gui.flow.processrendering.draw.ProcessDrawer",
"com.rapidminer.gui.flow.processrendering.model.ProcessRendererModel",
"com.rapidminer.operator.ports.OutputPort",
"com.rapidminer.operator.ports.Port",
"java.awt.Color",
"jav... | import com.rapidminer.gui.flow.processrendering.draw.ProcessDrawUtils; import com.rapidminer.gui.flow.processrendering.draw.ProcessDrawer; import com.rapidminer.gui.flow.processrendering.model.ProcessRendererModel; import com.rapidminer.operator.ports.OutputPort; import com.rapidminer.operator.ports.Port; import java.a... | import com.rapidminer.gui.flow.processrendering.draw.*; import com.rapidminer.gui.flow.processrendering.model.*; import com.rapidminer.operator.ports.*; import java.awt.*; import java.awt.geom.*; | [
"com.rapidminer.gui",
"com.rapidminer.operator",
"java.awt"
] | com.rapidminer.gui; com.rapidminer.operator; java.awt; | 383,974 |
public boolean isImplementationDue(Page page)
{
int version = page.getVersion();
Integer implementedVersion = getImplementedVersion(page);
if(implementedVersion != null)
version = page.getVersion() == implementedVersion ? implementedVersion : implementedVersion + 1;
Date date = get... | boolean function(Page page) { int version = page.getVersion(); Integer implementedVersion = getImplementedVersion(page); if(implementedVersion != null) version = page.getVersion() == implementedVersion ? implementedVersion : implementedVersion + 1; Date date = getPageManager().getPageByVersion(page, version).getLastMod... | /**
* Verifies if the Specification has stayed to long in the WORKING state.
* @param page
* @return true if the Specification has stayed to long in the WORKING state.
*/ | Verifies if the Specification has stayed to long in the WORKING state | isImplementationDue | {
"repo_name": "strator-dev/greenpepper",
"path": "greenpepper-open/confluence3/greenpepper-confluence-code/src/main/java/com/greenpepper/confluence/velocity/ConfluenceGreenPepper.java",
"license": "apache-2.0",
"size": 33951
} | [
"com.atlassian.confluence.pages.Page",
"com.greenpepper.util.Period",
"java.util.Date"
] | import com.atlassian.confluence.pages.Page; import com.greenpepper.util.Period; import java.util.Date; | import com.atlassian.confluence.pages.*; import com.greenpepper.util.*; import java.util.*; | [
"com.atlassian.confluence",
"com.greenpepper.util",
"java.util"
] | com.atlassian.confluence; com.greenpepper.util; java.util; | 781,940 |
public int getSourceActions(JComponent c) {
return COPY;
} | int function(JComponent c) { return COPY; } | /**
* Returns the type of action at the source component.
*/ | Returns the type of action at the source component | getSourceActions | {
"repo_name": "araqne/hannanum",
"path": "jhannanum/src/main/java/kr/ac/kaist/swrc/jhannanum/demo/GUIDemo.java",
"license": "gpl-3.0",
"size": 37795
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,285,049 |
@Test
public void testSerializeEmployee() {
String fileName = getOutputFileName(BASEDIR, OUTPUT_FILE);
Employee employee1 = newEmployee("John", "Doe", "1.1.2000", "male", "salesperson", 2500.0f);
Employee employee2 = newEmployee("Jane", "Doe", "2.2.1999", "female", "salesperson", 2000.... | void function() { String fileName = getOutputFileName(BASEDIR, OUTPUT_FILE); Employee employee1 = newEmployee("John", "Doe", STR, "male", STR, 2500.0f); Employee employee2 = newEmployee("Jane", "Doe", STR, STR, STR, 2000.0f); Company company = newCompany(STR, employee1, employee2); Company copy = null; try { serializer... | /**
* Tests the serialization of an employee entity (i.e. the root node possesses several
* class members).
*/ | Tests the serialization of an employee entity (i.e. the root node possesses several class members) | testSerializeEmployee | {
"repo_name": "gammalgris/jmul",
"path": "Utilities/Persistence-Tests/src/test/jmul/persistence/scenarios/scenario007/Scenario007SerializationTest.java",
"license": "gpl-3.0",
"size": 6471
} | [
"java.io.IOException",
"org.junit.Assert"
] | import java.io.IOException; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 849,686 |
@Test
public void replacedByInValid() throws Exception {
Assume.assumeTrue(TckPublisher.isEnabled());
Assume.assumeTrue(TckPublisher.isValueSetAPIEnabled());
logger.info("ReplacedByInValid");
try {
TModel tm = new TM... | void function() throws Exception { Assume.assumeTrue(TckPublisher.isEnabled()); Assume.assumeTrue(TckPublisher.isValueSetAPIEnabled()); logger.info(STR); try { TModel tm = new TModel(); tm.setName(new Name(STR, "en")); tm.getDescription().add(new Description(STR, "en")); tm.setCategoryBag(new CategoryBag()); tm.getCate... | /**
* reference undefined tmodel
*
* @throws Exception
*/ | reference undefined tmodel | replacedByInValid | {
"repo_name": "apache/juddi",
"path": "uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_170_ValueSetValidationIntegrationTest.java",
"license": "apache-2.0",
"size": 56850
} | [
"org.apache.juddi.v3.client.UDDIConstants",
"org.junit.Assume",
"org.uddi.api_v3.CategoryBag",
"org.uddi.api_v3.Description",
"org.uddi.api_v3.KeyedReference",
"org.uddi.api_v3.Name",
"org.uddi.api_v3.TModel"
] | import org.apache.juddi.v3.client.UDDIConstants; import org.junit.Assume; import org.uddi.api_v3.CategoryBag; import org.uddi.api_v3.Description; import org.uddi.api_v3.KeyedReference; import org.uddi.api_v3.Name; import org.uddi.api_v3.TModel; | import org.apache.juddi.v3.client.*; import org.junit.*; import org.uddi.api_v3.*; | [
"org.apache.juddi",
"org.junit",
"org.uddi.api_v3"
] | org.apache.juddi; org.junit; org.uddi.api_v3; | 2,179,238 |
// NEXT_MAJOR_VER: remove 'throws Exception'
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
} | Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception { super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); return this; } | /**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/ | Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods | applyToAllUnaryMethods | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/InterconnectLocationStubSettings.java",
"license": "apache-2.0",
"size": 17056
} | [
"com.google.api.core.ApiFunction",
"com.google.api.gax.rpc.UnaryCallSettings"
] | import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings; | import com.google.api.core.*; import com.google.api.gax.rpc.*; | [
"com.google.api"
] | com.google.api; | 1,193,816 |
Location locationGrandParent = new Location();
Location locationParent = new Location();
Location locationChild = new Location();
locationGrandParent.addChildLocation(locationParent);
locationParent.addChildLocation(locationChild);
assertTrue(Location.isInHierarchy(locationChild, locationParent... | Location locationGrandParent = new Location(); Location locationParent = new Location(); Location locationChild = new Location(); locationGrandParent.addChildLocation(locationParent); locationParent.addChildLocation(locationChild); assertTrue(Location.isInHierarchy(locationChild, locationParent)); assertTrue(Location.i... | /**
* Get locations that have any of specified set of tags among its child tags.
*
* @see {@link Location#isInHierarchy(Location,Location)}
*/ | Get locations that have any of specified set of tags among its child tags | isInHierarchy_shouldShouldFindLocationInHierarchy | {
"repo_name": "Bhamni/openmrs-core",
"path": "api/src/test/java/org/openmrs/LocationTest.java",
"license": "mpl-2.0",
"size": 1492
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,738,722 |
public UserRow[] getAllUsers() throws AdminPersistenceException {
List<UserRow> rows = getRows(SELECT_ALL_USERS);
return rows.toArray(new UserRow[rows.size()]);
}
static final private String SELECT_ALL_USERS = "select " + USER_COLUMNS
+ " from ST_User where accessLevel <> 'R' order by lastName"; | UserRow[] function() throws AdminPersistenceException { List<UserRow> rows = getRows(SELECT_ALL_USERS); return rows.toArray(new UserRow[rows.size()]); } static final private String SELECT_ALL_USERS = STR + USER_COLUMNS + STR; | /**
* Returns all the Users.
* @return
* @throws AdminPersistenceException
*/ | Returns all the Users | getAllUsers | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "lib-core/src/main/java/com/stratelia/webactiv/organization/UserTable.java",
"license": "agpl-3.0",
"size": 27597
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,417,078 |
public RSAOtherPrimeInfo[] getOtherPrimeInfo(); | RSAOtherPrimeInfo[] function(); | /**
* Returns the otherPrimeInfo or null if there are only
* two prime factors (p and q).
*
* @return the otherPrimeInfo.
*/ | Returns the otherPrimeInfo or null if there are only two prime factors (p and q) | getOtherPrimeInfo | {
"repo_name": "JetBrains/jdk8u_jdk",
"path": "src/share/classes/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java",
"license": "gpl-2.0",
"size": 3016
} | [
"java.security.spec.RSAOtherPrimeInfo"
] | import java.security.spec.RSAOtherPrimeInfo; | import java.security.spec.*; | [
"java.security"
] | java.security; | 1,066,526 |
public String getDescription() {
if(fullDescription == null) {
if(description == null || isExtensionListInDescription()) {
fullDescription = description==null ? "(" : description + " (";
// build the description from the extension list
Enumeration extensions = filters.keys();
if(extensions != null) {... | String function() { if(fullDescription == null) { if(description == null isExtensionListInDescription()) { fullDescription = description==null ? "(" : description + STR; Enumeration extensions = filters.keys(); if(extensions != null) { fullDescription += "." + (String) extensions.nextElement(); while (extensions.hasMor... | /**
* Returns the human readable description of this filter. For
* example: "JPEG and GIF Image Files (*.jpg, *.gif)"
*
* @see setDescription
* @see setExtensionListInDescription
* @see isExtensionListInDescription
* @see FileFilter#getDescription
*/ | Returns the human readable description of this filter. For example: "JPEG and GIF Image Files (*.jpg, *.gif)" | getDescription | {
"repo_name": "BayCEER/goat",
"path": "src/main/java/de/unibayreuth/bayeos/utils/DefaultFileFilter.java",
"license": "gpl-2.0",
"size": 7355
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,597,189 |
public static <T> T defaulted(T value, T defaultValue) {
return value!=null ? value : defaultValue;
}
/**
* Prints a stack trace from an exception into a readable form.
* Unlike {@link Throwable#printStackTrace(PrintWriter)}, this implementation follows the suggestion of JDK-6507809
... | static <T> T function(T value, T defaultValue) { return value!=null ? value : defaultValue; } /** * Prints a stack trace from an exception into a readable form. * Unlike {@link Throwable#printStackTrace(PrintWriter)}, this implementation follows the suggestion of JDK-6507809 * to produce a linear trace even when {@link... | /**
* If the value exists, return that value. Otherwise return the default value.
* <p>
* Starting 1.294, JEXL supports the elvis operator "x?:y" that supersedes this.
*
* @since 1.150
*/ | If the value exists, return that value. Otherwise return the default value. Starting 1.294, JEXL supports the elvis operator "x?:y" that supersedes this | defaulted | {
"repo_name": "ajshastri/jenkins",
"path": "core/src/main/java/hudson/Functions.java",
"license": "mit",
"size": 74762
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 142,974 |
int getColumnIndex(Column col); | int getColumnIndex(Column col); | /**
* Get the index of a column in the list of index columns
*
* @param col the column
* @return the index (0 meaning first column)
*/ | Get the index of a column in the list of index columns | getColumnIndex | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/index/Index.java",
"license": "mpl-2.0",
"size": 6737
} | [
"org.h2.table.Column"
] | import org.h2.table.Column; | import org.h2.table.*; | [
"org.h2.table"
] | org.h2.table; | 2,614,797 |
private synchronized void usersRoomAction(String room, String user, int action) {
switch (action) {
case ACTION_ADD_ROOM_TO_USER:
if (!usersRooms.keySet().contains(user)) {
List<String> userRoomList = new ArrayList<String>();
userRoomList.add(room);
... | synchronized void function(String room, String user, int action) { switch (action) { case ACTION_ADD_ROOM_TO_USER: if (!usersRooms.keySet().contains(user)) { List<String> userRoomList = new ArrayList<String>(); userRoomList.add(room); usersRooms.put(user, userRoomList); } else { List<String> userRoomList = usersRooms.g... | /**
* Synchronized users room actions
*/ | Synchronized users room actions | usersRoomAction | {
"repo_name": "codelibs/n2dms",
"path": "src/main/java/com/openkm/core/ChatManager.java",
"license": "gpl-2.0",
"size": 12089
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,773,491 |
public BrokerID getId() {
return mId;
}
}
@ClassVersion("$Id: BrokerManager.java 16154 2012-07-14 16:34:05Z colin $")
public final static class BrokerLabelProvider extends LabelProvider {
| BrokerID function() { return mId; } } @ClassVersion(STR) public final static class BrokerLabelProvider extends LabelProvider { | /**
* Returns the broker id.
*
* @return the broker id
*/ | Returns the broker id | getId | {
"repo_name": "nagyist/marketcetera",
"path": "photon/photon/plugins/org.marketcetera.photon/src/main/java/org/marketcetera/photon/BrokerManager.java",
"license": "apache-2.0",
"size": 5542
} | [
"org.eclipse.jface.viewers.LabelProvider",
"org.marketcetera.trade.BrokerID",
"org.marketcetera.util.misc.ClassVersion"
] | import org.eclipse.jface.viewers.LabelProvider; import org.marketcetera.trade.BrokerID; import org.marketcetera.util.misc.ClassVersion; | import org.eclipse.jface.viewers.*; import org.marketcetera.trade.*; import org.marketcetera.util.misc.*; | [
"org.eclipse.jface",
"org.marketcetera.trade",
"org.marketcetera.util"
] | org.eclipse.jface; org.marketcetera.trade; org.marketcetera.util; | 569,275 |
public void eInit(XtendTypeDeclaration container, String name, IJvmTypeProvider context) {
this.builder.eInit(container, name, context);
} | void function(XtendTypeDeclaration container, String name, IJvmTypeProvider context) { this.builder.eInit(container, name, context); } | /** Initialize the Ecore element when inner type declaration.
*/ | Initialize the Ecore element when inner type declaration | eInit | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlClassSourceAppender.java",
"license": "apache-2.0",
"size": 7328
} | [
"org.eclipse.xtend.core.xtend.XtendTypeDeclaration",
"org.eclipse.xtext.common.types.access.IJvmTypeProvider"
] | import org.eclipse.xtend.core.xtend.XtendTypeDeclaration; import org.eclipse.xtext.common.types.access.IJvmTypeProvider; | import org.eclipse.xtend.core.xtend.*; import org.eclipse.xtext.common.types.access.*; | [
"org.eclipse.xtend",
"org.eclipse.xtext"
] | org.eclipse.xtend; org.eclipse.xtext; | 21,711 |
public void ternaryOperations(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap)
throws DMLUnsupportedOperationException, DMLRuntimeException
{
ternaryOperations(op, thatVal, that2Val, resultMap, null);
}
| void function(Operator op, MatrixValue thatVal, MatrixValue that2Val, CTableMap resultMap) throws DMLUnsupportedOperationException, DMLRuntimeException { ternaryOperations(op, thatVal, that2Val, resultMap, null); } | /**
* D = ctable(A,B,W)
* this <- A; that <- B; that2 <- W; result <- D
*
* (i1,j1,v1) from input1 (this)
* (i1,j1,v2) from input2 (that)
* (i1,j1,w) from input3 (that2)
*/ | D = ctable(A,B,W) this <- A; that <- B; that2 <- W; result <- D (i1,j1,v1) from input1 (this) (i1,j1,v2) from input2 (that) (i1,j1,w) from input3 (that2) | ternaryOperations | {
"repo_name": "Myasuka/systemml",
"path": "system-ml/src/main/java/com/ibm/bi/dml/runtime/matrix/data/MatrixBlock.java",
"license": "apache-2.0",
"size": 175793
} | [
"com.ibm.bi.dml.runtime.DMLRuntimeException",
"com.ibm.bi.dml.runtime.DMLUnsupportedOperationException",
"com.ibm.bi.dml.runtime.matrix.operators.Operator"
] | import com.ibm.bi.dml.runtime.DMLRuntimeException; import com.ibm.bi.dml.runtime.DMLUnsupportedOperationException; import com.ibm.bi.dml.runtime.matrix.operators.Operator; | import com.ibm.bi.dml.runtime.*; import com.ibm.bi.dml.runtime.matrix.operators.*; | [
"com.ibm.bi"
] | com.ibm.bi; | 2,040,240 |
public byte[] getBytes() throws IOException, CanonicalizationException {
byte[] inputBytes = getBytesFromInputStream();
if (inputBytes != null) {
return inputBytes;
}
Canonicalizer20010315OmitComments c14nizer = new Canonicalizer20010315OmitComments();
try (ByteAr... | byte[] function() throws IOException, CanonicalizationException { byte[] inputBytes = getBytesFromInputStream(); if (inputBytes != null) { return inputBytes; } Canonicalizer20010315OmitComments c14nizer = new Canonicalizer20010315OmitComments(); try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { c14nizer.... | /**
* Returns the byte array from input which was specified as the parameter of
* {@link XMLSignatureInput} constructor
*
* @return the byte[] from input which was specified as the parameter of
* {@link XMLSignatureInput} constructor
*
* @throws CanonicalizationException
* @throw... | Returns the byte array from input which was specified as the parameter of <code>XMLSignatureInput</code> constructor | getBytes | {
"repo_name": "apache/santuario-java",
"path": "src/main/java/org/apache/xml/security/signature/XMLSignatureInput.java",
"license": "apache-2.0",
"size": 17375
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"org.apache.xml.security.c14n.CanonicalizationException",
"org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import org.apache.xml.security.c14n.CanonicalizationException; import org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments; | import java.io.*; import org.apache.xml.security.c14n.*; import org.apache.xml.security.c14n.implementations.*; | [
"java.io",
"org.apache.xml"
] | java.io; org.apache.xml; | 1,423,751 |
public static <K, V> MapAssert<K, V> assertThat(Map<K, V> actual) {
return AssertionsForInterfaceTypes.assertThat(actual);
} | static <K, V> MapAssert<K, V> function(Map<K, V> actual) { return AssertionsForInterfaceTypes.assertThat(actual); } | /**
* Creates a new instance of <code>{@link MapAssert}</code>.
* <p>
* Returned type is {@link MapAssert} as it overrides method to annotate them with {@link SafeVarargs} avoiding
* annoying warnings.
*
* @param <K> the type of keys in the map.
* @param <V> the type of values in the map.
* @par... | Creates a new instance of <code><code>MapAssert</code></code>. Returned type is <code>MapAssert</code> as it overrides method to annotate them with <code>SafeVarargs</code> avoiding annoying warnings | assertThat | {
"repo_name": "xasx/assertj-core",
"path": "src/main/java/org/assertj/core/api/Assertions.java",
"license": "apache-2.0",
"size": 123012
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,081,966 |
public void addSource(InputFile file) {
units.add(GenerationUnit.newSingleFileUnit(file));
} | void function(InputFile file) { units.add(GenerationUnit.newSingleFileUnit(file)); } | /**
* Adds the given InputFile to this GenerationBatch,
* creating GenerationUnits and inferring unit names/output paths as necessary.
*/ | Adds the given InputFile to this GenerationBatch, creating GenerationUnits and inferring unit names/output paths as necessary | addSource | {
"repo_name": "halfhp/j2objc",
"path": "translator/src/main/java/com/google/devtools/j2objc/GenerationBatch.java",
"license": "apache-2.0",
"size": 5880
} | [
"com.google.devtools.j2objc.file.InputFile",
"com.google.devtools.j2objc.gen.GenerationUnit"
] | import com.google.devtools.j2objc.file.InputFile; import com.google.devtools.j2objc.gen.GenerationUnit; | import com.google.devtools.j2objc.file.*; import com.google.devtools.j2objc.gen.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,669,736 |
private URLSpan getPressedSpan(TextView widget, Spannable spannable, MotionEvent event) {
int x = Math.round(event.getX());
int y = Math.round(event.getY());
x -= widget.getTotalPaddingLeft();
y -= widget.getTotalPaddingTop();
x += widget.getScrollX();
y += widget.g... | URLSpan function(TextView widget, Spannable spannable, MotionEvent event) { int x = Math.round(event.getX()); int y = Math.round(event.getY()); x -= widget.getTotalPaddingLeft(); y -= widget.getTotalPaddingTop(); x += widget.getScrollX(); y += widget.getScrollY(); Layout layout = widget.getLayout(); int line = layout.g... | /**
* Find the span that was clicked
*
* @param widget view the user clicked
* @param spannable spannable string inside the clicked view
* @param event motion event that occurred
* @return the touchable span that was pressed
*/ | Find the span that was clicked | getPressedSpan | {
"repo_name": "ram-on/SkyTube",
"path": "app/src/main/java/free/rm/skytube/gui/businessobjects/views/TouchableMovementMethod.java",
"license": "gpl-3.0",
"size": 6083
} | [
"android.text.Layout",
"android.text.Spannable",
"android.text.style.URLSpan",
"android.view.MotionEvent",
"android.widget.TextView"
] | import android.text.Layout; import android.text.Spannable; import android.text.style.URLSpan; import android.view.MotionEvent; import android.widget.TextView; | import android.text.*; import android.text.style.*; import android.view.*; import android.widget.*; | [
"android.text",
"android.view",
"android.widget"
] | android.text; android.view; android.widget; | 2,273,176 |
@Test
public void testT1RV4D1_T1LV4D4() {
test_id = getTestId("T1RV4D1", "T1LV4D4", "47");
String src = selectTRVD("T1RV4D1");
String dest = selectTLVD("T1LV4D4");
String result = ".";
try {
result = TRVD_TLVD_Action(src, dest);
} catch (RecognitionException e) {
e.printStackTrace();... | void function() { test_id = getTestId(STR, STR, "47"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(ParamFailure2,... | /**
* Perform the test for the given matrix column (T1RV4D1) and row (T1LV4D4).
*
*/ | Perform the test for the given matrix column (T1RV4D1) and row (T1LV4D4) | testT1RV4D1_T1LV4D4 | {
"repo_name": "rmulvey/bptest",
"path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_8_Generics.java",
"license": "apache-2.0",
"size": 153074
} | [
"org.xtuml.bp.ui.graphics.editor.GraphicalEditor"
] | import org.xtuml.bp.ui.graphics.editor.GraphicalEditor; | import org.xtuml.bp.ui.graphics.editor.*; | [
"org.xtuml.bp"
] | org.xtuml.bp; | 2,761,036 |
private static long parseMehd(ParsableByteArray mehd) {
mehd.setPosition(Atom.HEADER_SIZE);
int fullAtom = mehd.readInt();
int version = Atom.parseFullAtomVersion(fullAtom);
return version == 0 ? mehd.readUnsignedInt() : mehd.readUnsignedLongToLong();
} | static long function(ParsableByteArray mehd) { mehd.setPosition(Atom.HEADER_SIZE); int fullAtom = mehd.readInt(); int version = Atom.parseFullAtomVersion(fullAtom); return version == 0 ? mehd.readUnsignedInt() : mehd.readUnsignedLongToLong(); } | /**
* Parses an mehd atom (defined in 14496-12).
*/ | Parses an mehd atom (defined in 14496-12) | parseMehd | {
"repo_name": "gysgogo/levetube",
"path": "exo_player/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java",
"license": "gpl-3.0",
"size": 55402
} | [
"com.google.android.exoplayer2.util.ParsableByteArray"
] | import com.google.android.exoplayer2.util.ParsableByteArray; | import com.google.android.exoplayer2.util.*; | [
"com.google.android"
] | com.google.android; | 4,332 |
inputList.add(new Pair<K1, V1>(key, val));
} | inputList.add(new Pair<K1, V1>(key, val)); } | /**
* Adds an input to send to the mapper
* @param key
* @param val
*/ | Adds an input to send to the mapper | addInput | {
"repo_name": "apache/hadoop-mapreduce",
"path": "src/contrib/mrunit/src/java/org/apache/hadoop/mrunit/MapReduceDriverBase.java",
"license": "apache-2.0",
"size": 6568
} | [
"org.apache.hadoop.mrunit.types.Pair"
] | import org.apache.hadoop.mrunit.types.Pair; | import org.apache.hadoop.mrunit.types.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,322,993 |
@Test
public void whenCommandDownloadThenDownloadFile() throws IOException {
settings = new Settings(propertiesFile);
PipedInputStream pis = new PipedInputStream();
PipedOutputStream pos = new PipedOutputStream(pis);
try (DataInputStream reader = new DataInputStream(pis);
... | void function() throws IOException { settings = new Settings(propertiesFile); PipedInputStream pis = new PipedInputStream(); PipedOutputStream pos = new PipedOutputStream(pis); try (DataInputStream reader = new DataInputStream(pis); DataOutputStream output = new DataOutputStream(pos)) { MenuFileManager menu = new MenuF... | /**
* Test download command.
* @throws IOException exception
*/ | Test download command | whenCommandDownloadThenDownloadFile | {
"repo_name": "roman-sd/java-a-to-z",
"path": "chapter_003/src/test/java/ru/sdroman/netFileManager/ServerTest.java",
"license": "apache-2.0",
"size": 6897
} | [
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.File",
"java.io.IOException",
"java.io.PipedInputStream",
"java.io.PipedOutputStream",
"java.nio.file.Files",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.IOException; import java.io.PipedInputStream; import java.io.PipedOutputStream; import java.nio.file.Files; import org.hamcrest.core.Is; import org.junit.Assert; | import java.io.*; import java.nio.file.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.io",
"java.nio",
"org.hamcrest.core",
"org.junit"
] | java.io; java.nio; org.hamcrest.core; org.junit; | 234,904 |
public void invoke(String[] args)
throws Throwable {
try {
main.invoke(null, new Object[]{args});
} catch (InvocationTargetException except) {
throw except.getCause();
}
}
| void function(String[] args) throws Throwable { try { main.invoke(null, new Object[]{args}); } catch (InvocationTargetException except) { throw except.getCause(); } } | /**
* Invoke the example application with the given arguments
* @param args the arguments for the application
* @throws Throwable The exception thrown by the invoked method
*/ | Invoke the example application with the given arguments | invoke | {
"repo_name": "moerstw/prefix_span",
"path": "src/main/java/com/moerstw/prefixspan/driver/ProgramDriver.java",
"license": "gpl-3.0",
"size": 5275
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,311,176 |
@Nullable
public Version version() {
return version;
} | Version function() { return version; } | /**
* Returns the version of elasticsearch that the snapshot was created with. Will only
* return {@code null} if {@link #state()} returns {@code null} or {@link SnapshotState#INCOMPATIBLE}.
*
* @return version of elasticsearch that the snapshot was created with
*/ | Returns the version of elasticsearch that the snapshot was created with. Will only return null if <code>#state()</code> returns null or <code>SnapshotState#INCOMPATIBLE</code> | version | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/snapshots/SnapshotInfo.java",
"license": "apache-2.0",
"size": 42703
} | [
"org.elasticsearch.Version"
] | import org.elasticsearch.Version; | import org.elasticsearch.*; | [
"org.elasticsearch"
] | org.elasticsearch; | 2,913,549 |
protected String generateSignature(Credential signingCredential, String algorithmURI, String queryString)
throws MessageEncodingException {
log.debug(String.format("Generating signature with key type '%s', algorithm URI '%s' over query string '%s'",
SecurityHelper.extractSigning... | String function(Credential signingCredential, String algorithmURI, String queryString) throws MessageEncodingException { log.debug(String.format(STR, SecurityHelper.extractSigningKey(signingCredential).getAlgorithm(), algorithmURI, queryString)); String b64Signature = null; try { byte[] rawSignature = SigningUtil.signW... | /**
* Generates the signature over the query string.
*
* @param signingCredential credential that will be used to sign query string
* @param algorithmURI algorithm URI of the signing credential
* @param queryString query string to be signed
*
* @return base64 encoded signature of qu... | Generates the signature over the query string | generateSignature | {
"repo_name": "Safewhere/kombit-web-java",
"path": "kombit-opensaml-2.5.1/src/org/opensaml/saml2/binding/encoding/HTTPRedirectDeflateEncoder.java",
"license": "mit",
"size": 11088
} | [
"java.io.UnsupportedEncodingException",
"org.opensaml.ws.message.encoder.MessageEncodingException",
"org.opensaml.xml.security.SecurityException",
"org.opensaml.xml.security.SecurityHelper",
"org.opensaml.xml.security.SigningUtil",
"org.opensaml.xml.security.credential.Credential",
"org.opensaml.xml.uti... | import java.io.UnsupportedEncodingException; import org.opensaml.ws.message.encoder.MessageEncodingException; import org.opensaml.xml.security.SecurityException; import org.opensaml.xml.security.SecurityHelper; import org.opensaml.xml.security.SigningUtil; import org.opensaml.xml.security.credential.Credential; import ... | import java.io.*; import org.opensaml.ws.message.encoder.*; import org.opensaml.xml.security.*; import org.opensaml.xml.security.credential.*; import org.opensaml.xml.util.*; | [
"java.io",
"org.opensaml.ws",
"org.opensaml.xml"
] | java.io; org.opensaml.ws; org.opensaml.xml; | 1,015,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.