method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static int FMUSIC_GetPattern(FMUSIC_MODULE mod)
{
return FmodJNI.FMUSIC_GetPattern(Pointer.getPointer(mod));
} | static int function(FMUSIC_MODULE mod) { return FmodJNI.FMUSIC_GetPattern(Pointer.getPointer(mod)); } | /**
* Returns the song's current pattern number<br>
* <br><b>Remarks :</b><br>
* ___________________<br>
* Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube
* @param mod Pointer to the song to retrieve current pattern number from.
* @return On success, The ... | Returns the song's current pattern number Remarks : ___________________ Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube | FMUSIC_GetPattern | {
"repo_name": "jerome-jouvie/NativeFmod",
"path": "src-java/org/jouvieje/Fmod/Fmod.java",
"license": "lgpl-2.1",
"size": 364285
} | [
"org.jouvieje.Fmod"
] | import org.jouvieje.Fmod; | import org.jouvieje.*; | [
"org.jouvieje"
] | org.jouvieje; | 606,264 |
private static String majorMinor(String version) {
String[] parts = version.split("\\.");
Assertions.assertThat(parts.length).isGreaterThanOrEqualTo(2);
return parts[0] + "." + parts[1];
} | static String function(String version) { String[] parts = version.split("\\."); Assertions.assertThat(parts.length).isGreaterThanOrEqualTo(2); return parts[0] + "." + parts[1]; } | /**
* returns the major.minor prefix of a semver
*/ | returns the major.minor prefix of a semver | majorMinor | {
"repo_name": "davinash/geode",
"path": "geode-wan/src/upgradeTest/java/org/apache/geode/cache/wan/WANRollingUpgradeCreateGatewaySenderMixedSiteOneCurrentSiteTwo.java",
"license": "apache-2.0",
"size": 5805
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 581,397 |
public X509CRL generate(
PrivateKey key,
String provider,
SecureRandom random)
throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException
{
TBSCertList tbsCrl = generateCertList()... | X509CRL function( PrivateKey key, String provider, SecureRandom random) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException { TBSCertList tbsCrl = generateCertList(); byte[] signature; try { signature = X509Util.calculateSignature(sigOID... | /**
* generate an X509 CRL, based on the current issuer and subject,
* using the passed in provider for the signing.
*/ | generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing | generate | {
"repo_name": "thedrummeraki/Aki-SSL",
"path": "src/org/bouncycastle/x509/X509V2CRLGenerator.java",
"license": "apache-2.0",
"size": 13553
} | [
"java.io.IOException",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.PrivateKey",
"java.security.SecureRandom",
"java.security.SignatureException",
"java.security.cert.CRLException",
"org.bouncycastle.asn1.x509.... | import java.io.IOException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.SecureRandom; import java.security.SignatureException; import java.security.cert.CRLException; import o... | import java.io.*; import java.security.*; import java.security.cert.*; import org.bouncycastle.asn1.x509.*; | [
"java.io",
"java.security",
"org.bouncycastle.asn1"
] | java.io; java.security; org.bouncycastle.asn1; | 425,412 |
@Override
public void mouseClicked(MouseEvent me) {
if ((me.getModifiers() & InputEvent.SHIFT_MASK) != 0) {
zoomOut(me);
} else {
zoomIn(me);
}
} | void function(MouseEvent me) { if ((me.getModifiers() & InputEvent.SHIFT_MASK) != 0) { zoomOut(me); } else { zoomIn(me); } } | /**
* Click to zoom in; Shift-click to zoom out
* @param me
*/ | Click to zoom in; Shift-click to zoom out | mouseClicked | {
"repo_name": "camilstaps/OO1415",
"path": "Week15 Mandelbrot/src/com/camilstaps/mandelbrot/Grid.java",
"license": "mit",
"size": 15882
} | [
"java.awt.event.InputEvent",
"java.awt.event.MouseEvent"
] | import java.awt.event.InputEvent; import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 813,864 |
void dragStarted(Point startLocation);
| void dragStarted(Point startLocation); | /**
* Start a drag operation.
* @param startLocation the initial location of this drag.
*/ | Start a drag operation | dragStarted | {
"repo_name": "stumoodie/PathwayEditor",
"path": "src/org/pathwayeditor/visualeditor/behaviour/IDragResponse.java",
"license": "apache-2.0",
"size": 2816
} | [
"org.pathwayeditor.figure.geometry.Point"
] | import org.pathwayeditor.figure.geometry.Point; | import org.pathwayeditor.figure.geometry.*; | [
"org.pathwayeditor.figure"
] | org.pathwayeditor.figure; | 595,077 |
void delete(
String resourceGroupName,
ExtensionsClusterRp clusterRp,
ExtensionsClusterResourceName clusterResourceName,
String clusterName,
String extensionName,
Boolean forceDelete,
Context context); | void delete( String resourceGroupName, ExtensionsClusterRp clusterRp, ExtensionsClusterResourceName clusterResourceName, String clusterName, String extensionName, Boolean forceDelete, Context context); | /**
* Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clu... | Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster | delete | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java",
"license": "mit",
"size": 14560
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 600,892 |
@Override
protected BeanGenerator<X> createBeanGenerator()
{
EjbLazyGenerator<X> lazyGen = getLazyGenerator();
return new StatelessGenerator<X>(getEJBName(), getAnnotatedType(),
lazyGen.getLocalApi(),
lazyGen.getLocalBean(),
... | BeanGenerator<X> function() { EjbLazyGenerator<X> lazyGen = getLazyGenerator(); return new StatelessGenerator<X>(getEJBName(), getAnnotatedType(), lazyGen.getLocalApi(), lazyGen.getLocalBean(), lazyGen.getRemoteApi()); } | /**
* Creates the bean generator for the session bean.
*/ | Creates the bean generator for the session bean | createBeanGenerator | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/ejb/session/StatelessManager.java",
"license": "gpl-2.0",
"size": 10344
} | [
"com.caucho.config.gen.BeanGenerator",
"com.caucho.ejb.cfg.EjbLazyGenerator",
"com.caucho.ejb.gen.StatelessGenerator"
] | import com.caucho.config.gen.BeanGenerator; import com.caucho.ejb.cfg.EjbLazyGenerator; import com.caucho.ejb.gen.StatelessGenerator; | import com.caucho.config.gen.*; import com.caucho.ejb.cfg.*; import com.caucho.ejb.gen.*; | [
"com.caucho.config",
"com.caucho.ejb"
] | com.caucho.config; com.caucho.ejb; | 1,571,271 |
@Test
public void testMountPointChildren() throws IOException {
try {
MountTable addEntry = MountTable.newInstance("/testdir",
Collections.singletonMap("ns0", "/tmp/testdir"));
assertTrue(addMountTable(addEntry));
nnFs0.mkdirs(new Path("/tmp/testdir"));
nnFs0.mkdirs(new Path("/... | void function() throws IOException { try { MountTable addEntry = MountTable.newInstance(STR, Collections.singletonMap("ns0", STR)); assertTrue(addMountTable(addEntry)); nnFs0.mkdirs(new Path(STR)); nnFs0.mkdirs(new Path(STR)); nnFs0.mkdirs(new Path(STR)); FileStatus[] finfo1 = routerFs.listStatus(new Path("/")); assert... | /**
* Validate the number of children for the mount point.It must be equal to the
* number of children of the destination pointed by the mount point.
*/ | Validate the number of children for the mount point.It must be equal to the number of children of the destination pointed by the mount point | testMountPointChildren | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterMountTable.java",
"license": "apache-2.0",
"size": 27722
} | [
"java.io.IOException",
"java.util.Collections",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.protocol.HdfsFileStatus",
"org.apache.hadoop.hdfs.server.federation.store.records.MountTable",
"org.junit.Assert"
] | import java.io.IOException; import java.util.Collections; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus; import org.apache.hadoop.hdfs.server.federation.store.records.MountTable; import org.junit.Assert; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.federation.store.records.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 2,474,352 |
Set<String> getNonDBTags(){
return this.hsNonDBTags;
}
| Set<String> getNonDBTags(){ return this.hsNonDBTags; } | /**
* Get the set of tag names that don't have "db" option attached to them.
*
* @return set of non-"db" tags
*/ | Get the set of tag names that don't have "db" option attached to them | getNonDBTags | {
"repo_name": "costing/lazyj",
"path": "src/main/java/lazyj/page/TemplateParser.java",
"license": "lgpl-3.0",
"size": 11664
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,563,836 |
public MarkupTagInfoProvider getInfoProvider() {
if (fInfoProvider == null) {
fInfoProvider = new MarkupTagInfoProvider();
}
return fInfoProvider;
} | MarkupTagInfoProvider function() { if (fInfoProvider == null) { fInfoProvider = new MarkupTagInfoProvider(); } return fInfoProvider; } | /**
* Gets the infoProvider.
*
* fInfoProvider and if fInfoProvider was <code>null</code> create a new
* instance
*/ | Gets the infoProvider. fInfoProvider and if fInfoProvider was <code>null</code> create a new instance | getInfoProvider | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java",
"license": "epl-1.0",
"size": 116092
} | [
"org.eclipse.wst.xml.ui.internal.taginfo.MarkupTagInfoProvider"
] | import org.eclipse.wst.xml.ui.internal.taginfo.MarkupTagInfoProvider; | import org.eclipse.wst.xml.ui.internal.taginfo.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 1,334,435 |
public void register(Parameter object) throws Exception {
log.info("Register : {}", object.toString());
Transaction tx = null;
try {
HibernateUtil.openSessionAndBindToThread();
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
tx = session.beginTransaction();
session.save(... | void function(Parameter object) throws Exception { log.info(STR, object.toString()); Transaction tx = null; try { HibernateUtil.openSessionAndBindToThread(); Session session = HibernateUtil.getSessionFactory().getCurrentSession(); tx = session.beginTransaction(); session.save(object); tx.commit(); } catch (Exception e)... | /**
* Register record in DB
* @param object
* @throws Exception
*/ | Register record in DB | register | {
"repo_name": "codar4j/javsterisk",
"path": "src/com/web/javsterisk/dao/ParameterDAO.java",
"license": "apache-2.0",
"size": 3884
} | [
"com.web.javsterisk.entity.Parameter",
"com.web.javsterisk.util.HibernateUtil",
"org.hibernate.Session",
"org.hibernate.Transaction"
] | import com.web.javsterisk.entity.Parameter; import com.web.javsterisk.util.HibernateUtil; import org.hibernate.Session; import org.hibernate.Transaction; | import com.web.javsterisk.entity.*; import com.web.javsterisk.util.*; import org.hibernate.*; | [
"com.web.javsterisk",
"org.hibernate"
] | com.web.javsterisk; org.hibernate; | 1,668,873 |
public static long getLong(ItemStack itemStack, String tagName){
initNBTTagCompound(itemStack);
if(!itemStack.stackTagCompound.hasKey(tagName)) {
setLong(itemStack, tagName, 0);
}
return itemStack.stackTagCompound.getLong(tagName);
}
/**
* Sets the given l... | static long function(ItemStack itemStack, String tagName){ initNBTTagCompound(itemStack); if(!itemStack.stackTagCompound.hasKey(tagName)) { setLong(itemStack, tagName, 0); } return itemStack.stackTagCompound.getLong(tagName); } /** * Sets the given long value for the given tag on the {@link NBTTagCompound} | /**
* Gets a Long value of the given tag from the {@link NBTTagCompound} of the
* given {@link ItemStack}. If the {@link NBTTagCompound} is null it will be
* initialized.
*
* @param itemStack
* The {@link ItemStack} which holds the {@link NBTTagCompound}.
* @param tagName
... | Gets a Long value of the given tag from the <code>NBTTagCompound</code> of the given <code>ItemStack</code>. If the <code>NBTTagCompound</code> is null it will be initialized | getLong | {
"repo_name": "Mazdallier/PneumaticCraft",
"path": "src/pneumaticCraft/common/NBTUtil.java",
"license": "gpl-3.0",
"size": 15477
} | [
"net.minecraft.item.ItemStack",
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.item.*; import net.minecraft.nbt.*; | [
"net.minecraft.item",
"net.minecraft.nbt"
] | net.minecraft.item; net.minecraft.nbt; | 833,417 |
public void setPrefix(String prefix) throws DOMException {
if (isReadonly()) {
throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
"readonly.node",
new Object[] {(int) getNodeType(),
... | void function(String prefix) throws DOMException { if (isReadonly()) { throw createDOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, STR, new Object[] {(int) getNodeType(), getNodeName() }); } if (prefix != null && !prefix.equals(STRprefix", new Object[] {(int) getNodeType(), getNodeName(), prefix }); } this.prefi... | /**
* <b>DOM</b>: Implements {@link Node#setPrefix(String)}.
*/ | DOM: Implements <code>Node#setPrefix(String)</code> | setPrefix | {
"repo_name": "apache/batik",
"path": "batik-anim/src/main/java/org/apache/batik/anim/dom/XBLOMElement.java",
"license": "apache-2.0",
"size": 4162
} | [
"org.w3c.dom.DOMException"
] | import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,410,744 |
public static Pair<Integer, Integer> parseSpsNalUnit(byte[] spsNalUnit)
{
// SPS NAL unit:
// - Start prefix (4 bytes)
// - Forbidden zero bit (1 bit)
// - NAL ref idx (2 bits)
// - NAL unit type (5 bits)
// - Profile idc (8 bits)
// - Constraint bits (3 b... | static Pair<Integer, Integer> function(byte[] spsNalUnit) { if (isNalStartCode(spsNalUnit, 0) && spsNalUnit.length == 8 && (spsNalUnit[5] & 0x1F) == SPS_NAL_UNIT_TYPE) { return Pair.create(parseAvcProfile(spsNalUnit), parseAvcLevel(spsNalUnit)); } return null; } | /**
* Parses an SPS NAL unit.
*
* @param spsNalUnit
* The NAL unit.
* @return A pair consisting of AVC profile and level constants, as defined
* in {@link CodecProfileLevel}. Null if the input data was not an
* SPS NAL unit.
*/ | Parses an SPS NAL unit | parseSpsNalUnit | {
"repo_name": "summerpulse/amlexo",
"path": "src/com/google/android/exoplayer/parser/mp4/CodecSpecificDataUtil.java",
"license": "apache-2.0",
"size": 9697
} | [
"android.util.Pair"
] | import android.util.Pair; | import android.util.*; | [
"android.util"
] | android.util; | 2,074,386 |
// JOB_STATUS
public JobStatus createJobStatus(long jobInstanceId);
| JobStatus function(long jobInstanceId); | /**
* Create a JobStatus
*
* @param jobInstanceId the parent job instance id
* @return the JobStatus
*/ | Create a JobStatus | createJobStatus | {
"repo_name": "sidgoyal/standards.jsr352.jbatch",
"path": "com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/services/IPersistenceManagerService.java",
"license": "apache-2.0",
"size": 7529
} | [
"com.ibm.jbatch.container.status.JobStatus"
] | import com.ibm.jbatch.container.status.JobStatus; | import com.ibm.jbatch.container.status.*; | [
"com.ibm.jbatch"
] | com.ibm.jbatch; | 581,806 |
@Override
public Event preSetupFlowDirector(RequestContext context) throws Exception {
String id = context.getFlowScope().getString("id");
String flowMode = ActionUtils.getFlowMode(context.getActiveFlow().getId());
HttpServletRequest request = ((ServletExternalContext)context.getExternalContext()).get... | Event function(RequestContext context) throws Exception { String id = context.getFlowScope().getString("id"); String flowMode = ActionUtils.getFlowMode(context.getActiveFlow().getId()); HttpServletRequest request = ((ServletExternalContext)context.getExternalContext()).getRequest(); if (flowMode.equals("add")) { return... | /**
* This checks to see if the visit id matches a "UDS" visit. If so the UdsVisit handler handles the
* event (unless it is an add event).
*/ | This checks to see if the visit id matches a "UDS" visit. If so the UdsVisit handler handles the event (unless it is an add event) | preSetupFlowDirector | {
"repo_name": "UCSFMemoryAndAging/lava-uds",
"path": "lava-crms-nacc/src/edu/ucsf/lava/crms/scheduling/controller/UdsVisitHandler.java",
"license": "bsd-2-clause",
"size": 2060
} | [
"edu.ucsf.lava.core.action.ActionUtils",
"edu.ucsf.lava.crms.scheduling.model.UdsVisit",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.lang.StringUtils",
"org.springframework.webflow.context.servlet.ServletExternalContext",
"org.springframework.webflow.execution.Event",
"org.springframewo... | import edu.ucsf.lava.core.action.ActionUtils; import edu.ucsf.lava.crms.scheduling.model.UdsVisit; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.springframework.webflow.context.servlet.ServletExternalContext; import org.springframework.webflow.execution.Event; impo... | import edu.ucsf.lava.core.action.*; import edu.ucsf.lava.crms.scheduling.model.*; import javax.servlet.http.*; import org.apache.commons.lang.*; import org.springframework.webflow.context.servlet.*; import org.springframework.webflow.execution.*; | [
"edu.ucsf.lava",
"javax.servlet",
"org.apache.commons",
"org.springframework.webflow"
] | edu.ucsf.lava; javax.servlet; org.apache.commons; org.springframework.webflow; | 1,131,066 |
public static final int binarySearch(Object[] a, Object key, Comparator cp, int length) {
int x1 = 0;
int x2 = length;
int i = x2 / 2, c;
while (x1 < x2) {
c = cp.compare(a[i], key);
if (c == 0) {
return i;
} else if (c < ... | static final int function(Object[] a, Object key, Comparator cp, int length) { int x1 = 0; int x2 = length; int i = x2 / 2, c; while (x1 < x2) { c = cp.compare(a[i], key); if (c == 0) { return i; } else if (c < 0) { x1 = i + 1; } else { x2 = i; } i = x1 + (x2 - x1) / 2; } return -1*(i+1); } | /**
* Perform a binary search over a sorted range of an array for the given
* key. The range is assumed to start at index 0.
* @param a the array to search
* @param key the key to search for
* @param cp the comparator to use to compare key values
* @param length the the length of the... | Perform a binary search over a sorted range of an array for the given key. The range is assumed to start at index 0 | binarySearch | {
"repo_name": "giacomovagni/Prefuse",
"path": "src/prefuse/util/ArrayLib.java",
"license": "bsd-3-clause",
"size": 44177
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,972,818 |
public static DocBrowserPanel initDocBrowserPanel(AnnisUI ui, String corpus) {
return new DocBrowserPanel(ui, corpus);
}
private final AnnisUI ui;
private VerticalLayout layout;
// the name of the corpus from which the documents are fetched
private String corpus;
private DocBrowserTable table;
... | static DocBrowserPanel function(AnnisUI ui, String corpus) { return new DocBrowserPanel(ui, corpus); } private final AnnisUI ui; private VerticalLayout layout; private String corpus; private DocBrowserTable table; final ProgressBar progress; private DocBrowserPanel(AnnisUI ui, String corpus) { this.ui = ui; this.corpus... | /**
* Initiated the {@link DocBrowserPanel} and put the main tab navigation.
*
* @param ui The main application class of the gui.
* @param corpus The corpus, for which the doc browser is initiated.
* @return A new wrapper panel for a doc browser. Make sure, that this is not done several times.
*/ | Initiated the <code>DocBrowserPanel</code> and put the main tab navigation | initDocBrowserPanel | {
"repo_name": "korpling/ANNIS",
"path": "src/main/java/org/corpus_tools/annis/gui/docbrowser/DocBrowserPanel.java",
"license": "apache-2.0",
"size": 6514
} | [
"com.vaadin.ui.ProgressBar",
"com.vaadin.ui.VerticalLayout",
"com.vaadin.v7.ui.themes.ChameleonTheme",
"org.corpus_tools.annis.gui.AnnisUI"
] | import com.vaadin.ui.ProgressBar; import com.vaadin.ui.VerticalLayout; import com.vaadin.v7.ui.themes.ChameleonTheme; import org.corpus_tools.annis.gui.AnnisUI; | import com.vaadin.ui.*; import com.vaadin.v7.ui.themes.*; import org.corpus_tools.annis.gui.*; | [
"com.vaadin.ui",
"com.vaadin.v7",
"org.corpus_tools.annis"
] | com.vaadin.ui; com.vaadin.v7; org.corpus_tools.annis; | 696,561 |
public void paintLabelBorder(SynthContext context, Graphics g, int x, int y, int w, int h) {
paintBorder(context, g, x, y, w, h, null);
} | void function(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBorder(context, g, x, y, w, h, null); } | /**
* Paints the border of a label.
*
* @param context SynthContext identifying the <code>JComponent</code> and
* <code>Region</code> to paint to
* @param g <code>Graphics</code> to paint to
* @param x X coordinate of the area to paint to
* @param y Y ... | Paints the border of a label | paintLabelBorder | {
"repo_name": "anhtu1995ok/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java",
"license": "apache-2.0",
"size": 119406
} | [
"java.awt.Graphics",
"javax.swing.plaf.synth.SynthContext"
] | import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext; | import java.awt.*; import javax.swing.plaf.synth.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,401,362 |
Collection<Capability> getProviderCapabilities(String scheme) throws FileSystemException; | Collection<Capability> getProviderCapabilities(String scheme) throws FileSystemException; | /**
* Get the capabilities for a given scheme.
*
* @param scheme The scheme to use to locate the provider's capabilities.
* @return A Collection of the various capabilities.
* @throws FileSystemException if the given scheme is not konwn.
*/ | Get the capabilities for a given scheme | getProviderCapabilities | {
"repo_name": "distribuitech/datos",
"path": "datos-vfs/src/main/java/com/datos/vfs/FileSystemManager.java",
"license": "apache-2.0",
"size": 13932
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 702,448 |
private static <T> T createCustomComponent(Class<T> componentType, String componentSpec,
Map<String, String> configProperties, IPluginRegistry pluginRegistry) throws Exception {
return createCustomComponent(componentType, componentSpec, configProperties, pluginRegistry, null);
} | static <T> T function(Class<T> componentType, String componentSpec, Map<String, String> configProperties, IPluginRegistry pluginRegistry) throws Exception { return createCustomComponent(componentType, componentSpec, configProperties, pluginRegistry, null); } | /**
* Creates a custom component from information found in the properties file.
* @param componentType
* @param componentSpec
* @param configProperties
* @param pluginRegistry
* @throws Exception
*/ | Creates a custom component from information found in the properties file | createCustomComponent | {
"repo_name": "EricWittmann/apiman",
"path": "manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroServiceCdiFactory.java",
"license": "apache-2.0",
"size": 16323
} | [
"io.apiman.manager.api.core.IPluginRegistry",
"java.util.Map"
] | import io.apiman.manager.api.core.IPluginRegistry; import java.util.Map; | import io.apiman.manager.api.core.*; import java.util.*; | [
"io.apiman.manager",
"java.util"
] | io.apiman.manager; java.util; | 2,727,241 |
public DataSet<? extends Entry> getDataSetByLabel(String dataSetLabel) {
return mCurrentData.getDataSetByLabel(dataSetLabel, true);
} | DataSet<? extends Entry> function(String dataSetLabel) { return mCurrentData.getDataSetByLabel(dataSetLabel, true); } | /**
* returns the DataSet with the given label that is stored in the ChartData
* object.
*
* @param type
* @return
*/ | returns the DataSet with the given label that is stored in the ChartData object | getDataSetByLabel | {
"repo_name": "MPieter/Notification-Analyser",
"path": "NotificationAnalyser/MPChartLib/src/com/github/mikephil/charting/charts/Chart.java",
"license": "mit",
"size": 71102
} | [
"com.github.mikephil.charting.data.DataSet",
"com.github.mikephil.charting.data.Entry"
] | import com.github.mikephil.charting.data.DataSet; import com.github.mikephil.charting.data.Entry; | import com.github.mikephil.charting.data.*; | [
"com.github.mikephil"
] | com.github.mikephil; | 1,274,564 |
final Base base = new MkBase();
final Doc doc = base.user("urn:test:1").docs().doc("hey");
final String input = "hello, world!";
doc.write(IOUtils.toInputStream(input), input.getBytes().length);
final Response resp = new TkRead(base).act(
new RqWithTester(
new... | final Base base = new MkBase(); final Doc doc = base.user(STR).docs().doc("hey"); final String input = STR; doc.write(IOUtils.toInputStream(input), input.getBytes().length); final Response resp = new TkRead(base).act( new RqWithTester( new RqFake("GET", STR) ) ); MatcherAssert.assertThat( new RsPrint(resp).printBody(),... | /**
* TkRead can read file content.
* @throws Exception If fails.
*/ | TkRead can read file content | readsFileContent | {
"repo_name": "antonini/nerodesk",
"path": "src/test/java/com/nerodesk/takes/doc/TkReadTest.java",
"license": "bsd-3-clause",
"size": 2967
} | [
"com.nerodesk.om.Base",
"com.nerodesk.om.Doc",
"com.nerodesk.om.mock.MkBase",
"com.nerodesk.takes.RqWithTester",
"org.apache.commons.io.IOUtils",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.takes.Response",
"org.takes.rq.RqFake",
"org.takes.rs.RsPrint"
] | import com.nerodesk.om.Base; import com.nerodesk.om.Doc; import com.nerodesk.om.mock.MkBase; import com.nerodesk.takes.RqWithTester; import org.apache.commons.io.IOUtils; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.Response; import org.takes.rq.RqFake; import org.takes.rs.RsPrint; | import com.nerodesk.om.*; import com.nerodesk.om.mock.*; import com.nerodesk.takes.*; import org.apache.commons.io.*; import org.hamcrest.*; import org.takes.*; import org.takes.rq.*; import org.takes.rs.*; | [
"com.nerodesk.om",
"com.nerodesk.takes",
"org.apache.commons",
"org.hamcrest",
"org.takes",
"org.takes.rq",
"org.takes.rs"
] | com.nerodesk.om; com.nerodesk.takes; org.apache.commons; org.hamcrest; org.takes; org.takes.rq; org.takes.rs; | 1,059,412 |
public void unbind(Name name) throws NamingException {
checkIsDestroyed();
Name parsedName = getParsedName(name);
if (parsedName.size() == 0 || parsedName.get(0).length() == 0) {
throw new InvalidNameException(
LocalizedStrings.ContextImpl_NAME_CAN_NOT_BE_EMPTY.toLocalizedString());
}
... | void function(Name name) throws NamingException { checkIsDestroyed(); Name parsedName = getParsedName(name); if (parsedName.size() == 0 parsedName.get(0).length() == 0) { throw new InvalidNameException( LocalizedStrings.ContextImpl_NAME_CAN_NOT_BE_EMPTY.toLocalizedString()); } String nameToRemove = parsedName.get(0); i... | /**
* Removes name and its associated object from the context.
*
* @param name name to remove
* @throws NoPermissionException if this context has been destroyed.
* @throws InvalidNameException if name is empty or is CompositeName that spans more than one
* naming system
* @throws NameNotFo... | Removes name and its associated object from the context | unbind | {
"repo_name": "pivotal-amurmann/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/jndi/ContextImpl.java",
"license": "apache-2.0",
"size": 29126
} | [
"javax.naming.Context",
"javax.naming.InvalidNameException",
"javax.naming.Name",
"javax.naming.NameNotFoundException",
"javax.naming.NamingException",
"javax.naming.NotContextException",
"org.apache.geode.internal.i18n.LocalizedStrings"
] | import javax.naming.Context; import javax.naming.InvalidNameException; import javax.naming.Name; import javax.naming.NameNotFoundException; import javax.naming.NamingException; import javax.naming.NotContextException; import org.apache.geode.internal.i18n.LocalizedStrings; | import javax.naming.*; import org.apache.geode.internal.i18n.*; | [
"javax.naming",
"org.apache.geode"
] | javax.naming; org.apache.geode; | 2,422,645 |
protected void findResources(final List<URL> result, final String name, final ModuleClassLoader requestor,
Set<String> seenModules) throws IOException {
if ((seenModules != null) && seenModules.contains(getModule().getModuleId())) {
return;
}
for (Enumeration<URL> enm = super.findResources(name); e... | void function(final List<URL> result, final String name, final ModuleClassLoader requestor, Set<String> seenModules) throws IOException { if ((seenModules != null) && seenModules.contains(getModule().getModuleId())) { return; } for (Enumeration<URL> enm = super.findResources(name); enm.hasMoreElements();) { URL url = e... | /**
* Find all occurrences of a resource (image, file, etc) in the module structure
*
* @param result URL of the file found
* @param name String path and name of the file to find
* @param requestor ModuleClassLoader in which to start
* @param seenModules Set<String> moduleIds that have been checked already
... | Find all occurrences of a resource (image, file, etc) in the module structure | findResources | {
"repo_name": "naraink/openmrs-core",
"path": "api/src/main/java/org/openmrs/module/ModuleClassLoader.java",
"license": "mpl-2.0",
"size": 31814
} | [
"java.io.IOException",
"java.util.Enumeration",
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.io.IOException; import java.util.Enumeration; import java.util.HashSet; import java.util.List; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 952,272 |
// don't expose the EntityTrackerEntry directly so mods can't mess with the data in there as easily
public Set<? extends net.minecraft.entity.player.EntityPlayer> getTrackingPlayers(Entity entity)
{
EntityTrackerEntry entry = (EntityTrackerEntry) trackedEntityHashTable.lookup(entity.getEntityId... | Set<? extends net.minecraft.entity.player.EntityPlayer> function(Entity entity) { EntityTrackerEntry entry = (EntityTrackerEntry) trackedEntityHashTable.lookup(entity.getEntityId()); if (entry == null) return java.util.Collections.emptySet(); else return java.util.Collections.unmodifiableSet(entry.trackingPlayers); } | /**
* Get all players tracking the given Entity. The Entity must be part of the World that this Tracker belongs to.
* @param entity the Entity
* @return all players tracking the Entity
*/ | Get all players tracking the given Entity. The Entity must be part of the World that this Tracker belongs to | getTrackingPlayers | {
"repo_name": "boredherobrine13/morefuelsmod-1.10",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityTracker.java",
"license": "lgpl-2.1",
"size": 15930
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 284,914 |
private void postActivity(FileInfo fileInfo) throws WebDAVServerException
{
WebDavService davService = getDAVHelper().getServiceRegistry().getWebDavService();
if (!davService.activitiesEnabled())
{
// Don't post activities if this behaviour is disabled.
retu... | void function(FileInfo fileInfo) throws WebDAVServerException { WebDavService davService = getDAVHelper().getServiceRegistry().getWebDavService(); if (!davService.activitiesEnabled()) { return; } String siteId = getSiteId(); String tenantDomain = getTenantDomain(); if (!siteId.equals(WebDAVHelper.EMPTY_SITE_ID)) { Site... | /**
* Create a folder added activity post.
*
* @throws WebDAVServerException
*/ | Create a folder added activity post | postActivity | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/remote-api/source/java/org/alfresco/repo/webdav/MkcolMethod.java",
"license": "lgpl-3.0",
"size": 6065
} | [
"org.alfresco.service.cmr.model.FileInfo",
"org.alfresco.service.cmr.model.FileNotFoundException",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.cmr.site.SiteService",
"org.alfresco.service.cmr.webdav.WebDavService"
] | import org.alfresco.service.cmr.model.FileInfo; import org.alfresco.service.cmr.model.FileNotFoundException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.site.SiteService; import org.alfresco.service.cmr.webdav.WebDavService; | import org.alfresco.service.cmr.model.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.cmr.site.*; import org.alfresco.service.cmr.webdav.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 454,411 |
public RequestedReferenceType getUnattachedReference()
{
return this.unattachedReference;
} | RequestedReferenceType function() { return this.unattachedReference; } | /**
* <p>
* Obtains the security token unattached reference. This reference is used to locate the token when it is not placed
* inside the WS-Trust response message.
* </p>
*
* @return a {@code RequestedReferenceType} representing the unattached reference.
*/ | Obtains the security token unattached reference. This reference is used to locate the token when it is not placed inside the WS-Trust response message. | getUnattachedReference | {
"repo_name": "taylor-project/taylor-picketlink-2.0.3",
"path": "federation/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/WSTrustRequestContext.java",
"license": "gpl-2.0",
"size": 11789
} | [
"org.picketlink.identity.federation.ws.trust.RequestedReferenceType"
] | import org.picketlink.identity.federation.ws.trust.RequestedReferenceType; | import org.picketlink.identity.federation.ws.trust.*; | [
"org.picketlink.identity"
] | org.picketlink.identity; | 1,371,927 |
private void handleHandledNodesSet(CCFGNode node, Set<CCFGNode> handled) {
if (handled.contains(node)){
//TODO recursion is probably not handled correctly. Fix it properly
// https://caloriecount.svn.sourceforge.net/svnroot/caloriecount/trunk/src/com/lts/xml/simple/SimpleElementConverter.java
// project 7... | void function(CCFGNode node, Set<CCFGNode> handled) { if (handled.contains(node)){ LoggingUtils.getEvoLogger().info(STR); }; handled.add(node); } | /**
* If the given Set of handled nodes already contains the given node, an
* IllegalStateException is thrown, because that should not happen.
* Otherwise the given node is added to the given Set.
*
* Well ... funny method name i know
*/ | If the given Set of handled nodes already contains the given node, an IllegalStateException is thrown, because that should not happen. Otherwise the given node is added to the given Set. Well ... funny method name i know | handleHandledNodesSet | {
"repo_name": "SoftwareEngineeringToolDemos/FSE-2011-EvoSuite",
"path": "client/src/main/java/org/evosuite/coverage/dataflow/analysis/AllUsesAnalysis.java",
"license": "lgpl-3.0",
"size": 37414
} | [
"java.util.Set",
"org.evosuite.graphs.ccfg.CCFGNode",
"org.evosuite.utils.LoggingUtils"
] | import java.util.Set; import org.evosuite.graphs.ccfg.CCFGNode; import org.evosuite.utils.LoggingUtils; | import java.util.*; import org.evosuite.graphs.ccfg.*; import org.evosuite.utils.*; | [
"java.util",
"org.evosuite.graphs",
"org.evosuite.utils"
] | java.util; org.evosuite.graphs; org.evosuite.utils; | 2,330,994 |
public static com.iucn.whp.dbservice.model.unesco_region_country remove(
int whp_unesco_region_country_id)
throws com.iucn.whp.dbservice.NoSuchunesco_region_countryException,
com.liferay.portal.kernel.exception.SystemException {
return getPersistence().remove(whp_unesco_region_country_id);
} | static com.iucn.whp.dbservice.model.unesco_region_country function( int whp_unesco_region_country_id) throws com.iucn.whp.dbservice.NoSuchunesco_region_countryException, com.liferay.portal.kernel.exception.SystemException { return getPersistence().remove(whp_unesco_region_country_id); } | /**
* Removes the unesco_region_country with the primary key from the database. Also notifies the appropriate model listeners.
*
* @param whp_unesco_region_country_id the primary key of the unesco_region_country
* @return the unesco_region_country that was removed
* @throws com.iucn.whp.dbservice.NoSuchunesco_regi... | Removes the unesco_region_country with the primary key from the database. Also notifies the appropriate model listeners | remove | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/unesco_region_countryUtil.java",
"license": "gpl-2.0",
"size": 22995
} | [
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.portal.kernel.exception.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,897,872 |
public static Key fromList(List<Key> keys) {
if (keys == null || keys.size() == 0)
return NONE;
if (keys.contains(ALL))
return ALL;
if (keys.contains(CTRL)) {
if (keys.size() == 1)
return CTRL;
else if (keys.contains(SHIFT)) {
if (keys.contains(A... | static Key function(List<Key> keys) { if (keys == null keys.size() == 0) return NONE; if (keys.contains(ALL)) return ALL; if (keys.contains(CTRL)) { if (keys.size() == 1) return CTRL; else if (keys.contains(SHIFT)) { if (keys.contains(ALT)) return CTRL_ALT_SHIFT; else return CTRL_SHIFT; } else if (keys.contains(ALT)) {... | /**
* Converts a list to a Key
*
* @param keys
* @return
*/ | Converts a list to a Key | fromList | {
"repo_name": "tomas-pluskal/mzmine3",
"path": "src/main/java/io/github/mzmine/gui/chartbasics/gestures/ChartGesture.java",
"license": "gpl-2.0",
"size": 12463
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,397,458 |
public List<WebElement> findElements(final ByWComponent by, final boolean pageWait) {
by.setContext(getUserContextForSession());
return findElementsInt(by, pageWait);
} | List<WebElement> function(final ByWComponent by, final boolean pageWait) { by.setContext(getUserContextForSession()); return findElementsInt(by, pageWait); } | /**
* <p>
* Find WComponents that were created in the same JVM as the servlet.</p>
* <p>
* This method requires that SeleniumLauncher (or subclass) was used to launch the server.</p>
*
* @param by the ByWcomponent to find.
* @param pageWait true if wait for page ready before do find
* @return the matchi... | Find WComponents that were created in the same JVM as the servlet. This method requires that SeleniumLauncher (or subclass) was used to launch the server | findElements | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-test-lib/src/main/java/com/github/bordertech/wcomponents/test/selenium/driver/SeleniumWComponentsWebDriver.java",
"license": "gpl-3.0",
"size": 20486
} | [
"com.github.bordertech.wcomponents.test.selenium.ByWComponent",
"java.util.List",
"org.openqa.selenium.WebElement"
] | import com.github.bordertech.wcomponents.test.selenium.ByWComponent; import java.util.List; import org.openqa.selenium.WebElement; | import com.github.bordertech.wcomponents.test.selenium.*; import java.util.*; import org.openqa.selenium.*; | [
"com.github.bordertech",
"java.util",
"org.openqa.selenium"
] | com.github.bordertech; java.util; org.openqa.selenium; | 286,089 |
Map<String, Object> getErrorAttributes(WebRequest webRequest,
boolean includeStackTrace);
/**
* Return the underlying cause of the error or {@code null} if the error cannot be
* extracted.
* @param webRequest the source request
* @return the {@link Exception} that caused the error or {@code null} | Map<String, Object> getErrorAttributes(WebRequest webRequest, boolean includeStackTrace); /** * Return the underlying cause of the error or {@code null} if the error cannot be * extracted. * @param webRequest the source request * @return the {@link Exception} that caused the error or {@code null} | /**
* Returns a {@link Map} of the error attributes. The map can be used as the model of
* an error page {@link ModelAndView}, or returned as a {@link ResponseBody}.
* @param webRequest the source request
* @param includeStackTrace if stack trace elements should be included
* @return a map of error attributes... | Returns a <code>Map</code> of the error attributes. The map can be used as the model of an error page <code>ModelAndView</code>, or returned as a <code>ResponseBody</code> | getErrorAttributes | {
"repo_name": "deki/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/web/servlet/error/ErrorAttributes.java",
"license": "apache-2.0",
"size": 1766
} | [
"java.util.Map",
"org.springframework.web.context.request.WebRequest"
] | import java.util.Map; import org.springframework.web.context.request.WebRequest; | import java.util.*; import org.springframework.web.context.request.*; | [
"java.util",
"org.springframework.web"
] | java.util; org.springframework.web; | 1,346,017 |
EReference getBorderLayout_Bottom(); | EReference getBorderLayout_Bottom(); | /**
* Returns the meta object for the reference '{@link guizmo.layout.BorderLayout#getBottom <em>Bottom</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Bottom</em>'.
* @see guizmo.layout.BorderLayout#getBottom()
* @see #getBorderLayout()
* @genera... | Returns the meta object for the reference '<code>guizmo.layout.BorderLayout#getBottom Bottom</code>'. | getBorderLayout_Bottom | {
"repo_name": "osanchezUM/guizmo",
"path": "src/guizmo/layout/LayoutPackage.java",
"license": "apache-2.0",
"size": 87190
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 629,318 |
public void setBank(Bank bank) {
this.bank = bank;
} | void function(Bank bank) { this.bank = bank; } | /**
* Sets the bank attribute value.
*
* @param bank The bank to set.
*/ | Sets the bank attribute value | setBank | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/pdp/businessobject/CustomerBank.java",
"license": "agpl-3.0",
"size": 4925
} | [
"org.kuali.kfs.sys.businessobject.Bank"
] | import org.kuali.kfs.sys.businessobject.Bank; | import org.kuali.kfs.sys.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,743,111 |
public void setDefaultRenditionContentProp(String prop)
{
QName qname;
try
{
qname = QName.createQName(prop);
}
catch (NamespaceException nx)
{
if (logger.isErrorEnabled())
{
logger.error("Error when s... | void function(String prop) { QName qname; try { qname = QName.createQName(prop); } catch (NamespaceException nx) { if (logger.isErrorEnabled()) { logger.error(STR, nx); } throw nx; } if (logger.isInfoEnabled()) { logger.info(STR + qname); } this.defaultRenditionContentProp = qname; } | /**
* Sets the default rendition content property.
*
* @param prop String
*/ | Sets the default rendition content property | setDefaultRenditionContentProp | {
"repo_name": "fxcebx/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/rendition/executer/AbstractRenderingEngine.java",
"license": "lgpl-3.0",
"size": 45583
} | [
"org.alfresco.service.namespace.NamespaceException",
"org.alfresco.service.namespace.QName"
] | import org.alfresco.service.namespace.NamespaceException; import org.alfresco.service.namespace.QName; | import org.alfresco.service.namespace.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 378,595 |
private boolean doParseMoreData(final InputStream inputStream) {
final int oldBestScanNumber = mBestScanNumber;
try {
int nextByte;
while (mParserState != NOT_A_JPEG && (nextByte = inputStream.read()) != -1) {
mBytesParsed++;
switch (mParserState) {
case READ_FIRST_JPEG_... | boolean function(final InputStream inputStream) { final int oldBestScanNumber = mBestScanNumber; try { int nextByte; while (mParserState != NOT_A_JPEG && (nextByte = inputStream.read()) != -1) { mBytesParsed++; switch (mParserState) { case READ_FIRST_JPEG_BYTE: if (nextByte == JfifUtil.MARKER_FIRST_BYTE) { mParserState... | /**
* Parses more data from inputStream.
*
* @param inputStream instance of buffered pooled byte buffer input stream
*/ | Parses more data from inputStream | doParseMoreData | {
"repo_name": "wswenyue/fresco",
"path": "imagepipeline/src/main/java/com/facebook/imagepipeline/decoder/ProgressiveJpegParser.java",
"license": "bsd-3-clause",
"size": 8901
} | [
"com.facebook.common.internal.Preconditions",
"com.facebook.common.internal.Throwables",
"com.facebook.common.util.StreamUtil",
"com.facebook.imageutils.JfifUtil",
"java.io.IOException",
"java.io.InputStream"
] | import com.facebook.common.internal.Preconditions; import com.facebook.common.internal.Throwables; import com.facebook.common.util.StreamUtil; import com.facebook.imageutils.JfifUtil; import java.io.IOException; import java.io.InputStream; | import com.facebook.common.internal.*; import com.facebook.common.util.*; import com.facebook.imageutils.*; import java.io.*; | [
"com.facebook.common",
"com.facebook.imageutils",
"java.io"
] | com.facebook.common; com.facebook.imageutils; java.io; | 2,082,902 |
public boolean isExampleOf(String word, Pattern tokenPattern, Pattern posPattern, Element e) {
if (tokenPattern.pattern().isEmpty() && posPattern == null) {
return true;
}
boolean tokenMatches = true;
boolean postagMatches = false;
boolean isTokenEmpty = e.getString().isEm... | boolean function(String word, Pattern tokenPattern, Pattern posPattern, Element e) { if (tokenPattern.pattern().isEmpty() && posPattern == null) { return true; } boolean tokenMatches = true; boolean postagMatches = false; boolean isTokenEmpty = e.getString().isEmpty(); boolean hasPosTag = (posPattern != null); boolean ... | /**
* Faster version of isExampleOf, since you don't have to recompile the Patterns every time
* @param word
* @param tokenPattern
* @param posPattern
* @param isTokenEmpty
* @param hasPosTag
* @param negate
* @param postagNegate
* @return
*/ | Faster version of isExampleOf, since you don't have to recompile the Patterns every time | isExampleOf | {
"repo_name": "ManolitoOctaviano/Language-Identification",
"path": "src/dev/de/danielnaber/languagetool/dev/conversion/RuleCoverage.java",
"license": "lgpl-2.1",
"size": 30649
} | [
"de.danielnaber.languagetool.rules.patterns.Element",
"java.util.List",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import de.danielnaber.languagetool.rules.patterns.Element; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; | import de.danielnaber.languagetool.rules.patterns.*; import java.util.*; import java.util.regex.*; | [
"de.danielnaber.languagetool",
"java.util"
] | de.danielnaber.languagetool; java.util; | 1,869,471 |
public static TopFieldDocs merge(Sort sort, int start, int topN, TopFieldDocs[] shardHits) throws IOException {
if (sort == null) {
throw new IllegalArgumentException("sort must be non-null when merging field-docs");
}
return (TopFieldDocs) mergeAux(sort, start, topN, shardHits);
} | static TopFieldDocs function(Sort sort, int start, int topN, TopFieldDocs[] shardHits) throws IOException { if (sort == null) { throw new IllegalArgumentException(STR); } return (TopFieldDocs) mergeAux(sort, start, topN, shardHits); } | /**
* Same as {@link #merge(Sort, int, TopFieldDocs[])} but also ignores the top
* {@code start} top docs. This is typically useful for pagination.
* @lucene.experimental
*/ | Same as <code>#merge(Sort, int, TopFieldDocs[])</code> but also ignores the top start top docs. This is typically useful for pagination | merge | {
"repo_name": "PATRIC3/p3_solr",
"path": "lucene/core/src/java/org/apache/lucene/search/TopDocs.java",
"license": "apache-2.0",
"size": 11267
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 500,592 |
public static DataSourceTable createAndWrite(
NavigableMap<DataKey, DataValue> map, OutputStream outStream, Header.Builder headerBuilder)
throws IOException {
DataSourceTable sourceTable = new DataSourceTable();
sourceTable.writeSourceInfo(map, outStream);
sourceTable.setHeader(headerBuilder);... | static DataSourceTable function( NavigableMap<DataKey, DataValue> map, OutputStream outStream, Header.Builder headerBuilder) throws IOException { DataSourceTable sourceTable = new DataSourceTable(); sourceTable.writeSourceInfo(map, outStream); sourceTable.setHeader(headerBuilder); return sourceTable; } | /**
* Creates a DataSourceTable and serialize to the given outstream. Assigns each resource source
* path a number to enable {@link #getSourceId(DataSource)} queries.
*
* @param map the final map of resources
* @param outStream stream to serialize the source table
* @param headerBuilder the header to ... | Creates a DataSourceTable and serialize to the given outstream. Assigns each resource source path a number to enable <code>#getSourceId(DataSource)</code> queries | createAndWrite | {
"repo_name": "mbrukman/bazel",
"path": "src/tools/android/java/com/google/devtools/build/android/DataSourceTable.java",
"license": "apache-2.0",
"size": 3981
} | [
"com.google.devtools.build.android.proto.SerializeFormat",
"java.io.IOException",
"java.io.OutputStream",
"java.util.NavigableMap"
] | import com.google.devtools.build.android.proto.SerializeFormat; import java.io.IOException; import java.io.OutputStream; import java.util.NavigableMap; | import com.google.devtools.build.android.proto.*; import java.io.*; import java.util.*; | [
"com.google.devtools",
"java.io",
"java.util"
] | com.google.devtools; java.io; java.util; | 2,585,360 |
public static List<String> getPlugins() {
return PluginManager.getPluginNamesOfTypeList(AbstractClassifyResultHistoryPlugin.class.getName());
} | static List<String> function() { return PluginManager.getPluginNamesOfTypeList(AbstractClassifyResultHistoryPlugin.class.getName()); } | /**
* Returns all the available plugins.
*
* @return the classnames of the plugins
*/ | Returns all the available plugins | getPlugins | {
"repo_name": "Waikato/meka",
"path": "src/main/java/meka/gui/explorer/classify/AbstractClassifyResultHistoryPlugin.java",
"license": "gpl-3.0",
"size": 3109
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 738,233 |
public Map<Integer, Long> getMaxLastSeenTxnByPartition(); | Map<Integer, Long> function(); | /**
* IV2 ONLY:
* Get the map of the max TXN ID seen for each partition in the command l0g
*/ | Get the map of the max TXN ID seen for each partition in the command l0g | getMaxLastSeenTxnByPartition | {
"repo_name": "paulmartel/voltdb",
"path": "src/frontend/org/voltdb/CommandLogReinitiator.java",
"license": "agpl-3.0",
"size": 3733
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,752,707 |
public void processSecondHalfAnimation() {
// Here we see if it's the second part of the animation, if so,
// we run the second set of degrees. Otherwise, run the first
// set.
Rotate3dAnimation rotation;
if (secondAnim) {
rotation = new Rotate3dAnimation(startEndDeg[2], startEndDe... | void function() { Rotate3dAnimation rotation; if (secondAnim) { rotation = new Rotate3dAnimation(startEndDeg[2], startEndDeg[3], Width()/2, Height()/2, depth, horizontal, false); secondAnim = false; curRep++; } else { rotation = new Rotate3dAnimation(startEndDeg[0], startEndDeg[1], Width()/2, Height()/2, depth, horizon... | /**
* Internal method to start the second animation of the flip animation type.
* This shouldn't be called manually.
*/ | Internal method to start the second animation of the flip animation type. This shouldn't be called manually | processSecondHalfAnimation | {
"repo_name": "roadlabs/alternate-java-bridge-library",
"path": "src/com/xiledsystems/AlternateJavaBridgelib/components/altbridge/AndroidViewComponent.java",
"license": "apache-2.0",
"size": 22982
} | [
"android.view.animation.Animation",
"android.view.animation.DecelerateInterpolator",
"com.xiledsystems.AlternateJavaBridgelib"
] | import android.view.animation.Animation; import android.view.animation.DecelerateInterpolator; import com.xiledsystems.AlternateJavaBridgelib; | import android.view.animation.*; import com.xiledsystems.*; | [
"android.view",
"com.xiledsystems"
] | android.view; com.xiledsystems; | 1,707,359 |
public B selector(final Map<String, String> messageSelector) {
this.delegate.selector(messageSelector);
return self;
} | B function(final Map<String, String> messageSelector) { this.delegate.selector(messageSelector); return self; } | /**
* Sets message selector elements.
*
* @param messageSelector
* @return
*/ | Sets message selector elements | selector | {
"repo_name": "christophd/citrus",
"path": "vintage/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageActionBuilder.java",
"license": "apache-2.0",
"size": 27963
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,680,455 |
public Map<String, String> getBiosStrings(Connection c) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "host.get_bios_strings";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalli... | Map<String, String> function(Connection c) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Obj... | /**
* Get the bios_strings field of the given host.
*
* @return value of the field
*/ | Get the bios_strings field of the given host | getBiosStrings | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/Host.java",
"license": "apache-2.0",
"size": 105838
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 625,210 |
PagedIterable<PrivateEndpointConnection> listByConfigurationStore(String resourceGroupName, String configStoreName); | PagedIterable<PrivateEndpointConnection> listByConfigurationStore(String resourceGroupName, String configStoreName); | /**
* Lists all private endpoint connections for a configuration store.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param configStoreName The name of the configuration store.
* @throws IllegalArgumentException thrown if parameters fail... | Lists all private endpoint connections for a configuration store | listByConfigurationStore | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/models/PrivateEndpointConnections.java",
"license": "mit",
"size": 8255
} | [
"com.azure.core.http.rest.PagedIterable"
] | import com.azure.core.http.rest.PagedIterable; | import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 883,114 |
public void setRange(Range range) {
if (range == null) {
throw new IllegalArgumentException("Null 'range' argument.");
}
if (!(range.getLength() > 0.0)) {
throw new IllegalArgumentException(
"Range length must be positive."
);
}
... | void function(Range range) { if (range == null) { throw new IllegalArgumentException(STR); } if (!(range.getLength() > 0.0)) { throw new IllegalArgumentException( STR ); } this.range = range; notifyListeners(new PlotChangeEvent(this)); } | /**
* Sets the range for the dial and sends a {@link PlotChangeEvent} to all
* registered listeners.
*
* @param range the range (<code>null</code> not permitted and zero-length
* ranges not permitted).
*/ | Sets the range for the dial and sends a <code>PlotChangeEvent</code> to all registered listeners | setRange | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/MeterPlot.java",
"license": "lgpl-2.1",
"size": 42142
} | [
"org.jfree.chart.event.PlotChangeEvent",
"org.jfree.data.Range"
] | import org.jfree.chart.event.PlotChangeEvent; import org.jfree.data.Range; | import org.jfree.chart.event.*; import org.jfree.data.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 110,934 |
boolean expectCanAssignToPropertyOf(NodeTraversal t, Node n, JSType rightType,
JSType leftType, Node owner, String propName) {
// The NoType check is a hack to make typedefs work OK.
if (!leftType.isNoType() && !rightType.canAssignTo(leftType)) {
if (bothIntrinsics(rightType, leftType)) {
... | boolean expectCanAssignToPropertyOf(NodeTraversal t, Node n, JSType rightType, JSType leftType, Node owner, String propName) { if (!leftType.isNoType() && !rightType.canAssignTo(leftType)) { if (bothIntrinsics(rightType, leftType)) { registerMismatch(rightType, leftType, null); } else { JSType ownerType = getJSType(own... | /**
* Expect that the first type can be assigned to a symbol of the second
* type.
*
* @param t The node traversal.
* @param n The node to issue warnings on.
* @param rightType The type on the RHS of the assign.
* @param leftType The type of the symbol on the LHS of the assign.
* @param owner Th... | Expect that the first type can be assigned to a symbol of the second type | expectCanAssignToPropertyOf | {
"repo_name": "dound/google-closure-compiler",
"path": "src/com/google/javascript/jscomp/TypeValidator.java",
"license": "apache-2.0",
"size": 30417
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.JSType"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 101,141 |
public static TableViewer configureAssignEventTable(final TableViewer viewer)
{
JiveTableViewer.configureDefaultTable(viewer);
JiveTableViewer.createTableViewerColumn(viewer, JiveTableViewer.LAST_DEFAULT_COL + 1,
"Context", 120, SWT.LEFT, JiveTableViewer.assignContourLabel);
JiveTableViewer.crea... | static TableViewer function(final TableViewer viewer) { JiveTableViewer.configureDefaultTable(viewer); JiveTableViewer.createTableViewerColumn(viewer, JiveTableViewer.LAST_DEFAULT_COL + 1, STR, 120, SWT.LEFT, JiveTableViewer.assignContourLabel); JiveTableViewer.createTableViewerColumn(viewer, JiveTableViewer.LAST_DEFAU... | /**
* Specialized table for AssignEvent.
*/ | Specialized table for AssignEvent | configureAssignEventTable | {
"repo_name": "UBPL/jive",
"path": "edu.buffalo.cse.jive.ui/src/edu/buffalo/cse/jive/ui/view/JiveTableViewer.java",
"license": "epl-1.0",
"size": 18313
} | [
"org.eclipse.jface.viewers.TableViewer"
] | import org.eclipse.jface.viewers.TableViewer; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 932,157 |
public double kolmogorovSmirnovStatistic(ContinuousDistribution distribution, double[] data) {
checkArray(data);
final int n = data.length;
final double nd = n;
final double[] dataCopy = new double[n];
System.arraycopy(data, 0, dataCopy, 0, n);
Arrays.sort(dataCopy);
... | double function(ContinuousDistribution distribution, double[] data) { checkArray(data); final int n = data.length; final double nd = n; final double[] dataCopy = new double[n]; System.arraycopy(data, 0, dataCopy, 0, n); Arrays.sort(dataCopy); double d = 0d; for (int i = 1; i <= n; i++) { final double yi = distribution.... | /**
* Computes the one-sample Kolmogorov-Smirnov test statistic, \(D_n=\sup_x |F_n(x)-F(x)|\) where
* \(F\) is the distribution (cdf) function associated with {@code distribution}, \(n\) is the
* length of {@code data} and \(F_n\) is the empirical distribution that puts mass \(1/n\) at
* each of the... | Computes the one-sample Kolmogorov-Smirnov test statistic, \(D_n=\sup_x |F_n(x)-F(x)|\) where \(F\) is the distribution (cdf) function associated with distribution, \(n\) is the length of data and \(F_n\) is the empirical distribution that puts mass \(1/n\) at each of the values in data | kolmogorovSmirnovStatistic | {
"repo_name": "virtualdataset/metagen-java",
"path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java",
"license": "apache-2.0",
"size": 53317
} | [
"java.util.Arrays",
"org.apache.commons.math4.util.FastMath",
"org.apache.commons.statistics.distribution.ContinuousDistribution"
] | import java.util.Arrays; import org.apache.commons.math4.util.FastMath; import org.apache.commons.statistics.distribution.ContinuousDistribution; | import java.util.*; import org.apache.commons.math4.util.*; import org.apache.commons.statistics.distribution.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,501,063 |
@Override
public void widgetDefaultSelected(SelectionEvent e) {
} | void function(SelectionEvent e) { } | /**
* Sent when default selection occurs in the control. The default behavior
* is to do nothing.
*
* @param e
* an event containing information about the default selection
*/ | Sent when default selection occurs in the control. The default behavior is to do nothing | widgetDefaultSelected | {
"repo_name": "Lokot/skylibs",
"path": "skylibs-swt/src/main/java/ru/skysoftlab/swt/AbstractEditDialog.java",
"license": "mit",
"size": 1670
} | [
"org.eclipse.swt.events.SelectionEvent"
] | import org.eclipse.swt.events.SelectionEvent; | import org.eclipse.swt.events.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,032,376 |
@Override
protected void stop() {
AccountingService.setUpdateCustomerAccount(true);
String comment = "";
batch = batchRepo.find(batch.getId());
switch (batch.getAccountingBatch().getReimbursementExportTypeSelect()) {
case AccountingBatchRepository.REIMBURSEMENT_EXPORT_TYPE_GENERATE:
... | void function() { AccountingService.setUpdateCustomerAccount(true); String comment = STR\nSTR\t* %s STR\nSTR\t* STR : %s \nSTR\nSTR\t* %s STR\nSTR\t* STR : %s \nSTR\t* ------------------------------- \nSTR\t* %s ", updateCustomerAccountLog); break; default: break; } comment += String.format( I18n.get(com.axelor.apps.ba... | /**
* As {@code batch} entity can be detached from the session, call {@code Batch.find()} get the
* entity in the persistant context. Warning : {@code batch} entity have to be saved before.
*/ | As batch entity can be detached from the session, call Batch.find() get the entity in the persistant context. Warning : batch entity have to be saved before | stop | {
"repo_name": "axelor/axelor-business-suite",
"path": "axelor-account/src/main/java/com/axelor/apps/account/service/batch/BatchReimbursementExport.java",
"license": "agpl-3.0",
"size": 15144
} | [
"com.axelor.apps.account.exception.IExceptionMessage",
"com.axelor.apps.account.service.AccountingService",
"com.axelor.i18n.I18n"
] | import com.axelor.apps.account.exception.IExceptionMessage; import com.axelor.apps.account.service.AccountingService; import com.axelor.i18n.I18n; | import com.axelor.apps.account.exception.*; import com.axelor.apps.account.service.*; import com.axelor.i18n.*; | [
"com.axelor.apps",
"com.axelor.i18n"
] | com.axelor.apps; com.axelor.i18n; | 831,322 |
private void handleFail(final Message message, final Responder responder, final String failReason) {
LOG.error(failReason);
responder.response(createResponseMessage(message, Type.EXCEPTION));
} | void function(final Message message, final Responder responder, final String failReason) { LOG.error(failReason); responder.response(createResponseMessage(message, Type.EXCEPTION)); } | /**
* This method is called if something went wrong while the reverse
* connection setup. It responds then with a {@link Type}.EXCEPTION message.
*
* @param message
* @param responder
* @param failReason
*/ | This method is called if something went wrong while the reverse connection setup. It responds then with a <code>Type</code>.EXCEPTION message | handleFail | {
"repo_name": "jonaswagner/TomP2P",
"path": "nat/src/main/java/net/tomp2p/relay/RconRPC.java",
"license": "apache-2.0",
"size": 13226
} | [
"net.tomp2p.connection.Responder",
"net.tomp2p.message.Message"
] | import net.tomp2p.connection.Responder; import net.tomp2p.message.Message; | import net.tomp2p.connection.*; import net.tomp2p.message.*; | [
"net.tomp2p.connection",
"net.tomp2p.message"
] | net.tomp2p.connection; net.tomp2p.message; | 2,623,295 |
public static DiffStat getDiffStat(Repository repository, String base, String tip) {
RevCommit baseCommit = null;
RevCommit tipCommit = null;
RevWalk revWalk = new RevWalk(repository);
try {
tipCommit = revWalk.parseCommit(repository.resolve(tip));
if (!StringUtils.isEmpty(base)) {
baseCommi... | static DiffStat function(Repository repository, String base, String tip) { RevCommit baseCommit = null; RevCommit tipCommit = null; RevWalk revWalk = new RevWalk(repository); try { tipCommit = revWalk.parseCommit(repository.resolve(tip)); if (!StringUtils.isEmpty(base)) { baseCommit = revWalk.parseCommit(repository.res... | /**
* Returns the diffstat between the two commits for the specified file or folder.
*
* @param repository
* @param base
* if base commit is unspecified, the diffstat is generated against
* the primary parent of the specified tip.
* @param tip
* @param path
* ... | Returns the diffstat between the two commits for the specified file or folder | getDiffStat | {
"repo_name": "cesarmarinhorj/gitblit",
"path": "src/main/java/com/gitblit/utils/DiffUtils.java",
"license": "apache-2.0",
"size": 15455
} | [
"org.eclipse.jgit.lib.Repository",
"org.eclipse.jgit.revwalk.RevCommit",
"org.eclipse.jgit.revwalk.RevWalk"
] | import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevWalk; | import org.eclipse.jgit.lib.*; import org.eclipse.jgit.revwalk.*; | [
"org.eclipse.jgit"
] | org.eclipse.jgit; | 869,915 |
public TravelExpenseService getTravelExpenseService() {
return travelExpenseService;
} | TravelExpenseService function() { return travelExpenseService; } | /**
* Gets the travelExpenseService attribute.
* @return Returns the travelExpenseService.
*/ | Gets the travelExpenseService attribute | getTravelExpenseService | {
"repo_name": "kuali/kfs",
"path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/batch/service/impl/ExpenseImportByTripServiceImpl.java",
"license": "agpl-3.0",
"size": 44771
} | [
"org.kuali.kfs.module.tem.service.TravelExpenseService"
] | import org.kuali.kfs.module.tem.service.TravelExpenseService; | import org.kuali.kfs.module.tem.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,391,849 |
public GradientPaintTransformer getGradientPaintTransformer() {
return this.gradientPaintTransformer;
}
| GradientPaintTransformer function() { return this.gradientPaintTransformer; } | /**
* Returns the gradient paint transformer (an object used to transform
* gradient paint objects to fit each bar.
*
* @return A transformer (<code>null</code> possible).
*
* @see #setGradientPaintTransformer(GradientPaintTransformer)
*/ | Returns the gradient paint transformer (an object used to transform gradient paint objects to fit each bar | getGradientPaintTransformer | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/category/BarRenderer.java",
"license": "gpl-2.0",
"size": 39947
} | [
"org.jfree.ui.GradientPaintTransformer"
] | import org.jfree.ui.GradientPaintTransformer; | import org.jfree.ui.*; | [
"org.jfree.ui"
] | org.jfree.ui; | 2,363,520 |
private void buildRespcondition_fail(final Element resprocessingXML, final boolean isSingleCorrect) {
// build
final Element respcondition_fail = resprocessingXML.addElement("respcondition");
respcondition_fail.addAttribute("title", "Fail");
respcondition_fail.addAttribute("continue"... | void function(final Element resprocessingXML, final boolean isSingleCorrect) { final Element respcondition_fail = resprocessingXML.addElement(STR); respcondition_fail.addAttribute("title", "Fail"); respcondition_fail.addAttribute(STR, "Yes"); final Element conditionvar = respcondition_fail.addElement(STR); final Elemen... | /**
* Build fail resprocessing: Adjust score to 0 (if multiple correct mode) and set hints, solutions and fail feedback
*
* @param resprocessingXML
* @param isSingleCorrect
*/ | Build fail resprocessing: Adjust score to 0 (if multiple correct mode) and set hints, solutions and fail feedback | buildRespcondition_fail | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/lms/ims/qti/objects/ChoiceQuestion.java",
"license": "apache-2.0",
"size": 29988
} | [
"java.util.Iterator",
"org.dom4j.Element",
"org.olat.lms.ims.qti.editor.QTIEditHelperEBL"
] | import java.util.Iterator; import org.dom4j.Element; import org.olat.lms.ims.qti.editor.QTIEditHelperEBL; | import java.util.*; import org.dom4j.*; import org.olat.lms.ims.qti.editor.*; | [
"java.util",
"org.dom4j",
"org.olat.lms"
] | java.util; org.dom4j; org.olat.lms; | 2,247,612 |
public void doSave(IProgressMonitor monitor) {
getEditor(getActivePage()).doSave(monitor);
autoTransform();
} | void function(IProgressMonitor monitor) { getEditor(getActivePage()).doSave(monitor); autoTransform(); } | /**
* Saves the multipage editor's document.
*/ | Saves the multipage editor's document | doSave | {
"repo_name": "road-framework/ROADDesigner",
"path": "au.edu.swin.ict.road.designer.diagram/src/au/edu/swin/ict/road/designer/diagram/editors/MultiPageSmcDiagramEditor.java",
"license": "apache-2.0",
"size": 10128
} | [
"org.eclipse.core.runtime.IProgressMonitor"
] | import org.eclipse.core.runtime.IProgressMonitor; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,476,505 |
@Override
public byte getDataStructureType() {
return MessageAck.DATA_STRUCTURE_TYPE;
} | byte function() { return MessageAck.DATA_STRUCTURE_TYPE; } | /**
* Return the type of Data Structure we marshal
*
* @return short representation of the type data structure
*/ | Return the type of Data Structure we marshal | getDataStructureType | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v1/MessageAckMarshaller.java",
"license": "apache-2.0",
"size": 6657
} | [
"org.apache.activemq.openwire.commands.MessageAck"
] | import org.apache.activemq.openwire.commands.MessageAck; | import org.apache.activemq.openwire.commands.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 954,851 |
public void Helpdialog(){
AlertDialog.Builder builder = new AlertDialog.Builder(this);
LayoutInflater inflater = this.getLayoutInflater();
View customView = inflater.inflate(R.layout.help_layout, null);
TextView textmessage = (TextView)customView.findViewById(R.id.help_layout_message);
... | void function(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); LayoutInflater inflater = this.getLayoutInflater(); View customView = inflater.inflate(R.layout.help_layout, null); TextView textmessage = (TextView)customView.findViewById(R.id.help_layout_message); TextView texttitle = (TextView)customView.... | /**
* Show dialog for Help information
*/ | Show dialog for Help information | Helpdialog | {
"repo_name": "odbelix/odcontrol-voice",
"path": "src/cl/mamd/voice/NodoDevicePortActivity.java",
"license": "gpl-2.0",
"size": 13297
} | [
"android.app.AlertDialog",
"android.view.LayoutInflater",
"android.view.View",
"android.widget.TextView"
] | import android.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.widget.TextView; | import android.app.*; import android.view.*; import android.widget.*; | [
"android.app",
"android.view",
"android.widget"
] | android.app; android.view; android.widget; | 390,423 |
@SuppressWarnings("unused")
public void selectItem(int position, boolean invokeListeners) {
IOperationItem item = mOuterAdapter.getItem(position);
IOperationItem oldHidedItem = mOuterAdapter.getItem(mRealHidedPosition);
int realPosition = mOuterAdapter.normalizePosition(position);
... | @SuppressWarnings(STR) void function(int position, boolean invokeListeners) { IOperationItem item = mOuterAdapter.getItem(position); IOperationItem oldHidedItem = mOuterAdapter.getItem(mRealHidedPosition); int realPosition = mOuterAdapter.normalizePosition(position); if (realPosition == mCurrentItemPosition) { return; ... | /**
* Select item by it's position
*
* @param position int value of item position to select
* @param invokeListeners boolean value for invoking listeners
*/ | Select item by it's position | selectItem | {
"repo_name": "Cleveroad/LoopBar",
"path": "LoopBar-widget/src/main/java/com/cleveroad/loopbar/widget/LoopBarView.java",
"license": "mit",
"size": 41142
} | [
"android.util.Log",
"com.cleveroad.loopbar.BuildConfig",
"com.cleveroad.loopbar.adapter.IOperationItem"
] | import android.util.Log; import com.cleveroad.loopbar.BuildConfig; import com.cleveroad.loopbar.adapter.IOperationItem; | import android.util.*; import com.cleveroad.loopbar.*; import com.cleveroad.loopbar.adapter.*; | [
"android.util",
"com.cleveroad.loopbar"
] | android.util; com.cleveroad.loopbar; | 292,667 |
protected FileSystem createFileSystem(UserGroupInformation user)
throws Exception {
return DFSTestUtil.getFileSystemAs(user, conf);
} | FileSystem function(UserGroupInformation user) throws Exception { return DFSTestUtil.getFileSystemAs(user, conf); } | /**
* Creates a FileSystem for a specific user.
*
* @param user UserGroupInformation specific user
* @return FileSystem for specific user
* @throws Exception if creation fails
*/ | Creates a FileSystem for a specific user | createFileSystem | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSXAttrBaseTest.java",
"license": "apache-2.0",
"size": 51073
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.security.UserGroupInformation"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.security.UserGroupInformation; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.security.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 871,534 |
public void testMockClientWithDelay() {
RestAdapter restAdapter = RedditService.Implementation.getBuilder().build();
MockRestAdapter mockRestAdapter = MockRestAdapter.from(restAdapter);
mockRestAdapter.setDelay(2500);
RedditService service = mockRestAdapter.create(RedditService.class, new MockRedditSe... | void function() { RestAdapter restAdapter = RedditService.Implementation.getBuilder().build(); MockRestAdapter mockRestAdapter = MockRestAdapter.from(restAdapter); mockRestAdapter.setDelay(2500); RedditService service = mockRestAdapter.create(RedditService.class, new MockRedditService()); long start = System.currentTim... | /**
* Example using a mock client with delay
*/ | Example using a mock client with delay | testMockClientWithDelay | {
"repo_name": "jacobtabak/droidcon",
"path": "app/src/androidTest/java/com/timehop/droidcon2014retrofitsample/data/reddit/RedditTests.java",
"license": "apache-2.0",
"size": 4282
} | [
"com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditListing",
"com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditResponse",
"java.util.List"
] | import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditListing; import com.timehop.droidcon2014retrofitsample.data.reddit.model.RedditResponse; import java.util.List; | import com.timehop.droidcon2014retrofitsample.data.reddit.model.*; import java.util.*; | [
"com.timehop.droidcon2014retrofitsample",
"java.util"
] | com.timehop.droidcon2014retrofitsample; java.util; | 2,570,993 |
void setParentTabGroup(@Nullable TabGroup tabGroup);
| void setParentTabGroup(@Nullable TabGroup tabGroup); | /**
* Set the tab group that is the parent of the tab.
*
* @param tabGroup the parent tab group
*/ | Set the tab group that is the parent of the tab | setParentTabGroup | {
"repo_name": "Ryszard-Trojnacki/nifty-gui",
"path": "nifty-controls/src/main/java/de/lessvoid/nifty/controls/tabs/TabGroupMember.java",
"license": "bsd-2-clause",
"size": 656
} | [
"de.lessvoid.nifty.controls.TabGroup",
"javax.annotation.Nullable"
] | import de.lessvoid.nifty.controls.TabGroup; import javax.annotation.Nullable; | import de.lessvoid.nifty.controls.*; import javax.annotation.*; | [
"de.lessvoid.nifty",
"javax.annotation"
] | de.lessvoid.nifty; javax.annotation; | 961,853 |
@Test
public void testGetSessionIndex() throws Exception {
HttpServletRequest request = mock(HttpServletRequest.class);
HttpServletResponse response = mock(HttpServletResponse.class);
String samlResponseEncoded = Util.getFileAsString("data/responses/response1.xml.base64");
when(request.getParameterMap()).th... | void function() throws Exception { HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); String samlResponseEncoded = Util.getFileAsString(STR); when(request.getParameterMap()).thenReturn(singletonMap(STR, new String[]{samlResponseEncoded})); when(r... | /**
* Tests the getSessionIndex method of Auth
*
* @throws Exception
*
* @see com.onelogin.saml2.Auth#getSessionIndex
*/ | Tests the getSessionIndex method of Auth | testGetSessionIndex | {
"repo_name": "onelogin/java-saml",
"path": "toolkit/src/test/java/com/onelogin/saml2/test/AuthTest.java",
"license": "mit",
"size": 108047
} | [
"com.onelogin.saml2.Auth",
"com.onelogin.saml2.util.Util",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.junit.Assert",
"org.mockito.Mockito"
] | import com.onelogin.saml2.Auth; import com.onelogin.saml2.util.Util; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Assert; import org.mockito.Mockito; | import com.onelogin.saml2.*; import com.onelogin.saml2.util.*; import javax.servlet.http.*; import org.junit.*; import org.mockito.*; | [
"com.onelogin.saml2",
"javax.servlet",
"org.junit",
"org.mockito"
] | com.onelogin.saml2; javax.servlet; org.junit; org.mockito; | 378,852 |
public void setAttributes(List<Attribute> attributes) {
this.attributes = attributes;
}
private ParsedAnnotationInfo annotation;
private ComplexType containerComplexType;
| void function(List<Attribute> attributes) { this.attributes = attributes; } private ParsedAnnotationInfo annotation; private ComplexType containerComplexType; | /**
* setter for collection of attributes.
*
* @param attributes
* the new attributes
*/ | setter for collection of attributes | setAttributes | {
"repo_name": "kingargyle/turmeric-wsdldoctool",
"path": "wsdl-doc-tool/src/main/java/org/ebayopensource/turmeric/tools/annoparser/dataobjects/Element.java",
"license": "apache-2.0",
"size": 4864
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 412,856 |
public PotentialFigure potentialWidgetUnderXY(int x, int y)
{
IFigure f =
view.getEditor().getInteractionFigure().findFigureAt(x,
y,
PotentialFigure.cla... | PotentialFigure function(int x, int y) { IFigure f = view.getEditor().getInteractionFigure().findFigureAt(x, y, PotentialFigure.class); if (f != null) { return (PotentialFigure) f; } return null; } | /**
* Find a potential graphical figure at x, y
*/ | Find a potential graphical figure at x, y | potentialWidgetUnderXY | {
"repo_name": "cogtool/cogtool",
"path": "java/edu/cmu/cs/hcii/cogtool/ui/FrameEditorUI.java",
"license": "lgpl-2.1",
"size": 141856
} | [
"edu.cmu.cs.hcii.cogtool.view.PotentialFigure",
"org.eclipse.draw2d.IFigure"
] | import edu.cmu.cs.hcii.cogtool.view.PotentialFigure; import org.eclipse.draw2d.IFigure; | import edu.cmu.cs.hcii.cogtool.view.*; import org.eclipse.draw2d.*; | [
"edu.cmu.cs",
"org.eclipse.draw2d"
] | edu.cmu.cs; org.eclipse.draw2d; | 1,334,840 |
public void testExportingDataMumble( ) throws Exception
{
openDesign( "ElementExporterTest_5.xml" ); //$NON-NLS-1$
openLibrary( "ElementExporterTestLibrary.xml" ); //$NON-NLS-1$
DataSetHandle dataSetHandle = designHandle.findDataSet( "dataSet1" ); //$NON-NLS-1$
ElementExportUtil.exportElement( dataSetHan... | void function( ) throws Exception { openDesign( STR ); openLibrary( STR ); DataSetHandle dataSetHandle = designHandle.findDataSet( STR ); ElementExportUtil.exportElement( dataSetHandle, libraryHandle, false ); dataSetHandle = libraryHandle.findDataSet( STR ); assertEquals( STR, dataSetHandle.getDataSourceName( ) ); ass... | /**
* Tests exporting data source/set to library file.
*
* @throws Exception
* if any exception.
*/ | Tests exporting data source/set to library file | testExportingDataMumble | {
"repo_name": "Charling-Huang/birt",
"path": "model/org.eclipse.birt.report.model.tests/test/org/eclipse/birt/report/model/api/ElementExporterTest.java",
"license": "epl-1.0",
"size": 35512
} | [
"org.eclipse.birt.report.model.api.util.ElementExportUtil"
] | import org.eclipse.birt.report.model.api.util.ElementExportUtil; | import org.eclipse.birt.report.model.api.util.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 431,766 |
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration(
CacheEventListener<?, ?> listener, EventType eventType, EventType... eventTypes){
return new CacheEventListenerConfigurationBuilder(EnumSet.of(eventType, eventTypes), listener);
} | static CacheEventListenerConfigurationBuilder function( CacheEventListener<?, ?> listener, EventType eventType, EventType... eventTypes){ return new CacheEventListenerConfigurationBuilder(EnumSet.of(eventType, eventTypes), listener); } | /**
* Creates a new builder instance using the given {@link CacheEventListener} instance and the {@link EventType}s it
* will listen to.
* <p>
* <ul>
* <li>{@link EventOrdering} defaults to {@link EventOrdering#UNORDERED}</li>
* <li>{@link EventFiring} defaults to {@link EventFiring#ASYNCHRONOUS}<... | Creates a new builder instance using the given <code>CacheEventListener</code> instance and the <code>EventType</code>s it will listen to. <code>EventOrdering</code> defaults to <code>EventOrdering#UNORDERED</code> <code>EventFiring</code> defaults to <code>EventFiring#ASYNCHRONOUS</code> | newEventListenerConfiguration | {
"repo_name": "GaryWKeim/ehcache3",
"path": "impl/src/main/java/org/ehcache/config/builders/CacheEventListenerConfigurationBuilder.java",
"license": "apache-2.0",
"size": 10932
} | [
"java.util.EnumSet",
"org.ehcache.event.CacheEventListener",
"org.ehcache.event.EventType"
] | import java.util.EnumSet; import org.ehcache.event.CacheEventListener; import org.ehcache.event.EventType; | import java.util.*; import org.ehcache.event.*; | [
"java.util",
"org.ehcache.event"
] | java.util; org.ehcache.event; | 851,304 |
@Restricted(NoExternalUse.class)
public Iterator<VersionNumber> getVersionList() {
TreeSet<VersionNumber> set = new TreeSet<>();
for (VersionRange vr : data.values()) {
if (vr.max != null) {
set.add(vr.max);
}
}
return set.iterator();
} | @Restricted(NoExternalUse.class) Iterator<VersionNumber> function() { TreeSet<VersionNumber> set = new TreeSet<>(); for (VersionRange vr : data.values()) { if (vr.max != null) { set.add(vr.max); } } return set.iterator(); } | /**
* Sorted list of unique max-versions in the data set. For select list in jelly.
*/ | Sorted list of unique max-versions in the data set. For select list in jelly | getVersionList | {
"repo_name": "v1v/jenkins",
"path": "core/src/main/java/hudson/diagnosis/OldDataMonitor.java",
"license": "mit",
"size": 17353
} | [
"hudson.util.VersionNumber",
"java.util.Iterator",
"java.util.TreeSet",
"org.kohsuke.accmod.Restricted",
"org.kohsuke.accmod.restrictions.NoExternalUse"
] | import hudson.util.VersionNumber; import java.util.Iterator; import java.util.TreeSet; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; | import hudson.util.*; import java.util.*; import org.kohsuke.accmod.*; import org.kohsuke.accmod.restrictions.*; | [
"hudson.util",
"java.util",
"org.kohsuke.accmod"
] | hudson.util; java.util; org.kohsuke.accmod; | 2,089,446 |
@Test
public void testEmitterWithOrderedQueue() throws Exception {
Object lock = new Object();
List<StreamElement> list = new ArrayList<>();
Output<StreamRecord<Integer>> output = new CollectorOutput<>(list);
List<StreamElement> expected = Arrays.asList(
new StreamRecord<>(1, 0L),
new StreamRecord<>(... | void function() throws Exception { Object lock = new Object(); List<StreamElement> list = new ArrayList<>(); Output<StreamRecord<Integer>> output = new CollectorOutput<>(list); List<StreamElement> expected = Arrays.asList( new StreamRecord<>(1, 0L), new StreamRecord<>(2, 0L), new StreamRecord<>(3, 1L), new StreamRecord... | /**
* Tests that the emitter outputs completed stream element queue entries.
*/ | Tests that the emitter outputs completed stream element queue entries | testEmitterWithOrderedQueue | {
"repo_name": "zimmermatt/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/async/EmitterTest.java",
"license": "apache-2.0",
"size": 6366
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.apache.flink.streaming.api.operators.Output",
"org.apache.flink.streaming.api.operators.async.queue.OrderedStreamElementQueue",
"org.apache.flink.streaming.api.operators.async.queue.StreamElementQueue",
"org.apache.flink.streaming.api.ope... | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.flink.streaming.api.operators.Output; import org.apache.flink.streaming.api.operators.async.queue.OrderedStreamElementQueue; import org.apache.flink.streaming.api.operators.async.queue.StreamElementQueue; import org.apache.fli... | import java.util.*; import org.apache.flink.streaming.api.operators.*; import org.apache.flink.streaming.api.operators.async.queue.*; import org.apache.flink.streaming.api.watermark.*; import org.apache.flink.streaming.runtime.streamrecord.*; import org.apache.flink.streaming.util.*; import org.junit.*; import org.mock... | [
"java.util",
"org.apache.flink",
"org.junit",
"org.mockito"
] | java.util; org.apache.flink; org.junit; org.mockito; | 201,088 |
@Test
void withAssertions_assertThat_iterator_Test() {
assertThat(Lists.list(ITEMS).iterator()).hasNext();
} | void withAssertions_assertThat_iterator_Test() { assertThat(Lists.list(ITEMS).iterator()).hasNext(); } | /**
* Test that the delegate method is called.
*/ | Test that the delegate method is called | withAssertions_assertThat_iterator_Test | {
"repo_name": "hazendaz/assertj-core",
"path": "src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java",
"license": "apache-2.0",
"size": 25178
} | [
"org.assertj.core.util.Lists",
"org.junit.jupiter.api.Test"
] | import org.assertj.core.util.Lists; import org.junit.jupiter.api.Test; | import org.assertj.core.util.*; import org.junit.jupiter.api.*; | [
"org.assertj.core",
"org.junit.jupiter"
] | org.assertj.core; org.junit.jupiter; | 1,576,409 |
private void setResubmissionProperties(Assignment a,
AssignmentSubmissionEdit edit) {
// get the assignment setting for resubmitting
ResourceProperties assignmentProperties = a.getProperties();
String assignmentAllowResubmitNumber = assignmentProperties.getProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER... | void function(Assignment a, AssignmentSubmissionEdit edit) { ResourceProperties assignmentProperties = a.getProperties(); String assignmentAllowResubmitNumber = assignmentProperties.getProperty(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER); if (assignmentAllowResubmitNumber != null) { edit.getPropertiesEdit().addProperty... | /**
* set the resubmission related properties in AssignmentSubmission object
* @param a
* @param edit
*/ | set the resubmission related properties in AssignmentSubmission object | setResubmissionProperties | {
"repo_name": "lorenamgUMU/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 677150
} | [
"org.sakaiproject.assignment.api.Assignment",
"org.sakaiproject.assignment.api.AssignmentSubmission",
"org.sakaiproject.assignment.api.AssignmentSubmissionEdit",
"org.sakaiproject.entity.api.ResourceProperties"
] | import org.sakaiproject.assignment.api.Assignment; import org.sakaiproject.assignment.api.AssignmentSubmission; import org.sakaiproject.assignment.api.AssignmentSubmissionEdit; import org.sakaiproject.entity.api.ResourceProperties; | import org.sakaiproject.assignment.api.*; import org.sakaiproject.entity.api.*; | [
"org.sakaiproject.assignment",
"org.sakaiproject.entity"
] | org.sakaiproject.assignment; org.sakaiproject.entity; | 868,577 |
public boolean fails(TestCase test) {
ContractChecker.setActive(false);
TestCaseExecutor executor = TestCaseExecutor.getInstance();
SingleContractChecker checker = new SingleContractChecker(this);
executor.addObserver(checker);
TestCaseExecutor.runTest(test);
executor.removeObserver(checker);
//Contrac... | boolean function(TestCase test) { ContractChecker.setActive(false); TestCaseExecutor executor = TestCaseExecutor.getInstance(); SingleContractChecker checker = new SingleContractChecker(this); executor.addObserver(checker); TestCaseExecutor.runTest(test); executor.removeObserver(checker); return !checker.isValid(); } | /**
* Run the test against this contract and determine whether it reports a
* failure
*
* @param test
* a {@link org.evosuite.testcase.TestCase} object.
* @return a boolean.
*/ | Run the test against this contract and determine whether it reports a failure | fails | {
"repo_name": "sefaakca/EvoSuite-Sefa",
"path": "client/src/main/java/org/evosuite/contracts/Contract.java",
"license": "lgpl-3.0",
"size": 6359
} | [
"org.evosuite.testcase.TestCase",
"org.evosuite.testcase.execution.TestCaseExecutor"
] | import org.evosuite.testcase.TestCase; import org.evosuite.testcase.execution.TestCaseExecutor; | import org.evosuite.testcase.*; import org.evosuite.testcase.execution.*; | [
"org.evosuite.testcase"
] | org.evosuite.testcase; | 2,086,234 |
public boolean shouldExecute()
{
EntityLivingBase var1 = this.attacker.getAttackTarget();
EntityLivingBase var2 = this.attacker.getAITarget();
Herd ourHerd = HerdCraft.herdCollectionObj.handleNearestHerdOrMakeNew(attacker, attackerEffectiveClass, 0, 0, 0, 0); //attackers never breed.
... | boolean function() { EntityLivingBase var1 = this.attacker.getAttackTarget(); EntityLivingBase var2 = this.attacker.getAITarget(); Herd ourHerd = HerdCraft.herdCollectionObj.handleNearestHerdOrMakeNew(attacker, attackerEffectiveClass, 0, 0, 0, 0); if (var1 == null && var2 == null && ourHerd.getEnemy() == null) { return... | /**
* Returns whether the EntityAIBase should begin execution.
*/ | Returns whether the EntityAIBase should begin execution | shouldExecute | {
"repo_name": "MinecraftModArchive/Herdcraft",
"path": "src/main/java/com/HerdCraft/entity/ai/EntityAIHerdAttackOnCollide.java",
"license": "unlicense",
"size": 5564
} | [
"net.minecraft.entity.EntityLivingBase"
] | import net.minecraft.entity.EntityLivingBase; | import net.minecraft.entity.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 338,713 |
public ValidationResult performDefaultChecks(MapRecord mapRecord) {
Map<Integer, List<MapEntry>> entryGroups = getEntryGroups(mapRecord);
final ValidationResult validationResult = new ValidationResultJpa();
// FATAL ERROR: map record has no entries
if (mapRecord.getMapEntries().size() == 0) {
... | ValidationResult function(MapRecord mapRecord) { Map<Integer, List<MapEntry>> entryGroups = getEntryGroups(mapRecord); final ValidationResult validationResult = new ValidationResultJpa(); if (mapRecord.getMapEntries().size() == 0) { validationResult.addError(STR); return validationResult; } if (!mapProject.isGroupStruc... | /**
* Perform validation checks that likely apply to all mappings. This is mostly
* structural stuff and not semantically tied to any particular map.
*
* @param mapRecord the map record
* @return the validation result
*/ | Perform validation checks that likely apply to all mappings. This is mostly structural stuff and not semantically tied to any particular map | performDefaultChecks | {
"repo_name": "WestCoastInformatics/OTF-Mapping-Service",
"path": "jpa-services/src/main/java/org/ihtsdo/otf/mapping/jpa/handlers/DefaultProjectSpecificAlgorithmHandler.java",
"license": "apache-2.0",
"size": 32294
} | [
"java.util.List",
"java.util.Map",
"org.ihtsdo.otf.mapping.helpers.ValidationResult",
"org.ihtsdo.otf.mapping.helpers.ValidationResultJpa",
"org.ihtsdo.otf.mapping.model.MapEntry",
"org.ihtsdo.otf.mapping.model.MapRecord"
] | import java.util.List; import java.util.Map; import org.ihtsdo.otf.mapping.helpers.ValidationResult; import org.ihtsdo.otf.mapping.helpers.ValidationResultJpa; import org.ihtsdo.otf.mapping.model.MapEntry; import org.ihtsdo.otf.mapping.model.MapRecord; | import java.util.*; import org.ihtsdo.otf.mapping.helpers.*; import org.ihtsdo.otf.mapping.model.*; | [
"java.util",
"org.ihtsdo.otf"
] | java.util; org.ihtsdo.otf; | 2,478,314 |
private void persistPaxosData(long segmentTxId,
PersistedRecoveryPaxosData newData) throws IOException {
File f = storage.getPaxosFile(segmentTxId);
boolean success = false;
AtomicFileOutputStream fos = new AtomicFileOutputStream(f);
try {
newData.writeDelimitedTo(fos);
fos.write('\n... | void function(long segmentTxId, PersistedRecoveryPaxosData newData) throws IOException { File f = storage.getPaxosFile(segmentTxId); boolean success = false; AtomicFileOutputStream fos = new AtomicFileOutputStream(f); try { newData.writeDelimitedTo(fos); fos.write('\n'); OutputStreamWriter writer = new OutputStreamWrit... | /**
* Persist data for recovering the given segment from disk.
*/ | Persist data for recovering the given segment from disk | persistPaxosData | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/Journal.java",
"license": "apache-2.0",
"size": 39557
} | [
"com.google.common.base.Charsets",
"java.io.File",
"java.io.IOException",
"java.io.OutputStreamWriter",
"org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos",
"org.apache.hadoop.hdfs.util.AtomicFileOutputStream",
"org.apache.hadoop.io.IOUtils"
] | import com.google.common.base.Charsets; import java.io.File; import java.io.IOException; import java.io.OutputStreamWriter; import org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocolProtos; import org.apache.hadoop.hdfs.util.AtomicFileOutputStream; import org.apache.hadoop.io.IOUtils; | import com.google.common.base.*; import java.io.*; import org.apache.hadoop.hdfs.qjournal.protocol.*; import org.apache.hadoop.hdfs.util.*; import org.apache.hadoop.io.*; | [
"com.google.common",
"java.io",
"org.apache.hadoop"
] | com.google.common; java.io; org.apache.hadoop; | 1,705,404 |
List<Site> getSitesAtNode(HttpServletRequest request, Session session, boolean includeMyWorksite);
| List<Site> getSitesAtNode(HttpServletRequest request, Session session, boolean includeMyWorksite); | /**
* Get a list of sites at the current node as defined by the request
* @param request
* @param session
* @param includeMyWorksite
* @return
*/ | Get a list of sites at the current node as defined by the request | getSitesAtNode | {
"repo_name": "harfalm/Sakai-10.1",
"path": "portal/portal-api/api/src/java/org/sakaiproject/portal/api/SiteNeighbourhoodService.java",
"license": "apache-2.0",
"size": 2391
} | [
"java.util.List",
"javax.servlet.http.HttpServletRequest",
"org.sakaiproject.site.api.Site",
"org.sakaiproject.tool.api.Session"
] | import java.util.List; import javax.servlet.http.HttpServletRequest; import org.sakaiproject.site.api.Site; import org.sakaiproject.tool.api.Session; | import java.util.*; import javax.servlet.http.*; import org.sakaiproject.site.api.*; import org.sakaiproject.tool.api.*; | [
"java.util",
"javax.servlet",
"org.sakaiproject.site",
"org.sakaiproject.tool"
] | java.util; javax.servlet; org.sakaiproject.site; org.sakaiproject.tool; | 262,143 |
public void process(final File inputFile, final File outputFile,
final boolean headers, final CSVFormat format) {
setInputFilename(inputFile);
setExpectInputHeaders(headers);
setInputFormat(format);
readInputFile();
sortData();
writeOutputFile(outputFile);
} | void function(final File inputFile, final File outputFile, final boolean headers, final CSVFormat format) { setInputFilename(inputFile); setExpectInputHeaders(headers); setInputFormat(format); readInputFile(); sortData(); writeOutputFile(outputFile); } | /**
* Process, and sort the files.
*
* @param inputFile
* The input file.
* @param outputFile
* The output file.
* @param headers
* True, if headers are to be used.
* @param format
* The format of the file.
*/ | Process, and sort the files | process | {
"repo_name": "krzysztof-magosa/encog-java-core",
"path": "src/main/java/org/encog/app/analyst/csv/sort/SortCSV.java",
"license": "apache-2.0",
"size": 4223
} | [
"java.io.File",
"org.encog.util.csv.CSVFormat"
] | import java.io.File; import org.encog.util.csv.CSVFormat; | import java.io.*; import org.encog.util.csv.*; | [
"java.io",
"org.encog.util"
] | java.io; org.encog.util; | 318,976 |
long ret = 0;
ret = mIOCTLJNIBridge.ioctlExecuteOperation(handle, operationCode);
if(ret < 0) {
throw new SerialComException("Could not exceute requested IOCTL operation. Please retry !");
}
return true;
} | long ret = 0; ret = mIOCTLJNIBridge.ioctlExecuteOperation(handle, operationCode); if(ret < 0) { throw new SerialComException(STR); } return true; } | /**
* <p>Executes the requested operation on the specified handle.</p>
*
* @param handle handle of the port on which to execute this ioctl operation.
* @param operationCode unique ioctl operation code (device/driver specific).
* @return true if operation executed successfully.
* @throws Se... | Executes the requested operation on the specified handle | ioctlExecuteOperation | {
"repo_name": "akuhtz/serial-communication-manager",
"path": "modules/ioctl/src/com/serialpundit/ioctl/SerialComIOCTLExecutor.java",
"license": "agpl-3.0",
"size": 10180
} | [
"com.serialpundit.core.SerialComException"
] | import com.serialpundit.core.SerialComException; | import com.serialpundit.core.*; | [
"com.serialpundit.core"
] | com.serialpundit.core; | 1,479,325 |
@Deprecated
public static IInventory getBaubles(EntityPlayer player)
{
IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null);
handler.setPlayer(player);
return new BaublesInventoryWrapper(handler, player);
}
| static IInventory function(EntityPlayer player) { IBaublesItemHandler handler = player.getCapability(BaublesCapabilities.CAPABILITY_BAUBLES, null); handler.setPlayer(player); return new BaublesInventoryWrapper(handler, player); } | /**
* Retrieves the baubles capability handler wrapped as a IInventory for the supplied player
*/ | Retrieves the baubles capability handler wrapped as a IInventory for the supplied player | getBaubles | {
"repo_name": "Yopu/OpenGrave",
"path": "src/api/java/baubles/api/BaublesApi.java",
"license": "mit",
"size": 1483
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.inventory.IInventory"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; | import net.minecraft.entity.player.*; import net.minecraft.inventory.*; | [
"net.minecraft.entity",
"net.minecraft.inventory"
] | net.minecraft.entity; net.minecraft.inventory; | 1,753,335 |
StreamConfig getConfig(Id.Stream streamId) throws IOException; | StreamConfig getConfig(Id.Stream streamId) throws IOException; | /**
* Returns the configuration of the given stream.
* @param streamId Id of the stream.
* @return A {@link StreamConfig} instance.
* @throws IOException If the stream doesn't exists.
*/ | Returns the configuration of the given stream | getConfig | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-data-fabric/src/main/java/co/cask/cdap/data2/transaction/stream/StreamAdmin.java",
"license": "apache-2.0",
"size": 5157
} | [
"co.cask.cdap.proto.Id",
"java.io.IOException"
] | import co.cask.cdap.proto.Id; import java.io.IOException; | import co.cask.cdap.proto.*; import java.io.*; | [
"co.cask.cdap",
"java.io"
] | co.cask.cdap; java.io; | 2,479,441 |
private void initGUI() {
frame = new JFrame();
label = new JLabel();
frame.getContentPane().add(label);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.addWindowListener(this);
frame.setVisible(true);
frame.setSize(width, height);
} | void function() { frame = new JFrame(); label = new JLabel(); frame.getContentPane().add(label); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.addWindowListener(this); frame.setVisible(true); frame.setSize(width, height); } | /**
* Creates the UI components and initialises them
*/ | Creates the UI components and initialises them | initGUI | {
"repo_name": "mailmindlin/v4l4j",
"path": "src/au/edu/jcu/v4l4j/examples/SimpleViewer.java",
"license": "gpl-3.0",
"size": 5208
} | [
"javax.swing.JFrame",
"javax.swing.JLabel"
] | import javax.swing.JFrame; import javax.swing.JLabel; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 315,474 |
@Generated
@Selector("chirality")
@NInt
public native long chirality(); | @Selector(STR) native long function(); | /**
* The chirality of the hand.
*/ | The chirality of the hand | chirality | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/vision/VNHumanHandPoseObservation.java",
"license": "apache-2.0",
"size": 6975
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,436,819 |
private VM mockVMFromDAO(Guid requestedUser) {
VM expectedVM = new VM();
VmDAO vmDaoMock = mock(VmDAO.class);
when(vmDaoMock.getAllForUserWithGroupsAndUserRoles(requestedUser)).thenReturn(Collections.singletonList(expectedVM));
when(getDbFacadeMockInstance().getVmDAO()).thenReturn(vm... | VM function(Guid requestedUser) { VM expectedVM = new VM(); VmDAO vmDaoMock = mock(VmDAO.class); when(vmDaoMock.getAllForUserWithGroupsAndUserRoles(requestedUser)).thenReturn(Collections.singletonList(expectedVM)); when(getDbFacadeMockInstance().getVmDAO()).thenReturn(vmDaoMock); mockStatic(VmHandler.class); doNothing(... | /**
* Mocks the DAOs to return a VM
* @param requestedUser The user on the parameter object to return the VM for
* @return The VM the mocked DAO will return
*/ | Mocks the DAOs to return a VM | mockVMFromDAO | {
"repo_name": "Dhandapani/gluster-ovirt",
"path": "backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetUserVmsByUserIdAndGroupsQueryTest.java",
"license": "apache-2.0",
"size": 7268
} | [
"java.util.Collections",
"org.mockito.Mockito",
"org.ovirt.engine.core.compat.Guid",
"org.ovirt.engine.core.dao.VmDAO",
"org.powermock.api.mockito.PowerMockito"
] | import java.util.Collections; import org.mockito.Mockito; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.dao.VmDAO; import org.powermock.api.mockito.PowerMockito; | import java.util.*; import org.mockito.*; import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.dao.*; import org.powermock.api.mockito.*; | [
"java.util",
"org.mockito",
"org.ovirt.engine",
"org.powermock.api"
] | java.util; org.mockito; org.ovirt.engine; org.powermock.api; | 2,439,399 |
boolean macAdded = false;
if (getMacPoolManager().IsMacInUse(iface.getMacAddress())) {
AuditLogableBase logable = new AuditLogableBase();
logable.AddCustomValue("MACAddr", iface.getMacAddress());
logable.AddCustomValue("VmName", iface.getVmName());
log(logable, Au... | boolean macAdded = false; if (getMacPoolManager().IsMacInUse(iface.getMacAddress())) { AuditLogableBase logable = new AuditLogableBase(); logable.AddCustomValue(STR, iface.getMacAddress()); logable.AddCustomValue(STR, iface.getVmName()); log(logable, AuditLogType.MAC_ADDRESS_IS_IN_USE); } else { macAdded = getMacPoolMa... | /**
* Add a {@link VmNetworkInterface} to the VM, trying to acquire a MAC from the {@link MacPoolManager}.<br>
* If the MAC is already in use, a warning will be sent to the user.
*
* @param iface
* The interface to save.
* @param compensationContext
* Used to sna... | Add a <code>VmNetworkInterface</code> to the VM, trying to acquire a MAC from the <code>MacPoolManager</code>. If the MAC is already in use, a warning will be sent to the user | add | {
"repo_name": "Dhandapani/gluster-ovirt",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java",
"license": "apache-2.0",
"size": 3570
} | [
"org.ovirt.engine.core.common.AuditLogType",
"org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase"
] | import org.ovirt.engine.core.common.AuditLogType; import org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase; | import org.ovirt.engine.core.common.*; import org.ovirt.engine.core.dal.dbbroker.auditloghandling.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 786,729 |
public static void createParallelGatewayElements(
ParallelGateway parallelGateway, AslanFileBuilder afb) {
final List<SequenceFlow> incoming = parallelGateway.getIncoming();
String rule = "step w_" + parallelGateway.getId();
if (incoming.size() > 0) {
// AND-jo... | static void function( ParallelGateway parallelGateway, AslanFileBuilder afb) { final List<SequenceFlow> incoming = parallelGateway.getIncoming(); String rule = STR + parallelGateway.getId(); if (incoming.size() > 0) { String ruleDef = STR; boolean firstDone = true; List<String> natVars = new ArrayList<String>(); for (S... | /**
* Generates the ASLan representation of the provided ParallelGateway
* element and sends the output to the provided AslanFileBuilder.
*
* @param parallelGateway
* The ParallelGateway for which the representation should be
* generated.
* @param afb
... | Generates the ASLan representation of the provided ParallelGateway element and sends the output to the provided AslanFileBuilder | createParallelGatewayElements | {
"repo_name": "adbrucker/SecureBPMN",
"path": "designer/src/eu.aniketos.securebpmn.export.aslan/src/main/java/eu/aniketos/securebpmn/export/aslan/export/ParallelGatewayExport.java",
"license": "apache-2.0",
"size": 4480
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.bpmn2.EndEvent",
"org.eclipse.bpmn2.FlowElement",
"org.eclipse.bpmn2.Gateway",
"org.eclipse.bpmn2.ParallelGateway",
"org.eclipse.bpmn2.SequenceFlow",
"org.eclipse.bpmn2.StartEvent",
"org.eclipse.bpmn2.Task"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.bpmn2.EndEvent; import org.eclipse.bpmn2.FlowElement; import org.eclipse.bpmn2.Gateway; import org.eclipse.bpmn2.ParallelGateway; import org.eclipse.bpmn2.SequenceFlow; import org.eclipse.bpmn2.StartEvent; import org.eclipse.bpmn2.Task; | import java.util.*; import org.eclipse.bpmn2.*; | [
"java.util",
"org.eclipse.bpmn2"
] | java.util; org.eclipse.bpmn2; | 974,980 |
public IdragClusterable[] getTrackedSelectables(){
return (IdragClusterable[])dragSelectables.toArray(new IdragClusterable[this.dragSelectables.size()]);
}
private class ClusteringContext{
private MTStencilPolygon polygon;
private Vector3D lastPosition;
private Vector3D n... | IdragClusterable[] function(){ return (IdragClusterable[])dragSelectables.toArray(new IdragClusterable[this.dragSelectables.size()]); } private class ClusteringContext{ private MTStencilPolygon polygon; private Vector3D lastPosition; private Vector3D newPosition; private InputCursor cursor; private ArrayList<IdragClust... | /**
* Gets the tracked selectables.
*
* @return the tracked selectables
*/ | Gets the tracked selectables | getTrackedSelectables | {
"repo_name": "rjmarsan/GestureSound",
"path": "src/org/mt4j/input/inputProcessors/componentProcessors/lassoProcessor/LassoProcessor.java",
"license": "gpl-2.0",
"size": 14927
} | [
"java.util.ArrayList",
"org.mt4j.components.visibleComponents.shapes.AbstractShape",
"org.mt4j.components.visibleComponents.shapes.MTStencilPolygon",
"org.mt4j.input.inputData.InputCursor",
"org.mt4j.input.inputProcessors.componentProcessors.dragProcessor.DragProcessor",
"org.mt4j.input.inputProcessors.co... | import java.util.ArrayList; import org.mt4j.components.visibleComponents.shapes.AbstractShape; import org.mt4j.components.visibleComponents.shapes.MTStencilPolygon; import org.mt4j.input.inputData.InputCursor; import org.mt4j.input.inputProcessors.componentProcessors.dragProcessor.DragProcessor; import org.mt4j.input.i... | import java.util.*; import org.mt4j.components.*; import org.mt4j.input.*; import org.mt4j.util.*; import org.mt4j.util.math.*; | [
"java.util",
"org.mt4j.components",
"org.mt4j.input",
"org.mt4j.util"
] | java.util; org.mt4j.components; org.mt4j.input; org.mt4j.util; | 2,089,587 |
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
super.onRemoteOperationFinish(operation, result);
if (operation instanceof RemoveFileOperation) {
onRemoveFileOperationFinish((RemoveFileOperation)operation, result);
... | void function(RemoteOperation operation, RemoteOperationResult result) { super.onRemoteOperationFinish(operation, result); if (operation instanceof RemoveFileOperation) { onRemoveFileOperationFinish((RemoveFileOperation)operation, result); } else if (operation instanceof RenameFileOperation) { onRenameFileOperationFini... | /**
* Updates the view associated to the activity after the finish of some operation over files
* in the current account.
*
* @param operation Removal operation performed.
* @param result Result of the removal.
*/ | Updates the view associated to the activity after the finish of some operation over files in the current account | onRemoteOperationFinish | {
"repo_name": "Barbu5177/android",
"path": "src/com/owncloud/android/ui/activity/FileDisplayActivity.java",
"license": "gpl-2.0",
"size": 79085
} | [
"com.owncloud.android.lib.common.operations.RemoteOperation",
"com.owncloud.android.lib.common.operations.RemoteOperationResult",
"com.owncloud.android.operations.CreateFolderOperation",
"com.owncloud.android.operations.CreateShareOperation",
"com.owncloud.android.operations.MoveFileOperation",
"com.owncl... | import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.operations.CreateFolderOperation; import com.owncloud.android.operations.CreateShareOperation; import com.owncloud.android.operations.MoveFileOperation;... | import com.owncloud.android.lib.common.operations.*; import com.owncloud.android.operations.*; | [
"com.owncloud.android"
] | com.owncloud.android; | 1,163,559 |
protected boolean hasGameFiles() {
File checkFile = new File(gamePath + "data/GEODATA/PALETTES.DAT");
if (checkFile.exists()) {
return true;
}
else {
return false;
}
}
| boolean function() { File checkFile = new File(gamePath + STR); if (checkFile.exists()) { return true; } else { return false; } } | /**
* Method that (crudely) checks if we have the game files.
* @return True if the game files are properly installed.
*/ | Method that (crudely) checks if we have the game files | hasGameFiles | {
"repo_name": "sfalexrog/OpenXcom",
"path": "android/src/org/libsdl/openxcom/PreloaderActivity.java",
"license": "gpl-3.0",
"size": 8006
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,490,169 |
@NotNull
Promise<T> processed(@NotNull Promise<? super T> child); | Promise<T> processed(@NotNull Promise<? super T> child); | /**
* Resolve or reject passed promise as soon as this promise is resolved or rejected.
*/ | Resolve or reject passed promise as soon as this promise is resolved or rejected | processed | {
"repo_name": "GunoH/intellij-community",
"path": "platform/core-api/src/org/jetbrains/concurrency/Promise.java",
"license": "apache-2.0",
"size": 4814
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,206,063 |
public void newPageBreak() throws IOException {
writeForBreak = true;
new RtfPageBreak(this, writer);
} | void function() throws IOException { writeForBreak = true; new RtfPageBreak(this, writer); } | /**
* add a page break
* @throws IOException for I/O problems
*/ | add a page break | newPageBreak | {
"repo_name": "pellcorp/fop",
"path": "src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfParagraph.java",
"license": "apache-2.0",
"size": 11547
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 917,691 |
int insertSelective(DBAggregates record); | int insertSelective(DBAggregates record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table aggregates
*
* @mbggenerated Tue May 26 15:53:09 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table aggregates | insertSelective | {
"repo_name": "wolabs/womano",
"path": "main/java/com/culabs/unicomportal/dao/DBAggregatesMapper.java",
"license": "apache-2.0",
"size": 1819
} | [
"com.culabs.unicomportal.model.db.DBAggregates"
] | import com.culabs.unicomportal.model.db.DBAggregates; | import com.culabs.unicomportal.model.db.*; | [
"com.culabs.unicomportal"
] | com.culabs.unicomportal; | 2,462,476 |
public static void deregister(final Locale locale) {
LocaleConvertUtilsBean.getInstance().deregister(locale);
} | static void function(final Locale locale) { LocaleConvertUtilsBean.getInstance().deregister(locale); } | /**
* <p>Remove any registered {@link LocaleConverter} for the specified locale.</p>
*
* <p>For more details see <code>LocaleConvertUtilsBean</code></p>
*
* @param locale The locale
* @see LocaleConvertUtilsBean#deregister(Locale)
*/ | Remove any registered <code>LocaleConverter</code> for the specified locale. For more details see <code>LocaleConvertUtilsBean</code> | deregister | {
"repo_name": "yippeesoft/NotifyTools",
"path": "beanutils/src/main/java/org/apache/commons/beanutils/locale/LocaleConvertUtils.java",
"license": "apache-2.0",
"size": 13330
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 574,468 |
public ObjectName[] getServiceNames() {
ObjectName onames[]=new ObjectName[ services.length ];
for( int i=0; i<services.length; i++ ) {
onames[i]=((StandardService)services[i]).getObjectName();
}
return onames;
}
| ObjectName[] function() { ObjectName onames[]=new ObjectName[ services.length ]; for( int i=0; i<services.length; i++ ) { onames[i]=((StandardService)services[i]).getObjectName(); } return onames; } | /**
* Return the JMX service names.
*/ | Return the JMX service names | getServiceNames | {
"repo_name": "pistolove/sourcecode4junit",
"path": "Source4Tomcat/src/org/apache/catalina/core/StandardServer.java",
"license": "apache-2.0",
"size": 26865
} | [
"javax.management.ObjectName"
] | import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,727,407 |
public void checkRequiredProperties(String... propNames) throws ProxyAuthException {
StringBuilder sb = new StringBuilder();
for (String propertyName : propNames) {
if (properties.get(propertyName) == null) {
sb.append(propertyName).append(' ');
}
}
... | void function(String... propNames) throws ProxyAuthException { StringBuilder sb = new StringBuilder(); for (String propertyName : propNames) { if (properties.get(propertyName) == null) { sb.append(propertyName).append(' '); } } if (sb.length() > 0) { sb.append(STR); throw new ProxyAuthException(sb.toString()); } } | /**
* Check if the given property(ies) is(are) set. Otherwise throws a
* {@link ProxyAuthException}.
*/ | Check if the given property(ies) is(are) set. Otherwise throws a <code>ProxyAuthException</code> | checkRequiredProperties | {
"repo_name": "sardine/mina-ja",
"path": "src/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java",
"license": "apache-2.0",
"size": 9277
} | [
"org.apache.mina.proxy.ProxyAuthException"
] | import org.apache.mina.proxy.ProxyAuthException; | import org.apache.mina.proxy.*; | [
"org.apache.mina"
] | org.apache.mina; | 1,169,216 |
private void checkHandle() {
if (m_hACL.isDisposed())
throw new NotesError(0, "Memory already freed");
NotesGC.__checkValidMemHandle(getClass(), getHandle());
} | void function() { if (m_hACL.isDisposed()) throw new NotesError(0, STR); NotesGC.__checkValidMemHandle(getClass(), getHandle()); } | /**
* Checks if the database is already recycled
*/ | Checks if the database is already recycled | checkHandle | {
"repo_name": "klehmann/domino-jna",
"path": "domino-jna/src/main/java/com/mindoo/domino/jna/NotesACL.java",
"license": "apache-2.0",
"size": 31430
} | [
"com.mindoo.domino.jna.errors.NotesError",
"com.mindoo.domino.jna.gc.NotesGC"
] | import com.mindoo.domino.jna.errors.NotesError; import com.mindoo.domino.jna.gc.NotesGC; | import com.mindoo.domino.jna.errors.*; import com.mindoo.domino.jna.gc.*; | [
"com.mindoo.domino"
] | com.mindoo.domino; | 2,478,458 |
Broadcaster.TYPE wipeType = Broadcaster.TYPE.getType(type);
EVENT wipeEvent = Broadcaster.EVENT.getEvent(event);
logger.info("wipe cache type: " + wipeType + " event:" + wipeEvent + " name:" + name);
switch (wipeEvent) {
case CREATE:
case UPDATE:
cacheServic... | Broadcaster.TYPE wipeType = Broadcaster.TYPE.getType(type); EVENT wipeEvent = Broadcaster.EVENT.getEvent(event); logger.info(STR + wipeType + STR + wipeEvent + STR + name); switch (wipeEvent) { case CREATE: case UPDATE: cacheService.rebuildCache(wipeType, name); cacheService.cleanDataCache(); break; case DROP: cacheSer... | /**
* Wipe system cache
*
* @param type {@link Broadcaster.TYPE}
* @param event {@link Broadcaster.EVENT}
* @param name
* @return if the action success
* @throws IOException
*/ | Wipe system cache | wipeCache | {
"repo_name": "lemire/incubator-kylin",
"path": "server/src/main/java/org/apache/kylin/rest/controller/CacheController.java",
"license": "apache-2.0",
"size": 3020
} | [
"org.apache.kylin.common.restclient.Broadcaster"
] | import org.apache.kylin.common.restclient.Broadcaster; | import org.apache.kylin.common.restclient.*; | [
"org.apache.kylin"
] | org.apache.kylin; | 365,494 |
public int evaluate(List<List<double[]>> testData){
int sum = 0;
for(List<double[]> data: testData){
double[] x = data.get(0);
double[] y = data.get(1);
double[] a = feedForward(x);
int num = maxIndex(y);
int check = maxIndex(a);
... | int function(List<List<double[]>> testData){ int sum = 0; for(List<double[]> data: testData){ double[] x = data.get(0); double[] y = data.get(1); double[] a = feedForward(x); int num = maxIndex(y); int check = maxIndex(a); if(num==check){ sum++; } } return sum; } | /**
* Evaluates all of the test data using feed forward and comparing that to the expected values included in the test
* data.
*
* @param testData A list of N samples, {input vector, output vector pairs}.
* @return The total number of samples that the network got correct. a number betwen 0 and ... | Evaluates all of the test data using feed forward and comparing that to the expected values included in the test data | evaluate | {
"repo_name": "odinsbane/TensorFlowScratch",
"path": "src/main/java/org/orangepalantir/Network.java",
"license": "bsd-3-clause",
"size": 15766
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,874,887 |
public static DateTime getTimeAsDateTime() {
return new DateTime(getTime(), Defaults.getTimeZone());
} | static DateTime function() { return new DateTime(getTime(), Defaults.getTimeZone()); } | /**
* Returns the {@link #getTime() time} as a Joda {@link DateTime},
* using the {@link Defaults#getTimeZone() timezone} as
* {@link Defaults#setTimeZone(org.joda.time.DateTimeZone) currently set}.
*/ | Returns the <code>#getTime() time</code> as a Joda <code>DateTime</code>, using the <code>Defaults#getTimeZone() timezone</code> as <code>Defaults#setTimeZone(org.joda.time.DateTimeZone) currently set</code> | getTimeAsDateTime | {
"repo_name": "howepeng/isis",
"path": "core/applib/src/main/java/org/apache/isis/applib/clock/Clock.java",
"license": "apache-2.0",
"size": 5600
} | [
"org.apache.isis.applib.Defaults",
"org.joda.time.DateTime"
] | import org.apache.isis.applib.Defaults; import org.joda.time.DateTime; | import org.apache.isis.applib.*; import org.joda.time.*; | [
"org.apache.isis",
"org.joda.time"
] | org.apache.isis; org.joda.time; | 1,201,530 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.