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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jTagsPanel = new javax.swing.JPanel();
jTagTablePanel = new org.jdesktop.swingx.JX... | @SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; jTagsPanel = new javax.swing.JPanel(); jTagTablePanel = new org.jdesktop.swingx.JXPanel(); infoPanel = new org.jdesktop.swingx.JXCollapsiblePane(); jXLabel1 = new org.jdesktop.swingx.JXLabel(); jScrollPane4 = new javax.swing.JScrol... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "Akeshihiro/dsworkbench",
"path": "Core/src/main/java/de/tor/tribes/ui/views/DSWorkbenchTagFrame.java",
"license": "apache-2.0",
"size": 33841
} | [
"java.awt.BorderLayout"
] | import java.awt.BorderLayout; | import java.awt.*; | [
"java.awt"
] | java.awt; | 426,396 |
public static void deleteCrash(User user, Long crashId) {
Crash crash = lookupCrashByUserAndId(user, crashId);
// FIXME: async deletion via taskomatic?
if (crash.getStoragePath() != null) {
File storageDir = new File(Config.get().getString("web.mount_point"),
... | static void function(User user, Long crashId) { Crash crash = lookupCrashByUserAndId(user, crashId); if (crash.getStoragePath() != null) { File storageDir = new File(Config.get().getString(STR), crash.getStoragePath()); for (CrashFile cf : crash.getCrashFiles()) { File crashFile = new File(storageDir, cf.getFilename())... | /**
* Delete a crash from database and filer.
* @param user User to check the permissions for.
* @param crashId The id of the crash to delete.
*/ | Delete a crash from database and filer | deleteCrash | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/system/CrashManager.java",
"license": "gpl-2.0",
"size": 4807
} | [
"com.redhat.rhn.common.conf.Config",
"com.redhat.rhn.domain.server.Crash",
"com.redhat.rhn.domain.server.CrashFactory",
"com.redhat.rhn.domain.server.CrashFile",
"com.redhat.rhn.domain.user.User",
"java.io.File"
] | import com.redhat.rhn.common.conf.Config; import com.redhat.rhn.domain.server.Crash; import com.redhat.rhn.domain.server.CrashFactory; import com.redhat.rhn.domain.server.CrashFile; import com.redhat.rhn.domain.user.User; import java.io.File; | import com.redhat.rhn.common.conf.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import java.io.*; | [
"com.redhat.rhn",
"java.io"
] | com.redhat.rhn; java.io; | 1,327,470 |
ServiceCall<Void> beginDeleteAsyncRelativeRetryNoStatusAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> beginDeleteAsyncRelativeRetryNoStatusAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thr... | Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status | beginDeleteAsyncRelativeRetryNoStatusAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java",
"license": "mit",
"size": 104951
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,216,154 |
@Test
public void testSelect() {
assertAndLog("$('div').select();",
jsStatement.chain(EventsHelper.select()).render());
}
/**
* Test method for
* {@link org.odlabs.wiquery.core.javascript.helper.EventsHelper#select(org.odlabs.wiquery.core.javascript.JsScope)} | void function() { assertAndLog(STR, jsStatement.chain(EventsHelper.select()).render()); } /** * Test method for * {@link org.odlabs.wiquery.core.javascript.helper.EventsHelper#select(org.odlabs.wiquery.core.javascript.JsScope)} | /**
* Test method for
* {@link org.odlabs.wiquery.core.javascript.helper.EventsHelper#select()}.
*/ | Test method for <code>org.odlabs.wiquery.core.javascript.helper.EventsHelper#select()</code> | testSelect | {
"repo_name": "openengsb-attic/forks-org.odlabs.wiquery",
"path": "src/test/java/org/odlabs/wiquery/core/javascript/helper/EventsHelperTestCase.java",
"license": "mit",
"size": 18755
} | [
"org.junit.Test",
"org.odlabs.wiquery.core.javascript.JsScope"
] | import org.junit.Test; import org.odlabs.wiquery.core.javascript.JsScope; | import org.junit.*; import org.odlabs.wiquery.core.javascript.*; | [
"org.junit",
"org.odlabs.wiquery"
] | org.junit; org.odlabs.wiquery; | 447,215 |
@Message(id = Message.NONE, value = "Added user '%s' with groups %s to file '%s'")
String addedGroups(String username, String groups, String fileName); | @Message(id = Message.NONE, value = STR) String addedGroups(String username, String groups, String fileName); | /**
* Message to inform user that the new user has been added to the groups file identified.
*
* @param username - The new username.
* @param groups - The new groups.
* @param fileName - The file the user has been added to.
*
* @return a {@link String} for the message.
*/ | Message to inform user that the new user has been added to the groups file identified | addedGroups | {
"repo_name": "luck3y/wildfly-core",
"path": "domain-management/src/main/java/org/jboss/as/domain/management/logging/DomainManagementLogger.java",
"license": "lgpl-2.1",
"size": 66410
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 707,536 |
public Observable<ServiceResponse<Void>> putEmptyWithServiceResponseAsync(DictionaryWrapper complexBody) {
if (complexBody == null) {
throw new IllegalArgumentException("Parameter complexBody is required and cannot be null.");
} | Observable<ServiceResponse<Void>> function(DictionaryWrapper complexBody) { if (complexBody == null) { throw new IllegalArgumentException(STR); } | /**
* Put complex types with dictionary property which is empty.
*
* @param complexBody Please put an empty dictionary
* @return the {@link ServiceResponse} object if successful.
*/ | Put complex types with dictionary property which is empty | putEmptyWithServiceResponseAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodycomplex/implementation/DictionarysImpl.java",
"license": "mit",
"size": 20041
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 224,981 |
protected void enterProductions(Token node) throws ParseException {
} | void function(Token node) throws ParseException { } | /**
* Called when entering a parse tree node.
*
* @param node the node being entered
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when entering a parse tree node | enterProductions | {
"repo_name": "runner-mei/mibble",
"path": "src/main/java/net/percederberg/grammatica/GrammarAnalyzer.java",
"license": "gpl-2.0",
"size": 36326
} | [
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Token"
] | import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Token; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 2,618,256 |
public void deserialize(ByteBuf buf) {
// User settings
setActive(buf.readBoolean());
setInductorEngaged(buf.readBoolean(), false);
setVentStatus(s_VentStatuses[buf.readInt()], false);
setMaxIntakeRate(buf.readInt());
// Basic data
setEnergyStored(buf.readFloat());
setRotorEnergy(buf.readFloat());... | void function(ByteBuf buf) { setActive(buf.readBoolean()); setInductorEngaged(buf.readBoolean(), false); setVentStatus(s_VentStatuses[buf.readInt()], false); setMaxIntakeRate(buf.readInt()); setEnergyStored(buf.readFloat()); setRotorEnergy(buf.readFloat()); energyGeneratedLastTick = buf.readFloat(); fluidConsumedLastTi... | /**
* Used when a status packet arrives on the client.
* @param buf ByteBuf containing serialized turbine data
*/ | Used when a status packet arrives on the client | deserialize | {
"repo_name": "erogenousbeef/BigReactors",
"path": "src/main/java/erogenousbeef/bigreactors/common/multiblock/MultiblockTurbine.java",
"license": "mit",
"size": 40143
} | [
"io.netty.buffer.ByteBuf",
"net.minecraftforge.fluids.Fluid",
"net.minecraftforge.fluids.FluidRegistry",
"net.minecraftforge.fluids.FluidStack"
] | import io.netty.buffer.ByteBuf; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; | import io.netty.buffer.*; import net.minecraftforge.fluids.*; | [
"io.netty.buffer",
"net.minecraftforge.fluids"
] | io.netty.buffer; net.minecraftforge.fluids; | 2,417,972 |
public void testupdateByRearrangeNodes() throws Exception {
String testName = "updateByRearrangeNodes";
if (logger.isInfoEnabled()) {
logger.info("\n\t\tRunning Test: " + testName);
}
// 1. find a tree:
PhyloTree tree = (PhyloTree) loadObject(PhyloTree.class);
//PhyloTree tree = (PhyloTree) l... | void function() throws Exception { String testName = STR; if (logger.isInfoEnabled()) { logger.info(STR + testName); } PhyloTree tree = (PhyloTree) loadObject(PhyloTree.class); String newick = tree.getNewickString(); Long id = tree.getId(); logger.info(STR + id + "\n" + newick); getFixture().updateByRearrangeNodes(id, ... | /**
* Test updateByRearrangeNodes
*/ | Test updateByRearrangeNodes | testupdateByRearrangeNodes | {
"repo_name": "TreeBASE/treebasetest",
"path": "treebase-core/src/test/java/org/cipres/treebase/service/tree/PhyloTreeServiceImplTest.java",
"license": "bsd-3-clause",
"size": 4998
} | [
"org.cipres.treebase.domain.tree.PhyloTree"
] | import org.cipres.treebase.domain.tree.PhyloTree; | import org.cipres.treebase.domain.tree.*; | [
"org.cipres.treebase"
] | org.cipres.treebase; | 1,362,040 |
public List<String> getCallResults(String issueId, String contactId) {
contactId = sanitizeContactId(contactId);
Cursor c = getReadableDatabase().rawQuery("SELECT " + CallsColumns.RESULT + " FROM " +
CALLS_TABLE_NAME + " WHERE " + CallsColumns.ISSUE_ID + " = ? AND " +
... | List<String> function(String issueId, String contactId) { contactId = sanitizeContactId(contactId); Cursor c = getReadableDatabase().rawQuery(STR + CallsColumns.RESULT + STR + CALLS_TABLE_NAME + STR + CallsColumns.ISSUE_ID + STR + CallsColumns.CONTACT_ID + STR + CallsColumns.RESULT, new String[] {issueId, contactId}); ... | /**
* The types of calls made for a particular issue and contact.
* @param issueId
* @param contactId
* @return A list of the call results for this issue and contact.
*/ | The types of calls made for a particular issue and contact | getCallResults | {
"repo_name": "5calls/android",
"path": "5calls/app/src/main/java/org/a5calls/android/a5calls/model/DatabaseHelper.java",
"license": "mit",
"size": 13134
} | [
"android.database.Cursor",
"java.util.ArrayList",
"java.util.List"
] | import android.database.Cursor; import java.util.ArrayList; import java.util.List; | import android.database.*; import java.util.*; | [
"android.database",
"java.util"
] | android.database; java.util; | 1,427,049 |
private void processForEnd() {
byte eventProc = slaCalc.getEventProcessed();
LOG.debug("Job {0} has ended. endtime = [{1}]", slaCalc.getId(), slaCalc.getActualEnd());
if (isEndMiss()) {
slaCalc.setSLAStatus(SLAStatus.MISS);
}
else {
slaCalc.setSLAStat... | void function() { byte eventProc = slaCalc.getEventProcessed(); LOG.debug(STR, slaCalc.getId(), slaCalc.getActualEnd()); if (isEndMiss()) { slaCalc.setSLAStatus(SLAStatus.MISS); } else { slaCalc.setSLAStatus(SLAStatus.MET); } if (eventProc != 8 && slaCalc.getActualStart() != null) { if ((eventProc & 1) == 0) { if (slaC... | /**
* Process for end.
*/ | Process for end | processForEnd | {
"repo_name": "cbaenziger/oozie",
"path": "core/src/main/java/org/apache/oozie/command/sla/SLAJobEventXCommand.java",
"license": "apache-2.0",
"size": 10161
} | [
"org.apache.oozie.client.event.SLAEvent",
"org.apache.oozie.sla.SLACalcStatus"
] | import org.apache.oozie.client.event.SLAEvent; import org.apache.oozie.sla.SLACalcStatus; | import org.apache.oozie.client.event.*; import org.apache.oozie.sla.*; | [
"org.apache.oozie"
] | org.apache.oozie; | 442,603 |
private int processReceipt(SDataCfd cfd, double dSubsidy, double dTax, final int nAction) {
boolean annuled = false;
try {
double dXmlSubsidy = this.getSubsidyFromXml(cfd.getDocXml());
double dXmlTax = this.getTaxFromXml(cfd.getDocXml());
int iValid =... | int function(SDataCfd cfd, double dSubsidy, double dTax, final int nAction) { boolean annuled = false; try { double dXmlSubsidy = this.getSubsidyFromXml(cfd.getDocXml()); double dXmlTax = this.getTaxFromXml(cfd.getDocXml()); int iValid = this.validateSubsidyAndTax(dSubsidy, dTax, dXmlSubsidy, dXmlTax); if (iValid == ER... | /**
* annul and issue the cfd
*
* @param cfd
* @param dSubsidy in file
* @param dTax in file
*
* @return integer:
SUCCESS if the cfd was annuled and issued
ANNULED if the process only was annuled but not issued
ERROR
*/ | annul and issue the cfd | processReceipt | {
"repo_name": "swaplicado/siie32",
"path": "src/erp/mod/hrs/utils/SReceiptsR.java",
"license": "mit",
"size": 29177
} | [
"java.util.Date",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.util.Date; import java.util.logging.Level; import java.util.logging.Logger; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 1,444,770 |
public synchronized DefaultExtractorsFactory setTsExtractorMode(@TsExtractor.Mode int mode) {
tsMode = mode;
return this;
} | synchronized DefaultExtractorsFactory function(@TsExtractor.Mode int mode) { tsMode = mode; return this; } | /**
* Sets the mode for {@link TsExtractor} instances created by the factory.
*
* @see TsExtractor#TsExtractor(int, TimestampAdjuster, TsPayloadReader.Factory)
* @param mode The mode to use.
* @return The factory, for convenience.
*/ | Sets the mode for <code>TsExtractor</code> instances created by the factory | setTsExtractorMode | {
"repo_name": "DrKLO/Telegram",
"path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.java",
"license": "gpl-2.0",
"size": 10081
} | [
"com.google.android.exoplayer2.extractor.ts.TsExtractor"
] | import com.google.android.exoplayer2.extractor.ts.TsExtractor; | import com.google.android.exoplayer2.extractor.ts.*; | [
"com.google.android"
] | com.google.android; | 2,689,105 |
public boolean save(@NonNull final OptionalUpdate optionalUpdate) {
if (StringUtils.isBlank(optionalUpdate.getOptionalVersion())) {
return false;
}
return prefs.edit().putString(KEY_OPTIONAL_UPDATE, optionalUpdate.getOptionalVersion()).commit();
} | boolean function(@NonNull final OptionalUpdate optionalUpdate) { if (StringUtils.isBlank(optionalUpdate.getOptionalVersion())) { return false; } return prefs.edit().putString(KEY_OPTIONAL_UPDATE, optionalUpdate.getOptionalVersion()).commit(); } | /**
* Saves the provided {@link OptionalUpdate} to shared preferences.
*
* @param optionalUpdate the provided current optional update information
* @return {@code true} if {@code optionalUpdate} was successfully saved
*/ | Saves the provided <code>OptionalUpdate</code> to shared preferences | save | {
"repo_name": "btkelly/gandalf",
"path": "gandalf/src/main/java/io/github/btkelly/gandalf/checker/DefaultHistoryChecker.java",
"license": "apache-2.0",
"size": 3582
} | [
"androidx.annotation.NonNull",
"io.github.btkelly.gandalf.models.OptionalUpdate",
"io.github.btkelly.gandalf.utils.StringUtils"
] | import androidx.annotation.NonNull; import io.github.btkelly.gandalf.models.OptionalUpdate; import io.github.btkelly.gandalf.utils.StringUtils; | import androidx.annotation.*; import io.github.btkelly.gandalf.models.*; import io.github.btkelly.gandalf.utils.*; | [
"androidx.annotation",
"io.github.btkelly"
] | androidx.annotation; io.github.btkelly; | 1,557,349 |
public static Collection<ClusterNode> aliveRemoteServerNodesWithCaches(final GridCacheSharedContext ctx,
AffinityTopologyVersion topOrder) {
return ctx.discovery().aliveRemoteServerNodesWithCaches(topOrder);
} | static Collection<ClusterNode> function(final GridCacheSharedContext ctx, AffinityTopologyVersion topOrder) { return ctx.discovery().aliveRemoteServerNodesWithCaches(topOrder); } | /**
* Gets alive remote nodes with at least one cache configured.
*
* @param ctx Cache context.
* @param topOrder Maximum allowed node order.
* @return Affinity nodes.
*/ | Gets alive remote nodes with at least one cache configured | aliveRemoteServerNodesWithCaches | {
"repo_name": "DoudTechData/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java",
"license": "apache-2.0",
"size": 59639
} | [
"java.util.Collection",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion"
] | import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; | import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 50,061 |
private void addDummiesAndEdges(ICrossMinimizerGraph graph) {
int dummyCtr = 0;
Set<ISugiyamaEdge> edges = graph.getEdgeSet();
Set<ISugiyamaEdge> replacedEdges = new HashSet<>();
for(ISugiyamaEdge edge : edges){
ISugiyamaVertex source = edge.getSource();
ISugiyamaVertex target = edge.getTarget();
... | void function(ICrossMinimizerGraph graph) { int dummyCtr = 0; Set<ISugiyamaEdge> edges = graph.getEdgeSet(); Set<ISugiyamaEdge> replacedEdges = new HashSet<>(); for(ISugiyamaEdge edge : edges){ ISugiyamaVertex source = edge.getSource(); ISugiyamaVertex target = edge.getTarget(); if (Objects.equals(source.getID(), targe... | /**
* This method adds dummy vertices between the two vertices of an edge, on every layer that this edge skips.
* the dummy vertices are connected through supplement edges with each other and the source and target vertex of the edge.
*
* @param graph input graph to add dummy vertices and supplement edges to
... | This method adds dummy vertices between the two vertices of an edge, on every layer that this edge skips. the dummy vertices are connected through supplement edges with each other and the source and target vertex of the edge | addDummiesAndEdges | {
"repo_name": "HiWiGAns/GraphVonAnsicht",
"path": "plugins/sugiyama/src/main/java/edu/kit/student/sugiyama/steps/CrossMinimizer.java",
"license": "lgpl-3.0",
"size": 14378
} | [
"edu.kit.student.sugiyama.graph.ICrossMinimizerGraph",
"edu.kit.student.sugiyama.graph.ISugiyamaEdge",
"edu.kit.student.sugiyama.graph.ISugiyamaVertex",
"java.util.HashSet",
"java.util.LinkedList",
"java.util.List",
"java.util.Objects",
"java.util.Set"
] | import edu.kit.student.sugiyama.graph.ICrossMinimizerGraph; import edu.kit.student.sugiyama.graph.ISugiyamaEdge; import edu.kit.student.sugiyama.graph.ISugiyamaVertex; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.Set; | import edu.kit.student.sugiyama.graph.*; import java.util.*; | [
"edu.kit.student",
"java.util"
] | edu.kit.student; java.util; | 1,996,721 |
public static nonBroadcastIndFlagType fromPerAligned(byte[] encodedBytes) {
nonBroadcastIndFlagType result = new nonBroadcastIndFlagType();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static nonBroadcastIndFlagType function(byte[] encodedBytes) { nonBroadcastIndFlagType result = new nonBroadcastIndFlagType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new nonBroadcastIndFlagType from encoded stream.
*/ | Creates a new nonBroadcastIndFlagType from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components_ver12/GANSSNavModel.java",
"license": "apache-2.0",
"size": 10343
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 2,040,754 |
public void enableEvents()
{
m_eventsEnabled = true;
}
private Object[] m_array = new Object[AssignmentField.MAX_VALUE];
private boolean m_eventsEnabled = true;
private TimephasedWorkData m_timephasedWork;
private List<TimephasedCost> m_timephasedCost;
private TimephasedWorkData m_... | void function() { m_eventsEnabled = true; } private Object[] m_array = new Object[AssignmentField.MAX_VALUE]; private boolean m_eventsEnabled = true; private TimephasedWorkData m_timephasedWork; private List<TimephasedCost> m_timephasedCost; private TimephasedWorkData m_timephasedActualWork; private List<TimephasedCost... | /**
* Enable events firing when fields are updated. This is the default state.
*/ | Enable events firing when fields are updated. This is the default state | enableEvents | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/ResourceAssignment.java",
"license": "lgpl-2.1",
"size": 94335
} | [
"java.util.List",
"net.sf.mpxj.listener.FieldListener"
] | import java.util.List; import net.sf.mpxj.listener.FieldListener; | import java.util.*; import net.sf.mpxj.listener.*; | [
"java.util",
"net.sf.mpxj"
] | java.util; net.sf.mpxj; | 2,591,900 |
public static ColorUIResource getControlHighlight() {
return metalTheme.getControlHighlight();
} | static ColorUIResource function() { return metalTheme.getControlHighlight(); } | /**
* Return control highlight color
* @return ColorUIResource color
*/ | Return control highlight color | getControlHighlight | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/swing/src/main/java/common/javax/swing/plaf/metal/MetalLookAndFeel.java",
"license": "apache-2.0",
"size": 80984
} | [
"javax.swing.plaf.ColorUIResource"
] | import javax.swing.plaf.ColorUIResource; | import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 1,744,521 |
//name, description etc, are now covered under {@link com.chrisdoyle.validation.tests.Test_Issues_23_27#checkPomNameDescriptionUrlLicenseEtcAreDefined}
String[] search = new String[]{
//compile
"<dependency>\\s*<groupId>org.apache.commons</groupId>\\s*<artifactId>commons-lang3... | String[] search = new String[]{ STR, STR , STR }; for (int i = 0; i < Main.allPoms.length; i++) { if (Main.allPoms[i].contains(STR)) { File f = new File(Main.allPoms[i]); String str = FileUtils.readFileToString(f, "utf-8"); for (int k = 0; k < search.length; k++) { Pattern p = Pattern.compile(search[k]); Matcher matche... | /**
* this test is commented out because gradle is inconsistent with provided/compile only dependencies
* it's only supported with certain versions and on certain versions of the android plugin
* @throws Exception
*/ | this test is commented out because gradle is inconsistent with provided/compile only dependencies it's only supported with certain versions and on certain versions of the android plugin | pomScopeDependency | {
"repo_name": "gradle-fury/gradle-fury",
"path": "gradle-fury-validation/src/main/java/com/chrisdoyle/validation/tests/Test_Issue46.java",
"license": "apache-2.0",
"size": 2232
} | [
"com.chrisdoyle.validation.Main",
"java.io.File",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.apache.commons.io.FileUtils",
"org.junit.Assert"
] | import com.chrisdoyle.validation.Main; import java.io.File; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.io.FileUtils; import org.junit.Assert; | import com.chrisdoyle.validation.*; import java.io.*; import java.util.regex.*; import org.apache.commons.io.*; import org.junit.*; | [
"com.chrisdoyle.validation",
"java.io",
"java.util",
"org.apache.commons",
"org.junit"
] | com.chrisdoyle.validation; java.io; java.util; org.apache.commons; org.junit; | 1,165,441 |
@Nullable
public static Geocache loadCache(final String geocode, final EnumSet<LoadFlag> loadFlags) {
if (StringUtils.isBlank(geocode)) {
throw new IllegalArgumentException("geocode must not be empty");
}
final Set<Geocache> caches = loadCaches(Collections.singleton(geocode)... | static Geocache function(final String geocode, final EnumSet<LoadFlag> loadFlags) { if (StringUtils.isBlank(geocode)) { throw new IllegalArgumentException(STR); } final Set<Geocache> caches = loadCaches(Collections.singleton(geocode), loadFlags); return caches.isEmpty() ? null : caches.iterator().next(); } | /**
* Load a single Cache.
*
* @param geocode
* The Geocode GCXXXX
* @return the loaded cache (if found). Can be null
*/ | Load a single Cache | loadCache | {
"repo_name": "lewurm/cgeo",
"path": "main/src/cgeo/geocaching/DataStore.java",
"license": "apache-2.0",
"size": 128597
} | [
"java.util.Collections",
"java.util.EnumSet",
"java.util.Set",
"org.apache.commons.lang3.StringUtils"
] | import java.util.Collections; import java.util.EnumSet; import java.util.Set; import org.apache.commons.lang3.StringUtils; | import java.util.*; import org.apache.commons.lang3.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,713,169 |
protected Object createDirMBean(String groupName,
String groupOid, ObjectName groupObjname, MBeanServer server) {
// Note that when using standard metadata,
// the returned object must implement the "DirMBean"
// interface.
//
if (server != null)
... | Object function(String groupName, String groupOid, ObjectName groupObjname, MBeanServer server) { return new Dir(this,server); else return new Dir(this); } | /**
* Factory method for "Dir" group MBean.
*
* You can redefine this method if you need to replace the default
* generated MBean class with your own customized class.
*
* @param groupName Name of the group ("Dir")
* @param groupOid OID of this group
* @param groupObjname Obje... | Factory method for "Dir" group MBean. You can redefine this method if you need to replace the default generated MBean class with your own customized class | createDirMBean | {
"repo_name": "jswrenn/xtreemfs",
"path": "java/servers/src/org/xtreemfs/common/monitoring/generatedcode/XTREEMFS_MIB.java",
"license": "bsd-3-clause",
"size": 17586
} | [
"javax.management.MBeanServer",
"javax.management.ObjectName"
] | import javax.management.MBeanServer; import javax.management.ObjectName; | import javax.management.*; | [
"javax.management"
] | javax.management; | 1,107,165 |
@Test
public void fetchesInstallScript() throws Exception {
final Profile profile = new Profile.Fixed(
new XMLDocument(
Joiner.on(' ').join(
"<p><entry key='f'><entry key='script'>hi</entry></entry>",
"<entry key='install'><item>one</it... | void function() throws Exception { final Profile profile = new Profile.Fixed( new XMLDocument( Joiner.on(' ').join( STR, STR, STR ) ) ); MatcherAssert.assertThat( new DockerRun(profile, STR).script(), Matchers.equalTo(STR) ); } | /**
* DockerRun can fetch script.
* @throws Exception In case of error.
* @since 1.22
*/ | DockerRun can fetch script | fetchesInstallScript | {
"repo_name": "dalifreire/rultor",
"path": "src/test/java/com/rultor/agents/req/DockerRunTest.java",
"license": "bsd-3-clause",
"size": 10190
} | [
"com.google.common.base.Joiner",
"com.jcabi.xml.XMLDocument",
"com.rultor.spi.Profile",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import com.google.common.base.Joiner; import com.jcabi.xml.XMLDocument; import com.rultor.spi.Profile; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import com.google.common.base.*; import com.jcabi.xml.*; import com.rultor.spi.*; import org.hamcrest.*; | [
"com.google.common",
"com.jcabi.xml",
"com.rultor.spi",
"org.hamcrest"
] | com.google.common; com.jcabi.xml; com.rultor.spi; org.hamcrest; | 888,965 |
public void testGetPricipalStudyInvestigator1() {
StudyOrganization organization = registerMockFor(StudyOrganization.class);
StudyInvestigator studyInv = registerMockFor(StudyInvestigator.class);
List<StudyInvestigator> studyInvs = new ArrayList<StudyInvestigator>();
studyInvs.add(studyInv);
EasyMoc... | void function() { StudyOrganization organization = registerMockFor(StudyOrganization.class); StudyInvestigator studyInv = registerMockFor(StudyInvestigator.class); List<StudyInvestigator> studyInvs = new ArrayList<StudyInvestigator>(); studyInvs.add(studyInv); EasyMock.expect(organization.getStudyInvestigators()).andRe... | /**
* test get principal study investigator
*/ | test get principal study investigator | testGetPricipalStudyInvestigator1 | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudyTestCase.java",
"license": "bsd-3-clause",
"size": 75546
} | [
"java.util.ArrayList",
"java.util.List",
"org.easymock.classextension.EasyMock"
] | import java.util.ArrayList; import java.util.List; import org.easymock.classextension.EasyMock; | import java.util.*; import org.easymock.classextension.*; | [
"java.util",
"org.easymock.classextension"
] | java.util; org.easymock.classextension; | 36,044 |
@Test
public void testTitleComparison() {
mPref1.setTitle("value 1");
assertFalse("Compare non-null to null",
mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2));
assertFalse("Compare null to non-null",
mComparisonCallback.arePreferenceConte... | void function() { mPref1.setTitle(STR); assertFalse(STR, mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2)); assertFalse(STR, mComparisonCallback.arePreferenceContentsTheSame(mPref2, mPref1)); mPref2.setTitle(STR); assertTrue(STR, mComparisonCallback.arePreferenceContentsTheSame(mPref1, mPref2)); mPref2.... | /**
* Title differences should be detected
*/ | Title differences should be detected | testTitleComparison | {
"repo_name": "AndroidX/androidx",
"path": "preference/preference/src/androidTest/java/androidx/preference/tests/PreferenceComparisonCallbackTest.java",
"license": "apache-2.0",
"size": 9806
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 657,862 |
private void writeTokenType(XMLStreamWriter writer, URI uri) throws ProcessingException
{
StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE);
StaxUtil.writeCharacters(writer, uri.toASCIIString());
StaxUtil.writeEndElement(writer);
} | void function(XMLStreamWriter writer, URI uri) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.TOKEN_TYPE, BASE_NAMESPACE); StaxUtil.writeCharacters(writer, uri.toASCIIString()); StaxUtil.writeEndElement(writer); } | /**
* Write Token Type
* @param writer
* @param uri
* @throws ProcessingException
*/ | Write Token Type | writeTokenType | {
"repo_name": "taylor-project/taylor-picketlink-2.0.3",
"path": "federation/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/writers/WSTrustRSTWriter.java",
"license": "gpl-2.0",
"size": 18854
} | [
"javax.xml.stream.XMLStreamWriter",
"org.picketlink.identity.federation.core.exceptions.ProcessingException",
"org.picketlink.identity.federation.core.util.StaxUtil",
"org.picketlink.identity.federation.core.wstrust.WSTrustConstants"
] | import javax.xml.stream.XMLStreamWriter; import org.picketlink.identity.federation.core.exceptions.ProcessingException; import org.picketlink.identity.federation.core.util.StaxUtil; import org.picketlink.identity.federation.core.wstrust.WSTrustConstants; | import javax.xml.stream.*; import org.picketlink.identity.federation.core.exceptions.*; import org.picketlink.identity.federation.core.util.*; import org.picketlink.identity.federation.core.wstrust.*; | [
"javax.xml",
"org.picketlink.identity"
] | javax.xml; org.picketlink.identity; | 2,037,687 |
void visualizeSpecialBlock(SpecialBlock sbb); | void visualizeSpecialBlock(SpecialBlock sbb); | /**
* Visualize a SpecialBlock.
*
* @param sbb the special block
*/ | Visualize a SpecialBlock | visualizeSpecialBlock | {
"repo_name": "damienmg/bazel",
"path": "third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/CFGVisualizer.java",
"license": "apache-2.0",
"size": 6202
} | [
"org.checkerframework.dataflow.cfg.block.SpecialBlock"
] | import org.checkerframework.dataflow.cfg.block.SpecialBlock; | import org.checkerframework.dataflow.cfg.block.*; | [
"org.checkerframework.dataflow"
] | org.checkerframework.dataflow; | 961,540 |
@Override public void exitFunctionDeclaration(@NotNull BigDataScriptParser.FunctionDeclarationContext ctx) { } | @Override public void exitFunctionDeclaration(@NotNull BigDataScriptParser.FunctionDeclarationContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterFunctionDeclaration | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptBaseListener.java",
"license": "apache-2.0",
"size": 36363
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 449,971 |
static public ResultsContainer importThisControlFile(final String fName, final java.io.InputStream is)
{
// create the new handler
final ASSETReaderWriter xr = new ASSETReaderWriter();
final Vector<ResultsContainer> resultsHolder = new Vector<ResultsContainer>(0, 1);
| static ResultsContainer function(final String fName, final java.io.InputStream is) { final ASSETReaderWriter xr = new ASSETReaderWriter(); final Vector<ResultsContainer> resultsHolder = new Vector<ResultsContainer>(0, 1); | /**
* handle the import of XML data, creating a new session for it
*
* @param fName
* the filename to read from (largely ignored)
* @param is
* an input stream to read from
* @return the output directory to write, if applicable
*/ | handle the import of XML data, creating a new session for it | importThisControlFile | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.asset.legacy/src/ASSET/Util/XML/ASSETReaderWriter.java",
"license": "epl-1.0",
"size": 15975
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 347,637 |
@SuppressWarnings( "unchecked" )
@Override
@Transactional( propagation = Propagation.REQUIRED, isolation = Isolation.READ_UNCOMMITTED )
public DAOResponse< Tab > getTabBySearchParams( SearchOption searchOption, RequestParams requestParams ) {
String location = this.getClass( ).getCanonicalName(... | @SuppressWarnings( STR ) @Transactional( propagation = Propagation.REQUIRED, isolation = Isolation.READ_UNCOMMITTED ) DAOResponse< Tab > function( SearchOption searchOption, RequestParams requestParams ) { String location = this.getClass( ).getCanonicalName( ) + STR; List< Tab > tabList = new ArrayList<>( ); logger.deb... | /**
* Gets tab by search params.
*
* @param searchOption the tab search option
* @param requestParams the request params
* @return the tab by search params
*/ | Gets tab by search params | getTabBySearchParams | {
"repo_name": "arkoghosh11/bloom-test",
"path": "bloom-dao/src/main/java/com/mana/innovative/dao/common/impl/TabDAOImpl.java",
"license": "apache-2.0",
"size": 18016
} | [
"com.mana.innovative.dao.response.DAOResponse",
"com.mana.innovative.domain.common.SearchOption",
"com.mana.innovative.domain.common.Tab",
"com.mana.innovative.dto.request.RequestParams",
"com.mana.innovative.exception.response.ErrorContainer",
"java.util.ArrayList",
"java.util.List",
"org.hibernate.H... | import com.mana.innovative.dao.response.DAOResponse; import com.mana.innovative.domain.common.SearchOption; import com.mana.innovative.domain.common.Tab; import com.mana.innovative.dto.request.RequestParams; import com.mana.innovative.exception.response.ErrorContainer; import java.util.ArrayList; import java.util.List;... | import com.mana.innovative.dao.response.*; import com.mana.innovative.domain.common.*; import com.mana.innovative.dto.request.*; import com.mana.innovative.exception.response.*; import java.util.*; import org.hibernate.*; import org.hibernate.criterion.*; import org.springframework.transaction.annotation.*; | [
"com.mana.innovative",
"java.util",
"org.hibernate",
"org.hibernate.criterion",
"org.springframework.transaction"
] | com.mana.innovative; java.util; org.hibernate; org.hibernate.criterion; org.springframework.transaction; | 1,752,995 |
@Test
public void testDrawWhenDrawinTheTriangle() throws Exception {
Shape shape1 = new TriangleShape(1);
Paint paint = new Paint(iPrinter);
paint.draw(shape1);
String expectedValue = " /" + "\\" + "\n" + "/__\\";
verify(iPrinter).println(expectedValue);
} | void function() throws Exception { Shape shape1 = new TriangleShape(1); Paint paint = new Paint(iPrinter); paint.draw(shape1); String expectedValue = STR + "\\" + "\n" + "/__\\"; verify(iPrinter).println(expectedValue); } | /**
* Method to testing method draw when drawin the triangle.
* @throws Exception Exception.
*/ | Method to testing method draw when drawin the triangle | testDrawWhenDrawinTheTriangle | {
"repo_name": "evgenymatveev/Task",
"path": "chapter_002/src/test/java/ru/ematveev/stratigypattern/PaintTest.java",
"license": "apache-2.0",
"size": 1499
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 838,818 |
void addClassFilter(ReferenceType refType); | void addClassFilter(ReferenceType refType); | /**
* Restricts the events generated by this request to those whose
* location is in the given reference type or any of its subtypes.
* An event will be generated for any location in a reference type
* that can be safely cast to the given reference type.
*
* @param refType the reference ty... | Restricts the events generated by this request to those whose location is in the given reference type or any of its subtypes. An event will be generated for any location in a reference type that can be safely cast to the given reference type | addClassFilter | {
"repo_name": "md-5/jdk10",
"path": "src/jdk.jdi/share/classes/com/sun/jdi/request/StepRequest.java",
"license": "gpl-2.0",
"size": 5196
} | [
"com.sun.jdi.ReferenceType"
] | import com.sun.jdi.ReferenceType; | import com.sun.jdi.*; | [
"com.sun.jdi"
] | com.sun.jdi; | 878,430 |
@Test
public void testRemoveFeature() {
Marker marker = new Marker(map);
map.removeFeature(marker);
assertEquals(0, map.Features().size());
} | void function() { Marker marker = new Marker(map); map.removeFeature(marker); assertEquals(0, map.Features().size()); } | /**
* Tests that removing a feature from the map results in the feature list going back to its
* original size.
*/ | Tests that removing a feature from the map results in the feature list going back to its original size | testRemoveFeature | {
"repo_name": "Klomi/appinventor-sources",
"path": "appinventor/components/tests/com/google/appinventor/components/runtime/MapTest.java",
"license": "apache-2.0",
"size": 10054
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,173,222 |
protected Export export;
@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
@Basic( optional = true )
@JoinColumn(name = "export_id", nullable = true )
public Export getExport() {
... | Export export; @ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY ) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE}) @Basic( optional = true ) @JoinColumn(name = STR, nullable = true ) public Export function() { return this.export; } | /**
* Return the value associated with the column: export.
* @return A Export object (this.export)
*/ | Return the value associated with the column: export | getExport | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "hmis-model-v2017/src/main/java/com/servinglynk/hmis/warehouse/model/v2017/Employment.java",
"license": "mpl-2.0",
"size": 13773
} | [
"javax.persistence.Basic",
"javax.persistence.CascadeType",
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 220,695 |
@Schema(required = true, description = "Parent node path `/` if node is a root node (room)")
public String getParentPath() {
return parentPath;
} | @Schema(required = true, description = STR) String function() { return parentPath; } | /**
* Parent node path `/` if node is a root node (room)
* @return parentPath
**/ | Parent node path `/` if node is a root node (room) | getParentPath | {
"repo_name": "iterate-ch/cyberduck",
"path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/DeletedNodeSummary.java",
"license": "gpl-3.0",
"size": 9879
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 405,362 |
protected List<String> getMatchingKeys(List messagePropertyList, String[] keysToMatch) {
List<String> matchingKeys = new ArrayList<String>();
if (messagePropertyList != null && messagePropertyList.size() > 0) {
for (Object keyAsObject : messagePropertyList) {
Str... | List<String> function(List messagePropertyList, String[] keysToMatch) { List<String> matchingKeys = new ArrayList<String>(); if (messagePropertyList != null && messagePropertyList.size() > 0) { for (Object keyAsObject : messagePropertyList) { String key = (String)keyAsObject; if (matchesGroup(key, keysToMatch)) { match... | /**
* Returns a list of all error keys that should be rendered
* @param keysToMatch the keys that this group will match
* @return a List of all error keys this group will match
*/ | Returns a list of all error keys that should be rendered | getMatchingKeys | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/document/web/renderers/GroupErrorsRenderer.java",
"license": "apache-2.0",
"size": 12840
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,257,082 |
public List<Bmv2ModelRuntimeData> runtimeDatas() {
return ImmutableList.copyOf(runtimeDatas.values());
} | List<Bmv2ModelRuntimeData> function() { return ImmutableList.copyOf(runtimeDatas.values()); } | /**
* Returns an immutable list of runtime data for this action.
* The list is ordered according to the values defined in the model.
*
* @return list of runtime data.
*/ | Returns an immutable list of runtime data for this action. The list is ordered according to the values defined in the model | runtimeDatas | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "protocols/bmv2/src/main/java/org/onosproject/bmv2/api/model/Bmv2ModelAction.java",
"license": "apache-2.0",
"size": 3182
} | [
"com.google.common.collect.ImmutableList",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,083,085 |
public static BeCarrier make(BeLabel label, BeRangeElement element) {
return new BeCarrier(label, element);
}
public BeCarrier() {
}
public BeCarrier(Rcvr receiver) {
super(receiver);
} | static BeCarrier function(BeLabel label, BeRangeElement element) { return new BeCarrier(label, element); } public BeCarrier() { } public BeCarrier(Rcvr receiver) { super(receiver); } | /**
* For editions only.
*/ | For editions only | make | {
"repo_name": "jonesd/udanax-gold2java",
"path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/be/basic/BeCarrier.java",
"license": "mit",
"size": 4906
} | [
"info.dgjones.abora.gold.be.basic.BeCarrier",
"info.dgjones.abora.gold.be.basic.BeLabel",
"info.dgjones.abora.gold.be.basic.BeRangeElement",
"info.dgjones.abora.gold.xcvr.Rcvr"
] | import info.dgjones.abora.gold.be.basic.BeCarrier; import info.dgjones.abora.gold.be.basic.BeLabel; import info.dgjones.abora.gold.be.basic.BeRangeElement; import info.dgjones.abora.gold.xcvr.Rcvr; | import info.dgjones.abora.gold.be.basic.*; import info.dgjones.abora.gold.xcvr.*; | [
"info.dgjones.abora"
] | info.dgjones.abora; | 326,233 |
public void setPrivateFor(List<String> privateFor) {
this.privateFor = privateFor;
} | void function(List<String> privateFor) { this.privateFor = privateFor; } | /**
* A transaction privateFor nodes with public keys in a Quorum network
*/ | A transaction privateFor nodes with public keys in a Quorum network | setPrivateFor | {
"repo_name": "DariusX/camel",
"path": "components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java",
"license": "apache-2.0",
"size": 12465
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,714,413 |
public static QDataSet decimate( QDataSet ds ) {
return decimate( ds, 10 );
} | static QDataSet function( QDataSet ds ) { return decimate( ds, 10 ); } | /**
* reduce the size of the data by keeping every 10th measurement.
* @param ds a qube dataset.
* @return a decimated qube dataset.
* @see #decimate(org.das2.qds.QDataSet, int)
*/ | reduce the size of the data by keeping every 10th measurement | decimate | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.QDataSet"
] | import org.das2.qds.QDataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 524,854 |
Runnable acceptPutStatement(CommandStatementUpdate command, CallContext context,
FlightStream flightStream, StreamListener<PutResult> ackStream); | Runnable acceptPutStatement(CommandStatementUpdate command, CallContext context, FlightStream flightStream, StreamListener<PutResult> ackStream); | /**
* Accepts uploaded data for a particular SQL query based data stream.
* <p>`PutResult`s must be in the form of a {@link DoPutUpdateResult}.
*
* @param command The sql command to generate the data stream.
* @param context Per-call context.
* @param flightStream The data stream being uploa... | Accepts uploaded data for a particular SQL query based data stream. `PutResult`s must be in the form of a <code>DoPutUpdateResult</code> | acceptPutStatement | {
"repo_name": "apache/arrow",
"path": "java/flight/flight-sql/src/main/java/org/apache/arrow/flight/sql/FlightSqlProducer.java",
"license": "apache-2.0",
"size": 31807
} | [
"org.apache.arrow.flight.FlightStream",
"org.apache.arrow.flight.PutResult",
"org.apache.arrow.flight.sql.impl.FlightSql"
] | import org.apache.arrow.flight.FlightStream; import org.apache.arrow.flight.PutResult; import org.apache.arrow.flight.sql.impl.FlightSql; | import org.apache.arrow.flight.*; import org.apache.arrow.flight.sql.impl.*; | [
"org.apache.arrow"
] | org.apache.arrow; | 1,405,688 |
public static String getXMLSignatureAlgorithmURI(String algo) {
String xmlSignatureAlgo = null;
if ("DSA".equalsIgnoreCase(algo)) {
xmlSignatureAlgo = JBossSAMLConstants.SIGNATURE_SHA1_WITH_DSA.get();
} else if ("RSA".equalsIgnoreCase(algo)) {
xmlSignatureAlgo = JBos... | static String function(String algo) { String xmlSignatureAlgo = null; if ("DSA".equalsIgnoreCase(algo)) { xmlSignatureAlgo = JBossSAMLConstants.SIGNATURE_SHA1_WITH_DSA.get(); } else if ("RSA".equalsIgnoreCase(algo)) { xmlSignatureAlgo = JBossSAMLConstants.SIGNATURE_SHA1_WITH_RSA.get(); } return xmlSignatureAlgo; } | /**
* Get the XML Signature URI for the algo (RSA, DSA)
*
* @param algo
*
* @return
*/ | Get the XML Signature URI for the algo (RSA, DSA) | getXMLSignatureAlgorithmURI | {
"repo_name": "mbaluch/keycloak",
"path": "saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/util/SignatureUtil.java",
"license": "apache-2.0",
"size": 11016
} | [
"org.keycloak.saml.common.constants.JBossSAMLConstants"
] | import org.keycloak.saml.common.constants.JBossSAMLConstants; | import org.keycloak.saml.common.constants.*; | [
"org.keycloak.saml"
] | org.keycloak.saml; | 565,924 |
@Operation(opcode = Opcode.READ_BARRIERED)
public static native byte readByte(Object object, int offset); | @Operation(opcode = Opcode.READ_BARRIERED) static native byte function(Object object, int offset); | /**
* Reads the memory at address {@code (object + offset)}. The offset is in bytes.
*
* @param object the base object for the memory access
* @param offset the signed offset for the memory access
* @return the result of the memory access
*/ | Reads the memory at address (object + offset). The offset is in bytes | readByte | {
"repo_name": "smarr/Truffle",
"path": "compiler/src/org.graalvm.compiler.word/src/org/graalvm/compiler/word/BarrieredAccess.java",
"license": "gpl-2.0",
"size": 51471
} | [
"org.graalvm.compiler.word.Word"
] | import org.graalvm.compiler.word.Word; | import org.graalvm.compiler.word.*; | [
"org.graalvm.compiler"
] | org.graalvm.compiler; | 2,056,825 |
public static JLabel addLabel(Container component, String text, int horizontalAlignment) {
return addLabel(component, text, null, horizontalAlignment, null);
} | static JLabel function(Container component, String text, int horizontalAlignment) { return addLabel(component, text, null, horizontalAlignment, null); } | /**
* Add a new label to a given component
*
* @param component Component to add the label to
* @param text Label's text
* @param horizontalAlignment Label's horizontal alignment (e.g. JLabel.LEFT)
* @return Created label
*/ | Add a new label to a given component | addLabel | {
"repo_name": "mzmine/mzmine3",
"path": "src/main/java/io/github/mzmine/util/GUIUtils.java",
"license": "gpl-2.0",
"size": 19563
} | [
"java.awt.Container",
"javax.swing.JLabel"
] | import java.awt.Container; import javax.swing.JLabel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,378,360 |
public boolean beginTrackingIfPossible(Application application) {
if (mAutomaticTracker == null) {
AutomaticTracker automaticTracker =
AutomaticTracker.newInstanceIfPossible(application, this );
if (automaticTracker != null) {
automaticTracker.register();
mAutomaticTracker = ... | boolean function(Application application) { if (mAutomaticTracker == null) { AutomaticTracker automaticTracker = AutomaticTracker.newInstanceIfPossible(application, this ); if (automaticTracker != null) { automaticTracker.register(); mAutomaticTracker = automaticTracker; return true; } } return false; } | /**
* Start automatic tracking if we are running on ICS+.
*
* @return Automatic tracking has been started. No need to manually invoke {@link #add} or
* {@link #remove} methods.
*/ | Start automatic tracking if we are running on ICS+ | beginTrackingIfPossible | {
"repo_name": "tryroach/stetho",
"path": "stetho/src/main/java/com/facebook/stetho/inspector/elements/android/ActivityTracker.java",
"license": "bsd-3-clause",
"size": 5743
} | [
"android.app.Application"
] | import android.app.Application; | import android.app.*; | [
"android.app"
] | android.app; | 1,429,165 |
IScheduledFuture<?> scheduleOnKeyOwner(Runnable command, Object key, long delay, TimeUnit unit); | IScheduledFuture<?> scheduleOnKeyOwner(Runnable command, Object key, long delay, TimeUnit unit); | /**
* Creates and executes a one-shot action that becomes enabled
* after the given delay on the partition owner of the given key.
*
* @param command the task to execute
* @param key the key to identify the partition owner, which will execute the task
* @param delay the time from now to de... | Creates and executes a one-shot action that becomes enabled after the given delay on the partition owner of the given key | scheduleOnKeyOwner | {
"repo_name": "tombujok/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/scheduledexecutor/IScheduledExecutorService.java",
"license": "apache-2.0",
"size": 20453
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 522,017 |
public String getStringValue(String key){
try {
return dictionary.get(key).toJavaObject().toString().trim();
} catch (NullPointerException e){
Main.log(key);
Main.sendError(String.format("File %s is missing key %s, defaulting to 0",fileName,key),true,e);
... | String function(String key){ try { return dictionary.get(key).toJavaObject().toString().trim(); } catch (NullPointerException e){ Main.log(key); Main.sendError(String.format(STR,fileName,key),true,e); return ""; } } | /**
* Returns the value in the dictionary based on the key provided
*
* @param key Key associated with the desired value
* @return The value associated with the key in String form
* @throws NullPointerException
*/ | Returns the value in the dictionary based on the key provided | getStringValue | {
"repo_name": "FullMetalFalcons/RoboticsScoutingExcel",
"path": "src/org/fullmetalfalcons/scouting/teams/Team.java",
"license": "mit",
"size": 3736
} | [
"org.fullmetalfalcons.scouting.main.Main"
] | import org.fullmetalfalcons.scouting.main.Main; | import org.fullmetalfalcons.scouting.main.*; | [
"org.fullmetalfalcons.scouting"
] | org.fullmetalfalcons.scouting; | 1,845,300 |
private void requestCameraPermission() {
Log.w(TAG, "Camera permission is not granted. Requesting permission");
final String[] permissions = new String[]{Manifest.permission.CAMERA};
if (!ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.CAMERA))... | void function() { Log.w(TAG, STR); final String[] permissions = new String[]{Manifest.permission.CAMERA}; if (!ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.CAMERA)) { ActivityCompat.requestPermissions(this, permissions, RC_HANDLE_CAMERA_PERM); return; } final Activity thisActivity = thi... | /**
* Handles the requesting of the camera permission. This includes
* showing a "Snackbar" message of why the permission is needed then
* sending the request.
*/ | Handles the requesting of the camera permission. This includes showing a "Snackbar" message of why the permission is needed then sending the request | requestCameraPermission | {
"repo_name": "googlesamples/android-vision",
"path": "visionSamples/ocr-codelab/ocr-reader-complete/app/src/main/java/com/google/android/gms/samples/vision/ocrreader/OcrCaptureActivity.java",
"license": "apache-2.0",
"size": 17277
} | [
"android.app.Activity",
"android.support.v4.app.ActivityCompat",
"android.util.Log"
] | import android.app.Activity; import android.support.v4.app.ActivityCompat; import android.util.Log; | import android.app.*; import android.support.v4.app.*; import android.util.*; | [
"android.app",
"android.support",
"android.util"
] | android.app; android.support; android.util; | 649,959 |
if (!(lhs instanceof LeftHandSideIdentifier))
throw new RuntimeCompilerException(lhs.getPosition(), "MESSAGE variables must be simple identifiers");
TIdentifier ident = ((LeftHandSideIdentifier) lhs).identifier;
Variable variable = codeGen.getVariable(ident.getText());
if (variable instanceof MessageVariable... | if (!(lhs instanceof LeftHandSideIdentifier)) throw new RuntimeCompilerException(lhs.getPosition(), STR); TIdentifier ident = ((LeftHandSideIdentifier) lhs).identifier; Variable variable = codeGen.getVariable(ident.getText()); if (variable instanceof MessageVariable) { return (MessageVariable) variable; } else { FieldR... | /**
* Gets the MessageVariable for the LHSR, or creates it on demand.
*/ | Gets the MessageVariable for the LHSR, or creates it on demand | getVariable | {
"repo_name": "Tetr4/arden2bytecode",
"path": "src/arden/compiler/MessageVariable.java",
"license": "gpl-3.0",
"size": 3143
} | [
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,011,156 |
public List<Object>[] generateRows(BufferedImageContainer img) {
return doGenerateRows(img);
} | List<Object>[] function(BufferedImageContainer img) { return doGenerateRows(img); } | /**
* Performs the actual feature genration.
*
* @param img the image to process
* @return the generated features
*/ | Performs the actual feature genration | generateRows | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-imaging/src/main/java/adams/data/image/features/AbstractScript.java",
"license": "gpl-3.0",
"size": 2643
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,256,839 |
@ReturnsMutableObject ("Speed")
@SuppressFBWarnings ("EI_EXPOSE_REP")
@Nullable
public byte [] directGet ()
{
if (isInMemory ())
{
_ensureCachedContentIsPresent ();
return m_aCachedContent;
}
return SimpleFileIO.getAllFileBytes (m_aDFOS.getFile ());
} | @ReturnsMutableObject ("Speed") @SuppressFBWarnings (STR) byte [] function () { if (isInMemory ()) { _ensureCachedContentIsPresent (); return m_aCachedContent; } return SimpleFileIO.getAllFileBytes (m_aDFOS.getFile ()); } | /**
* Returns the contents of the file as an array of bytes. If the contents of
* the file were not yet cached in memory, they will be loaded from the disk
* storage and cached.
*
* @return The contents of the file as an array of bytes.
*/ | Returns the contents of the file as an array of bytes. If the contents of the file were not yet cached in memory, they will be loaded from the disk storage and cached | directGet | {
"repo_name": "phax/ph-web",
"path": "ph-web/src/main/java/com/helger/web/fileupload/parse/DiskFileItem.java",
"license": "apache-2.0",
"size": 20311
} | [
"com.helger.commons.annotation.ReturnsMutableObject",
"com.helger.commons.io.file.SimpleFileIO",
"edu.umd.cs.findbugs.annotations.SuppressFBWarnings"
] | import com.helger.commons.annotation.ReturnsMutableObject; import com.helger.commons.io.file.SimpleFileIO; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; | import com.helger.commons.annotation.*; import com.helger.commons.io.file.*; import edu.umd.cs.findbugs.annotations.*; | [
"com.helger.commons",
"edu.umd.cs"
] | com.helger.commons; edu.umd.cs; | 498,958 |
List<? extends Name> getAllNames(); | List<? extends Name> getAllNames(); | /**
* Returns all defined names.
*
* @return a list of the defined names. An empty list is returned if none is found.
*/ | Returns all defined names | getAllNames | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/java/org/apache/poi/ss/usermodel/Workbook.java",
"license": "apache-2.0",
"size": 22642
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,369,381 |
public void setViewAdapter(WheelViewAdapter viewAdapter) {
if (this.mViewAdapter != null) {
this.mViewAdapter.unregisterDataSetObserver(mDataObserver);
}
this.mViewAdapter = viewAdapter;
mCurrentItemIdx = 0;
if (this.mViewAdapter != null) {
this.mViewAdapter.registerDataSetObserver(mDataObser... | void function(WheelViewAdapter viewAdapter) { if (this.mViewAdapter != null) { this.mViewAdapter.unregisterDataSetObserver(mDataObserver); } this.mViewAdapter = viewAdapter; mCurrentItemIdx = 0; if (this.mViewAdapter != null) { this.mViewAdapter.registerDataSetObserver(mDataObserver); } invalidateItemsLayout(true); } | /**
* Sets view adapter. Usually new adapters contain different views, so it
* needs to rebuild view by calling measure().
*
* @param viewAdapter
* the view adapter
*/ | Sets view adapter. Usually new adapters contain different views, so it needs to rebuild view by calling measure() | setViewAdapter | {
"repo_name": "Yndal/ArduPilot-SensorPlatform",
"path": "Tower_with_3drservices/Android/src/org/droidplanner/android/widgets/spinnerWheel/AbstractWheel.java",
"license": "mit",
"size": 23477
} | [
"org.droidplanner.android.widgets.spinnerWheel.adapters.WheelViewAdapter"
] | import org.droidplanner.android.widgets.spinnerWheel.adapters.WheelViewAdapter; | import org.droidplanner.android.widgets.*; | [
"org.droidplanner.android"
] | org.droidplanner.android; | 127,964 |
@SuppressWarnings("IfMayBeConditional")
public boolean checkKeyIndexCondition(int masks[], int mask) {
assert masks != null;
assert masks.length > 0;
if (keyAliasColId < 0)
return (masks[QueryUtils.KEY_COL] & mask) != 0;
else
return (masks[QueryUtils.KEY_... | @SuppressWarnings(STR) boolean function(int masks[], int mask) { assert masks != null; assert masks.length > 0; if (keyAliasColId < 0) return (masks[QueryUtils.KEY_COL] & mask) != 0; else return (masks[QueryUtils.KEY_COL] & mask) != 0 (masks[keyAliasColId] & mask) != 0; } | /**
* Checks if provided index condition is allowed for key column or key alias column.
*
* @param masks Array containing Index Condition masks for each column.
* @param mask Index Condition to check.
* @return Result.
*/ | Checks if provided index condition is allowed for key column or key alias column | checkKeyIndexCondition | {
"repo_name": "xtern/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2RowDescriptor.java",
"license": "apache-2.0",
"size": 12368
} | [
"org.apache.ignite.internal.processors.query.QueryUtils"
] | import org.apache.ignite.internal.processors.query.QueryUtils; | import org.apache.ignite.internal.processors.query.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,554,298 |
public ResultMatcher isNetworkAuthenticationRequired() {
return matcher(HttpStatus.valueOf(511));
} | ResultMatcher function() { return matcher(HttpStatus.valueOf(511)); } | /**
* Assert the response status code is {@code HttpStatus.NETWORK_AUTHENTICATION_REQUIRED} (511).
*/ | Assert the response status code is HttpStatus.NETWORK_AUTHENTICATION_REQUIRED (511) | isNetworkAuthenticationRequired | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java",
"license": "apache-2.0",
"size": 17758
} | [
"org.springframework.http.HttpStatus",
"org.springframework.test.web.servlet.ResultMatcher"
] | import org.springframework.http.HttpStatus; import org.springframework.test.web.servlet.ResultMatcher; | import org.springframework.http.*; import org.springframework.test.web.servlet.*; | [
"org.springframework.http",
"org.springframework.test"
] | org.springframework.http; org.springframework.test; | 1,833,037 |
public void setMaturityTenor(Tenor maturityTenor) {
JodaBeanUtils.notNull(maturityTenor, "maturityTenor");
this._maturityTenor = maturityTenor;
} | void function(Tenor maturityTenor) { JodaBeanUtils.notNull(maturityTenor, STR); this._maturityTenor = maturityTenor; } | /**
* Sets the tenor.
* @param maturityTenor the new value of the property, not null
*/ | Sets the tenor | setMaturityTenor | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial/src/main/java/com/opengamma/financial/analytics/ircurve/strips/BondNode.java",
"license": "apache-2.0",
"size": 7022
} | [
"com.opengamma.util.time.Tenor",
"org.joda.beans.JodaBeanUtils"
] | import com.opengamma.util.time.Tenor; import org.joda.beans.JodaBeanUtils; | import com.opengamma.util.time.*; import org.joda.beans.*; | [
"com.opengamma.util",
"org.joda.beans"
] | com.opengamma.util; org.joda.beans; | 1,775,705 |
public static void drawBezel(Graphics g,
int x, int y, int width, int height,
boolean isPressed, boolean isDefault,
Color shadow, Color darkShadow,
Color highlight, Color lightHighlight)
{
... | static void function(Graphics g, int x, int y, int width, int height, boolean isPressed, boolean isDefault, Color shadow, Color darkShadow, Color highlight, Color lightHighlight) { Color oldColor = g.getColor(); try { if ((isPressed == false) && (isDefault == false)) { drawEtchedRect(g, x, y, width, height, lightHighli... | /**
* Draws a border that is suitable for buttons of the Basic look and
* feel.
*
* <p><img src="doc-files/BasicGraphicsUtils-3.png" width="500"
* height="300" alt="[An illustration that shows which pixels
* get painted in what color]" />
*
* @param g the graphics into which the rectangle is dra... | Draws a border that is suitable for buttons of the Basic look and feel. | drawBezel | {
"repo_name": "wesen/nmedit",
"path": "libs/nmutils/src/gnu/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java",
"license": "gpl-2.0",
"size": 23352
} | [
"java.awt.Color",
"java.awt.Graphics"
] | import java.awt.Color; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,807,307 |
@Test
public void testWriteSetTracking8() throws Exception {
dropTable(new String[] {"tab1", "TAB1"});
CommandProcessorResponse cpr = driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
"clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'=... | void function() throws Exception { dropTable(new String[] {"tab1", "TAB1"}); CommandProcessorResponse cpr = driver.run(STR + STR); checkCmdOnDriver(cpr); checkCmdOnDriver(driver.run(STR)); HiveTxnManager txnMgr2 = TxnManagerFactory.getTxnManagerFactory().getTxnManager(conf); txnMgr2.openTxn(ctx, "T2"); checkCmdOnDriver... | /**
* Concurrent updates with partition pruning predicate and w/o one
*/ | Concurrent updates with partition pruning predicate and w/o one | testWriteSetTracking8 | {
"repo_name": "vergilchiu/hive",
"path": "ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java",
"license": "apache-2.0",
"size": 121935
} | [
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hive.metastore.api.AddDynamicPartitions",
"org.apache.hadoop.hive.metastore.api.DataOperationType",
"org.apache.hadoop.hive.metastore.api.LockState",
"org.apache.hadoop.hive.metastore.api.LockType",
"org.apache.hadoop.hive.metastore.api.ShowL... | import java.util.Collections; import java.util.List; import org.apache.hadoop.hive.metastore.api.AddDynamicPartitions; import org.apache.hadoop.hive.metastore.api.DataOperationType; import org.apache.hadoop.hive.metastore.api.LockState; import org.apache.hadoop.hive.metastore.api.LockType; import org.apache.hadoop.hive... | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.txn.*; import org.apache.hadoop.hive.ql.processors.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 2,664,430 |
public void switchCamera() throws CameraOpenException {
if (isStreaming() || onPreview) {
cameraManager.switchCamera();
} else {
cameraManager.setCameraFacing(getCameraFacing() == CameraHelper.Facing.FRONT ? CameraHelper.Facing.BACK : CameraHelper.Facing.FRONT);
}
} | void function() throws CameraOpenException { if (isStreaming() onPreview) { cameraManager.switchCamera(); } else { cameraManager.setCameraFacing(getCameraFacing() == CameraHelper.Facing.FRONT ? CameraHelper.Facing.BACK : CameraHelper.Facing.FRONT); } } | /**
* Switch camera used. Can be called anytime
*
* @throws CameraOpenException If the other camera doesn't support same resolution.
*/ | Switch camera used. Can be called anytime | switchCamera | {
"repo_name": "pedroSG94/rtmp-streamer-java",
"path": "rtplibrary/src/main/java/com/pedro/rtplibrary/base/Camera2Base.java",
"license": "apache-2.0",
"size": 30857
} | [
"com.pedro.encoder.input.video.CameraHelper",
"com.pedro.encoder.input.video.CameraOpenException"
] | import com.pedro.encoder.input.video.CameraHelper; import com.pedro.encoder.input.video.CameraOpenException; | import com.pedro.encoder.input.video.*; | [
"com.pedro.encoder"
] | com.pedro.encoder; | 2,122,981 |
@Test
public void testBuildChunkNullContent() {
instance = new SimpleTextExplanationChunkBuilder();
try {
instance.buildChunk(context, group, rule, tags, null);
fail("Exception should have been thrown, but it wasn't");
} catch (Exception e) {
String re... | void function() { instance = new SimpleTextExplanationChunkBuilder(); try { instance.buildChunk(context, group, rule, tags, null); fail(STR); } catch (Exception e) { String result = e.getMessage(); String expResult = STR; assertTrue(e instanceof org.goodoldai.jeff.explanation.ExplanationException); assertEquals(expResu... | /**
* Test of buildChunk method, of class SimpleTextExplanationChunkBuilder.
* Test case: unsuccessfull execution - null content
*/ | Test of buildChunk method, of class SimpleTextExplanationChunkBuilder. Test case: unsuccessfull execution - null content | testBuildChunkNullContent | {
"repo_name": "bojantomic/jeff",
"path": "src/test/java/org/goodoldai/jeff/explanation/builder/SimpleTextExplanationChunkBuilderTest.java",
"license": "lgpl-3.0",
"size": 4744
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 997,364 |
public void onViewCreated(View view, Bundle savedInstanceState);
| void function(View view, Bundle savedInstanceState); | /**
* On view created.
*
* @param view
* the view
* @param savedInstanceState
* the saved instance state
*/ | On view created | onViewCreated | {
"repo_name": "yossigruner/AndroidMVC",
"path": "src/com/mika/cheggmeout/ui/controllers/interfaces/IBaseController.java",
"license": "mit",
"size": 2040
} | [
"android.os.Bundle",
"android.view.View"
] | import android.os.Bundle; import android.view.View; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 22,970 |
protected void doColumnProfile(ColumnProfileResult cpr, MonitorableImpl pm) throws SQLException, SQLObjectException {
logger.debug("Doing profile for column " + cpr.getProfiledObject().getName());
if (pm.isCancelled()) {
return;
}
Connection con = null;
S... | void function(ColumnProfileResult cpr, MonitorableImpl pm) throws SQLException, SQLObjectException { logger.debug(STR + cpr.getProfiledObject().getName()); if (pm.isCancelled()) { return; } Connection con = null; Statement stmt = null; ResultSet rs = null; String lastSQL = null; try { SQLColumn col = cpr.getProfiledObj... | /**
* Performs profiling at the column level by issuing a SELECT statement against
* the column referenced by <tt>cpr</tt>.
*
* @param cpr The profile result to populate
* @param pm The progress monitor. This progress monitor is only used for checking
* if the operation is canceled; it i... | Performs profiling at the column level by issuing a SELECT statement against the column referenced by cpr | doColumnProfile | {
"repo_name": "amitkr/power-architect",
"path": "src/main/java/ca/sqlpower/architect/profile/RemoteDatabaseProfileCreator.java",
"license": "gpl-3.0",
"size": 30862
} | [
"ca.sqlpower.sqlobject.SQLColumn",
"ca.sqlpower.sqlobject.SQLDatabase",
"ca.sqlpower.sqlobject.SQLObjectException",
"ca.sqlpower.util.MonitorableImpl",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import ca.sqlpower.sqlobject.SQLColumn; import ca.sqlpower.sqlobject.SQLDatabase; import ca.sqlpower.sqlobject.SQLObjectException; import ca.sqlpower.util.MonitorableImpl; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import ca.sqlpower.sqlobject.*; import ca.sqlpower.util.*; import java.sql.*; | [
"ca.sqlpower.sqlobject",
"ca.sqlpower.util",
"java.sql"
] | ca.sqlpower.sqlobject; ca.sqlpower.util; java.sql; | 878,364 |
private Job createJob() throws IOException {
String jobName = "distcp";
Job job = Job.getInstance(getConf());
String userChosenName = job.getJobName();
if (userChosenName != null)
jobName += ": " + userChosenName;
job.setJobName(jobName);
job.setInputFormatClass(DistCpUtils.getStrategy(g... | Job function() throws IOException { String jobName = STR; Job job = Job.getInstance(getConf()); String userChosenName = job.getJobName(); if (userChosenName != null) jobName += STR + userChosenName; job.setJobName(jobName); job.setInputFormatClass(DistCpUtils.getStrategy(getConf(), inputOptions)); job.setJarByClass(Cop... | /**
* Create Job object for submitting it, with all the configuration
*
* @return Reference to job object.
* @throws IOException - Exception if any
*/ | Create Job object for submitting it, with all the configuration | createJob | {
"repo_name": "gndpig/hadoop",
"path": "src/tools/org/apache/hadoop/tools/distcp2/DistCp.java",
"license": "apache-2.0",
"size": 14742
} | [
"java.io.IOException",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.mapred.JobConf",
"org.apache.hadoop.mapreduce.Job",
"org.apache.hadoop.tools.distcp2.mapred.CopyMapper",
"org.apache.hadoop.tools.distcp2.mapred.CopyOutputFormat",
"org.apache.hadoop.tools.distcp2.util.DistCpUtils"
] | import java.io.IOException; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.tools.distcp2.mapred.CopyMapper; import org.apache.hadoop.tools.distcp2.mapred.CopyOutputFormat; import org.apache.hadoop.tools.distcp2.util.DistCpUtils... | import java.io.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.tools.distcp2.mapred.*; import org.apache.hadoop.tools.distcp2.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,277,253 |
@ApiModelProperty(example = "null", value = "When the POS started unanchoring, for starbases (POSes) in unanchoring state")
public OffsetDateTime getUnanchorAt() {
return unanchorAt;
} | @ApiModelProperty(example = "null", value = STR) OffsetDateTime function() { return unanchorAt; } | /**
* When the POS started unanchoring, for starbases (POSes) in unanchoring
* state
*
* @return unanchorAt
**/ | When the POS started unanchoring, for starbases (POSes) in unanchoring state | getUnanchorAt | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/CorporationStarbasesResponse.java",
"license": "apache-2.0",
"size": 8793
} | [
"io.swagger.annotations.ApiModelProperty",
"java.time.OffsetDateTime"
] | import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; | import io.swagger.annotations.*; import java.time.*; | [
"io.swagger.annotations",
"java.time"
] | io.swagger.annotations; java.time; | 2,816,258 |
public Map<String, Object> readKeyValues(Deserializer deserializer) {
Map<String, Object> result = new HashMap<String, Object>();
readKeyValues(result, deserializer);
return result;
} | Map<String, Object> function(Deserializer deserializer) { Map<String, Object> result = new HashMap<String, Object>(); readKeyValues(result, deserializer); return result; } | /**
* Read key - value pairs. This is required for the RecordSet
* deserializer.
*/ | Read key - value pairs. This is required for the RecordSet deserializer | readKeyValues | {
"repo_name": "cwpenhale/red5-mobileconsole",
"path": "red5_server/src/main/java/org/red5/io/amf/Input.java",
"license": "apache-2.0",
"size": 19582
} | [
"java.util.HashMap",
"java.util.Map",
"org.red5.io.object.Deserializer"
] | import java.util.HashMap; import java.util.Map; import org.red5.io.object.Deserializer; | import java.util.*; import org.red5.io.object.*; | [
"java.util",
"org.red5.io"
] | java.util; org.red5.io; | 1,920,409 |
public void initialize() {
for (TabModel model : mTabModelSelector.getModels()) model.addObserver(mTabModelObserver);
mTabModelSelector.addObserver(mTabModelSelectorObserver);
} | void function() { for (TabModel model : mTabModelSelector.getModels()) model.addObserver(mTabModelObserver); mTabModelSelector.addObserver(mTabModelSelectorObserver); } | /**
* Initialize the wrapper to listen for the proper notifications.
*/ | Initialize the wrapper to listen for the proper notifications | initialize | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/widget/emptybackground/EmptyBackgroundViewWrapper.java",
"license": "bsd-3-clause",
"size": 6346
} | [
"org.chromium.chrome.browser.tabmodel.TabModel"
] | import org.chromium.chrome.browser.tabmodel.TabModel; | import org.chromium.chrome.browser.tabmodel.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 256,252 |
public List<STData> readGrADSData_Station(int timeIdx) throws FileNotFoundException, UnsupportedEncodingException, IOException {
List<STData> stDataList = new ArrayList<>();
String filePath = DSET;
int tIdx = timeIdx;
if (OPTIONS.template) {
Object[] result = getFi... | List<STData> function(int timeIdx) throws FileNotFoundException, UnsupportedEncodingException, IOException { List<STData> stDataList = new ArrayList<>(); String filePath = DSET; int tIdx = timeIdx; if (OPTIONS.template) { Object[] result = getFilePath_Template(timeIdx); filePath = (String) result[0]; tIdx = (Integer) r... | /**
* Read GrADS station data
*
* @param timeIdx Time index
* @return Station data list
* @throws java.io.FileNotFoundException
* @throws java.io.UnsupportedEncodingException
*/ | Read GrADS station data | readGrADSData_Station | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/data/meteodata/grads/GrADSDataInfo.java",
"license": "lgpl-3.0",
"size": 115651
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.RandomAccessFile",
"java.io.UnsupportedEncodingException",
"java.util.ArrayList",
"java.util.List",
"org.meteoinfo.global.DataConvert"
] | import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import org.meteoinfo.global.DataConvert; | import java.io.*; import java.util.*; import org.meteoinfo.global.*; | [
"java.io",
"java.util",
"org.meteoinfo.global"
] | java.io; java.util; org.meteoinfo.global; | 561,808 |
public ExpressionClause<ThrottleDefinition> throttle() {
ThrottleDefinition answer = new ThrottleDefinition();
addOutput(answer);
return ExpressionClause.createAndSetExpression(answer);
} | ExpressionClause<ThrottleDefinition> function() { ThrottleDefinition answer = new ThrottleDefinition(); addOutput(answer); return ExpressionClause.createAndSetExpression(answer); } | /**
* <a href="http://camel.apache.org/throttler.html">Throttler EIP:</a>
* Creates a throttler using a fluent builder.
*
* @return the builder
*/ | Creates a throttler using a fluent builder | throttle | {
"repo_name": "dmvolod/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 177777
} | [
"org.apache.camel.builder.ExpressionClause"
] | import org.apache.camel.builder.ExpressionClause; | import org.apache.camel.builder.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,920,235 |
@Override
protected DataPoint newDataPoint(Point2D smoothed) {
return new TimeseriesPoint(new Date((long) smoothed.getX()), smoothed.getY());
} | DataPoint function(Point2D smoothed) { return new TimeseriesPoint(new Date((long) smoothed.getX()), smoothed.getY()); } | /**
* Creates a new DataPoint from the smoothed one.
*
* @param smoothed the smoothed data point
* @return the new DataPoint
*/ | Creates a new DataPoint from the smoothed one | newDataPoint | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-timeseries/src/main/java/adams/data/filter/TimeseriesLOWESS.java",
"license": "gpl-3.0",
"size": 3150
} | [
"java.awt.geom.Point2D",
"java.util.Date"
] | import java.awt.geom.Point2D; import java.util.Date; | import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 819,720 |
protected void addEndPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_SetType_end_feature"),
getString("_UI_PropertyDescriptor_description", ... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), LanguagePackage.Literals.SET_TYPE__END, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_... | /**
* This adds a property descriptor for the End feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the End feature. | addEndPropertyDescriptor | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/org/w3/_2001/smil20/language/provider/SetTypeItemProvider.java",
"license": "apache-2.0",
"size": 255549
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.w3._2001.smil20.language.LanguagePackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.w3._2001.smil20.language.LanguagePackage; | import org.eclipse.emf.edit.provider.*; import org.w3.*; | [
"org.eclipse.emf",
"org.w3"
] | org.eclipse.emf; org.w3; | 2,134,430 |
private Map mapFileToName(Set fileIds) {
Map m = new HashMap();
for (Iterator itr = fileIds.iterator(); itr.hasNext();) {
Long id = (Long)itr.next();
ConfigFile cf = ConfigurationFactory.lookupConfigFileById(id);
if (cf != null) {
m.put(id, cf.getC... | Map function(Set fileIds) { Map m = new HashMap(); for (Iterator itr = fileIds.iterator(); itr.hasNext();) { Long id = (Long)itr.next(); ConfigFile cf = ConfigurationFactory.lookupConfigFileById(id); if (cf != null) { m.put(id, cf.getConfigFileName().getId()); } } return m; } | /**
* From file id, get file.fileName and map to file-id
* @param fileIds set of file-ids of interest
* @return Map<Long,Long> of file-id to cfn-id
*/ | From file id, get file.fileName and map to file-id | mapFileToName | {
"repo_name": "ogajduse/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/configuration/ConfigurationManager.java",
"license": "gpl-2.0",
"size": 102493
} | [
"com.redhat.rhn.domain.config.ConfigFile",
"com.redhat.rhn.domain.config.ConfigurationFactory",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"java.util.Set"
] | import com.redhat.rhn.domain.config.ConfigFile; import com.redhat.rhn.domain.config.ConfigurationFactory; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; | import com.redhat.rhn.domain.config.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,361,184 |
public void testSSLSocketImpl3() throws Exception {
Server server = null;
SSLSocket socket = null;
try {
server = new Server();
socket = new SSLSocketImpl(
"localhost",
server.getPort(),
InetAddress.getByNam... | void function() throws Exception { Server server = null; SSLSocket socket = null; try { server = new Server(); socket = new SSLSocketImpl( STR, server.getPort(), InetAddress.getByName(STR), 0, JSSETestData.getSSLParameters()); socket.setUseClientMode(true); | /**
* SSLSocketImpl(String host, int port, InetAddress localHost, int
* localPort, SSLParameters sslParameters) method testing.
*/ | SSLSocketImpl(String host, int port, InetAddress localHost, int localPort, SSLParameters sslParameters) method testing | testSSLSocketImpl3 | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "external/apache-harmony/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/SSLSocketImplTest.java",
"license": "gpl-3.0",
"size": 39896
} | [
"java.net.InetAddress",
"javax.net.ssl.SSLSocket"
] | import java.net.InetAddress; import javax.net.ssl.SSLSocket; | import java.net.*; import javax.net.ssl.*; | [
"java.net",
"javax.net"
] | java.net; javax.net; | 960,052 |
private boolean createCandidateString(String input, HashMap<String,String> map, StringBuffer outBuf) {
if (outBuf.length() > 0) {
outBuf.delete(0, outBuf.length());
}
for (int index = 0; index < input.length(); index++) {
String convChar = map.get(input.substring(inde... | boolean function(String input, HashMap<String,String> map, StringBuffer outBuf) { if (outBuf.length() > 0) { outBuf.delete(0, outBuf.length()); } for (int index = 0; index < input.length(); index++) { String convChar = map.get(input.substring(index, index + 1)); if (convChar == null) { return false; } outBuf.append(con... | /**
* Create the candidate string
* <br>
* @param input The input string
* @param map The hash map
* @param outBuf The output string
* @return {@code true} if success
*/ | Create the candidate string | createCandidateString | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/JAJP/KanaConverter.java",
"license": "gpl-3.0",
"size": 24128
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 519,506 |
public BaseNetworkContent getNetworkContent(); | BaseNetworkContent function(); | /**
* Get data which gets stored in the network
*
* @return data to store
*/ | Get data which gets stored in the network | getNetworkContent | {
"repo_name": "Hive2Hive/Hive2Hive",
"path": "org.hive2hive.core/src/main/java/org/hive2hive/core/network/data/parameters/IParameters.java",
"license": "mit",
"size": 3975
} | [
"org.hive2hive.core.model.BaseNetworkContent"
] | import org.hive2hive.core.model.BaseNetworkContent; | import org.hive2hive.core.model.*; | [
"org.hive2hive.core"
] | org.hive2hive.core; | 614,948 |
public static HashDescriptionWriter hashWriter(HashFunction func) {
return new HashDescriptionWriter(func.newHasher());
} | static HashDescriptionWriter function(HashFunction func) { return new HashDescriptionWriter(func.newHasher()); } | /**
* Create a description writer for a particular hash function.
* @param func The hash function.
* @return A description writer that computes a hash using {@code func}.
*/ | Create a description writer for a particular hash function | hashWriter | {
"repo_name": "vijayvani/Lenskit",
"path": "lenskit-core/src/main/java/org/grouplens/lenskit/util/io/Descriptions.java",
"license": "lgpl-2.1",
"size": 5284
} | [
"com.google.common.hash.HashFunction"
] | import com.google.common.hash.HashFunction; | import com.google.common.hash.*; | [
"com.google.common"
] | com.google.common; | 1,467,163 |
public String getLocalName() {
return name;
}
private static final Map<String, Element> MAP;
static {
final Map<String, Element> map = new HashMap<String, Element>(8);
for (Element element : values()) {
final String name = element.getLocalName();
if (name != null) {
... | String function() { return name; } private static final Map<String, Element> MAP; static { final Map<String, Element> map = new HashMap<String, Element>(8); for (Element element : values()) { final String name = element.getLocalName(); if (name != null) { map.put(name, element); } } MAP = map; } | /**
* Get the local name of this element.
*
* @return the local name
*/ | Get the local name of this element | getLocalName | {
"repo_name": "nmldiegues/stibt",
"path": "infinispan/cachestore/remote/src/main/java/org/infinispan/loaders/remote/configuration/as/Element.java",
"license": "apache-2.0",
"size": 2268
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,850,861 |
@Override public T visitTypeArgs(@NotNull ScalaParser.TypeArgsContext ctx) { return visitChildren(ctx); } | @Override public T visitTypeArgs(@NotNull ScalaParser.TypeArgsContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitClassParamClauses | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/ScalaBaseVisitor.java",
"license": "gpl-3.0",
"size": 26845
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,020,814 |
public boolean includes(DocumentEvent event) {
return includes(event.getDocument(), event.getOffset(), event.getLength());
} | boolean function(DocumentEvent event) { return includes(event.getDocument(), event.getOffset(), event.getLength()); } | /**
* Returns whether this position includes <code>event</code>.
*
* @param event the event to check.
* @return <code>true</code> if this position includes <code>event</code>,
* <code>false</code> otherwise
*/ | Returns whether this position includes <code>event</code> | includes | {
"repo_name": "neelance/jface4ruby",
"path": "jface4ruby/src/org/eclipse/jface/text/link/LinkedPosition.java",
"license": "epl-1.0",
"size": 5689
} | [
"org.eclipse.jface.text.DocumentEvent"
] | import org.eclipse.jface.text.DocumentEvent; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,068,621 |
public String getDeviceModel() {
return Build.MODEL;
} | String function() { return Build.MODEL; } | /**
* get device model
*
* Full BMOS on Passion
*/ | get device model Full BMOS on Passion | getDeviceModel | {
"repo_name": "BaiduQA/Cafe",
"path": "testservice/src/com/baidu/cafe/remote/SystemLib.java",
"license": "apache-2.0",
"size": 87756
} | [
"android.os.Build"
] | import android.os.Build; | import android.os.*; | [
"android.os"
] | android.os; | 2,232,025 |
@Test
public void starGlob() {
EventFilter rootFilter = new GlobbingPathFilter("a/*/c");
NodeState a = tree.getChild("a").getNodeState();
assertFalse(rootFilter.includeAdd("a", a));
EventFilter aFilter = rootFilter.create("a", a, a);
assertNotNull(aFilter);
NodeS... | void function() { EventFilter rootFilter = new GlobbingPathFilter("a/*/c"); NodeState a = tree.getChild("a").getNodeState(); assertFalse(rootFilter.includeAdd("a", a)); EventFilter aFilter = rootFilter.create("a", a, a); assertNotNull(aFilter); NodeState b = a.getChildNode("b"); assertFalse(aFilter.includeAdd("b", b));... | /**
* a/*/c should match a/b/c
*/ | a/*/c should match a/b/c | starGlob | {
"repo_name": "mduerig/jackrabbit-oak",
"path": "oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilterTest.java",
"license": "apache-2.0",
"size": 11605
} | [
"org.apache.jackrabbit.oak.spi.state.NodeState",
"org.junit.Assert"
] | import org.apache.jackrabbit.oak.spi.state.NodeState; import org.junit.Assert; | import org.apache.jackrabbit.oak.spi.state.*; import org.junit.*; | [
"org.apache.jackrabbit",
"org.junit"
] | org.apache.jackrabbit; org.junit; | 1,584,863 |
public void minimizeFrame(JInternalFrame frame)
{
Rectangle normalBounds = frame.getNormalBounds();
JDesktopPane p = frame.getDesktopPane();
if (p != null)
p.setSelectedFrame(frame);
else
{
try
{
frame.setSelected(true);
}
catch (PropertyV... | void function(JInternalFrame frame) { Rectangle normalBounds = frame.getNormalBounds(); JDesktopPane p = frame.getDesktopPane(); if (p != null) p.setSelectedFrame(frame); else { try { frame.setSelected(true); } catch (PropertyVetoException e) { } } setBoundsForFrame(frame, normalBounds.x, normalBounds.y, normalBounds.w... | /**
* This method restores the JInternalFrame's bounds to what they were
* previous to the setMaximize call.
*
* @param frame The JInternalFrame to minimize.
*/ | This method restores the JInternalFrame's bounds to what they were previous to the setMaximize call | minimizeFrame | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/DefaultDesktopManager.java",
"license": "bsd-3-clause",
"size": 18383
} | [
"java.awt.Rectangle",
"java.beans.PropertyVetoException"
] | import java.awt.Rectangle; import java.beans.PropertyVetoException; | import java.awt.*; import java.beans.*; | [
"java.awt",
"java.beans"
] | java.awt; java.beans; | 1,726,029 |
@Override
public Map<LocalDate, MultipleCurrencyAmount> visitCouponIborDefinition(final CouponIborDefinition coupon) {
ArgumentChecker.notNull(coupon, "coupon");
final LocalDate endDate = coupon.getPaymentDate().toLocalDate();
if (coupon.getNotional() < 0) {
return Collections.emptyMap();
}
... | Map<LocalDate, MultipleCurrencyAmount> function(final CouponIborDefinition coupon) { ArgumentChecker.notNull(coupon, STR); final LocalDate endDate = coupon.getPaymentDate().toLocalDate(); if (coupon.getNotional() < 0) { return Collections.emptyMap(); } final double amount = coupon.getNotional() * coupon.getFixingPeriod... | /**
* If the notional is negative (i.e. the amount is to be paid), returns
* an empty map. Otherwise, returns a map containing a single payment date and the notional amount
* multiplied by the accrual period.
* @param coupon The coupon instrument, not null
* @return A map containing the (single) payment ... | If the notional is negative (i.e. the amount is to be paid), returns an empty map. Otherwise, returns a map containing a single payment date and the notional amount multiplied by the accrual period | visitCouponIborDefinition | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/FloatingReceiveCashFlowVisitor.java",
"license": "apache-2.0",
"size": 14588
} | [
"com.opengamma.analytics.financial.instrument.payment.CouponIborDefinition",
"com.opengamma.util.ArgumentChecker",
"com.opengamma.util.money.CurrencyAmount",
"com.opengamma.util.money.MultipleCurrencyAmount",
"java.util.Collections",
"java.util.Map",
"org.threeten.bp.LocalDate"
] | import com.opengamma.analytics.financial.instrument.payment.CouponIborDefinition; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.money.CurrencyAmount; import com.opengamma.util.money.MultipleCurrencyAmount; import java.util.Collections; import java.util.Map; import org.threeten.bp.LocalDate; | import com.opengamma.analytics.financial.instrument.payment.*; import com.opengamma.util.*; import com.opengamma.util.money.*; import java.util.*; import org.threeten.bp.*; | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util",
"org.threeten.bp"
] | com.opengamma.analytics; com.opengamma.util; java.util; org.threeten.bp; | 799,747 |
public void mergeFromOsmPois(List<Poi> remotePois, Box box) {
List<Poi> toMergePois = new ArrayList<>();
Map<String, Poi> remotePoisMap = new HashMap<>();
// Map remote Poi backend Ids
for (Poi poi : remotePois) {
remotePoisMap.put(poi.getBackendId(), poi);
}
... | void function(List<Poi> remotePois, Box box) { List<Poi> toMergePois = new ArrayList<>(); Map<String, Poi> remotePoisMap = new HashMap<>(); for (Poi poi : remotePois) { remotePoisMap.put(poi.getBackendId(), poi); } List<Poi> localPois = poiDao.queryForAllInRect(box); Map<String, Poi> localPoisMap = new ConcurrentHashMa... | /**
* Merge POIs in parameters to those already in the database.
*
* @param remotePois The POIs to merge.
*/ | Merge POIs in parameters to those already in the database | mergeFromOsmPois | {
"repo_name": "mapsquare/osm-contributor",
"path": "src/main/java/io/jawg/osmcontributor/ui/managers/PoiManager.java",
"license": "gpl-3.0",
"size": 34966
} | [
"io.jawg.osmcontributor.model.entities.Poi",
"io.jawg.osmcontributor.utils.Box",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.concurrent.ConcurrentHashMap"
] | import io.jawg.osmcontributor.model.entities.Poi; import io.jawg.osmcontributor.utils.Box; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; | import io.jawg.osmcontributor.model.entities.*; import io.jawg.osmcontributor.utils.*; import java.util.*; import java.util.concurrent.*; | [
"io.jawg.osmcontributor",
"java.util"
] | io.jawg.osmcontributor; java.util; | 1,835,562 |
Optional<DiscreteResource> lookup(DiscreteResourceId id); | Optional<DiscreteResource> lookup(DiscreteResourceId id); | /**
* Look up a discrete resource instance by ID.
*
* @param id id
* @return found instance enclosed by Optional
*/ | Look up a discrete resource instance by ID | lookup | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "core/store/dist/src/main/java/org/onosproject/store/resource/impl/DiscreteResources.java",
"license": "apache-2.0",
"size": 3125
} | [
"java.util.Optional",
"org.onosproject.net.resource.DiscreteResource",
"org.onosproject.net.resource.DiscreteResourceId"
] | import java.util.Optional; import org.onosproject.net.resource.DiscreteResource; import org.onosproject.net.resource.DiscreteResourceId; | import java.util.*; import org.onosproject.net.resource.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 651,065 |
public void edgeOverUtilized(Edge edge); | void function(Edge edge); | /**
* Called when an Edge utilization is above the safety threshold
* configured on the controller
*
* @param edge The edge which bandwidth usage is above the safety level
*/ | Called when an Edge utilization is above the safety threshold configured on the controller | edgeOverUtilized | {
"repo_name": "Milstein/controllerODP",
"path": "opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/topology/IListenTopoUpdates.java",
"license": "epl-1.0",
"size": 1784
} | [
"org.opendaylight.controller.sal.core.Edge"
] | import org.opendaylight.controller.sal.core.Edge; | import org.opendaylight.controller.sal.core.*; | [
"org.opendaylight.controller"
] | org.opendaylight.controller; | 1,769,188 |
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
} | void function(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } | /**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This removes a listener. | removeListener | {
"repo_name": "ZsoltKovari/incquery-examples-cps",
"path": "domains/org.eclipse.incquery.examples.cps.model.edit/src/org/eclipse/incquery/examples/cps/cyberPhysicalSystem/provider/CyberPhysicalSystemItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 13614
} | [
"org.eclipse.emf.edit.provider.INotifyChangedListener"
] | import org.eclipse.emf.edit.provider.INotifyChangedListener; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,239,753 |
private void validatePsmPerPeptideAnnotationNamesUniqueWithinSearchProgramAndType( SearchProgram searchProgram ) throws ProxlImporterDataException {
Set<String> annotationNames = new HashSet<>();
SearchProgram.PsmPerPeptideAnnotationTypes psmPerPeptideAnnotationTypes =
searchProgram.getPsmPerPeptideAnnotatio... | void function( SearchProgram searchProgram ) throws ProxlImporterDataException { Set<String> annotationNames = new HashSet<>(); SearchProgram.PsmPerPeptideAnnotationTypes psmPerPeptideAnnotationTypes = searchProgram.getPsmPerPeptideAnnotationTypes(); if ( psmPerPeptideAnnotationTypes == null ) { if ( log.isInfoEnabled(... | /**
* validate Psm Per Peptide Annotation Types
*
* @param searchProgram
* @throws ProxlImporterDataException
*/ | validate Psm Per Peptide Annotation Types | validatePsmPerPeptideAnnotationNamesUniqueWithinSearchProgramAndType | {
"repo_name": "yeastrc/proxl-web-app",
"path": "proxl_importer/src/main/java/org/yeastrc/proxl/import_xml_to_db/pre_validate_xml/ValidateAnnotationTypeRecords.java",
"license": "apache-2.0",
"size": 17658
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.yeastrc.proxl.import_xml_to_db.exceptions.ProxlImporterDataException",
"org.yeastrc.proxl_import.api.xml_dto.DescriptivePsmPerPeptideAnnotationType",
"org.yeastrc.proxl_import.api.xml_dto.DescriptivePsmPerPeptideAnnotationTypes",
"org.yeastrc.... | import java.util.HashSet; import java.util.List; import java.util.Set; import org.yeastrc.proxl.import_xml_to_db.exceptions.ProxlImporterDataException; import org.yeastrc.proxl_import.api.xml_dto.DescriptivePsmPerPeptideAnnotationType; import org.yeastrc.proxl_import.api.xml_dto.DescriptivePsmPerPeptideAnnotationTypes;... | import java.util.*; import org.yeastrc.proxl.import_xml_to_db.exceptions.*; import org.yeastrc.proxl_import.api.xml_dto.*; | [
"java.util",
"org.yeastrc.proxl",
"org.yeastrc.proxl_import"
] | java.util; org.yeastrc.proxl; org.yeastrc.proxl_import; | 454,902 |
private String extractID(String label) {
Matcher matcher = OLSON_ID_PATTERN.matcher(label);
if (matcher.find()) {
String id = matcher.group();
try {
DateTimeZone.forID(id); // just to check whether it exists
} catch (IllegalArgumentException e) { /... | String function(String label) { Matcher matcher = OLSON_ID_PATTERN.matcher(label); if (matcher.find()) { String id = matcher.group(); try { DateTimeZone.forID(id); } catch (IllegalArgumentException e) { return null; } return id; } return null; } | /**
* Looks for a substring that corresponds to an Olson ID.
*
* @param label the string to search through
* @return the substring that represents an Olson ID
*/ | Looks for a substring that corresponds to an Olson ID | extractID | {
"repo_name": "accesstest3/cfunambol",
"path": "common/pim-framework/src/main/java/com/funambol/common/pim/converter/TimeZoneHelper.java",
"license": "agpl-3.0",
"size": 50332
} | [
"java.util.regex.Matcher",
"org.joda.time.DateTimeZone"
] | import java.util.regex.Matcher; import org.joda.time.DateTimeZone; | import java.util.regex.*; import org.joda.time.*; | [
"java.util",
"org.joda.time"
] | java.util; org.joda.time; | 590,886 |
public Set<String> getFinalParameters() {
Set<String> setFinalParams = Collections.newSetFromMap(
new ConcurrentHashMap<String, Boolean>());
setFinalParams.addAll(finalParameters);
return setFinalParams;
} | Set<String> function() { Set<String> setFinalParams = Collections.newSetFromMap( new ConcurrentHashMap<String, Boolean>()); setFinalParams.addAll(finalParameters); return setFinalParams; } | /**
* Get the set of parameters marked final.
*
* @return final parameter set.
*/ | Get the set of parameters marked final | getFinalParameters | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 104133
} | [
"java.util.Collections",
"java.util.Set",
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.Collections; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,892,434 |
return this.token;
}
public static final Operator INCREMENT = new Operator("++");//$NON-NLS-1$
public static final Operator DECREMENT = new Operator("--");//$NON-NLS-1$
public static final Operator PLUS = new Operator("+");//$NON-NLS-1$
pub... | return this.token; } public static final Operator INCREMENT = new Operator("++"); public static final Operator DECREMENT = new Operator("--"); public static final Operator PLUS = new Operator("+"); public static final Operator MINUS = new Operator("-"); public static final Operator COMPLEMENT = new Operator("~"); publi... | /**
* Returns the character sequence for the operator.
*
* @return the character sequence for the operator
*/ | Returns the character sequence for the operator | toString | {
"repo_name": "riuvshin/che-plugins",
"path": "plugin-java/che-plugin-java-ext-java/src/main/java/org/eclipse/che/ide/ext/java/jdt/core/dom/PrefixExpression.java",
"license": "epl-1.0",
"size": 11109
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,248,833 |
@Test(expected=SocketTimeoutException.class)
public void testInterDNProtocolTimeout() throws Throwable {
final Server server = new TestServer(1, true);
server.start();
final InetSocketAddress addr = NetUtils.getConnectAddress(server);
DatanodeID fakeDnId = DFSTestUtil.getLocalDatanodeID(addr.getPor... | @Test(expected=SocketTimeoutException.class) void function() throws Throwable { final Server server = new TestServer(1, true); server.start(); final InetSocketAddress addr = NetUtils.getConnectAddress(server); DatanodeID fakeDnId = DFSTestUtil.getLocalDatanodeID(addr.getPort()); DatanodeInfo dInfo = new DatanodeInfo(fa... | /** Test to verify that InterDatanode RPC timesout as expected when
* the server DN does not respond.
*/ | Test to verify that InterDatanode RPC timesout as expected when the server DN does not respond | testInterDNProtocolTimeout | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestInterDatanodeProtocol.java",
"license": "apache-2.0",
"size": 16299
} | [
"java.net.InetSocketAddress",
"java.net.SocketTimeoutException",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.protocol.DatanodeInfo",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.datanode.DataNode",
"org.... | import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanod... | import java.net.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.net.*; import org.junit.*; | [
"java.net",
"org.apache.hadoop",
"org.junit"
] | java.net; org.apache.hadoop; org.junit; | 669,090 |
@Override
protected FlexiBean createRootData() {
FlexiBean out = super.createRootData();
LegalEntityDocument latestDoc = data().getLegalEntity();
LegalEntityDocument versionedLegalEntity = data().getVersioned();
out.put("latestLegalEntityDoc", latestDoc);
out.put("latestLegalEntity", latestDoc.g... | FlexiBean function() { FlexiBean out = super.createRootData(); LegalEntityDocument latestDoc = data().getLegalEntity(); LegalEntityDocument versionedLegalEntity = data().getVersioned(); out.put(STR, latestDoc); out.put(STR, latestDoc.getLegalEntity()); out.put(STR, versionedLegalEntity); out.put(STR, versionedLegalEnti... | /**
* Creates the output root data.
*
* @return the output root data, not null
*/ | Creates the output root data | createRootData | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Web/src/main/java/com/opengamma/web/legalentity/WebLegalEntityVersionResource.java",
"license": "apache-2.0",
"size": 3762
} | [
"com.opengamma.master.legalentity.LegalEntityDocument",
"org.apache.commons.lang.StringEscapeUtils",
"org.joda.beans.impl.flexi.FlexiBean"
] | import com.opengamma.master.legalentity.LegalEntityDocument; import org.apache.commons.lang.StringEscapeUtils; import org.joda.beans.impl.flexi.FlexiBean; | import com.opengamma.master.legalentity.*; import org.apache.commons.lang.*; import org.joda.beans.impl.flexi.*; | [
"com.opengamma.master",
"org.apache.commons",
"org.joda.beans"
] | com.opengamma.master; org.apache.commons; org.joda.beans; | 2,027,644 |
List queryForList(String id, Object parameterObject) throws SQLException; | List queryForList(String id, Object parameterObject) throws SQLException; | /**
* Executes a mapped SQL SELECT statement that returns data to populate
* a number of result objects.
* <p/>
* The parameter object is generally used to supply the input
* data for the WHERE clause parameter(s) of the SELECT statement.
*
* @param id The name of the statement to exec... | Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. The parameter object is generally used to supply the input data for the WHERE clause parameter(s) of the SELECT statement | queryForList | {
"repo_name": "cavajtennis/ibatis",
"path": "java/mapper/mapper2/src/com/ibatis/sqlmap/client/SqlMapExecutor.java",
"license": "apache-2.0",
"size": 9902
} | [
"java.sql.SQLException",
"java.util.List"
] | import java.sql.SQLException; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,260,648 |
@SuppressWarnings("unchecked")
public static <F,T> Expression getJoinedEntityField(From<?, F> grandparentJoin, Attribute<?, T> parentJoinAttr, SingularAttribute fieldAttr) {
// task -> * -> origJoin -> (fieldParentAttr field in) tojoinType -> fieldAttr
Class toAttrJoinType;
i... | @SuppressWarnings(STR) static <F,T> Expression function(From<?, F> grandparentJoin, Attribute<?, T> parentJoinAttr, SingularAttribute fieldAttr) { Class toAttrJoinType; if( parentJoinAttr instanceof SingularAttribute ) { toAttrJoinType = parentJoinAttr.getJavaType(); } else if( parentJoinAttr instanceof PluralAttribute... | /**
* This retrieves the correct field ({@link Expression}) that should be used when building the {@link Predicate}.
* </p>
* This field is necessary because of the amount of joins and the complexity in the human-task schema.
*
* @param grandparentJoin This is the parent join,
* ... | This retrieves the correct field (<code>Expression</code>) that should be used when building the <code>Predicate</code>. This field is necessary because of the amount of joins and the complexity in the human-task schema | getJoinedEntityField | {
"repo_name": "OnePaaS/jbpm",
"path": "jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/persistence/TaskQueryCriteriaUtil.java",
"license": "apache-2.0",
"size": 31036
} | [
"javax.persistence.criteria.Expression",
"javax.persistence.criteria.From",
"javax.persistence.criteria.Join",
"javax.persistence.criteria.JoinType",
"javax.persistence.metamodel.Attribute",
"javax.persistence.metamodel.CollectionAttribute",
"javax.persistence.metamodel.ListAttribute",
"javax.persiste... | import javax.persistence.criteria.Expression; import javax.persistence.criteria.From; import javax.persistence.criteria.Join; import javax.persistence.criteria.JoinType; import javax.persistence.metamodel.Attribute; import javax.persistence.metamodel.CollectionAttribute; import javax.persistence.metamodel.ListAttribute... | import javax.persistence.criteria.*; import javax.persistence.metamodel.*; | [
"javax.persistence"
] | javax.persistence; | 1,816,751 |
InfluxMetric metric(NodeId nodeId, String metricName); | InfluxMetric metric(NodeId nodeId, String metricName); | /**
* Returns a last metric value from a given node.
*
* @param nodeId node identification
* @param metricName metric name
* @return a metric value from a given node
*/ | Returns a last metric value from a given node | metric | {
"repo_name": "donNewtonAlpha/onos",
"path": "apps/influxdbmetrics/src/main/java/org/onosproject/influxdbmetrics/InfluxDbMetricsRetriever.java",
"license": "apache-2.0",
"size": 3650
} | [
"org.onosproject.cluster.NodeId"
] | import org.onosproject.cluster.NodeId; | import org.onosproject.cluster.*; | [
"org.onosproject.cluster"
] | org.onosproject.cluster; | 2,389,919 |
//-----------------------------------------------------------------------
public ObservableId getRateId() {
return rateId;
} | ObservableId function() { return rateId; } | /**
* Gets the identifier of the market data value that provides the rate.
* @return the value of the property, not null
*/ | Gets the identifier of the market data value that provides the rate | getRateId | {
"repo_name": "OpenGamma/Strata",
"path": "modules/market/src/main/java/com/opengamma/strata/market/curve/node/FixedInflationSwapCurveNode.java",
"license": "apache-2.0",
"size": 28897
} | [
"com.opengamma.strata.data.ObservableId"
] | import com.opengamma.strata.data.ObservableId; | import com.opengamma.strata.data.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 1,486,352 |
public synchronized void clear() {
if(tails.length != 0) throw new IllegalStateException("You cannot clear() a " + RingBufferControlWorkerPool.class.getSimpleName()
+ " with outstanding consumers.");
cursor.set(RingBufferConsumerControl.INITIAL_CURSOR_VALUE);
pubHeadAndTailCache.nextVal... | synchronized void function() { if(tails.length != 0) throw new IllegalStateException(STR + RingBufferControlWorkerPool.class.getSimpleName() + STR); cursor.set(RingBufferConsumerControl.INITIAL_CURSOR_VALUE); pubHeadAndTailCache.nextValue = RingBufferConsumerControl.INITIAL_CURSOR_VALUE; pubHeadAndTailCache.tailCache =... | /**
* The {@link RingBufferControlWorkerPool} can be cleared or "reset" so that it can be
* reused from scratch HOWEVER, the workers must be re-retrieved via newWorker(); none
* of the outstanding workers can be reused. Also, if any outstanding workers are still working
* when clear() is called they wil... | The <code>RingBufferControlWorkerPool</code> can be cleared or "reset" so that it can be reused from scratch HOWEVER, the workers must be re-retrieved via newWorker(); none of the outstanding workers can be reused. Also, if any outstanding workers are still working when clear() is called they will likely deadlock | clear | {
"repo_name": "Dempsy/dempsy-commons",
"path": "dempsy-ringbuffer/src/main/java/net/dempsy/ringbuffer/RingBufferControlWorkerPool.java",
"license": "apache-2.0",
"size": 14932
} | [
"com.lmax.disruptor.Sequence"
] | import com.lmax.disruptor.Sequence; | import com.lmax.disruptor.*; | [
"com.lmax.disruptor"
] | com.lmax.disruptor; | 476,311 |
public static List<String> expandLinkopts(
RuleContext ruleContext, String attrName, Iterable<String> values) {
List<String> result = new ArrayList<>();
Expander expander = ruleContext.getExpander().withDataExecLocations();
for (String value : values) {
if (isLinkoptLabel(value)) {
if ... | static List<String> function( RuleContext ruleContext, String attrName, Iterable<String> values) { List<String> result = new ArrayList<>(); Expander expander = ruleContext.getExpander().withDataExecLocations(); for (String value : values) { if (isLinkoptLabel(value)) { if (!expandLabel(ruleContext, result, value)) { ru... | /**
* Expands attribute value either using label expansion
* (if attemptLabelExpansion == {@code true} and it does not look like make
* variable or flag) or tokenizes and expands make variables.
*/ | Expands attribute value either using label expansion (if attemptLabelExpansion == true and it does not look like make variable or flag) or tokenizes and expands make variables | expandLinkopts | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java",
"license": "apache-2.0",
"size": 36294
} | [
"com.google.devtools.build.lib.analysis.Expander",
"com.google.devtools.build.lib.analysis.RuleContext",
"java.util.ArrayList",
"java.util.List"
] | import com.google.devtools.build.lib.analysis.Expander; import com.google.devtools.build.lib.analysis.RuleContext; import java.util.ArrayList; import java.util.List; | import com.google.devtools.build.lib.analysis.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 152,816 |
private synchronized void initialize() throws NoSuchAlgorithmException, InvalidKeySpecException,
NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException
{
if (!isInitialized())
{
this.cipher = CipherFactory.newPBECipher(this.normalizedPassword.toCharArray(),
newOperationMode(), ... | synchronized void function() throws NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException { if (!isInitialized()) { this.cipher = CipherFactory.newPBECipher(this.normalizedPassword.toCharArray(), newOperationMode(), CompoundAlgorithm.PBE_WITH_... | /**
* Initializes the {@link PasswordFileEncryptor} object.
*
* @throws InvalidAlgorithmParameterException
* is thrown if initialization of the cipher object fails.
* @throws NoSuchPaddingException
* is thrown if instantiation of the cipher object fails.
* @throws InvalidKeySpecExc... | Initializes the <code>PasswordFileEncryptor</code> object | initialize | {
"repo_name": "astrapi69/mystic-crypt",
"path": "src/main/java/io/github/astrapi69/crypto/pw/PasswordFileEncryptor.java",
"license": "mit",
"size": 6043
} | [
"io.github.astrapi69.crypto.compound.CompoundAlgorithm",
"io.github.astrapi69.crypto.factory.CipherFactory",
"java.security.InvalidAlgorithmParameterException",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.spec.InvalidKeySpecException",
"javax.crypto.NoSu... | import io.github.astrapi69.crypto.compound.CompoundAlgorithm; import io.github.astrapi69.crypto.factory.CipherFactory; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; impo... | import io.github.astrapi69.crypto.compound.*; import io.github.astrapi69.crypto.factory.*; import java.security.*; import java.security.spec.*; import javax.crypto.*; | [
"io.github.astrapi69",
"java.security",
"javax.crypto"
] | io.github.astrapi69; java.security; javax.crypto; | 1,357,965 |
public void addSeries(MatrixSeries series) {
ParamChecks.nullNotPermitted(series, "series");
// FIXME: Check that there isn't already a series with the same key
// add the series...
this.seriesList.add(series);
series.addChangeListener(this);
fireDatasetChange... | void function(MatrixSeries series) { ParamChecks.nullNotPermitted(series, STR); this.seriesList.add(series); series.addChangeListener(this); fireDatasetChanged(); } | /**
* Adds a series to the collection.
* <P>
* Notifies all registered listeners that the dataset has changed.
* </p>
*
* @param series the series (<code>null</code> not permitted).
*/ | Adds a series to the collection. Notifies all registered listeners that the dataset has changed. | addSeries | {
"repo_name": "Mr-Steve/LTSpice_Library_Manager",
"path": "libs/jfreechart-1.0.16/source/org/jfree/data/xy/MatrixSeriesCollection.java",
"license": "gpl-2.0",
"size": 10218
} | [
"org.jfree.chart.util.ParamChecks"
] | import org.jfree.chart.util.ParamChecks; | import org.jfree.chart.util.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,420,798 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.