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 String sprintf() {
Enumeration e = vFmt.elements();
ConversionSpecification cs = null;
char c = 0;
StringBuffer sb=new StringBuffer();
while (e.hasMoreElements()) {
cs = (ConversionSpecification)
e.nextElement();
c = cs.getConversionCharacter();
if (c=='\0') sb.app... | String function() { Enumeration e = vFmt.elements(); ConversionSpecification cs = null; char c = 0; StringBuffer sb=new StringBuffer(); while (e.hasMoreElements()) { cs = (ConversionSpecification) e.nextElement(); c = cs.getConversionCharacter(); if (c=='\0') sb.append(cs.getLiteral()); else if (c=='%') sb.append("%");... | /**
* Format nothing. Just use the control string.
* @return the formatted String.
*/ | Format nothing. Just use the control string | sprintf | {
"repo_name": "BlueBrain/bluima",
"path": "modules/bluima_abbreviations/src/main/java/com/wcohen/ss/PrintfFormat.java",
"license": "apache-2.0",
"size": 98172
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 487,864 |
private static Playlist readFileWithExtras(IDbDataPortal dbDataPortal, File playlistFile) throws IOException {
Playlist playlist = new Playlist();
FileInputStream fileInput = null;
DataInputStream playlistStream = null;
InputStreamReader inputStream = null;
String[] infos = new String[0];
try {
fil... | static Playlist function(IDbDataPortal dbDataPortal, File playlistFile) throws IOException { Playlist playlist = new Playlist(); FileInputStream fileInput = null; DataInputStream playlistStream = null; InputStreamReader inputStream = null; String[] infos = new String[0]; try { fileInput = new FileInputStream(playlistFi... | /**
* Reads all extra information from a playlist {@link File} if available
*/ | Reads all extra information from a playlist <code>File</code> if available | readFileWithExtras | {
"repo_name": "kuhnmi/jukefox",
"path": "JukefoxModel/src/ch/ethz/dcg/jukefox/data/playlist/PlaylistReader.java",
"license": "gpl-3.0",
"size": 7536
} | [
"ch.ethz.dcg.jukefox.commons.utils.Log",
"ch.ethz.dcg.jukefox.data.db.IDbDataPortal",
"ch.ethz.dcg.jukefox.model.collection.Playlist",
"java.io.DataInputStream",
"java.io.EOFException",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStreamReader"
] | import ch.ethz.dcg.jukefox.commons.utils.Log; import ch.ethz.dcg.jukefox.data.db.IDbDataPortal; import ch.ethz.dcg.jukefox.model.collection.Playlist; import java.io.DataInputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamRe... | import ch.ethz.dcg.jukefox.commons.utils.*; import ch.ethz.dcg.jukefox.data.db.*; import ch.ethz.dcg.jukefox.model.collection.*; import java.io.*; | [
"ch.ethz.dcg",
"java.io"
] | ch.ethz.dcg; java.io; | 2,889,371 |
public void removeTransactionsSentFromDepartedProxy(InternalDistributedMember proxyServer) {
final Set<TXId> txIds = getTransactionsSentFromDepartedProxy(proxyServer);
if (txIds.isEmpty()) {
return;
}
if (logger.isDebugEnabled()) {
logger.debug("expiring the following transactions: {}", Ar... | void function(InternalDistributedMember proxyServer) { final Set<TXId> txIds = getTransactionsSentFromDepartedProxy(proxyServer); if (txIds.isEmpty()) { return; } if (logger.isDebugEnabled()) { logger.debug(STR, Arrays.toString(txIds.toArray())); } synchronized (this.hostedTXStates) { Iterator<Map.Entry<TXId, TXStatePr... | /**
* Find all client originated transactions sent from the departed proxy server. Remove them from
* the hostedTXStates map after the set TransactionTimeToLive period.
*
* @param proxyServer the departed proxy server
*/ | Find all client originated transactions sent from the departed proxy server. Remove them from the hostedTXStates map after the set TransactionTimeToLive period | removeTransactionsSentFromDepartedProxy | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/TXManagerImpl.java",
"license": "apache-2.0",
"size": 65322
} | [
"java.util.Arrays",
"java.util.Iterator",
"java.util.Map",
"java.util.Set",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember"
] | import java.util.Arrays; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; | import java.util.*; import org.apache.geode.distributed.internal.membership.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,051,187 |
protected Feed getFeed(){
synchronized (syncLock) {
return myFeed;
}
}
| Feed function(){ synchronized (syncLock) { return myFeed; } } | /**
* Synchronized getter for the feed.
* @return
*/ | Synchronized getter for the feed | getFeed | {
"repo_name": "Z-app/zmote",
"path": "src/se/z_app/zmote/gui/ZChatActivity.java",
"license": "bsd-2-clause",
"size": 13020
} | [
"se.z_app.social.Feed"
] | import se.z_app.social.Feed; | import se.z_app.social.*; | [
"se.z_app.social"
] | se.z_app.social; | 2,713,775 |
public ApplicationContext getApplicationContext()
{
return getApplicationContext(true);
}
| ApplicationContext function() { return getApplicationContext(true); } | /**
* Gets the application context.
*
* @return the application context
*/ | Gets the application context | getApplicationContext | {
"repo_name": "Kast0rTr0y/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/management/subsystems/ChildApplicationContextFactory.java",
"license": "lgpl-3.0",
"size": 37252
} | [
"org.springframework.context.ApplicationContext"
] | import org.springframework.context.ApplicationContext; | import org.springframework.context.*; | [
"org.springframework.context"
] | org.springframework.context; | 759,209 |
BooleanWrapper createNodeSource(String nodeSourceName, String infrastructureType,
Object[] infrastructureParameters, String policyType, Object[] policyParameters); | BooleanWrapper createNodeSource(String nodeSourceName, String infrastructureType, Object[] infrastructureParameters, String policyType, Object[] policyParameters); | /**
* The node source is the set of nodes acquired from specific infrastructure and characterized
* by particular acquisition policy.
* <p>
* This method creates a new node source with specified name, infrastructure manager and acquisition policy.
* Parameters required to create infrastructure ... | The node source is the set of nodes acquired from specific infrastructure and characterized by particular acquisition policy. This method creates a new node source with specified name, infrastructure manager and acquisition policy. Parameters required to create infrastructure manager and policy can be obtained from cor... | createNodeSource | {
"repo_name": "youribonnaffe/scheduling",
"path": "rm/rm-client/src/main/java/org/ow2/proactive/resourcemanager/frontend/ResourceManager.java",
"license": "agpl-3.0",
"size": 17505
} | [
"org.objectweb.proactive.core.util.wrapper.BooleanWrapper"
] | import org.objectweb.proactive.core.util.wrapper.BooleanWrapper; | import org.objectweb.proactive.core.util.wrapper.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 2,793,973 |
private static final Logger LOGGER = Logger.getCommonLogger(ConstraintViolationFormatter.class);
public String formatMessage(Exception objExcp)
{
String formatedMessage = null ;
JDBCDAO jdbcDAO=null;
try
{
String appName = CommonServiceLocator.getInstance().getAppName();
IDAOFactory daoFact... | static final Logger LOGGER = Logger.getCommonLogger(ConstraintViolationFormatter.class); public String function(Exception objExcp) { String formatedMessage = null ; JDBCDAO jdbcDAO=null; try { String appName = CommonServiceLocator.getInstance().getAppName(); IDAOFactory daoFactory = DAOConfigFactory.getInstance().getDA... | /**
* This will be called to format constraint violation exception messages.
* @param objExcp : Exception thrown.
* @return string : It return the formatted error messages.
*/ | This will be called to format constraint violation exception messages | formatMessage | {
"repo_name": "NCIP/commons-module",
"path": "software/washu-commons/src/main/java/edu/wustl/common/exceptionformatter/ConstraintViolationFormatter.java",
"license": "bsd-3-clause",
"size": 2209
} | [
"edu.wustl.common.util.global.CommonServiceLocator",
"edu.wustl.common.util.logger.Logger",
"edu.wustl.dao.daofactory.DAOConfigFactory",
"edu.wustl.dao.daofactory.IDAOFactory",
"edu.wustl.dao.exception.DAOException"
] | import edu.wustl.common.util.global.CommonServiceLocator; import edu.wustl.common.util.logger.Logger; import edu.wustl.dao.daofactory.DAOConfigFactory; import edu.wustl.dao.daofactory.IDAOFactory; import edu.wustl.dao.exception.DAOException; | import edu.wustl.common.util.global.*; import edu.wustl.common.util.logger.*; import edu.wustl.dao.daofactory.*; import edu.wustl.dao.exception.*; | [
"edu.wustl.common",
"edu.wustl.dao"
] | edu.wustl.common; edu.wustl.dao; | 431,421 |
public Cursor allStudents(long fkCourse) {
return database.query(TABLE_STUDENT, new String[]{S_KEY_ROWID,
S_FIRST_NAME, S_LAST_NAME, S_MAIL, S_FK_COURSE}, S_FK_COURSE + "=?",
new String[]{String.valueOf(fkCourse)}, null, null, null);
} | Cursor function(long fkCourse) { return database.query(TABLE_STUDENT, new String[]{S_KEY_ROWID, S_FIRST_NAME, S_LAST_NAME, S_MAIL, S_FK_COURSE}, S_FK_COURSE + "=?", new String[]{String.valueOf(fkCourse)}, null, null, null); } | /**
* Return all the Students that belong to that fkCourse.
*
* @param fkCourse
* @return
*/ | Return all the Students that belong to that fkCourse | allStudents | {
"repo_name": "fabriph/peer-instruction",
"path": "teacher-app-studio/PITeacher/app/src/main/java/com/fabricioph/piteacher/adapters/DBAdapter.java",
"license": "apache-2.0",
"size": 43538
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 2,273,918 |
private String readFile( File file )
throws IOException
{
String strTmp;
StringBuilder str = new StringBuilder( (int) file.length() );
try ( BufferedReader in = new BufferedReader( new FileReader( file ) ) )
{
while ( ( strTmp = in.readLine() ) != null )
... | String function( File file ) throws IOException { String strTmp; StringBuilder str = new StringBuilder( (int) file.length() ); try ( BufferedReader in = new BufferedReader( new FileReader( file ) ) ) { while ( ( strTmp = in.readLine() ) != null ) { str.append( ' ' ); str.append( strTmp ); } } return str.toString(); } | /**
* Read the contents of the specified file object into a string
*
* @param file the file to be read
* @return a String object that contains the contents of the file
* @throws java.io.IOException
*/ | Read the contents of the specified file object into a string | readFile | {
"repo_name": "HubSpot/maven-plugins",
"path": "maven-pmd-plugin/src/test/java/org/apache/maven/plugin/pmd/CpdReportTest.java",
"license": "apache-2.0",
"size": 13682
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.FileReader",
"java.io.IOException"
] | import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,881,715 |
public void agentDeparted(Workgroup workgroup, AgentSession agentSession); | void function(Workgroup workgroup, AgentSession agentSession); | /**
* Notification message that an Agent has left a Workgroup.
*
* @param workgroup the workgroup where the agent has left.
* @param agentSession the session of the agent that has ended.
*/ | Notification message that an Agent has left a Workgroup | agentDeparted | {
"repo_name": "wudingli/openfire",
"path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/event/WorkgroupEventListener.java",
"license": "apache-2.0",
"size": 4870
} | [
"org.jivesoftware.xmpp.workgroup.AgentSession",
"org.jivesoftware.xmpp.workgroup.Workgroup"
] | import org.jivesoftware.xmpp.workgroup.AgentSession; import org.jivesoftware.xmpp.workgroup.Workgroup; | import org.jivesoftware.xmpp.workgroup.*; | [
"org.jivesoftware.xmpp"
] | org.jivesoftware.xmpp; | 772,787 |
@Override
public void message(Type type, String title, String message)
{
Level level;
switch (type)
{
case ERROR:
level = Level.SEVERE;
break;
case WARNING:
level = Level.WARNING;
break;
... | void function(Type type, String title, String message) { Level level; switch (type) { case ERROR: level = Level.SEVERE; break; case WARNING: level = Level.WARNING; break; default: level = Level.INFO; } logger.log(level, message); } /** * Displays a confirmation message. * * @param type the type of the message * @param ... | /**
* Displays a message.
*
* @param type the type of the message
* @param title the message title. If {@code null}, the title will be determined from the type
* @param message the message to display
*/ | Displays a message | message | {
"repo_name": "codehaus/izpack",
"path": "izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/LoggingPrompt.java",
"license": "apache-2.0",
"size": 2539
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,407,049 |
RubyExtensionRegistry rubyExtensionRegistry(); | RubyExtensionRegistry rubyExtensionRegistry(); | /**
* Creates an Ruby extension registry ready to be used for registering all processors
*
* @return Extension Registry object.
*/ | Creates an Ruby extension registry ready to be used for registering all processors | rubyExtensionRegistry | {
"repo_name": "ysb33r/asciidoctorj",
"path": "asciidoctorj-api/src/main/java/org/asciidoctor/Asciidoctor.java",
"license": "apache-2.0",
"size": 21464
} | [
"org.asciidoctor.extension.RubyExtensionRegistry"
] | import org.asciidoctor.extension.RubyExtensionRegistry; | import org.asciidoctor.extension.*; | [
"org.asciidoctor.extension"
] | org.asciidoctor.extension; | 2,847,660 |
@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
String sTag = returnLowerCaseTag(uri,localName,qName);
String sCharacters = _characters.toString().trim();
// check for errors
if (sTag.equals("error")) {
throw new SAXException(sCharacters);
} e... | void function(String uri, String localName, String qName) throws SAXException { String sTag = returnLowerCaseTag(uri,localName,qName); String sCharacters = _characters.toString().trim(); if (sTag.equals("error")) { throw new SAXException(sCharacters); } else if (sCharacters.startsWith("[ERR")) { throw new SAXException(... | /**
* Ends a SAX element.
* <br/>The parser is not namespace aware.
* @param uri the uri namespace for the element
* @param localName the local name for the element
* @param qName the qualified name for the element
* @throws SAXException if a SAXException occurs
*/ | Ends a SAX element. The parser is not namespace aware | endElement | {
"repo_name": "GeoinformationSystems/GeoprocessingAppstore",
"path": "src/com/esri/gpt/migration/to1/RemoteGetDocumentRequest.java",
"license": "apache-2.0",
"size": 12420
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 182,932 |
void updateFilteredTaskListWithStemmedKeywords(Set<Set<String>> keywordsGroups); | void updateFilteredTaskListWithStemmedKeywords(Set<Set<String>> keywordsGroups); | /**
* Updates the filter of the filtered task list to filter by the stemmed
* words of the given keywords (for find command). (Stemming is the process
* of reducing inflected (or sometimes derived) words to their word stem.
* Example: "stems", "stemmer", "stemming", "stemmed" as based on "stem")
... | Updates the filter of the filtered task list to filter by the stemmed words of the given keywords (for find command). (Stemming is the process of reducing inflected (or sometimes derived) words to their word stem. Example: "stems", "stemmer", "stemming", "stemmed" as based on "stem") | updateFilteredTaskListWithStemmedKeywords | {
"repo_name": "CS2103AUG2016-F10-C4/main",
"path": "src/main/java/seedu/toDoList/model/Model.java",
"license": "mit",
"size": 4467
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 259,227 |
@Action(enabledProperty = "exportPossible")
public void exportCluster() {
// create linked list that will contain all attachments
ArrayList<Object> expcluster = new ArrayList<>();
// get length of cluster-entry-list
// call export-method
exportEntries(expcluster);
} | @Action(enabledProperty = STR) void function() { ArrayList<Object> expcluster = new ArrayList<>(); exportEntries(expcluster); } | /**
* This method exports the automatic links (referrers) of an entry.
*/ | This method exports the automatic links (referrers) of an entry | exportCluster | {
"repo_name": "ct2034/Zettelkasten",
"path": "src/de/danielluedecke/zettelkasten/ZettelkastenView.java",
"license": "gpl-3.0",
"size": 765056
} | [
"java.util.ArrayList",
"org.jdesktop.application.Action"
] | import java.util.ArrayList; import org.jdesktop.application.Action; | import java.util.*; import org.jdesktop.application.*; | [
"java.util",
"org.jdesktop.application"
] | java.util; org.jdesktop.application; | 1,236,046 |
boolean supportFile(File f); | boolean supportFile(File f); | /**
* Are we capable of displaying this file?
*
* @param f file to display
* @return true if capable, false otherwise
*/ | Are we capable of displaying this file | supportFile | {
"repo_name": "javydreamercsw/validation-manager",
"path": "Validation-Manager-Web/src/main/java/net/sourceforge/javydreamercsw/validation/manager/web/file/IFileDisplay.java",
"license": "apache-2.0",
"size": 1776
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 940,610 |
public static InetAddress getLocalHostAddress(String byConnecting, int port) {
InetAddress addr = getLocalInetAddress(byConnecting, port);
if (addr != null) {
return addr;
} else {
// It's final...
try {
return InetAddress.getByName("127.0.0.1");
} catch (UnknownHostException e) {
return nu... | static InetAddress function(String byConnecting, int port) { InetAddress addr = getLocalInetAddress(byConnecting, port); if (addr != null) { return addr; } else { try { return InetAddress.getByName(STR); } catch (UnknownHostException e) { return null; } } } | /**
* Get local address by connecting to a server.
*
* @param byConnecting
* the server address to connect.
* @param port
* the port to connect
* @return IP address local IP address
*/ | Get local address by connecting to a server | getLocalHostAddress | {
"repo_name": "leesh77/ngrinder-recorder",
"path": "src/main/java/org/ngrinder/recorder/util/NetworkUtil.java",
"license": "apache-2.0",
"size": 9154
} | [
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 1,886,334 |
private RandomStressTask chooseTask() {
RandomStressTask result = null;
int numparts = (randomInt() % parts) + 1;
switch (randomInt() % COUNT_STRESS_TASK) {
case COMMIT_STRESS:
result = new CommitStressTask(threadpool, wakeupManager, mgr,
numparts);
... | RandomStressTask function() { RandomStressTask result = null; int numparts = (randomInt() % parts) + 1; switch (randomInt() % COUNT_STRESS_TASK) { case COMMIT_STRESS: result = new CommitStressTask(threadpool, wakeupManager, mgr, numparts); break; case ABORT_STRESS: result = new AbortStressTask(threadpool, wakeupManager... | /**
* Create one of RandomStressTask.
*/ | Create one of RandomStressTask | chooseTask | {
"repo_name": "pfirmstone/river-internet",
"path": "qa/src/org/apache/river/test/impl/mahalo/RandomStressTest.java",
"license": "apache-2.0",
"size": 8551
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,717,906 |
protected BoardNodeScorePair findBestScoringNode(Hashtable nodes)
{
BoardNodeScorePair bestNodePair = new BoardNodeScorePair(0, -1);
Enumeration nodesEnum = nodes.keys();
while (nodesEnum.hasMoreElements())
{
Integer nodeCoord = (Integer) nodesEnum.nextElement... | BoardNodeScorePair function(Hashtable nodes) { BoardNodeScorePair bestNodePair = new BoardNodeScorePair(0, -1); Enumeration nodesEnum = nodes.keys(); while (nodesEnum.hasMoreElements()) { Integer nodeCoord = (Integer) nodesEnum.nextElement(); Integer score = (Integer) nodes.get(nodeCoord); if (bestNodePair.getScore() <... | /**
* given a table of nodes/edges with scores, return the
* best scoring pair
*
* @param nodes the table of nodes/edges
* @return the best scoring pair
*/ | given a table of nodes/edges with scores, return the best scoring pair | findBestScoringNode | {
"repo_name": "nsp/OpenSettlers",
"path": "src/java/soc/robot/RobotBrain.java",
"license": "gpl-3.0",
"size": 197852
} | [
"java.util.Enumeration",
"java.util.Hashtable"
] | import java.util.Enumeration; import java.util.Hashtable; | import java.util.*; | [
"java.util"
] | java.util; | 2,659,867 |
TsdAnnotation setNotes(String notes); | TsdAnnotation setNotes(String notes); | /**
* Sets the notes of this TsdAnnotation. The notes field corresponds to the
* database column tsdb.public.tsd_annotation.notes.
*
* @param notes to set of this TsdAnnotation
* @return this TsdAnnotation instance
*/ | Sets the notes of this TsdAnnotation. The notes field corresponds to the database column tsdb.public.tsd_annotation.notes | setNotes | {
"repo_name": "nickman/HeliosStreams",
"path": "metric-hub/src/main/java/com/heliosapm/metrichub/speedment/tsdb/public_/tsd_annotation/generated/GeneratedTsdAnnotation.java",
"license": "apache-2.0",
"size": 11834
} | [
"com.heliosapm.metrichub.speedment.tsdb.public_.tsd_annotation.TsdAnnotation"
] | import com.heliosapm.metrichub.speedment.tsdb.public_.tsd_annotation.TsdAnnotation; | import com.heliosapm.metrichub.speedment.tsdb.public_.tsd_annotation.*; | [
"com.heliosapm.metrichub"
] | com.heliosapm.metrichub; | 2,534,606 |
@Test(timeout = 100000)
public void testRackPolicyAfterBalance() throws Exception {
final Configuration conf = new HdfsConfiguration();
initConf(conf);
long[] capacities = new long[]{CAPACITY, CAPACITY};
String[] hosts = {"host0", "host1"};
String[] racks = {RACK0, RACK1};
runBalancerAndVeri... | @Test(timeout = 100000) void function() throws Exception { final Configuration conf = new HdfsConfiguration(); initConf(conf); long[] capacities = new long[]{CAPACITY, CAPACITY}; String[] hosts = {"host0", "host1"}; String[] racks = {RACK0, RACK1}; runBalancerAndVerifyBlockPlacmentPolicy(conf, capacities, hosts, racks,... | /**
* Verify balancer won't violate the default block placement policy.
*
* @throws Exception
*/ | Verify balancer won't violate the default block placement policy | testRackPolicyAfterBalance | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancerLongRunningTasks.java",
"license": "apache-2.0",
"size": 31376
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.HdfsConfiguration",
"org.junit.Test"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.junit.Test; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 1,152,449 |
public String getSymmetricCipherAlgorithmPadding() {
return CryptoUtil.getCipherAlgorithmPaddingAsString(this.getSymmetricCipherAlgorithmNameModePadding());
}
| String function() { return CryptoUtil.getCipherAlgorithmPaddingAsString(this.getSymmetricCipherAlgorithmNameModePadding()); } | /**
* This method returns the symmetric cipher algorithm's padding, e.g. "NoPadding".
* @return the symmetric cipher algorithm's padding
*/ | This method returns the symmetric cipher algorithm's padding, e.g. "NoPadding" | getSymmetricCipherAlgorithmPadding | {
"repo_name": "halemmerich/de.persosim.simulator",
"path": "de.persosim.simulator/src/de/persosim/simulator/protocols/pace/PaceOid.java",
"license": "gpl-3.0",
"size": 7247
} | [
"de.persosim.simulator.crypto.CryptoUtil"
] | import de.persosim.simulator.crypto.CryptoUtil; | import de.persosim.simulator.crypto.*; | [
"de.persosim.simulator"
] | de.persosim.simulator; | 780,247 |
public boolean shouldOverrideUrlLoading(String url) {
// We have a default behavior if no client exists so always send the
// message.
ResultTransport<Boolean> res = new ResultTransport<Boolean>(false);
Message msg = obtainMessage(OVERRIDE_URL);
msg.getData().putString("url",... | boolean function(String url) { ResultTransport<Boolean> res = new ResultTransport<Boolean>(false); Message msg = obtainMessage(OVERRIDE_URL); msg.getData().putString("url", url); msg.obj = res; synchronized (this) { sendMessage(msg); try { wait(); } catch (InterruptedException e) { Log.e(LOGTAG, STR); Log.e(LOGTAG, Log... | /**
* Called by the WebCore side
*/ | Called by the WebCore side | shouldOverrideUrlLoading | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/core/java/android/webkit/CallbackProxy.java",
"license": "gpl-3.0",
"size": 65821
} | [
"android.os.Message",
"android.util.Log"
] | import android.os.Message; import android.util.Log; | import android.os.*; import android.util.*; | [
"android.os",
"android.util"
] | android.os; android.util; | 2,785,294 |
ResultList fragment = new ResultList();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
public ResultList() {
// Required empty public constructor
} | ResultList fragment = new ResultList(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } public ResultList() { } | /**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment ResultList.
*/ | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "robrotheram/iseeApp",
"path": "app/src/main/java/iseeapp/co/iseeapp/ResultList.java",
"license": "apache-2.0",
"size": 3342
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,215,758 |
public void slideToAndCenter( double x, double y ) {
Point point = positionManager.translate( x, y, getScale() );
slideToAndCenter( point );
}
| void function( double x, double y ) { Point point = positionManager.translate( x, y, getScale() ); slideToAndCenter( point ); } | /**
* Scrolls (with animation) the TileView to the x and y positions provided, then centers the viewport to the position.
* @param x (double) the relative x position to move to
* @param y (double) the relative y position to move to
*/ | Scrolls (with animation) the TileView to the x and y positions provided, then centers the viewport to the position | slideToAndCenter | {
"repo_name": "0359xiaodong/TileView",
"path": "src/com/qozix/tileview/TileView.java",
"license": "mit",
"size": 49579
} | [
"android.graphics.Point"
] | import android.graphics.Point; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 324,019 |
public static void goSearch(Activity activity) {
activity.startSearch(null, false, Bundle.EMPTY, false);
} | static void function(Activity activity) { activity.startSearch(null, false, Bundle.EMPTY, false); } | /**
* Invoke "search" action, triggering a default search.
*/ | Invoke "search" action, triggering a default search | goSearch | {
"repo_name": "underhilllabs/iosched",
"path": "src/com/google/android/apps/iosched/util/UIUtils.java",
"license": "apache-2.0",
"size": 7986
} | [
"android.app.Activity",
"android.os.Bundle"
] | import android.app.Activity; import android.os.Bundle; | import android.app.*; import android.os.*; | [
"android.app",
"android.os"
] | android.app; android.os; | 2,572,015 |
private Object getField(Class clazz, Object object, String fieldName) throws Exception {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
Field modifiersField = Field.class.getDeclaredField("modifiers");
modifiersField.setAccessible(true);
modifiers... | Object function(Class clazz, Object object, String fieldName) throws Exception { Field field = clazz.getDeclaredField(fieldName); field.setAccessible(true); Field modifiersField = Field.class.getDeclaredField(STR); modifiersField.setAccessible(true); modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);... | /**
* Gets the value of the private field
*
* @param clazz the class where the field resides
* @param object the object where the field resides
* @param fieldName the field name
* @return the {@link Object} containing the field value
* @throws Exception
*/ | Gets the value of the private field | getField | {
"repo_name": "zsmartsystems/com.zsmartsystems.zigbee",
"path": "com.zsmartsystems.zigbee.console.main/src/main/java/com/zsmartsystems/zigbee/console/main/ZigBeeConsole.java",
"license": "epl-1.0",
"size": 47517
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Modifier"
] | import java.lang.reflect.Field; import java.lang.reflect.Modifier; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,794,028 |
public static byte[] getBytes(String string, String encoding) {
try {
return string.getBytes(encoding);
} catch(UnsupportedEncodingException e) {
throw new IllegalArgumentException(encoding + " is not a known encoding name.", e);
}
} | static byte[] function(String string, String encoding) { try { return string.getBytes(encoding); } catch(UnsupportedEncodingException e) { throw new IllegalArgumentException(encoding + STR, e); } } | /**
* Translate the string to bytes using the given encoding
*
* @param string The string to translate
* @param encoding The encoding to use
* @return The bytes that make up the string
*/ | Translate the string to bytes using the given encoding | getBytes | {
"repo_name": "nassim-git/project-voldemort",
"path": "src/java/voldemort/utils/ByteUtils.java",
"license": "apache-2.0",
"size": 14742
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 257,771 |
protected Collection<U> initIterable(Iterable<T> sources) {
log.debug("Create new empty collection implementation");
final int size = initialCapacity(sources);
log.trace(" - Initial size: {}", size);
Collection<U> emptyCollection = size < 0 ? new LinkedList<U>() : new ArrayList<U>(size);
log.trace(" - Co... | Collection<U> function(Iterable<T> sources) { log.debug(STR); final int size = initialCapacity(sources); log.trace(STR, size); Collection<U> emptyCollection = size < 0 ? new LinkedList<U>() : new ArrayList<U>(size); log.trace(STR, emptyCollection.getClass()); return emptyCollection; } | /**
* Init iterable collection object.
* By default, this method create a new array list.
* Initial capacity of array list is defined by {@link #initialCapacity(Iterable)} method.
*
* Collection returned must be empty (since it will be filled later).
* Source object can be used to compute target collection ... | Init iterable collection object. By default, this method create a new array list. Initial capacity of array list is defined by <code>#initialCapacity(Iterable)</code> method. Collection returned must be empty (since it will be filled later). Source object can be used to compute target collection size | initIterable | {
"repo_name": "mjeanroy/spring-mappers",
"path": "src/main/java/com/github/mjeanroy/spring/mappers/AbstractInMemoryObjectMapper.java",
"license": "mit",
"size": 5353
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.LinkedList"
] | import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 948,308 |
Property<String> getDownloadUrl(); | Property<String> getDownloadUrl(); | /**
* The download URL of the corresponding Maven publication.
*/ | The download URL of the corresponding Maven publication | getDownloadUrl | {
"repo_name": "gradle/gradle",
"path": "subprojects/maven/src/main/java/org/gradle/api/publish/maven/MavenPomDistributionManagement.java",
"license": "apache-2.0",
"size": 1208
} | [
"org.gradle.api.provider.Property"
] | import org.gradle.api.provider.Property; | import org.gradle.api.provider.*; | [
"org.gradle.api"
] | org.gradle.api; | 2,011,563 |
public ChatChannel getChatChannel () {
return this.chatChannel;
}
| ChatChannel function () { return this.chatChannel; } | /**
* Returns the chat channel the user is in.
* @return
*/ | Returns the chat channel the user is in | getChatChannel | {
"repo_name": "Evil-Co-Legacy/Flowerpot",
"path": "proxy/src/main/java/com/evilco/flowerpot/proxy/user/User.java",
"license": "apache-2.0",
"size": 1737
} | [
"com.evilco.flowerpot.proxy.chat.channel.ChatChannel"
] | import com.evilco.flowerpot.proxy.chat.channel.ChatChannel; | import com.evilco.flowerpot.proxy.chat.channel.*; | [
"com.evilco.flowerpot"
] | com.evilco.flowerpot; | 2,891,931 |
private ArrayList<UiScannerWebElement> addAllWithID(ArrayList<UiScannerWebElement> result) {
for (WebElement elem : findAll()) {
if (!elem.getAttribute(UiScannerConstants.ATTRIBUTE_ID).equals("")) {
result = elemIntoList(result, UiScannerConstants.TYP_ALL, elem);
}
}
return result;
}
| ArrayList<UiScannerWebElement> function(ArrayList<UiScannerWebElement> result) { for (WebElement elem : findAll()) { if (!elem.getAttribute(UiScannerConstants.ATTRIBUTE_ID).equals("")) { result = elemIntoList(result, UiScannerConstants.TYP_ALL, elem); } } return result; } | /**
* adds all new WebElements with IDs to the given List.
*
* @param result
* List<UiScannerWebElement> to add the new WebElements.
* @return List<UiScannerWebElement>
*/ | adds all new WebElements with IDs to the given List | addAllWithID | {
"repo_name": "franzbecker/test-editor",
"path": "uiscanner/org.testeditor.ui.uiscanner/src/org/testeditor/ui/uiscanner/webscanner/WebScanner.java",
"license": "epl-1.0",
"size": 16114
} | [
"java.util.ArrayList",
"org.openqa.selenium.WebElement"
] | import java.util.ArrayList; import org.openqa.selenium.WebElement; | import java.util.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 1,349,738 |
public CmsGroup getParent(CmsRequestContext context, String groupname) throws CmsException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
CmsGroup result = null;
try {
result = m_driverManager.getParent(dbc, CmsOrganizationalUnit.removeLeadingSeparator(groupname)... | CmsGroup function(CmsRequestContext context, String groupname) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.getParent(dbc, CmsOrganizationalUnit.removeLeadingSeparator(groupname)); } catch (Exception e) { dbc.report(null, Messa... | /**
* Returns the parent group of a group.<p>
*
* @param context the current request context
* @param groupname the name of the group
*
* @return group the parent group or <code>null</code>
*
* @throws CmsException if operation was not successful
*/ | Returns the parent group of a group | getParent | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/db/CmsSecurityManager.java",
"license": "lgpl-2.1",
"size": 287876
} | [
"org.opencms.file.CmsGroup",
"org.opencms.file.CmsRequestContext",
"org.opencms.main.CmsException",
"org.opencms.security.CmsOrganizationalUnit"
] | import org.opencms.file.CmsGroup; import org.opencms.file.CmsRequestContext; import org.opencms.main.CmsException; import org.opencms.security.CmsOrganizationalUnit; | import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; | [
"org.opencms.file",
"org.opencms.main",
"org.opencms.security"
] | org.opencms.file; org.opencms.main; org.opencms.security; | 2,580,069 |
@Nonnull
public PresetBuffer writeIntegerArray(int[] values) {
return this.writeArray(ArrayUtils.toObject(values), PresetBuffer::writeInteger);
} | PresetBuffer function(int[] values) { return this.writeArray(ArrayUtils.toObject(values), PresetBuffer::writeInteger); } | /**
* Writes an array of integers into the buffer.
*
* @see #writeArray(Object[], BiConsumer)
*/ | Writes an array of integers into the buffer | writeIntegerArray | {
"repo_name": "dotStart/Pandemonium",
"path": "preset/src/main/java/tv/dotstart/pandemonium/preset/PresetBuffer.java",
"license": "apache-2.0",
"size": 18094
} | [
"org.apache.commons.lang3.ArrayUtils"
] | import org.apache.commons.lang3.ArrayUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,276,041 |
@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]
{
// Input Value as a long; Expected byte[] in ASN.1
// 0
{BigInteger.ZERO, Longs.toByteArray(0L)},
// 1
{BigInteger.ONE, Longs.toByteArray(1L)},
... | static Collection<Object[]> function() { return Arrays.asList(new Object[][] { {BigInteger.ZERO, Longs.toByteArray(0L)}, {BigInteger.ONE, Longs.toByteArray(1L)}, {new BigInteger("2"), Longs.toByteArray(2L)}, {new BigInteger("254"), Longs.toByteArray(254L)}, {new BigInteger("255"), Longs.toByteArray(255L)}, {new BigInte... | /**
* The data for this test...
*/ | The data for this test.. | data | {
"repo_name": "interledger/java-ilp-core",
"path": "src/test/java/org/interledger/codecs/oer/OerUint64CodecTest.java",
"license": "apache-2.0",
"size": 7342
} | [
"com.google.common.primitives.Longs",
"java.math.BigInteger",
"java.util.Arrays",
"java.util.Collection"
] | import com.google.common.primitives.Longs; import java.math.BigInteger; import java.util.Arrays; import java.util.Collection; | import com.google.common.primitives.*; import java.math.*; import java.util.*; | [
"com.google.common",
"java.math",
"java.util"
] | com.google.common; java.math; java.util; | 2,784,494 |
Rule TexTextIfield() {
return ZeroOrMore(FirstOf(WSP(), CharRange('!', '['),
CharRange('^', '~'), LatinExtendedAndOtherAlphabet(), TexEscape()))
.label(TexText).suppressSubnodes();
}
| Rule TexTextIfield() { return ZeroOrMore(FirstOf(WSP(), CharRange('!', '['), CharRange('^', '~'), LatinExtendedAndOtherAlphabet(), TexEscape())) .label(TexText).suppressSubnodes(); } | /**
* tex-text-ifield ::= *(WSP / %21-%5B / %5E-7E / tex-escape)
* <p>as above, but except ]
*/ | tex-text-ifield ::= *(WSP / %21-%5B / %5E-7E / tex-escape) as above, but except ] | TexTextIfield | {
"repo_name": "Sciss/abc4j",
"path": "abc/src/main/java/abc/parser/AbcGrammar.java",
"license": "lgpl-3.0",
"size": 72845
} | [
"org.parboiled.Rule"
] | import org.parboiled.Rule; | import org.parboiled.*; | [
"org.parboiled"
] | org.parboiled; | 736,073 |
public Set<String> getUncountables() {
return uncountables;
} | Set<String> function() { return uncountables; } | /**
* Get the set of words that are not processed by the Inflector. The resulting map is directly modifiable.
*
* @return the set of uncountable words
*/ | Get the set of words that are not processed by the Inflector. The resulting map is directly modifiable | getUncountables | {
"repo_name": "eug48/hapi-fhir",
"path": "hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/utilities/Inflector.java",
"license": "apache-2.0",
"size": 28238
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,070,849 |
public void ramasser(int ref1, int ref2) throws RemoteException {
try {
//recupere le combattant et l'objet
int port1 = port+ref1;
int port2 = port+ref2;
String ip1 = ipAddrConsoles.get(ref1);
String ip2 = ipAddrConsoles.get(ref2);
Remote combattant = Naming.lookup("rmi://"+ip1+"... | void function(int ref1, int ref2) throws RemoteException { try { int port1 = port+ref1; int port2 = port+ref2; String ip1 = ipAddrConsoles.get(ref1); String ip2 = ipAddrConsoles.get(ref2); Remote combattant = Naming.lookup(STRrmi: Element equip = ((IConsole)objet).getElement(); Element personne = ((IConsole) combattant... | /**
* Appele par le run de la console. Permet a l'element ref1 (Personne) de ramasser l'element ref2 (Equipement).
* Si l'equipement est trop lourd, il n'est pas ramasse, mais ajoute aux elements deja vus.
* Si l'equimement est ramasse, il modifie les caracteristiques de la personne.
*/ | Appele par le run de la console. Permet a l'element ref1 (Personne) de ramasser l'element ref2 (Equipement). Si l'equipement est trop lourd, il n'est pas ramasse, mais ajoute aux elements deja vus. Si l'equimement est ramasse, il modifie les caracteristiques de la personne | ramasser | {
"repo_name": "NitriKx/L3-Projet-Programmation-Objet",
"path": "src/serveur/Arene.java",
"license": "apache-2.0",
"size": 12708
} | [
"java.net.MalformedURLException",
"java.rmi.Naming",
"java.rmi.NotBoundException",
"java.rmi.Remote",
"java.rmi.RemoteException"
] | import java.net.MalformedURLException; import java.rmi.Naming; import java.rmi.NotBoundException; import java.rmi.Remote; import java.rmi.RemoteException; | import java.net.*; import java.rmi.*; | [
"java.net",
"java.rmi"
] | java.net; java.rmi; | 1,323,564 |
public boolean onWanded(EntityPlayer player, ItemStack wand) {
return false;
}
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {} | boolean function(EntityPlayer player, ItemStack wand) { return false; } public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {} | /**
* Called when a Wand of the Forest is used on this sub tile. Note that the
* player parameter can be null if this is called from a dispenser.
*/ | Called when a Wand of the Forest is used on this sub tile. Note that the player parameter can be null if this is called from a dispenser | onWanded | {
"repo_name": "rolandoislas/PeripheralsPlusPlus",
"path": "src/api/java/vazkii/botania/api/subtile/SubTileEntity.java",
"license": "gpl-2.0",
"size": 7310
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 761,617 |
public static Type getType(final Constructor<?> c) {
return getType(getConstructorDescriptor(c));
} | static Type function(final Constructor<?> c) { return getType(getConstructorDescriptor(c)); } | /**
* Returns the Java method type corresponding to the given constructor.
*
* @param c
* a {@link Constructor Constructor} object.
* @return the Java method type corresponding to the given constructor.
*/ | Returns the Java method type corresponding to the given constructor | getType | {
"repo_name": "myking520/gamefm",
"path": "gamefm-db/src/java/main/org/objectweb/asm/Type.java",
"license": "bsd-2-clause",
"size": 25251
} | [
"java.lang.reflect.Constructor"
] | import java.lang.reflect.Constructor; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 325,302 |
public Iterator<String> keys() {
return this.keySet().iterator();
} | Iterator<String> function() { return this.keySet().iterator(); } | /**
* Get an enumeration of the keys of the JSONObject.
*
* @return An iterator of the keys.
*/ | Get an enumeration of the keys of the JSONObject | keys | {
"repo_name": "qqTYXn7/browserprint",
"path": "src/org/json/JSONObject.java",
"license": "mit",
"size": 58038
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 442,383 |
List<ComponentName> queryIntentActivities(Intent intent); | List<ComponentName> queryIntentActivities(Intent intent); | /**
* Get the list of component name of activities which can resolve |intent|.
*/ | Get the list of component name of activities which can resolve |intent| | queryIntentActivities | {
"repo_name": "sgraham/nope",
"path": "chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java",
"license": "bsd-3-clause",
"size": 2937
} | [
"android.content.ComponentName",
"android.content.Intent",
"java.util.List"
] | import android.content.ComponentName; import android.content.Intent; import java.util.List; | import android.content.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 1,662,467 |
private boolean hasRolePermission(String application, String action, String entityName, EntityCondition condition, GenericValue userLogin) {
if (userLogin == null) {
return false;
}
// first check the standard permission
if (hasEntityPermission(app... | boolean function(String application, String action, String entityName, EntityCondition condition, GenericValue userLogin) { if (userLogin == null) { return false; } if (hasEntityPermission(application, action, userLogin)) { return true; } if (entityName == null condition == null) { return false; } if (hasEntityPermissi... | /**
* Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
* general administration permission, but also checks action_ROLE and validates the user is a member for the
* application.
*
* @param application The name ... | Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified general administration permission, but also checks action_ROLE and validates the user is a member for the application | hasRolePermission | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-17.12.04/framework/security/src/main/java/org/apache/ofbiz/security/SecurityFactory.java",
"license": "apache-2.0",
"size": 13476
} | [
"java.util.List",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.entity.GenericEntityException",
"org.apache.ofbiz.entity.GenericValue",
"org.apache.ofbiz.entity.condition.EntityCondition",
"org.apache.ofbiz.entity.util.EntityQuery"
] | import java.util.List; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.entity.GenericEntityException; import org.apache.ofbiz.entity.GenericValue; import org.apache.ofbiz.entity.condition.EntityCondition; import org.apache.ofbiz.entity.util.EntityQuery; | import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.entity.condition.*; import org.apache.ofbiz.entity.util.*; | [
"java.util",
"org.apache.ofbiz"
] | java.util; org.apache.ofbiz; | 307,565 |
@Override
protected void onNewIntent (Intent intent) {
Log_OC.d(TAG, "onNewIntent()");
Uri data = intent.getData();
if (data != null && data.toString().startsWith(getString(R.string.oauth2_redirect_uri))) {
mNewCapturedUriFromOAuth2Redirection = data;
}
}
... | void function (Intent intent) { Log_OC.d(TAG, STR); Uri data = intent.getData(); if (data != null && data.toString().startsWith(getString(R.string.oauth2_redirect_uri))) { mNewCapturedUriFromOAuth2Redirection = data; } } | /**
* The redirection triggered by the OAuth authentication server as response to the
* GET AUTHORIZATION request is caught here.
*
* To make this possible, this activity needs to be qualified with android:launchMode =
* "singleTask" in the AndroidManifest.xml file.
*/ | The redirection triggered by the OAuth authentication server as response to the GET AUTHORIZATION request is caught here. To make this possible, this activity needs to be qualified with android:launchMode = "singleTask" in the AndroidManifest.xml file | onNewIntent | {
"repo_name": "maduhu/android",
"path": "src/com/owncloud/android/authentication/AuthenticatorActivity.java",
"license": "gpl-2.0",
"size": 76292
} | [
"android.content.Intent",
"android.net.Uri"
] | import android.content.Intent; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 1,020,083 |
@Override
public Boolean visitTypeArgs(final AnnotatedDeclaredType subtype, final AnnotatedDeclaredType supertype,
final VisitHistory visited, final boolean subtypeIsRaw, final boolean supertypeIsRaw) {
boolean ignoreTypeArgs = ignoreRawTypes && (subtyp... | Boolean function(final AnnotatedDeclaredType subtype, final AnnotatedDeclaredType supertype, final VisitHistory visited, final boolean subtypeIsRaw, final boolean supertypeIsRaw) { boolean ignoreTypeArgs = ignoreRawTypes && (subtypeIsRaw supertypeIsRaw); if (!ignoreTypeArgs) { if (supertype.hasEffectiveAnnotation(MUTAB... | /**
* Uses the JLS specification (as implemented in {@link org.checkerframework.framework.type.DefaultTypeHierarchy},
* if the variable type, lhs, is mutable; otherwise, allows the type
* arguments to change while maintaining subtype relationship.
*
* This allows for subtypi... | Uses the JLS specification (as implemented in <code>org.checkerframework.framework.type.DefaultTypeHierarchy</code>, if the variable type, lhs, is mutable; otherwise, allows the type arguments to change while maintaining subtype relationship. This allows for subtyping relationships of the kind: <code> @Mutable List<... | visitTypeArgs | {
"repo_name": "KahanPrabhu/ICSE-2011-Checker-Framework",
"path": "checker/src/org/checkerframework/checker/igj/IGJAnnotatedTypeFactory.java",
"license": "gpl-2.0",
"size": 43128
} | [
"org.checkerframework.framework.type.AnnotatedTypeMirror",
"org.checkerframework.framework.type.visitor.VisitHistory"
] | import org.checkerframework.framework.type.AnnotatedTypeMirror; import org.checkerframework.framework.type.visitor.VisitHistory; | import org.checkerframework.framework.type.*; import org.checkerframework.framework.type.visitor.*; | [
"org.checkerframework.framework"
] | org.checkerframework.framework; | 2,490,966 |
private void prepareAtomic(String key) throws Exception {
// Start nodes.
for (int i = 0; i < INIT_GRID_NUM; i++)
assert startGrid(i) != null;
for (int i = 0; i < INIT_GRID_NUM; i++)
assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfig... | void function(String key) throws Exception { for (int i = 0; i < INIT_GRID_NUM; i++) assert startGrid(i) != null; for (int i = 0; i < INIT_GRID_NUM; i++) assert PARTITIONED == grid(i).cache(DEFAULT_CACHE_NAME).getConfiguration(CacheConfiguration.class).getCacheMode(); grid(0).atomicLong(key, 0, true).getAndSet(INIT_GRI... | /**
* Prepare test environment.
* @param key Key.
* @throws Exception If failed.
*/ | Prepare test environment | prepareAtomic | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java",
"license": "apache-2.0",
"size": 9387
} | [
"org.apache.ignite.configuration.CacheConfiguration"
] | import org.apache.ignite.configuration.CacheConfiguration; | import org.apache.ignite.configuration.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,842,136 |
private void buildLexiconMessagePanel() {
// Creates the lexicon message panel
_lexiconMessagePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
// Sets the lexicon message panel border
_lexiconMessagePanel.setBorder(BorderFactory.createEtchedBorder());
// Creates the lexicon message label
... | void function() { _lexiconMessagePanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); _lexiconMessagePanel.setBorder(BorderFactory.createEtchedBorder()); _lexiconMessageLabel = new JLabel(" "); _lexiconMessagePanel.add(_lexiconMessageLabel); } | /**
* Builds the ACIDE - A Configurable IDE status bar lexicon message panel.
*/ | Builds the ACIDE - A Configurable IDE status bar lexicon message panel | buildLexiconMessagePanel | {
"repo_name": "salcedonia/acide-0-8-release-2010-2011",
"path": "acide/src/acide/gui/statusBarPanel/AcideStatusBar.java",
"license": "gpl-3.0",
"size": 26209
} | [
"java.awt.FlowLayout",
"javax.swing.BorderFactory",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.FlowLayout; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,008,847 |
public static String toXml(Object root, String encoding) {
Class clazz = Reflections.getUserClass(root);
return toXml(root, clazz, encoding);
} | static String function(Object root, String encoding) { Class clazz = Reflections.getUserClass(root); return toXml(root, clazz, encoding); } | /**
* Java Object->Xml with encoding.
*/ | Java Object->Xml with encoding | toXml | {
"repo_name": "seeyoui/kensite_cms",
"path": "src/main/java/com/seeyoui/kensite/common/base/persistence/JaxbMapper.java",
"license": "apache-2.0",
"size": 4730
} | [
"com.seeyoui.kensite.common.util.Reflections"
] | import com.seeyoui.kensite.common.util.Reflections; | import com.seeyoui.kensite.common.util.*; | [
"com.seeyoui.kensite"
] | com.seeyoui.kensite; | 88,274 |
private static void intializeOfflineItemsCollection() {
OfflineContentProvider offlineContentProvider = OfflineContentAggregatorFactory.get();
offlineContentProvider.getAllItems(offlineItems -> {});
} | static void function() { OfflineContentProvider offlineContentProvider = OfflineContentAggregatorFactory.get(); offlineContentProvider.getAllItems(offlineItems -> {}); } | /**
* TODO(shaktisahu): Remove this function when offline pages backend cache loading is fixed.
*/ | TODO(shaktisahu): Remove this function when offline pages backend cache loading is fixed | intializeOfflineItemsCollection | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/offlinepages/downloads/OfflinePageNotificationBridge.java",
"license": "bsd-3-clause",
"size": 9981
} | [
"org.chromium.chrome.browser.download.items.OfflineContentAggregatorFactory",
"org.chromium.components.offline_items_collection.OfflineContentProvider"
] | import org.chromium.chrome.browser.download.items.OfflineContentAggregatorFactory; import org.chromium.components.offline_items_collection.OfflineContentProvider; | import org.chromium.chrome.browser.download.items.*; import org.chromium.components.offline_items_collection.*; | [
"org.chromium.chrome",
"org.chromium.components"
] | org.chromium.chrome; org.chromium.components; | 269,146 |
private void assertIsRemovedToInvisible(
final DefaultTableColumnModelExt columnModel, final int index,
final boolean expected) {
// can't use report: the isRemovedToInvisible is valid during notification only
TableColumnModelListener report = new TableColumnModelListener() { | void function( final DefaultTableColumnModelExt columnModel, final int index, final boolean expected) { TableColumnModelListener report = new TableColumnModelListener() { | /**
* Wire a TableColumnModelListener to test isRemovedToInvisible.
* Note: can't use ColumnModelReport because valid only during notification.
*
* @param columnModel the model to listen to
* @param index the index in the event to test
* @param expected the expected result of isRe... | Wire a TableColumnModelListener to test isRemovedToInvisible. Note: can't use ColumnModelReport because valid only during notification | assertIsRemovedToInvisible | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/test/java/org/jdesktop/swingx/table/TableColumnModelTest.java",
"license": "lgpl-2.1",
"size": 20090
} | [
"javax.swing.event.TableColumnModelListener"
] | import javax.swing.event.TableColumnModelListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 1,108,728 |
public static Writer nullWriter() {
return NullWriter.INSTANCE;
}
private static final class NullWriter extends Writer {
private static final NullWriter INSTANCE = new NullWriter();
@Override
public void write(int c) {} | static Writer function() { return NullWriter.INSTANCE; } private static final class NullWriter extends Writer { private static final NullWriter INSTANCE = new NullWriter(); public void write(int c) {} | /**
* Returns a {@link Writer} that simply discards written chars.
*
* @since 15.0
*/ | Returns a <code>Writer</code> that simply discards written chars | nullWriter | {
"repo_name": "Xaerxess/guava",
"path": "guava/src/com/google/common/io/CharStreams.java",
"license": "apache-2.0",
"size": 11008
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,577 |
Collection<String> getSharedConnectionIds() throws CoreException; | Collection<String> getSharedConnectionIds() throws CoreException; | /**
* Get all the connection unique-ids that are currently registered as a shared connection.
*
* @return collection of connectionIds
* @throws CoreException wrapping any other exception
*/ | Get all the connection unique-ids that are currently registered as a shared connection | getSharedConnectionIds | {
"repo_name": "adaptris/interlok",
"path": "interlok-core/src/main/java/com/adaptris/core/runtime/AdapterManagerMBean.java",
"license": "apache-2.0",
"size": 10457
} | [
"com.adaptris.core.CoreException",
"java.util.Collection"
] | import com.adaptris.core.CoreException; import java.util.Collection; | import com.adaptris.core.*; import java.util.*; | [
"com.adaptris.core",
"java.util"
] | com.adaptris.core; java.util; | 2,870,060 |
private JsDocInfoParser createJsDocInfoParser(Comment node) {
String comment = node.value;
int lineno = lineno(node.location.start);
int charno = charno(node.location.start);
int position = node.location.start.offset;
// The JsDocInfoParser expects the comment without the initial '/**'.
int n... | JsDocInfoParser function(Comment node) { String comment = node.value; int lineno = lineno(node.location.start); int charno = charno(node.location.start); int position = node.location.start.offset; int numOpeningChars = 3; JsDocInfoParser jsdocParser = new JsDocInfoParser( new JsDocTokenStream(comment.substring(numOpeni... | /**
* Creates a JsDocInfoParser and parses the JsDoc string.
*
* Used both for handling individual JSDoc comments and for handling
* file-level JSDoc comments (@fileoverview and @license).
*
* @param node The JsDoc Comment node to parse.
* @return A JsDocInfoParser. Will contain either fileoverview... | Creates a JsDocInfoParser and parses the JsDoc string. Used both for handling individual JSDoc comments and for handling file-level JSDoc comments (@fileoverview and @license) | createJsDocInfoParser | {
"repo_name": "tdelmas/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/IRFactory.java",
"license": "apache-2.0",
"size": 123213
} | [
"com.google.javascript.jscomp.parsing.parser.trees.Comment"
] | import com.google.javascript.jscomp.parsing.parser.trees.Comment; | import com.google.javascript.jscomp.parsing.parser.trees.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,765,027 |
private void resolveKeyringIsakmpProfileAddresses() {
Map<String, Ip> ifaceNameToPrimaryIp = computeInterfaceOwnedPrimaryIp(_interfaces);
_keyrings.values().stream()
.filter(keyring -> !keyring.getLocalInterfaceName().equals(UNSET_LOCAL_INTERFACE))
.forEach(
keyring ->
... | void function() { Map<String, Ip> ifaceNameToPrimaryIp = computeInterfaceOwnedPrimaryIp(_interfaces); _keyrings.values().stream() .filter(keyring -> !keyring.getLocalInterfaceName().equals(UNSET_LOCAL_INTERFACE)) .forEach( keyring -> keyring.setLocalAddress( firstNonNull( ifaceNameToPrimaryIp.get(keyring.getLocalInterf... | /**
* Resolves the addresses of the interfaces used in localInterfaceName of IsaKmpProfiles and
* Keyrings
*/ | Resolves the addresses of the interfaces used in localInterfaceName of IsaKmpProfiles and Keyrings | resolveKeyringIsakmpProfileAddresses | {
"repo_name": "arifogel/batfish",
"path": "projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConfiguration.java",
"license": "apache-2.0",
"size": 160892
} | [
"java.util.Map",
"org.apache.commons.lang3.ObjectUtils",
"org.batfish.datamodel.Ip"
] | import java.util.Map; import org.apache.commons.lang3.ObjectUtils; import org.batfish.datamodel.Ip; | import java.util.*; import org.apache.commons.lang3.*; import org.batfish.datamodel.*; | [
"java.util",
"org.apache.commons",
"org.batfish.datamodel"
] | java.util; org.apache.commons; org.batfish.datamodel; | 77,866 |
public void setPriceType(int value) {
this.priceType = value;
}
/**
* Gets the value of the priceSigmaValue property.
*
* @return
... | void function(int value) { this.priceType = value; } /** * Gets the value of the priceSigmaValue property. * * * possible object is * {@link BigDecimal } | /**
* Sets the value of the priceType property.
*
*/ | Sets the value of the priceType property | setPriceType | {
"repo_name": "simokhov/schemas44",
"path": "src/main/java/ru/gov/zakupki/oos/types/_1/ZfcsNsiFarmDrugDictionary.java",
"license": "mit",
"size": 300150
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,575,448 |
public void setTitleBarComponentpainter(final Color color) {
getRootWindow().getRootWindowProperties()
.getViewProperties()
.getViewTitleBarProperties()
.getNormalProperties()
.getShapedPanelProperties()
.setComponentPainter(new... | void function(final Color color) { getRootWindow().getRootWindowProperties() .getViewProperties() .getViewTitleBarProperties() .getNormalProperties() .getShapedPanelProperties() .setComponentPainter(new GradientComponentPainter( color, new Color(236, 233, 216), color, new Color(236, 233, 216))); } | /**
* DOCUMENT ME!
*
* @param color DOCUMENT ME!
*/ | DOCUMENT ME | setTitleBarComponentpainter | {
"repo_name": "cismet/belis-client",
"path": "src/main/java/de/cismet/belis/broker/BelisBroker.java",
"license": "gpl-3.0",
"size": 138018
} | [
"java.awt.Color",
"net.infonode.gui.componentpainter.GradientComponentPainter"
] | import java.awt.Color; import net.infonode.gui.componentpainter.GradientComponentPainter; | import java.awt.*; import net.infonode.gui.componentpainter.*; | [
"java.awt",
"net.infonode.gui"
] | java.awt; net.infonode.gui; | 69,588 |
@Override
protected String getLivingSound() {
return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + "birdhurt";
} | String function() { return DefaultProps.mobKey + ":" + DefaultProps.entitySounds + STR; } | /**
* Returns the sound this mob makes while it's alive.
*/ | Returns the sound this mob makes while it's alive | getLivingSound | {
"repo_name": "soultek101/projectzulu1.7.10",
"path": "src/main/java/com/stek101/projectzulu/common/mobs/entity/EntityFinch.java",
"license": "lgpl-2.1",
"size": 6181
} | [
"com.stek101.projectzulu.common.core.DefaultProps"
] | import com.stek101.projectzulu.common.core.DefaultProps; | import com.stek101.projectzulu.common.core.*; | [
"com.stek101.projectzulu"
] | com.stek101.projectzulu; | 796,148 |
public static FileSystem get(Configuration conf) throws IOException {
return get(getDefaultUri(conf), conf);
} | static FileSystem function(Configuration conf) throws IOException { return get(getDefaultUri(conf), conf); } | /**
* Returns the configured filesystem implementation.
* @param conf the configuration to use
*/ | Returns the configured filesystem implementation | get | {
"repo_name": "ouyangjie/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java",
"license": "apache-2.0",
"size": 116983
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; | import java.io.*; import org.apache.hadoop.conf.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,213,051 |
public void setModified(Date modifiedIn) {
this.modified = modifiedIn;
}
/**
* {@inheritDoc} | void function(Date modifiedIn) { this.modified = modifiedIn; } /** * {@inheritDoc} | /**
* Setter for modified
* @param modifiedIn to set
*/ | Setter for modified | setModified | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/channel/PrivateChannelFamily.java",
"license": "gpl-2.0",
"size": 3010
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 25,341 |
public long getFileSize() throws IOException, FileNotFoundException {
return fileSystem.getFileSize(this, true);
} | long function() throws IOException, FileNotFoundException { return fileSystem.getFileSize(this, true); } | /**
* Returns the size in bytes of the file denoted by the current path,
* following symbolic links.
*
* <p>The size of a directory or special file is undefined and should not be used.
*
* @throws FileNotFoundException if the file denoted by the current path does
* not exist
* @throws IO... | Returns the size in bytes of the file denoted by the current path, following symbolic links. The size of a directory or special file is undefined and should not be used | getFileSize | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/vfs/Path.java",
"license": "apache-2.0",
"size": 41879
} | [
"java.io.FileNotFoundException",
"java.io.IOException"
] | import java.io.FileNotFoundException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,704,274 |
public void testDynamicTargetSource() throws NoSuchMethodException {
// Install facade
CountingTxManager txMan = new CountingTxManager();
PlatformTransactionManagerFacade.delegate = txMan;
TestBean tb = (TestBean) factory.getBean("hotSwapped");
assertEquals(666, tb.getAge());
int newAge = 557;
tb.se... | void function() throws NoSuchMethodException { CountingTxManager txMan = new CountingTxManager(); PlatformTransactionManagerFacade.delegate = txMan; TestBean tb = (TestBean) factory.getBean(STR); assertEquals(666, tb.getAge()); int newAge = 557; tb.setAge(newAge); assertEquals(newAge, tb.getAge()); TestBean target2 = n... | /**
* Test that we can set the target to a dynamic TargetSource.
*/ | Test that we can set the target to a dynamic TargetSource | testDynamicTargetSource | {
"repo_name": "dachengxi/spring1.1.1_source",
"path": "test/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java",
"license": "mit",
"size": 8122
} | [
"org.springframework.aop.support.StaticMethodMatcherPointcut",
"org.springframework.aop.target.HotSwappableTargetSource",
"org.springframework.beans.TestBean",
"org.springframework.transaction.CountingTxManager"
] | import org.springframework.aop.support.StaticMethodMatcherPointcut; import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.beans.TestBean; import org.springframework.transaction.CountingTxManager; | import org.springframework.aop.support.*; import org.springframework.aop.target.*; import org.springframework.beans.*; import org.springframework.transaction.*; | [
"org.springframework.aop",
"org.springframework.beans",
"org.springframework.transaction"
] | org.springframework.aop; org.springframework.beans; org.springframework.transaction; | 2,853,911 |
public synchronized void add(CompoundStat stat, MetricConfig config) {
this.stats.add(Utils.notNull(stat));
for (NamedMeasurable m : stat.stats()) {
// 创建KafkaMetric对象
KafkaMetric metric = new KafkaMetric(this, m.name(), m.stat(), config == null ? this.config : config, time);... | synchronized void function(CompoundStat stat, MetricConfig config) { this.stats.add(Utils.notNull(stat)); for (NamedMeasurable m : stat.stats()) { KafkaMetric metric = new KafkaMetric(this, m.name(), m.stat(), config == null ? this.config : config, time); this.registry.registerMetric(metric); this.metrics.add(metric); ... | /**
* Register a compound statistic with this sensor which yields multiple measurable quantities (like a histogram)
* @param stat The stat to register
* @param config The configuration for this stat. If null then the stat will use the default configuration for this
* sensor.
*/ | Register a compound statistic with this sensor which yields multiple measurable quantities (like a histogram) | add | {
"repo_name": "YMCoding/kafka-0.11.0.0-src-with-comment",
"path": "clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java",
"license": "apache-2.0",
"size": 10717
} | [
"org.apache.kafka.common.metrics.CompoundStat",
"org.apache.kafka.common.utils.Utils"
] | import org.apache.kafka.common.metrics.CompoundStat; import org.apache.kafka.common.utils.Utils; | import org.apache.kafka.common.metrics.*; import org.apache.kafka.common.utils.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,400,406 |
private int calcNumberOfColumns() {
int result = 0;
if (fields != null) {
for (FieldEditor f : fields) {
result = Math.max(result, f.getNumberOfControls());
}
}
return result;
} | int function() { int result = 0; if (fields != null) { for (FieldEditor f : fields) { result = Math.max(result, f.getNumberOfControls()); } } return result; } | /**
* Calculates the number of columns needed to host all field editors.
*
* @author manbaum
* @since Oct 22, 2014
* @return the number of columns.
*/ | Calculates the number of columns needed to host all field editors | calcNumberOfColumns | {
"repo_name": "manbaum/dnw-depmap",
"path": "src/main/java/com/dnw/plugin/preference/GroupFieldEditor.java",
"license": "epl-1.0",
"size": 7225
} | [
"org.eclipse.jface.preference.FieldEditor"
] | import org.eclipse.jface.preference.FieldEditor; | import org.eclipse.jface.preference.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 136,720 |
public java.util.List<View> getCells()
{
if ( this.cells == null )
{
this.cells = new java.util.ArrayList<View>();
}
return this.cells;
} //-- java.util.List<View> getCells() | java.util.List<View> function() { if ( this.cells == null ) { this.cells = new java.util.ArrayList<View>(); } return this.cells; } | /**
* Method getCells.
*
* @return List
*/ | Method getCells | getCells | {
"repo_name": "zhv/webix-api",
"path": "src/main/java/com/webix/ui/model/layouts/Multiview.java",
"license": "bsd-3-clause",
"size": 5672
} | [
"com.webix.ui.model.View",
"com.webix.ui.model.data.List"
] | import com.webix.ui.model.View; import com.webix.ui.model.data.List; | import com.webix.ui.model.*; import com.webix.ui.model.data.*; | [
"com.webix.ui"
] | com.webix.ui; | 588,637 |
public AroundInvokeType<SessionBeanType<T>> getOrCreateAroundInvoke()
{
List<Node> nodeList = childNode.get("around-invoke");
if (nodeList != null && nodeList.size() > 0)
{
return new AroundInvokeTypeImpl<SessionBeanType<T>>(this, "around-invoke", childNode, nodeList.get(0));
}
... | AroundInvokeType<SessionBeanType<T>> function() { List<Node> nodeList = childNode.get(STR); if (nodeList != null && nodeList.size() > 0) { return new AroundInvokeTypeImpl<SessionBeanType<T>>(this, STR, childNode, nodeList.get(0)); } return createAroundInvoke(); } | /**
* If not already created, a new <code>around-invoke</code> element will be created and returned.
* Otherwise, the first existing <code>around-invoke</code> element will be returned.
* @return the instance defined for the element <code>around-invoke</code>
*/ | If not already created, a new <code>around-invoke</code> element will be created and returned. Otherwise, the first existing <code>around-invoke</code> element will be returned | getOrCreateAroundInvoke | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/ejbjar32/SessionBeanTypeImpl.java",
"license": "epl-1.0",
"size": 107840
} | [
"java.util.List",
"org.jboss.shrinkwrap.descriptor.api.ejbjar32.AroundInvokeType",
"org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import java.util.List; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.AroundInvokeType; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.SessionBeanType; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import java.util.*; import org.jboss.shrinkwrap.descriptor.api.ejbjar32.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"java.util",
"org.jboss.shrinkwrap"
] | java.util; org.jboss.shrinkwrap; | 2,761,779 |
public static void printINFO(String message) {
print(message, Level.INFO);
} | static void function(String message) { print(message, Level.INFO); } | /**
* For logging message as Level.INFO.
*
* @param message Message to print in console and add to log file
*/ | For logging message as Level.INFO | printINFO | {
"repo_name": "GreyZact/UniversalJavaUtilities",
"path": "src/in/madalinski/util/Logg.java",
"license": "apache-2.0",
"size": 5143
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,905,578 |
public static List<String> getBusyBoxApplets(final String path) throws Exception {
return getInternals().getBusyBoxApplets(path);
} | static List<String> function(final String path) throws Exception { return getInternals().getBusyBoxApplets(path); } | /**
* This will return an List of Strings. Each string represents an applet available from BusyBox.
* <p/>
*
* @param path Path to the busybox binary that you want the list of applets from.
* @return <code>null</code> If we cannot return the list of applets.
*/ | This will return an List of Strings. Each string represents an applet available from BusyBox. | getBusyBoxApplets | {
"repo_name": "TeamBliss-LP/android_packages_apps_DeviceControl",
"path": "app/src/main/java/com/stericson/roottools/RootTools.java",
"license": "gpl-3.0",
"size": 20069
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,784,548 |
final static List<ClusterInstance> readList(File file)
throws JsonParseException, JsonMappingException, IOException {
if (!file.exists())
return null;
return JsonUtils.getObject(file, ClusterInstanceListTypeRef);
} | final static List<ClusterInstance> readList(File file) throws JsonParseException, JsonMappingException, IOException { if (!file.exists()) return null; return JsonUtils.getObject(file, ClusterInstanceListTypeRef); } | /**
* Read the a list of instances stored in JSON format
*
* @param file
* @return
* @throws JsonParseException
* @throws JsonMappingException
* @throws IOException
*/ | Read the a list of instances stored in JSON format | readList | {
"repo_name": "nvoron23/opensearchserver",
"path": "src/main/java/com/jaeksoft/searchlib/cluster/ClusterInstance.java",
"license": "gpl-3.0",
"size": 4042
} | [
"com.fasterxml.jackson.core.JsonParseException",
"com.fasterxml.jackson.databind.JsonMappingException",
"com.jaeksoft.searchlib.util.JsonUtils",
"java.io.File",
"java.io.IOException",
"java.util.List"
] | import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.jaeksoft.searchlib.util.JsonUtils; import java.io.File; import java.io.IOException; import java.util.List; | import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import com.jaeksoft.searchlib.util.*; import java.io.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.jaeksoft.searchlib",
"java.io",
"java.util"
] | com.fasterxml.jackson; com.jaeksoft.searchlib; java.io; java.util; | 1,359,639 |
public DefaultHttpClient buildNewHttpClient() {
return buildNewHttpClient(new BasicHttpParams());
} | DefaultHttpClient function() { return buildNewHttpClient(new BasicHttpParams()); } | /**
* Build new HTTP Client
*
* @return
*/ | Build new HTTP Client | buildNewHttpClient | {
"repo_name": "brunocvcunha/taskerbox",
"path": "core/src/main/java/org/brunocvcunha/taskerbox/core/http/TaskerboxHttpBox.java",
"license": "apache-2.0",
"size": 16490
} | [
"org.apache.http.impl.client.DefaultHttpClient",
"org.apache.http.params.BasicHttpParams"
] | import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.params.BasicHttpParams; | import org.apache.http.impl.client.*; import org.apache.http.params.*; | [
"org.apache.http"
] | org.apache.http; | 181,983 |
@Test
public void testUnionOnSchemaScopedColumnNameBothInp1() throws IOException, ParserException {
PigServer pig = new PigServer(ExecType.LOCAL);
String query =
" l1 = load '" + INP_FILE_2NUMS + "' as (i : int, j : int); "
+ "g1 = group l1 by i; "
+ "f1 = foreach g1 g... | void function() throws IOException, ParserException { PigServer pig = new PigServer(ExecType.LOCAL); String query = STR + INP_FILE_2NUMS + STR + STR + STR + STR + INP_FILE_2NUMS + STR + STR + STR + STR ; Util.registerMultiLineQuery(pig, query); Schema sch = pig.dumpSchema("u"); Schema expectedSch = Utils.getSchemaFromS... | /**
* Test UNION ONSCHEMA where a common column has additional 'namespace' part
* in the column name in both the inputs
* @throws IOException
* @throws ParserException
*/ | Test UNION ONSCHEMA where a common column has additional 'namespace' part in the column name in both the inputs | testUnionOnSchemaScopedColumnNameBothInp1 | {
"repo_name": "kaituo/sedge",
"path": "trunk/test/org/apache/pig/test/TestUnionOnSchema.java",
"license": "mit",
"size": 34346
} | [
"java.io.IOException",
"java.util.Iterator",
"java.util.List",
"org.apache.pig.ExecType",
"org.apache.pig.PigServer",
"org.apache.pig.data.Tuple",
"org.apache.pig.impl.logicalLayer.schema.Schema",
"org.apache.pig.impl.util.Utils",
"org.apache.pig.parser.ParserException",
"org.junit.Assert"
] | import java.io.IOException; import java.util.Iterator; import java.util.List; import org.apache.pig.ExecType; import org.apache.pig.PigServer; import org.apache.pig.data.Tuple; import org.apache.pig.impl.logicalLayer.schema.Schema; import org.apache.pig.impl.util.Utils; import org.apache.pig.parser.ParserException; imp... | import java.io.*; import java.util.*; import org.apache.pig.*; import org.apache.pig.data.*; import org.apache.pig.impl.*; import org.apache.pig.impl.util.*; import org.apache.pig.parser.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.pig",
"org.junit"
] | java.io; java.util; org.apache.pig; org.junit; | 407,178 |
public Builder addDefines(Iterable<String> defines) {
Iterables.addAll(this.defines, defines);
return this;
} | Builder function(Iterable<String> defines) { Iterables.addAll(this.defines, defines); return this; } | /**
* Adds multiple defines.
*/ | Adds multiple defines | addDefines | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompilationContext.java",
"license": "apache-2.0",
"size": 36960
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,625,884 |
@Generated
@IsOptional
@Selector("setSmartInsertDeleteType:")
default void setSmartInsertDeleteType(@NInt long value) {
throw new java.lang.UnsupportedOperationException();
} | @Selector(STR) default void setSmartInsertDeleteType(@NInt long value) { throw new java.lang.UnsupportedOperationException(); } | /**
* default is UITextSmartInsertDeleteTypeDefault;
*/ | default is UITextSmartInsertDeleteTypeDefault | setSmartInsertDeleteType | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/protocol/UITextInputTraits.java",
"license": "apache-2.0",
"size": 8048
} | [
"org.moe.natj.general.ann.NInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,006,960 |
this.path = checkHasText(path, "path cannot be null or empty");
this.index = 0;
this.offset = 0;
this.nextSplit = StringUtil.indexOf(path, '.', 0);
this.token = null;
if (nextSplit == 0) {
throw new IllegalArgumentException("The path cannot begin with a dot: " + path)... | this.path = checkHasText(path, STR); this.index = 0; this.offset = 0; this.nextSplit = StringUtil.indexOf(path, '.', 0); this.token = null; if (nextSplit == 0) { throw new IllegalArgumentException(STR + path); } } | /**
* Inits the cursor with the given path and sets the current position to the first token.
*
* @param path path to initialise the cursor with
*/ | Inits the cursor with the given path and sets the current position to the first token | init | {
"repo_name": "Donnerbart/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePathCursor.java",
"license": "apache-2.0",
"size": 4003
} | [
"com.hazelcast.util.Preconditions",
"com.hazelcast.util.StringUtil"
] | import com.hazelcast.util.Preconditions; import com.hazelcast.util.StringUtil; | import com.hazelcast.util.*; | [
"com.hazelcast.util"
] | com.hazelcast.util; | 1,895,784 |
@ApiModelProperty(required = true, value = "quantity integer")
public Long getQuantity() {
return quantity;
} | @ApiModelProperty(required = true, value = STR) Long function() { return quantity; } | /**
* quantity integer
*
* @return quantity
**/ | quantity integer | getQuantity | {
"repo_name": "burberius/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/CharacterMiningResponse.java",
"license": "apache-2.0",
"size": 4821
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,847,607 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP
* <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "NodoSoftware/Bridge",
"path": "Bridge_Primera_iteracion/src/java/Servlets/viewProblema.java",
"license": "mit",
"size": 2903
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 1,456,113 |
public void memberValuePair(int memberNameIndex) throws IOException {
write16bit(memberNameIndex);
} | void function(int memberNameIndex) throws IOException { write16bit(memberNameIndex); } | /**
* Writes an element of a <code>element_value_pairs</code> array
* in <code>annotation</code>.
* This method must be followed by a
* call to <code>constValueIndex()</code>, <code>enumConstValue()</code>,
* etc.
*
* @param memberNameIndex <code>element_name_index</code>
* ... | Writes an element of a <code>element_value_pairs</code> array in <code>annotation</code>. This method must be followed by a call to <code>constValueIndex()</code>, <code>enumConstValue()</code>, etc | memberValuePair | {
"repo_name": "yuyupapa/OpenSource",
"path": "scouter.agent.java/src/scouter/javassist/bytecode/annotation/AnnotationsWriter.java",
"license": "apache-2.0",
"size": 11254
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,870,762 |
public boolean setViewValue(View view, Object data, String textRepresentation) {
if (!imageViewIds.contains(view.getId())) {
return false;
}
// TODO(ggogol): Implement local caching on the device
String uri = (String) data;
ImageView imageView = (ImageView) view;
new DownloadImageAsyncTas... | boolean function(View view, Object data, String textRepresentation) { if (!imageViewIds.contains(view.getId())) { return false; } String uri = (String) data; ImageView imageView = (ImageView) view; new DownloadImageAsyncTask(imageView, R.drawable.ic_launcher).execute(uri); return true; } } class DownloadImageAsyncTask ... | /**
* If the view has been configured to display images downloaded from Internet, the method
* interprets the data argument as an Url, downloads the image from that Url asynchronously and
* binds it to the specified view.
*/ | If the view has been configured to display images downloaded from Internet, the method interprets the data argument as an Url, downloads the image from that Url asynchronously and binds it to the specified view | setViewValue | {
"repo_name": "hiaihua/solutions-mobile-shopping-assistant-backend-java",
"path": "MobileAssistant-Tutorial/MobileAssistant/src/com/google/samplesolutions/mobileassistant/ImageUrlViewBinder.java",
"license": "apache-2.0",
"size": 3828
} | [
"android.graphics.Bitmap",
"android.os.AsyncTask",
"android.view.View",
"android.widget.ImageView",
"java.util.logging.Logger"
] | import android.graphics.Bitmap; import android.os.AsyncTask; import android.view.View; import android.widget.ImageView; import java.util.logging.Logger; | import android.graphics.*; import android.os.*; import android.view.*; import android.widget.*; import java.util.logging.*; | [
"android.graphics",
"android.os",
"android.view",
"android.widget",
"java.util"
] | android.graphics; android.os; android.view; android.widget; java.util; | 2,779,977 |
@Test
public void processLengthSubStatements() throws IOException, ParserException {
YangNode node = manager.getDataModel("src/test/resources/LengthSubStatements.yang");
assertThat((node instanceof YangModule), is(true));
assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE));
... | void function() throws IOException, ParserException { YangNode node = manager.getDataModel(STR); assertThat((node instanceof YangModule), is(true)); assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); YangModule yangNode = (YangModule) node; assertThat(yangNode.getName(), is("Test")); ListIterator<YangLeaf> l... | /**
* Checks valid length substatements.
*/ | Checks valid length substatements | processLengthSubStatements | {
"repo_name": "maheshraju-Huawei/actn",
"path": "utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/LengthRestrictionListenerTest.java",
"license": "apache-2.0",
"size": 14077
} | [
"java.io.IOException",
"java.math.BigInteger",
"java.util.ListIterator",
"org.hamcrest.MatcherAssert",
"org.hamcrest.core.Is",
"org.junit.Test",
"org.onosproject.yangutils.datamodel.YangDataTypes",
"org.onosproject.yangutils.datamodel.YangLeaf",
"org.onosproject.yangutils.datamodel.YangModule",
"o... | import java.io.IOException; import java.math.BigInteger; import java.util.ListIterator; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.junit.Test; import org.onosproject.yangutils.datamodel.YangDataTypes; import org.onosproject.yangutils.datamodel.YangLeaf; import org.onosproject.yangutils.d... | import java.io.*; import java.math.*; import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.junit.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.datamodel.utils.builtindatatype.*; import org.onosproject.yangutils.parser.exceptions.*; | [
"java.io",
"java.math",
"java.util",
"org.hamcrest",
"org.hamcrest.core",
"org.junit",
"org.onosproject.yangutils"
] | java.io; java.math; java.util; org.hamcrest; org.hamcrest.core; org.junit; org.onosproject.yangutils; | 2,533,105 |
public void activate()
{
int state = model.getState();
switch (state) {
case NEW:
if (model.getBrowserType() == ADMIN_EXPLORER) {
model.fireExperimenterDataLoading(null);
return;
}
TreeImageDisplay node;
... | void function() { int state = model.getState(); switch (state) { case NEW: if (model.getBrowserType() == ADMIN_EXPLORER) { model.fireExperimenterDataLoading(null); return; } TreeImageDisplay node; switch (model.getDisplayMode()) { case TreeViewer.GROUP_DISPLAY: node = getDefaultGroupNode(); if (node != null) { view.exp... | /**
* Implemented as specified by the {@link Browser} interface.
* @see Browser#activate()
*/ | Implemented as specified by the <code>Browser</code> interface | activate | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78014
} | [
"org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay"
] | import org.openmicroscopy.shoola.agents.treeviewer.view.TreeViewer; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; | import org.openmicroscopy.shoola.agents.treeviewer.view.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,437,711 |
@ServiceMethod(returns = ReturnType.SINGLE)
public AzureFirewallInner updateTags(String resourceGroupName, String azureFirewallName, Map<String, String> tags) {
return updateTagsAsync(resourceGroupName, azureFirewallName, tags).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) AzureFirewallInner function(String resourceGroupName, String azureFirewallName, Map<String, String> tags) { return updateTagsAsync(resourceGroupName, azureFirewallName, tags).block(); } | /**
* Updates tags of an Azure Firewall resource.
*
* @param resourceGroupName The name of the resource group.
* @param azureFirewallName The name of the Azure Firewall.
* @param tags Resource tags.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws... | Updates tags of an Azure Firewall resource | updateTags | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/AzureFirewallsClientImpl.java",
"license": "mit",
"size": 72271
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.network.fluent.models.AzureFirewallInner",
"java.util.Map"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.AzureFirewallInner; import java.util.Map; | import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 1,294,359 |
public void writeDelay(String memName, double offset, double scale) {
checkCodeLen();
if(offset < 0.0 || offset > 1.0) {
throw new ElmProgramException("offset out of range: " + offset +
" - valid range: 0.0 to 1.0");
}
MemSegment seg = getDelayMemByName(memName);
int addr = seg.getStart(... | void function(String memName, double offset, double scale) { checkCodeLen(); if(offset < 0.0 offset > 1.0) { throw new ElmProgramException(STR + offset + STR); } MemSegment seg = getDelayMemByName(memName); int addr = seg.getStart(); if(offset == 1.0) { addr = seg.getEnd(); } else if(offset > 0.0) { addr += Math.round(... | /**
* Writes the current ACC value to the delay memory. Then scales the ACC
* by scale.
*
* @param memName the delay memory segment name
* @param offset the write position (0.0 to 1.0) within the memory segment
* @param scale the amount to scale the ACC by after writing to the delay memory
*/ | Writes the current ACC value to the delay memory. Then scales the ACC by scale | writeDelay | {
"repo_name": "pichenettes/ElmGen",
"path": "src/org/andrewkilpatrick/elmGen/ElmProgram.java",
"license": "gpl-3.0",
"size": 25234
} | [
"org.andrewkilpatrick.elmGen.instructions.WriteDelay"
] | import org.andrewkilpatrick.elmGen.instructions.WriteDelay; | import org.andrewkilpatrick.*; | [
"org.andrewkilpatrick"
] | org.andrewkilpatrick; | 1,724,239 |
protected Issuer buildIssuer()
{
IssuerBuilder issuerBuilder =
(IssuerBuilder)Configuration.getBuilderFactory()
.getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
Issuer issuer = issuerBuilder.buildObject();
issuer.setValue(_entityDescriptor.getEntityID());
... | Issuer function() { IssuerBuilder issuerBuilder = (IssuerBuilder)Configuration.getBuilderFactory() .getBuilder(Issuer.DEFAULT_ELEMENT_NAME); Issuer issuer = issuerBuilder.buildObject(); issuer.setValue(_entityDescriptor.getEntityID()); return issuer; } | /**
* Builds <code>Issuer</code> object.
*
* @return The <code>Issuer</code> object.
*/ | Builds <code>Issuer</code> object | buildIssuer | {
"repo_name": "GluuFederation/gluu-Asimba",
"path": "asimba-am-remote-saml2/src/main/java/com/alfaariss/oa/authentication/remote/saml2/profile/AbstractAuthNMethodSAML2Profile.java",
"license": "agpl-3.0",
"size": 45404
} | [
"org.opensaml.Configuration",
"org.opensaml.saml2.core.Issuer",
"org.opensaml.saml2.core.impl.IssuerBuilder"
] | import org.opensaml.Configuration; import org.opensaml.saml2.core.Issuer; import org.opensaml.saml2.core.impl.IssuerBuilder; | import org.opensaml.*; import org.opensaml.saml2.core.*; import org.opensaml.saml2.core.impl.*; | [
"org.opensaml",
"org.opensaml.saml2"
] | org.opensaml; org.opensaml.saml2; | 2,769,927 |
private static int getBytesPerPixel(Config config) {
if (config == Config.ARGB_8888) {
return 4;
} else if (config == Config.RGB_565) {
return 2;
} else if (config == Config.ARGB_4444) {
return 2;
} else if (config == Config.ALPHA_8) {
... | static int function(Config config) { if (config == Config.ARGB_8888) { return 4; } else if (config == Config.RGB_565) { return 2; } else if (config == Config.ARGB_4444) { return 2; } else if (config == Config.ALPHA_8) { return 1; } return 1; } | /**
* Return the byte usage per pixel of a bitmap based on its configuration.
* @param config The bitmap configuration.
* @return The byte usage per pixel.
*/ | Return the byte usage per pixel of a bitmap based on its configuration | getBytesPerPixel | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "developers/samples/android/ui/graphics/DisplayingBitmaps/Application/src/main/java/com/example/android/displayingbitmaps/util/ImageCache.java",
"license": "gpl-3.0",
"size": 29225
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,793,764 |
public Drawer getDrawer() {
return drawer;
} | Drawer function() { return drawer; } | /**
* Returns currently assigned drawer object.
*
* @return currently assigned drawer object.
*/ | Returns currently assigned drawer object | getDrawer | {
"repo_name": "mindrunner/funCKit",
"path": "workspace/funCKit/src/main/java/de/sep2011/funckit/model/sessionmodel/SessionModel.java",
"license": "gpl-3.0",
"size": 17012
} | [
"de.sep2011.funckit.drawer.Drawer"
] | import de.sep2011.funckit.drawer.Drawer; | import de.sep2011.funckit.drawer.*; | [
"de.sep2011.funckit"
] | de.sep2011.funckit; | 1,230,988 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(
String resourceGroupName, String serviceTopologyName, String serviceName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<Void> deleteWithResponse( String resourceGroupName, String serviceTopologyName, String serviceName, Context context); | /**
* Deletes the service.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serviceTopologyName The name of the service topology .
* @param serviceName The name of the service resource.
* @param context The context to associate with this o... | Deletes the service | deleteWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/fluent/ServicesClient.java",
"license": "mit",
"size": 7415
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,080,351 |
public Object extractBodyFromJms(Exchange exchange, Message message) {
try {
// is a custom message converter configured on endpoint then use it instead of doing the extraction
// based on message type
if (endpoint != null && endpoint.getMessageConverter() != null) {
... | Object function(Exchange exchange, Message message) { try { if (endpoint != null && endpoint.getMessageConverter() != null) { if (LOG.isTraceEnabled()) { LOG.trace(STR, endpoint.getMessageConverter(), message); } return endpoint.getMessageConverter().fromMessage(message); } if (endpoint != null && !endpoint.getConfigur... | /**
* Extracts the body from the JMS message
*
* @param exchange the exchange
* @param message the message to extract its body
* @return the body, can be <tt>null</tt>
*/ | Extracts the body from the JMS message | extractBodyFromJms | {
"repo_name": "davidkarlsen/camel",
"path": "components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsBinding.java",
"license": "apache-2.0",
"size": 36090
} | [
"java.util.Map",
"javax.jms.BytesMessage",
"javax.jms.JMSException",
"javax.jms.MapMessage",
"javax.jms.Message",
"javax.jms.ObjectMessage",
"javax.jms.StreamMessage",
"javax.jms.TextMessage",
"org.apache.camel.Exchange",
"org.apache.camel.RuntimeCamelException",
"org.apache.camel.component.jms.... | import java.util.Map; import javax.jms.BytesMessage; import javax.jms.JMSException; import javax.jms.MapMessage; import javax.jms.Message; import javax.jms.ObjectMessage; import javax.jms.StreamMessage; import javax.jms.TextMessage; import org.apache.camel.Exchange; import org.apache.camel.RuntimeCamelException; import... | import java.util.*; import javax.jms.*; import org.apache.camel.*; import org.apache.camel.component.jms.*; import org.apache.camel.support.*; | [
"java.util",
"javax.jms",
"org.apache.camel"
] | java.util; javax.jms; org.apache.camel; | 1,812,703 |
@Test
public void test120RefreshAccountWillAfter5min() throws Exception {
final String TEST_NAME = "test120RefreshAccountWillAfter5min";
displayTestTitle(TEST_NAME);
// GIVEN
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
syncServiceMock.reset();
clock.overrideDuration(... | void function() throws Exception { final String TEST_NAME = STR; displayTestTitle(TEST_NAME); Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); syncServiceMock.reset(); clock.overrideDuration("PT5M"); PrismObject<ShadowType> shadowBefore = provisioningService.getObject(ShadowType.class, ACCO... | /**
* ff 5min, everything should be the same (grace not expired yet)
*/ | ff 5min, everything should be the same (grace not expired yet) | test120RefreshAccountWillAfter5min | {
"repo_name": "arnost-starosta/midpoint",
"path": "provisioning/provisioning-impl/src/test/java/com/evolveum/midpoint/provisioning/impl/manual/AbstractManualResourceTest.java",
"license": "apache-2.0",
"size": 116854
} | [
"com.evolveum.midpoint.prism.PrismObject",
"com.evolveum.midpoint.schema.constants.SchemaConstants",
"com.evolveum.midpoint.schema.result.OperationResult",
"com.evolveum.midpoint.task.api.Task",
"com.evolveum.midpoint.test.asserter.ShadowAsserter",
"com.evolveum.midpoint.xml.ns._public.common.common_3.Ope... | import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.test.asserter.ShadowAsserter; import com.evolveum.midpoint.xml.ns._public.co... | import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.schema.constants.*; import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.task.api.*; import com.evolveum.midpoint.test.asserter.*; import com.evolveum.midpoint.xml.ns._public.common.common_3.*; | [
"com.evolveum.midpoint"
] | com.evolveum.midpoint; | 24,368 |
EReference getJob_Steps(); | EReference getJob_Steps(); | /**
* Returns the meta object for the containment reference list '{@link sbd.Job#getSteps <em>Steps</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Steps</em>'.
* @see sbd.Job#getSteps()
* @see #getJob()
* @generated
*/ | Returns the meta object for the containment reference list '<code>sbd.Job#getSteps Steps</code>'. | getJob_Steps | {
"repo_name": "vzmaru/spring-batch-design",
"path": "com.vm.tools.sbd.model/src/sbd/SbdPackage.java",
"license": "bsd-3-clause",
"size": 8316
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,049,493 |
public void enableExtensions() {
for (Extension extension : extensions.keySet()) {
if (extensions.get(extension) == Extension.State.LOADED) {
extension.onEnable();
HPS.getServer().getPluginManager().registerEvents(extension, HPS);
extensions.put(ex... | void function() { for (Extension extension : extensions.keySet()) { if (extensions.get(extension) == Extension.State.LOADED) { extension.onEnable(); HPS.getServer().getPluginManager().registerEvents(extension, HPS); extensions.put(extension, Extension.State.ENABLED); } } } | /**
* Enables all {@link Extension}s with the {@link Extension.State#LOADED} state
*/ | Enables all <code>Extension</code>s with the <code>Extension.State#LOADED</code> state | enableExtensions | {
"repo_name": "HarryPotterSpells/HarryPotterSpells",
"path": "src/com/hpspells/core/extension/ExtensionManager.java",
"license": "mit",
"size": 3257
} | [
"com.hpspells.core.HPS",
"com.hpspells.core.extension.Extension"
] | import com.hpspells.core.HPS; import com.hpspells.core.extension.Extension; | import com.hpspells.core.*; import com.hpspells.core.extension.*; | [
"com.hpspells.core"
] | com.hpspells.core; | 1,497,449 |
public int addConditionalFormatting(CellRangeAddress[] regions, HSSFConditionalFormattingRule[] cfRules) {
if (regions == null) {
throw new IllegalArgumentException("regions must not be null");
}
for(CellRangeAddress range : regions) range.validate(SpreadsheetVersion.EXCEL97);
... | int function(CellRangeAddress[] regions, HSSFConditionalFormattingRule[] cfRules) { if (regions == null) { throw new IllegalArgumentException(STR); } for(CellRangeAddress range : regions) range.validate(SpreadsheetVersion.EXCEL97); if (cfRules == null) { throw new IllegalArgumentException(STR); } if (cfRules.length == ... | /**
* Allows to add a new Conditional Formatting set to the sheet.
*
* @param regions - list of rectangular regions to apply conditional formatting rules
* @param cfRules - set of up to three conditional formatting rules
*
* @return index of the newly created Conditional Formatting object
... | Allows to add a new Conditional Formatting set to the sheet | addConditionalFormatting | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/java/org/apache/poi/hssf/usermodel/HSSFSheetConditionalFormatting.java",
"license": "apache-2.0",
"size": 11088
} | [
"org.apache.poi.hssf.record.CFRuleBase",
"org.apache.poi.hssf.record.aggregates.CFRecordsAggregate",
"org.apache.poi.ss.SpreadsheetVersion",
"org.apache.poi.ss.util.CellRangeAddress"
] | import org.apache.poi.hssf.record.CFRuleBase; import org.apache.poi.hssf.record.aggregates.CFRecordsAggregate; import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.util.CellRangeAddress; | import org.apache.poi.hssf.record.*; import org.apache.poi.hssf.record.aggregates.*; import org.apache.poi.ss.*; import org.apache.poi.ss.util.*; | [
"org.apache.poi"
] | org.apache.poi; | 309,846 |
public final void dumpLocked(Context context, PrintWriter pw, String prefix, int which,
int reqUid) {
dumpLocked(context, pw, prefix, which, reqUid, BatteryStatsHelper.checkWifiOnly(context));
} | final void function(Context context, PrintWriter pw, String prefix, int which, int reqUid) { dumpLocked(context, pw, prefix, which, reqUid, BatteryStatsHelper.checkWifiOnly(context)); } | /**
* Temporary for settings.
*/ | Temporary for settings | dumpLocked | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/os/BatteryStats.java",
"license": "gpl-3.0",
"size": 221210
} | [
"android.content.Context",
"com.android.internal.os.BatteryStatsHelper",
"java.io.PrintWriter"
] | import android.content.Context; import com.android.internal.os.BatteryStatsHelper; import java.io.PrintWriter; | import android.content.*; import com.android.internal.os.*; import java.io.*; | [
"android.content",
"com.android.internal",
"java.io"
] | android.content; com.android.internal; java.io; | 2,493,842 |
public boolean undeployWhenRetire(API api, Environment environment) throws DeployerException {
Application application;
APIProvider apiProvider;
// Remove subscription
try {
apiProvider = APIManagerFactory.getInstance().getAPIProvider(CarbonContext.
g... | boolean function(API api, Environment environment) throws DeployerException { Application application; APIProvider apiProvider; try { apiProvider = APIManagerFactory.getInstance().getAPIProvider(CarbonContext. getThreadLocalCarbonContext().getUsername()); List<SubscribedAPI> apiUsages = apiProvider.getAPIUsageByAPIId(a... | /**
* Undeploy API artifact from provided environment in the external gateway when Api is retired
*
* @param api API to be undeployed from the external gateway
* @param environment Environment needed to be undeployed API from the external gateway
* @throws DeployerException if error occ... | Undeploy API artifact from provided environment in the external gateway when Api is retired | undeployWhenRetire | {
"repo_name": "wso2/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.solace/src/main/java/org/wso2/carbon/apimgt/solace/deployer/SolaceBrokerDeployer.java",
"license": "apache-2.0",
"size": 17355
} | [
"java.util.List",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.model.Application",
"org.wso2.carbon.apimgt.api.model.Environment",
"org.wso2.carbon.apimgt.api.model.SubscribedAPI",
"org.wso2.carbon.apimgt.impl.APIManagerFactor... | import java.util.List; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.Application; import org.wso2.carbon.apimgt.api.model.Environment; import org.wso2.carbon.apimgt.api.model.SubscribedAPI; import org.wso2.carbon.apimgt.i... | import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.deployer.exceptions.*; import org.wso2.carbon.apimgt.solace.utils.*; import org.wso2.carbon.context.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,804,815 |
public void setRequiredAnnotationType(Class<? extends Annotation> requiredAnnotationType) {
Assert.notNull(requiredAnnotationType, "'requiredAnnotationType' must not be null");
this.requiredAnnotationType = requiredAnnotationType;
} | void function(Class<? extends Annotation> requiredAnnotationType) { Assert.notNull(requiredAnnotationType, STR); this.requiredAnnotationType = requiredAnnotationType; } | /**
* Set the 'required' annotation type, to be used on bean property
* setter methods.
* <p>The default required annotation type is the Spring-provided
* {@link Required} annotation.
* <p>This setter property exists so that developers can provide their own
* (non-Spring-specific) annotation type to indicat... | Set the 'required' annotation type, to be used on bean property setter methods. The default required annotation type is the Spring-provided <code>Required</code> annotation. This setter property exists so that developers can provide their own (non-Spring-specific) annotation type to indicate that a property value is re... | setRequiredAnnotationType | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessor.java",
"license": "gpl-2.0",
"size": 8748
} | [
"java.lang.annotation.Annotation",
"org.springframework.util.Assert"
] | import java.lang.annotation.Annotation; import org.springframework.util.Assert; | import java.lang.annotation.*; import org.springframework.util.*; | [
"java.lang",
"org.springframework.util"
] | java.lang; org.springframework.util; | 399,234 |
List<Object> beforePull(
MappingItem mappingItem,
AnyTO anyTO,
List<Object> values); | List<Object> beforePull( MappingItem mappingItem, AnyTO anyTO, List<Object> values); | /**
* Invoked while reading attribute values from external resource during pull.
*
* @param mappingItem mapping item
* @param anyTO any object
* @param values original values
* @return transformed values
*/ | Invoked while reading attribute values from external resource during pull | beforePull | {
"repo_name": "tmess567/syncope",
"path": "core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/MappingItemTransformer.java",
"license": "apache-2.0",
"size": 2197
} | [
"java.util.List",
"org.apache.syncope.common.lib.to.AnyTO",
"org.apache.syncope.core.persistence.api.entity.resource.MappingItem"
] | import java.util.List; import org.apache.syncope.common.lib.to.AnyTO; import org.apache.syncope.core.persistence.api.entity.resource.MappingItem; | import java.util.*; import org.apache.syncope.common.lib.to.*; import org.apache.syncope.core.persistence.api.entity.resource.*; | [
"java.util",
"org.apache.syncope"
] | java.util; org.apache.syncope; | 2,477,293 |
public int read(ByteBuffer dst, int dstStart, int dstLength) throws IOException {
final int remaining = this.length - this.position;
final int read = Math.min(remaining, dstLength);
final long srcAddress = this.address + position;
if (dst.isDirect()) {
final long dstAddress = Platfor... | int function(ByteBuffer dst, int dstStart, int dstLength) throws IOException { final int remaining = this.length - this.position; final int read = Math.min(remaining, dstLength); final long srcAddress = this.address + position; if (dst.isDirect()) { final long dstAddress = PlatformDependent.directBufferAddress(dst) + d... | /**
* Reads a sequence of bytes from this file into the given buffer.
* <p>
* <p> Bytes are read starting at this file's current position, and
* then the position is updated with the number of bytes actually read.
*/ | Reads a sequence of bytes from this file into the given buffer. Bytes are read starting at this file's current position, and then the position is updated with the number of bytes actually read | read | {
"repo_name": "dudaerich/activemq-artemis",
"path": "artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java",
"license": "apache-2.0",
"size": 12506
} | [
"io.netty.util.internal.PlatformDependent",
"java.io.IOException",
"java.nio.ByteBuffer"
] | import io.netty.util.internal.PlatformDependent; import java.io.IOException; import java.nio.ByteBuffer; | import io.netty.util.internal.*; import java.io.*; import java.nio.*; | [
"io.netty.util",
"java.io",
"java.nio"
] | io.netty.util; java.io; java.nio; | 1,464,371 |
public void getBounds(Vector2 offset, Vector2 size) {
if (offset == null) throw new IllegalArgumentException("offset cannot be null.");
if (size == null) throw new IllegalArgumentException("size cannot be null.");
Array<Slot> drawOrder = this.drawOrder;
float minX = Integer.MAX_VALUE... | void function(Vector2 offset, Vector2 size) { if (offset == null) throw new IllegalArgumentException(STR); if (size == null) throw new IllegalArgumentException(STR); Array<Slot> drawOrder = this.drawOrder; float minX = Integer.MAX_VALUE, minY = Integer.MAX_VALUE, maxX = Integer.MIN_VALUE, maxY = Integer.MIN_VALUE; for ... | /**
* Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.
*
* @param offset An output value, the distance from the skeleton origin to the bottom left corner of the AABB.
* @param size An output value, the width and height of the AABB.
*/ | Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose | getBounds | {
"repo_name": "laurencegw/jenjin",
"path": "jenjin-spine/src/main/java/com/esotericsoftware/spine/Skeleton.java",
"license": "apache-2.0",
"size": 28365
} | [
"com.badlogic.gdx.math.Vector2",
"com.badlogic.gdx.utils.Array",
"com.esotericsoftware.spine.attachments.Attachment",
"com.esotericsoftware.spine.attachments.MeshAttachment",
"com.esotericsoftware.spine.attachments.RegionAttachment"
] | import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.utils.Array; import com.esotericsoftware.spine.attachments.Attachment; import com.esotericsoftware.spine.attachments.MeshAttachment; import com.esotericsoftware.spine.attachments.RegionAttachment; | import com.badlogic.gdx.math.*; import com.badlogic.gdx.utils.*; import com.esotericsoftware.spine.attachments.*; | [
"com.badlogic.gdx",
"com.esotericsoftware.spine"
] | com.badlogic.gdx; com.esotericsoftware.spine; | 853,137 |
@Override
public void processAuthorize(WebSocketChannel channel, String authorizeToken) {
sendHandshakePayload(channel, authorizeToken);
} | void function(WebSocketChannel channel, String authorizeToken) { sendHandshakePayload(channel, authorizeToken); } | /**
* Send authorize token to the Gateway
*/ | Send authorize token to the Gateway | processAuthorize | {
"repo_name": "michaelcretzman/java.client",
"path": "ws/ws/src/main/java/org/kaazing/gateway/client/impl/wsn/WebSocketNativeHandshakeHandler.java",
"license": "apache-2.0",
"size": 16084
} | [
"org.kaazing.gateway.client.impl.WebSocketChannel"
] | import org.kaazing.gateway.client.impl.WebSocketChannel; | import org.kaazing.gateway.client.impl.*; | [
"org.kaazing.gateway"
] | org.kaazing.gateway; | 701,264 |
public void testShiftRightNegZeroes() {
byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int aSign = -1;
int number = 68;
byte rBytes[] = {-25, -4, 121, -80, 20, -70, 109, 48};
BigInteger aNumber = new BigInteger(aSign, aBytes);
BigInteg... | void function() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; int number = 68; byte rBytes[] = {-25, -4, 121, -80, 20, -70, 109, 48}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.shiftRight(number); byte resBytes[] = new byte[rBytes.... | /**
* shiftRight a negative number;
* shift distance is NOT multiple of 32;
* shifted bits are zeroes.
*/ | shiftRight a negative number; shift distance is NOT multiple of 32; shifted bits are zeroes | testShiftRightNegZeroes | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java",
"license": "apache-2.0",
"size": 50548
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,930,574 |
protected static final Color randomColor(final IBasicStyles styles,
final Random rand) {
int r, g, b, color;
switch (rand.nextInt(13)) {
case 0: {
return Color.red;
}
case 1: {
return Color.blue;
}
case 2: {
return Color.green;
}
... | static final Color function(final IBasicStyles styles, final Random rand) { int r, g, b, color; switch (rand.nextInt(13)) { case 0: { return Color.red; } case 1: { return Color.blue; } case 2: { return Color.green; } case 3: { return Color.gray; } case 4: { return Color.cyan; } case 5: { return Color.darkGray; } case 6... | /**
* create a random color
*
* @param styles
* the styles
* @param rand
* the random number generator
* @return the color
*/ | create a random color | randomColor | {
"repo_name": "optimizationBenchmarking/utils-base",
"path": "src/test/java/examples/org/optimizationBenchmarking/utils/chart/ChartExample.java",
"license": "gpl-3.0",
"size": 6895
} | [
"java.awt.Color",
"java.util.Random"
] | import java.awt.Color; import java.util.Random; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,919,681 |
public static String getString(String key) {
try {
return LANGUAGE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '¡' + key + '!';
} catch (NullPointerException e) {
return '¡' + key + '!';
}
}
| static String function(String key) { try { return LANGUAGE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '¡' + key + '!'; } catch (NullPointerException e) { return '¡' + key + '!'; } } | /**
* Returns the string of the specified <code>key</code> in the current
* language resource bundle.
*
* @param key The specified <code>key</code>
* @return The string of the specified <code>key</code>
*/ | Returns the string of the specified <code>key</code> in the current language resource bundle | getString | {
"repo_name": "ProgettoRadis/ArasuiteIta",
"path": "AraWord/src/araword/configuration/TLanguage.java",
"license": "apache-2.0",
"size": 5073
} | [
"java.util.MissingResourceException"
] | import java.util.MissingResourceException; | import java.util.*; | [
"java.util"
] | java.util; | 248,188 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.