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 List<UserAmountStatement> findAll(); | List<UserAmountStatement> function(); | /**
* find all model
*
* @return all <UserAmountStatement
*/ | find all model | findAll | {
"repo_name": "JpressProjects/jpress",
"path": "jpress-service-api/src/main/java/io/jpress/service/UserAmountStatementService.java",
"license": "lgpl-3.0",
"size": 1774
} | [
"io.jpress.model.UserAmountStatement",
"java.util.List"
] | import io.jpress.model.UserAmountStatement; import java.util.List; | import io.jpress.model.*; import java.util.*; | [
"io.jpress.model",
"java.util"
] | io.jpress.model; java.util; | 1,100,929 |
@Override
public void onChunkUnload() {
if (addedToEnet &&
Info.isIc2Available()) {
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
addedToEnet = false;
}
} | void function() { if (addedToEnet && Info.isIc2Available()) { MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); addedToEnet = false; } } | /**
* Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link.
* Both invalidate and onChunkUnload have to be used.
*/ | Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link. Both invalidate and onChunkUnload have to be used | onChunkUnload | {
"repo_name": "ZanyLeonic/Balloons",
"path": "src/main/java/ic2/api/energy/prefab/BasicSource.java",
"license": "mit",
"size": 9550
} | [
"net.minecraftforge.common.MinecraftForge"
] | import net.minecraftforge.common.MinecraftForge; | import net.minecraftforge.common.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 1,340,856 |
public Date getIssueDate() {
return issueDate;
} | Date function() { return issueDate; } | /**
* Issue date.
*/ | Issue date | getIssueDate | {
"repo_name": "eldevanjr/helianto",
"path": "helianto-core/src/main/java/org/helianto/core/domain/License.java",
"license": "apache-2.0",
"size": 4031
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,524,006 |
@ApiModelProperty(value = "")
public Integer getDurationInMillis() {
return durationInMillis;
} | @ApiModelProperty(value = "") Integer function() { return durationInMillis; } | /**
* Get durationInMillis
* @return durationInMillis
**/ | Get durationInMillis | getDurationInMillis | {
"repo_name": "cliffano/swaggy-jenkins",
"path": "clients/java-msf4j/generated/src/gen/java/org/openapitools/model/PipelineBranchesitemlatestRun.java",
"license": "mit",
"size": 9738
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,797,042 |
void dump(OutputStream output); | void dump(OutputStream output); | /**
* Dumps the content of this {@link Router}.
*/ | Dumps the content of this <code>Router</code> | dump | {
"repo_name": "jmostella/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/Router.java",
"license": "apache-2.0",
"size": 1644
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,758,896 |
public static double random() {
double randomNumber = 0.0d;
try {
SecureRandom randGen = SecureRandom.getInstance("SHA1PRNG");
randomNumber = randGen.nextDouble();
}
catch (NoSuchAlgorithmException e) {
randomNumber = Math.random();
}
... | static double function() { double randomNumber = 0.0d; try { SecureRandom randGen = SecureRandom.getInstance(STR); randomNumber = randGen.nextDouble(); } catch (NoSuchAlgorithmException e) { randomNumber = Math.random(); } return randomNumber; } | /**
* Uses the java.security.SecureRandom method of generating random numbers.
* @return the next pseudorandom, uniformly distributed
* <code>double</code> value between <code>0.0</code> and
* <code>1.0</code> from this random number generator's sequence.
*/ | Uses the java.security.SecureRandom method of generating random numbers | random | {
"repo_name": "randysecrist/GEdit",
"path": "src/main/java/com/reformation/graph/utils/MathUtils.java",
"license": "gpl-3.0",
"size": 17516
} | [
"java.security.NoSuchAlgorithmException",
"java.security.SecureRandom"
] | import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; | import java.security.*; | [
"java.security"
] | java.security; | 2,363,582 |
@IgnoreForbiddenApisErrors(reason = "Prints the stacktrace in case an exception is raised")
private <T extends Object> T findPropertyOfType(Object subject, Class<T> clazz) {
Field[] fields = subject.getClass().getDeclaredFields();
for ( Field field : fields ) {
if ( field.getType().equals( clazz ) ) {
bo... | @IgnoreForbiddenApisErrors(reason = STR) <T extends Object> T function(Object subject, Class<T> clazz) { Field[] fields = subject.getClass().getDeclaredFields(); for ( Field field : fields ) { if ( field.getType().equals( clazz ) ) { boolean accessible = field.isAccessible(); try { field.setAccessible( true ); return (... | /**
* Reflect into the subject and find the first property of the given type.
*
* @param subject - the instance to reflect on
* @param clazz - exactly the class to match on
*
* @return
*/ | Reflect into the subject and find the first property of the given type | findPropertyOfType | {
"repo_name": "shahramgdz/hibernate-validator",
"path": "engine/src/test/java/org/hibernate/validator/test/cfg/ConfigurationFilePropertiesTest.java",
"license": "apache-2.0",
"size": 6405
} | [
"java.lang.reflect.Field",
"org.hibernate.validator.internal.IgnoreForbiddenApisErrors"
] | import java.lang.reflect.Field; import org.hibernate.validator.internal.IgnoreForbiddenApisErrors; | import java.lang.reflect.*; import org.hibernate.validator.internal.*; | [
"java.lang",
"org.hibernate.validator"
] | java.lang; org.hibernate.validator; | 2,292,606 |
public RingBuffer<T> getRingBuffer()
{
return ringBuffer;
} | RingBuffer<T> function() { return ringBuffer; } | /**
* The {@link RingBuffer} used by this Disruptor. This is useful for creating custom
* event processors if the behaviour of {@link BatchEventProcessor} is not suitable.
*
* @return the ring buffer used by this Disruptor.
*/ | The <code>RingBuffer</code> used by this Disruptor. This is useful for creating custom event processors if the behaviour of <code>BatchEventProcessor</code> is not suitable | getRingBuffer | {
"repo_name": "simmeryson/MyDisruptor",
"path": "src/main/java/com/lmax/disruptor/dsl/Disruptor.java",
"license": "apache-2.0",
"size": 18749
} | [
"com.lmax.disruptor.RingBuffer"
] | import com.lmax.disruptor.RingBuffer; | import com.lmax.disruptor.*; | [
"com.lmax.disruptor"
] | com.lmax.disruptor; | 1,054,313 |
public IStatus getStatus() {
IStatus[] errors = new IStatus[errorTable.size()];
errorTable.toArray(errors);
return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors,
DataTransferMessages.ImportOperation_importProblems,
null);
} | IStatus function() { IStatus[] errors = new IStatus[errorTable.size()]; errorTable.toArray(errors); return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, DataTransferMessages.ImportOperation_importProblems, null); } | /**
* Returns the status of the import operation.
* If there were any errors, the result is a status object containing
* individual status objects for each error.
* If there were no errors, the result is a status object with error code <code>OK</code>.
*
* @return the status
*/ | Returns the status of the import operation. If there were any errors, the result is a status object containing individual status objects for each error. If there were no errors, the result is a status object with error code <code>OK</code> | getStatus | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/wizards/datatransfer/ImportOperation.java",
"license": "epl-1.0",
"size": 36234
} | [
"org.eclipse.core.runtime.IStatus",
"org.eclipse.core.runtime.MultiStatus",
"org.eclipse.ui.PlatformUI",
"org.eclipse.ui.internal.wizards.datatransfer.DataTransferMessages"
] | import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.MultiStatus; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.internal.wizards.datatransfer.DataTransferMessages; | import org.eclipse.core.runtime.*; import org.eclipse.ui.*; import org.eclipse.ui.internal.wizards.datatransfer.*; | [
"org.eclipse.core",
"org.eclipse.ui"
] | org.eclipse.core; org.eclipse.ui; | 1,635,625 |
@GwtCompatible(serializable = true)
public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements) {
checkNotNull(elements); // for GWT
// Let ArrayList's sizing logic work, if possible
return (elements instanceof Collection)
? new ArrayList<E>(Collections2.cast(elements))
:... | @GwtCompatible(serializable = true) static <E> ArrayList<E> function(Iterable<? extends E> elements) { checkNotNull(elements); return (elements instanceof Collection) ? new ArrayList<E>(Collections2.cast(elements)) : newArrayList(elements.iterator()); } | /**
* Creates a <i>mutable</i> {@code ArrayList} instance containing the given
* elements.
*
* <p><b>Note:</b> if mutability is not required and the elements are
* non-null, use {@link ImmutableList#copyOf(Iterator)} instead.
*
* @param elements the elements that the list should contain, in order
... | Creates a mutable ArrayList instance containing the given elements. Note: if mutability is not required and the elements are non-null, use <code>ImmutableList#copyOf(Iterator)</code> instead | newArrayList | {
"repo_name": "eoneil1942/voltdb-4.7fix",
"path": "third_party/java/src/com/google_voltpatches/common/collect/Lists.java",
"license": "agpl-3.0",
"size": 36168
} | [
"com.google_voltpatches.common.annotations.GwtCompatible",
"com.google_voltpatches.common.base.Preconditions",
"java.util.ArrayList",
"java.util.Collection"
] | import com.google_voltpatches.common.annotations.GwtCompatible; import com.google_voltpatches.common.base.Preconditions; import java.util.ArrayList; import java.util.Collection; | import com.google_voltpatches.common.annotations.*; import com.google_voltpatches.common.base.*; import java.util.*; | [
"com.google_voltpatches.common",
"java.util"
] | com.google_voltpatches.common; java.util; | 2,432,543 |
public void setRootViewId(int id) {
mRootView = (ViewGroup) inflater.inflate(id, null);
mTrack = (ViewGroup) mRootView.findViewById(R.id.tracks);
mArrowDown = (ImageView) mRootView.findViewById(R.id.arrow_down);
mArrowUp = (ImageView) mRootView.findViewById(R.id.arrow_up);
//This was previously defin... | void function(int id) { mRootView = (ViewGroup) inflater.inflate(id, null); mTrack = (ViewGroup) mRootView.findViewById(R.id.tracks); mArrowDown = (ImageView) mRootView.findViewById(R.id.arrow_down); mArrowUp = (ImageView) mRootView.findViewById(R.id.arrow_up); mRootView.setLayoutParams(new LayoutParams(LayoutParams.WR... | /**
* Set root view.
*
* @param id Layout resource id
*/ | Set root view | setRootViewId | {
"repo_name": "kshark27/UltraExplorer",
"path": "filebrowserULTRA/src/com/mirrorlabs/quickaction/QuickAction.java",
"license": "gpl-3.0",
"size": 9568
} | [
"android.view.ViewGroup",
"android.widget.ImageView"
] | import android.view.ViewGroup; import android.widget.ImageView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,647,657 |
@MBeanOperation(name = "setConfigFileRootLoggerLevel", description = "Set the logging level for the Root Logger " +
"in the log4j xml configuration file.", impact = MBeanOperationInfo.ACTION)
boolean setConfigFileRootLoggerLevel(@MBeanOperationParameter(name = "level", description = "Logger level"... | @MBeanOperation(name = STR, description = STR + STR, impact = MBeanOperationInfo.ACTION) boolean setConfigFileRootLoggerLevel(@MBeanOperationParameter(name = "level", description = STR)String level) throws IOException; | /**
* Updates the level of the Log4J RootLogger within the xml configuration file if it is present
* @param level The level to set the logger to
* @return True if successful, false if not (eg an invalid level is specified, or root logger level isnt already defined)
* @throws IOException if there is... | Updates the level of the Log4J RootLogger within the xml configuration file if it is present | setConfigFileRootLoggerLevel | {
"repo_name": "Asitha/andes",
"path": "modules/andes-core/management/common/src/main/java/org/wso2/andes/management/common/mbeans/LoggingManagement.java",
"license": "apache-2.0",
"size": 8167
} | [
"java.io.IOException",
"javax.management.MBeanOperationInfo",
"org.wso2.andes.management.common.mbeans.annotations.MBeanOperation",
"org.wso2.andes.management.common.mbeans.annotations.MBeanOperationParameter"
] | import java.io.IOException; import javax.management.MBeanOperationInfo; import org.wso2.andes.management.common.mbeans.annotations.MBeanOperation; import org.wso2.andes.management.common.mbeans.annotations.MBeanOperationParameter; | import java.io.*; import javax.management.*; import org.wso2.andes.management.common.mbeans.annotations.*; | [
"java.io",
"javax.management",
"org.wso2.andes"
] | java.io; javax.management; org.wso2.andes; | 1,566,504 |
public static boolean containsAnyUuid(ParcelUuid[] uuidA, ParcelUuid[] uuidB) {
if (uuidA == null && uuidB == null) return true;
if (uuidA == null) {
return uuidB.length == 0 ? true : false;
}
if (uuidB == null) {
return uuidA.length == 0 ? true : false;
}
HashSet<ParcelUuid> uuidSet = new HashS... | static boolean function(ParcelUuid[] uuidA, ParcelUuid[] uuidB) { if (uuidA == null && uuidB == null) return true; if (uuidA == null) { return uuidB.length == 0 ? true : false; } if (uuidB == null) { return uuidA.length == 0 ? true : false; } HashSet<ParcelUuid> uuidSet = new HashSet<ParcelUuid> (Arrays.asList(uuidA));... | /**
* Returns true if there any common ParcelUuids in uuidA and uuidB.
*
* @param uuidA - List of ParcelUuids
* @param uuidB - List of ParcelUuids
*
*/ | Returns true if there any common ParcelUuids in uuidA and uuidB | containsAnyUuid | {
"repo_name": "shelmesky/nexfi_android_ble",
"path": "underdark/src/main/java/impl/underdark/transport/bluetooth/discovery/ble/detector/BluetoothUuid.java",
"license": "gpl-3.0",
"size": 9873
} | [
"android.os.ParcelUuid",
"java.util.Arrays",
"java.util.HashSet"
] | import android.os.ParcelUuid; import java.util.Arrays; import java.util.HashSet; | import android.os.*; import java.util.*; | [
"android.os",
"java.util"
] | android.os; java.util; | 319,589 |
@Bean
@Order(2)
public RequestLoggingFilter getRequestLoggingFilter() {
return new RequestLoggingFilter();
} | @Order(2) RequestLoggingFilter function() { return new RequestLoggingFilter(); } | /**
* Collects and logs per-request details.
*
* <p>Needs to have lower precedence than the RequestCacheFilter bean.
*/ | Collects and logs per-request details. Needs to have lower precedence than the RequestCacheFilter bean | getRequestLoggingFilter | {
"repo_name": "databiosphere/terra-common-lib",
"path": "src/main/java/bio/terra/common/logging/LoggingConfig.java",
"license": "bsd-3-clause",
"size": 2599
} | [
"org.springframework.core.annotation.Order"
] | import org.springframework.core.annotation.Order; | import org.springframework.core.annotation.*; | [
"org.springframework.core"
] | org.springframework.core; | 741,394 |
public static Collection<String[]> getStatsConnexionUserAll(String dateBegin,
String dateEnd) throws SQLException, UtilException {
SilverTrace.info("silverStatisticsPeas",
"SilverStatisticsPeasDAOConnexion.getStatsConnexionUserAll",
"root.MSG_GEN_ENTER_METHOD");
PreparedStatement stmt = ... | static Collection<String[]> function(String dateBegin, String dateEnd) throws SQLException, UtilException { SilverTrace.info(STR, STR, STR); PreparedStatement stmt = null; ResultSet rs = null; Connection myCon = null; List<String[]> result = new ArrayList<String[]>(); try { myCon = DBUtil.makeConnection(JNDINames.SILVE... | /**
* Returns the user stats : User last name, number of connexions, mean connexion time and user id
* for all Silverpeas users.
* @param dateBegin
* @param dateEnd
* @return the user stats : User last name, number of connexions, mean connexion time and user id
* for all Silverpeas users.
* @throws... | Returns the user stats : User last name, number of connexions, mean connexion time and user id for all Silverpeas users | getStatsConnexionUserAll | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "war-core/src/main/java/com/stratelia/silverpeas/silverStatisticsPeas/control/SilverStatisticsPeasDAOConnexion.java",
"license": "agpl-3.0",
"size": 21970
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.webactiv.util.DBUtil",
"com.stratelia.webactiv.util.JNDINames",
"com.stratelia.webactiv.util.exception.UtilException",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.Arr... | import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.JNDINames; import com.stratelia.webactiv.util.exception.UtilException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLExcep... | import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*; import java.util.*; | [
"com.stratelia.silverpeas",
"com.stratelia.webactiv",
"java.sql",
"java.util"
] | com.stratelia.silverpeas; com.stratelia.webactiv; java.sql; java.util; | 1,987,652 |
public ThreadPoolExecutor getExecutor();
public MemoryManager getMemoryManager(); | ThreadPoolExecutor getExecutor(); public MemoryManager function(); | /**
* Get the memory manager used to track memory usage
*/ | Get the memory manager used to track memory usage | getMemoryManager | {
"repo_name": "djh4230/Apache-Phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java",
"license": "apache-2.0",
"size": 13026
} | [
"java.util.concurrent.ThreadPoolExecutor",
"org.apache.phoenix.memory.MemoryManager"
] | import java.util.concurrent.ThreadPoolExecutor; import org.apache.phoenix.memory.MemoryManager; | import java.util.concurrent.*; import org.apache.phoenix.memory.*; | [
"java.util",
"org.apache.phoenix"
] | java.util; org.apache.phoenix; | 1,904,320 |
public void setValues(HttpServletRequest req) {
CMnQueryData data = (CMnQueryData) req.getAttribute(QUERY_OBJECT_LABEL);
// Attempt to obtain the data from request parameters
if (data == null) {
data = new CMnQueryData();
data.setHostname(req.getParameter(HOSTNAME_L... | void function(HttpServletRequest req) { CMnQueryData data = (CMnQueryData) req.getAttribute(QUERY_OBJECT_LABEL); if (data == null) { data = new CMnQueryData(); data.setHostname(req.getParameter(HOSTNAME_LABEL)); data.setPort(req.getParameter(PORT_LABEL)); data.setUsername(req.getParameter(USERNAME_LABEL)); data.setPass... | /**
* Set the input fields by examining the HTTP request to see if
* a value was submitted.
*
* @param req HTTP request
*/ | Set the input fields by examining the HTTP request to see if a value was submitted | setValues | {
"repo_name": "ModelN/build-management",
"path": "mn-build-webapp/src/main/java/com/modeln/build/ctrl/forms/CMnDatabaseQueryForm.java",
"license": "mit",
"size": 13427
} | [
"com.modeln.build.common.data.database.CMnQueryData",
"javax.servlet.http.HttpServletRequest"
] | import com.modeln.build.common.data.database.CMnQueryData; import javax.servlet.http.HttpServletRequest; | import com.modeln.build.common.data.database.*; import javax.servlet.http.*; | [
"com.modeln.build",
"javax.servlet"
] | com.modeln.build; javax.servlet; | 2,743,410 |
@Nullable
public DriveItemCreateLinkParameterSet body;
@Nonnull
public java.util.concurrent.CompletableFuture<Permission> postAsync() {
return sendAsync(HttpMethod.POST, body);
} | DriveItemCreateLinkParameterSet body; public java.util.concurrent.CompletableFuture<Permission> function() { return sendAsync(HttpMethod.POST, body); } | /**
* Invokes the method and returns a future with the result
* @return a future with the result
*/ | Invokes the method and returns a future with the result | postAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/DriveItemCreateLinkRequest.java",
"license": "mit",
"size": 2871
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.DriveItemCreateLinkParameterSet",
"com.microsoft.graph.models.Permission"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.DriveItemCreateLinkParameterSet; import com.microsoft.graph.models.Permission; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 773,241 |
protected void dropFewItems(boolean par1, int par2) {
int j = this.rand.nextInt(3);
int k;
for (k = 0; k < j; ++k) {
this.func_145778_a(Item.getItemFromBlock(Blocks.red_flower), 1, 0.0F);
}
k = 3 + this.rand.nextInt(3);
for (int l = 0; l < k; ++l) {
this.dropItem(Items.gold_ingot, 1);
}
} | void function(boolean par1, int par2) { int j = this.rand.nextInt(3); int k; for (k = 0; k < j; ++k) { this.func_145778_a(Item.getItemFromBlock(Blocks.red_flower), 1, 0.0F); } k = 3 + this.rand.nextInt(3); for (int l = 0; l < k; ++l) { this.dropItem(Items.gold_ingot, 1); } } | /**
* Drop 0-2 items of this living's type. @param par1 - Whether this entity
* has recently been hit by a player. @param par2 - Level of Looting used to
* kill this mob.
*/ | Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param par2 - Level of Looting used to kill this mob | dropFewItems | {
"repo_name": "NxS-BloodNote/MinExtension",
"path": "src/main/java/mcmod/nxs/minextension/entity/passive/golem/EntityGoldGolem.java",
"license": "gpl-2.0",
"size": 8823
} | [
"net.minecraft.init.Blocks",
"net.minecraft.init.Items",
"net.minecraft.item.Item"
] | import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; | import net.minecraft.init.*; import net.minecraft.item.*; | [
"net.minecraft.init",
"net.minecraft.item"
] | net.minecraft.init; net.minecraft.item; | 1,076,963 |
public Action getCloseAction() {
return this.closeAction;
}
| Action function() { return this.closeAction; } | /**
* Returns the close action.
*
* @return The close action.
*/ | Returns the close action | getCloseAction | {
"repo_name": "jfree/jcommon",
"path": "src/main/java/org/jfree/ui/tabbedui/AbstractTabbedUI.java",
"license": "lgpl-2.1",
"size": 15198
} | [
"javax.swing.Action"
] | import javax.swing.Action; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 274,919 |
public void reset(){
RadioButton rb = (RadioButton) findViewById(R.id.rbUnitTimeH);
if ( rb != null ) rb.setChecked(false);
rb = (RadioButton) findViewById(R.id.rbUnitTimeM);
if ( rb != null ) rb.setChecked(false);
rb = (RadioButton) findViewById(R.id.rbUnitTimeS);
if... | void function(){ RadioButton rb = (RadioButton) findViewById(R.id.rbUnitTimeH); if ( rb != null ) rb.setChecked(false); rb = (RadioButton) findViewById(R.id.rbUnitTimeM); if ( rb != null ) rb.setChecked(false); rb = (RadioButton) findViewById(R.id.rbUnitTimeS); if ( rb != null ) rb.setChecked(false); rb = (RadioButton)... | /**
* Uncheck all buttons
*/ | Uncheck all buttons | reset | {
"repo_name": "pylapp/SmoothClicker",
"path": "app/app/src/main/java/pylapp/smoothclicker/android/views/RadioButtonGroupTableLayout.java",
"license": "mit",
"size": 5481
} | [
"android.widget.RadioButton"
] | import android.widget.RadioButton; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,450,304 |
private Future<RecordMetadata> doSend(ProducerRecord<K, V> record, Callback callback) {
ensureProperTransactionalState();
TopicPartition tp = null;
try {
// first make sure the metadata for the topic is available
ClusterAndWaitTime clusterAndWaitTime = waitOnMetadata(... | Future<RecordMetadata> function(ProducerRecord<K, V> record, Callback callback) { ensureProperTransactionalState(); TopicPartition tp = null; try { ClusterAndWaitTime clusterAndWaitTime = waitOnMetadata(record.topic(), record.partition(), maxBlockTimeMs); long remainingWaitMs = Math.max(0, maxBlockTimeMs - clusterAndWa... | /**
* Implementation of asynchronously send a record to a topic.
*/ | Implementation of asynchronously send a record to a topic | doSend | {
"repo_name": "rhauch/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java",
"license": "apache-2.0",
"size": 56770
} | [
"java.util.concurrent.Future",
"org.apache.kafka.clients.producer.internals.RecordAccumulator",
"org.apache.kafka.common.Cluster",
"org.apache.kafka.common.KafkaException",
"org.apache.kafka.common.TopicPartition",
"org.apache.kafka.common.errors.ApiException",
"org.apache.kafka.common.errors.InterruptE... | import java.util.concurrent.Future; import org.apache.kafka.clients.producer.internals.RecordAccumulator; import org.apache.kafka.common.Cluster; import org.apache.kafka.common.KafkaException; import org.apache.kafka.common.TopicPartition; import org.apache.kafka.common.errors.ApiException; import org.apache.kafka.comm... | import java.util.concurrent.*; import org.apache.kafka.clients.producer.internals.*; import org.apache.kafka.common.*; import org.apache.kafka.common.errors.*; import org.apache.kafka.common.header.*; import org.apache.kafka.common.record.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 2,099,417 |
public static int collectionIsEmpty(Collection<?> c) {
return c.isEmpty() ? BooleanHelper.TRUE : -c.size();
} | static int function(Collection<?> c) { return c.isEmpty() ? BooleanHelper.TRUE : -c.size(); } | /**
* Helper function that is called instead of Collection.isEmpty
*
* @param c
* a {@link java.util.Collection} object.
* @return a int.
*/ | Helper function that is called instead of Collection.isEmpty | collectionIsEmpty | {
"repo_name": "SoftwareEngineeringToolDemos/FSE-2011-EvoSuite",
"path": "client/src/main/java/org/evosuite/instrumentation/testability/ContainerHelper.java",
"license": "lgpl-3.0",
"size": 4905
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,466,511 |
public void awaitStopped(long timeout, TimeUnit unit) throws TimeoutException {
state.awaitStopped(timeout, unit);
} | void function(long timeout, TimeUnit unit) throws TimeoutException { state.awaitStopped(timeout, unit); } | /**
* Waits for the all the services to reach a terminal state for no more than the given time. After
* this method returns all services will either be {@linkplain Service.State#TERMINATED
* terminated} or {@linkplain Service.State#FAILED failed}.
*
* @param timeout the maximum time to wait
* @param u... | Waits for the all the services to reach a terminal state for no more than the given time. After this method returns all services will either be Service.State#TERMINATED terminated or Service.State#FAILED failed | awaitStopped | {
"repo_name": "antlr/codebuff",
"path": "output/java_guava/1.4.19/ServiceManager.java",
"license": "bsd-2-clause",
"size": 32599
} | [
"java.util.concurrent.TimeUnit",
"java.util.concurrent.TimeoutException"
] | import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 382,579 |
@Test(expected = ValidatorException.class)
public void deployerShouldThrowDeployExceptionWithWrongMCF() throws Throwable
{
//given
ResourceAdapterArchive archive = getArchive("mcf_wrong.rar");
try
{
//when
embedded.deploy(archive);
}
catch (DeployException ... | @Test(expected = ValidatorException.class) void function() throws Throwable { ResourceAdapterArchive archive = getArchive(STR); try { embedded.deploy(archive); } catch (DeployException de) { ValidatorException dve = null; if (de.getCause() != null && de.getCause() instanceof ValidatorException) { dve = (ValidatorExcept... | /**
* stress the MCF rule.
*
* @throws Throwable and expect a ValidatorException
*
*/ | stress the MCF rule | deployerShouldThrowDeployExceptionWithWrongMCF | {
"repo_name": "ironjacamar/ironjacamar",
"path": "validator/tests/src/test/java/org/jboss/jca/validator/rules/mcf/MCFTestCase.java",
"license": "lgpl-2.1",
"size": 11675
} | [
"com.github.fungal.spi.deployers.DeployException",
"javax.resource.spi.ResourceAdapter",
"org.hamcrest.core.Is",
"org.hamcrest.core.IsNull",
"org.jboss.jca.validator.Failure",
"org.jboss.jca.validator.Severity",
"org.jboss.jca.validator.ValidatorException",
"org.jboss.shrinkwrap.api.spec.ResourceAdapt... | import com.github.fungal.spi.deployers.DeployException; import javax.resource.spi.ResourceAdapter; import org.hamcrest.core.Is; import org.hamcrest.core.IsNull; import org.jboss.jca.validator.Failure; import org.jboss.jca.validator.Severity; import org.jboss.jca.validator.ValidatorException; import org.jboss.shrinkwrap... | import com.github.fungal.spi.deployers.*; import javax.resource.spi.*; import org.hamcrest.core.*; import org.jboss.jca.validator.*; import org.jboss.shrinkwrap.api.spec.*; import org.junit.*; import org.junit.matchers.*; | [
"com.github.fungal",
"javax.resource",
"org.hamcrest.core",
"org.jboss.jca",
"org.jboss.shrinkwrap",
"org.junit",
"org.junit.matchers"
] | com.github.fungal; javax.resource; org.hamcrest.core; org.jboss.jca; org.jboss.shrinkwrap; org.junit; org.junit.matchers; | 33,318 |
private IgniteInternalFuture update0(
K key,
@Nullable V val,
@Nullable EntryProcessor proc,
@Nullable Object[] invokeArgs,
final boolean retval,
@Nullable final CacheEntryPredicate filter,
boolean async
) {
assert val == null || proc == null;
... | IgniteInternalFuture function( K key, @Nullable V val, @Nullable EntryProcessor proc, @Nullable Object[] invokeArgs, final boolean retval, @Nullable final CacheEntryPredicate filter, boolean async ) { assert val == null proc == null; assert ctx.updatesAllowed(); validateCacheKey(key); ctx.checkSecurity(SecurityPermissi... | /**
* Entry point for update/invoke with a single key.
*
* @param key Key.
* @param val Value.
* @param proc Entry processor.
* @param invokeArgs Invoke arguments.
* @param retval Return value flag.
* @param filter Filter.
* @param async Async operation flag.
* @return ... | Entry point for update/invoke with a single key | update0 | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java",
"license": "apache-2.0",
"size": 143315
} | [
"javax.cache.processor.EntryProcessor",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.internal.processors.cache.CacheEntryPredicate",
"org.apache.ignite.plugin.security.SecurityPermission",
"org.jetbrains.annotations.Nullable"
] | import javax.cache.processor.EntryProcessor; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.CacheEntryPredicate; import org.apache.ignite.plugin.security.SecurityPermission; import org.jetbrains.annotations.Nullable; | import javax.cache.processor.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.plugin.security.*; import org.jetbrains.annotations.*; | [
"javax.cache",
"org.apache.ignite",
"org.jetbrains.annotations"
] | javax.cache; org.apache.ignite; org.jetbrains.annotations; | 2,655,733 |
private static Type getFieldSingularType(Field field, Option annotation) {
Type fieldType = field.getGenericType();
if (annotation.allowMultiple()) {
// If the type isn't a List<T>, this is an error in the option's declaration.
if (!(fieldType instanceof ParameterizedType)) {
throw new Con... | static Type function(Field field, Option annotation) { Type fieldType = field.getGenericType(); if (annotation.allowMultiple()) { if (!(fieldType instanceof ParameterizedType)) { throw new ConstructionException(STR); } ParameterizedType pfieldType = (ParameterizedType) fieldType; if (pfieldType.getRawType() != List.cla... | /**
* For an option that does not use {@link Option#allowMultiple}, returns its type. For an option
* that does use it, asserts that the type is a {@code List<T>} and returns its element type
* {@code T}.
*/ | For an option that does not use <code>Option#allowMultiple</code>, returns its type. For an option that does use it, asserts that the type is a List and returns its element type T | getFieldSingularType | {
"repo_name": "variac/bazel",
"path": "src/main/java/com/google/devtools/common/options/IsolatedOptionsData.java",
"license": "apache-2.0",
"size": 24315
} | [
"com.google.devtools.common.options.OptionsParser",
"java.lang.reflect.Field",
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.util.List"
] | import com.google.devtools.common.options.OptionsParser; import java.lang.reflect.Field; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; | import com.google.devtools.common.options.*; import java.lang.reflect.*; import java.util.*; | [
"com.google.devtools",
"java.lang",
"java.util"
] | com.google.devtools; java.lang; java.util; | 2,471,269 |
@Path("/delete")
@DELETE
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)
public Response removeMcastFlow(@QueryParam("src") String src,
@QueryParam("grp") String grp) {
String resp = "Failed to delete";
log.info("Source IP Address to delet... | @Path(STR) @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) Response function(@QueryParam("src") String src, @QueryParam("grp") String grp) { String resp = STR; log.info(STR + src); log.info(STR + grp); McastRouteTable mrt = McastRouteTable.getInstance(); if (src != null && grp != null) { mrt.removeRoute... | /**
* Delete multicast state.
*
* @param src address to be deleted
* @param grp address to be deleted
* @return status of delete if successful
*/ | Delete multicast state | removeMcastFlow | {
"repo_name": "kkkane/ONOS",
"path": "apps/mfwd/src/main/java/org/onosproject/mfwd/rest/McastResource.java",
"license": "apache-2.0",
"size": 5397
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.onosproject.mfwd.impl.McastRouteTable"
] | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.mfwd.impl.McastRouteTable; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.mfwd.impl.*; | [
"javax.ws",
"org.onosproject.mfwd"
] | javax.ws; org.onosproject.mfwd; | 493,334 |
protected void boot(final BootContext context) throws ConfigurationPersistenceException {
List<ModelNode> bootOps = configurationPersister.load();
ModelNode op = registerModelControllerServiceInitializationBootStep(context);
if (op != null) {
bootOps.add(op);
}
bo... | void function(final BootContext context) throws ConfigurationPersistenceException { List<ModelNode> bootOps = configurationPersister.load(); ModelNode op = registerModelControllerServiceInitializationBootStep(context); if (op != null) { bootOps.add(op); } boot(bootOps, false); finishBoot(); } /** * Boot with the given ... | /**
* Boot the controller. Called during service start.
*
* @param context the boot context
* @throws ConfigurationPersistenceException
* if the configuration failed to be loaded
*/ | Boot the controller. Called during service start | boot | {
"repo_name": "JiriOndrusek/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java",
"license": "lgpl-2.1",
"size": 41424
} | [
"java.util.List",
"org.jboss.as.controller.persistence.ConfigurationPersistenceException",
"org.jboss.dmr.ModelNode"
] | import java.util.List; import org.jboss.as.controller.persistence.ConfigurationPersistenceException; import org.jboss.dmr.ModelNode; | import java.util.*; import org.jboss.as.controller.persistence.*; import org.jboss.dmr.*; | [
"java.util",
"org.jboss.as",
"org.jboss.dmr"
] | java.util; org.jboss.as; org.jboss.dmr; | 2,795,335 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<GroupIdInformationInner> getWithResponse(
String resourceGroupName, String workspaceName, String groupId, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<GroupIdInformationInner> getWithResponse( String resourceGroupName, String workspaceName, String groupId, Context context); | /**
* Get the specified private link resource for the given group id (sub-resource).
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param groupId The name of the private link resource.
* @param... | Get the specified private link resource for the given group id (sub-resource) | getWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/fluent/PrivateLinkResourcesClient.java",
"license": "mit",
"size": 4151
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.databricks.fluent.models.GroupIdInformationInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.databricks.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 778,554 |
public Cancellable clearRealmCacheAsync(ClearRealmCacheRequest request, RequestOptions options,
ActionListener<ClearRealmCacheResponse> listener) {
return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverters::clearRealmCache, op... | Cancellable function(ClearRealmCacheRequest request, RequestOptions options, ActionListener<ClearRealmCacheResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, SecurityRequestConverters::clearRealmCache, options, ClearRealmCacheResponse::fromXContent, listener, emptySet()); } | /**
* Clears the cache in one or more realms asynchronously.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-clear-cache.html">
* the docs</a> for more.
*
* @param request the request with the realm names and usernames to clear the cache for
* @... | Clears the cache in one or more realms asynchronously. See the docs for more | clearRealmCacheAsync | {
"repo_name": "coding0011/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/SecurityClient.java",
"license": "apache-2.0",
"size": 62531
} | [
"java.util.Collections",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.client.security.ClearRealmCacheRequest",
"org.elasticsearch.client.security.ClearRealmCacheResponse"
] | import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.security.ClearRealmCacheRequest; import org.elasticsearch.client.security.ClearRealmCacheResponse; | import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.security.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.client"
] | java.util; org.elasticsearch.action; org.elasticsearch.client; | 18,397 |
static void putViewstates(final Parameters params, final String[] viewstates) {
if (ArrayUtils.isEmpty(viewstates)) {
return;
}
params.put("__VIEWSTATE", viewstates[0]);
if (viewstates.length > 1) {
for (int i = 1; i < viewstates.length; i++) {
... | static void putViewstates(final Parameters params, final String[] viewstates) { if (ArrayUtils.isEmpty(viewstates)) { return; } params.put(STR, viewstates[0]); if (viewstates.length > 1) { for (int i = 1; i < viewstates.length; i++) { params.put(STR + i, viewstates[i]); } params.put(STR, String.valueOf(viewstates.lengt... | /**
* put viewstates into request parameters
*/ | put viewstates into request parameters | putViewstates | {
"repo_name": "auricgoldfinger/cgeo",
"path": "main/src/cgeo/geocaching/connector/gc/GCLogin.java",
"license": "apache-2.0",
"size": 22570
} | [
"org.apache.commons.lang3.ArrayUtils"
] | import org.apache.commons.lang3.ArrayUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,240,911 |
@Override
public void setBandwidthTweak(float val) {
if (val > 1) {
val = 1;
} else if (val < -1) {
val = -1;
}
final float old = bandwidth;
if (old == val) {
return;
}
// log.info("tweak bandwidth by " + val);
b... | void function(float val) { if (val > 1) { val = 1; } else if (val < -1) { val = -1; } final float old = bandwidth; if (old == val) { return; } bandwidth = val; final float MAX = 30; pr.changeByRatioFromPreferred(PotTweakerUtilities.getRatioTweak(val, MAX)); sf.changeByRatioFromPreferred(PotTweakerUtilities.getRatioTwea... | /**
* Tweaks bandwidth around nominal value.
*
* @param val -1 to 1 range
*/ | Tweaks bandwidth around nominal value | setBandwidthTweak | {
"repo_name": "SensorsINI/jaer",
"path": "src/eu/seebetter/ini/chips/davis/DavisConfig.java",
"license": "lgpl-2.1",
"size": 54536
} | [
"ch.unizh.ini.jaer.chip.retina.DVSTweaks",
"net.sf.jaer.biasgen.PotTweakerUtilities"
] | import ch.unizh.ini.jaer.chip.retina.DVSTweaks; import net.sf.jaer.biasgen.PotTweakerUtilities; | import ch.unizh.ini.jaer.chip.retina.*; import net.sf.jaer.biasgen.*; | [
"ch.unizh.ini",
"net.sf.jaer"
] | ch.unizh.ini; net.sf.jaer; | 2,294,488 |
public void getStreamsByKeyword(String keyword, int pageNumber, int itemsPerPage, final KickflipCallback cb) {
if (!assertActiveUserAvailable(cb)) return;
GenericData data = new GenericData();
addPaginationData(pageNumber, itemsPerPage, data);
data.put("uuid", getActiveUser().getUUID... | void function(String keyword, int pageNumber, int itemsPerPage, final KickflipCallback cb) { if (!assertActiveUserAvailable(cb)) return; GenericData data = new GenericData(); addPaginationData(pageNumber, itemsPerPage, data); data.put("uuid", getActiveUser().getUUID()); if (keyword != null) { data.put(STR, keyword); } ... | /**
* Get a List of {@link io.kickflip.sdk.api.json.Stream}s containing a keyword.
* <p/>
* This method searches all public recordings made by Users of your Kickflip app.
*
* @param keyword The String keyword to query
* @param cb A callback to receive the resulting List of Streams
... | Get a List of <code>io.kickflip.sdk.api.json.Stream</code>s containing a keyword. This method searches all public recordings made by Users of your Kickflip app | getStreamsByKeyword | {
"repo_name": "silverscania/kickflip-android-sdk",
"path": "sdk/src/main/java/io/kickflip/sdk/api/KickflipApiClient.java",
"license": "mit",
"size": 37410
} | [
"com.google.api.client.http.UrlEncodedContent",
"com.google.api.client.util.GenericData",
"io.kickflip.sdk.api.json.StreamList"
] | import com.google.api.client.http.UrlEncodedContent; import com.google.api.client.util.GenericData; import io.kickflip.sdk.api.json.StreamList; | import com.google.api.client.http.*; import com.google.api.client.util.*; import io.kickflip.sdk.api.json.*; | [
"com.google.api",
"io.kickflip.sdk"
] | com.google.api; io.kickflip.sdk; | 199,307 |
@Override
public boolean evalBoolean(Env env) {
return !_expr.evalBoolean(env);
} | boolean function(Env env) { return !_expr.evalBoolean(env); } | /**
* Evaluates the equality as a boolean.
*/ | Evaluates the equality as a boolean | evalBoolean | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/expr/UnaryNotExpr.java",
"license": "gpl-2.0",
"size": 2005
} | [
"com.caucho.quercus.env.Env"
] | import com.caucho.quercus.env.Env; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,454,994 |
private RefactoringSearchCollector getCollector() {
if (fCollector == null) {
if (fGranularity == GRANULARITY_COMPILATION_UNIT)
fCollector= new RefactoringCompilationUnitCollector();
else if (fGranularity == GRANULARITY_SEARCH_MATCH)
fCollector= new RefactoringSearchMatchCollector();
else
Asse... | RefactoringSearchCollector function() { if (fCollector == null) { if (fGranularity == GRANULARITY_COMPILATION_UNIT) fCollector= new RefactoringCompilationUnitCollector(); else if (fGranularity == GRANULARITY_SEARCH_MATCH) fCollector= new RefactoringSearchMatchCollector(); else Assert.isTrue(false); } return fCollector;... | /**
* Returns the refactoring search collector.
*
* @return the refactoring search collector
*/ | Returns the refactoring search collector | getCollector | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/refactoring/RefactoringSearchEngine2.java",
"license": "epl-1.0",
"size": 24883
} | [
"org.eclipse.core.runtime.Assert"
] | import org.eclipse.core.runtime.Assert; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,172,626 |
public static FieldAccess convertToFieldAccess(QualifiedName node) {
TreeNode parent = node.getParent();
if (parent instanceof QualifiedName) {
FieldAccess newParent = convertToFieldAccess((QualifiedName) parent);
Expression expr = newParent.getExpression();
assert expr instanceof QualifiedN... | static FieldAccess function(QualifiedName node) { TreeNode parent = node.getParent(); if (parent instanceof QualifiedName) { FieldAccess newParent = convertToFieldAccess((QualifiedName) parent); Expression expr = newParent.getExpression(); assert expr instanceof QualifiedName; node = (QualifiedName) expr; } IVariableBi... | /**
* Replaces (in place) a QualifiedName node with an equivalent FieldAccess
* node. This is helpful when a mutation needs to replace the qualifier with
* a node that has Expression type but not Name type.
*/ | Replaces (in place) a QualifiedName node with an equivalent FieldAccess node. This is helpful when a mutation needs to replace the qualifier with a node that has Expression type but not Name type | convertToFieldAccess | {
"repo_name": "theoriginalgri/j2objc",
"path": "translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java",
"license": "apache-2.0",
"size": 14165
} | [
"org.eclipse.jdt.core.dom.IVariableBinding"
] | import org.eclipse.jdt.core.dom.IVariableBinding; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 4,029 |
@XmlTransient
public ArrayList<Serializable> getDefaultSourceValues() {
return defaultSourceValues;
} | ArrayList<Serializable> function() { return defaultSourceValues; } | /**
* Get default source parameter values
*
* @return default source parameter values
*/ | Get default source parameter values | getDefaultSourceValues | {
"repo_name": "nextreports/nextreports-engine",
"path": "src/ro/nextreports/engine/queryexec/QueryParameter.java",
"license": "apache-2.0",
"size": 18000
} | [
"java.io.Serializable",
"java.util.ArrayList"
] | import java.io.Serializable; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,852,440 |
@Override
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
Object childFeature = feature;
Object childObject = child;
boolean qualify =
childFeature == VersioningPackage.Literals.BRANCH_INFO__HEAD ||
childFeature == VersioningPackage.Literals.BRAN... | String function(Object owner, Object feature, Object child, Collection<?> selection) { Object childFeature = feature; Object childObject = child; boolean qualify = childFeature == VersioningPackage.Literals.BRANCH_INFO__HEAD childFeature == VersioningPackage.Literals.BRANCH_INFO__SOURCE; if (qualify) { return getString... | /**
* This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This returns the label text for <code>org.eclipse.emf.edit.command.CreateChildCommand</code>. | getCreateChildText | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/provider/BranchInfoItemProvider.java",
"license": "epl-1.0",
"size": 7812
} | [
"java.util.Collection",
"org.eclipse.emf.emfstore.internal.server.model.versioning.VersioningPackage"
] | import java.util.Collection; import org.eclipse.emf.emfstore.internal.server.model.versioning.VersioningPackage; | import java.util.*; import org.eclipse.emf.emfstore.internal.server.model.versioning.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 712,911 |
try {
BeanUtil.load(this, attributes);
persist();
} catch (Exception e) {
throw new ActiveJpaException("Failed while updating the attributes", e);
}
}
/**
* The model identifier. Override and annotate with {@link Id} | try { BeanUtil.load(this, attributes); persist(); } catch (Exception e) { throw new ActiveJpaException(STR, e); } } /** * The model identifier. Override and annotate with {@link Id} | /**
* Loads the given attributes to this model
*
* @param attributes
*/ | Loads the given attributes to this model | updateAttributes | {
"repo_name": "pkdevbox/activejpa",
"path": "activejpa-core/src/main/java/org/activejpa/entity/Model.java",
"license": "apache-2.0",
"size": 9233
} | [
"javax.persistence.Id",
"org.activejpa.ActiveJpaException",
"org.activejpa.util.BeanUtil"
] | import javax.persistence.Id; import org.activejpa.ActiveJpaException; import org.activejpa.util.BeanUtil; | import javax.persistence.*; import org.activejpa.*; import org.activejpa.util.*; | [
"javax.persistence",
"org.activejpa",
"org.activejpa.util"
] | javax.persistence; org.activejpa; org.activejpa.util; | 1,012,529 |
NodeState rebase() {
NodeState head = super.getNodeState();
NodeState inMemBase = super.getBaseState();
// Rebase branch
branch.rebase();
// Rebase in memory changes on top of the head of the rebased branch
super.reset(branch.getHead());
updates = 0;
... | NodeState rebase() { NodeState head = super.getNodeState(); NodeState inMemBase = super.getBaseState(); branch.rebase(); super.reset(branch.getHead()); updates = 0; head.compareAgainstBaseState(inMemBase, new ConflictAnnotatingRebaseDiff(this)); base = branch.getBase(); return super.getNodeState(); } | /**
* Rebase this builder on top of the head of the underlying store
*/ | Rebase this builder on top of the head of the underlying store | rebase | {
"repo_name": "trekawek/jackrabbit-oak",
"path": "oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentRootBuilder.java",
"license": "apache-2.0",
"size": 6212
} | [
"org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff",
"org.apache.jackrabbit.oak.spi.state.NodeState"
] | import org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff; import org.apache.jackrabbit.oak.spi.state.NodeState; | import org.apache.jackrabbit.oak.spi.state.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 860,748 |
public static long getNumFound(final SolrParams req) throws SolrServerException, IOException {
return getRandClient(random()).query(req).getResults().getNumFound();
} | static long function(final SolrParams req) throws SolrServerException, IOException { return getRandClient(random()).query(req).getResults().getNumFound(); } | /**
* Uses a random SolrClient to execture a request and returns only the numFound
*
* @see #getRandClient
*/ | Uses a random SolrClient to execture a request and returns only the numFound | getNumFound | {
"repo_name": "apache/solr",
"path": "solr/core/src/test/org/apache/solr/search/facet/TestCloudJSONFacetSKGEquiv.java",
"license": "apache-2.0",
"size": 54765
} | [
"java.io.IOException",
"org.apache.solr.client.solrj.SolrServerException",
"org.apache.solr.common.params.SolrParams"
] | import java.io.IOException; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.params.SolrParams; | import java.io.*; import org.apache.solr.client.solrj.*; import org.apache.solr.common.params.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 1,205,747 |
public static <E> List<E> readJsonList(Class<E> elementClass, StringResponse resp) {
try {
return JsonRequest.readList(new InputStreamReader(resp.getContentInputStream()), elementClass);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
} | static <E> List<E> function(Class<E> elementClass, StringResponse resp) { try { return JsonRequest.readList(new InputStreamReader(resp.getContentInputStream()), elementClass); } catch (IOException ex) { throw new RuntimeException(ex); } } | /**
* Reads a JSON list from given response.
* @param <E> List element type
* @param elementClass List element class.
* @param resp server response
* @return JSON list contained in given response.
*/ | Reads a JSON list from given response | readJsonList | {
"repo_name": "agapsys/agreste-test",
"path": "src/main/java/com/agapsys/agreste/test/TestUtils.java",
"license": "apache-2.0",
"size": 8612
} | [
"com.agapsys.http.HttpResponse",
"com.agapsys.rcf.JsonRequest",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.List"
] | import com.agapsys.http.HttpResponse; import com.agapsys.rcf.JsonRequest; import java.io.IOException; import java.io.InputStreamReader; import java.util.List; | import com.agapsys.http.*; import com.agapsys.rcf.*; import java.io.*; import java.util.*; | [
"com.agapsys.http",
"com.agapsys.rcf",
"java.io",
"java.util"
] | com.agapsys.http; com.agapsys.rcf; java.io; java.util; | 725,022 |
ArrayBufferReader reader = new ArrayBufferReader(262144, is );
// computeInputBufferSize( expectedKBitSecRate, decodeBufferCapacityMs ),
// 16384, is );
// 262144 is 256 KB or may be 128 KB per channel?
// Karthik - change buf... | ArrayBufferReader reader = new ArrayBufferReader(262144, is ); new Thread( reader ).start(); ArrayPCMFeed pcmfeed = null; Thread pcmfeedThread = null; long profMs = 0; long profSamples = 0; long profSampleRate = 0; try { Decoder.Info info = decoder.start( reader ); Log.d( LOG, STR + info.getSampleRate() + STR + info.ge... | /**
* Plays a stream synchronously.
* This is the implementation method calle by every play() and playAsync() methods.
* @param is the input stream
* @param expectedKBitSecRate the expected average bitrate in kbit/sec
* This calls the JNI code
*/ | Plays a stream synchronously. This is the implementation method calle by every play() and playAsync() methods | playImpl | {
"repo_name": "tianshanxuester/RadioPlayer",
"path": "src/com/biophysics/radioplayer/ArrayAACPlayer.java",
"license": "gpl-3.0",
"size": 7654
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 547,047 |
protected void registerListeners() {
// Register statically specified listeners first.
for (ApplicationListener<?> listener : getApplicationListeners()) {
getApplicationEventMulticaster().addApplicationListener(listener);
}
// Do not initialize FactoryBeans here: We need to leave all regular beans
// u... | void function() { for (ApplicationListener<?> listener : getApplicationListeners()) { getApplicationEventMulticaster().addApplicationListener(listener); } String[] listenerBeanNames = getBeanNamesForType(ApplicationListener.class, true, false); for (String listenerBeanName : listenerBeanNames) { getApplicationEventMult... | /**
* Add beans that implement ApplicationListener as listeners.
* Doesn't affect other listeners, which can be added without being beans.
*/ | Add beans that implement ApplicationListener as listeners. Doesn't affect other listeners, which can be added without being beans | registerListeners | {
"repo_name": "shivpun/spring-framework",
"path": "spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java",
"license": "apache-2.0",
"size": 50409
} | [
"java.util.Set",
"org.springframework.context.ApplicationEvent",
"org.springframework.context.ApplicationListener"
] | import java.util.Set; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; | import java.util.*; import org.springframework.context.*; | [
"java.util",
"org.springframework.context"
] | java.util; org.springframework.context; | 1,583,952 |
public List<Product> getProductsbyLabel(String labelString); | List<Product> function(String labelString); | /**
* Gets the products by label.
*
* @param label String the label/name of the product
* @return the list of products products with this label or null if non exist
*/ | Gets the products by label | getProductsbyLabel | {
"repo_name": "Torinson/SEPM_Faktura",
"path": "sepm/src/services/ProductService.java",
"license": "gpl-3.0",
"size": 1976
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,989,938 |
public int corruptBlockOnDataNodes(ExtendedBlock block) throws IOException{
return corruptBlockOnDataNodesHelper(block, false);
} | int function(ExtendedBlock block) throws IOException{ return corruptBlockOnDataNodesHelper(block, false); } | /**
* Return the number of corrupted replicas of the given block.
*
* @param block block to be corrupted
* @throws IOException on error accessing the file for the given block
*/ | Return the number of corrupted replicas of the given block | corruptBlockOnDataNodes | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java",
"license": "apache-2.0",
"size": 100357
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,029,208 |
public static com.iucn.whp.dbservice.model.understanding_benefits findByPrimaryKey(
long understanding_benefits_id)
throws com.iucn.whp.dbservice.NoSuchunderstanding_benefitsException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findByPrimaryKey(understanding_benefits_id);
... | static com.iucn.whp.dbservice.model.understanding_benefits function( long understanding_benefits_id) throws com.iucn.whp.dbservice.NoSuchunderstanding_benefitsException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByPrimaryKey(understanding_benefits_id); } | /**
* Returns the understanding_benefits with the primary key or throws a {@link com.iucn.whp.dbservice.NoSuchunderstanding_benefitsException} if it could not be found.
*
* @param understanding_benefits_id the primary key of the understanding_benefits
* @return the understanding_benefits
* @throws com.iucn.whp.dbs... | Returns the understanding_benefits with the primary key or throws a <code>com.iucn.whp.dbservice.NoSuchunderstanding_benefitsException</code> if it could not be found | findByPrimaryKey | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/understanding_benefitsUtil.java",
"license": "gpl-2.0",
"size": 20541
} | [
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.portal.kernel.exception.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 1,327,927 |
@Test
public void isDebugEnabled() {
assertThat(logger.isDebugEnabled()).isEqualTo(debugEnabled);
} | void function() { assertThat(logger.isDebugEnabled()).isEqualTo(debugEnabled); } | /**
* Verifies evaluating whether {@link Level#DEBUG DEBUG} level is enabled.
*/ | Verifies evaluating whether <code>Level#DEBUG DEBUG</code> level is enabled | isDebugEnabled | {
"repo_name": "pmwmedia/tinylog",
"path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java",
"license": "apache-2.0",
"size": 189291
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,061,109 |
@ApiModelProperty(value = "Current cash at bank accounting value from the journals.")
public Double getAccountBalance() {
return accountBalance;
} | @ApiModelProperty(value = STR) Double function() { return accountBalance; } | /**
* Current cash at bank accounting value from the journals.
*
* @return accountBalance
*/ | Current cash at bank accounting value from the journals | getAccountBalance | {
"repo_name": "XeroAPI/Xero-Java",
"path": "src/main/java/com/xero/models/finance/CashAccountResponse.java",
"license": "mit",
"size": 8731
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,533,556 |
public String getDecodedHostname() {
String hostname = getHostname();
return (hostname == null) ? null : IDN.toUnicode(hostname);
} | String function() { String hostname = getHostname(); return (hostname == null) ? null : IDN.toUnicode(hostname); } | /**
* Get the primary hostname for this server
* If hostname is IDN, it is decoded from Puny encoding
* @return Returns the primary hostname for this server
*/ | Get the primary hostname for this server If hostname is IDN, it is decoded from Puny encoding | getDecodedHostname | {
"repo_name": "renner/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/server/Server.java",
"license": "gpl-2.0",
"size": 56025
} | [
"java.net.IDN"
] | import java.net.IDN; | import java.net.*; | [
"java.net"
] | java.net; | 1,577,233 |
Vector<Option> result = new Vector<Option>();
result.addElement(new Option(
"\t" + attributeIndicesTipText() + ".\n"
+ "\t(default: " + getDefaultAttributeIndices() + ")",
RANGE, 1, "-" + RANGE + " <col1,col2,...>"));
result.addElement(new Option(
"\tInverts the matching sense.",
INVE... | Vector<Option> result = new Vector<Option>(); result.addElement(new Option( "\t" + attributeIndicesTipText() + ".\n" + STR + getDefaultAttributeIndices() + ")", RANGE, 1, "-" + RANGE + STR)); result.addElement(new Option( STR, INVERT_MATCHING, 0, "-" + INVERT_MATCHING)); result.addAll(Collections.list(super.listOptions... | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "fracpete/missing-values-imputation-weka-package",
"path": "src/main/java/weka/filters/unsupervised/attribute/missingvaluesinjection/AbstractInjectionWithRange.java",
"license": "gpl-3.0",
"size": 5616
} | [
"java.util.Collections",
"java.util.Vector"
] | import java.util.Collections; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,499,092 |
public List<AstNode> getChildrenForType( AstNode astNode,
String nodeType ) {
CheckArg.isNotNull(astNode, "astNode");
CheckArg.isNotNull(nodeType, "nodeType");
List<AstNode> childrenOfType = new ArrayList<AstNode>();
for (AstNode child : ... | List<AstNode> function( AstNode astNode, String nodeType ) { CheckArg.isNotNull(astNode, STR); CheckArg.isNotNull(nodeType, STR); List<AstNode> childrenOfType = new ArrayList<AstNode>(); for (AstNode child : astNode.getChildren()) { if (hasMixinType(child, nodeType)) { childrenOfType.add(child); } List<AstNode> subChil... | /**
* Utility method to obtain the children of a given node that match the given type
*
* @param astNode the parent node; may not be null
* @param nodeType the type property of the target child node; may not be null
* @return the list of typed nodes (may be empty)
*/ | Utility method to obtain the children of a given node that match the given type | getChildrenForType | {
"repo_name": "vhalbert/modeshape",
"path": "sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/node/AstNodeFactory.java",
"license": "apache-2.0",
"size": 5957
} | [
"java.util.ArrayList",
"java.util.List",
"org.modeshape.common.util.CheckArg"
] | import java.util.ArrayList; import java.util.List; import org.modeshape.common.util.CheckArg; | import java.util.*; import org.modeshape.common.util.*; | [
"java.util",
"org.modeshape.common"
] | java.util; org.modeshape.common; | 2,128,761 |
static FSImageCompression createCompression(Configuration conf, boolean forceUncompressed)
throws IOException {
boolean compressImage = (!forceUncompressed) && conf.getBoolean(
HdfsConstants.DFS_IMAGE_COMPRESS_KEY,
HdfsConstants.DFS_IMAGE_COMPRESS_DEFAULT);
if (!compressImage) {
return ... | static FSImageCompression createCompression(Configuration conf, boolean forceUncompressed) throws IOException { boolean compressImage = (!forceUncompressed) && conf.getBoolean( HdfsConstants.DFS_IMAGE_COMPRESS_KEY, HdfsConstants.DFS_IMAGE_COMPRESS_DEFAULT); if (!compressImage) { return createNoopCompression(); } String... | /**
* Create a compression instance based on the user's configuration in the given
* Configuration object.
* @throws IOException if the specified codec is not available.
*/ | Create a compression instance based on the user's configuration in the given Configuration object | createCompression | {
"repo_name": "iVCE/RDFS",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImageCompression.java",
"license": "apache-2.0",
"size": 5816
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.common.HdfsConstants"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.common.HdfsConstants; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.common.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,883,579 |
private void addToDefIfLocal( String name, @Nullable Node node,
@Nullable Node rValue, MustDef def) {
Var var = jsScope.getVar(name);
// var might be null because the variable might be defined in the extern
// that we might not traverse.
if (var == null || var.scope != jsScope) {
return;
... | void function( String name, @Nullable Node node, @Nullable Node rValue, MustDef def) { Var var = jsScope.getVar(name); if (var == null var.scope != jsScope) { return; } for (Var other : def.reachingDef.keySet()) { Definition otherDef = def.reachingDef.get(other); if (otherDef == null) { continue; } if (otherDef.depends... | /**
* Set the variable lattice for the given name to the node value in the def
* lattice. Do nothing if the variable name is one of the escaped variable.
*
* @param node The CFG node where the definition should be record to.
* {@code null} if this is a conditional define.
*/ | Set the variable lattice for the given name to the node value in the def lattice. Do nothing if the variable name is one of the escaped variable | addToDefIfLocal | {
"repo_name": "JonathanWalsh/Granule-Closure-Compiler",
"path": "src/com/google/javascript/jscomp/MustBeReachingVariableDef.java",
"license": "apache-2.0",
"size": 14008
} | [
"com.google.javascript.jscomp.Scope",
"com.google.javascript.rhino.Node",
"javax.annotation.Nullable"
] | import com.google.javascript.jscomp.Scope; import com.google.javascript.rhino.Node; import javax.annotation.Nullable; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import javax.annotation.*; | [
"com.google.javascript",
"javax.annotation"
] | com.google.javascript; javax.annotation; | 467,186 |
private void resetToolbarContainerPosition() {
if (m_toolbarContainer != null) {
CmsPositionBean position = CmsPositionBean.generatePositionInfo(m_contentElement);
m_toolbarContainer.getStyle().setTop(position.getTop() - 5, Unit.PX);
m_toolbarContainer.getStyle().se... | void function() { if (m_toolbarContainer != null) { CmsPositionBean position = CmsPositionBean.generatePositionInfo(m_contentElement); m_toolbarContainer.getStyle().setTop(position.getTop() - 5, Unit.PX); m_toolbarContainer.getStyle().setLeft(position.getLeft(), Unit.PX); } } | /**
* Resets the in line editing toolbar position.<p>
*/ | Resets the in line editing toolbar position | resetToolbarContainerPosition | {
"repo_name": "mediaworx/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/widgets/CmsTinyMCEWidget.java",
"license": "lgpl-2.1",
"size": 26076
} | [
"com.google.gwt.dom.client.Style",
"org.opencms.gwt.client.util.CmsPositionBean"
] | import com.google.gwt.dom.client.Style; import org.opencms.gwt.client.util.CmsPositionBean; | import com.google.gwt.dom.client.*; import org.opencms.gwt.client.util.*; | [
"com.google.gwt",
"org.opencms.gwt"
] | com.google.gwt; org.opencms.gwt; | 485,073 |
public ErrorListener getErrorListener() {
return ThrowingErrorListener.INSTANCE;
} | ErrorListener function() { return ThrowingErrorListener.INSTANCE; } | /**
* Returns ErrorListener implementation which just throws the original error.
*/ | Returns ErrorListener implementation which just throws the original error | getErrorListener | {
"repo_name": "emre-aydin/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/util/XmlUtil.java",
"license": "apache-2.0",
"size": 12557
} | [
"javax.xml.transform.ErrorListener"
] | import javax.xml.transform.ErrorListener; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 389,921 |
private void performFlick(WebElement elem, int xOffset, int yOffset) throws InterruptedException {
flick(elem, xOffset, yOffset);
pause(1000);
} | void function(WebElement elem, int xOffset, int yOffset) throws InterruptedException { flick(elem, xOffset, yOffset); pause(1000); } | /**
* Perform swipe gesture
* @param elem
* @param xOffset
* @param yOffset
* @throws InterruptedException
*/ | Perform swipe gesture | performFlick | {
"repo_name": "lhong375/aura",
"path": "aura/src/test/java/org/auraframework/components/ui/infiniteListRow/infiniteListRowUITest.java",
"license": "apache-2.0",
"size": 13391
} | [
"org.openqa.selenium.WebElement"
] | import org.openqa.selenium.WebElement; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 610,986 |
public Type pipeline(Endpoint... endpoints) {
return to(endpoints);
} | Type function(Endpoint... endpoints) { return to(endpoints); } | /**
* <a href="http://camel.apache.org/pipes-nd-filters.html">Pipes and Filters EIP:</a>
* Creates a {@link Pipeline} of the list of endpoints so that the message
* will get processed by each endpoint in turn and for request/response the
* output of one endpoint will be the input of the next endpoin... | Creates a <code>Pipeline</code> of the list of endpoints so that the message will get processed by each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint | pipeline | {
"repo_name": "kingargyle/turmeric-bot",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 115380
} | [
"org.apache.camel.Endpoint"
] | import org.apache.camel.Endpoint; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,811,505 |
public ApiKey getApiKeyById(int apiKeyId) throws RMapAuthException {
return apiKeyDao.getApiKeyById(apiKeyId);
}
| ApiKey function(int apiKeyId) throws RMapAuthException { return apiKeyDao.getApiKeyById(apiKeyId); } | /**
* Retrieve an API key based on a specific apiKey identifier.
*
* @param apiKeyId the API key ID
* @return the API key by API key ID
* @throws RMapAuthException the RMap Auth exception
*/ | Retrieve an API key based on a specific apiKey identifier | getApiKeyById | {
"repo_name": "rmap-project/rmap",
"path": "auth/src/main/java/info/rmapproject/auth/service/ApiKeyServiceImpl.java",
"license": "apache-2.0",
"size": 7378
} | [
"info.rmapproject.auth.exception.RMapAuthException",
"info.rmapproject.auth.model.ApiKey"
] | import info.rmapproject.auth.exception.RMapAuthException; import info.rmapproject.auth.model.ApiKey; | import info.rmapproject.auth.exception.*; import info.rmapproject.auth.model.*; | [
"info.rmapproject.auth"
] | info.rmapproject.auth; | 234,671 |
public static boolean isGrpcWeb(SerializationFormat format) {
requireNonNull(format, "format");
return format == PROTO_WEB || format == JSON_WEB;
}
private GrpcSerializationFormats() {} | static boolean function(SerializationFormat format) { requireNonNull(format, STR); return format == PROTO_WEB format == JSON_WEB; } private GrpcSerializationFormats() {} | /**
* Returns whether the specified {@link SerializationFormat} is GRPC-web, the subset of GRPC that supports
* browsers.
*/ | Returns whether the specified <code>SerializationFormat</code> is GRPC-web, the subset of GRPC that supports browsers | isGrpcWeb | {
"repo_name": "jonefeewang/armeria",
"path": "grpc/src/main/java/com/linecorp/armeria/common/grpc/GrpcSerializationFormats.java",
"license": "apache-2.0",
"size": 2925
} | [
"com.linecorp.armeria.common.SerializationFormat",
"java.util.Objects"
] | import com.linecorp.armeria.common.SerializationFormat; import java.util.Objects; | import com.linecorp.armeria.common.*; import java.util.*; | [
"com.linecorp.armeria",
"java.util"
] | com.linecorp.armeria; java.util; | 1,500,647 |
public List<C> getCompounds(int index) {
return get(index).getAsList();
} | List<C> function(int index) { return get(index).getAsList(); } | /**
* For a given position into the windowed view this will return those
* compounds we can see in the window. i.e. in the sequence AGGCCT requesting
* index 1 returns AGG and requesting index 2 return CCT.
*
* @param index Windowed index position
* @return The List of compounds
*/ | For a given position into the windowed view this will return those compounds we can see in the window. i.e. in the sequence AGGCCT requesting index 1 returns AGG and requesting index 2 return CCT | getCompounds | {
"repo_name": "emckee2006/biojava",
"path": "biojava-core/src/main/java/org/biojava/nbio/core/sequence/views/WindowedSequence.java",
"license": "lgpl-2.1",
"size": 4623
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,215,307 |
public void insertString(int offset, String str, AttributeSet a)
throws BadLocationException {
if (m_AddMatchingEndBlocks && (m_BlockStart.length() > 0) && str.equals(m_BlockStart))
str = addMatchingBlockEnd(offset);
else if (m_UseBlanks && str.equals("\t"))
str = m_Indentation;
sup... | void function(int offset, String str, AttributeSet a) throws BadLocationException { if (m_AddMatchingEndBlocks && (m_BlockStart.length() > 0) && str.equals(m_BlockStart)) str = addMatchingBlockEnd(offset); else if (m_UseBlanks && str.equals("\t")) str = m_Indentation; super.insertString(offset, str, a); processChangedL... | /**
* Override to apply syntax highlighting after the document has been updated.
*
* @param offset
* the offset
* @param str
* the string to insert
* @param a
* the attribute set, can be null
* @throws BadLocationException
* if offset is invalid
*/ | Override to apply syntax highlighting after the document has been updated | insertString | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/scripting/SyntaxDocument.java",
"license": "gpl-3.0",
"size": 33697
} | [
"javax.swing.text.AttributeSet",
"javax.swing.text.BadLocationException"
] | import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 1,017,345 |
@Test
public void testGetYMax() {
System.out.println( "=== testGetYMax() ===");
stopwatch.reset();stopwatch.start();
RdfInstAdpFactoryWrap factory = inj.getInstance(RdfInstAdpFactoryWrap.class);
IBox box1 = factory.createAdp(boxRes1, IBox.class);
Assert.assertEquals(50, box1.as(IQntBlock.class).getYMax... | void function() { System.out.println( STR); stopwatch.reset();stopwatch.start(); RdfInstAdpFactoryWrap factory = inj.getInstance(RdfInstAdpFactoryWrap.class); IBox box1 = factory.createAdp(boxRes1, IBox.class); Assert.assertEquals(50, box1.as(IQntBlock.class).getYMax(), 0); IQntBlock qntBox2 = factory.createAdp(boxRes2... | /**
* Test method for {@link tuwien.dbai.wpps.core.wpmodel.physmodel.bgm.instadp.rdfimpl.QntBlockImpl#getYMax(com.hp.hpl.jena.rdf.model.Resource, com.hp.hpl.jena.rdf.model.Model)}.
*/ | Test method for <code>tuwien.dbai.wpps.core.wpmodel.physmodel.bgm.instadp.rdfimpl.QntBlockImpl#getYMax(com.hp.hpl.jena.rdf.model.Resource, com.hp.hpl.jena.rdf.model.Model)</code> | testGetYMax | {
"repo_name": "ruslanrf/wpps",
"path": "wpps_plugins/tuwien.dbai.wpps.core/test/tuwien/dbai/wpps/core/junit/test/physmodel/bgm/adp/instadp/rdfimpl/TestQntBlockImpl.java",
"license": "gpl-2.0",
"size": 13161
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,211,951 |
public static void upload(String hostName, String username, String password, String localFilePath, String remoteFilePath) {
File file = new File(localFilePath);
if (!file.exists()) {
throw new RuntimeException("Error. Local file not found");
}
StandardFileSystemManager ... | static void function(String hostName, String username, String password, String localFilePath, String remoteFilePath) { File file = new File(localFilePath); if (!file.exists()) { throw new RuntimeException(STR); } StandardFileSystemManager manager = new StandardFileSystemManager(); try { manager.init(); FileObject local... | /**
* Method to upload a file in Remote server
*
* @param hostName HostName of the server
* @param username UserName to login
* @param password Password to login
* @param localFilePath LocalFilePath. Should contain the entire local file
* path - Directory and Filename with \\ as separ... | Method to upload a file in Remote server | upload | {
"repo_name": "ljug/sftpExample",
"path": "sftpExamples/src/sftpexamples/SftpUtility.java",
"license": "mit",
"size": 10242
} | [
"java.io.File",
"org.apache.commons.vfs2.FileObject",
"org.apache.commons.vfs2.Selectors",
"org.apache.commons.vfs2.impl.StandardFileSystemManager"
] | import java.io.File; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.Selectors; import org.apache.commons.vfs2.impl.StandardFileSystemManager; | import java.io.*; import org.apache.commons.vfs2.*; import org.apache.commons.vfs2.impl.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,155,251 |
private void notifyInterfaceLinkStateChanged(String iface, boolean up) {
final int length = mObservers.beginBroadcast();
for (int i = 0; i < length; i++) {
try {
mObservers.getBroadcastItem(i).interfaceLinkStateChanged(iface, up);
} catch (RemoteException e) {... | void function(String iface, boolean up) { final int length = mObservers.beginBroadcast(); for (int i = 0; i < length; i++) { try { mObservers.getBroadcastItem(i).interfaceLinkStateChanged(iface, up); } catch (RemoteException e) { } catch (RuntimeException e) { } } mObservers.finishBroadcast(); } | /**
* Notify our observers of an interface link state change
* (typically, an Ethernet cable has been plugged-in or unplugged).
*/ | Notify our observers of an interface link state change (typically, an Ethernet cable has been plugged-in or unplugged) | notifyInterfaceLinkStateChanged | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/base/services/java/com/android/server/NetworkManagementService.java",
"license": "apache-2.0",
"size": 66965
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,897,063 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<DeletedSiteInner> listAsync(Context context) {
return new PagedFlux<>(
() -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DeletedSiteInner> function(Context context) { return new PagedFlux<>( () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); } | /**
* Description for Get all deleted apps for a subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is rejected by server.
... | Description for Get all deleted apps for a subscription | listAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/DeletedWebAppsClientImpl.java",
"license": "mit",
"size": 30592
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.DeletedSiteInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.DeletedSiteInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 319,205 |
private MockResponse truncateViolently(MockResponse response, int numBytesToKeep) {
response.setSocketPolicy(DISCONNECT_AT_END);
List<String> headers = new ArrayList<String>(response.getHeaders());
response.setBody(Arrays.copyOfRange(response.getBody(), 0, numBytesToKeep));
response.getHeaders().clear... | MockResponse function(MockResponse response, int numBytesToKeep) { response.setSocketPolicy(DISCONNECT_AT_END); List<String> headers = new ArrayList<String>(response.getHeaders()); response.setBody(Arrays.copyOfRange(response.getBody(), 0, numBytesToKeep)); response.getHeaders().clear(); response.getHeaders().addAll(he... | /**
* Shortens the body of {@code response} but not the corresponding headers.
* Only useful to test how clients respond to the premature conclusion of
* the HTTP body.
*/ | Shortens the body of response but not the corresponding headers. Only useful to test how clients respond to the premature conclusion of the HTTP body | truncateViolently | {
"repo_name": "DirtyUnicorns/android_external_okhttp",
"path": "okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/HttpResponseCacheTest.java",
"license": "apache-2.0",
"size": 88854
} | [
"com.squareup.okhttp.mockwebserver.MockResponse",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List"
] | import com.squareup.okhttp.mockwebserver.MockResponse; import java.util.ArrayList; import java.util.Arrays; import java.util.List; | import com.squareup.okhttp.mockwebserver.*; import java.util.*; | [
"com.squareup.okhttp",
"java.util"
] | com.squareup.okhttp; java.util; | 1,544,220 |
@Test
public void testComputeLayer3Topology_SubInterfaceWithoutLinkLocalAddresses() {
_cb.setConfigurationFormat(ConfigurationFormat.CISCO_IOS);
Configuration c1 = _cb.setHostname("c1").build();
Configuration c2 = _cb.setHostname("c2").build();
Interface i1 = _ib.setOwner(c1).setName("ae1").setType(... | void function() { _cb.setConfigurationFormat(ConfigurationFormat.CISCO_IOS); Configuration c1 = _cb.setHostname("c1").build(); Configuration c2 = _cb.setHostname("c2").build(); Interface i1 = _ib.setOwner(c1).setName("ae1").setType(InterfaceType.AGGREGATED).build(); Interface i1sub = _ib.setOwner(c1) .setName("ae1.1") ... | /**
* Test that aggregate subinterfaces that have mis-matched, concrete (not link-local) addresses
* and are in the same broadcast domain do not get an L3 edge
*/ | Test that aggregate subinterfaces that have mis-matched, concrete (not link-local) addresses and are in the same broadcast domain do not get an L3 edge | testComputeLayer3Topology_SubInterfaceWithoutLinkLocalAddresses | {
"repo_name": "dhalperi/batfish",
"path": "projects/batfish-common-protocol/src/test/java/org/batfish/common/topology/TopologyUtilTest.java",
"license": "apache-2.0",
"size": 73493
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableMap",
"com.google.common.collect.ImmutableSet",
"com.google.common.collect.ImmutableSortedSet",
"java.util.Map",
"org.batfish.common.topology.TopologyUtil",
"org.batfish.datamodel.ConcreteInterfaceAddress",
"org.batfish.dat... | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import java.util.Map; import org.batfish.common.topology.TopologyUtil; import org.batfish.datamodel.ConcreteInterfaceAddress;... | import com.google.common.collect.*; import java.util.*; import org.batfish.common.topology.*; import org.batfish.datamodel.*; import org.hamcrest.*; import org.junit.*; | [
"com.google.common",
"java.util",
"org.batfish.common",
"org.batfish.datamodel",
"org.hamcrest",
"org.junit"
] | com.google.common; java.util; org.batfish.common; org.batfish.datamodel; org.hamcrest; org.junit; | 1,364,232 |
public static SortedMap<Integer, RevCommit> getCommitsWithTime(final Git git)
throws IOException, NoHeadException, GitAPIException {
final SortedMap<Integer, RevCommit> commitsInTime = Maps.newTreeMap();
final RevWalk walk = new RevWalk(git.getRepository());
final Iterable<RevCommit> logs = git.log().call... | static SortedMap<Integer, RevCommit> function(final Git git) throws IOException, NoHeadException, GitAPIException { final SortedMap<Integer, RevCommit> commitsInTime = Maps.newTreeMap(); final RevWalk walk = new RevWalk(git.getRepository()); final Iterable<RevCommit> logs = git.log().call(); final Iterator<RevCommit> i... | /**
* Return all the commits given the time.
*
* @param git
* @return
* @throws IOException
* @throws NoHeadException
* @throws GitAPIException
*/ | Return all the commits given the time | getCommitsWithTime | {
"repo_name": "mast-group/commitmining-tools",
"path": "src/main/java/committools/data/GitCommitUtils.java",
"license": "bsd-3-clause",
"size": 5730
} | [
"com.google.common.collect.Maps",
"java.io.IOException",
"java.util.Iterator",
"java.util.SortedMap",
"org.eclipse.jgit.api.Git",
"org.eclipse.jgit.api.errors.GitAPIException",
"org.eclipse.jgit.api.errors.NoHeadException",
"org.eclipse.jgit.revwalk.RevCommit",
"org.eclipse.jgit.revwalk.RevWalk"
] | import com.google.common.collect.Maps; import java.io.IOException; import java.util.Iterator; import java.util.SortedMap; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.NoHeadException; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse... | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.eclipse.jgit.api.*; import org.eclipse.jgit.api.errors.*; import org.eclipse.jgit.revwalk.*; | [
"com.google.common",
"java.io",
"java.util",
"org.eclipse.jgit"
] | com.google.common; java.io; java.util; org.eclipse.jgit; | 2,123,462 |
public static QDataSet transpose(QDataSet ds) {
return DDataSet.copy(new TransposeRank2DataSet(ds));
} | static QDataSet function(QDataSet ds) { return DDataSet.copy(new TransposeRank2DataSet(ds)); } | /**
* transpose the rank 2 dataset. result[i,j]= ds[j,i] for each i,j.
* @param ds rank 2 dataset
* @return rank 2 dataset
*/ | transpose the rank 2 dataset. result[i,j]= ds[j,i] for each i,j | transpose | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.DDataSet",
"org.das2.qds.QDataSet",
"org.das2.qds.TransposeRank2DataSet"
] | import org.das2.qds.DDataSet; import org.das2.qds.QDataSet; import org.das2.qds.TransposeRank2DataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 525,097 |
private void onAddAttachment2(final String mime_type) {
if (mAccount.getCryptoProvider().isAvailable(this)) {
Toast.makeText(this, R.string.attachment_encryption_unsupported, Toast.LENGTH_LONG).show();
}
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Inte... | void function(final String mime_type) { if (mAccount.getCryptoProvider().isAvailable(this)) { Toast.makeText(this, R.string.attachment_encryption_unsupported, Toast.LENGTH_LONG).show(); } Intent i = new Intent(Intent.ACTION_GET_CONTENT); i.addCategory(Intent.CATEGORY_OPENABLE); i.setType(mime_type); mIgnoreOnPause = tr... | /**
* Kick off a picker for the specified MIME type and let Android take over.
*
* @param mime_type
* The MIME type we want our attachment to have.
*/ | Kick off a picker for the specified MIME type and let Android take over | onAddAttachment2 | {
"repo_name": "hoverkey/honeybee",
"path": "sdk/examples/k9mail/src/com/fsck/k9/activity/MessageCompose.java",
"license": "lgpl-3.0",
"size": 152924
} | [
"android.content.Intent",
"android.widget.Toast"
] | import android.content.Intent; import android.widget.Toast; | import android.content.*; import android.widget.*; | [
"android.content",
"android.widget"
] | android.content; android.widget; | 2,710,612 |
void applyPosition(Coordinate coordinate); | void applyPosition(Coordinate coordinate); | /**
* Re-centers the map to a new position.
*
* @param coordinate
* the new center position
*/ | Re-centers the map to a new position | applyPosition | {
"repo_name": "lat-lon/geomajas",
"path": "plugin/geomajas-plugin-javascript-api/geomajas-plugin-javascript-api/src/main/java/org/geomajas/plugin/jsapi/client/map/ViewPort.java",
"license": "agpl-3.0",
"size": 4165
} | [
"org.geomajas.geometry.Coordinate"
] | import org.geomajas.geometry.Coordinate; | import org.geomajas.geometry.*; | [
"org.geomajas.geometry"
] | org.geomajas.geometry; | 1,272,848 |
public static String getDAYOFWEEK(String strDate) {
String dia = null;
Calendar calendar = Calendar.getInstance();
calendar.setTime(convertStringToDate(strDate));
switch (calendar.get(Calendar.DAY_OF_WEEK)) {
case Calendar.SUNDAY:
dia = "DOMINGO";
... | static String function(String strDate) { String dia = null; Calendar calendar = Calendar.getInstance(); calendar.setTime(convertStringToDate(strDate)); switch (calendar.get(Calendar.DAY_OF_WEEK)) { case Calendar.SUNDAY: dia = STR; break; case Calendar.MONDAY: dia = "LUNES"; break; case Calendar.TUESDAY: dia = STR; brea... | /**
* Regresa el dia de la semana, dada la fecha DOMINGO, LUNES, MARTES, MIERCOLES, JUEVES, VIERNES, SABADO
*
* @param strDate Fecha
*
* @return String Dia de la semana
*/ | Regresa el dia de la semana, dada la fecha DOMINGO, LUNES, MARTES, MIERCOLES, JUEVES, VIERNES, SABADO | getDAYOFWEEK | {
"repo_name": "itzamnamx/nibble",
"path": "nibble/src/java/org/nibble/util/UtilDate.java",
"license": "apache-2.0",
"size": 8742
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 453,074 |
public static <T extends Block> T registerBlock(int id, ResourceLocation name, T block) {
injectBlock(id, name, block);
applyPostRegisterConditions(block);
return block;
} | static <T extends Block> T function(int id, ResourceLocation name, T block) { injectBlock(id, name, block); applyPostRegisterConditions(block); return block; } | /**
* Registers and initialises a block in the block registry.
*
* @param id The ID of the block.
* @param name The name to register the block as
* @param block The block to add
*
* @return the block for simplicity
*/ | Registers and initialises a block in the block registry | registerBlock | {
"repo_name": "BlazeLoader/BlazeLoader",
"path": "src/main/com/blazeloader/api/block/ApiBlock.java",
"license": "bsd-2-clause",
"size": 12935
} | [
"net.minecraft.block.Block",
"net.minecraft.util.ResourceLocation"
] | import net.minecraft.block.Block; import net.minecraft.util.ResourceLocation; | import net.minecraft.block.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 1,498,897 |
public void setBufferedColor(@ColorInt int bufferedColor) {
bufferedPaint.setColor(bufferedColor);
invalidate(seekBounds);
} | void function(@ColorInt int bufferedColor) { bufferedPaint.setColor(bufferedColor); invalidate(seekBounds); } | /**
* Sets the color for the portion of the time bar after the current played position up to the
* current buffered position.
*
* @param bufferedColor The color for the portion of the time bar after the current played
* position up to the current buffered position.
*/ | Sets the color for the portion of the time bar after the current played position up to the current buffered position | setBufferedColor | {
"repo_name": "MaTriXy/ExoPlayer",
"path": "library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java",
"license": "apache-2.0",
"size": 30286
} | [
"android.support.annotation.ColorInt"
] | import android.support.annotation.ColorInt; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 2,331,187 |
public void testBlockAfterFindByIdFE(PrintWriter out) throws Exception {
final TaskStatus<Integer> statusE1 = scheduler.schedule((Callable<Integer>) new DBIncrementTask("testBlockAfterFindByIdFE-e1"), 64, TimeUnit.DAYS);
final TaskStatus<Integer> statusE2 = scheduler.schedule((Callable<Integer>) new... | void function(PrintWriter out) throws Exception { final TaskStatus<Integer> statusE1 = scheduler.schedule((Callable<Integer>) new DBIncrementTask(STR), 64, TimeUnit.DAYS); final TaskStatus<Integer> statusE2 = scheduler.schedule((Callable<Integer>) new DBIncrementTask(STR), 65, TimeUnit.DAYS); | /**
* Find tasks based on their Task ID and block for a while without committing to determine if this interferes with other operations.
*/ | Find tasks based on their Task ID and block for a while without committing to determine if this interferes with other operations | testBlockAfterFindByIdFE | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat/test-applications/schedtest/src/web/SchedulerFATServlet.java",
"license": "epl-1.0",
"size": 196518
} | [
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.PrintWriter",
"java.util.concurrent.Callable",
"java.util.concurrent.TimeUnit"
] | import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*; | [
"com.ibm.websphere",
"java.io",
"java.util"
] | com.ibm.websphere; java.io; java.util; | 2,398,486 |
public void onMessageEvent(@Observes(during = TransactionPhase.AFTER_SUCCESS) MqttMessageEvent event) {
try {
MqttConnection.publish(settings, event.getSubtopic(), event.getData());
} catch (JsonProcessingException | MqttException e) {
logger.error("Failed to publish MQTT message", e);
}
} | void function(@Observes(during = TransactionPhase.AFTER_SUCCESS) MqttMessageEvent event) { try { MqttConnection.publish(settings, event.getSubtopic(), event.getData()); } catch (JsonProcessingException MqttException e) { logger.error(STR, e); } } | /**
* Event handler for publishing mqtt messages on transaction end
*
* @param event event
*/ | Event handler for publishing mqtt messages on transaction end | onMessageEvent | {
"repo_name": "Metatavu/edelphi",
"path": "rest/src/main/java/fi/metatavu/edelphi/mqtt/MqttController.java",
"license": "gpl-3.0",
"size": 1728
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"fi.metatavu.edelphi.rest.mqtt.MqttMessageEvent",
"javax.enterprise.event.Observes",
"javax.enterprise.event.TransactionPhase",
"org.eclipse.paho.client.mqttv3.MqttException"
] | import com.fasterxml.jackson.core.JsonProcessingException; import fi.metatavu.edelphi.rest.mqtt.MqttMessageEvent; import javax.enterprise.event.Observes; import javax.enterprise.event.TransactionPhase; import org.eclipse.paho.client.mqttv3.MqttException; | import com.fasterxml.jackson.core.*; import fi.metatavu.edelphi.rest.mqtt.*; import javax.enterprise.event.*; import org.eclipse.paho.client.mqttv3.*; | [
"com.fasterxml.jackson",
"fi.metatavu.edelphi",
"javax.enterprise",
"org.eclipse.paho"
] | com.fasterxml.jackson; fi.metatavu.edelphi; javax.enterprise; org.eclipse.paho; | 1,910,351 |
void setNextReader(LeafReaderContext readerContext) throws IOException; | void setNextReader(LeafReaderContext readerContext) throws IOException; | /**
* Called when moving to the next {@link LeafReaderContext} for a set of hits
*/ | Called when moving to the next <code>LeafReaderContext</code> for a set of hits | setNextReader | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/fetch/FetchSubPhaseProcessor.java",
"license": "apache-2.0",
"size": 1233
} | [
"java.io.IOException",
"org.apache.lucene.index.LeafReaderContext"
] | import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; | import java.io.*; import org.apache.lucene.index.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 261,170 |
private void placeNode(ClassdiagramNode node) {
Vector uplinks = node.getUplinks();
Vector downlinks = node.getDownlinks();
int curW = node.getSize().width;
double xOffset = node.getSize().width + getHGap();
int bumpX = getHGap() / 2; // (xOffset - curW) / 2;
int xPos... | void function(ClassdiagramNode node) { Vector uplinks = node.getUplinks(); Vector downlinks = node.getDownlinks(); int curW = node.getSize().width; double xOffset = node.getSize().width + getHGap(); int bumpX = getHGap() / 2; int xPosNew = Math.max(xPos + bumpX, uplinks.size() == 1 ? node.getPlacementHint() : -1); node... | /**
* Set the placement coordinate for a given node.
*
* @param node
* To be placed.
*/ | Set the placement coordinate for a given node | placeNode | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/graph/src/gov/nih/nci/cagrid/graph/uml/classdiagram/ClassdiagramLayouter.java",
"license": "bsd-3-clause",
"size": 20481
} | [
"java.awt.Point",
"java.util.Vector"
] | import java.awt.Point; import java.util.Vector; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,758,653 |
List<AbstractFile> getRootFileObjects() {
List<AbstractFile> ret = new ArrayList<>();
for (UnpackedNode child : rootNode.children) {
ret.add(child.getFile());
}
return ret;
} | List<AbstractFile> getRootFileObjects() { List<AbstractFile> ret = new ArrayList<>(); for (UnpackedNode child : rootNode.children) { ret.add(child.getFile()); } return ret; } | /**
* Get the root file objects (after createDerivedFiles() ) of this tree,
* so that they can be rescheduled.
*
* @return root objects of this unpacked tree
*/ | Get the root file objects (after createDerivedFiles() ) of this tree, so that they can be rescheduled | getRootFileObjects | {
"repo_name": "narfindustries/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/SevenZipExtractor.java",
"license": "apache-2.0",
"size": 45210
} | [
"java.util.ArrayList",
"java.util.List",
"org.sleuthkit.datamodel.AbstractFile"
] | import java.util.ArrayList; import java.util.List; import org.sleuthkit.datamodel.AbstractFile; | import java.util.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 1,695,165 |
public BigDecimal getRatioTotal ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RatioTotal);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RatioTotal); if (bd == null) return Env.ZERO; return bd; } | /** Get Total Ratio.
@return Total of relative weight in a distribution
*/ | Get Total Ratio | getRatioTotal | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_M_DistributionList.java",
"license": "gpl-2.0",
"size": 5490
} | [
"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; | 433,537 |
public void load()
{
if (index == COPY_AND_PASTE)
handle = dmView.addExistingObjects(ctx, objectsToUpdate, null,
this);
else if ((index == CUT_AND_PASTE) || (index == CUT)) {
boolean admin = false;
Browser browser = viewer.getSelectedBrowser();
... | void function() { if (index == COPY_AND_PASTE) handle = dmView.addExistingObjects(ctx, objectsToUpdate, null, this); else if ((index == CUT_AND_PASTE) (index == CUT)) { boolean admin = false; Browser browser = viewer.getSelectedBrowser(); if (browser != null) admin = browser.getBrowserType() == Browser.ADMIN_EXPLORER; ... | /**
* Saves the data.
* @see DataTreeViewerLoader#load()
*/ | Saves the data | load | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/DataObjectUpdater.java",
"license": "gpl-2.0",
"size": 6153
} | [
"org.openmicroscopy.shoola.agents.treeviewer.browser.Browser"
] | import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; | import org.openmicroscopy.shoola.agents.treeviewer.browser.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 314,999 |
public TableKeysAndAttributes addPrimaryKey(PrimaryKey primaryKey) {
if (primaryKey != null) {
if (primaryKeys == null)
primaryKeys = new ArrayList<PrimaryKey>();
checkConsistency(primaryKey);
this.primaryKeys.add(primaryKey);
}
return this... | TableKeysAndAttributes function(PrimaryKey primaryKey) { if (primaryKey != null) { if (primaryKeys == null) primaryKeys = new ArrayList<PrimaryKey>(); checkConsistency(primaryKey); this.primaryKeys.add(primaryKey); } return this; } | /**
* Adds a primary key to be included in the batch get-item operation. A
* primary key could consist of either a hash-key or both a
* hash-key and a range-key depending on the schema of the table.
*/ | Adds a primary key to be included in the batch get-item operation. A primary key could consist of either a hash-key or both a hash-key and a range-key depending on the schema of the table | addPrimaryKey | {
"repo_name": "dagnir/aws-sdk-java",
"path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/TableKeysAndAttributes.java",
"license": "apache-2.0",
"size": 11365
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,500,969 |
@Transactional(readOnly=true)
public ControlHistory getLastJob(AuthzSubject subject, AppdefEntityID id) throws ApplicationException {
Collection<ControlHistory> historyLocals = controlHistoryDAO.findByEntityStartTime(id.getType(), id.getID(),
false);
for (ControlHistory cLocal : his... | @Transactional(readOnly=true) ControlHistory function(AuthzSubject subject, AppdefEntityID id) throws ApplicationException { Collection<ControlHistory> historyLocals = controlHistoryDAO.findByEntityStartTime(id.getType(), id.getID(), false); for (ControlHistory cLocal : historyLocals) { if (!cLocal.getStatus().equals(C... | /**
* Obtain the last control action that fired. Returns null if there are no
* previous events. This ignores jobs that are in progress.
*
*
*
*/ | Obtain the last control action that fired. Returns null if there are no previous events. This ignores jobs that are in progress | getLastJob | {
"repo_name": "cc14514/hq6",
"path": "hq-server/src/main/java/org/hyperic/hq/control/server/session/ControlScheduleManagerImpl.java",
"license": "unlicense",
"size": 28539
} | [
"java.util.Collection",
"org.hyperic.hq.appdef.shared.AppdefEntityID",
"org.hyperic.hq.authz.server.session.AuthzSubject",
"org.hyperic.hq.common.ApplicationException",
"org.hyperic.hq.control.shared.ControlConstants",
"org.springframework.transaction.annotation.Transactional"
] | import java.util.Collection; import org.hyperic.hq.appdef.shared.AppdefEntityID; import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.common.ApplicationException; import org.hyperic.hq.control.shared.ControlConstants; import org.springframework.transaction.annotation.Transactional; | import java.util.*; import org.hyperic.hq.appdef.shared.*; import org.hyperic.hq.authz.server.session.*; import org.hyperic.hq.common.*; import org.hyperic.hq.control.shared.*; import org.springframework.transaction.annotation.*; | [
"java.util",
"org.hyperic.hq",
"org.springframework.transaction"
] | java.util; org.hyperic.hq; org.springframework.transaction; | 1,369,776 |
@WebMethod
@Path("/setRoleDescription")
@Produces("text/plain")
@GET
public String setRoleDescription(
@WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
@WebParam(name = "authzgroupid", partName = "authzgroupid") @QueryParam("aut... | @Path(STR) @Produces(STR) String function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String authzgroupid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String roleid, @WebParam(name = STR, partName = STR) @QueryParam(STR) Str... | /**
* Edit a role's description
*
* @param sessionid the id of a valid session
* @param authzgroupid the id of the authzgroup that the role exists in
* @param roleid the id of the role to edit
* @param description the updated description for the role
* @return success or exc... | Edit a role's description | setRoleDescription | {
"repo_name": "pushyamig/sakai",
"path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java",
"license": "apache-2.0",
"size": 209455
} | [
"javax.jws.WebParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"org.sakaiproject.authz.api.AuthzGroup",
"org.sakaiproject.authz.api.Role",
"org.sakaiproject.tool.api.Session"
] | import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.authz.api.Role; import org.sakaiproject.tool.api.Session; | import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*; | [
"javax.jws",
"javax.ws",
"org.sakaiproject.authz",
"org.sakaiproject.tool"
] | javax.jws; javax.ws; org.sakaiproject.authz; org.sakaiproject.tool; | 1,446,564 |
public static void main(final String[] args)
{
// initialize JFreeReport
ClassicEngineBoot.getInstance().start();
final ConditionalGroupDemo handler = new ConditionalGroupDemo();
final SimpleDemoFrame frame = new SimpleDemoFrame(handler);
frame.init();
frame.pack();
LibSwingUtil.centerF... | static void function(final String[] args) { ClassicEngineBoot.getInstance().start(); final ConditionalGroupDemo handler = new ConditionalGroupDemo(); final SimpleDemoFrame frame = new SimpleDemoFrame(handler); frame.init(); frame.pack(); LibSwingUtil.centerFrameOnScreen(frame); frame.setVisible(true); } | /**
* Entry point for running the demo application...
*
* @param args ignored.
*/ | Entry point for running the demo application.. | main | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/demo/src/main/java/org/pentaho/reporting/engine/classic/demo/ancient/demo/conditionalgroup/ConditionalGroupDemo.java",
"license": "lgpl-2.1",
"size": 3389
} | [
"org.pentaho.reporting.engine.classic.core.ClassicEngineBoot",
"org.pentaho.reporting.engine.classic.demo.util.SimpleDemoFrame",
"org.pentaho.reporting.libraries.designtime.swing.LibSwingUtil"
] | import org.pentaho.reporting.engine.classic.core.ClassicEngineBoot; import org.pentaho.reporting.engine.classic.demo.util.SimpleDemoFrame; import org.pentaho.reporting.libraries.designtime.swing.LibSwingUtil; | import org.pentaho.reporting.engine.classic.core.*; import org.pentaho.reporting.engine.classic.demo.util.*; import org.pentaho.reporting.libraries.designtime.swing.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 2,457,598 |
EClass getIncome_Tax();
| EClass getIncome_Tax(); | /**
* Returns the meta object for class '{@link TaxationWithRoot.Income_Tax <em>Income Tax</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Income Tax</em>'.
* @see TaxationWithRoot.Income_Tax
* @generated
*/ | Returns the meta object for class '<code>TaxationWithRoot.Income_Tax Income Tax</code>'. | getIncome_Tax | {
"repo_name": "viatra/VIATRA-Generator",
"path": "Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/TaxationPackage.java",
"license": "epl-1.0",
"size": 295635
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,233,014 |
public static String get(Context context, String key, String def) throws IllegalArgumentException {
String ret = def;
try {
ClassLoader cl = context.getClassLoader();
@SuppressWarnings("rawtypes")
Class SystemProperties = cl.loadClass("android.os.SystemProperti... | static String function(Context context, String key, String def) throws IllegalArgumentException { String ret = def; try { ClassLoader cl = context.getClassLoader(); @SuppressWarnings(STR) Class SystemProperties = cl.loadClass(STR); @SuppressWarnings(STR) Class[] paramTypes = new Class[2]; paramTypes[0] = String.class; ... | /**
* Get the value for the given key.
*
* @return if the key isn't found, return def if it isn't null, or an empty string otherwise
* @throws IllegalArgumentException if the key exceeds 32 characters
*/ | Get the value for the given key | get | {
"repo_name": "dobragab/Mi5CameraCalibrate",
"path": "app/src/main/java/dobragab/sch/bme/hu/cit2/SystemPropertiesProxy.java",
"license": "mit",
"size": 8358
} | [
"android.content.Context",
"java.lang.reflect.Method"
] | import android.content.Context; import java.lang.reflect.Method; | import android.content.*; import java.lang.reflect.*; | [
"android.content",
"java.lang"
] | android.content; java.lang; | 2,683,455 |
public void testRestoreOnCheckedOutNodeJcr2_2() throws RepositoryException {
versionManager.restore(version, true);
} | void function() throws RepositoryException { versionManager.restore(version, true); } | /**
* Test if restoring a node works on checked-out node.
*
* @throws RepositoryException
*/ | Test if restoring a node works on checked-out node | testRestoreOnCheckedOutNodeJcr2_2 | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java",
"license": "apache-2.0",
"size": 61164
} | [
"javax.jcr.RepositoryException"
] | import javax.jcr.RepositoryException; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 538,273 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String accountName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function(String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException(STR))... | /**
* Deletes a Cognitive Services account from the resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation... | Deletes a Cognitive Services account from the resource group | deleteWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java",
"license": "mit",
"size": 114340
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 797,757 |
public AccountingLineTableRow getRow() {
return row;
} | AccountingLineTableRow function() { return row; } | /**
* Gets the row attribute.
* @return Returns the row.
*/ | Gets the row attribute | getRow | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/web/renderers/TableRowRenderer.java",
"license": "apache-2.0",
"size": 2430
} | [
"org.kuali.kfs.sys.document.web.AccountingLineTableRow"
] | import org.kuali.kfs.sys.document.web.AccountingLineTableRow; | import org.kuali.kfs.sys.document.web.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,765,018 |
public static boolean hasDefaultImplementation(final MethodNode method) {
return !method.getAnnotations(IMPLEMENTED_CLASSNODE).isEmpty();
} | static boolean function(final MethodNode method) { return !method.getAnnotations(IMPLEMENTED_CLASSNODE).isEmpty(); } | /**
* Indicates whether a method in a trait interface has a default implementation.
* @param method a method node
* @return true if the method has a default implementation in the trait
*/ | Indicates whether a method in a trait interface has a default implementation | hasDefaultImplementation | {
"repo_name": "russel/incubator-groovy",
"path": "src/main/java/org/codehaus/groovy/transform/trait/Traits.java",
"license": "apache-2.0",
"size": 17117
} | [
"org.codehaus.groovy.ast.MethodNode"
] | import org.codehaus.groovy.ast.MethodNode; | import org.codehaus.groovy.ast.*; | [
"org.codehaus.groovy"
] | org.codehaus.groovy; | 2,319,662 |
throw new TrainingError(FoldedDataSet.ADD_NOT_SUPPORTED);
} | throw new TrainingError(FoldedDataSet.ADD_NOT_SUPPORTED); } | /**
* Not supported.
* <p/>
* @param data1
* Not used.
*/ | Not supported. | add | {
"repo_name": "ladygagapowerbot/bachelor-thesis-implementation",
"path": "lib/Encog/src/main/java/org/encog/ml/data/folded/FoldedDataSet.java",
"license": "mit",
"size": 8008
} | [
"org.encog.neural.networks.training.TrainingError"
] | import org.encog.neural.networks.training.TrainingError; | import org.encog.neural.networks.training.*; | [
"org.encog.neural"
] | org.encog.neural; | 2,324,034 |
public static junit.framework.Test suite() {
return new JUnit4TestAdapter(AggregateTest.class);
} | static junit.framework.Test function() { return new JUnit4TestAdapter(AggregateTest.class); } | /**
* JUnit suite target
*/ | JUnit suite target | suite | {
"repo_name": "shailendert/DBMS",
"path": "test/simpledb/AggregateTest.java",
"license": "gpl-3.0",
"size": 3992
} | [
"junit.framework.JUnit4TestAdapter",
"org.junit.Test"
] | import junit.framework.JUnit4TestAdapter; import org.junit.Test; | import junit.framework.*; import org.junit.*; | [
"junit.framework",
"org.junit"
] | junit.framework; org.junit; | 1,533,928 |
@Override
public ConceptCollectionDTO getCollectionDetails(String collectionId, String username)
throws QuadrigaStorageException, QuadrigaAccessException {
IUser owner = null;
ConceptCollectionDTO conceptcollectionsDTO = null;
try {
Query query = sessionFactory.ge... | ConceptCollectionDTO function(String collectionId, String username) throws QuadrigaStorageException, QuadrigaAccessException { IUser owner = null; ConceptCollectionDTO conceptcollectionsDTO = null; try { Query query = sessionFactory.getCurrentSession().createQuery( STR); query.setParameter(STR, collectionId); return (C... | /**
* This method retrieves the collection details for the given concept
* collection
*
* @param :
* IConceptCollection - concept collection object
* @param :
* username - logged in user
*/ | This method retrieves the collection details for the given concept collection | getCollectionDetails | {
"repo_name": "diging/quadriga",
"path": "Quadriga/src/main/java/edu/asu/spring/quadriga/dao/conceptcollection/impl/ConceptCollectionDAO.java",
"license": "gpl-2.0",
"size": 15314
} | [
"edu.asu.spring.quadriga.domain.IUser",
"edu.asu.spring.quadriga.dto.ConceptCollectionDTO",
"edu.asu.spring.quadriga.exceptions.QuadrigaAccessException",
"edu.asu.spring.quadriga.exceptions.QuadrigaStorageException",
"org.hibernate.HibernateException",
"org.hibernate.Query"
] | import edu.asu.spring.quadriga.domain.IUser; import edu.asu.spring.quadriga.dto.ConceptCollectionDTO; import edu.asu.spring.quadriga.exceptions.QuadrigaAccessException; import edu.asu.spring.quadriga.exceptions.QuadrigaStorageException; import org.hibernate.HibernateException; import org.hibernate.Query; | import edu.asu.spring.quadriga.domain.*; import edu.asu.spring.quadriga.dto.*; import edu.asu.spring.quadriga.exceptions.*; import org.hibernate.*; | [
"edu.asu.spring",
"org.hibernate"
] | edu.asu.spring; org.hibernate; | 2,862,574 |
private void processWorkingHours(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList)
{
if (isWorkingDay(mpxjCalendar, day))
{
ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day);
if (mpxjHours != null)
{
... | void function(ProjectCalendar mpxjCalendar, Sequence uniqueID, Day day, List<OverriddenDayType> typeList) { if (isWorkingDay(mpxjCalendar, day)) { ProjectCalendarHours mpxjHours = mpxjCalendar.getCalendarHours(day); if (mpxjHours != null) { OverriddenDayType odt = m_factory.createOverriddenDayType(); typeList.add(odt);... | /**
* Process the standard working hours for a given day.
*
* @param mpxjCalendar MPXJ Calendar instance
* @param uniqueID unique ID sequence generation
* @param day Day instance
* @param typeList Planner list of days
*/ | Process the standard working hours for a given day | processWorkingHours | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/mpxj/src/net/sf/mpxj/planner/PlannerWriter.java",
"license": "gpl-3.0",
"size": 30778
} | [
"java.util.Date",
"java.util.List",
"net.sf.mpxj.DateRange",
"net.sf.mpxj.Day",
"net.sf.mpxj.ProjectCalendar",
"net.sf.mpxj.ProjectCalendarHours",
"net.sf.mpxj.planner.schema.Interval",
"net.sf.mpxj.planner.schema.OverriddenDayType",
"net.sf.mpxj.utility.Sequence"
] | import java.util.Date; import java.util.List; import net.sf.mpxj.DateRange; import net.sf.mpxj.Day; import net.sf.mpxj.ProjectCalendar; import net.sf.mpxj.ProjectCalendarHours; import net.sf.mpxj.planner.schema.Interval; import net.sf.mpxj.planner.schema.OverriddenDayType; import net.sf.mpxj.utility.Sequence; | import java.util.*; import net.sf.mpxj.*; import net.sf.mpxj.planner.schema.*; import net.sf.mpxj.utility.*; | [
"java.util",
"net.sf.mpxj"
] | java.util; net.sf.mpxj; | 1,894,438 |
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI> getSubterm_integers_NumberConstantHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI>();
for (Term elemnt : getSubt... | java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.NumberConstantHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move... | /**
* This accessor return a list of encapsulated subelement, only of NumberConstantHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of NumberConstantHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_integers_NumberConstantHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/SublistHLAPI.java",
"license": "epl-1.0",
"size": 111755
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 283,791 |
Locale getXmlDocumentLocale();
| Locale getXmlDocumentLocale(); | /**
* Returns the currently selected locale used for acessing the content in the loaded XML content document.<p>
*
* @return the currently selected locale used for acessing the content in the loaded XML content document
*/ | Returns the currently selected locale used for acessing the content in the loaded XML content document | getXmlDocumentLocale | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/jsp/I_CmsXmlContentContainer.java",
"license": "lgpl-2.1",
"size": 4121
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 379,820 |
@Override
public boolean equals(final Object object) {
if (object == this) {
return true;
}
if (super.equals(object)) {
if (!isNameSupplied) {
return true; // No need to compare names if they are computed from the same values.
... | boolean function(final Object object) { if (object == this) { return true; } if (super.equals(object)) { if (!isNameSupplied) { return true; } final NamedIdentifier that = (NamedIdentifier) object; return Objects.equals(this.getName(), that.getName()); } return false; } | /**
* Compares this identifier with the specified object for equality.
*
* @param object the object to compare with this name.
* @return {@code true} if the given object is equal to this name.
*/ | Compares this identifier with the specified object for equality | equals | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java",
"license": "apache-2.0",
"size": 21831
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 583,538 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.