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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void install(List<Bundle> toStart, File file) {
try {
LOGGER.debug("Installing bundle from {}", file.getAbsolutePath());
Bundle bundle = context.installBundle("reference:" + file.toURI().toURL().toExternalForm());
if (!BundleHelper.isFragment(bundle)) {
... | void function(List<Bundle> toStart, File file) { try { LOGGER.debug(STR, file.getAbsolutePath()); Bundle bundle = context.installBundle(STR + file.toURI().toURL().toExternalForm()); if (!BundleHelper.isFragment(bundle)) { toStart.add(bundle); } } catch (Exception e) { LOGGER.error(STR, file.getAbsolutePath(), e); } } | /**
* Installs the given bundle.
*
* @param toStart the list to populate if the bundle must be started afterward
* @param file the bundle file
*/ | Installs the given bundle | install | {
"repo_name": "ow2-chameleon/core",
"path": "src/main/java/org/ow2/chameleon/core/activators/CoreActivator.java",
"license": "apache-2.0",
"size": 3819
} | [
"java.io.File",
"java.util.List",
"org.osgi.framework.Bundle",
"org.ow2.chameleon.core.utils.BundleHelper"
] | import java.io.File; import java.util.List; import org.osgi.framework.Bundle; import org.ow2.chameleon.core.utils.BundleHelper; | import java.io.*; import java.util.*; import org.osgi.framework.*; import org.ow2.chameleon.core.utils.*; | [
"java.io",
"java.util",
"org.osgi.framework",
"org.ow2.chameleon"
] | java.io; java.util; org.osgi.framework; org.ow2.chameleon; | 485,483 |
MockMvcRequestSpecification cookie(Cookie cookie); | MockMvcRequestSpecification cookie(Cookie cookie); | /**
* Specify a {@link com.jayway.restassured.response.Cookie} to send with the request.
* <p>
* <pre>
* Cookie someCookie = new Cookie.Builder("some_cookie", "some_value").setSecured(true).build();
* given().cookie(someCookie).and().expect().body(equalTo("x")).when().get("/cookie");
* </... | Specify a <code>com.jayway.restassured.response.Cookie</code> to send with the request. <code> Cookie someCookie = new Cookie.Builder("some_cookie", "some_value").setSecured(true).build(); given().cookie(someCookie).and().expect().body(equalTo("x")).when().get("/cookie"); </code> This will set the cookie <code>someCook... | cookie | {
"repo_name": "dushmis/rest-assured",
"path": "modules/spring-mock-mvc/src/main/java/com/jayway/restassured/module/mockmvc/specification/MockMvcRequestSpecification.java",
"license": "apache-2.0",
"size": 42429
} | [
"com.jayway.restassured.response.Cookie"
] | import com.jayway.restassured.response.Cookie; | import com.jayway.restassured.response.*; | [
"com.jayway.restassured"
] | com.jayway.restassured; | 2,565,215 |
if (!(isProbIndexArrDone || isGenusWordProbListDone || isWordPriorArrDone)) {
throw new IllegalStateException("Error: The bergeyTree file should be read after "
+ "at least one of the other training files");
}
TreeFileParser parser = new TreeFileParser();
rootTre... | if (!(isProbIndexArrDone isGenusWordProbListDone isWordPriorArrDone)) { throw new IllegalStateException(STR + STR); } TreeFileParser parser = new TreeFileParser(); rootTree = parser.createTree(reader, hierarchyVersion); createGenusNodeList(rootTree); logLeaveCountArr = new float[genusNodeList.size()]; for (HierarchyTre... | /** Reads in the tree information from a reader and create all the HierarchyTrees.
* Note: the tree information has to be read after at least one of the other
* three files because we need to set the version information.
*/ | Reads in the tree information from a reader and create all the HierarchyTrees. Note: the tree information has to be read after at least one of the other three files because we need to set the version information | createTree | {
"repo_name": "rdpstaff/classifier",
"path": "src/edu/msu/cme/rdp/classifier/TrainingInfo.java",
"license": "gpl-2.0",
"size": 10883
} | [
"edu.msu.cme.rdp.classifier.io.TreeFileParser"
] | import edu.msu.cme.rdp.classifier.io.TreeFileParser; | import edu.msu.cme.rdp.classifier.io.*; | [
"edu.msu.cme"
] | edu.msu.cme; | 1,555,578 |
public LivingEntity getTarget() {
return target;
} | LivingEntity function() { return target; } | /**
* Gets the target of the buff
* @return the target
*/ | Gets the target of the buff | getTarget | {
"repo_name": "TheComputerGeek2/MagicSpells",
"path": "core/src/main/java/com/nisovin/magicspells/events/BuffEndEvent.java",
"license": "gpl-3.0",
"size": 1212
} | [
"org.bukkit.entity.LivingEntity"
] | import org.bukkit.entity.LivingEntity; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 1,378,994 |
public RoutingExplanations explanations() {
return explanations;
}
}
private final AllocationDeciders deciders;
private final RoutingNodes routingNodes;
private final MetaData metaData;
private final RoutingTable routingTable;
private final DiscoveryNodes nodes;
... | RoutingExplanations function() { return explanations; } } private final AllocationDeciders deciders; private final RoutingNodes routingNodes; private final MetaData metaData; private final RoutingTable routingTable; private final DiscoveryNodes nodes; private final ImmutableOpenMap<String, ClusterState.Custom> customs;... | /**
* Get the explanation of this result
* @return explanation
*/ | Get the explanation of this result | explanations | {
"repo_name": "zkidkid/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/cluster/routing/allocation/RoutingAllocation.java",
"license": "apache-2.0",
"size": 10157
} | [
"java.util.Map",
"java.util.Set",
"org.elasticsearch.cluster.ClusterInfo",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.metadata.MetaData",
"org.elasticsearch.cluster.node.DiscoveryNodes",
"org.elasticsearch.cluster.routing.RoutingNodes",
"org.elasticsearch.cluster.routing.Rout... | import java.util.Map; import java.util.Set; import org.elasticsearch.cluster.ClusterInfo; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.routing.RoutingNodes; import org.elasticsear... | import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.decider.*; import org.elasticsearch.common.collect.*; import org.elasticsearch.ind... | [
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.util; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; | 23,922 |
public TemplateAvailabilityProvider getProvider(String view, ApplicationContext applicationContext) {
Assert.notNull(applicationContext, "ApplicationContext must not be null");
return getProvider(view, applicationContext.getEnvironment(), applicationContext.getClassLoader(),
applicationContext);
} | TemplateAvailabilityProvider function(String view, ApplicationContext applicationContext) { Assert.notNull(applicationContext, STR); return getProvider(view, applicationContext.getEnvironment(), applicationContext.getClassLoader(), applicationContext); } | /**
* Get the provider that can be used to render the given view.
* @param view the view to render
* @param applicationContext the application context
* @return a {@link TemplateAvailabilityProvider} or null
*/ | Get the provider that can be used to render the given view | getProvider | {
"repo_name": "tiarebalbi/spring-boot",
"path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/template/TemplateAvailabilityProviders.java",
"license": "apache-2.0",
"size": 6044
} | [
"org.springframework.context.ApplicationContext",
"org.springframework.util.Assert"
] | import org.springframework.context.ApplicationContext; import org.springframework.util.Assert; | import org.springframework.context.*; import org.springframework.util.*; | [
"org.springframework.context",
"org.springframework.util"
] | org.springframework.context; org.springframework.util; | 1,510,905 |
Set<Classroom> getClassrooms();
| Set<Classroom> getClassrooms(); | /**
* Return the value associated with the column: classroom.
* @return A Set<Classroom> object (this.classroom)
*/ | Return the value associated with the column: classroom | getClassrooms | {
"repo_name": "rpgm/mi15",
"path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/iface/ISection.java",
"license": "apache-2.0",
"size": 2611
} | [
"java.util.Set",
"org.yarlithub.yschool.repository.model.obj.yschool.Classroom"
] | import java.util.Set; import org.yarlithub.yschool.repository.model.obj.yschool.Classroom; | import java.util.*; import org.yarlithub.yschool.repository.model.obj.yschool.*; | [
"java.util",
"org.yarlithub.yschool"
] | java.util; org.yarlithub.yschool; | 1,525,405 |
void createBundleVersion(BundlePersistenceContext context, InputStream contentStream) throws BundlePersistenceException; | void createBundleVersion(BundlePersistenceContext context, InputStream contentStream) throws BundlePersistenceException; | /**
* Persists the binary content of a version of an extension bundle.
*
* This method should throw a BundlePersistenceException if content already exists for the BundleVersionCoordinate
* specified in the BundlePersistenceContext.
*
* @param context the context about the bundle version be... | Persists the binary content of a version of an extension bundle. This method should throw a BundlePersistenceException if content already exists for the BundleVersionCoordinate specified in the BundlePersistenceContext | createBundleVersion | {
"repo_name": "MikeThomsen/nifi",
"path": "nifi-registry/nifi-registry-core/nifi-registry-provider-api/src/main/java/org/apache/nifi/registry/extension/BundlePersistenceProvider.java",
"license": "apache-2.0",
"size": 3527
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 819,072 |
public static CommandResult execCommand(String[] commands, boolean isRoot, boolean isNeedResultMsg) {
int result = -1;
if (commands == null || commands.length == 0) {
return new CommandResult(result, null, null);
}
Process process = null;
BufferedReader successRe... | static CommandResult function(String[] commands, boolean isRoot, boolean isNeedResultMsg) { int result = -1; if (commands == null commands.length == 0) { return new CommandResult(result, null, null); } Process process = null; BufferedReader successResult = null; BufferedReader errorResult = null; StringBuilder successM... | /**
* execute shell commands
*
* @param commands command array
* @param isRoot whether need to run with root
* @param isNeedResultMsg whether need result msg
* @return <ul>
* <li>if isNeedResultMsg is false, {@link CommandResult#successMsg} is null and
* {@link Co... | execute shell commands | execCommand | {
"repo_name": "augusting52/Android-Apps",
"path": "ProfessorTea/android/app/src/main/java/com/professortea/utils/ShellUtil.java",
"license": "lgpl-3.0",
"size": 6928
} | [
"java.io.BufferedReader",
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 2,708,074 |
private void setup (XMLReader xmlReader)
{
if (xmlReader == null) {
throw new NullPointerException("XMLReader must not be null");
}
this.xmlReader = xmlReader;
qAtts = new AttributesAdapter();
}
////////////////////////////////////////////////////////////////////
// Implem... | void function (XMLReader xmlReader) { if (xmlReader == null) { throw new NullPointerException(STR); } this.xmlReader = xmlReader; qAtts = new AttributesAdapter(); } | /**
* Internal setup.
*
* @param xmlReader The embedded XMLReader.
*/ | Internal setup | setup | {
"repo_name": "openweave/openweave-core",
"path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java",
"license": "apache-2.0",
"size": 14389
} | [
"org.xml.sax.XMLReader"
] | import org.xml.sax.XMLReader; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,284,290 |
public void evaluate(QualityIndicator<Type> qi, boolean usecache) throws Exception {
if (usecache) {
if (qiEval.containsKey(qi.getName())) {
pareto_eval = qiEval.get(qi.getName());
return;
}
}
// throw error if the indicator is null or... | void function(QualityIndicator<Type> qi, boolean usecache) throws Exception { if (usecache) { if (qiEval.containsKey(qi.getName())) { pareto_eval = qiEval.get(qi.getName()); return; } } if (qi == null qi.getIndicatorType() != IndicatorType.UNARY) throw new Exception(STR); pareto_eval = qi.evaluate(this); qiEval.put(qi.... | /**
* Evaluates the Pareto approximation with the given quality indicator. If {@code usecache} is set to true
* and the Pareto approximation is already evaluated with the given {@code qi}, that value is used.
*
* @param qi the quality indicator used for evaluation
* @param usecache set to... | Evaluates the Pareto approximation with the given quality indicator. If usecache is set to true and the Pareto approximation is already evaluated with the given qi, that value is used | evaluate | {
"repo_name": "UM-LPM/EARS",
"path": "src/org/um/feri/ears/problems/moo/ParetoSolution.java",
"license": "gpl-3.0",
"size": 22150
} | [
"org.um.feri.ears.qualityIndicator.QualityIndicator"
] | import org.um.feri.ears.qualityIndicator.QualityIndicator; | import org.um.feri.ears.*; | [
"org.um.feri"
] | org.um.feri; | 416,665 |
public void testSecondaryMountPointsNotWritable() throws Exception {
final File probe = buildProbeFile(Environment.getExternalStorageDirectory());
assertTrue(probe.createNewFile());
final BufferedReader br = new BufferedReader(new FileReader("/proc/self/mounts"));
try {
... | void function() throws Exception { final File probe = buildProbeFile(Environment.getExternalStorageDirectory()); assertTrue(probe.createNewFile()); final BufferedReader br = new BufferedReader(new FileReader(STR)); try { String line; while ((line = br.readLine()) != null) { final String[] fields = line.split(" "); fina... | /**
* Secondary external storage mount points must always be read-only, per
* CDD, <em>except</em> for the package specific directories tested by
* {@link CommonExternalStorageTest#testAllPackageDirsWritable()}.
*/ | Secondary external storage mount points must always be read-only, per CDD, except for the package specific directories tested by <code>CommonExternalStorageTest#testAllPackageDirsWritable()</code> | testSecondaryMountPointsNotWritable | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/WriteExternalStorageTest.java",
"license": "gpl-3.0",
"size": 12395
} | [
"android.os.Environment",
"android.util.Log",
"com.android.cts.externalstorageapp.CommonExternalStorageTest",
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader"
] | import android.os.Environment; import android.util.Log; import com.android.cts.externalstorageapp.CommonExternalStorageTest; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; | import android.os.*; import android.util.*; import com.android.cts.externalstorageapp.*; import java.io.*; | [
"android.os",
"android.util",
"com.android.cts",
"java.io"
] | android.os; android.util; com.android.cts; java.io; | 1,916,413 |
private void scanBackward(final int repcnt, long delta) {
if (mService == null) {
return;
}
if (repcnt == 0) {
mStartSeekPos = MusicUtils.position();
mLastSeekEventTime = 0;
} else {
if (delta < 5000) {
// seek at 10x sp... | void function(final int repcnt, long delta) { if (mService == null) { return; } if (repcnt == 0) { mStartSeekPos = MusicUtils.position(); mLastSeekEventTime = 0; } else { if (delta < 5000) { delta = delta * 10; } else { delta = 50000 + (delta - 5000) * 40; } long newpos = mStartSeekPos - delta; if (newpos < 0) { MusicU... | /**
* Used to scan backwards in time through the curren track
*
* @param repcnt The repeat count
* @param delta The long press duration
*/ | Used to scan backwards in time through the curren track | scanBackward | {
"repo_name": "olokos/Apollo",
"path": "src/com/andrew/apollo/ui/activities/AudioPlayerActivity.java",
"license": "apache-2.0",
"size": 31640
} | [
"com.andrew.apollo.utils.MusicUtils"
] | import com.andrew.apollo.utils.MusicUtils; | import com.andrew.apollo.utils.*; | [
"com.andrew.apollo"
] | com.andrew.apollo; | 1,538,900 |
StepVerifier consumeErrorWith(Consumer<Throwable> consumer); | StepVerifier consumeErrorWith(Consumer<Throwable> consumer); | /**
* Expect an error and consume with the given consumer. Any
* {@code AssertionError}s thrown by the consumer will be rethrown
* during {@linkplain #verify() verification}.
*
* @param consumer the consumer for the exception
*
* @return the built verification
*/ | Expect an error and consume with the given consumer. Any AssertionErrors thrown by the consumer will be rethrown during #verify() verification | consumeErrorWith | {
"repo_name": "reactor/reactor-core",
"path": "reactor-test/src/main/java/reactor/test/StepVerifier.java",
"license": "apache-2.0",
"size": 51680
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,607,093 |
private void persistDecorator(XMLExtendedStreamWriter writer, ModelNode model) throws XMLStreamException {
if (shouldWriteDecoratorAndElements(model)) {
writer.writeStartElement(decoratorElement);
persistChildren(writer, model);
writer.writeEndElement();
}
} | void function(XMLExtendedStreamWriter writer, ModelNode model) throws XMLStreamException { if (shouldWriteDecoratorAndElements(model)) { writer.writeStartElement(decoratorElement); persistChildren(writer, model); writer.writeEndElement(); } } | /**
* persist decorator and than continue to children without touching the model
*/ | persist decorator and than continue to children without touching the model | persistDecorator | {
"repo_name": "bstansberry/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/PersistentResourceXMLDescription.java",
"license": "lgpl-2.1",
"size": 34950
} | [
"javax.xml.stream.XMLStreamException",
"org.jboss.dmr.ModelNode",
"org.jboss.staxmapper.XMLExtendedStreamWriter"
] | import javax.xml.stream.XMLStreamException; import org.jboss.dmr.ModelNode; import org.jboss.staxmapper.XMLExtendedStreamWriter; | import javax.xml.stream.*; import org.jboss.dmr.*; import org.jboss.staxmapper.*; | [
"javax.xml",
"org.jboss.dmr",
"org.jboss.staxmapper"
] | javax.xml; org.jboss.dmr; org.jboss.staxmapper; | 1,710,233 |
private void fileUpload(PostInfo pi, BufferedInputStream is, File dir) throws IOException {
BufferedOutputStream fs = null;
String fileName = "";
CheckBox cb = (CheckBox) mainActivity.findViewById(R.id.checkbox_upload);
if (!cb.isChecked()) {
mainActivity.makeToast("File... | void function(PostInfo pi, BufferedInputStream is, File dir) throws IOException { BufferedOutputStream fs = null; String fileName = STRFile uploaded attempted and failedSTRfilename=\STRfilename=\STRfilename=\STR')); fs = new BufferedOutputStream(new FileOutputStream(new File(dir, fileName))); if(pi.length > 1024*1024) ... | /**
* Receives the file the user is uploading to this device.
* @param pi The information about this transfer.
* @param is The stream from which the file is being received
* @param dir Directory to which the file should be written.
* @throws IOException
*/ | Receives the file the user is uploading to this device | fileUpload | {
"repo_name": "lispascal/WifiTransfer",
"path": "app/src/main/java/com/lis/pascal/wifitransfer/SingleConnection.java",
"license": "mit",
"size": 35846
} | [
"java.io.BufferedInputStream",
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.nio.charset.Charset"
] | import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 87,344 |
private void dispatchDecodeImageRequest(String filePath, int size) {
// Obtain a file descriptor to send over to the sandboxed process.
File file = new File(filePath);
FileInputStream inputFile = null;
ParcelFileDescriptor pfd = null;
Bundle bundle = new Bundle();
//... | void function(String filePath, int size) { File file = new File(filePath); FileInputStream inputFile = null; ParcelFileDescriptor pfd = null; Bundle bundle = new Bundle(); StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); try { try { inputFile = new FileInputStream(file); FileDescriptor fd = inputF... | /**
* Communicates with the server to decode a single bitmap.
* @param filePath The path to the image on disk.
* @param size The requested width and height of the resulting bitmap.
*/ | Communicates with the server to decode a single bitmap | dispatchDecodeImageRequest | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java",
"license": "apache-2.0",
"size": 10645
} | [
"android.os.Bundle",
"android.os.Message",
"android.os.ParcelFileDescriptor",
"android.os.RemoteException",
"android.os.StrictMode",
"java.io.File",
"java.io.FileDescriptor",
"java.io.FileInputStream",
"java.io.IOException",
"org.chromium.base.Log"
] | import android.os.Bundle; import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.os.StrictMode; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.IOException; import org.chromium.base.Log; | import android.os.*; import java.io.*; import org.chromium.base.*; | [
"android.os",
"java.io",
"org.chromium.base"
] | android.os; java.io; org.chromium.base; | 248,730 |
private Ancestor createAncestorByUpdateQuery() {
Ancestor ancestor = new Ancestor();
MValueCollection searchMVCollection = new MValueCollection(); // single group
if (_value != null) {
// there are search values
List<String> values = Strings.split(_val... | Ancestor function() { Ancestor ancestor = new Ancestor(); MValueCollection searchMVCollection = new MValueCollection(); if (_value != null) { List<String> values = Strings.split(_value, " "); if (_value.length() == 0) { values.add(_value); } for (String strValue : values) { MValue mv = new MValue(); if (checkIgnoreEmpt... | /**
* create MValueCollection from value attribute
*/ | create MValueCollection from value attribute | createAncestorByUpdateQuery | {
"repo_name": "mozartframework/cms",
"path": "src/com/mozartframework/db/app/request/SetInstruction.java",
"license": "gpl-3.0",
"size": 27929
} | [
"com.mozartframework.db.base.Ancestor",
"com.mozartframework.db.base.MValue",
"com.mozartframework.db.base.MValueCollection",
"com.mozartframework.util.Strings",
"java.util.Iterator",
"java.util.List"
] | import com.mozartframework.db.base.Ancestor; import com.mozartframework.db.base.MValue; import com.mozartframework.db.base.MValueCollection; import com.mozartframework.util.Strings; import java.util.Iterator; import java.util.List; | import com.mozartframework.db.base.*; import com.mozartframework.util.*; import java.util.*; | [
"com.mozartframework.db",
"com.mozartframework.util",
"java.util"
] | com.mozartframework.db; com.mozartframework.util; java.util; | 2,891,418 |
@Override
public List<ParameterSweep> getParameterSweeps() {
return new LinkedList<>(this.params);
} | List<ParameterSweep> function() { return new LinkedList<>(this.params); } | /**
* Returns all the parameter sweeps used to create this combined parameter
* sweep
*/ | Returns all the parameter sweeps used to create this combined parameter sweep | getParameterSweeps | {
"repo_name": "b-have/bhave.sweeper",
"path": "src/main/java/org/bhave/sweeper/impl/DefaultCombinedParameterSweep.java",
"license": "gpl-3.0",
"size": 9656
} | [
"java.util.LinkedList",
"java.util.List",
"org.bhave.sweeper.ParameterSweep"
] | import java.util.LinkedList; import java.util.List; import org.bhave.sweeper.ParameterSweep; | import java.util.*; import org.bhave.sweeper.*; | [
"java.util",
"org.bhave.sweeper"
] | java.util; org.bhave.sweeper; | 234,305 |
public void populateRegionLocations(TableName table) {
synchronized (this.colocationInfo) {
if (!isTableColocated(table)) {
throw new IllegalArgumentException("Specified table " + table
+ " should be in one of the tables to co-locate.");
}
... | void function(TableName table) { synchronized (this.colocationInfo) { if (!isTableColocated(table)) { throw new IllegalArgumentException(STR + table + STR); } RegionStates regionStates = this.master.getAssignmentManager().getRegionStates(); List<HRegionInfo> onlineRegions = regionStates.getRegionsOfTable(table); for (H... | /**
* Populates table's region locations into co-location info from master.
* @param table
*/ | Populates table's region locations into co-location info from master | populateRegionLocations | {
"repo_name": "julianhyde/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/balancer/IndexLoadBalancer.java",
"license": "apache-2.0",
"size": 30482
} | [
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hbase.HRegionInfo",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.master.RegionState",
"org.apache.hadoop.hbase.master.RegionStates"
] | import java.util.List; import java.util.Map; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.master.RegionState; import org.apache.hadoop.hbase.master.RegionStates; | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.master.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,162,029 |
protected int getToolbarHeight() {
TypedValue tv = new TypedValue();
getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true);
return getResources().getDimensionPixelSize(tv.resourceId);
} | int function() { TypedValue tv = new TypedValue(); getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true); return getResources().getDimensionPixelSize(tv.resourceId); } | /**
* Returns toolbar height, in px
*/ | Returns toolbar height, in px | getToolbarHeight | {
"repo_name": "nbonnec/Redface",
"path": "app/src/main/java/com/ayuget/redface/ui/activity/ReplyActivity.java",
"license": "apache-2.0",
"size": 38175
} | [
"android.util.TypedValue"
] | import android.util.TypedValue; | import android.util.*; | [
"android.util"
] | android.util; | 661,873 |
@Override
public float readFloat() throws JMSException {
checkCanRead();
try {
return dataIn.readFloat();
} catch (EOFException e) {
throw new MessageEOFException(e.getMessage());
} catch (IOException e) {
throw convertExceptionToJMSException(e... | float function() throws JMSException { checkCanRead(); try { return dataIn.readFloat(); } catch (EOFException e) { throw new MessageEOFException(e.getMessage()); } catch (IOException e) { throw convertExceptionToJMSException(e); } } | /**
* Reads a <code>float</code> from the bytes message stream.
*
* @return a <code>float</code> value from the bytes message stream
* @throws JMSException
* If the JMS provider fails to read the message due to some
* internal error.
* @throws MessageEOFExcept... | Reads a <code>float</code> from the bytes message stream | readFloat | {
"repo_name": "lkb2k/amazon-sqs-java-messaging-lib",
"path": "src/main/java/com/amazon/sqs/javamessaging/message/SQSBytesMessage.java",
"license": "apache-2.0",
"size": 28703
} | [
"java.io.EOFException",
"java.io.IOException",
"javax.jms.JMSException",
"javax.jms.MessageEOFException"
] | import java.io.EOFException; import java.io.IOException; import javax.jms.JMSException; import javax.jms.MessageEOFException; | import java.io.*; import javax.jms.*; | [
"java.io",
"javax.jms"
] | java.io; javax.jms; | 817,927 |
@Test
public void testClientDNProtocolTimeout() throws IOException {
final Server server = new TestServer(1, true);
server.start();
final InetSocketAddress addr = NetUtils.getConnectAddress(server);
DatanodeID fakeDnId = DFSTestUtil.getLocalDatanodeID(addr.getPort());
ExtendedBlock b = new... | void function() throws IOException { final Server server = new TestServer(1, true); server.start(); final InetSocketAddress addr = NetUtils.getConnectAddress(server); DatanodeID fakeDnId = DFSTestUtil.getLocalDatanodeID(addr.getPort()); ExtendedBlock b = new ExtendedBlock(STR, new Block(12345L)); LocatedBlock fakeBlock... | /**
* Test that timeout occurs when DN does not respond to RPC.
* Start up a server and ask it to sleep for n seconds. Make an
* RPC to the server and set rpcTimeout to less than n and ensure
* that socketTimeoutException is obtained
*/ | Test that timeout occurs when DN does not respond to RPC. Start up a server and ask it to sleep for n seconds. Make an RPC to the server and set rpcTimeout to less than n and ensure that socketTimeoutException is obtained | testClientDNProtocolTimeout | {
"repo_name": "robzor92/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientRetries.java",
"license": "apache-2.0",
"size": 39687
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.SocketTimeoutException",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.protocol.DatanodeInfo",
"org.apache.hadoop.hd... | import java.io.IOException; import java.net.InetSocketAddress; import java.net.SocketTimeoutException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.protocol.ClientDatanodeProtocol; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; impo... | import java.io.*; import java.net.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.net.*; import org.junit.*; | [
"java.io",
"java.net",
"org.apache.hadoop",
"org.junit"
] | java.io; java.net; org.apache.hadoop; org.junit; | 2,260,034 |
public ServiceFuture<AuthorizationPolicyResourceFormatInner> createOrUpdateAsync(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters, final ServiceCallback<AuthorizationPolicyResourceFormatInner> serviceCallback) {
return ServiceFuture.... | ServiceFuture<AuthorizationPolicyResourceFormatInner> function(String resourceGroupName, String hubName, String authorizationPolicyName, AuthorizationPolicyResourceFormatInner parameters, final ServiceCallback<AuthorizationPolicyResourceFormatInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWit... | /**
* Creates an authorization policy or updates an existing authorization policy.
*
* @param resourceGroupName The name of the resource group.
* @param hubName The name of the hub.
* @param authorizationPolicyName The name of the policy.
* @param parameters Parameters supplied to the Crea... | Creates an authorization policy or updates an existing authorization policy | createOrUpdateAsync | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-customerinsights/src/main/java/com/microsoft/azure/management/customerinsights/implementation/AuthorizationPoliciesInner.java",
"license": "mit",
"size": 43999
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,289,211 |
public static List<IMendixObject> retrieveXPathQuery(IContext context, String xpathQuery, int depth) throws CoreException
{
return Core.retrieveXPathQuery(context, xpathQuery, -1, -1, new LinkedHashMap<String,String>(), depth);
}
| static List<IMendixObject> function(IContext context, String xpathQuery, int depth) throws CoreException { return Core.retrieveXPathQuery(context, xpathQuery, -1, -1, new LinkedHashMap<String,String>(), depth); } | /**
* Retrieves object list based on the given XPath query (synchronously).
* @param context the context.
* @param xpathQuery the XPath query to execute.
* @param depth indicates the level until which each reference (IMendixIdentifier) is also retrieved as an IMendixObject.
* @return the list of retrieved obj... | Retrieves object list based on the given XPath query (synchronously) | retrieveXPathQuery | {
"repo_name": "mrgroen/qzIndustryPrinting",
"path": "test/javasource/com/mendix/core/Core.java",
"license": "apache-2.0",
"size": 71337
} | [
"com.mendix.systemwideinterfaces.core.IContext",
"com.mendix.systemwideinterfaces.core.IMendixObject",
"java.util.LinkedHashMap",
"java.util.List"
] | import com.mendix.systemwideinterfaces.core.IContext; import com.mendix.systemwideinterfaces.core.IMendixObject; import java.util.LinkedHashMap; import java.util.List; | import com.mendix.systemwideinterfaces.core.*; import java.util.*; | [
"com.mendix.systemwideinterfaces",
"java.util"
] | com.mendix.systemwideinterfaces; java.util; | 1,871,630 |
public Set<String> getJarsForApplication(final String id) throws GenieException {
if (StringUtils.isBlank(id)) {
throw new GeniePreconditionException("Missing required parameter: id");
}
final HttpRequest request = BaseGenieClient.buildRequest(
Verb.GET,
... | Set<String> function(final String id) throws GenieException { if (StringUtils.isBlank(id)) { throw new GeniePreconditionException(STR); } final HttpRequest request = BaseGenieClient.buildRequest( Verb.GET, StringUtils.join( new String[]{BASE_CONFIG_APPLICATION_REST_URL, id, "jars"}, SLASH), null, null); @SuppressWarnin... | /**
* Get the active set of jar files for the given application.
*
* @param id The id of the application to get jars for. Not
* Null/empty/blank.
* @return The set of jar files for the given application.
* @throws GenieException For any other error.
*/ | Get the active set of jar files for the given application | getJarsForApplication | {
"repo_name": "gorcz/genie",
"path": "genie-client/src/main/java/com/netflix/genie/client/ApplicationServiceClient.java",
"license": "apache-2.0",
"size": 23032
} | [
"com.netflix.client.http.HttpRequest",
"com.netflix.genie.common.client.BaseGenieClient",
"com.netflix.genie.common.exceptions.GenieException",
"com.netflix.genie.common.exceptions.GeniePreconditionException",
"java.util.Set",
"org.apache.commons.lang3.StringUtils"
] | import com.netflix.client.http.HttpRequest; import com.netflix.genie.common.client.BaseGenieClient; import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GeniePreconditionException; import java.util.Set; import org.apache.commons.lang3.StringUtils; | import com.netflix.client.http.*; import com.netflix.genie.common.client.*; import com.netflix.genie.common.exceptions.*; import java.util.*; import org.apache.commons.lang3.*; | [
"com.netflix.client",
"com.netflix.genie",
"java.util",
"org.apache.commons"
] | com.netflix.client; com.netflix.genie; java.util; org.apache.commons; | 1,607,333 |
TfsBuildFacade getBuildOnTfs(final int tfsBuildId, final AbstractBuild jenkinsBuild, final TfsClient tfsClient); | TfsBuildFacade getBuildOnTfs(final int tfsBuildId, final AbstractBuild jenkinsBuild, final TfsClient tfsClient); | /**
* Get a TfsBuildFacade when a build has been already queued on TFS side
*
* @param tfsBuildId
* @param jenkinsBuild
* @param tfsClient
*/ | Get a TfsBuildFacade when a build has been already queued on TFS side | getBuildOnTfs | {
"repo_name": "Microsoft/vsts-jenkins-build-integration-sample",
"path": "src/main/java/com/microsoft/tfs/plugin/TfsBuildFacadeFactory.java",
"license": "mit",
"size": 1032
} | [
"com.microsoft.tfs.plugin.impl.TfsClient",
"hudson.model.AbstractBuild"
] | import com.microsoft.tfs.plugin.impl.TfsClient; import hudson.model.AbstractBuild; | import com.microsoft.tfs.plugin.impl.*; import hudson.model.*; | [
"com.microsoft.tfs",
"hudson.model"
] | com.microsoft.tfs; hudson.model; | 2,401,602 |
@Test()
public void testWithOneServerDown()
throws Exception
{
if (! ALLOW_CONCURRENT_CONNECTIONS)
{
return;
}
ds1.shutDown(true);
try
{
final FastestConnectServerSet serverSet =
new FastestConnectServerSet(addresses, ports);
final LDAPConnection co... | @Test() void function() throws Exception { if (! ALLOW_CONCURRENT_CONNECTIONS) { return; } ds1.shutDown(true); try { final FastestConnectServerSet serverSet = new FastestConnectServerSet(addresses, ports); final LDAPConnection conn = serverSet.getConnection(); assertNotNull(conn); assertTrue(conn.isConnected()); conn.c... | /**
* Tests the behavior of the server set when one of the target servers is
* down but the other is still up.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior of the server set when one of the target servers is down but the other is still up | testWithOneServerDown | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/FastestConnectServerSetTestCase.java",
"license": "gpl-2.0",
"size": 10475
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 993,818 |
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
{
MapData mapdata = this.getMapData(stack, playerIn.worldObj);
if (advanced)
{
if (mapdata == null)
{
tooltip.add... | @SideOnly(Side.CLIENT) void function(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) { MapData mapdata = this.getMapData(stack, playerIn.worldObj); if (advanced) { if (mapdata == null) { tooltip.add(STR); } else { tooltip.add(STR + (1 << mapdata.scale)); tooltip.add(STR + mapdata.scale +... | /**
* allows items to add custom lines of information to the mouseover description
*/ | allows items to add custom lines of information to the mouseover description | addInformation | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/item/ItemMap.java",
"license": "gpl-3.0",
"size": 13887
} | [
"java.util.List",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.world.storage.MapData",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.storage.MapData; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.world.storage.*; import net.minecraftforge.fml.relauncher.*; | [
"java.util",
"net.minecraft.entity",
"net.minecraft.world",
"net.minecraftforge.fml"
] | java.util; net.minecraft.entity; net.minecraft.world; net.minecraftforge.fml; | 1,721,463 |
public native final Array<?> centroid(); | native final Array<?> function(); | /**
* Returns a two-element array representing the centroid of this polygon.
* <p>
*
* @return a two-element array representing the centroid of this polygon.
*/ | Returns a two-element array representing the centroid of this polygon. | centroid | {
"repo_name": "ericcitaire/gwt-d3",
"path": "gwt-d3-api/src/main/java/com/github/gwtd3/api/geom/Polygon.java",
"license": "bsd-3-clause",
"size": 2992
} | [
"com.github.gwtd3.api.arrays.Array"
] | import com.github.gwtd3.api.arrays.Array; | import com.github.gwtd3.api.arrays.*; | [
"com.github.gwtd3"
] | com.github.gwtd3; | 2,352,965 |
default FlatpackEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) {
doSetProperty("timeUnit", timeUnit);
return this;
} | default FlatpackEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) { doSetProperty(STR, timeUnit); return this; } | /**
* Time unit for initialDelay and delay options.
*
* The option is a: <code>java.util.concurrent.TimeUnit</code> type.
*
* Default: MILLISECONDS
* Group: scheduler
*/ | Time unit for initialDelay and delay options. The option is a: <code>java.util.concurrent.TimeUnit</code> type. Default: MILLISECONDS Group: scheduler | timeUnit | {
"repo_name": "ullgren/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FlatpackEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 49644
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,856,532 |
protected List<Pair<QName, Boolean>> getListChildrenSortPropsDefault()
{
List<Pair<QName, Boolean>> sortProps = new ArrayList<>(
Arrays.asList(new Pair<>(GetChildrenCannedQuery.SORT_QNAME_NODE_IS_FOLDER, Boolean.FALSE), new Pair<>(ContentModel.PROP_NAME, true)));
return sortProps... | List<Pair<QName, Boolean>> function() { List<Pair<QName, Boolean>> sortProps = new ArrayList<>( Arrays.asList(new Pair<>(GetChildrenCannedQuery.SORT_QNAME_NODE_IS_FOLDER, Boolean.FALSE), new Pair<>(ContentModel.PROP_NAME, true))); return sortProps; } | /**
* <p>
* Returns the default sort order.
* </p>
*
* @return The list of <code>Pair<QName, Boolean></code> sort
* properties.
*/ | Returns the default sort order. | getListChildrenSortPropsDefault | {
"repo_name": "loftuxab/alfresco-community-loftux",
"path": "projects/remote-api/source/java/org/alfresco/rest/api/impl/NodesImpl.java",
"license": "lgpl-3.0",
"size": 128358
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.alfresco.model.ContentModel",
"org.alfresco.repo.node.getchildren.GetChildrenCannedQuery",
"org.alfresco.service.namespace.QName",
"org.alfresco.util.Pair"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.alfresco.model.ContentModel; import org.alfresco.repo.node.getchildren.GetChildrenCannedQuery; import org.alfresco.service.namespace.QName; import org.alfresco.util.Pair; | import java.util.*; import org.alfresco.model.*; import org.alfresco.repo.node.getchildren.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*; | [
"java.util",
"org.alfresco.model",
"org.alfresco.repo",
"org.alfresco.service",
"org.alfresco.util"
] | java.util; org.alfresco.model; org.alfresco.repo; org.alfresco.service; org.alfresco.util; | 2,863,039 |
public static Set<OWLClass> executeDLQuery(String dlQuery, OWLGraphWrapper graph,
OWLReasonerFactory reasonerFactory) throws OWLParserException, OWLOntologyCreationException
{
// create parser and parse DL query string
ManchesterSyntaxTool parser = null;
OWLClassExpression ce;
try {
parser = new ... | static Set<OWLClass> function(String dlQuery, OWLGraphWrapper graph, OWLReasonerFactory reasonerFactory) throws OWLParserException, OWLOntologyCreationException { ManchesterSyntaxTool parser = null; OWLClassExpression ce; try { parser = new ManchesterSyntaxTool(graph.getSourceOntology(), graph.getSupportOntologySet());... | /**
* Execute the DL query on the given ontology graph. Uses the factory to create
* the {@link OWLReasoner} for an internal query ontology.
*
* @param dlQuery
* @param graph
* @param reasonerFactory
* @return set of {@link OWLClass} which
* @throws OWLParserException
* @throws OWLOntologyCreationE... | Execute the DL query on the given ontology graph. Uses the factory to create the <code>OWLReasoner</code> for an internal query ontology | executeDLQuery | {
"repo_name": "owlcollab/owltools",
"path": "OWLTools-Core/src/main/java/owltools/mooncat/DLQueryTool.java",
"license": "bsd-3-clause",
"size": 3762
} | [
"java.util.Set",
"org.obolibrary.macro.ManchesterSyntaxTool",
"org.semanticweb.owlapi.apibinding.OWLManager",
"org.semanticweb.owlapi.io.OWLParserException",
"org.semanticweb.owlapi.model.IRI",
"org.semanticweb.owlapi.model.OWLClass",
"org.semanticweb.owlapi.model.OWLClassExpression",
"org.semanticweb... | import java.util.Set; import org.obolibrary.macro.ManchesterSyntaxTool; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.io.OWLParserException; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLClassExpression;... | import java.util.*; import org.obolibrary.macro.*; import org.semanticweb.owlapi.apibinding.*; import org.semanticweb.owlapi.io.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.reasoner.*; | [
"java.util",
"org.obolibrary.macro",
"org.semanticweb.owlapi"
] | java.util; org.obolibrary.macro; org.semanticweb.owlapi; | 1,415,172 |
private boolean joinElectedMaster(DiscoveryNode masterNode) {
try {
// first, make sure we can connect to the master
transportService.connectToNode(masterNode);
} catch (Exception e) {
logger.warn("failed to connect to master [{}], retrying...", e, masterNode);
... | boolean function(DiscoveryNode masterNode) { try { transportService.connectToNode(masterNode); } catch (Exception e) { logger.warn(STR, e, masterNode); return false; } int joinAttempt = 0; while (true) { try { logger.trace(STR, masterNode); membership.sendJoinRequestBlocking(masterNode, clusterService.localNode(), join... | /**
* Join a newly elected master.
*
* @return true if successful
*/ | Join a newly elected master | joinElectedMaster | {
"repo_name": "xuzha/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java",
"license": "apache-2.0",
"size": 58027
} | [
"org.elasticsearch.ExceptionsHelper",
"org.elasticsearch.cluster.NotMasterException",
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import org.elasticsearch.ExceptionsHelper; import org.elasticsearch.cluster.NotMasterException; import org.elasticsearch.cluster.node.DiscoveryNode; | import org.elasticsearch.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.node.*; | [
"org.elasticsearch",
"org.elasticsearch.cluster"
] | org.elasticsearch; org.elasticsearch.cluster; | 189,719 |
private List<JbmEditorMigrationRow> createEditorViewData(
TreeViewer treeViewer) {
List<JbmEditorMigrationRow> list = new ArrayList<JbmEditorMigrationRow>();
for (TreeItem item : treeViewer.getTree().getItems()) {
list.add((JbmEditorMigrationRow) item.getData());
}
... | List<JbmEditorMigrationRow> function( TreeViewer treeViewer) { List<JbmEditorMigrationRow> list = new ArrayList<JbmEditorMigrationRow>(); for (TreeItem item : treeViewer.getTree().getItems()) { list.add((JbmEditorMigrationRow) item.getData()); } return list; } | /**
* Get the data that are currently displayed in the editor.<br/>
*
* @param treeViewer
* TreeViewer
* @return Editor display data
*/ | Get the data that are currently displayed in the editor | createEditorViewData | {
"repo_name": "azkaoru/migration-tool",
"path": "src/tubame.portability/src/tubame/portability/plugin/action/SaveCsvAction.java",
"license": "apache-2.0",
"size": 5403
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.jface.viewers.TreeViewer",
"org.eclipse.swt.widgets.TreeItem"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.widgets.TreeItem; | import java.util.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.widgets.*; | [
"java.util",
"org.eclipse.jface",
"org.eclipse.swt"
] | java.util; org.eclipse.jface; org.eclipse.swt; | 2,526,576 |
public ApiAuthType getManagementApiAuthType(); | ApiAuthType function(); | /**
* Gets the management layer's API authentication type.
* @return the api auth type
*/ | Gets the management layer's API authentication type | getManagementApiAuthType | {
"repo_name": "eformat/apiman-1",
"path": "manager/ui/hawtio/wildfly8/src/main/java/io/apiman/manager/ui/server/IUIConfig.java",
"license": "apache-2.0",
"size": 1917
} | [
"io.apiman.manager.ui.server.beans.ApiAuthType"
] | import io.apiman.manager.ui.server.beans.ApiAuthType; | import io.apiman.manager.ui.server.beans.*; | [
"io.apiman.manager"
] | io.apiman.manager; | 977,752 |
public ArrayList<Long> cart_cartId_item_itemId_configuration_GET(String cartId, Long itemId, String label) throws IOException {
String qPath = "/order/cart/{cartId}/item/{itemId}/configuration";
StringBuilder sb = path(qPath, cartId, itemId);
query(sb, "label", label);
String resp = execN(qPath, "GET", sb.to... | ArrayList<Long> function(String cartId, Long itemId, String label) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, cartId, itemId); query(sb, "label", label); String resp = execN(qPath, "GET", sb.toString(), null); return convertTo(resp, t7); } private static TypeReference<ArrayList<Long>> t7 = ... | /**
* Retrieve all configuration item of the cart item
*
* REST: GET /order/cart/{cartId}/item/{itemId}/configuration
* @param cartId [required] Cart identifier
* @param itemId [required] Product item identifier
* @param label [required] Filter the value of label property (=)
*/ | Retrieve all configuration item of the cart item | cart_cartId_item_itemId_configuration_GET | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java",
"license": "bsd-3-clause",
"size": 511080
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util"
] | com.fasterxml.jackson; java.io; java.util; | 1,423,365 |
EClass getSpecific(); | EClass getSpecific(); | /**
* Returns the meta object for class '{@link tudor.lu.modeling.transformation.tauHCI.Specific <em>Specific</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Specific</em>'.
* @see tudor.lu.modeling.transformation.tauHCI.Specific
* @generated
*/ | Returns the meta object for class '<code>tudor.lu.modeling.transformation.tauHCI.Specific Specific</code>'. | getSpecific | {
"repo_name": "jssottet/Tau4HCI",
"path": "tudor.lu.modeling.transformation.tauHCI/src-gen/tudor/lu/modeling/transformation/tauHCI/TauHCIPackage.java",
"license": "epl-1.0",
"size": 40427
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,710,817 |
//
void updateSuitabilityLU(SuitabilityLU suitabilityLU, String projectId)
throws WifInvalidInputException, WifInvalidConfigException; | void updateSuitabilityLU(SuitabilityLU suitabilityLU, String projectId) throws WifInvalidInputException, WifInvalidConfigException; | /**
* Update suitabilityLU.
*
* @param suitabilityLU
* the suitabilityLU
* @param projectId
* the project id
* @throws WifInvalidInputException
* the wif invalid input exception
* @throws WifInvalidConfigException
* the wif invalid config exception
... | Update suitabilityLU | updateSuitabilityLU | {
"repo_name": "tosseto/online-whatif",
"path": "src/main/java/au/org/aurin/wif/svc/suitability/SuitabilityLUService.java",
"license": "mit",
"size": 5269
} | [
"au.org.aurin.wif.exception.config.WifInvalidConfigException",
"au.org.aurin.wif.exception.validate.WifInvalidInputException",
"au.org.aurin.wif.model.suitability.SuitabilityLU"
] | import au.org.aurin.wif.exception.config.WifInvalidConfigException; import au.org.aurin.wif.exception.validate.WifInvalidInputException; import au.org.aurin.wif.model.suitability.SuitabilityLU; | import au.org.aurin.wif.exception.config.*; import au.org.aurin.wif.exception.validate.*; import au.org.aurin.wif.model.suitability.*; | [
"au.org.aurin"
] | au.org.aurin; | 1,536,722 |
public void setContainerNamedOperatorHLAPI(
NamedOperatorHLAPI elem){
if(elem!=null)
item.setContainerNamedOperator((NamedOperator)elem.getContainedItem());
}
| void function( NamedOperatorHLAPI elem){ if(elem!=null) item.setContainerNamedOperator((NamedOperator)elem.getContainedItem()); } | /**
* set ContainerNamedOperator
*/ | set ContainerNamedOperator | setContainerNamedOperatorHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/booleans/hlapi/BooleanConstantHLAPI.java",
"license": "epl-1.0",
"size": 91863
} | [
"fr.lip6.move.pnml.symmetricnet.terms.NamedOperator",
"fr.lip6.move.pnml.symmetricnet.terms.hlapi.NamedOperatorHLAPI"
] | import fr.lip6.move.pnml.symmetricnet.terms.NamedOperator; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.NamedOperatorHLAPI; | import fr.lip6.move.pnml.symmetricnet.terms.*; import fr.lip6.move.pnml.symmetricnet.terms.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 1,844,149 |
private void waitForConcurrent(int dataId, AccessMode accessMode) {
Semaphore sem = new Semaphore(0);
Semaphore semTasks = new Semaphore(0);
WaitForConcurrentRequest request = new WaitForConcurrentRequest(dataId, accessMode, sem, semTasks);
if (!this.requestQueue.offer(request)) {
... | void function(int dataId, AccessMode accessMode) { Semaphore sem = new Semaphore(0); Semaphore semTasks = new Semaphore(0); WaitForConcurrentRequest request = new WaitForConcurrentRequest(dataId, accessMode, sem, semTasks); if (!this.requestQueue.offer(request)) { ErrorManager.error(ERROR_QUEUE_OFFER + STR); } sem.acqu... | /**
* Synchronism for a concurrent task.
*
* @param dataId Data Id.
* @param accessMode Access mode.
*/ | Synchronism for a concurrent task | waitForConcurrent | {
"repo_name": "mF2C/COMPSs",
"path": "compss/runtime/engine/src/main/java/es/bsc/compss/components/impl/AccessProcessor.java",
"license": "apache-2.0",
"size": 38284
} | [
"es.bsc.compss.types.data.accessparams.AccessParams",
"es.bsc.compss.types.request.ap.WaitForConcurrentRequest",
"es.bsc.compss.util.ErrorManager",
"java.util.concurrent.Semaphore"
] | import es.bsc.compss.types.data.accessparams.AccessParams; import es.bsc.compss.types.request.ap.WaitForConcurrentRequest; import es.bsc.compss.util.ErrorManager; import java.util.concurrent.Semaphore; | import es.bsc.compss.types.data.accessparams.*; import es.bsc.compss.types.request.ap.*; import es.bsc.compss.util.*; import java.util.concurrent.*; | [
"es.bsc.compss",
"java.util"
] | es.bsc.compss; java.util; | 1,056,809 |
private static int setColorAlpha(int color, byte alpha) {
return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
} | static int function(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); } | /**
* Set the alpha value of the {@code color} to be the given {@code alpha} value.
*/ | Set the alpha value of the color to be the given alpha value | setColorAlpha | {
"repo_name": "ivan-jukic/emojicon",
"path": "library/src/main/java/com/rockerhieu/emojicon/slidingTab/SlidingTabStrip.java",
"license": "apache-2.0",
"size": 6484
} | [
"android.graphics.Color"
] | import android.graphics.Color; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,523,803 |
private void populateField(final Field classField, final T row, final String[] fields) throws IllegalArgumentException, IllegalAccessException {
KommaField fieldAnnotation = getFieldAnnotation(classField);
if (fieldAnnotation != null && fieldAnnotation.value() >= 0) {
int index = fieldAnnotation.value(); // g... | void function(final Field classField, final T row, final String[] fields) throws IllegalArgumentException, IllegalAccessException { KommaField fieldAnnotation = getFieldAnnotation(classField); if (fieldAnnotation != null && fieldAnnotation.value() >= 0) { int index = fieldAnnotation.value(); if (index < fields.length) ... | /**
* Attempts to populate the field. First it tries to detect if there is an
* annotation, then it checks if the annotation is valid.
*
* @param classField The field to try and populate.
* @param row The row object that contains the field.
* @param fields The split CSV data.
* @throws IllegalArgumentExce... | Attempts to populate the field. First it tries to detect if there is an annotation, then it checks if the annotation is valid | populateField | {
"repo_name": "jonathanlmarsh/Komma",
"path": "src/main/java/komma/Komma.java",
"license": "mit",
"size": 7071
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,062,708 |
public static void showSocialLogin(final FragmentActivity activity, ArrayList<PDReward> rewards, PDLoginCallback callBack) {
if (!isPopdeemSDKInitialized()) {
throw new PopdeemSDKNotInitializedException("Popdeem SDK is not initialized. Be sure to call PopdeemSDK.initializeSDK(Application applica... | static void function(final FragmentActivity activity, ArrayList<PDReward> rewards, PDLoginCallback callBack) { if (!isPopdeemSDKInitialized()) { throw new PopdeemSDKNotInitializedException(STR); } pushSocialLoginFragmentToActivity(activity, rewards, callBack); } | /**
* Show social login flow.
*
* @param activity FragmentActivity / AppCompatActivity initiating the social login flow
* @param rewards Rewards to add to social login screen
*/ | Show social login flow | showSocialLogin | {
"repo_name": "Popdeem/Popdeem-SDK-Android",
"path": "sdk/src/main/java/com/popdeem/sdk/core/PopdeemSDK.java",
"license": "mit",
"size": 43393
} | [
"android.support.v4.app.FragmentActivity",
"com.popdeem.sdk.PDLoginCallback",
"com.popdeem.sdk.core.exception.PopdeemSDKNotInitializedException",
"com.popdeem.sdk.core.model.PDReward",
"java.util.ArrayList"
] | import android.support.v4.app.FragmentActivity; import com.popdeem.sdk.PDLoginCallback; import com.popdeem.sdk.core.exception.PopdeemSDKNotInitializedException; import com.popdeem.sdk.core.model.PDReward; import java.util.ArrayList; | import android.support.v4.app.*; import com.popdeem.sdk.*; import com.popdeem.sdk.core.exception.*; import com.popdeem.sdk.core.model.*; import java.util.*; | [
"android.support",
"com.popdeem.sdk",
"java.util"
] | android.support; com.popdeem.sdk; java.util; | 529,641 |
private void waitForIo() throws InterruptedIOException {
try {
wait();
} catch (InterruptedException e) {
throw new InterruptedIOException();
}
} | void function() throws InterruptedIOException { try { wait(); } catch (InterruptedException e) { throw new InterruptedIOException(); } } | /**
* Like {@link #wait}, but throws an {@code InterruptedIOException} when
* interrupted instead of the more awkward {@link InterruptedException}.
*/ | Like <code>#wait</code>, but throws an InterruptedIOException when interrupted instead of the more awkward <code>InterruptedException</code> | waitForIo | {
"repo_name": "AOSP-YU/platform_external_okhttp",
"path": "okhttp/src/main/java/com/squareup/okhttp/internal/spdy/SpdyStream.java",
"license": "apache-2.0",
"size": 19344
} | [
"java.io.InterruptedIOException"
] | import java.io.InterruptedIOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,124,745 |
public static DataSourceConfiguration getDataSourceConfiguration(final DataSourceParameter dataSourceParameter) {
DataSourceConfiguration result = new DataSourceConfiguration(PoolType.HIKARI.getClassName());
result.getProperties().putAll(findAllGetterProperties(dataSourceParameter));
return ... | static DataSourceConfiguration function(final DataSourceParameter dataSourceParameter) { DataSourceConfiguration result = new DataSourceConfiguration(PoolType.HIKARI.getClassName()); result.getProperties().putAll(findAllGetterProperties(dataSourceParameter)); return result; } | /**
* Get data source configuration.
*
* @param dataSourceParameter data source parameter
* @return data source configuration
*/ | Get data source configuration | getDataSourceConfiguration | {
"repo_name": "dangdangdotcom/sharding-jdbc",
"path": "sharding-core/src/main/java/io/shardingsphere/core/config/DataSourceConfiguration.java",
"license": "apache-2.0",
"size": 6157
} | [
"io.shardingsphere.core.constant.PoolType",
"io.shardingsphere.core.rule.DataSourceParameter"
] | import io.shardingsphere.core.constant.PoolType; import io.shardingsphere.core.rule.DataSourceParameter; | import io.shardingsphere.core.constant.*; import io.shardingsphere.core.rule.*; | [
"io.shardingsphere.core"
] | io.shardingsphere.core; | 2,006,247 |
public boolean isCurrency(int column) throws SQLException {
return false;
} | boolean function(int column) throws SQLException { return false; } | /**
* Is the column a cash value?
*
* @param column
* the first column is 1, the second is 2...
*
* @return true if its a cash column
*
* @throws SQLException
* if a database access error occurs
*/ | Is the column a cash value | isCurrency | {
"repo_name": "richardgutkowski/ansible-roles",
"path": "stash/files/mysql-connector-java-5.1.35/src/com/mysql/jdbc/ResultSetMetaData.java",
"license": "mit",
"size": 26360
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,939,107 |
@Test
public final void testFormParamsBatch() {
Robolectric.getFakeHttpLayer().interceptHttpRequests(false);
String subpath = "/formparamsbatch",
fnKey = "firstName", lnKey = "lastName",
firstName = "Franklin", lastName = "Richards",
body = fnKey + "=" + firstName + "&" + lnKey + "=" + l... | final void function() { Robolectric.getFakeHttpLayer().interceptHttpRequests(false); String subpath = STR, fnKey = STR, lnKey = STR, firstName = STR, lastName = STR, body = fnKey + "=" + firstName + "&" + lnKey + "=" + lastName; Map<String, String> params = new LinkedHashMap<String, String>(); params.put(fnKey, firstNa... | /**
* <p>Test for a {@link Request} having batch {@link QueryParams}.</p>
*
* @since 1.3.0
*/ | Test for a <code>Request</code> having batch <code>QueryParams</code> | testFormParamsBatch | {
"repo_name": "sahan/RoboZombie",
"path": "robozombie/src/test/java/com/lonepulse/robozombie/processor/RequestParamEndpointTest.java",
"license": "apache-2.0",
"size": 21257
} | [
"com.github.tomakehurst.wiremock.client.WireMock",
"java.util.LinkedHashMap",
"java.util.Map",
"org.robolectric.Robolectric"
] | import com.github.tomakehurst.wiremock.client.WireMock; import java.util.LinkedHashMap; import java.util.Map; import org.robolectric.Robolectric; | import com.github.tomakehurst.wiremock.client.*; import java.util.*; import org.robolectric.*; | [
"com.github.tomakehurst",
"java.util",
"org.robolectric"
] | com.github.tomakehurst; java.util; org.robolectric; | 334,636 |
public void getData() {
logDebug( BaseMessages.getString( PKG, "CombinationLookupDialog.Log.GettingKeyInfo" ) );
if ( input.getKeyField() != null ) {
for ( int i = 0; i < input.getKeyField().length; i++ ) {
TableItem item = wKey.table.getItem( i );
if ( input.getKeyLookup()[i] != null )... | void function() { logDebug( BaseMessages.getString( PKG, STR ) ); if ( input.getKeyField() != null ) { for ( int i = 0; i < input.getKeyField().length; i++ ) { TableItem item = wKey.table.getItem( i ); if ( input.getKeyLookup()[i] != null ) { item.setText( 1, input.getKeyLookup()[i] ); } if ( input.getKeyField()[i] != ... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "rfellows/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/trans/steps/combinationlookup/CombinationLookupDialog.java",
"license": "apache-2.0",
"size": 39077
} | [
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta"
] | import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta; | import org.eclipse.swt.widgets.*; import org.pentaho.di.core.database.*; import org.pentaho.di.i18n.*; import org.pentaho.di.trans.steps.combinationlookup.*; | [
"org.eclipse.swt",
"org.pentaho.di"
] | org.eclipse.swt; org.pentaho.di; | 320,544 |
@PUT
@Path(RUN_LIMIT)
@Consumes(PLAIN)
@Produces(PLAIN)
@Description("What is the maximum number of simultaneous runs?")
int setRunLimit(int runLimit); | @Path(RUN_LIMIT) @Consumes(PLAIN) @Produces(PLAIN) @Description(STR) int setRunLimit(int runLimit); | /**
* Set the maximum number of simultaneous runs.
*
* @param runLimit
* What to set it to.
* @return The new setting.
*/ | Set the maximum number of simultaneous runs | setRunLimit | {
"repo_name": "taverna/taverna-server",
"path": "server-webapp/src/main/java/org/taverna/server/master/admin/Admin.java",
"license": "lgpl-2.1",
"size": 30447
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.apache.cxf.jaxrs.model.wadl.Description"
] | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.apache.cxf.jaxrs.model.wadl.Description; | import javax.ws.rs.*; import org.apache.cxf.jaxrs.model.wadl.*; | [
"javax.ws",
"org.apache.cxf"
] | javax.ws; org.apache.cxf; | 1,906,338 |
public void setEnabled(boolean enabled) {
mPaused = !enabled;
}
/**
* Returns an {@link android.widget.AbsListView.OnScrollListener} to be
* added to the {@link android.widget.ListView} using
* {@link android.widget.ListView#setOnScrollListener(android.widget.AbsListView.OnScrollListener)} | void function(boolean enabled) { mPaused = !enabled; } /** * Returns an {@link android.widget.AbsListView.OnScrollListener} to be * added to the {@link android.widget.ListView} using * {@link android.widget.ListView#setOnScrollListener(android.widget.AbsListView.OnScrollListener)} | /**
* Enables or disables (pauses or resumes) watching for swipe-to-dismiss
* gestures.
*
* @param enabled
* Whether or not to watch for gestures.
*/ | Enables or disables (pauses or resumes) watching for swipe-to-dismiss gestures | setEnabled | {
"repo_name": "mkrmpotic/SignMeApp",
"path": "src/eu/signme/app/ui/swipe/SwipeToDismissTouchListener.java",
"license": "mit",
"size": 17072
} | [
"android.widget.AbsListView",
"android.widget.ListView"
] | import android.widget.AbsListView; import android.widget.ListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,764,358 |
public CommitOp setMessage(@Nullable final String message) {
this.message = message;
return this;
}
/**
* Sets the {@link RevPerson#getTimestamp() timestamp} for the author of this commit, or if not
* set defaults to the current system time at the time {@link #call()} is called.
... | CommitOp function(@Nullable final String message) { this.message = message; return this; } /** * Sets the {@link RevPerson#getTimestamp() timestamp} for the author of this commit, or if not * set defaults to the current system time at the time {@link #call()} is called. * * @param timestamp commit timestamp, in millise... | /**
* Sets the {@link RevCommit#getMessage() commit message}.
*
* @param message description of the changes to record the commit with.
* @return {@code this}, to ease command chaining
*/ | Sets the <code>RevCommit#getMessage() commit message</code> | setMessage | {
"repo_name": "jdgarrett/geogig",
"path": "src/core/src/main/java/org/locationtech/geogig/porcelain/CommitOp.java",
"license": "bsd-3-clause",
"size": 17917
} | [
"java.util.Date",
"org.eclipse.jdt.annotation.Nullable",
"org.locationtech.geogig.model.RevPerson"
] | import java.util.Date; import org.eclipse.jdt.annotation.Nullable; import org.locationtech.geogig.model.RevPerson; | import java.util.*; import org.eclipse.jdt.annotation.*; import org.locationtech.geogig.model.*; | [
"java.util",
"org.eclipse.jdt",
"org.locationtech.geogig"
] | java.util; org.eclipse.jdt; org.locationtech.geogig; | 2,272,237 |
public static void setJavaElementArray(
Map arguments,
String countAttribute,
String arrayAttributePrefix,
String project,
IJavaElement[] elements,
int offset)
throws IllegalArgumentException {
if (elements == null)
throw new IllegalArgumentException(
"The... | static void function( Map arguments, String countAttribute, String arrayAttributePrefix, String project, IJavaElement[] elements, int offset) throws IllegalArgumentException { if (elements == null) throw new IllegalArgumentException( STR + arrayAttributePrefix + STR); if (countAttribute != null) setInt(arguments, count... | /**
* Inserts the resources into the map.
*
* @param arguments arguments the map with <code><String, String></code> mapping
* @param countAttribute the attribute where the number of elements will be stored. Can be <code>
* null</code> if no count attribute should be created
* @param arrayAtt... | Inserts the resources into the map | setJavaElementArray | {
"repo_name": "jonahkichwacoders/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/core/refactoring/descriptors/JavaRefactoringDescriptorUtil.java",
"license": "epl-1.0",
"size": 30813
} | [
"java.util.Map",
"org.eclipse.jdt.core.IJavaElement"
] | import java.util.Map; import org.eclipse.jdt.core.IJavaElement; | import java.util.*; import org.eclipse.jdt.core.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 750,162 |
private void postCallOps(TestMethod method, Exception e) {
hangDetector.stop();
Throwable t = e;
if (e instanceof InvocationTargetException) {
t = ((InvocationTargetException) e).getTargetException();
}
ui.setCallComplete();
ui.setPostCallFreeMemory(Runtime.getRuntime().freeMemory())... | void function(TestMethod method, Exception e) { hangDetector.stop(); Throwable t = e; if (e instanceof InvocationTargetException) { t = ((InvocationTargetException) e).getTargetException(); } ui.setCallComplete(); ui.setPostCallFreeMemory(Runtime.getRuntime().freeMemory()); ui.setCallStatus(e == null ? STR : t.toString... | /**
* performs any operations which should be made after completion of the
* remote call, such as updating of the <code>UserInterface</code> and
* updating the log.
*
* @param method the <code>TestMethod</code> that was called
* @param e the exception that was generated, or <code>nul... | performs any operations which should be made after completion of the remote call, such as updating of the <code>UserInterface</code> and updating the log | postCallOps | {
"repo_name": "pfirmstone/river-internet",
"path": "qa/src/org/apache/river/test/impl/end2end/e2etest/CallHandler.java",
"license": "apache-2.0",
"size": 7504
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,769,267 |
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
PrimitiveTypesPackage thePrimitiveTypesPackage = (PrimitiveTypesPackage)EPackage.Registry.I... | void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); PrimitiveTypesPackage thePrimitiveTypesPackage = (PrimitiveTypesPackage)EPackage.Registry.INSTANCE.getEPackage(PrimitiveTypesPackage.eNS_URI); DOMPackage theDOMPackage = (DOMPackage)EPackage.Re... | /**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first. | initializePackageContents | {
"repo_name": "jesusc/eclectic",
"path": "tests/org.eclectic.test.streaming.largemodels/src-gen/Core/impl/CorePackageImpl.java",
"license": "gpl-3.0",
"size": 44163
} | [
"org.eclipse.emf.ecore.EPackage"
] | import org.eclipse.emf.ecore.EPackage; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,209,255 |
String s = getEventTypeString( xmlStream.getEventType() );
if ( xmlStream.getEventType() == START_ELEMENT || xmlStream.getEventType() == END_ELEMENT ) {
s += ": " + xmlStream.getName();
}
Location location = xmlStream.getLocation();
s += " at line " + location.getLineNumber()... | String s = getEventTypeString( xmlStream.getEventType() ); if ( xmlStream.getEventType() == START_ELEMENT xmlStream.getEventType() == END_ELEMENT ) { s += STR + xmlStream.getName(); } Location location = xmlStream.getLocation(); s += STR + location.getLineNumber() + STR + location.getColumnNumber() + STR + xmlStream.ge... | /**
* Creates printable (debug) information about the event that the cursor of the given <code>XMLStreamReader</code>
* currently points at.
*
* @param xmlStream
* @return printable information
*/ | Creates printable (debug) information about the event that the cursor of the given <code>XMLStreamReader</code> currently points at | getCurrentEventInfo | {
"repo_name": "deegree/deegree3",
"path": "deegree-core/deegree-core-commons/src/main/java/org/deegree/commons/xml/stax/XMLStreamUtils.java",
"license": "lgpl-2.1",
"size": 40538
} | [
"javax.xml.stream.Location"
] | import javax.xml.stream.Location; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 1,269,349 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<CertificateResourceInner>> getWithResponseAsync(
String resourceGroupName, String serviceName, String certificateName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<CertificateResourceInner>> function( String resourceGroupName, String serviceName, String certificateName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() ... | /**
* Get the certificate resource.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serviceName The name of the Service resource.
* @param certificateName The... | Get the certificate resource | getWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/CertificatesClientImpl.java",
"license": "mit",
"size": 58224
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appplatform.fluent.models.CertificateResourceInner"
] | 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.appplatform.fluent.models.CertificateResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appplatform.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 275,068 |
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
// ContentProvider has already checked granted permissions
final File file = mStrategy.getFileForUri(uri);
return file.delete() ? 1 : 0;
} | int function(Uri uri, String selection, String[] selectionArgs) { final File file = mStrategy.getFileForUri(uri); return file.delete() ? 1 : 0; } | /**
* Deletes the file associated with the specified content URI, as
* returned by {@link #getUriForFile(Context, String, File) getUriForFile()}. Notice that this
* method does <b>not</b> throw an {@link java.io.IOException}; you must check its return value.
*
* @param uri A content U... | Deletes the file associated with the specified content URI, as returned by <code>#getUriForFile(Context, String, File) getUriForFile()</code>. Notice that this method does not throw an <code>java.io.IOException</code>; you must check its return value | delete | {
"repo_name": "BruceHurrican/studydemo",
"path": "libs_src/v4src/java/android/support/v4/content/FileProvider.java",
"license": "apache-2.0",
"size": 34198
} | [
"android.net.Uri",
"java.io.File"
] | import android.net.Uri; import java.io.File; | import android.net.*; import java.io.*; | [
"android.net",
"java.io"
] | android.net; java.io; | 131,197 |
static <T> Reference<T> getWeakReference(T object) {
return (object != null)
? new WeakReference<>(object)
: null;
} | static <T> Reference<T> getWeakReference(T object) { return (object != null) ? new WeakReference<>(object) : null; } | /**
* Creates a new weak reference that refers to the given object.
*
* @return a new weak reference or <code>null</code> if object is <code>null</code>
*
* @see WeakReference
*/ | Creates a new weak reference that refers to the given object | getWeakReference | {
"repo_name": "flyzsd/java-code-snippets",
"path": "ibm.jdk8/src/java/beans/FeatureDescriptor.java",
"license": "mit",
"size": 13487
} | [
"java.lang.ref.Reference",
"java.lang.ref.WeakReference"
] | import java.lang.ref.Reference; import java.lang.ref.WeakReference; | import java.lang.ref.*; | [
"java.lang"
] | java.lang; | 2,061,367 |
public static JMenuItem getAddVisibleToGIEItem(final Track t) {
String mess = "Add visible to current VARAN layer...";
JMenuItem item = new JMenuItem(mess);
item.addActionListener(new ActionListener() { | static JMenuItem function(final Track t) { String mess = STR; JMenuItem item = new JMenuItem(mess); item.addActionListener(new ActionListener() { | /**
* Add to GIE menu
*
* @param track
* @param f
* @return
*/ | Add to GIE menu | getAddVisibleToGIEItem | {
"repo_name": "popitsch/varan-gie",
"path": "src/org/broad/igv/track/TrackMenuUtils.java",
"license": "mit",
"size": 51696
} | [
"java.awt.event.ActionListener",
"javax.swing.JMenuItem"
] | import java.awt.event.ActionListener; import javax.swing.JMenuItem; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,650,127 |
@BeanTagAttribute(type = BeanTagAttribute.AttributeType.DIRECTORBYTYPE)
public BreadcrumbItem getBreadcrumbItem() {
return breadcrumbItem;
}
| @BeanTagAttribute(type = BeanTagAttribute.AttributeType.DIRECTORBYTYPE) BreadcrumbItem function() { return breadcrumbItem; } | /**
* The View's breadcrumbItem defines settings for the breadcrumb which appears in the breadcrumb list for this
* view.
*
* @return the breadcrumbItem
*/ | The View's breadcrumbItem defines settings for the breadcrumb which appears in the breadcrumb list for this view | getBreadcrumbItem | {
"repo_name": "kuali/kc-rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/view/View.java",
"license": "apache-2.0",
"size": 82752
} | [
"org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute",
"org.kuali.rice.krad.uif.element.BreadcrumbItem"
] | import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; import org.kuali.rice.krad.uif.element.BreadcrumbItem; | import org.kuali.rice.krad.datadictionary.parse.*; import org.kuali.rice.krad.uif.element.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 930,639 |
public final void commit() throws CoreException
{
Core.commit(context, getMendixObject());
} | final void function() throws CoreException { Core.commit(context, getMendixObject()); } | /**
* Commit the changes made on this proxy object.
*/ | Commit the changes made on this proxy object | commit | {
"repo_name": "synobsys/mendix-PivotTableWidget",
"path": "test/javasource/myfirstmodule/proxies/Category.java",
"license": "apache-2.0",
"size": 6114
} | [
"com.mendix.core.Core",
"com.mendix.core.CoreException"
] | import com.mendix.core.Core; import com.mendix.core.CoreException; | import com.mendix.core.*; | [
"com.mendix.core"
] | com.mendix.core; | 1,345,584 |
public void editTileMenu(final View view){
guiTile.editTileMenuGUI(view, tilesLayout);
}
| void function(final View view){ guiTile.editTileMenuGUI(view, tilesLayout); } | /**
* Brings up a menu with options of what to do to the decision.
* @param view
*/ | Brings up a menu with options of what to do to the decision | editTileMenu | {
"repo_name": "CMPUT301F13T02/ChooseYourAdventure",
"path": "src/ca/ualberta/CMPUT301F13T02/chooseyouradventure/ViewPageActivity.java",
"license": "bsd-3-clause",
"size": 16124
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,359,244 |
private void removeMetadata(Id.NamespacedId targetId, MetadataType metadataType, Predicate<String> filter) {
String targetType = KeyHelper.getTargetType(targetId);
MDSKey mdsKey = MdsValueKey.getMDSKey(targetId, metadataType, null);
byte[] prefix = mdsKey.getKey();
byte[] stopKey = Bytes.stopKeyForPre... | void function(Id.NamespacedId targetId, MetadataType metadataType, Predicate<String> filter) { String targetType = KeyHelper.getTargetType(targetId); MDSKey mdsKey = MdsValueKey.getMDSKey(targetId, metadataType, null); byte[] prefix = mdsKey.getKey(); byte[] stopKey = Bytes.stopKeyForPrefix(prefix); Scanner scan = inde... | /**
* Removes all keys that satisfy a given predicate from the metadata of the specified {@link Id.NamespacedId}.
*
* @param targetId the {@link Id.NamespacedId} for which keys are to be removed
* @param metadataType {@link MetadataType} indicating the type of metadata to remove - property or tag
* @para... | Removes all keys that satisfy a given predicate from the metadata of the specified <code>Id.NamespacedId</code> | removeMetadata | {
"repo_name": "mpouttuclarke/cdap",
"path": "cdap-data-fabric/src/main/java/co/cask/cdap/data2/metadata/dataset/MetadataDataset.java",
"license": "apache-2.0",
"size": 20277
} | [
"co.cask.cdap.api.common.Bytes",
"co.cask.cdap.api.dataset.table.Delete",
"co.cask.cdap.api.dataset.table.Row",
"co.cask.cdap.api.dataset.table.Scanner",
"co.cask.cdap.data2.dataset2.lib.table.MDSKey",
"co.cask.cdap.proto.Id",
"com.google.common.base.Predicate"
] | import co.cask.cdap.api.common.Bytes; import co.cask.cdap.api.dataset.table.Delete; import co.cask.cdap.api.dataset.table.Row; import co.cask.cdap.api.dataset.table.Scanner; import co.cask.cdap.data2.dataset2.lib.table.MDSKey; import co.cask.cdap.proto.Id; import com.google.common.base.Predicate; | import co.cask.cdap.api.common.*; import co.cask.cdap.api.dataset.table.*; import co.cask.cdap.data2.dataset2.lib.table.*; import co.cask.cdap.proto.*; import com.google.common.base.*; | [
"co.cask.cdap",
"com.google.common"
] | co.cask.cdap; com.google.common; | 2,900,808 |
public void closeConnectionAndInvoke(String reason) {
final XMPPConnection con = SparkManager.getConnection();
if (con.isConnected()) {
if (reason != null) {
Presence byePresence = new Presence(Presence.Type.unavailable, reason, -1, null);
con.disconn... | void function(String reason) { final XMPPConnection con = SparkManager.getConnection(); if (con.isConnected()) { if (reason != null) { Presence byePresence = new Presence(Presence.Type.unavailable, reason, -1, null); con.disconnect(byePresence); } else { con.disconnect(); } } if (!restartApplicationWithScript()) { rest... | /**
* Closes the current connection and restarts Spark.
*
* @param reason the reason for logging out. This can be if user gave no reason.
*/ | Closes the current connection and restarts Spark | closeConnectionAndInvoke | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/MainWindow.java",
"license": "apache-2.0",
"size": 28218
} | [
"org.jivesoftware.smack.XMPPConnection",
"org.jivesoftware.smack.packet.Presence",
"org.jivesoftware.spark.SparkManager"
] | import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.spark.SparkManager; | import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.spark.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.spark"
] | org.jivesoftware.smack; org.jivesoftware.spark; | 2,655,758 |
public VisualizationExecution setFilters(final List<CompatibilityFilter> filters) {
this.filters = filters;
return this;
} | VisualizationExecution function(final List<CompatibilityFilter> filters) { this.filters = filters; return this; } | /**
* Sets additional filters to this execution.
*
* @param filters additional filters
* @return updated execution
*/ | Sets additional filters to this execution | setFilters | {
"repo_name": "martiner/gooddata-java",
"path": "gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/VisualizationExecution.java",
"license": "bsd-3-clause",
"size": 3121
} | [
"com.gooddata.sdk.model.executeafm.afm.filter.CompatibilityFilter",
"java.util.List"
] | import com.gooddata.sdk.model.executeafm.afm.filter.CompatibilityFilter; import java.util.List; | import com.gooddata.sdk.model.executeafm.afm.filter.*; import java.util.*; | [
"com.gooddata.sdk",
"java.util"
] | com.gooddata.sdk; java.util; | 971,024 |
@Test (timeout=30000)
public void testReinsertnamedirsInSavenamespace() throws Exception {
// create a configuration with the key to restore error
// directories in fs.name.dir
Configuration conf = getConf();
conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_RESTORE_KEY, true);
NameNode.initM... | @Test (timeout=30000) void function() throws Exception { Configuration conf = getConf(); conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_NAME_DIR_RESTORE_KEY, true); NameNode.initMetrics(conf, NamenodeRole.NAMENODE); DFSTestUtil.formatNameNode(conf); FSNamesystem fsn = FSNamesystem.loadFromDisk(conf); FSImage originalImage ... | /**
* Verify that a saveNamespace command brings faulty directories
* in fs.name.dir and fs.edit.dir back online.
*/ | Verify that a saveNamespace command brings faulty directories in fs.name.dir and fs.edit.dir back online | testReinsertnamedirsInSavenamespace | {
"repo_name": "NJUJYB/disYarn",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestSaveNamespace.java",
"license": "apache-2.0",
"size": 24842
} | [
"java.io.File",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsAction",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apach... | import java.io.File; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.DFS... | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*; import org.junit.*; import org.mockito.*; import org.mockito.internal.util... | [
"java.io",
"org.apache.hadoop",
"org.junit",
"org.mockito",
"org.mockito.internal"
] | java.io; org.apache.hadoop; org.junit; org.mockito; org.mockito.internal; | 2,690,727 |
public Deferred<Object> getDeferred() {
return deferred;
} | Deferred<Object> function() { return deferred; } | /**
* Return the {@link Deferred} associated with this query.
*/ | Return the <code>Deferred</code> associated with this query | getDeferred | {
"repo_name": "rmarshasatx/opentsdb",
"path": "src/tsd/HttpQuery.java",
"license": "gpl-3.0",
"size": 27430
} | [
"com.stumbleupon.async.Deferred"
] | import com.stumbleupon.async.Deferred; | import com.stumbleupon.async.*; | [
"com.stumbleupon.async"
] | com.stumbleupon.async; | 2,134,921 |
public PowbEvidence find(long id);
| PowbEvidence function(long id); | /**
* This method gets a powbEvidence object by a given powbEvidence identifier.
*
* @param powbEvidenceID is the powbEvidence identifier.
* @return a PowbEvidence object.
*/ | This method gets a powbEvidence object by a given powbEvidence identifier | find | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/PowbEvidenceDAO.java",
"license": "gpl-3.0",
"size": 2487
} | [
"org.cgiar.ccafs.marlo.data.model.PowbEvidence"
] | import org.cgiar.ccafs.marlo.data.model.PowbEvidence; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 2,468,312 |
protected void configureContext(Context context, ServletContextInitializer[] initializers) {
TomcatStarter starter = new TomcatStarter(initializers);
if (context instanceof TomcatEmbeddedContext) {
TomcatEmbeddedContext embeddedContext = (TomcatEmbeddedContext) context;
embeddedContext.setStarter(starter);... | void function(Context context, ServletContextInitializer[] initializers) { TomcatStarter starter = new TomcatStarter(initializers); if (context instanceof TomcatEmbeddedContext) { TomcatEmbeddedContext embeddedContext = (TomcatEmbeddedContext) context; embeddedContext.setStarter(starter); embeddedContext.setFailCtxIfSe... | /**
* Configure the Tomcat {@link Context}.
* @param context the Tomcat context
* @param initializers initializers to apply
*/ | Configure the Tomcat <code>Context</code> | configureContext | {
"repo_name": "mdeinum/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactory.java",
"license": "apache-2.0",
"size": 33006
} | [
"org.apache.catalina.Context",
"org.apache.catalina.LifecycleListener",
"org.apache.catalina.Valve",
"org.springframework.boot.web.server.ErrorPage",
"org.springframework.boot.web.server.MimeMappings",
"org.springframework.boot.web.servlet.ServletContextInitializer"
] | import org.apache.catalina.Context; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Valve; import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.MimeMappings; import org.springframework.boot.web.servlet.ServletContextInitializer; | import org.apache.catalina.*; import org.springframework.boot.web.server.*; import org.springframework.boot.web.servlet.*; | [
"org.apache.catalina",
"org.springframework.boot"
] | org.apache.catalina; org.springframework.boot; | 2,880,044 |
public List<XSDDiagnostic> getDiagnostics() {
if (diagnostics==null) {
diagnostics = new ArrayList<XSDDiagnostic>();
}
return diagnostics;
}
| List<XSDDiagnostic> function() { if (diagnostics==null) { diagnostics = new ArrayList<XSDDiagnostic>(); } return diagnostics; } | /**
* Returns a list diagnostics of that may have been created
* during the comparison
*
* @return a list of XSDDiagnostic objects
*/ | Returns a list diagnostics of that may have been created during the comparison | getDiagnostics | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/XSDComparer.java",
"license": "apache-2.0",
"size": 28690
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.xsd.XSDDiagnostic"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.xsd.XSDDiagnostic; | import java.util.*; import org.eclipse.xsd.*; | [
"java.util",
"org.eclipse.xsd"
] | java.util; org.eclipse.xsd; | 290 |
public HostPoolInner withSsoSecretType(SsoSecretType ssoSecretType) {
if (this.innerProperties() == null) {
this.innerProperties = new HostPoolPropertiesInner();
}
this.innerProperties().withSsoSecretType(ssoSecretType);
return this;
} | HostPoolInner function(SsoSecretType ssoSecretType) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPropertiesInner(); } this.innerProperties().withSsoSecretType(ssoSecretType); return this; } | /**
* Set the ssoSecretType property: The type of single sign on Secret Type.
*
* @param ssoSecretType the ssoSecretType value to set.
* @return the HostPoolInner object itself.
*/ | Set the ssoSecretType property: The type of single sign on Secret Type | withSsoSecretType | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolInner.java",
"license": "mit",
"size": 21102
} | [
"com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType"
] | import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; | import com.azure.resourcemanager.desktopvirtualization.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,559,035 |
@RequestMapping(value = {"/sitemap*.xml", "sitemap*.gz"})
@ResponseBody
public FileSystemResource retrieveSiteMapIndex(HttpServletRequest request, HttpServletResponse response)
throws IOException {
return super.retrieveSiteMapFile(request, response);
} | @RequestMapping(value = {STR, STR}) FileSystemResource function(HttpServletRequest request, HttpServletResponse response) throws IOException { return super.retrieveSiteMapFile(request, response); } | /**
* Retrieves a site map file
*
* @param request
* @param response
* @param model
* @param fileName
* @return
*/ | Retrieves a site map file | retrieveSiteMapIndex | {
"repo_name": "edgardquirino/heatclinic",
"path": "site/src/main/java/com/community/controller/seo/SiteMapController.java",
"license": "mit",
"size": 1109
} | [
"java.io.IOException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.springframework.core.io.FileSystemResource",
"org.springframework.web.bind.annotation.RequestMapping"
] | import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.core.io.FileSystemResource; import org.springframework.web.bind.annotation.RequestMapping; | import java.io.*; import javax.servlet.http.*; import org.springframework.core.io.*; import org.springframework.web.bind.annotation.*; | [
"java.io",
"javax.servlet",
"org.springframework.core",
"org.springframework.web"
] | java.io; javax.servlet; org.springframework.core; org.springframework.web; | 2,385,383 |
public static MCRTypeOfResource getAuthorityInfo(Element modsElement) {
if (modsElement == null) {
return null;
}
String name = modsElement.getLocalName();
String code = MCRMODSClassificationSupport.getText(modsElement).trim();
return getTypeOfResource(name, code)... | static MCRTypeOfResource function(Element modsElement) { if (modsElement == null) { return null; } String name = modsElement.getLocalName(); String code = MCRMODSClassificationSupport.getText(modsElement).trim(); return getTypeOfResource(name, code); } | /**
* If the given element is mods:typeOfResource, returns the MCRTypeOfResource mapping.
*/ | If the given element is mods:typeOfResource, returns the MCRTypeOfResource mapping | getAuthorityInfo | {
"repo_name": "MyCoRe-Org/mycore",
"path": "mycore-mods/src/main/java/org/mycore/mods/classification/MCRTypeOfResource.java",
"license": "gpl-3.0",
"size": 3401
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,085,959 |
public static DateTime getLatestAvailableTime(SensorOffering sensorOffering) {
// if we have a known latest data point, use that
if (sensorOffering.hasLatestDataPoint()) {
return new DateTime(sensorOffering.getLatestDataPoint());
} else {
// if there is an end time, use that
if (!sensorOffering.noEndT... | static DateTime function(SensorOffering sensorOffering) { if (sensorOffering.hasLatestDataPoint()) { return new DateTime(sensorOffering.getLatestDataPoint()); } else { if (!sensorOffering.noEndTime()) return new DateTime(sensorOffering.getEndTime()); } return null; } | /**
* Returns the latest time for which data is stated to be available from
* the offering that is queried by the given data request
*
* @param sensorOffering
* @return
*/ | Returns the latest time for which data is stated to be available from the offering that is queried by the given data request | getLatestAvailableTime | {
"repo_name": "intelligentautomation/proteus",
"path": "plugins/com.iai.proteus/src/com/iai/proteus/views/TimeSeriesUtil.java",
"license": "lgpl-3.0",
"size": 8403
} | [
"com.iai.proteus.common.sos.model.SensorOffering",
"org.joda.time.DateTime"
] | import com.iai.proteus.common.sos.model.SensorOffering; import org.joda.time.DateTime; | import com.iai.proteus.common.sos.model.*; import org.joda.time.*; | [
"com.iai.proteus",
"org.joda.time"
] | com.iai.proteus; org.joda.time; | 1,174,522 |
public int hashCode() {
int h = 0;
for( int j = size, i = 0, t = 0; j-- != 0; ) {
while( ! used[ i ] ) i++;
if ( this != key[ i ] )
t = ( (key[ i ]) == null ? 0 : (key[ i ]).hashCode() );
t ^= it.unimi.dsi.fastutil.HashCommon.double2int(value[ i ]);
h += t;
i++;
}
return h;
} | int function() { int h = 0; for( int j = size, i = 0, t = 0; j-- != 0; ) { while( ! used[ i ] ) i++; if ( this != key[ i ] ) t = ( (key[ i ]) == null ? 0 : (key[ i ]).hashCode() ); t ^= it.unimi.dsi.fastutil.HashCommon.double2int(value[ i ]); h += t; i++; } return h; } | /** Returns a hash code for this map.
*
* This method overrides the generic method provided by the superclass.
* Since <code>equals()</code> is not overriden, it is important
* that the value returned by this method is the same value as
* the one returned by the overriden method.
*
* @return a hash code ... | Returns a hash code for this map. This method overrides the generic method provided by the superclass. Since <code>equals()</code> is not overriden, it is important that the value returned by this method is the same value as the one returned by the overriden method | hashCode | {
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/objects/Object2DoubleOpenHashMap.java",
"license": "apache-2.0",
"size": 29868
} | [
"it.unimi.dsi.fastutil.HashCommon"
] | import it.unimi.dsi.fastutil.HashCommon; | import it.unimi.dsi.fastutil.*; | [
"it.unimi.dsi"
] | it.unimi.dsi; | 1,047,148 |
init(g);
int n = 0;
Iterator V = G.vertices();
while (V.hasNext()) {
V.next();
n++;
}
reached = 0;
dfsTraversal(start);
return new Boolean(reached == n);
}
protected void startVisit(Vertex v) { reached++; } | init(g); int n = 0; Iterator V = G.vertices(); while (V.hasNext()) { V.next(); n++; } reached = 0; dfsTraversal(start); return new Boolean(reached == n); } protected void startVisit(Vertex v) { reached++; } | /** Executes the DFS algorithm.
* @param g Input graph
* @param start Start vertex
* @param info unused variable (can be anything)
* @return {@link Boolean Boolean} with value <tt>true</tt> if the graph is
* connected, <tt>false</tt> otherwise
*/ | Executes the DFS algorithm | execute | {
"repo_name": "aarestad/gradschool-stuff",
"path": "data structures/net/datastructures/ConnectivityDFS.java",
"license": "gpl-2.0",
"size": 817
} | [
"java.lang.Boolean",
"java.util.Iterator"
] | import java.lang.Boolean; import java.util.Iterator; | import java.lang.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,039,846 |
public void setDisableLinearSpeed(float val) {
if ( disableLinearSpeed == null ) {
disableLinearSpeed = (SFFloat)getField( "disableLinearSpeed" );
}
disableLinearSpeed.setValue( val );
} | void function(float val) { if ( disableLinearSpeed == null ) { disableLinearSpeed = (SFFloat)getField( STR ); } disableLinearSpeed.setValue( val ); } | /** Set the disableLinearSpeed field.
* @param val The float to set. */ | Set the disableLinearSpeed field | setDisableLinearSpeed | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/rigidbodyphysics/SAIRigidBodyCollection.java",
"license": "gpl-2.0",
"size": 11399
} | [
"org.web3d.x3d.sai.SFFloat"
] | import org.web3d.x3d.sai.SFFloat; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,159,966 |
@ResponseBody
@RequestMapping(value = "/listSplittingForms.json")
public String listSplittingForms(){
this.logger.debug("calling TripCtrl.listSplittingForms()");
JsonResponse jsonResponse = null;
try {
jsonResponse = JsonResponse.ok(this.getGson().toJson(E_ExpenseSplittingForm.values()));
} catch (Exce... | @RequestMapping(value = STR) String function(){ this.logger.debug(STR); JsonResponse jsonResponse = null; try { jsonResponse = JsonResponse.ok(this.getGson().toJson(E_ExpenseSplittingForm.values())); } catch (Exception e) { this.logger.debug(STR, e); jsonResponse = this.getWebContextHolder().unexpectedErrorResponse(); ... | /**
* Lists user's trips
*
* @return
*/ | Lists user's trips | listSplittingForms | {
"repo_name": "AxelCB/TripSplitterClone",
"path": "main/org/kairos/tripSplitterClone/controller/TripCtrl.java",
"license": "apache-2.0",
"size": 12178
} | [
"org.kairos.tripSplitterClone.json.JsonResponse",
"org.springframework.web.bind.annotation.RequestMapping"
] | import org.kairos.tripSplitterClone.json.JsonResponse; import org.springframework.web.bind.annotation.RequestMapping; | import org.kairos.*; import org.springframework.web.bind.annotation.*; | [
"org.kairos",
"org.springframework.web"
] | org.kairos; org.springframework.web; | 585,643 |
EAttribute getMarketStatementLineItem_CurrentPrice(); | EAttribute getMarketStatementLineItem_CurrentPrice(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61970.Informative.MarketOperations.MarketStatementLineItem#getCurrentPrice <em>Current Price</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Current Price</em>'.
* @see CIM.IEC61970.Inform... | Returns the meta object for the attribute '<code>CIM.IEC61970.Informative.MarketOperations.MarketStatementLineItem#getCurrentPrice Current Price</code>'. | getMarketStatementLineItem_CurrentPrice | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java",
"license": "mit",
"size": 688294
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,431,882 |
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/ | Handles the HTTP <code>POST</code> method | doPost | {
"repo_name": "B3Partners/b3p-gisviewer",
"path": "src/main/java/nl/b3p/gis/viewer/services/CreateMapPDF.java",
"license": "lgpl-3.0",
"size": 15351
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,332,598 |
public void setAuthenticationID(@NotNull final String authenticationID)
{
Validator.ensureNotNull(authenticationID);
this.authenticationID = authenticationID;
} | void function(@NotNull final String authenticationID) { Validator.ensureNotNull(authenticationID); this.authenticationID = authenticationID; } | /**
* Specifies the authentication ID for the DIGEST-MD5 bind request. It must
* not be {@code null}, and should generally start with "dn:" followed by the
* full DN for the target user (or just "dn:" for anonymous), or "u:" followed
* by the username for the target user.
*
* @param authenticationID... | Specifies the authentication ID for the DIGEST-MD5 bind request. It must not be null, and should generally start with "dn:" followed by the full DN for the target user (or just "dn:" for anonymous), or "u:" followed by the username for the target user | setAuthenticationID | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/DIGESTMD5BindRequestProperties.java",
"license": "gpl-2.0",
"size": 13389
} | [
"com.unboundid.util.NotNull",
"com.unboundid.util.Validator"
] | import com.unboundid.util.NotNull; import com.unboundid.util.Validator; | import com.unboundid.util.*; | [
"com.unboundid.util"
] | com.unboundid.util; | 735,594 |
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case DotsPackage.DOT: {
Dot dot = (Dot) theEObject;
T result = caseDot(dot);
if (result == null)
result = caseBuiltInSort(dot);
if (result == null)
result = caseSort(dot);
if (result == null)
... | T function(int classifierID, EObject theEObject) { switch (classifierID) { case DotsPackage.DOT: { Dot dot = (Dot) theEObject; T result = caseDot(dot); if (result == null) result = caseBuiltInSort(dot); if (result == null) result = caseSort(dot); if (result == null) result = defaultCase(theEObject); return result; } ca... | /**
* Calls <code>caseXXX</code> for each class of the model until one returns a
* non null result; it yields that result. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/ | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | doSwitch | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/dots/util/DotsSwitch.java",
"license": "epl-1.0",
"size": 8491
} | [
"fr.lip6.move.pnml.pthlpng.dots.Dot",
"fr.lip6.move.pnml.pthlpng.dots.DotConstant",
"fr.lip6.move.pnml.pthlpng.dots.DotsPackage",
"org.eclipse.emf.ecore.EObject"
] | import fr.lip6.move.pnml.pthlpng.dots.Dot; import fr.lip6.move.pnml.pthlpng.dots.DotConstant; import fr.lip6.move.pnml.pthlpng.dots.DotsPackage; import org.eclipse.emf.ecore.EObject; | import fr.lip6.move.pnml.pthlpng.dots.*; import org.eclipse.emf.ecore.*; | [
"fr.lip6.move",
"org.eclipse.emf"
] | fr.lip6.move; org.eclipse.emf; | 1,204,400 |
public void findDataObject(Class type, long id, boolean selectTab)
{
Browser browser = null;
if (selectTab) {
if (ProjectData.class.equals(type) ||
DatasetData.class.equals(type)) {
view.selectPane(Browser.PROJECTS_EXPLORER);
browser = model.getBrowser(Browser.PROJECTS_EXPLORER);
model.setS... | void function(Class type, long id, boolean selectTab) { Browser browser = null; if (selectTab) { if (ProjectData.class.equals(type) DatasetData.class.equals(type)) { view.selectPane(Browser.PROJECTS_EXPLORER); browser = model.getBrowser(Browser.PROJECTS_EXPLORER); model.setSelectedBrowser(browser); } else if (ScreenDat... | /**
* Implemented as specified by the {@link TreeViewer} interface.
* @see TreeViewer#findDataObject(Class, int, boolean)
*/ | Implemented as specified by the <code>TreeViewer</code> interface | findDataObject | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 162310
} | [
"java.util.Iterator",
"java.util.Set",
"org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory",
"org.openmicroscopy.shoola.agents.treeviewer.browser.Browser",
"org.openmicroscopy.shoola.agents.util.browser.NodesFinder",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay"
] | import java.util.Iterator; import java.util.Set; import org.openmicroscopy.shoola.agents.dataBrowser.view.DataBrowserFactory; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; import org.openmicroscopy.shoola.agents.util.browser.NodesFinder; import org.openmicroscopy.shoola.agents.util.browser.TreeIma... | import java.util.*; import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 310,735 |
long freeSpace() {
long freeSpace = 0;
for (CacheDataStore store : partDataStores.values()) {
assert store instanceof GridCacheDataStore;
CacheFreeListImpl freeList = ((GridCacheDataStore)store).freeList;
if (freeList == null)
continue;
... | long freeSpace() { long freeSpace = 0; for (CacheDataStore store : partDataStores.values()) { assert store instanceof GridCacheDataStore; CacheFreeListImpl freeList = ((GridCacheDataStore)store).freeList; if (freeList == null) continue; freeSpace += freeList.freeSpace(); } return freeSpace; } private static class WALHi... | /**
* Calculates free space of all partition data stores - number of bytes available for use in allocated pages.
*
* @return Tuple (numenator, denominator).
*/ | Calculates free space of all partition data stores - number of bytes available for use in allocated pages | freeSpace | {
"repo_name": "voipp/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java",
"license": "apache-2.0",
"size": 66464
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set",
"org.apache.ignite.internal.pagemem.wal.WALIterator",
"org.apache.ignite.internal.pagemem.wal.record.DataEntry",
"org.apache.ignite.internal.processors.cache.CacheGroupContext",
"org.apache.ignite.internal.processors.cache.distributed.dht.prelo... | import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.apache.ignite.internal.pagemem.wal.WALIterator; import org.apache.ignite.internal.pagemem.wal.record.DataEntry; import org.apache.ignite.internal.processors.cache.CacheGroupContext; import org.apache.ignite.internal.processors.cache.d... | import java.util.*; import org.apache.ignite.internal.pagemem.wal.*; import org.apache.ignite.internal.pagemem.wal.record.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*; import org.apache.ignite.internal.processors.cache.persistenc... | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,037,607 |
@Test
public void testRotate()
{
final ImmutableMatrix3d matrix = new ImmutableMatrix3d(
1, 0, 0,
0, 1, 0,
2, 3, 1);
final ImmutableMatrix3d result = Matrix3d
.rotate(matrix, Math.PI / 2);
assertNotSame(matrix, result);
assertAr... | void function() { final ImmutableMatrix3d matrix = new ImmutableMatrix3d( 1, 0, 0, 0, 1, 0, 2, 3, 1); final ImmutableMatrix3d result = Matrix3d .rotate(matrix, Math.PI / 2); assertNotSame(matrix, result); assertArrayEquals(new double[] { 0, 1, 0, -1, 0, 0, 2, 3, 1 }, result.m, 0.001f); } | /**
* Tests the rotate() method.
*/ | Tests the rotate() method | testRotate | {
"repo_name": "kayahr/gramath",
"path": "src/test/java/de/ailis/gramath/Matrix3dTest.java",
"license": "mit",
"size": 10996
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 721,966 |
@FIXVersion(introduced="4.0")
@TagNumRef(tagNum=TagNum.OrderID, required = true)
public String getOrderID() {
return orderID;
} | @FIXVersion(introduced="4.0") @TagNumRef(tagNum=TagNum.OrderID, required = true) String function() { return orderID; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getOrderID | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderCancelRejectMsg.java",
"license": "gpl-3.0",
"size": 30445
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,095,798 |
try {
SqlParser parser = SqlParser.create(sql, config);
return parser.parseStmt();
} catch (SqlParseException e) {
if (e.getMessage().contains("Encountered \"<EOF>\"")) {
throw new SqlParserEOFException(e.getMessage(), e);
}
throw new S... | try { SqlParser parser = SqlParser.create(sql, config); return parser.parseStmt(); } catch (SqlParseException e) { if (e.getMessage().contains(STR<EOF>\STRSQL parse failed. " + e.getMessage(), e); } } | /**
* Parses a SQL statement into a {@link SqlNode}. The {@link SqlNode} is not yet validated.
*
* @param sql a sql string to parse
* @return a parsed sql node
* @throws SqlParserException if an exception is thrown when parsing the statement
* @throws SqlParserEOFException if the statement... | Parses a SQL statement into a <code>SqlNode</code>. The <code>SqlNode</code> is not yet validated | parse | {
"repo_name": "apache/flink",
"path": "flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/parse/CalciteParser.java",
"license": "apache-2.0",
"size": 6367
} | [
"org.apache.calcite.sql.parser.SqlParseException",
"org.apache.calcite.sql.parser.SqlParser"
] | import org.apache.calcite.sql.parser.SqlParseException; import org.apache.calcite.sql.parser.SqlParser; | import org.apache.calcite.sql.parser.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 296,611 |
public void startNonEscaping() throws org.xml.sax.SAXException
{
m_disableOutputEscapingStates.push(true);
} | void function() throws org.xml.sax.SAXException { m_disableOutputEscapingStates.push(true); } | /**
* Starts an un-escaping section. All characters printed within an un-
* escaping section are printed as is, without escaping special characters
* into entity references. Only XML and HTML serializers need to support
* this method.
* <p> The contents of the un-escaping section will be delive... | Starts an un-escaping section. All characters printed within an un- escaping section are printed as is, without escaping special characters into entity references. Only XML and HTML serializers need to support this method. The contents of the un-escaping section will be delivered through the regular characters event | startNonEscaping | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.xml/src/main/resources/META-INF/modules/java.xml/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java",
"license": "apache-2.0",
"size": 125544
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,611,520 |
public void insertUpdate(DocumentEvent e)
{
firePropertyChange(MODIFIED_CONTENT_PROPERTY, null, this);
} | void function(DocumentEvent e) { firePropertyChange(MODIFIED_CONTENT_PROPERTY, null, this); } | /**
* Allows the user to run or not the script.
* @see DocumentListener#insertUpdate(DocumentEvent)
*/ | Allows the user to run or not the script | insertUpdate | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/ui/RowPane.java",
"license": "gpl-2.0",
"size": 7332
} | [
"javax.swing.event.DocumentEvent"
] | import javax.swing.event.DocumentEvent; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 130,479 |
private void tpc_usage(Player player, String error) {
error += "\n"
+ "Proper syntax is /tpc <x> <y> <z> [world] [player]";
if (player == null) {
Misc.instance.getLogger().info(error);
} else {
player.sendMessage(ChatColor.RED + error);
}
} | void function(Player player, String error) { error += "\n" + STR; if (player == null) { Misc.instance.getLogger().info(error); } else { player.sendMessage(ChatColor.RED + error); } } | /**
* Displays usage info for tpc
*/ | Displays usage info for tpc | tpc_usage | {
"repo_name": "C4K3/Misc",
"path": "src/main/java/net/simpvp/Misc/AdminTeleport.java",
"license": "cc0-1.0",
"size": 6834
} | [
"org.bukkit.ChatColor",
"org.bukkit.entity.Player"
] | import org.bukkit.ChatColor; import org.bukkit.entity.Player; | import org.bukkit.*; import org.bukkit.entity.*; | [
"org.bukkit",
"org.bukkit.entity"
] | org.bukkit; org.bukkit.entity; | 1,492,325 |
void removeObserver(Observer<KeystoreChangedEvent> observer); | void removeObserver(Observer<KeystoreChangedEvent> observer); | /**
* Remove an observer of the changes to the Keystore or Truststore.
*/ | Remove an observer of the changes to the Keystore or Truststore | removeObserver | {
"repo_name": "apache/incubator-taverna-engine",
"path": "taverna-credential-manager-api/src/main/java/org/apache/taverna/security/credentialmanager/CredentialManager.java",
"license": "apache-2.0",
"size": 15237
} | [
"org.apache.taverna.lang.observer.Observer"
] | import org.apache.taverna.lang.observer.Observer; | import org.apache.taverna.lang.observer.*; | [
"org.apache.taverna"
] | org.apache.taverna; | 2,530,833 |
private I_CmsListDateRestriction parsePastFuture(CmsXmlContentValueLocation dateRestriction) {
CmsXmlContentValueLocation location = dateRestriction.getSubValue(N_PAST_FUTURE);
if (location == null) {
return null;
}
CmsXmlContentValueLocation directionLoc = location.getS... | I_CmsListDateRestriction function(CmsXmlContentValueLocation dateRestriction) { CmsXmlContentValueLocation location = dateRestriction.getSubValue(N_PAST_FUTURE); if (location == null) { return null; } CmsXmlContentValueLocation directionLoc = location.getSubValue(N_DIRECTION); TimeDirection direction = parseDirection(d... | /**
* Parses a date restriction of type 'Past/Future'.<p>
*
* @param dateRestriction the location of the date restriction
*
* @return the date restriction
*/ | Parses a date restriction of type 'Past/Future' | parsePastFuture | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/ui/apps/lists/daterestrictions/CmsDateRestrictionParser.java",
"license": "lgpl-2.1",
"size": 8040
} | [
"org.opencms.ui.apps.lists.daterestrictions.I_CmsListDateRestriction",
"org.opencms.xml.content.CmsXmlContentValueLocation"
] | import org.opencms.ui.apps.lists.daterestrictions.I_CmsListDateRestriction; import org.opencms.xml.content.CmsXmlContentValueLocation; | import org.opencms.ui.apps.lists.daterestrictions.*; import org.opencms.xml.content.*; | [
"org.opencms.ui",
"org.opencms.xml"
] | org.opencms.ui; org.opencms.xml; | 2,805,694 |
protected void initChangeListeners() {
if (m_ChangeListeners == null)
m_ChangeListeners = new HashSet<>();
} | void function() { if (m_ChangeListeners == null) m_ChangeListeners = new HashSet<>(); } | /**
* Initializes the change listeners.
*/ | Initializes the change listeners | initChangeListeners | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/control/Storage.java",
"license": "gpl-3.0",
"size": 15504
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,929,009 |
void beginMaintenance() throws RuntimeServiceException; | void beginMaintenance() throws RuntimeServiceException; | /**
* <p>
* Put the Runtime into maintenance mode.
* </p>
* This will contain all the code that need to be called when runtime starting its MAINTENANCE state.
*
* @throws RuntimeServiceException - on error while trying to start maintenance of the Runtime
*/ | Put the Runtime into maintenance mode. This will contain all the code that need to be called when runtime starting its MAINTENANCE state | beginMaintenance | {
"repo_name": "daneshk/carbon-kernel",
"path": "core/src/main/java/org/wso2/carbon/kernel/runtime/Runtime.java",
"license": "apache-2.0",
"size": 3599
} | [
"org.wso2.carbon.kernel.runtime.exception.RuntimeServiceException"
] | import org.wso2.carbon.kernel.runtime.exception.RuntimeServiceException; | import org.wso2.carbon.kernel.runtime.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,344,435 |
log.debug(" In GrafanaUserDetailsService Grafana ...... ");
BCryptPasswordEncoder encoder = passwordEncoder();
UserDetails user = GrafanaUserDetailsUtil.getUserDetails(request);
return new org.springframework.security.core.userdetails.User(user.getUsername(),
encoder.encode(user.getPassword()), user.getAuth... | log.debug(STR); BCryptPasswordEncoder encoder = passwordEncoder(); UserDetails user = GrafanaUserDetailsUtil.getUserDetails(request); return new org.springframework.security.core.userdetails.User(user.getUsername(), encoder.encode(user.getPassword()), user.getAuthorities()); } | /**
* used to loads user-specific data.
*
*/ | used to loads user-specific data | loadUserByUsername | {
"repo_name": "CognizantOneDevOps/Insights",
"path": "PlatformService/src/main/java/com/cognizant/devops/platformservice/security/config/grafana/GrafanaUserDetailsService.java",
"license": "apache-2.0",
"size": 2188
} | [
"org.springframework.security.core.userdetails.UserDetails",
"org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"
] | import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | import org.springframework.security.core.userdetails.*; import org.springframework.security.crypto.bcrypt.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,862,834 |
public void testWaitingTxUnblockedOnTimeout() throws Exception {
waitingTxUnblockedOnTimeout(grid(0), grid(0));
waitingTxUnblockedOnTimeout(grid(0), grid(1));
Ignite client = startClient();
waitingTxUnblockedOnTimeout(grid(0), client);
waitingTxUnblockedOnTimeout(grid(1),... | void function() throws Exception { waitingTxUnblockedOnTimeout(grid(0), grid(0)); waitingTxUnblockedOnTimeout(grid(0), grid(1)); Ignite client = startClient(); waitingTxUnblockedOnTimeout(grid(0), client); waitingTxUnblockedOnTimeout(grid(1), client); waitingTxUnblockedOnTimeout(client, grid(0)); waitingTxUnblockedOnTi... | /**
* Tests if timeout on first tx unblocks second tx waiting for the locked key.
*
* @throws Exception If failed.
*/ | Tests if timeout on first tx unblocks second tx waiting for the locked key | testWaitingTxUnblockedOnTimeout | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/transactions/TxRollbackOnTimeoutTest.java",
"license": "apache-2.0",
"size": 27550
} | [
"org.apache.ignite.Ignite"
] | import org.apache.ignite.Ignite; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 681,207 |
public void setKcPerson(KcPerson kcPerson) {
this.kcPerson = kcPerson;
} | void function(KcPerson kcPerson) { this.kcPerson = kcPerson; } | /**.
* This is the Setter Method for kcPerson
* @param kcPerson The kcPerson to set.
*/ | . This is the Setter Method for kcPerson | setKcPerson | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/subaward/bo/SubAward.java",
"license": "apache-2.0",
"size": 44135
} | [
"org.kuali.coeus.common.framework.person.KcPerson"
] | import org.kuali.coeus.common.framework.person.KcPerson; | import org.kuali.coeus.common.framework.person.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 2,781,001 |
@Test
public void testSetMax_1()
throws Exception {
SummaryData fixture = new SummaryData();
fixture.setPercentile10(1.0);
fixture.setJobId(1);
fixture.setVarience(1.0);
fixture.setPercentile60(1.0);
fixture.setPercentile95(1.0);
fixture.setSkewnes... | void function() throws Exception { SummaryData fixture = new SummaryData(); fixture.setPercentile10(1.0); fixture.setJobId(1); fixture.setVarience(1.0); fixture.setPercentile60(1.0); fixture.setPercentile95(1.0); fixture.setSkewness(1.0); fixture.setPercentile40(1.0); fixture.setPercentile90(1.0); fixture.setMax(1.0); ... | /**
* Run the void setMax(double) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 12/15/14 1:34 PM
*/ | Run the void setMax(double) method test | testSetMax_1 | {
"repo_name": "kevinmcgoldrick/Tank",
"path": "data_model/src/test/java/com/intuit/tank/project/SummaryDataTest.java",
"license": "epl-1.0",
"size": 52832
} | [
"com.intuit.tank.project.SummaryData"
] | import com.intuit.tank.project.SummaryData; | import com.intuit.tank.project.*; | [
"com.intuit.tank"
] | com.intuit.tank; | 380,549 |
public MetaProperty<double[]> rates() {
return _rates;
} | MetaProperty<double[]> function() { return _rates; } | /**
* The meta-property for the {@code rates} property.
* @return the meta-property, not null
*/ | The meta-property for the rates property | rates | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "projects/OG-FinancialTypes/src/main/java/com/opengamma/financial/security/irs/Rate.java",
"license": "apache-2.0",
"size": 14024
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,021,236 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.