method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public boolean ownUpdatesAreVisible(int type) throws SQLException {
return false;
} | boolean function(int type) throws SQLException { return false; } | /**
* JDBC 2.0 Determine whether a result set's own changes visible.
*
* @param type
* set type, i.e. ResultSet.TYPE_XXX
* @return true if changes are visible for the result set type
* @exception SQLException
* if a database-access error occurs.
*/ | JDBC 2.0 Determine whether a result set's own changes visible | ownUpdatesAreVisible | {
"repo_name": "lukearndt/CommunityRosterSystem",
"path": "lib/mysql-connector-java-5.1.21/src/com/mysql/jdbc/DatabaseMetaData.java",
"license": "mit",
"size": 264384
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 222,759 |
public static String[] setToStringArray(Set<String> set) {
return set.toArray(new String[set.size()]);
}
| static String[] function(Set<String> set) { return set.toArray(new String[set.size()]); } | /**
* Convert a Set of Strings to an Array of Strings
* @param set
* @return the string array
*/ | Convert a Set of Strings to an Array of Strings | setToStringArray | {
"repo_name": "OCMC-Translation-Projects/ioc-liturgical-ws",
"path": "src/main/java/net/ages/alwb/gateway/utils/CommonFileUtils.java",
"license": "epl-1.0",
"size": 18105
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,431,491 |
public static boolean isValid(final String cssValue) {
final String trimmedCssValue = TagStringUtil.toLowerCase(StringUtil.strip(cssValue));
if (StringUtil.containsSpace(trimmedCssValue)) {
return false;
}
for (final CssLengthUnit cssLengthUnit : CssLengthUnit.values()... | static boolean function(final String cssValue) { final String trimmedCssValue = TagStringUtil.toLowerCase(StringUtil.strip(cssValue)); if (StringUtil.containsSpace(trimmedCssValue)) { return false; } for (final CssLengthUnit cssLengthUnit : CssLengthUnit.values()) { final String unit = cssLengthUnit.getUnit(); if (trim... | /**
* validates if the given cssValue is valid for this class.
*
* @param cssValue the value to check.
* @return true if valid and false if invalid.
* @author WFF
* @since 1.0.0
*/ | validates if the given cssValue is valid for this class | isValid | {
"repo_name": "webfirmframework/wff",
"path": "wffweb/src/main/java/com/webfirmframework/wffweb/css/HeightCss.java",
"license": "apache-2.0",
"size": 10278
} | [
"com.webfirmframework.wffweb.util.StringUtil",
"com.webfirmframework.wffweb.util.TagStringUtil"
] | import com.webfirmframework.wffweb.util.StringUtil; import com.webfirmframework.wffweb.util.TagStringUtil; | import com.webfirmframework.wffweb.util.*; | [
"com.webfirmframework.wffweb"
] | com.webfirmframework.wffweb; | 915,906 |
public java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI> getSubterm_integers_DivisionHLAPI() {
java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI>();
for (Term elemnt : getSubterm()) {
if (el... | java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI> function() { java.util.List<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI> retour = new ArrayList<fr.lip6.move.pnml.pthlpng.integers.hlapi.DivisionHLAPI>(); for (Term elemnt : getSubterm()) { if (elemnt.getClass().equals(fr.lip6.move.pnml.p... | /**
* This accessor return a list of encapsulated subelement, only of DivisionHLAPI
* kind. WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of DivisionHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_integers_DivisionHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/integers/hlapi/ModuloHLAPI.java",
"license": "epl-1.0",
"size": 69704
} | [
"fr.lip6.move.pnml.pthlpng.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.pthlpng.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.pthlpng.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 78,678 |
final JFreeChart result = ChartFactory.createTimeSeriesChart(
"Dynamic Data Demo",
"Time",
"Value",
dataset,
true,
true,
false
);
final XYPlot plot = result.getXYPlot();
ValueAxis axis... | final JFreeChart result = ChartFactory.createTimeSeriesChart( STR, "Time", "Value", dataset, true, true, false ); final XYPlot plot = result.getXYPlot(); ValueAxis axis = plot.getDomainAxis(); axis.setAutoRange(true); axis.setFixedAutoRange(60000.0); axis = plot.getRangeAxis(); axis.setRange(0.0, 200.0); return result;... | /**
* Creates a sample chart.
*
* @param dataset the dataset.
*
* @return A sample chart.
*/ | Creates a sample chart | createChart | {
"repo_name": "dSquadAdmin/WRCPKMB",
"path": "src/DynamicDataDemo.java",
"license": "gpl-3.0",
"size": 5877
} | [
"org.jfree.chart.ChartFactory",
"org.jfree.chart.JFreeChart",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.XYPlot"
] | import org.jfree.chart.ChartFactory; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; | import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,091,333 |
public boolean mkdirs(Path f, FsPermission permission) throws IOException {
throw new IOException("Har: mkdirs not allowed");
} | boolean function(Path f, FsPermission permission) throws IOException { throw new IOException(STR); } | /**
* not implemented.
*/ | not implemented | mkdirs | {
"repo_name": "pombredanne/brisk-hadoop-common",
"path": "src/core/org/apache/hadoop/fs/HarFileSystem.java",
"license": "apache-2.0",
"size": 27618
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,025,447 |
private void setDefaultShell()
{
// If this is windows set the shell to command.com
// or cmd.exe with correct arguments.
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{
if ( Os.isFamily( Os.FAMILY_WIN9X ) )
{
setShell( new CommandShell() );
... | void function() { if ( Os.isFamily( Os.FAMILY_WINDOWS ) ) { if ( Os.isFamily( Os.FAMILY_WIN9X ) ) { setShell( new CommandShell() ); } else { setShell( new CmdShell() ); } } else { setShell( new BourneShell() ); } } | /**
* <p>Sets the shell or command-line interpretor
* for the detected operating system,
* and the shell arguments.</p>
*/ | Sets the shell or command-line interpretor for the detected operating system, and the shell arguments | setDefaultShell | {
"repo_name": "Reissner/maven-latex-plugin",
"path": "maven-latex-plugin/src/main/java/org/codehaus/plexus/util/cli/Commandline.java",
"license": "apache-2.0",
"size": 23162
} | [
"org.codehaus.plexus.util.Os",
"org.codehaus.plexus.util.cli.shell.BourneShell",
"org.codehaus.plexus.util.cli.shell.CmdShell",
"org.codehaus.plexus.util.cli.shell.CommandShell"
] | import org.codehaus.plexus.util.Os; import org.codehaus.plexus.util.cli.shell.BourneShell; import org.codehaus.plexus.util.cli.shell.CmdShell; import org.codehaus.plexus.util.cli.shell.CommandShell; | import org.codehaus.plexus.util.*; import org.codehaus.plexus.util.cli.shell.*; | [
"org.codehaus.plexus"
] | org.codehaus.plexus; | 1,002,507 |
public static String readUTFZBytes(final ByteInput input) throws IOException {
final StringBuilder builder = new StringBuilder();
for (;;) {
final int c = readUTFChar(input);
if (c == -1) {
return builder.toString();
}
builder.append((c... | static String function(final ByteInput input) throws IOException { final StringBuilder builder = new StringBuilder(); for (;;) { final int c = readUTFChar(input); if (c == -1) { return builder.toString(); } builder.append((char) c); } } | /**
* Read a null-terminated modified UTF-8 string from the given byte input. Bytes are read until a 0 is found or
* until the end of the stream, whichever comes first.
*
* @param input the input
* @return the string
* @throws IOException if an I/O error occurs
* @see java.io.DataInp... | Read a null-terminated modified UTF-8 string from the given byte input. Bytes are read until a 0 is found or until the end of the stream, whichever comes first | readUTFZBytes | {
"repo_name": "kohsuke/jboss-marshalling",
"path": "api/src/main/java/org/jboss/marshalling/UTFUtils.java",
"license": "apache-2.0",
"size": 12090
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 643,800 |
private static List<FlowSpec> splitFlowSpec(FlowSpec flowSpec) {
long flowExecutionId = FlowUtils.getOrCreateFlowExecutionId(flowSpec);
List<FlowSpec> flowSpecs = new ArrayList<>();
Config flowConfig = flowSpec.getConfig();
if (flowConfig.hasPath(ConfigurationKeys.DATASET_SUBPATHS_KEY)) {
List<... | static List<FlowSpec> function(FlowSpec flowSpec) { long flowExecutionId = FlowUtils.getOrCreateFlowExecutionId(flowSpec); List<FlowSpec> flowSpecs = new ArrayList<>(); Config flowConfig = flowSpec.getConfig(); if (flowConfig.hasPath(ConfigurationKeys.DATASET_SUBPATHS_KEY)) { List<String> datasetSubpaths = ConfigUtils.... | /**
* If {@link FlowSpec} has {@link ConfigurationKeys#DATASET_SUBPATHS_KEY}, split it into multiple flowSpecs using a
* provided base input and base output path to generate multiple source/destination paths.
*/ | If <code>FlowSpec</code> has <code>ConfigurationKeys#DATASET_SUBPATHS_KEY</code>, split it into multiple flowSpecs using a provided base input and base output path to generate multiple source/destination paths | splitFlowSpec | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java",
"license": "apache-2.0",
"size": 15987
} | [
"com.typesafe.config.Config",
"com.typesafe.config.ConfigValueFactory",
"java.util.ArrayList",
"java.util.List",
"org.apache.gobblin.configuration.ConfigurationKeys",
"org.apache.gobblin.runtime.api.FlowSpec",
"org.apache.gobblin.service.modules.flowgraph.DatasetDescriptorConfigKeys",
"org.apache.gobb... | import com.typesafe.config.Config; import com.typesafe.config.ConfigValueFactory; import java.util.ArrayList; import java.util.List; import org.apache.gobblin.configuration.ConfigurationKeys; import org.apache.gobblin.runtime.api.FlowSpec; import org.apache.gobblin.service.modules.flowgraph.DatasetDescriptorConfigKeys;... | import com.typesafe.config.*; import java.util.*; import org.apache.gobblin.configuration.*; import org.apache.gobblin.runtime.api.*; import org.apache.gobblin.service.modules.flowgraph.*; import org.apache.gobblin.util.*; import org.apache.hadoop.fs.*; | [
"com.typesafe.config",
"java.util",
"org.apache.gobblin",
"org.apache.hadoop"
] | com.typesafe.config; java.util; org.apache.gobblin; org.apache.hadoop; | 2,023,016 |
public static int writev(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return Libcore.os.writev(fd, buffers, offsets, byteCounts); } | static int functionv(FileDescriptor fd, Object[] buffers, int[] offsets, int[] byteCounts) throws ErrnoException, InterruptedIOException { return Libcore.os.writev(fd, buffers, offsets, byteCounts); } | /**
* See <a href="http://man7.org/linux/man-pages/man2/write.2.html">write(2)</a>.
*/ | See write(2) | write | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/system/Os.java",
"license": "gpl-3.0",
"size": 28185
} | [
"java.io.FileDescriptor",
"java.io.InterruptedIOException"
] | import java.io.FileDescriptor; import java.io.InterruptedIOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,684,213 |
public int getInt(String key, int defaultValue) {
return get(key, toInt, Optional.<Integer>absent()).or(defaultValue);
} | int function(String key, int defaultValue) { return get(key, toInt, Optional.<Integer>absent()).or(defaultValue); } | /**
* Return the value of the property as an int if it exists or defaultValue if
* it does not
* @param key String
* @param defaultValue int
* @return int
*/ | Return the value of the property as an int if it exists or defaultValue if it does not | getInt | {
"repo_name": "worldline-messaging/activitystreams",
"path": "core/src/main/java/com/ibm/common/activitystreams/ASObject.java",
"license": "apache-2.0",
"size": 65559
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,266,805 |
public GrpcServiceBuilder compressorRegistry(CompressorRegistry registry) {
compressorRegistry = requireNonNull(registry, "registry");
return this;
} | GrpcServiceBuilder function(CompressorRegistry registry) { compressorRegistry = requireNonNull(registry, STR); return this; } | /**
* Sets the {@link CompressorRegistry} to use when compressing messages. If not set, will use the
* default, which supports gzip only.
*/ | Sets the <code>CompressorRegistry</code> to use when compressing messages. If not set, will use the default, which supports gzip only | compressorRegistry | {
"repo_name": "jonefeewang/armeria",
"path": "grpc/src/main/java/com/linecorp/armeria/server/grpc/GrpcServiceBuilder.java",
"license": "apache-2.0",
"size": 8151
} | [
"io.grpc.CompressorRegistry",
"java.util.Objects"
] | import io.grpc.CompressorRegistry; import java.util.Objects; | import io.grpc.*; import java.util.*; | [
"io.grpc",
"java.util"
] | io.grpc; java.util; | 2,823,055 |
private int compareByOrganization(User o1, User o2)
{
Attribute at1 = o1.getAttribute("urn:perun:user:attribute-def:def:organization");
Attribute at2 = o2.getAttribute("urn:perun:user:attribute-def:def:organization");
String at1value = "";
String at2value = "";
if (at1 != null && at1.getValue() != null ... | int function(User o1, User o2) { Attribute at1 = o1.getAttribute(STR); Attribute at2 = o2.getAttribute(STR); String at1value = STRSTRnullSTRnull".equalsIgnoreCase(at2.getValue())) { at2value = at2.getValue(); } return Collator.getInstance().compare(at1value, at2value); } | /**
* Compares RichMembers by organizations
* @param o1
* @param o2
* @return
*/ | Compares RichMembers by organizations | compareByOrganization | {
"repo_name": "martin-kuba/perun",
"path": "perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/json/comparators/RichUserComparator.java",
"license": "bsd-2-clause",
"size": 2548
} | [
"cz.metacentrum.perun.webgui.client.resources.Collator",
"cz.metacentrum.perun.webgui.model.Attribute",
"cz.metacentrum.perun.webgui.model.User"
] | import cz.metacentrum.perun.webgui.client.resources.Collator; import cz.metacentrum.perun.webgui.model.Attribute; import cz.metacentrum.perun.webgui.model.User; | import cz.metacentrum.perun.webgui.client.resources.*; import cz.metacentrum.perun.webgui.model.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,270,954 |
SshClient ssh = new SshClient();
HostKeyVerification host = new IgnoreHostKeyVerification();
String hostStr = getBundle().getString("ssh.host");
ssh.connect(hostStr, host);
PasswordAuthenticationClient auth = new PasswordAuthenticationClient();
auth.setUsername(getBundle().getString("ssh.user"));
... | SshClient ssh = new SshClient(); HostKeyVerification host = new IgnoreHostKeyVerification(); String hostStr = getBundle().getString(STR); ssh.connect(hostStr, host); PasswordAuthenticationClient auth = new PasswordAuthenticationClient(); auth.setUsername(getBundle().getString(STR)); auth.setPassword(getBundle().getStri... | /**
* connect to host
*
* @return
* @throws Exception
*/ | connect to host | connectSsh | {
"repo_name": "infoneershalin/qaf",
"path": "src/com/qmetry/qaf/automation/util/SshUtil.java",
"license": "gpl-3.0",
"size": 5658
} | [
"com.qmetry.qaf.automation.core.ConfigurationManager",
"com.sshtools.j2ssh.SshClient",
"com.sshtools.j2ssh.authentication.AuthenticationProtocolState",
"com.sshtools.j2ssh.authentication.PasswordAuthenticationClient",
"com.sshtools.j2ssh.transport.HostKeyVerification",
"com.sshtools.j2ssh.transport.Ignore... | import com.qmetry.qaf.automation.core.ConfigurationManager; import com.sshtools.j2ssh.SshClient; import com.sshtools.j2ssh.authentication.AuthenticationProtocolState; import com.sshtools.j2ssh.authentication.PasswordAuthenticationClient; import com.sshtools.j2ssh.transport.HostKeyVerification; import com.sshtools.j2ssh... | import com.qmetry.qaf.automation.core.*; import com.sshtools.j2ssh.*; import com.sshtools.j2ssh.authentication.*; import com.sshtools.j2ssh.transport.*; | [
"com.qmetry.qaf",
"com.sshtools.j2ssh"
] | com.qmetry.qaf; com.sshtools.j2ssh; | 2,014,907 |
void close(long timeStampMs)
{
// log.debug(this + " sending a close notification");
// record(timeStampMs, 0L, 0L, new InternalClosingOperation(), null);
// log.debug(this + " sent the close notification");
// csvStatsCollector.dispose();
}
// Protected --------------------... | void close(long timeStampMs) { } private class InternalClosingOperation implements Operation { | /**
* Use only for testing. close() is for public use.
*
* @see CollectorBasedCsvStatistics#close()
*/ | Use only for testing. close() is for public use | close | {
"repo_name": "NovaOrdis/gld",
"path": "core/api/src/main/java/io/novaordis/gld/api/statistics/CollectorBasedCsvStatistics.java",
"license": "apache-2.0",
"size": 15821
} | [
"io.novaordis.gld.api.Operation"
] | import io.novaordis.gld.api.Operation; | import io.novaordis.gld.api.*; | [
"io.novaordis.gld"
] | io.novaordis.gld; | 516,965 |
ReceivedCaseFile save(ReceivedCaseFile receivedCaseFile); | ReceivedCaseFile save(ReceivedCaseFile receivedCaseFile); | /**
* Saves receivedCaseFile
* @param receivedCaseFile created by submitting the form
* @return saved receivedCaseFile
*/ | Saves receivedCaseFile | save | {
"repo_name": "bugielmarek/rep_one",
"path": "crudone/src/main/java/com/bugielmarek/crudone/services/ReceivedCaseFileService.java",
"license": "apache-2.0",
"size": 1483
} | [
"com.bugielmarek.crudone.models.ReceivedCaseFile"
] | import com.bugielmarek.crudone.models.ReceivedCaseFile; | import com.bugielmarek.crudone.models.*; | [
"com.bugielmarek.crudone"
] | com.bugielmarek.crudone; | 2,487,717 |
@Deployment
@Test
public void testNonInterruptingSignalWithSubProcess() {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("nonInterruptingSignalWithSubProcess");
List<Task> tasks = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).list();
assertEquals(1, tasks.si... | void function() { ProcessInstance pi = runtimeService.startProcessInstanceByKey(STR); List<Task> tasks = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).list(); assertEquals(1, tasks.size()); Task currentTask = tasks.get(0); assertEquals(STR, currentTask.getName()); runtimeService.signalEvent... | /**
* TestCase to reproduce Issue ACT-1344
*/ | TestCase to reproduce Issue ACT-1344 | testNonInterruptingSignalWithSubProcess | {
"repo_name": "falko/camunda-bpm-platform",
"path": "engine/src/test/java/org/camunda/bpm/engine/test/bpmn/event/signal/SignalEventTest.java",
"license": "apache-2.0",
"size": 29296
} | [
"java.util.List",
"org.camunda.bpm.engine.runtime.ProcessInstance",
"org.camunda.bpm.engine.task.Task",
"org.junit.Assert"
] | import java.util.List; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.Task; import org.junit.Assert; | import java.util.*; import org.camunda.bpm.engine.runtime.*; import org.camunda.bpm.engine.task.*; import org.junit.*; | [
"java.util",
"org.camunda.bpm",
"org.junit"
] | java.util; org.camunda.bpm; org.junit; | 1,025,214 |
@Test
public void testUninstallIntents() {
List<Intent> intentsToUninstall = createProtectionIntents(CP2);
List<Intent> intentsToInstall = Lists.newArrayList();
IntentData toUninstall = new IntentData(createP2PIntent(),
IntentState.INSTALLI... | void function() { List<Intent> intentsToUninstall = createProtectionIntents(CP2); List<Intent> intentsToInstall = Lists.newArrayList(); IntentData toUninstall = new IntentData(createP2PIntent(), IntentState.INSTALLING, new WallClockTimestamp()); IntentData toInstall = null; IntentOperationContext<ProtectionEndpointInte... | /**
* Uninstalls protection endpoint Intents.
* framework.
*/ | Uninstalls protection endpoint Intents. framework | testUninstallIntents | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "core/net/src/test/java/org/onosproject/net/intent/impl/installer/ProtectionEndpointIntentInstallerTest.java",
"license": "apache-2.0",
"size": 12610
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.junit.Assert",
"org.onosproject.net.intent.Intent",
"org.onosproject.net.intent.IntentData",
"org.onosproject.net.intent.IntentInstallationContext",
"org.onosproject.net.intent.IntentOperationContext",
"org.onosproject.net.intent.IntentState",
... | import com.google.common.collect.Lists; import java.util.List; import org.junit.Assert; import org.onosproject.net.intent.Intent; import org.onosproject.net.intent.IntentData; import org.onosproject.net.intent.IntentInstallationContext; import org.onosproject.net.intent.IntentOperationContext; import org.onosproject.ne... | import com.google.common.collect.*; import java.util.*; import org.junit.*; import org.onosproject.net.intent.*; import org.onosproject.store.service.*; | [
"com.google.common",
"java.util",
"org.junit",
"org.onosproject.net",
"org.onosproject.store"
] | com.google.common; java.util; org.junit; org.onosproject.net; org.onosproject.store; | 1,434,307 |
public Map<String,String> getArguments() {
return arguments;
}
| Map<String,String> function() { return arguments; } | /**
* Returns the arguments entered in the binding string.
* @return a map of arguments
*/ | Returns the arguments entered in the binding string | getArguments | {
"repo_name": "abrenk/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/ZWaveBindingConfig.java",
"license": "epl-1.0",
"size": 2909
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,047,379 |
if (currentMusic != null) {
SoundStore.get().poll(delta);
if (!SoundStore.get().isMusicPlaying()) {
if (!currentMusic.positioning) {
Music oldMusic = currentMusic;
currentMusic = null;
oldMusic.fireMusicEnded();
}
} else {
currentMusic.update(delta);
}
}
}
... | if (currentMusic != null) { SoundStore.get().poll(delta); if (!SoundStore.get().isMusicPlaying()) { if (!currentMusic.positioning) { Music oldMusic = currentMusic; currentMusic = null; oldMusic.fireMusicEnded(); } } else { currentMusic.update(delta); } } } private Audio sound; private boolean playing; private ArrayList... | /**
* Poll the state of the current music. This causes streaming music
* to stream and checks listeners. Note that if you're using a game container
* this will be auto-magically called for you.
*
* @param delta The amount of time since last poll
*/ | Poll the state of the current music. This causes streaming music to stream and checks listeners. Note that if you're using a game container this will be auto-magically called for you | poll | {
"repo_name": "nguillaumin/slick2d-maven",
"path": "slick2d-core/src/main/java/org/newdawn/slick/Music.java",
"license": "bsd-3-clause",
"size": 11398
} | [
"java.io.InputStream",
"java.util.ArrayList",
"org.newdawn.slick.openal.Audio",
"org.newdawn.slick.openal.SoundStore",
"org.newdawn.slick.util.Log"
] | import java.io.InputStream; import java.util.ArrayList; import org.newdawn.slick.openal.Audio; import org.newdawn.slick.openal.SoundStore; import org.newdawn.slick.util.Log; | import java.io.*; import java.util.*; import org.newdawn.slick.openal.*; import org.newdawn.slick.util.*; | [
"java.io",
"java.util",
"org.newdawn.slick"
] | java.io; java.util; org.newdawn.slick; | 1,043,793 |
CheckNameAvailabilityResultInner innerModel(); | CheckNameAvailabilityResultInner innerModel(); | /**
* Gets the inner com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner object.
*
* @return the inner object.
*/ | Gets the inner com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner object | innerModel | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityResult.java",
"license": "mit",
"size": 1403
} | [
"com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner"
] | import com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner; | import com.azure.resourcemanager.batch.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,348,374 |
private XMLReader getReader() {
JAXPUtils.getParser();
return JAXPUtils.getXMLReader();
} | XMLReader function() { JAXPUtils.getParser(); return JAXPUtils.getXMLReader(); } | /**
* Get our reader
* @return a reader
*/ | Get our reader | getReader | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/taskdefs/condition/ParserSupports.java",
"license": "mit",
"size": 4801
} | [
"org.apache.tools.ant.util.JAXPUtils",
"org.xml.sax.XMLReader"
] | import org.apache.tools.ant.util.JAXPUtils; import org.xml.sax.XMLReader; | import org.apache.tools.ant.util.*; import org.xml.sax.*; | [
"org.apache.tools",
"org.xml.sax"
] | org.apache.tools; org.xml.sax; | 745,510 |
public static Action createAction(User user, ActionType type, String name,
Date earliestAction) {
ActionType lookedUpType = ActionFactory.lookupActionTypeByLabel(type.getLabel());
Action action = createScheduledAction(user, lookedUpType, name, earliestAction);
ActionFactory.... | static Action function(User user, ActionType type, String name, Date earliestAction) { ActionType lookedUpType = ActionFactory.lookupActionTypeByLabel(type.getLabel()); Action action = createScheduledAction(user, lookedUpType, name, earliestAction); ActionFactory.save(action); ActionFactory.getSession().flush(); return... | /**
* Creates, saves and returns a new Action
* @param user the user who created this action
* @param type the action type
* @param name the action name
* @param earliestAction the earliest execution date
* @return a saved Action
*/ | Creates, saves and returns a new Action | createAction | {
"repo_name": "ogajduse/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/action/ActionManager.java",
"license": "gpl-2.0",
"size": 71516
} | [
"com.redhat.rhn.domain.action.Action",
"com.redhat.rhn.domain.action.ActionFactory",
"com.redhat.rhn.domain.action.ActionType",
"com.redhat.rhn.domain.user.User",
"java.util.Date"
] | import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionFactory; import com.redhat.rhn.domain.action.ActionType; import com.redhat.rhn.domain.user.User; import java.util.Date; | import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.user.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 1,822,307 |
public Iterator<Triple<Node, EdgeData, Node>> outEdgesIterator() {
return new Iterator<Triple<Node, EdgeData, Node>>() {
protected final Iterator<Node> nodeIt = nodeIterator();
protected Iterator<Triple<Node, EdgeData, Node>> edgeIt = null; | Iterator<Triple<Node, EdgeData, Node>> function() { return new Iterator<Triple<Node, EdgeData, Node>>() { protected final Iterator<Node> nodeIt = nodeIterator(); protected Iterator<Triple<Node, EdgeData, Node>> edgeIt = null; | /**
* Returns an iterator to all the outgoing edges of this graph.
*/ | Returns an iterator to all the outgoing edges of this graph | outEdgesIterator | {
"repo_name": "DuncanvR/dvrlib",
"path": "src/dvrlib/graph/AbstractGraph.java",
"license": "gpl-3.0",
"size": 9874
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 407,651 |
Collection<BgpSession> getBgpSessions(); | Collection<BgpSession> getBgpSessions(); | /**
* Gets the BGP sessions.
*
* @return the BGP sessions
*/ | Gets the BGP sessions | getBgpSessions | {
"repo_name": "sdnwiselab/onos",
"path": "apps/routing/common/src/main/java/org/onosproject/routing/bgp/BgpInfoService.java",
"license": "apache-2.0",
"size": 1322
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,394,006 |
private ImageView getAttachedImageView() {
final ImageView imageView = imageViewReference.get();
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
if (getParentTask() == bitmapWorkerTask) {
return imageView;
}
return null;
}
}
private stati... | ImageView function() { final ImageView imageView = imageViewReference.get(); final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView); if (getParentTask() == bitmapWorkerTask) { return imageView; } return null; } } private static class AsyncDrawable extends BitmapDrawable { private BitmapWorkerTask bitm... | /**
* Returns the ImageView associated with this task as long as the
* ImageView's task still points to this task as well. Returns null
* otherwise.
*/ | Returns the ImageView associated with this task as long as the ImageView's task still points to this task as well. Returns null otherwise | getAttachedImageView | {
"repo_name": "ZhQYuan/50AH-code",
"path": "hack040/src/com/manning/androidhacks/hack040/util/ImageWorker.java",
"license": "mit",
"size": 14877
} | [
"android.content.res.Resources",
"android.graphics.Bitmap",
"android.graphics.drawable.BitmapDrawable",
"android.widget.ImageView"
] | import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.widget.ImageView; | import android.content.res.*; import android.graphics.*; import android.graphics.drawable.*; import android.widget.*; | [
"android.content",
"android.graphics",
"android.widget"
] | android.content; android.graphics; android.widget; | 2,560,925 |
public SELF isAfterOrEqualTo(Instant other) {
dates.assertIsAfterOrEqualTo(info, actual, Date.from(other));
return myself;
}
/**
* Same assertion as {@link #isAfterOrEqualsTo(Date)} but given date is represented as String either with one of the
* supported defaults date format or a user custom date... | SELF function(Instant other) { dates.assertIsAfterOrEqualTo(info, actual, Date.from(other)); return myself; } /** * Same assertion as {@link #isAfterOrEqualsTo(Date)} but given date is represented as String either with one of the * supported defaults date format or a user custom date format (set with method {@link #wit... | /**
* Verifies that the actual {@code Date} is after or equal to the given {@link Instant}.
* <p>
* Example:
* <pre><code class='java'> // assertions succeed
* // theTwoTowers release date : 2002-12-18
* assertThat(theTwoTowers.getReleaseDate()).assertIsAfterOrEqualTo(Instant.parse("2002-12-17T00:00:0... | Verifies that the actual Date is after or equal to the given <code>Instant</code>. Example: <code> // assertions succeed theTwoTowers release date : 2002-12-18 assertThat(theTwoTowers.getReleaseDate()).assertIsAfterOrEqualTo(Instant.parse("2002-12-17T00:00:00.00Z")) .assertIsAfterOrEqualTo(Instant.parse("2002-12-18T00:... | isAfterOrEqualTo | {
"repo_name": "joel-costigliola/assertj-core",
"path": "src/main/java/org/assertj/core/api/AbstractDateAssert.java",
"license": "apache-2.0",
"size": 167024
} | [
"java.text.DateFormat",
"java.time.Instant",
"java.util.Date"
] | import java.text.DateFormat; import java.time.Instant; import java.util.Date; | import java.text.*; import java.time.*; import java.util.*; | [
"java.text",
"java.time",
"java.util"
] | java.text; java.time; java.util; | 1,175,092 |
public void mult(BigInteger factor)
{
for (int i = 0; i < coeffs.length; i++)
{
coeffs[i] = coeffs[i].multiply(factor);
}
} | void function(BigInteger factor) { for (int i = 0; i < coeffs.length; i++) { coeffs[i] = coeffs[i].multiply(factor); } } | /**
* Multiplies each coefficient by a <code>BigInteger</code>. Does not return a new polynomial but modifies this polynomial.
*
* @param factor
*/ | Multiplies each coefficient by a <code>BigInteger</code>. Does not return a new polynomial but modifies this polynomial | mult | {
"repo_name": "xdv/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/pqc/math/ntru/polynomial/BigIntPolynomial.java",
"license": "isc",
"size": 11348
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,758,993 |
protected String extractLink(final CharacterIterator ci) {
final StringBuilder sbuf = new StringBuilder();
char ch = ci.current();
char terminator = ' ';
// color quoted compound words like "#'iron sword'"
if (ch == '\'') {
terminator = ch;
}
while (ch != CharacterIterator.DONE) {
if (ch == ter... | String function(final CharacterIterator ci) { final StringBuilder sbuf = new StringBuilder(); char ch = ci.current(); char terminator = ' '; if (ch == '\'') { terminator = ch; } while (ch != CharacterIterator.DONE) { if (ch == terminator) { if (terminator == ' ') { ch = ci.next(); if (ch == '#') { ch = ' '; } else { ci... | /**
* Extract link content from a character iterator. It is assumed that the
* '#' has already been eaten. It leaves the character iterator at the first
* character after the link text.
*
* @param ci
* The character iterator.
*
* @return Link text (or an empty string).
*/ | Extract link content from a character iterator. It is assumed that the '#' has already been eaten. It leaves the character iterator at the first character after the link text | extractLink | {
"repo_name": "markuskeunecke/stendhal",
"path": "src/games/stendhal/client/gui/KHtmlEdit.java",
"license": "gpl-2.0",
"size": 11203
} | [
"java.text.CharacterIterator"
] | import java.text.CharacterIterator; | import java.text.*; | [
"java.text"
] | java.text; | 2,130,955 |
Entry[] getTestAttributeSet() {
return null;
}//end getTestAttributeSet | Entry[] getTestAttributeSet() { return null; } | /** Constructs and returns the set of attributes to add (overrides
* the parent class' version of this method)
*/ | Constructs and returns the set of attributes to add (overrides the parent class' version of this method) | getTestAttributeSet | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/test/impl/fiddler/joinadmin/AddLookupAttributesNull.java",
"license": "apache-2.0",
"size": 2324
} | [
"net.jini.core.entry.Entry"
] | import net.jini.core.entry.Entry; | import net.jini.core.entry.*; | [
"net.jini.core"
] | net.jini.core; | 1,560,435 |
int countByExample(TestExample example); | int countByExample(TestExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table test
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table test | countByExample | {
"repo_name": "sulinixl/server-boilerplate",
"path": "server-dao/src/main/java/com/boilerplate/server/dao/TestMapper.java",
"license": "mit",
"size": 2544
} | [
"com.boilerplate.server.model.TestExample"
] | import com.boilerplate.server.model.TestExample; | import com.boilerplate.server.model.*; | [
"com.boilerplate.server"
] | com.boilerplate.server; | 2,714,855 |
public T caseLessThan(LessThan object) {
return null;
} | T function(LessThan object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Less Than</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of inter... | Returns the result of interpreting the object as an instance of 'Less Than'. This implementation returns null; returning a non-null result will terminate the switch. | caseLessThan | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/finiteIntRanges/util/FiniteIntRangesSwitch.java",
"license": "epl-1.0",
"size": 15284
} | [
"fr.lip6.move.pnml.symmetricnet.finiteIntRanges.LessThan"
] | import fr.lip6.move.pnml.symmetricnet.finiteIntRanges.LessThan; | import fr.lip6.move.pnml.symmetricnet.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,695,903 |
@Override
public ObjectRevision getObjectRevision() {
if ( transMeta == null ) {
return null;
}
return transMeta.getObjectRevision();
} | ObjectRevision function() { if ( transMeta == null ) { return null; } return transMeta.getObjectRevision(); } | /**
* Gets the object revision.
*
* @return the object revision
* @see org.pentaho.di.core.logging.LoggingObjectInterface#getObjectRevision()
*/ | Gets the object revision | getObjectRevision | {
"repo_name": "ViswesvarSekar/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 197991
} | [
"org.pentaho.di.repository.ObjectRevision"
] | import org.pentaho.di.repository.ObjectRevision; | import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,526,028 |
protected void visitDocument(DocumentArtifactType artifact) {
// Subclasses can do common visit logic here
} | void function(DocumentArtifactType artifact) { } | /**
* Common visit method for document artifacts.
* @param artifact
*/ | Common visit method for document artifacts | visitDocument | {
"repo_name": "brmeyer/s-ramp",
"path": "common/src/main/java/org/artificer/common/visitors/HierarchicalArtifactVisitor.java",
"license": "apache-2.0",
"size": 21033
} | [
"org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactType"
] | import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.DocumentArtifactType; | import org.oasis_open.docs.s_ramp.ns.s_ramp_v1.*; | [
"org.oasis_open.docs"
] | org.oasis_open.docs; | 2,781,875 |
public DataNode setSet_currentScalar(Double set_current); | DataNode function(Double set_current); | /**
* current set on supply.
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_CURRENT
* </p>
*
* @param set_current the set_current
*/ | current set on supply. Type: NX_FLOAT Units: NX_CURRENT | setSet_currentScalar | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXquadrupole_magnet.java",
"license": "epl-1.0",
"size": 3997
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; | import org.eclipse.dawnsci.analysis.api.tree.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 1,864,492 |
public ListImagesParams withFilters(Filters filters) {
this.filters = filters;
return this;
} | ListImagesParams function(Filters filters) { this.filters = filters; return this; } | /**
* Adds filters to this parameters.
*
* @param filters Available filters:
* <ul>
* <li><code>before</code>=(<code><image-name>[:<tag>]</code>, <code>
* <image id></code> or <code><image@digest></code>)
* <li><code>dangling=true</code>
* ... | Adds filters to this parameters | withFilters | {
"repo_name": "sleshchenko/che",
"path": "infrastructures/docker/docker-client/src/main/java/org/eclipse/che/infrastructure/docker/client/params/ListImagesParams.java",
"license": "epl-1.0",
"size": 2942
} | [
"org.eclipse.che.infrastructure.docker.client.json.Filters"
] | import org.eclipse.che.infrastructure.docker.client.json.Filters; | import org.eclipse.che.infrastructure.docker.client.json.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,817,637 |
private Vector findConstructors() {
Vector result = null;
final String namespace = _fname.getNamespace();
final int nArgs = _arguments.size();
try {
if (_clazz == null) {
_clazz = ObjectFactory.findProviderClass(
_className, ObjectFactory.... | Vector function() { Vector result = null; final String namespace = _fname.getNamespace(); final int nArgs = _arguments.size(); try { if (_clazz == null) { _clazz = ObjectFactory.findProviderClass( _className, ObjectFactory.findClassLoader(), true); if (_clazz == null) { final ErrorMsg msg = new ErrorMsg(ErrorMsg.CLASS_... | /**
* Returns a vector with all constructors named <code>_fname</code>
* after stripping its namespace or <code>null</code>
* if no such methods exist.
*/ | Returns a vector with all constructors named <code>_fname</code> after stripping its namespace or <code>null</code> if no such methods exist | findConstructors | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/xsltc/compiler/FunctionCall.java",
"license": "gpl-3.0",
"size": 38350
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.Modifier",
"java.util.Vector",
"org.apache.xalan.xsltc.compiler.util.ErrorMsg"
] | import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.util.Vector; import org.apache.xalan.xsltc.compiler.util.ErrorMsg; | import java.lang.reflect.*; import java.util.*; import org.apache.xalan.xsltc.compiler.util.*; | [
"java.lang",
"java.util",
"org.apache.xalan"
] | java.lang; java.util; org.apache.xalan; | 1,234,591 |
public List<RelatedProduct> getCumulativeCrossSaleProducts(); | List<RelatedProduct> function(); | /**
* Returns a list of the cross sale products in this category as well as
* all cross sale products in all parent categories of this category.
*
* @return the cumulative cross sale products
*/ | Returns a list of the cross sale products in this category as well as all cross sale products in all parent categories of this category | getCumulativeCrossSaleProducts | {
"repo_name": "cloudbearings/BroadleafCommerce",
"path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/catalog/domain/Category.java",
"license": "apache-2.0",
"size": 24718
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 927,546 |
public synchronized void cancelReceiveFileTransfer() {
Logger.d(TAG, "cancelReceiveFileTransfer entry");
ArrayList<ReceiveFileTransfer> tempList =
new ArrayList<ReceiveFileTransfer>(mActiveList);
int size = tempList.size();
for (int i = 0; i < ... | synchronized void function() { Logger.d(TAG, STR); ArrayList<ReceiveFileTransfer> tempList = new ArrayList<ReceiveFileTransfer>(mActiveList); int size = tempList.size(); for (int i = 0; i < size; i++) { ReceiveFileTransfer receiveFileTransfer = tempList.get(i); if (null != receiveFileTransfer) { receiveFileTransfer.can... | /**
* Cancel all the receive file transfers
*/ | Cancel all the receive file transfers | cancelReceiveFileTransfer | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/src/com/mediatek/rcse/mvc/One2OneChat.java",
"license": "gpl-2.0",
"size": 95982
} | [
"com.mediatek.rcse.api.Logger",
"java.util.ArrayList"
] | import com.mediatek.rcse.api.Logger; import java.util.ArrayList; | import com.mediatek.rcse.api.*; import java.util.*; | [
"com.mediatek.rcse",
"java.util"
] | com.mediatek.rcse; java.util; | 1,701,102 |
public int serialize( int offset, byte[] data )
{
convertUserModelToRecords();
// Determine buffer size
List records = getEscherRecords();
int size = getEscherRecordSize( records );
byte[] buffer = new byte[size]; | int function( int offset, byte[] data ) { convertUserModelToRecords(); List records = getEscherRecords(); int size = getEscherRecordSize( records ); byte[] buffer = new byte[size]; | /**
* Serializes this aggregate to a byte array. Since this is an aggregate
* record it will effectively serialize the aggregated records.
*
* @param offset The offset into the start of the array.
* @param data The byte array to serialize to.
* @return The number of bytes... | Serializes this aggregate to a byte array. Since this is an aggregate record it will effectively serialize the aggregated records | serialize | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/poi-3.2-FINAL/src/java/org/apache/poi/hssf/record/EscherAggregate.java",
"license": "gpl-3.0",
"size": 39425
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,009,185 |
void rollback(boolean considerLastMessageAsDelivered) throws ActiveMQException; | void rollback(boolean considerLastMessageAsDelivered) throws ActiveMQException; | /**
* Rolls back the current transaction.
*
* @param considerLastMessageAsDelivered the first message on deliveringMessage Buffer is considered as delivered
* @throws ActiveMQException if an exception occurs while rolling back the transaction
*/ | Rolls back the current transaction | rollback | {
"repo_name": "willr3/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java",
"license": "apache-2.0",
"size": 41343
} | [
"org.apache.activemq.artemis.api.core.ActiveMQException"
] | import org.apache.activemq.artemis.api.core.ActiveMQException; | import org.apache.activemq.artemis.api.core.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,943,119 |
void jobStateUpdated(String owner, NotificationData<JobInfo> notification); | void jobStateUpdated(String owner, NotificationData<JobInfo> notification); | /**
* Invoked each time the state of a job has changed.<br>
* In this case you can use the {@link org.ow2.proactive.scheduler.common.job.JobState#update(org.ow2.proactive.scheduler.common.job.JobInfo)} method to update the content of your job.
*
* @param owner the owner of this job
* @param not... | Invoked each time the state of a job has changed. In this case you can use the <code>org.ow2.proactive.scheduler.common.job.JobState#update(org.ow2.proactive.scheduler.common.job.JobInfo)</code> method to update the content of your job | jobStateUpdated | {
"repo_name": "laurianed/scheduling",
"path": "scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/core/SchedulerStateUpdate.java",
"license": "agpl-3.0",
"size": 3494
} | [
"org.ow2.proactive.scheduler.common.NotificationData",
"org.ow2.proactive.scheduler.common.job.JobInfo"
] | import org.ow2.proactive.scheduler.common.NotificationData; import org.ow2.proactive.scheduler.common.job.JobInfo; | import org.ow2.proactive.scheduler.common.*; import org.ow2.proactive.scheduler.common.job.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 1,550,920 |
@Override
public Set<String> getOwnPropertyNames() {
if (prototypeSlot == null) {
return super.getOwnPropertyNames();
} else {
Set<String> names = new HashSet<>();
names.add("prototype");
names.addAll(super.getOwnPropertyNames());
return names;
}
} | Set<String> function() { if (prototypeSlot == null) { return super.getOwnPropertyNames(); } else { Set<String> names = new HashSet<>(); names.add(STR); names.addAll(super.getOwnPropertyNames()); return names; } } | /**
* Includes the prototype iff someone has created it. We do not want
* to expose the prototype for ordinary functions.
*/ | Includes the prototype iff someone has created it. We do not want to expose the prototype for ordinary functions | getOwnPropertyNames | {
"repo_name": "mbrukman/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/FunctionType.java",
"license": "apache-2.0",
"size": 50774
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,600,021 |
void writeTable(ITable table); | void writeTable(ITable table); | /**
* Write the data in the specified table to a storage medium.
*/ | Write the data in the specified table to a storage medium | writeTable | {
"repo_name": "mbudiu-vmw/hiero",
"path": "platform/src/main/java/org/hillview/storage/ITableWriter.java",
"license": "apache-2.0",
"size": 881
} | [
"org.hillview.table.api.ITable"
] | import org.hillview.table.api.ITable; | import org.hillview.table.api.*; | [
"org.hillview.table"
] | org.hillview.table; | 2,850,078 |
@Authorized( { PrivilegeConstants.MANAGE_RELATIONSHIP_TYPES })
public RelationshipType retireRelationshipType(RelationshipType type, String retiredReason) throws APIException;
| @Authorized( { PrivilegeConstants.MANAGE_RELATIONSHIP_TYPES }) RelationshipType function(RelationshipType type, String retiredReason) throws APIException; | /**
* Retire a Person Relationship Type
*
* @param type
* @param retiredReason
*/ | Retire a Person Relationship Type | retireRelationshipType | {
"repo_name": "shiangree/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/PersonService.java",
"license": "mpl-2.0",
"size": 42154
} | [
"org.openmrs.RelationshipType",
"org.openmrs.annotation.Authorized",
"org.openmrs.util.PrivilegeConstants"
] | import org.openmrs.RelationshipType; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants; | import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*; | [
"org.openmrs",
"org.openmrs.annotation",
"org.openmrs.util"
] | org.openmrs; org.openmrs.annotation; org.openmrs.util; | 1,125,575 |
String data1 = "The best java course ever!";
String data2 = "java";
boolean result = Test001.contains(data1, data2);
boolean expected = true;
assertThat(result, is(expected));
} | String data1 = STR; String data2 = "java"; boolean result = Test001.contains(data1, data2); boolean expected = true; assertThat(result, is(expected)); } | /**
* Test 1 of method contains.
*/ | Test 1 of method contains | whenStringContainsSubStringThenTrue | {
"repo_name": "ephemeralin/java-training",
"path": "chapter_001/src/test/java/ru/job4j/test001/Test001Test.java",
"license": "apache-2.0",
"size": 838
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 569,698 |
List<MediaType> getConsumedMimes();
/**
* @return an initialized {@link javax.ws.rs.ext.ContextResolver}
| List<MediaType> getConsumedMimes(); /** * @return an initialized {@link javax.ws.rs.ext.ContextResolver} | /**
* Returns the list of produced {@link MediaType}s of the wrapped
* {@link javax.ws.rs.ext.MessageBodyWriter}.
*
* @return List of produced {@link MediaType}s.
*/ | Returns the list of produced <code>MediaType</code>s of the wrapped <code>javax.ws.rs.ext.MessageBodyWriter</code> | getConsumedMimes | {
"repo_name": "debrief/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.ext.jaxrs/org/restlet/ext/jaxrs/internal/wrappers/provider/ProviderWrapper.java",
"license": "epl-1.0",
"size": 7525
} | [
"java.util.List",
"org.restlet.data.MediaType"
] | import java.util.List; import org.restlet.data.MediaType; | import java.util.*; import org.restlet.data.*; | [
"java.util",
"org.restlet.data"
] | java.util; org.restlet.data; | 2,503,208 |
static int rename() {
int totalExceptions = 0;
boolean success;
for (int index = 0; index < numFiles; index++) {
int singleFileExceptions = 0;
do { // rename file until is succeeds
try {
// Possible result of this operation is at no interest to us for it
// can retu... | static int rename() { int totalExceptions = 0; boolean success; for (int index = 0; index < numFiles; index++) { int singleFileExceptions = 0; do { try { fileSys.rename(new Path(taskDir, STRASTRcreating file #" + index, ioe, ++singleFileExceptions); } } while (!success); } return totalExceptions; } | /**
* Rename a given number of files. Repeat each remote
* operation until is suceeds (does not throw an exception).
*
* @return the number of exceptions caught
*/ | Rename a given number of files. Repeat each remote operation until is suceeds (does not throw an exception) | rename | {
"repo_name": "laxman-ch/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBenchWithoutMR.java",
"license": "apache-2.0",
"size": 13603
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,841,471 |
public boolean checkTopicSyntax(String topic)
throws InvalidTopicSyntaxException
{
checkTopicNotNull(topic);
char[] chars = topic.toCharArray();
boolean acceptHash = true;
// becomes false when hash seen, stays false thereafter
boolean acceptWild = true;
// becomes false on non-se... | boolean function(String topic) throws InvalidTopicSyntaxException { checkTopicNotNull(topic); char[] chars = topic.toCharArray(); boolean acceptHash = true; boolean acceptWild = true; boolean acceptOrdinary = true; boolean hasWild = false; for (int i = 0; i < chars.length; i++) { char cand = chars[i]; if (cand == Match... | /** checkTopicSyntax: Rules out syntactically inappropriate wildcard usages and
* determines if there are any wildcards
* @param topic the topic to check
* @return true if topic contains wildcards
* @throws InvalidTopicSyntaxException if topic is syntactically invalid
*/ | checkTopicSyntax: Rules out syntactically inappropriate wildcard usages and determines if there are any wildcards | checkTopicSyntax | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/MQSITopicSyntaxChecker.java",
"license": "epl-1.0",
"size": 4404
} | [
"com.ibm.ws.sib.matchspace.InvalidTopicSyntaxException",
"com.ibm.ws.sib.matchspace.MatchSpace",
"com.ibm.ws.sib.matchspace.utils.NLS"
] | import com.ibm.ws.sib.matchspace.InvalidTopicSyntaxException; import com.ibm.ws.sib.matchspace.MatchSpace; import com.ibm.ws.sib.matchspace.utils.NLS; | import com.ibm.ws.sib.matchspace.*; import com.ibm.ws.sib.matchspace.utils.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 429,290 |
Set<McastRoute> getRoutes(); | Set<McastRoute> getRoutes(); | /**
* Gets the set of all known Multicast routes.
*
* @return set of Multicast routes.
*/ | Gets the set of all known Multicast routes | getRoutes | {
"repo_name": "gkatsikas/onos",
"path": "apps/mcast/api/src/main/java/org/onosproject/mcast/api/McastStore.java",
"license": "apache-2.0",
"size": 6117
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 209,931 |
private Image getSWTImage(final int imageID) {
Shell shell = getShell();
final Display display;
if (shell == null || shell.isDisposed()) {
shell = getParentShell();
}
if (shell == null || shell.isDisposed()) {
display = Display.getCurrent();
// The dialog should be always instantiated in UI thread... | Image function(final int imageID) { Shell shell = getShell(); final Display display; if (shell == null shell.isDisposed()) { shell = getParentShell(); } if (shell == null shell.isDisposed()) { display = Display.getCurrent(); Assert.isNotNull(display, STR); } else { display = shell.getDisplay(); } | /**
* Get an <code>Image</code> from the provide SWT image constant.
*
* @param imageID
* the SWT image constant
* @return image the image
*/ | Get an <code>Image</code> from the provide SWT image constant | getSWTImage | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/jface/dialogs/IconAndMessageDialog.java",
"license": "epl-1.0",
"size": 8449
} | [
"org.eclipse.core.runtime.Assert",
"org.eclipse.swt.graphics.Image",
"org.eclipse.swt.widgets.Display",
"org.eclipse.swt.widgets.Shell"
] | import org.eclipse.core.runtime.Assert; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; | import org.eclipse.core.runtime.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.core",
"org.eclipse.swt"
] | org.eclipse.core; org.eclipse.swt; | 1,369,376 |
public void setMediaPrintableArea (MediaPrintableArea area)
{
int inch = MediaPrintableArea.INCH;
log.fine(area.toString(inch, "\""));
setImageableArea(area.getX(inch)*72, area.getY(inch)*72,
area.getWidth(inch)*72, area.getHeight(inch)*72);
} // setMediaPrintableArea
| void function (MediaPrintableArea area) { int inch = MediaPrintableArea.INCH; log.fine(area.toString(inch, "\"")); setImageableArea(area.getX(inch)*72, area.getY(inch)*72, area.getWidth(inch)*72, area.getHeight(inch)*72); } | /**
* Get Printable Media Area
* @param area Printable Area
*/ | Get Printable Media Area | setMediaPrintableArea | {
"repo_name": "itzamnamx/AdempiereFS",
"path": "base/src/org/compiere/print/CPaper.java",
"license": "gpl-2.0",
"size": 15633
} | [
"javax.print.attribute.standard.MediaPrintableArea"
] | import javax.print.attribute.standard.MediaPrintableArea; | import javax.print.attribute.standard.*; | [
"javax.print"
] | javax.print; | 2,310,324 |
public void setPadding( PaddingConfig padding )
{
this.padding = padding;
} //-- void setPadding( PaddingConfig ) | void function( PaddingConfig padding ) { this.padding = padding; } | /**
* Set sets paddings of the chart content<br /><br /><a
* href="http://docs.webix.com/api__ui.window_padding_config.html">Webix
* API Reference</a>
*
* @param padding
*/ | Set sets paddings of the chart contentWebix API Reference | setPadding | {
"repo_name": "zhv/webix-api",
"path": "src/main/java/com/webix/ui/model/context/Window.java",
"license": "bsd-3-clause",
"size": 17065
} | [
"com.webix.ui.model.PaddingConfig"
] | import com.webix.ui.model.PaddingConfig; | import com.webix.ui.model.*; | [
"com.webix.ui"
] | com.webix.ui; | 2,077,069 |
@Override
public void propertyChange (PropertyChangeEvent evt)
{
if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY))
setValue(evt.getNewValue());
} // propertyChange | void function (PropertyChangeEvent evt) { if (evt.getPropertyName().equals(org.compiere.model.GridField.PROPERTY)) setValue(evt.getNewValue()); } | /**
* Property Change Listener
* @param evt
*/ | Property Change Listener | propertyChange | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/client/src/main/java-legacy/org/compiere/grid/ed/VMemo.java",
"license": "gpl-2.0",
"size": 7068
} | [
"java.beans.PropertyChangeEvent",
"org.compiere.model.GridField"
] | import java.beans.PropertyChangeEvent; import org.compiere.model.GridField; | import java.beans.*; import org.compiere.model.*; | [
"java.beans",
"org.compiere.model"
] | java.beans; org.compiere.model; | 1,753,373 |
public BigDecimal getAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amt);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Amt); if (bd == null) return Env.ZERO; return bd; } | /** Get Amount.
@return Amount
*/ | Get Amount | getAmt | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_GL_Fund.java",
"license": "gpl-2.0",
"size": 6057
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,943,726 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem> updateWishlistItemQuantityClient(String wishlistId, String wishlistItemId, Integer quantity) throws Exception
{
return updateWishlistItemQuantityClient( wishlistId, wishlistItemId, quantity, null);
}
| static MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem> function(String wishlistId, String wishlistItemId, Integer quantity) throws Exception { return updateWishlistItemQuantityClient( wishlistId, wishlistItemId, quantity, null); } | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItem> mozuClient=UpdateWishlistItemQuantityClient( wishlistId, wishlistItemId, quantity);
* client.setBaseAddress(url);
* client.executeRequest();
* WishlistItem wishlistItem = client.Result();
* </code>... | <code><code> MozuClient mozuClient=UpdateWishlistItemQuantityClient( wishlistId, wishlistItemId, quantity); client.setBaseAddress(url); client.executeRequest(); WishlistItem wishlistItem = client.Result(); </code></code> | updateWishlistItemQuantityClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/wishlists/WishlistItemClient.java",
"license": "mit",
"size": 21872
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,520,185 |
private void addFilter() {
// Create the listener that creates the close button when the mouse
// enters a plot Composite (in the grid).
final Listener plotHoverListener = new Listener() {
private Composite lastPlot;
| void function() { final Listener plotHoverListener = new Listener() { private Composite lastPlot; | /**
* Adds a filter for mouse enter events so that when a drawn plot is
* entered, the close button appears.
*/ | Adds a filter for mouse enter events so that when a drawn plot is entered, the close button appears | addFilter | {
"repo_name": "jarrah42/eavp",
"path": "org.eclipse.eavp.viz.service/src/org/eclipse/eavp/viz/service/widgets/PlotGridComposite.java",
"license": "epl-1.0",
"size": 20612
} | [
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Listener"
] | import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Listener; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,709,724 |
protected static AuthenticationToken getAuthenticationToken(JobContext context) {
return InputConfigurator.getAuthenticationToken(CLASS, getConfiguration(context));
} | static AuthenticationToken function(JobContext context) { return InputConfigurator.getAuthenticationToken(CLASS, getConfiguration(context)); } | /**
* Gets the authenticated token from either the specified token file or directly from the configuration, whichever was used when the job was configured.
*
* @param context
* the Hadoop context for the configured job
* @return the principal's authentication token
* @since 1.6.0
* @see #... | Gets the authenticated token from either the specified token file or directly from the configuration, whichever was used when the job was configured | getAuthenticationToken | {
"repo_name": "joshelser/accumulo",
"path": "mapreduce/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java",
"license": "apache-2.0",
"size": 26113
} | [
"org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator",
"org.apache.accumulo.core.client.security.tokens.AuthenticationToken",
"org.apache.hadoop.mapreduce.JobContext"
] | import org.apache.accumulo.core.client.mapreduce.lib.impl.InputConfigurator; import org.apache.accumulo.core.client.security.tokens.AuthenticationToken; import org.apache.hadoop.mapreduce.JobContext; | import org.apache.accumulo.core.client.mapreduce.lib.impl.*; import org.apache.accumulo.core.client.security.tokens.*; import org.apache.hadoop.mapreduce.*; | [
"org.apache.accumulo",
"org.apache.hadoop"
] | org.apache.accumulo; org.apache.hadoop; | 1,961,269 |
public interface ImageDownloadCompleteCallback
{
public void action(Vector<Bitmap> bitmaps); | interface ImageDownloadCompleteCallback { public void function(Vector<Bitmap> bitmaps); | /**
* Method to be called when all image downloads have completed.
*
* @param bitmaps
* The resulting Bitmaps.
*/ | Method to be called when all image downloads have completed | action | {
"repo_name": "sdoerner/mango-goal-organizer",
"path": "src/de/mango/business/ImageDownloadCompleteCallback.java",
"license": "gpl-3.0",
"size": 1203
} | [
"android.graphics.Bitmap",
"java.util.Vector"
] | import android.graphics.Bitmap; import java.util.Vector; | import android.graphics.*; import java.util.*; | [
"android.graphics",
"java.util"
] | android.graphics; java.util; | 2,831,730 |
public void setFilterIdToUniqueId() {
filterId = UUID.randomUUID().toString();
} | void function() { filterId = UUID.randomUUID().toString(); } | /**
* set or reset the filterID automatically to a unique id
*/ | set or reset the filterID automatically to a unique id | setFilterIdToUniqueId | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/data/portfolio/artefact/EPFilterSettings.java",
"license": "apache-2.0",
"size": 5153
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 627,467 |
public static int deleteFromRev(Session session, int configRev)
throws HibernateException {
// Note that hql uses class name, not the table name
String hql = "DELETE Stop WHERE configRev=" + configRev;
int numUpdates = session.createQuery(hql).executeUpdate();
return numUpdates;
} | static int function(Session session, int configRev) throws HibernateException { String hql = STR + configRev; int numUpdates = session.createQuery(hql).executeUpdate(); return numUpdates; } | /**
* Deletes rev from the Stops table
*
* @param session
* @param configRev
* @return Number of rows deleted
* @throws HibernateException
*/ | Deletes rev from the Stops table | deleteFromRev | {
"repo_name": "sheldonabrown/core",
"path": "transitime/src/main/java/org/transitime/db/structs/Stop.java",
"license": "gpl-3.0",
"size": 9411
} | [
"org.hibernate.HibernateException",
"org.hibernate.Session"
] | import org.hibernate.HibernateException; import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 2,862,908 |
private Camera getCameraInstance(int cameraId) {
Camera camera = null;
try {
camera = Camera.open(cameraId);
} catch (RuntimeException e) {
int error = CAMERA_IN_USE_ERROR;
if (cameraId == -1) {
error = NO_CAMERA_FOUND_ERROR;
} ... | Camera function(int cameraId) { Camera camera = null; try { camera = Camera.open(cameraId); } catch (RuntimeException e) { int error = CAMERA_IN_USE_ERROR; if (cameraId == -1) { error = NO_CAMERA_FOUND_ERROR; } else if (isCameraDisabledByPolicy()) { error = CAMERA_DISABLED_ERROR; } mErrorCallback.onError(error, null); ... | /**
* Returns an instance of the Camera for the give id. Returns null if camera is used or doesn't
* exist.
*/ | Returns an instance of the Camera for the give id. Returns null if camera is used or doesn't exist | getCameraInstance | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/CameraPreview.java",
"license": "bsd-3-clause",
"size": 8065
} | [
"android.hardware.Camera"
] | import android.hardware.Camera; | import android.hardware.*; | [
"android.hardware"
] | android.hardware; | 958,918 |
public void endExternProtoDecl() throws SAVException, VRMLException; | void function() throws SAVException, VRMLException; | /**
* Notification of the end of an EXTERNPROTO declaration.
* This is called just after the closing bracket of the declaration and
* before the opening of the body statement. If the next thing called is
* not a {@link #externProtoURI} Then that method should toss an
* exception.
*
* ... | Notification of the end of an EXTERNPROTO declaration. This is called just after the closing bracket of the declaration and before the opening of the body statement. If the next thing called is not a <code>#externProtoURI</code> Then that method should toss an exception | endExternProtoDecl | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/sav/ProtoHandler.java",
"license": "gpl-2.0",
"size": 6516
} | [
"org.web3d.vrml.lang.VRMLException"
] | import org.web3d.vrml.lang.VRMLException; | import org.web3d.vrml.lang.*; | [
"org.web3d.vrml"
] | org.web3d.vrml; | 2,145,032 |
public Iterator<DataBlock> getDataBlockIterator(IDataFilter filter);
| Iterator<DataBlock> function(IDataFilter filter); | /**
* Gets iterator of raw data blocks matching the specified filter
* @param filter filtering parameters
* @return A read-only iterator among data blocks matching the filter
*/ | Gets iterator of raw data blocks matching the specified filter | getDataBlockIterator | {
"repo_name": "Shimejing/sensorhub",
"path": "sensorhub-core/src/main/java/org/sensorhub/api/persistence/IBasicStorage.java",
"license": "mpl-2.0",
"size": 7241
} | [
"java.util.Iterator",
"net.opengis.swe.v20.DataBlock"
] | import java.util.Iterator; import net.opengis.swe.v20.DataBlock; | import java.util.*; import net.opengis.swe.v20.*; | [
"java.util",
"net.opengis.swe"
] | java.util; net.opengis.swe; | 174,291 |
private ArrayList<IContributionItem> adjustContributionList(ArrayList<IContributionItem> contributionList) {
IContributionItem item;
// Fist remove a separator if it is the first element of the list
if (contributionList.size() != 0) {
item = contributionList.get(0);
i... | ArrayList<IContributionItem> function(ArrayList<IContributionItem> contributionList) { IContributionItem item; if (contributionList.size() != 0) { item = contributionList.get(0); if (item.isSeparator()) { contributionList.remove(0); } ListIterator<IContributionItem> iterator = contributionList.listIterator(); while (it... | /**
* Collapses consecutive separators and removes a separator from the
* beginning and end of the list.
*
* @param contributionList
* the list of contributions; must not be <code>null</code>.
* @return The contribution list provided with extraneous separators
* rem... | Collapses consecutive separators and removes a separator from the beginning and end of the list | adjustContributionList | {
"repo_name": "AntoineDelacroix/NewSuperProject-",
"path": "org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java",
"license": "gpl-2.0",
"size": 35985
} | [
"java.util.ArrayList",
"java.util.ListIterator"
] | import java.util.ArrayList; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 101,895 |
public void onPublication(InstanceManager instance, String[] interfaces,
Properties props) { }
public void onUnpublication() { }
| void function(InstanceManager instance, String[] interfaces, Properties props) { } public void onUnpublication() { } | /**
* The service is going to be registered.
* @param instance the instance manager
* @param interfaces the published interfaces
* @param props the properties
* @see org.apache.felix.ipojo.handlers.providedservice.CreationStrategy#onPublication(InstanceManager, java.lan... | The service is going to be registered | onPublication | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java",
"license": "apache-2.0",
"size": 39685
} | [
"java.util.Properties",
"org.apache.felix.ipojo.InstanceManager"
] | import java.util.Properties; import org.apache.felix.ipojo.InstanceManager; | import java.util.*; import org.apache.felix.ipojo.*; | [
"java.util",
"org.apache.felix"
] | java.util; org.apache.felix; | 1,486,111 |
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
| void function(Notification notification) { updateChildren(notification); super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "darvasd/gsoaarchitect",
"path": "hu.bme.mit.inf.gs.dsl.edit/src/soamodel/provider/CSharpComponentItemProvider.java",
"license": "mit",
"size": 3050
} | [
"org.eclipse.emf.common.notify.Notification"
] | import org.eclipse.emf.common.notify.Notification; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 646,547 |
public void unstructuredConnectionStarted(OverlayContact<?> invoker,
OverlayContact<?> receiver, int connectionUID); | void function(OverlayContact<?> invoker, OverlayContact<?> receiver, int connectionUID); | /**
* The node invoker started a connection attempt to the node receiver. This
* event should be followed by connectionSucceeded(...) or
* connectionFailed(...). connectionUID can be used to identify the whole
* connection operation and is equal to the UIDs of the reply.
*
* @param invoker
* t... | The node invoker started a connection attempt to the node receiver. This event should be followed by connectionSucceeded(...) or connectionFailed(...). connectionUID can be used to identify the whole connection operation and is equal to the UIDs of the reply | unstructuredConnectionStarted | {
"repo_name": "flyroom/PeerfactSimKOM_Clone",
"path": "src/org/peerfact/api/common/Monitor.java",
"license": "gpl-2.0",
"size": 16925
} | [
"org.peerfact.api.overlay.OverlayContact"
] | import org.peerfact.api.overlay.OverlayContact; | import org.peerfact.api.overlay.*; | [
"org.peerfact.api"
] | org.peerfact.api; | 1,322,435 |
Endpoint publish(ServiceDomain domain, String context, InboundHandler handler) throws Exception; | Endpoint publish(ServiceDomain domain, String context, InboundHandler handler) throws Exception; | /**
* Publish a HTTP endpoint.
* @param domain The ServiceDomain for the application
* @param context The web context root where the resource need to be published
* @param handler A handler instance
* @return The published endpoint holder
* @throws Exception if endpoint could not be publis... | Publish a HTTP endpoint | publish | {
"repo_name": "tadayosi/switchyard",
"path": "components/http/src/main/java/org/switchyard/component/http/endpoint/EndpointPublisher.java",
"license": "apache-2.0",
"size": 1445
} | [
"org.switchyard.ServiceDomain",
"org.switchyard.component.common.Endpoint",
"org.switchyard.component.http.InboundHandler"
] | import org.switchyard.ServiceDomain; import org.switchyard.component.common.Endpoint; import org.switchyard.component.http.InboundHandler; | import org.switchyard.*; import org.switchyard.component.common.*; import org.switchyard.component.http.*; | [
"org.switchyard",
"org.switchyard.component"
] | org.switchyard; org.switchyard.component; | 448,329 |
default List<Boolean> hasUserPermissions(List<Permission> permissions) throws IOException {
return hasUserPermissions(null, permissions);
} | default List<Boolean> hasUserPermissions(List<Permission> permissions) throws IOException { return hasUserPermissions(null, permissions); } | /**
* Check if call user has specific permissions
* @param permissions the specific permission list
* @return True if user has the specific permissions
* @throws IOException if a remote or network exception occurs
*/ | Check if call user has specific permissions | hasUserPermissions | {
"repo_name": "ultratendency/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 97030
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.security.access.Permission"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.security.access.Permission; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.security.access.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 822,868 |
public int hashCode() {
int result = 127;
result = HashUtilities.hashCode(result, this.formatPattern);
result = HashUtilities.hashCode(result, this.additionalFormatPattern);
result = HashUtilities.hashCode(result, this.seriesLabelLists);
return result;
}
| int function() { int result = 127; result = HashUtilities.hashCode(result, this.formatPattern); result = HashUtilities.hashCode(result, this.additionalFormatPattern); result = HashUtilities.hashCode(result, this.seriesLabelLists); return result; } | /**
* Returns a hash code for this instance.
*
* @return A hash code.
*/ | Returns a hash code for this instance | hashCode | {
"repo_name": "integrated/jfreechart",
"path": "source/org/jfree/chart/labels/MultipleXYSeriesLabelGenerator.java",
"license": "lgpl-2.1",
"size": 8445
} | [
"org.jfree.chart.HashUtilities"
] | import org.jfree.chart.HashUtilities; | import org.jfree.chart.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,956,107 |
public void write(byte []buffer, int offset, int length)
throws IOException
{
System.err.write(buffer, offset, length);
} | void function(byte []buffer, int offset, int length) throws IOException { System.err.write(buffer, offset, length); } | /**
* Writes a buffer.
*/ | Writes a buffer | write | {
"repo_name": "smba/oak",
"path": "quercus/src/main/java/com/caucho/quercus/lib/file/PhpStderr.java",
"license": "lgpl-3.0",
"size": 1550
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 506,104 |
if (isFamilyDir(fs, path)) {
Path regionDir = path.getParent();
Path tableDir = regionDir.getParent();
HTableDescriptor htd = FSTableDescriptors.getTableDescriptor(fs, tableDir);
HRegion region = loadRegion(fs, conf, htd, regionDir);
compactStoreFiles(region, path, compactOnce);
... | if (isFamilyDir(fs, path)) { Path regionDir = path.getParent(); Path tableDir = regionDir.getParent(); HTableDescriptor htd = FSTableDescriptors.getTableDescriptor(fs, tableDir); HRegion region = loadRegion(fs, conf, htd, regionDir); compactStoreFiles(region, path, compactOnce); } else if (isRegionDir(fs, path)) { Path... | /**
* Execute the compaction on the specified path.
*
* @param path Directory path on which run a
* @param compactOnce Execute just a single step of compaction.
*/ | Execute the compaction on the specified path | compact | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java",
"license": "apache-2.0",
"size": 17682
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.regionserver.HRegion",
"org.apache.hadoop.hbase.util.FSTableDescriptors"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.util.FSTableDescriptors; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,177,703 |
public HttpClient getHttpClient(SystemConfiguration config) {
HttpClient httpclient = new HttpClient(theConnectionManager);
// Wait for 2 seconds to get a connection from pool
httpclient.getParams().setParameter("http.connection-manager.timeout", 2000L);
String host = config.getValue(Property.GUS_PROXY_H... | HttpClient function(SystemConfiguration config) { HttpClient httpclient = new HttpClient(theConnectionManager); httpclient.getParams().setParameter(STR, 2000L); String host = config.getValue(Property.GUS_PROXY_HOST.getName(), Property.GUS_PROXY_HOST.getDefaultValue()); if (host != null && host.length() > 0) { httpclien... | /**
* Get HttpClient with proper proxy and timeout settings.
*
* @param config The system configuration. Cannot be null.
*
* @return HttpClient
*/ | Get HttpClient with proper proxy and timeout settings | getHttpClient | {
"repo_name": "prestonfff/Argus",
"path": "ArgusCore/src/main/java/com/salesforce/dva/argus/service/alert/notifier/GusNotifier.java",
"license": "bsd-3-clause",
"size": 13911
} | [
"com.salesforce.dva.argus.system.SystemConfiguration",
"org.apache.commons.httpclient.HttpClient"
] | import com.salesforce.dva.argus.system.SystemConfiguration; import org.apache.commons.httpclient.HttpClient; | import com.salesforce.dva.argus.system.*; import org.apache.commons.httpclient.*; | [
"com.salesforce.dva",
"org.apache.commons"
] | com.salesforce.dva; org.apache.commons; | 1,173,543 |
@Operation( operationName="list" )
public HandsetCollection getDevices( @NameOverride( name="inUse" ) boolean inUse );
| @Operation( operationName="list" ) HandsetCollection function( @NameOverride( name="inUse" ) boolean inUse ); | /**
* Gets the devices.
*
* @param inUse the in use
* @return the devices
*/ | Gets the devices | getDevices | {
"repo_name": "xframium/xframium-java",
"path": "framework/src/org/xframium/integrations/perfectoMobile/rest/services/Devices.java",
"license": "gpl-3.0",
"size": 2559
} | [
"org.xframium.integrations.perfectoMobile.rest.bean.HandsetCollection"
] | import org.xframium.integrations.perfectoMobile.rest.bean.HandsetCollection; | import org.xframium.integrations.*; | [
"org.xframium.integrations"
] | org.xframium.integrations; | 2,598,352 |
public final BufferedImageOp[] getFilters() {
BufferedImageOp[] results = new BufferedImageOp[filters.length];
System.arraycopy(filters, 0, results, 0, results.length);
return results;
} | final BufferedImageOp[] function() { BufferedImageOp[] results = new BufferedImageOp[filters.length]; System.arraycopy(filters, 0, results, 0, results.length); return results; } | /**
* A defensive copy of the Effects to apply to the results
* of the AbstractPainter's painting operation. The array may
* be empty but it will never be null.
* @return the array of filters applied to this painter
*/ | A defensive copy of the Effects to apply to the results of the AbstractPainter's painting operation. The array may be empty but it will never be null | getFilters | {
"repo_name": "szabob94/vedes4",
"path": "jxmap_osm/src/main/java/org/jxmapviewer/painter/AbstractPainter.java",
"license": "gpl-3.0",
"size": 16921
} | [
"java.awt.image.BufferedImageOp"
] | import java.awt.image.BufferedImageOp; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,947,315 |
public Set<String> keySet() {
unparcel();
return mMap.keySet();
} | Set<String> function() { unparcel(); return mMap.keySet(); } | /**
* Returns a Set containing the Strings used as keys in this Bundle.
*
* @return a Set of String keys
*/ | Returns a Set containing the Strings used as keys in this Bundle | keySet | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/os/BaseBundle.java",
"license": "gpl-3.0",
"size": 40770
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,601,852 |
private int countCurrentEC2Slaves(SlaveTemplate template) throws AmazonClientException {
LOGGER.log(Level.FINE, "Counting current slaves: " + (template != null ? (" AMI: " + template.getAmi()) : " All AMIS"));
int n = 0;
Set<String> instanceIds = new HashSet<String>();
String descrip... | int function(SlaveTemplate template) throws AmazonClientException { LOGGER.log(Level.FINE, STR + (template != null ? (STR + template.getAmi()) : STR)); int n = 0; Set<String> instanceIds = new HashSet<String>(); String description = template != null ? template.description : null; for (Reservation r : connect().describe... | /**
* Counts the number of instances in EC2 that can be used with the specified image and a template. Also removes any
* nodes associated with canceled requests.
*
* @param template If left null, then all instances are counted.
*/ | Counts the number of instances in EC2 that can be used with the specified image and a template. Also removes any nodes associated with canceled requests | countCurrentEC2Slaves | {
"repo_name": "arcivanov/ec2-plugin",
"path": "src/main/java/hudson/plugins/ec2/EC2Cloud.java",
"license": "mit",
"size": 36939
} | [
"com.amazonaws.AmazonClientException",
"com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsRequest",
"com.amazonaws.services.ec2.model.Filter",
"com.amazonaws.services.ec2.model.Instance",
"com.amazonaws.services.ec2.model.InstanceStateName",
"com.amazonaws.services.ec2.model.Reservation",
"co... | import com.amazonaws.AmazonClientException; import com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsRequest; import com.amazonaws.services.ec2.model.Filter; import com.amazonaws.services.ec2.model.Instance; import com.amazonaws.services.ec2.model.InstanceStateName; import com.amazonaws.services.ec2.model.Re... | import com.amazonaws.*; import com.amazonaws.services.ec2.model.*; import hudson.model.*; import java.io.*; import java.util.*; import java.util.logging.*; import org.apache.commons.lang.*; | [
"com.amazonaws",
"com.amazonaws.services",
"hudson.model",
"java.io",
"java.util",
"org.apache.commons"
] | com.amazonaws; com.amazonaws.services; hudson.model; java.io; java.util; org.apache.commons; | 2,552,068 |
public int indexOf(XYDataset dataset) {
int result = -1;
for (int i = 0; i < this.datasets.size(); i++) {
if (dataset == this.datasets.get(i)) {
result = i;
break;
}
}
return result;
} | int function(XYDataset dataset) { int result = -1; for (int i = 0; i < this.datasets.size(); i++) { if (dataset == this.datasets.get(i)) { result = i; break; } } return result; } | /**
* Returns the index of the specified dataset, or <code>-1</code> if the
* dataset does not belong to the plot.
*
* @param dataset the dataset (<code>null</code> not permitted).
*
* @return The index.
*/ | Returns the index of the specified dataset, or <code>-1</code> if the dataset does not belong to the plot | indexOf | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java",
"license": "mit",
"size": 199979
} | [
"org.jfree.data.xy.XYDataset"
] | import org.jfree.data.xy.XYDataset; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 2,198,055 |
@Override
protected void initialize() {
super.initialize();
m_Calendar = new GregorianCalendar();
m_FormatterDayOfWeek = new DateFormat("E");
} | void function() { super.initialize(); m_Calendar = new GregorianCalendar(); m_FormatterDayOfWeek = new DateFormat("E"); } | /**
* Initializes the members.
*/ | Initializes the members | initialize | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/data/conversion/ExtractDateTimeField.java",
"license": "gpl-3.0",
"size": 11818
} | [
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import java.util.Calendar; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,733,579 |
public static String getVersion() {
return "PostgreSQL 8.1.4 server protocol using H2 " +
Constants.getFullVersion();
} | static String function() { return STR + Constants.getFullVersion(); } | /**
* Get the version. This method must return PostgreSQL to keep some clients
* happy. This method is called by the database.
*
* @return the server name and version
*/ | Get the version. This method must return PostgreSQL to keep some clients happy. This method is called by the database | getVersion | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/server/pg/PgServer.java",
"license": "mpl-2.0",
"size": 17325
} | [
"org.h2.engine.Constants"
] | import org.h2.engine.Constants; | import org.h2.engine.*; | [
"org.h2.engine"
] | org.h2.engine; | 44,295 |
public AggregationSpec addResultReader(Writeable.Reader<? extends InternalAggregation> resultReader) {
return addResultReader(getName().getPreferredName(), resultReader);
} | AggregationSpec function(Writeable.Reader<? extends InternalAggregation> resultReader) { return addResultReader(getName().getPreferredName(), resultReader); } | /**
* Add a reader for the shard level results of the aggregation with {@linkplain #getName}'s {@link ParseField#getPreferredName()} as
* the {@link NamedWriteable#getWriteableName()}.
*/ | Add a reader for the shard level results of the aggregation with #getName's <code>ParseField#getPreferredName()</code> as the <code>NamedWriteable#getWriteableName()</code> | addResultReader | {
"repo_name": "robin13/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java",
"license": "apache-2.0",
"size": 26277
} | [
"org.elasticsearch.common.io.stream.Writeable",
"org.elasticsearch.search.aggregations.InternalAggregation"
] | import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.search.aggregations.InternalAggregation; | import org.elasticsearch.common.io.stream.*; import org.elasticsearch.search.aggregations.*; | [
"org.elasticsearch.common",
"org.elasticsearch.search"
] | org.elasticsearch.common; org.elasticsearch.search; | 2,878,160 |
protected ScriptSource convertToScriptSource(String beanName, String scriptSourceLocator,
ResourceLoader resourceLoader) {
if (scriptSourceLocator.startsWith(INLINE_SCRIPT_PREFIX)) {
return new StaticScriptSource(scriptSourceLocator.substring(INLINE_SCRIPT_PREFIX.length()), beanName);
}
else {
return... | ScriptSource function(String beanName, String scriptSourceLocator, ResourceLoader resourceLoader) { if (scriptSourceLocator.startsWith(INLINE_SCRIPT_PREFIX)) { return new StaticScriptSource(scriptSourceLocator.substring(INLINE_SCRIPT_PREFIX.length()), beanName); } else { return new ResourceScriptSource(resourceLoader.g... | /**
* Convert the given script source locator to a ScriptSource instance.
* <p>By default, supported locators are Spring resource locations
* (such as "file:C:/myScript.bsh" or "classpath:myPackage/myScript.bsh")
* and inline scripts ("inline:myScriptText...").
* @param beanName the name of the scripted bean
... | Convert the given script source locator to a ScriptSource instance. By default, supported locators are Spring resource locations and inline scripts ("inline:myScriptText...") | convertToScriptSource | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java",
"license": "gpl-2.0",
"size": 25651
} | [
"org.springframework.core.io.ResourceLoader",
"org.springframework.scripting.ScriptSource"
] | import org.springframework.core.io.ResourceLoader; import org.springframework.scripting.ScriptSource; | import org.springframework.core.io.*; import org.springframework.scripting.*; | [
"org.springframework.core",
"org.springframework.scripting"
] | org.springframework.core; org.springframework.scripting; | 2,399,814 |
protected void addLicenseConfirmationDisabledPropertyDescriptor(Object object)
{
itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
getString("_UI_P2Task_licenseConfirmationDisabled_feature"),
getStr... | void function(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), SetupP2Package.Literals.P2_TASK__LICENSE_CONFIRMATION_DISABLED, true, false, false, ItemPropertyDes... | /**
* This adds a property descriptor for the License Confirmation Disabled feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the License Confirmation Disabled feature. | addLicenseConfirmationDisabledPropertyDescriptor | {
"repo_name": "peterkir/org.eclipse.oomph",
"path": "plugins/org.eclipse.oomph.setup.p2.edit/src/org/eclipse/oomph/setup/p2/provider/P2TaskItemProvider.java",
"license": "epl-1.0",
"size": 8532
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.eclipse.oomph.setup.p2.SetupP2Package"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.oomph.setup.p2.SetupP2Package; | import org.eclipse.emf.edit.provider.*; import org.eclipse.oomph.setup.p2.*; | [
"org.eclipse.emf",
"org.eclipse.oomph"
] | org.eclipse.emf; org.eclipse.oomph; | 955,552 |
protected final void disableTypeCheck() {
checkState(this.setUpRan, "Attempted to configure before running setUp().");
typeCheckEnabled = false;
} | final void function() { checkState(this.setUpRan, STR); typeCheckEnabled = false; } | /**
* Do not run type checking before running the test pass.
*
* @see TypeCheck
*/ | Do not run type checking before running the test pass | disableTypeCheck | {
"repo_name": "vobruba-martin/closure-compiler",
"path": "test/com/google/javascript/jscomp/CompilerTestCase.java",
"license": "apache-2.0",
"size": 86059
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 375,243 |
@Converter
public Message convertToJmsMessage(Exchange exchange, Object value) throws KapuaException {
metricConverterJmsMessage.inc();
// assume that the message is a Camel Jms message
JmsMessage message = exchange.getIn(JmsMessage.class);
if (message.getJmsMessage() instanceof ... | Message function(Exchange exchange, Object value) throws KapuaException { metricConverterJmsMessage.inc(); JmsMessage message = exchange.getIn(JmsMessage.class); if (message.getJmsMessage() instanceof BytesMessage) { return message.getJmsMessage(); } metricConverterJmsErrorMessage.inc(); throw KapuaException.internalEr... | /**
* Convert incoming message to a javax.jms.Message
*
* @param exchange
* @param value
* @return jms Message
* @throws KapuaException
* if incoming message does not contain a javax.jms.BytesMessage
*/ | Convert incoming message to a javax.jms.Message | convertToJmsMessage | {
"repo_name": "cbaerikebc/kapua",
"path": "broker-core/src/main/java/org/eclipse/kapua/broker/core/converter/AbstractKapuaConverter.java",
"license": "epl-1.0",
"size": 5418
} | [
"javax.jms.BytesMessage",
"javax.jms.Message",
"org.apache.camel.Exchange",
"org.apache.camel.component.jms.JmsMessage",
"org.eclipse.kapua.KapuaException"
] | import javax.jms.BytesMessage; import javax.jms.Message; import org.apache.camel.Exchange; import org.apache.camel.component.jms.JmsMessage; import org.eclipse.kapua.KapuaException; | import javax.jms.*; import org.apache.camel.*; import org.apache.camel.component.jms.*; import org.eclipse.kapua.*; | [
"javax.jms",
"org.apache.camel",
"org.eclipse.kapua"
] | javax.jms; org.apache.camel; org.eclipse.kapua; | 1,645,045 |
protected void configureTextView(TextView view) {
if (itemResourceId == TEXT_VIEW_ITEM_RESOURCE) {
view.setTextColor(textColor);
view.setGravity(Gravity.CENTER);
view.setTextSize(textSize);
view.setLines(1);
}
if (textTypeface != null) {
... | void function(TextView view) { if (itemResourceId == TEXT_VIEW_ITEM_RESOURCE) { view.setTextColor(textColor); view.setGravity(Gravity.CENTER); view.setTextSize(textSize); view.setLines(1); } if (textTypeface != null) { view.setTypeface(textTypeface); } else { view.setTypeface(Typeface.SANS_SERIF, Typeface.BOLD); } } | /**
* Configures text view. Is called for the TEXT_VIEW_ITEM_RESOURCE views.
* @param view the text view to be configured
*/ | Configures text view. Is called for the TEXT_VIEW_ITEM_RESOURCE views | configureTextView | {
"repo_name": "18380460383/eshare",
"path": "RxTools-library/src/main/java/com/vondear/rxtools/view/wheelhorizontal/AbstractWheelTextAdapter.java",
"license": "apache-2.0",
"size": 8570
} | [
"android.graphics.Typeface",
"android.view.Gravity",
"android.widget.TextView"
] | import android.graphics.Typeface; import android.view.Gravity; import android.widget.TextView; | import android.graphics.*; import android.view.*; import android.widget.*; | [
"android.graphics",
"android.view",
"android.widget"
] | android.graphics; android.view; android.widget; | 2,767,385 |
protected NiFiRegistryFlowMapper makeNiFiRegistryFlowMapper(final ExtensionManager extensionManager) {
return new NiFiRegistryFlowMapper(extensionManager);
} | NiFiRegistryFlowMapper function(final ExtensionManager extensionManager) { return new NiFiRegistryFlowMapper(extensionManager); } | /**
* Create a new flow mapper using a mockable method for testing
*
* @param extensionManager the extension manager to create the flow mapper with
* @return a new NiFiRegistryFlowMapper instance
*/ | Create a new flow mapper using a mockable method for testing | makeNiFiRegistryFlowMapper | {
"repo_name": "ijokarumawak/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java",
"license": "apache-2.0",
"size": 301629
} | [
"org.apache.nifi.nar.ExtensionManager",
"org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper"
] | import org.apache.nifi.nar.ExtensionManager; import org.apache.nifi.registry.flow.mapping.NiFiRegistryFlowMapper; | import org.apache.nifi.nar.*; import org.apache.nifi.registry.flow.mapping.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 671,326 |
public void setXmlFileSets(final FileSet[] xmlFileSets) {
this.xmlFileSets = xmlFileSets;
} | void function(final FileSet[] xmlFileSets) { this.xmlFileSets = xmlFileSets; } | /**
* Sets the XML file sets. This method is primarily used for testing.
*
* @param xmlFileSets
* XML file sets.
*/ | Sets the XML file sets. This method is primarily used for testing | setXmlFileSets | {
"repo_name": "trajano/cleanpom-maven-plugin",
"path": "src/main/java/net/trajano/mojo/cleanpom/CleanXmlMojo.java",
"license": "epl-1.0",
"size": 7737
} | [
"org.apache.maven.model.FileSet"
] | import org.apache.maven.model.FileSet; | import org.apache.maven.model.*; | [
"org.apache.maven"
] | org.apache.maven; | 596,477 |
public static String getLocalFilePath() {
String path = System.getProperty( "user.home" );
if (Util.isWindows()) {
if (!Util.isNullOrEmpty(System.getenv("LOCALAPPDATA"))) {
path = System.getenv("LOCALAPPDATA") ;
}
}
final String additionalPath ... | static String function() { String path = System.getProperty( STR ); if (Util.isWindows()) { if (!Util.isNullOrEmpty(System.getenv(STR))) { path = System.getenv(STR) ; } } final String additionalPath = (System.getProperty("test") != null ? "test" + File.separator : ""); return path + APP_DATA_PATH + additionalPath; } | /**
* Return local file path
*
* @return
*/ | Return local file path | getLocalFilePath | {
"repo_name": "cisco-system-traffic-generator/trex-stateless-gui",
"path": "src/main/java/com/exalttech/trex/util/files/FileManager.java",
"license": "apache-2.0",
"size": 7949
} | [
"com.exalttech.trex.util.Util",
"java.io.File"
] | import com.exalttech.trex.util.Util; import java.io.File; | import com.exalttech.trex.util.*; import java.io.*; | [
"com.exalttech.trex",
"java.io"
] | com.exalttech.trex; java.io; | 2,697,456 |
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
Class<?> aClass = Class.forName("com.staticserverexample.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ... | static void function( Context context, ReactInstanceManager reactInstanceManager) { if (BuildConfig.DEBUG) { try { Class<?> aClass = Class.forName(STR); aClass .getMethod(STR, Context.class, ReactInstanceManager.class) .invoke(null, context, reactInstanceManager); } catch (ClassNotFoundException e) { e.printStackTrace(... | /**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/ | Loads Flipper in React Native templates. Call this in the onCreate method with something like initializeFlipper(this, getReactNativeHost().getReactInstanceManager()) | initializeFlipper | {
"repo_name": "futurepress/react-native-static-server",
"path": "StaticServerExample/android/app/src/main/java/com/staticserverexample/MainApplication.java",
"license": "mit",
"size": 2731
} | [
"android.content.Context",
"com.facebook.react.ReactInstanceManager",
"java.lang.reflect.InvocationTargetException"
] | import android.content.Context; import com.facebook.react.ReactInstanceManager; import java.lang.reflect.InvocationTargetException; | import android.content.*; import com.facebook.react.*; import java.lang.reflect.*; | [
"android.content",
"com.facebook.react",
"java.lang"
] | android.content; com.facebook.react; java.lang; | 589,610 |
private void addToDesktop(App app, PointF point){
//Create app view for desktop.
View desktopItem = this.activity.getLayoutInflater().inflate(R.layout.desktop_item, null);
ImageView icon = (ImageView) desktopItem.findViewById(R.id.desktop_item_icon);
icon.setImageDrawable(app.getIcon... | void function(App app, PointF point){ View desktopItem = this.activity.getLayoutInflater().inflate(R.layout.desktop_item, null); ImageView icon = (ImageView) desktopItem.findViewById(R.id.desktop_item_icon); icon.setImageDrawable(app.getIcon()); TextView label = (TextView) desktopItem.findViewById(R.id.desktop_item_lab... | /**
* Add an {@link App App} to the desktop.
* @param app The app to add to the desktop.
* @param point The place to add the app.
*/ | Add an <code>App App</code> to the desktop | addToDesktop | {
"repo_name": "AIOSDev05/cast-launcher",
"path": "Cast Launcher/app/src/main/java/net/sandstorm/castlauncher/Workspace.java",
"license": "mit",
"size": 24917
} | [
"android.graphics.PointF",
"android.graphics.RectF",
"android.view.View",
"android.widget.ImageView",
"android.widget.TextView"
] | import android.graphics.PointF; import android.graphics.RectF; import android.view.View; import android.widget.ImageView; import android.widget.TextView; | import android.graphics.*; import android.view.*; import android.widget.*; | [
"android.graphics",
"android.view",
"android.widget"
] | android.graphics; android.view; android.widget; | 515,895 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<RegistryStatisticsInner> getStatsWithResponse(
String resourceGroupName, String resourceName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<RegistryStatisticsInner> getStatsWithResponse( String resourceGroupName, String resourceName, Context context); | /**
* Get the statistics from an IoT hub.
*
* @param resourceGroupName The name of the resource group that contains the IoT hub.
* @param resourceName The name of the IoT hub.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parame... | Get the statistics from an IoT hub | getStatsWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iothub/azure-resourcemanager-iothub/src/main/java/com/azure/resourcemanager/iothub/fluent/IotHubResourcesClient.java",
"license": "mit",
"size": 52361
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.iothub.fluent.models.RegistryStatisticsInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.iothub.fluent.models.RegistryStatisticsInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.iothub.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,420,874 |
public boolean mkdirs(String src, FsPermission permission,
boolean createParent) throws IOException {
final FsPermission masked = applyUMask(permission);
return primitiveMkdir(src, masked, createParent);
} | boolean function(String src, FsPermission permission, boolean createParent) throws IOException { final FsPermission masked = applyUMask(permission); return primitiveMkdir(src, masked, createParent); } | /**
* Create a directory (or hierarchy of directories) with the given
* name and permission.
*
* @param src The path of the directory being created
* @param permission The permission of the directory being created.
* If permission == null, use {@link FsPermission#getDefault()}.
* @param createParen... | Create a directory (or hierarchy of directories) with the given name and permission | mkdirs | {
"repo_name": "ouyangjie/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 112861
} | [
"java.io.IOException",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,056,585 |
private Instance readInstance(ResultSet rs) throws Exception {
ResultSetMetaData md = rs.getMetaData();
int numAttributes = md.getColumnCount();
double[] vals = new double[numAttributes];
m_structure.delete();
for (int i = 1; i <= numAttributes; i++) {
switch (m_DataBaseConnection.translate... | Instance function(ResultSet rs) throws Exception { ResultSetMetaData md = rs.getMetaData(); int numAttributes = md.getColumnCount(); double[] vals = new double[numAttributes]; m_structure.delete(); for (int i = 1; i <= numAttributes; i++) { switch (m_DataBaseConnection.translateDBColumnType(md .getColumnTypeName(i))) {... | /**
* Reads an instance from a database.
*
* @param rs the ReusltSet to load
* @throws Exception if instance cannot be read
* @return an instance read from the database
*/ | Reads an instance from a database | readInstance | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/core/converters/DatabaseLoader.java",
"license": "gpl-3.0",
"size": 53542
} | [
"java.sql.Date",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.Time"
] | import java.sql.Date; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Time; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,211,271 |
private static boolean collision(KVector newPos, BpmnArtifact artifact, Layer layer){
boolean collision = false;
double artifactTop = newPos.y;
double artifactBottom = newPos.y + artifact.node.getSize().y;
for (LNode node : layer.getNodes()){
double nodeTop = node.getPosition().y;
double nodeBottom = n... | static boolean function(KVector newPos, BpmnArtifact artifact, Layer layer){ boolean collision = false; double artifactTop = newPos.y; double artifactBottom = newPos.y + artifact.node.getSize().y; for (LNode node : layer.getNodes()){ double nodeTop = node.getPosition().y; double nodeBottom = node.getPosition().y + node... | /**
* Check collisions with nodes in certain layer
*/ | Check collisions with nodes in certain layer | collision | {
"repo_name": "MarvinLudwig/bpmn_layouter",
"path": "eu.ml82.bpmn_layouter.core/src/eu/ml82/bpmn_layouter/core/processors/artifacts/SingleEdgeArtifactProcessor.java",
"license": "epl-1.0",
"size": 4572
} | [
"de.cau.cs.kieler.core.math.KVector",
"de.cau.cs.kieler.klay.layered.graph.LNode",
"de.cau.cs.kieler.klay.layered.graph.Layer"
] | import de.cau.cs.kieler.core.math.KVector; import de.cau.cs.kieler.klay.layered.graph.LNode; import de.cau.cs.kieler.klay.layered.graph.Layer; | import de.cau.cs.kieler.core.math.*; import de.cau.cs.kieler.klay.layered.graph.*; | [
"de.cau.cs"
] | de.cau.cs; | 2,554,908 |
public void refresh(boolean restore) {
FileSystemObject fso = null;
// Try to restore the previous scroll position
if (restore) {
try {
if (this.mAdapterView != null && this.mAdapter != null) {
int position = this.mAdapterView.getFirstVisiblePo... | void function(boolean restore) { FileSystemObject fso = null; if (restore) { try { if (this.mAdapterView != null && this.mAdapter != null) { int position = this.mAdapterView.getFirstVisiblePosition(); fso = this.mAdapter.getItem(position); } } catch (Throwable _throw) {} } refresh(fso); } | /**
* Method that refresh the view data.
*
* @param restore Restore previous position
*/ | Method that refresh the view data | refresh | {
"repo_name": "AnimeROM/android_package_AnimeManager",
"path": "src/com/animerom/filemanager/ui/widgets/NavigationView.java",
"license": "apache-2.0",
"size": 48373
} | [
"com.animerom.filemanager.model.FileSystemObject"
] | import com.animerom.filemanager.model.FileSystemObject; | import com.animerom.filemanager.model.*; | [
"com.animerom.filemanager"
] | com.animerom.filemanager; | 2,210,631 |
public static TreeViewer getTreeViewer()
{
return BaseTest.getMETreeViewer();
}
| static TreeViewer function() { return BaseTest.getMETreeViewer(); } | /**
* Returns the Tree Viewer of Model Explorer
*/ | Returns the Tree Viewer of Model Explorer | getTreeViewer | {
"repo_name": "nmohamad/bridgepoint",
"path": "src/org.xtuml.bp.test/src/org/xtuml/bp/test/common/ExplorerUtil.java",
"license": "apache-2.0",
"size": 19761
} | [
"org.eclipse.jface.viewers.TreeViewer"
] | import org.eclipse.jface.viewers.TreeViewer; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,237,494 |
@Test
public void displayType()
{
// Add a new database list field.
DBListClassFieldEditPane dbListField = new DBListClassFieldEditPane(editor.addField(this.fieldName).getName());
// Check that the input suggest picker is working.
dbListField.getPicker().sendKeys("db").waitF... | void function() { DBListClassFieldEditPane dbListField = new DBListClassFieldEditPane(editor.addField(this.fieldName).getName()); dbListField.getPicker().sendKeys("db").waitForSuggestions().selectByVisibleText(STR); dbListField.openConfigPanel(); dbListField.getMultipleSelectionCheckBox().click(); assertTrue(dbListFiel... | /**
* Tests that the field preview is properly updated when the display type is changed. Currently selected items must
* be preserved.
*/ | Tests that the field preview is properly updated when the display type is changed. Currently selected items must be preserved | displayType | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-test/xwiki-platform-distribution-flavor-test-ui/src/test/it/org/xwiki/test/ui/appwithinminutes/DBListClassFieldTest.java",
"license": "lgpl-2.1",
"size": 5177
} | [
"java.util.Arrays",
"org.junit.Assert",
"org.xwiki.appwithinminutes.test.po.DBListClassFieldEditPane"
] | import java.util.Arrays; import org.junit.Assert; import org.xwiki.appwithinminutes.test.po.DBListClassFieldEditPane; | import java.util.*; import org.junit.*; import org.xwiki.appwithinminutes.test.po.*; | [
"java.util",
"org.junit",
"org.xwiki.appwithinminutes"
] | java.util; org.junit; org.xwiki.appwithinminutes; | 2,614,836 |
private boolean isRMCEnabledAtClientOrSdkLevel() {
RequestMetricCollector c = requestMetricCollector();
return c != null && c.isEnabled();
} | boolean function() { RequestMetricCollector c = requestMetricCollector(); return c != null && c.isEnabled(); } | /**
* Returns true if request metric collection is enabled at the service
* client or AWS SDK level request; false otherwise.
*/ | Returns true if request metric collection is enabled at the service client or AWS SDK level request; false otherwise | isRMCEnabledAtClientOrSdkLevel | {
"repo_name": "trasa/aws-sdk-java",
"path": "aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceClient.java",
"license": "apache-2.0",
"size": 32380
} | [
"com.amazonaws.metrics.RequestMetricCollector"
] | import com.amazonaws.metrics.RequestMetricCollector; | import com.amazonaws.metrics.*; | [
"com.amazonaws.metrics"
] | com.amazonaws.metrics; | 2,252,296 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.