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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test (timeout=300000)
public void testArchivingEnableDisable() throws Exception {
// 1. turn on hfile backups
LOG.debug("----Starting archiving");
archivingClient.enableHFileBackupAsync(TABLE_NAME);
assertTrue("Archving didn't get turned on", archivingClient
.getArchivingEnabled(TABLE_NAME)... | @Test (timeout=300000) void function() throws Exception { LOG.debug(STR); archivingClient.enableHFileBackupAsync(TABLE_NAME); assertTrue(STR, archivingClient .getArchivingEnabled(TABLE_NAME)); archivingClient.disableHFileBackup(); assertFalse(STR, archivingClient.getArchivingEnabled(TABLE_NAME)); archivingClient.enable... | /**
* Test turning on/off archiving
*/ | Test turning on/off archiving | testArchivingEnableDisable | {
"repo_name": "gustavoanatoly/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java",
"license": "apache-2.0",
"size": 18243
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 226,163 |
protected String marshallAdvisory(final DataStructure ds) {
XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
xstream.setMode(XStream.NO_REFERENCES);
xstream.aliasPackage("", "org.apache.activemq.command");
return xstream.toXML(ds);
} | String function(final DataStructure ds) { XStream xstream = new XStream(new JsonHierarchicalStreamDriver()); xstream.setMode(XStream.NO_REFERENCES); xstream.aliasPackage(STRorg.apache.activemq.command"); return xstream.toXML(ds); } | /**
* Return an Advisory message as a JSON formatted string
*
* @param ds the DataStructure instance that is being marshaled.
* @return the JSON marshaled form of the given DataStructure instance.
*/ | Return an Advisory message as a JSON formatted string | marshallAdvisory | {
"repo_name": "oscerd/quickstarts",
"path": "sandbox-apps/fabric8mq/src/main/java/io/fabric8/mq/protocol/stomp/JmsFrameTranslator.java",
"license": "apache-2.0",
"size": 12767
} | [
"com.thoughtworks.xstream.XStream",
"com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver",
"org.apache.activemq.command.DataStructure"
] | import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.json.JsonHierarchicalStreamDriver; import org.apache.activemq.command.DataStructure; | import com.thoughtworks.xstream.*; import com.thoughtworks.xstream.io.json.*; import org.apache.activemq.command.*; | [
"com.thoughtworks.xstream",
"org.apache.activemq"
] | com.thoughtworks.xstream; org.apache.activemq; | 1,850,355 |
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
} | KeyNamePair function() { return new KeyNamePair(get_ID(), getName()); } | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/ | Get Record ID/ColumnName | getKeyNamePair | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_C_Dunning.java",
"license": "gpl-2.0",
"size": 5778
} | [
"org.compiere.util.KeyNamePair"
] | import org.compiere.util.KeyNamePair; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 1,291,899 |
public static RexNode unionPreds(
RexBuilder rexBuilder,
RexNode pred1,
RexNode pred2) {
final List<RexNode> unionList = new ArrayList<>();
final Set<String> strings = new HashSet<>();
for (RexNode rex : RelOptUtil.conjunctions(pred1)) {
if (strings.add(rex.toString())) {
... | static RexNode function( RexBuilder rexBuilder, RexNode pred1, RexNode pred2) { final List<RexNode> unionList = new ArrayList<>(); final Set<String> strings = new HashSet<>(); for (RexNode rex : RelOptUtil.conjunctions(pred1)) { if (strings.add(rex.toString())) { unionList.add(rex); } } for (RexNode rex2 : RelOptUtil.c... | /**
* AND's two predicates together, either of which may be null, removing
* redundant filters.
*
* @param rexBuilder rexBuilder used to construct AND'd RexNode
* @param pred1 first predicate
* @param pred2 second predicate
* @return AND'd predicate or individual predicates if one is null... | AND's two predicates together, either of which may be null, removing redundant filters | unionPreds | {
"repo_name": "sreev/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java",
"license": "apache-2.0",
"size": 28641
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.apache.calcite.plan.RelOptUtil",
"org.apache.calcite.rex.RexBuilder",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.rex.RexUtil"
] | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.rex.RexNode; import org.apache.calcite.rex.RexUtil; | import java.util.*; import org.apache.calcite.plan.*; import org.apache.calcite.rex.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 354,077 |
public boolean findByStructure(Structure structure, User user, boolean respectFrontendRoles, int limit, int offset);
| boolean function(Structure structure, User user, boolean respectFrontendRoles, int limit, int offset); | /**
* Returns all Contentlets for a specific structure
* @param structure
* @param user
* @param respectFrontendRoles
* @param limit
* @param offset
* @return
* @throws DotDataException
* @throws DotSecurityException
*/ | Returns all Contentlets for a specific structure | findByStructure | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java",
"license": "gpl-3.0",
"size": 46827
} | [
"com.dotmarketing.portlets.structure.model.Structure",
"com.liferay.portal.model.User"
] | import com.dotmarketing.portlets.structure.model.Structure; import com.liferay.portal.model.User; | import com.dotmarketing.portlets.structure.model.*; import com.liferay.portal.model.*; | [
"com.dotmarketing.portlets",
"com.liferay.portal"
] | com.dotmarketing.portlets; com.liferay.portal; | 2,319,853 |
protected void init(JmlScanner j) {
j.noJML = !JmlOption.isOption(context, JmlOption.JML);
j.keys = Utils.instance(context).commentKeys;
j.nowarns = Nowarns.instance(context);
}
}
protected Context context;
public Nowarns no... | void function(JmlScanner j) { j.noJML = !JmlOption.isOption(context, JmlOption.JML); j.keys = Utils.instance(context).commentKeys; j.nowarns = Nowarns.instance(context); } } protected Context context; public Nowarns nowarns; protected boolean noJML = false; protected boolean jml = false; protected Set<String> keys; pub... | /** Does some initialization of just produced scanners - all in one method so that
* the code does not have to be replicated across various newScanner methods.
* @param j the JmlSCanner to initialize
*/ | Does some initialization of just produced scanners - all in one method so that the code does not have to be replicated across various newScanner methods | init | {
"repo_name": "shunghsiyu/OpenJML_XOR",
"path": "OpenJML/src/com/sun/tools/javac/parser/JmlScanner.java",
"license": "gpl-2.0",
"size": 37769
} | [
"com.sun.tools.javac.util.Context",
"java.nio.CharBuffer",
"java.util.Set",
"org.jmlspecs.openjml.JmlOption",
"org.jmlspecs.openjml.JmlToken",
"org.jmlspecs.openjml.Nowarns",
"org.jmlspecs.openjml.Utils"
] | import com.sun.tools.javac.util.Context; import java.nio.CharBuffer; import java.util.Set; import org.jmlspecs.openjml.JmlOption; import org.jmlspecs.openjml.JmlToken; import org.jmlspecs.openjml.Nowarns; import org.jmlspecs.openjml.Utils; | import com.sun.tools.javac.util.*; import java.nio.*; import java.util.*; import org.jmlspecs.openjml.*; | [
"com.sun.tools",
"java.nio",
"java.util",
"org.jmlspecs.openjml"
] | com.sun.tools; java.nio; java.util; org.jmlspecs.openjml; | 338,339 |
protected User getUserByPattern(DirContext context,
String username,
String credentials,
String[] attrIds,
int curUserPattern)
throws NamingException {
Use... | User function(DirContext context, String username, String credentials, String[] attrIds, int curUserPattern) throws NamingException { User user = null; if (username == null userPatternFormatArray[curUserPattern] == null) return (null); String dn = userPatternFormatArray[curUserPattern].format(new String[] { username })... | /**
* Use the <code>UserPattern</code> configuration attribute to
* locate the directory entry for the user with the specified
* username and return a User object; otherwise return
* <code>null</code>.
*
* @param context The directory context
* @param username The username
* @par... | Use the <code>UserPattern</code> configuration attribute to locate the directory entry for the user with the specified username and return a User object; otherwise return <code>null</code> | getUserByPattern | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/JNDIRealm.java",
"license": "mit",
"size": 71537
} | [
"javax.naming.Context",
"javax.naming.NameNotFoundException",
"javax.naming.NamingException",
"javax.naming.directory.DirContext"
] | import javax.naming.Context; import javax.naming.NameNotFoundException; import javax.naming.NamingException; import javax.naming.directory.DirContext; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 2,049,890 |
public PropertyGenerator[] getPropertyGenerators() {
PropertyGenerator[] pg = new PropertyGenerator[1];
pg[0] = new AreaOpPropertyGenerator();
return pg;
}
| PropertyGenerator[] function() { PropertyGenerator[] pg = new PropertyGenerator[1]; pg[0] = new AreaOpPropertyGenerator(); return pg; } | /**
* Returns an array of <code>PropertyGenerators</code> implementing
* property inheritance for the "Erode" operation.
*
* @return An array of property generators.
*/ | Returns an array of <code>PropertyGenerators</code> implementing property inheritance for the "Erode" operation | getPropertyGenerators | {
"repo_name": "RoProducts/rastertheque",
"path": "JAILibrary/src/javax/media/jai/operator/ErodeDescriptor.java",
"license": "gpl-2.0",
"size": 9350
} | [
"com.sun.media.jai.util.AreaOpPropertyGenerator",
"javax.media.jai.PropertyGenerator"
] | import com.sun.media.jai.util.AreaOpPropertyGenerator; import javax.media.jai.PropertyGenerator; | import com.sun.media.jai.util.*; import javax.media.jai.*; | [
"com.sun.media",
"javax.media"
] | com.sun.media; javax.media; | 2,550,153 |
public String diff_text2(LinkedList<Diff> diffs) {
StringBuilder text = new StringBuilder();
for (Diff aDiff : diffs) {
if (aDiff.operation != Operation.DELETE) {
text.append(aDiff.text);
}
}
return text.toString();
} | String function(LinkedList<Diff> diffs) { StringBuilder text = new StringBuilder(); for (Diff aDiff : diffs) { if (aDiff.operation != Operation.DELETE) { text.append(aDiff.text); } } return text.toString(); } | /**
* Compute and return the destination text (all equalities and insertions).
* @param diffs LinkedList of Diff objects.
* @return Destination text.
*/ | Compute and return the destination text (all equalities and insertions) | diff_text2 | {
"repo_name": "Floobits/eclipse",
"path": "src/floobits/common/dmp/diff_match_patch.java",
"license": "apache-2.0",
"size": 89016
} | [
"java.util.LinkedList"
] | import java.util.LinkedList; | import java.util.*; | [
"java.util"
] | java.util; | 1,616,757 |
@SuppressWarnings("try")
private void computeLocalLiveSets() {
int liveSize = liveSetSize();
// iterate all blocks
for (final AbstractBlockBase<?> block : getBlocks()) {
try (Indent indent = Debug.logAndIndent("compute local live sets for block %s", b... | @SuppressWarnings("try") void function() { int liveSize = liveSetSize(); for (final AbstractBlockBase<?> block : getBlocks()) { try (Indent indent = Debug.logAndIndent(STR, block)) { final BitSet liveGen = new BitSet(liveSize); final BitSet liveKill = new BitSet(liveSize); | /**
* Computes local live sets (i.e. {@link BlockData#liveGen} and {@link BlockData#liveKill})
* separately for each block.
*/ | Computes local live sets (i.e. <code>BlockData#liveGen</code> and <code>BlockData#liveKill</code>) separately for each block | computeLocalLiveSets | {
"repo_name": "davleopo/graal-core",
"path": "graal/com.oracle.graal.lir/src/com/oracle/graal/lir/ssi/SSIConstructionPhase.java",
"license": "gpl-2.0",
"size": 17278
} | [
"com.oracle.graal.compiler.common.cfg.AbstractBlockBase",
"com.oracle.graal.debug.Debug",
"com.oracle.graal.debug.Indent",
"java.util.BitSet"
] | import com.oracle.graal.compiler.common.cfg.AbstractBlockBase; import com.oracle.graal.debug.Debug; import com.oracle.graal.debug.Indent; import java.util.BitSet; | import com.oracle.graal.compiler.common.cfg.*; import com.oracle.graal.debug.*; import java.util.*; | [
"com.oracle.graal",
"java.util"
] | com.oracle.graal; java.util; | 594,444 |
private Expr bindParent(String tableName, String columnName)
throws SQLException
{
if (_parent != null) {
Expr expr = _parent.bind(tableName, columnName);
if (expr != null) {
SubSelectParamExpr paramExpr;
paramExpr = new SubSelectParamExpr(this, expr, _paramExprs.size());
... | Expr function(String tableName, String columnName) throws SQLException { if (_parent != null) { Expr expr = _parent.bind(tableName, columnName); if (expr != null) { SubSelectParamExpr paramExpr; paramExpr = new SubSelectParamExpr(this, expr, _paramExprs.size()); _paramExprs.add(paramExpr); return paramExpr; } } return ... | /**
* Binds as a subselect.
*/ | Binds as a subselect | bindParent | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/db/sql/Query.java",
"license": "gpl-2.0",
"size": 24095
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,910,703 |
public static boolean isNavigationKeyCode(int keyCode) {
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_UP:
case KeyEvent.KEYCODE_DPAD_DOWN:
case KeyEvent.KEYCODE_DPAD_LEFT:
case KeyEvent.KEYCODE_DPAD_RIGHT:
case KeyEvent.KEYCODE_MOVE_HOME:
... | static boolean function(int keyCode) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_UP: case KeyEvent.KEYCODE_DPAD_DOWN: case KeyEvent.KEYCODE_DPAD_LEFT: case KeyEvent.KEYCODE_DPAD_RIGHT: case KeyEvent.KEYCODE_MOVE_HOME: case KeyEvent.KEYCODE_MOVE_END: case KeyEvent.KEYCODE_PAGE_UP: case KeyEvent.KEYCODE_PAGE_DOWN: re... | /**
* Whether or not the given keyCode represents a navigation keystroke (e.g. up, down, home).
*
* @param keyCode
* @return
*/ | Whether or not the given keyCode represents a navigation keystroke (e.g. up, down, home) | isNavigationKeyCode | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/DocumentsUI/src/com/android/documentsui/Events.java",
"license": "apache-2.0",
"size": 6647
} | [
"android.view.KeyEvent"
] | import android.view.KeyEvent; | import android.view.*; | [
"android.view"
] | android.view; | 1,772,373 |
@Override
public boolean matches(final Address otherAddr) {
if (otherAddr == null)
return false;
if (address.equals(otherAddr.getAddress()))
return true;
final char sepAnyWords = wildcardConfiguration.getAnyWords();
final char sepSingleWord = wildcardConfiguration.getSi... | boolean function(final Address otherAddr) { if (otherAddr == null) return false; if (address.equals(otherAddr.getAddress())) return true; final char sepAnyWords = wildcardConfiguration.getAnyWords(); final char sepSingleWord = wildcardConfiguration.getSingleWord(); final int thisAddrPartsLen = addressParts.length; fina... | /**
* This method should actually be called `isMatchedBy`.
*
* @return `true` if this equals otherAddr or this address is matched by a pattern represented by otherAddr
*/ | This method should actually be called `isMatchedBy` | matches | {
"repo_name": "andytaylor/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java",
"license": "apache-2.0",
"size": 7031
} | [
"org.apache.activemq.artemis.api.core.SimpleString",
"org.apache.activemq.artemis.core.postoffice.Address"
] | import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.postoffice.Address; | import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.postoffice.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,861,058 |
public List<SymbolicPolynomial> getGenerators() {
List<? extends SymbolicPolynomial> univs = univariateList();
List<SymbolicPolynomial> gens = new ArrayList<SymbolicPolynomial>(univs.size() + 1);
gens.add(getOne());
gens.addAll(univs);
return gens;
} | List<SymbolicPolynomial> function() { List<? extends SymbolicPolynomial> univs = univariateList(); List<SymbolicPolynomial> gens = new ArrayList<SymbolicPolynomial>(univs.size() + 1); gens.add(getOne()); gens.addAll(univs); return gens; } | /**
* Get the generating elements excluding the generators for the coefficient ring.
*
* @return a list of generating elements for this ring.
*/ | Get the generating elements excluding the generators for the coefficient ring | getGenerators | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/polynomials/symbolicexponent/SymbolicPolynomialRing.java",
"license": "gpl-3.0",
"size": 45623
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,065,787 |
public Vote prepare() throws WrongStateException, SystemException; | Vote function() throws WrongStateException, SystemException; | /**
* Perform any work necessary to allow it to either commit or rollback
* the work performed by the Web service under the scope of the
* transaction. The implementation is free to do whatever it needs to in
* order to fulfill the implicit contract between it and the coordinator.
*
* @ret... | Perform any work necessary to allow it to either commit or rollback the work performed by the Web service under the scope of the transaction. The implementation is free to do whatever it needs to in order to fulfill the implicit contract between it and the coordinator | prepare | {
"repo_name": "tfisher1226/ARIES",
"path": "aries/common/common-transaction/src/main/java/org/aries/tx/participant/Participant.java",
"license": "apache-2.0",
"size": 1722
} | [
"org.aries.tx.exception.SystemException",
"org.aries.tx.exception.WrongStateException",
"org.aries.tx.vote.Vote"
] | import org.aries.tx.exception.SystemException; import org.aries.tx.exception.WrongStateException; import org.aries.tx.vote.Vote; | import org.aries.tx.exception.*; import org.aries.tx.vote.*; | [
"org.aries.tx"
] | org.aries.tx; | 2,468,591 |
public List<ReplicaSet> validReplicaSets() {
List<ReplicaSet> replicaSets = new ArrayList<>();
replicaSets.addAll(replicaSetsByName.values());
return replicaSets;
} | List<ReplicaSet> function() { List<ReplicaSet> replicaSets = new ArrayList<>(); replicaSets.addAll(replicaSetsByName.values()); return replicaSets; } | /**
* Get a copy of all of the valid {@link ReplicaSet} objects that have names.
*
* @return the valid replica set objects; never null but possibly empty
*/ | Get a copy of all of the valid <code>ReplicaSet</code> objects that have names | validReplicaSets | {
"repo_name": "adsr/debezium",
"path": "debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/ReplicaSets.java",
"license": "apache-2.0",
"size": 7781
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,876,369 |
public BigDecimal getProcessedOn();
public static final String COLUMNNAME_Processing = "Processing"; | BigDecimal function(); public static final String COLUMNNAME_Processing = STR; | /** Get Processed On.
* The date+time (expressed in decimal format) when the document has been processed
*/ | Get Processed On. The date+time (expressed in decimal format) when the document has been processed | getProcessedOn | {
"repo_name": "TaymourReda/-https-github.com-adempiere-adempiere",
"path": "base/src/org/compiere/model/I_A_Depreciation_Entry.java",
"license": "gpl-2.0",
"size": 9886
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 863,229 |
public BuildView.Options getViewOptions() {
return getOptions(BuildView.Options.class);
} | BuildView.Options function() { return getOptions(BuildView.Options.class); } | /**
* Returns the set of command-line options related to the view specified for
* this request.
*/ | Returns the set of command-line options related to the view specified for this request | getViewOptions | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/buildtool/BuildRequest.java",
"license": "apache-2.0",
"size": 20836
} | [
"com.google.devtools.build.lib.analysis.BuildView"
] | import com.google.devtools.build.lib.analysis.BuildView; | import com.google.devtools.build.lib.analysis.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,554,799 |
public void getAllRelevantConstraints
(
int statementType,
boolean skipCheckConstraints,
int[] changedColumnIds,
boolean[] needsDeferredProcessing,
ConstraintDescriptorList relevantConstraints
)
throws StandardException
{
if (SanityManager.DEBUG_ASSERT)
{
SanityManager.ASSE... | void function ( int statementType, boolean skipCheckConstraints, int[] changedColumnIds, boolean[] needsDeferredProcessing, ConstraintDescriptorList relevantConstraints ) throws StandardException { if (SanityManager.DEBUG_ASSERT) { SanityManager.ASSERT((statementType == StatementType.INSERT) (statementType == Statement... | /**
* Gets all of the relevant constraints for a statement, given its
* statement type and its list of updated columns.
*
* @param statementType As defined in StatementType.
* @param skipCheckConstraints Skip check constraints
* @param changedColumnIds If null, all columns being changed, otherwise ... | Gets all of the relevant constraints for a statement, given its statement type and its list of updated columns | getAllRelevantConstraints | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/TableDescriptor.java",
"license": "apache-2.0",
"size": 45446
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException",
"com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager",
"com.pivotal.gemfirexd.internal.iapi.sql.StatementType"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager; import com.pivotal.gemfirexd.internal.iapi.sql.StatementType; | import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.services.sanity.*; import com.pivotal.gemfirexd.internal.iapi.sql.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 305,267 |
public List<SnapshotStatus> getSnapshots() {
return snapshots;
} | List<SnapshotStatus> function() { return snapshots; } | /**
* Returns the list of snapshots
*
* @return the list of snapshots
*/ | Returns the list of snapshots | getSnapshots | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusResponse.java",
"license": "apache-2.0",
"size": 4161
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,906,866 |
public void createSettingsEntityWithDefaultValues() throws Exception {
if(spacesAdministrationStorage.settingsEntityExists()) {
throw new Exception("Settings Entity already exists - Cannot create it");
}
spacesAdministrationStorage.createSettingsEntity();
ValueParam createMembershipInitParam =... | void function() throws Exception { if(spacesAdministrationStorage.settingsEntityExists()) { throw new Exception(STR); } spacesAdministrationStorage.createSettingsEntity(); ValueParam createMembershipInitParam = initParams.getValueParam(SPACES_CREATE_MEMBERSHIPS_PROPERTY); if(createMembershipInitParam != null) { List<Me... | /**
* Add a new membership
* @throws Exception
*/ | Add a new membership | createSettingsEntityWithDefaultValues | {
"repo_name": "trangvh/spaces-administration",
"path": "services/src/main/java/org/exoplatform/addons/spacesadministration/SpacesAdministrationService.java",
"license": "lgpl-3.0",
"size": 5506
} | [
"java.util.List",
"org.exoplatform.container.xml.ValueParam",
"org.exoplatform.services.security.MembershipEntry"
] | import java.util.List; import org.exoplatform.container.xml.ValueParam; import org.exoplatform.services.security.MembershipEntry; | import java.util.*; import org.exoplatform.container.xml.*; import org.exoplatform.services.security.*; | [
"java.util",
"org.exoplatform.container",
"org.exoplatform.services"
] | java.util; org.exoplatform.container; org.exoplatform.services; | 1,715,352 |
public BlockPos down(int n)
{
return this.offset(EnumFacing.DOWN, n);
} | BlockPos function(int n) { return this.offset(EnumFacing.DOWN, n); } | /**
* Offset this BlockPos n blocks down
*/ | Offset this BlockPos n blocks down | down | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/util/math/BlockPos.java",
"license": "gpl-3.0",
"size": 16847
} | [
"net.minecraft.util.EnumFacing"
] | import net.minecraft.util.EnumFacing; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 479,514 |
public File createTempFile(String name) throws IOException {
File tempFile = File.createTempFile(String.format("temp-%s-", name), ".tmp", cacheDir);
tempFile.deleteOnExit();
return tempFile;
} | File function(String name) throws IOException { File tempFile = File.createTempFile(String.format(STR, name), ".tmp", cacheDir); tempFile.deleteOnExit(); return tempFile; } | /**
* Creates temporary file in the local directory cache, typically located at
* .syncany/cache. If not deleted by the application, the returned file is automatically
* deleted on exit by the JVM.
*
* @return Temporary file in local directory cache
*/ | Creates temporary file in the local directory cache, typically located at .syncany/cache. If not deleted by the application, the returned file is automatically deleted on exit by the JVM | createTempFile | {
"repo_name": "syncany/syncany-plugin-gui",
"path": "core/syncany-lib/src/main/java/org/syncany/config/Cache.java",
"license": "gpl-3.0",
"size": 6555
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,198,616 |
@GET
@Path("/satellite")
@Produces({"application/xml", "application/json", "text/xml"})
public List<SatelliteLink> getSatelliteFirstLevelLinks(@HeaderParam("x-session-token") String sSessionId) {
ArrayList<SatelliteLink> aoSatelliteLinks = new ArrayList<>();
OmirlUser oUser = Omirl.getUserFromSes... | @Path(STR) @Produces({STR, STR, STR}) List<SatelliteLink> function(@HeaderParam(STR) String sSessionId) { ArrayList<SatelliteLink> aoSatelliteLinks = new ArrayList<>(); OmirlUser oUser = Omirl.getUserFromSession(sSessionId); if (oUser!= null) { Object oConfObj = m_oServletConfig.getServletContext().getAttribute(STR); i... | /**
* Gets the first level of dynamic layers
* @return
*/ | Gets the first level of dynamic layers | getSatelliteFirstLevelLinks | {
"repo_name": "fadeoutsoftware/omirl",
"path": "OmirlServer/Omirl/src/it/fadeout/omirl/MapNavigatorService.java",
"license": "apache-2.0",
"size": 21912
} | [
"it.fadeout.omirl.business.OmirlUser",
"it.fadeout.omirl.business.config.OmirlNavigationConfig",
"it.fadeout.omirl.business.config.SatelliteLinkConfig",
"it.fadeout.omirl.viewmodels.SatelliteLink",
"java.util.ArrayList",
"java.util.List",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.P... | import it.fadeout.omirl.business.OmirlUser; import it.fadeout.omirl.business.config.OmirlNavigationConfig; import it.fadeout.omirl.business.config.SatelliteLinkConfig; import it.fadeout.omirl.viewmodels.SatelliteLink; import java.util.ArrayList; import java.util.List; import javax.ws.rs.HeaderParam; import javax.ws.rs.... | import it.fadeout.omirl.business.*; import it.fadeout.omirl.business.config.*; import it.fadeout.omirl.viewmodels.*; import java.util.*; import javax.ws.rs.*; | [
"it.fadeout.omirl",
"java.util",
"javax.ws"
] | it.fadeout.omirl; java.util; javax.ws; | 2,243,346 |
public static MutationProto toMutation(final MutationType type, final Mutation mutation,
final long nonce) throws IOException {
return toMutation(type, mutation, MutationProto.newBuilder(), nonce);
} | static MutationProto function(final MutationType type, final Mutation mutation, final long nonce) throws IOException { return toMutation(type, mutation, MutationProto.newBuilder(), nonce); } | /**
* Create a protocol buffer Mutate based on a client Mutation
*
* @param type
* @param mutation
* @return a protobuf'd Mutation
* @throws IOException
*/ | Create a protocol buffer Mutate based on a client Mutation | toMutation | {
"repo_name": "Jackygq1982/hbase_src",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 107497
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Mutation",
"org.apache.hadoop.hbase.protobuf.generated.ClientProtos"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Mutation; import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; | import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 273,361 |
@Nullable
@VisibleForTesting
@SuppressForbidden
List<IDevice> filterDevices(IDevice[] allDevices) {
if (allDevices.length == 0) {
console.printBuildFailure("No devices are found.");
return null;
}
List<IDevice> devices = Lists.newArrayList();
Optional<Boolean> emulatorsOnly = Option... | List<IDevice> filterDevices(IDevice[] allDevices) { if (allDevices.length == 0) { console.printBuildFailure(STR); return null; } List<IDevice> devices = Lists.newArrayList(); Optional<Boolean> emulatorsOnly = Optional.empty(); if (deviceOptions.isEmulatorsOnlyModeEnabled() && options.isMultiInstallModeEnabled()) { emul... | /**
* Returns list of devices that pass the filter. If there is an invalid combination or no
* devices are left after filtering this function prints an error and returns null.
*/ | Returns list of devices that pass the filter. If there is an invalid combination or no devices are left after filtering this function prints an error and returns null | filterDevices | {
"repo_name": "davido/buck",
"path": "src/com/facebook/buck/android/AdbHelper.java",
"license": "apache-2.0",
"size": 36409
} | [
"com.android.ddmlib.IDevice",
"com.google.common.collect.Lists",
"java.util.List",
"java.util.Optional"
] | import com.android.ddmlib.IDevice; import com.google.common.collect.Lists; import java.util.List; import java.util.Optional; | import com.android.ddmlib.*; import com.google.common.collect.*; import java.util.*; | [
"com.android.ddmlib",
"com.google.common",
"java.util"
] | com.android.ddmlib; com.google.common; java.util; | 17,868 |
public void setProgressBarMaximum(final int value) {
if (SwingUtilities.isEventDispatchThread()) {
progressBar.setMaximum(value);
} else {
SwingUtilities.invokeLater(() -> progressBar.setMaximum(value));
}
} | void function(final int value) { if (SwingUtilities.isEventDispatchThread()) { progressBar.setMaximum(value); } else { SwingUtilities.invokeLater(() -> progressBar.setMaximum(value)); } } | /**
* Sets the maximum value of the progress bar. Always call this method
* before using the progress bar, to set a maximum value appropriate to
* the task at hand.
* <p>
* If not called on the event dispatch thread, this method uses
* SwingUtilities.invokeLater() to do the actual operatio... | Sets the maximum value of the progress bar. Always call this method before using the progress bar, to set a maximum value appropriate to the task at hand. If not called on the event dispatch thread, this method uses SwingUtilities.invokeLater() to do the actual operation on the EDT | setProgressBarMaximum | {
"repo_name": "legalice/DC-UFSCar-ES2-201701-Daniel-Maicon-Osires-Rafael",
"path": "src/main/java/org/jabref/gui/JabRefFrame.java",
"license": "mit",
"size": 104034
} | [
"javax.swing.SwingUtilities"
] | import javax.swing.SwingUtilities; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,510,574 |
public void changeQuantity(BasketItem item, int quantity) {
if (item == null || quantity < 1) {
return;
}
this.quantity += quantity;
if (this.basket == null) {
addItem(item, quantity);
} else {
if (this.basket.containsKey(item.getItemID())) {
BasketEntry entry = (BasketEntry) this.basket.ge... | void function(BasketItem item, int quantity) { if (item == null quantity < 1) { return; } this.quantity += quantity; if (this.basket == null) { addItem(item, quantity); } else { if (this.basket.containsKey(item.getItemID())) { BasketEntry entry = (BasketEntry) this.basket.get(item.getItemID()); this.quantity -= entry.g... | /**
* Changes the quantity for the specified item in the basket to the value
* sent in. If the item is not in the basket it is added.
*
* @param item
* @param quantity
* The quantity
*/ | Changes the quantity for the specified item in the basket to the value sent in. If the item is not in the basket it is added | changeQuantity | {
"repo_name": "idega/com.idega.block.basket",
"path": "src/java/com/idega/block/basket/business/BasketBusinessBean.java",
"license": "gpl-3.0",
"size": 5773
} | [
"com.idega.block.basket.data.BasketEntry",
"com.idega.block.basket.data.BasketItem"
] | import com.idega.block.basket.data.BasketEntry; import com.idega.block.basket.data.BasketItem; | import com.idega.block.basket.data.*; | [
"com.idega.block"
] | com.idega.block; | 2,805,547 |
private synchronized void cleanup() {
// if we're not connected, someone beat us to it
if (!super.isConnected()) {
if (debug)
out.println("DEBUG: IMAPStore cleanup, not connected");
return;
}
boolean force;
synchronized (connectionFailedLock) {
force = forceClose;
forceClose = false;
... | synchronized void function() { if (!super.isConnected()) { if (debug) out.println(STR); return; } boolean force; synchronized (connectionFailedLock) { force = forceClose; forceClose = false; connectionFailed = false; } if (debug) out.println(STR + force); Vector foldersCopy = null; boolean done = true; for (;;) { synch... | /**
* Cleanup before dying.
*/ | Cleanup before dying | cleanup | {
"repo_name": "arthurzaczek/kolab-android",
"path": "javamail/com/sun/mail/imap/IMAPStore.java",
"license": "gpl-3.0",
"size": 60428
} | [
"java.util.Vector",
"javax.mail.MessagingException"
] | import java.util.Vector; import javax.mail.MessagingException; | import java.util.*; import javax.mail.*; | [
"java.util",
"javax.mail"
] | java.util; javax.mail; | 2,676,639 |
private void insertPayment(Payment info, Connection conn) throws SQLException {
String query;
PreparedStatement stmt;
query =
"INSERT INTO "
+ Const.PAYMENT_INFO_TABLE
+ " (decision,decision_publicSignature,orderAmount,orderAmount_publicSignature,orderCurrency,orderCurrency_publ... | void function(Payment info, Connection conn) throws SQLException { String query; PreparedStatement stmt; query = STR + Const.PAYMENT_INFO_TABLE + STR; logger.debug(STR); logger.debug(query); logger.info(STR + info.decision + STR + info.orderNumber + STR + info.pending_payment_token); stmt = conn.prepareStatement(query)... | /**
* Insert a payment into the database.
*
* @param info the payment to insert
* @param conn the SQL connection
* @throws SQLException when there is a problem inserting the row
*/ | Insert a payment into the database | insertPayment | {
"repo_name": "tair/tairwebapp",
"path": "src/org/tair/abrc/handler/PaymentInfoHandler.java",
"license": "gpl-3.0",
"size": 8431
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.tair.abrc.order.Const",
"org.tair.abrc.order.Payment"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.tair.abrc.order.Const; import org.tair.abrc.order.Payment; | import java.sql.*; import org.tair.abrc.order.*; | [
"java.sql",
"org.tair.abrc"
] | java.sql; org.tair.abrc; | 1,487,665 |
protected void setSaxWriter(SAXWriter saxWriter) {
m_saxWriter = saxWriter;
}
| void function(SAXWriter saxWriter) { m_saxWriter = saxWriter; } | /**
* Sets the SAX based xml writer to write the XML output to.<p>
*
* @param saxWriter the SAX based xml writer to write the XML output to
*/ | Sets the SAX based xml writer to write the XML output to | setSaxWriter | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/importexport/CmsExport.java",
"license": "lgpl-2.1",
"size": 68630
} | [
"org.dom4j.io.SAXWriter"
] | import org.dom4j.io.SAXWriter; | import org.dom4j.io.*; | [
"org.dom4j.io"
] | org.dom4j.io; | 2,827,112 |
protected void addSncLibraryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DestinationData_sncLibrary_feature"),
getString("_UI_PropertyDes... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RfcPackage.Literals.DESTINATION_DATA__SNC_LIBRARY, true, false, false, ItemPropertyDescriptor.GEN... | /**
* This adds a property descriptor for the Snc Library feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Snc Library feature. | addSncLibraryPropertyDescriptor | {
"repo_name": "janstey/fuse-1",
"path": "components/camel-sap/org.fusesource.camel.component.sap.model.edit/src/org/fusesource/camel/component/sap/model/rfc/provider/DestinationDataItemProvider.java",
"license": "apache-2.0",
"size": 44078
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.fusesource.camel.component.sap.model.rfc.RfcPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.fusesource.camel.component.sap.model.rfc.RfcPackage; | import org.eclipse.emf.edit.provider.*; import org.fusesource.camel.component.sap.model.rfc.*; | [
"org.eclipse.emf",
"org.fusesource.camel"
] | org.eclipse.emf; org.fusesource.camel; | 2,764,059 |
public void writeSingleLevelIndex(DataOutput out, String description)
throws IOException {
expectNumLevels(1);
if (!singleLevelOnly)
throw new IOException("Single-level mode is turned off");
if (rootChunk.getNumEntries() > 0)
throw new IOException("Root-level entries alre... | void function(DataOutput out, String description) throws IOException { expectNumLevels(1); if (!singleLevelOnly) throw new IOException(STR); if (rootChunk.getNumEntries() > 0) throw new IOException(STR + STR); rootChunk = curInlineChunk; curInlineChunk = new BlockIndexChunk(); if (LOG.isTraceEnabled()) { LOG.trace(STR ... | /**
* Writes the block index data as a single level only. Does not do any
* block framing.
*
* @param out the buffered output stream to write the index to. Typically a
* stream writing into an {@link HFile} block.
* @param description a short description of the index being written... | Writes the block index data as a single level only. Does not do any block framing | writeSingleLevelIndex | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlockIndex.java",
"license": "apache-2.0",
"size": 55252
} | [
"java.io.DataOutput",
"java.io.IOException"
] | import java.io.DataOutput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 756,619 |
protected void setSelectValueAfterInitCombo( int selectIndex, Combo combo )
{
boolean found = dealWithValueInComboList( selectIndex,
defaultValue,
combo,
parameter );
if ( !found )
{
dealWithValueNotInComboList( defaultValue,
combo,
parameter,
isCascade,
valueList );
}
} | void function( int selectIndex, Combo combo ) { boolean found = dealWithValueInComboList( selectIndex, defaultValue, combo, parameter ); if ( !found ) { dealWithValueNotInComboList( defaultValue, combo, parameter, isCascade, valueList ); } } | /**
*
* set the default selected item in combo
*
* @param selectIndex
* :indicate which item will be selected
* @param combo
* : Combo
*
*/ | set the default selected item in combo | setSelectValueAfterInitCombo | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/InputParameterDialog.java",
"license": "epl-1.0",
"size": 43276
} | [
"org.eclipse.swt.widgets.Combo"
] | import org.eclipse.swt.widgets.Combo; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 758,109 |
Set<String> getProtectedConfigKeys(); | Set<String> getProtectedConfigKeys(); | /**
* Returns a list of config keys whose value should not be logged.
*
* @return List of protected config keys
*/ | Returns a list of config keys whose value should not be logged | getProtectedConfigKeys | {
"repo_name": "apucher/pinot",
"path": "pinot-common/src/main/java/com/linkedin/pinot/common/segment/fetcher/SegmentFetcher.java",
"license": "apache-2.0",
"size": 1414
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,615,882 |
static Color getRGBColor(String name)
throws IllegalArgumentException {
int[] c = { 0, 0, 0, 0 };
if (name.startsWith("#")) {
if (name.length() == 4) {
c[0] = Integer.parseInt(name.substring(1, 2), 16) * 16;
c[1] = Integer.parseInt(name.substring(2, 3), 16) * 16;
c[2] = Integer.parseInt(name.su... | static Color getRGBColor(String name) throws IllegalArgumentException { int[] c = { 0, 0, 0, 0 }; if (name.startsWith("#")) { if (name.length() == 4) { c[0] = Integer.parseInt(name.substring(1, 2), 16) * 16; c[1] = Integer.parseInt(name.substring(2, 3), 16) * 16; c[2] = Integer.parseInt(name.substring(3), 16) * 16; ret... | /**
* Gives you a Color based on a name.
*
* @param name
* a name such as black, violet, cornflowerblue or #RGB or #RRGGBB
* or rgb(R,G,B)
* @return the corresponding Color object
* @throws IllegalArgumentException
* if the String isn't a know representation of a col... | Gives you a Color based on a name | getRGBColor | {
"repo_name": "venanciolm/afirma-ui-miniapplet_x_x",
"path": "afirma_ui_miniapplet/src/main/java/com/lowagie/text/html/WebColors.java",
"license": "mit",
"size": 13936
} | [
"java.awt.Color",
"java.util.StringTokenizer"
] | import java.awt.Color; import java.util.StringTokenizer; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 566,187 |
public void offerService() throws Exception {
LOG.info("using BLOCKREPORT_INTERVAL of " + blockReportInterval + "msec" +
" Initial delay: " + initialBlockReportDelay + "msec");
//
// Now loop for a long time....
//
while (shouldRun) {
try {
long startTime = now();
... | void function() throws Exception { LOG.info(STR + blockReportInterval + "msec" + STR + initialBlockReportDelay + "msec"); while (shouldRun) { try { long startTime = now(); if (startTime - lastHeartbeat > heartBeatInterval) { DatanodeCommand[] cmds = namenode.sendHeartbeat(dnRegistration, data.getCapacity(), data.getDfs... | /**
* Main loop for the DataNode. Runs until shutdown,
* forever calling remote NameNode functions.
*/ | Main loop for the DataNode. Runs until shutdown, forever calling remote NameNode functions | offerService | {
"repo_name": "williamsentosa/hadoop-modified",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 85969
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.protocol.BlockListAsLongs",
"org.apache.hadoop.hdfs.protocol.UnregisteredDatanodeException",
"org.apache.hadoop.hdfs.server.common.IncorrectVersionException",
"org.apache.hadoop.hdfs.server.protocol.DatanodeCommand",
... | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; import org.apache.hadoop.hdfs.protocol.UnregisteredDatanodeException; import org.apache.hadoop.hdfs.server.common.IncorrectVersionException; import org.apache.hadoop.hdfs.server.protocol.Da... | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,016,710 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
pnlMain = new javax.swing.JPanel();
scrollPane = new javax.swing.JScrollPane();
scrollPane.getHorizon... | void function() { java.awt.GridBagConstraints gridBagConstraints; pnlMain = new javax.swing.JPanel(); scrollPane = new javax.swing.JScrollPane(); scrollPane.getHorizontalScrollBar().setUnitIncrement(5); scrollPane.getVerticalScrollBar().setUnitIncrement(5); pnlInScroll = new javax.swing.JPanel(); pnlPage = new javax.sw... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "dante-mx/openbravopos",
"path": "src-pos/com/openbravo/pos/util/JRViewer300.java",
"license": "apache-2.0",
"size": 62065
} | [
"java.awt.Dimension",
"javax.swing.DefaultComboBoxModel",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.Dimension; import javax.swing.DefaultComboBoxModel; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,252,788 |
boolean isSelectable() {
return true;
}
}
private class NodeBoxEmpty extends NodeBox {
private BToggleButton button;
private LoadSelector loadSelector;
public NodeBoxEmpty(EmptyNode node) {
super(node);
setLayoutManager(new BorderLay... | boolean isSelectable() { return true; } } private class NodeBoxEmpty extends NodeBox { private BToggleButton button; private LoadSelector loadSelector; public NodeBoxEmpty(EmptyNode node) { super(node); setLayoutManager(new BorderLayout()); button = new BToggleButton("?", "?"); button.addListener(new ActionListener() { | /**
* Return true if this particular node box can be selected by the user
* The only non-selectable node box is for operators
* @return
*/ | Return true if this particular node box can be selected by the user The only non-selectable node box is for operators | isSelectable | {
"repo_name": "jogjayr/InTEL-Project",
"path": "Statics/src/edu/gatech/statics/modes/equation/ui/ArbitraryEquationBar.java",
"license": "gpl-3.0",
"size": 14117
} | [
"com.jmex.bui.BToggleButton",
"com.jmex.bui.event.ActionListener",
"com.jmex.bui.layout.BorderLayout",
"edu.gatech.statics.modes.equation.arbitrary.EmptyNode"
] | import com.jmex.bui.BToggleButton; import com.jmex.bui.event.ActionListener; import com.jmex.bui.layout.BorderLayout; import edu.gatech.statics.modes.equation.arbitrary.EmptyNode; | import com.jmex.bui.*; import com.jmex.bui.event.*; import com.jmex.bui.layout.*; import edu.gatech.statics.modes.equation.arbitrary.*; | [
"com.jmex.bui",
"edu.gatech.statics"
] | com.jmex.bui; edu.gatech.statics; | 1,297,240 |
protected JSON virusCheck(HttpServletRequest request) {
JSONObject object = WebCommonService.toJSONObject(request, MailAccountUtil.OBJECT_PARAM);
if(object == null) return FAILURE_JSON;
try {
// active the given mail account
this.mailAccountManager.virusCheck(
// mail address
WebCommonServic... | JSON function(HttpServletRequest request) { JSONObject object = WebCommonService.toJSONObject(request, MailAccountUtil.OBJECT_PARAM); if(object == null) return FAILURE_JSON; try { this.mailAccountManager.virusCheck( WebCommonService.toString(object, MailAccountUtil.MAIL_ADDRESS), WebCommonService.toBool(object, MailAcc... | /**
* SMTP authenticate or not
*
* @param request HttpServletRequest - the given request
* @return JSON - the returned JSON object
*/ | SMTP authenticate or not | virusCheck | {
"repo_name": "inetcloud/iMail",
"path": "source/mail-admin-service/src/com/inet/web/service/mail/MailAccountService.java",
"license": "gpl-2.0",
"size": 15146
} | [
"com.inet.lotus.core.LotusException",
"com.inet.web.service.mail.utils.MailAccountUtil",
"com.inet.web.service.mail.utils.WebCommonService",
"javax.servlet.http.HttpServletRequest",
"net.sf.json.JSONObject"
] | import com.inet.lotus.core.LotusException; import com.inet.web.service.mail.utils.MailAccountUtil; import com.inet.web.service.mail.utils.WebCommonService; import javax.servlet.http.HttpServletRequest; import net.sf.json.JSONObject; | import com.inet.lotus.core.*; import com.inet.web.service.mail.utils.*; import javax.servlet.http.*; import net.sf.json.*; | [
"com.inet.lotus",
"com.inet.web",
"javax.servlet",
"net.sf.json"
] | com.inet.lotus; com.inet.web; javax.servlet; net.sf.json; | 2,419,030 |
public boolean canEditPlayer ( Player player, String toEdit ) {
plugin.log(Level.FINE, "Checking if player " + player.getName() + " can edit player " + toEdit + ".");
String[] nodes = {this.permissionsNode, PERM_ADMIN, PERM_PLAYER, toEdit};
return (toEdit != null ? checkPermission ( player, nodes ) ... | boolean function ( Player player, String toEdit ) { plugin.log(Level.FINE, STR + player.getName() + STR + toEdit + "."); String[] nodes = {this.permissionsNode, PERM_ADMIN, PERM_PLAYER, toEdit}; return (toEdit != null ? checkPermission ( player, nodes ) : false ); } | /**
* Checks if a player has the permission node to edit a single player's options
* @param player The player who is doing the editing
* @param toEdit The player to edit
* @return boolean <code>true</code> when the player can edit toEdit's options,
* boolean <code>false</code> when the playe... | Checks if a player has the permission node to edit a single player's options | canEditPlayer | {
"repo_name": "NOS-Gamers/LoginPerks",
"path": "src/net/brianturchyn/LoginPerks/util/PermissionsHandler.java",
"license": "gpl-3.0",
"size": 10519
} | [
"java.util.logging.Level",
"org.bukkit.entity.Player"
] | import java.util.logging.Level; import org.bukkit.entity.Player; | import java.util.logging.*; import org.bukkit.entity.*; | [
"java.util",
"org.bukkit.entity"
] | java.util; org.bukkit.entity; | 2,017,239 |
public static void write(char[] data, OutputStream output, String encoding)
throws IOException {
if (data != null) {
if (encoding == null) {
write(data, output);
} else {
output.write(new String(data).getBytes(encoding));
... | static void function(char[] data, OutputStream output, String encoding) throws IOException { if (data != null) { if (encoding == null) { write(data, output); } else { output.write(new String(data).getBytes(encoding)); } } } | /**
* Writes chars from a <code>char[]</code> to bytes on an
* <code>OutputStream</code> using the specified character encoding.
* <p>
* Character encoding names can be found at
* <a href="http://www.iana.org/assignments/character-sets">IANA</a>.
* <p>
* This method uses {@link... | Writes chars from a <code>char[]</code> to bytes on an <code>OutputStream</code> using the specified character encoding. Character encoding names can be found at IANA. This method uses <code>String#String(char[])</code> and <code>String#getBytes(String)</code> | write | {
"repo_name": "rytina/dukecon_appsgenerator",
"path": "org.apache.commons.io/source-bundle/org/apache/commons/io/IOUtils.java",
"license": "epl-1.0",
"size": 62217
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 531,393 |
private void checkAttributePresence(ClusterNode node, String attrName) {
if (node.attribute(attrName) == null)
U.warn(log, "Remote node has inconsistent configuration (required attribute was not found) " +
"[attrName=" + attrName + ", nodeId=" + node.id() +
"spiCl... | void function(ClusterNode node, String attrName) { if (node.attribute(attrName) == null) U.warn(log, STR + STR + attrName + STR + node.id() + STR + U.getSimpleName(TcpCommunicationSpi.class) + ']'); } | /**
* Checks that node has specified attribute and prints warning if it does not.
*
* @param node Node to check.
* @param attrName Name of the attribute.
*/ | Checks that node has specified attribute and prints warning if it does not | checkAttributePresence | {
"repo_name": "gargvish/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java",
"license": "apache-2.0",
"size": 130342
} | [
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.cluster.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,712,573 |
public final static Function<Double, Double> remainder(double divisor) {
return remainder(Double.valueOf(divisor));
}
/**
* <p>
* It divides the target element by the given divisor and returns the
* remainder (target % divisor). The remainder precision and {@link RoundingMod... | final static Function<Double, Double> function(double divisor) { return remainder(Double.valueOf(divisor)); } /** * <p> * It divides the target element by the given divisor and returns the * remainder (target % divisor). The remainder precision and {@link RoundingMode} * is specified by the given {@link MathContext} | /**
* <p>
* It divides the target element by the given divisor and returns the
* remainder (target % divisor)
* </p>
*
* @param divisor the divisor
* @return the remainder of target/divisor
*/ | It divides the target element by the given divisor and returns the remainder (target % divisor) | remainder | {
"repo_name": "op4j/op4j",
"path": "src/main/java/org/op4j/functions/FnDouble.java",
"license": "apache-2.0",
"size": 111187
} | [
"java.math.MathContext",
"java.math.RoundingMode"
] | import java.math.MathContext; import java.math.RoundingMode; | import java.math.*; | [
"java.math"
] | java.math; | 200,285 |
public void resizeAndInsertRemaining(ArrayList<Unit> remaining)
{
GroupSet finalSet = new GroupSet();
int hiSetStrength = Integer.MIN_VALUE;
if(remaining.size() == 3)
{
}
else if(remaining.size() == 2)
{
for(Group generatedGrp: strongestGroups_.groupSet_)
{
ArrayList<Unit> te... | void function(ArrayList<Unit> remaining) { GroupSet finalSet = new GroupSet(); int hiSetStrength = Integer.MIN_VALUE; if(remaining.size() == 3) { } else if(remaining.size() == 2) { for(Group generatedGrp: strongestGroups_.groupSet_) { ArrayList<Unit> tempPool = new ArrayList<Unit>(); putIntoArrayList(remaining, tempPoo... | /**
* Only implemented for groups of size 4.
* @precondition strongestGroups_ contains only groups of size groupSize_
* @precondition pool_.size() < groupSize_
* @precondition groupSize_ == 4
* @param remaining
*/ | Only implemented for groups of size 4 | resizeAndInsertRemaining | {
"repo_name": "pkhokhlov/OptimalCombinations",
"path": "src/com/optimalCombinations/algo/DecreasingUnitPool.java",
"license": "apache-2.0",
"size": 11698
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,353,923 |
@Deprecated
public static void close(Closeable closeable, String name, Logger log) {
IOHelper.close(closeable, name, log);
} | static void function(Closeable closeable, String name, Logger log) { IOHelper.close(closeable, name, log); } | /**
* Closes the given resource if it is available, logging any closing
* exceptions to the given log
*
* @param closeable the object to close
* @param name the name of the resource
* @param log the log to use when reporting closure warnings
* @deprecated will be removed in Camel 3.0.... | Closes the given resource if it is available, logging any closing exceptions to the given log | close | {
"repo_name": "onders86/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java",
"license": "apache-2.0",
"size": 79581
} | [
"java.io.Closeable",
"org.slf4j.Logger"
] | import java.io.Closeable; import org.slf4j.Logger; | import java.io.*; import org.slf4j.*; | [
"java.io",
"org.slf4j"
] | java.io; org.slf4j; | 2,615,923 |
public static void fileCopy( File src, File dst ) throws FileNotFoundException, IOException {
if ( !src.exists() ) throw new IllegalArgumentException("src does not exist.");
if ( !src.canRead() ) throw new IllegalArgumentException("src cannot be read.");
if ( src.isDirectory() && ( !dst.exis... | static void function( File src, File dst ) throws FileNotFoundException, IOException { if ( !src.exists() ) throw new IllegalArgumentException(STR); if ( !src.canRead() ) throw new IllegalArgumentException(STR); if ( src.isDirectory() && ( !dst.exists() dst.isDirectory() ) ) { if ( !dst.exists() ) { if ( !dst.mkdirs() ... | /**
* copies the file or folder from src to dst.
* @param src the source file or folder.
* @param dst the location for the new file or folder.
* @throws FileNotFoundException
* @throws IOException
*/ | copies the file or folder from src to dst | fileCopy | {
"repo_name": "autoplot/app",
"path": "dasCoreUtil/src/org/das2/util/FileUtil.java",
"license": "gpl-2.0",
"size": 13908
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.nio.channels.FileChannel"
] | import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; | import java.io.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 157,077 |
public void stopGossipServer() throws ClusterDataAdminException {
ClusterMBeanProxy.getClusterStorageMBeanService().stopGossipServer();
} | void function() throws ClusterDataAdminException { ClusterMBeanProxy.getClusterStorageMBeanService().stopGossipServer(); } | /**
* Stop the gossip server of the node
*/ | Stop the gossip server of the node | stopGossipServer | {
"repo_name": "lankavitharana/carbon-storage-management",
"path": "components/cassandra/org.wso2.carbon.cassandra.cluster.mgt/src/main/java/org/wso2/carbon/cassandra/cluster/mgt/service/ClusterOperationAdmin.java",
"license": "apache-2.0",
"size": 23939
} | [
"org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException",
"org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy"
] | import org.wso2.carbon.cassandra.cluster.mgt.exception.ClusterDataAdminException; import org.wso2.carbon.cassandra.cluster.mgt.mbean.ClusterMBeanProxy; | import org.wso2.carbon.cassandra.cluster.mgt.exception.*; import org.wso2.carbon.cassandra.cluster.mgt.mbean.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 857,920 |
SpannableString spannable = SpannableString.valueOf(textView.getText());
boolean found = false;
Matcher m = pattern.matcher(spannable);
while (m.find()) {
int start = m.start();
int end = m.end();
URLSpan span = new URLSpan(url);
spannable.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)... | SpannableString spannable = SpannableString.valueOf(textView.getText()); boolean found = false; Matcher m = pattern.matcher(spannable); while (m.find()) { int start = m.start(); int end = m.end(); URLSpan span = new URLSpan(url); spannable.setSpan(span, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); found = true; } tex... | /**
* Applies a regex to the text of a TextView turning the matches into
* links. If links are found then UrlSpans are applied to the link
* text match areas, and the movement method for the text is changed
* to LinkMovementMethod.
*
* @param textView TextView whose text is to be marked-up with links.... | Applies a regex to the text of a TextView turning the matches into links. If links are found then UrlSpans are applied to the link text match areas, and the movement method for the text is changed to LinkMovementMethod | addLinks | {
"repo_name": "grote/Transportr",
"path": "app/src/main/java/de/grobox/transportr/utils/Linkify.java",
"license": "gpl-3.0",
"size": 2306
} | [
"android.text.SpannableString",
"android.text.Spanned",
"android.text.method.LinkMovementMethod",
"android.text.style.URLSpan",
"java.util.regex.Matcher"
] | import android.text.SpannableString; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.URLSpan; import java.util.regex.Matcher; | import android.text.*; import android.text.method.*; import android.text.style.*; import java.util.regex.*; | [
"android.text",
"java.util"
] | android.text; java.util; | 154,972 |
public JComponent getEditorView(); | JComponent function(); | /**
* view component for test script editor
*
* @return JComponent object
*/ | view component for test script editor | getEditorView | {
"repo_name": "wiztools/rest-client",
"path": "restclient-ui/src/main/java/org/wiztools/restclient/ui/ScriptEditor.java",
"license": "apache-2.0",
"size": 1245
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,727,289 |
String siteRoot = cms.getRequestContext().getSiteRoot();
List<CmsAlias> aliases = OpenCms.getAliasManager().getAliasesForSite(cms, siteRoot);
StringWriter writer = new StringWriter();
CSVWriter csvWriter = new CSVWriter(writer);
StringBuffer resultBuffer = writer.getBuffer(... | String siteRoot = cms.getRequestContext().getSiteRoot(); List<CmsAlias> aliases = OpenCms.getAliasManager().getAliasesForSite(cms, siteRoot); StringWriter writer = new StringWriter(); CSVWriter csvWriter = new CSVWriter(writer); StringBuffer resultBuffer = writer.getBuffer(); for (CmsAlias alias : aliases) { try { CmsR... | /**
* Returns the comma separated alias data.<p>
*
* @param cms the OpenCms context
*
* @return the comma separated alias data
*
* @throws CmsException if something goes wrong reading the alias data
*/ | Returns the comma separated alias data | exportAliasesAsCsv | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/gwt/CmsAliasHelper.java",
"license": "lgpl-2.1",
"size": 10337
} | [
"au.com.bytecode.opencsv.CSVWriter",
"java.io.IOException",
"java.io.StringWriter",
"java.util.List",
"org.opencms.db.CmsAlias",
"org.opencms.db.CmsRewriteAlias",
"org.opencms.file.CmsResource",
"org.opencms.main.CmsException",
"org.opencms.main.OpenCms"
] | import au.com.bytecode.opencsv.CSVWriter; import java.io.IOException; import java.io.StringWriter; import java.util.List; import org.opencms.db.CmsAlias; import org.opencms.db.CmsRewriteAlias; import org.opencms.file.CmsResource; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; | import au.com.bytecode.opencsv.*; import java.io.*; import java.util.*; import org.opencms.db.*; import org.opencms.file.*; import org.opencms.main.*; | [
"au.com.bytecode",
"java.io",
"java.util",
"org.opencms.db",
"org.opencms.file",
"org.opencms.main"
] | au.com.bytecode; java.io; java.util; org.opencms.db; org.opencms.file; org.opencms.main; | 1,312,434 |
void pruneY(Collection<String> items) {
for (FeatureVectors yPartition : Y) {
yPartition.prune(items);
}
} | void pruneY(Collection<String> items) { for (FeatureVectors yPartition : Y) { yPartition.prune(items); } } | /**
* Prunes the set of items in the model, by retaining only items that are expected to appear
* in the upcoming model updates, or, that have arrived recently. This also clears the
* recent known items data structure.
*
* @param items items that should be retained, which are coming in the new model upda... | Prunes the set of items in the model, by retaining only items that are expected to appear in the upcoming model updates, or, that have arrived recently. This also clears the recent known items data structure | pruneY | {
"repo_name": "santoshsahoo/oryx",
"path": "app/oryx-app-serving/src/main/java/com/cloudera/oryx/app/serving/als/model/ALSServingModel.java",
"license": "apache-2.0",
"size": 15525
} | [
"com.cloudera.oryx.app.als.FeatureVectors",
"java.util.Collection"
] | import com.cloudera.oryx.app.als.FeatureVectors; import java.util.Collection; | import com.cloudera.oryx.app.als.*; import java.util.*; | [
"com.cloudera.oryx",
"java.util"
] | com.cloudera.oryx; java.util; | 1,158,177 |
TensorType.Value resultValueType() {
return TensorType.Value.largestOf(inputs.stream()
.map(input -> input.type().get().type().valueType())
.collect(Collectors.toList()));
} | TensorType.Value resultValueType() { return TensorType.Value.largestOf(inputs.stream() .map(input -> input.type().get().type().valueType()) .collect(Collectors.toList())); } | /**
* Returns the largest value type among the input value types.
* This should only be called after it has been verified that input types are available.
*
* @throws IllegalArgumentException if a type cannot be uniquely determined
* @throws RuntimeException if called when input types are not av... | Returns the largest value type among the input value types. This should only be called after it has been verified that input types are available | resultValueType | {
"repo_name": "vespa-engine/vespa",
"path": "model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java",
"license": "apache-2.0",
"size": 16261
} | [
"com.yahoo.searchlib.rankingexpression.evaluation.Value",
"com.yahoo.tensor.TensorType",
"java.util.stream.Collectors"
] | import com.yahoo.searchlib.rankingexpression.evaluation.Value; import com.yahoo.tensor.TensorType; import java.util.stream.Collectors; | import com.yahoo.searchlib.rankingexpression.evaluation.*; import com.yahoo.tensor.*; import java.util.stream.*; | [
"com.yahoo.searchlib",
"com.yahoo.tensor",
"java.util"
] | com.yahoo.searchlib; com.yahoo.tensor; java.util; | 1,631,952 |
@Override public void enterInterfaceMemberDeclaration(@NotNull JavaParser.InterfaceMemberDeclarationContext ctx) { }
| @Override public void enterInterfaceMemberDeclaration(@NotNull JavaParser.InterfaceMemberDeclarationContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitNonWildcardTypeArguments | {
"repo_name": "martinaguero/deep",
"path": "src/org/trimatek/deep/lexer/JavaBaseListener.java",
"license": "apache-2.0",
"size": 39286
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,030,684 |
private Tbl createTable(JSONObject tableObj) {
ObjectFactory factory = new ObjectFactory();
Tbl table = factory.createTbl();
JSONArray items = (JSONArray)tableObj.get(VALUE_KEY);
JSONObject head = (JSONObject)((JSONObject)items.get(0)).get(COLUMN_KEY);
Tr headRow = factory.createTr();
Tr row;
// Sin... | Tbl function(JSONObject tableObj) { ObjectFactory factory = new ObjectFactory(); Tbl table = factory.createTbl(); JSONArray items = (JSONArray)tableObj.get(VALUE_KEY); JSONObject head = (JSONObject)((JSONObject)items.get(0)).get(COLUMN_KEY); Tr headRow = factory.createTr(); Tr row; Object[] sortedKeySet = head.keySet()... | /**
* Creates a Table object given a JSON object in the correct format.
* @param tableObj The JSON object in which the table is represented
* @return a standard word table
*/ | Creates a Table object given a JSON object in the correct format | createTable | {
"repo_name": "joelacummings/Templatr",
"path": "src/main/java/ca/joelcummings/templatr/Templatr.java",
"license": "apache-2.0",
"size": 12137
} | [
"java.util.Arrays",
"org.docx4j.wml.ObjectFactory",
"org.docx4j.wml.Tbl",
"org.docx4j.wml.Tc",
"org.docx4j.wml.Text",
"org.docx4j.wml.Tr",
"org.json.simple.JSONArray",
"org.json.simple.JSONObject"
] | import java.util.Arrays; import org.docx4j.wml.ObjectFactory; import org.docx4j.wml.Tbl; import org.docx4j.wml.Tc; import org.docx4j.wml.Text; import org.docx4j.wml.Tr; import org.json.simple.JSONArray; import org.json.simple.JSONObject; | import java.util.*; import org.docx4j.wml.*; import org.json.simple.*; | [
"java.util",
"org.docx4j.wml",
"org.json.simple"
] | java.util; org.docx4j.wml; org.json.simple; | 1,786,212 |
public Set<Operation> getAllValuesOfop() {
return rawAccumulateAllValuesOfop(emptyArray());
}
| Set<Operation> function() { return rawAccumulateAllValuesOfop(emptyArray()); } | /**
* Retrieve the set of values that occur in matches for op.
* @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
*
*/ | Retrieve the set of values that occur in matches for op | getAllValuesOfop | {
"repo_name": "ELTE-Soft/xUML-RT-Executor",
"path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/ClassContainsAbstractOperationMatcher.java",
"license": "epl-1.0",
"size": 10690
} | [
"java.util.Set",
"org.eclipse.uml2.uml.Operation"
] | import java.util.Set; import org.eclipse.uml2.uml.Operation; | import java.util.*; import org.eclipse.uml2.uml.*; | [
"java.util",
"org.eclipse.uml2"
] | java.util; org.eclipse.uml2; | 225,043 |
private void asyncPublishResult(HttpReportsBean reports, Session session)
throws IOException, InterruptedException {
int completedModulesCount = reports.getAllCompletedReports().size();
int expectedCounter = completedModulesCount;
boolean executing = reports.isAnyProcessRunning();
do {
executing = repo... | void function(HttpReportsBean reports, Session session) throws IOException, InterruptedException { int completedModulesCount = reports.getAllCompletedReports().size(); int expectedCounter = completedModulesCount; boolean executing = reports.isAnyProcessRunning(); do { executing = reports.isAnyProcessRunning(); complete... | /**
* Publish result when available. This method polls on HttpReportsBean
* instance and publishes the report onto the socket when they are
* available.
*
* @param reports
* the reports
* @param session
* the session
* @throws IOException
* Signals that an I/O exce... | Publish result when available. This method polls on HttpReportsBean instance and publishes the report onto the socket when they are available | asyncPublishResult | {
"repo_name": "impetus-opensource/jumbune",
"path": "web/src/main/java/org/jumbune/web/sockets/JobAnalysisSocket.java",
"license": "lgpl-3.0",
"size": 9276
} | [
"java.io.IOException",
"org.eclipse.jetty.websocket.api.Session",
"org.jumbune.common.beans.HttpReportsBean",
"org.jumbune.common.utils.Constants"
] | import java.io.IOException; import org.eclipse.jetty.websocket.api.Session; import org.jumbune.common.beans.HttpReportsBean; import org.jumbune.common.utils.Constants; | import java.io.*; import org.eclipse.jetty.websocket.api.*; import org.jumbune.common.beans.*; import org.jumbune.common.utils.*; | [
"java.io",
"org.eclipse.jetty",
"org.jumbune.common"
] | java.io; org.eclipse.jetty; org.jumbune.common; | 1,790,022 |
void updateStatus(network_cluster cluster);
void remove(Guid clusterid, Guid networkid); | void updateStatus(network_cluster cluster); void remove(Guid clusterid, Guid networkid); | /**
* Removes the specified network from the specified cluster.
*
* @param clusterid
* the cluster
* @param networkid
* the network
*/ | Removes the specified network from the specified cluster | remove | {
"repo_name": "anjalshireesh/gluster-ovirt-poc",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/NetworkClusterDAO.java",
"license": "apache-2.0",
"size": 1694
} | [
"org.ovirt.engine.core.compat.Guid"
] | import org.ovirt.engine.core.compat.Guid; | import org.ovirt.engine.core.compat.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 308,208 |
@Nullable
public WorkbookFunctionsLookupParameterSet body;
@Nonnull
public java.util.concurrent.CompletableFuture<WorkbookFunctionResult> postAsync() {
return sendAsync(HttpMethod.POST, body);
} | WorkbookFunctionsLookupParameterSet body; public java.util.concurrent.CompletableFuture<WorkbookFunctionResult> function() { return sendAsync(HttpMethod.POST, body); } | /**
* Invokes the method and returns a future with the result
* @return a future with the result
*/ | Invokes the method and returns a future with the result | postAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsLookupRequest.java",
"license": "mit",
"size": 2974
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.WorkbookFunctionResult",
"com.microsoft.graph.models.WorkbookFunctionsLookupParameterSet"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookFunctionResult; import com.microsoft.graph.models.WorkbookFunctionsLookupParameterSet; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 1,688,551 |
checkNotNull(object);
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
try {
ObjectOutputStream out = new ObjectOutputStream(bytes);
out.writeObject(object);
ObjectInputStream in = new ObjectInputStream(
new ByteArrayInputStream(bytes.toByteArray()));
return (T) in.re... | checkNotNull(object); ByteArrayOutputStream bytes = new ByteArrayOutputStream(); try { ObjectOutputStream out = new ObjectOutputStream(bytes); out.writeObject(object); ObjectInputStream in = new ObjectInputStream( new ByteArrayInputStream(bytes.toByteArray())); return (T) in.readObject(); } catch (RuntimeException e) {... | /**
* Serializes and deserializes the specified object.
*
* <p>Note that the specified object may not be known by the compiler to be a
* {@link java.io.Serializable} instance, and is thus declared an
* {@code Object}. For example, it might be declared as a {@code List}.
*
* @return the re-serialize... | Serializes and deserializes the specified object. Note that the specified object may not be known by the compiler to be a <code>java.io.Serializable</code> instance, and is thus declared an Object. For example, it might be declared as a List | reserialize | {
"repo_name": "tracylihui/google-collections",
"path": "test/com/google/common/testutils/SerializableTester.java",
"license": "apache-2.0",
"size": 3101
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.ObjectInputStream",
"java.io.ObjectOutputStream"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 632,768 |
String property = System.getProperty("okra.log.xsd.path", filePath);
try {
// XmlUtil.class
return validateXml(new File(XmlUtil.class.getResource(property).toURI()), xmlPath);
} catch (URISyntaxException e) {
LOG.warn("Load *.xsd file failure : " + property, e);
... | String property = System.getProperty(STR, filePath); try { return validateXml(new File(XmlUtil.class.getResource(property).toURI()), xmlPath); } catch (URISyntaxException e) { LOG.warn(STR + property, e); } return false; } | /**
* Check an Extensible Markup Language(XML) document against Schema.
*
* @param xmlPath The XML file path
* @return Return true if the xml is right.
*/ | Check an Extensible Markup Language(XML) document against Schema | validateXml | {
"repo_name": "ogcs/Okra-LOG",
"path": "src/main/java/org/ogcs/log/util/XmlUtil.java",
"license": "apache-2.0",
"size": 3665
} | [
"java.io.File",
"java.net.URISyntaxException"
] | import java.io.File; import java.net.URISyntaxException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,088,533 |
public List<IConfigurationProvider> getProviders() {
return providers;
} | List<IConfigurationProvider> function() { return providers; } | /**
* Return all the registered providers.
*
* @return all the registered providers
*/ | Return all the registered providers | getProviders | {
"repo_name": "ldelaigue/M2Doc",
"path": "plugins/org.obeonetwork.m2doc.genconf/src/org/obeonetwork/m2doc/genconf/provider/ConfigurationProviderService.java",
"license": "epl-1.0",
"size": 3707
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,457,174 |
public static <T> HashSet<T> hashSet() {
return new HashSet<T>();
}
| static <T> HashSet<T> function() { return new HashSet<T>(); } | /**
* Create a new HashSet.
*
* @param <T> the type
* @return the object
*/ | Create a new HashSet | hashSet | {
"repo_name": "LucidDB/luciddb",
"path": "extensions/services/pg2luciddb/src/org/h2/util/New.java",
"license": "apache-2.0",
"size": 2863
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,156,488 |
public void addNotificationListener(String connectionId,
ObjectName name,
Subject subject)
throws SecurityException;
/**
* This method is called when a remote
* {@link javax.management.remote.JMXConnector} invokes... | void function(String connectionId, ObjectName name, Subject subject) throws SecurityException; /** * This method is called when a remote * {@link javax.management.remote.JMXConnector} invokes the method * {@link javax.management.MBeanServerConnection#removeNotificationListener(ObjectName,NotificationListener)} | /**
* This method is called when a remote
* {@link javax.management.remote.JMXConnector} invokes the method
* {@link javax.management.MBeanServerConnection#addNotificationListener(ObjectName,NotificationListener,NotificationFilter,Object)}.
*
* @param connectionId the {@code connectionId} of th... | This method is called when a remote <code>javax.management.remote.JMXConnector</code> invokes the method <code>javax.management.MBeanServerConnection#addNotificationListener(ObjectName,NotificationListener,NotificationFilter,Object)</code> | addNotificationListener | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/jmx/remote/security/NotificationAccessController.java",
"license": "apache-2.0",
"size": 4031
} | [
"javax.management.ObjectName",
"javax.security.auth.Subject"
] | import javax.management.ObjectName; import javax.security.auth.Subject; | import javax.management.*; import javax.security.auth.*; | [
"javax.management",
"javax.security"
] | javax.management; javax.security; | 2,436,245 |
@Override
public void edit(FieldAccess fa) throws CannotCompileException {
CtField field = null;
try {
field = fa.getField();
if (Modifier.isStatic(field.getModifiers())) {
return;
}
} catch (NotFoundException e) {
throw new... | void function(FieldAccess fa) throws CannotCompileException { CtField field = null; try { field = fa.getField(); if (Modifier.isStatic(field.getModifiers())) { return; } } catch (NotFoundException e) { throw new CannotCompileException(e); } String fieldName = field.getName(); if (DEBUG) { LOGGER.debug( STR + fieldName ... | /**
* Check the access to fields of objects.
*/ | Check the access to fields of objects | edit | {
"repo_name": "mF2C/COMPSs",
"path": "compss/runtime/loader/src/main/java/es/bsc/compss/loader/total/ITAppEditor.java",
"license": "apache-2.0",
"size": 52442
} | [
"java.lang.reflect.Modifier",
"javassist.expr.FieldAccess"
] | import java.lang.reflect.Modifier; import javassist.expr.FieldAccess; | import java.lang.reflect.*; import javassist.expr.*; | [
"java.lang",
"javassist.expr"
] | java.lang; javassist.expr; | 2,055,035 |
public synchronized void close() throws IOException {
byteDiskQueue.close();
} | synchronized void function() throws IOException { byteDiskQueue.close(); } | /** Closes this queue.
*
* @see ByteDiskQueue#close()
*/ | Closes this queue | close | {
"repo_name": "iskoda/Bubing-crawler-BUT",
"path": "src/it/unimi/di/law/bubing/util/ObjectDiskQueue.java",
"license": "lgpl-3.0",
"size": 6331
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,805,766 |
private static <T> int gallopRight(T key, T[] a, int base, int len,
int hint, Comparator<? super T> c) {
assert len > 0 && hint >= 0 && hint < len;
int ofs = 1;
int lastOfs = 0;
if (c.compare(key, a[base + hint]) < 0) {
... | static <T> int function(T key, T[] a, int base, int len, int hint, Comparator<? super T> c) { assert len > 0 && hint >= 0 && hint < len; int ofs = 1; int lastOfs = 0; if (c.compare(key, a[base + hint]) < 0) { int maxOfs = hint + 1; while (ofs < maxOfs && c.compare(key, a[base + hint - ofs]) < 0) { lastOfs = ofs; ofs = ... | /**
* Like gallopLeft, except that if the range contains an element equal to
* key, gallopRight returns the index after the rightmost equal element.
*
* @param key the key whose insertion point to search for
* @param a the array in which to search
* @param base the index of the first... | Like gallopLeft, except that if the range contains an element equal to key, gallopRight returns the index after the rightmost equal element | gallopRight | {
"repo_name": "cinquin/mutinack",
"path": "src/contrib/jdk/TimSort.java",
"license": "agpl-3.0",
"size": 36965
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 845,362 |
public static ExpectedCondition<Boolean> attributeContains(final By locator,
final String attribute,
final String value) {
return new ExpectedCondition<Boolean>() {
private String curren... | static ExpectedCondition<Boolean> function(final By locator, final String attribute, final String value) { return new ExpectedCondition<Boolean>() { private String currentValue = null; | /**
* An expectation for checking WebElement with given locator has attribute which contains specific
* value
*
* @param locator used to define WebElement to check its parameters
* @param attribute used to define css or html attribute
* @param value used as expected attribute value
* @return ... | An expectation for checking WebElement with given locator has attribute which contains specific value | attributeContains | {
"repo_name": "asolntsev/selenium",
"path": "java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java",
"license": "apache-2.0",
"size": 49871
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,311,613 |
@Test
public void testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE()
throws Exception {
ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
"testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE", null);
ZKUtil.getChildDataAndWatchForNewChildren(zkw, "/wrongNode"... | void function() throws Exception { ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(), STR, null); ZKUtil.getChildDataAndWatchForNewChildren(zkw, STR); } @org.junit.Rule public org.apache.hadoop.hbase.ResourceCheckerJUnitRule cu = new org.apache.hadoop.hbase.ResourceCheckerJUnitRule(); | /**
* Test should not fail with NPE when getChildDataAndWatchForNewChildren
* invoked with wrongNode
*/ | Test should not fail with NPE when getChildDataAndWatchForNewChildren invoked with wrongNode | testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java",
"license": "apache-2.0",
"size": 12062
} | [
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher"
] | import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; | import org.apache.hadoop.hbase.zookeeper.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,234,371 |
protected ServiceResponse<EmptyServiceMessage> invoke(ServiceRequest<EmptyServiceMessage> rq)
throws MonitorException {
ServiceResponse<EmptyServiceMessage> rs;
EmptyServiceMessage msg;
try {
this.validateRequest(rq);
this.setContext(rq.getContext());
... | ServiceResponse<EmptyServiceMessage> function(ServiceRequest<EmptyServiceMessage> rq) throws MonitorException { ServiceResponse<EmptyServiceMessage> rs; EmptyServiceMessage msg; try { this.validateRequest(rq); this.setContext(rq.getContext()); msg = this.startService(rq.getRequestMessage()); if ((msg == null)) { super.... | /**
* Invokes the service handler method.
*
* @param rq the ServiceRequest<EmptyServiceMessage>.
* @return the ServiceResponse<EmptyServiceMessage>.
* @throws MonitorException
*/ | Invokes the service handler method | invoke | {
"repo_name": "NABUCCO/org.nabucco.framework.monitor",
"path": "org.nabucco.framework.monitor.impl.service/src/main/gen/org/nabucco/framework/monitor/impl/service/StartServiceServiceHandler.java",
"license": "epl-1.0",
"size": 3725
} | [
"org.nabucco.framework.base.facade.exception.NabuccoException",
"org.nabucco.framework.base.facade.exception.service.MonitorException",
"org.nabucco.framework.base.facade.message.EmptyServiceMessage",
"org.nabucco.framework.base.facade.message.ServiceRequest",
"org.nabucco.framework.base.facade.message.Serv... | import org.nabucco.framework.base.facade.exception.NabuccoException; import org.nabucco.framework.base.facade.exception.service.MonitorException; import org.nabucco.framework.base.facade.message.EmptyServiceMessage; import org.nabucco.framework.base.facade.message.ServiceRequest; import org.nabucco.framework.base.facad... | import org.nabucco.framework.base.facade.exception.*; import org.nabucco.framework.base.facade.exception.service.*; import org.nabucco.framework.base.facade.message.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,103,251 |
@Override
public void setRemoved(Date value) {
set(8, value);
} | void function(Date value) { set(8, value); } | /**
* Setter for <code>cattle.healthcheck_instance_host_map.removed</code>.
*/ | Setter for <code>cattle.healthcheck_instance_host_map.removed</code> | setRemoved | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/HealthcheckInstanceHostMapRecord.java",
"license": "apache-2.0",
"size": 19925
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,706,687 |
MessageDigest md;
String cipherText = null;
try {
md = MessageDigest.getInstance(hashType);
byte[] data = md.digest(msg.getBytes());
cipherText = StringUtils.bytes2HexString(data);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return cipherText;
}
| MessageDigest md; String cipherText = null; try { md = MessageDigest.getInstance(hashType); byte[] data = md.digest(msg.getBytes()); cipherText = StringUtils.bytes2HexString(data); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return cipherText; } | /**
* The method of hash encode.
* @author Crow
* @date 2015年8月2日
* @param eType the hash algorithm type
* @param msg the content to be encoded
* @return
*/ | The method of hash encode | hashEncode | {
"repo_name": "RisingWonderland/Lotus",
"path": "src/org/rw/crow/security/HashEncode.java",
"license": "mit",
"size": 2879
} | [
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException",
"org.rw.crow.commons.StringUtils"
] | import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import org.rw.crow.commons.StringUtils; | import java.security.*; import org.rw.crow.commons.*; | [
"java.security",
"org.rw.crow"
] | java.security; org.rw.crow; | 969,206 |
public String getMenuFile() {
// resolve absolute path for menu.jspx if it hasn't been resolved yet
if (menuFile == null) {
menuFile = getPathResolver().getIdentifier(
LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP, ""),
"/WEB-INF/views/menu.jspx");... | String function() { if (menuFile == null) { menuFile = getPathResolver().getIdentifier( LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP, STR/WEB-INF/views/menu.jspx"); } return menuFile; } | /**
* Get and initialize the absolute path for the {@code menu.jspx}.
*
* @return the absolute path to the file (never null)
*/ | Get and initialize the absolute path for the menu.jspx | getMenuFile | {
"repo_name": "osroca/gvnix",
"path": "addon-web-mvc-menu/src/main/java/org/gvnix/web/menu/roo/addon/MenuEntryOperationsImpl.java",
"license": "gpl-3.0",
"size": 60356
} | [
"org.springframework.roo.project.LogicalPath",
"org.springframework.roo.project.Path"
] | import org.springframework.roo.project.LogicalPath; import org.springframework.roo.project.Path; | import org.springframework.roo.project.*; | [
"org.springframework.roo"
] | org.springframework.roo; | 883,509 |
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final TenantServiceClient create(TenantServiceStub stub) {
return new TenantServiceClient(stub);
}
protected TenantServiceClient(TenantServiceSettings settings) throws IOException {
this.settings = ... | @BetaApi(STR) static final TenantServiceClient function(TenantServiceStub stub) { return new TenantServiceClient(stub); } protected TenantServiceClient(TenantServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((TenantServiceStubSettings) settings.getStubSettings()).createStub(); } @Bet... | /**
* Constructs an instance of TenantServiceClient, using the given stub for making calls. This is
* for advanced usage - prefer to use TenantServiceSettings}.
*/ | Constructs an instance of TenantServiceClient, using the given stub for making calls. This is for advanced usage - prefer to use TenantServiceSettings} | create | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-cloud-clients/google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java",
"license": "apache-2.0",
"size": 26703
} | [
"com.google.api.core.BetaApi",
"com.google.cloud.talent.v4beta1.stub.TenantServiceStub",
"com.google.cloud.talent.v4beta1.stub.TenantServiceStubSettings",
"java.io.IOException"
] | import com.google.api.core.BetaApi; import com.google.cloud.talent.v4beta1.stub.TenantServiceStub; import com.google.cloud.talent.v4beta1.stub.TenantServiceStubSettings; import java.io.IOException; | import com.google.api.core.*; import com.google.cloud.talent.v4beta1.stub.*; import java.io.*; | [
"com.google.api",
"com.google.cloud",
"java.io"
] | com.google.api; com.google.cloud; java.io; | 659,240 |
public String getCRA ( CellRangeAddress oCRA ) {
String res = "( Sheet: ";
res += oCRA.Sheet;
res += ";StartColumn: ";
res += oCRA.StartColumn;
res += ";StartRow: ";
res += oCRA.StartRow;
res += ";EndColumn: ";
res += oCRA.EndColumn;
res += ";E... | String function ( CellRangeAddress oCRA ) { String res = STR; res += oCRA.Sheet; res += STR; res += oCRA.StartColumn; res += STR; res += oCRA.StartRow; res += STR; res += oCRA.EndColumn; res += STR; res += oCRA.EndRow; res += STR; return res; } | /**
* Prints cell range structure to LOG
*/ | Prints cell range structure to LOG | getCRA | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/ifc/sheet/_XAreaLink.java",
"license": "gpl-3.0",
"size": 5300
} | [
"com.sun.star.table.CellRangeAddress"
] | import com.sun.star.table.CellRangeAddress; | import com.sun.star.table.*; | [
"com.sun.star"
] | com.sun.star; | 980,886 |
public LegendItem getLegendItem(int datasetIndex, int series) {
LegendItem result = null;
XYPlot plot = getXYPlot();
if (plot == null) {
return null;
}
XYDataset dataset = plot.getDataset(datasetIndex);
if (dataset != null) {
if (getI... | LegendItem function(int datasetIndex, int series) { LegendItem result = null; XYPlot plot = getXYPlot(); if (plot == null) { return null; } XYDataset dataset = plot.getDataset(datasetIndex); if (dataset != null) { if (getItemVisible(series, 0)) { String label = getLegendItemLabelGenerator().generateLabel( dataset, seri... | /**
* Returns a legend item for the specified series. The default method
* is overridden so that the legend displays circles for all series.
*
* @param datasetIndex the dataset index (zero-based).
* @param series the series index (zero-based).
*
* @return A legend item for t... | Returns a legend item for the specified series. The default method is overridden so that the legend displays circles for all series | getLegendItem | {
"repo_name": "integrated/jfreechart",
"path": "source/org/jfree/chart/renderer/xy/XYBubbleRenderer.java",
"license": "lgpl-2.1",
"size": 14933
} | [
"java.awt.Paint",
"java.awt.Shape",
"java.awt.Stroke",
"org.jfree.chart.LegendItem",
"org.jfree.chart.plot.XYPlot",
"org.jfree.data.xy.XYDataset"
] | import java.awt.Paint; import java.awt.Shape; import java.awt.Stroke; import org.jfree.chart.LegendItem; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset; | import java.awt.*; import org.jfree.chart.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 465,960 |
public List refreshHorizontalTicks(Graphics2D g2,
double cursor,
Rectangle2D plotArea,
Rectangle2D dataArea,
RectangleEdge edge) {
List result = ne... | List function(Graphics2D g2, double cursor, Rectangle2D plotArea, Rectangle2D dataArea, RectangleEdge edge) { List result = new java.util.ArrayList(); Font tickLabelFont = getTickLabelFont(); g2.setFont(tickLabelFont); if (isAutoTickUnitSelection()) { selectAutoTickUnit(g2, plotArea, dataArea, edge); } double unit = ge... | /**
* Builds a list of ticks for the axis. This method is called when the axis is at the top or
* bottom of the chart (so the axis is "horizontal").
*
* @param g2 the graphics device.
* @param cursor the cursor position.
* @param plotArea the plot area.
* @param dataArea the da... | Builds a list of ticks for the axis. This method is called when the axis is at the top or bottom of the chart (so the axis is "horizontal") | refreshHorizontalTicks | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/axis/CyclicNumberAxis.java",
"license": "lgpl-3.0",
"size": 40595
} | [
"java.awt.Font",
"java.awt.Graphics2D",
"java.awt.Insets",
"java.awt.geom.Rectangle2D",
"java.text.NumberFormat",
"java.util.List",
"org.jfree.ui.RectangleEdge",
"org.jfree.ui.TextAnchor"
] | import java.awt.Font; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.geom.Rectangle2D; import java.text.NumberFormat; import java.util.List; import org.jfree.ui.RectangleEdge; import org.jfree.ui.TextAnchor; | import java.awt.*; import java.awt.geom.*; import java.text.*; import java.util.*; import org.jfree.ui.*; | [
"java.awt",
"java.text",
"java.util",
"org.jfree.ui"
] | java.awt; java.text; java.util; org.jfree.ui; | 965,669 |
public DalRequest createHttpPost(String dalCommandUrl, List<Pair<String,String>> collectedPairs, Charset charset); | DalRequest function(String dalCommandUrl, List<Pair<String,String>> collectedPairs, Charset charset); | /**
* Create a new DalRequest to send an Http POST request to the server.
* @param dalCommandUrl the full URL to the DAL server
* @param collectedPairs
* @param charset
* @return a DalRequest
*/ | Create a new DalRequest to send an Http POST request to the server | createHttpPost | {
"repo_name": "kddart/libJava-DAL",
"path": "src/main/com/diversityarrays/dalclient/http/DalHttpFactory.java",
"license": "apache-2.0",
"size": 3455
} | [
"com.diversityarrays.dalclient.util.Pair",
"java.nio.charset.Charset",
"java.util.List"
] | import com.diversityarrays.dalclient.util.Pair; import java.nio.charset.Charset; import java.util.List; | import com.diversityarrays.dalclient.util.*; import java.nio.charset.*; import java.util.*; | [
"com.diversityarrays.dalclient",
"java.nio",
"java.util"
] | com.diversityarrays.dalclient; java.nio; java.util; | 802,933 |
@Override
public String getParameterDescription( String key ) throws UnknownParamException {
return namedParams.getParameterDescription( key );
} | String function( String key ) throws UnknownParamException { return namedParams.getParameterDescription( key ); } | /**
* Gets the description of the specified parameter.
*
* @param key
* the name of the parameter
* @return the parameter description
* @throws UnknownParamException
* if the parameter does not exist
* @see org.pentaho.di.core.parameters.NamedParams#getParameterDescription(jav... | Gets the description of the specified parameter | getParameterDescription | {
"repo_name": "denisprotopopov/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 196543
} | [
"org.pentaho.di.core.parameters.UnknownParamException"
] | import org.pentaho.di.core.parameters.UnknownParamException; | import org.pentaho.di.core.parameters.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 652,665 |
@Override
public Trigger.TriggerState getTriggerState(org.quartz.TriggerKey key) throws JobPersistenceException {
TriggerWrapper tw;
lock();
try {
tw = triggerFacade.get(key);
} finally {
unlock();
}
if (tw == null) { return Trigger.TriggerState.NONE; }
if (tw.getState() =... | Trigger.TriggerState function(org.quartz.TriggerKey key) throws JobPersistenceException { TriggerWrapper tw; lock(); try { tw = triggerFacade.get(key); } finally { unlock(); } if (tw == null) { return Trigger.TriggerState.NONE; } if (tw.getState() == TriggerState.COMPLETE) { return Trigger.TriggerState.COMPLETE; } if (... | /**
* <p>
* Get the current state of the identified <code>{@link Trigger}</code>.
* </p>
*
* @see Trigger.TriggerState
*/ | Get the current state of the identified <code><code>Trigger</code></code>. | getTriggerState | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/quartz/org/terracotta/quartz/DefaultClusteredJobStore.java",
"license": "gpl-2.0",
"size": 68728
} | [
"org.quartz.JobPersistenceException",
"org.quartz.Trigger",
"org.quartz.TriggerKey",
"org.terracotta.quartz.wrappers.TriggerWrapper"
] | import org.quartz.JobPersistenceException; import org.quartz.Trigger; import org.quartz.TriggerKey; import org.terracotta.quartz.wrappers.TriggerWrapper; | import org.quartz.*; import org.terracotta.quartz.wrappers.*; | [
"org.quartz",
"org.terracotta.quartz"
] | org.quartz; org.terracotta.quartz; | 210,730 |
public Response put(String bucket, String key, S3Object object, Map headers) throws IOException {
HttpURLConnection request
= makeRequest("PUT", bucket, Utils.urlencode(key), null, headers, object);
request.setDoOutput(true);
request.getOutputStream().wri... | Response function(String bucket, String key, S3Object object, Map headers) throws IOException { HttpURLConnection request = makeRequest("PUT", bucket, Utils.urlencode(key), null, headers, object); request.setDoOutput(true); request.getOutputStream().write(object.data == null ? new byte[]{} : object.data); return new Re... | /**
* Writes an object to S3.
*
* @param bucket The name of the bucket to which the object will be added.
* @param key The name of the key to use.
* @param object An S3Object containing the data to write.
* @param headers A Map of String to List of Strings represent... | Writes an object to S3 | put | {
"repo_name": "jamezp/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/host/controller/discovery/S3Util.java",
"license": "lgpl-2.1",
"size": 71207
} | [
"java.io.IOException",
"java.net.HttpURLConnection",
"java.util.Map"
] | import java.io.IOException; import java.net.HttpURLConnection; import java.util.Map; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 130,386 |
public void reloadText ()
{
super.setText (
Engine.instance ().getResourceService ().getStringWithoutException (textKey));
for (int i = 0; i < getMenuComponentCount (); ++i)
{
Component item = getMenuComponent (i);
if (item.getClass ().equals (IMenu.class))
{
((IMenu) item).reloadText ();
... | void function () { super.setText ( Engine.instance ().getResourceService ().getStringWithoutException (textKey)); for (int i = 0; i < getMenuComponentCount (); ++i) { Component item = getMenuComponent (i); if (item.getClass ().equals (IMenu.class)) { ((IMenu) item).reloadText (); } if (item.getClass ().equals (IMenuIte... | /**
* Reload the labels of all menu items in this menu.
*/ | Reload the labels of all menu items in this menu | reloadText | {
"repo_name": "grappendorf/openmetix",
"path": "src/java/de/iritgo/openmetix/core/gui/swing/IMenu.java",
"license": "gpl-2.0",
"size": 1794
} | [
"de.iritgo.openmetix.core.Engine",
"java.awt.Component"
] | import de.iritgo.openmetix.core.Engine; import java.awt.Component; | import de.iritgo.openmetix.core.*; import java.awt.*; | [
"de.iritgo.openmetix",
"java.awt"
] | de.iritgo.openmetix; java.awt; | 720,000 |
@Test
public void testFlushTableSnapshot() throws Exception {
// make sure we don't fail on listing snapshots
SnapshotTestingUtils.assertNoSnapshots(admin);
// put some stuff in the table
SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM);
LOG.debug("FS state before sn... | void function() throws Exception { SnapshotTestingUtils.assertNoSnapshots(admin); SnapshotTestingUtils.loadData(UTIL, TABLE_NAME, DEFAULT_NUM_ROWS, TEST_FAM); LOG.debug(STR); UTIL.getHBaseCluster().getMaster().getMasterFileSystem().logFileSystemState(LOG); String snapshotString = STR; byte[] snapshot = Bytes.toBytes(sn... | /**
* Test simple flush snapshotting a table that is online
* @throws Exception
*/ | Test simple flush snapshotting a table that is online | testFlushTableSnapshot | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java",
"license": "apache-2.0",
"size": 22151
} | [
"java.util.List",
"org.apache.hadoop.hbase.client.SnapshotDescription",
"org.apache.hadoop.hbase.client.SnapshotType",
"org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.util.List; import org.apache.hadoop.hbase.client.SnapshotDescription; import org.apache.hadoop.hbase.client.SnapshotType; import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.util.Bytes; | import java.util.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.shaded.protobuf.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 798,714 |
@JRubyMethod(name = { "put_float32", "put_float" }, required = 2)
public IRubyObject put_float32(ThreadContext context, IRubyObject offset, IRubyObject value) {
checkBounds(context, offset, 4);
getMemoryIO().putFloat(getOffset(offset), Util.floatValue(value));
return this;
} | @JRubyMethod(name = { STR, STR }, required = 2) IRubyObject function(ThreadContext context, IRubyObject offset, IRubyObject value) { checkBounds(context, offset, 4); getMemoryIO().putFloat(getOffset(offset), Util.floatValue(value)); return this; } | /**
* Writes an 32 bit floating point value to the memory area.
*
* @param offset The offset from the base pointer address to write the value.
* @param value The value to write.
* @return The value written.
*/ | Writes an 32 bit floating point value to the memory area | put_float32 | {
"repo_name": "google-code/android-scripting",
"path": "jruby/src/src/org/jruby/ext/ffi/AbstractMemory.java",
"license": "apache-2.0",
"size": 34201
} | [
"org.jruby.anno.JRubyMethod",
"org.jruby.runtime.ThreadContext",
"org.jruby.runtime.builtin.IRubyObject"
] | import org.jruby.anno.JRubyMethod; import org.jruby.runtime.ThreadContext; import org.jruby.runtime.builtin.IRubyObject; | import org.jruby.anno.*; import org.jruby.runtime.*; import org.jruby.runtime.builtin.*; | [
"org.jruby.anno",
"org.jruby.runtime"
] | org.jruby.anno; org.jruby.runtime; | 2,290,094 |
public void signPDF(File inputFile, File signedFile, TSAClient tsaClient, String signatureFieldName) throws IOException
{
setTsaClient(tsaClient);
if (inputFile == null || !inputFile.exists())
{
throw new IOException("Document for signing does not exist");
}
... | void function(File inputFile, File signedFile, TSAClient tsaClient, String signatureFieldName) throws IOException { setTsaClient(tsaClient); if (inputFile == null !inputFile.exists()) { throw new IOException(STR); } FileOutputStream fos = new FileOutputStream(signedFile); PDDocument doc = PDDocument.load(inputFile); in... | /**
* Sign pdf file and create new file that ends with "_signed.pdf".
*
* @param inputFile The source pdf document file.
* @param signedFile The file to be signed.
* @param tsaClient optional TSA client
* @param signatureFieldName optional name of an existing (unsigned) signature field
... | Sign pdf file and create new file that ends with "_signed.pdf" | signPDF | {
"repo_name": "gavanx/pdflearn",
"path": "examples/src/main/java/org/apache/pdfbox/examples/signature/CreateVisibleSignature.java",
"license": "apache-2.0",
"size": 15318
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.RandomAccessFile",
"java.util.Calendar",
"org.apache.pdfbox.io.IOUtils",
"org.apache.pdfbox.pdmodel.PDDocument",
"org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport",
"org.apache.pdfbox.pdmodel.int... | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.RandomAccessFile; import java.util.Calendar; import org.apache.pdfbox.io.IOUtils; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.interactive.digitalsignature.ExternalSigningSupport; import org... | import java.io.*; import java.util.*; import org.apache.pdfbox.io.*; import org.apache.pdfbox.pdmodel.*; import org.apache.pdfbox.pdmodel.interactive.digitalsignature.*; import org.apache.pdfbox.util.*; | [
"java.io",
"java.util",
"org.apache.pdfbox"
] | java.io; java.util; org.apache.pdfbox; | 2,165,610 |
synchronized void assign(Socket socket) {
// Wait for the Processor to get the previous Socket
while (available) {
try {
wait();
} catch (InterruptedException e) {
}
}
// Store the newly availab... | synchronized void assign(Socket socket) { while (available) { try { wait(); } catch (InterruptedException e) { } } this.socket = socket; available = true; notifyAll(); } | /**
* Process an incoming TCP/IP connection on the specified socket. Any
* exception that occurs during processing must be logged and swallowed.
* <b>NOTE</b>: This method is called from our Connector's thread. We
* must assign it to our own thread so that multiple simultaneous
... | Process an incoming TCP/IP connection on the specified socket. Any exception that occurs during processing must be logged and swallowed. NOTE: This method is called from our Connector's thread. We must assign it to our own thread so that multiple simultaneous requests can be handled | assign | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/JIoEndpoint.java",
"license": "mit",
"size": 21673
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 2,080,379 |
private void loadEOPOldFormat(final boolean isNonRotatingOrigin,
final BufferedReader reader, final String name)
throws OrekitException, IOException {
// read the data lines in the final values part inside section 2
for (line = reader.re... | void function(final boolean isNonRotatingOrigin, final BufferedReader reader, final String name) throws OrekitException, IOException { for (line = reader.readLine(); line != null; line = reader.readLine()) { lineNumber++; final Matcher matcher = SECTION_2_DATA_OLD_FORMAT.matcher(line); if (matcher.matches()) { final in... | /** Read EOP data from section 2 in the old bulletin B format.
* @param isNonRotatingOrigin if true, the file contain Non-Rotating Origin nutation corrections
* @param reader reader from where file content is obtained
* @param name name of the file (or zip entry)
* @exception IOExcep... | Read EOP data from section 2 in the old bulletin B format | loadEOPOldFormat | {
"repo_name": "liscju/Orekit",
"path": "src/main/java/org/orekit/frames/BulletinBFilesLoader.java",
"license": "apache-2.0",
"size": 27828
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.util.regex.Matcher",
"org.orekit.errors.OrekitException",
"org.orekit.time.AbsoluteDate",
"org.orekit.time.DateComponents",
"org.orekit.time.TimeScalesFactory",
"org.orekit.utils.Constants"
] | import java.io.BufferedReader; import java.io.IOException; import java.util.regex.Matcher; import org.orekit.errors.OrekitException; import org.orekit.time.AbsoluteDate; import org.orekit.time.DateComponents; import org.orekit.time.TimeScalesFactory; import org.orekit.utils.Constants; | import java.io.*; import java.util.regex.*; import org.orekit.errors.*; import org.orekit.time.*; import org.orekit.utils.*; | [
"java.io",
"java.util",
"org.orekit.errors",
"org.orekit.time",
"org.orekit.utils"
] | java.io; java.util; org.orekit.errors; org.orekit.time; org.orekit.utils; | 2,323,690 |
protected void prepareConnection(Connection con) throws JMSException {
if (getClientId() != null) {
con.setClientID(getClientId());
}
if (this.aggregatedExceptionListener != null) {
con.setExceptionListener(this.aggregatedExceptionListener);
}
else if (getExceptionListener() != null || isReconnectOnE... | void function(Connection con) throws JMSException { if (getClientId() != null) { con.setClientID(getClientId()); } if (this.aggregatedExceptionListener != null) { con.setExceptionListener(this.aggregatedExceptionListener); } else if (getExceptionListener() != null isReconnectOnException()) { ExceptionListener listenerT... | /**
* Prepare the given Connection before it is exposed.
* <p>The default implementation applies ExceptionListener and client id.
* Can be overridden in subclasses.
* @param con the Connection to prepare
* @throws JMSException if thrown by JMS API methods
* @see #setExceptionListener
* @see #setReconnectO... | Prepare the given Connection before it is exposed. The default implementation applies ExceptionListener and client id. Can be overridden in subclasses | prepareConnection | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java",
"license": "apache-2.0",
"size": 23014
} | [
"javax.jms.Connection",
"javax.jms.ExceptionListener",
"javax.jms.JMSException"
] | import javax.jms.Connection; import javax.jms.ExceptionListener; import javax.jms.JMSException; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 297,872 |
public Query getBagCreationQuery() {
if (allSelected == -1) {
throw new IllegalArgumentException("Don't use a query, when a whole column is not "
+ "selected");
}
final WebResults webResults = (WebResults) getAllRows();
final Results results = webResul... | Query function() { if (allSelected == -1) { throw new IllegalArgumentException(STR + STR); } final WebResults webResults = (WebResults) getAllRows(); final Results results = webResults.getInterMineResults(); final Query oldQuery = results.getQuery(); final Query newQuery = QueryCloner.cloneQuery(oldQuery); newQuery.cle... | /**
* Return a Query that produces a Results object of the selected objects.
* @return the query
*/ | Return a Query that produces a Results object of the selected objects | getBagCreationQuery | {
"repo_name": "drhee/toxoMine",
"path": "intermine/web/main/src/org/intermine/web/logic/results/PagedTable.java",
"license": "lgpl-2.1",
"size": 41642
} | [
"java.util.HashSet",
"java.util.Set",
"org.intermine.api.results.WebResults",
"org.intermine.objectstore.query.Query",
"org.intermine.objectstore.query.QueryCloner",
"org.intermine.objectstore.query.QuerySelectable",
"org.intermine.objectstore.query.Results",
"org.intermine.pathquery.Path"
] | import java.util.HashSet; import java.util.Set; import org.intermine.api.results.WebResults; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.QueryCloner; import org.intermine.objectstore.query.QuerySelectable; import org.intermine.objectstore.query.Results; import org.intermine.path... | import java.util.*; import org.intermine.api.results.*; import org.intermine.objectstore.query.*; import org.intermine.pathquery.*; | [
"java.util",
"org.intermine.api",
"org.intermine.objectstore",
"org.intermine.pathquery"
] | java.util; org.intermine.api; org.intermine.objectstore; org.intermine.pathquery; | 866,327 |
public DcmElement putPN(int tag, String[] values) {
if (values == null) {
return StringElement.createPN(tag);
}
PersonName[] a = new PersonName[values.length];
for (int i = 0; i < a.length; ++i) {
a[i] = new PersonNameImpl(values[i], false);
}
... | DcmElement function(int tag, String[] values) { if (values == null) { return StringElement.createPN(tag); } PersonName[] a = new PersonName[values.length]; for (int i = 0; i < a.length; ++i) { a[i] = new PersonNameImpl(values[i], false); } return put(StringElement.createPN(tag, a, getSpecificCharacterSet())); } | /**
* Description of the Method
*
* @param tag
* Description of the Parameter
* @param values
* Description of the Parameter
* @return Description of the Return Value
*/ | Description of the Method | putPN | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4CHE_1_4_30/src/java/org/dcm4cheri/data/DcmObjectImpl.java",
"license": "apache-2.0",
"size": 85555
} | [
"org.dcm4che.data.DcmElement",
"org.dcm4che.data.PersonName"
] | import org.dcm4che.data.DcmElement; import org.dcm4che.data.PersonName; | import org.dcm4che.data.*; | [
"org.dcm4che.data"
] | org.dcm4che.data; | 2,685,074 |
public Map<WellBigDecimal, BigDecimal> set(WellSetBigDecimal set, int begin, int length, int p) {
Preconditions.checkNotNull(set, "The well set cannot be null.");
Map<WellBigDecimal, BigDecimal> result = new TreeMap<WellBigDecimal, BigDecimal>();
for (WellBigDecimal well : ... | Map<WellBigDecimal, BigDecimal> function(WellSetBigDecimal set, int begin, int length, int p) { Preconditions.checkNotNull(set, STR); Map<WellBigDecimal, BigDecimal> result = new TreeMap<WellBigDecimal, BigDecimal>(); for (WellBigDecimal well : set) { WellBigDecimal clone = new WellBigDecimal(well); result.put(clone, w... | /**
* Returns the percentile of each well in the well set using the values between
* the beginning and ending indices.
* @param WellSetBigDecimal the well set
* @param int beginning index of subset
* @param int length of subset
* @param int... | Returns the percentile of each well in the well set using the values between the beginning and ending indices | set | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigdecimalflex/stat/PercentileBigDecimal.java",
"license": "apache-2.0",
"size": 24541
} | [
"com.github.jessemull.microflex.bigdecimalflex.plate.WellBigDecimal",
"com.github.jessemull.microflex.bigdecimalflex.plate.WellSetBigDecimal",
"com.google.common.base.Preconditions",
"java.math.BigDecimal",
"java.util.Map",
"java.util.TreeMap"
] | import com.github.jessemull.microflex.bigdecimalflex.plate.WellBigDecimal; import com.github.jessemull.microflex.bigdecimalflex.plate.WellSetBigDecimal; import com.google.common.base.Preconditions; import java.math.BigDecimal; import java.util.Map; import java.util.TreeMap; | import com.github.jessemull.microflex.bigdecimalflex.plate.*; import com.google.common.base.*; import java.math.*; import java.util.*; | [
"com.github.jessemull",
"com.google.common",
"java.math",
"java.util"
] | com.github.jessemull; com.google.common; java.math; java.util; | 1,473,061 |
protected boolean isAuthorizationRequest(final HttpServletRequest request,
final HttpServletResponse response) {
val requestPath = request.getRequestURI();
if (doesUriMatchPattern(requestPath, getAuthorizeUrls())) {
return isValidAuthorizeReq... | boolean function(final HttpServletRequest request, final HttpServletResponse response) { val requestPath = request.getRequestURI(); if (doesUriMatchPattern(requestPath, getAuthorizeUrls())) { return isValidAuthorizeRequest(new JEEContext(request, response)); } return false; } | /**
* Is authorization request.
*
* @param request the request
* @param response the response
* @return true/false
*/ | Is authorization request | isAuthorizationRequest | {
"repo_name": "fogbeam/cas_mirror",
"path": "support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/OAuth20HandlerInterceptorAdapter.java",
"license": "apache-2.0",
"size": 8230
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.pac4j.core.context.JEEContext"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.pac4j.core.context.JEEContext; | import javax.servlet.http.*; import org.pac4j.core.context.*; | [
"javax.servlet",
"org.pac4j.core"
] | javax.servlet; org.pac4j.core; | 1,589,221 |
Human getViewer(); | Human getViewer(); | /**
* Retrieves the Human involved with this inventory event.
*
* @return The viewer in this event
*/ | Retrieves the Human involved with this inventory event | getViewer | {
"repo_name": "gabizou/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/inventory/ViewerEvent.java",
"license": "mit",
"size": 1668
} | [
"org.spongepowered.api.entity.living.Human"
] | import org.spongepowered.api.entity.living.Human; | import org.spongepowered.api.entity.living.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 488,911 |
List<LifecycleStrategy> getLifecycleStrategies(); | List<LifecycleStrategy> getLifecycleStrategies(); | /**
* Returns the lifecycle strategies used to handle lifecycle notifications
*
* @return the lifecycle strategies
*/ | Returns the lifecycle strategies used to handle lifecycle notifications | getLifecycleStrategies | {
"repo_name": "NickCis/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 74001
} | [
"java.util.List",
"org.apache.camel.spi.LifecycleStrategy"
] | import java.util.List; import org.apache.camel.spi.LifecycleStrategy; | import java.util.*; import org.apache.camel.spi.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,112,014 |
private void handleFSException(Throwable t, String message)
throws FSAccessException
{
boolean b = handleConnectionException(t);
if (!b) return;
if (!connected) return;
Throwable cause = t.getCause();
String s = "\nImage not ready. Please try again later.";
if (cause instanceof ConcurrencyException) {... | void function(Throwable t, String message) throws FSAccessException { boolean b = handleConnectionException(t); if (!b) return; if (!connected) return; Throwable cause = t.getCause(); String s = STR; if (cause instanceof ConcurrencyException) { ConcurrencyException mpe = (ConcurrencyException) cause; FSAccessException ... | /**
* Helper method to handle exceptions thrown by the connection library.
* Methods in this class are required to fill in a meaningful context
* message.
* This method is not supposed to be used in this class' constructor or in
* the login/logout methods.
*
* @param t The exception.
* @param message Th... | Helper method to handle exceptions thrown by the connection library. Methods in this class are required to fill in a meaningful context message. This method is not supposed to be used in this class' constructor or in the login/logout methods | handleFSException | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java",
"license": "gpl-2.0",
"size": 286379
} | [
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import org.openmicroscopy.shoola.util.ui.UIUtilities; | import org.openmicroscopy.shoola.util.ui.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,598,102 |
ConsumerCredentials creds = new ConsumerCredentials("key", "sig", "meth", "base", "tok");
when(consumerDetails.getAuthorities()).thenReturn(new ArrayList<GrantedAuthority>());
AccessTokenProcessingFilter filter = new AccessTokenProcessingFilter();
filter.setTokenServices(tokenServices);
when(tokenServices.c... | ConsumerCredentials creds = new ConsumerCredentials("key", "sig", "meth", "base", "tok"); when(consumerDetails.getAuthorities()).thenReturn(new ArrayList<GrantedAuthority>()); AccessTokenProcessingFilter filter = new AccessTokenProcessingFilter(); filter.setTokenServices(tokenServices); when(tokenServices.createAccessT... | /**
* tests creating the oauth token.
*/ | tests creating the oauth token | testCreateOAuthToken | {
"repo_name": "spring-projects/spring-security-oauth",
"path": "spring-security-oauth/src/test/java/org/springframework/security/oauth/provider/filter/AccessTokenProcessingFilterTests.java",
"license": "apache-2.0",
"size": 2712
} | [
"java.util.ArrayList",
"org.junit.Assert",
"org.mockito.Mockito",
"org.springframework.security.core.GrantedAuthority",
"org.springframework.security.oauth.provider.ConsumerAuthentication",
"org.springframework.security.oauth.provider.ConsumerCredentials",
"org.springframework.security.oauth.provider.fi... | import java.util.ArrayList; import org.junit.Assert; import org.mockito.Mockito; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.oauth.provider.ConsumerAuthentication; import org.springframework.security.oauth.provider.ConsumerCredentials; import org.springframework.securi... | import java.util.*; import org.junit.*; import org.mockito.*; import org.springframework.security.core.*; import org.springframework.security.oauth.provider.*; import org.springframework.security.oauth.provider.filter.*; | [
"java.util",
"org.junit",
"org.mockito",
"org.springframework.security"
] | java.util; org.junit; org.mockito; org.springframework.security; | 1,692,689 |
protected UriComponents normalize(final String resource) {
val builder = UriComponentsBuilder.newInstance();
val matcher = RESOURCE_NORMALIZED_PATTERN.matcher(resource);
if (!matcher.matches()) {
LOGGER.error("Unable to match the resource [{}] against pattern [{}] for normalizat... | UriComponents function(final String resource) { val builder = UriComponentsBuilder.newInstance(); val matcher = RESOURCE_NORMALIZED_PATTERN.matcher(resource); if (!matcher.matches()) { LOGGER.error(STR, resource, matcher.pattern().pattern()); return null; } builder.scheme(matcher.group(PATTERN_GROUP_INDEX_SCHEME)); bui... | /**
* Normalize uri components.
*
* @param resource the resource
* @return the uri components
*/ | Normalize uri components | normalize | {
"repo_name": "GIP-RECIA/cas",
"path": "support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/discovery/webfinger/OidcWebFingerDiscoveryService.java",
"license": "apache-2.0",
"size": 6282
} | [
"org.apache.commons.lang3.StringUtils",
"org.springframework.web.util.UriComponents",
"org.springframework.web.util.UriComponentsBuilder"
] | import org.apache.commons.lang3.StringUtils; import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; | import org.apache.commons.lang3.*; import org.springframework.web.util.*; | [
"org.apache.commons",
"org.springframework.web"
] | org.apache.commons; org.springframework.web; | 2,160,575 |
protected void addStatisticsEnabledPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AbstractDefaultEndPoint_statisticsEnabled_feature"),
get... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.ABSTRACT_DEFAULT_END_POINT__STATISTICS_ENABLED, true, false, false, ItemPrope... | /**
* This adds a property descriptor for the Statistics Enabled feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Statistics Enabled feature. | addStatisticsEnabledPropertyDescriptor | {
"repo_name": "thiliniish/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.esb.edit/src/org/wso2/developerstudio/eclipse/esb/provider/AbstractDefaultEndPointItemProvider.java",
"license": "apache-2.0",
"size": 9952
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 2,716,759 |
public void start(ChannelInitializer<SocketChannel> initializer)
throws IOException, InterruptedException {
io.netty.bootstrap.ServerBootstrap b = new io.netty.bootstrap.ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.handler(new io.netty.handle... | void function(ChannelInitializer<SocketChannel> initializer) throws IOException, InterruptedException { io.netty.bootstrap.ServerBootstrap b = new io.netty.bootstrap.ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .handler(new io.netty.handler.logging.LoggingHandler( io.netty.h... | /**
* Attempt to start the RPC server
*
* @throws IOException if the server cannot be started, likely because the port is already in
* use
* @throws InterruptedException we were interrupted while waiting for the channel to become
* active, which is probably an external request to shutdown, so we retur... | Attempt to start the RPC server | start | {
"repo_name": "SalesforceEng/coyote",
"path": "coyote-protobuf-rpc/coyote-protobuf-server/src/main/java/com/salesforce/keystone/coyote/rpc/server/NettyRpcServer.java",
"license": "bsd-3-clause",
"size": 7506
} | [
"io.netty.channel.ChannelInitializer",
"io.netty.channel.ChannelOption",
"io.netty.channel.socket.SocketChannel",
"io.netty.channel.socket.nio.NioServerSocketChannel",
"java.io.IOException"
] | import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import java.io.IOException; | import io.netty.channel.*; import io.netty.channel.socket.*; import io.netty.channel.socket.nio.*; import java.io.*; | [
"io.netty.channel",
"java.io"
] | io.netty.channel; java.io; | 1,443,752 |
private void rollOver(MouseEvent e)
{
if (!model.getParentModel().isRollOver()) return;
JTree tree = treeDisplay;
TreePath path = treeDisplay.getClosestPathForLocation(
e.getX(), e.getY());
Rectangle bounds = tree.getPathBounds(path);
if (!bounds.contains(e.getPoint... | void function(MouseEvent e) { if (!model.getParentModel().isRollOver()) return; JTree tree = treeDisplay; TreePath path = treeDisplay.getClosestPathForLocation( e.getX(), e.getY()); Rectangle bounds = tree.getPathBounds(path); if (!bounds.contains(e.getPoint())) return; TreeImageDisplay node = (TreeImageDisplay) path.g... | /**
* Handles the mouse moved event. Displays the properties of the
* the nodes the mouse is over.
*
* @param e The mouse event to handle.
*/ | Handles the mouse moved event. Displays the properties of the the nodes the mouse is over | rollOver | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserUI.java",
"license": "gpl-2.0",
"size": 79520
} | [
"java.awt.Rectangle",
"java.awt.event.MouseEvent",
"javax.swing.JTree",
"javax.swing.tree.TreePath",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay"
] | import java.awt.Rectangle; import java.awt.event.MouseEvent; import javax.swing.JTree; import javax.swing.tree.TreePath; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; | import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.awt",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.awt; javax.swing; org.openmicroscopy.shoola; | 1,066,543 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.