method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static ASN1OctetString getInstance(
Object obj)
{
if (obj == null || obj instanceof ASN1OctetString)
{
return (ASN1OctetString)obj;
}
else if (obj instanceof byte[])
{
try
{
return ASN1OctetString.getInst... | static ASN1OctetString function( Object obj) { if (obj == null obj instanceof ASN1OctetString) { return (ASN1OctetString)obj; } else if (obj instanceof byte[]) { try { return ASN1OctetString.getInstance(ASN1Primitive.fromByteArray((byte[])obj)); } catch (IOException e) { throw new IllegalArgumentException(STR + e.getMe... | /**
* return an Octet String from the given object.
*
* @param obj the object we want converted.
* @exception IllegalArgumentException if the object cannot be converted.
*/ | return an Octet String from the given object | getInstance | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/asn1/ASN1OctetString.java",
"license": "mit",
"size": 3574
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,589,879 |
public ArrayList <Integer> deleteDescendants (int original_identifier) {
ArrayList <Integer> nodes_deleted;
nodes_deleted = new ArrayList <Integer> ();
// Obtain descendants of descendants
if (left != null) {
nodes_deleted.addAll(left.deleteDescen... | ArrayList <Integer> function (int original_identifier) { ArrayList <Integer> nodes_deleted; nodes_deleted = new ArrayList <Integer> (); if (left != null) { nodes_deleted.addAll(left.deleteDescendants(original_identifier)); } if (right != null) { nodes_deleted.addAll(right.deleteDescendants(original_identifier)); } left... | /**
* Removes the descendants from a identifier given of a node. The nodes whose descendants are being
* removed become leaf nodes
*
* @param original_identifier Identifier of the node that is becoming a leaf node and whose descendants
* are being removed
* @return ArrayList with ... | Removes the descendants from a identifier given of a node. The nodes whose descendants are being removed become leaf nodes | deleteDescendants | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/Algorithms/Decision_Trees/PUBLIC/TreeNode.java",
"license": "gpl-3.0",
"size": 18805
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,912,429 |
public OutputStream openOutputStream(Uri uri, boolean append) throws IOException {
assertBackgroundThread();
switch (getUriType(uri)) {
case URI_TYPE_FILE: {
File localFile = new File(uri.getPath());
File parent = localFile.getParentFile();
... | OutputStream function(Uri uri, boolean append) throws IOException { assertBackgroundThread(); switch (getUriType(uri)) { case URI_TYPE_FILE: { File localFile = new File(uri.getPath()); File parent = localFile.getParentFile(); if (parent != null) { parent.mkdirs(); } return new FileOutputStream(localFile, append); } cas... | /**
* Opens a stream to the given URI.
* @return Never returns null.
* @throws Throws an InvalidArgumentException for relative URIs. Relative URIs should be
* resolved before being passed into this function.
* @throws Throws an IOException if the URI cannot be opened.
*/ | Opens a stream to the given URI | openOutputStream | {
"repo_name": "ReversonMendes/Ionic-Desafio",
"path": "desafio-master/platforms/android/CordovaLib/src/org/apache/cordova/CordovaResourceApi.java",
"license": "gpl-2.0",
"size": 18072
} | [
"android.content.res.AssetFileDescriptor",
"android.net.Uri",
"java.io.File",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import android.content.res.AssetFileDescriptor; import android.net.Uri; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import android.content.res.*; import android.net.*; import java.io.*; | [
"android.content",
"android.net",
"java.io"
] | android.content; android.net; java.io; | 2,438,809 |
public List<String> getInterfaces() {
return new ArrayList<>(interfaces);
} | List<String> function() { return new ArrayList<>(interfaces); } | /**
* Gets the implemented interfaces.
* @return interfaces
*/ | Gets the implemented interfaces | getInterfaces | {
"repo_name": "offbynull/coroutines",
"path": "instrumenter/src/main/java/com/offbynull/coroutines/instrumenter/asm/ClassInformation.java",
"license": "lgpl-3.0",
"size": 3779
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,470,952 |
public ServiceResponse<Error> patch414() throws ErrorException, IOException {
return patch414Async().toBlocking().single();
} | ServiceResponse<Error> function() throws ErrorException, IOException { return patch414Async().toBlocking().single(); } | /**
* Return 414 status code - should be represented in the client as an error.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the Error object wrapped in {@link ServiceResponse} if successful.
... | Return 414 status code - should be represented in the client as an error | patch414 | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/HttpClientFailuresImpl.java",
"license": "mit",
"size": 78284
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,421,740 |
public Hashtable getConfig()
{
return config;
} | Hashtable function() { return config; } | /**
* Returns the configuration values for this request
* @return Returns the configuration values
*/ | Returns the configuration values for this request | getConfig | {
"repo_name": "NCIP/stats-analysis",
"path": "cacoretoolkit 3.1/src/gov/nih/nci/common/net/Request.java",
"license": "bsd-3-clause",
"size": 2642
} | [
"java.util.Hashtable"
] | import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 1,149,093 |
public static Text utf8Trim(Text src, Text dst) {
findUTF8CharOffsets(src, CHAR_OFFSETS);
int len = CHAR_OFFSETS.size();
int st = 0;
byte[] bytes = src.getBytes();
while ((st < len) && (bytes[st] <= ' ')) {
st++;
}
while ((st < len) && (bytes[len - 1] <= ' ')) {
len--;
}
dst.set(bytes, st,... | static Text function(Text src, Text dst) { findUTF8CharOffsets(src, CHAR_OFFSETS); int len = CHAR_OFFSETS.size(); int st = 0; byte[] bytes = src.getBytes(); while ((st < len) && (bytes[st] <= ' ')) { st++; } while ((st < len) && (bytes[len - 1] <= ' ')) { len--; } dst.set(bytes, st, len - st); return dst; } | /**
* Trim leading / trailing whitespace from the passed src object which
* contains UTF8 byte stream
*
* @param src
* Source to trim
* @param dst
* Destination to populate with trimmed UTF8 string
* @return Destination text object, for call chaining
*/ | Trim leading / trailing whitespace from the passed src object which contains UTF8 byte stream | utf8Trim | {
"repo_name": "chriswhite199/hadoop-text-util",
"path": "src/main/java/csw/hadoop/text/TextUtils.java",
"license": "apache-2.0",
"size": 11967
} | [
"org.apache.hadoop.io.Text"
] | import org.apache.hadoop.io.Text; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 403,834 |
public void testAsciiCharConversion() throws Exception {
byte[] buf = new byte[10];
buf[0] = (byte) '?';
buf[1] = (byte) 'S';
buf[2] = (byte) 't';
buf[3] = (byte) 'a';
buf[4] = (byte) 't';
buf[5] = (byte) 'e';
buf[6] = (byte) '-';
buf[7] = (byte) 'b';
buf[8] = (byte) 'o';
buf[9] = (byte) 't';
... | void function() throws Exception { byte[] buf = new byte[10]; buf[0] = (byte) '?'; buf[1] = (byte) 'S'; buf[2] = (byte) 't'; buf[3] = (byte) 'a'; buf[4] = (byte) 't'; buf[5] = (byte) 'e'; buf[6] = (byte) '-'; buf[7] = (byte) 'b'; buf[8] = (byte) 'o'; buf[9] = (byte) 't'; String testString = STR; String convertedString ... | /**
* Tests character conversion bug.
*
* @throws Exception
* if there is an internal error (which is a bug).
*/ | Tests character conversion bug | testAsciiCharConversion | {
"repo_name": "yyuu/libmysql-java",
"path": "src/testsuite/regression/StringRegressionTest.java",
"license": "gpl-2.0",
"size": 28976
} | [
"com.mysql.jdbc.StringUtils"
] | import com.mysql.jdbc.StringUtils; | import com.mysql.jdbc.*; | [
"com.mysql.jdbc"
] | com.mysql.jdbc; | 865,524 |
private static Exception extractException(Exception e) {
while (e instanceof PrivilegedActionException) {
e = ((PrivilegedActionException)e).getException();
}
return e;
}
private static class IdAndFilter {
private Integer id;
private NotificationFilter fi... | static Exception function(Exception e) { while (e instanceof PrivilegedActionException) { e = ((PrivilegedActionException)e).getException(); } return e; } private static class IdAndFilter { private Integer id; private NotificationFilter filter; IdAndFilter(Integer id, NotificationFilter filter) { this.id = id; this.fil... | /**
* Iterate until we extract the real exception
* from a stack of PrivilegedActionExceptions.
*/ | Iterate until we extract the real exception from a stack of PrivilegedActionExceptions | extractException | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/com/sun/jmx/remote/internal/ServerNotifForwarder.java",
"license": "mit",
"size": 18104
} | [
"java.security.PrivilegedActionException",
"javax.management.NotificationFilter"
] | import java.security.PrivilegedActionException; import javax.management.NotificationFilter; | import java.security.*; import javax.management.*; | [
"java.security",
"javax.management"
] | java.security; javax.management; | 156,621 |
@Override
protected void calc() {
JMadModel model = getModel();
if (model == null) {
return;
}
allNames.clear();
for (ListPrefix listPrefix : ListPrefix.values()) {
for (KeyPrefix keyPrefix : KeyPrefix.values()) {
if (KeyP... | void function() { JMadModel model = getModel(); if (model == null) { return; } allNames.clear(); for (ListPrefix listPrefix : ListPrefix.values()) { for (KeyPrefix keyPrefix : KeyPrefix.values()) { if (KeyPrefix.S_POSITION.equals(keyPrefix)) { putValueList(listPrefix, keyPrefix, null, new ArrayList<>()); } else { for (... | /**
* recalculates the data
*/ | recalculates the data | calc | {
"repo_name": "jmad/aloha",
"path": "src/java/cern/accsoft/steering/aloha/model/data/JMadModelOpticsData.java",
"license": "apache-2.0",
"size": 14234
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 682,876 |
public CloningInfo cloningInfo() {
return this.cloningInfo;
} | CloningInfo function() { return this.cloningInfo; } | /**
* Get the cloningInfo value.
*
* @return the cloningInfo value
*/ | Get the cloningInfo value | cloningInfo | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SiteInner.java",
"license": "mit",
"size": 17562
} | [
"com.microsoft.azure.management.website.CloningInfo"
] | import com.microsoft.azure.management.website.CloningInfo; | import com.microsoft.azure.management.website.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 75,352 |
public Optional<JoinMetadata> getJoinMetadata(final String nodeId) {
requireNonNull(nodeId);
return Optional.fromNullable( joinMetadata.get(nodeId) );
} | Optional<JoinMetadata> function(final String nodeId) { requireNonNull(nodeId); return Optional.fromNullable( joinMetadata.get(nodeId) ); } | /**
* Get a Join node's metadata.
*
* @param nodeId - The node ID of the Join metadata you want. (not null)
* @return The Join metadata if it could be found; otherwise absent.
*/ | Get a Join node's metadata | getJoinMetadata | {
"repo_name": "pujav65/incubator-rya",
"path": "extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/query/FluoQuery.java",
"license": "apache-2.0",
"size": 18910
} | [
"com.google.common.base.Optional",
"java.util.Objects"
] | import com.google.common.base.Optional; import java.util.Objects; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 412,191 |
private int analyse(CmsResource res, String sourceMergeFolder, String targetMergefolder, int currentFolder) {
int retValue = -1;
String resourcenameOther = getResourceNameInOtherFolder(
m_cms.getSitePath(res),
sourceMergeFolder,
targetMergefolder);
try {
... | int function(CmsResource res, String sourceMergeFolder, String targetMergefolder, int currentFolder) { int retValue = -1; String resourcenameOther = getResourceNameInOtherFolder( m_cms.getSitePath(res), sourceMergeFolder, targetMergefolder); try { CmsResource otherRes = m_cms.readResource(resourcenameOther, CmsResource... | /**
* Analyses a page in the source morge folder and tests if a resouce with the same name exists in the target merge folder.<p>
*
* The method then calcualtes a action for further processing of this page, possible values are:
* <ul>
* <li>C_FOLDER1_EXCLUSIVE: exclusivly found in folder 1</li>... | Analyses a page in the source morge folder and tests if a resouce with the same name exists in the target merge folder. The method then calcualtes a action for further processing of this page, possible values are: | analyse | {
"repo_name": "it-tavis/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/content/CmsMergePages.java",
"license": "lgpl-2.1",
"size": 33940
} | [
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.main.CmsException"
] | import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.main.CmsException; | import org.opencms.file.*; import org.opencms.main.*; | [
"org.opencms.file",
"org.opencms.main"
] | org.opencms.file; org.opencms.main; | 853,793 |
public Character[] getCharacterList() {
return gameStateInformation.getCharacterList();
}
| Character[] function() { return gameStateInformation.getCharacterList(); } | /**
* List of characters
* @return Array of Characters
*/ | List of characters | getCharacterList | {
"repo_name": "balazspete/crystal-game",
"path": "crystal-game/src/com/example/crystalgame/game/maps/LocalMapInformation.java",
"license": "mit",
"size": 1319
} | [
"com.example.crystalgame.library.data.Character"
] | import com.example.crystalgame.library.data.Character; | import com.example.crystalgame.library.data.*; | [
"com.example.crystalgame"
] | com.example.crystalgame; | 2,307,302 |
@Test
public void testMissingPath0() throws Exception {
URL url = new URL("http://d.e.f/goo.html");
man.addCookieFromHeader("test=moo", url);
String s = man.getCookieHeaderForURL(new URL("http://d.e.f/"));
assertNotNull(s);
assertEquals("... | void function() throws Exception { URL url = new URL(STRtest=mooSTRhttp: assertNotNull(s); assertEquals(STR, s); } | /** Tests missing cookie path for a trivial URL fetch from the domain
* Note that this fails prior to a fix for BUG 38256
*
* @throws Exception if something fails
*/ | Tests missing cookie path for a trivial URL fetch from the domain Note that this fails prior to a fix for BUG 38256 | testMissingPath0 | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-jmeter-3.0/test/src/org/apache/jmeter/protocol/http/control/TestHC3CookieManager.java",
"license": "apache-2.0",
"size": 20380
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 711,390 |
private ResourceInstance createUserResource(String userName) {
return createResource(Resource.Type.User,
Collections.singletonMap(Resource.Type.User, userName));
} | ResourceInstance function(String userName) { return createResource(Resource.Type.User, Collections.singletonMap(Resource.Type.User, userName)); } | /**
* Create a user resource instance.
*
* @param userName user name
*
* @return a user resource instance
*/ | Create a user resource instance | createUserResource | {
"repo_name": "telefonicaid/fiware-cosmos-ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java",
"license": "apache-2.0",
"size": 4106
} | [
"java.util.Collections",
"org.apache.ambari.server.api.resources.ResourceInstance",
"org.apache.ambari.server.controller.spi.Resource"
] | import java.util.Collections; import org.apache.ambari.server.api.resources.ResourceInstance; import org.apache.ambari.server.controller.spi.Resource; | import java.util.*; import org.apache.ambari.server.api.resources.*; import org.apache.ambari.server.controller.spi.*; | [
"java.util",
"org.apache.ambari"
] | java.util; org.apache.ambari; | 965,762 |
protected Set<Integer> createTranslationScopeSet()
{
return new HashSet<Integer>();
} | Set<Integer> function() { return new HashSet<Integer>(); } | /**
* Factory method to create translation scope set. Creates a new instance of {@link HashSet}. Subclasses may
* override to supply a custom {@link java.util.Set} type.
*
* @return The translation scope set. Will never be <code>null</code>.
*/ | Factory method to create translation scope set. Creates a new instance of <code>HashSet</code>. Subclasses may override to supply a custom <code>java.util.Set</code> type | createTranslationScopeSet | {
"repo_name": "kdunsmore/diffunit",
"path": "core/impl/src/main/java/com/sunsprinter/diffunit/core/translators/TypeBindingTranslator.java",
"license": "apache-2.0",
"size": 7603
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 129,387 |
public void save(Song song, Channel channel) {
// Does the song exist? Does it exist in the database?
if(song == null || song.getId() == 0) {
// Nope. Don't save anything.
return;
}
// Does the channel exist?
if(channel.getId() > 0) {
// Yes, update.
// Set up value table.
ContentV... | void function(Song song, Channel channel) { if(song == null song.getId() == 0) { return; } if(channel.getId() > 0) { ContentValues values = new ContentValues(); values.put(ChannelSQLiteHelper.COLUMN_NUMBER, channel.getChannelNumber()); values.put(ChannelSQLiteHelper.COLUMN_RIGHTPAN, channel.getRightPanning()); values.p... | /**
* Saves a channel to a song, if the channel doesn't exists it is created.
* The Channel needs an for ID for the Channel to update.
*
* Also, if the song is null or not in the database the Channel
* won't be saved.
*
* @param song Song the channel belongs to.
* @param channel The Channel to... | Saves a channel to a song, if the channel doesn't exists it is created. The Channel needs an for ID for the Channel to update. Also, if the song is null or not in the database the Channel won't be saved | save | {
"repo_name": "KVHC/adrumdrum",
"path": "src/kvhc/util/db/ChannelDataSource.java",
"license": "gpl-3.0",
"size": 9560
} | [
"android.content.ContentValues"
] | import android.content.ContentValues; | import android.content.*; | [
"android.content"
] | android.content; | 2,147,588 |
public void getEmissiveColor(Color3f color) {
if (isLiveOrCompiled())
if (!this.getCapability(ALLOW_COMPONENT_READ))
throw new CapabilityNotSetException(J3dI18N.getString("Material2"));
((MaterialRetained)this.retained).getEmissiveColor(color);
} | void function(Color3f color) { if (isLiveOrCompiled()) if (!this.getCapability(ALLOW_COMPONENT_READ)) throw new CapabilityNotSetException(J3dI18N.getString(STR)); ((MaterialRetained)this.retained).getEmissiveColor(color); } | /**
* Retrieves this material's emissive color and stores it in the
* argument provided.
* @param color the vector that will receive this material's emissive color
* @exception CapabilityNotSetException if appropriate capability is
* not set and this object is part of live or compiled scene gra... | Retrieves this material's emissive color and stores it in the argument provided | getEmissiveColor | {
"repo_name": "philipwhiuk/j3d-core",
"path": "src/classes/share/javax/media/j3d/Material.java",
"license": "gpl-2.0",
"size": 27667
} | [
"javax.vecmath.Color3f"
] | import javax.vecmath.Color3f; | import javax.vecmath.*; | [
"javax.vecmath"
] | javax.vecmath; | 617,283 |
public Set getOperators();
| Set function(); | /**
* get all the operators
* @return the operators
*/ | get all the operators | getOperators | {
"repo_name": "cybersonic/org.cfeclipse.cfml",
"path": "src/org/cfeclipse/cfml/dictionary/ISyntaxDictionary.java",
"license": "mit",
"size": 3509
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,182,352 |
public void setServerPortNumber(String serverPortNumber) {
try {
this.serverPortNumber = Integer.valueOf(serverPortNumber);
} catch (NumberFormatException e) {
throw new RuntimeCamelException(String.format("Invalid target port number: %s", targetPortNumber));
}
} | void function(String serverPortNumber) { try { this.serverPortNumber = Integer.valueOf(serverPortNumber); } catch (NumberFormatException e) { throw new RuntimeCamelException(String.format(STR, targetPortNumber)); } } | /**
* The port number of server.
*/ | The port number of server | setServerPortNumber | {
"repo_name": "sverkera/camel",
"path": "components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Configuration.java",
"license": "apache-2.0",
"size": 11999
} | [
"org.apache.camel.RuntimeCamelException"
] | import org.apache.camel.RuntimeCamelException; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,296,249 |
public static void render(JRExporter exporter, JasperPrint print, OutputStream outputStream)
throws JRException {
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);
exporter.exportReport();
}
| static void function(JRExporter exporter, JasperPrint print, OutputStream outputStream) throws JRException { exporter.setParameter(JRExporterParameter.JASPER_PRINT, print); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream); exporter.exportReport(); } | /**
* Render the supplied <code>JasperPrint</code> instance using the
* supplied <code>JRAbstractExporter</code> instance and write the results
* to the supplied <code>OutputStream</code>.
* <p>Make sure that the <code>JRAbstractExporter</code> implementation you
* supply is capable of writing to a <code... | Render the supplied <code>JasperPrint</code> instance using the supplied <code>JRAbstractExporter</code> instance and write the results to the supplied <code>OutputStream</code>. Make sure that the <code>JRAbstractExporter</code> implementation you supply is capable of writing to a <code>OutputStream</code> | render | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_mvc/src/main/java/org/frameworkset/ui/jasperreports/JasperReportsUtils.java",
"license": "apache-2.0",
"size": 12844
} | [
"java.io.OutputStream",
"net.sf.jasperreports.engine.JRException",
"net.sf.jasperreports.engine.JRExporter",
"net.sf.jasperreports.engine.JRExporterParameter",
"net.sf.jasperreports.engine.JasperPrint"
] | import java.io.OutputStream; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporter; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint; | import java.io.*; import net.sf.jasperreports.engine.*; | [
"java.io",
"net.sf.jasperreports"
] | java.io; net.sf.jasperreports; | 427,538 |
protected void removeAntiSpoofingIp2Mac(String addrSpace,
Short vlan,
Long mac,
Integer ip) {
ScopedIp scopedIp = new ScopedIp(addrSpace, ip);
Collection<DeviceId> host... | void function(String addrSpace, Short vlan, Long mac, Integer ip) { ScopedIp scopedIp = new ScopedIp(addrSpace, ip); Collection<DeviceId> hosts = hostSecurityIpMap.get(scopedIp); if (hosts == null) { return; } DeviceId host = new DeviceId(addrSpace, vlan, mac); hosts.remove(host); if (hosts.isEmpty()) hostSecurityIpMap... | /**
* Remove an IP to MAC anti-spoofing entry.
*
* NOTE: The caller needs to hold the anti-spoofing write lock.
* @param addrSpace
* @param vlan
* @param mac
* @param ip
*/ | Remove an IP to MAC anti-spoofing entry | removeAntiSpoofingIp2Mac | {
"repo_name": "mandeepdhami/netvirt-ctrl",
"path": "sdnplatform/src/main/java/org/sdnplatform/devicemanager/internal/BetterDeviceManagerImpl.java",
"license": "epl-1.0",
"size": 78077
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,370,948 |
private void validateMasterInstanceDefinition(MasterInstanceDefinition masterInstanceDefinition)
{
InstanceDefinition instanceDefinition = new InstanceDefinition();
instanceDefinition.setInstanceCount(masterInstanceDefinition.getInstanceCount());
instanceDefinition.setInstanceMaxSearchPr... | void function(MasterInstanceDefinition masterInstanceDefinition) { InstanceDefinition instanceDefinition = new InstanceDefinition(); instanceDefinition.setInstanceCount(masterInstanceDefinition.getInstanceCount()); instanceDefinition.setInstanceMaxSearchPrice(masterInstanceDefinition.getInstanceMaxSearchPrice()); insta... | /**
* Converts the given master instance definition to a generic instance definition and delegates to validateInstanceDefinition(). Generates an appropriate
* error message using the name "master".
*
* @param masterInstanceDefinition the master instance definition to validate
*
* @throws I... | Converts the given master instance definition to a generic instance definition and delegates to validateInstanceDefinition(). Generates an appropriate error message using the name "master" | validateMasterInstanceDefinition | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/helper/EmrClusterDefinitionHelper.java",
"license": "apache-2.0",
"size": 13197
} | [
"org.finra.herd.model.api.xml.InstanceDefinition",
"org.finra.herd.model.api.xml.MasterInstanceDefinition"
] | import org.finra.herd.model.api.xml.InstanceDefinition; import org.finra.herd.model.api.xml.MasterInstanceDefinition; | import org.finra.herd.model.api.xml.*; | [
"org.finra.herd"
] | org.finra.herd; | 2,615,541 |
public void close() {
//log.debug("Stream close: {}", publishedName);
if (closed.compareAndSet(false, true)) {
if (livePipe != null) {
livePipe.unsubscribe((IProvider) this);
}
// if we have a recording listener, inform that this stream is do... | void function() { if (closed.compareAndSet(false, true)) { if (livePipe != null) { livePipe.unsubscribe((IProvider) this); } if (recordingListener != null) { sendRecordStopNotify(); notifyRecordingStop(); recordingListener.get().stop(); } sendPublishStopNotify(); if (connMsgOut != null) { connMsgOut.unsubscribe(this); ... | /**
* Closes stream, unsubscribes provides, sends stoppage notifications and broadcast close notification.
*/ | Closes stream, unsubscribes provides, sends stoppage notifications and broadcast close notification | close | {
"repo_name": "solomax/red5-server-common",
"path": "src/main/java/org/red5/server/stream/ClientBroadcastStream.java",
"license": "apache-2.0",
"size": 39246
} | [
"org.red5.server.api.stream.StreamState",
"org.red5.server.messaging.IProvider"
] | import org.red5.server.api.stream.StreamState; import org.red5.server.messaging.IProvider; | import org.red5.server.api.stream.*; import org.red5.server.messaging.*; | [
"org.red5.server"
] | org.red5.server; | 1,669,642 |
long[] getDownloadedVideoDmIdsForSection(String enrollmentId, String chapter, String section,
final DataCallback<List<Long>> callback); | long[] getDownloadedVideoDmIdsForSection(String enrollmentId, String chapter, String section, final DataCallback<List<Long>> callback); | /**
* Returns dmId's of all downloaded videos for given section of logged in user
*
* @param enrollmentId course which has the chapter
* @param chapter the chapter
* @param section the section inside chapter
* @param callback callback to return results to
* @return If th... | Returns dmId's of all downloaded videos for given section of logged in user | getDownloadedVideoDmIdsForSection | {
"repo_name": "IndonesiaX/edx-app-android",
"path": "VideoLocker/src/main/java/org/edx/mobile/module/db/IDatabase.java",
"license": "apache-2.0",
"size": 16172
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,106,658 |
@Test
public void testIsUndefined() {
msg =
ModelInstanceTypeTestSuiteMessages.TestModelInstanceEnumerationLiteral_IsUndefinedIsWrong;
for (IModelInstanceEnumerationLiteral aLiteral : instances_EnumerationLiteral) {
if (aLiteral.isUndefined()) {
assertNull(msg, aLiteral.getLiteral());
... | void function() { msg = ModelInstanceTypeTestSuiteMessages.TestModelInstanceEnumerationLiteral_IsUndefinedIsWrong; for (IModelInstanceEnumerationLiteral aLiteral : instances_EnumerationLiteral) { if (aLiteral.isUndefined()) { assertNull(msg, aLiteral.getLiteral()); } else { assertNotNull(msg, aLiteral.getLiteral()); } ... | /**
* <p>
* Tests the method {@link IModelInstanceEnumerationLiteral#isUndefined()}.
* </p>
*/ | Tests the method <code>IModelInstanceEnumerationLiteral#isUndefined()</code>. | testIsUndefined | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "tests/org.dresdenocl.modelinstancetype.test/src/org/dresdenocl/modelinstancetype/test/tests/TestModelInstanceEnumerationLiteral.java",
"license": "lgpl-3.0",
"size": 10622
} | [
"org.dresdenocl.modelinstancetype.test.msg.ModelInstanceTypeTestSuiteMessages",
"org.dresdenocl.modelinstancetype.types.IModelInstanceEnumerationLiteral",
"org.junit.Assert"
] | import org.dresdenocl.modelinstancetype.test.msg.ModelInstanceTypeTestSuiteMessages; import org.dresdenocl.modelinstancetype.types.IModelInstanceEnumerationLiteral; import org.junit.Assert; | import org.dresdenocl.modelinstancetype.test.msg.*; import org.dresdenocl.modelinstancetype.types.*; import org.junit.*; | [
"org.dresdenocl.modelinstancetype",
"org.junit"
] | org.dresdenocl.modelinstancetype; org.junit; | 1,979,661 |
public int getUnusableNodes(Collection<RMNode> unUsableNodes) {
unUsableNodes.addAll(unusableRMNodesConcurrentSet);
return unusableRMNodesConcurrentSet.size();
} | int function(Collection<RMNode> unUsableNodes) { unUsableNodes.addAll(unusableRMNodesConcurrentSet); return unusableRMNodesConcurrentSet.size(); } | /**
* Provides the currently unusable nodes. Copies it into provided collection.
* @param unUsableNodes
* Collection to which the unusable nodes are added
* @return number of unusable nodes added
*/ | Provides the currently unusable nodes. Copies it into provided collection | getUnusableNodes | {
"repo_name": "myeoje/PhillyYarn",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java",
"license": "apache-2.0",
"size": 9237
} | [
"java.util.Collection",
"org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode"
] | import java.util.Collection; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode; | import java.util.*; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,303,063 |
BrokerInfo getLeaderBroker() throws PulsarAdminException; | BrokerInfo getLeaderBroker() throws PulsarAdminException; | /**
* Get the information of the leader broker.
* <p/>
* Get the information of the leader broker.
* <p/>
* Response Example:
*
* <pre>
* <code>{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}</code>
* </pre>
*
* @return the information of the leader bro... | Get the information of the leader broker. Get the information of the leader broker. Response Example: <code> <code>{serviceUrl:"prod1-broker1.messaging.use.example.com:8080"}</code> </code> | getLeaderBroker | {
"repo_name": "massakam/pulsar",
"path": "pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/Brokers.java",
"license": "apache-2.0",
"size": 9824
} | [
"org.apache.pulsar.common.policies.data.BrokerInfo"
] | import org.apache.pulsar.common.policies.data.BrokerInfo; | import org.apache.pulsar.common.policies.data.*; | [
"org.apache.pulsar"
] | org.apache.pulsar; | 1,036,166 |
public Intent getSystemLocationSettingsIntent() {
Intent i = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return i;
} | Intent function() { Intent i = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); return i; } | /**
* Returns an intent to launch Android Location Settings.
*/ | Returns an intent to launch Android Location Settings | getSystemLocationSettingsIntent | {
"repo_name": "guorendong/iridium-browser-ubuntu",
"path": "chrome/android/java/src/org/chromium/chrome/browser/preferences/LocationSettings.java",
"license": "bsd-3-clause",
"size": 3966
} | [
"android.content.Intent",
"android.provider.Settings"
] | import android.content.Intent; import android.provider.Settings; | import android.content.*; import android.provider.*; | [
"android.content",
"android.provider"
] | android.content; android.provider; | 1,171,402 |
public PDThreadBead getPreviousBead()
{
return new PDThreadBead(bead.getCOSDictionary(COSName.V));
} | PDThreadBead function() { return new PDThreadBead(bead.getCOSDictionary(COSName.V)); } | /**
* This will get the previous bead. If this bead is the first bead in the list then this
* will return the last bead.
*
* @return The previous bead in the list or the last bead if this is the first bead.
*/ | This will get the previous bead. If this bead is the first bead in the list then this will return the last bead | getPreviousBead | {
"repo_name": "kalaspuffar/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/pagenavigation/PDThreadBead.java",
"license": "apache-2.0",
"size": 5619
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 415,343 |
public static String explode(Collection<? extends Object> parts, String glue) {
return explode(parts.toArray(new Object[parts.size()]), glue);
}
| static String function(Collection<? extends Object> parts, String glue) { return explode(parts.toArray(new Object[parts.size()]), glue); } | /**
* Concatenates the given parts and puts 'glue' between them.
*/ | Concatenates the given parts and puts 'glue' between them | explode | {
"repo_name": "HyVar/DarwinSPL",
"path": "plugins/eu.hyvar.feature.mapping.resource.hymapping/src-gen/eu/hyvar/feature/mapping/resource/hymapping/util/HymappingStringUtil.java",
"license": "apache-2.0",
"size": 11722
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,352,817 |
File getSaveFile();
void setSaveFile(File saveFile);
long getFileSize();
//URN getURN();
//com.limegroup.gnutella.Downloader createDownloader(boolean overwrite)
// throws DownloadException; | File getSaveFile(); void setSaveFile(File saveFile); long getFileSize(); | /**
* Returns the final file size of the download if available, otherwise 0.
*/ | Returns the final file size of the download if available, otherwise 0 | getFileSize | {
"repo_name": "adamfisk/littleshoot-client",
"path": "client/services/src/main/java/org/lastbamboo/client/services/download/DownloaderFactory.java",
"license": "gpl-2.0",
"size": 1382
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 890,639 |
public DateTime endTimeUtc() {
if (this.endTimeUtc == null) {
return null;
}
return this.endTimeUtc.dateTime();
} | DateTime function() { if (this.endTimeUtc == null) { return null; } return this.endTimeUtc.dateTime(); } | /**
* Get the endTimeUtc value.
*
* @return the endTimeUtc value
*/ | Get the endTimeUtc value | endTimeUtc | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/JobResponseInner.java",
"license": "mit",
"size": 3825
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,465,770 |
private void setBatchSize(String persistenceUnit, Map<String, Object> puProperties)
{
String batch_Size = null;
if (puProperties != null)
{
batch_Size = puProperties != null ? (String) puProperties.get(PersistenceProperties.KUNDERA_BATCH_SIZE)
: null;
... | void function(String persistenceUnit, Map<String, Object> puProperties) { String batch_Size = null; if (puProperties != null) { batch_Size = puProperties != null ? (String) puProperties.get(PersistenceProperties.KUNDERA_BATCH_SIZE) : null; if (batch_Size != null) { setBatchSize(Integer.valueOf(batch_Size)); } } else if... | /**
* Sets the batch size.
*
* @param persistenceUnit
* the persistence unit
* @param puProperties
* the pu properties
*/ | Sets the batch size | setBatchSize | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-redis/src/main/java/com/impetus/client/redis/RedisClient.java",
"license": "apache-2.0",
"size": 75957
} | [
"com.impetus.kundera.PersistenceProperties",
"com.impetus.kundera.metadata.KunderaMetadataManager",
"com.impetus.kundera.metadata.model.PersistenceUnitMetadata",
"java.util.Map"
] | import com.impetus.kundera.PersistenceProperties; import com.impetus.kundera.metadata.KunderaMetadataManager; import com.impetus.kundera.metadata.model.PersistenceUnitMetadata; import java.util.Map; | import com.impetus.kundera.*; import com.impetus.kundera.metadata.*; import com.impetus.kundera.metadata.model.*; import java.util.*; | [
"com.impetus.kundera",
"java.util"
] | com.impetus.kundera; java.util; | 339,760 |
public static String get(final Class<?> c, final String messageKey, Locale locale, final Object... arguments) throws NullPointerException, IllegalArgumentException, MissingResourceException {
if(c == null)
throw new NullPointerException();
return get(c.getCanonicalName(), messageKey, locale, arguments);
} | static String function(final Class<?> c, final String messageKey, Locale locale, final Object... arguments) throws NullPointerException, IllegalArgumentException, MissingResourceException { if(c == null) throw new NullPointerException(); return get(c.getCanonicalName(), messageKey, locale, arguments); } | /**
* <p>Calls {@link #get(String, String, Locale, Object...)} with the {@link Class#getCanonicalName() canonical name} of the given class {@code c} as the {@code bundleKey}.</p>
* @param c The class to determine the {@code bundleKey} from.
* @param messageKey The key of the message in the property resource bundl... | Calls <code>#get(String, String, Locale, Object...)</code> with the <code>Class#getCanonicalName() canonical name</code> of the given class c as the bundleKey | get | {
"repo_name": "IvIePhisto/Dual-Strike",
"path": "MCCF/java/mccf/MessageHelper.java",
"license": "gpl-3.0",
"size": 10974
} | [
"java.util.Locale",
"java.util.MissingResourceException"
] | import java.util.Locale; import java.util.MissingResourceException; | import java.util.*; | [
"java.util"
] | java.util; | 2,017,269 |
public void onChunkLoad() {
this.isChunkLoaded = true;
this.worldObj.addTileEntity(this.chunkTileEntityMap.values());
for (int var1 = 0; var1 < this.entityLists.length; ++var1) {
Iterator var2 = this.entityLists[var1].iterator();
while (var2.hasNext()) {
Entity var3 = (Entity)var2.next();
var3.... | void function() { this.isChunkLoaded = true; this.worldObj.addTileEntity(this.chunkTileEntityMap.values()); for (int var1 = 0; var1 < this.entityLists.length; ++var1) { Iterator var2 = this.entityLists[var1].iterator(); while (var2.hasNext()) { Entity var3 = (Entity)var2.next(); var3.onChunkLoad(); } this.worldObj.addL... | /**
* Called when this Chunk is loaded by the ChunkProvider
*/ | Called when this Chunk is loaded by the ChunkProvider | onChunkLoad | {
"repo_name": "Spoutcraft/Spoutcraft",
"path": "src/main/java/net/minecraft/src/Chunk.java",
"license": "lgpl-3.0",
"size": 36194
} | [
"java.util.Iterator",
"org.spoutcraft.client.block.SpoutcraftChunk"
] | import java.util.Iterator; import org.spoutcraft.client.block.SpoutcraftChunk; | import java.util.*; import org.spoutcraft.client.block.*; | [
"java.util",
"org.spoutcraft.client"
] | java.util; org.spoutcraft.client; | 504,949 |
int indexOf(Advice advice); | int indexOf(Advice advice); | /**
* Return the index (from 0) of the given AOP Alliance Advice,
* or -1 if no such advice is an advice for this proxy.
* <p>The return value of this method can be used to index into
* the advisors array.
* @param advice AOP Alliance advice to search for
* @return index from 0 of this advice, or -1 if ther... | Return the index (from 0) of the given AOP Alliance Advice, or -1 if no such advice is an advice for this proxy. The return value of this method can be used to index into the advisors array | indexOf | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java",
"license": "apache-2.0",
"size": 8473
} | [
"org.aopalliance.aop.Advice"
] | import org.aopalliance.aop.Advice; | import org.aopalliance.aop.*; | [
"org.aopalliance.aop"
] | org.aopalliance.aop; | 1,362,203 |
public void setCostAmt (BigDecimal CostAmt)
{
set_Value (COLUMNNAME_CostAmt, CostAmt);
} | void function (BigDecimal CostAmt) { set_Value (COLUMNNAME_CostAmt, CostAmt); } | /** Set Cost Value.
@param CostAmt
Value with Cost
*/ | Set Cost Value | setCostAmt | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_T_InventoryValue.java",
"license": "gpl-2.0",
"size": 13649
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,730,215 |
public List<AmqpTableEntry> getEntries(String key) {
if ((key == null) || (tableEntryArray == null)) {
return null;
}
List<AmqpTableEntry> entries = new ArrayList<AmqpTableEntry>();
for (AmqpTableEntry entry : tableEntryArray) {
if (entry.key.equals(k... | List<AmqpTableEntry> function(String key) { if ((key == null) (tableEntryArray == null)) { return null; } List<AmqpTableEntry> entries = new ArrayList<AmqpTableEntry>(); for (AmqpTableEntry entry : tableEntryArray) { if (entry.key.equals(key)) { entries.add(entry); } } return entries; } | /**
* Returns a list of AmqpTableEntry objects that matches the specified key.
* If a null key is passed in, then a null is returned. Also, if the internal
* structure is null, then a null is returned.
*
* @param key name of the entry
* @return List<AmqpTableEntry> object with matching... | Returns a list of AmqpTableEntry objects that matches the specified key. If a null key is passed in, then a null is returned. Also, if the internal structure is null, then a null is returned | getEntries | {
"repo_name": "michaelcretzman/java.client",
"path": "amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpArguments.java",
"license": "apache-2.0",
"size": 5404
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,054,861 |
private JTextField getLastUpdated() {
if (lastUpdated == null) {
lastUpdated = new JTextField();
lastUpdated.setEditable(false);
}
return lastUpdated;
} | JTextField function() { if (lastUpdated == null) { lastUpdated = new JTextField(); lastUpdated.setEditable(false); } return lastUpdated; } | /**
* This method initializes lastUpdated
*
* @return javax.swing.JTextField
*/ | This method initializes lastUpdated | getLastUpdated | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gts/LevelOfAssuranceWindow.java",
"license": "bsd-3-clause",
"size": 19111
} | [
"javax.swing.JTextField"
] | import javax.swing.JTextField; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 818,574 |
// singletons
install(new DefaultModule(PlaceManager.class));
// constants
bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.home);
bindConstant().annotatedWith(SecurityCookie.class).to(
AuthConstants.COOKIE_NAME);
// presenters
bindPresente... | install(new DefaultModule(PlaceManager.class)); bindConstant().annotatedWith(DefaultPlace.class).to(NameTokens.home); bindConstant().annotatedWith(SecurityCookie.class).to( AuthConstants.COOKIE_NAME); bindPresenter(MainPresenter.class, MainPresenter.MyView.class, MainView.class, MainPresenter.MyProxy.class); bindPresen... | /**
* Configures the presenters.
*/ | Configures the presenters | configure | {
"repo_name": "jeraymond/orber.io",
"path": "src/main/java/io/orber/site/web/gwt/client/gin/Module.java",
"license": "apache-2.0",
"size": 4875
} | [
"com.gwtplatform.dispatch.shared.SecurityCookie",
"com.gwtplatform.mvp.client.gin.DefaultModule",
"io.orber.site.web.gwt.client.NameTokens",
"io.orber.site.web.gwt.client.PlaceManager",
"io.orber.site.web.gwt.client.ui.presenter.BlogEntryEditorPresenter",
"io.orber.site.web.gwt.client.ui.presenter.BlogEnt... | import com.gwtplatform.dispatch.shared.SecurityCookie; import com.gwtplatform.mvp.client.gin.DefaultModule; import io.orber.site.web.gwt.client.NameTokens; import io.orber.site.web.gwt.client.PlaceManager; import io.orber.site.web.gwt.client.ui.presenter.BlogEntryEditorPresenter; import io.orber.site.web.gwt.client.ui.... | import com.gwtplatform.dispatch.shared.*; import com.gwtplatform.mvp.client.gin.*; import io.orber.site.web.gwt.client.*; import io.orber.site.web.gwt.client.ui.presenter.*; import io.orber.site.web.gwt.client.ui.view.*; import io.orber.site.web.gwt.shared.*; | [
"com.gwtplatform.dispatch",
"com.gwtplatform.mvp",
"io.orber.site"
] | com.gwtplatform.dispatch; com.gwtplatform.mvp; io.orber.site; | 161,967 |
synchronized static StorageManager getInstance(Context context) {
if (sSingleton == null) {
sSingleton = new StorageManager(context);
}
return sSingleton;
}
private StorageManager(Context context) { // constructor is private
mContext = context;
mDownloadD... | synchronized static StorageManager getInstance(Context context) { if (sSingleton == null) { sSingleton = new StorageManager(context); } return sSingleton; } private StorageManager(Context context) { mContext = context; mDownloadDataDir = context.getCacheDir(); mExternalStorageDir = Environment.getExternalStorageDirecto... | /**
* maintains Singleton instance of this class
*/ | maintains Singleton instance of this class | getInstance | {
"repo_name": "xjwangliang/android_source_note",
"path": "Download-Provider/DownloadProvider/src/com/android/providers/downloads/StorageManager.java",
"license": "apache-2.0",
"size": 20668
} | [
"android.content.Context",
"android.os.Environment"
] | import android.content.Context; import android.os.Environment; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 349,782 |
private Object getRowCell(String rowId, int colNumber, boolean select) {
if (colNumber == 0) {
// first column of row, add rowId
return rowId;
}
else {
// Create a checkbox
HtmlSelectBooleanCheckbox checkboxCell = new HtmlSelectBooleanCheckbox();
checkboxCell.setSelected(select);
//... | Object function(String rowId, int colNumber, boolean select) { if (colNumber == 0) { return rowId; } else { HtmlSelectBooleanCheckbox checkboxCell = new HtmlSelectBooleanCheckbox(); checkboxCell.setSelected(select); checkboxCell.setRendererType(STR); ValueBinding aRow = FacesContext.getCurrentInstance() .getApplication... | /**
* This returns the actual Faces component for each cell.
*
* @param rowId
* The String name for the row being constructed (to be put
* in column 0)
*
* @param colNumber
* Which column are we currently constructing
*
* @param select
* Wh... | This returns the actual Faces component for each cell | getRowCell | {
"repo_name": "harfalm/Sakai-10.1",
"path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podPermBean.java",
"license": "apache-2.0",
"size": 16922
} | [
"javax.faces.component.html.HtmlSelectBooleanCheckbox",
"javax.faces.context.FacesContext",
"javax.faces.el.ValueBinding"
] | import javax.faces.component.html.HtmlSelectBooleanCheckbox; import javax.faces.context.FacesContext; import javax.faces.el.ValueBinding; | import javax.faces.component.html.*; import javax.faces.context.*; import javax.faces.el.*; | [
"javax.faces"
] | javax.faces; | 2,820,478 |
@Override
public void closeCashDrawer(String campusCode) {
CashDrawer drawer = getByCampusCode(campusCode);
this.closeCashDrawer(drawer);
}
| void function(String campusCode) { CashDrawer drawer = getByCampusCode(campusCode); this.closeCashDrawer(drawer); } | /**
* Retrieves the CashDrawer associated with the campus code provided and sets the state of the drawer to closed.
*
* @param campusCode The code of the campus associated with the cash drawer being retrieved.
* @see org.kuali.kfs.fp.service.CashDrawerService#closeCashDrawer(java.lang.String)
... | Retrieves the CashDrawer associated with the campus code provided and sets the state of the drawer to closed | closeCashDrawer | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/fp/service/impl/CashDrawerServiceImpl.java",
"license": "agpl-3.0",
"size": 15206
} | [
"org.kuali.kfs.fp.businessobject.CashDrawer"
] | import org.kuali.kfs.fp.businessobject.CashDrawer; | import org.kuali.kfs.fp.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 635,792 |
public void setSubjectDN(
X509Name subject)
{
tbsGen.setSubject(subject);
} | void function( X509Name subject) { tbsGen.setSubject(subject); } | /**
* Set the subject distinguished name. The subject describes the entity associated with the public key.
*/ | Set the subject distinguished name. The subject describes the entity associated with the public key | setSubjectDN | {
"repo_name": "ripple/ripple-lib-java",
"path": "ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/x509/X509V3CertificateGenerator.java",
"license": "isc",
"size": 16143
} | [
"org.ripple.bouncycastle.asn1.x509.X509Name"
] | import org.ripple.bouncycastle.asn1.x509.X509Name; | import org.ripple.bouncycastle.asn1.x509.*; | [
"org.ripple.bouncycastle"
] | org.ripple.bouncycastle; | 2,676,393 |
public Builder setUsageOverride(@Nullable String usageOverride) {
this.usageOverride = usageOverride;
return this;
} | Builder function(@Nullable String usageOverride) { this.usageOverride = usageOverride; return this; } | /**
* Set the usage override string. <p>If null, then usage information will be generated automatically.</p>
*
* @param usageOverride The usage override
* @return The builder
*/ | Set the usage override string. If null, then usage information will be generated automatically | setUsageOverride | {
"repo_name": "TheE/Intake",
"path": "intake/src/main/java/com/sk89q/intake/ImmutableDescription.java",
"license": "lgpl-3.0",
"size": 6674
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 410,062 |
public static void refreshNodeStructure (TreeNode node) {
((DefaultTreeModel)tree.getModel()).nodeStructureChanged (node);
} | static void function (TreeNode node) { ((DefaultTreeModel)tree.getModel()).nodeStructureChanged (node); } | /**
* Refresh a single node.
*/ | Refresh a single node | refreshNodeStructure | {
"repo_name": "lsilvestre/Jogre",
"path": "server/src/org/jogre/server/administrator/AdminTreePanel.java",
"license": "gpl-2.0",
"size": 4186
} | [
"javax.swing.tree.DefaultTreeModel",
"javax.swing.tree.TreeNode"
] | import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeNode; | import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 717,623 |
public FormdataOperations getFormdataOperations() {
return new FormdataOperationsImpl(this.retrofitBuilder.client(clientBuilder.build()).build(), this);
}
public AutoRestSwaggerBATFormDataServiceImpl() {
this("http://localhost");
}
public AutoRestSwaggerBATFormDataService... | FormdataOperations function() { return new FormdataOperationsImpl(this.retrofitBuilder.client(clientBuilder.build()).build(), this); } public AutoRestSwaggerBATFormDataServiceImpl() { this("http: } public AutoRestSwaggerBATFormDataServiceImpl(String baseUrl) { super(); this.baseUrl = new AutoRestBaseUrl(baseUrl); initi... | /**
* Gets the FormdataOperations object to access its operations.
* @return the FormdataOperations object.
*/ | Gets the FormdataOperations object to access its operations | getFormdataOperations | {
"repo_name": "sharadagarwal/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyformdata/AutoRestSwaggerBATFormDataServiceImpl.java",
"license": "mit",
"size": 2533
} | [
"com.microsoft.rest.AutoRestBaseUrl"
] | import com.microsoft.rest.AutoRestBaseUrl; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,549,587 |
public void testPeek() {
LinkedBlockingDeque q = populatedDeque(SIZE);
for (int i = 0; i < SIZE; ++i) {
assertEquals(i, q.peek());
assertEquals(i, q.pollFirst());
assertTrue(q.peek() == null ||
!q.peek().equals(i));
}
assertN... | void function() { LinkedBlockingDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.peek()); assertEquals(i, q.pollFirst()); assertTrue(q.peek() == null !q.peek().equals(i)); } assertNull(q.peek()); } | /**
* peek returns next element, or null if empty
*/ | peek returns next element, or null if empty | testPeek | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java",
"license": "gpl-2.0",
"size": 60349
} | [
"java.util.concurrent.LinkedBlockingDeque"
] | import java.util.concurrent.LinkedBlockingDeque; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,288,734 |
Activity find(ActivityID id); | Activity find(ActivityID id); | /**
* Find the information of an activity
* @param id The identifier of the object to be searched
* @return Object with all the information or null if not exists.
*/ | Find the information of an activity | find | {
"repo_name": "UOC/PeLP",
"path": "src/main/java/edu/uoc/pelp/model/dao/IActivityDAO.java",
"license": "gpl-3.0",
"size": 4751
} | [
"edu.uoc.pelp.engine.activity.Activity",
"edu.uoc.pelp.engine.activity.ActivityID"
] | import edu.uoc.pelp.engine.activity.Activity; import edu.uoc.pelp.engine.activity.ActivityID; | import edu.uoc.pelp.engine.activity.*; | [
"edu.uoc.pelp"
] | edu.uoc.pelp; | 607,034 |
@Override
public GatewayGetIPsecParametersResponse getIPsecParametersV2(String gatewayId, String connectedentityId) throws IOException, ServiceException, ParserConfigurationException, SAXException {
// Validate
if (gatewayId == null) {
throw new NullPointerException("gatewayId");
... | GatewayGetIPsecParametersResponse function(String gatewayId, String connectedentityId) throws IOException, ServiceException, ParserConfigurationException, SAXException { if (gatewayId == null) { throw new NullPointerException(STR); } if (connectedentityId == null) { throw new NullPointerException(STR); } boolean should... | /**
* The Get IPsec Parameters V2 operation gets the IPsec parameters that have
* been set for the virtual network gateway connection
*
* @param gatewayId Required. The virtual network for this gateway Id.
* @param connectedentityId Required. The connected entity Id.
* @throws IOException Signa... | The Get IPsec Parameters V2 operation gets the IPsec parameters that have been set for the virtual network gateway connection | getIPsecParametersV2 | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-network/src/main/java/com/microsoft/windowsazure/management/network/GatewayOperationsImpl.java",
"license": "apache-2.0",
"size": 573643
} | [
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.network.models.GatewayGetIPsecParametersResponse",
"com.microsoft.windowsazure.management.network.models.IPsecParameters",
"com.microsoft.windowsazure.tracing.C... | import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.network.models.GatewayGetIPsecParametersResponse; import com.microsoft.windowsazure.management.network.models.IPsecParameters; import com.microsoft.windowsa... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.network.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import javax.xml.bind.*; import javax.xml.parsers.*; import org.w3c.dom.*; impo... | [
"com.microsoft.windowsazure",
"java.io",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 1,499,596 |
public static RenderScript create(Context ctx, ContextType ct) {
int v = ctx.getApplicationInfo().targetSdkVersion;
return create(ctx, v, ct);
} | static RenderScript function(Context ctx, ContextType ct) { int v = ctx.getApplicationInfo().targetSdkVersion; return create(ctx, v, ct); } | /**
* Create a RenderScript context.
*
* @hide
*
* @param ctx The context.
* @param ct The type of context to be created.
* @return RenderScript
*/ | Create a RenderScript context | create | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/support/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java",
"license": "gpl-3.0",
"size": 43056
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,854,242 |
private void validateRequest(LoginRequest request) throws InvalidLoginException {
if (request == null) {
throw new InvalidLoginException("Login Data is not valid.");
}
if (request.getUsername() == null || request.getUsername().getValue() == null) {
throw new InvalidL... | void function(LoginRequest request) throws InvalidLoginException { if (request == null) { throw new InvalidLoginException(STR); } if (request.getUsername() == null request.getUsername().getValue() == null) { throw new InvalidLoginException(STR); } if (request.getPassword() == null request.getPassword().getValue() == nu... | /**
* Validate the login request.
*
* @param request
* the JSON request
*
* @throws InvalidLoginException
* when the request parameter is not valid
*/ | Validate the login request | validateRequest | {
"repo_name": "NABUCCO/org.nabucco.framework.common.authorization",
"path": "org.nabucco.framework.common.authorization.ui.web/src/main/man/org/nabucco/framework/common/authorization/ui/web/AuthorizationLoginServlet.java",
"license": "epl-1.0",
"size": 8029
} | [
"org.nabucco.framework.base.facade.datatype.ui.login.LoginRequest",
"org.nabucco.framework.base.facade.exception.security.InvalidLoginException"
] | import org.nabucco.framework.base.facade.datatype.ui.login.LoginRequest; import org.nabucco.framework.base.facade.exception.security.InvalidLoginException; | import org.nabucco.framework.base.facade.datatype.ui.login.*; import org.nabucco.framework.base.facade.exception.security.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,686,396 |
@javax.annotation.Nullable
@ApiModelProperty(
value =
"matchExpressions is a list of label selector requirements. The requirements are ANDed.")
public List<V1ServiceMonitorSpecSelectorMatchExpressions> getMatchExpressions() {
return matchExpressions;
} | @javax.annotation.Nullable @ApiModelProperty( value = STR) List<V1ServiceMonitorSpecSelectorMatchExpressions> function() { return matchExpressions; } | /**
* matchExpressions is a list of label selector requirements. The requirements are ANDed.
*
* @return matchExpressions
*/ | matchExpressions is a list of label selector requirements. The requirements are ANDed | getMatchExpressions | {
"repo_name": "kubernetes-client/java",
"path": "client-java-contrib/prometheus-operator/src/main/java/com/coreos/monitoring/models/V1ThanosRulerSpecStorageVolumeClaimTemplateSpecSelector.java",
"license": "apache-2.0",
"size": 5600
} | [
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import io.swagger.annotations.ApiModelProperty; import java.util.List; | import io.swagger.annotations.*; import java.util.*; | [
"io.swagger.annotations",
"java.util"
] | io.swagger.annotations; java.util; | 1,538,765 |
public void getIndex(int[] val) {
if ( index == null ) {
index = (MFInt32)getField( "index" );
}
index.getValue( val );
} | void function(int[] val) { if ( index == null ) { index = (MFInt32)getField( "index" ); } index.getValue( val ); } | /** Return the index value in the argument int[]
* @param val The int[] to initialize. */ | Return the index value in the argument int[] | getIndex | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/rendering/SAIIndexedTriangleSet.java",
"license": "gpl-2.0",
"size": 8912
} | [
"org.web3d.x3d.sai.MFInt32"
] | import org.web3d.x3d.sai.MFInt32; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 1,261,896 |
public V1Status deleteNamespacedRole(
String name,
String namespace,
String pretty,
String dryRun,
Integer gracePeriodSeconds,
Boolean orphanDependents,
String propagationPolicy,
V1DeleteOptions body)
throws ApiException {
ApiResponse<V1Status> localVarResp =
... | V1Status function( String name, String namespace, String pretty, String dryRun, Integer gracePeriodSeconds, Boolean orphanDependents, String propagationPolicy, V1DeleteOptions body) throws ApiException { ApiResponse<V1Status> localVarResp = deleteNamespacedRoleWithHttpInfo( name, namespace, pretty, dryRun, gracePeriodS... | /**
* delete a Role
*
* @param name name of the Role (required)
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param dryRun When present, indicates that modifications should no... | delete a Role | deleteNamespacedRole | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/RbacAuthorizationV1Api.java",
"license": "apache-2.0",
"size": 563123
} | [
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.ApiResponse",
"io.kubernetes.client.openapi.models.V1DeleteOptions",
"io.kubernetes.client.openapi.models.V1Status"
] | import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.ApiResponse; import io.kubernetes.client.openapi.models.V1DeleteOptions; import io.kubernetes.client.openapi.models.V1Status; | import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; | [
"io.kubernetes.client"
] | io.kubernetes.client; | 2,509,457 |
@MXBeanDescription("Threads priority.")
public int getThreadPriority(); | @MXBeanDescription(STR) int function(); | /**
* Gets thread priority. All threads within SPI will be started with it.
*
* @return Thread priority.
*/ | Gets thread priority. All threads within SPI will be started with it | getThreadPriority | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java",
"license": "apache-2.0",
"size": 8612
} | [
"org.apache.ignite.mxbean.MXBeanDescription"
] | import org.apache.ignite.mxbean.MXBeanDescription; | import org.apache.ignite.mxbean.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 443,060 |
public DatabaseReference getRatSpotting(String ratID) {
Log.d(LOG_ID, "Querying Firebase to look for ratspotting with id: " + ratID);
return mDatabase.child(ratID);
} | DatabaseReference function(String ratID) { Log.d(LOG_ID, STR + ratID); return mDatabase.child(ratID); } | /**
* getRatSpotting - obtains a ratspotting based on a unique ID
* @param ratID the unique ID of the ratspotting we are looking for
* @return the database reference to the rat spotting we are looking for
*/ | getRatSpotting - obtains a ratspotting based on a unique ID | getRatSpotting | {
"repo_name": "Zighome24/CS2340_GoGreek",
"path": "app/RatTracker2k17/app/src/main/java/edu/gatech/cs2340/rattracker2k17/Service/RatSpottingBL.java",
"license": "mit",
"size": 5734
} | [
"android.util.Log",
"com.google.firebase.database.DatabaseReference"
] | import android.util.Log; import com.google.firebase.database.DatabaseReference; | import android.util.*; import com.google.firebase.database.*; | [
"android.util",
"com.google.firebase"
] | android.util; com.google.firebase; | 2,112,361 |
public static LinkDescription descriptionOf(
ConnectPoint src, ConnectPoint dst, BasicLinkConfig link) {
checkNotNull(src, "Must supply a source endpoint");
checkNotNull(dst, "Must supply a destination endpoint");
checkNotNull(link, "Must supply a link config");
// On... | static LinkDescription function( ConnectPoint src, ConnectPoint dst, BasicLinkConfig link) { checkNotNull(src, STR); checkNotNull(dst, STR); checkNotNull(link, STR); boolean expected = link.isAllowed(); return new DefaultLinkDescription( src, dst, link.type(), expected, combine(link, DefaultAnnotations.EMPTY)); } | /**
* Generates a link description from a link config entity. This is for
* links that cannot be discovered and has to be injected. The endpoints
* must be specified to indicate directionality.
*
* @param src the source ConnectPoint
* @param dst the destination ConnectPoint
* @param l... | Generates a link description from a link config entity. This is for links that cannot be discovered and has to be injected. The endpoints must be specified to indicate directionality | descriptionOf | {
"repo_name": "gkatsikas/onos",
"path": "core/net/src/main/java/org/onosproject/net/link/impl/BasicLinkOperator.java",
"license": "apache-2.0",
"size": 6820
} | [
"com.google.common.base.Preconditions",
"org.onosproject.net.ConnectPoint",
"org.onosproject.net.DefaultAnnotations",
"org.onosproject.net.config.basics.BasicLinkConfig",
"org.onosproject.net.link.DefaultLinkDescription",
"org.onosproject.net.link.LinkDescription"
] | import com.google.common.base.Preconditions; import org.onosproject.net.ConnectPoint; import org.onosproject.net.DefaultAnnotations; import org.onosproject.net.config.basics.BasicLinkConfig; import org.onosproject.net.link.DefaultLinkDescription; import org.onosproject.net.link.LinkDescription; | import com.google.common.base.*; import org.onosproject.net.*; import org.onosproject.net.config.basics.*; import org.onosproject.net.link.*; | [
"com.google.common",
"org.onosproject.net"
] | com.google.common; org.onosproject.net; | 546,039 |
@JsonView(Views.Detail.class)
public String getCity() {
return city;
} | @JsonView(Views.Detail.class) String function() { return city; } | /**
* Returns the city.
*
* @return
*/ | Returns the city | getCity | {
"repo_name": "redlion99/akstore",
"path": "akstore-server/akstore-common/src/main/java/me/smartco/akstore/common/model/Address.java",
"license": "apache-2.0",
"size": 1785
} | [
"com.fasterxml.jackson.annotation.JsonView"
] | import com.fasterxml.jackson.annotation.JsonView; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,016,257 |
protected void generateFASTA(String directory, String outputFileName, String dnaSequence) throws IOException{
String fasta = ">\n"+dnaSequence+"\n";
TextFile.write(directory, outputFileName, fasta);
} | void function(String directory, String outputFileName, String dnaSequence) throws IOException{ String fasta = ">\n"+dnaSequence+"\n"; TextFile.write(directory, outputFileName, fasta); } | /**
* Method for generating and printing a FASTA file from a given DNA sequence.
*
* @param directory The directory to which the file will be printed
* @param outputFileName The desired file to be produced, ensure it ends with .fasta
* @param dnaSequence The desired sequence to made into a .fasta file
* ... | Method for generating and printing a FASTA file from a given DNA sequence | generateFASTA | {
"repo_name": "CIDARLAB/magelet",
"path": "src/magelets/Magelet.java",
"license": "bsd-3-clause",
"size": 5977
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,060,386 |
private static boolean hasParentInList(ReportBean reportBean, Map<Integer, ReportBean> reportBeansMap) {
Integer parentID = reportBean.getWorkItemBean().getSuperiorworkitem();
if (parentID==null) {
return false;
}
return reportBeansMap.containsKey(parentID);
} | static boolean function(ReportBean reportBean, Map<Integer, ReportBean> reportBeansMap) { Integer parentID = reportBean.getWorkItemBean().getSuperiorworkitem(); if (parentID==null) { return false; } return reportBeansMap.containsKey(parentID); } | /**
* Check if the item has a parent in the hashtable
* @param reportBean
* @return
*/ | Check if the item has a parent in the hashtable | hasParentInList | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/report/execute/ReportBeansBL.java",
"license": "gpl-3.0",
"size": 17140
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 44,027 |
public Map<String, String> cookies();
} | Map<String, String> function(); } | /**
* Retrieve all of the request/response cookies as a map
* @return cookies
*/ | Retrieve all of the request/response cookies as a map | cookies | {
"repo_name": "jgimenez/factura-simyo",
"path": "src/org/jsoup/Connection.java",
"license": "apache-2.0",
"size": 14278
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,194,189 |
public static Schema getClassSchema() {
return schema$;
}
public static final class Options {
public static final String RESOURCE_GROUP = "resource_group";
public static final String DEFAULT_SCHEMA = "default_schema";
public static final S... | static Schema function() { return schema$; } public static final class Options { public static final String RESOURCE_GROUP = STR; public static final String DEFAULT_SCHEMA = STR; public static final String CREATE_HOME_DIRECTORY = STR; public static final String TRUE = "true"; public static final String FALSE = "false";... | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @return the schema for the class.
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | getClassSchema | {
"repo_name": "kineticadb/kinetica-api-java",
"path": "api/src/main/java/com/gpudb/protocol/CreateUserInternalRequest.java",
"license": "mit",
"size": 13837
} | [
"java.util.LinkedHashMap",
"java.util.Map",
"org.apache.avro.Schema"
] | import java.util.LinkedHashMap; import java.util.Map; import org.apache.avro.Schema; | import java.util.*; import org.apache.avro.*; | [
"java.util",
"org.apache.avro"
] | java.util; org.apache.avro; | 301,348 |
public void zoom(final double xmin, final double xmax, final double ymin, final double ymax) {
this.m_zoomArea = null;
IAxis<?> axisX = this.getAxisX();
IRangePolicy zoomPolicyX = new RangePolicyFixedViewport(new Range(xmin, xmax));
axisX.setRangePolicy(zoomPolicyX);
IAxis<?> axisY = this.getAx... | void function(final double xmin, final double xmax, final double ymin, final double ymax) { this.m_zoomArea = null; IAxis<?> axisX = this.getAxisX(); IRangePolicy zoomPolicyX = new RangePolicyFixedViewport(new Range(xmin, xmax)); axisX.setRangePolicy(zoomPolicyX); IAxis<?> axisY = this.getAxisY(); IRangePolicy zoomPoli... | /**
* Zooms to the selected bounds in both directions.
* <p>
*
* @param xmin
* the lower x bound (value of chart (vs. pixel of screen)).
*
* @param xmax
* the upper x bound (value of chart (vs. pixel of screen)).
*
* @param ymin
* the lower y bound (value o... | Zooms to the selected bounds in both directions. | zoom | {
"repo_name": "cheshirekow/codebase",
"path": "third_party/lcm/lcm-java/jchart2d-code/src/info/monitorenter/gui/chart/ZoomableChart.java",
"license": "gpl-3.0",
"size": 10007
} | [
"info.monitorenter.gui.chart.rangepolicies.RangePolicyFixedViewport",
"info.monitorenter.util.Range"
] | import info.monitorenter.gui.chart.rangepolicies.RangePolicyFixedViewport; import info.monitorenter.util.Range; | import info.monitorenter.gui.chart.rangepolicies.*; import info.monitorenter.util.*; | [
"info.monitorenter.gui",
"info.monitorenter.util"
] | info.monitorenter.gui; info.monitorenter.util; | 420,631 |
private TemporalEdge createEdge(String label, Identifiable source, Identifiable target, long txFrom,
long txTo, long validFrom, long validTo) {
TemporalEdge edge = getConfig().getTemporalGraphFactory().getEdgeFactory()
.createEdge(source.getId(), target.getId());
edge.s... | TemporalEdge function(String label, Identifiable source, Identifiable target, long txFrom, long txTo, long validFrom, long validTo) { TemporalEdge edge = getConfig().getTemporalGraphFactory().getEdgeFactory() .createEdge(source.getId(), target.getId()); edge.setLabel(label); edge.setTransactionTime(Tuple2.of(txFrom, tx... | /**
* Create a temporal edge with temporal attributes set.
*
* @param label The label of the edge.
* @param source The element used as a source for the edge.
* @param target The element used as a target for the edge.
* @param txFrom The start of the transaction time.
* @param txTo ... | Create a temporal edge with temporal attributes set | createEdge | {
"repo_name": "galpha/gradoop",
"path": "gradoop-temporal/src/test/java/org/gradoop/temporal/util/TemporalGradoopTestBase.java",
"license": "apache-2.0",
"size": 17929
} | [
"org.apache.flink.api.java.tuple.Tuple2",
"org.gradoop.common.model.api.entities.Identifiable",
"org.gradoop.temporal.model.impl.pojo.TemporalEdge"
] | import org.apache.flink.api.java.tuple.Tuple2; import org.gradoop.common.model.api.entities.Identifiable; import org.gradoop.temporal.model.impl.pojo.TemporalEdge; | import org.apache.flink.api.java.tuple.*; import org.gradoop.common.model.api.entities.*; import org.gradoop.temporal.model.impl.pojo.*; | [
"org.apache.flink",
"org.gradoop.common",
"org.gradoop.temporal"
] | org.apache.flink; org.gradoop.common; org.gradoop.temporal; | 808,698 |
public Subject newSubject(final String nameIdFormat, final String nameIdValue,
final String recipient, final ZonedDateTime notOnOrAfter,
final String inResponseTo) {
LOGGER.debug("Building subject for NameID [{}]/[{}] and recipient [{}], in respon... | Subject function(final String nameIdFormat, final String nameIdValue, final String recipient, final ZonedDateTime notOnOrAfter, final String inResponseTo) { LOGGER.debug(STR, nameIdValue, nameIdFormat, recipient, inResponseTo); final SubjectConfirmation confirmation = newSamlObject(SubjectConfirmation.class); confirmat... | /**
* New subject element.
*
* @param nameIdFormat the name id format
* @param nameIdValue the name id value
* @param recipient the recipient
* @param notOnOrAfter the not on or after
* @param inResponseTo the in response to
* @return the subject
*/ | New subject element | newSubject | {
"repo_name": "pmarasse/cas",
"path": "support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/util/AbstractSaml20ObjectBuilder.java",
"license": "apache-2.0",
"size": 16781
} | [
"java.time.ZonedDateTime",
"org.apache.commons.lang3.StringUtils",
"org.apereo.cas.util.DateTimeUtils",
"org.apereo.cas.util.InetAddressUtils",
"org.opensaml.saml.saml2.core.Subject",
"org.opensaml.saml.saml2.core.SubjectConfirmation",
"org.opensaml.saml.saml2.core.SubjectConfirmationData"
] | import java.time.ZonedDateTime; import org.apache.commons.lang3.StringUtils; import org.apereo.cas.util.DateTimeUtils; import org.apereo.cas.util.InetAddressUtils; import org.opensaml.saml.saml2.core.Subject; import org.opensaml.saml.saml2.core.SubjectConfirmation; import org.opensaml.saml.saml2.core.SubjectConfirmatio... | import java.time.*; import org.apache.commons.lang3.*; import org.apereo.cas.util.*; import org.opensaml.saml.saml2.core.*; | [
"java.time",
"org.apache.commons",
"org.apereo.cas",
"org.opensaml.saml"
] | java.time; org.apache.commons; org.apereo.cas; org.opensaml.saml; | 505,140 |
public Boolean removeServiceProvider(
String authToken,
String serviceProviderUUID)
throws SemanticRegistryMalformedInputException,
SemanticRegistryAuthException,
SemanticRegistryCommunicationException,
SemanticRegistryException
{
// Remove leading and trailing whitespaces from values to be ... | Boolean function( String authToken, String serviceProviderUUID) throws SemanticRegistryMalformedInputException, SemanticRegistryAuthException, SemanticRegistryCommunicationException, SemanticRegistryException { authToken = authToken.trim(); serviceProviderUUID = serviceProviderUUID.trim(); if (InputValidator.isAuthenti... | /**
* Deletes a Service Provider record from the UDDI server. In UDDI, a
* Service Provider is represented as a businessEntity element. Before
* proceeding, the values of all provided input parameters are validated.
*
* @param authToken
* @param serviceProviderUUID
* @return
* @throws SemanticRegistryM... | Deletes a Service Provider record from the UDDI server. In UDDI, a Service Provider is represented as a businessEntity element. Before proceeding, the values of all provided input parameters are validated | removeServiceProvider | {
"repo_name": "dkourtesis/fusion-semantic-registry",
"path": "src/org/seerc/fusion/sr/core/PublicationHandler.java",
"license": "apache-2.0",
"size": 130142
} | [
"java.util.Vector",
"org.seerc.fusion.sr.exceptions.SemanticRegistryAuthException",
"org.seerc.fusion.sr.exceptions.SemanticRegistryCommunicationException",
"org.seerc.fusion.sr.exceptions.SemanticRegistryException",
"org.seerc.fusion.sr.exceptions.SemanticRegistryMalformedInputException",
"org.uddi4j.UDD... | import java.util.Vector; import org.seerc.fusion.sr.exceptions.SemanticRegistryAuthException; import org.seerc.fusion.sr.exceptions.SemanticRegistryCommunicationException; import org.seerc.fusion.sr.exceptions.SemanticRegistryException; import org.seerc.fusion.sr.exceptions.SemanticRegistryMalformedInputException; impo... | import java.util.*; import org.seerc.fusion.sr.exceptions.*; import org.uddi4j.*; import org.uddi4j.response.*; import org.uddi4j.transport.*; | [
"java.util",
"org.seerc.fusion",
"org.uddi4j",
"org.uddi4j.response",
"org.uddi4j.transport"
] | java.util; org.seerc.fusion; org.uddi4j; org.uddi4j.response; org.uddi4j.transport; | 597,041 |
@Override
public void onAction(final Player player, final RPAction action) {
ActionData data = new ActionData();
if (!VALIDATION.validateAndInformPlayer(player, action, data)) {
return;
}
Entity entity = data.getEntity();
if (entity != null) {
String name = entity.get(TYPE);
if (entity.has(NAM... | void function(final Player player, final RPAction action) { ActionData data = new ActionData(); if (!VALIDATION.validateAndInformPlayer(player, action, data)) { return; } Entity entity = data.getEntity(); if (entity != null) { String name = entity.get(TYPE); if (entity.has(NAME)) { name = entity.get(NAME); } new GameEv... | /**
* processes the requested action.
*
* @param player the caller of the action
* @param action the action to be performed
*/ | processes the requested action | onAction | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "src/games/stendhal/server/actions/query/LookAction.java",
"license": "gpl-2.0",
"size": 3092
} | [
"games.stendhal.common.NotificationType",
"games.stendhal.common.constants.Actions",
"games.stendhal.server.actions.validator.ActionData",
"games.stendhal.server.core.engine.GameEvent",
"games.stendhal.server.entity.Entity",
"games.stendhal.server.entity.player.Player"
] | import games.stendhal.common.NotificationType; import games.stendhal.common.constants.Actions; import games.stendhal.server.actions.validator.ActionData; import games.stendhal.server.core.engine.GameEvent; import games.stendhal.server.entity.Entity; import games.stendhal.server.entity.player.Player; | import games.stendhal.common.*; import games.stendhal.common.constants.*; import games.stendhal.server.actions.validator.*; import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.*; import games.stendhal.server.entity.player.*; | [
"games.stendhal.common",
"games.stendhal.server"
] | games.stendhal.common; games.stendhal.server; | 2,269,687 |
@EventHandler
public void init(FMLInitializationEvent event) {
proxy.initRenderHandlersAndIDs();
BiomeGenTropicraft.registerBiomes();
TCEntityRegistry.init();
proxy.initRenderRegistry();
MinecraftForge.EVENT_BUS.register(new TCBlockEvents());
MinecraftForge.EVENT_BUS.register(new TCItemEvents());
T... | void function(FMLInitializationEvent event) { proxy.initRenderHandlersAndIDs(); BiomeGenTropicraft.registerBiomes(); TCEntityRegistry.init(); proxy.initRenderRegistry(); MinecraftForge.EVENT_BUS.register(new TCBlockEvents()); MinecraftForge.EVENT_BUS.register(new TCItemEvents()); TCMiscEvents misc = new TCMiscEvents();... | /**
* Called on initialization
* @param event
*/ | Called on initialization | init | {
"repo_name": "cbaakman/Tropicraft",
"path": "src/main/java/net/tropicraft/Tropicraft.java",
"license": "mpl-2.0",
"size": 4393
} | [
"net.minecraftforge.common.MinecraftForge",
"net.tropicraft.event.TCBlockEvents",
"net.tropicraft.event.TCItemEvents",
"net.tropicraft.event.TCMiscEvents",
"net.tropicraft.registry.TCEntityRegistry",
"net.tropicraft.util.TropicraftWorldUtils",
"net.tropicraft.world.TCWorldGenerator",
"net.tropicraft.w... | import net.minecraftforge.common.MinecraftForge; import net.tropicraft.event.TCBlockEvents; import net.tropicraft.event.TCItemEvents; import net.tropicraft.event.TCMiscEvents; import net.tropicraft.registry.TCEntityRegistry; import net.tropicraft.util.TropicraftWorldUtils; import net.tropicraft.world.TCWorldGenerator; ... | import net.minecraftforge.common.*; import net.tropicraft.event.*; import net.tropicraft.registry.*; import net.tropicraft.util.*; import net.tropicraft.world.*; import net.tropicraft.world.biomes.*; | [
"net.minecraftforge.common",
"net.tropicraft.event",
"net.tropicraft.registry",
"net.tropicraft.util",
"net.tropicraft.world"
] | net.minecraftforge.common; net.tropicraft.event; net.tropicraft.registry; net.tropicraft.util; net.tropicraft.world; | 1,757,393 |
public static List<String> sendShell(String command, Result result)
throws IOException, InterruptedException, RootToolsException {
return sendShell(new String[] { command }, 0, result );
} | static List<String> function(String command, Result result) throws IOException, InterruptedException, RootToolsException { return sendShell(new String[] { command }, 0, result ); } | /**
* Sends one shell command as su (attempts to)
*
* @param command command to send to the shell
*
* @param result injected result object that implements the Result class
*
* @return a <code>LinkedList</code> containing each line that was returned
* ... | Sends one shell command as su (attempts to) | sendShell | {
"repo_name": "universsky/diddler",
"path": "src/com/stericson/RootTools/RootTools.java",
"license": "lgpl-3.0",
"size": 17559
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,169,710 |
private static List<Object> buildPayloadData(Request request, Response response, long startTime,
long responseTime) {
List<Object> payload = new ArrayList<>();
final String forwardSlash = "/";
Optional.ofNullable(request.getRequestURI()).map(String::trim).ifPresent(requestedURI ... | static List<Object> function(Request request, Response response, long startTime, long responseTime) { List<Object> payload = new ArrayList<>(); final String forwardSlash = "/"; Optional.ofNullable(request.getRequestURI()).map(String::trim).ifPresent(requestedURI -> { String[] requestedUriParts = requestedURI.split(forw... | /**
* Creates the payload.
*
* @param request the Request object of client
* @param response the Response object of client
* @param startTime the time at which the valve is invoked
* @param responseTime the time that is taken for the client to receive a response
* @return ... | Creates the payload | buildPayloadData | {
"repo_name": "manoj-kumara/product-as",
"path": "modules/http-statistics-monitoring/src/main/java/org/wso2/appserver/monitoring/utils/EventBuilder.java",
"license": "apache-2.0",
"size": 8979
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Optional",
"org.apache.catalina.connector.Request",
"org.apache.catalina.connector.Response",
"org.wso2.appserver.monitoring.Constants"
] | import java.util.ArrayList; import java.util.List; import java.util.Optional; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.wso2.appserver.monitoring.Constants; | import java.util.*; import org.apache.catalina.connector.*; import org.wso2.appserver.monitoring.*; | [
"java.util",
"org.apache.catalina",
"org.wso2.appserver"
] | java.util; org.apache.catalina; org.wso2.appserver; | 602,598 |
public List<Map.Entry<String, Integer>> getFirstNameFrequencyList()
{
return new ArrayList(firstNameFrequency.entrySet());
} | List<Map.Entry<String, Integer>> function() { return new ArrayList(firstNameFrequency.entrySet()); } | /**
* Returns a list of first names to the number of occurences (frequency) of that name.
* <p>
* These values are first put into a {@link LinkedHashMap} then converted into a {@link List} of {@link Map.Entry}.
* This is to allow use in PrimeFaces' datatable JSF element.
*
* @return a list... | Returns a list of first names to the number of occurences (frequency) of that name. These values are first put into a <code>LinkedHashMap</code> then converted into a <code>List</code> of <code>Map.Entry</code>. This is to allow use in PrimeFaces' datatable JSF element | getFirstNameFrequencyList | {
"repo_name": "hendrixjoseph/FamilyTree",
"path": "src/main/java/edu/wright/hendrix11/familyTree/bean/mining/NamesBean.java",
"license": "mit",
"size": 2616
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import java.util.ArrayList; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,613,452 |
public void setAccount (MAccount acct)
{
m_account = acct;
} // setAccount
| void function (MAccount acct) { m_account = acct; } | /**************************************************************************
* Set GL Journal Account
* @param acct account
*/ | Set GL Journal Account | setAccount | {
"repo_name": "erpcya/adempierePOS",
"path": "base/src/org/compiere/acct/DocLine.java",
"license": "gpl-2.0",
"size": 28977
} | [
"org.compiere.model.MAccount"
] | import org.compiere.model.MAccount; | import org.compiere.model.*; | [
"org.compiere.model"
] | org.compiere.model; | 2,258,414 |
public static String md5Hex(InputStream data) throws IOException {
return Hex.encodeHexString(md5(data));
} | static String function(InputStream data) throws IOException { return Hex.encodeHexString(md5(data)); } | /**
* Calculates the MD5 digest and returns the value as a 32 character hex string.
*
* @param data
* Data to digest
* @return MD5 digest as a hex string
* @throws IOException
* On error reading from the stream
* @since 1.4
*/ | Calculates the MD5 digest and returns the value as a 32 character hex string | md5Hex | {
"repo_name": "mcomella/FirefoxAccounts-android",
"path": "thirdparty/src/main/java/org/mozilla/apache/commons/codec/digest/DigestUtils.java",
"license": "mpl-2.0",
"size": 17367
} | [
"java.io.IOException",
"java.io.InputStream",
"org.mozilla.apache.commons.codec.binary.Hex"
] | import java.io.IOException; import java.io.InputStream; import org.mozilla.apache.commons.codec.binary.Hex; | import java.io.*; import org.mozilla.apache.commons.codec.binary.*; | [
"java.io",
"org.mozilla.apache"
] | java.io; org.mozilla.apache; | 1,664,423 |
public boolean isAcceptable(Dictionary conf) {
try {
checkAcceptability(conf);
} catch (MissingHandlerException e) {
return false;
} catch (UnacceptableConfiguration e) {
return false;
}
return true;
}
| boolean function(Dictionary conf) { try { checkAcceptability(conf); } catch (MissingHandlerException e) { return false; } catch (UnacceptableConfiguration e) { return false; } return true; } | /**
* Checks if the configuration is acceptable.
* @param conf the configuration to test.
* @return <code>true</code> if the configuration is acceptable.
* @see org.apache.felix.ipojo.Factory#isAcceptable(java.util.Dictionary)
*/ | Checks if the configuration is acceptable | isAcceptable | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/IPojoFactory.java",
"license": "apache-2.0",
"size": 39355
} | [
"java.util.Dictionary"
] | import java.util.Dictionary; | import java.util.*; | [
"java.util"
] | java.util; | 2,101,452 |
// START SNIPPET: e2
public String slip(String body, @ExchangeProperties Map<String, Object> properties) {
bodies.add(body);
// get the state from the exchange properties and keep track how many
// times
// we have been invoked
int invoked = 0;
Object current = ... | String function(String body, @ExchangeProperties Map<String, Object> properties) { bodies.add(body); int invoked = 0; Object current = properties.get(STR); if (current != null) { invoked = Integer.valueOf(current.toString()); } invoked++; properties.put(STR, invoked); if (invoked == 1) { return STR; } else if (invoked ... | /**
* Use this method to compute dynamic where we should route next.
*
* @param body the message body
* @param properties the exchange properties where we can store state
* between invocations
* @return endpoints to go, or <tt>null</tt> to indicate the end
*/ | Use this method to compute dynamic where we should route next | slip | {
"repo_name": "objectiser/camel",
"path": "core/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangePropertiesTest.java",
"license": "apache-2.0",
"size": 4162
} | [
"java.util.Map",
"org.apache.camel.ExchangeProperties"
] | import java.util.Map; import org.apache.camel.ExchangeProperties; | import java.util.*; import org.apache.camel.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 2,565,240 |
@ApiModelProperty(example = "null", value = "")
public List<String> getAccessControlAllowMethods() {
return accessControlAllowMethods;
} | @ApiModelProperty(example = "null", value = "") List<String> function() { return accessControlAllowMethods; } | /**
* Get accessControlAllowMethods
* @return accessControlAllowMethods
**/ | Get accessControlAllowMethods | getAccessControlAllowMethods | {
"repo_name": "abimarank/product-apim",
"path": "integration-tests/src/main/java/org/wso2/carbon/apimgt/rest/integration/tests/model/APICorsConfiguration.java",
"license": "apache-2.0",
"size": 7272
} | [
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import io.swagger.annotations.ApiModelProperty; import java.util.List; | import io.swagger.annotations.*; import java.util.*; | [
"io.swagger.annotations",
"java.util"
] | io.swagger.annotations; java.util; | 1,285,894 |
public List<UIComponent> resolve(UIComponent component, List<UIComponent> parentComponents, String currentId,
String originalExpression, String[] parameters) {
List<UIComponent> result = new ArrayList<UIComponent>();
for (UIComponent parent : parentComponents) {
UIComponent grandparent = component.getParent... | List<UIComponent> function(UIComponent component, List<UIComponent> parentComponents, String currentId, String originalExpression, String[] parameters) { List<UIComponent> result = new ArrayList<UIComponent>(); for (UIComponent parent : parentComponents) { UIComponent grandparent = component.getParent(); for (int i = 0... | /**
* Collects every JSF node following the current JSF node within the same branch of the tree.
* It's like "@next @next:@next @next:@next:@next ...".
*/ | Collects every JSF node following the current JSF node within the same branch of the tree. It's like "@next @next:@next @next:@next:@next ..." | resolve | {
"repo_name": "chongma/BootsFaces-OSP",
"path": "src/main/java/net/bootsfaces/expressions/AfterExpressionResolver.java",
"license": "apache-2.0",
"size": 1300
} | [
"java.util.ArrayList",
"java.util.List",
"javax.faces.FacesException",
"javax.faces.component.UIComponent"
] | import java.util.ArrayList; import java.util.List; import javax.faces.FacesException; import javax.faces.component.UIComponent; | import java.util.*; import javax.faces.*; import javax.faces.component.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 610,069 |
protected static JDialog waitJDialog(WindowOperator owner, ComponentChooser chooser, int index) {
return (waitJDialog((Window) owner.getSource(),
chooser, index,
owner.getTimeouts(), owner.getOutput()));
} | static JDialog function(WindowOperator owner, ComponentChooser chooser, int index) { return (waitJDialog((Window) owner.getSource(), chooser, index, owner.getTimeouts(), owner.getOutput())); } | /**
* A method to be used from subclasses. Uses {@code owner}'s timeouts
* and output during the waiting.
*
* @param owner a window - dialog owner.
* @param chooser org.netbeans.jemmy.ComponentChooser implementation.
* @param index Ordinal component index.
* @return Component instance... | A method to be used from subclasses. Uses owner's timeouts and output during the waiting | waitJDialog | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/sanity/client/lib/jemmy/src/org/netbeans/jemmy/operators/JDialogOperator.java",
"license": "gpl-2.0",
"size": 25873
} | [
"java.awt.Window",
"javax.swing.JDialog",
"org.netbeans.jemmy.ComponentChooser"
] | import java.awt.Window; import javax.swing.JDialog; import org.netbeans.jemmy.ComponentChooser; | import java.awt.*; import javax.swing.*; import org.netbeans.jemmy.*; | [
"java.awt",
"javax.swing",
"org.netbeans.jemmy"
] | java.awt; javax.swing; org.netbeans.jemmy; | 985,225 |
public static TreeMap<String,File> getMapOfFilesInDirectory
(String directory,
List<String> domains,
final String extension,
boolean dropExtension) {
TreeMap<String,File> result = new TreeMap<String,File>();
List<File> files = getFilesInDirectory(directory,extension);
Iterator<F... | static TreeMap<String,File> function (String directory, List<String> domains, final String extension, boolean dropExtension) { TreeMap<String,File> result = new TreeMap<String,File>(); List<File> files = getFilesInDirectory(directory,extension); Iterator<File> it = files.iterator(); while (it.hasNext()) { File f = it.n... | /**
* Create a map of files in the directory, where the
* key is the name of the file and the value is the File.
* @param directory - where to start the loading
* @param extension - what file extension to look for
* @param dropExtension - true if you want the key to not use the file extension
*... | Create a map of files in the directory, where the key is the name of the file and the value is the File | getMapOfFilesInDirectory | {
"repo_name": "OCMC-Translation-Projects/ioc-liturgical-ws",
"path": "src/main/java/net/ages/alwb/gateway/utils/CommonFileUtils.java",
"license": "epl-1.0",
"size": 18105
} | [
"java.io.File",
"java.util.Iterator",
"java.util.List",
"java.util.TreeMap"
] | import java.io.File; import java.util.Iterator; import java.util.List; import java.util.TreeMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,431,485 |
@FIXVersion(introduced = "4.2", retired = "4.3")
@TagNumRef(tagNum = TagNum.EncodedIssuer)
public byte[] getEncodedIssuer() {
return getSafeInstrument().getEncodedIssuer();
} | @FIXVersion(introduced = "4.2", retired = "4.3") @TagNumRef(tagNum = TagNum.EncodedIssuer) byte[] function() { return getSafeInstrument().getEncodedIssuer(); } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getEncodedIssuer | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/OrderModificationRequestMsg.java",
"license": "gpl-3.0",
"size": 149491
} | [
"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,390,178 |
return name;
}
public static class Page extends PagedResources<MetricResource> {
} | return name; } public static class Page extends PagedResources<MetricResource> { } | /**
* Return the name of the metric.
*/ | Return the name of the metric | getName | {
"repo_name": "Sbodiu-pivotal/spring-cloud-data",
"path": "spring-cloud-data-rest-resource/src/main/java/org/springframework/cloud/data/rest/resource/MetricResource.java",
"license": "apache-2.0",
"size": 1435
} | [
"org.springframework.hateoas.PagedResources"
] | import org.springframework.hateoas.PagedResources; | import org.springframework.hateoas.*; | [
"org.springframework.hateoas"
] | org.springframework.hateoas; | 2,827,607 |
public String toHtmlTable(HttpServletRequest request, SessionContext context, Collection distPrefs, boolean addButton) {
String title = MSG.sectionTitleDistributionPreferences();
String backType = request.getParameter("backType");
String backId = request.getParameter("backId");
String ... | String function(HttpServletRequest request, SessionContext context, Collection distPrefs, boolean addButton) { String title = MSG.sectionTitleDistributionPreferences(); String backType = request.getParameter(STR); String backId = request.getParameter(STR); String instructorFormat = UserProperty.NameFormat.get(context.g... | /**
* Build a html table with the list representing distribution prefs
* @param distPrefs
* @param ordCol
* @param editable
* @return
*/ | Build a html table with the list representing distribution prefs | toHtmlTable | {
"repo_name": "nikeshmhr/unitime",
"path": "JavaSource/org/unitime/timetable/webutil/DistributionPrefsTableBuilder.java",
"license": "apache-2.0",
"size": 18471
} | [
"java.util.Collection",
"java.util.Iterator",
"javax.servlet.http.HttpServletRequest",
"org.unitime.commons.web.WebTable",
"org.unitime.timetable.defaults.ApplicationProperty",
"org.unitime.timetable.defaults.UserProperty",
"org.unitime.timetable.model.DistributionPref",
"org.unitime.timetable.securit... | import java.util.Collection; import java.util.Iterator; import javax.servlet.http.HttpServletRequest; import org.unitime.commons.web.WebTable; import org.unitime.timetable.defaults.ApplicationProperty; import org.unitime.timetable.defaults.UserProperty; import org.unitime.timetable.model.DistributionPref; import org.un... | import java.util.*; import javax.servlet.http.*; import org.unitime.commons.web.*; import org.unitime.timetable.defaults.*; import org.unitime.timetable.model.*; import org.unitime.timetable.security.*; import org.unitime.timetable.security.rights.*; | [
"java.util",
"javax.servlet",
"org.unitime.commons",
"org.unitime.timetable"
] | java.util; javax.servlet; org.unitime.commons; org.unitime.timetable; | 488,491 |
public List<String> getVariables() {
return variables;
}
| List<String> function() { return variables; } | /**
* Return a list of Variable references in the expression
* @return List of variables
*/ | Return a list of Variable references in the expression | getVariables | {
"repo_name": "fifa0329/vassal",
"path": "src/bsh/BeanShellExpressionValidator.java",
"license": "lgpl-2.1",
"size": 4945
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,605,161 |
public ServiceDiscoveryModuleBuilder<T> annotation(final Class<? extends Annotation> ann) {
this.annotation = AnnotationHolder.create(ann);
return this;
} | ServiceDiscoveryModuleBuilder<T> function(final Class<? extends Annotation> ann) { this.annotation = AnnotationHolder.create(ann); return this; } | /**
* The annotation to use with the binding. Required.
*/ | The annotation to use with the binding. Required | annotation | {
"repo_name": "dclements/cultivar_old",
"path": "cultivar-discovery/src/main/java/org/waterprinciple/cultivar/discovery/ServiceDiscoveryModuleBuilder.java",
"license": "mit",
"size": 7153
} | [
"java.lang.annotation.Annotation",
"org.waterprinciple.cultivar.internal.AnnotationHolder"
] | import java.lang.annotation.Annotation; import org.waterprinciple.cultivar.internal.AnnotationHolder; | import java.lang.annotation.*; import org.waterprinciple.cultivar.internal.*; | [
"java.lang",
"org.waterprinciple.cultivar"
] | java.lang; org.waterprinciple.cultivar; | 551,196 |
public Builder addServletAttribute(String attrName, Object value) {
requireNonNull(attrName, "attrName");
if ( value != null )
servletAttr.put(attrName, value);
else
servletAttr.remove(attrName);
return this;
} | Builder function(String attrName, Object value) { requireNonNull(attrName, STR); if ( value != null ) servletAttr.put(attrName, value); else servletAttr.remove(attrName); return this; } | /**
* Add a servlet attribute. Pass a value of null to remove any existing binding.
*/ | Add a servlet attribute. Pass a value of null to remove any existing binding | addServletAttribute | {
"repo_name": "apache/jena",
"path": "jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/JettyServer.java",
"license": "apache-2.0",
"size": 18822
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 913,891 |
public Builder oneshot(final boolean oneshot) {
this.oneshot = of(oneshot);
return this;
} | Builder function(final boolean oneshot) { this.oneshot = of(oneshot); return this; } | /**
* Do not perform any scheduled tasks, only perform then once during startup.
*/ | Do not perform any scheduled tasks, only perform then once during startup | oneshot | {
"repo_name": "lucilecoutouly/heroic",
"path": "heroic-core/src/main/java/com/spotify/heroic/HeroicCore.java",
"license": "apache-2.0",
"size": 36074
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,429,006 |
@Test
public void testRemovedCriteriaIgnored() {
CriterionDescriptor rootDescriptor =
new CriterionDescriptor(true, false, null, 1000000L, 1L, null);
List<AdGroupCriterion> criteria = Lists.newArrayList();
criteria.add(rootDescriptor.createCriterion());
// Create a criteria for a child node... | void function() { CriterionDescriptor rootDescriptor = new CriterionDescriptor(true, false, null, 1000000L, 1L, null); List<AdGroupCriterion> criteria = Lists.newArrayList(); criteria.add(rootDescriptor.createCriterion()); ProductBrand brandGoogle = ProductDimensions.createBrand(STR); CriterionDescriptor removedDescrip... | /**
* Tests that the factory method ignores removed criteria.
*/ | Tests that the factory method ignores removed criteria | testRemovedCriteriaIgnored | {
"repo_name": "stoksey69/googleads-java-lib",
"path": "modules/adwords_axis/src/test/java/com/google/api/ads/adwords/axis/utils/v201502/shopping/ProductPartitionTreeTest.java",
"license": "apache-2.0",
"size": 23036
} | [
"com.google.api.ads.adwords.axis.v201502.cm.AdGroupCriterion",
"com.google.api.ads.adwords.axis.v201502.cm.BiddableAdGroupCriterion",
"com.google.api.ads.adwords.axis.v201502.cm.ProductBrand",
"com.google.api.ads.adwords.axis.v201502.cm.UserStatus",
"com.google.common.collect.Lists",
"java.util.List",
"... | import com.google.api.ads.adwords.axis.v201502.cm.AdGroupCriterion; import com.google.api.ads.adwords.axis.v201502.cm.BiddableAdGroupCriterion; import com.google.api.ads.adwords.axis.v201502.cm.ProductBrand; import com.google.api.ads.adwords.axis.v201502.cm.UserStatus; import com.google.common.collect.Lists; import jav... | import com.google.api.ads.adwords.axis.v201502.cm.*; import com.google.common.collect.*; import java.util.*; import org.junit.*; | [
"com.google.api",
"com.google.common",
"java.util",
"org.junit"
] | com.google.api; com.google.common; java.util; org.junit; | 1,577,706 |
public boolean acceptLine(RouteDataObject way);
| boolean function(RouteDataObject way); | /**
* return if the road is accepted for routing
*/ | return if the road is accepted for routing | acceptLine | {
"repo_name": "getintouchapp/getintouchmaps",
"path": "OsmAnd-java/src/net/osmand/router/VehicleRouter.java",
"license": "gpl-3.0",
"size": 1860
} | [
"net.osmand.binary.RouteDataObject"
] | import net.osmand.binary.RouteDataObject; | import net.osmand.binary.*; | [
"net.osmand.binary"
] | net.osmand.binary; | 1,795,172 |
public CustomerCreditMemoDocument createCustomerCreditMemoDocument(CustomerInvoiceDocument invoice) {
CustomerCreditMemoDetail customerCreditMemoDetail;
CustomerCreditMemoDocument customerCreditMemoDocument = null;
KualiDecimal invItemTaxAmount, itemAmount;
Integer itemLineNumber;
... | CustomerCreditMemoDocument function(CustomerInvoiceDocument invoice) { CustomerCreditMemoDetail customerCreditMemoDetail; CustomerCreditMemoDocument customerCreditMemoDocument = null; KualiDecimal invItemTaxAmount, itemAmount; Integer itemLineNumber; BigDecimal itemQuantity; String documentNumber; try { customerCreditM... | /**
* This method creates a customer credit memo document based on the passed in customer invoice document
*
* @param customer invoice document
* @return
*/ | This method creates a customer credit memo document based on the passed in customer invoice document | createCustomerCreditMemoDocument | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/test/java/org/kuali/kfs/module/ar/document/validation/impl/CustomerCreditMemoDocumentRuleTest.java",
"license": "agpl-3.0",
"size": 16842
} | [
"java.math.BigDecimal",
"java.util.List",
"org.kuali.kfs.krad.service.DocumentService",
"org.kuali.kfs.module.ar.businessobject.CustomerCreditMemoDetail",
"org.kuali.kfs.module.ar.businessobject.CustomerInvoiceDetail",
"org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument",
"org.kuali.kfs.module.... | import java.math.BigDecimal; import java.util.List; import org.kuali.kfs.krad.service.DocumentService; import org.kuali.kfs.module.ar.businessobject.CustomerCreditMemoDetail; import org.kuali.kfs.module.ar.businessobject.CustomerInvoiceDetail; import org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument; import o... | import java.math.*; import java.util.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.module.ar.businessobject.*; import org.kuali.kfs.module.ar.document.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.core.api.util.type.*; import org.kuali.rice.kew.api.exception.*; | [
"java.math",
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.math; java.util; org.kuali.kfs; org.kuali.rice; | 2,301,645 |
default Constraint rewardConfigurableLong(String constraintName, ToLongTriFunction<A, B, C> matchWeigher) {
return rewardConfigurableLong(getConstraintFactory().getDefaultConstraintPackage(), constraintName, matchWeigher);
} | default Constraint rewardConfigurableLong(String constraintName, ToLongTriFunction<A, B, C> matchWeigher) { return rewardConfigurableLong(getConstraintFactory().getDefaultConstraintPackage(), constraintName, matchWeigher); } | /**
* Positively impact the {@link Score}: add the {@link ConstraintWeight} multiplied by the match weight.
* Otherwise as defined by {@link #rewardConfigurable(String)}.
* @param constraintName never null, shows up in {@link ConstraintMatchTotal} during score justification
* @param matchWeigher nev... | Positively impact the <code>Score</code>: add the <code>ConstraintWeight</code> multiplied by the match weight. Otherwise as defined by <code>#rewardConfigurable(String)</code> | rewardConfigurableLong | {
"repo_name": "baldimir/optaplanner",
"path": "optaplanner-core/src/main/java/org/optaplanner/core/api/score/stream/tri/TriConstraintStream.java",
"license": "apache-2.0",
"size": 17219
} | [
"org.optaplanner.core.api.function.ToLongTriFunction",
"org.optaplanner.core.api.score.stream.Constraint"
] | import org.optaplanner.core.api.function.ToLongTriFunction; import org.optaplanner.core.api.score.stream.Constraint; | import org.optaplanner.core.api.function.*; import org.optaplanner.core.api.score.stream.*; | [
"org.optaplanner.core"
] | org.optaplanner.core; | 428,881 |
List<LoggingEvent> parse(String xml) throws ParseException; | List<LoggingEvent> parse(String xml) throws ParseException; | /**
* Parses the given String for XML to extract the parameter and assign them
* to the members.
*
* @param xml
* XML-Content
* @return List of logging events
* @throws ParseException
* if fails to parse
*/ | Parses the given String for XML to extract the parameter and assign them to the members | parse | {
"repo_name": "stritti/log4js",
"path": "log4js-servlet/src/main/java/de/log4js/parser/EventParser.java",
"license": "apache-2.0",
"size": 1862
} | [
"de.log4js.LoggingEvent",
"java.util.List"
] | import de.log4js.LoggingEvent; import java.util.List; | import de.log4js.*; import java.util.*; | [
"de.log4js",
"java.util"
] | de.log4js; java.util; | 345,691 |
@Override
public void mouseMoved(MouseEvent e) {
Point2D.Float check = to2DPoint(e.getPoint());
Boundary.nearBoundary(check, edit.getBoundaries());
edit.repaint();
} | void function(MouseEvent e) { Point2D.Float check = to2DPoint(e.getPoint()); Boundary.nearBoundary(check, edit.getBoundaries()); edit.repaint(); } | /**
* Update's this tool's editlattice's tooltip as mouse moves
*/ | Update's this tool's editlattice's tooltip as mouse moves | mouseMoved | {
"repo_name": "mBonifant/Fluid2D",
"path": "Deliverables/Source Code/src/gui/DrawingTool.java",
"license": "gpl-3.0",
"size": 17155
} | [
"java.awt.event.MouseEvent",
"java.awt.geom.Point2D"
] | import java.awt.event.MouseEvent; import java.awt.geom.Point2D; | import java.awt.event.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 478,280 |
@SuppressWarnings("deprecation")
public void setNavigationBarTintDrawable(Drawable drawable) {
if (mNavBarAvailable) {
mNavBarTintView.setBackgroundDrawable(drawable);
}
} | @SuppressWarnings(STR) void function(Drawable drawable) { if (mNavBarAvailable) { mNavBarTintView.setBackgroundDrawable(drawable); } } | /**
* Apply the specified drawable to the system navigation bar.
*
* @param drawable The drawable to use as the background, or null to remove it.
*/ | Apply the specified drawable to the system navigation bar | setNavigationBarTintDrawable | {
"repo_name": "zhiaixinyang/LightThink",
"path": "greatbook/src/main/java/com/example/greatbook/utils/SystemBarTintManager.java",
"license": "apache-2.0",
"size": 19996
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 1,581,245 |
void unwantedItem(ItemIF item, ChannelIF channel); | void unwantedItem(ItemIF item, ChannelIF channel); | /**
* Invoked when cleanup engine finds unwanted item.
*
* @param item unwanted item.
* @param channel channel this item resides in.
*/ | Invoked when cleanup engine finds unwanted item | unwantedItem | {
"repo_name": "nikos/informa",
"path": "src/main/java/de/nava/informa/utils/cleaner/CleanerObserverIF.java",
"license": "epl-1.0",
"size": 1280
} | [
"de.nava.informa.core.ChannelIF",
"de.nava.informa.core.ItemIF"
] | import de.nava.informa.core.ChannelIF; import de.nava.informa.core.ItemIF; | import de.nava.informa.core.*; | [
"de.nava.informa"
] | de.nava.informa; | 1,371,779 |
public ImmutableList<Comment> getComments() {
return comments;
} | ImmutableList<Comment> function() { return comments; } | /**
* Returns an (immutable, ordered) list of comments in this BUILD file.
*/ | Returns an (immutable, ordered) list of comments in this BUILD file | getComments | {
"repo_name": "murugamsm/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/BuildFileAST.java",
"license": "apache-2.0",
"size": 11179
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,615,957 |
return INSTANCE;
}
private TrashProjectListBox() {
super(MESSAGES.trashprojectlistbox(),
300, // height
false, // minimizable
false); // removable
trashList = new TrashProjectList();
setContent(trashList);
} | return INSTANCE; } private TrashProjectListBox() { super(MESSAGES.trashprojectlistbox(), 300, false, false); trashList = new TrashProjectList(); setContent(trashList); } | /**
* Returns the singleton deleted projects list box.
*
* @return trash project list box
*/ | Returns the singleton deleted projects list box | getTrashProjectListBox | {
"repo_name": "kkashi01/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/boxes/TrashProjectListBox.java",
"license": "apache-2.0",
"size": 1474
} | [
"com.google.appinventor.client.Ode",
"com.google.appinventor.client.explorer.youngandroid.TrashProjectList"
] | import com.google.appinventor.client.Ode; import com.google.appinventor.client.explorer.youngandroid.TrashProjectList; | import com.google.appinventor.client.*; import com.google.appinventor.client.explorer.youngandroid.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,479,183 |
public interface EventHandler<T> {
boolean handleEvent(EditorDomEvent<T> event);
}
protected enum State {
INACTIVE, ACTIVATING, BINDING, ACTIVE, SAVING
}
private Grid<T> grid;
private EditorHandler<T> handler;
private EventHa... | interface EventHandler<T> { boolean function(EditorDomEvent<T> event); } protected enum State { INACTIVE, ACTIVATING, BINDING, ACTIVE, SAVING } private Grid<T> grid; private EditorHandler<T> handler; private EventHandler<T> eventHandler = GWT .create(DefaultEditorEventHandler.class); private DivElement editorOverlay = ... | /**
* Handles editor-related events in an appropriate way. Opens,
* moves, or closes the editor based on the given event.
*
* @param event
* the received event
* @return true if the event was handled and nothing else should be
... | Handles editor-related events in an appropriate way. Opens, moves, or closes the editor based on the given event | handleEvent | {
"repo_name": "peterl1084/framework",
"path": "client/src/main/java/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 332371
} | [
"com.google.gwt.dom.client.DivElement",
"com.google.gwt.event.shared.HandlerRegistration",
"com.google.gwt.user.client.DOM",
"com.google.gwt.user.client.ui.Button",
"com.google.gwt.user.client.ui.Widget",
"com.vaadin.client.widget.grid.DefaultEditorEventHandler",
"com.vaadin.client.widget.grid.EditorHan... | import com.google.gwt.dom.client.DivElement; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.widget.grid.DefaultEditorEventHandler; import com.vaadin.client.w... | import com.google.gwt.dom.client.*; import com.google.gwt.event.shared.*; import com.google.gwt.user.client.*; import com.google.gwt.user.client.ui.*; import com.vaadin.client.widget.grid.*; import com.vaadin.client.widgets.*; import java.util.*; | [
"com.google.gwt",
"com.vaadin.client",
"java.util"
] | com.google.gwt; com.vaadin.client; java.util; | 1,349,259 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.