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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
final IRCClientInfo iClient = getClientInfo(token[0]);
switch (sParam) {
case "AWAY":
if (iClient != null) {
final AwayState oldState = iClient.getAwayState();
final String reason = token.length > 2 ? token[token.length - 1] : "";
... | final IRCClientInfo iClient = getClientInfo(token[0]); switch (sParam) { case "AWAY": if (iClient != null) { final AwayState oldState = iClient.getAwayState(); final String reason = token.length > 2 ? token[token.length - 1] : STR301STR306".equals(sParam) ? AwayState.AWAY : AwayState.HERE); callAwayState(time, oldState... | /**
* Process an Away/Back message.
*
* @param sParam Type of line to process ("305", "306" etc)
* @param token IRCTokenised line to process
*/ | Process an Away/Back message | process | {
"repo_name": "csmith/DMDirc-Parser",
"path": "irc/src/main/java/com/dmdirc/parser/irc/processors/ProcessAway.java",
"license": "mit",
"size": 3863
} | [
"com.dmdirc.parser.common.AwayState",
"com.dmdirc.parser.irc.IRCClientInfo"
] | import com.dmdirc.parser.common.AwayState; import com.dmdirc.parser.irc.IRCClientInfo; | import com.dmdirc.parser.common.*; import com.dmdirc.parser.irc.*; | [
"com.dmdirc.parser"
] | com.dmdirc.parser; | 999,248 |
@RequestMapping(value = "/admin/projects/{projectId}/update", method = RequestMethod.POST)
public String update(@PathVariable Long projectId, @ModelAttribute("form") ProjectUpdateBean form, BindingResult result) {
new ProjectUpdateValidator().validate(form, result);
if (result.hasErrors()) {
... | @RequestMapping(value = STR, method = RequestMethod.POST) String function(@PathVariable Long projectId, @ModelAttribute("form") ProjectUpdateBean form, BindingResult result) { new ProjectUpdateValidator().validate(form, result); if (result.hasErrors()) { return STR; } projectService.update(form.getProject()); return ST... | /**
* Updates a particular project.
*
* @param projectId the id of the project to be updated
* @param form
* @param result
* @return
*/ | Updates a particular project | update | {
"repo_name": "abachar/collab",
"path": "src/main/java/fr/abachar/collab/web/projects/ProjectController.java",
"license": "mit",
"size": 6847
} | [
"fr.abachar.collab.web.projects.beans.ProjectUpdateBean",
"fr.abachar.collab.web.projects.validators.ProjectUpdateValidator",
"org.springframework.validation.BindingResult",
"org.springframework.web.bind.annotation.ModelAttribute",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframewo... | import fr.abachar.collab.web.projects.beans.ProjectUpdateBean; import fr.abachar.collab.web.projects.validators.ProjectUpdateValidator; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import ... | import fr.abachar.collab.web.projects.beans.*; import fr.abachar.collab.web.projects.validators.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; | [
"fr.abachar.collab",
"org.springframework.validation",
"org.springframework.web"
] | fr.abachar.collab; org.springframework.validation; org.springframework.web; | 1,757,086 |
public void syncConfig() {
forgeConfig.load();
debugOutput = forgeConfig.getBoolean(getName("debugOutput"), Configuration.CATEGORY_GENERAL, false, getDes("debugOutput"));
parseDescoverString(forgeConfig.getString(getName("usernamePattern"), Configuration.CATEGORY_GENERAL, "@\\\"\"" , getDes("usernamePattern")... | void function() { forgeConfig.load(); debugOutput = forgeConfig.getBoolean(getName(STR), Configuration.CATEGORY_GENERAL, false, getDes(STR)); parseDescoverString(forgeConfig.getString(getName(STR), Configuration.CATEGORY_GENERAL, "@\\\"\"" , getDes(STR))); forgeConfig.save(); } | /**
* Sync the config when changed from GUI
*/ | Sync the config when changed from GUI | syncConfig | {
"repo_name": "Spartan322/Alagaesias-Ancient-Language",
"path": "src/main/java/com/firegodjr/ancientlanguage/Config.java",
"license": "gpl-3.0",
"size": 2493
} | [
"net.minecraftforge.common.config.Configuration"
] | import net.minecraftforge.common.config.Configuration; | import net.minecraftforge.common.config.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 2,323,142 |
protected JCheckBox getCbTimeTracking()
{
if(cbTimeTracking == null)
{
cbTimeTracking = new JCheckBox();
cbTimeTracking.setMnemonic(java.awt.event.KeyEvent.VK_T);
cbTimeTracking.setText(localizer.getString("time_tracking"));
}
return cbTimeT... | JCheckBox function() { if(cbTimeTracking == null) { cbTimeTracking = new JCheckBox(); cbTimeTracking.setMnemonic(java.awt.event.KeyEvent.VK_T); cbTimeTracking.setText(localizer.getString(STR)); } return cbTimeTracking; } | /**
* This method initializes cbTimeTracking
*
* @return javax.swing.JCheckBox
*/ | This method initializes cbTimeTracking | getCbTimeTracking | {
"repo_name": "andybalaam/freeguide",
"path": "src/freeguide/plugins/ui/horizontal/manylabels/ConfigureUIPanel.java",
"license": "gpl-2.0",
"size": 23719
} | [
"java.awt.event.KeyEvent",
"javax.swing.JCheckBox"
] | import java.awt.event.KeyEvent; import javax.swing.JCheckBox; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,871,598 |
public static RSAPublicKey readGlowKey(InputStream is) throws IOException,
InvalidKeyException, InvalidKeySpecException,
NoSuchAlgorithmException {
DataInputStream dis = new DataInputStream(is);
int keytype = dis.readInt();
int keylen = dis.readInt();
int byteslen = dis.readInt();
byte[] bytes = new ... | static RSAPublicKey function(InputStream is) throws IOException, InvalidKeyException, InvalidKeySpecException, NoSuchAlgorithmException { DataInputStream dis = new DataInputStream(is); int keytype = dis.readInt(); int keylen = dis.readInt(); int byteslen = dis.readInt(); byte[] bytes = new byte[byteslen]; dis.readFully... | /**
* get {@link RSAPublicKey} from an {@link InputStream} in glowcrypt's key
* format
*/ | get <code>RSAPublicKey</code> from an <code>InputStream</code> in glowcrypt's key format | readGlowKey | {
"repo_name": "zackp30/glowcrypt",
"path": "modules/core/src/com/xnrand/glowcrypt/core/keys/RSAPublicKey.java",
"license": "bsd-3-clause",
"size": 1689
} | [
"java.io.DataInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.spec.InvalidKeySpecException"
] | import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; | import java.io.*; import java.security.*; import java.security.spec.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 2,727,519 |
public void removeChangeListener(ChangeListener listener)
{
listenerList.remove(ChangeListener.class, listener);
} | void function(ChangeListener listener) { listenerList.remove(ChangeListener.class, listener); } | /**
* Cancels the subscription of a ChangeListener.
*
* @param listener the listener to be unsubscribed.
*/ | Cancels the subscription of a ChangeListener | removeChangeListener | {
"repo_name": "aosm/gcc_40",
"path": "libjava/javax/swing/DefaultBoundedRangeModel.java",
"license": "gpl-2.0",
"size": 13843
} | [
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,432,356 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<MicrosoftGraphDirectoryObjectInner> listRegisteredOwners(String deviceId); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<MicrosoftGraphDirectoryObjectInner> listRegisteredOwners(String deviceId); | /**
* Get registeredOwners from devices.
*
* @param deviceId key: id of device.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if the request is
* rejected by se... | Get registeredOwners from devices | listRegisteredOwners | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/DevicesClient.java",
"license": "mit",
"size": 81714
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryObjectInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphDirectoryObjectInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.authorization.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 448,659 |
public static Ver2_SUPL_RESPONSE_extension fromPerAligned(byte[] encodedBytes) {
Ver2_SUPL_RESPONSE_extension result = new Ver2_SUPL_RESPONSE_extension();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static Ver2_SUPL_RESPONSE_extension function(byte[] encodedBytes) { Ver2_SUPL_RESPONSE_extension result = new Ver2_SUPL_RESPONSE_extension(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new Ver2_SUPL_RESPONSE_extension from encoded stream.
*/ | Creates a new Ver2_SUPL_RESPONSE_extension from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/ulp_version_2_message_extensions/Ver2_SUPL_RESPONSE_extension.java",
"license": "apache-2.0",
"size": 15438
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,621,175 |
public static <T> T withWriterAppend(File file, String charset, Closure<T> closure) throws IOException {
return withWriter(newWriter(file, charset, true), closure);
} | static <T> T function(File file, String charset, Closure<T> closure) throws IOException { return withWriter(newWriter(file, charset, true), closure); } | /**
* Create a new BufferedWriter which will append to this
* file. The writer is passed to the closure and will be closed before
* this method returns.
*
* @param file a File
* @param charset the charset used
* @param closure a closure
* @return the value returned by the clo... | Create a new BufferedWriter which will append to this file. The writer is passed to the closure and will be closed before this method returns | withWriterAppend | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"groovy.lang.Closure",
"java.io.File",
"java.io.IOException"
] | import groovy.lang.Closure; import java.io.File; import java.io.IOException; | import groovy.lang.*; import java.io.*; | [
"groovy.lang",
"java.io"
] | groovy.lang; java.io; | 1,565,857 |
public Builder endDate(LocalDate endDate) {
this.endDate = endDate;
return this;
} | Builder function(LocalDate endDate) { this.endDate = endDate; return this; } | /**
* Sets the endDate.
* @param endDate the new value
* @return this, for chaining, not null
*/ | Sets the endDate | endDate | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/test/java/com/opengamma/strata/finance/rate/swap/MockSwapLeg.java",
"license": "apache-2.0",
"size": 18197
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 2,205,973 |
public List<FrdFraudActionLog> queryByRange(String jpqlStmt, int firstResult,
int maxResults); | List<FrdFraudActionLog> function(String jpqlStmt, int firstResult, int maxResults); | /**
* queryByRange - allows querying by range/block
*
* @param jpqlStmt
* @param firstResult
* @param maxResults
* @return a list of FrdFraudActionLog
*/ | queryByRange - allows querying by range/block | queryByRange | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdFraudActionLogSessionEJBRemote.java",
"license": "apache-2.0",
"size": 2718
} | [
"com.gdn.venice.persistence.FrdFraudActionLog",
"java.util.List"
] | import com.gdn.venice.persistence.FrdFraudActionLog; import java.util.List; | import com.gdn.venice.persistence.*; import java.util.*; | [
"com.gdn.venice",
"java.util"
] | com.gdn.venice; java.util; | 540,385 |
public AttributeInfo getAttribute(String name) {
ArrayList list = attributes;
int n = list.size();
for (int i = 0; i < n; ++i) {
AttributeInfo ai = (AttributeInfo)list.get(i);
if (ai.getName().equals(name))
return ai;
}
return null;
... | AttributeInfo function(String name) { ArrayList list = attributes; int n = list.size(); for (int i = 0; i < n; ++i) { AttributeInfo ai = (AttributeInfo)list.get(i); if (ai.getName().equals(name)) return ai; } return null; } | /**
* Returns the attribute with the specified name. If there are multiple
* attributes with that name, this method returns either of them. It
* returns null if the specified attributed is not found.
*
* @param name attribute name
* @see #getAttributes()
*/ | Returns the attribute with the specified name. If there are multiple attributes with that name, this method returns either of them. It returns null if the specified attributed is not found | getAttribute | {
"repo_name": "MeRPG/EndHQ-Libraries",
"path": "src/javassist/bytecode/ClassFile.java",
"license": "apache-2.0",
"size": 27083
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,833,453 |
@Override
public void execute(JobExecutionContext jec)
throws JobExecutionException {
JobDataMap jdm = jec.getJobDetail().getJobDataMap();
// for (Entry<String, Object> et : jdm.entrySet()) {
// _log.debug("key:" + et.getKey() + "\tvalue:" + et.getValue());
// ... | void function(JobExecutionContext jec) throws JobExecutionException { JobDataMap jdm = jec.getJobDetail().getJobDataMap(); if (!jdm.containsKey(ParamKey._conditionSQL)) { return; } if (!jdm.containsKey(ParamKey._sourceSQL)) { return; } if (!jdm.containsKey(ParamKey._targetSQL)) { return; } if (jdm.containsKey(ParamKey.... | /**
* <p> Called by the
* <code>{@link org.quartz.Scheduler}</code> when a
* <code>{@link org.quartz.Trigger}</code> fires that is associated with the
* <code>Job</code>. </p>
*
* @throws JobExecutionException if there is an exception while executing
* the job.
*/ | Called by the <code><code>org.quartz.Scheduler</code></code> when a <code><code>org.quartz.Trigger</code></code> fires that is associated with the <code>Job</code>. | execute | {
"repo_name": "weijiguang/schedule",
"path": "src/main/java/com/weir/schedule/dao/SimpleJob.java",
"license": "lgpl-3.0",
"size": 5300
} | [
"com.weir.schedule.model.ParamKey",
"java.util.HashMap",
"java.util.Map",
"org.quartz.JobDataMap",
"org.quartz.JobExecutionContext",
"org.quartz.JobExecutionException",
"org.springframework.jdbc.core.namedparam.NamedParameterUtils"
] | import com.weir.schedule.model.ParamKey; import java.util.HashMap; import java.util.Map; import org.quartz.JobDataMap; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.jdbc.core.namedparam.NamedParameterUtils; | import com.weir.schedule.model.*; import java.util.*; import org.quartz.*; import org.springframework.jdbc.core.namedparam.*; | [
"com.weir.schedule",
"java.util",
"org.quartz",
"org.springframework.jdbc"
] | com.weir.schedule; java.util; org.quartz; org.springframework.jdbc; | 1,885,582 |
public void test(TestHarness harness)
{
// create instance of a class Double
Object o = new Byte((byte)42);
// get a runtime class of an object "o"
Class c = o.getClass();
List interfaces = Arrays.asList(c.getInterfaces());
harness.check(interfaces.contains(Comp... | void function(TestHarness harness) { Object o = new Byte((byte)42); Class c = o.getClass(); List interfaces = Arrays.asList(c.getInterfaces()); harness.check(interfaces.contains(Comparable.class)); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/Byte/classInfo/getInterfaces.java",
"license": "gpl-2.0",
"size": 1652
} | [
"gnu.testlet.TestHarness",
"java.lang.Byte",
"java.util.Arrays",
"java.util.List"
] | import gnu.testlet.TestHarness; import java.lang.Byte; import java.util.Arrays; import java.util.List; | import gnu.testlet.*; import java.lang.*; import java.util.*; | [
"gnu.testlet",
"java.lang",
"java.util"
] | gnu.testlet; java.lang; java.util; | 1,406,391 |
public static void checkFileSystemXAttrSupport(FileSystem fs)
throws XAttrsNotSupportedException {
try {
fs.getXAttrs(new Path(Path.SEPARATOR));
} catch (Exception e) {
throw new XAttrsNotSupportedException("XAttrs not supported for file system: "
+ fs.getUri());
}
} | static void function(FileSystem fs) throws XAttrsNotSupportedException { try { fs.getXAttrs(new Path(Path.SEPARATOR)); } catch (Exception e) { throw new XAttrsNotSupportedException(STR + fs.getUri()); } } | /**
* Determines if a file system supports XAttrs by running a getXAttrs request
* on the file system root. This method is used before distcp job submission
* to fail fast if the user requested preserving XAttrs, but the file system
* cannot support XAttrs.
*
* @param fs FileSystem to check
* @thr... | Determines if a file system supports XAttrs by running a getXAttrs request on the file system root. This method is used before distcp job submission to fail fast if the user requested preserving XAttrs, but the file system cannot support XAttrs | checkFileSystemXAttrSupport | {
"repo_name": "baishuo/hadoop-2.6.0-cdh5.4.7_baishuo",
"path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java",
"license": "apache-2.0",
"size": 18844
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.tools.CopyListing"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.tools.CopyListing; | import org.apache.hadoop.fs.*; import org.apache.hadoop.tools.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,517,396 |
public final long destroy(IgniteInClosure<L> c) throws IgniteCheckedException {
if (!markDestroyed())
return 0;
if (reuseList == null)
return -1;
DestroyBag bag = new DestroyBag();
long pagesCnt = 0;
long metaPage = acquirePage(metaPageId);
... | final long function(IgniteInClosure<L> c) throws IgniteCheckedException { if (!markDestroyed()) return 0; if (reuseList == null) return -1; DestroyBag bag = new DestroyBag(); long pagesCnt = 0; long metaPage = acquirePage(metaPageId); try { long metaPageAddr = writeLock(metaPageId, metaPage); try { for (long pageId : g... | /**
* Destroys tree. This method is allowed to be invoked only when the tree is out of use (no concurrent operations
* are trying to read or update the tree after destroy beginning).
*
* @param c Visitor closure. Visits only leaf pages.
* @return Number of pages recycled from this tree. If the ... | Destroys tree. This method is allowed to be invoked only when the tree is out of use (no concurrent operations are trying to read or update the tree after destroy beginning) | destroy | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/BPlusTree.java",
"license": "apache-2.0",
"size": 151702
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.database.tree.io.BPlusIO",
"org.apache.ignite.lang.IgniteInClosure"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.database.tree.io.BPlusIO; import org.apache.ignite.lang.IgniteInClosure; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.database.tree.io.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,861,202 |
public void setDefaultAutoRange(Range range) {
ParamChecks.nullNotPermitted(range, "range");
this.defaultAutoRange = range;
fireChangeEvent();
}
| void function(Range range) { ParamChecks.nullNotPermitted(range, "range"); this.defaultAutoRange = range; fireChangeEvent(); } | /**
* Sets the default auto range and sends an {@link AxisChangeEvent} to all
* registered listeners.
*
* @param range the range (<code>null</code> not permitted).
*
* @see #getDefaultAutoRange()
*
* @since 1.0.5
*/ | Sets the default auto range and sends an <code>AxisChangeEvent</code> to all registered listeners | setDefaultAutoRange | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/axis/ValueAxis.java",
"license": "lgpl-3.0",
"size": 62910
} | [
"org.jfree.chart.util.ParamChecks",
"org.jfree.data.Range"
] | import org.jfree.chart.util.ParamChecks; import org.jfree.data.Range; | import org.jfree.chart.util.*; import org.jfree.data.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 570,926 |
@RequestMapping( value="/private/{store}/customer", method=RequestMethod.POST)
@ResponseStatus(HttpStatus.CREATED)
@ResponseBody
public PersistableCustomer createCustomer(@PathVariable final String store, @Valid @RequestBody PersistableCustomer customer, HttpServletRequest request, HttpServletResponse response... | @RequestMapping( value=STR, method=RequestMethod.POST) @ResponseStatus(HttpStatus.CREATED) PersistableCustomer function(@PathVariable final String store, @Valid @RequestBody PersistableCustomer customer, HttpServletRequest request, HttpServletResponse response) throws Exception { MerchantStore merchantStore = (Merchant... | /**
* Create new customer for a given MerchantStore
*/ | Create new customer for a given MerchantStore | createCustomer | {
"repo_name": "xyz2410/shopizer",
"path": "sm-shop/src/main/java/com/salesmanager/web/services/controller/customer/CustomerRESTController.java",
"license": "gpl-2.0",
"size": 13885
} | [
"com.salesmanager.core.business.customer.model.Customer",
"com.salesmanager.core.business.merchant.model.MerchantStore",
"com.salesmanager.core.business.user.model.Group",
"com.salesmanager.core.business.user.model.GroupType",
"com.salesmanager.web.admin.entity.userpassword.UserReset",
"com.salesmanager.w... | import com.salesmanager.core.business.customer.model.Customer; import com.salesmanager.core.business.merchant.model.MerchantStore; import com.salesmanager.core.business.user.model.Group; import com.salesmanager.core.business.user.model.GroupType; import com.salesmanager.web.admin.entity.userpassword.UserReset; import c... | import com.salesmanager.core.business.customer.model.*; import com.salesmanager.core.business.merchant.model.*; import com.salesmanager.core.business.user.model.*; import com.salesmanager.web.admin.entity.userpassword.*; import com.salesmanager.web.constants.*; import com.salesmanager.web.entity.customer.*; import com.... | [
"com.salesmanager.core",
"com.salesmanager.web",
"java.util",
"javax.servlet",
"javax.validation",
"org.apache.commons",
"org.springframework.http",
"org.springframework.web"
] | com.salesmanager.core; com.salesmanager.web; java.util; javax.servlet; javax.validation; org.apache.commons; org.springframework.http; org.springframework.web; | 2,015,902 |
protected void cleanup( TestParameters tParam, PrintWriter log ) {
log.println( " disposing xTextDoc " );
util.DesktopTools.closeDoc(xTextDoc);
} | void function( TestParameters tParam, PrintWriter log ) { log.println( STR ); util.DesktopTools.closeDoc(xTextDoc); } | /**
* Disposes text document.
*/ | Disposes text document | cleanup | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/mod/_sw/SwXFootnoteProperties.java",
"license": "gpl-3.0",
"size": 4382
} | [
"java.io.PrintWriter"
] | import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 2,147,762 |
public void testLogOnUserWrongUserName()
throws XmlRpcException, MalformedURLException {
Object[] XMLMethodParameters = new Object[] {
"", GlobalSettings.getPassword() };
executeLogOnUserWithError(XMLMethodParameters, ErrorMessage.USERNAME_OR_PASSWORD_NOT_CORRECT);
}
| void function() throws XmlRpcException, MalformedURLException { Object[] XMLMethodParameters = new Object[] { "", GlobalSettings.getPassword() }; executeLogOnUserWithError(XMLMethodParameters, ErrorMessage.USERNAME_OR_PASSWORD_NOT_CORRECT); } | /**
* Test method with wrong user name.
*
* @throws XmlRpcException
* @throws MalformedURLException
*/ | Test method with wrong user name | testLogOnUserWrongUserName | {
"repo_name": "adqio/revive-adserver",
"path": "www/api/v1/xmlrpc/tests/unit/src/test/java/org/openx/user/TestAuthUser.java",
"license": "gpl-2.0",
"size": 4794
} | [
"java.net.MalformedURLException",
"org.apache.xmlrpc.XmlRpcException",
"org.openx.config.GlobalSettings",
"org.openx.utils.ErrorMessage"
] | import java.net.MalformedURLException; import org.apache.xmlrpc.XmlRpcException; import org.openx.config.GlobalSettings; import org.openx.utils.ErrorMessage; | import java.net.*; import org.apache.xmlrpc.*; import org.openx.config.*; import org.openx.utils.*; | [
"java.net",
"org.apache.xmlrpc",
"org.openx.config",
"org.openx.utils"
] | java.net; org.apache.xmlrpc; org.openx.config; org.openx.utils; | 1,159,727 |
protected Optional<Schema> getExtractorSchema() {
return Optional.fromNullable(getLatestSchemaByTopic(this.topicName));
} | Optional<Schema> function() { return Optional.fromNullable(getLatestSchemaByTopic(this.topicName)); } | /**
* Get the schema to be used by this extractor. All extracted records that have different schemas
* will be converted to this schema.
*/ | Get the schema to be used by this extractor. All extracted records that have different schemas will be converted to this schema | getExtractorSchema | {
"repo_name": "sahilTakiar/gobblin",
"path": "gobblin-modules/gobblin-kafka-common/src/main/java/gobblin/source/extractor/extract/kafka/KafkaAvroExtractor.java",
"license": "apache-2.0",
"size": 5443
} | [
"com.google.common.base.Optional",
"org.apache.avro.Schema"
] | import com.google.common.base.Optional; import org.apache.avro.Schema; | import com.google.common.base.*; import org.apache.avro.*; | [
"com.google.common",
"org.apache.avro"
] | com.google.common; org.apache.avro; | 2,298,155 |
@Override
protected void replace(File dst, File src) throws IOException {
if (site == null || !site.getId().equals(ID_UPLOAD)) {
verifyChecksums(this, plugin, src);
}
File bak = Util.changeExtension(dst, ".bak");
bak.delete();
... | void function(File dst, File src) throws IOException { if (site == null !site.getId().equals(ID_UPLOAD)) { verifyChecksums(this, plugin, src); } File bak = Util.changeExtension(dst, ".bak"); bak.delete(); final File legacy = getLegacyDestination(); if (legacy.exists()) { if (!legacy.renameTo(bak)) { legacy.delete(); } ... | /**
* Called when the download is completed to overwrite
* the old file with the new file.
*/ | Called when the download is completed to overwrite the old file with the new file | replace | {
"repo_name": "rsandell/jenkins",
"path": "core/src/main/java/hudson/model/UpdateCenter.java",
"license": "mit",
"size": 98935
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,021,638 |
public static void saveState(IMemento memento, DiagramEditorInput input) {
IDiagramModel diagramModel = input.getDiagramModel();
if(diagramModel != null && diagramModel.getArchimateModel() != null) {
memento.putString(TAG_VIEW_ID, diagramModel.getId());
String name = diag... | static void function(IMemento memento, DiagramEditorInput input) { IDiagramModel diagramModel = input.getDiagramModel(); if(diagramModel != null && diagramModel.getArchimateModel() != null) { memento.putString(TAG_VIEW_ID, diagramModel.getId()); String name = diagramModel.getName(); if(name != null) { memento.putString... | /**
* Saves the state of the given diagram editor input into the given memento.
*
* @param memento the storage area for element state
* @param input the diagram editor input
*/ | Saves the state of the given diagram editor input into the given memento | saveState | {
"repo_name": "archimatetool/archi",
"path": "com.archimatetool.editor/src/com/archimatetool/editor/diagram/DiagramEditorInputFactory.java",
"license": "mit",
"size": 3081
} | [
"com.archimatetool.model.IDiagramModel",
"java.io.File",
"org.eclipse.ui.IMemento"
] | import com.archimatetool.model.IDiagramModel; import java.io.File; import org.eclipse.ui.IMemento; | import com.archimatetool.model.*; import java.io.*; import org.eclipse.ui.*; | [
"com.archimatetool.model",
"java.io",
"org.eclipse.ui"
] | com.archimatetool.model; java.io; org.eclipse.ui; | 1,048,146 |
public CallHandle changeGroup(TransferableObject object,
AgentEventListener observer); | CallHandle function(TransferableObject object, AgentEventListener observer); | /**
* Moves the passed collection to another group.
*
* @param object The objects to transfer.
* @param observer Call-back handler.
* @return A handle that can be used to cancel the call.
*/ | Moves the passed collection to another group | changeGroup | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/DataManagerView.java",
"license": "gpl-2.0",
"size": 14619
} | [
"org.openmicroscopy.shoola.env.data.model.TransferableObject",
"org.openmicroscopy.shoola.env.event.AgentEventListener"
] | import org.openmicroscopy.shoola.env.data.model.TransferableObject; import org.openmicroscopy.shoola.env.event.AgentEventListener; | import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.env.event.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,694,540 |
@Test public void tooLargeToHPackIsStillEmitted() throws IOException {
bytesIn.writeByte(0x00); // Literal indexed
bytesIn.writeByte(0x0a); // Literal name (len = 10)
bytesIn.writeUtf8("custom-key");
bytesIn.writeByte(0x0d); // Literal value (len = 13)
bytesIn.writeUtf8("custom-header");
hpa... | @Test void function() throws IOException { bytesIn.writeByte(0x00); bytesIn.writeByte(0x0a); bytesIn.writeUtf8(STR); bytesIn.writeByte(0x0d); bytesIn.writeUtf8(STR); hpackReader.maxHeaderTableByteCountSetting(1); hpackReader.readHeaders(); hpackReader.emitReferenceSet(); assertEquals(0, hpackReader.headerCount); assert... | /**
* HPACK has a max header table size, which can be smaller than the max header message.
* Ensure the larger header content is not lost.
*/ | HPACK has a max header table size, which can be smaller than the max header message. Ensure the larger header content is not lost | tooLargeToHPackIsStillEmitted | {
"repo_name": "koush/okhttp",
"path": "okhttp-tests/src/test/java/com/squareup/okhttp/internal/spdy/HpackDraft08Test.java",
"license": "apache-2.0",
"size": 34587
} | [
"java.io.IOException",
"org.junit.Assert",
"org.junit.Test"
] | import java.io.IOException; import org.junit.Assert; import org.junit.Test; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 641,566 |
public Transporter validateCache()
{
return handleByMode();
} | Transporter function() { return handleByMode(); } | /**
* ADVANCED:
* This can be used to help debugging an object identity problem.
* An object identity problem is when an object in the cache references an object not in the cache.
* This method will validate that all cached objects are in a correct state.
*/ | This can be used to help debugging an object identity problem. An object identity problem is when an object in the cache references an object not in the cache. This method will validate that all cached objects are in a correct state | validateCache | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/rmi/IIOP/RMIRemoteSessionControllerDispatcherForTestingExceptions.java",
"license": "epl-1.0",
"size": 14196
} | [
"org.eclipse.persistence.internal.sessions.remote.Transporter"
] | import org.eclipse.persistence.internal.sessions.remote.Transporter; | import org.eclipse.persistence.internal.sessions.remote.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,076,410 |
public synchronized AbstractMessage getMEMEMessage() throws Exception {
if (tc.isEntryEnabled())
SibTr.entry(this, tc, "getMEMEMessage");
// GRRRRRRRRRRRR Read the FAP Clifford
int messageLength = getInt();
boolean isControlMessage = get() == CommsConstants.MEME_CONTROLM... | synchronized AbstractMessage function() throws Exception { if (tc.isEntryEnabled()) SibTr.entry(this, tc, STR); int messageLength = getInt(); boolean isControlMessage = get() == CommsConstants.MEME_CONTROLMESSAGE; AbstractMessage message = null; if (tc.isDebugEnabled()) { SibTr.debug(tc, STR, messageLength); SibTr.debu... | /**
* This method will retrieve an ME-ME message from the buffer. A JsMessage or ControlMessage may
* be returned from this method.
*
* @return Returns an ME-ME message
* @throws Exception if the message cannot be decoded
*/ | This method will retrieve an ME-ME message from the buffer. A JsMessage or ControlMessage may be returned from this method | getMEMEMessage | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommsServerByteBuffer.java",
"license": "epl-1.0",
"size": 15251
} | [
"com.ibm.ws.sib.comms.CommsConstants",
"com.ibm.ws.sib.mfp.AbstractMessage",
"com.ibm.ws.sib.mfp.impl.ControlMessageFactory",
"com.ibm.ws.sib.mfp.impl.JsMessageFactory",
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.ws.sib.comms.CommsConstants; import com.ibm.ws.sib.mfp.AbstractMessage; import com.ibm.ws.sib.mfp.impl.ControlMessageFactory; import com.ibm.ws.sib.mfp.impl.JsMessageFactory; import com.ibm.ws.sib.utils.ras.SibTr; | import com.ibm.ws.sib.comms.*; import com.ibm.ws.sib.mfp.*; import com.ibm.ws.sib.mfp.impl.*; import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 278,445 |
private ResultSet getProcedureColumnsODBC(String catalog,
String schemaPattern, String procedureNamePattern,
String columnNamePattern) throws SQLException
{
CallableStatement cs = prepareCall("CALL SYSIBM.SQLPROCEDURECOLS(" +
"?, ?, ?, ?, 'DATATYPE=''ODBC''')");
... | ResultSet function(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { CallableStatement cs = prepareCall(STR + STR); cs.setString(1, catalog); cs.setString(2, schemaPattern); cs.setString(3, procedureNamePattern); cs.setString(4, columnNamePattern); cs.exe... | /**
* Helper method for testing getProcedureColumns - calls the ODBC procedure
* @throws SQLException
*/ | Helper method for testing getProcedureColumns - calls the ODBC procedure | getProcedureColumnsODBC | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/tools/src/testing/java/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java",
"license": "apache-2.0",
"size": 184366
} | [
"java.sql.CallableStatement",
"java.sql.ResultSet",
"java.sql.SQLException"
] | import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,594,513 |
public Map<String, Integer> allocate(final Map<String, PortMapping> ports,
final Set<Integer> used) {
return allocate0(ports, Sets.newHashSet(used));
} | Map<String, Integer> function(final Map<String, PortMapping> ports, final Set<Integer> used) { return allocate0(ports, Sets.newHashSet(used)); } | /**
* Allocate ports for port mappings with no external ports configured.
*
* @param ports A map of port mappings for a container, both with statically configured
* external ports and dynamic unconfigured external ports.
* @param used A set of used ports. The ports allocated will not clash ... | Allocate ports for port mappings with no external ports configured | allocate | {
"repo_name": "gtonic/helios",
"path": "helios-services/src/main/java/com/spotify/helios/agent/PortAllocator.java",
"license": "apache-2.0",
"size": 4794
} | [
"com.google.common.collect.Sets",
"com.spotify.helios.common.descriptors.PortMapping",
"java.util.Map",
"java.util.Set"
] | import com.google.common.collect.Sets; import com.spotify.helios.common.descriptors.PortMapping; import java.util.Map; import java.util.Set; | import com.google.common.collect.*; import com.spotify.helios.common.descriptors.*; import java.util.*; | [
"com.google.common",
"com.spotify.helios",
"java.util"
] | com.google.common; com.spotify.helios; java.util; | 685,173 |
public Release getRelease(
final String project,
final int releaseId,
final Boolean includeAllApprovals) {
final UUID locationId = UUID.fromString("a166fde7-27ad-408e-ba75-703c2cc9d500"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-prev... | Release function( final String project, final int releaseId, final Boolean includeAllApprovals) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, project); routeVa... | /**
* [Preview API 3.1-preview.4]
*
* @param project
* Project ID or project name
* @param releaseId
*
* @param includeAllApprovals
*
* @return Release
*/ | [Preview API 3.1-preview.4] | getRelease | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java",
"license": "mit",
"size": 186198
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.client.model.NameValueCollection",
"com.microsoft.alm.visualstudio.services.releasemanagement.webapi.Release",
"com.microsoft.alm.visualstudio.services.webapi.ApiR... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.Release; import com.microsoft.alm.visualstudio.ser... | import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.visualstudio.services.releasemanagement.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 321,871 |
public synchronized Collection<Pool> getPools() {
return pools.values();
} | synchronized Collection<Pool> function() { return pools.values(); } | /**
* Get a collection of all pools
*/ | Get a collection of all pools | getPools | {
"repo_name": "jayantgolhar/Hadoop-0.21.0",
"path": "mapred/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/PoolManager.java",
"license": "apache-2.0",
"size": 21522
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 728,410 |
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)
private void showProgress(final boolean show) {
// On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow
// for very easy animations. If available, use these APIs to fade-in
// the progress spinner.
if (Build.VERSION.SDK... | @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) void function(final boolean show) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) { int shortAnimTime = getResources().getInteger(android.R.integer.config_shortAnimTime); | /**
* Shows the progress UI and hides the login form.
*/ | Shows the progress UI and hides the login form | showProgress | {
"repo_name": "topicos20152/Android",
"path": "app/src/main/java/com/topicos/topicosandroid/LoginActivity.java",
"license": "apache-2.0",
"size": 9127
} | [
"android.annotation.TargetApi",
"android.os.Build"
] | import android.annotation.TargetApi; import android.os.Build; | import android.annotation.*; import android.os.*; | [
"android.annotation",
"android.os"
] | android.annotation; android.os; | 2,570,674 |
@SuppressWarnings("rawtypes")
public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer> serializerClass) {
config.registerTypeWithKryoSerializer(type, serializerClass);
} | @SuppressWarnings(STR) void function(Class<?> type, Class<? extends Serializer> serializerClass) { config.registerTypeWithKryoSerializer(type, serializerClass); } | /**
* Registers the given Serializer via its class as a serializer for the
* given type at the KryoSerializer.
*
* @param type
* The class of the types serialized with the given serializer.
* @param serializerClass
* The class of the serializer to use.
*/ | Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer | registerTypeWithKryoSerializer | {
"repo_name": "shaoxuan-wang/flink",
"path": "flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java",
"license": "apache-2.0",
"size": 79530
} | [
"com.esotericsoftware.kryo.Serializer"
] | import com.esotericsoftware.kryo.Serializer; | import com.esotericsoftware.kryo.*; | [
"com.esotericsoftware.kryo"
] | com.esotericsoftware.kryo; | 2,697,241 |
private EventColumn[][] buildEventColumnGroups(
EventColumn[] columnsToAddAsNodes, boolean oneNodeForEachColumn,
EventColumn[] columnsToCheckForEquality,
boolean allColumnsMustBeEqual) {
// build groups for nodes
if (oneNodeForEachColumn) {
this.columnGroupsToAddAsNodes = new EventColumn[columnsToAd... | EventColumn[][] function( EventColumn[] columnsToAddAsNodes, boolean oneNodeForEachColumn, EventColumn[] columnsToCheckForEquality, boolean allColumnsMustBeEqual) { if (oneNodeForEachColumn) { this.columnGroupsToAddAsNodes = new EventColumn[columnsToAddAsNodes.length][1]; for (int i = 0; i < this.columnGroupsToAddAsNod... | /**
* Sets
* <ul>
* <li>{@link #columnGroupsToAddAsNodes} based on
* {@code columnsToAddAsNodes} and {@code oneNodeForEachColumn}</li>
* <li>{@link #columnGroupsToCheckForEquality} based on
* {@code columnsToCheckForEquality} and {@code allColumnsMustBeEqual}</li>
* </ul>
*
* @return Joined {@link #c... | Sets <code>#columnGroupsToAddAsNodes</code> based on columnsToAddAsNodes and oneNodeForEachColumn <code>#columnGroupsToCheckForEquality</code> based on columnsToCheckForEquality and allColumnsMustBeEqual | buildEventColumnGroups | {
"repo_name": "marcel-stud/DNA",
"path": "src/dna/updates/generators/zalando/ZalandoBatchGenerator.java",
"license": "gpl-3.0",
"size": 26892
} | [
"dna.graph.generators.zalando.EventColumn",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collection"
] | import dna.graph.generators.zalando.EventColumn; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; | import dna.graph.generators.zalando.*; import java.util.*; | [
"dna.graph.generators",
"java.util"
] | dna.graph.generators; java.util; | 2,485,167 |
private void ensureStarted() throws NotStartedException {
if (!isStarted()) {
throw new NotStartedException("attempt to use cloud pool that is stopped");
}
} | void function() throws NotStartedException { if (!isStarted()) { throw new NotStartedException(STR); } } | /**
* Ensures that the {@link CloudPool} has been started or otherwise throws a
* {@link NotStartedException}.
*/ | Ensures that the <code>CloudPool</code> has been started or otherwise throws a <code>NotStartedException</code> | ensureStarted | {
"repo_name": "Eeemil/scale.cloudpool",
"path": "commons/src/main/java/com/elastisys/scale/cloudpool/commons/basepool/BaseCloudPool.java",
"license": "apache-2.0",
"size": 18146
} | [
"com.elastisys.scale.cloudpool.api.NotStartedException"
] | import com.elastisys.scale.cloudpool.api.NotStartedException; | import com.elastisys.scale.cloudpool.api.*; | [
"com.elastisys.scale"
] | com.elastisys.scale; | 2,529,967 |
public void testRebalance() throws Exception {
for (int iter = 0; iter < 5; iter++) {
log.info("Iteration: " + iter);
final IgniteEx ignite = startGrid(1);
final CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>("testCache");
ccfg.setAtom... | void function() throws Exception { for (int iter = 0; iter < 5; iter++) { log.info(STR + iter); final IgniteEx ignite = startGrid(1); final CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>(STR); ccfg.setAtomicityMode(atomicityMode()); ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FU... | /**
* Test that during rebalancing correct old value passed to continuous query.
*
* @throws Exception If fail.
*/ | Test that during rebalancing correct old value passed to continuous query | testRebalance | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java",
"license": "apache-2.0",
"size": 85079
} | [
"java.util.concurrent.atomic.AtomicBoolean",
"java.util.concurrent.atomic.AtomicInteger",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.CacheRebalanceMode",
"org.apache.ignite.cache.CacheWriteSynchronizationMode",
"org.apache.ignite.cache.query.ContinuousQuery",
"org.apache.ignite.configurat... | import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.cache.query.ContinuousQuery; import org.apac... | import java.util.concurrent.atomic.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,203,966 |
Map<String, String> map = null;
map = new HashMap<String, String>();
map.put("FilePath", filepath);
return api.callApi("importLogFiles", "view", "ImportZAPLogFromFile", map);
} | Map<String, String> map = null; map = new HashMap<String, String>(); map.put(STR, filepath); return api.callApi(STR, "view", STR, map); } | /**
* This component is optional and therefore the API will only work if it is installed
*/ | This component is optional and therefore the API will only work if it is installed | ImportZAPLogFromFile | {
"repo_name": "0xkasun/zaproxy",
"path": "src/org/zaproxy/clientapi/gen/ImportLogFiles.java",
"license": "apache-2.0",
"size": 3328
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 208,068 |
public OffsetDateTime lastUpdatedBefore() {
return this.lastUpdatedBefore;
} | OffsetDateTime function() { return this.lastUpdatedBefore; } | /**
* Get the lastUpdatedBefore property: The time at or before which the run event was updated in 'ISO 8601' format.
*
* @return the lastUpdatedBefore value.
*/ | Get the lastUpdatedBefore property: The time at or before which the run event was updated in 'ISO 8601' format | lastUpdatedBefore | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/RunFilterParameters.java",
"license": "mit",
"size": 5560
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,249,348 |
private Map<String, Map<String, Integer>> getNameConfigurations() {
if (this.labels == null) {
InputStream stream = getInputStream("labels.properties");
BufferedReader br = new BufferedReader(new InputStreamReader(stream, CHARSET));
this.la... | Map<String, Map<String, Integer>> function() { if (this.labels == null) { InputStream stream = getInputStream(STR); BufferedReader br = new BufferedReader(new InputStreamReader(stream, CHARSET)); this.labels = new HashMap<String, Map<String, Integer>>(); try { String line = br.readLine(); while (line != null) { String[... | /**
* Returns all name configurations
* @return
*/ | Returns all name configurations | getNameConfigurations | {
"repo_name": "RaffaelBild/arx",
"path": "src/main/org/deidentifier/arx/risk/HIPAAConstants.java",
"license": "apache-2.0",
"size": 7254
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.HashMap",
"java.util.Map"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,243,580 |
public int compareRows(byte [] left, int loffset, int llength,
byte [] right, int roffset, int rlength) {
return Bytes.compareTo(left, loffset, llength, right, roffset, rlength);
} | int function(byte [] left, int loffset, int llength, byte [] right, int roffset, int rlength) { return Bytes.compareTo(left, loffset, llength, right, roffset, rlength); } | /**
* Get the b[],o,l for left and right rowkey portions and compare.
* @param left
* @param loffset
* @param llength
* @param right
* @param roffset
* @param rlength
* @return 0 if equal, <0 if left smaller, >0 if right smaller
*/ | Get the b[],o,l for left and right rowkey portions and compare | compareRows | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java",
"license": "apache-2.0",
"size": 88902
} | [
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 42,105 |
public Iterator<? extends Obj2FloatMap.Entry<Key>> iterator(); | Iterator<? extends Obj2FloatMap.Entry<Key>> function(); | /**
* Iterates over all elements in the container.
*
* @return an iterable over all the elements stored in the container
*/ | Iterates over all elements in the container | iterator | {
"repo_name": "varkhan/VCom4j",
"path": "Base/Containers/src/net/varkhan/base/containers/map/Obj2FloatMap.java",
"license": "lgpl-2.1",
"size": 5127
} | [
"net.varkhan.base.containers.Iterator"
] | import net.varkhan.base.containers.Iterator; | import net.varkhan.base.containers.*; | [
"net.varkhan.base"
] | net.varkhan.base; | 1,155,649 |
private List<? extends FederationNamenodeContext> getNamenodesForBlockPoolId(
final String bpId) throws IOException {
List<? extends FederationNamenodeContext> namenodes =
namenodeResolver.getNamenodesForBlockPoolId(bpId);
if (namenodes == null || namenodes.isEmpty()) {
throw new IOExcep... | List<? extends FederationNamenodeContext> function( final String bpId) throws IOException { List<? extends FederationNamenodeContext> namenodes = namenodeResolver.getNamenodesForBlockPoolId(bpId); if (namenodes == null namenodes.isEmpty()) { throw new IOException(STR + bpId + STR + this.routerId); } return namenodes; } | /**
* Get a prioritized list of NNs that share the same block pool ID (in the
* same namespace). NNs that are reported as ACTIVE will be first in the list.
*
* @param bpId The blockpool ID for the namespace.
* @return A prioritized list of NNs to use for communication.
* @throws IOException If a NN ca... | Get a prioritized list of NNs that share the same block pool ID (in the same namespace). NNs that are reported as ACTIVE will be first in the list | getNamenodesForBlockPoolId | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java",
"license": "apache-2.0",
"size": 44687
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hdfs.server.federation.resolver.FederationNamenodeContext"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hdfs.server.federation.resolver.FederationNamenodeContext; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.server.federation.resolver.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,350,123 |
@PUT
@Path("nodesource/edit")
@Produces("application/json")
NSState editNodeSource(@HeaderParam("sessionid") String sessionId,
@FormParam("nodeSourceName") String nodeSourceName,
@FormParam("infrastructureType") String infrastructureType,
@FormParam("infrastructurePar... | @Path(STR) @Produces(STR) NSState editNodeSource(@HeaderParam(STR) String sessionId, @FormParam(STR) String nodeSourceName, @FormParam(STR) String infrastructureType, @FormParam(STR) String[] infrastructureParameters, @FormParam(STR) String[] infrastructureFileParameters, @FormParam(STR) String policyType, @FormParam(S... | /**
* Edit parameters of an un-deployed node source.
*
* @param sessionId current session
* @param nodeSourceName name of the node source to edit
* @param infrastructureType fully qualified class name of the infrastructure to edit
* @param infrastructureParameters string parameters of the ... | Edit parameters of an un-deployed node source | editNodeSource | {
"repo_name": "ShatalovYaroslav/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/RMRestInterface.java",
"license": "agpl-3.0",
"size": 42551
} | [
"javax.ws.rs.FormParam",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.ow2.proactive.resourcemanager.common.NSState",
"org.ow2.proactive.scheduler.common.exception.NotConnectedException"
] | import javax.ws.rs.FormParam; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.ow2.proactive.resourcemanager.common.NSState; import org.ow2.proactive.scheduler.common.exception.NotConnectedException; | import javax.ws.rs.*; import org.ow2.proactive.resourcemanager.common.*; import org.ow2.proactive.scheduler.common.exception.*; | [
"javax.ws",
"org.ow2.proactive"
] | javax.ws; org.ow2.proactive; | 631,174 |
public static void savesAreOnline(Activity activity){
SharedPreferences saves = activity.getSharedPreferences(SAVE_NAME, 0);
SharedPreferences.Editor editor = saves.edit();
editor.putBoolean(ONLINE_STATUS_KEY, true);
editor.commit();
}
| static void function(Activity activity){ SharedPreferences saves = activity.getSharedPreferences(SAVE_NAME, 0); SharedPreferences.Editor editor = saves.edit(); editor.putBoolean(ONLINE_STATUS_KEY, true); editor.commit(); } | /**
* marks the data as online
* @param activity activity that is needed for shared preferences
*/ | marks the data as online | savesAreOnline | {
"repo_name": "shoaibsadik/latest_Flappy_Cow",
"path": "src/com/quchen/flappycow/AccomplishmentBox.java",
"license": "mit",
"size": 5173
} | [
"android.app.Activity",
"android.content.SharedPreferences"
] | import android.app.Activity; import android.content.SharedPreferences; | import android.app.*; import android.content.*; | [
"android.app",
"android.content"
] | android.app; android.content; | 1,767,982 |
public List<VpnClientRootCertificate> vpnClientRootCertificates() {
return this.vpnClientRootCertificates;
} | List<VpnClientRootCertificate> function() { return this.vpnClientRootCertificates; } | /**
* Get vpnClientRootCertificate for virtual network gateway.
*
* @return the vpnClientRootCertificates value
*/ | Get vpnClientRootCertificate for virtual network gateway | vpnClientRootCertificates | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/VpnClientConfiguration.java",
"license": "mit",
"size": 9371
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 954,655 |
@Override
public Schema getSchema() {
return schema$;
} | Schema function() { return schema$; } | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @return the schema object describing this class.
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | getSchema | {
"repo_name": "kineticadb/kinetica-api-java",
"path": "api/src/main/java/com/gpudb/protocol/RawGetRecordsBySeriesResponse.java",
"license": "mit",
"size": 11337
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 2,116,325 |
public List<Sort> getInput(){
return item.getInput();
}
//getters giving HLAPI object
| List<Sort> function(){ return item.getInput(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getInput | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/multisets/hlapi/AddHLAPI.java",
"license": "epl-1.0",
"size": 89654
} | [
"fr.lip6.move.pnml.symmetricnet.terms.Sort",
"java.util.List"
] | import fr.lip6.move.pnml.symmetricnet.terms.Sort; import java.util.List; | import fr.lip6.move.pnml.symmetricnet.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 2,404,172 |
void connect(String servers) throws InterruptedException {
System.out.println("Connecting to VoltDB...");
String[] serverArray = servers.split(",");
final CountDownLatch connections = new CountDownLatch(serverArray.length); | void connect(String servers) throws InterruptedException { System.out.println(STR); String[] serverArray = servers.split(","); final CountDownLatch connections = new CountDownLatch(serverArray.length); | /**
* Connect to a set of servers in parallel. Each will retry until
* connection. This call will block until all have connected.
*
* @param servers A comma separated list of servers using the hostname:port
* syntax (where :port is optional).
* @throws InterruptedException if anything bad ... | Connect to a set of servers in parallel. Each will retry until connection. This call will block until all have connected | connect | {
"repo_name": "migue/voltdb",
"path": "examples/voltkv/src/voltkv/SyncBenchmark.java",
"license": "agpl-3.0",
"size": 22035
} | [
"java.util.concurrent.CountDownLatch"
] | import java.util.concurrent.CountDownLatch; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 499,255 |
// ===========================================================================
public List<CodeSource> getSources()
{
List<CodeSource> l = new ArrayList<CodeSource>();
l.addAll(sourcesMap.values());
return l;
} | List<CodeSource> function() { List<CodeSource> l = new ArrayList<CodeSource>(); l.addAll(sourcesMap.values()); return l; } | /**
* Returns the list of available code sources.
*
* @return The list of codesources.
*/ | Returns the list of available code sources | getSources | {
"repo_name": "gevaerts/Gluewine",
"path": "imp/src/java/org/gluewine/launcher/Launcher.java",
"license": "apache-2.0",
"size": 47005
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,910,960 |
private void transitionStates(
@State int expected, @State int newState, Runnable afterTransition) {
if (!mState.compareAndSet(expected, newState)) {
@State
int state = mState.get();
if (!(state == State.CANCELLED || state == State.ERROR)) {
th... | void function( @State int expected, @State int newState, Runnable afterTransition) { if (!mState.compareAndSet(expected, newState)) { int state = mState.get(); if (!(state == State.CANCELLED state == State.ERROR)) { throw new IllegalStateException( STR + expected + STR + state); } } else { afterTransition.run(); } } | /**
* Atomically swaps from the expected state to a new state. If the swap fails, and it's not
* due to an earlier error or cancellation, throws an exception.
*
* @param afterTransition Callback to run after transition completes successfully.
*/ | Atomically swaps from the expected state to a new state. If the swap fails, and it's not due to an earlier error or cancellation, throws an exception | transitionStates | {
"repo_name": "scheib/chromium",
"path": "components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequest.java",
"license": "bsd-3-clause",
"size": 35918
} | [
"org.chromium.net.impl.JavaUrlRequestUtils"
] | import org.chromium.net.impl.JavaUrlRequestUtils; | import org.chromium.net.impl.*; | [
"org.chromium.net"
] | org.chromium.net; | 2,382,251 |
private static byte[] toByteArray(UUID uuid) {
ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
bb.putLong(uuid.getMostSignificantBits());
bb.putLong(uuid.getLeastSignificantBits());
return bb.array();
} | static byte[] function(UUID uuid) { ByteBuffer bb = ByteBuffer.wrap(new byte[16]); bb.putLong(uuid.getMostSignificantBits()); bb.putLong(uuid.getLeastSignificantBits()); return bb.array(); } | /**
* Extracts the bytes from a UUID instance in MSB, LSB order.
*
* @param uuid
* a UUID instance.
* @return the bytes from the UUID instance.
*/ | Extracts the bytes from a UUID instance in MSB, LSB order | toByteArray | {
"repo_name": "IHTSDO/OTF-User-Module",
"path": "security/src/main/java/org/ihtsdo/otf/security/util/UuidConverter.java",
"license": "apache-2.0",
"size": 6095
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 545,009 |
public static MetadataSnapshot readMetadataSnapshot(Path indexLocation, ShardId shardId, NodeEnvironment.ShardLocker shardLocker,
Logger logger) throws IOException {
try (ShardLock lock = shardLocker.lock(shardId, "read metadata snapshot", TimeUnit.SEC... | static MetadataSnapshot function(Path indexLocation, ShardId shardId, NodeEnvironment.ShardLocker shardLocker, Logger logger) throws IOException { try (ShardLock lock = shardLocker.lock(shardId, STR, TimeUnit.SECONDS.toMillis(5)); Directory dir = new SimpleFSDirectory(indexLocation)) { failIfCorrupted(dir); return new ... | /**
* Reads a MetadataSnapshot from the given index locations or returns an empty snapshot if it can't be read.
*
* @throws IOException if the index we try to read is corrupted
*/ | Reads a MetadataSnapshot from the given index locations or returns an empty snapshot if it can't be read | readMetadataSnapshot | {
"repo_name": "robin13/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/store/Store.java",
"license": "apache-2.0",
"size": 74189
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.nio.file.NoSuchFileException",
"java.nio.file.Path",
"java.util.concurrent.TimeUnit",
"org.apache.logging.log4j.Logger",
"org.apache.logging.log4j.message.ParameterizedMessage",
"org.apache.lucene.index.IndexNotFoundException",
"org.apach... | import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.util.concurrent.TimeUnit; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.index.IndexNotFoundE... | import java.io.*; import java.nio.file.*; import java.util.concurrent.*; import org.apache.logging.log4j.*; import org.apache.logging.log4j.message.*; import org.apache.lucene.index.*; import org.apache.lucene.store.*; import org.elasticsearch.env.*; import org.elasticsearch.index.shard.*; | [
"java.io",
"java.nio",
"java.util",
"org.apache.logging",
"org.apache.lucene",
"org.elasticsearch.env",
"org.elasticsearch.index"
] | java.io; java.nio; java.util; org.apache.logging; org.apache.lucene; org.elasticsearch.env; org.elasticsearch.index; | 1,281,940 |
System.out.println("Measurements");
// step 1: creation of a document-object
Rectangle pageSize = new Rectangle(288, 720);
Document document = new Document(pageSize, 36, 18, 72, 72);
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWri... | System.out.println(STR); Rectangle pageSize = new Rectangle(288, 720); Document document = new Document(pageSize, 36, 18, 72, 72); try { PdfWriter.getInstance(document, new FileOutputStream(android.os.Environment.getExternalStorageDirectory() + java.io.File.separator + STR + java.io.File.separator + STR)); document.ope... | /**
* Creates a PDF document explaining the measurement system.
*
* @param args
* no arguments needed here
*/ | Creates a PDF document explaining the measurement system | main | {
"repo_name": "fc-dream/PDFTestForAndroid",
"path": "sample/PDFtest/src/com/lowagie/examples/general/faq/Measurements.java",
"license": "apache-2.0",
"size": 2555
} | [
"com.lowagie.text.Document",
"com.lowagie.text.DocumentException",
"com.lowagie.text.Paragraph",
"com.lowagie.text.Rectangle",
"com.lowagie.text.pdf.PdfWriter",
"java.io.FileOutputStream",
"java.io.IOException"
] | import com.lowagie.text.Document; import com.lowagie.text.DocumentException; import com.lowagie.text.Paragraph; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.PdfWriter; import java.io.FileOutputStream; import java.io.IOException; | import com.lowagie.text.*; import com.lowagie.text.pdf.*; import java.io.*; | [
"com.lowagie.text",
"java.io"
] | com.lowagie.text; java.io; | 2,808,009 |
public final Iterable<java.lang.Long> queryKeysByActualDuration(java.lang.Long actualDuration) {
final Filter filter = createEqualsFilter(COLUMN_NAME_ACTUALDURATION, actualDuration);
return queryIterableKeys(0, -1, null, null, null, false, null, false, filter);
} | final Iterable<java.lang.Long> function(java.lang.Long actualDuration) { final Filter filter = createEqualsFilter(COLUMN_NAME_ACTUALDURATION, actualDuration); return queryIterableKeys(0, -1, null, null, null, false, null, false, filter); } | /**
* query-key-by method for attribute field actualDuration
* @param actualDuration the specified attribute
* @return an Iterable of keys to the DmMeetings with the specified attribute
*/ | query-key-by method for attribute field actualDuration | queryKeysByActualDuration | {
"repo_name": "goldengekko/Meetr-Backend",
"path": "src/main/java/com/goldengekko/meetr/dao/GeneratedDmMeetingDaoImpl.java",
"license": "gpl-3.0",
"size": 68599
} | [
"net.sf.mardao.core.Filter"
] | import net.sf.mardao.core.Filter; | import net.sf.mardao.core.*; | [
"net.sf.mardao"
] | net.sf.mardao; | 2,138,706 |
final Set<OptimizedCallTarget> allCallTargets = new HashSet<>();
allCallTargets.add(originalCallTarget);
for (RootCallTarget target : Truffle.getRuntime().getCallTargets()) {
if (target instanceof OptimizedCallTarget) {
OptimizedCallTarget oct = (OptimizedCallTarget) target;
... | final Set<OptimizedCallTarget> allCallTargets = new HashSet<>(); allCallTargets.add(originalCallTarget); for (RootCallTarget target : Truffle.getRuntime().getCallTargets()) { if (target instanceof OptimizedCallTarget) { OptimizedCallTarget oct = (OptimizedCallTarget) target; if (oct.getSourceCallTarget() == originalCal... | /**
* Finds all call targets available for the same original call target. This might be useful if a
* {@link CallTarget} got duplicated due to splitting.
*/ | Finds all call targets available for the same original call target. This might be useful if a <code>CallTarget</code> got duplicated due to splitting | findDuplicateCallTargets | {
"repo_name": "graalvm/graal-core",
"path": "graal/org.graalvm.compiler.truffle.test/src/org/graalvm/compiler/truffle/test/builtins/SLGraalRuntimeBuiltin.java",
"license": "gpl-2.0",
"size": 4285
} | [
"com.oracle.truffle.api.RootCallTarget",
"com.oracle.truffle.api.Truffle",
"java.util.HashSet",
"java.util.Set",
"org.graalvm.compiler.truffle.OptimizedCallTarget"
] | import com.oracle.truffle.api.RootCallTarget; import com.oracle.truffle.api.Truffle; import java.util.HashSet; import java.util.Set; import org.graalvm.compiler.truffle.OptimizedCallTarget; | import com.oracle.truffle.api.*; import java.util.*; import org.graalvm.compiler.truffle.*; | [
"com.oracle.truffle",
"java.util",
"org.graalvm.compiler"
] | com.oracle.truffle; java.util; org.graalvm.compiler; | 2,155,271 |
void getViewportFullControls(RectF outRect); | void getViewportFullControls(RectF outRect); | /**
* Get the viewport assuming the browser controls are completely shown.
* @param outRect The RectF object to write the result to.
*/ | Get the viewport assuming the browser controls are completely shown | getViewportFullControls | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerHost.java",
"license": "bsd-3-clause",
"size": 3901
} | [
"android.graphics.RectF"
] | import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,709,665 |
public void setLocalMemberHealthAspects(List<MemberHealthAspect> healthAspects) {
this.localHealthAspects.clear();
if (healthAspects != null && !healthAspects.isEmpty()) {
this.localHealthAspects.addAll(healthAspects);
for (MemberHealthAspect aspect : healthAspects) {
LOG.info("Cluster local-membe... | void function(List<MemberHealthAspect> healthAspects) { this.localHealthAspects.clear(); if (healthAspects != null && !healthAspects.isEmpty()) { this.localHealthAspects.addAll(healthAspects); for (MemberHealthAspect aspect : healthAspects) { LOG.info(STR, aspect.getClass() .getSimpleName(), aspect.getHealthState()); }... | /**
* Sets a list of external health-aspects used to determine the overall health-state of the local application
* instance/member. Having health-aspects is optional - if none are registered, the state of the local member
* instance is just always determined to be "UP".
*/ | Sets a list of external health-aspects used to determine the overall health-state of the local application instance/member. Having health-aspects is optional - if none are registered, the state of the local member instance is just always determined to be "UP" | setLocalMemberHealthAspects | {
"repo_name": "javapathshala/JP.Cody",
"path": "Cody/jp-apps-parent/jp-cluster/src/main/java/com/jp/app/cluster/ClusterManager.java",
"license": "gpl-2.0",
"size": 36208
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,297,181 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<CustomDomainInner> listByEndpoint(
String resourceGroupName, String profileName, String endpointName, Context context); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<CustomDomainInner> listByEndpoint( String resourceGroupName, String profileName, String endpointName, Context context); | /**
* Lists all of the existing custom domains within an endpoint.
*
* @param resourceGroupName Name of the Resource group within the Azure subscription.
* @param profileName Name of the CDN profile which is unique within the resource group.
* @param endpointName Name of the endpoint under the ... | Lists all of the existing custom domains within an endpoint | listByEndpoint | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/fluent/CustomDomainsClient.java",
"license": "mit",
"size": 34863
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.cdn.fluent.models.CustomDomainInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.cdn.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,011,876 |
@Generated
@Selector("requestSendPTPCommand:outData:completion:")
public native void requestSendPTPCommandOutDataCompletion(NSData ptpCommand, NSData ptpData,
@ObjCBlock(name = "call_requestSendPTPCommandOutDataCompletion") Block_requestSendPTPCommandOutDataCompletion completion); | @Selector(STR) native void function(NSData ptpCommand, NSData ptpData, @ObjCBlock(name = STR) Block_requestSendPTPCommandOutDataCompletion completion); | /**
* requestSendPTPCommand:outData:completion
* <p>
* This method asynchronously sends a PTP command to a camera.
* <p>
* The response, data, and any error message will be returned the block.
*/ | requestSendPTPCommand:outData:completion This method asynchronously sends a PTP command to a camera. The response, data, and any error message will be returned the block | requestSendPTPCommandOutDataCompletion | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/imagecapturecore/ICCameraDevice.java",
"license": "apache-2.0",
"size": 15967
} | [
"org.moe.natj.objc.ann.ObjCBlock",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.ObjCBlock; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,910,873 |
protected StringValueRegistry getStringValueRegistry() {
if (stringValueRegistry == null) {
stringValueRegistry = createDefaultStringValueRegistry();
}
return stringValueRegistry;
} | StringValueRegistry function() { if (stringValueRegistry == null) { stringValueRegistry = createDefaultStringValueRegistry(); } return stringValueRegistry; } | /**
* Returns the StringValueRegistry which defines the string representation for
* each cells. This is strictly for internal use by the table, which has the
* responsibility to keep in synch with registered renderers.<p>
*
* Currently exposed for testing reasons, client code is recommended t... | Returns the StringValueRegistry which defines the string representation for each cells. This is strictly for internal use by the table, which has the responsibility to keep in synch with registered renderers. Currently exposed for testing reasons, client code is recommended to not use nor override | getStringValueRegistry | {
"repo_name": "trejkaz/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java",
"license": "lgpl-2.1",
"size": 163623
} | [
"org.jdesktop.swingx.sort.StringValueRegistry"
] | import org.jdesktop.swingx.sort.StringValueRegistry; | import org.jdesktop.swingx.sort.*; | [
"org.jdesktop.swingx"
] | org.jdesktop.swingx; | 1,953,505 |
private synchronized void registerHarmonyDeviceDiscoveryService(HarmonyHubHandler harmonyHubHandler) {
HarmonyDeviceDiscoveryService discoveryService = new HarmonyDeviceDiscoveryService(harmonyHubHandler);
this.discoveryServiceRegs.put(harmonyHubHandler.getThing().getUID(),
bundleCon... | synchronized void function(HarmonyHubHandler harmonyHubHandler) { HarmonyDeviceDiscoveryService discoveryService = new HarmonyDeviceDiscoveryService(harmonyHubHandler); this.discoveryServiceRegs.put(harmonyHubHandler.getThing().getUID(), bundleContext.registerService(DiscoveryService.class.getName(), discoveryService, ... | /**
* Adds HarmonyHubHandler to the discovery service to find Harmony Devices
*
* @param harmonyHubHandler
*/ | Adds HarmonyHubHandler to the discovery service to find Harmony Devices | registerHarmonyDeviceDiscoveryService | {
"repo_name": "paulianttila/openhab2",
"path": "bundles/org.openhab.binding.harmonyhub/src/main/java/org/openhab/binding/harmonyhub/internal/HarmonyHubHandlerFactory.java",
"license": "epl-1.0",
"size": 6704
} | [
"java.util.Hashtable",
"org.openhab.binding.harmonyhub.internal.discovery.HarmonyDeviceDiscoveryService",
"org.openhab.binding.harmonyhub.internal.handler.HarmonyHubHandler",
"org.openhab.core.config.discovery.DiscoveryService"
] | import java.util.Hashtable; import org.openhab.binding.harmonyhub.internal.discovery.HarmonyDeviceDiscoveryService; import org.openhab.binding.harmonyhub.internal.handler.HarmonyHubHandler; import org.openhab.core.config.discovery.DiscoveryService; | import java.util.*; import org.openhab.binding.harmonyhub.internal.discovery.*; import org.openhab.binding.harmonyhub.internal.handler.*; import org.openhab.core.config.discovery.*; | [
"java.util",
"org.openhab.binding",
"org.openhab.core"
] | java.util; org.openhab.binding; org.openhab.core; | 622,627 |
SeaGlassPainter painter = null;
if (context != null) {
painter = (SeaGlassPainter) context.getStyle().get(context, key);
}
if (painter == null) {
painter = (SeaGlassPainter) UIManager.get(prefix + "[Enabled]." + key);
}
if (painter == null) {
... | SeaGlassPainter painter = null; if (context != null) { painter = (SeaGlassPainter) context.getStyle().get(context, key); } if (painter == null) { painter = (SeaGlassPainter) UIManager.get(prefix + STR + key); } if (painter == null) { painter = (SeaGlassPainter) UIManager.get(prefix + "." + key); } if (painter != null &... | /**
* Paints the icon at the specified location.
*
* @param context Identifies hosting region, may be null.
* @param g the Graphics context to paint with.
* @param x x location to paint to.
* @param y y location to paint to.
* @param w Width of the region to pa... | Paints the icon at the specified location | paintIcon | {
"repo_name": "khuxtable/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/component/SeaGlassIcon.java",
"license": "apache-2.0",
"size": 10410
} | [
"com.seaglasslookandfeel.SeaGlassLookAndFeel",
"com.seaglasslookandfeel.painter.SeaGlassPainter",
"java.awt.BorderLayout",
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"javax.swing.JComponent",
"javax.swing.JToolBar",
"javax.swing.UIManager",
"javax.swing.plaf.UIResource"
] | import com.seaglasslookandfeel.SeaGlassLookAndFeel; import com.seaglasslookandfeel.painter.SeaGlassPainter; import java.awt.BorderLayout; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import javax.swing.JComponent; import javax.swing.JToolBar; import javax.swing.UIManager; import javax.swing.plaf.UIR... | import com.seaglasslookandfeel.*; import com.seaglasslookandfeel.painter.*; import java.awt.*; import java.awt.image.*; import javax.swing.*; import javax.swing.plaf.*; | [
"com.seaglasslookandfeel",
"com.seaglasslookandfeel.painter",
"java.awt",
"javax.swing"
] | com.seaglasslookandfeel; com.seaglasslookandfeel.painter; java.awt; javax.swing; | 2,389,625 |
private Direction randomlyChooseMove(ArrayList<Direction> d) {
//drawing a lot of direction
int max = d.size();
if (max == 0) { //the fish can't move.
return null;
}
int randomDraw = (int) (Math.random() * (max));
Direction randomDirection = d.get(randomDraw)... | Direction function(ArrayList<Direction> d) { int max = d.size(); if (max == 0) { return null; } int randomDraw = (int) (Math.random() * (max)); Direction randomDirection = d.get(randomDraw); return randomDirection; } | /**
* Method which consist of choosing a direction randomly
* The positions given always led to empty cells.
* @param d <ArrayList<Direction>> ArrayList of move going to empty cell.
* @return randomDirection <Direction> The randomly choosen direction
*/ | Method which consist of choosing a direction randomly The positions given always led to empty cells | randomlyChooseMove | {
"repo_name": "plabadille/jeuDeLaVie",
"path": "model/fish/Sardine.java",
"license": "gpl-3.0",
"size": 2223
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,958,315 |
List<String> readWorkerGroups(List<String> groups); | List<String> readWorkerGroups(List<String> groups); | /**
*
* Reads all of the groups that matches the given group names
*
* @param groups the group names to match
* @return t List of String of the matched groups
*/ | Reads all of the groups that matches the given group names | readWorkerGroups | {
"repo_name": "narry/score",
"path": "engine/node/score-node-api/src/main/java/io/cloudslang/engine/node/services/WorkerNodeService.java",
"license": "apache-2.0",
"size": 7150
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 708,028 |
public static String isStartWithSpeakerName(String speakerName, LinkedList<String> list) {
String partialName = SpeakerNameUtils.normalizeSpeakerName(speakerName) + "_";
for (String name : list) {
if (name.startsWith(partialName)) {
return name;
}
}
return null;
} | static String function(String speakerName, LinkedList<String> list) { String partialName = SpeakerNameUtils.normalizeSpeakerName(speakerName) + "_"; for (String name : list) { if (name.startsWith(partialName)) { return name; } } return null; } | /**
* Checks if is start with speaker name.
*
* @param speakerName the speaker name
* @param list the list
* @return the string
*/ | Checks if is start with speaker name | isStartWithSpeakerName | {
"repo_name": "Adirockzz95/GenderDetect",
"path": "src/src/fr/lium/experimental/spkDiarization/programs/SpeakerIdenificationDecision14.java",
"license": "gpl-3.0",
"size": 46876
} | [
"fr.lium.experimental.spkDiarization.libNamedSpeaker.SpeakerNameUtils",
"java.util.LinkedList"
] | import fr.lium.experimental.spkDiarization.libNamedSpeaker.SpeakerNameUtils; import java.util.LinkedList; | import fr.lium.experimental.*; import java.util.*; | [
"fr.lium.experimental",
"java.util"
] | fr.lium.experimental; java.util; | 2,384,633 |
private List<Link> findSubsetOfLinksThatReachNode(List<Link> links, Link linkToIgnore, Node node) {
List<Link> result = null;
for (Link link : links) {
if (link == linkToIgnore) {
continue;
}
if (foundInChain(link, node)) {
if (result == null) {
result = new ArrayList<>();
}
result.... | List<Link> function(List<Link> links, Link linkToIgnore, Node node) { List<Link> result = null; for (Link link : links) { if (link == linkToIgnore) { continue; } if (foundInChain(link, node)) { if (result == null) { result = new ArrayList<>(); } result.add(link); } } if (result != null) { result.add(linkToIgnore); } re... | /**
* Find out if any of the supplied links contain a specified node in their successor chain.
* @param links the set of links to check
* @param linkToIgnore a link within the supplied list to ignore (caller has already
* checked)
* @param node a possible common node amongst these links
* @return a list of ... | Find out if any of the supplied links contain a specified node in their successor chain | findSubsetOfLinksThatReachNode | {
"repo_name": "markfisher/spring-cloud-data",
"path": "spring-cloud-dataflow-core/src/main/java/org/springframework/cloud/dataflow/core/dsl/graph/Graph.java",
"license": "apache-2.0",
"size": 21153
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 858,098 |
protected void addPermissionDetails(Object primaryDataObjectOrDocument, Map<String, String> attributes) {
addStandardAttributes(primaryDataObjectOrDocument, attributes);
}
| void function(Object primaryDataObjectOrDocument, Map<String, String> attributes) { addStandardAttributes(primaryDataObjectOrDocument, attributes); } | /**
* Override this method to populate the permission details from the primary
* data object or document. This will only be called once per request.
*
* @param primaryDataObjectOrDocument - the primary data object (i.e. the main object instance
* behind the lookup result row or inquiry) or... | Override this method to populate the permission details from the primary data object or document. This will only be called once per request | addPermissionDetails | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/bo/DataObjectAuthorizerBase.java",
"license": "apache-2.0",
"size": 9705
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,163,894 |
public static <K, InputT, AccumT, OutputT, W extends BoundedWindow> SystemReduceFn<K, InputT,
AccumT, OutputT, W>
combining(
final Coder<K> keyCoder, final AppliedCombineFn<K, InputT, AccumT, OutputT> combineFn) {
final StateTag<K, AccumulatorCombiningState<InputT, AccumT, OutputT>> bufferTa... | static <K, InputT, AccumT, OutputT, W extends BoundedWindow> SystemReduceFn<K, InputT, AccumT, OutputT, W> function( final Coder<K> keyCoder, final AppliedCombineFn<K, InputT, AccumT, OutputT> combineFn) { final StateTag<K, AccumulatorCombiningState<InputT, AccumT, OutputT>> bufferTag; if (combineFn.getFn() instanceof ... | /**
* Create a factory that produces {@link SystemReduceFn} instances that combine all of the input
* values using a {@link CombineFn}.
*/ | Create a factory that produces <code>SystemReduceFn</code> instances that combine all of the input values using a <code>CombineFn</code> | combining | {
"repo_name": "joshualitt/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/util/SystemReduceFn.java",
"license": "apache-2.0",
"size": 5381
} | [
"com.google.cloud.dataflow.sdk.coders.Coder",
"com.google.cloud.dataflow.sdk.transforms.Combine",
"com.google.cloud.dataflow.sdk.transforms.CombineWithContext",
"com.google.cloud.dataflow.sdk.transforms.windowing.BoundedWindow",
"com.google.cloud.dataflow.sdk.util.state.AccumulatorCombiningState",
"com.go... | import com.google.cloud.dataflow.sdk.coders.Coder; import com.google.cloud.dataflow.sdk.transforms.Combine; import com.google.cloud.dataflow.sdk.transforms.CombineWithContext; import com.google.cloud.dataflow.sdk.transforms.windowing.BoundedWindow; import com.google.cloud.dataflow.sdk.util.state.AccumulatorCombiningSta... | import com.google.cloud.dataflow.sdk.coders.*; import com.google.cloud.dataflow.sdk.transforms.*; import com.google.cloud.dataflow.sdk.transforms.windowing.*; import com.google.cloud.dataflow.sdk.util.state.*; | [
"com.google.cloud"
] | com.google.cloud; | 2,685,452 |
public void setCurrentLineForeground(Color currentLineForeground) {
this.currentLineForeground = currentLineForeground;
} | void function(Color currentLineForeground) { this.currentLineForeground = currentLineForeground; } | /**
* The Color used to render the current line digits. Default is Coolor.RED.
*
* @param currentLineForeground the Color used to render the current line
*/ | The Color used to render the current line digits. Default is Coolor.RED | setCurrentLineForeground | {
"repo_name": "Adrodoc55/MPL",
"path": "ide/src/main/java/de/adrodoc55/minecraft/mpl/ide/gui/utils/TextLineNumber.java",
"license": "gpl-3.0",
"size": 15461
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 637,953 |
public synchronized void setDefaultRepositories(
Map<String, ExternalUserRepository> defaultRepositories) {
if (this.defaultRepositories != null) {
throw new IllegalStateException("default repositories exist");
} else {
this.defaultRepositories = defaultRepos... | synchronized void function( Map<String, ExternalUserRepository> defaultRepositories) { if (this.defaultRepositories != null) { throw new IllegalStateException(STR); } else { this.defaultRepositories = defaultRepositories; for (String externalRepositorySystemId : defaultRepositories.keySet()) { registerRepository(extern... | /**
* Set the default repositories
*
* @param defaultRepositories
* map of repositories
*/ | Set the default repositories | setDefaultRepositories | {
"repo_name": "Communote/communote-server",
"path": "communote/persistence/src/main/java/com/communote/server/service/UserService.java",
"license": "apache-2.0",
"size": 32605
} | [
"com.communote.server.core.external.ExternalUserRepository",
"java.util.Map"
] | import com.communote.server.core.external.ExternalUserRepository; import java.util.Map; | import com.communote.server.core.external.*; import java.util.*; | [
"com.communote.server",
"java.util"
] | com.communote.server; java.util; | 1,613,910 |
@Nullable
VirtualFile getModuleFile(); | VirtualFile getModuleFile(); | /**
* Returns the {@code VirtualFile} for the module .iml file.
*
* @return the virtual file instance.
*/ | Returns the VirtualFile for the module .iml file | getModuleFile | {
"repo_name": "signed/intellij-community",
"path": "platform/core-api/src/com/intellij/openapi/module/Module.java",
"license": "apache-2.0",
"size": 5028
} | [
"com.intellij.openapi.vfs.VirtualFile"
] | import com.intellij.openapi.vfs.VirtualFile; | import com.intellij.openapi.vfs.*; | [
"com.intellij.openapi"
] | com.intellij.openapi; | 1,982,333 |
@Override
public ResourceLocator getResourceLocator() {
return Dbchangelog3EditPlugin.INSTANCE;
}
| ResourceLocator function() { return Dbchangelog3EditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "Treehopper/EclipseAugments",
"path": "liquibase-editor/eu.hohenegger.xsd.liquibase.ui/src-gen/org/liquibase/xml/ns/dbchangelog/provider/ConstraintsTypeItemProvider.java",
"license": "epl-1.0",
"size": 19375
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,165,060 |
public void checkSuperuserPrivilege()
throws AccessControlException {
if (!isSuperUser()) {
throw new AccessControlException("Access denied for user "
+ getUser() + ". Superuser privilege is required");
}
}
/**
* Check whether current user have permissions to access the path.
... | void function() throws AccessControlException { if (!isSuperUser()) { throw new AccessControlException(STR + getUser() + STR); } } /** * Check whether current user have permissions to access the path. * Traverse is always checked. * * Parent path means the parent directory for the path. * Ancestor path means the last (... | /**
* Verify if the caller has the required permission. This will result into
* an exception if the caller is not allowed to access the resource.
*/ | Verify if the caller has the required permission. This will result into an exception if the caller is not allowed to access the resource | checkSuperuserPrivilege | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSPermissionChecker.java",
"license": "apache-2.0",
"size": 26940
} | [
"org.apache.hadoop.security.AccessControlException"
] | import org.apache.hadoop.security.AccessControlException; | import org.apache.hadoop.security.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 21,787 |
@Exported
@QuickSilver
public RunT getLastFailedBuild() {
return (RunT)Permalink.LAST_FAILED_BUILD.resolve(this);
} | RunT function() { return (RunT)Permalink.LAST_FAILED_BUILD.resolve(this); } | /**
* Returns the last failed build, if any. Otherwise null.
*/ | Returns the last failed build, if any. Otherwise null | getLastFailedBuild | {
"repo_name": "lilyJi/jenkins",
"path": "core/src/main/java/hudson/model/Job.java",
"license": "mit",
"size": 53225
} | [
"hudson.model.PermalinkProjectAction"
] | import hudson.model.PermalinkProjectAction; | import hudson.model.*; | [
"hudson.model"
] | hudson.model; | 1,158,536 |
public static XMLSignatureInput resolve(ResourceResolverContext context)
throws ResourceResolverException {
for (ResourceResolverSpi resolver : resolverList) {
LOG.debug("check resolvability by class {}", resolver.getClass().getName());
if (resolver.engineCanResolveURI(conte... | static XMLSignatureInput function(ResourceResolverContext context) throws ResourceResolverException { for (ResourceResolverSpi resolver : resolverList) { LOG.debug(STR, resolver.getClass().getName()); if (resolver.engineCanResolveURI(context)) { if (context.secureValidation && (resolver instanceof ResolverLocalFilesyst... | /**
* Method resolve
*
* @param context
* @return the resource
*
* @throws ResourceResolverException
*/ | Method resolve | resolve | {
"repo_name": "apache/santuario-java",
"path": "src/main/java/org/apache/xml/security/utils/resolver/ResourceResolver.java",
"license": "apache-2.0",
"size": 8688
} | [
"org.apache.xml.security.signature.XMLSignatureInput",
"org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP",
"org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem"
] | import org.apache.xml.security.signature.XMLSignatureInput; import org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP; import org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem; | import org.apache.xml.security.signature.*; import org.apache.xml.security.utils.resolver.implementations.*; | [
"org.apache.xml"
] | org.apache.xml; | 380,802 |
@Test
public void test_saveBillings() throws Exception {
entityManager.getTransaction().begin();
instance.create(account);
entityManager.getTransaction().commit();
entityManager.clear();
entityManager.getTransaction().begin();
instance.saveCalculationVersion(acco... | void function() throws Exception { entityManager.getTransaction().begin(); instance.create(account); entityManager.getTransaction().commit(); entityManager.clear(); entityManager.getTransaction().begin(); instance.saveCalculationVersion(account.getId(), calculationVersion); entityManager.getTransaction().commit(); enti... | /**
* <p>
* Accuracy test for the method <code>saveBillings(long accountId, List<Billing> billings)</code>.<br>
* The result should be correct.
* </p>
*
* @throws Exception
* to JUnit.
*/ | Accuracy test for the method <code>saveBillings(long accountId, List<Billing> billings)</code>. The result should be correct. | test_saveBillings | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/Batch_Processing/src/java/tests/gov/opm/scrd/services/impl/AccountServiceImplUnitTests.java",
"license": "apache-2.0",
"size": 61048
} | [
"gov.opm.scrd.entities.application.Account",
"gov.opm.scrd.entities.application.Billing",
"java.util.List",
"org.junit.Assert"
] | import gov.opm.scrd.entities.application.Account; import gov.opm.scrd.entities.application.Billing; import java.util.List; import org.junit.Assert; | import gov.opm.scrd.entities.application.*; import java.util.*; import org.junit.*; | [
"gov.opm.scrd",
"java.util",
"org.junit"
] | gov.opm.scrd; java.util; org.junit; | 1,749,151 |
public void write(DataOutputStream out) throws IOException {
out.writeShort(numOfItems);
LongVector v = items;
int size = numOfItems;
for (int i = 1; i < size; ++i)
v.elementAt(i).write(out);
} | void function(DataOutputStream out) throws IOException { out.writeShort(numOfItems); LongVector v = items; int size = numOfItems; for (int i = 1; i < size; ++i) v.elementAt(i).write(out); } | /**
* Writes the contents of the constant pool table.
*/ | Writes the contents of the constant pool table | write | {
"repo_name": "AndreJCL/JCL",
"path": "JCL_Android/app/src/main/java/javassist/bytecode/ConstPool.java",
"license": "apache-2.0",
"size": 49959
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 209,359 |
public boolean deleteAttachmentPoint(long sw, int port) {
AttachmentPoint ap = new AttachmentPoint(sw, port, 0);
if (this.oldAPs != null) {
ArrayList<AttachmentPoint> apList = new ArrayList<AttachmentPoint>();
apList.addAll(this.oldAPs);
int index = apList.indexO... | boolean function(long sw, int port) { AttachmentPoint ap = new AttachmentPoint(sw, port, 0); if (this.oldAPs != null) { ArrayList<AttachmentPoint> apList = new ArrayList<AttachmentPoint>(); apList.addAll(this.oldAPs); int index = apList.indexOf(ap); if (index > 0) { apList.remove(index); this.oldAPs = apList; } } if (t... | /**
* Delete (sw,port) from the list of list of attachment points
* and oldAPs.
* @param sw
* @param port
* @return
*/ | Delete (sw,port) from the list of list of attachment points and oldAPs | deleteAttachmentPoint | {
"repo_name": "Syn-Flow/Controller",
"path": "src/main/java/net/floodlightcontroller/devicemanager/internal/Device.java",
"license": "apache-2.0",
"size": 28037
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,458,114 |
public static Buddy fromBuddyDetails(BuddyDetails buddyDetails) {
// Create new buddy
Buddy buddy = new Buddy();
// Map data to user details
buddy.buddyId = buddyDetails.getBuddyId();
buddy.companyId = buddyDetails.getCompanyId();
buddy.fullName = buddyDetails.getFull... | static Buddy function(BuddyDetails buddyDetails) { Buddy buddy = new Buddy(); buddy.buddyId = buddyDetails.getBuddyId(); buddy.companyId = buddyDetails.getCompanyId(); buddy.fullName = buddyDetails.getFullName(); buddy.screenName = buddyDetails.getScreenName(); buddy.password = buddyDetails.getPassword(); if (buddyDeta... | /**
* Factory method which creates new Buddy object from BuddyDetails
*
* @param buddyDetails BuddyDetails
* @return User
*/ | Factory method which creates new Buddy object from BuddyDetails | fromBuddyDetails | {
"repo_name": "marcelmika/lims",
"path": "docroot/WEB-INF/src/com/marcelmika/lims/portal/domain/Buddy.java",
"license": "mit",
"size": 12668
} | [
"com.liferay.portal.kernel.util.DigesterUtil",
"com.liferay.portal.kernel.util.HttpUtil",
"com.liferay.portal.model.User",
"com.liferay.portal.service.UserLocalServiceUtil",
"com.liferay.portal.webserver.WebServerServletTokenUtil",
"com.marcelmika.lims.api.entity.BuddyDetails"
] | import com.liferay.portal.kernel.util.DigesterUtil; import com.liferay.portal.kernel.util.HttpUtil; import com.liferay.portal.model.User; import com.liferay.portal.service.UserLocalServiceUtil; import com.liferay.portal.webserver.WebServerServletTokenUtil; import com.marcelmika.lims.api.entity.BuddyDetails; | import com.liferay.portal.kernel.util.*; import com.liferay.portal.model.*; import com.liferay.portal.service.*; import com.liferay.portal.webserver.*; import com.marcelmika.lims.api.entity.*; | [
"com.liferay.portal",
"com.marcelmika.lims"
] | com.liferay.portal; com.marcelmika.lims; | 2,864,308 |
public void clickOnCheckBox(int index) {
if(config.commandLogging){
Log.d(config.commandLoggingTag, "clickOnCheckBox("+index+")");
}
clicker.clickOn(CheckBox.class, index);
} | void function(int index) { if(config.commandLogging){ Log.d(config.commandLoggingTag, STR+index+")"); } clicker.clickOn(CheckBox.class, index); } | /**
* Clicks a CheckBox matching the specified index.
*
* @param index the index of the {@link CheckBox} to click. {@code 0} if only one is available
*/ | Clicks a CheckBox matching the specified index | clickOnCheckBox | {
"repo_name": "darker50/robotium",
"path": "robotium-solo/src/main/java/com/robotium/solo/Solo.java",
"license": "apache-2.0",
"size": 124742
} | [
"android.util.Log",
"android.widget.CheckBox"
] | import android.util.Log; import android.widget.CheckBox; | import android.util.*; import android.widget.*; | [
"android.util",
"android.widget"
] | android.util; android.widget; | 1,972,473 |
Object parseObject(String source, ParsePosition pos); | Object parseObject(String source, ParsePosition pos); | /**
* Parse a date/time string according to the given parse position.
*
* @param source A <code>String</code> whose beginning should be parsed.
* @param pos the parse position
* @return a <code>java.util.Date</code> object
* @see java.text.DateFormat#parseObject(String, ParsePosition)
... | Parse a date/time string according to the given parse position | parseObject | {
"repo_name": "luizperes/TStepProject",
"path": "app/src/main/java/org/telegram/android/time/DateParser.java",
"license": "gpl-2.0",
"size": 3702
} | [
"java.text.ParsePosition"
] | import java.text.ParsePosition; | import java.text.*; | [
"java.text"
] | java.text; | 1,389,639 |
public String reopenEvalAction() {
if (evaluationId == null) {
throw new IllegalArgumentException("evaluationId cannot be null");
}
EvalEvaluation eval = evaluationService.getEvaluationById(evaluationId);
// TODO reopen action
// evaluationSetupService.deleteEvaluation(evaluationId,
// commonLogic.get... | String function() { if (evaluationId == null) { throw new IllegalArgumentException(STR); } EvalEvaluation eval = evaluationService.getEvaluationById(evaluationId); messages.addMessage(new TargettedMessage( STR, new Object[] { eval .getTitle() }, TargettedMessage.SEVERITY_INFO)); return STR; } | /**
* Handles reopening evaluation action (from eval settings view)
*/ | Handles reopening evaluation action (from eval settings view) | reopenEvalAction | {
"repo_name": "buckett/evaluation",
"path": "tool/src/java/org/sakaiproject/evaluation/tool/SetupEvalBean.java",
"license": "apache-2.0",
"size": 26677
} | [
"org.sakaiproject.evaluation.model.EvalEvaluation",
"uk.org.ponder.messageutil.TargettedMessage"
] | import org.sakaiproject.evaluation.model.EvalEvaluation; import uk.org.ponder.messageutil.TargettedMessage; | import org.sakaiproject.evaluation.model.*; import uk.org.ponder.messageutil.*; | [
"org.sakaiproject.evaluation",
"uk.org.ponder"
] | org.sakaiproject.evaluation; uk.org.ponder; | 1,843,451 |
public static List<SimplePrimitiveId> fuzzyParse(String s) {
final ArrayList<SimplePrimitiveId> ids = new ArrayList<SimplePrimitiveId>();
final Matcher m = ID_PATTERN.matcher(s);
while (m.find()) {
final char firstChar = s.charAt(m.start());
ids.add(new SimplePrimitiv... | static List<SimplePrimitiveId> function(String s) { final ArrayList<SimplePrimitiveId> ids = new ArrayList<SimplePrimitiveId>(); final Matcher m = ID_PATTERN.matcher(s); while (m.find()) { final char firstChar = s.charAt(m.start()); ids.add(new SimplePrimitiveId(Long.parseLong(m.group(m.groupCount())), firstChar == 'n'... | /**
* Attempts to parse extract any primitive id from the string {@code s}.
* @param s the string to be parsed, e.g., {@code n1, w1}, {@code node1 and rel2}.
* @return the parsed list of {@code OsmPrimitiveType}s.
*/ | Attempts to parse extract any primitive id from the string s | fuzzyParse | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java",
"license": "gpl-3.0",
"size": 3574
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Matcher"
] | import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 1,639,740 |
public String getRepoName()
{
return repoName;
} | String function() { return repoName; } | /**
* Get the repoName
* @generated
* @return get the repoName
*/ | Get the repoName | getRepoName | {
"repo_name": "schnurlei/jdynameta",
"path": "jdy/jdy.model.metadata/src/main/java/de/jdynameta/metamodel/filter/AppQuery.java",
"license": "apache-2.0",
"size": 2714
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 1,266,945 |
public void uploadToMassive(UploadStrategy strategy) throws RepositoryBackendException, RepositoryResourceException; | void function(UploadStrategy strategy) throws RepositoryBackendException, RepositoryResourceException; | /**
* Uploads the resource to the repository using the supplied strategy
*
* @param strategy the upload strategy to use
* @throws RepositoryBackendException if there is a problem communicating with the remote repository
* @throws RepositoryResourceException if there is another problem uploading... | Uploads the resource to the repository using the supplied strategy | uploadToMassive | {
"repo_name": "Azquelt/tool.lars",
"path": "client-lib/src/main/java/com/ibm/ws/repository/resources/writeable/RepositoryResourceWritable.java",
"license": "apache-2.0",
"size": 14799
} | [
"com.ibm.ws.repository.exceptions.RepositoryBackendException",
"com.ibm.ws.repository.exceptions.RepositoryResourceException",
"com.ibm.ws.repository.strategies.writeable.UploadStrategy"
] | import com.ibm.ws.repository.exceptions.RepositoryBackendException; import com.ibm.ws.repository.exceptions.RepositoryResourceException; import com.ibm.ws.repository.strategies.writeable.UploadStrategy; | import com.ibm.ws.repository.exceptions.*; import com.ibm.ws.repository.strategies.writeable.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 514,592 |
public static Double add(Double value1, Double value2) {
BigDecimal b1 = new BigDecimal(Double.toString(value1));
BigDecimal b2 = new BigDecimal(Double.toString(value2));
return b1.add(b2).doubleValue();
} | static Double function(Double value1, Double value2) { BigDecimal b1 = new BigDecimal(Double.toString(value1)); BigDecimal b2 = new BigDecimal(Double.toString(value2)); return b1.add(b2).doubleValue(); } | /**
* Double add
* @param value1
* @param value2
* @return
*/ | Double add | add | {
"repo_name": "opensds/nbp",
"path": "vmware/ngc/NGC-Plugin/src/main/java/org/opensds/vmware/ngc/util/MathUtil.java",
"license": "apache-2.0",
"size": 8464
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 595,020 |
public static String getTransactionalTid(
final SapSystem sapSystem, final JCoDestination existingDestination, final boolean synchedLocalTransactionAllowed)
throws SapException, JCoException { | static String function( final SapSystem sapSystem, final JCoDestination existingDestination, final boolean synchedLocalTransactionAllowed) throws SapException, JCoException { | /**
* Obtain a TID String that is synchronized with the current transaction, if any.
* @param sapSystem the SapSystem to obtain a TID for
* @param existingDestination the existing JCoDestination to obtain a String for
* (may be <code>null</code>)
* @param synchedLocalTransactionAllowed whether to allow for a ... | Obtain a TID String that is synchronized with the current transaction, if any | getTransactionalTid | {
"repo_name": "ibissource/iaf",
"path": "sap/src/main/java/nl/nn/adapterframework/extensions/sap/jco3/tx/DestinationFactoryUtils.java",
"license": "apache-2.0",
"size": 11733
} | [
"com.sap.conn.jco.JCoDestination",
"com.sap.conn.jco.JCoException",
"nl.nn.adapterframework.extensions.sap.SapException",
"nl.nn.adapterframework.extensions.sap.jco3.SapSystem"
] | import com.sap.conn.jco.JCoDestination; import com.sap.conn.jco.JCoException; import nl.nn.adapterframework.extensions.sap.SapException; import nl.nn.adapterframework.extensions.sap.jco3.SapSystem; | import com.sap.conn.jco.*; import nl.nn.adapterframework.extensions.sap.*; import nl.nn.adapterframework.extensions.sap.jco3.*; | [
"com.sap.conn",
"nl.nn.adapterframework"
] | com.sap.conn; nl.nn.adapterframework; | 1,323,574 |
public boolean testSplitComponents(List<SplitComponent<V, E>> components, SplitPair<V,E> splitPair){
GraphOperations<V, E> operations = new GraphOperations<>();
for (int i = 0; i <components.size(); i++)
for (int j = i+1; j < components.size(); j++){
SplitComponent<V,E> com1 = components.get(i);
Split... | boolean function(List<SplitComponent<V, E>> components, SplitPair<V,E> splitPair){ GraphOperations<V, E> operations = new GraphOperations<>(); for (int i = 0; i <components.size(); i++) for (int j = i+1; j < components.size(); j++){ SplitComponent<V,E> com1 = components.get(i); SplitComponent<V, E> com2 = components.ge... | /**
* All components should have two vertices in common: split pair vertices
* and no edges
* @param components Split components
* @param splitPair Split pair
* @return {@code true} if the test shows that everything is in order, {@code false} otherwise
*/ | All components should have two vertices in common: split pair vertices and no edges | testSplitComponents | {
"repo_name": "renatav/GraphDrawing",
"path": "GraphDrawingTheory/src/graph/properties/splitting/Splitting.java",
"license": "mit",
"size": 7852
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,056,545 |
public static void createChange(String project, String branch,
String subject, String base, AsyncCallback<ChangeInfo> cb) {
CreateChangeInput input = CreateChangeInput.create();
input.project(emptyToNull(project));
input.branch(emptyToNull(branch));
input.subject(emptyToNull(subject));
input... | static void function(String project, String branch, String subject, String base, AsyncCallback<ChangeInfo> cb) { CreateChangeInput input = CreateChangeInput.create(); input.project(emptyToNull(project)); input.branch(emptyToNull(branch)); input.subject(emptyToNull(subject)); input.baseChange(emptyToNull(base)); if (Ger... | /** Create a new change.
*
* The new change is created as DRAFT unless the draft workflow is disabled
* by `change.allowDrafts = false` in the configuration, in which case the
* new change is created as NEW.
*
*/ | Create a new change. The new change is created as DRAFT unless the draft workflow is disabled by `change.allowDrafts = false` in the configuration, in which case the new change is created as NEW | createChange | {
"repo_name": "Distrotech/gerrit",
"path": "gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java",
"license": "apache-2.0",
"size": 10435
} | [
"com.google.gerrit.client.Gerrit",
"com.google.gerrit.client.rpc.RestApi",
"com.google.gerrit.reviewdb.client.Change",
"com.google.gwt.user.client.rpc.AsyncCallback"
] | import com.google.gerrit.client.Gerrit; import com.google.gerrit.client.rpc.RestApi; import com.google.gerrit.reviewdb.client.Change; import com.google.gwt.user.client.rpc.AsyncCallback; | import com.google.gerrit.client.*; import com.google.gerrit.client.rpc.*; import com.google.gerrit.reviewdb.client.*; import com.google.gwt.user.client.rpc.*; | [
"com.google.gerrit",
"com.google.gwt"
] | com.google.gerrit; com.google.gwt; | 280,167 |
public static ImmutableList<String> serializeResponse(RtspResponse response) {
checkArgument(response.headers.get(RtspHeaders.CSEQ) != null);
ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
// Request line.
builder.add(
Util.formatInvariant(
"%s %s %s", RTSP... | static ImmutableList<String> function(RtspResponse response) { checkArgument(response.headers.get(RtspHeaders.CSEQ) != null); ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); builder.add( Util.formatInvariant( STR, RTSP_VERSION, response.status, getRtspStatusReasonPhrase(response.status))); Immuta... | /**
* Serializes an {@link RtspResponse} to an {@link ImmutableList} of strings.
*
* <p>The {@link RtspResponse} must include the {@link RtspHeaders#CSEQ} header, or this method
* throws {@link IllegalArgumentException}.
*
* @param response The {@link RtspResponse}.
* @return A list of the lines of... | Serializes an <code>RtspResponse</code> to an <code>ImmutableList</code> of strings. The <code>RtspResponse</code> must include the <code>RtspHeaders#CSEQ</code> header, or this method throws <code>IllegalArgumentException</code> | serializeResponse | {
"repo_name": "ened/ExoPlayer",
"path": "library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java",
"license": "apache-2.0",
"size": 19488
} | [
"com.google.android.exoplayer2.util.Assertions",
"com.google.android.exoplayer2.util.Util",
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableListMultimap"
] | import com.google.android.exoplayer2.util.Assertions; import com.google.android.exoplayer2.util.Util; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableListMultimap; | import com.google.android.exoplayer2.util.*; import com.google.common.collect.*; | [
"com.google.android",
"com.google.common"
] | com.google.android; com.google.common; | 1,697,026 |
@Test
public void testNoSrcDirAandCFileSet() {
final Set<String> result = new HashSet<String>();
class Paranamer extends ParanamerTask {
public Paranamer() {
project = makeProject();
taskType = "paranamer";
taskName = "paranamer";
... | void function() { final Set<String> result = new HashSet<String>(); class Paranamer extends ParanamerTask { public Paranamer() { project = makeProject(); taskType = STR; taskName = STR; target = new Target(); } | /**
* Test that an included fileset does not engage the default srcdir
* and include directives. Ensure only the files required by the embedded
* fileset are to be processed.
*/ | Test that an included fileset does not engage the default srcdir and include directives. Ensure only the files required by the embedded fileset are to be processed | testNoSrcDirAandCFileSet | {
"repo_name": "codehaus/paranamer-git",
"path": "paranamer-ant/src/test/com/thoughtworks/paranamer/ant/ParanamerTaskTest.java",
"license": "bsd-3-clause",
"size": 20324
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.tools.ant.Target"
] | import java.util.HashSet; import java.util.Set; import org.apache.tools.ant.Target; | import java.util.*; import org.apache.tools.ant.*; | [
"java.util",
"org.apache.tools"
] | java.util; org.apache.tools; | 2,067,897 |
public static SegmentPart get(FileSplit split) throws IOException {
return get(split.getPath().toString());
} | static SegmentPart function(FileSplit split) throws IOException { return get(split.getPath().toString()); } | /**
* Create SegmentPart from a FileSplit.
*
* @param split
* @return A {@link SegmentPart} resultant from a {@link FileSplit}.
* @throws Exception
*/ | Create SegmentPart from a FileSplit | get | {
"repo_name": "code4wt/nutch-learning",
"path": "src/java/org/apache/nutch/segment/SegmentPart.java",
"license": "apache-2.0",
"size": 3556
} | [
"java.io.IOException",
"org.apache.hadoop.mapred.FileSplit"
] | import java.io.IOException; import org.apache.hadoop.mapred.FileSplit; | import java.io.*; import org.apache.hadoop.mapred.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,678,811 |
void setLoading(boolean loading);
}
@Inject
public AppLoaderPresenter(View view, Injector injector) {
super(view, injector);
}
/**
* {@inheritDoc} | void setLoading(boolean loading); } public AppLoaderPresenter(View view, Injector injector) { super(view, injector); } /** * {@inheritDoc} | /**
* Sets the application loader state.
*
* @param loading
* {@code true} to enable application loader.
*/ | Sets the application loader state | setLoading | {
"repo_name": "Raphcal/sigmah",
"path": "src/main/java/org/sigmah/client/ui/presenter/zone/AppLoaderPresenter.java",
"license": "gpl-3.0",
"size": 2498
} | [
"org.sigmah.client.inject.Injector"
] | import org.sigmah.client.inject.Injector; | import org.sigmah.client.inject.*; | [
"org.sigmah.client"
] | org.sigmah.client; | 2,046,574 |
public HTableDescriptor addCoprocessor(String className) throws IOException {
getDelegateeForModification().setCoprocessor(className);
return this;
} | HTableDescriptor function(String className) throws IOException { getDelegateeForModification().setCoprocessor(className); return this; } | /**
* Add a table coprocessor to this table. The coprocessor
* type must be org.apache.hadoop.hbase.coprocessor.RegionCoprocessor.
* It won't check if the class can be loaded or not.
* Whether a coprocessor is loadable or not will be determined when
* a region is opened.
* @param className Full class ... | Add a table coprocessor to this table. The coprocessor type must be org.apache.hadoop.hbase.coprocessor.RegionCoprocessor. It won't check if the class can be loaded or not. Whether a coprocessor is loadable or not will be determined when a region is opened | addCoprocessor | {
"repo_name": "Eshcar/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java",
"license": "apache-2.0",
"size": 32679
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,723,321 |
@Test
public void whenInputOddNumberThenReturnFalse() {
boolean result = false;
EvenNumber evenNumber = new EvenNumber();
try (InputStream inputStream = new ByteArrayInputStream("3".getBytes())) {
result = evenNumber.checkEvenNumber(inputStream);
}
catch (... | void function() { boolean result = false; EvenNumber evenNumber = new EvenNumber(); try (InputStream inputStream = new ByteArrayInputStream("3".getBytes())) { result = evenNumber.checkEvenNumber(inputStream); } catch (IOException error) { error.printStackTrace(); } assertThat(result, is(false)); } | /**
* Method check that entered even number.
* @throws IOException exception
*/ | Method check that entered even number | whenInputOddNumberThenReturnFalse | {
"repo_name": "bessovistnyj/jvm-byte-code",
"path": "Input_Output/src/test/java/ru/napadovskiu/EvenNumberTest.java",
"license": "apache-2.0",
"size": 1480
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import org.hamcrest.core.Is; import org.junit.Assert; | import java.io.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.io",
"org.hamcrest.core",
"org.junit"
] | java.io; org.hamcrest.core; org.junit; | 88,381 |
public boolean commitProcessReceived(Object key, DM dm) {
// Assume that after the member has departed that we have all its pending
// transaction messages
if (key instanceof TXLockId) {
TXLockId lk = (TXLockId) key;
waitForMemberToDepart(lk.getMemberId(), dm);
} else if (key instanceof TX... | boolean function(Object key, DM dm) { if (key instanceof TXLockId) { TXLockId lk = (TXLockId) key; waitForMemberToDepart(lk.getMemberId(), dm); } else if (key instanceof TXId) { TXId id = (TXId) key; waitForMemberToDepart(id.getMemberId(), dm); } else { Assert.assertTrue(false, STR + key.getClass()); } final TXCommitMe... | /**
* Answers fellow "Far Siders" question about an DACK transaction when the transaction originator
* died before it sent the CommitProcess message.
*/ | Answers fellow "Far Siders" question about an DACK transaction when the transaction originator died before it sent the CommitProcess message | commitProcessReceived | {
"repo_name": "prasi-in/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/TXFarSideCMTracker.java",
"license": "apache-2.0",
"size": 11780
} | [
"org.apache.geode.internal.Assert",
"org.apache.geode.internal.cache.locks.TXLockId"
] | import org.apache.geode.internal.Assert; import org.apache.geode.internal.cache.locks.TXLockId; | import org.apache.geode.internal.*; import org.apache.geode.internal.cache.locks.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,095,051 |
public static synchronized MarketplaceWebServiceProductsAsyncClient getAsyncClient() {
if (client==null) {
MarketplaceWebServiceProductsConfig config = new MarketplaceWebServiceProductsConfig();
config.setServiceURL(serviceURL);
// Set other client connection configuratio... | static synchronized MarketplaceWebServiceProductsAsyncClient function() { if (client==null) { MarketplaceWebServiceProductsConfig config = new MarketplaceWebServiceProductsConfig(); config.setServiceURL(serviceURL); client = new MarketplaceWebServiceProductsAsyncClient(accessKey, secretKey, appName, appVersion, config,... | /**
* Get an async client connection ready to use.
*
* @return A ready to use client connection.
*/ | Get an async client connection ready to use | getAsyncClient | {
"repo_name": "kenyonduan/amazon-mws",
"path": "src/main/java/com/amazonservices/mws/products/samples/MarketplaceWebServiceProductsSampleConfig.java",
"license": "mit",
"size": 2863
} | [
"com.amazonservices.mws.products.MarketplaceWebServiceProductsAsyncClient",
"com.amazonservices.mws.products.MarketplaceWebServiceProductsConfig"
] | import com.amazonservices.mws.products.MarketplaceWebServiceProductsAsyncClient; import com.amazonservices.mws.products.MarketplaceWebServiceProductsConfig; | import com.amazonservices.mws.products.*; | [
"com.amazonservices.mws"
] | com.amazonservices.mws; | 890,416 |
public FieldType getLastRealField() {
return lastRealField;
} | FieldType function() { return lastRealField; } | /**
* Returns the last field in the dereference chain which is not a field from an embedded record.
* This can be null, when the dereferencing only goes through RECORD fields.
*/ | Returns the last field in the dereference chain which is not a field from an embedded record. This can be null, when the dereferencing only goes through RECORD fields | getLastRealField | {
"repo_name": "NGDATA/lilyproject",
"path": "cr/indexer/model/src/main/java/org/lilyproject/indexer/model/indexerconf/DerefValue.java",
"license": "apache-2.0",
"size": 6842
} | [
"org.lilyproject.repository.api.FieldType"
] | import org.lilyproject.repository.api.FieldType; | import org.lilyproject.repository.api.*; | [
"org.lilyproject.repository"
] | org.lilyproject.repository; | 493,132 |
// XXX LISTENERS -------------------------------------------------------------------------------------
public void listenerOnLogout(OnLogOutEvent event)
{
if (_currentEvent == null)
{
if ((_state == EventEngineState.REGISTER) || (_state == EventEngineState.VOTING))
{
Player player = event.getPlayer()... | void function(OnLogOutEvent event) { if (_currentEvent == null) { if ((_state == EventEngineState.REGISTER) (_state == EventEngineState.VOTING)) { Player player = event.getPlayer(); DualBoxProtection.getInstance().removeConnection(player); removeVote(player); unRegisterPlayer(player); } } } | /**
* Listener when the player logout.
* @param event
*/ | Listener when the player logout | listenerOnLogout | {
"repo_name": "AthenaEventEngine/AthenaCore",
"path": "src/main/java/com/github/athenaengine/core/EventEngineManager.java",
"license": "gpl-3.0",
"size": 13420
} | [
"com.github.athenaengine.core.dispatcher.events.OnLogOutEvent",
"com.github.athenaengine.core.enums.EventEngineState",
"com.github.athenaengine.core.model.entity.Player",
"com.github.athenaengine.core.security.DualBoxProtection"
] | import com.github.athenaengine.core.dispatcher.events.OnLogOutEvent; import com.github.athenaengine.core.enums.EventEngineState; import com.github.athenaengine.core.model.entity.Player; import com.github.athenaengine.core.security.DualBoxProtection; | import com.github.athenaengine.core.dispatcher.events.*; import com.github.athenaengine.core.enums.*; import com.github.athenaengine.core.model.entity.*; import com.github.athenaengine.core.security.*; | [
"com.github.athenaengine"
] | com.github.athenaengine; | 2,915,242 |
public HLMarking getContainerHLMarking(){
return item.getContainerHLMarking();
}
| HLMarking function(){ return item.getContainerHLMarking(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getContainerHLMarking | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/integers/hlapi/AdditionHLAPI.java",
"license": "epl-1.0",
"size": 89787
} | [
"fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLMarking"
] | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.HLMarking; | import fr.lip6.move.pnml.symmetricnet.hlcorestructure.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,691,064 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.