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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void maybeLogFailures(final MultipleFailures failures) {
if (failures.isEmpty()) {
return;
}
log.warn("Errors encountered during metadata rebuild:");
failures.getFailures().forEach(failure -> log.warn(failure.getMessage(), failure));
} | void function(final MultipleFailures failures) { if (failures.isEmpty()) { return; } log.warn(STR); failures.getFailures().forEach(failure -> log.warn(failure.getMessage(), failure)); } | /**
* Logs any failures recorded during metadata
*/ | Logs any failures recorded during metadata | maybeLogFailures | {
"repo_name": "sonatype/nexus-public",
"path": "plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/internal/hosted/metadata/AbstractMetadataRebuilder.java",
"license": "epl-1.0",
"size": 17039
} | [
"org.sonatype.goodies.common.MultipleFailures"
] | import org.sonatype.goodies.common.MultipleFailures; | import org.sonatype.goodies.common.*; | [
"org.sonatype.goodies"
] | org.sonatype.goodies; | 2,759,518 |
protected void ensureClusterStateConsistency() throws IOException {
if (cluster() != null && cluster().size() > 0) {
final NamedWriteableRegistry namedWriteableRegistry;
if (isInternalCluster()) {
// If it's internal cluster - using existing registry in case plugin re... | void function() throws IOException { if (cluster() != null && cluster().size() > 0) { final NamedWriteableRegistry namedWriteableRegistry; if (isInternalCluster()) { namedWriteableRegistry = internalCluster().getInstance(NamedWriteableRegistry.class); } else { namedWriteableRegistry = new NamedWriteableRegistry(Cluster... | /**
* Verifies that all nodes that have the same version of the cluster state as master have same cluster state
*/ | Verifies that all nodes that have the same version of the cluster state as master have same cluster state | ensureClusterStateConsistency | {
"repo_name": "fernandozhu/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 103624
} | [
"java.io.IOException",
"java.util.Map",
"org.elasticsearch.client.Client",
"org.elasticsearch.cluster.ClusterModule",
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.common.io.stream.NamedWriteableRegistry",
"org.elasticsearch.test.XContentTestUtils"
] | import java.io.IOException; import java.util.Map; import org.elasticsearch.client.Client; import org.elasticsearch.cluster.ClusterModule; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.test.XContentTestUtils; | import java.io.*; import java.util.*; import org.elasticsearch.client.*; import org.elasticsearch.cluster.*; import org.elasticsearch.common.io.stream.*; import org.elasticsearch.test.*; | [
"java.io",
"java.util",
"org.elasticsearch.client",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.test"
] | java.io; java.util; org.elasticsearch.client; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.test; | 2,569,787 |
private void sendErrorToClient(final HttpServletResponse response, int status, final String message) {
if(!response.isCommitted()) {
try {
response.sendError(status, message);
} catch (IOException ioExc) {
ioExc.printStackTrace();
}
... | void function(final HttpServletResponse response, int status, final String message) { if(!response.isCommitted()) { try { response.sendError(status, message); } catch (IOException ioExc) { ioExc.printStackTrace(); } } } | /**
* Send HTTP error to the given client represented by the response object
* @param response represent the client output point
* @param status HTTP error code
* @param message optional message to be sent to client
*/ | Send HTTP error to the given client represented by the response object | sendErrorToClient | {
"repo_name": "debard/georchestra-ird",
"path": "mapfishapp/src/main/java/org/georchestra/mapfishapp/ws/DocController.java",
"license": "gpl-3.0",
"size": 18733
} | [
"java.io.IOException",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 291,919 |
public void corruptMeta(int i, ExtendedBlock blk) throws IOException {
getMaterializedReplica(i, blk).corruptMeta();
} | void function(int i, ExtendedBlock blk) throws IOException { getMaterializedReplica(i, blk).corruptMeta(); } | /**
* Corrupt the metadata of a block on a datanode.
* @param i the index of the datanode
* @param blk name of the block
* @throws IOException on error accessing the given metadata file.
*/ | Corrupt the metadata of a block on a datanode | corruptMeta | {
"repo_name": "littlezhou/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java",
"license": "apache-2.0",
"size": 119212
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,811,263 |
@Test
public void testNoCopyUsage() throws Exception {
Properties props = new Properties();
props.setProperty("protex.server.name", "not used");
props.setProperty("protex.user.name", "not used");
props.setProperty("protex.password", "not used");
ConfigurationManager confi... | void function() throws Exception { Properties props = new Properties(); props.setProperty(STR, STR); props.setProperty(STR, STR); props.setProperty(STR, STR); ConfigurationManager config = new TestProtexConfigurationManager(props); TemplateReader templateReader = new TemplateReader(config); Workbook wb = TemplateReader... | /**
* Test the "no copy" usage that SCM Connector uses. Generate a workbook
* from a template file, and populate the template map.
*
* @throws Exception
*/ | Test the "no copy" usage that SCM Connector uses. Generate a workbook from a template file, and populate the template map | testNoCopyUsage | {
"repo_name": "blackducksoftware/common-framework",
"path": "src/test/java/com/blackducksoftware/tools/commonframework/standard/protex/report/template/TemplateReaderTest.java",
"license": "apache-2.0",
"size": 12355
} | [
"com.blackducksoftware.tools.commonframework.core.config.ConfigurationManager",
"com.blackducksoftware.tools.commonframework.core.config.testbeans.TestProtexConfigurationManager",
"java.io.File",
"java.util.Properties",
"org.apache.poi.ss.usermodel.Workbook",
"org.junit.Assert"
] | import com.blackducksoftware.tools.commonframework.core.config.ConfigurationManager; import com.blackducksoftware.tools.commonframework.core.config.testbeans.TestProtexConfigurationManager; import java.io.File; import java.util.Properties; import org.apache.poi.ss.usermodel.Workbook; import org.junit.Assert; | import com.blackducksoftware.tools.commonframework.core.config.*; import com.blackducksoftware.tools.commonframework.core.config.testbeans.*; import java.io.*; import java.util.*; import org.apache.poi.ss.usermodel.*; import org.junit.*; | [
"com.blackducksoftware.tools",
"java.io",
"java.util",
"org.apache.poi",
"org.junit"
] | com.blackducksoftware.tools; java.io; java.util; org.apache.poi; org.junit; | 2,241,192 |
public static RepEnvInfo setupEnvInfo(File envHome,
EnvironmentConfig envConfig,
ReplicationConfig repConfig,
RepEnvInfo helper) {
if (!envConfig.isConfigParamSet(Environme... | static RepEnvInfo function(File envHome, EnvironmentConfig envConfig, ReplicationConfig repConfig, RepEnvInfo helper) { if (!envConfig.isConfigParamSet(EnvironmentConfig.LOG_FILE_MAX)) { DbInternal.disableParameterValidation(envConfig); long fileLen = ((envCount++ % 100)+1) * 10000; envConfig.setConfigParam(Environment... | /**
* Create info for a single replicated environment.
*/ | Create info for a single replicated environment | setupEnvInfo | {
"repo_name": "bjorndm/prebake",
"path": "code/third_party/bdb/test/com/sleepycat/je/rep/utilint/RepTestUtils.java",
"license": "apache-2.0",
"size": 59150
} | [
"com.sleepycat.je.DbInternal",
"com.sleepycat.je.EnvironmentConfig",
"com.sleepycat.je.rep.ReplicationConfig",
"java.io.File",
"java.util.concurrent.TimeUnit"
] | import com.sleepycat.je.DbInternal; import com.sleepycat.je.EnvironmentConfig; import com.sleepycat.je.rep.ReplicationConfig; import java.io.File; import java.util.concurrent.TimeUnit; | import com.sleepycat.je.*; import com.sleepycat.je.rep.*; import java.io.*; import java.util.concurrent.*; | [
"com.sleepycat.je",
"java.io",
"java.util"
] | com.sleepycat.je; java.io; java.util; | 1,747,025 |
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return false;
}
}
private class ColorRenderer extends JLabel implements TableCellRenderer {
private static final long serialVersionUID = 1L;
public ColorRenderer() {
setOpaque(true); //MUST do this for background to show ... | boolean function(int rowIndex, int columnIndex) { return false; } } private class ColorRenderer extends JLabel implements TableCellRenderer { private static final long serialVersionUID = 1L; public ColorRenderer() { setOpaque(true); setBorder(BorderFactory.createMatteBorder(2, 5, 2, 5, Color.WHITE)); } | /**
* Tells wether data contained in a specific cell(given row and column
* index) is editable or not. In this case distribution column is not
* editable, as editing functionality is implemented via edit button
*/ | Tells wether data contained in a specific cell(given row and column index) is editable or not. In this case distribution column is not editable, as editing functionality is implemented via edit button | isCellEditable | {
"repo_name": "HOMlab/QN-ACTR-Release",
"path": "QN-ACTR Java/src/jmt/gui/jwat/workloadAnalysis/clustering/kMean/panels/KMeansInfoClustering.java",
"license": "lgpl-3.0",
"size": 16530
} | [
"java.awt.Color",
"javax.swing.BorderFactory",
"javax.swing.JLabel",
"javax.swing.table.TableCellRenderer"
] | import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.table.TableCellRenderer; | import java.awt.*; import javax.swing.*; import javax.swing.table.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,511,243 |
public void attach(SelectionKey sk) {
this.sk = sk;
sk.attach(this);
DatagramChannel sch = (DatagramChannel) sk.channel();
if (sch.isConnected()) {
sk.interestOps(SelectionKey.OP_READ | SelectionKey.OP_WRITE);
setState(State.OPENED);
}
} | void function(SelectionKey sk) { this.sk = sk; sk.attach(this); DatagramChannel sch = (DatagramChannel) sk.channel(); if (sch.isConnected()) { sk.interestOps(SelectionKey.OP_READ SelectionKey.OP_WRITE); setState(State.OPENED); } } | /**
* Attach key and channel and set connection interest in selection key
*
* @param sk The {@link SelectionKey} to attach.
*/ | Attach key and channel and set connection interest in selection key | attach | {
"repo_name": "jyeary/dnsjnio",
"path": "src/main/java/uk/nominet/dnsjnio/UDPConnection.java",
"license": "apache-2.0",
"size": 7897
} | [
"java.nio.channels.DatagramChannel",
"java.nio.channels.SelectionKey"
] | import java.nio.channels.DatagramChannel; import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,400,725 |
public Optional<FieldChange> setCiteKey(String newCiteKey) {
return setField(KEY_FIELD, newCiteKey);
} | Optional<FieldChange> function(String newCiteKey) { return setField(KEY_FIELD, newCiteKey); } | /**
* Sets the cite key AKA citation key AKA BibTeX key. Note: This is <emph>not</emph> the internal Id of this entry.
* The internal Id is always present, whereas the BibTeX key might not be present.
*
* @param newCiteKey The cite key to set. Must not be null; use {@link #clearCiteKey()} to remove ... | Sets the cite key AKA citation key AKA BibTeX key. Note: This is not the internal Id of this entry. The internal Id is always present, whereas the BibTeX key might not be present | setCiteKey | {
"repo_name": "tobiasdiez/jabref",
"path": "src/main/java/org/jabref/model/entry/BibEntry.java",
"license": "mit",
"size": 30346
} | [
"java.util.Optional",
"org.jabref.model.FieldChange"
] | import java.util.Optional; import org.jabref.model.FieldChange; | import java.util.*; import org.jabref.model.*; | [
"java.util",
"org.jabref.model"
] | java.util; org.jabref.model; | 2,510,578 |
public final BigInteger getExponent() {
return this.primeExponent;
} | final BigInteger function() { return this.primeExponent; } | /**
* Returns the prime's exponent.
*
* @return the primeExponent.
*/ | Returns the prime's exponent | getExponent | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/java/security/spec/RSAOtherPrimeInfo.java",
"license": "mit",
"size": 3738
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,893,835 |
@Override
public Member[] getMembers() {
if ( getNext()!=null ) return getNext().getMembers();
else return null;
} | Member[] function() { if ( getNext()!=null ) return getNext().getMembers(); else return null; } | /**
* Get all current cluster members
* @return all members or empty array
*/ | Get all current cluster members | getMembers | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java",
"license": "apache-2.0",
"size": 5906
} | [
"org.apache.catalina.tribes.Member"
] | import org.apache.catalina.tribes.Member; | import org.apache.catalina.tribes.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,796,966 |
public void setStore(Store store) {
this.store = store;
store.setManager(this);
} | void function(Store store) { this.store = store; store.setManager(this); } | /**
* Set the Store object which will manage persistent Session
* storage for this Manager.
*
* @param store the associated Store
*/ | Set the Store object which will manage persistent Session storage for this Manager | setStore | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/PersistentManagerBase.java",
"license": "mit",
"size": 34451
} | [
"org.apache.catalina.Store"
] | import org.apache.catalina.Store; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,232,309 |
public List<AlloyAtom> set2atoms(final AlloySet set) {
final List<AlloyAtom> answer = this.set2atoms.get(set);
return answer != null ? answer : AlloyInstance.noAtom;
} | List<AlloyAtom> function(final AlloySet set) { final List<AlloyAtom> answer = this.set2atoms.get(set); return answer != null ? answer : AlloyInstance.noAtom; } | /**
* Returns an unmodifiable sorted list of AlloyAtom(s) in this set; answer can be an empty list.
*/ | Returns an unmodifiable sorted list of AlloyAtom(s) in this set; answer can be an empty list | set2atoms | {
"repo_name": "ModelWriter/WP3",
"path": "Source/eu.modelwriter.visualization.test/src/edu/mit/csail/sdg/alloy4viz/AlloyInstance.java",
"license": "epl-1.0",
"size": 12797
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,830,388 |
private void sendBroadcastDownloadFinished(
DownloadFileOperation download,
RemoteOperationResult downloadResult,
String unlinkedFromRemotePath) {
Intent end = new Intent(getDownloadFinishMessage());
end.putExtra(Extras.EXTRA_DOWNLOAD_RESULT, downloadResult.isSuc... | void function( DownloadFileOperation download, RemoteOperationResult downloadResult, String unlinkedFromRemotePath) { Intent end = new Intent(getDownloadFinishMessage()); end.putExtra(Extras.EXTRA_DOWNLOAD_RESULT, downloadResult.isSuccess()); end.putExtra(Extras.EXTRA_ACCOUNT_NAME, download.getAccount().name); end.putE... | /**
* Sends a broadcast when a download finishes in order to the interested activities can
* update their view
*
* @param download Finished download operation
* @param downloadResult Result of the download operation
* @param unlinkedFromRemotePath Path in the download... | Sends a broadcast when a download finishes in order to the interested activities can update their view | sendBroadcastDownloadFinished | {
"repo_name": "hannesa2/owncloud-android",
"path": "owncloudApp/src/main/java/com/owncloud/android/files/services/FileDownloader.java",
"license": "gpl-2.0",
"size": 29213
} | [
"android.content.Intent",
"com.owncloud.android.lib.common.operations.RemoteOperationResult",
"com.owncloud.android.operations.DownloadFileOperation",
"com.owncloud.android.utils.Extras"
] | import android.content.Intent; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.operations.DownloadFileOperation; import com.owncloud.android.utils.Extras; | import android.content.*; import com.owncloud.android.lib.common.operations.*; import com.owncloud.android.operations.*; import com.owncloud.android.utils.*; | [
"android.content",
"com.owncloud.android"
] | android.content; com.owncloud.android; | 2,652,945 |
Connection con = null;
PreparedStatement pstm = null;
try {
con = DBBConexion.getConexionDBBSingletonPattern();
String sql = "INSERT INTO HABITACION"
+"(EXTRAS_HABITACION, PRECIO, CUARTO_BAÑO, TIPO_HABITACION, RESEÑAS, ALOJAMIENTO_ID_ALOJ... | Connection con = null; PreparedStatement pstm = null; try { con = DBBConexion.getConexionDBBSingletonPattern(); String sql = STR +STR +STR; pstm = con.prepareStatement(sql); pstm.setString(1, habDTO.getExtras_habitacion()); pstm.setFloat(2, habDTO.getPrecio()); pstm.setBoolean(3, habDTO.isCuarto_banio()); pstm.setStrin... | /**
* Insert con datos de HabitacionDTO que se le ha pasado. Cierra lo abierto.
* @param habDTO HabitacionDTO del cual se extraen los datos para realizar el insert en la BDD.
* @return Numero de filas modificadas.
*/ | Insert con datos de HabitacionDTO que se le ha pasado. Cierra lo abierto | altaHabitacion | {
"repo_name": "MarioCodes/Desarrollo_Proyectos_Clase",
"path": "java/DataAccess/JSON_Project/JSON/src/controlador/DAO/HabitacionDAOMySQL.java",
"license": "apache-2.0",
"size": 2444
} | [
"com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException"
] | import com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; | import com.mysql.jdbc.exceptions.*; import java.sql.*; | [
"com.mysql.jdbc",
"java.sql"
] | com.mysql.jdbc; java.sql; | 961,358 |
private InMemoryContentInfo directoryLookup(InMemoryContentInfo dir,
String name,
boolean create,
Path path) throws IOException {
if (!dir.isDirectory()) { throw Error.ENOTDIR.... | InMemoryContentInfo function(InMemoryContentInfo dir, String name, boolean create, Path path) throws IOException { if (!dir.isDirectory()) { throw Error.ENOTDIR.exception(path); } InMemoryDirectoryInfo imdi = (InMemoryDirectoryInfo) dir; if (!imdi.isExecutable()) { throw Error.EACCES.exception(path); } InMemoryContentI... | /**
* Given an existing directory 'dir', looks up 'name' within it and returns
* its inode. Assumes the file exists, unless 'create', in which case it will
* try to create it. May fail with ENOTDIR, EACCES, ENOENT. Error messages
* will be reported against file 'path'.
*/ | Given an existing directory 'dir', looks up 'name' within it and returns its inode. Assumes the file exists, unless 'create', in which case it will try to create it. May fail with ENOTDIR, EACCES, ENOENT. Error messages will be reported against file 'path' | directoryLookup | {
"repo_name": "ButterflyNetwork/bazel",
"path": "src/main/java/com/google/devtools/build/lib/vfs/inmemoryfs/InMemoryFileSystem.java",
"license": "apache-2.0",
"size": 31267
} | [
"com.google.devtools.build.lib.vfs.Path",
"java.io.IOException"
] | import com.google.devtools.build.lib.vfs.Path; import java.io.IOException; | import com.google.devtools.build.lib.vfs.*; import java.io.*; | [
"com.google.devtools",
"java.io"
] | com.google.devtools; java.io; | 2,400,192 |
private ClassConstant parseClassConstant(int index)
throws IOException
{
int nameIndex = readShort();
return new ClassConstant(_class.getConstantPool(), index, nameIndex);
} | ClassConstant function(int index) throws IOException { int nameIndex = readShort(); return new ClassConstant(_class.getConstantPool(), index, nameIndex); } | /**
* Parses a class constant pool entry.
*/ | Parses a class constant pool entry | parseClassConstant | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/kernel/src/com/caucho/bytecode/ByteCodeParser.java",
"license": "gpl-2.0",
"size": 13508
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,289,854 |
private Next dispatchOrArg() {
if (dimensions.length>idx)
return then(dimensionExps[idx],e,fixArg);
else {
// ready to instantiate
Object v = Array.newInstance(componentType,dimensions);
return k.receive(v);
}
... | Next function() { if (dimensions.length>idx) return then(dimensionExps[idx],e,fixArg); else { Object v = Array.newInstance(componentType,dimensions); return k.receive(v); } } private static final long serialVersionUID = 1L; } static final ContinuationPtr fixArg = new ContinuationPtr(ContinuationImpl.class,STR); | /**
* If there are more arguments to evaluate, do so. Otherwise evaluate the function.
*/ | If there are more arguments to evaluate, do so. Otherwise evaluate the function | dispatchOrArg | {
"repo_name": "jglick/groovy-cps",
"path": "src/main/java/com/cloudbees/groovy/cps/impl/NewArrayBlock.java",
"license": "apache-2.0",
"size": 2115
} | [
"com.cloudbees.groovy.cps.Next",
"java.lang.reflect.Array"
] | import com.cloudbees.groovy.cps.Next; import java.lang.reflect.Array; | import com.cloudbees.groovy.cps.*; import java.lang.reflect.*; | [
"com.cloudbees.groovy",
"java.lang"
] | com.cloudbees.groovy; java.lang; | 363,292 |
public static void addEmojis(Context context, Spannable text, int emojiSize, boolean useSystemDefault) {
addEmojis(context, text, emojiSize, 0, -1, useSystemDefault);
} | static void function(Context context, Spannable text, int emojiSize, boolean useSystemDefault) { addEmojis(context, text, emojiSize, 0, -1, useSystemDefault); } | /**
* Convert emoji characters of the given Spannable to the according emojicon.
*
* @param context
* @param text
* @param emojiSize
* @param useSystemDefault
*/ | Convert emoji characters of the given Spannable to the according emojicon | addEmojis | {
"repo_name": "brucetoo/facebook_emoj_icon",
"path": "library/src/main/java/com/rockerhieu/emojicon/EmojiconHandler.java",
"license": "apache-2.0",
"size": 84142
} | [
"android.content.Context",
"android.text.Spannable"
] | import android.content.Context; import android.text.Spannable; | import android.content.*; import android.text.*; | [
"android.content",
"android.text"
] | android.content; android.text; | 1,621,405 |
void setScaleType(ImageView.ScaleType scaleType); | void setScaleType(ImageView.ScaleType scaleType); | /**
* Controls how the image should be resized or moved to match the size of the ImageView. Any
* scaling or panning will happen within the confines of this {@link
* ImageView.ScaleType}.
*
* @param scaleType - The desired scaling mode.
*/ | Controls how the image should be resized or moved to match the size of the ImageView. Any scaling or panning will happen within the confines of this <code>ImageView.ScaleType</code> | setScaleType | {
"repo_name": "yun2win/yun2win-sdk-android",
"path": "yun2winDemo/uikit/src/main/java/com/y2w/uikit/customcontrols/photoview/IPhotoView.java",
"license": "mit",
"size": 11183
} | [
"android.widget.ImageView"
] | import android.widget.ImageView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,567,928 |
@NonBound
public boolean isDefinitelyNullable() {
return getNullable() == DatabaseMetaData.columnNullable;
} | boolean function() { return getNullable() == DatabaseMetaData.columnNullable; } | /**
* Figures out this column's nullability
*
* @return true iff this.nullable == DatabaseMetaData.columnNullable.
*/ | Figures out this column's nullability | isDefinitelyNullable | {
"repo_name": "SQLPower/sqlpower-library",
"path": "src/main/java/ca/sqlpower/sqlobject/SQLColumn.java",
"license": "gpl-3.0",
"size": 55240
} | [
"java.sql.DatabaseMetaData"
] | import java.sql.DatabaseMetaData; | import java.sql.*; | [
"java.sql"
] | java.sql; | 817,580 |
public File getRefFile(String[] fileIDs); | File function(String[] fileIDs); | /**
* Gets the refFile attribute of the DirReader object
*
* @param fileIDs Description of the Parameter
* @return The refFile value
*/ | Gets the refFile attribute of the DirReader object | getRefFile | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/trunk/src/java/org/dcm4che/media/DirReader.java",
"license": "apache-2.0",
"size": 5489
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,275,288 |
Object get(ByteBuffer buf, int position); | Object get(ByteBuffer buf, int position); | /**
* Returns the intermediate object representation of the given aggregate.
*
* Converts the given byte buffer representation into an intermediate aggregate Object
*
* <b>Implementations must not change the position, limit or mark of the given buffer</b>
*
* @param buf byte buffer storing the byte... | Returns the intermediate object representation of the given aggregate. Converts the given byte buffer representation into an intermediate aggregate Object Implementations must not change the position, limit or mark of the given buffer | get | {
"repo_name": "Kleagleguo/druid",
"path": "processing/src/main/java/io/druid/query/aggregation/BufferAggregator.java",
"license": "apache-2.0",
"size": 4746
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,794,626 |
public static boolean isEmpty(Iterable<?> iterable) {
if (iterable instanceof Collection) {
return ((Collection<?>) iterable).isEmpty();
}
return !iterable.iterator().hasNext();
} | static boolean function(Iterable<?> iterable) { if (iterable instanceof Collection) { return ((Collection<?>) iterable).isEmpty(); } return !iterable.iterator().hasNext(); } | /**
* Determines if the given iterable contains no elements.
*
* <p>There is no precise {@link Iterator} equivalent to this method, since
* one can only ask an iterator whether it has any elements <i>remaining</i>
* (which one does using {@link Iterator#hasNext}).
*
* @return {@code true} if the it... | Determines if the given iterable contains no elements. There is no precise <code>Iterator</code> equivalent to this method, since one can only ask an iterator whether it has any elements remaining (which one does using <code>Iterator#hasNext</code>) | isEmpty | {
"repo_name": "paulmartel/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/collect/Iterables.java",
"license": "agpl-3.0",
"size": 37877
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,820,196 |
public void setIncompatibleWith( org.ontoware.rdf2go.model.node.Node value) {
Base.set(this.model, this.getResource(), INCOMPATIBLEWITH, value);
}
| void function( org.ontoware.rdf2go.model.node.Node value) { Base.set(this.model, this.getResource(), INCOMPATIBLEWITH, value); } | /**
* Sets a value of property IncompatibleWith from an RDF2Go node.
* First, all existing values are removed, then this value is added.
* Cardinality constraints are not checked, but this method exists only for properties with
* no minCardinality or minCardinality == 1.
* @param value the va... | Sets a value of property IncompatibleWith from an RDF2Go node. First, all existing values are removed, then this value is added. Cardinality constraints are not checked, but this method exists only for properties with no minCardinality or minCardinality == 1 | setIncompatibleWith | {
"repo_name": "josectoledo/semweb4j",
"path": "org.semweb4j.rdfreactor.runtime/src/main/java/org/ontoware/rdfreactor/schema/owl/Ontology.java",
"license": "bsd-2-clause",
"size": 50761
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 84,557 |
private QualifiedName getSnowflakeName(final QualifiedName name) {
return name.cloneWithUpperCase();
}
/**
* {@inheritDoc} | QualifiedName function(final QualifiedName name) { return name.cloneWithUpperCase(); } /** * {@inheritDoc} | /**
* Returns the snowflake represented name which is always uppercase.
*
* @param name qualified name
* @return qualified name
*/ | Returns the snowflake represented name which is always uppercase | getSnowflakeName | {
"repo_name": "ajoymajumdar/metacat",
"path": "metacat-connector-snowflake/src/main/java/com/netflix/metacat/connector/snowflake/SnowflakeConnectorTableService.java",
"license": "apache-2.0",
"size": 8605
} | [
"com.netflix.metacat.common.QualifiedName"
] | import com.netflix.metacat.common.QualifiedName; | import com.netflix.metacat.common.*; | [
"com.netflix.metacat"
] | com.netflix.metacat; | 1,147,008 |
private Stream<String> evaluateStrings(
FacesContext ctx,
Optional<ValueExpression> optionalExpression,
String defaultValue) {
Stream<String> singleton = Stream.of(defaultValue);
ELContext elContext = ctx.getELContext();
return optionalExpr... | Stream<String> function( FacesContext ctx, Optional<ValueExpression> optionalExpression, String defaultValue) { Stream<String> singleton = Stream.of(defaultValue); ELContext elContext = ctx.getELContext(); return optionalExpression.map(expression -> { Stream<String> values; Object value = expression.getValue(elContext)... | /**
* Evaluates an optional expression that specifies a collection of strings.
*
* @param ctx the faces context.
* @param optionalExpression the optional expression to evaluate.
* @param defaultValue the default value to put in the collection in case the collection would be empty.
*... | Evaluates an optional expression that specifies a collection of strings | evaluateStrings | {
"repo_name": "steappe/jsf-eventing",
"path": "src/main/java/steappe/jsf/eventing/ObservedEvent.java",
"license": "mit",
"size": 7342
} | [
"java.util.Collection",
"java.util.Optional",
"java.util.stream.Stream",
"javax.el.ELContext",
"javax.el.ValueExpression",
"javax.faces.context.FacesContext"
] | import java.util.Collection; import java.util.Optional; import java.util.stream.Stream; import javax.el.ELContext; import javax.el.ValueExpression; import javax.faces.context.FacesContext; | import java.util.*; import java.util.stream.*; import javax.el.*; import javax.faces.context.*; | [
"java.util",
"javax.el",
"javax.faces"
] | java.util; javax.el; javax.faces; | 1,119,127 |
private void updateInterfaceParameters(String processId, String areaId, String interfaceId,
OspfInterface ospfInterface) {
Iterator<OspfProcess> processItr = processes.iterator();
while (processItr.hasNext()) {
OspfProcess process = processItr.n... | void function(String processId, String areaId, String interfaceId, OspfInterface ospfInterface) { Iterator<OspfProcess> processItr = processes.iterator(); while (processItr.hasNext()) { OspfProcess process = processItr.next(); if (processId.equalsIgnoreCase(process.processId())) { Iterator<OspfArea> areItr = process.ar... | /**
* Updates interface parameters.
*
* @param processId process id
* @param areaId area id
* @param interfaceId interface id
* @param ospfInterface OSPF interface instance
*/ | Updates interface parameters | updateInterfaceParameters | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/Controller.java",
"license": "apache-2.0",
"size": 33295
} | [
"java.util.Iterator",
"org.onosproject.ospf.controller.OspfArea",
"org.onosproject.ospf.controller.OspfInterface",
"org.onosproject.ospf.controller.OspfProcess"
] | import java.util.Iterator; import org.onosproject.ospf.controller.OspfArea; import org.onosproject.ospf.controller.OspfInterface; import org.onosproject.ospf.controller.OspfProcess; | import java.util.*; import org.onosproject.ospf.controller.*; | [
"java.util",
"org.onosproject.ospf"
] | java.util; org.onosproject.ospf; | 2,447,606 |
public void close() {
try {
indexWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
} | void function() { try { indexWriter.close(); } catch (IOException e) { e.printStackTrace(); } } | /**
* commit index changes, MUST be called
*/ | commit index changes, MUST be called | close | {
"repo_name": "zhoujiagen/giant-data-analysis",
"path": "data-representation/representation-text/representation-text-lucene/src/main/java/com/spike/text/lucene/tutorial/TxtIndexer.java",
"license": "mit",
"size": 3779
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,286,688 |
Collection<IIngredientType<?>> getRegisteredIngredientTypes(); | Collection<IIngredientType<?>> getRegisteredIngredientTypes(); | /**
* Returns an unmodifiable collection of all registered ingredient types.
* Without addons, there are {@link VanillaTypes#ITEM} and {@link VanillaTypes#FLUID}.
*/ | Returns an unmodifiable collection of all registered ingredient types. Without addons, there are <code>VanillaTypes#ITEM</code> and <code>VanillaTypes#FLUID</code> | getRegisteredIngredientTypes | {
"repo_name": "mezz/JustEnoughItems",
"path": "src/api/java/mezz/jei/api/runtime/IIngredientManager.java",
"license": "mit",
"size": 2463
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 997,859 |
@Nullable
public static <ViewType extends View> ViewType findViewById(@NonNull final Fragment fragment, @IdRes final int viewId) {
// noinspection unchecked
return fragment.getView() == null ? null : (ViewType) fragment.getView().findViewById(viewId);
} | static <ViewType extends View> ViewType function(@NonNull final Fragment fragment, @IdRes final int viewId) { return fragment.getView() == null ? null : (ViewType) fragment.getView().findViewById(viewId); } | /**
* Does exactly the same thing as calling {@link Fragment#getView()}.{@link #findViewById(View, int)}, but casts the result to the appropriate View
* sub-class.
*
* @param <ViewType> Which View type to cast the result to
*/ | Does exactly the same thing as calling <code>Fragment#getView()</code>.<code>#findViewById(View, int)</code>, but casts the result to the appropriate View sub-class | findViewById | {
"repo_name": "milosmns/silly-android",
"path": "sillyandroid/src/main/java/me/angrybyte/sillyandroid/SillyAndroid.java",
"license": "apache-2.0",
"size": 34840
} | [
"android.support.annotation.IdRes",
"android.support.annotation.NonNull",
"android.support.v4.app.Fragment",
"android.view.View"
] | import android.support.annotation.IdRes; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; import android.view.View; | import android.support.annotation.*; import android.support.v4.app.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 757,085 |
public CmsGroup getCachedGroup(String key) {
return m_cacheGroup.get(key);
} | CmsGroup function(String key) { return m_cacheGroup.get(key); } | /**
* Returns the group cached with the given cache key or <code>null</code> if not found.<p>
*
* @param key the cache key to look for, this may be the group's uuid or the fqn
*
* @return the group cached with the given cache key
*/ | Returns the group cached with the given cache key or <code>null</code> if not found | getCachedGroup | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/monitor/CmsMemoryMonitor.java",
"license": "lgpl-2.1",
"size": 86968
} | [
"org.opencms.file.CmsGroup"
] | import org.opencms.file.CmsGroup; | import org.opencms.file.*; | [
"org.opencms.file"
] | org.opencms.file; | 139,597 |
EAttribute getNode_Owner(); | EAttribute getNode_Owner(); | /**
* Returns the meta object for the attribute '{@link org.dawnsci.marketplace.Node#getOwner <em>Owner</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Owner</em>'.
* @see org.dawnsci.marketplace.Node#getOwner()
* @see #getNode()
* @generated
*/ | Returns the meta object for the attribute '<code>org.dawnsci.marketplace.Node#getOwner Owner</code>'. | getNode_Owner | {
"repo_name": "Itema-as/dawn-marketplace-server",
"path": "org.dawnsci.marketplace.core/src-gen/org/dawnsci/marketplace/MarketplacePackage.java",
"license": "epl-1.0",
"size": 104026
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,373,435 |
@PUT
@Path("/tenants/{tenant-name}")
public void writeTenant(HttpRequest request, HttpResponder responder, @PathParam("tenant-name") String tenantName) {
Account account = getAndAuthenticateAccount(request, responder);
if (account == null) {
return;
}
if (!account.isSuperadmin()) {
res... | @Path(STR) void function(HttpRequest request, HttpResponder responder, @PathParam(STR) String tenantName) { Account account = getAndAuthenticateAccount(request, responder); if (account == null) { return; } if (!account.isSuperadmin()) { responder.sendStatus(HttpResponseStatus.FORBIDDEN); return; } TenantSpecification t... | /**
* Write the specified tenant.
*
* @param request Request for writing a tenant.
* @param responder Responder for sending the response.
* @param tenantName Name of the tenant to write.
*/ | Write the specified tenant | writeTenant | {
"repo_name": "awholegunch/loom",
"path": "server/src/main/java/com/continuuity/loom/http/handler/SuperadminHandler.java",
"license": "apache-2.0",
"size": 19116
} | [
"com.continuuity.http.HttpResponder",
"com.continuuity.loom.account.Account",
"com.continuuity.loom.provisioner.CapacityException",
"com.continuuity.loom.provisioner.QuotaException",
"com.continuuity.loom.spec.TenantSpecification",
"com.google.common.base.Charsets",
"java.io.IOException",
"java.io.Inp... | import com.continuuity.http.HttpResponder; import com.continuuity.loom.account.Account; import com.continuuity.loom.provisioner.CapacityException; import com.continuuity.loom.provisioner.QuotaException; import com.continuuity.loom.spec.TenantSpecification; import com.google.common.base.Charsets; import java.io.IOExcept... | import com.continuuity.http.*; import com.continuuity.loom.account.*; import com.continuuity.loom.provisioner.*; import com.continuuity.loom.spec.*; import com.google.common.base.*; import java.io.*; import javax.ws.rs.*; import org.jboss.netty.buffer.*; import org.jboss.netty.handler.codec.http.*; | [
"com.continuuity.http",
"com.continuuity.loom",
"com.google.common",
"java.io",
"javax.ws",
"org.jboss.netty"
] | com.continuuity.http; com.continuuity.loom; com.google.common; java.io; javax.ws; org.jboss.netty; | 2,334,608 |
public void setSelection(ISelection selection) {
editorSelection = selection;
for (ISelectionChangedListener listener : selectionChangedListeners) {
listener.selectionChanged(new SelectionChangedEvent(this, selection));
}
setStatusLineManager(selection);
} | void function(ISelection selection) { editorSelection = selection; for (ISelectionChangedListener listener : selectionChangedListeners) { listener.selectionChanged(new SelectionChangedEvent(this, selection)); } setStatusLineManager(selection); } | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
* Calling this result will notify the listeners.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code> to set this editor's overall selection. Calling this result will notify the listeners. | setSelection | {
"repo_name": "netuh/DecodePlatformPlugin",
"path": "br.ufpe.ines.decode/bundles/br.ufpe.ines.decode.model.editor/src/br/ufpe/ines/decode/decode/artifacts/questionnaire/presentation/QuestionnaireEditor.java",
"license": "gpl-3.0",
"size": 46459
} | [
"org.eclipse.jface.viewers.ISelection",
"org.eclipse.jface.viewers.ISelectionChangedListener",
"org.eclipse.jface.viewers.SelectionChangedEvent"
] | import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,270,626 |
public UnivariateFunction getFunction() {
return function;
} | UnivariateFunction function() { return function; } | /**
* Returns the actual function implementation.
*
* @return the actual function implementation
*/ | Returns the actual function implementation | getFunction | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "xmlintelledit/intelledit/lib/MOEAFramework-2.12.tar/MOEAFramework-2.12/examples/org/moeaframework/examples/gp/regression/SymbolicRegression.java",
"license": "mit",
"size": 7861
} | [
"org.apache.commons.math3.analysis.UnivariateFunction"
] | import org.apache.commons.math3.analysis.UnivariateFunction; | import org.apache.commons.math3.analysis.*; | [
"org.apache.commons"
] | org.apache.commons; | 619,338 |
default void setPropertiesInternal(final SecurityContext securityContext, final PropertyMap properties, final boolean isCreation) throws FrameworkException {
final CreationContainer container = new CreationContainer(this);
boolean atLeastOnePropertyChanged = false;
for (final Entry<PropertyKey, Object> attr... | default void setPropertiesInternal(final SecurityContext securityContext, final PropertyMap properties, final boolean isCreation) throws FrameworkException { final CreationContainer container = new CreationContainer(this); boolean atLeastOnePropertyChanged = false; for (final Entry<PropertyKey, Object> attr : propertie... | /**
* Sets the given properties.
*
* @param securityContext
* @param properties
* @param isCreation
*/ | Sets the given properties | setPropertiesInternal | {
"repo_name": "structr/structr",
"path": "structr-core/src/main/java/org/structr/core/GraphObject.java",
"license": "gpl-3.0",
"size": 19791
} | [
"java.util.Map",
"org.slf4j.Logger",
"org.slf4j.LoggerFactory",
"org.structr.api.UnknownClientException",
"org.structr.api.UnknownDatabaseException",
"org.structr.common.SecurityContext",
"org.structr.common.error.FrameworkException",
"org.structr.core.app.StructrApp",
"org.structr.core.entity.Abstr... | import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.structr.api.UnknownClientException; import org.structr.api.UnknownDatabaseException; import org.structr.common.SecurityContext; import org.structr.common.error.FrameworkException; import org.structr.core.app.StructrApp; import org... | import java.util.*; import org.slf4j.*; import org.structr.api.*; import org.structr.common.*; import org.structr.common.error.*; import org.structr.core.app.*; import org.structr.core.entity.*; import org.structr.core.graph.*; import org.structr.core.property.*; | [
"java.util",
"org.slf4j",
"org.structr.api",
"org.structr.common",
"org.structr.core"
] | java.util; org.slf4j; org.structr.api; org.structr.common; org.structr.core; | 1,897,700 |
@Test()
public void testDecodeTimeWindow()
throws Exception
{
final CollectSupportDataLogCaptureWindow w =
CollectSupportDataLogCaptureWindow.decode(
new TimeWindowCollectSupportDataLogCaptureWindow(
System.currentTimeMillis() - 600_000L,
S... | @Test() void function() throws Exception { final CollectSupportDataLogCaptureWindow w = CollectSupportDataLogCaptureWindow.decode( new TimeWindowCollectSupportDataLogCaptureWindow( System.currentTimeMillis() - 600_000L, System.currentTimeMillis()).encode()); assertNotNull(w); assertTrue(w instanceof TimeWindowCollectSu... | /**
* Tests the behavior when trying to decode a time window log capture window.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when trying to decode a time window log capture window | testDecodeTimeWindow | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/CollectSupportDataLogCaptureWindowTestCase.java",
"license": "gpl-2.0",
"size": 4600
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 2,017,136 |
protected DataSource getDataSourceToUse(DataSource originalDataSource) {
return originalDataSource;
} | DataSource function(DataSource originalDataSource) { return originalDataSource; } | /**
* Return the DataSource to use for retrieving Connections.
* <p>This implementation returns the passed-in DataSource as-is.
* @param originalDataSource the DataSource as configured by the user
* on LocalSessionFactoryBean
* @return the DataSource to actually retrieve Connections from
* (potentially wrap... | Return the DataSource to use for retrieving Connections. This implementation returns the passed-in DataSource as-is | getDataSourceToUse | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-orm-4.0/org/springframework/orm/hibernate3/LocalDataSourceConnectionProvider.java",
"license": "apache-2.0",
"size": 3721
} | [
"javax.sql.DataSource"
] | import javax.sql.DataSource; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 2,387,393 |
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Setup the new range seek bar
RangeSeekBar<Integer> rangeSeekBar = new RangeSeekBar<>(this);
// Set the range
rangeSeekBar.setRangeValues(15, 90);
rangeSeekBar.setSelectedMinValue(20);
rangeSeek... | super.onCreate(savedInstanceState); setContentView(R.layout.main); RangeSeekBar<Integer> rangeSeekBar = new RangeSeekBar<>(this); rangeSeekBar.setRangeValues(15, 90); rangeSeekBar.setSelectedMinValue(20); rangeSeekBar.setSelectedMaxValue(88); FrameLayout layout = (FrameLayout) findViewById(R.id.seekbar_placeholder); la... | /**
* Called when the activity is first created.
*/ | Called when the activity is first created | onCreate | {
"repo_name": "anothem/android-range-seek-bar",
"path": "rangeseekbar-sample/src/main/java/org/florescu/android/rangeseekbar/sample/DemoActivity.java",
"license": "apache-2.0",
"size": 1798
} | [
"android.widget.FrameLayout",
"org.florescu.android.rangeseekbar.RangeSeekBar"
] | import android.widget.FrameLayout; import org.florescu.android.rangeseekbar.RangeSeekBar; | import android.widget.*; import org.florescu.android.rangeseekbar.*; | [
"android.widget",
"org.florescu.android"
] | android.widget; org.florescu.android; | 2,874,857 |
void close()
throws IOException; | void close() throws IOException; | /**
* Signal that the stream has been closed.
*/ | Signal that the stream has been closed | close | {
"repo_name": "Skywalker-11/spongycastle",
"path": "pg/src/main/java/org/spongycastle/openpgp/StreamGenerator.java",
"license": "mit",
"size": 334
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,331,464 |
public ServletRequest getRequest() {
return request;
}
| ServletRequest function() { return request; } | /**
* Returns the request.
*
* @return the request
*/ | Returns the request | getRequest | {
"repo_name": "sue445/gaerminal",
"path": "src/test/java/org/slim3/tester/MockFilterChain.java",
"license": "apache-2.0",
"size": 2032
} | [
"javax.servlet.ServletRequest"
] | import javax.servlet.ServletRequest; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 2,738,441 |
public void addActionListener(ActionListener act) {
listener = act;
} | void function(ActionListener act) { listener = act; } | /**
* Add a listener for this visualize panel
* @param act an ActionListener
*/ | Add a listener for this visualize panel | addActionListener | {
"repo_name": "williamClanton/jbossBA",
"path": "weka/src/main/java/weka/gui/visualize/VisualizePanel.java",
"license": "gpl-2.0",
"size": 82826
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,151,519 |
public void setErrorStream(@Nullable final PrintStream stream) {
this.errorStream = stream;
}
/**
* {@inheritDoc} | void function(@Nullable final PrintStream stream) { this.errorStream = stream; } /** * {@inheritDoc} | /**
* Sets the stream to which error logs are written.
*
* @param stream The stream to which to log; or <code>null</code> to disable.
*/ | Sets the stream to which error logs are written | setErrorStream | {
"repo_name": "metaborg/spoofax-intellij",
"path": "spoofax-common/src/main/java/org/metaborg/intellij/logging/PrintStreamLogger.java",
"license": "apache-2.0",
"size": 4940
} | [
"java.io.PrintStream",
"javax.annotation.Nullable"
] | import java.io.PrintStream; import javax.annotation.Nullable; | import java.io.*; import javax.annotation.*; | [
"java.io",
"javax.annotation"
] | java.io; javax.annotation; | 315,750 |
EventQueue.invokeLater(new Runnable() {
| EventQueue.invokeLater(new Runnable() { | /**
* Launch the application.
*/ | Launch the application | dets | {
"repo_name": "JuanCarbo/POSFiscal",
"path": "src/ui/DetalleCliente.java",
"license": "mit",
"size": 8349
} | [
"java.awt.EventQueue"
] | import java.awt.EventQueue; | import java.awt.*; | [
"java.awt"
] | java.awt; | 402,795 |
boolean lastPrimitiveWasNull() throws TException; | boolean lastPrimitiveWasNull() throws TException; | /**
* Was the last primitive read really a NULL. Need only be called when the
* value of the primitive was 0. ie the protocol should return 0 on nulls and
* the caller will then check if it was actually null For boolean this is
* false.
*/ | Was the last primitive read really a NULL. Need only be called when the value of the primitive was 0. ie the protocol should return 0 on nulls and the caller will then check if it was actually null For boolean this is false | lastPrimitiveWasNull | {
"repo_name": "cschenyuan/hive-hack",
"path": "serde/src/java/org/apache/hadoop/hive/serde2/thrift/WriteNullsProtocol.java",
"license": "apache-2.0",
"size": 1504
} | [
"org.apache.thrift.TException"
] | import org.apache.thrift.TException; | import org.apache.thrift.*; | [
"org.apache.thrift"
] | org.apache.thrift; | 1,784,655 |
public List<Tuple3<FieldsGenome, FieldsUsesCodons, FieldsCodonUsage>> getRelationshipUsesCodons(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(ids);
args... | List<Tuple3<FieldsGenome, FieldsUsesCodons, FieldsCodonUsage>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.add(toFi... | /**
* <p>Original spec-file function name: get_relationship_UsesCodons</p>
* <pre>
* This relationship connects a genome to the various codon usage
* records for it.
* It has the following fields:
* =over 4
* =back
* </pre>
* @param ids instance of list of String
* ... | Original spec-file function name: get_relationship_UsesCodons <code> This relationship connects a genome to the various codon usage records for it. It has the following fields: =over 4 =back </code> | getRelationshipUsesCodons | {
"repo_name": "kbase/trees",
"path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java",
"license": "mit",
"size": 869221
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.Tuple3"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 1,967,791 |
@Override
public int getCodeConstructStart(PsiFile file, int openingBraceOffset) {
return openingBraceOffset;
} | int function(PsiFile file, int openingBraceOffset) { return openingBraceOffset; } | /**
* Returns the start offset of the code construct which owns the opening structural brace at the specified offset. For example,
* if the opening brace belongs to an 'if' statement, returns the start offset of the 'if' statement.
*
* @param file the file in which brace matching is performed.
* @param o... | Returns the start offset of the code construct which owns the opening structural brace at the specified offset. For example, if the opening brace belongs to an 'if' statement, returns the start offset of the 'if' statement | getCodeConstructStart | {
"repo_name": "coursera/courier",
"path": "idea-plugin/src/org/coursera/courier/CourierBraceMatcher.java",
"license": "apache-2.0",
"size": 2195
} | [
"com.intellij.psi.PsiFile"
] | import com.intellij.psi.PsiFile; | import com.intellij.psi.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 1,511,779 |
public static boolean isInQueue(PriorityQueue<Uri> queue, Uri procedureUri) {
return queue.contains(procedureUri);
} | static boolean function(PriorityQueue<Uri> queue, Uri procedureUri) { return queue.contains(procedureUri); } | /**
* Checks whether a procedure is in the queue
*
* @param queue the queue to check
* @param procedureUri the procedure look for
* @return true if the procedure was in the queue and updated
*/ | Checks whether a procedure is in the queue | isInQueue | {
"repo_name": "SanaMobile/sana.mobile",
"path": "app/src/main/java/org/sana/android/service/QueueManager.java",
"license": "bsd-3-clause",
"size": 7843
} | [
"android.net.Uri",
"java.util.PriorityQueue"
] | import android.net.Uri; import java.util.PriorityQueue; | import android.net.*; import java.util.*; | [
"android.net",
"java.util"
] | android.net; java.util; | 2,581,008 |
public void testAddPathToName2() {
try {
int[] types = new int[] {1, 1, 2, 2, 4, 4, 6, 6, 7, 7};
byte[][] names = new byte[][] {
new GeneralName(1, "rfc@822.Name").getEncodedName(),
new GeneralName(1, "rfc@822.AnotherName").getEncodedName(),
... | void function() { try { int[] types = new int[] {1, 1, 2, 2, 4, 4, 6, 6, 7, 7}; byte[][] names = new byte[][] { new GeneralName(1, STR).getEncodedName(), new GeneralName(1, STR).getEncodedName(), new GeneralName(2, STR).getEncodedName(), new GeneralName(2, STR).getEncodedName(), new GeneralName(4, STR).getEncodedName()... | /**
* addPathToName(int type, byte[] name) method testing.
*/ | addPathToName(int type, byte[] name) method testing | testAddPathToName2 | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/security/src/test/impl/java.injected/java/security/cert/X509CertSelectorTest.java",
"license": "apache-2.0",
"size": 134343
} | [
"java.io.IOException",
"org.apache.harmony.security.x509.GeneralName",
"org.apache.harmony.security.x509.GeneralSubtree",
"org.apache.harmony.security.x509.GeneralSubtrees",
"org.apache.harmony.security.x509.NameConstraints"
] | import java.io.IOException; import org.apache.harmony.security.x509.GeneralName; import org.apache.harmony.security.x509.GeneralSubtree; import org.apache.harmony.security.x509.GeneralSubtrees; import org.apache.harmony.security.x509.NameConstraints; | import java.io.*; import org.apache.harmony.security.x509.*; | [
"java.io",
"org.apache.harmony"
] | java.io; org.apache.harmony; | 1,205,302 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<WorkflowTriggerInner> list(String resourceGroupName, String workflowName) {
final Integer top = null;
final String filter = null;
return new PagedIterable<>(listAsync(resourceGroupName, workflowName, top, filter));
... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<WorkflowTriggerInner> function(String resourceGroupName, String workflowName) { final Integer top = null; final String filter = null; return new PagedIterable<>(listAsync(resourceGroupName, workflowName, top, filter)); } | /**
* Gets a list of workflow triggers.
*
* @param resourceGroupName The resource group name.
* @param workflowName The workflow name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
... | Gets a list of workflow triggers | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/implementation/WorkflowTriggersClientImpl.java",
"license": "mit",
"size": 67839
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.logic.fluent.models.WorkflowTriggerInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.logic.fluent.models.WorkflowTriggerInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.logic.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,421,841 |
try {
@SuppressWarnings("deprecation")
Collection<?> objects = KRADServiceLocatorWeb.getLegacyDataAdapter().findMatching(businessObjectClass, Collections.<String, String>emptyMap());
List<KeyValue> labels = new ArrayList<KeyValue>(objects.size());
if(includeBlankRow) {
... | try { @SuppressWarnings(STR) Collection<?> objects = KRADServiceLocatorWeb.getLegacyDataAdapter().findMatching(businessObjectClass, Collections.<String, String>emptyMap()); List<KeyValue> labels = new ArrayList<KeyValue>(objects.size()); if(includeBlankRow) { labels.add(new ConcreteKeyValue(STRSTR - STRException occurr... | /**
* Build the list of KeyValues using the key (keyAttributeName) and
* label (labelAttributeName) of the list of all business objects found
* for the BO class specified.
*/ | Build the list of KeyValues using the key (keyAttributeName) and label (labelAttributeName) of the list of all business objects found for the BO class specified | getKeyValues | {
"repo_name": "mztaylor/rice-git",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/keyvalues/PersistableBusinessObjectValuesFinder.java",
"license": "apache-2.0",
"size": 4324
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.List",
"org.kuali.rice.core.api.util.ConcreteKeyValue",
"org.kuali.rice.core.api.util.KeyValue",
"org.kuali.rice.krad.service.KRADServiceLocatorWeb"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.kuali.rice.core.api.util.ConcreteKeyValue; import org.kuali.rice.core.api.util.KeyValue; import org.kuali.rice.krad.service.KRADServiceLocatorWeb; | import java.util.*; import org.kuali.rice.core.api.util.*; import org.kuali.rice.krad.service.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 2,500,951 |
private static NdkRelease createFromSourceProperties(String releaseString) {
Properties properties = new Properties();
try {
properties.load(new StringReader(releaseString));
} catch (IOException e) {
// This shouldn't happen from a StringReader.
throw new IllegalStateException(e);
}... | static NdkRelease function(String releaseString) { Properties properties = new Properties(); try { properties.load(new StringReader(releaseString)); } catch (IOException e) { throw new IllegalStateException(e); } String revision = properties.getProperty(REVISION_PROPERTY); String[] revisionParsed = revision.split("\\."... | /**
* Creates an NdkRelease for r11+ (uses source.properties)
*/ | Creates an NdkRelease for r11+ (uses source.properties) | createFromSourceProperties | {
"repo_name": "dslomov/bazel",
"path": "src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java",
"license": "apache-2.0",
"size": 4291
} | [
"java.io.IOException",
"java.io.StringReader",
"java.util.Properties"
] | import java.io.IOException; import java.io.StringReader; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 851,499 |
Collection<ProxiedPlayer> players = Thunder.getInstance().getProxy().getPlayers();
send(message, players.toArray(new ProxiedPlayer[players.size()]));
} | Collection<ProxiedPlayer> players = Thunder.getInstance().getProxy().getPlayers(); send(message, players.toArray(new ProxiedPlayer[players.size()])); } | /**
* Broadcasts a message
*
* @param message The message
*/ | Broadcasts a message | broadcast | {
"repo_name": "Superioz/MooProject",
"path": "proxy/src/main/java/de/superioz/moo/proxy/util/BungeeChat.java",
"license": "gpl-2.0",
"size": 3625
} | [
"de.superioz.moo.proxy.Thunder",
"java.util.Collection",
"net.md_5.bungee.api.connection.ProxiedPlayer"
] | import de.superioz.moo.proxy.Thunder; import java.util.Collection; import net.md_5.bungee.api.connection.ProxiedPlayer; | import de.superioz.moo.proxy.*; import java.util.*; import net.md_5.bungee.api.connection.*; | [
"de.superioz.moo",
"java.util",
"net.md_5.bungee"
] | de.superioz.moo; java.util; net.md_5.bungee; | 336,203 |
public DatabaseMetaData getMetaData() throws SQLException {
checkIfClosed();
if (dbMetadata == null) {
// There is a case where dbname can be null.
// Replication client of this method does not have a
// JDBC connection; therefore dbname is null and this
// is expected.
//
dbMetadata ... | DatabaseMetaData function() throws SQLException { checkIfClosed(); if (dbMetadata == null) { } return dbMetadata; } | /**
* A Connection's database is able to provide information
* describing its tables, its supported SQL grammar, its stored
* procedures, the capabilities of this connection, etc. This
* information is made available through a DatabaseMetaData
* object.
*
* @return a DatabaseMetaData ... | A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, etc. This information is made available through a DatabaseMetaData object | getMetaData | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/impl/jdbc/EmbedConnection.java",
"license": "apache-2.0",
"size": 142318
} | [
"java.sql.DatabaseMetaData",
"java.sql.SQLException"
] | import java.sql.DatabaseMetaData; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,802,384 |
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI> getInput_integers_PositiveHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI>();
for (Sort elemnt : getInput()) {
if(elemnt.getCl... | java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.PositiveHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.integers.... | /**
* This accessor return a list of encapsulated subelement, only of PositiveHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of PositiveHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_integers_PositiveHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/booleans/hlapi/AndHLAPI.java",
"license": "epl-1.0",
"size": 108259
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 1,465,039 |
public List<String> getAvailableLayouts(); | List<String> function(); | /**
* Returns a list of the supported layouts provided by this particular layout service.
*/ | Returns a list of the supported layouts provided by this particular layout service | getAvailableLayouts | {
"repo_name": "unchartedsoftware/aperturejs",
"path": "aperture-spi/src/main/java/oculus/aperture/spi/layout/LayoutService.java",
"license": "mit",
"size": 2170
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,526,475 |
public static void emitLoadThread(Assembler asm, GPR base, Offset offset) {
asm.emitMOV_Reg_RegDisp(THREAD_REGISTER, base, offset);
} | static void function(Assembler asm, GPR base, Offset offset) { asm.emitMOV_Reg_RegDisp(THREAD_REGISTER, base, offset); } | /**
* Emit an instruction sequence to load current RVMThread
* object from a location defined by [base]+offset
*
* @param asm assembler object
* @param base number of base register
* @param offset offset
*/ | Emit an instruction sequence to load current RVMThread object from a location defined by [base]+offset | emitLoadThread | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/ia32/ThreadLocalState.java",
"license": "epl-1.0",
"size": 6078
} | [
"org.jikesrvm.compilers.common.assembler.ia32.Assembler",
"org.vmmagic.unboxed.Offset"
] | import org.jikesrvm.compilers.common.assembler.ia32.Assembler; import org.vmmagic.unboxed.Offset; | import org.jikesrvm.compilers.common.assembler.ia32.*; import org.vmmagic.unboxed.*; | [
"org.jikesrvm.compilers",
"org.vmmagic.unboxed"
] | org.jikesrvm.compilers; org.vmmagic.unboxed; | 1,930,943 |
public Iterator<StateSetter> iterateUnsetState(); | Iterator<StateSetter> function(); | /**
* Iterate through Unset States.
* @return an Iterator
*/ | Iterate through Unset States | iterateUnsetState | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/api/model/Consequence.java",
"license": "agpl-3.0",
"size": 4702
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,731,625 |
protected void initMaxCellWidth() {
m_maxCellWidth = m_opener.getOffsetWidth() - 2 ;
for (Widget widget : m_selector) {
if (widget instanceof A_CmsSelectCell) {
int cellWidth = ((A_CmsSelectCell)widget).getRequiredWidth();
CmsDebugLog.getInstance().printL... | void function() { m_maxCellWidth = m_opener.getOffsetWidth() - 2 ; for (Widget widget : m_selector) { if (widget instanceof A_CmsSelectCell) { int cellWidth = ((A_CmsSelectCell)widget).getRequiredWidth(); CmsDebugLog.getInstance().printLine( STR + ((A_CmsSelectCell)widget).getElement().getInnerText() + STR + cellWidth)... | /**
* Initializes the selector width.<p>
*/ | Initializes the selector width | initMaxCellWidth | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/input/A_CmsSelectBox.java",
"license": "lgpl-2.1",
"size": 26851
} | [
"com.google.gwt.user.client.ui.Widget",
"org.opencms.gwt.client.util.CmsDebugLog"
] | import com.google.gwt.user.client.ui.Widget; import org.opencms.gwt.client.util.CmsDebugLog; | import com.google.gwt.user.client.ui.*; import org.opencms.gwt.client.util.*; | [
"com.google.gwt",
"org.opencms.gwt"
] | com.google.gwt; org.opencms.gwt; | 2,874,994 |
@Override
public void run() {
boolean lastPacketInBlock = false;
final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0;
while (isRunning() && !lastPacketInBlock) {
long totalAckTimeNanos = 0;
boolean isInterrupted = false;
try {
Packet ... | void function() { boolean lastPacketInBlock = false; final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; while (isRunning() && !lastPacketInBlock) { long totalAckTimeNanos = 0; boolean isInterrupted = false; try { Packet pkt = null; long expected = -2; PipelineAck ack = new PipelineAck(); lon... | /**
* Thread to process incoming acks.
* @see java.lang.Runnable#run()
*/ | Thread to process incoming acks | run | {
"repo_name": "leechoongyon/HadoopSourceAnalyze",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java",
"license": "apache-2.0",
"size": 62222
} | [
"java.io.EOFException",
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck",
"org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos"
] | import java.io.EOFException; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck; import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos; | import java.io.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.proto.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,527,942 |
public void setObserver(Map<String, Object> observer) {
removeEntriesStartingWith(OBSERVER);
eventMap.putAll(observer);
} | void function(Map<String, Object> observer) { removeEntriesStartingWith(OBSERVER); eventMap.putAll(observer); } | /**
* Set the observer keys/values. The provided Map will completely replace
* the existing observer, i.e. all current observer keys/values will be removed
* and the new observer keys/values will be added.
*
* @param observer - Map of all the observer keys/values
*/ | Set the observer keys/values. The provided Map will completely replace the existing observer, i.e. all current observer keys/values will be removed and the new observer keys/values will be added | setObserver | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.websphere.security/src/com/ibm/websphere/security/audit/AuditEvent.java",
"license": "epl-1.0",
"size": 25825
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 265,094 |
public Font getFont() {
if(indexRenderer==null) {
indexRenderer = new ArrayIndexRenderer();
}
return indexRenderer.getFont();
} | Font function() { if(indexRenderer==null) { indexRenderer = new ArrayIndexRenderer(); } return indexRenderer.getFont(); } | /**
* Gets the default font of this component.
* @return this component's font
*/ | Gets the default font of this component | getFont | {
"repo_name": "fschuett/osp",
"path": "src/org/opensourcephysics/display/ArrayTable.java",
"license": "gpl-3.0",
"size": 18286
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,537,456 |
public RestResponse<ObjectMap> updateAcl(String members, String action, JobAclUpdateParams data) throws ClientException {
ObjectMap params = new ObjectMap();
params.putIfNotNull("action", action);
params.put("body", data);
return execute("jobs", null, "acl", members, "update", params... | RestResponse<ObjectMap> function(String members, String action, JobAclUpdateParams data) throws ClientException { ObjectMap params = new ObjectMap(); params.putIfNotNull(STR, action); params.put("body", data); return execute("jobs", null, "acl", members, STR, params, POST, ObjectMap.class); } | /**
* Update the set of permissions granted for the member.
* @param members Comma separated list of user or group ids.
* @param action Action to be performed [ADD, SET, REMOVE or RESET].
* @param data JSON containing the parameters to add ACLs.
* @return a RestResponse object.
* @throws C... | Update the set of permissions granted for the member | updateAcl | {
"repo_name": "opencb/opencga",
"path": "opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java",
"license": "apache-2.0",
"size": 16091
} | [
"org.opencb.commons.datastore.core.ObjectMap",
"org.opencb.opencga.client.exceptions.ClientException",
"org.opencb.opencga.core.models.job.JobAclUpdateParams",
"org.opencb.opencga.core.response.RestResponse"
] | import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.opencga.client.exceptions.ClientException; import org.opencb.opencga.core.models.job.JobAclUpdateParams; import org.opencb.opencga.core.response.RestResponse; | import org.opencb.commons.datastore.core.*; import org.opencb.opencga.client.exceptions.*; import org.opencb.opencga.core.models.job.*; import org.opencb.opencga.core.response.*; | [
"org.opencb.commons",
"org.opencb.opencga"
] | org.opencb.commons; org.opencb.opencga; | 652,025 |
public ODocument fields(final Map<String, Object> iMap) {
if (iMap != null) {
for (Entry<String, Object> entry : iMap.entrySet())
field(entry.getKey(), entry.getValue());
}
return this;
}
| ODocument function(final Map<String, Object> iMap) { if (iMap != null) { for (Entry<String, Object> entry : iMap.entrySet()) field(entry.getKey(), entry.getValue()); } return this; } | /**
* Fills a document passing the field names/values as a Map<String,Object> where the keys are the field names and the values are
* the field values.
*/ | Fills a document passing the field names/values as a Map where the keys are the field names and the values are the field values | fields | {
"repo_name": "nengxu/OrientDB",
"path": "core/src/main/java/com/orientechnologies/orient/core/record/impl/ODocument.java",
"license": "apache-2.0",
"size": 50521
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,002,907 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<ImageDefinitionInner>> getUploadUrlForEntityTypeWithResponseAsync(
String resourceGroupName, String hubName, GetImageUploadUrlInput parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<ImageDefinitionInner>> function( String resourceGroupName, String hubName, GetImageUploadUrlInput parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { ... | /**
* Gets entity type (profile or interaction) image upload URL.
*
* @param resourceGroupName The name of the resource group.
* @param hubName The name of the hub.
* @param parameters Parameters supplied to the GetUploadUrlForEntityType operation.
* @param context The context to associate... | Gets entity type (profile or interaction) image upload URL | getUploadUrlForEntityTypeWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/customerinsights/azure-resourcemanager-customerinsights/src/main/java/com/azure/resourcemanager/customerinsights/implementation/ImagesClientImpl.java",
"license": "mit",
"size": 20434
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.customerinsights.fluent.models.ImageDefinitionInner",
"com.azure.resourcemanager.customerinsights.models.GetImageUploadUrlInput"... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.customerinsights.fluent.models.ImageDefinitionInner; import com.azure.resourcemanager.customerinsights.models.GetIma... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.customerinsights.fluent.models.*; import com.azure.resourcemanager.customerinsights.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,700,791 |
public Collection<SourceDirectory> getSources() {
return this.sources;
} | Collection<SourceDirectory> function() { return this.sources; } | /**
* <p>Getter for property {@link #sources}.</p>
*
* @return Value for property <tt>sources</tt>.
*/ | Getter for property <code>#sources</code> | getSources | {
"repo_name": "AndyScherzinger/architecturerules",
"path": "architecture-rules/src/main/java/org/architecturerules/configuration/Configuration.java",
"license": "apache-2.0",
"size": 13357
} | [
"java.util.Collection",
"org.architecturerules.domain.SourceDirectory"
] | import java.util.Collection; import org.architecturerules.domain.SourceDirectory; | import java.util.*; import org.architecturerules.domain.*; | [
"java.util",
"org.architecturerules.domain"
] | java.util; org.architecturerules.domain; | 576,746 |
protected List<List<?>> execute(SqlFieldsQuery qry) {
return ((IgniteEx)ignite())
.context()
.query()
.querySqlFields(qry, false)
.getAll();
} | List<List<?>> function(SqlFieldsQuery qry) { return ((IgniteEx)ignite()) .context() .query() .querySqlFields(qry, false) .getAll(); } | /**
* Execute specified query using started driver node.
* Returns result using {@link QueryCursor#getAll()}.
*
* @param qry sql query to execute.
*/ | Execute specified query using started driver node. Returns result using <code>QueryCursor#getAll()</code> | execute | {
"repo_name": "samaitra/ignite",
"path": "modules/yardstick/src/main/java/org/apache/ignite/yardstick/jdbc/mvcc/AbstractDistributedMvccBenchmark.java",
"license": "apache-2.0",
"size": 3668
} | [
"java.util.List",
"org.apache.ignite.cache.query.SqlFieldsQuery",
"org.apache.ignite.internal.IgniteEx"
] | import java.util.List; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.IgniteEx; | import java.util.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 438,802 |
public final void printNode(CorePrinter output) {
} | final void function(CorePrinter output) { } | /**
* We don't print anything - we use {@link ASTPrintVisitor} instead
*/ | We don't print anything - we use <code>ASTPrintVisitor</code> instead | printNode | {
"repo_name": "vovagrechka/fucking-everything",
"path": "phizdets/phizdets-idea/eclipse-src/org.eclipse.php.core/src/org/eclipse/php/core/compiler/ast/nodes/ForEachStatement.java",
"license": "apache-2.0",
"size": 2627
} | [
"org.eclipse.dltk.utils.CorePrinter"
] | import org.eclipse.dltk.utils.CorePrinter; | import org.eclipse.dltk.utils.*; | [
"org.eclipse.dltk"
] | org.eclipse.dltk; | 1,345,184 |
for (DocumentFile file : currentDir.listFiles()) {
int index = remainingPathSegments.indexOf(file.getName());
if (index == -1) {
continue;
}
if (file.isDirectory()) {
remainingPathSegments.remove(file.getName());
return fin... | for (DocumentFile file : currentDir.listFiles()) { int index = remainingPathSegments.indexOf(file.getName()); if (index == -1) { continue; } if (file.isDirectory()) { remainingPathSegments.remove(file.getName()); return findInDocumentTree(file, remainingPathSegments); } if (file.isFile() && index == remainingPathSegmen... | /**
* Finds needed file through Document API for SAF. It's not optimized yet - you can still gain wrong URI on
* files such as "/a/b/c.mp3" and "/b/a/c.mp3", but I consider it complete enough to be usable.
* @param currentDir - document file representing current dir of search
* @param remainingPathS... | Finds needed file through Document API for SAF. It's not optimized yet - you can still gain wrong URI on files such as "/a/b/c.mp3" and "/b/a/c.mp3", but I consider it complete enough to be usable | findInDocumentTree | {
"repo_name": "vanilla-music/vanilla-music-plugin-commons",
"path": "src/main/java/com/kanedias/vanilla/plugins/saf/SafUtils.java",
"license": "gpl-3.0",
"size": 4592
} | [
"androidx.documentfile.provider.DocumentFile"
] | import androidx.documentfile.provider.DocumentFile; | import androidx.documentfile.provider.*; | [
"androidx.documentfile"
] | androidx.documentfile; | 1,325,411 |
public static <T> ProtobufCodec<T> encoder(Class<T> type)
throws IllegalStateException {
final GeneratedClassLoader loader = newLoader(type);
ProtobufCodec<T> encoder = null;
String cacheName = encoders.get(type);
if (cacheName != null) {
encoder = get(loader, cacheName);
}
if (enc... | static <T> ProtobufCodec<T> function(Class<T> type) throws IllegalStateException { final GeneratedClassLoader loader = newLoader(type); ProtobufCodec<T> encoder = null; String cacheName = encoders.get(type); if (cacheName != null) { encoder = get(loader, cacheName); } if (encoder == null) { final CodecGen<T> gen = new ... | /**
* Create an implementation to encode/decode an arbitrary object.
* <p>
* The object must use the {@link Column} annotations to denote the fields
* that should be encoded or decoded.
*
* @param <T> type of the object to be supported.
* @param type the object type.
* @return an encoder for thi... | Create an implementation to encode/decode an arbitrary object. The object must use the <code>Column</code> annotations to denote the fields that should be encoded or decoded | encoder | {
"repo_name": "thinkernel/gwtorm",
"path": "src/main/java/com/google/gwtorm/protobuf/CodecFactory.java",
"license": "apache-2.0",
"size": 2815
} | [
"com.google.gwtorm.server.GeneratedClassLoader",
"com.google.gwtorm.server.OrmException"
] | import com.google.gwtorm.server.GeneratedClassLoader; import com.google.gwtorm.server.OrmException; | import com.google.gwtorm.server.*; | [
"com.google.gwtorm"
] | com.google.gwtorm; | 521,259 |
void writeCharLE(long position, int value) throws IOException; | void writeCharLE(long position, int value) throws IOException; | /**
* Write one char at the given position, little endian order.
*/ | Write one char at the given position, little endian order | writeCharLE | {
"repo_name": "ncso/openmarker",
"path": "src/main/java/openmarker/trove/file/DataFileBuffer.java",
"license": "apache-2.0",
"size": 4017
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,250,694 |
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
int rc = super.tightMarshal1(wireFormat, o, bs);
return rc + 0;
} | int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } | /**
* Write the booleans that this object uses to a BooleanStream
*/ | Write the booleans that this object uses to a BooleanStream | tightMarshal1 | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java",
"license": "epl-1.0",
"size": 3654
} | [
"java.io.IOException",
"org.apache.activemq.openwire.BooleanStream",
"org.apache.activemq.openwire.OpenWireFormat"
] | import java.io.IOException; import org.apache.activemq.openwire.BooleanStream; import org.apache.activemq.openwire.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 122,688 |
public Configuration getConf()
{
return config;
} | Configuration function() { return config; } | /**
* Tool interface
*/ | Tool interface | getConf | {
"repo_name": "prateek/TimeseriesDelta",
"path": "src/main/java/com/cloudera/sa/timeseries/mapreduce/RollingAverage.java",
"license": "apache-2.0",
"size": 2851
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,648,381 |
private JTextArea getTextArea()
{
if(textArea == null)
{
textArea = new JTextArea();
textArea.setTabSize(2);
textArea.setEditable(false);
textArea.setOpaque(false);
}
return textArea;
}
| JTextArea function() { if(textArea == null) { textArea = new JTextArea(); textArea.setTabSize(2); textArea.setEditable(false); textArea.setOpaque(false); } return textArea; } | /**
* This method initializes textArea
*
* @return javax.swing.JTextArea
*/ | This method initializes textArea | getTextArea | {
"repo_name": "VEDAGroup/SHEF",
"path": "src/net/atlanticbb/tantlinger/ui/ExceptionDialog.java",
"license": "lgpl-2.1",
"size": 10367
} | [
"javax.swing.JTextArea"
] | import javax.swing.JTextArea; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,129,080 |
public void removeChangeListener(ChangeListener l) {
listener = null;
} | void function(ChangeListener l) { listener = null; } | /** Remove a listener to changes of the panel's validity.
* @param l the listener to remove
*/ | Remove a listener to changes of the panel's validity | removeChangeListener | {
"repo_name": "tedvals/mywms",
"path": "rich.client/los.clientsuite/LOS Data Importer/src/de/linogistix/losdataimporter/storagelocation/ImportLocationLabelPanel.java",
"license": "gpl-3.0",
"size": 5963
} | [
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,547,096 |
private int substitute(StrBuilder buf, int offset, int length, List<String> priorVariables) {
StrMatcher prefixMatcher = getVariablePrefixMatcher();
StrMatcher suffixMatcher = getVariableSuffixMatcher();
char escape = getEscapeChar();
boolean top = (priorVariables == null);
... | int function(StrBuilder buf, int offset, int length, List<String> priorVariables) { StrMatcher prefixMatcher = getVariablePrefixMatcher(); StrMatcher suffixMatcher = getVariableSuffixMatcher(); char escape = getEscapeChar(); boolean top = (priorVariables == null); boolean altered = false; int lengthChange = 0; char[] c... | /**
* Recursive handler for multiple levels of interpolation. This is the main
* interpolation method, which resolves the values of all variable references
* contained in the passed in text.
*
* @param buf the string builder to substitute into, not null
* @param offset the start offset w... | Recursive handler for multiple levels of interpolation. This is the main interpolation method, which resolves the values of all variable references contained in the passed in text | substitute | {
"repo_name": "SpoonLabs/astor",
"path": "examples/lang_39/src/java/org/apache/commons/lang3/text/StrSubstitutor.java",
"license": "gpl-2.0",
"size": 33540
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 300,863 |
private Map<Long, AssignmentMining> generateAssignmentMining()
{
final HashMap<Long, AssignmentMining> assignments = new HashMap<Long, AssignmentMining>();
try {
final HashMap<Long, EComponentType> eCTypes = new HashMap<Long, EComponentType>();
for (final EComponentType loadedItem : this.eComponentTy... | Map<Long, AssignmentMining> function() { final HashMap<Long, AssignmentMining> assignments = new HashMap<Long, AssignmentMining>(); try { final HashMap<Long, EComponentType> eCTypes = new HashMap<Long, EComponentType>(); for (final EComponentType loadedItem : this.eComponentType) { eCTypes.put(loadedItem.getId(), loade... | /**
* Generates AssignmentMining-objects from the given data.
*
* @return HashMap with AssignmentMining-objects
*/ | Generates AssignmentMining-objects from the given data | generateAssignmentMining | {
"repo_name": "LemoProject/lemo2",
"path": "src/main/java/de/lemo/dms/connectors/clix2010/ClixImporter.java",
"license": "gpl-3.0",
"size": 130676
} | [
"de.lemo.dms.connectors.clix2010.mapping.EComponent",
"de.lemo.dms.connectors.clix2010.mapping.EComponentType",
"de.lemo.dms.db.mapping.AssignmentMining",
"java.util.HashMap",
"java.util.Map"
] | import de.lemo.dms.connectors.clix2010.mapping.EComponent; import de.lemo.dms.connectors.clix2010.mapping.EComponentType; import de.lemo.dms.db.mapping.AssignmentMining; import java.util.HashMap; import java.util.Map; | import de.lemo.dms.connectors.clix2010.mapping.*; import de.lemo.dms.db.mapping.*; import java.util.*; | [
"de.lemo.dms",
"java.util"
] | de.lemo.dms; java.util; | 1,831,938 |
public static <K, V> Map<K, V> mapOf(K key, V value, Object... keyValues) {
final Map<K, V> map = new LinkedHashMap<K, V>(1 + keyValues.length);
map.put(key, value);
for (int i = 0; i < keyValues.length;) {
//noinspection unchecked
map.put((K) keyValues[i++], (V) keyValues[i++]);
}
ret... | static <K, V> Map<K, V> function(K key, V value, Object... keyValues) { final Map<K, V> map = new LinkedHashMap<K, V>(1 + keyValues.length); map.put(key, value); for (int i = 0; i < keyValues.length;) { map.put((K) keyValues[i++], (V) keyValues[i++]); } return map; } | /**
* Returns a hashmap with given contents.
*
* <p>Use this method in initializers. Type parameters are inferred from
* context, and the contents are initialized declaratively. For example,
*
* <blockquote><code>Map<String, Integer> population =<br>
* Olap4jUtil.mapOf(<br>
* &... | Returns a hashmap with given contents. Use this method in initializers. Type parameters are inferred from context, and the contents are initialized declaratively. For example, <code>Map<String, Integer> population = Olap4jUtil.mapOf( "UK", 65000000, "USA... | mapOf | {
"repo_name": "mehant/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/util/Util.java",
"license": "apache-2.0",
"size": 63074
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,250,776 |
@XmlElement(name = "metricType")
@XmlJavaTypeAdapter(MetricInfoTypeAdapter.class)
Class<?> getMetricType(); | @XmlElement(name = STR) @XmlJavaTypeAdapter(MetricInfoTypeAdapter.class) Class<?> getMetricType(); | /**
* Get the metric type
*
* @return The metric type
* @since 1.0.0
*/ | Get the metric type | getMetricType | {
"repo_name": "stzilli/kapua",
"path": "service/datastore/api/src/main/java/org/eclipse/kapua/service/datastore/model/MetricInfo.java",
"license": "epl-1.0",
"size": 5753
} | [
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter"
] | import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; | import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; | [
"javax.xml"
] | javax.xml; | 2,834,867 |
public Read<T> withCoderAndParseFn(Coder<T> coder, SimpleFunction<PubsubMessage, T> parseFn) {
return toBuilder().setCoder(coder).setParseFn(parseFn).build();
} | Read<T> function(Coder<T> coder, SimpleFunction<PubsubMessage, T> parseFn) { return toBuilder().setCoder(coder).setParseFn(parseFn).build(); } | /**
* Causes the source to return a PubsubMessage that includes Pubsub attributes, and uses the
* given parsing function to transform the PubsubMessage into an output type. A Coder for the
* output type T must be registered or set on the output via {@link
* PCollection#setCoder(Coder)}.
*/ | Causes the source to return a PubsubMessage that includes Pubsub attributes, and uses the given parsing function to transform the PubsubMessage into an output type. A Coder for the output type T must be registered or set on the output via <code>PCollection#setCoder(Coder)</code> | withCoderAndParseFn | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java",
"license": "apache-2.0",
"size": 54727
} | [
"org.apache.beam.sdk.coders.Coder",
"org.apache.beam.sdk.transforms.SimpleFunction"
] | import org.apache.beam.sdk.coders.Coder; import org.apache.beam.sdk.transforms.SimpleFunction; | import org.apache.beam.sdk.coders.*; import org.apache.beam.sdk.transforms.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,643,282 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Boolean>> connectionExistsWithResponseAsync(
String hub, String connectionId, RequestOptions requestOptions) {
if (hub == null) {
return Mono.error(new IllegalArgumentException("Parameter hub is required and cannot ... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Boolean>> function( String hub, String connectionId, RequestOptions requestOptions) { if (hub == null) { return Mono.error(new IllegalArgumentException(STR)); } if (connectionId == null) { return Mono.error(new IllegalArgumentException(STR)); } return FluxUtil.w... | /**
* Check if the connection with the given connectionId exists.
*
* <p><strong>Query Parameters</strong>
*
* <table border="1">
* <caption>Query Parameters</caption>
* <tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
* <tr><td>apiVersion</td>... | Check if the connection with the given connectionId exists. Query Parameters Query Parameters NameTypeRequiredDescription apiVersionStringYesApi Version Response Body Schema <code>boolean </code> | connectionExistsWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/webpubsub/azure-messaging-webpubsub/src/main/java/com/azure/messaging/webpubsub/implementation/WebPubSubsImpl.java",
"license": "mit",
"size": 121300
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.RequestOptions",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,218,254 |
@WebMethod(exclude = true)
protected void closeBid(Item item, Bidder bidder, BigDecimal amountPaid) {
} | @WebMethod(exclude = true) void function(Item item, Bidder bidder, BigDecimal amountPaid) { } | /**
* Marks an item as having been sold
* @param item
* @param bidder
*/ | Marks an item as having been sold | closeBid | {
"repo_name": "KiranMohan/actionbazaar",
"path": "ActionBazaar/ActionBazaar-ejb/src/main/java/com/actionbazaar/buslogic/BidServiceBean.java",
"license": "apache-2.0",
"size": 5485
} | [
"com.actionbazaar.account.Bidder",
"com.actionbazaar.persistence.Item",
"java.math.BigDecimal",
"javax.jws.WebMethod"
] | import com.actionbazaar.account.Bidder; import com.actionbazaar.persistence.Item; import java.math.BigDecimal; import javax.jws.WebMethod; | import com.actionbazaar.account.*; import com.actionbazaar.persistence.*; import java.math.*; import javax.jws.*; | [
"com.actionbazaar.account",
"com.actionbazaar.persistence",
"java.math",
"javax.jws"
] | com.actionbazaar.account; com.actionbazaar.persistence; java.math; javax.jws; | 1,545,997 |
protected Properties newProperties() {
return new Properties();
} | Properties function() { return new Properties(); } | /**
* Template method for creating a plain new {@link Properties} instance.
* The default implementation simply calls {@link Properties#Properties()}.
* <p>Allows for returning a custom {@link Properties} extension in subclasses.
* Overriding methods should just instantiate a custom {@link Properties} subclass,... | Template method for creating a plain new <code>Properties</code> instance. The default implementation simply calls <code>Properties#Properties()</code>. Allows for returning a custom <code>Properties</code> extension in subclasses. Overriding methods should just instantiate a custom <code>Properties</code> subclass, wi... | newProperties | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/context/support/ReloadableResourceBundleMessageSource.java",
"license": "gpl-2.0",
"size": 22006
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,266,596 |
private void beforeScaleZoom(Locus locus) {
calculateMaxZoom();
} | void function(Locus locus) { calculateMaxZoom(); } | /**
* Called before scaling and zooming, during jumpTo.
* Intended to be overridden
*
* @param locus
*/ | Called before scaling and zooming, during jumpTo. Intended to be overridden | beforeScaleZoom | {
"repo_name": "popitsch/varan-gie",
"path": "src/org/broad/igv/ui/panel/ReferenceFrame.java",
"license": "mit",
"size": 22065
} | [
"org.broad.igv.feature.Locus"
] | import org.broad.igv.feature.Locus; | import org.broad.igv.feature.*; | [
"org.broad.igv"
] | org.broad.igv; | 2,880,770 |
List<String> sendEmail(String templatePath, Map<String, String> emailParams, String... recipients);
| List<String> sendEmail(String templatePath, Map<String, String> emailParams, String... recipients); | /**
* Construct an email based on a template and send it to one or more
* recipients.
*
* @param templatePath Absolute path of the template used to send the email.
* @param emailParams Replacement variable map to be injected in the template
* @param recipients recipient email addres... | Construct an email based on a template and send it to one or more recipients | sendEmail | {
"repo_name": "bstopp/acs-aem-commons",
"path": "bundle/src/main/java/com/adobe/acs/commons/email/EmailService.java",
"license": "apache-2.0",
"size": 4187
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,649,904 |
private static InsnList getBasicInstructions(Object... values) {
InsnList il = new InsnList();
il.add(new LabelNode());
for (Object value : values) {
il.add(new LdcInsnNode(value));
}
return il;
} | static InsnList function(Object... values) { InsnList il = new InsnList(); il.add(new LabelNode()); for (Object value : values) { il.add(new LdcInsnNode(value)); } return il; } | /**
* <p>
* This method provides instructions to be included before various logging
* </p>
*
* @param String
* [] values values to be passed as parameters in logging method
* @return Instructions
*/ | This method provides instructions to be included before various logging | getBasicInstructions | {
"repo_name": "impetus-opensource/jumbune",
"path": "debugger/src/main/java/org/jumbune/debugger/instrumentation/utils/InstrumentUtil.java",
"license": "lgpl-3.0",
"size": 33467
} | [
"org.objectweb.asm.tree.InsnList",
"org.objectweb.asm.tree.LabelNode",
"org.objectweb.asm.tree.LdcInsnNode"
] | import org.objectweb.asm.tree.InsnList; import org.objectweb.asm.tree.LabelNode; import org.objectweb.asm.tree.LdcInsnNode; | import org.objectweb.asm.tree.*; | [
"org.objectweb.asm"
] | org.objectweb.asm; | 264,258 |
public void defineFunctionProperties(String[] names, Class<?> clazz,
int attributes)
{
Method[] methods = FunctionObject.getMethodList(clazz);
for (int i=0; i < names.length; i++) {
String name = names[i];
Method m = FunctionObject... | void function(String[] names, Class<?> clazz, int attributes) { Method[] methods = FunctionObject.getMethodList(clazz); for (int i=0; i < names.length; i++) { String name = names[i]; Method m = FunctionObject.findSingleMethod(methods, name); if (m == null) { throw Context.reportRuntimeError2( STR, name, clazz.getName()... | /**
* Search for names in a class, adding the resulting methods
* as properties.
*
* <p> Uses reflection to find the methods of the given names. Then
* FunctionObjects are constructed from the methods found, and
* are added to this object as properties with the given names.
*
* @... | Search for names in a class, adding the resulting methods as properties. Uses reflection to find the methods of the given names. Then FunctionObjects are constructed from the methods found, and are added to this object as properties with the given names | defineFunctionProperties | {
"repo_name": "AlexTrotsenko/rhino",
"path": "src/org/mozilla/javascript/ScriptableObject.java",
"license": "mpl-2.0",
"size": 114768
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 829,981 |
@Override
public void setAttribute(String name, String value, Collection<ICompilerProblem> problems)
{
if (isVersionGreaterThanCompiler())
{
// Warning: Minor version of this FXG file is greater than minor
// version supported by this compiler. Log a warning for an unkno... | void function(String name, String value, Collection<ICompilerProblem> problems) { if (isVersionGreaterThanCompiler()) { } else { problems.add(new FXGInvalidNodeAttributeProblem(getDocumentPath(), getStartLine(), getStartColumn(), name, getNodeName())); } } | /**
* Sets an FXG attribute on this FXG node.
*
* @param name - the unqualified attribute name
* @param value - the attribute value
* @param problems problem collection used to collect problems occurred within this method
*/ | Sets an FXG attribute on this FXG node | setAttribute | {
"repo_name": "adufilie/flex-falcon",
"path": "compiler/src/org/apache/flex/compiler/internal/fxg/dom/AbstractFXGNode.java",
"license": "apache-2.0",
"size": 7252
} | [
"java.util.Collection",
"org.apache.flex.compiler.problems.FXGInvalidNodeAttributeProblem",
"org.apache.flex.compiler.problems.ICompilerProblem"
] | import java.util.Collection; import org.apache.flex.compiler.problems.FXGInvalidNodeAttributeProblem; import org.apache.flex.compiler.problems.ICompilerProblem; | import java.util.*; import org.apache.flex.compiler.problems.*; | [
"java.util",
"org.apache.flex"
] | java.util; org.apache.flex; | 45,280 |
@Override
public void onCollideWithPlayer(EntityPlayer entityIn)
{
if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
{
boolean flag = this.canBePickedUp == 1 || this.canBePickedUp == 2 && entityIn.capabilities.isCreativeMode;
ItemStack item = getPickupItem();
if (item == null) { r... | void function(EntityPlayer entityIn) { if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0) { boolean flag = this.canBePickedUp == 1 this.canBePickedUp == 2 && entityIn.capabilities.isCreativeMode; ItemStack item = getPickupItem(); if (item == null) { return; } if (this.canBePickedUp == 1 && !entityIn.... | /**
* Called by a player entity when they collide with an entity
*/ | Called by a player entity when they collide with an entity | onCollideWithPlayer | {
"repo_name": "tom5454/ARKCraft",
"path": "src/main/java/com/uberverse/arkcraft/common/entity/EntityProjectile.java",
"license": "mit",
"size": 20106
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; | import net.minecraft.entity.player.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.item; | 1,419,206 |
public List<byte[]> loadVerticesColors(Structure meshStructure, BlenderContext blenderContext) throws BlenderFileException {
LOGGER.log(Level.FINE, "Loading vertices colors from mesh: {0}.", meshStructure.getName());
MeshHelper meshHelper = blenderContext.getHelper(MeshHelper.class);
Pointer... | List<byte[]> function(Structure meshStructure, BlenderContext blenderContext) throws BlenderFileException { LOGGER.log(Level.FINE, STR, meshStructure.getName()); MeshHelper meshHelper = blenderContext.getHelper(MeshHelper.class); Pointer pMCol = (Pointer) meshStructure.getFieldValue(meshHelper.isBMeshCompatible(meshStr... | /**
* This method returns the vertices colors. Each vertex is stored in byte[4] array.
*
* @param meshStructure
* the structure containing the mesh data
* @param blenderContext
* the blender context
* @return a list of vertices colors, each color belongs to a si... | This method returns the vertices colors. Each vertex is stored in byte[4] array | loadVerticesColors | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "trunk/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/MeshHelper.java",
"license": "apache-2.0",
"size": 19213
} | [
"com.jme3.scene.plugins.blender.BlenderContext",
"com.jme3.scene.plugins.blender.file.BlenderFileException",
"com.jme3.scene.plugins.blender.file.Pointer",
"com.jme3.scene.plugins.blender.file.Structure",
"java.util.ArrayList",
"java.util.List",
"java.util.logging.Level"
] | import com.jme3.scene.plugins.blender.BlenderContext; import com.jme3.scene.plugins.blender.file.BlenderFileException; import com.jme3.scene.plugins.blender.file.Pointer; import com.jme3.scene.plugins.blender.file.Structure; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; | import com.jme3.scene.plugins.blender.*; import com.jme3.scene.plugins.blender.file.*; import java.util.*; import java.util.logging.*; | [
"com.jme3.scene",
"java.util"
] | com.jme3.scene; java.util; | 976,976 |
String getDirectoryListing(String directory, boolean listDirectories) {
StringBuilder buff = new StringBuilder();
for (String fileName : FileUtils.newDirectoryStream(directory)) {
if (!FileUtils.isDirectory(fileName) || (FileUtils.isDirectory(fileName) && listDirectories)) {
... | String getDirectoryListing(String directory, boolean listDirectories) { StringBuilder buff = new StringBuilder(); for (String fileName : FileUtils.newDirectoryStream(directory)) { if (!FileUtils.isDirectory(fileName) (FileUtils.isDirectory(fileName) && listDirectories)) { appendFile(buff, fileName); } } return buff.toS... | /**
* Get the directory listing for this directory.
*
* @param directory the directory to list
* @param listDirectories if sub-directories should be listed
* @return the list
*/ | Get the directory listing for this directory | getDirectoryListing | {
"repo_name": "ferquies/2dam",
"path": "AD/Tema 2/h2/src/tools/org/h2/dev/ftp/server/FtpServer.java",
"license": "gpl-3.0",
"size": 17689
} | [
"org.h2.store.fs.FileUtils"
] | import org.h2.store.fs.FileUtils; | import org.h2.store.fs.*; | [
"org.h2.store"
] | org.h2.store; | 123,695 |
private ExceptionSet computeThrownExceptionTypes(BasicBlock basicBlock) throws DataflowAnalysisException {
ExceptionSet exceptionTypeSet = exceptionSetFactory.createExceptionSet();
InstructionHandle pei = basicBlock.getExceptionThrower();
Instruction ins = pei.getInstruction();
// ... | ExceptionSet function(BasicBlock basicBlock) throws DataflowAnalysisException { ExceptionSet exceptionTypeSet = exceptionSetFactory.createExceptionSet(); InstructionHandle pei = basicBlock.getExceptionThrower(); Instruction ins = pei.getInstruction(); ExceptionThrower exceptionThrower = (ExceptionThrower) ins; Class<?>... | /**
* Compute the set of exception types that can be thrown by given basic
* block.
*
* @param basicBlock
* the basic block
* @return the set of exceptions that can be thrown by the block
*/ | Compute the set of exception types that can be thrown by given basic block | computeThrownExceptionTypes | {
"repo_name": "spotbugs/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/type/TypeAnalysis.java",
"license": "lgpl-2.1",
"size": 37916
} | [
"edu.umd.cs.findbugs.ba.BasicBlock",
"edu.umd.cs.findbugs.ba.DataflowAnalysisException",
"edu.umd.cs.findbugs.ba.Hierarchy",
"edu.umd.cs.findbugs.ba.Hierarchy2",
"edu.umd.cs.findbugs.ba.ObjectTypeFactory",
"edu.umd.cs.findbugs.ba.SignatureConverter",
"org.apache.bcel.generic.ConstantPoolGen",
"org.apa... | import edu.umd.cs.findbugs.ba.BasicBlock; import edu.umd.cs.findbugs.ba.DataflowAnalysisException; import edu.umd.cs.findbugs.ba.Hierarchy; import edu.umd.cs.findbugs.ba.Hierarchy2; import edu.umd.cs.findbugs.ba.ObjectTypeFactory; import edu.umd.cs.findbugs.ba.SignatureConverter; import org.apache.bcel.generic.Constant... | import edu.umd.cs.findbugs.ba.*; import org.apache.bcel.generic.*; | [
"edu.umd.cs",
"org.apache.bcel"
] | edu.umd.cs; org.apache.bcel; | 1,880,676 |
// TODO: this feels hacky!
if(scopeActivity instanceof PvmProcessDefinition) {
return execution.getProcessInstance();
} else {
ActivityImpl currentActivity = execution.getActivity();
ExecutionEntity candiadateExecution = null;
ExecutionEntity originalExecutio... | if(scopeActivity instanceof PvmProcessDefinition) { return execution.getProcessInstance(); } else { ActivityImpl currentActivity = execution.getActivity(); ExecutionEntity candiadateExecution = null; ExecutionEntity originalExecution = execution; while (execution != null) { currentActivity = execution.getActivity(); if... | /**
* returns the top-most execution sitting in an activity part of the scope defined by 'scopeActivitiy'.
*/ | returns the top-most execution sitting in an activity part of the scope defined by 'scopeActivitiy' | findScopeExecution | {
"repo_name": "iotsap/FiWare-Template-Handler",
"path": "ExecutionEnvironment/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ScopeUtil.java",
"license": "bsd-3-clause",
"size": 8020
} | [
"org.activiti.engine.impl.persistence.entity.ExecutionEntity",
"org.activiti.engine.impl.pvm.PvmProcessDefinition",
"org.activiti.engine.impl.pvm.process.ActivityImpl"
] | import org.activiti.engine.impl.persistence.entity.ExecutionEntity; import org.activiti.engine.impl.pvm.PvmProcessDefinition; import org.activiti.engine.impl.pvm.process.ActivityImpl; | import org.activiti.engine.impl.persistence.entity.*; import org.activiti.engine.impl.pvm.*; import org.activiti.engine.impl.pvm.process.*; | [
"org.activiti.engine"
] | org.activiti.engine; | 56,722 |
public static boolean isUsbPolicyLegal(UsbPolicy usbPolicy,
int osId,
VDSGroup vdsGroup,
List<String> messages) {
boolean retVal = true;
if (UsbPolicy.ENABLED_NATIVE.equals(usbPolicy)) {
if (!Config.<Boolean> getValue(ConfigValues.NativeUSBEnabled, vds... | static boolean function(UsbPolicy usbPolicy, int osId, VDSGroup vdsGroup, List<String> messages) { boolean retVal = true; if (UsbPolicy.ENABLED_NATIVE.equals(usbPolicy)) { if (!Config.<Boolean> getValue(ConfigValues.NativeUSBEnabled, vdsGroup.getcompatibility_version() .getValue())) { messages.add(VdcBllMessages.USB_NA... | /**
* Checks that the USB policy is legal for the VM. If it is ENABLED_NATIVE then it is legal only in case the cluster
* level is >= 3.1. If it is ENABLED_LEGACY then it is not legal on Linux VMs.
*
* @param usbPolicy
* @param osId
* @param vdsGroup
* @param messages
* ... | Checks that the USB policy is legal for the VM. If it is ENABLED_NATIVE then it is legal only in case the cluster level is >= 3.1. If it is ENABLED_LEGACY then it is not legal on Linux VMs | isUsbPolicyLegal | {
"repo_name": "halober/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java",
"license": "apache-2.0",
"size": 34157
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.UsbPolicy",
"org.ovirt.engine.core.common.businessentities.VDSGroup",
"org.ovirt.engine.core.common.config.Config",
"org.ovirt.engine.core.common.config.ConfigValues",
"org.ovirt.engine.core.common.errors.VdcBllMessages"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.UsbPolicy; import org.ovirt.engine.core.common.businessentities.VDSGroup; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.errors.VdcBllMessages; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.config.*; import org.ovirt.engine.core.common.errors.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 2,881,510 |
private Row<PDPage> generateHeader(BaseTable table) {
Row<PDPage> headerRow = table.createRow(15f);
Cell<PDPage> cell = headerRow.createCell((100 / 11f), "SNo");
cellProps(cell);
cell = headerRow.createCell((100 / 11f), "Asset");
cellProps(cell);
cell = headerRow.createCell((100 / 11f), "Tool");
cellPr... | Row<PDPage> function(BaseTable table) { Row<PDPage> headerRow = table.createRow(15f); Cell<PDPage> cell = headerRow.createCell((100 / 11f), "SNo"); cellProps(cell); cell = headerRow.createCell((100 / 11f), "Asset"); cellProps(cell); cell = headerRow.createCell((100 / 11f), "Tool"); cellProps(cell); cell = headerRow.cre... | /**
* Generate Header with defined width considering total width as 100.
* @param table
* @return header row
*/ | Generate Header with defined width considering total width as 100 | generateHeader | {
"repo_name": "CognizantOneDevOps/Insights",
"path": "PlatformAuditing/src/main/java/com/cognizant/devops/platformauditing/util/PdfTableUtil.java",
"license": "apache-2.0",
"size": 24294
} | [
"be.quodlibet.boxable.BaseTable",
"be.quodlibet.boxable.Cell",
"be.quodlibet.boxable.Row",
"org.apache.pdfbox.pdmodel.PDPage"
] | import be.quodlibet.boxable.BaseTable; import be.quodlibet.boxable.Cell; import be.quodlibet.boxable.Row; import org.apache.pdfbox.pdmodel.PDPage; | import be.quodlibet.boxable.*; import org.apache.pdfbox.pdmodel.*; | [
"be.quodlibet.boxable",
"org.apache.pdfbox"
] | be.quodlibet.boxable; org.apache.pdfbox; | 2,543,846 |
public void service( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
{
if ( getLogger().isDebugEnabled() )
{
StringBuffer sb = new StringBuffer( request.getRequestURI() );
String query = request.getQueryString();
... | void function( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException { if ( getLogger().isDebugEnabled() ) { StringBuffer sb = new StringBuffer( request.getRequestURI() ); String query = request.getQueryString(); if ( query != null ) { sb.append( "?" ); sb.append( query ); } ge... | /**
* Receives standard HTTP requests from the public service method and dispatches
* them to the doXXX methods defined in this class.
* Overrides the default method to allow for instrumentation.
*
* @param request The HttpServletRequest object that contains the request the
* ... | Receives standard HTTP requests from the public service method and dispatches them to the doXXX methods defined in this class. Overrides the default method to allow for instrumentation | service | {
"repo_name": "eva-xuyen/excalibur",
"path": "deprecated/component/src/main/java/org/apache/avalon/excalibur/component/servlet/AbstractServiceManagerServlet.java",
"license": "apache-2.0",
"size": 13480
} | [
"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; | 2,202,096 |
public Map<FieldDescriptorType, Object> getAllFields() {
if (hasLazyField) {
SmallSortedMap<FieldDescriptorType, Object> result = SmallSortedMap.newFieldMap(16);
for (int i = 0; i < fields.getNumArrayEntries(); i++) {
cloneFieldEntry(result, fields.getArrayEntryAt(i));
}
for (Map.Entry<FieldDescrip... | Map<FieldDescriptorType, Object> function() { if (hasLazyField) { SmallSortedMap<FieldDescriptorType, Object> result = SmallSortedMap.newFieldMap(16); for (int i = 0; i < fields.getNumArrayEntries(); i++) { cloneFieldEntry(result, fields.getArrayEntryAt(i)); } for (Map.Entry<FieldDescriptorType, Object> entry : fields.... | /**
* Get a simple map containing all the fields.
*/ | Get a simple map containing all the fields | getAllFields | {
"repo_name": "n2hsu/Nii-Launcher",
"path": "src/com/google/protobuf/FieldSet.java",
"license": "apache-2.0",
"size": 29379
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,050,842 |
public List<InterfaceType> getAll(); | List<InterfaceType> function(); | /**
* Retrieves all Interface Types
*
* @return List<InterfaceType>
*/ | Retrieves all Interface Types | getAll | {
"repo_name": "rob-murray/ipac",
"path": "WEBAPP/src/main/java/com/ipac/app/dao/InterfaceTypeDao.java",
"license": "gpl-3.0",
"size": 883
} | [
"com.ipac.app.model.InterfaceType",
"java.util.List"
] | import com.ipac.app.model.InterfaceType; import java.util.List; | import com.ipac.app.model.*; import java.util.*; | [
"com.ipac.app",
"java.util"
] | com.ipac.app; java.util; | 835,814 |
public static String send4LetterWord(String host, int port, String cmd)
throws IOException
{
LOG.info("connecting to " + host + " " + port);
Socket sock = new Socket(host, port);
BufferedReader reader = null;
try {
OutputStream outstream = sock.getOutputStream... | static String function(String host, int port, String cmd) throws IOException { LOG.info(STR + host + " " + port); Socket sock = new Socket(host, port); BufferedReader reader = null; try { OutputStream outstream = sock.getOutputStream(); outstream.write(cmd.getBytes()); outstream.flush(); sock.shutdownOutput(); reader =... | /**
* Send the 4letterword
* @param host the destination host
* @param port the destination port
* @param cmd the 4letterword
* @return
* @throws IOException
*/ | Send the 4letterword | send4LetterWord | {
"repo_name": "JingchengDu/hadoop",
"path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ha/ClientBaseWithFixes.java",
"license": "apache-2.0",
"size": 15939
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.OutputStream",
"java.net.Socket"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,358,114 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.